From 15c13281cc6e54b8c1ce86b62149eed2788fa02c Mon Sep 17 00:00:00 2001 From: Sean Young Date: Mon, 9 Sep 2019 11:53:39 +0100 Subject: [PATCH 001/185] Refactor snatives to make it simpler to add more Also change the "burrow snatives" output to be "interface" rather than contract. With contract the contract would be abstract since there are no function bodies; with interface this is more explicit. Signed-off-by: Sean Young --- execution/evm/snative.go | 268 ++++++++++-------- execution/evm/snative_test.go | 2 +- execution/execution_test.go | 2 +- util/snatives/templates/solidity_templates.go | 12 +- 4 files changed, 154 insertions(+), 130 deletions(-) diff --git a/execution/evm/snative.go b/execution/evm/snative.go index 04bd9c8d6..0995b2733 100644 --- a/execution/evm/snative.go +++ b/execution/evm/snative.go @@ -17,6 +17,7 @@ package evm import ( "fmt" "reflect" + "runtime" "strings" @@ -35,8 +36,36 @@ import ( // based on account permissions and can access and modify an account's permissions // -// Metadata for SNative contract. Acts as a call target from the EVM. Can be -// used to generate bindings in a smart contract languages. +// Instructions on adding an SNative function. First declare a function like so: +// +// func unsetBase(context SNativeContext, args unsetBaseArgs) (unsetBaseRets, error) { +// } +// +// The name of the function will be used as the name of the function in solidity. The +// first arguments is SNativeContext; this will give you access to state, and the logger +// etc. The second arguments must be a struct type. The members of this struct must be +// exported (start with uppercase letter), and they will be converted into arguments +// for the solidity function, with the same types. The first return value is a struct +// which defines the return values from solidity just like the arguments. +// +// The second return value must be error. If non-nil is returned for error, then +// the current transaction will be aborted and the execution will stop. +// +// For each contract you will need to create a SNativeContractDescription{} struct, +// with the function listed. Only the PermFlag and the function F needs to be filled +// in for each SNativeFunctionDescription. Add this to the SNativeContracts() function. + +// SNativeContext is the first argument to any snative function. This struct carries +// all the context an snative needs to access e.g. state in burrow. +type SNativeContext struct { + State Interface + Caller crypto.Address + Gas *uint64 + Logger *logging.Logger +} + +// SNativeContractDescription is metadata for SNative contract. Acts as a call target +// from the EVM. Can be used to generate bindings in a smart contract languages. type SNativeContractDescription struct { // Comment describing purpose of SNative contract and reason for assembling // the particular functions @@ -47,25 +76,23 @@ type SNativeContractDescription struct { functions []*SNativeFunctionDescription } -// Metadata for SNative functions. Act as call targets for the EVM when -// collected into an SNativeContractDescription. Can be used to generate +// SNativeFunctionDescription is metadata for SNative functions. Act as call targets +// for the EVM when collected into an SNativeContractDescription. Can be used to generate // bindings in a smart contract languages. type SNativeFunctionDescription struct { // Comment describing function's purpose, parameters, and return value Comment string - // Function name (used to form signature) - Name string - // Function arguments - Arguments reflect.Type - // Function return values - Returns reflect.Type - // The abi - Abi abi.FunctionSpec // Permissions required to call function PermFlag permission.PermFlag // Native function to which calls will be dispatched when a containing - F func(stateWriter Interface, caller crypto.Address, gas *uint64, logger *logging.Logger, - v interface{}) (interface{}, error) + F interface{} + + // Following fields are for only for memoization + + // Function name (used to form signature) + name string + // The abi + abi abi.FunctionSpec } func registerSNativeContracts() { @@ -77,7 +104,7 @@ func registerSNativeContracts() { } } -// Returns a map of all SNative contracts defined indexed by name +// SNativeContracts returns a map of all SNative contracts defined indexed by name func SNativeContracts() map[string]*SNativeContractDescription { contracts := []*SNativeContractDescription{ NewSNativeContract(` @@ -91,11 +118,8 @@ func SNativeContracts() map[string]*SNativeContractDescription { * @param Role role name * @return result whether role was added `, - Name: "addRole", - PermFlag: permission.AddRole, - Arguments: reflect.TypeOf(addRoleArgs{}), - Returns: reflect.TypeOf(addRoleRets{}), - F: addRole}, + PermFlag: permission.AddRole, + F: addRole}, &SNativeFunctionDescription{Comment: ` * @notice Removes a role from an account @@ -103,11 +127,8 @@ func SNativeContracts() map[string]*SNativeContractDescription { * @param Role role name * @return result whether role was removed `, - Name: "removeRole", - PermFlag: permission.RemoveRole, - Arguments: reflect.TypeOf(removeRoleArgs{}), - Returns: reflect.TypeOf(removeRoleRets{}), - F: removeRole}, + PermFlag: permission.RemoveRole, + F: removeRole}, &SNativeFunctionDescription{Comment: ` * @notice Indicates whether an account has a role @@ -115,11 +136,8 @@ func SNativeContracts() map[string]*SNativeContractDescription { * @param Role role name * @return result whether account has role `, - Name: "hasRole", - PermFlag: permission.HasRole, - Arguments: reflect.TypeOf(hasRoleArgs{}), - Returns: reflect.TypeOf(hasRoleRets{}), - F: hasRole}, + PermFlag: permission.HasRole, + F: hasRole}, &SNativeFunctionDescription{Comment: ` * @notice Sets the permission flags for an account. Makes them explicitly set (on or off). @@ -128,11 +146,8 @@ func SNativeContracts() map[string]*SNativeContractDescription { * @param Set whether to set or unset the permissions flags at the account level * @return The permission flag that was set as uint64 `, - Name: "setBase", - PermFlag: permission.SetBase, - Arguments: reflect.TypeOf(setBaseArgs{}), - Returns: reflect.TypeOf(setBaseRets{}), - F: setBase}, + PermFlag: permission.SetBase, + F: setBase}, &SNativeFunctionDescription{Comment: ` * @notice Unsets the permissions flags for an account. Causes permissions being unset to fall through to global permissions. @@ -140,11 +155,8 @@ func SNativeContracts() map[string]*SNativeContractDescription { * @param Permission the permissions flags to unset for the account * @return The permission flag that was unset as uint64 `, - Name: "unsetBase", - PermFlag: permission.UnsetBase, - Arguments: reflect.TypeOf(unsetBaseArgs{}), - Returns: reflect.TypeOf(unsetBaseRets{}), - F: unsetBase}, + PermFlag: permission.UnsetBase, + F: unsetBase}, &SNativeFunctionDescription{Comment: ` * @notice Indicates whether an account has a subset of permissions set @@ -152,11 +164,8 @@ func SNativeContracts() map[string]*SNativeContractDescription { * @param Permission the permissions flags (mask) to check whether enabled against base permissions for the account * @return result whether account has the passed permissions flags set `, - Name: "hasBase", - PermFlag: permission.HasBase, - Arguments: reflect.TypeOf(hasBaseArgs{}), - Returns: reflect.TypeOf(hasBaseRets{}), - F: hasBase}, + PermFlag: permission.HasBase, + F: hasBase}, &SNativeFunctionDescription{Comment: ` * @notice Sets the global (default) permissions flags for the entire chain @@ -164,11 +173,8 @@ func SNativeContracts() map[string]*SNativeContractDescription { * @param Set whether to set (or unset) the permissions flags * @return The permission flag that was set as uint64 `, - Name: "setGlobal", - PermFlag: permission.SetGlobal, - Arguments: reflect.TypeOf(setGlobalArgs{}), - Returns: reflect.TypeOf(setGlobalRets{}), - F: setGlobal}, + PermFlag: permission.SetGlobal, + F: setGlobal}, ), } @@ -192,9 +198,28 @@ func NewSNativeContract(comment, name string, functionsByID := make(map[abi.FunctionID]*SNativeFunctionDescription, len(functions)) for _, f := range functions { + // Get name of function + t := reflect.TypeOf(f.F) + v := reflect.ValueOf(f.F) + // v.String() for functions returns the empty string + fullyqualifiedname := runtime.FuncForPC(v.Pointer()).Name() + a := strings.Split(fullyqualifiedname, ".") + f.name = a[len(a)-1] + + if t.NumIn() != 2 { + panic(fmt.Sprintf("%s must have two arguments", fullyqualifiedname)) + } + + if t.NumOut() != 2 { + panic(fmt.Sprintf("%s must have two return values", fullyqualifiedname)) + } - f.Abi = *abi.SpecFromStructReflect(f.Name, f.Arguments, f.Returns) - fid := f.Abi.FunctionID + if t.In(0) != reflect.TypeOf(SNativeContext{}) { + panic(fmt.Sprintf("first agument of %s must be struct SNativeContext", fullyqualifiedname)) + } + + f.abi = *abi.SpecFromStructReflect(f.name, t.In(1), t.Out(0)) + fid := f.abi.FunctionID otherF, ok := functionsByID[fid] if ok { panic(fmt.Errorf("function with ID %x already defined: %s", fid, otherF.Signature())) @@ -209,7 +234,7 @@ func NewSNativeContract(comment, name string, } } -// This function is designed to be called from the EVM once a SNative contract +// Dispatch is designed to be called from the EVM once a SNative contract // has been selected. It is also placed in a registry by registerSNativeContracts // So it can be looked up by SNative address func (contract *SNativeContractDescription) Dispatch(st Interface, caller crypto.Address, @@ -232,31 +257,39 @@ func (contract *SNativeContractDescription) Dispatch(st Interface, caller crypto logger.TraceMsg("Dispatching to function", "caller", caller, - "function_name", function.Name) + "function_name", function.name) remainingArgs := args[abi.FunctionIDSize:] // check if we have permission to call this function if !HasPermission(st, caller, function.PermFlag) { - return nil, errors.LacksSNativePermission{Address: caller, SNative: function.Name} + return nil, errors.LacksSNativePermission{Address: caller, SNative: function.name} } - nativeArgs := reflect.New(function.Arguments).Interface() - err = abi.Unpack(function.Abi.Inputs, remainingArgs, nativeArgs) + arguments := reflect.New(reflect.TypeOf(function.F).In(1)) + err = abi.Unpack(function.abi.Inputs, remainingArgs, arguments.Interface()) if err != nil { return nil, err } - nativeRets, err := function.F(st, caller, gas, logger, nativeArgs) - if err != nil { - return nil, err + ctx := SNativeContext{ + State: st, + Caller: caller, + Gas: gas, + Logger: logger, + } + + fn := reflect.ValueOf(function.F) + rets := fn.Call([]reflect.Value{reflect.ValueOf(ctx), arguments.Elem()}) + if !rets[1].IsNil() { + return nil, rets[1].Interface().(error) } err = st.Error() if err != nil { return nil, fmt.Errorf("state error in %v: %v", function, err) } - return abi.Pack(function.Abi.Outputs, nativeRets) + return abi.Pack(function.abi.Outputs, rets[0].Interface()) } // We define the address of an SNative contact as the last 20 bytes of the sha3 @@ -280,7 +313,7 @@ func (contract *SNativeContractDescription) FunctionByID(id abi.FunctionID) (*SN // Get function by name func (contract *SNativeContractDescription) FunctionByName(name string) (*SNativeFunctionDescription, error) { for _, f := range contract.functions { - if f.Name == name { + if f.name == name { return f, nil } } @@ -298,24 +331,34 @@ func (contract *SNativeContractDescription) Functions() []*SNativeFunctionDescri // SNative functions // -// Get function signature +// Signature returns the function signature as would be used for ABI hashing func (function *SNativeFunctionDescription) Signature() string { - argTypeNames := make([]string, len(function.Abi.Inputs)) - for i, arg := range function.Abi.Inputs { + argTypeNames := make([]string, len(function.abi.Inputs)) + for i, arg := range function.abi.Inputs { argTypeNames[i] = arg.EVM.GetSignature() } - return fmt.Sprintf("%s(%s)", function.Name, + return fmt.Sprintf("%s(%s)", function.name, strings.Join(argTypeNames, ",")) } -// Get number of function arguments +// NArgs returns the number of function arguments func (function *SNativeFunctionDescription) NArgs() int { - return len(function.Abi.Inputs) + return len(function.abi.Inputs) +} + +// Name returns the name for this function +func (function *SNativeFunctionDescription) Name() string { + return function.name +} + +// Abi returns the FunctionSpec for this function +func (function *SNativeFunctionDescription) Abi() abi.FunctionSpec { + return function.abi } func (fn *SNativeFunctionDescription) String() string { return fmt.Sprintf("SNativeFunction{Name: %s; Inputs: %d; Outputs: %d}", - fn.Name, len(fn.Abi.Inputs), len(fn.Abi.Outputs)) + fn.name, len(fn.abi.Inputs), len(fn.abi.Outputs)) } // Permission function defintions @@ -330,19 +373,16 @@ type hasBaseRets struct { Result bool } -func hasBase(state Interface, caller crypto.Address, gas *uint64, logger *logging.Logger, - a interface{}) (interface{}, error) { - args := a.(*hasBaseArgs) - - if !state.Exists(args.Account) { - return false, fmt.Errorf("unknown account %s", args.Account) +func hasBase(context SNativeContext, args hasBaseArgs) (hasBaseRets, error) { + if !context.State.Exists(args.Account) { + return hasBaseRets{}, fmt.Errorf("unknown account %s", args.Account) } permN := permission.PermFlag(args.Permission) // already shifted if !permN.IsValid() { - return false, permission.ErrInvalidPermission(permN) + return hasBaseRets{}, permission.ErrInvalidPermission(permN) } - hasPermission := HasPermission(state, args.Account, permN) - logger.Trace.Log("function", "hasBase", + hasPermission := HasPermission(context.State, args.Account, permN) + context.Logger.Trace.Log("function", "hasBase", "address", args.Account.String(), "perm_flag", fmt.Sprintf("%b", permN), "has_permission", hasPermission) @@ -359,20 +399,17 @@ type setBaseRets struct { Result uint64 } -func setBase(stateWriter Interface, caller crypto.Address, gas *uint64, - logger *logging.Logger, a interface{}) (interface{}, error) { - args := a.(*setBaseArgs) - - exists := stateWriter.Exists(args.Account) +func setBase(context SNativeContext, args setBaseArgs) (setBaseRets, error) { + exists := context.State.Exists(args.Account) if !exists { - return false, fmt.Errorf("unknown account %s", args.Account) + return setBaseRets{}, fmt.Errorf("unknown account %s", args.Account) } permN := permission.PermFlag(args.Permission) if !permN.IsValid() { - return 0, permission.ErrInvalidPermission(permN) + return setBaseRets{}, permission.ErrInvalidPermission(permN) } - stateWriter.SetPermission(args.Account, permN, args.Set) - logger.Trace.Log("function", "setBase", "address", args.Account.String(), + context.State.SetPermission(args.Account, permN, args.Set) + context.Logger.Trace.Log("function", "setBase", "address", args.Account.String(), "permission_flag", fmt.Sprintf("%b", permN), "permission_value", args.Permission) return setBaseRets{Result: uint64(permN)}, nil @@ -387,19 +424,16 @@ type unsetBaseRets struct { Result uint64 } -func unsetBase(stateWriter Interface, caller crypto.Address, gas *uint64, logger *logging.Logger, - a interface{}) (r interface{}, err error) { - args := a.(*unsetBaseArgs) - - if !stateWriter.Exists(args.Account) { - return false, fmt.Errorf("unknown account %s", args.Account) +func unsetBase(context SNativeContext, args unsetBaseArgs) (unsetBaseRets, error) { + if !context.State.Exists(args.Account) { + return unsetBaseRets{}, fmt.Errorf("unknown account %s", args.Account) } permN := permission.PermFlag(args.Permission) if !permN.IsValid() { - return 0, permission.ErrInvalidPermission(permN) + return unsetBaseRets{}, permission.ErrInvalidPermission(permN) } - stateWriter.UnsetPermission(args.Account, permN) - logger.Trace.Log("function", "unsetBase", "address", args.Account.String(), + context.State.UnsetPermission(args.Account, permN) + context.Logger.Trace.Log("function", "unsetBase", "address", args.Account.String(), "perm_flag", fmt.Sprintf("%b", permN), "permission_flag", fmt.Sprintf("%b", permN)) @@ -415,17 +449,13 @@ type setGlobalRets struct { Result uint64 } -func setGlobal(stateWriter Interface, caller crypto.Address, gas *uint64, - logger *logging.Logger, a interface{}) (interface{}, error) { - - args := a.(*setGlobalArgs) - +func setGlobal(context SNativeContext, args setGlobalArgs) (setGlobalRets, error) { permN := permission.PermFlag(args.Permission) if !permN.IsValid() { - return 0, permission.ErrInvalidPermission(permN) + return setGlobalRets{}, permission.ErrInvalidPermission(permN) } - stateWriter.SetPermission(acm.GlobalPermissionsAddress, permN, args.Set) - logger.Trace.Log("function", "setGlobal", + context.State.SetPermission(acm.GlobalPermissionsAddress, permN, args.Set) + context.Logger.Trace.Log("function", "setGlobal", "permission_flag", fmt.Sprintf("%b", permN), "permission_value", args.Set) return setGlobalRets{Result: uint64(permN)}, nil @@ -440,16 +470,13 @@ type hasRoleRets struct { Result bool } -func hasRole(st Interface, caller crypto.Address, gas *uint64, - logger *logging.Logger, a interface{}) (interface{}, error) { - - args := a.(*hasRoleArgs) - perms := st.GetPermissions(args.Account) - if err := st.Error(); err != nil { - return false, fmt.Errorf("hasRole could not get permissions: %v", err) +func hasRole(context SNativeContext, args hasRoleArgs) (hasRoleRets, error) { + perms := context.State.GetPermissions(args.Account) + if err := context.State.Error(); err != nil { + return hasRoleRets{}, fmt.Errorf("hasRole could not get permissions: %v", err) } hasRole := perms.HasRole(args.Role) - logger.Trace.Log("function", "hasRole", "address", args.Account.String(), + context.Logger.Trace.Log("function", "hasRole", "address", args.Account.String(), "role", args.Role, "has_role", hasRole) return hasRoleRets{Result: hasRole}, nil @@ -464,11 +491,9 @@ type addRoleRets struct { Result bool } -func addRole(stateWriter Interface, caller crypto.Address, gas *uint64, logger *logging.Logger, - v interface{}) (interface{}, error) { - args := v.(*addRoleArgs) - roleAdded := stateWriter.AddRole(args.Account, args.Role) - logger.Trace.Log("function", "addRole", "address", args.Account.String(), +func addRole(context SNativeContext, args addRoleArgs) (addRoleRets, error) { + roleAdded := context.State.AddRole(args.Account, args.Role) + context.Logger.Trace.Log("function", "addRole", "address", args.Account.String(), "role", args.Role, "role_added", roleAdded) return addRoleRets{Result: roleAdded}, nil @@ -483,12 +508,9 @@ type removeRoleRets struct { Result bool } -func removeRole(stateWriter Interface, caller crypto.Address, gas *uint64, logger *logging.Logger, - a interface{}) (interface{}, error) { - args := a.(*removeRoleArgs) - - roleRemoved := stateWriter.RemoveRole(args.Account, args.Role) - logger.Trace.Log("function", "removeRole", "address", args.Account.String(), +func removeRole(context SNativeContext, args removeRoleArgs) (removeRoleRets, error) { + roleRemoved := context.State.RemoveRole(args.Account, args.Role) + context.Logger.Trace.Log("function", "removeRole", "address", args.Account.String(), "role", args.Role, "role_removed", roleRemoved) return removeRoleRets{Result: roleRemoved}, nil diff --git a/execution/evm/snative_test.go b/execution/evm/snative_test.go index afcb317f0..82d7bf295 100644 --- a/execution/evm/snative_test.go +++ b/execution/evm/snative_test.go @@ -82,7 +82,7 @@ func TestSNativeContractDescription_Dispatch(t *testing.T) { if err != nil { t.Fatalf("Could not get function: %s", err) } - funcID := function.Abi.FunctionID + funcID := function.Abi().FunctionID gas := uint64(1000) // Should fail since we have no permissions diff --git a/execution/execution_test.go b/execution/execution_test.go index 8e2d72c35..a985fcbb6 100644 --- a/execution/execution_test.go +++ b/execution/execution_test.go @@ -1759,7 +1759,7 @@ func permNameToFuncID(name string) []byte { if err != nil { panic("didn't find snative function signature!") } - id := function.Abi.FunctionID + id := function.Abi().FunctionID return id[:] } diff --git a/util/snatives/templates/solidity_templates.go b/util/snatives/templates/solidity_templates.go index 7b9e18a33..3e7c60d76 100644 --- a/util/snatives/templates/solidity_templates.go +++ b/util/snatives/templates/solidity_templates.go @@ -33,7 +33,7 @@ const contractTemplateText = `pragma solidity [[.SolidityPragmaVersion]]; * @dev To instantiate the contract use: * @dev [[.Name]] [[.InstanceName]] = [[.Name]](address(uint256(keccak256("[[.Name]]")))); */ -contract [[.Name]] {[[range .Functions]] +interface [[.Name]] {[[range .Functions]] [[.SolidityIndent 1]] [[end]]} ` @@ -135,8 +135,9 @@ func NewSolidityFunction(function *evm.SNativeFunctionDescription) *solidityFunc } func (function *solidityFunction) ArgList() string { - argList := make([]string, len(function.Abi.Inputs)) - for i, arg := range function.Abi.Inputs { + abi := function.Abi() + argList := make([]string, len(abi.Inputs)) + for i, arg := range abi.Inputs { storage := "" if arg.EVM.Dynamic() { storage = " memory" @@ -147,8 +148,9 @@ func (function *solidityFunction) ArgList() string { } func (function *solidityFunction) RetList() string { - argList := make([]string, len(function.Abi.Outputs)) - for i, arg := range function.Abi.Outputs { + abi := function.Abi() + argList := make([]string, len(abi.Outputs)) + for i, arg := range abi.Outputs { argList[i] = fmt.Sprintf("%s %s", arg.EVM.GetSignature(), param(arg.Name)) } return strings.Join(argList, ", ") From a6390a874378d06a16ee799c3beb66098d8a406a Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 20 Sep 2019 10:20:07 +0100 Subject: [PATCH 002/185] use github actions Signed-off-by: Gregory Hill --- .circleci/config.yml | 131 ------------------------------ {.circleci => .github}/Dockerfile | 0 .github/workflows/main.yaml | 29 +++++++ .github/workflows/master.yaml | 41 ++++++++++ .github/workflows/release.yaml | 52 ++++++++++++ Makefile | 17 +--- docker-compose.yml | 2 +- dump/load_test.go | 5 +- scripts/release.sh | 49 ----------- scripts/release_dev.sh | 24 ------ vent/sqlsol/spec_loader_test.go | 5 +- 11 files changed, 132 insertions(+), 223 deletions(-) delete mode 100644 .circleci/config.yml rename {.circleci => .github}/Dockerfile (100%) create mode 100644 .github/workflows/main.yaml create mode 100644 .github/workflows/master.yaml create mode 100644 .github/workflows/release.yaml delete mode 100755 scripts/release.sh delete mode 100755 scripts/release_dev.sh diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 023da9251..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,131 +0,0 @@ -# Some resuable sections, note the top-level keys 'defaults' and 'tag_filters' -# have no special meaning, they just exist so I can alias them and import them -# in later blocks -defaults: &defaults - working_directory: /go/src/github.com/hyperledger/burrow - docker: - - image: hyperledger/burrow:ci - environment: - - GO_TEST_ARGS: -p 2 - -tag_filters: &tags_filters - tags: - only: /^v[0-9]+\.[0-9]+\.[0-9]+$/ - -setup_docker: &setup_docker - version: 17.11.0-ce - -orbs: - codecov: codecov/codecov@1.0.4 - -version: 2.1 -jobs: - - test: - <<: *defaults - steps: - - run: echo $CIRCLE_PULL_REQUESTS - - run: echo $CIRCLE_BRANCH - - checkout - - run: make test - # In case we miss compile errors not pulled into test paths - - run: make build - - test_cover: - <<: *defaults - steps: - - checkout - - run: make test_cover - - codecov/upload: - file: coverage.html - - test_js: - machine: - image: circleci/classic:201808-01 - steps: - - checkout - # js tests do not need to in docker, however nodejs crashes - # while running mocha when not using image above (not OOM). - # above image needs newer go so docker is used. - - run: docker-compose run burrow make npm_install test_js - - test_integration: - machine: - image: circleci/classic:201808-01 - steps: - - checkout - - run: docker-compose run burrow make test_integration_no_postgres - - build_docker: - <<: *defaults - steps: - - checkout - # This allows us to perform our docker builds - - setup_remote_docker: - <<: *setup_docker - # build docker image and tag the docker image(s) depending on branch/tag - - run: make docker_build - - release_dev: - <<: *defaults - steps: - - setup_remote_docker: - <<: *setup_docker - - checkout - - run: make release_dev - - release: - <<: *defaults - steps: - - setup_remote_docker: - <<: *setup_docker - - checkout - - run: make release - - -workflows: - - test_and_release: - jobs: - - test: - filters: - <<: *tags_filters - - - test_cover: - filters: - branches: - only: develop - - - test_integration: - filters: - <<: *tags_filters - - - test_js: - filters: - <<: *tags_filters - - - build_docker: - filters: - # tags filters and branch filters are applied disjunctively, so we - # will still build tags not on develop (i.e. including tagged - # releases on master that we specifically want to build) - <<: *tags_filters - - - release_dev: - requires: - - test - - test_integration - - test_js - filters: - branches: - only: develop - - - release: - requires: - - test - - test_integration - - test_js - filters: - <<: *tags_filters - branches: - ignore: /.*/ diff --git a/.circleci/Dockerfile b/.github/Dockerfile similarity index 100% rename from .circleci/Dockerfile rename to .github/Dockerfile diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 000000000..c0098017b --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,29 @@ +name: main +on: [push] +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v1 + with: + go-version: 1.12 + id: go + - uses: actions/setup-node@v1 + with: + node-version: '8.x' + - uses: actions/checkout@v1 + - run: make build + - run: make test + - run: make test_integration + - run: npm install + - run: make test_js + + docker: + name: Docker + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: make docker_build + env: + DOCKER_REPO: "hyperledger/burrow" diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml new file mode 100644 index 000000000..1fca42fdc --- /dev/null +++ b/.github/workflows/master.yaml @@ -0,0 +1,41 @@ +name: master +on: + push: + branches: + - master + +jobs: + cover: + name: Coverage + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v1 + with: + go-version: 1.12 + id: go + - uses: actions/checkout@v1 + - run: make test + env: + GO_TEST_ARGS: "-coverprofile=coverage.txt -covermode=atomic" + - uses: codecov/codecov-action@v1.0.2 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.txt + + docker: + name: Docker + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: make docker_build + - name: Publish Quay Image + env: + DOCKER_REPO: "hyperledger/burrow" + DOCKER_REPO_DEV: "quay.io/monax/burrow" + DOCKER_PASS_DEV: ${{ secrets.DOCKER_PASS_DEV }} + DOCKER_USER_DEV: ${{ secrets.DOCKER_USER_DEV }} + run: | + version=$(./scripts/local_version.sh) + echo ${DOCKER_PASS_DEV} | docker login --username ${DOCKER_USER_DEV} ${DOCKER_REPO_DEV} --password-stdin + docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO_DEV}:${version} + docker push ${DOCKER_REPO_DEV} \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..f1d9efeca --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,52 @@ +name: Release +on: + push: + tags: + - 'v*' + +jobs: + go: + name: GoReleaser + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Publish + uses: docker://goreleaser/goreleaser + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: release --release-notes "NOTES.md" + if: success() + + js: + name: NPM + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Publish + env: + NPM_EMAIL: ${{ secrets.NPM_EMAIL }} + NPM_USER: ${{ secrets.NPM_USER }} + NPM_PASS: ${{ secrets.NPM_PASS }} + run: | + git config --global user.email "${NPM_EMAIL}" + npm-cli-login + npm version from-git + npm publish --access public . + + docker: + name: Docker + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: make docker_build + - name: Publish + env: + DOCKER_REPO: "hyperledger/burrow" + DOCKER_USER: ${{ secrets.DOCKER_USER }} + DOCKER_PASS: ${{ secrets.DOCKER_PASS }} + run: | + export tag=$(git tag --points-at HEAD) + echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} --password-stdin + docker tag ${DOCKER_REPO}:${tag#v} ${DOCKER_REPO}:latest + docker push ${DOCKER_REPO} \ No newline at end of file diff --git a/Makefile b/Makefile index 3a4171e8b..2480de0a8 100644 --- a/Makefile +++ b/Makefile @@ -189,14 +189,8 @@ test_js: bin/solc build_burrow .PHONY: test test: check bin/solc -# on circleci we might want to limit memory usage through GO_TEST_ARGS @tests/scripts/bin_wrapper.sh go test ./... ${GO_TEST_ARGS} -.PHONY: test_cover -test_cover: check bin/solc - @tests/scripts/bin_wrapper.sh go test -coverprofile=c.out ./... ${GO_TEST_ARGS} - @tests/scripts/bin_wrapper.sh go tool cover -html=c.out -o coverage.html - .PHONY: test_keys test_keys: build_burrow burrow_bin="${REPO}/bin/burrow" tests/keys_server/test.sh @@ -265,18 +259,9 @@ docs: CHANGELOG.md NOTES.md # Tag the current HEAD commit with the current release defined in # ./project/history.go .PHONY: tag_release -tag_release: test check CHANGELOG.md NOTES.md build +tag_release: test check docs build @scripts/tag_release.sh -.PHONY: release -release: docs check test docker_build - @scripts/is_checkout_dirty.sh || (echo "checkout is dirty so not releasing!" && exit 1) - @scripts/release.sh - -.PHONY: release_dev -release_dev: test docker_build - @scripts/release_dev.sh - .PHONY: build_ci_image build_ci_image: docker build -t ${CI_IMAGE} -f ./.circleci/Dockerfile . diff --git a/docker-compose.yml b/docker-compose.yml index 21ed7a877..ea3c620bc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: - 5432 burrow: - build: .circleci + build: .github environment: DB_URL: "postgres://postgres@db:5432/postgres?sslmode=disable" GO111MODULE: "on" diff --git a/dump/load_test.go b/dump/load_test.go index eb54979c5..dfbd20a9d 100644 --- a/dump/load_test.go +++ b/dump/load_test.go @@ -3,6 +3,7 @@ package dump import ( "fmt" "os" + "path" "testing" "github.com/hyperledger/burrow/bcm" @@ -40,7 +41,9 @@ func testLoad(t testing.TB, mock *MockSource) *state.State { func TestLoadAndDump(t *testing.T) { st, err := state.MakeGenesisState(testDB(t), &genesis.GenesisDoc{GlobalPermissions: permission.DefaultAccountPermissions}) require.NoError(t, err) - src, err := NewFileReader(os.Getenv("GOPATH") + "/src/github.com/hyperledger/burrow/dump/test_dump.json") + dir, err := os.Getwd() + require.NoError(t, err) + src, err := NewFileReader(path.Join(dir, "test_dump.json")) require.NoError(t, err) err = Load(src, st) require.NoError(t, err) diff --git a/scripts/release.sh b/scripts/release.sh deleted file mode 100755 index a889a1508..000000000 --- a/scripts/release.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash - -version_regex="^v[0-9]+\.[0-9]+\.[0-9]+$" - -set -e - -DOCKER_REPO=${DOCKER_REPO:-"hyperledger/burrow"} -DOCKER_REPO_DEV=${DOCKER_REPO_DEV:-"quay.io/monax/burrow"} - -function release { - [[ -z "$DOCKER_PASS" ]] && echo "\$DOCKER_PASS must be set to release" && exit 1 - notes="NOTES.md" - echo "Building and releasing $tag..." - echo "Pushing docker image..." - echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} --password-stdin - docker tag ${DOCKER_REPO}:${tag#v} ${DOCKER_REPO}:latest - docker push ${DOCKER_REPO} - - git config --global user.email "billings@monax.io" - npm-cli-login - npm version from-git - npm publish --access public . - - echo "Building and pushing binaries" - [[ -e "$notes" ]] && goreleaser --release-notes "$notes" || goreleaser -} - - -# If passed argument try to use that as tag otherwise read from local repo -if [[ $1 ]]; then - # Override mode, try to release this tag - export tag=$1 -else - echo "Getting tag from HEAD which is $(git rev-parse HEAD)" - export tag=$(git tag --points-at HEAD) -fi - -if [[ ! ${tag} ]]; then - echo "No tag so not releasing." - exit 0 -fi - -# Only release semantic version syntax tags -if [[ ! ${tag} =~ ${version_regex} ]] ; then - echo "Tag '$tag' does not match version regex '$version_regex' so not releasing." - exit 0 -fi - -release diff --git a/scripts/release_dev.sh b/scripts/release_dev.sh deleted file mode 100755 index b146997b6..000000000 --- a/scripts/release_dev.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -set -e - -DOCKER_REPO=${DOCKER_REPO:-"hyperledger/burrow"} -DOCKER_REPO_DEV=${DOCKER_REPO_DEV:-"quay.io/monax/burrow"} - -function release { - echo "Pushing dev release to $DOCKER_REPO_DEV..." - [[ -z "$DOCKER_PASS_DEV" ]] && echo "\$DOCKER_PASS_DEV must be set to release dev version" && exit 1 - version=$(./scripts/local_version.sh) - echo ${DOCKER_PASS_DEV} | docker login --username ${DOCKER_USER_DEV} ${CI_REGISTRY} ${DOCKER_HUB_DEV} --password-stdin - docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO_DEV}:${version} - docker push ${DOCKER_REPO_DEV} -} - - -# Only do a dev release outside pull requests -if [[ -n "$CIRCLE_PULL_REQUESTS" ]]; then - echo "CIRCLE_PULL_REQUESTS is set to: '$CIRCLE_PULL_REQUEST' so not pushing dev release" - exit 0 -fi - -release \ No newline at end of file diff --git a/vent/sqlsol/spec_loader_test.go b/vent/sqlsol/spec_loader_test.go index 77d0367ed..b7dfedd80 100644 --- a/vent/sqlsol/spec_loader_test.go +++ b/vent/sqlsol/spec_loader_test.go @@ -2,6 +2,7 @@ package sqlsol_test import ( "os" + "path" "testing" "github.com/hyperledger/burrow/vent/sqlsol" @@ -12,7 +13,9 @@ import ( var tables = types.DefaultSQLTableNames func TestSpecLoader(t *testing.T) { - specFile := []string{os.Getenv("GOPATH") + "/src/github.com/hyperledger/burrow/vent/test/sqlsol_view.json"} + dir, err := os.Getwd() + require.NoError(t, err) + specFile := []string{path.Join(dir, "../test/sqlsol_view.json")} t.Run("successfully add block and transaction tables to event structures", func(t *testing.T) { projection, err := sqlsol.SpecLoader(specFile, sqlsol.BlockTx) require.NoError(t, err) From 7b6cdf3dc4f9c3a56053444a9a5250cde430bed2 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Mon, 23 Sep 2019 11:04:13 +0100 Subject: [PATCH 003/185] test on pr Signed-off-by: Gregory Hill --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index c0098017b..26b01fd96 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,5 +1,5 @@ name: main -on: [push] +on: [push, pull_request] jobs: test: name: Test From f3ea690c4ed43638b55369b1c1acf56c158c89f6 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Tue, 24 Sep 2019 14:27:36 +0100 Subject: [PATCH 004/185] Use github actions badge Signed-off-by: Sean Young --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index ab037c674..07061e8f5 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,12 @@ # [Hyperledger Burrow](https://hyperledger.github.io/burrow) +[![CI](https://github.com/hyperledger/burrow/workflows/master/badge.svg)](https://launch-editor.github.com/actions?workflowID=master&event=push&nwo=hyperledger%2Fburrow) [![version](https://img.shields.io/github/tag/hyperledger/burrow.svg)](https://github.com/hyperledger/burrow/releases/latest) [![GoDoc](https://godoc.org/github.com/burrow?status.png)](https://godoc.org/github.com/hyperledger/burrow) [![license](https://img.shields.io/github/license/hyperledger/burrow.svg)](LICENSE.md) [![LoC](https://tokei.rs/b1/github/hyperledger/burrow?category=lines)](https://github.com/hyperledger/burrow) [![codecov](https://codecov.io/gh/hyperledger/burrow/branch/develop/graph/badge.svg)](https://codecov.io/gh/hyperledger/burrow) -Branch | Linux -----------|------ -| Master | [![Circle CI](https://circleci.com/gh/hyperledger/burrow/tree/master.svg?style=svg)](https://circleci.com/gh/hyperledger/burrow/tree/master) | -| Develop | [![Circle CI (develop)](https://circleci.com/gh/hyperledger/burrow/tree/develop.svg?style=svg)](https://circleci.com/gh/hyperledger/burrow/tree/develop) | - Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It executes Ethereum EVM smart contract code (usually written in [Solidity](https://solidity.readthedocs.io)) on a permissioned virtual machine. Burrow provides transaction finality and high transaction throughput on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. ![burrow logo](docs/assets/burrow.png) From a17301a5d30807d493710da4af42b13812385f84 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Tue, 3 Sep 2019 15:47:24 +0100 Subject: [PATCH 005/185] Move vent docs and update for docsify Signed-off-by: Silas Davis --- CHANGELOG.md | 2 +- docs/README.md | 30 +++++- docs/_sidebar.md | 18 +++- docs/chain-making.md | 31 ++++++ docs/{reference/deploy-yaml.md => deploy.md} | 12 ++- .../example}/basic-app-website/.gitignore | 0 .../example}/basic-app-website/Makefile | 0 .../example}/basic-app-website/README.md | 4 +- .../example}/basic-app-website/app.js | 0 .../example}/basic-app-website/deploy.yaml | 0 .../basic-app-website/package-lock.json | 0 .../example}/basic-app-website/package.json | 0 .../basic-app-website/public/css/style.css | 0 .../basic-app-website/simplestorage.sol | 0 .../basic-app-website/views/index.ejs | 0 .../example}/basic-app/.gitignore | 0 {example => docs/example}/basic-app/Makefile | 0 {example => docs/example}/basic-app/README.md | 4 +- {example => docs/example}/basic-app/app.js | 0 .../example}/basic-app/deploy.yaml | 0 .../example}/basic-app/package-lock.json | 0 .../example}/basic-app/package.json | 0 .../example}/basic-app/simplestorage.sol | 0 docs/js-api.md | 2 +- docs/{txs/bond.md => reference/bonding.md} | 0 docs/reference/consensus.md | 64 ++++++++++++ docs/reference/evm.md | 40 ++++++++ docs/reference/genesis.md | 16 --- docs/reference/participants.md | 16 +++ docs/reference/state.md | 33 ++++++- docs/reference/transactions.md | 65 ++++++++++++ vent/README.md => docs/reference/vent.md | 98 ++++++++++++++----- execution/execution.go | 2 +- project/history.go | 2 +- protobuf/payload.proto | 1 + txs/envelope.go | 2 +- txs/tx_test.go | 2 +- 37 files changed, 378 insertions(+), 66 deletions(-) create mode 100644 docs/chain-making.md rename docs/{reference/deploy-yaml.md => deploy.md} (91%) rename {example => docs/example}/basic-app-website/.gitignore (100%) rename {example => docs/example}/basic-app-website/Makefile (100%) rename {example => docs/example}/basic-app-website/README.md (83%) rename {example => docs/example}/basic-app-website/app.js (100%) rename {example => docs/example}/basic-app-website/deploy.yaml (100%) rename {example => docs/example}/basic-app-website/package-lock.json (100%) rename {example => docs/example}/basic-app-website/package.json (100%) rename {example => docs/example}/basic-app-website/public/css/style.css (100%) rename {example => docs/example}/basic-app-website/simplestorage.sol (100%) rename {example => docs/example}/basic-app-website/views/index.ejs (100%) rename {example => docs/example}/basic-app/.gitignore (100%) rename {example => docs/example}/basic-app/Makefile (100%) rename {example => docs/example}/basic-app/README.md (88%) rename {example => docs/example}/basic-app/app.js (100%) rename {example => docs/example}/basic-app/deploy.yaml (100%) rename {example => docs/example}/basic-app/package-lock.json (100%) rename {example => docs/example}/basic-app/package.json (100%) rename {example => docs/example}/basic-app/simplestorage.sol (100%) rename docs/{txs/bond.md => reference/bonding.md} (100%) create mode 100644 docs/reference/consensus.md create mode 100644 docs/reference/evm.md create mode 100644 docs/reference/participants.md create mode 100644 docs/reference/transactions.md rename vent/README.md => docs/reference/vent.md (55%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6daee7dde..eca041e2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -212,7 +212,7 @@ - [Deploy] burrow deploy can use key names where addresses are used - [Governance] Added threshold-based governance via Proposal mechanism which allows entities with Root permission to propose and vote on batches of transactions to be executed on a running network with no single entity being able to do so. - [Governance] Added command line and query introspection of proposals as well as burrow deploy support -- [Vent] Merged Vent our SQL projection and mapping layer into the Burrow repository and binary via 'burrow vent'. See [Vent Readme](./vent/README.md) +- [Vent] Merged Vent our SQL projection and mapping layer into the Burrow repository and binary via 'burrow vent'. See [Vent Readme](./vent/vent.md) - [State] Improved read-write separation with RWTree and ImmutableForest data structures - [State] Implemented dump/restore to port state between different version of Burrow or to compress the execution of a chain (with a proof) onto a fresh chain diff --git a/docs/README.md b/docs/README.md index 1618b605a..3d6bd0771 100644 --- a/docs/README.md +++ b/docs/README.md @@ -13,4 +13,32 @@ Hyperledger Burrow is a permissioned blockchain node that executes smart contrac - **Smart Contract Application:** Transactions are validated and applied to the application state in the order that the consensus engine has finalised them. The application state consists of all accounts, the validator set and the name registry. Accounts in Burrow have permissions and either contain smart contract code or correspond to a public-private key pair. A transaction that calls on the smart contract code in a given account will activate the execution of that account’s code in a permissioned virtual machine. - **Permissioned Ethereum Virtual Machine:** This virtual machine is built to observe the Ethereum operation code specification and additionally asserts the correct permissions have been granted. Permissioning is enforced through secure native functions and underlies all smart contract code. An arbitrary but finite amount of gas is handed out for every execution to ensure a finite execution duration - “You don’t need money to play, when you have permission to play”. - **Application Binary Interface (ABI):** Transactions need to be formulated in a binary format that can be processed by the blockchain node. Current tooling provides functionality to compile, deploy and link solidity smart contracts and formulate transactions to call smart contracts on the chain. -- **API Gateway:** Burrow exposes REST and JSON-RPC endpoints to interact with the blockchain network and the application state through broadcasting transactions, or querying the current state of the application. Websockets allow subscribing to events, which is particularly valuable as the consensus engine and smart contract application can give unambiguously finalised results to transactions within one blocktime of about one second. \ No newline at end of file +- **API Gateway:** Burrow exposes REST and JSON-RPC endpoints to interact with the blockchain network and the application state through broadcasting transactions, or querying the current state of the application. Websockets allow subscribing to events, which is particularly valuable as the consensus engine and smart contract application can give unambiguously finalised results to transactions within one blocktime of about one second. + +## Installation + +Release binaries for different architectures can be found at https://github.com/hyperledger/burrow/releases. + +Alternatively you can install directly from source. To do this checkout the repository and from the root run: + +```shell +# With GNU Make installed: +make install +``` + +This will install the `burrow` binary into `$GOPATH/bin` so you will need to have `GOPATH` set and included on you `$PATH` if you want to have the executable available on your system. See the [Go GOPATH documentation](https://golang.org/doc/code.html#GOPATH) for details. + +## Very quick start + +You can spin up a single node chain with: + +```shell +mkdir burrow-chain && cd burrow-chain +burrow spec -v1 | burrow configure -s- | burrow start -c- +``` + +For a more complete (and useful) introduction see our sequence of [tutorials](/docs/tutorials). + +## Documentation + +The canonical location for these docs is: https://hyperledger.github.io/burrow/ diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 14caa2c3d..af74110ca 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -2,10 +2,14 @@ - [Introduction](README.md) - [Installation](INSTALL.md) - [Developers](developers.md) - - [JS API](js-api.md) + - [Chain Making](chain-making.md) + - [Burrow Deploy](deploy.md) + - [Burrow.js API](js-api.md) + +- Examples + - [Basic JS API](example/basic-app/README.md) + - [Basic JS API and website](example/basic-app-website/README.md) -- Transactions - - [Bond / Unbond](txs/bond.md) - Tutorials - [Single Node](tutorials/1-run-full-node.md) @@ -18,10 +22,14 @@ - [Proposals](tutorials/8-proposals.md) - Reference + - [Participants](reference/participants.md) - [Genesis](reference/genesis.md) - - [Deploy yaml](reference/deploy-yaml.md) - - [Logging](reference/logging.md) - [Permissions](reference/permissions.md) + - [Transactions](reference/transactions.md) - [State](reference/state.md) + - [EVM](reference/evm.md) + - [Bonding](reference/bonding.md) + - [Vent](reference/vent.md) - [WASM](reference/wasm.md) + - [Logging](reference/logging.md) diff --git a/docs/chain-making.md b/docs/chain-making.md new file mode 100644 index 000000000..fc28ea02b --- /dev/null +++ b/docs/chain-making.md @@ -0,0 +1,31 @@ +# Chain Making + +A Burrow network begins with the act of chain making. This process has three logical steps: + +1. Generate the initial keys for the initial [participants](/docs/reference/participants.md) of the chain +2. Collect public keys and addresses from initial participants and close them into the [genesis document](reference/genesis.md) along with initial configuration for their state. +3. Boot an initial [quorum](/docs/reference/consensus.md#quorum) of network validators + +The steps above can be done by hand, but we have a number sub-commands build into the `burrow` binary to help. Please see our [tutorial series](/docs/tutorials) for detailed walkthroughs. + +## Generating keys + +Burrow consumes its keys through our key signing interface that can be run as a standalone service with: + +```shell +burrow keys server +``` + +This command: + +- Starts a key signing daemon capable of generating new ed25519 keys, naming those keys, signing arbitrary messages, and verifying signed messages. +- Initialises a key store directory in `.keys` (by default) where private key matter is stored. + +It should be noted that the GRPC service exposed by the keys server will sign _any_ inbound requests using the keys it maintains so the machine running the keys service should only allow connections from sources that are trusted to use those keys. + +## Specifying the network + +## Configuring a node + +## Booting a node + diff --git a/docs/reference/deploy-yaml.md b/docs/deploy.md similarity index 91% rename from docs/reference/deploy-yaml.md rename to docs/deploy.md index 451d4a560..120178682 100644 --- a/docs/reference/deploy-yaml.md +++ b/docs/deploy.md @@ -1,6 +1,6 @@ # Burrow deploy yaml (aka playbooks) -burrow deploy is a tool which can do a number of things: +`burrow deploy` is a tool which can do a number of things: * compile Solidity source files (using solc) and deploy to chain * call function on existing contract @@ -14,7 +14,15 @@ burrow deploy needs a script to its commands. This script format bares some simi is in yaml format. The top level structure is an array of [jobs](https://github.com/hyperledger/burrow/blob/develop/deploy/def/job.go). The different job types are [defined here](https://github.com/hyperledger/burrow/blob/develop/deploy/def/jobs.go). -Each job has a name. This name can be used in later jobs to refer to the result of a previous job (e.g. the address of a contract +You can invoke burrow from the command line like: + +```shell +burrow deploy -a CF8F9480252B70D59CF5B5F3CAAA75FEAF6A4B33 deploy.yaml +``` + +Where `deploy.yaml` is the playbook. + +Each job in the playbook has a name. This name can be used in later jobs to refer to the result of a previous job (e.g. the address of a contract which was deployed). The jobs are executed in-order. Whenever an account needs to be specified, the key name in the burrow keys server can also be used. diff --git a/example/basic-app-website/.gitignore b/docs/example/basic-app-website/.gitignore similarity index 100% rename from example/basic-app-website/.gitignore rename to docs/example/basic-app-website/.gitignore diff --git a/example/basic-app-website/Makefile b/docs/example/basic-app-website/Makefile similarity index 100% rename from example/basic-app-website/Makefile rename to docs/example/basic-app-website/Makefile diff --git a/example/basic-app-website/README.md b/docs/example/basic-app-website/README.md similarity index 83% rename from example/basic-app-website/README.md rename to docs/example/basic-app-website/README.md index 54c17d431..cbe2cd2f4 100644 --- a/example/basic-app-website/README.md +++ b/docs/example/basic-app-website/README.md @@ -1,8 +1,8 @@ -# Example basic-app (with website) +# [Example basic-app (with website)](.) Note that this example is the same as the the basic-app example, apart from step 3. -This example contains an example solidity contract [simplestorage](simplestorage.sol) and a [node.js application](app.js) that interacts with the contract using [burrow](../../js/README.md). It also contains a [makefile](makefile) that will set up a single node chain, deploy the contract using `burrow deploy`. The node app configures itself to use the the single node chain my looking for [account.json](account.json) and [deploy.output.json](deploy.output.json) files that are emitted by `burrow deploy` and the makefile. +This example contains an example solidity contract [simplestorage](simplestorage.sol) and a [node.js application](app.js) that interacts with the contract using [burrow](../../../js/README.md). It also contains a [makefile](makefile) that will set up a single node chain, deploy the contract using `burrow deploy`. The node app configures itself to use the the single node chain my looking for [account.json](account.json) and [deploy.output.json](deploy.output.json) files that are emitted by `burrow deploy` and the makefile. The makefile provides some examples of using the `burrow` command line tooling and you are invited to modify it for your purposes (i.e. change from linux target to darwin) diff --git a/example/basic-app-website/app.js b/docs/example/basic-app-website/app.js similarity index 100% rename from example/basic-app-website/app.js rename to docs/example/basic-app-website/app.js diff --git a/example/basic-app-website/deploy.yaml b/docs/example/basic-app-website/deploy.yaml similarity index 100% rename from example/basic-app-website/deploy.yaml rename to docs/example/basic-app-website/deploy.yaml diff --git a/example/basic-app-website/package-lock.json b/docs/example/basic-app-website/package-lock.json similarity index 100% rename from example/basic-app-website/package-lock.json rename to docs/example/basic-app-website/package-lock.json diff --git a/example/basic-app-website/package.json b/docs/example/basic-app-website/package.json similarity index 100% rename from example/basic-app-website/package.json rename to docs/example/basic-app-website/package.json diff --git a/example/basic-app-website/public/css/style.css b/docs/example/basic-app-website/public/css/style.css similarity index 100% rename from example/basic-app-website/public/css/style.css rename to docs/example/basic-app-website/public/css/style.css diff --git a/example/basic-app-website/simplestorage.sol b/docs/example/basic-app-website/simplestorage.sol similarity index 100% rename from example/basic-app-website/simplestorage.sol rename to docs/example/basic-app-website/simplestorage.sol diff --git a/example/basic-app-website/views/index.ejs b/docs/example/basic-app-website/views/index.ejs similarity index 100% rename from example/basic-app-website/views/index.ejs rename to docs/example/basic-app-website/views/index.ejs diff --git a/example/basic-app/.gitignore b/docs/example/basic-app/.gitignore similarity index 100% rename from example/basic-app/.gitignore rename to docs/example/basic-app/.gitignore diff --git a/example/basic-app/Makefile b/docs/example/basic-app/Makefile similarity index 100% rename from example/basic-app/Makefile rename to docs/example/basic-app/Makefile diff --git a/example/basic-app/README.md b/docs/example/basic-app/README.md similarity index 88% rename from example/basic-app/README.md rename to docs/example/basic-app/README.md index d051fe035..ebdc84472 100644 --- a/example/basic-app/README.md +++ b/docs/example/basic-app/README.md @@ -1,6 +1,6 @@ -# Example basic-app +# [Example basic-app](.) -This example contains an example solidity contract [simplestorage](simplestorage.sol) and a [node.js application](app.js) that interacts with the contract using [burrow module](../../js/README.md). It also contains a [makefile](makefile) that will set up a single node chain, deploy the contract using `burrow deploy`. The node app configures itself to use the the single node chain my looking for [account.json](account.json) and [deploy.output.json](deploy.output.json) files that are emitted by `burrow deploy` and the makefile. +This example contains an example solidity contract [simplestorage](simplestorage.sol) and a [node.js application](app.js) that interacts with the contract using [burrow.js](../../../js/README.md). It also contains a [makefile](makefile) that will set up a single node chain, deploy the contract using `burrow deploy`. The node app configures itself to use the the single node chain my looking for [account.json](account.json) and [deploy.output.json](deploy.output.json) files that are emitted by `burrow deploy` and the makefile. The makefile provides some examples of using the `burrow` command line tooling and you are invited to modify it for your purposes (i.e. change from linux target to darwin) diff --git a/example/basic-app/app.js b/docs/example/basic-app/app.js similarity index 100% rename from example/basic-app/app.js rename to docs/example/basic-app/app.js diff --git a/example/basic-app/deploy.yaml b/docs/example/basic-app/deploy.yaml similarity index 100% rename from example/basic-app/deploy.yaml rename to docs/example/basic-app/deploy.yaml diff --git a/example/basic-app/package-lock.json b/docs/example/basic-app/package-lock.json similarity index 100% rename from example/basic-app/package-lock.json rename to docs/example/basic-app/package-lock.json diff --git a/example/basic-app/package.json b/docs/example/basic-app/package.json similarity index 100% rename from example/basic-app/package.json rename to docs/example/basic-app/package.json diff --git a/example/basic-app/simplestorage.sol b/docs/example/basic-app/simplestorage.sol similarity index 100% rename from example/basic-app/simplestorage.sol rename to docs/example/basic-app/simplestorage.sol diff --git a/docs/js-api.md b/docs/js-api.md index b58083d5c..c93a6de9d 100644 --- a/docs/js-api.md +++ b/docs/js-api.md @@ -117,7 +117,7 @@ burrow.transact.SendTxSync( .catch(err => console.error(err)) ``` -The return `txe` (short for `TxExecution`) logged to the console in the `then` block contains the history and fingerprint of the `SendTx` execution. You can see an example of this in [basic app](../example/basic-app/app.js). +The return `txe` (short for `TxExecution`) logged to the console in the `then` block contains the history and fingerprint of the `SendTx` execution. You can see an example of this in [basic app](example/basic-app/app.js). #### NameReg access diff --git a/docs/txs/bond.md b/docs/reference/bonding.md similarity index 100% rename from docs/txs/bond.md rename to docs/reference/bonding.md diff --git a/docs/reference/consensus.md b/docs/reference/consensus.md new file mode 100644 index 000000000..721d9e7b0 --- /dev/null +++ b/docs/reference/consensus.md @@ -0,0 +1,64 @@ +# Consensus + +Burrow uses the [Tendermint](https://tendermint.com/) consensus engine to provide a totally ordering of all execution events. Tendermint is a partially synchronous Byzantine Fault Tolerant (BFT) consensus algorithm in the PBFT family. It provides us with: + +- Total ordering of input transactions via the consensus algorithm itself +- Raw block storage and blockchain +- P2P layer - gossip of blocks, transactions, and votes + +## Quorum + +Tendermint requires strictly greater than 2/3 of its validator voting power to be online at all times to make progress and requires that strictly less than 1/3 of its validators are behaving arbitrarily - e.g. maliciously to maintain its safety and liveness guarantees. + +Restated, we need 2F + 1 validators in order to tolerate F byzantine faults. Which is the tight optimal lower bound on the number of validators for consensus in the partially synchronous byzantine-fault model. + +In the context of Tendermint where we have a potentially uneven distribution of voting power amongst validators this bound still applies except we treat each unit of voting power (which is an integral number) as 'a validator' and so provided strictly less than 1/3 of total power is in the hands of misbehaving validators consensus will make progress and remain consistent (i.e. all correct validators will store the identical correct state). + +## How we use Tendermint + +Burrow an Tendermint have their origins in a single codebase - 'eris-db' - where they were developed in tandem. Tendermint was spun off into a separate project and company as a modular reusable component focused exclusively on providing a consensus network layer. It consumes a network configuration and topology (described via its own genesis schema), provides the network connectivity, and consensus algorithm state machine for performing deterministic replication of state across all nodes connected to the network. + +It does this replication by providing a stream of identically ordered transactions to each node via an protocol called the Application BlockChain Interface (ABCI). As far as Tendermint is concerned these transactions are opaque binary blobs, it is down to the 'application' to decide how to deserialise, verify, and apply the transactions to state. From Tendermint's perspective Burrow acts as an ABCI client. + +Tendermint is designed so it can be run as a standalone service much like a database, in this mode of operation clients send transactions to Tendermint to be included in blocks over its RPC layer and ABCI clients receive requests over the ABCI wire protocol to validate transactions before and after they are included in blocks, with the ability to reject them. + +Burrow does not use Tendermint in this way but instead uses Tendermint as an embedded library. Internally we still use the underlying interfaces of `BroadcastTx` and the ABCI interface but we use them within the context of single Go process. This situation owes something to our shared history, but also provides a number of benefits: + +- We can be more efficient by communicating in-process rather than over RPC layers +- Users of Burrow do not need to run multiple services in order to form a network +- In being more tightly coupled to Tendermint we gain direct programmatic access to low-level aspects of its functioning like the mempool and P2P layers +- By controlling our own internal Tendermint node we can provide a consistent configuration for Burrow and Tendermint based on certain conventions and reflection +- We can provide control over validators, genesis, and network formation that would be harder to do with separate services +- We can provide a single consistent command line interface + +The upshot of all of this is that while Tendermint is a crucial part of the Burrow implementation and Burrow is intended to keep an build on its compatibility with public Tendermint and Cosmos networks it is essentially an implementation detail of Burrow. Burrow is not intended to function as a standalone ABCI app. + + +### What we do not use from Tendermint + +There are a number of pieces of functionality you can find documented as part of 'Tendermint the blockchain' that we opt not use as part of 'Tendermint the library'. These points of difference are not just for difference's sake but but because we can provide a more specific coherent version of them as part of Burrow which has its own needs in each of the areas. + +- The Tendermint HTTP RPC layers - all of our write RPC layers are GRPC-based +- The Tendermint transaction index - we have a GRPC execution events service tailored to our own [state](/docs/reference/state.md) +- Tendermint configuration - we re-expose certain configuration options from Tendermint combined with our own - some of which control multiple Tendermint parameters +- Tendermint genesis - we provide our own genesis from which we derive Tendermint's genesis doc + + +### The Burrow/Tendermint divide + +Tendermint maintains its own on-disk state consisting of: + +- Consensus state +- Write-Ahead log (WAL) +- Validator set +- Block store + +It is able to use these to recover from (in principle) crash-failures, whereby it can detect faulty data (within certain physical bounds) and recover by connecting to other nodes on the network to 'catch up' by replaying blocks. When a node first starts it will enter 'fast sync' mode and catch up to the latest block height on the network. + +We consider the consensus state entirely the domain of Tendermint - we rely upon Tendermint to order transactions for us. We rely upon this and the WAL to give Burrow crash-fault tolerance - Burrow maintains a checkpoint that runs one block behind, if Burrow was to crash, Tendermint should recover and reply the block overwriting any potentially dirty writes for the block that was in-flight. + +The validator set is something that is administered by Burrow and for which Tendermint necessarily keeps its own accounting. We therefore have representations for the current validator state stored both in Burrow's core code and in our Tendermint library code. We ensure these are synchronised. We furthermore store a complete history of previous validator sets in Burrow. + +We have a similar arrangement with the block store - Tendermint is responsible for storing the raw block data which includes the full array of votes and headers relating to consensus and the raw serialised transaction data. However Burrow also has much richer execution event data that comprises a complete trace of all execution events stored as a stream in a merkle tree. This means that there is some redundancy of data between the Tendermint side and Burrow side storage of transactions and blocks. One way to think about this is as Tendermint providing the low level transaction log (as a relational database might) and Burrow the application level schema and indices. We also support a mode of operation (currently just for a single node) involving no consensus (by setting `Enabled = false` in the Tendermint section of the Burrow configuration) where our state storage is exclusive. There are future possibilities enabled by being able to operate without Tendermint including for private state channels and alternative consensus mechanisms. + +For more details see our [state documentation](/docs/reference/state.md). diff --git a/docs/reference/evm.md b/docs/reference/evm.md new file mode 100644 index 000000000..057058e4a --- /dev/null +++ b/docs/reference/evm.md @@ -0,0 +1,40 @@ +# EVM + +Burrow's core execution engine is our Ethereum Virtual Machine (EVM) implementation. This is implemented to be compatible with the core of the EVM specification and so Burrow should run all Solidity code compiled with `solc`. + +## Mainnet compatibility + +Burrow is compatible on the smart contract level (and [shortly](https://github.com/hyperledger/burrow/pull/1238) on the web3 RPC level) but not the network protocol, consensus, or P2P level with public Ethereum mainnet. + +This affords us a great deal more flexibility and agility to support our core public permissioned side-chain use case than we would otherwise have. We would also argue a number of our variances are technical improvements on public Ethereum for which upgrades are much more difficult. + +## EVM version compatibility + +We aim to provide compatibility with the latest EVM version. By EVM version we mean the 'Instruction Set Architecture'. There is not definitive delineation of the EVM and the Ethereum network, but in practice it is usually clear where certain changes (described in [EIP documents](https://github.com/ethereum/EIPs)) are not relevant for Burrow. We use the following heuristic to guide the compatibility of our implementation: + +- All Solidity code compiled with the latest `solc` should run on Burrow +- All opcodes defined for the EVM should be implemented in Burrow (where the opcodes assume certain consensus or network protocol fact we try to find an analogous interpretation in Burrow) + +As new EIPs are released we incorporate them into Burrow. There is [current work](https://github.com/hyperledger/burrow/issues/1240) to close the gap on some of the newer Ethereum precompile contracts. + +## Extensions to EVM + +We have a notion similar to precompile contracts that we call 'SNatives' whereby we mount pseudo-contracts at a particular address with functions that can be called that expose certain native functionality of Burrow. Most prominent is access to our permissioning system. SNatives can be displayed with `burrow snatives`. + +Much of the innovation that Burrow intends to offer at the smart contract level will be provided through our SNative system including access to: + +- WASM contracts +- Global namn/ABI registry +- Governance primitives +- Validator staking +- Time synchronisation contracts and calendars +- Oracles +- Token economic primitives + +## Gas + +We only use gas to bound computation; we do not extract a fee for gas used, but we will terminate execution if the gas limit passed to the EVM is exceeded. We expect to make the gas schedule configurable and to provide the ability to extract a fee for gas used as part of our token economic model. + +## Library usage + +Burrow aims to also provide a pleasant, extensible, and liberally licensed EVM library via our `execution/evm` package. As such we try to keep the dependencies of this package minimal, keep the public interfaces stable, and are happy to accept changes that improve our developer ergonomics. There have already been successfully integration of Burrow with [Hyperledger Sawtooth](https://github.com/hyperledger/sawtooth-seth) and [Hyperledger Fabric](https://github.com/hyperledger/fabric-chaincode-evm). diff --git a/docs/reference/genesis.md b/docs/reference/genesis.md index f6c5e3064..401d0f6b4 100644 --- a/docs/reference/genesis.md +++ b/docs/reference/genesis.md @@ -87,19 +87,3 @@ Here is an example `genesis.json`: } ``` - -### Accounts - -Accounts are identified by an address - this is the EVM's 20-byte native identifier and is encoded in hex in the GenesisDoc - -TODO: Public key is redundant but included for reference - -TODO: Amount is native token - -### Validators -TODO - -### Genesis making - -TODO: burrow spec -TODO: burrow configure diff --git a/docs/reference/participants.md b/docs/reference/participants.md new file mode 100644 index 000000000..7b513eed3 --- /dev/null +++ b/docs/reference/participants.md @@ -0,0 +1,16 @@ +# Accounts + +Accounts are identified by an address - this is the EVM's 20-byte native identifier and is encoded in hex in the GenesisDoc. The public key is redundant but included for reference. An account's address is defined as the first 20 bytes of the sha256 hash of the account's public key so an address can be derived from a public key but not the other way around. + +The `Amount` is an initial amount of Burrow's native token. This native token can serve multiple purposes: + +- Funding an account by sending token implicitly creates that account (if it does not already exist). Only accounts that have been created by having value transferred to them (via a `SendTx` or an EVM `Call`) can themselves act as input accounts (e.g. in a `CallTx`). +- The native token can be used as a value-holding token on a Burrow sidechain in the same was that eth acts as a value token on public Ethereum. +- Native token can be be converted via a [BondTx](/docs/reference/transactions.md#bondtx) into validator voting power. + +Accounts can also hold EVM or WASM code that is initialised on account creation (and thereafter cannot be changed - except for by [GovTx](/docs/reference/transactions.md#govtx)). You can create a contract by sending a [CallTx](/docs/reference/transactions.md#calltx) using + +## Validators + +Validators are the nodes running on the network that are permitted to participant block proposal and voting according to the Tendermint consensus algorithm. Each validator is identified by it public key (ed25519) and can also be described by a corresponding 20-byte address. A validator is assigned a `Power` this determines the relative power of each of its votes and how often it will be rotated into position of block proposer. + diff --git a/docs/reference/state.md b/docs/reference/state.md index 2128ce4aa..becd9124f 100644 --- a/docs/reference/state.md +++ b/docs/reference/state.md @@ -1,7 +1,30 @@ # State -Burrow wraps its state in a 'mutable forest' which contains one 'commits' tree and an 'immutable forest'. The former implementation contains -commit IDs generated from all sub-trees in the 'immutable forest' thereby providing the state root hash. Each tree in our 'immutable forest' -is lazily loaded by prefix (i.e. initialized if it does not exist), returning a read/write tree. This contains immutable snapshots of its -history for reading, as well as a mutable tree for accumulating state. All trees ultimately wrap [IAVL](https://github.com/tendermint/iavl), -an (immutable) AVL+ library, persisted in [goleveldb](https://github.com/syndtr/goleveldb) - a key/value database. \ No newline at end of file +State store by burrow is written our EVM or WASM engines on executing bytecode provided by [`CallTx`](/docs/reference/transactions.md#CallTx) transactions that have been accepted into the blockchain. The state is stored through the following generic interface: + +```go +type StorageSetter interface { + // Store a 32-byte value at key for the account at address, setting to Zero256 removes the key + SetStorage(address crypto.Address, key binary.Word256, value []byte) error +} +``` + +The raw data stored according depends on a schema determined by the execution engine and contract in question, in the case of the EVM this is described by the ABI generated when a contract is compiled. + +Burrow stores its state in an authenticated key-value data structure - a merkle tree. It has the following features: + +- We store a separate complete version of all core state at each height - this gives us the ability to rewind instantly to any height. +- We are able to provide inclusion proofs for any element of state (not currently exposed by our RPC interfaces). +- State has a single unified state root hash that almost surely guarantees identity of state by comparison between state root hashes + +## Data structure + +Burrow stores its core state the `Forext` which is implemented as a merkle tree of commit objects for individual sub-trees thereby providing the state root hash. Each tree in our forest is lazily loaded by prefix (i.e. initialized if it does not exist), returning a read/write tree. This contains immutable snapshots of its history for reading, as well as a mutable tree for accumulating state. All trees ultimately wrap [IAVL](https://github.com/tendermint/iavl), an (immutable) AVL+ library, persisted in [goleveldb](https://github.com/syndtr/goleveldb) - a key/value database. + +### Index and derivable data + +Alongside our core data we have additional data that can be derived from (such as indices) or is peripheral to (such as contract metadata). Since we can generally detect if these are incorrect or regenerate them we store them in a plain non-authenticated key-value storage called the `Plain` + +### Relationship with Tendermint state + +Tendermint also uses merkle trees to store raw block and transaction data. Tendermint blocks close in our state root hash as the `AppHash` thereby creating a merkle graph that conveys the authenticated data structure property to our application state. diff --git a/docs/reference/transactions.md b/docs/reference/transactions.md new file mode 100644 index 000000000..415f95fc5 --- /dev/null +++ b/docs/reference/transactions.md @@ -0,0 +1,65 @@ +# Transactions + +Burrow implements a number of transaction types. Transactions will be ordered by our consensus mechanism (Tendermint) and applied to our application state machine - replicated across all Burrow nodes. Each transaction is applied atomically and runs deterministically. The transactions contain the arguments for an [execution context](/execution/contexts). + +Our transactions are defined in Protobuf [here](/protobuf/payload.proto). + +Transactions can be built using our GRPC client libraries programmatically, via [burrow.js](/docs/js-api.md), or with`burrow deploy`, see our [deploying contracts guide](/docs/tutorials/3-deploy-contracts.md). + +## TxInput + +| Parameter | Type | Description | +| ----------|------|-------------| +| Address | Address | The address of an account issuing this transaction - the transaction envelope must also be signed by the private key associated with this address | +| Amount | uint64 | The amount of native token to transfer from the input to the output of the transaction | +| Sequence | uint64 | A counter that must match the current value of the input account's Sequence plus one - i.e. the Sequence must equal n if this is the nth transaction issued by this account | + + +## CallTx + +Our core transaction type that calls EVM code, possibly transferring value. It takes the following parameters: + +| Parameter | Type | Description | +| ----------|------|-------------| +| Input | TxInput | The external 'caller' account - will be the initial SENDER and CALLER | +| Address | *Address | The address 'callee' contract - the contract whose code will be executed. If this value is nil then the CallTx is interpreted as contract creation and will deploy the bytecode contained in Data or WASM | +| GasLimit | uint64 | The maximum number of computational steps that we will allow to run before aborted the transaction execution. Measured according to our hardcoded simplified gas schedule (one gas unit per operation). Ensure transaction termination. If 0 a default cap will be used. | +| Fee | uint64 | An optional fee to be subtracted from the input amount - currently this fee is simply burnt! In the future fees will be collected and disbursed amongst validators as part of our token economics system | +| Data | []byte | If the CallTx is a deployment (i.e. Address is nil) then this data will be executed as EVM bytecode will and the return value will be used to instatiate a new contract. If the CallTx is a plain call then the data will form the input tape for the EVM call | + +## SendTx + +Allows [native token](/docs/reference/participants.md) to be sent from multiple inputs to multiple outputs. The basic value transfer function that calls no EVM Code. + +## NameTx + +Provides access to a global name registry service that associates a particular string key with a data payload and an owner. The control of the name is guaranteed for the period of the lease which is a determined by a fee. + +Note: a future revision will change the way in which leases are calculated. Currently we use a somewhat historically-rooted fixed fee, see the [`NameCostPerBlock` function](/execution/names/names.go). + +## BondTx + +This allows validators nominate themselves to the validator set by placing a bond subtracted from their balance. + +For more information see [bonding documentation](/docs/reference/bonding.md) + +## UnbondTx + +This allows validators remove themselves to the validator set returning their bond to their balance. + +## BatchTx + +Runs a set of transactions atomically in a single meta-transaction within a single block + +## GovTx + +An all-powerful transaction for modifying existing accounts. + +## ProposalTx + +A transaction type containing a batch of transactions on which a ballot is held to determine whether to execute, see [proposals tutorial](/docs/tutorials/8-proposals.md) + +## PermsTx + +A transaction to modify the permissions of accounts. + diff --git a/vent/README.md b/docs/reference/vent.md similarity index 55% rename from vent/README.md rename to docs/reference/vent.md index 7da4cac94..8f0889822 100644 --- a/vent/README.md +++ b/docs/reference/vent.md @@ -1,47 +1,92 @@ -# Vent Component +# Vent - SQL mapping layer -Vent reads sqlsol specification & abi files, parses their contents, and maps column types to corresponding sql types to create or alter database structures. It listens for a stream of block events from Burrow's GRPC service then parses, unpacks, decodes event data, and builds rows to be upserted in matching event tables, rows are upserted atomically in a single database transaction per block. +Vent reads specification files called 'projections', parses their contents, and maps EVM LOG event fields to corresponding SQL columns to create or alter database structures. It listens for a stream of block events from Burrow's GRPC service then parses, unpacks, decodes event data, and builds rows to be upserted in matching event tables, rows are upserted atomically in a single database transaction per block. -Block height and context info are stored in Log tables in order to resume getting pending blocks or rewind to a previous state. +There are two modes of operation: view mode and log mode. In view mode a primary key is used to locate the row in a table which should be updated (if exists) or inserted (if it does not exist). If the event contains a field matching the optional `DeleteMarkerField` then the row will instead be deleted. As such in view mode Vent can map a stream of EVM LOG events to a CRUD-style table - a view over entities as defined by the choice primary key. Alternatively if no primary keys are specified for a projection Vent operates in log mode where all matched events are inserted - and so log mode operates as an append-only log. Note there is no explicit setting for mode - it depends on the presence or absence of a `"Primary": true` entry in one of the `FieldMappings` of a projection (see below for an example). -## SQLSol specification -SQLSol is the name (object relational mapping between Solidity events and SQL tables) given to the configuration files that Vent uses to interpret EVM events as updates or deletion from SQL tables +Vent writes each block of updates atomically and is guaranteed to be crash tolerant. If the Vent process is killed it will resume at the last written height. Burrow stores all previous events in its state so even if you delete the Vent database it can be regenerated deterministically. This feature being a core feature of Vent. -Given a sqlsol specification, like the following: +## Projections +A projection is the name given to the configuration files that Vent uses to interpret EVM events as updates or deletion from SQL tables. They provide an object relational mapping between Solidity events and SQL tables. + +Given a projection, like the following: ```json [ { "TableName" : "EventTest", - "Filter" : "Log1Text = 'LOGEVENT1'", + "Filter" : "Log1Text = 'I am LOG1'", "DeleteMarkerField": "__DELETE__", "FieldMappings" : [ - {"Field": "key", "ColumnName" : "testname", "Type": "bytes32", "Primary" : true}, - {"Field": "description", "ColumnName" : "testdescription", "Type": "bytes32", "Primary" : false, "BytesToString": true} - ] - }, - { - "TableName" : "UserAccounts", - "Filter" : "Log1Text = 'USERACCOUNTS'", - "FieldMappings" : [ - {"Field": "userAddress", "ColumnName" : "address", "Type": "address", "Primary" : true}, - {"Field": "userName", "ColumnName" : "username", "Type": "string", "Primary" : false} + { + "Field": "key", + "ColumnName" : "testname", + "Type": "bytes32", + "Primary" : true + }, + { + "Field": "description", + "ColumnName" : "testdescription", + "Type": "bytes32", + "BytesToString": true + } ] } ] +``` +And a solidity contract like: + +```solidity +pragma solidity ^0.4.25; + +contract EventEmitter { + event UpdateEvent( + // The first indexed field will appear as the the LOG1 topic - we can use it like a namespace + bytes32 indexed IAmLog1, + // Our primary key in our projection above + bytes32 key, + // Some 'mutable' text - we can update this by emitting an UpdateEvent with the same key but a new description + bytes32 description + ); + + event DeletionEvent( + bytes32 indexed IAmLog1, + bytes32 key, + // This marker field can be of any type - it is purely matched on name - if an event contains a field with the + // the specified marker field it is interpreted as an instruction to delete the row corresponding to key + bool __DELETE__ + ); + + function update() external { + // Update or inserts 'key0001' row + emit UpdateEvent("I am LOG1", "key0001", "some description"); + } + + function update2() external { + // Update or inserts 'key0001' row + emit UpdateEvent("I am LOG1", "key0001", "a different description"); + } + + function remove() external { + // Removes 'key0001' row + emit DeletionEvent("I am LOG1", "key0001", true); + } +} ``` -Burrow can emit a JSONSchema for the sqlsol file format with `burrow vent schema`. You can use this to validate your sqlsol files using any of the [JSONSchema](https://json-schema.org/) tooling. +We can maintain a view-mode table that feels like that of a ordinary CRUD app though it is backed by a stream of events coming from our Solidity contracts. -### SQLSol specification -A sqlsol file is defined as a JSON array of `EventClass` objections. Each `EventClass` specifies a class of events that should be consumed (specified via a filter) in order to generate a SQL table. An `EventClass` holds `FieldMappings` that specify how to map the event fields of a matched EVM event to a destination column (identified by `ColumnName`) of the destination table (indentified by `TableName`) +Burrow can also emit a JSONSchema for the projection file format with `burrow vent schema`. You can use this to validate your projections using any of the [JSONSchema](https://json-schema.org/) tooling. + +### Projection specification +A projection file is defined as a JSON array of `EventClass` objections. Each `EventClass` specifies a class of events that should be consumed (specified via a filter) in order to generate a SQL table. An `EventClass` holds `FieldMappings` that specify how to map the event fields of a matched EVM event to a destination column (identified by `ColumnName`) of the destination table (identified by `TableName`) #### EventClass | Field | Type | Required? | Description | |-------|------|-----------|-------------| | `TableName` | String | Required | The case-sensitive name of the destination SQL table for the `EventClass`| -| `Filter` | String | Required | A filter to be applied to EVM Log events using the [available tags](../protobuf/rpcevents.proto) written according to the event [query.peg](../event/query/query.peg) grammar | +| `Filter` | String | Required | A filter to be applied to EVM Log events using the [available tags](../../protobuf/rpcevents.proto) written according to the event [query.peg](../../event/query/query.peg) grammar | | `FieldMappings` | array of `FieldMapping` | Required | Mappings between EVM event fields and columns see table below | | `DeleteMarkerField` | String | Optional | Field name of an event field that when present in a matched event indicates the event should result on a deletion of a row (matched on the primary keys of that row) rather than the default upsert action | @@ -65,7 +110,6 @@ Abi files can be generated from bin files like so: cat *.bin | jq '.Abi[] | select(.type == "event")' > events.abi ``` - ## Adapters: Adapters are database implementations, Vent can store data in different rdbms. @@ -118,17 +162,17 @@ make test_integration_vent ## Run Vent Command: ```bash -# Install vent command: -go install ./vent +# Install burrow (from root of repo): +make install # Print command help: -vent --help +burrow vent --help # Run vent command with postgres adapter, spec & abi files path, also stores block & tx data: -vent --db-adapter="postgres" --db-url="postgres://user:pass@localhost:5432/vent?sslmode=disable" --db-schema="vent" --grpc-addr="localhost:10997" --http-addr="0.0.0.0:8080" --log-level="debug" --spec-file="" --abi-file="" --db-block=true +burrow vent start --db-adapter="postgres" --db-url="postgres://user:pass@localhost:5432/vent?sslmode=disable" --db-schema="vent" --grpc-addr="localhost:10997" --http-addr="0.0.0.0:8080" --log-level="debug" --spec="" --abi="" --db-block=true # Run vent command with sqlite adapter, spec & abi directories path, does not store block & tx data: -vent --db-adapter="sqlite" --db-url="./vent.sqlite" --grpc-addr="localhost:10997" --http-addr="0.0.0.0:8080" --log-level="debug" --spec-dir="" --abi-dir="" +burrow vent start --db-adapter="sqlite" --db-url="./vent.sqlite" --grpc-addr="localhost:10997" --http-addr="0.0.0.0:8080" --log-level="debug" --spec="" --abi="" ``` Configuration Flags: diff --git a/execution/execution.go b/execution/execution.go index 755bed5a9..873cc2045 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -227,7 +227,7 @@ func (exe *executor) Execute(txEnv *txs.Envelope) (txe *exec.TxExecution, err er logger.InfoMsg("Executing transaction", "tx", txEnv.String()) // Verify transaction signature against inputs - err = txEnv.Verify(exe.stateCache, exe.params.ChainID) + err = txEnv.Verify(exe.params.ChainID) if err != nil { logger.InfoMsg("Transaction Verify failed", structure.ErrorKey, err) return nil, err diff --git a/project/history.go b/project/history.go index fc05bf741..d4d508850 100644 --- a/project/history.go +++ b/project/history.go @@ -247,7 +247,7 @@ var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "htt - [Deploy] burrow deploy can use key names where addresses are used - [Governance] Added threshold-based governance via Proposal mechanism which allows entities with Root permission to propose and vote on batches of transactions to be executed on a running network with no single entity being able to do so. - [Governance] Added command line and query introspection of proposals as well as burrow deploy support -- [Vent] Merged Vent our SQL projection and mapping layer into the Burrow repository and binary via 'burrow vent'. See [Vent Readme](./vent/README.md) +- [Vent] Merged Vent our SQL projection and mapping layer into the Burrow repository and binary via 'burrow vent'. See [Vent Readme](./vent/vent.md) - [State] Improved read-write separation with RWTree and ImmutableForest data structures - [State] Implemented dump/restore to port state between different version of Burrow or to compress the execution of a chain (with a proof) onto a fresh chain diff --git a/protobuf/payload.proto b/protobuf/payload.proto index 413efcfd2..9838cc74b 100644 --- a/protobuf/payload.proto +++ b/protobuf/payload.proto @@ -20,6 +20,7 @@ option (gogoproto.goproto_registration) = true; // Enable generation of XXX_MessageName methods for grpc-go/status. option (gogoproto.messagename_all) = true; +// Any encodes a sum type for which only one should be set message Any { option (gogoproto.onlyone) = true; diff --git a/txs/envelope.go b/txs/envelope.go index d54318461..272f8a68f 100644 --- a/txs/envelope.go +++ b/txs/envelope.go @@ -94,7 +94,7 @@ func (sig *Signatory) Validate() error { // Verifies the validity of the Signatories' Signatures in the Envelope. The Signatories must // appear in the same order as the inputs as returned by Tx.GetInputs(). -func (txEnv *Envelope) Verify(getter acmstate.AccountGetter, chainID string) error { +func (txEnv *Envelope) Verify(chainID string) error { err := txEnv.Validate() if err != nil { return err diff --git a/txs/tx_test.go b/txs/tx_test.go index a2d272901..9420d10c6 100644 --- a/txs/tx_test.go +++ b/txs/tx_test.go @@ -220,5 +220,5 @@ func testTxSignVerify(t *testing.T, tx payload.Payload) { } txEnv := Enclose(chainID, tx) require.NoError(t, txEnv.Sign(signers...), "Error signing tx: %s", debug.Stack()) - require.NoError(t, txEnv.Verify(nil, chainID), "Error verifying tx: %s", debug.Stack()) + require.NoError(t, txEnv.Verify(chainID), "Error verifying tx: %s", debug.Stack()) } From 0980e6c1cf1f55157ea8d6db0e7ada96a6f59285 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Tue, 3 Sep 2019 19:20:07 +0100 Subject: [PATCH 006/185] experimental web3 rpc Signed-off-by: Gregory Hill --- core/kernel.go | 1 + core/processes.go | 39 +- encoding/hex.go | 44 ++ go.mod | 4 +- go.sum | 34 +- integration/integration.go | 2 + keys/key_store.go | 7 +- rpc/config.go | 10 + rpc/eth.go | 790 ++++++++++++++++++++++ rpc/eth_test.go | 186 ++++++ rpc/test.sol | 9 + rpc/test.sol.go | 7 + rpc/web3/server.go | 491 ++++++++++++++ rpc/web3/types.go | 1273 ++++++++++++++++++++++++++++++++++++ 14 files changed, 2861 insertions(+), 36 deletions(-) create mode 100644 encoding/hex.go create mode 100644 rpc/eth.go create mode 100644 rpc/eth_test.go create mode 100644 rpc/test.sol create mode 100644 rpc/test.sol.go create mode 100644 rpc/web3/server.go create mode 100644 rpc/web3/types.go diff --git a/core/kernel.go b/core/kernel.go index 4707bcde3..f915788af 100644 --- a/core/kernel.go +++ b/core/kernel.go @@ -61,6 +61,7 @@ type Kernel struct { // Expose these public-facing interfaces to allow programmatic extension of the Kernel by other projects Emitter *event.Emitter Service *rpc.Service + EthService *rpc.EthService Launchers []process.Launcher State *state.State Blockchain *bcm.Blockchain diff --git a/core/processes.go b/core/processes.go index 6a9c05a61..636d6151a 100644 --- a/core/processes.go +++ b/core/processes.go @@ -14,12 +14,14 @@ import ( "github.com/hyperledger/burrow/process" "github.com/hyperledger/burrow/project" "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/rpc/lib/server" "github.com/hyperledger/burrow/rpc/metrics" "github.com/hyperledger/burrow/rpc/rpcdump" "github.com/hyperledger/burrow/rpc/rpcevents" "github.com/hyperledger/burrow/rpc/rpcinfo" "github.com/hyperledger/burrow/rpc/rpcquery" "github.com/hyperledger/burrow/rpc/rpctransact" + "github.com/hyperledger/burrow/rpc/web3" "github.com/hyperledger/burrow/txs" "github.com/tendermint/tendermint/version" hex "github.com/tmthrgd/go-hex" @@ -31,6 +33,7 @@ const ( NoConsensusProcessName = "NoConsensusExecution" TendermintProcessName = "Tendermint" StartupProcessName = "StartupAnnouncer" + Web3ProcessName = "rpcConfig/web3" InfoProcessName = "rpcConfig/info" GRPCProcessName = "rpcConfig/GRPC" MetricsProcessName = "rpcConfig/metrics" @@ -44,6 +47,7 @@ func DefaultProcessLaunchers(kern *Kernel, rpcConfig *rpc.RPCConfig, keysConfig NoConsensusLauncher(kern), TendermintLauncher(kern), StartupLauncher(kern), + Web3Launcher(kern, rpcConfig.Web3), InfoLauncher(kern, rpcConfig.Info), MetricsLauncher(kern, rpcConfig.Metrics), GRPCLauncher(kern, rpcConfig.GRPC, keysConfig), @@ -117,10 +121,6 @@ func TendermintLauncher(kern *Kernel) process.Launcher { return nil, fmt.Errorf("%s cannot get NodeView %v", errHeader, err) } - accountState := kern.State - nameRegState := kern.State - kern.Service = rpc.NewService(accountState, nameRegState, kern.Blockchain, kern.State, nodeView, kern.Logger) - kern.Blockchain.SetBlockStore(bcm.NewBlockStore(nodeView.BlockStore())) // Provide execution accounts against checker state so that we can assign sequence numbers accounts := execution.NewAccounts(kern.checker, kern.keyClient, AccountsRingMutexCount) @@ -129,6 +129,13 @@ func TendermintLauncher(kern *Kernel) process.Launcher { kern.Transactor = execution.NewTransactor(kern.Blockchain, kern.Emitter, accounts, checkTx, kern.txCodec, kern.Logger) + accountState := kern.State + eventsState := kern.State + nameRegState := kern.State + validatorState := kern.State + kern.Service = rpc.NewService(accountState, nameRegState, kern.Blockchain, validatorState, nodeView, kern.Logger) + kern.EthService = rpc.NewEthService(accountState, eventsState, kern.Blockchain, validatorState, nodeView, kern.Transactor, kern.keyStore, kern.Logger) + if err := kern.Node.Start(); err != nil { return nil, fmt.Errorf("%s error starting Tendermint node: %v", errHeader, err) } @@ -220,6 +227,30 @@ func InfoLauncher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher { } } +func Web3Launcher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher { + return process.Launcher{ + Name: Web3ProcessName, + Enabled: conf.Enabled, + Launch: func() (process.Process, error) { + listener, err := process.ListenerFromAddress(fmt.Sprintf("%s:%s", conf.ListenHost, conf.ListenPort)) + if err != nil { + return nil, err + } + err = kern.registerListener(Web3ProcessName, listener) + if err != nil { + return nil, err + } + + srv, err := server.StartHTTPServer(listener, web3.NewServer(kern.EthService), kern.Logger) + if err != nil { + return nil, err + } + + return srv, nil + }, + } +} + func MetricsLauncher(kern *Kernel, conf *rpc.MetricsConfig) process.Launcher { return process.Launcher{ Name: MetricsProcessName, diff --git a/encoding/hex.go b/encoding/hex.go new file mode 100644 index 000000000..6710b4773 --- /dev/null +++ b/encoding/hex.go @@ -0,0 +1,44 @@ +package encoding + +import ( + "encoding/hex" + fmt "fmt" + "strconv" + "strings" + + "github.com/hyperledger/burrow/crypto" +) + +const ( + HexPrefix = `0x` +) + +func HexEncodeBytes(data []byte) string { + return HexAddPrefix(hex.EncodeToString(data)) +} + +func HexEncodeNumber(i uint64) string { + return HexAddPrefix(strconv.FormatUint(i, 16)) +} + +func HexAddPrefix(input string) string { + return fmt.Sprintf("%s%s", HexPrefix, input) +} + +func HexRemovePrefix(input string) string { + return strings.Replace(input, HexPrefix, "", -1) +} + +func HexDecodeToBytes(input string) ([]byte, error) { + input = HexRemovePrefix(input) + return hex.DecodeString(input) +} + +func HexDecodeToNumber(i string) (uint64, error) { + return strconv.ParseUint(i, 0, 64) +} + +func HexDecodeToAddress(input string) (crypto.Address, error) { + input = HexRemovePrefix(input) + return crypto.AddressFromHexString(input) +} diff --git a/go.mod b/go.mod index 945a5b440..4b23abd42 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc // indirect github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf // indirect github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf // indirect - github.com/btcsuite/btcd v0.0.0-20190418232430-6867ff32788a + github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c github.com/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9 github.com/eapache/channels v1.1.0 github.com/eapache/queue v1.1.0 // indirect @@ -31,7 +31,6 @@ require ( github.com/imdario/mergo v0.3.7 github.com/jawher/mow.cli v1.1.0 github.com/jmoiron/sqlx v1.2.0 - github.com/kisielk/errcheck v1.2.0 // indirect github.com/kr/pretty v0.1.0 // indirect github.com/lib/pq v1.1.1 github.com/mattn/go-colorable v0.1.2 // indirect @@ -61,7 +60,6 @@ require ( golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 golang.org/x/sys v0.0.0-20190825160603-fb81701db80f // indirect golang.org/x/text v0.3.2 // indirect - golang.org/x/tools v0.0.0-20190826060629-95c3470cfb70 // indirect google.golang.org/grpc v1.22.0 gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect diff --git a/go.sum b/go.sum index 1ca5f671f..f99d9433d 100644 --- a/go.sum +++ b/go.sum @@ -18,12 +18,12 @@ github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:l github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= -github.com/btcsuite/btcd v0.0.0-20190418232430-6867ff32788a h1:m/oCT7NlD/JpB64AxWzoS9GuZOCPKkTpt/bdIfeYPwA= -github.com/btcsuite/btcd v0.0.0-20190418232430-6867ff32788a/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= +github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c h1:aEbSeNALREWXk0G7UdNhR3ayBV7tZ4M2PNmnrCAph6Q= +github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803 h1:j3AgPKKZtZStM2nyhrDSLSYgT7YHrZKdSkq1OYeLjvM= -github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= 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/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= @@ -76,12 +76,8 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= -github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -112,7 +108,6 @@ github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= 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/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/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= @@ -200,18 +195,12 @@ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoH github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= -github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 h1:1oFLiOyVl+W7bnBzGhf7BbIv9loSFQcieWWYIjLqcAw= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6offJMk= github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= -github.com/tendermint/iavl v0.12.2 h1:Ls5p5VINCM1HRT9g5Vvs2zmDOCU/CCIvIHzd/pZ8P0E= -github.com/tendermint/iavl v0.12.2/go.mod h1:EoKMMv++tDOL5qKKVnoIqtVPshRrEPeJ0WsgDOLAauM= github.com/tendermint/iavl v0.12.4 h1:hd1woxUGISKkfUWBA4mmmTwOua6PQZTJM/F0FDrmMV8= github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= -github.com/tendermint/tendermint v0.31.5 h1:vTet8tCq3B9/J9Yo11dNZ8pOB7NtSy++bVSfkP4KzR4= -github.com/tendermint/tendermint v0.31.5/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc= github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= github.com/tendermint/tendermint v0.32.3 h1:GEnWpGQ795h5oTFNbfBLsY0LW/CW2j6p6HtiYNfxsgg= github.com/tendermint/tendermint v0.32.3/go.mod h1:ZK2c29jl1QRYznIRyRWRDsmm1yvtPzBRT00x4t1JToY= @@ -231,14 +220,13 @@ github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4m github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f h1:R423Cnkcp5JABoeemiGEPlt9tHXFfw5kvc0yqlxRPWo= -golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 h1:7KByu05hhLed2MO29w7p1XfZvZ13m8mub3shuVftRs0= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -246,12 +234,10 @@ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092 h1:4QSRKanuywn15aTZvI/mIDEgPQpswuFndXpOj3rKEco= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -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-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 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= @@ -263,8 +249,6 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= 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-20190529164535-6a60838ec259 h1:so6Hr/LodwSZ5UQDu/7PmQiDeS112WwtLvU3lpSPZTU= -golang.org/x/sys v0.0.0-20190529164535-6a60838ec259/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190825160603-fb81701db80f h1:LCxigP8q3fPRGNVYndYsyHnF0zRrvcoVwZMfb8iQZe4= golang.org/x/sys v0.0.0-20190825160603-fb81701db80f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= @@ -273,11 +257,8 @@ golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/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-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190826060629-95c3470cfb70/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= @@ -286,8 +267,6 @@ google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2 h1:67iHsV9djwGdZpdZNbLuQj6FOzCaZe3w+vhLjn5AcFA= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.22.0 h1:J0UbZOIrCAl+fpTOf8YLs4dJo8L/owV4LYVtAXQoPkw= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= @@ -303,5 +282,4 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/integration/integration.go b/integration/integration.go index d6d4aceab..dc0400eae 100644 --- a/integration/integration.go +++ b/integration/integration.go @@ -104,6 +104,8 @@ func NewTestConfig(genesisDoc *genesis.GenesisDoc, conf.RPC.Metrics.ListenPort = freeport conf.RPC.Info.ListenHost = rpc.LocalHost conf.RPC.Info.ListenPort = freeport + conf.RPC.Web3.ListenHost = rpc.LocalHost + conf.RPC.Web3.ListenPort = freeport conf.Execution.TimeoutFactor = 0.5 conf.Execution.VMOptions = []execution.VMOption{} for _, opt := range options { diff --git a/keys/key_store.go b/keys/key_store.go index e782bd8d7..797928854 100644 --- a/keys/key_store.go +++ b/keys/key_store.go @@ -230,7 +230,12 @@ func DecryptKey(passphrase string, keyProtected *keyJSON) (*Key, error) { func (ks *KeyStore) GetAllAddresses() (addresses []string, err error) { ks.Lock() defer ks.Unlock() - return GetAllAddresses(ks.keysDirPath) + + dir, err := returnDataDir(ks.keysDirPath) + if err != nil { + return nil, err + } + return GetAllAddresses(dir) } func (ks *KeyStore) StoreKey(passphrase string, key *Key) error { diff --git a/rpc/config.go b/rpc/config.go index d77d3f2d7..f5b2a0f9a 100644 --- a/rpc/config.go +++ b/rpc/config.go @@ -10,6 +10,7 @@ type RPCConfig struct { Profiler *ServerConfig `json:",omitempty" toml:",omitempty"` GRPC *ServerConfig `json:",omitempty" toml:",omitempty"` Metrics *MetricsConfig `json:",omitempty" toml:",omitempty"` + Web3 *ServerConfig `json:",omitempty" toml:",omitempty"` } type ServerConfig struct { @@ -30,6 +31,7 @@ func DefaultRPCConfig() *RPCConfig { Profiler: DefaultProfilerConfig(), GRPC: DefaultGRPCConfig(), Metrics: DefaultMetricsConfig(), + Web3: DefaultWeb3Config(), } } @@ -68,3 +70,11 @@ func DefaultMetricsConfig() *MetricsConfig { BlockSampleSize: 100, } } + +func DefaultWeb3Config() *ServerConfig { + return &ServerConfig{ + Enabled: true, + ListenHost: AnyLocal, + ListenPort: "26660", + } +} diff --git a/rpc/eth.go b/rpc/eth.go new file mode 100644 index 000000000..d2ec8050b --- /dev/null +++ b/rpc/eth.go @@ -0,0 +1,790 @@ +package rpc + +import ( + "context" + "encoding/hex" + "fmt" + "math/big" + "strconv" + "strings" + + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/acm/validator" + bcm "github.com/hyperledger/burrow/bcm" + bin "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/consensus/tendermint" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/execution" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/execution/state" + "github.com/hyperledger/burrow/keys" + "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/project" + "github.com/hyperledger/burrow/rpc/web3" + "github.com/hyperledger/burrow/txs" + "github.com/hyperledger/burrow/txs/payload" + tmConfig "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/types" +) + +// EthService is a web3 provider +type EthService struct { + accounts acmstate.IterableStatsReader + events EventsReader + blockchain bcm.BlockchainInfo + validators validator.History + nodeView *tendermint.NodeView + trans *execution.Transactor + keyClient keys.KeyClient + keyStore *keys.KeyStore + config *tmConfig.Config + logger *logging.Logger +} + +// NewEthService returns our web3 provider +func NewEthService(accounts acmstate.IterableStatsReader, + events EventsReader, blockchain bcm.BlockchainInfo, + validators validator.History, nodeView *tendermint.NodeView, + trans *execution.Transactor, keyStore *keys.KeyStore, + logger *logging.Logger) *EthService { + + keyClient := keys.NewLocalKeyClient(keyStore, logger) + + return &EthService{ + accounts, + events, + blockchain, + validators, + nodeView, + trans, + keyClient, + keyStore, + tmConfig.DefaultConfig(), + logger, + } +} + +var _ web3.Service = &EthService{} + +type EventsReader interface { + TxsAtHeight(height uint64) ([]*exec.TxExecution, error) + TxByHash(txHash []byte) (*exec.TxExecution, error) +} + +var _ EventsReader = &state.State{} + +// Web3ClientVersion returns the version of burrow +func (srv *EthService) Web3ClientVersion() (*web3.Web3ClientVersionResult, error) { + return &web3.Web3ClientVersionResult{ + ClientVersion: project.FullVersion(), + }, nil +} + +// Web3Sha3 returns Keccak-256 (not the standardized SHA3-256) of the given data +func (srv *EthService) Web3Sha3(req *web3.Web3Sha3Params) (*web3.Web3Sha3Result, error) { + data, err := encoding.HexDecodeToBytes(req.Data) + if err != nil { + return nil, err + } + + hash := sha3.NewKeccak256() + _, err = hash.Write(data) + if err != nil { + return nil, err + } + + return &web3.Web3Sha3Result{ + HashedData: encoding.HexEncodeBytes(hash.Sum(nil)), + }, nil +} + +// NetListening returns true if the peer is running +func (srv *EthService) NetListening() (*web3.NetListeningResult, error) { + return &web3.NetListeningResult{ + IsNetListening: srv.nodeView.NodeInfo().GetListenAddress() != "", + }, nil +} + +// NetPeerCount returns the number of connected peers +func (srv *EthService) NetPeerCount() (*web3.NetPeerCountResult, error) { + return &web3.NetPeerCountResult{ + NumConnectedPeers: encoding.HexEncodeNumber(uint64(srv.nodeView.Peers().Size())), + }, nil +} + +// NetVersion returns the hex encoding of the genesis hash, +// this is typically a small int (where 1 == Ethereum mainnet) +func (srv *EthService) NetVersion() (*web3.NetVersionResult, error) { + doc := srv.blockchain.GenesisDoc() + return &web3.NetVersionResult{ + ChainID: encoding.HexEncodeBytes(doc.ShortHash()), + }, nil +} + +// EthProtocolVersion returns the version of tendermint +func (srv *EthService) EthProtocolVersion() (*web3.EthProtocolVersionResult, error) { + return &web3.EthProtocolVersionResult{ + ProtocolVersion: srv.nodeView.NodeInfo().Version, + }, nil +} + +// EthChainId returns the chainID +func (srv *EthService) EthChainId() (*web3.EthChainIdResult, error) { + return &web3.EthChainIdResult{ + ChainId: srv.blockchain.ChainID(), + }, nil +} + +// EthBlockNumber returns the latest height +func (srv *EthService) EthBlockNumber() (*web3.EthBlockNumberResult, error) { + return &web3.EthBlockNumberResult{ + BlockNumber: encoding.HexEncodeNumber(srv.blockchain.LastBlockHeight()), + }, nil +} + +// EthCall executes a new message call immediately without creating a transaction +func (srv *EthService) EthCall(req *web3.EthCallParams) (*web3.EthCallResult, error) { + var to, from crypto.Address + var err error + + if addr := req.Transaction.To; addr != "" { + to, err = encoding.HexDecodeToAddress(addr) + if err != nil { + return nil, err + } + } + + if addr := req.Transaction.From; addr != "" { + from, err = encoding.HexDecodeToAddress(addr) + if err != nil { + return nil, err + } + } + + // don't hex decode abi + data := []byte(encoding.HexRemovePrefix(req.Transaction.Data)) + + txe, err := execution.CallSim(srv.accounts, srv.blockchain, from, to, data, srv.logger) + if err != nil { + return nil, err + } + + var result string + if r := txe.GetResult(); r != nil { + result = encoding.HexEncodeBytes(r.GetReturn()) + } + + return &web3.EthCallResult{ + ReturnValue: result, + }, nil +} + +// EthGetBalance returns an accounts balance, or an error if it does not exist +func (srv *EthService) EthGetBalance(req *web3.EthGetBalanceParams) (*web3.EthGetBalanceResult, error) { + addr, err := encoding.HexDecodeToAddress(req.Address) + if err != nil { + return nil, err + } + + acc, err := srv.accounts.GetAccount(addr) + if err != nil { + return nil, err + } else if acc == nil { + return nil, fmt.Errorf("account not found at address %s", req.Address) + } + + return &web3.EthGetBalanceResult{ + GetBalanceResult: encoding.HexEncodeNumber(acc.Balance), + }, nil +} + +// EthGetBlockByHash iterates through all headers to find a matching block height for a given hash +func (srv *EthService) EthGetBlockByHash(req *web3.EthGetBlockByHashParams) (*web3.EthGetBlockByHashResult, error) { + height, err := srv.getBlockHeightByHash(req.BlockHash) + if err != nil { + return nil, err + } + + block, err := srv.getBlockInfoAtHeight(height) + if err != nil { + return nil, err + } + + return &web3.EthGetBlockByHashResult{ + GetBlockByHashResult: web3.GetBlockByHashResult{ + Block: *block, + }, + }, web3.ErrNotFound +} + +// EthGetBlockByNumber returns block info at the given height +func (srv *EthService) EthGetBlockByNumber(req *web3.EthGetBlockByNumberParams) (*web3.EthGetBlockByNumberResult, error) { + height, err := srv.getHeightByWordOrNumber(req.BlockNumber) + if err != nil { + return nil, err + } + + block, err := srv.getBlockInfoAtHeight(height) + if err != nil { + return nil, err + } + + return &web3.EthGetBlockByNumberResult{ + GetBlockByNumberResult: web3.GetBlockByNumberResult{ + Block: *block, + }, + }, nil +} + +// EthGetBlockTransactionCountByHash returns the number of transactions in a block matching a given hash +func (srv *EthService) EthGetBlockTransactionCountByHash(req *web3.EthGetBlockTransactionCountByHashParams) (*web3.EthGetBlockTransactionCountByHashResult, error) { + height, err := srv.getBlockHeightByHash(req.BlockHash) + if err != nil { + return nil, err + } + + block, err := srv.getBlockHeaderAtHeight(height) + if err != nil { + return nil, err + } + + return &web3.EthGetBlockTransactionCountByHashResult{ + BlockTransactionCountByHash: encoding.HexEncodeNumber(uint64(block.NumTxs)), + }, web3.ErrNotFound +} + +// EthGetBlockTransactionCountByNumber returns the number of transactions in a block matching a given height +func (srv *EthService) EthGetBlockTransactionCountByNumber(req *web3.EthGetBlockTransactionCountByNumberParams) (*web3.EthGetBlockTransactionCountByNumberResult, error) { + height, err := srv.getHeightByWordOrNumber(req.BlockNumber) + if err != nil { + return nil, err + } + + block, err := srv.getBlockHeaderAtHeight(height) + if err != nil { + return nil, err + } + + return &web3.EthGetBlockTransactionCountByNumberResult{ + BlockTransactionCountByHash: encoding.HexEncodeNumber(uint64(block.NumTxs)), + }, nil +} + +// EthGetCode returns the EVM bytecode at an address +func (srv *EthService) EthGetCode(req *web3.EthGetCodeParams) (*web3.EthGetCodeResult, error) { + addr, err := encoding.HexDecodeToAddress(req.Address) + if err != nil { + return nil, err + } + + acc, err := srv.accounts.GetAccount(addr) + if err != nil { + return nil, err + } else if acc == nil { + return nil, fmt.Errorf("account not found at address %s", req.Address) + } + + return &web3.EthGetCodeResult{ + Bytes: encoding.HexEncodeBytes(acc.EVMCode), + }, nil +} + +// TODO +func (srv *EthService) EthGetRawTransactionByHash(req *web3.EthGetRawTransactionByHashParams) (*web3.EthGetRawTransactionByHashResult, error) { + return nil, web3.ErrNotFound +} + +// TODO +func (srv *EthService) EthGetRawTransactionByBlockHashAndIndex(req *web3.EthGetRawTransactionByBlockHashAndIndexParams) (*web3.EthGetRawTransactionByBlockHashAndIndexResult, error) { + return nil, web3.ErrNotFound +} + +// TODO +func (srv *EthService) EthGetRawTransactionByBlockNumberAndIndex(req *web3.EthGetRawTransactionByBlockNumberAndIndexParams) (*web3.EthGetRawTransactionByBlockNumberAndIndexResult, error) { + return nil, web3.ErrNotFound +} + +// TODO +func (srv *EthService) EthGetStorageAt(req *web3.EthGetStorageAtParams) (*web3.EthGetStorageAtResult, error) { + // addr, err := crypto.AddressFromHexString(req.Address) + // if err != nil { + // return nil, err + // } + + return nil, web3.ErrNotFound +} + +// TODO +func (srv *EthService) EthGetTransactionByBlockHashAndIndex(req *web3.EthGetTransactionByBlockHashAndIndexParams) (*web3.EthGetTransactionByBlockHashAndIndexResult, error) { + return nil, web3.ErrNotFound +} + +// TODO +func (srv *EthService) EthGetTransactionByBlockNumberAndIndex(req *web3.EthGetTransactionByBlockNumberAndIndexParams) (*web3.EthGetTransactionByBlockNumberAndIndexResult, error) { + return nil, web3.ErrNotFound +} + +// EthGetTransactionByHash finds a tx by the given hash +func (srv *EthService) EthGetTransactionByHash(req *web3.EthGetTransactionByHashParams) (*web3.EthGetTransactionByHashResult, error) { + hash, err := encoding.HexDecodeToBytes(req.TransactionHash) + if err != nil { + return nil, err + } + + txe, err := srv.events.TxByHash(hash) + if err != nil { + return nil, err + } else if txe.Envelope == nil { + return nil, fmt.Errorf("no envelope for tx %s", req.TransactionHash) + } else if txe.Envelope.Tx == nil { + return nil, fmt.Errorf("no payload for tx %s", req.TransactionHash) + } + + head, err := srv.blockchain.GetBlockHeader(txe.Height) + if err != nil { + return nil, err + } + + tx := payloadToTx(txe.Envelope.Tx.Payload) + tx.Hash = encoding.HexEncodeBytes(txe.GetTxHash()) + tx.BlockNumber = encoding.HexEncodeBytes([]byte(strconv.FormatUint(txe.Height, 10))) + tx.BlockHash = encoding.HexEncodeBytes(head.Hash()) + + return &web3.EthGetTransactionByHashResult{ + Transaction: tx, + }, nil +} + +// EthGetTransactionCount returns the number of transactions sent from an address +func (srv *EthService) EthGetTransactionCount(req *web3.EthGetTransactionCountParams) (*web3.EthGetTransactionCountResult, error) { + // TODO: implement + return nil, web3.ErrNotFound +} + +// EthGetTransactionReceipt returns the receipt of a previously committed tx +func (srv *EthService) EthGetTransactionReceipt(req *web3.EthGetTransactionReceiptParams) (*web3.EthGetTransactionReceiptResult, error) { + data, err := encoding.HexDecodeToBytes(req.TransactionHash) + if err != nil { + return nil, err + } + + txe, err := srv.events.TxByHash(data) + if err != nil { + return nil, err + } else if txe == nil { + return nil, fmt.Errorf("tx with hash %s does not exist", req.TransactionHash) + } + + block, err := srv.blockchain.GetBlockHeader(txe.Height) + if err != nil { + return nil, err + } + + result := &web3.EthGetTransactionReceiptResult{ + Receipt: web3.Receipt{ + Status: "0x1", + BlockNumber: encoding.HexEncodeNumber(uint64(block.Height)), + BlockHash: encoding.HexEncodeBytes(block.Hash()), + From: combineInputs(txe.Envelope.Tx.GetInputs()...), + // CumulativeGasUsed + GasUsed: encoding.HexEncodeNumber(txe.Result.GetGasUsed()), + TransactionHash: encoding.HexEncodeBytes(txe.GetTxHash()), + // TransactionIndex: strconv.FormatUint(txe.GetIndex(), 10), + }, + } + + if txe.Receipt != nil { + // hex encoded + result.Receipt.ContractAddress = encoding.HexEncodeBytes(txe.Receipt.ContractAddress.Bytes()) + } + + return result, nil +} + +// EthHashrate returns the configured tendermint commit timeout +func (srv *EthService) EthHashrate() (*web3.EthHashrateResult, error) { + return &web3.EthHashrateResult{ + HashesPerSecond: srv.config.Consensus.TimeoutCommit.String(), + }, nil +} + +// EthMining returns true if client is a validator +func (srv *EthService) EthMining() (*web3.EthMiningResult, error) { + var isVal bool + addr := srv.nodeView.ValidatorAddress() + val := srv.validators.Validators(1) + err := val.IterateValidators(func(id crypto.Addressable, _ *big.Int) error { + if addr == id.GetAddress() { + isVal = true + } + return nil + }) + if err != nil { + return nil, err + } + return &web3.EthMiningResult{ + Mining: isVal, + }, nil +} + +// EthPendingTransactions returns all txs in the mempool +func (srv *EthService) EthPendingTransactions() (*web3.EthPendingTransactionsResult, error) { + pending := make([]web3.PendingTransactions, 0) + envelopes, err := srv.nodeView.MempoolTransactions(-1) + if err != nil { + return nil, err + } + + for _, env := range envelopes { + pending = append(pending, web3.PendingTransactions{ + Transaction: payloadToTx(env.Tx.Payload), + }) + } + + return &web3.EthPendingTransactionsResult{ + PendingTransactions: pending, + }, nil +} + +type RawTx struct { + Nonce uint64 `json:"nonce"` + GasPrice uint64 `json:"gasPrice"` + Gas uint64 `json:"gas"` + To *crypto.Address `json:"to"` + Value uint64 `json:"value"` + Input []byte `json:"input"` + + V *big.Int `json:"v"` + R *big.Int `json:"r"` + S *big.Int `json:"s"` +} + +func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionParams) (*web3.EthSendRawTransactionResult, error) { + // TODO: implement + + // 1) hex decode + + // 2) rlp decode + + // 3) sign and send + + return nil, web3.ErrNotFound +} + +// EthSyncing returns this nodes syncing status (i.e. whether it has caught up) +func (srv *EthService) EthSyncing() (*web3.EthSyncingResult, error) { + // TODO: remaining sync fields + return &web3.EthSyncingResult{ + SyncStatus: web3.SyncStatus{ + CurrentBlock: encoding.HexEncodeNumber(srv.blockchain.LastBlockHeight()), + }, + }, nil +} + +func (srv *EthService) getBlockHeightByHash(hash string) (uint64, error) { + for i := uint64(0); i < srv.blockchain.LastBlockHeight(); i++ { + head, err := srv.blockchain.GetBlockHeader(i) + if err != nil { + return 0, err + } else if head.Hash().String() == hash { + return i, nil + } + } + return 0, web3.ErrNotFound +} + +func (srv *EthService) getBlockHeaderAtHeight(height uint64) (*types.Header, error) { + return srv.blockchain.GetBlockHeader(height) +} + +func (srv *EthService) getBlockInfoAtHeight(height uint64) (*web3.Block, error) { + block, err := srv.getBlockHeaderAtHeight(height) + if err != nil { + return nil, err + } else if block == nil { + return nil, fmt.Errorf("block at height %d does not exist", height) + } + + return &web3.Block{ + TransactionsRoot: encoding.HexEncodeBytes(block.AppHash.Bytes()), + }, nil +} + +func (srv *EthService) getHeightByWord(height string) (uint64, bool) { + switch height { + case "earliest": + return 0, true + case "latest", "pending": + return srv.blockchain.LastBlockHeight(), true + // TODO: pending state/transactions + default: + return 0, false + } +} + +func getHeightByNumber(height string) (uint64, error) { + return encoding.HexDecodeToNumber(height) +} + +func (srv *EthService) getHeightByWordOrNumber(i string) (uint64, error) { + var err error + height, ok := srv.getHeightByWord(i) + if !ok { + height, err = getHeightByNumber(i) + if err != nil { + return 0, err + } + } + return height, nil +} + +func combineInputs(ins ...*payload.TxInput) string { + addrs := make([]string, 0, len(ins)) + for _, i := range ins { + addrs = append(addrs, encoding.HexEncodeBytes(i.Address.Bytes())) + } + return strings.Join(addrs, ",") +} + +func combineOutputs(outs ...*payload.TxOutput) string { + addrs := make([]string, 0, len(outs)) + for _, o := range outs { + addrs = append(addrs, encoding.HexEncodeBytes(o.Address.Bytes())) + } + return strings.Join(addrs, ",") +} + +func payloadToTx(in payload.Payload) web3.Transaction { + switch tx := in.(type) { + case *payload.CallTx: + transaction := web3.Transaction{ + From: encoding.HexEncodeBytes(tx.Input.Address.Bytes()), + Value: encoding.HexEncodeNumber(tx.Input.Amount), + Nonce: encoding.HexEncodeNumber(tx.Input.Sequence), + Gas: encoding.HexEncodeNumber(tx.GasLimit), + Data: encoding.HexEncodeBytes(tx.Data), + } + + if tx.Address != nil { + transaction.To = encoding.HexEncodeBytes(tx.Address.Bytes()) + } else { + transaction.To = "null" + } + + return transaction + case *payload.SendTx: + return web3.Transaction{ + From: combineInputs(tx.Inputs...), + To: combineOutputs(tx.Outputs...), + } + default: + return web3.Transaction{ + From: combineInputs(tx.GetInputs()...), + } + } +} + +// TODO: deprecate? > https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1767.md#rationale + +type SendOrCall struct { + input payload.TxInput + to *crypto.Address + gas uint64 +} + +// EthSendTransaction constructs, signs and broadcasts a tx from the local node +func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (*web3.EthSendTransactionResult, error) { + tx := SendOrCall{} + + var err error + if from := req.Transaction.From; from != "" { + tx.input.Address, err = encoding.HexDecodeToAddress(from) + if err != nil { + return nil, fmt.Errorf("failed to parse from address: %v", err) + } + } else { + return nil, fmt.Errorf("no from address specified") + } + + if value := req.Transaction.Value; value != "" { + tx.input.Amount, err = strconv.ParseUint(value, 0, 64) + if err != nil { + return nil, fmt.Errorf("failed to parse amount: %v", err) + } + } + + acc, err := srv.accounts.GetAccount(tx.input.Address) + if err != nil { + return nil, err + } + + tx.input.Sequence = acc.Sequence + 1 + + if to := req.Transaction.To; to != "" { + addr, err := encoding.HexDecodeToAddress(to) + if err != nil { + return nil, fmt.Errorf("failed to parse to address: %v", err) + } + tx.to = &addr + } + + // gas provided for the transaction execution + if gas := req.Transaction.Gas; gas != "" { + tx.gas, err = strconv.ParseUint(gas, 0, 64) + if err != nil { + return nil, fmt.Errorf("failed to parse gas: %v", err) + } + } + + var input payload.Payload + if data := req.Transaction.Data; data != "" { + bs, err := encoding.HexDecodeToBytes(data) + if err != nil { + return nil, fmt.Errorf("failed to parse data: %v", err) + } + // if request contains data then do a callTx + input = &payload.CallTx{ + Input: &tx.input, + Address: tx.to, + GasLimit: tx.gas, + Data: bin.HexBytes(bs), + } + } else { + input = &payload.SendTx{ + Inputs: []*payload.TxInput{&tx.input}, + Outputs: []*payload.TxOutput{ + &payload.TxOutput{ + Amount: tx.input.Amount, + }, + }, + } + } + + txEnv := txs.Enclose(srv.blockchain.ChainID(), input) + + signer, err := keys.AddressableSigner(srv.keyClient, tx.input.Address) + if err != nil { + return nil, err + } + err = txEnv.Sign(signer) + if err != nil { + return nil, err + } + + ctx := context.Background() + txe, err := srv.trans.BroadcastTxSync(ctx, txEnv) + if err != nil { + return nil, err + } else if txe.Exception != nil { + return nil, txe.Exception.AsError() + } + + return &web3.EthSendTransactionResult{ + TransactionHash: encoding.HexEncodeBytes(txe.GetTxHash().Bytes()), + }, nil +} + +// EthAccounts returns all accounts signable from the local node +func (srv *EthService) EthAccounts() (*web3.EthAccountsResult, error) { + addresses, err := srv.keyStore.GetAllAddresses() + if err != nil { + return nil, err + } + + addrs := make([]string, 0, len(addresses)) + for _, addr := range addresses { + data, err := hex.DecodeString(addr) + if err != nil { + return nil, fmt.Errorf("could not decode address %s", addr) + } + key, err := srv.keyStore.GetKey("", data) + if err != nil { + return nil, fmt.Errorf("could not retrieve key for %s", addr) + } + addrs = append(addrs, encoding.HexEncodeBytes(key.Address.Bytes())) + } + + return &web3.EthAccountsResult{ + Addresses: addrs, + }, nil +} + +func (srv *EthService) EthSign(req *web3.EthSignParams) (*web3.EthSignResult, error) { + return nil, web3.ErrNotFound +} + +// N / A + +func (srv *EthService) EthUninstallFilter(*web3.EthUninstallFilterParams) (*web3.EthUninstallFilterResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthSubmitHashrate(req *web3.EthSubmitHashrateParams) (*web3.EthSubmitHashrateResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthSubmitWork(*web3.EthSubmitWorkParams) (*web3.EthSubmitWorkResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthNewBlockFilter() (*web3.EthNewBlockFilterResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthNewFilter(req *web3.EthNewFilterParams) (*web3.EthNewFilterResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthNewPendingTransactionFilter() (*web3.EthNewPendingTransactionFilterResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthGetUncleByBlockHashAndIndex(req *web3.EthGetUncleByBlockHashAndIndexParams) (*web3.EthGetUncleByBlockHashAndIndexResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthGetUncleByBlockNumberAndIndex(req *web3.EthGetUncleByBlockNumberAndIndexParams) (*web3.EthGetUncleByBlockNumberAndIndexResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthGetUncleCountByBlockHash(req *web3.EthGetUncleCountByBlockHashParams) (*web3.EthGetUncleCountByBlockHashResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthGetUncleCountByBlockNumber(req *web3.EthGetUncleCountByBlockNumberParams) (*web3.EthGetUncleCountByBlockNumberResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthGetProof(req *web3.EthGetProofParams) (*web3.EthGetProofResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthGetWork() (*web3.EthGetWorkResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthGetFilterChanges(req *web3.EthGetFilterChangesParams) (*web3.EthGetFilterChangesResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthGetFilterLogs(req *web3.EthGetFilterLogsParams) (*web3.EthGetFilterLogsResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthCoinbase() (*web3.EthCoinbaseResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthGetLogs(req *web3.EthGetLogsParams) (*web3.EthGetLogsResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthEstimateGas(req *web3.EthEstimateGasParams) (*web3.EthEstimateGasResult, error) { + return nil, web3.ErrNotFound +} + +func (srv *EthService) EthGasPrice() (*web3.EthGasPriceResult, error) { + return nil, web3.ErrNotFound +} diff --git a/rpc/eth_test.go b/rpc/eth_test.go new file mode 100644 index 000000000..5ec8664ee --- /dev/null +++ b/rpc/eth_test.go @@ -0,0 +1,186 @@ +package rpc_test + +import ( + "context" + "io/ioutil" + "os" + "strings" + "testing" + + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/execution/evm/abi" + "github.com/hyperledger/burrow/integration" + "github.com/hyperledger/burrow/keys" + "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/project" + "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/rpc/web3" + "github.com/stretchr/testify/require" +) + +func TestWeb3RPCService(t *testing.T) { + ctx := context.Background() + + genesisAccounts := integration.MakePrivateAccounts("accounts", 2) + genesisDoc := integration.TestGenesisDoc(genesisAccounts, 0) + + config, _ := integration.NewTestConfig(genesisDoc) + logger := logging.NewNoopLogger() + kern, err := integration.TestKernel(genesisAccounts[0], genesisAccounts, config, nil) + require.NoError(t, err) + err = kern.Boot() + defer kern.Shutdown(ctx) + + dir, err := ioutil.TempDir(os.TempDir(), "") + require.NoError(t, err) + defer os.RemoveAll(dir) + + store := keys.NewKeyStore(dir, true) + for _, acc := range genesisAccounts { + err = store.StoreKeyPlain(&keys.Key{ + CurveType: acc.PrivateKey().CurveType, + Address: acc.GetAddress(), + PublicKey: acc.GetPublicKey(), + PrivateKey: acc.PrivateKey(), + }) + require.NoError(t, err) + } + + nodeView, err := kern.GetNodeView() + require.NoError(t, err) + + accountState := kern.State + eventsState := kern.State + validatorState := kern.State + eth := rpc.NewEthService(accountState, eventsState, kern.Blockchain, validatorState, nodeView, kern.Transactor, store, kern.Logger) + + t.Run("Web3Sha3", func(t *testing.T) { + result, err := eth.Web3Sha3(&web3.Web3Sha3Params{"0x68656c6c6f20776f726c64"}) // hello world + require.NoError(t, err) + // hex encoded + require.Equal(t, "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad", result.HashedData) + }) + + t.Run("NetListening", func(t *testing.T) { + result, err := eth.NetListening() + require.NoError(t, err) + require.Equal(t, true, result.IsNetListening) + }) + + t.Run("NetPeerCount", func(t *testing.T) { + result, err := eth.NetPeerCount() + require.NoError(t, err) + require.Equal(t, "0x0", result.NumConnectedPeers) + }) + + t.Run("Version+ID", func(t *testing.T) { + t.Run("Web3ClientVersion", func(t *testing.T) { + result, err := eth.Web3ClientVersion() + require.NoError(t, err) + require.Equal(t, project.FullVersion(), result.ClientVersion) + }) + + t.Run("NetVersion", func(t *testing.T) { + result, err := eth.NetVersion() + require.NoError(t, err) + doc := config.GenesisDoc + require.Equal(t, encoding.HexEncodeBytes(doc.ShortHash()), result.ChainID) + }) + + t.Run("EthProtocolVersion", func(t *testing.T) { + result, err := eth.EthProtocolVersion() + require.NoError(t, err) + require.NotEmpty(t, result.ProtocolVersion) + }) + + t.Run("EthChainId", func(t *testing.T) { + result, err := eth.EthChainId() + require.NoError(t, err) + require.Equal(t, "Integration_Test_Chain-281EDE", result.ChainId) + }) + }) + + t.Run("EthCreateContract", func(t *testing.T) { + account := genesisAccounts[1] + var txHash, contractAddress string + + // create contract on chain + t.Run("EthSendTransaction", func(t *testing.T) { + result, err := eth.EthSendTransaction(&web3.EthSendTransactionParams{ + Transaction: web3.Transaction{ + From: encoding.HexEncodeBytes(account.GetAddress().Bytes()), + Gas: encoding.HexEncodeNumber(40), + Data: encoding.HexEncodeBytes(rpc.Bytecode_HelloWorld), + }, + }) + require.NoError(t, err) + txHash = result.TransactionHash + require.NotEmpty(t, txHash) + }) + + // t.Run("EthSendRawTransaction", func(t *testing.T) { + // raw := `0xf866068609184e72a0008303000094fa3caabc8eefec2b5e2895e5afbf79379e7268a7808025a06d35f407f418737eec80cba738c4301e683cfcecf19bac9a1aeb2316cac19d3ba002935ee46e3b6bd69168b0b07670699d71df5b32d5f66dbca5758bce2431c9e8` + + // _, err := eth.EthSendRawTransaction(&web3.EthSendRawTransactionParams{ + // SignedTransactionData: raw, + // }) + // require.NoError(t, err) + // }) + + t.Run("EthGetTransactionReceipt", func(t *testing.T) { + require.NotEmpty(t, txHash, "need tx hash to get tx receipt") + result, err := eth.EthGetTransactionReceipt(&web3.EthGetTransactionReceiptParams{ + TransactionHash: txHash, + }) + require.NoError(t, err) + contractAddress = result.Receipt.ContractAddress + require.NotEmpty(t, contractAddress) + }) + + t.Run("EthCall", func(t *testing.T) { + require.NotEmpty(t, contractAddress, "need contract address to call") + + packed, _, err := abi.EncodeFunctionCall(string(rpc.Abi_HelloWorld), "Hello", logger) + require.NoError(t, err) + + result, err := eth.EthCall(&web3.EthCallParams{ + Transaction: web3.Transaction{ + From: encoding.HexEncodeBytes(account.GetAddress().Bytes()), + To: contractAddress, + Data: encoding.HexAddPrefix(string(packed)), + }, + }) + + value, err := encoding.HexDecodeToBytes(result.ReturnValue) + require.NoError(t, err) + vars, err := abi.DecodeFunctionReturn(string(rpc.Abi_HelloWorld), "Hello", value) + require.NoError(t, err) + require.Len(t, vars, 1) + require.Equal(t, "Hello, World", vars[0].Value) + }) + + t.Run("EthGetCode", func(t *testing.T) { + require.NotEmpty(t, contractAddress, "need contract address get code") + result, err := eth.EthGetCode(&web3.EthGetCodeParams{ + Address: contractAddress, + }) + require.NoError(t, err) + require.Equal(t, encoding.HexEncodeBytes(rpc.DeployedBytecode_HelloWorld), strings.ToLower(result.Bytes)) + }) + }) + + t.Run("EthMining", func(t *testing.T) { + result, err := eth.EthMining() + require.NoError(t, err) + require.Equal(t, true, result.Mining) + }) + + t.Run("EthAccounts", func(t *testing.T) { + result, err := eth.EthAccounts() + require.NoError(t, err) + require.Len(t, result.Addresses, len(genesisAccounts)) + for _, acc := range genesisAccounts { + require.Contains(t, result.Addresses, encoding.HexEncodeBytes(acc.GetAddress().Bytes())) + } + }) +} diff --git a/rpc/test.sol b/rpc/test.sol new file mode 100644 index 000000000..e9a541bf7 --- /dev/null +++ b/rpc/test.sol @@ -0,0 +1,9 @@ +pragma solidity >=0.4.20; + +contract HelloWorld { + + function Hello() public pure returns (string memory) { + return "Hello, World"; + } + +} diff --git a/rpc/test.sol.go b/rpc/test.sol.go new file mode 100644 index 000000000..787ef5522 --- /dev/null +++ b/rpc/test.sol.go @@ -0,0 +1,7 @@ +package rpc + +import hex "github.com/tmthrgd/go-hex" + +var Bytecode_HelloWorld = hex.MustDecodeString("608060405234801561001057600080fd5b5061011d806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063bcdfe0d514602d575b600080fd5b603360ab565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101560715780820151818401526020810190506058565b50505050905090810190601f168015609d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606040518060400160405280600c81526020017f48656c6c6f2c20576f726c64000000000000000000000000000000000000000081525090509056fea265627a7a723158200b2a5b7a53ba54371daa99f4d02346044f39e951d89df28ce64b4d36dd3fda0664736f6c634300050b0032") +var DeployedBytecode_HelloWorld = hex.MustDecodeString("6080604052348015600f57600080fd5b506004361060285760003560e01c8063bcdfe0d514602d575b600080fd5b603360ab565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101560715780820151818401526020810190506058565b50505050905090810190601f168015609d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606040518060400160405280600c81526020017f48656c6c6f2c20576f726c64000000000000000000000000000000000000000081525090509056fea265627a7a723158200b2a5b7a53ba54371daa99f4d02346044f39e951d89df28ce64b4d36dd3fda0664736f6c634300050b0032") +var Abi_HelloWorld = []byte(`[{"constant":true,"inputs":[],"name":"Hello","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"}]`) diff --git a/rpc/web3/server.go b/rpc/web3/server.go new file mode 100644 index 000000000..74ccfcdbb --- /dev/null +++ b/rpc/web3/server.go @@ -0,0 +1,491 @@ +// Code generated by go-openrpc. DO NOT EDIT. +package web3 + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "reflect" +) + +const JSONRPC = "2.0" + +type Code uint32 + +const ( + ErrUnknown Code = iota + ErrCouldNotParse + ErrInvalidRequest + ErrNotFound + ErrInvalidParams + ErrInternal + ErrServer +) + +func (c Code) Error() string { + return fmt.Sprintf("Error %d: %s", c, c.String()) +} + +func (c Code) String() string { + switch c { + case ErrCouldNotParse: + return "could not parse input" + case ErrInvalidRequest: + return "invalid request" + case ErrNotFound: + return "not found" + case ErrInvalidParams: + return "invalid parameters" + case ErrInternal: + return "internal error" + case ErrServer: + return "server error" + default: + return "unknown error" + } +} + +func (c Code) RPCError() *RPCError { + switch c { + case ErrCouldNotParse: + return NewRPCError(-32700, c.String()) + case ErrInvalidRequest: + return NewRPCError(-32600, c.String()) + case ErrNotFound: + return NewRPCError(-32601, c.String()) + case ErrInvalidParams: + return NewRPCError(-32602, c.String()) + case ErrInternal: + return NewRPCError(-32603, c.String()) + case ErrServer: + return NewRPCError(-32000, c.String()) + default: + return NewRPCError(-32099, c.String()) + } +} + +func (c Code) RPCErrorWithMessage(msg string) *RPCError { + resp := c.RPCError() + resp.Message = msg + return resp +} + +// https://www.jsonrpc.org/specification#request_object +type RPCRequest struct { + JSONRPC string `json:"jsonrpc"` + Method string `json:"method"` + Params json.RawMessage `json:"params"` + ID int `json:"id"` +} + +// https://www.jsonrpc.org/specification#response_object +type RPCResultResponse struct { + JSONRPC string `json:"jsonrpc"` + Result interface{} `json:"result"` + ID int `json:"id"` +} + +// https://www.jsonrpc.org/specification#response_object +type RPCErrorResponse struct { + JSONRPC string `json:"jsonrpc"` + Error *RPCError `json:"error"` + ID int `json:"id"` +} + +// https://www.jsonrpc.org/specification#error_object +type RPCError struct { + Code int `json:"code"` + Message string `json:"message"` + Data interface{} `json:"data,omitempty"` +} + +func NewRPCError(code int, msg string) *RPCError { + return &RPCError{Code: code, Message: msg} +} + +type Server struct { + service Service +} + +func NewServer(rpc Service) *Server { + return &Server{rpc} +} + +func (srv *Server) HandleHTTP(rpcPath string) { + http.Handle(rpcPath, srv) +} + +// https://github.com/a8m/reflect-examples#wrap-a-reflectvalue-with-pointer-t--t +func ptr(v reflect.Value) reflect.Value { + pt := reflect.PtrTo(v.Type()) + pv := reflect.New(pt.Elem()) + pv.Elem().Set(v) + return pv +} + +func ParamsToStruct(msg json.RawMessage, req interface{}) error { + // by-name + err := json.Unmarshal(msg, req) + if err == nil { + return nil + } + + // by-position + params := make([]json.RawMessage, 0) + err = json.Unmarshal(msg, ¶ms) + if err != nil { + return err + } + val := reflect.ValueOf(req) + if val.Kind() == reflect.Ptr { + val = val.Elem() + } + + for i, p := range params { + if i >= val.NumField() { + break + } + field := val.Field(i) + if field.CanSet() { + pf := ptr(field) + err = json.Unmarshal(p, pf.Interface()) + if err != nil { + return err + } + field.Set(pf.Elem()) + } + } + return nil +} + +func StructToResult(in interface{}) interface{} { + val := reflect.ValueOf(in) + if val.Kind() == reflect.Ptr { + val = val.Elem() + } + if val.Kind() != reflect.Struct { + return in + } + if val.NumField() == 1 { + return val.Field(0).Interface() + } else if val.NumField() > 1 { + result := make([]interface{}, 0) + for i := 0; i < val.NumField(); i++ { + field := val.Field(i) + if val.Kind() == reflect.Ptr { + field = field.Elem() + } + + if field.Kind() == reflect.Slice { + for i := 0; i < field.Len(); i++ { + result = append(result, field.Index(i).Interface()) + } + } else if field.CanInterface() { + result = append(result, field.Interface()) + } + } + return result + } else { + return nil + } +} + +func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + WriteError(w, 0, ErrInternal.RPCError()) + return + } + + data, err := ioutil.ReadAll(r.Body) + if err != nil { + WriteError(w, 0, ErrInvalidRequest.RPCError()) + return + } + r.Body.Close() + + in := new(RPCRequest) + err = json.Unmarshal(data, in) + if err != nil { + WriteError(w, 0, ErrCouldNotParse.RPCError()) + return + } + + if in.JSONRPC != JSONRPC || in.Method == "" || in.ID == 0 { + WriteError(w, 0, ErrInvalidParams.RPCError()) + return + } + + var out interface{} + + switch in.Method { + case "web3_clientVersion": + out, err = srv.service.Web3ClientVersion() + case "web3_sha3": + req := new(Web3Sha3Params) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.Web3Sha3(req) + } + case "net_listening": + out, err = srv.service.NetListening() + case "net_peerCount": + out, err = srv.service.NetPeerCount() + case "net_version": + out, err = srv.service.NetVersion() + case "eth_blockNumber": + out, err = srv.service.EthBlockNumber() + case "eth_call": + req := new(EthCallParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthCall(req) + } + case "eth_chainId": + out, err = srv.service.EthChainId() + case "eth_coinbase": + out, err = srv.service.EthCoinbase() + case "eth_estimateGas": + req := new(EthEstimateGasParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthEstimateGas(req) + } + case "eth_gasPrice": + out, err = srv.service.EthGasPrice() + case "eth_getBalance": + req := new(EthGetBalanceParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetBalance(req) + } + case "eth_getBlockByHash": + req := new(EthGetBlockByHashParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetBlockByHash(req) + } + case "eth_getBlockByNumber": + req := new(EthGetBlockByNumberParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetBlockByNumber(req) + } + case "eth_getBlockTransactionCountByHash": + req := new(EthGetBlockTransactionCountByHashParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetBlockTransactionCountByHash(req) + } + case "eth_getBlockTransactionCountByNumber": + req := new(EthGetBlockTransactionCountByNumberParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetBlockTransactionCountByNumber(req) + } + case "eth_getCode": + req := new(EthGetCodeParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetCode(req) + } + case "eth_getFilterChanges": + req := new(EthGetFilterChangesParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetFilterChanges(req) + } + case "eth_getFilterLogs": + req := new(EthGetFilterLogsParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetFilterLogs(req) + } + case "eth_getRawTransactionByHash": + req := new(EthGetRawTransactionByHashParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetRawTransactionByHash(req) + } + case "eth_getRawTransactionByBlockHashAndIndex": + req := new(EthGetRawTransactionByBlockHashAndIndexParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetRawTransactionByBlockHashAndIndex(req) + } + case "eth_getRawTransactionByBlockNumberAndIndex": + req := new(EthGetRawTransactionByBlockNumberAndIndexParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetRawTransactionByBlockNumberAndIndex(req) + } + case "eth_getLogs": + req := new(EthGetLogsParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetLogs(req) + } + case "eth_getStorageAt": + req := new(EthGetStorageAtParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetStorageAt(req) + } + case "eth_getTransactionByBlockHashAndIndex": + req := new(EthGetTransactionByBlockHashAndIndexParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetTransactionByBlockHashAndIndex(req) + } + case "eth_getTransactionByBlockNumberAndIndex": + req := new(EthGetTransactionByBlockNumberAndIndexParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetTransactionByBlockNumberAndIndex(req) + } + case "eth_getTransactionByHash": + req := new(EthGetTransactionByHashParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetTransactionByHash(req) + } + case "eth_getTransactionCount": + req := new(EthGetTransactionCountParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetTransactionCount(req) + } + case "eth_getTransactionReceipt": + req := new(EthGetTransactionReceiptParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetTransactionReceipt(req) + } + case "eth_getUncleByBlockHashAndIndex": + req := new(EthGetUncleByBlockHashAndIndexParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetUncleByBlockHashAndIndex(req) + } + case "eth_getUncleByBlockNumberAndIndex": + req := new(EthGetUncleByBlockNumberAndIndexParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetUncleByBlockNumberAndIndex(req) + } + case "eth_getUncleCountByBlockHash": + req := new(EthGetUncleCountByBlockHashParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetUncleCountByBlockHash(req) + } + case "eth_getUncleCountByBlockNumber": + req := new(EthGetUncleCountByBlockNumberParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetUncleCountByBlockNumber(req) + } + case "eth_getProof": + req := new(EthGetProofParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthGetProof(req) + } + case "eth_getWork": + out, err = srv.service.EthGetWork() + case "eth_hashrate": + out, err = srv.service.EthHashrate() + case "eth_mining": + out, err = srv.service.EthMining() + case "eth_newBlockFilter": + out, err = srv.service.EthNewBlockFilter() + case "eth_newFilter": + req := new(EthNewFilterParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthNewFilter(req) + } + case "eth_newPendingTransactionFilter": + out, err = srv.service.EthNewPendingTransactionFilter() + case "eth_pendingTransactions": + out, err = srv.service.EthPendingTransactions() + case "eth_protocolVersion": + out, err = srv.service.EthProtocolVersion() + case "eth_sign": + req := new(EthSignParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthSign(req) + } + case "eth_accounts": + out, err = srv.service.EthAccounts() + case "eth_sendTransaction": + req := new(EthSendTransactionParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthSendTransaction(req) + } + case "eth_sendRawTransaction": + req := new(EthSendRawTransactionParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthSendRawTransaction(req) + } + case "eth_submitHashrate": + req := new(EthSubmitHashrateParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthSubmitHashrate(req) + } + case "eth_submitWork": + req := new(EthSubmitWorkParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthSubmitWork(req) + } + case "eth_syncing": + out, err = srv.service.EthSyncing() + case "eth_uninstallFilter": + req := new(EthUninstallFilterParams) + err = ParamsToStruct(in.Params, req) + if err == nil { + out, err = srv.service.EthUninstallFilter(req) + } + } + + if err != nil { + WriteError(w, in.ID, ErrInternal.RPCErrorWithMessage(err.Error())) + return + } + + WriteData(w, in.ID, out) +} + +func WriteError(w http.ResponseWriter, id int, resp *RPCError) { + data, err := json.Marshal(&RPCErrorResponse{ + JSONRPC: JSONRPC, + Error: resp, + ID: id, + }) + if err != nil { + panic(err) + } + w.Header().Set("Content-Type", "application/json") + w.Write(data) +} + +func WriteData(w http.ResponseWriter, id int, result interface{}) { + resp := &RPCResultResponse{ + JSONRPC: JSONRPC, + ID: id, + Result: StructToResult(result), + } + data, err := json.Marshal(resp) + if err != nil { + WriteError(w, id, ErrInternal.RPCError()) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(data) +} diff --git a/rpc/web3/types.go b/rpc/web3/types.go new file mode 100644 index 000000000..eb4226ebf --- /dev/null +++ b/rpc/web3/types.go @@ -0,0 +1,1273 @@ +// Code generated by go-openrpc. DO NOT EDIT. +package web3 + +type Service interface { + // Returns the version of the current client + Web3ClientVersion() (*Web3ClientVersionResult, error) + // Hashes data using the Keccak-256 algorithm + Web3Sha3(*Web3Sha3Params) (*Web3Sha3Result, error) + // Determines if this client is listening for new network connections. + NetListening() (*NetListeningResult, error) + // Returns the number of peers currently connected to this client. + NetPeerCount() (*NetPeerCountResult, error) + // Returns the chain ID associated with the current network. + NetVersion() (*NetVersionResult, error) + // Returns the number of most recent block. + EthBlockNumber() (*EthBlockNumberResult, error) + // Executes a new message call (locally) immediately without creating a transaction on the block chain. + EthCall(*EthCallParams) (*EthCallResult, error) + // Returns the currently configured chain id, a value used in replay-protected transaction signing as introduced by [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md). + EthChainId() (*EthChainIdResult, error) + // Returns the client coinbase address. + EthCoinbase() (*EthCoinbaseResult, error) + // Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance. + EthEstimateGas(*EthEstimateGasParams) (*EthEstimateGasResult, error) + // Returns the current price per gas in wei + EthGasPrice() (*EthGasPriceResult, error) + // Returns Ether balance of a given or account or contract + EthGetBalance(*EthGetBalanceParams) (*EthGetBalanceResult, error) + // Gets a block for a given hash + EthGetBlockByHash(*EthGetBlockByHashParams) (*EthGetBlockByHashResult, error) + // Gets a block for a given number salad + EthGetBlockByNumber(*EthGetBlockByNumberParams) (*EthGetBlockByNumberResult, error) + // Returns the number of transactions in a block from a block matching the given block hash. + EthGetBlockTransactionCountByHash(*EthGetBlockTransactionCountByHashParams) (*EthGetBlockTransactionCountByHashResult, error) + // Returns the number of transactions in a block from a block matching the given block number. + EthGetBlockTransactionCountByNumber(*EthGetBlockTransactionCountByNumberParams) (*EthGetBlockTransactionCountByNumberResult, error) + // Returns code at a given contract address + EthGetCode(*EthGetCodeParams) (*EthGetCodeResult, error) + // Polling method for a filter, which returns an array of logs which occurred since last poll. + EthGetFilterChanges(*EthGetFilterChangesParams) (*EthGetFilterChangesResult, error) + // Returns an array of all logs matching filter with given id. + EthGetFilterLogs(*EthGetFilterLogsParams) (*EthGetFilterLogsResult, error) + // Returns raw transaction data of a transaction with the given hash. + EthGetRawTransactionByHash(*EthGetRawTransactionByHashParams) (*EthGetRawTransactionByHashResult, error) + // Returns raw transaction data of a transaction with the given hash. + EthGetRawTransactionByBlockHashAndIndex(*EthGetRawTransactionByBlockHashAndIndexParams) (*EthGetRawTransactionByBlockHashAndIndexResult, error) + // Returns raw transaction data of a transaction with the given hash. + EthGetRawTransactionByBlockNumberAndIndex(*EthGetRawTransactionByBlockNumberAndIndexParams) (*EthGetRawTransactionByBlockNumberAndIndexResult, error) + // Returns an array of all logs matching a given filter object. + EthGetLogs(*EthGetLogsParams) (*EthGetLogsResult, error) + // Gets a storage value from a contract address, a position, and an optional blockNumber + EthGetStorageAt(*EthGetStorageAtParams) (*EthGetStorageAtResult, error) + // Returns the information about a transaction requested by the block hash and index of which it was mined. + EthGetTransactionByBlockHashAndIndex(*EthGetTransactionByBlockHashAndIndexParams) (*EthGetTransactionByBlockHashAndIndexResult, error) + // Returns the information about a transaction requested by the block hash and index of which it was mined. + EthGetTransactionByBlockNumberAndIndex(*EthGetTransactionByBlockNumberAndIndexParams) (*EthGetTransactionByBlockNumberAndIndexResult, error) + // Returns the information about a transaction requested by transaction hash. + EthGetTransactionByHash(*EthGetTransactionByHashParams) (*EthGetTransactionByHashResult, error) + // Returns the number of transactions sent from an address + EthGetTransactionCount(*EthGetTransactionCountParams) (*EthGetTransactionCountResult, error) + // Returns the receipt information of a transaction by its hash. + EthGetTransactionReceipt(*EthGetTransactionReceiptParams) (*EthGetTransactionReceiptResult, error) + // Returns information about a uncle of a block by hash and uncle index position. + EthGetUncleByBlockHashAndIndex(*EthGetUncleByBlockHashAndIndexParams) (*EthGetUncleByBlockHashAndIndexResult, error) + // Returns information about a uncle of a block by hash and uncle index position. + EthGetUncleByBlockNumberAndIndex(*EthGetUncleByBlockNumberAndIndexParams) (*EthGetUncleByBlockNumberAndIndexResult, error) + // Returns the number of uncles in a block from a block matching the given block hash. + EthGetUncleCountByBlockHash(*EthGetUncleCountByBlockHashParams) (*EthGetUncleCountByBlockHashResult, error) + // Returns the number of uncles in a block from a block matching the given block number. + EthGetUncleCountByBlockNumber(*EthGetUncleCountByBlockNumberParams) (*EthGetUncleCountByBlockNumberResult, error) + // Returns the account- and storage-values of the specified account including the Merkle-proof. + EthGetProof(*EthGetProofParams) (*EthGetProofResult, error) + // Returns the hash of the current block, the seedHash, and the boundary condition to be met ('target'). + EthGetWork() (*EthGetWorkResult, error) + // Returns the number of hashes per second that the node is mining with. + EthHashrate() (*EthHashrateResult, error) + // Returns true if client is actively mining new blocks. + EthMining() (*EthMiningResult, error) + // Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call eth_getFilterChanges. + EthNewBlockFilter() (*EthNewBlockFilterResult, error) + // Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call eth_getFilterChanges. + EthNewFilter(*EthNewFilterParams) (*EthNewFilterResult, error) + // Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call eth_getFilterChanges. + EthNewPendingTransactionFilter() (*EthNewPendingTransactionFilterResult, error) + // Returns the pending transactions list + EthPendingTransactions() (*EthPendingTransactionsResult, error) + // Returns the current ethereum protocol version. + EthProtocolVersion() (*EthProtocolVersionResult, error) + // The sign method calculates an Ethereum specific signature. + EthSign(*EthSignParams) (*EthSignResult, error) + // Returns a list of addresses owned by client. + EthAccounts() (*EthAccountsResult, error) + // Creates new message call transaction or a contract creation, if the data field contains code. + EthSendTransaction(*EthSendTransactionParams) (*EthSendTransactionResult, error) + // Creates new message call transaction or a contract creation for signed transactions. + EthSendRawTransaction(*EthSendRawTransactionParams) (*EthSendRawTransactionResult, error) + // Returns an array of all logs matching a given filter object. + EthSubmitHashrate(*EthSubmitHashrateParams) (*EthSubmitHashrateResult, error) + // Used for submitting a proof-of-work solution. + EthSubmitWork(*EthSubmitWorkParams) (*EthSubmitWorkResult, error) + // Returns an object with data about the sync status or false. + EthSyncing() (*EthSyncingResult, error) + // Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additionally Filters timeout when they aren't requested with eth_getFilterChanges for a period of time. + EthUninstallFilter(*EthUninstallFilterParams) (*EthUninstallFilterResult, error) +} + +type Web3ClientVersionResult struct { + // client version + ClientVersion string `json:"clientVersion"` +} +type Web3Sha3Params struct { + // data to hash using the Keccak-256 algorithm + Data string `json:"data"` +} +type Web3Sha3Result struct { + // Hex representation of a Keccak 256 hash + HashedData string `json:"hashedData"` +} +type NetListeningResult struct { + // `true` if listening is active or `false` if listening is not active + IsNetListening bool `json:"isNetListening"` +} +type NetPeerCountResult struct { + // Hex representation of number of connected peers + NumConnectedPeers string `json:"numConnectedPeers"` +} +type NetVersionResult struct { + // chain ID associated with the current network + ChainID string `json:"chainID"` +} +type BlockNumber struct { + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` + + // Hex representation of the integer + Integer string `json:"integer"` +} +type EthBlockNumberResult struct { + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` +} +type EthCallParams struct { + Transaction Transaction `json:"transaction"` + + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` +} +type Transaction struct { + // Hex representation of the integer + BlockNumber string `json:"blockNumber"` + + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` + + // ECDSA signature s + S string `json:"s"` + + // Hex representation of a Keccak 256 hash + BlockHash string `json:"blockHash"` + + // Address of the sender + From string `json:"from"` + + // The gas limit provided by the sender in Wei + Gas string `json:"gas"` + + // The gas price willing to be paid by the sender in Wei + GasPrice string `json:"gasPrice"` + + // Hex representation of a Keccak 256 hash + Value string `json:"value"` + + // The data field sent with the transaction + Data string `json:"data"` + + // ECDSA recovery id + V string `json:"v"` + + // A number only to be used once + Nonce string `json:"nonce"` + + // address of the receiver. null when its a contract creation transaction + To string `json:"to"` + + // Hex representation of the integer + TransactionIndex string `json:"transactionIndex"` + + // ECDSA signature r + R string `json:"r"` +} +type BlockHash struct { + // Hex representation of a Keccak 256 hash + Keccak string `json:"keccak"` +} +type TransactionIndex struct { + // Hex representation of the integer + Integer string `json:"integer"` +} +type EthCallResult struct { + // Hex representation of a variable length byte array + ReturnValue string `json:"returnValue"` +} +type EthChainIdResult struct { + // hex format integer of the current chain id. Defaults are mainnet=61, morden=62. + ChainId string `json:"chainId"` +} +type EthCoinbaseResult struct { + // The address owned by the client that is used as default for things like the mining reward + Address string `json:"address"` +} +type EthEstimateGasParams struct { + Transaction Transaction `json:"transaction"` +} +type EthEstimateGasResult struct { + // Hex representation of the integer + GasUsed string `json:"gasUsed"` +} +type EthGasPriceResult struct { + // Hex representation of the integer + GasPrice string `json:"gasPrice"` +} +type EthGetBalanceParams struct { + // The address of the account or contract + Address string `json:"address"` + + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` +} +type GetBalanceResult struct { + // Hex representation of the integer + Integer string `json:"integer"` +} +type EthGetBalanceResult struct { + // Hex representation of the integer + GetBalanceResult string `json:"getBalanceResult"` +} +type EthGetBlockByHashParams struct { + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` + + // If `true` it returns the full transaction objects, if `false` only the hashes of the transactions. + IsTransactionsIncluded bool `json:"isTransactionsIncluded"` +} +type GetBlockByHashResult struct { + Block Block `json:"block"` + + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` + + // Hex representation of the integer + Nonce string `json:"nonce"` + + // Hex representation of a Keccak 256 hash + Sha3Uncles string `json:"sha3Uncles"` + + // Hex representation of the integer + TotalDifficulty string `json:"totalDifficulty"` + + // The 'extra data' field of this block + ExtraData string `json:"extraData"` + + // Integer the size of this block in bytes + Size string `json:"size"` + + // Hex representation of the integer + Number string `json:"number"` + + // The bloom filter for the logs of the block or null when its the pending block + LogsBloom string `json:"logsBloom"` + + // Hex representation of a Keccak 256 hash + StateRoot string `json:"stateRoot"` + + // Hex representation of a Keccak 256 hash + ReceiptsRoot string `json:"receiptsRoot"` + + // The address of the beneficiary to whom the mining rewards were given or null when its the pending block + Miner string `json:"miner"` + + // Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter + Transactions []Transactions `json:"transactions"` + + // Array of uncle hashes + Uncles []string `json:"uncles"` + + // Integer of the difficulty for this block + Difficulty string `json:"difficulty"` + + // The maximum gas allowed in this block + GasLimit string `json:"gasLimit"` + + // The unix timestamp for when the block was collated + Timestamp string `json:"timestamp"` + + // Hex representation of a Keccak 256 hash + ParentHash string `json:"parentHash"` + + // Hex representation of a Keccak 256 hash + TransactionsRoot string `json:"transactionsRoot"` + + // The total used gas by all transactions in this block + GasUsed string `json:"gasUsed"` +} +type Hash struct { + // Hex representation of a Keccak 256 hash + Keccak string `json:"keccak"` +} +type Block struct { + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` + + // Hex representation of the integer + Nonce string `json:"nonce"` + + // Hex representation of a Keccak 256 hash + Sha3Uncles string `json:"sha3Uncles"` + + // Integer the size of this block in bytes + Size string `json:"size"` + + // Hex representation of the integer + Number string `json:"number"` + + // The bloom filter for the logs of the block or null when its the pending block + LogsBloom string `json:"logsBloom"` + + // Hex representation of a Keccak 256 hash + StateRoot string `json:"stateRoot"` + + // Hex representation of a Keccak 256 hash + ReceiptsRoot string `json:"receiptsRoot"` + + // The address of the beneficiary to whom the mining rewards were given or null when its the pending block + Miner string `json:"miner"` + + // Hex representation of the integer + TotalDifficulty string `json:"totalDifficulty"` + + // The 'extra data' field of this block + ExtraData string `json:"extraData"` + + // Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter + Transactions []Transactions `json:"transactions"` + + // Array of uncle hashes + Uncles []string `json:"uncles"` + + // Integer of the difficulty for this block + Difficulty string `json:"difficulty"` + + // The maximum gas allowed in this block + GasLimit string `json:"gasLimit"` + + // The unix timestamp for when the block was collated + Timestamp string `json:"timestamp"` + + // Hex representation of a Keccak 256 hash + ParentHash string `json:"parentHash"` + + // Hex representation of a Keccak 256 hash + TransactionsRoot string `json:"transactionsRoot"` + + // The total used gas by all transactions in this block + GasUsed string `json:"gasUsed"` +} +type Nonce struct { + // Hex representation of the integer + Integer string `json:"integer"` +} +type Number struct { + // Hex representation of the integer + Integer string `json:"integer"` +} +type Miner struct { + Address string `json:"address"` +} +type TotalDifficulty struct { + // Hex representation of the integer + Integer string `json:"integer"` +} +type Transactions struct { + Transaction Transaction `json:"transaction"` + + // The gas limit provided by the sender in Wei + Gas string `json:"gas"` + + // The gas price willing to be paid by the sender in Wei + GasPrice string `json:"gasPrice"` + + // Hex representation of a Keccak 256 hash + Value string `json:"value"` + + // Hex representation of a Keccak 256 hash + BlockHash string `json:"blockHash"` + + // Address of the sender + From string `json:"from"` + + // The data field sent with the transaction + Data string `json:"data"` + + // ECDSA recovery id + V string `json:"v"` + + // Hex representation of the integer + TransactionIndex string `json:"transactionIndex"` + + // ECDSA signature r + R string `json:"r"` + + // A number only to be used once + Nonce string `json:"nonce"` + + // address of the receiver. null when its a contract creation transaction + To string `json:"to"` + + // ECDSA signature s + S string `json:"s"` + + // Hex representation of the integer + BlockNumber string `json:"blockNumber"` + + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` +} +type Uncles struct { + // Hex representation of a Keccak 256 hash + Keccak string `json:"keccak"` +} +type EthGetBlockByHashResult struct { + GetBlockByHashResult GetBlockByHashResult `json:"getBlockByHashResult"` +} +type EthGetBlockByNumberParams struct { + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` + + // If `true` it returns the full transaction objects, if `false` only the hashes of the transactions. + IsTransactionsIncluded bool `json:"isTransactionsIncluded"` +} +type GetBlockByNumberResult struct { + Block Block `json:"block"` + + // Integer of the difficulty for this block + Difficulty string `json:"difficulty"` + + // The maximum gas allowed in this block + GasLimit string `json:"gasLimit"` + + // The unix timestamp for when the block was collated + Timestamp string `json:"timestamp"` + + // Hex representation of a Keccak 256 hash + ParentHash string `json:"parentHash"` + + // Hex representation of a Keccak 256 hash + TransactionsRoot string `json:"transactionsRoot"` + + // The total used gas by all transactions in this block + GasUsed string `json:"gasUsed"` + + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` + + // Hex representation of the integer + Nonce string `json:"nonce"` + + // Hex representation of a Keccak 256 hash + Sha3Uncles string `json:"sha3Uncles"` + + // Hex representation of the integer + Number string `json:"number"` + + // The bloom filter for the logs of the block or null when its the pending block + LogsBloom string `json:"logsBloom"` + + // Hex representation of a Keccak 256 hash + StateRoot string `json:"stateRoot"` + + // Hex representation of a Keccak 256 hash + ReceiptsRoot string `json:"receiptsRoot"` + + // The address of the beneficiary to whom the mining rewards were given or null when its the pending block + Miner string `json:"miner"` + + // Hex representation of the integer + TotalDifficulty string `json:"totalDifficulty"` + + // The 'extra data' field of this block + ExtraData string `json:"extraData"` + + // Integer the size of this block in bytes + Size string `json:"size"` + + // Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter + Transactions []Transactions `json:"transactions"` + + // Array of uncle hashes + Uncles []string `json:"uncles"` +} +type EthGetBlockByNumberResult struct { + GetBlockByNumberResult GetBlockByNumberResult `json:"getBlockByNumberResult"` +} +type EthGetBlockTransactionCountByHashParams struct { + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` +} +type BlockTransactionCountByHash struct { + // Hex representation of the integer + Integer string `json:"integer"` +} +type EthGetBlockTransactionCountByHashResult struct { + // Hex representation of the integer + BlockTransactionCountByHash string `json:"blockTransactionCountByHash"` +} +type EthGetBlockTransactionCountByNumberParams struct { + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` +} +type EthGetBlockTransactionCountByNumberResult struct { + // Hex representation of the integer + BlockTransactionCountByHash string `json:"blockTransactionCountByHash"` +} +type EthGetCodeParams struct { + // The address of the contract + Address string `json:"address"` + + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` +} +type EthGetCodeResult struct { + // Hex representation of a variable length byte array + Bytes string `json:"bytes"` +} +type EthGetFilterChangesParams struct { + // An identifier used to reference the filter. + FilterId string `json:"filterId"` +} +type LogResult struct { + // An indexed event generated during a transaction + Log Log `json:"log"` + + // Hex representation of the integer + LogIndex string `json:"logIndex"` + + // Hex representation of the integer + TransactionIndex string `json:"transactionIndex"` + + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` + + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` + + // Hex representation of a variable length byte array + Data string `json:"data"` + + Topics []Topics `json:"topics"` + + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` + + // Sender of the transaction + Address string `json:"address"` +} +type Log struct { + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` + + // Hex representation of the integer + LogIndex string `json:"logIndex"` + + // Hex representation of the integer + TransactionIndex string `json:"transactionIndex"` + + // Sender of the transaction + Address string `json:"address"` + + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` + + // Hex representation of a variable length byte array + Data string `json:"data"` + + Topics []Topics `json:"topics"` + + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` +} +type EthGetFilterChangesResult struct { + LogResult []LogResult `json:"logResult"` +} +type EthGetFilterLogsParams struct { + // An identifier used to reference the filter. + FilterId string `json:"filterId"` +} +type Logs struct { + // An indexed event generated during a transaction + Log Log `json:"log"` + + // Sender of the transaction + Address string `json:"address"` + + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` + + // Hex representation of a variable length byte array + Data string `json:"data"` + + Topics []Topics `json:"topics"` + + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` + + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` + + // Hex representation of the integer + LogIndex string `json:"logIndex"` + + // Hex representation of the integer + TransactionIndex string `json:"transactionIndex"` +} +type EthGetFilterLogsResult struct { + Logs []Logs `json:"logs"` +} +type EthGetRawTransactionByHashParams struct { + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` +} +type EthGetRawTransactionByHashResult struct { + // Hex representation of a variable length byte array + RawTransactionByHash string `json:"rawTransactionByHash"` +} +type EthGetRawTransactionByBlockHashAndIndexParams struct { + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` + + // Hex representation of the integer + Index string `json:"index"` +} +type EthGetRawTransactionByBlockHashAndIndexResult struct { + // Hex representation of a variable length byte array + RawTransaction string `json:"rawTransaction"` +} +type EthGetRawTransactionByBlockNumberAndIndexParams struct { + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` + + // Hex representation of the integer + Index string `json:"index"` +} +type EthGetRawTransactionByBlockNumberAndIndexResult struct { + // Hex representation of a variable length byte array + RawTransaction string `json:"rawTransaction"` +} +type EthGetLogsParams struct { + // A filter used to monitor the blockchain for log/events + Filter Filter `json:"filter"` +} +type Filter struct { + // The hex representation of the block's height + FromBlock string `json:"fromBlock"` + + // The hex representation of the block's height + ToBlock string `json:"toBlock"` + + // Address of the contract from which to monitor events + Address string `json:"address"` + + // Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with 'or' options + Topics []string `json:"topics"` +} +type Address struct { + // Address of the contract from which to monitor events + Address string `json:"address"` +} +type Topics struct { + // Hex representation of a 256 bit unit of data + DataWord string `json:"dataWord"` +} +type EthGetLogsResult struct { + Logs []Logs `json:"logs"` +} +type EthGetStorageAtParams struct { + Address string `json:"address"` + + // Hex representation of the storage slot where the variable exists + Position string `json:"position"` + + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` +} +type EthGetStorageAtResult struct { + // Hex representation of a 256 bit unit of data + DataWord string `json:"dataWord"` +} +type EthGetTransactionByBlockHashAndIndexParams struct { + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` + + // Hex representation of the integer + Index string `json:"index"` +} +type TransactionResult struct { + Transaction Transaction `json:"transaction"` + + // A number only to be used once + Nonce string `json:"nonce"` + + // address of the receiver. null when its a contract creation transaction + To string `json:"to"` + + // Hex representation of the integer + TransactionIndex string `json:"transactionIndex"` + + // ECDSA signature r + R string `json:"r"` + + // Hex representation of the integer + BlockNumber string `json:"blockNumber"` + + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` + + // ECDSA signature s + S string `json:"s"` + + // Hex representation of a Keccak 256 hash + BlockHash string `json:"blockHash"` + + // Address of the sender + From string `json:"from"` + + // The gas limit provided by the sender in Wei + Gas string `json:"gas"` + + // The gas price willing to be paid by the sender in Wei + GasPrice string `json:"gasPrice"` + + // Hex representation of a Keccak 256 hash + Value string `json:"value"` + + // The data field sent with the transaction + Data string `json:"data"` + + // ECDSA recovery id + V string `json:"v"` +} +type EthGetTransactionByBlockHashAndIndexResult struct { + TransactionResult TransactionResult `json:"transactionResult"` +} +type EthGetTransactionByBlockNumberAndIndexParams struct { + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` + + // Hex representation of the integer + Index string `json:"index"` +} +type EthGetTransactionByBlockNumberAndIndexResult struct { + TransactionResult TransactionResult `json:"transactionResult"` +} +type EthGetTransactionByHashParams struct { + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` +} +type EthGetTransactionByHashResult struct { + Transaction Transaction `json:"transaction"` +} +type EthGetTransactionCountParams struct { + Address string `json:"address"` + + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` +} +type NonceOrNull struct { + // A number only to be used once + Nonce string `json:"nonce"` +} +type EthGetTransactionCountResult struct { + // A number only to be used once + NonceOrNull string `json:"nonceOrNull"` +} +type EthGetTransactionReceiptParams struct { + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` +} +type Receipt struct { + // The sender of the transaction + From string `json:"from"` + + // An array of all the logs triggered during the transaction + Logs []Logs `json:"logs"` + + // A 2048 bit bloom filter from the logs of the transaction. Each log sets 3 bits though taking the low-order 11 bits of each of the first three pairs of bytes in a Keccak 256 hash of the log's byte series + LogsBloom string `json:"logsBloom"` + + // Whether or not the transaction threw an error. + Status string `json:"status"` + + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` + + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` + + // Hex representation of the integer + GasUsed string `json:"gasUsed"` + + // Destination address of the transaction + To string `json:"to"` + + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` + + // A 2048 bit bloom filter from the logs of the transaction. Each log sets 3 bits though taking the low-order 11 bits of each of the first three pairs of bytes in a Keccak 256 hash of the log's byte series + TransactionIndex string `json:"transactionIndex"` + + // Hex representation of a Keccak 256 hash + PostTransactionState string `json:"postTransactionState"` + + // The contract address created, if the transaction was a contract creation, otherwise null + ContractAddress string `json:"contractAddress"` + + // Hex representation of the integer + CumulativeGasUsed string `json:"cumulativeGasUsed"` +} +type EthGetTransactionReceiptResult struct { + // The receipt of a transaction + Receipt Receipt `json:"receipt"` +} +type EthGetUncleByBlockHashAndIndexParams struct { + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` + + // Hex representation of the integer + Index string `json:"index"` +} +type UncleOrNull struct { + // Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions. + Uncle Uncle `json:"uncle"` + + // The total used gas by all transactions in this block + GasUsed string `json:"gasUsed"` + + // The unix timestamp for when the block was collated + Timestamp string `json:"timestamp"` + + // Hex representation of a Keccak 256 hash + Sha3Uncles string `json:"sha3Uncles"` + + // Hex representation of a Keccak 256 hash + TransactionsRoot string `json:"transactionsRoot"` + + // Hex representation of a Keccak 256 hash + ReceiptsRoot string `json:"receiptsRoot"` + + // Hex representation of a Keccak 256 hash + StateRoot string `json:"stateRoot"` + + // Integer of the difficulty for this block + Difficulty string `json:"difficulty"` + + // The 'extra data' field of this block + ExtraData string `json:"extraData"` + + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` + + // Hex representation of a Keccak 256 hash + ParentHash string `json:"parentHash"` + + // Hex representation of the integer + Nonce string `json:"nonce"` + + // Integer the size of this block in bytes + Size string `json:"size"` + + // The maximum gas allowed in this block + GasLimit string `json:"gasLimit"` + + // The bloom filter for the logs of the block or null when its the pending block + LogsBloom string `json:"logsBloom"` + + // The address of the beneficiary to whom the mining rewards were given or null when its the pending block + Miner string `json:"miner"` + + // Hex representation of the integer + TotalDifficulty string `json:"totalDifficulty"` + + // Hex representation of the integer + Number string `json:"number"` + + // Array of uncle hashes + Uncles []string `json:"uncles"` +} +type Uncle struct { + // Hex representation of the integer + Nonce string `json:"nonce"` + + // Hex representation of a Keccak 256 hash + StateRoot string `json:"stateRoot"` + + // Integer of the difficulty for this block + Difficulty string `json:"difficulty"` + + // The 'extra data' field of this block + ExtraData string `json:"extraData"` + + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` + + // Hex representation of a Keccak 256 hash + ParentHash string `json:"parentHash"` + + // Hex representation of the integer + TotalDifficulty string `json:"totalDifficulty"` + + // Integer the size of this block in bytes + Size string `json:"size"` + + // The maximum gas allowed in this block + GasLimit string `json:"gasLimit"` + + // The bloom filter for the logs of the block or null when its the pending block + LogsBloom string `json:"logsBloom"` + + // The address of the beneficiary to whom the mining rewards were given or null when its the pending block + Miner string `json:"miner"` + + // Hex representation of the integer + Number string `json:"number"` + + // Array of uncle hashes + Uncles []string `json:"uncles"` + + // Hex representation of a Keccak 256 hash + ReceiptsRoot string `json:"receiptsRoot"` + + // The total used gas by all transactions in this block + GasUsed string `json:"gasUsed"` + + // The unix timestamp for when the block was collated + Timestamp string `json:"timestamp"` + + // Hex representation of a Keccak 256 hash + Sha3Uncles string `json:"sha3Uncles"` + + // Hex representation of a Keccak 256 hash + TransactionsRoot string `json:"transactionsRoot"` +} +type EthGetUncleByBlockHashAndIndexResult struct { + // Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions. + UncleOrNull UncleOrNull `json:"uncleOrNull"` +} +type EthGetUncleByBlockNumberAndIndexParams struct { + // The hex representation of the block's height + UncleBlockNumber string `json:"uncleBlockNumber"` + + // Hex representation of the integer + Index string `json:"index"` +} +type UncleResult struct { + // Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions. + Uncle Uncle `json:"uncle"` + + // The bloom filter for the logs of the block or null when its the pending block + LogsBloom string `json:"logsBloom"` + + // The address of the beneficiary to whom the mining rewards were given or null when its the pending block + Miner string `json:"miner"` + + // Hex representation of the integer + TotalDifficulty string `json:"totalDifficulty"` + + // Integer the size of this block in bytes + Size string `json:"size"` + + // The maximum gas allowed in this block + GasLimit string `json:"gasLimit"` + + // Hex representation of the integer + Number string `json:"number"` + + // Array of uncle hashes + Uncles []string `json:"uncles"` + + // Hex representation of a Keccak 256 hash + Sha3Uncles string `json:"sha3Uncles"` + + // Hex representation of a Keccak 256 hash + TransactionsRoot string `json:"transactionsRoot"` + + // Hex representation of a Keccak 256 hash + ReceiptsRoot string `json:"receiptsRoot"` + + // The total used gas by all transactions in this block + GasUsed string `json:"gasUsed"` + + // The unix timestamp for when the block was collated + Timestamp string `json:"timestamp"` + + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` + + // Hex representation of a Keccak 256 hash + ParentHash string `json:"parentHash"` + + // Hex representation of the integer + Nonce string `json:"nonce"` + + // Hex representation of a Keccak 256 hash + StateRoot string `json:"stateRoot"` + + // Integer of the difficulty for this block + Difficulty string `json:"difficulty"` + + // The 'extra data' field of this block + ExtraData string `json:"extraData"` +} +type EthGetUncleByBlockNumberAndIndexResult struct { + // Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions. + UncleResult UncleResult `json:"uncleResult"` +} +type EthGetUncleCountByBlockHashParams struct { + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` +} +type UncleCountOrNull struct { + // Hex representation of the integer + Integer string `json:"integer"` +} +type EthGetUncleCountByBlockHashResult struct { + // Hex representation of the integer + UncleCountOrNull string `json:"uncleCountOrNull"` +} +type EthGetUncleCountByBlockNumberParams struct { + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` +} +type EthGetUncleCountByBlockNumberResult struct { + // Hex representation of the integer + UncleCountOrNull string `json:"uncleCountOrNull"` +} +type EthGetProofParams struct { + // The address of the account or contract + Address string `json:"address"` + + // The storage keys of all the storage slots being requested + StorageKeys []string `json:"storageKeys"` + + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` +} +type StorageKeys struct { + // Hex representation of the integer + Integer string `json:"integer"` +} +type ProofAccountOrNull struct { + // The merkle proofs of the specified account connecting them to the blockhash of the block specified + ProofAccount ProofAccount `json:"proofAccount"` +} +type ProofAccount struct { + // A number only to be used once + Nonce string `json:"nonce"` + + // Hex representation of a Keccak 256 hash + StorageHash string `json:"storageHash"` + + // Current block header PoW hash. + StorageProof []StorageProof `json:"storageProof"` + + // The address of the account or contract of the request + Address string `json:"address"` + + // The set of node values needed to traverse a patricia merkle tree (from root to leaf) to retrieve a value + AccountProof []string `json:"accountProof"` + + // Hex representation of the integer + Balance string `json:"balance"` + + // Hex representation of a Keccak 256 hash + CodeHash string `json:"codeHash"` +} +type Proof struct { + // Hex representation of a variable length byte array + ProofNode string `json:"proofNode"` +} +type StorageProof struct { + // Hex representation of the integer + Key string `json:"key"` + + // Hex representation of the integer + Value string `json:"value"` + + // The set of node values needed to traverse a patricia merkle tree (from root to leaf) to retrieve a value + Proof []string `json:"proof"` +} +type AccountProof struct { + // Hex representation of a variable length byte array + ProofNode string `json:"proofNode"` +} +type EthGetProofResult struct { + // The merkle proofs of the specified account connecting them to the blockhash of the block specified + ProofAccount ProofAccount `json:"proofAccount"` +} +type EthGetWorkResult struct { + Work []string `json:"work"` +} +type EthHashrateResult struct { + // Hex representation of the integer + HashesPerSecond string `json:"hashesPerSecond"` +} +type EthMiningResult struct { + // Whether of not the client is mining + Mining bool `json:"mining"` +} +type EthNewBlockFilterResult struct { + // Hex representation of the integer + FilterId string `json:"filterId"` +} +type EthNewFilterParams struct { + // A filter used to monitor the blockchain for log/events + Filter Filter `json:"filter"` +} +type EthNewFilterResult struct { + // Hex representation of the integer + FilterId string `json:"filterId"` +} +type EthNewPendingTransactionFilterResult struct { + // Hex representation of the integer + FilterId string `json:"filterId"` +} +type PendingTransactions struct { + Transaction Transaction `json:"transaction"` + + // A number only to be used once + Nonce string `json:"nonce"` + + // address of the receiver. null when its a contract creation transaction + To string `json:"to"` + + // Hex representation of the integer + TransactionIndex string `json:"transactionIndex"` + + // ECDSA signature r + R string `json:"r"` + + // Hex representation of the integer + BlockNumber string `json:"blockNumber"` + + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` + + // ECDSA signature s + S string `json:"s"` + + // Hex representation of a Keccak 256 hash + BlockHash string `json:"blockHash"` + + // Address of the sender + From string `json:"from"` + + // The gas limit provided by the sender in Wei + Gas string `json:"gas"` + + // The gas price willing to be paid by the sender in Wei + GasPrice string `json:"gasPrice"` + + // Hex representation of a Keccak 256 hash + Value string `json:"value"` + + // The data field sent with the transaction + Data string `json:"data"` + + // ECDSA recovery id + V string `json:"v"` +} +type EthPendingTransactionsResult struct { + PendingTransactions []PendingTransactions `json:"pendingTransactions"` +} +type EthProtocolVersionResult struct { + // Hex representation of the integer + ProtocolVersion string `json:"protocolVersion"` +} +type EthSignParams struct { + Address string `json:"address"` + + // Hex representation of a variable length byte array + Bytes string `json:"bytes"` +} +type EthSignResult struct { + // Hex representation of a variable length byte array + Signature string `json:"signature"` +} +type Addresses struct { + Address string `json:"address"` +} +type EthAccountsResult struct { + // addresses owned by the client + Addresses []string `json:"addresses"` +} +type EthSendTransactionParams struct { + Transaction Transaction `json:"transaction"` +} +type EthSendTransactionResult struct { + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` +} +type EthSendRawTransactionParams struct { + // Hex representation of a variable length byte array + SignedTransactionData string `json:"signedTransactionData"` +} +type EthSendRawTransactionResult struct { + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` +} +type EthSubmitHashrateParams struct { + // Hex representation of a 256 bit unit of data + HashRate string `json:"hashRate"` + + // Hex representation of a 256 bit unit of data + Id string `json:"id"` +} +type EthSubmitHashrateResult struct { + // whether of not submitting went through successfully + SubmitHashRateSuccess bool `json:"submitHashRateSuccess"` +} +type EthSubmitWorkParams struct { + // A number only to be used once + Nonce string `json:"nonce"` + + // Hex representation of a 256 bit unit of data + PowHash string `json:"powHash"` + + // Hex representation of a 256 bit unit of data + MixHash string `json:"mixHash"` +} +type EthSubmitWorkResult struct { + // Whether or not the provided solution is valid + SolutionValid bool `json:"solutionValid"` +} +type Syncing struct { + // An object with sync status data + SyncStatus SyncStatus `json:"syncStatus"` +} +type SyncStatus struct { + // Hex representation of the integer + StartingBlock string `json:"startingBlock"` + + // Hex representation of the integer + CurrentBlock string `json:"currentBlock"` + + // Hex representation of the integer + HighestBlock string `json:"highestBlock"` + + // Hex representation of the integer + KnownStates string `json:"knownStates"` + + // Hex representation of the integer + PulledStates string `json:"pulledStates"` +} +type EthSyncingResult struct { + // An object with sync status data + SyncStatus SyncStatus `json:"syncStatus"` +} +type EthUninstallFilterParams struct { + // An identifier used to reference the filter. + FilterId string `json:"filterId"` +} +type EthUninstallFilterResult struct { + // Whether of not the filter was successfully uninstalled + FilterUninstalledSuccess bool `json:"filterUninstalledSuccess"` +} From b1224049c87ca9ae0868de881d8ea31ba1e40168 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 13 Sep 2019 17:19:11 +0100 Subject: [PATCH 007/185] rlp encoding pkg, sendRawTx Signed-off-by: Gregory Hill --- acm/acm.pb.go | 5 +- acm/balance/balance.pb.go | 5 +- acm/private_account.go | 10 + acm/validator/validator.pb.go | 3 +- bcm/bcm.pb.go | 7 +- consensus/tendermint/tendermint.pb.go | 3 +- crypto/crypto.go | 11 + crypto/crypto.pb.go | 5 +- crypto/private_key.go | 2 +- crypto/public_key.go | 19 +- crypto/public_key_test.go | 16 ++ crypto/signature.go | 38 +++ dump/dump.pb.go | 7 +- encoding/encoding.pb.go | 5 +- encoding/rlp/binary.go | 64 +++++ encoding/rlp/rlp.go | 358 ++++++++++++++++++++++++++ encoding/rlp/rlp_test.go | 185 +++++++++++++ execution/errors/errors.pb.go | 5 +- execution/exec/exec.pb.go | 7 +- execution/execution.go | 2 + execution/names/names.pb.go | 5 +- genesis/spec/spec.pb.go | 5 +- go.mod | 1 + go.sum | 2 + integration/integration.go | 8 + integration/keys/keys_server_test.go | 5 +- keys/keys.pb.go | 3 +- keys/mock/key.go | 4 - permission/permission.pb.go | 5 +- protobuf/txs.proto | 6 + rpc/eth.go | 112 ++++++-- rpc/eth_test.go | 30 ++- rpc/rpc.pb.go | 3 +- rpc/rpcdump/rpcdump.pb.go | 3 +- rpc/rpcevents/rpcevents.pb.go | 5 +- rpc/rpcquery/rpcquery.pb.go | 3 +- rpc/rpctransact/rpctransact.pb.go | 7 +- storage/storage.pb.go | 5 +- txs/envelope.go | 4 +- txs/payload/payload.pb.go | 6 +- txs/tx.go | 40 ++- txs/txs.pb.go | 134 +++++++--- 42 files changed, 1010 insertions(+), 143 deletions(-) create mode 100644 encoding/rlp/binary.go create mode 100644 encoding/rlp/rlp.go create mode 100644 encoding/rlp/rlp_test.go diff --git a/acm/acm.pb.go b/acm/acm.pb.go index fe361fef9..5084917ee 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -5,9 +5,6 @@ package acm import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -15,6 +12,8 @@ import ( crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" permission "github.com/hyperledger/burrow/permission" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/acm/balance/balance.pb.go b/acm/balance/balance.pb.go index 342618c99..30fe3253a 100644 --- a/acm/balance/balance.pb.go +++ b/acm/balance/balance.pb.go @@ -5,12 +5,11 @@ package balance import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/acm/private_account.go b/acm/private_account.go index d7593dfa3..cade0b03d 100644 --- a/acm/private_account.go +++ b/acm/private_account.go @@ -129,6 +129,16 @@ func GeneratePrivateAccountFromSecret(secret string) *PrivateAccount { }.PrivateAccount() } +func GenerateEthereumAccountFromSecret(secret string) *PrivateAccount { + privateKey := crypto.PrivateKeyFromSecret(secret, crypto.CurveTypeSecp256k1) + publicKey := privateKey.GetPublicKey() + return ConcretePrivateAccount{ + Address: publicKey.GetAddress(), + PublicKey: publicKey, + PrivateKey: privateKey, + }.PrivateAccount() +} + func PrivateAccountFromPrivateKeyBytes(privKeyBytes []byte) (*PrivateAccount, error) { privateKey, err := crypto.PrivateKeyFromRawBytes(privKeyBytes, crypto.CurveTypeEd25519) if err != nil { diff --git a/acm/validator/validator.pb.go b/acm/validator/validator.pb.go index e8987c611..4ccac95a6 100644 --- a/acm/validator/validator.pb.go +++ b/acm/validator/validator.pb.go @@ -5,13 +5,12 @@ package validator import ( fmt "fmt" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/bcm/bcm.pb.go b/bcm/bcm.pb.go index 4b02315fb..9964a9c63 100644 --- a/bcm/bcm.pb.go +++ b/bcm/bcm.pb.go @@ -5,10 +5,6 @@ package bcm import ( fmt "fmt" - io "io" - math "math" - time "time" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -16,6 +12,9 @@ import ( _ "github.com/golang/protobuf/ptypes/duration" _ "github.com/golang/protobuf/ptypes/timestamp" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" + io "io" + math "math" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/consensus/tendermint/tendermint.pb.go b/consensus/tendermint/tendermint.pb.go index a79c3aedb..e69ccf726 100644 --- a/consensus/tendermint/tendermint.pb.go +++ b/consensus/tendermint/tendermint.pb.go @@ -5,13 +5,12 @@ package tendermint import ( fmt "fmt" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/crypto/crypto.go b/crypto/crypto.go index 215b7faf4..fdfe44d83 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -2,6 +2,8 @@ package crypto import ( "fmt" + + "golang.org/x/crypto/sha3" ) type CurveType uint32 @@ -73,3 +75,12 @@ type Signer interface { type Signable interface { SignBytes(chainID string) ([]byte, error) } + +func LegacyKeccak256Hash(data []byte) ([]byte, error) { + hash := sha3.NewLegacyKeccak256() + _, err := hash.Write(data) + if err != nil { + return nil, err + } + return hash.Sum(nil), nil +} diff --git a/crypto/crypto.pb.go b/crypto/crypto.pb.go index ab32f1738..aa7490042 100644 --- a/crypto/crypto.pb.go +++ b/crypto/crypto.pb.go @@ -5,13 +5,12 @@ package crypto import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/crypto/private_key.go b/crypto/private_key.go index 4cb200e34..f4516cf66 100644 --- a/crypto/private_key.go +++ b/crypto/private_key.go @@ -101,7 +101,7 @@ func PrivateKeyFromRawBytes(privKeyBytes []byte, curveType CurveType) (PrivateKe if !bytes.Equal(privKey.Serialize(), privKeyBytes) { return PrivateKey{}, fmt.Errorf("serialisation of Secp256k1 private key bytes does not equal") } - return PrivateKey{PrivateKey: privKeyBytes, PublicKey: pubKey.SerializeCompressed(), CurveType: CurveTypeSecp256k1}, nil + return PrivateKey{PrivateKey: privKey.Serialize(), PublicKey: pubKey.SerializeCompressed(), CurveType: CurveTypeSecp256k1}, nil default: return PrivateKey{}, ErrInvalidCurve(curveType) } diff --git a/crypto/public_key.go b/crypto/public_key.go index 817058843..a16e59d0c 100644 --- a/crypto/public_key.go +++ b/crypto/public_key.go @@ -1,7 +1,6 @@ package crypto import ( - "crypto/sha256" "encoding/json" "fmt" @@ -9,7 +8,6 @@ import ( "github.com/tendermint/tendermint/crypto/tmhash" hex "github.com/tmthrgd/go-hex" "golang.org/x/crypto/ed25519" - "golang.org/x/crypto/ripemd160" ) const ( @@ -95,11 +93,15 @@ func (p PublicKey) Verify(msg []byte, signature *Signature) error { if err != nil { return fmt.Errorf("could not parse secp256k1 public key: %v", err) } - sig, err := btcec.ParseDERSignature(signature.Signature, btcec.S256()) + sig, err := btcec.ParseSignature(signature.Signature, btcec.S256()) if err != nil { return fmt.Errorf("could not parse DER signature for secp256k1 key: %v", err) } - if sig.Verify(msg, pub) { + hash, err := LegacyKeccak256Hash(msg) + if err != nil { + return err + } + if sig.Verify(hash, pub) { return nil } return fmt.Errorf("signature '%X' is not a valid secp256k1 signature for message: %s", @@ -115,12 +117,9 @@ func (p PublicKey) GetAddress() Address { addr, _ := AddressFromBytes(tmhash.Sum(p.PublicKey)) return addr case CurveTypeSecp256k1: - sha := sha256.New() - sha.Write(p.PublicKey[:]) - - hash := ripemd160.New() - hash.Write(sha.Sum(nil)) - addr, _ := AddressFromBytes(hash.Sum(nil)) + pub, _ := btcec.ParsePubKey(p.PublicKey.Bytes(), btcec.S256()) + hash, _ := LegacyKeccak256Hash(pub.SerializeUncompressed()[1:]) + addr, _ := AddressFromBytes(hash[len(hash)-20:]) return addr default: panic(fmt.Sprintf("unknown CurveType %d", p.CurveType)) diff --git a/crypto/public_key_test.go b/crypto/public_key_test.go index b504570a0..ec87109b7 100644 --- a/crypto/public_key_test.go +++ b/crypto/public_key_test.go @@ -4,9 +4,11 @@ import ( "encoding/json" "testing" + "github.com/btcsuite/btcd/btcec" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + hex "github.com/tmthrgd/go-hex" ) func TestPublicKeySerialisation(t *testing.T) { @@ -54,3 +56,17 @@ func assertFixedWidthEncodeRoundTrip(t *testing.T, p PublicKey) { require.NoError(t, err) assert.Equal(t, p, pOut) } + +func TestGetAddress(t *testing.T) { + privBytes := hex.MustDecodeString(`35622dddb842c9191ca8c2ca2a2b35a6aac90362d095b32f29d8e8abd63d55a5`) + privKey, err := PrivateKeyFromRawBytes(privBytes, CurveTypeSecp256k1) + require.NoError(t, err) + require.Equal(t, "F97798DF751DEB4B6E39D4CF998EE7CD4DCB9ACC", privKey.GetPublicKey().GetAddress().String()) + + _, pub := btcec.PrivKeyFromBytes(btcec.S256(), privBytes) + pubKey, err := PublicKeyFromBytes(pub.SerializeCompressed(), CurveTypeSecp256k1) + require.NoError(t, err) + + require.Equal(t, "F97798DF751DEB4B6E39D4CF998EE7CD4DCB9ACC", pubKey.GetAddress().String()) + +} diff --git a/crypto/signature.go b/crypto/signature.go index 5ee7e0bbf..44aea97d2 100644 --- a/crypto/signature.go +++ b/crypto/signature.go @@ -3,6 +3,7 @@ package crypto import ( "fmt" + "github.com/btcsuite/btcd/btcec" hex "github.com/tmthrgd/go-hex" "golang.org/x/crypto/ed25519" ) @@ -28,3 +29,40 @@ func (sig *Signature) RawBytes() []byte { func (sig *Signature) String() string { return hex.EncodeUpperToString(sig.Signature) } + +func CompressedSignatureFromParams(v uint64, r, s []byte) []byte { + bitlen := (btcec.S256().BitSize + 7) / 8 + sig := make([]byte, 1+bitlen*2) + chainID := uint64(1) + sig[0] = byte(v - chainID - 8) + copy(sig[1:bitlen+1], r) + copy(sig[bitlen+1:], s) + return sig +} + +func UncompressedSignatureFromParams(r, s []byte) []byte { + // <0x30> + // <0x02> + // <0x2> + + rr := append([]byte{0x02, byte(len(r))}, r...) + ss := append([]byte{0x2, byte(len(s))}, s...) + rrss := append(rr, ss...) + + return append([]byte{0x30, byte(len(rrss))}, rrss...) +} + +// PublicKeyFromSignature verifies an ethereum compact signature and returns the public key if valid +func PublicKeyFromSignature(sig, hash []byte) (*PublicKey, error) { + pub, _, err := btcec.RecoverCompact(btcec.S256(), sig, hash) + if err != nil { + return nil, err + } + + publicKey, err := PublicKeyFromBytes(pub.SerializeCompressed(), CurveTypeSecp256k1) + if err != nil { + return nil, err + } + + return &publicKey, nil +} diff --git a/dump/dump.pb.go b/dump/dump.pb.go index 9c6bb37bf..ad3cfb437 100644 --- a/dump/dump.pb.go +++ b/dump/dump.pb.go @@ -5,10 +5,6 @@ package dump import ( fmt "fmt" - io "io" - math "math" - time "time" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -19,6 +15,9 @@ import ( github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" exec "github.com/hyperledger/burrow/execution/exec" names "github.com/hyperledger/burrow/execution/names" + io "io" + math "math" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/encoding/encoding.pb.go b/encoding/encoding.pb.go index 16a454d26..19b1f18ab 100644 --- a/encoding/encoding.pb.go +++ b/encoding/encoding.pb.go @@ -5,12 +5,11 @@ package encoding import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/encoding/rlp/binary.go b/encoding/rlp/binary.go new file mode 100644 index 000000000..f567e9ee3 --- /dev/null +++ b/encoding/rlp/binary.go @@ -0,0 +1,64 @@ +package rlp + +import ( + "encoding/binary" +) + +func PutUint16(i uint64) []byte { + b := make([]byte, 2) + binary.BigEndian.PutUint16(b, uint16(i)) + return b +} + +func PutUint24(i uint64) []byte { + b := make([]byte, 3) + b[0] = byte(i >> 16) + b[1] = byte(i >> 8) + b[2] = byte(i) + return b +} + +func PutUint32(i uint64) []byte { + b := make([]byte, 4) + binary.BigEndian.PutUint32(b, uint32(i)) + return b +} + +func PutUint40(i uint64) []byte { + b := make([]byte, 5) + b[0] = byte(i >> 32) + b[1] = byte(i >> 24) + b[2] = byte(i >> 16) + b[3] = byte(i >> 8) + b[4] = byte(i) + return b +} + +func PutUint48(i uint64) []byte { + b := make([]byte, 6) + b[0] = byte(i >> 40) + b[1] = byte(i >> 32) + b[2] = byte(i >> 24) + b[3] = byte(i >> 16) + b[4] = byte(i >> 8) + b[5] = byte(i) + return b +} + +func PutUint56(i uint64) []byte { + b := make([]byte, 7) + b[0] = byte(i >> 48) + b[1] = byte(i >> 40) + b[2] = byte(i >> 32) + b[3] = byte(i >> 24) + b[4] = byte(i >> 16) + b[5] = byte(i >> 8) + b[6] = byte(i) + return b +} + +func PutUint64(i uint64) []byte { + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, uint64(i)) + return b +} diff --git a/encoding/rlp/rlp.go b/encoding/rlp/rlp.go new file mode 100644 index 000000000..f7fb1f3b2 --- /dev/null +++ b/encoding/rlp/rlp.go @@ -0,0 +1,358 @@ +package rlp + +import ( + "bytes" + "encoding/binary" + "encoding/hex" + "fmt" + "math/bits" + "reflect" + "strconv" +) + +const ( + EmptyString = 0x80 + EmptySlice = 0xC0 +) + +type Code uint32 + +const ( + ErrUnknown Code = iota + ErrNoInput + ErrInvalid +) + +func (c Code) Error() string { + switch c { + case ErrNoInput: + return "no input" + case ErrInvalid: + return "input not valid RLP encoding" + default: + return "unknown error" + } +} + +func encodeUint8(input uint8) ([]byte, error) { + if input == 0 { + return []byte{EmptyString}, nil + } else if input >= 0x00 && input <= 0x7f { + return []byte{input}, nil + } else if input >= 0x80 && input <= 0xff { + return []byte{0x81, input}, nil + } + return []byte{EmptyString}, nil +} + +func encodeUint64(i uint64) ([]byte, error) { + size := bits.Len64(uint64(i))/8 + 1 + + switch size { + case 1: + return encodeUint8(uint8(i)) + case 2: + return encodeString(PutUint16(i)) + case 3: + return encodeString(PutUint24(i)) + case 4: + return encodeString(PutUint32(i)) + case 5: + return encodeString(PutUint40(i)) + case 6: + return encodeString(PutUint48(i)) + case 7: + return encodeString(PutUint56(i)) + case 8: + return encodeString(PutUint64(i)) + } + return nil, nil +} + +func encodeLength(n, offset int) []byte { + if n <= 55 { + return []uint8{uint8(n + offset)} + } + + length := strconv.FormatUint(uint64(n), 16) + if len(length)%2 == 1 { + length = fmt.Sprintf("0%s", length) + } + + dec, err := hex.DecodeString(length) + if err != nil { + return nil + } + + return append([]byte{uint8(0xb7 + len(string(n)))}, dec...) +} + +func encodeString(input []byte) ([]byte, error) { + if len(input) == 0 { + return []byte{EmptyString}, nil + } else if len(input) == 1 { + return encodeUint8(input[0]) + } else { + return append(encodeLength(len(input), EmptyString), []byte(input)...), nil + } +} + +func encodeList(val reflect.Value) ([]byte, error) { + if val.Len() == 0 { + return []byte{EmptySlice}, nil + } + + out := make([][]byte, 0) + for i := 0; i < val.Len(); i++ { + data, err := encode(val.Index(i).Interface()) + if err != nil { + return nil, err + } + out = append(out, data) + } + + sum := bytes.Join(out, []byte{}) + return append(encodeLength(len(sum), EmptySlice), sum...), nil +} + +func encodeStruct(val reflect.Value) ([]byte, error) { + out := make([][]byte, 0) + + for i := 0; i < val.NumField(); i++ { + data, err := encode(val.Field(i).Interface()) + if err != nil { + return nil, err + } + out = append(out, data) + } + sum := bytes.Join(out, []byte{}) + return append(encodeLength(len(sum), EmptySlice), sum...), nil +} + +func encode(input interface{}) ([]byte, error) { + val := reflect.ValueOf(input) + typ := reflect.TypeOf(input) + + switch val.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + i := val.Int() + if i < 0 { + return nil, fmt.Errorf("cannot rlp encode negative integer") + } + return encodeUint64(uint64(i)) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return encodeUint64(val.Uint()) + case reflect.Bool: + if val.Bool() { + return []byte{0x01}, nil + } + return []byte{EmptyString}, nil + case reflect.String: + return encodeString([]byte(reflect.ValueOf(input).String())) + case reflect.Slice: + switch typ.Elem().Kind() { + case reflect.Uint8: + return encodeString(reflect.ValueOf(input).Bytes()) + default: + return encodeList(val) + } + case reflect.Struct: + return encodeStruct(val) + default: + return []byte{EmptyString}, nil + } +} + +func Encode(input interface{}) ([]byte, error) { + return encode(input) +} + +type fields struct { + fields [][]byte +} + +func (f *fields) add(element []byte) { + f.fields = append(f.fields, element) +} + +func decode(in []byte, out *fields) error { + if len(in) == 0 { + return nil + } + + offset, length, typ, err := decodeLength(in) + if err != nil { + return err + } + + switch typ { + case reflect.String: + out.add(in[offset:length]) + case reflect.Slice: + err = decode(in[offset:length], out) + if err != nil { + return err + } + } + + return decode(in[length:], out) +} + +func decodeLength(input []byte) (uint8, uint8, reflect.Kind, error) { + length := uint8(len(input)) + + if length == 0 { + return 0, 0, reflect.Invalid, ErrNoInput + } + + prefix := uint8(input[0]) + + if prefix <= 0x7f { + // single byte + return 0, 1, reflect.String, nil + + } else if length > prefix-0x80 && prefix <= 0xb7 { + // short string + strLen := prefix - 0x80 + if strLen == 1 && uint8(input[1]) <= 0x7f { + return 0, 0, reflect.Invalid, fmt.Errorf("single byte below 128 must be encoded as itself") + } + return 1, strLen + 1, reflect.String, nil + + } else if length > prefix-0xb7 && prefix <= 0xbf { + // long string + next, err := getLength(input[1 : (prefix-0xb7)+1]) + if err != nil { + return 0, 0, reflect.Invalid, err + } else if length > prefix-0xb7+next { + lenOfStrLen := prefix - 0xb7 + if input[1] == 0 { + return 0, 0, reflect.Invalid, fmt.Errorf("multi-byte length must have no leading zero") + } + strLen, err := getLength(input[1 : lenOfStrLen+1]) + if err != nil { + return 0, 0, reflect.Invalid, err + } else if strLen < 56 { + return 0, 0, reflect.Invalid, fmt.Errorf("length below 56 must be encoded in one byte") + } + return lenOfStrLen + 1, lenOfStrLen + strLen, reflect.String, nil + } + + } else if length > prefix-0xc0 && prefix <= 0xf7 { + // short list + lenOfList := prefix - 0xc0 + return 1, lenOfList + 1, reflect.Slice, nil + + } else if prefix <= 0xff && length > prefix-0xf7 { + // long list + lenOfListLen := (prefix - 0xf7) + 1 + next, err := getLength(input[1:lenOfListLen]) + if err != nil { + return 0, 0, reflect.Invalid, err + } else if length > prefix-0xf7+next { + if input[1] == 0 { + return 0, 0, reflect.Invalid, fmt.Errorf("multi-byte length must have no leading zero") + } + listLen, err := getLength(input[1:lenOfListLen]) + if err != nil { + return 0, 0, reflect.Invalid, err + } else if listLen < 56 { + return 0, 0, reflect.Invalid, fmt.Errorf("length below 56 must be encoded in one byte") + } + return lenOfListLen, lenOfListLen + listLen, reflect.Slice, nil + } + } + + fmt.Println(hex.EncodeToString([]byte{prefix})) + + return 0, 0, reflect.Invalid, ErrInvalid +} + +func getLength(data []byte) (uint8, error) { + length := len(data) + if length == 0 { + return 0, ErrNoInput + } else if length == 1 { + return uint8(data[0]), nil + } else { + next, err := getLength(data[0 : len(data)-1]) + return uint8(data[len(data)-1]) + next, err + } +} + +func decodeStruct(in reflect.Value, fields [][]byte) error { + if in.NumField() != len(fields) { + return fmt.Errorf("wrong number of fields; have %d, want %d", len(fields), in.NumField()) + } + for i := 0; i < in.NumField(); i++ { + val := in.Field(i) + typ := in.Field(i).Type() + switch val.Kind() { + case reflect.String: + val.SetString(string(fields[i])) + case reflect.Uint64: + out := make([]byte, 8) + for j := range fields[i] { + out[len(out)-(len(fields[i])-j)] = fields[i][j] + } + val.SetUint(binary.BigEndian.Uint64(out)) + case reflect.Slice: + if typ.Elem().Kind() != reflect.Uint8 { + continue + } + out := make([]byte, len(fields[i])) + for i, b := range fields[i] { + out[i] = b + } + val.SetBytes(out) + } + } + return nil +} + +func Decode(src []byte, dst interface{}) error { + dec := new(fields) + err := decode(src, dec) + if err != nil { + return err + } + + val := reflect.ValueOf(dst) + typ := reflect.TypeOf(dst) + + if val.Kind() == reflect.Ptr { + val = val.Elem() + } + + switch val.Kind() { + case reflect.Slice: + switch typ.Elem().Kind() { + case reflect.Uint8: + out, ok := dst.([]byte) + if !ok { + return fmt.Errorf("cannot decode into type %s", val.Type()) + } + found := bytes.Join(dec.fields, []byte("")) + if len(out) < len(found) { + return fmt.Errorf("cannot decode %d bytes into slice of size %d", len(found), len(out)) + } + for i, b := range found { + out[i] = b + } + return nil + case reflect.Slice: + out, ok := dst.([][]byte) + if !ok { + return fmt.Errorf("cannot decode into type %s", val.Type()) + } + for i := range out { + out[i] = dec.fields[i] + } + return nil + } + case reflect.Struct: + return decodeStruct(val, dec.fields) + } + + return fmt.Errorf("cannot decode into unsupported type %v", reflect.TypeOf(dst)) +} diff --git a/encoding/rlp/rlp_test.go b/encoding/rlp/rlp_test.go new file mode 100644 index 000000000..705fd3862 --- /dev/null +++ b/encoding/rlp/rlp_test.go @@ -0,0 +1,185 @@ +package rlp + +import ( + "testing" + + "github.com/test-go/testify/require" +) + +type testCase struct { + in interface{} + enc []byte + dec interface{} +} + +type testObject struct { + Key string + Value string +} + +func TestEncoding(t *testing.T) { + + t.Run("Empty", func(t *testing.T) { + var tests = []testCase{ + { + []byte{}, + []byte{EmptyString}, + []byte{}, + }, + { + "", + []byte{EmptyString}, + []byte{}, + }, + { + 0, + []byte{EmptyString}, + []byte{}, + }, + { + []string{}, + []byte{EmptySlice}, + []byte{}, + }, + } + + trial(t, tests) + }) + + t.Run("Bool", func(t *testing.T) { + var tests = []testCase{ + { + true, + []byte{0x01}, + []byte{1}, + }, + { + false, + []byte{EmptyString}, + []byte{0}, + }, + } + + trial(t, tests) + }) + + t.Run("String", func(t *testing.T) { + var tests = []testCase{ + { + []byte{0x64, 0x6f, 0x67}, + []byte{0x83, 100, 111, 103}, + []byte{0x64, 0x6f, 0x67}, + }, + { + "dog", + []byte{0x83, 100, 111, 103}, + []byte("dog"), + }, + { + "hello world", + []byte{0x8b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64}, + []byte("hello world"), + }, + { + "Lorem ipsum dolor sit amet, consectetur adipisicing elit", + []byte{0xb8, 0x38, 0x4c, 0x6f, 0x72, 0x65, 0x6d, 0x20, 0x69, 0x70, 0x73, 0x75, 0x6d, 0x20, 0x64, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x73, 0x69, 0x74, 0x20, 0x61, 0x6d, 0x65, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x74, 0x65, 0x74, 0x75, 0x72, 0x20, 0x61, 0x64, 0x69, 0x70, 0x69, 0x73, 0x69, 0x63, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6c, 0x69, 0x74}, + []byte("Lorem ipsum dolor sit amet, consectetur adipisicing elit"), + }, + { + []byte{0x0f}, + []byte{0x0f}, + []byte{0x0f}, + }, + { + []byte{0x04, 0x00}, + []byte{0x82, 0x04, 0x00}, + []byte{0x04, 0x00}, + }, + } + + trial(t, tests) + }) + + t.Run("List", func(t *testing.T) { + var tests = []testCase{ + { + []string{"cat", "dog"}, + []byte{0xc8, 0x83, byte('c'), byte('a'), byte('t'), 0x83, byte('d'), byte('o'), byte('g')}, + [][]byte{[]byte("cat"), []byte("dog")}, + }, + { + [][]string{[]string{"cat", "dog"}, []string{"owl"}}, + []byte{0xce, 0xc8, 0x83, byte('c'), byte('a'), byte('t'), 0x83, byte('d'), byte('o'), byte('g'), 0xc4, 0x83, byte('o'), byte('w'), byte('l')}, + [][]byte{[]byte("cat"), []byte("dog"), []byte("owl")}, + }, + } + + trial(t, tests) + }) + + t.Run("Struct", func(t *testing.T) { + var tests = []testCase{ + { + testObject{"foo", "bar"}, + []byte{0xc8, 0x83, byte('f'), byte('o'), byte('o'), 0x83, byte('b'), byte('a'), byte('r')}, + &testObject{"foo", "bar"}, + }, + } + + trial(t, tests) + }) +} + +func trial(t *testing.T, tests []testCase) { + for _, tt := range tests { + enc, err := Encode(tt.in) + require.NoError(t, err) + require.Equal(t, tt.enc, enc) + + var dec interface{} + + switch todo := tt.dec.(type) { + case []byte: + dec = make([]byte, len(todo)) + case [][]byte: + dec = make([][]byte, len(todo)) + case *testObject: + dec = new(testObject) + default: + require.FailNow(t, "dec type unsupported") + } + + err = Decode(enc, dec) + require.NoError(t, err) + require.Equal(t, tt.dec, dec) + } +} + +type RawTx struct { + Nonce uint64 `json:"nonce"` + GasPrice uint64 `json:"gasPrice"` + Gas uint64 `json:"gas"` + To []byte `json:"to"` + Value uint64 `json:"value"` + Input []byte `json:"input"` + + V []byte `json:"v"` + R []byte `json:"r"` + S []byte `json:"s"` +} + +func TestEthTransaction(t *testing.T) { + // raw := `f866068609184e72a0008303000094fa3caabc8eefec2b5e2895e5afbf79379e7268a7808025a06d35f407f418737eec80cba738c4301e683cfcecf19bac9a1aeb2316cac19d3ba002935ee46e3b6bd69168b0b07670699d71df5b32d5f66dbca5758bce2431c9e8` + // data, err := hex.DecodeString(raw) + // require.NoError(t, err) + + data, err := Encode([]interface{}{uint64(6), uint64(10000000000000), uint64(196608), []byte{250, 60, 170, 188, 142, 239, 236, 43, 94, 40, 149, 229, 175, 191, 121, 55, 158, 114, 104, 167}, uint64(0), []byte{}, uint64(1), uint(0), uint(0)}) + require.NoError(t, err) + + exp := []byte{230, 6, 134, 9, 24, 78, 114, 160, 0, 131, 3, 0, 0, 148, 250, 60, 170, 188, 142, 239, 236, 43, 94, 40, 149, 229, 175, 191, 121, 55, 158, 114, 104, 167, 128, 128, 1, 128, 128} + require.Equal(t, exp, data) + + tx := new(RawTx) + err = Decode(data, tx) + require.NoError(t, err) +} diff --git a/execution/errors/errors.pb.go b/execution/errors/errors.pb.go index ca00467b7..5eafb4e87 100644 --- a/execution/errors/errors.pb.go +++ b/execution/errors/errors.pb.go @@ -5,12 +5,11 @@ package errors import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/execution/exec/exec.pb.go b/execution/exec/exec.pb.go index aa23b65fc..c0e6e4d92 100644 --- a/execution/exec/exec.pb.go +++ b/execution/exec/exec.pb.go @@ -5,10 +5,6 @@ package exec import ( fmt "fmt" - io "io" - math "math" - time "time" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -24,6 +20,9 @@ import ( txs "github.com/hyperledger/burrow/txs" github_com_hyperledger_burrow_txs_payload "github.com/hyperledger/burrow/txs/payload" types "github.com/tendermint/tendermint/abci/types" + io "io" + math "math" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/execution/execution.go b/execution/execution.go index 873cc2045..174e61e7b 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -316,6 +316,8 @@ func (exe *executor) updateSignatory(sig txs.Signatory) error { acc, err := exe.stateCache.GetAccount(*sig.Address) if err != nil { return fmt.Errorf("error getting account on which to set public key: %v", *sig.Address) + } else if acc == nil { + return fmt.Errorf("account %s does not exist", sig.Address) } // Important that verify has been run against signatories at this point if sig.PublicKey.GetAddress() != acc.Address { diff --git a/execution/names/names.pb.go b/execution/names/names.pb.go index e722ee6e0..32b5f872e 100644 --- a/execution/names/names.pb.go +++ b/execution/names/names.pb.go @@ -5,13 +5,12 @@ package names import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/genesis/spec/spec.pb.go b/genesis/spec/spec.pb.go index 6afe7cc50..313653bb6 100644 --- a/genesis/spec/spec.pb.go +++ b/genesis/spec/spec.pb.go @@ -5,9 +5,6 @@ package spec import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -15,6 +12,8 @@ import ( balance "github.com/hyperledger/burrow/acm/balance" crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/go.mod b/go.mod index 4b23abd42..ddca8aed2 100644 --- a/go.mod +++ b/go.mod @@ -51,6 +51,7 @@ require ( github.com/tendermint/iavl v0.12.4 github.com/tendermint/tendermint v0.32.3 github.com/tendermint/tm-db v0.1.1 + github.com/test-go/testify v1.1.4 github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect diff --git a/go.sum b/go.sum index f99d9433d..493e7b3bb 100644 --- a/go.sum +++ b/go.sum @@ -206,6 +206,8 @@ github.com/tendermint/tendermint v0.32.3 h1:GEnWpGQ795h5oTFNbfBLsY0LW/CW2j6p6Hti github.com/tendermint/tendermint v0.32.3/go.mod h1:ZK2c29jl1QRYznIRyRWRDsmm1yvtPzBRT00x4t1JToY= github.com/tendermint/tm-db v0.1.1 h1:G3Xezy3sOk9+ekhjZ/kjArYIs1SmwV+1OUgNkj7RgV0= github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= +github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= +github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 h1:IlK6taZBmMKDcGfMqIlD4la5BlekNrrLsdtCMSn6aJI= github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= diff --git a/integration/integration.go b/integration/integration.go index dc0400eae..3ac5b8b46 100644 --- a/integration/integration.go +++ b/integration/integration.go @@ -205,6 +205,14 @@ func MakePrivateAccounts(sec string, n int) []*acm.PrivateAccount { return accounts } +func MakeEthereumAccounts(sec string, n int) []*acm.PrivateAccount { + accounts := make([]*acm.PrivateAccount, n) + for i := 0; i < n; i++ { + accounts[i] = acm.GenerateEthereumAccountFromSecret(sec + strconv.Itoa(i)) + } + return accounts +} + func Shutdown(kern *core.Kernel) { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() diff --git a/integration/keys/keys_server_test.go b/integration/keys/keys_server_test.go index 9efa20872..d5338a846 100644 --- a/integration/keys/keys_server_test.go +++ b/integration/keys/keys_server_test.go @@ -75,7 +75,8 @@ func TestKeysServer(t *testing.T) { resp, err := cli.PublicKey(ctx, &keys.PubRequest{Address: addr}) require.NoError(t, err) - hash := sha3.Sha3([]byte("the hash of something!")) + msg := []byte("the hash of something!") + hash := sha3.Sha3(msg) sig, err := cli.Sign(ctx, &keys.SignRequest{Address: addr, Message: hash}) require.NoError(t, err) @@ -83,7 +84,7 @@ func TestKeysServer(t *testing.T) { _, err = cli.Verify(ctx, &keys.VerifyRequest{ Signature: sig.GetSignature(), PublicKey: resp.GetPublicKey(), - Message: hash, + Message: msg, }) require.NoError(t, err) }) diff --git a/keys/keys.pb.go b/keys/keys.pb.go index e0ae261fb..3bc1c9df1 100644 --- a/keys/keys.pb.go +++ b/keys/keys.pb.go @@ -6,13 +6,12 @@ package keys import ( context "context" fmt "fmt" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" crypto "github.com/hyperledger/burrow/crypto" grpc "google.golang.org/grpc" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/keys/mock/key.go b/keys/mock/key.go index 9f44e6ebe..ae5cb969b 100644 --- a/keys/mock/key.go +++ b/keys/mock/key.go @@ -3,7 +3,6 @@ package mock import ( "crypto/rand" "encoding/json" - "fmt" "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/crypto" @@ -56,9 +55,6 @@ func newKey(name string) (*Key, error) { } func mockKeyFromPrivateAccount(privateAccount *acm.PrivateAccount) *Key { - if privateAccount.PrivateKey().CurveType != crypto.CurveTypeEd25519 { - panic(fmt.Errorf("mock key client only supports ed25519 private keys at present")) - } key := &Key{ Name: privateAccount.GetAddress().String(), Address: privateAccount.GetAddress(), diff --git a/permission/permission.pb.go b/permission/permission.pb.go index b91f0d764..bb07ce156 100644 --- a/permission/permission.pb.go +++ b/permission/permission.pb.go @@ -5,13 +5,12 @@ package permission import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/protobuf/txs.proto b/protobuf/txs.proto index 719116603..1f52711b6 100644 --- a/protobuf/txs.proto +++ b/protobuf/txs.proto @@ -25,6 +25,12 @@ message Envelope { repeated Signatory Signatories = 1 [(gogoproto.nullable) = false]; // Canonical bytes of the Tx ready to be signed bytes Tx = 2 [(gogoproto.customtype) = "Tx"]; + enum Encoding { + JSON = 0; + RLP = 1; + } + Encoding Enc = 3; + } // Signatory contains signature and one or both of Address and PublicKey to identify the signer diff --git a/rpc/eth.go b/rpc/eth.go index d2ec8050b..0a8326bf0 100644 --- a/rpc/eth.go +++ b/rpc/eth.go @@ -14,8 +14,8 @@ import ( bin "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/encoding/rlp" "github.com/hyperledger/burrow/execution" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/state" @@ -89,14 +89,13 @@ func (srv *EthService) Web3Sha3(req *web3.Web3Sha3Params) (*web3.Web3Sha3Result, return nil, err } - hash := sha3.NewKeccak256() - _, err = hash.Write(data) + hash, err := crypto.LegacyKeccak256Hash(data) if err != nil { return nil, err } return &web3.Web3Sha3Result{ - HashedData: encoding.HexEncodeBytes(hash.Sum(nil)), + HashedData: encoding.HexEncodeBytes(hash), }, nil } @@ -449,28 +448,105 @@ func (srv *EthService) EthPendingTransactions() (*web3.EthPendingTransactionsRes } type RawTx struct { - Nonce uint64 `json:"nonce"` - GasPrice uint64 `json:"gasPrice"` - Gas uint64 `json:"gas"` - To *crypto.Address `json:"to"` - Value uint64 `json:"value"` - Input []byte `json:"input"` + Nonce uint64 `json:"nonce"` + GasPrice uint64 `json:"gasPrice"` + Gas uint64 `json:"gas"` + To []byte `json:"to"` + Value uint64 `json:"value"` + Data []byte `json:"data"` - V *big.Int `json:"v"` - R *big.Int `json:"r"` - S *big.Int `json:"s"` + V uint64 `json:"v"` + R []byte `json:"r"` + S []byte `json:"s"` } func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionParams) (*web3.EthSendRawTransactionResult, error) { - // TODO: implement + data, err := encoding.HexDecodeToBytes(req.SignedTransactionData) + if err != nil { + return nil, err + } - // 1) hex decode + rawTx := new(RawTx) + err = rlp.Decode(data, rawTx) + if err != nil { + return nil, err + } + + toHash := []interface{}{ + rawTx.Nonce, + rawTx.GasPrice, + rawTx.Gas, + rawTx.To, + rawTx.Value, + rawTx.Data, + big.NewInt(1).Uint64(), uint(0), uint(0), + } - // 2) rlp decode + enc, err := rlp.Encode(toHash) + if err != nil { + return nil, err + } - // 3) sign and send + hash, err := crypto.LegacyKeccak256Hash(enc) + if err != nil { + return nil, err + } - return nil, web3.ErrNotFound + sig := crypto.CompressedSignatureFromParams(rawTx.V-1, rawTx.R, rawTx.S) + pub, err := crypto.PublicKeyFromSignature(sig, hash) + if err != nil { + return nil, err + } + from := pub.GetAddress() + unc := crypto.UncompressedSignatureFromParams(rawTx.R, rawTx.S) + signature, err := crypto.SignatureFromBytes(unc, crypto.CurveTypeSecp256k1) + if err != nil { + return nil, err + } + + to, err := crypto.AddressFromBytes(rawTx.To) + if err != nil { + return nil, err + } + + txEnv := &txs.Envelope{ + Signatories: []txs.Signatory{ + { + Address: &from, + PublicKey: pub, + Signature: signature, + }, + }, + Enc: txs.Envelope_RLP, + Tx: &txs.Tx{ + ChainID: srv.blockchain.ChainID(), + Payload: &payload.SendTx{ + Inputs: []*payload.TxInput{ + { + Address: from, + Amount: rawTx.Value, + Sequence: rawTx.Nonce, + }, + }, + Outputs: []*payload.TxOutput{ + { + Address: to, + Amount: rawTx.Value, + }, + }, + }, + }, + } + + ctx := context.Background() + txe, err := srv.trans.BroadcastTxSync(ctx, txEnv) + if err != nil { + return nil, err + } else if txe.Exception != nil { + return nil, txe.Exception.AsError() + } + + return nil, nil } // EthSyncing returns this nodes syncing status (i.e. whether it has caught up) diff --git a/rpc/eth_test.go b/rpc/eth_test.go index 5ec8664ee..eb9948ba1 100644 --- a/rpc/eth_test.go +++ b/rpc/eth_test.go @@ -7,6 +7,7 @@ import ( "strings" "testing" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/encoding" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/integration" @@ -22,6 +23,7 @@ func TestWeb3RPCService(t *testing.T) { ctx := context.Background() genesisAccounts := integration.MakePrivateAccounts("accounts", 2) + genesisAccounts = append(genesisAccounts, integration.MakeEthereumAccounts("ethereum", 2)...) genesisDoc := integration.TestGenesisDoc(genesisAccounts, 0) config, _ := integration.NewTestConfig(genesisDoc) @@ -96,7 +98,8 @@ func TestWeb3RPCService(t *testing.T) { t.Run("EthChainId", func(t *testing.T) { result, err := eth.EthChainId() require.NoError(t, err) - require.Equal(t, "Integration_Test_Chain-281EDE", result.ChainId) + doc := config.GenesisDoc + require.Equal(t, doc.ChainID(), result.ChainId) }) }) @@ -118,14 +121,25 @@ func TestWeb3RPCService(t *testing.T) { require.NotEmpty(t, txHash) }) - // t.Run("EthSendRawTransaction", func(t *testing.T) { - // raw := `0xf866068609184e72a0008303000094fa3caabc8eefec2b5e2895e5afbf79379e7268a7808025a06d35f407f418737eec80cba738c4301e683cfcecf19bac9a1aeb2316cac19d3ba002935ee46e3b6bd69168b0b07670699d71df5b32d5f66dbca5758bce2431c9e8` + t.Run("EthSendRawTransaction", func(t *testing.T) { + addr, err := crypto.AddressFromHexString("8A2FD214EAA33FA0CDED164FE7357E6382F6EEAD") + require.NoError(t, err) - // _, err := eth.EthSendRawTransaction(&web3.EthSendRawTransactionParams{ - // SignedTransactionData: raw, - // }) - // require.NoError(t, err) - // }) + acc, err := kern.State.GetAccount(addr) + require.NoError(t, err) + before := acc.GetBalance() + + raw := `0xf860018080948a2fd214eaa33fa0cded164fe7357e6382f6eead830300008026a0602370418b098a0509b6c6eb7835d4dd214bc4e5f15ee709f29cb17b3cadede1a018c42ee04c35dfb6d10bd5fef8967918be665a701fa1c54c601b4d38feb83244` + _, err = eth.EthSendRawTransaction(&web3.EthSendRawTransactionParams{ + SignedTransactionData: raw, + }) + require.NoError(t, err) + + acc, err = kern.State.GetAccount(addr) + require.NoError(t, err) + after := acc.GetBalance() + require.Equal(t, after, before+196608) + }) t.Run("EthGetTransactionReceipt", func(t *testing.T) { require.NotEmpty(t, txHash, "need tx hash to get tx receipt") diff --git a/rpc/rpc.pb.go b/rpc/rpc.pb.go index ab323d8ec..f8a6ab389 100644 --- a/rpc/rpc.pb.go +++ b/rpc/rpc.pb.go @@ -5,8 +5,6 @@ package rpc import ( fmt "fmt" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -14,6 +12,7 @@ import ( bcm "github.com/hyperledger/burrow/bcm" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" tendermint "github.com/hyperledger/burrow/consensus/tendermint" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/rpc/rpcdump/rpcdump.pb.go b/rpc/rpcdump/rpcdump.pb.go index 7173c173b..11f635b75 100644 --- a/rpc/rpcdump/rpcdump.pb.go +++ b/rpc/rpcdump/rpcdump.pb.go @@ -6,13 +6,12 @@ package rpcdump import ( context "context" fmt "fmt" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" dump "github.com/hyperledger/burrow/dump" grpc "google.golang.org/grpc" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/rpc/rpcevents/rpcevents.pb.go b/rpc/rpcevents/rpcevents.pb.go index ea0229c54..db293aaea 100644 --- a/rpc/rpcevents/rpcevents.pb.go +++ b/rpc/rpcevents/rpcevents.pb.go @@ -6,15 +6,14 @@ package rpcevents import ( context "context" fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" exec "github.com/hyperledger/burrow/execution/exec" grpc "google.golang.org/grpc" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/rpc/rpcquery/rpcquery.pb.go b/rpc/rpcquery/rpcquery.pb.go index 8dbcc78c3..ee44c1ed5 100644 --- a/rpc/rpcquery/rpcquery.pb.go +++ b/rpc/rpcquery/rpcquery.pb.go @@ -6,8 +6,6 @@ package rpcquery import ( context "context" fmt "fmt" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -20,6 +18,7 @@ import ( payload "github.com/hyperledger/burrow/txs/payload" types "github.com/tendermint/tendermint/abci/types" grpc "google.golang.org/grpc" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/rpc/rpctransact/rpctransact.pb.go b/rpc/rpctransact/rpctransact.pb.go index ea6523360..915e0c193 100644 --- a/rpc/rpctransact/rpctransact.pb.go +++ b/rpc/rpctransact/rpctransact.pb.go @@ -6,10 +6,6 @@ package rpctransact import ( context "context" fmt "fmt" - io "io" - math "math" - time "time" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -21,6 +17,9 @@ import ( txs "github.com/hyperledger/burrow/txs" payload "github.com/hyperledger/burrow/txs/payload" grpc "google.golang.org/grpc" + io "io" + math "math" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/storage/storage.pb.go b/storage/storage.pb.go index 3bbe1d8a1..dc3eb476b 100644 --- a/storage/storage.pb.go +++ b/storage/storage.pb.go @@ -5,12 +5,11 @@ package storage import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/txs/envelope.go b/txs/envelope.go index 272f8a68f..d2147a1c0 100644 --- a/txs/envelope.go +++ b/txs/envelope.go @@ -109,7 +109,7 @@ func (txEnv *Envelope) Verify(chainID string) error { return fmt.Errorf("%s: number of inputs (= %v) should equal number of signatories (= %v)", errPrefix, len(inputs), len(txEnv.Signatories)) } - signBytes, err := txEnv.Tx.SignBytes() + signBytes, err := txEnv.Tx.SignBytes(txEnv.GetEnc()) if err != nil { return fmt.Errorf("%s: could not generate SignBytes: %v", errPrefix, err) } @@ -132,7 +132,7 @@ func (txEnv *Envelope) Verify(chainID string) error { func (txEnv *Envelope) Sign(signingAccounts ...acm.AddressableSigner) error { // Clear any existing txEnv.Signatories = nil - signBytes, err := txEnv.Tx.SignBytes() + signBytes, err := txEnv.Tx.SignBytes(txEnv.GetEnc()) if err != nil { return err } diff --git a/txs/payload/payload.pb.go b/txs/payload/payload.pb.go index 8bbb5e8b0..706ce17cc 100644 --- a/txs/payload/payload.pb.go +++ b/txs/payload/payload.pb.go @@ -5,9 +5,6 @@ package payload import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -15,6 +12,8 @@ import ( github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" spec "github.com/hyperledger/burrow/genesis/spec" permission "github.com/hyperledger/burrow/permission" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -58,6 +57,7 @@ func (Ballot_ProposalState) EnumDescriptor() ([]byte, []int) { return fileDescriptor_678c914f1bee6d56, []int{15, 0} } +// Any encodes a sum type for which only one should be set type Any struct { CallTx *CallTx `protobuf:"bytes,1,opt,name=CallTx,proto3" json:"CallTx,omitempty"` SendTx *SendTx `protobuf:"bytes,2,opt,name=SendTx,proto3" json:"SendTx,omitempty"` diff --git a/txs/tx.go b/txs/tx.go index 6f99e668a..b6b4fc50a 100644 --- a/txs/tx.go +++ b/txs/tx.go @@ -24,6 +24,7 @@ import ( "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/encoding/rlp" "github.com/hyperledger/burrow/event/query" "github.com/hyperledger/burrow/txs/payload" ) @@ -67,7 +68,7 @@ func (tx *Tx) Sign(signingAccounts ...acm.AddressableSigner) (*Envelope, error) // Generate SignBytes, panicking on any failure func (tx *Tx) MustSignBytes() []byte { - bs, err := tx.SignBytes() + bs, err := tx.SignBytes(Envelope_JSON) if err != nil { panic(err) } @@ -75,7 +76,7 @@ func (tx *Tx) MustSignBytes() []byte { } // Produces the canonical SignBytes (the Tx message that will be signed) for a Tx -func (tx *Tx) SignBytes() ([]byte, error) { +func (tx *Tx) SignBytes(env Envelope_Encoding) ([]byte, error) { bs, err := json.Marshal(tx) if err != nil { return nil, fmt.Errorf("could not generate canonical SignBytes for Payload %v: %v", tx.Payload, err) @@ -83,6 +84,41 @@ func (tx *Tx) SignBytes() ([]byte, error) { return bs, nil } +func (tx *Tx) SignBytesRLPEncoded() ([]byte, error) { + switch pay := tx.Payload.(type) { + case *payload.SendTx: + if len(pay.Inputs) != 1 { + return nil, fmt.Errorf("RLP Encoded SendTx must have exactly one TxInput") + } else if len(pay.Outputs) != 1 { + return nil, fmt.Errorf("RLP Encoded SendTx must have exactly one TxOutput") + } + input := pay.Inputs[0] + output := pay.Outputs[0] + return rlp.Encode([]interface{}{ + input.Sequence, + uint64(0), + uint64(0), + output.Address.Bytes(), + input.Amount, + []byte{}, + uint64(1), uint(0), uint(0), + }) + case *payload.CallTx: + input := pay.Input + return rlp.Encode([]interface{}{ + input.Sequence, + uint64(0), + pay.GasLimit, + pay.Address.Bytes(), + input.Amount, + pay.Data.Bytes(), + uint64(1), uint(0), uint(0), + }) + default: + return nil, fmt.Errorf("tx type %v not supported for rlp encoding", tx.Payload.Type()) + } +} + // Serialisation intermediate for switching on type type wrapper struct { ChainID string diff --git a/txs/txs.pb.go b/txs/txs.pb.go index 0e9ac84c0..e580c18ac 100644 --- a/txs/txs.pb.go +++ b/txs/txs.pb.go @@ -5,9 +5,6 @@ package txs import ( fmt "fmt" - io "io" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -15,6 +12,8 @@ import ( crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_txs_payload "github.com/hyperledger/burrow/txs/payload" + io "io" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -29,14 +28,40 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +type Envelope_Encoding int32 + +const ( + Envelope_JSON Envelope_Encoding = 0 + Envelope_RLP Envelope_Encoding = 1 +) + +var Envelope_Encoding_name = map[int32]string{ + 0: "JSON", + 1: "RLP", +} + +var Envelope_Encoding_value = map[string]int32{ + "JSON": 0, + "RLP": 1, +} + +func (x Envelope_Encoding) String() string { + return proto.EnumName(Envelope_Encoding_name, int32(x)) +} + +func (Envelope_Encoding) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_372ebcf753025bdc, []int{0, 0} +} + // An envelope contains both the signable Tx and the signatures for each input (in signatories) type Envelope struct { Signatories []Signatory `protobuf:"bytes,1,rep,name=Signatories,proto3" json:"Signatories"` // Canonical bytes of the Tx ready to be signed - Tx *Tx `protobuf:"bytes,2,opt,name=Tx,proto3,customtype=Tx" json:"Tx,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Tx *Tx `protobuf:"bytes,2,opt,name=Tx,proto3,customtype=Tx" json:"Tx,omitempty"` + Enc Envelope_Encoding `protobuf:"varint,3,opt,name=Enc,proto3,enum=txs.Envelope_Encoding" json:"Enc,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Envelope) Reset() { *m = Envelope{} } @@ -78,6 +103,13 @@ func (m *Envelope) GetSignatories() []Signatory { return nil } +func (m *Envelope) GetEnc() Envelope_Encoding { + if m != nil { + return m.Enc + } + return Envelope_JSON +} + func (*Envelope) XXX_MessageName() string { return "txs.Envelope" } @@ -209,6 +241,8 @@ func (*Receipt) XXX_MessageName() string { return "txs.Receipt" } func init() { + proto.RegisterEnum("txs.Envelope_Encoding", Envelope_Encoding_name, Envelope_Encoding_value) + golang_proto.RegisterEnum("txs.Envelope_Encoding", Envelope_Encoding_name, Envelope_Encoding_value) proto.RegisterType((*Envelope)(nil), "txs.Envelope") golang_proto.RegisterType((*Envelope)(nil), "txs.Envelope") proto.RegisterType((*Signatory)(nil), "txs.Signatory") @@ -221,34 +255,37 @@ func init() { proto.RegisterFile("txs.proto", fileDescriptor_372ebcf753025bdc) } func init() { golang_proto.RegisterFile("txs.proto", fileDescriptor_372ebcf753025bdc) } var fileDescriptor_372ebcf753025bdc = []byte{ - // 421 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xee, 0x39, 0x51, 0xda, 0x5c, 0x0a, 0x15, 0x37, 0xa0, 0xa8, 0x83, 0x1d, 0x32, 0x65, 0xa0, - 0x36, 0x0a, 0xbf, 0x24, 0x36, 0x5c, 0x21, 0x55, 0x45, 0x48, 0xe8, 0xf0, 0xc4, 0x80, 0xb0, 0x9d, - 0x87, 0x63, 0xc9, 0xf8, 0xac, 0xbb, 0x33, 0xdc, 0xfd, 0x27, 0x8c, 0xfc, 0x05, 0xec, 0x6c, 0x8c, - 0x19, 0x99, 0x33, 0x58, 0x28, 0xfd, 0x2f, 0x98, 0x90, 0xaf, 0xe7, 0xb4, 0x74, 0x08, 0x62, 0x7b, - 0x3f, 0xbe, 0xef, 0x7b, 0xdf, 0xbd, 0x77, 0x78, 0x28, 0x95, 0xf0, 0x2b, 0xce, 0x24, 0x23, 0x3d, - 0xa9, 0xc4, 0xf1, 0x49, 0x96, 0xcb, 0x65, 0x9d, 0xf8, 0x29, 0xfb, 0x18, 0x64, 0x2c, 0x63, 0x81, - 0xe9, 0x25, 0xf5, 0x07, 0x93, 0x99, 0xc4, 0x44, 0x97, 0x9c, 0xe3, 0xc3, 0x94, 0xeb, 0x4a, 0xda, - 0x6c, 0xfa, 0x1e, 0x1f, 0xbc, 0x28, 0x3f, 0x41, 0xc1, 0x2a, 0x20, 0x4f, 0xf0, 0xe8, 0x4d, 0x9e, - 0x95, 0xb1, 0x64, 0x3c, 0x07, 0x31, 0x46, 0x93, 0xde, 0x6c, 0x34, 0xbf, 0xed, 0xb7, 0xe3, 0xba, - 0xba, 0x0e, 0xfb, 0xab, 0xc6, 0xdb, 0xa3, 0xd7, 0x81, 0xe4, 0x2e, 0x76, 0x22, 0x35, 0x76, 0x26, - 0x68, 0x76, 0x18, 0x0e, 0xd6, 0x8d, 0xe7, 0x44, 0x8a, 0x3a, 0x91, 0x7a, 0xd6, 0xff, 0xf2, 0xd5, - 0xdb, 0x9b, 0x7e, 0x47, 0x78, 0xb8, 0xa5, 0x93, 0x73, 0xbc, 0xff, 0x7c, 0xb1, 0xe0, 0x20, 0x5a, - 0xfd, 0x96, 0xf0, 0x60, 0xdd, 0x78, 0xf7, 0xaf, 0xbd, 0x60, 0xa9, 0x2b, 0xe0, 0x05, 0x2c, 0x32, - 0xe0, 0x41, 0x52, 0x73, 0xce, 0x3e, 0x07, 0xd6, 0xb0, 0xe5, 0xd1, 0x4e, 0x80, 0x04, 0x78, 0xf8, - 0xba, 0x4e, 0x8a, 0x3c, 0x7d, 0x09, 0xda, 0x8c, 0x1f, 0xcd, 0xef, 0xf8, 0x16, 0xbc, 0x6d, 0xd0, - 0x2b, 0x4c, 0x4b, 0xb8, 0x74, 0x52, 0x73, 0x18, 0xf7, 0xff, 0x26, 0x6c, 0x1b, 0xf4, 0x0a, 0x33, - 0xfd, 0xe6, 0xe0, 0x7d, 0x0a, 0x29, 0xe4, 0x95, 0x24, 0xe7, 0x78, 0x10, 0xa9, 0x48, 0x57, 0x60, - 0x8c, 0xdf, 0x0a, 0xe7, 0xbf, 0x1b, 0xcf, 0xdf, 0x6d, 0x5c, 0x2a, 0x11, 0x54, 0xb1, 0x2e, 0x58, - 0xbc, 0xf0, 0x5b, 0x26, 0xb5, 0x0a, 0xe4, 0x55, 0xab, 0x75, 0x16, 0x8b, 0xa5, 0xdd, 0xda, 0xe3, - 0x76, 0xa9, 0xeb, 0xc6, 0x3b, 0xd9, 0xad, 0x97, 0xe4, 0x65, 0xcc, 0xb5, 0x7f, 0x06, 0x2a, 0xd4, - 0x12, 0x04, 0xb5, 0x22, 0x64, 0x86, 0x8f, 0x4e, 0x39, 0xc4, 0x12, 0xc4, 0x29, 0x2b, 0x25, 0x8f, - 0x53, 0x39, 0xee, 0x4d, 0xd0, 0xec, 0x80, 0xde, 0x2c, 0x93, 0x77, 0xf8, 0xa8, 0x8b, 0xbb, 0x33, - 0xf4, 0x8d, 0x83, 0x47, 0xd6, 0xc1, 0xff, 0x9d, 0xe2, 0xa6, 0x58, 0xf8, 0x74, 0xb5, 0x71, 0xd1, - 0xcf, 0x8d, 0x8b, 0x7e, 0x6d, 0x5c, 0xf4, 0xe3, 0xc2, 0x45, 0xab, 0x0b, 0x17, 0xbd, 0xbd, 0xf7, - 0xcf, 0x35, 0x25, 0x03, 0xf3, 0x1d, 0x1f, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xcb, 0xe2, 0x91, - 0x22, 0xdd, 0x02, 0x00, 0x00, + // 469 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x3b, 0x6f, 0xd4, 0x40, + 0x10, 0xbe, 0xb5, 0xad, 0x7b, 0xec, 0x85, 0x24, 0x6c, 0x11, 0x9d, 0x22, 0x61, 0x1f, 0x57, 0xb9, + 0x20, 0x36, 0x3a, 0x5e, 0x12, 0x1d, 0x8e, 0x4e, 0x8a, 0x8e, 0x57, 0xb4, 0x71, 0x45, 0x81, 0xe4, + 0xc7, 0xe2, 0xb3, 0x64, 0xbc, 0xd6, 0x7a, 0x0d, 0xf6, 0x3f, 0xa1, 0xa4, 0xa5, 0xa1, 0xa7, 0xa3, + 0xbc, 0x92, 0xfa, 0x0a, 0x0b, 0x5d, 0xfe, 0x05, 0x15, 0xda, 0x3d, 0xfb, 0x12, 0x52, 0x1c, 0x4a, + 0xb7, 0x33, 0xf3, 0x7d, 0xdf, 0x7c, 0x33, 0xb3, 0x70, 0xc0, 0xcb, 0xdc, 0xca, 0x18, 0xe5, 0x14, + 0xa9, 0xbc, 0xcc, 0x8f, 0x4f, 0xa2, 0x98, 0x2f, 0x0a, 0xdf, 0x0a, 0xe8, 0x47, 0x3b, 0xa2, 0x11, + 0xb5, 0x65, 0xcd, 0x2f, 0x3e, 0xc8, 0x48, 0x06, 0xf2, 0xb5, 0xe1, 0x1c, 0xef, 0x05, 0xac, 0xca, + 0x78, 0x13, 0x4d, 0xbe, 0x01, 0xd8, 0x9f, 0xa5, 0x9f, 0x48, 0x42, 0x33, 0x82, 0x9e, 0xc2, 0xe1, + 0x45, 0x1c, 0xa5, 0x1e, 0xa7, 0x2c, 0x26, 0xf9, 0x08, 0x8c, 0x55, 0x73, 0x38, 0xdd, 0xb7, 0x44, + 0xbf, 0x36, 0x5f, 0x39, 0xda, 0xb2, 0x36, 0x3a, 0xf8, 0x3a, 0x10, 0x1d, 0x41, 0xc5, 0x2d, 0x47, + 0xca, 0x18, 0x98, 0x7b, 0x4e, 0x77, 0x55, 0x1b, 0x8a, 0x5b, 0x62, 0xc5, 0x2d, 0x91, 0x09, 0xd5, + 0x59, 0x1a, 0x8c, 0xd4, 0x31, 0x30, 0xf7, 0xa7, 0x47, 0x52, 0xa7, 0xed, 0x65, 0xcd, 0xd2, 0x80, + 0x86, 0x71, 0x1a, 0x61, 0x01, 0x99, 0xdc, 0x13, 0x2e, 0x36, 0x09, 0xd4, 0x87, 0xda, 0xfc, 0xe2, + 0xed, 0x9b, 0xc3, 0x0e, 0xea, 0x41, 0x15, 0xbf, 0x3a, 0x3f, 0x04, 0xcf, 0xb5, 0x2f, 0x5f, 0x8d, + 0xce, 0xe4, 0x07, 0x80, 0x83, 0xad, 0x0f, 0x34, 0x87, 0xbd, 0x17, 0x61, 0xc8, 0x48, 0x2e, 0x8c, + 0x8a, 0xce, 0x0f, 0x57, 0xb5, 0xf1, 0xe0, 0xda, 0x2e, 0x16, 0x55, 0x46, 0x58, 0x42, 0xc2, 0x88, + 0x30, 0xdb, 0x2f, 0x18, 0xa3, 0x9f, 0xed, 0x66, 0xf4, 0x86, 0x87, 0x5b, 0x01, 0x64, 0xc3, 0xc1, + 0x79, 0xe1, 0x27, 0x71, 0xf0, 0x92, 0x54, 0x72, 0x8e, 0xe1, 0xf4, 0xae, 0xd5, 0x80, 0xb7, 0x05, + 0x7c, 0x85, 0x11, 0x84, 0x8d, 0x93, 0x82, 0x91, 0x91, 0xf6, 0x2f, 0x61, 0x5b, 0xc0, 0x57, 0x98, + 0xc9, 0x77, 0x05, 0xf6, 0x30, 0x09, 0x48, 0x9c, 0x71, 0x34, 0x87, 0x5d, 0xb7, 0x74, 0xab, 0x8c, + 0x48, 0xe3, 0x77, 0x9c, 0xe9, 0x9f, 0xda, 0xb0, 0x76, 0x1b, 0xe7, 0x65, 0x6e, 0x67, 0x5e, 0x95, + 0x50, 0x2f, 0xb4, 0x04, 0x13, 0x37, 0x0a, 0xe8, 0xb5, 0xd0, 0x3a, 0xf3, 0xf2, 0x45, 0xb3, 0xfe, + 0x27, 0xe2, 0x3a, 0xab, 0xda, 0x38, 0xd9, 0xad, 0xe7, 0xc7, 0xa9, 0xc7, 0x2a, 0xeb, 0x8c, 0x94, + 0x4e, 0xc5, 0x49, 0x8e, 0x1b, 0x11, 0x64, 0xc2, 0x83, 0x53, 0x46, 0x3c, 0x4e, 0xf2, 0x53, 0x9a, + 0x72, 0xe6, 0x05, 0x5c, 0x5e, 0xaf, 0x8f, 0x6f, 0xa6, 0xd1, 0x7b, 0x78, 0xd0, 0xbe, 0xdb, 0x33, + 0x68, 0xd2, 0xc1, 0xe3, 0xc6, 0xc1, 0xed, 0x4e, 0x71, 0x53, 0xcc, 0x79, 0xb6, 0x5c, 0xeb, 0xe0, + 0xd7, 0x5a, 0x07, 0xbf, 0xd7, 0x3a, 0xf8, 0x79, 0xa9, 0x83, 0xe5, 0xa5, 0x0e, 0xde, 0xdd, 0xff, + 0xef, 0x9a, 0xfc, 0xae, 0xfc, 0xd8, 0x8f, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x7c, 0xcd, + 0xa7, 0x27, 0x03, 0x00, 0x00, } func (m *Envelope) Marshal() (dAtA []byte, err error) { @@ -288,6 +325,11 @@ func (m *Envelope) MarshalTo(dAtA []byte) (int, error) { } i += n1 } + if m.Enc != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTxs(dAtA, i, uint64(m.Enc)) + } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -422,6 +464,9 @@ func (m *Envelope) Size() (n int) { l = m.Tx.Size() n += 1 + l + sovTxs(uint64(l)) } + if m.Enc != 0 { + n += 1 + sovTxs(uint64(m.Enc)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -585,6 +630,25 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enc", wireType) + } + m.Enc = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTxs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Enc |= Envelope_Encoding(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTxs(dAtA[iNdEx:]) From 653486b312b8eca2260141279acc6646fececd92 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Tue, 17 Sep 2019 16:22:28 +0100 Subject: [PATCH 008/185] balance conversions, remove callTx err on no code, signing Signed-off-by: Gregory Hill --- acm/balance/balance.go | 16 + acm/balance/balance_test.go | 7 + acm/private_account.go | 33 +- acm/validator/validator.go | 5 +- consensus/tendermint/tendermint.go | 7 +- crypto/crypto.go | 11 - crypto/hash.go | 26 + crypto/private_key.go | 4 +- crypto/public_key.go | 13 +- crypto/signature.go | 3 +- crypto/tendermint.go | 29 +- encoding/rlp/rlp.go | 2 - execution/contexts/call_context.go | 21 +- execution/contexts/send_context.go | 2 +- forensics/storage/kvcache_test.go | 4 +- integration/integration.go | 4 +- integration/keys/keys_server_test.go | 2 +- protobuf/payload.proto | 2 + rpc/eth.go | 260 ++++---- rpc/eth_test.go | 69 ++- rpc/service.go | 2 +- rpc/web3/server.go | 34 +- rpc/web3/types.go | 894 +++++++-------------------- txs/payload/payload.pb.go | 175 +++--- txs/tx.go | 43 +- 25 files changed, 668 insertions(+), 1000 deletions(-) create mode 100644 crypto/hash.go diff --git a/acm/balance/balance.go b/acm/balance/balance.go index e8a927c73..978575358 100644 --- a/acm/balance/balance.go +++ b/acm/balance/balance.go @@ -2,9 +2,14 @@ package balance import ( "fmt" + "math/big" "sort" ) +var ( + eth = new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil) +) + type Balances []Balance func (b Balance) String() string { @@ -125,3 +130,14 @@ func (bs Balances) HasNative() bool { func (bs Balances) HasPower() bool { return bs.Has(TypePower) } + +func NativeToWei(n uint64) *big.Int { + // 1 unit == 1 ether + x := new(big.Int).SetUint64(n) + return new(big.Int).Mul(x, eth) +} + +func WeiToNative(n []byte) *big.Int { + x := new(big.Int).SetBytes(n) + return new(big.Int).Div(x, eth) +} diff --git a/acm/balance/balance_test.go b/acm/balance/balance_test.go index d69157d46..5f8c2dcf5 100644 --- a/acm/balance/balance_test.go +++ b/acm/balance/balance_test.go @@ -20,3 +20,10 @@ func TestSort(t *testing.T) { sort.Sort(balances) assert.Equal(t, sortedBalances, balances) } + +func TestEtherConversion(t *testing.T) { + wei := NativeToWei(1) + assert.Equal(t, wei.String(), "1000000000000000000", "must equal one ether") + native := WeiToNative(wei.Bytes()) + assert.Equal(t, native.Uint64(), uint64(1)) +} diff --git a/acm/private_account.go b/acm/private_account.go index cade0b03d..3cc2b7ab6 100644 --- a/acm/private_account.go +++ b/acm/private_account.go @@ -105,8 +105,8 @@ func SigningAccounts(concretePrivateAccounts []*PrivateAccount) []AddressableSig } // Generates a new account with private key. -func GeneratePrivateAccount() (*PrivateAccount, error) { - privateKey, err := crypto.GeneratePrivateKey(nil, crypto.CurveTypeEd25519) +func GeneratePrivateAccount(ct crypto.CurveType) (*PrivateAccount, error) { + privateKey, err := crypto.GeneratePrivateKey(nil, ct) if err != nil { return nil, err } @@ -118,9 +118,7 @@ func GeneratePrivateAccount() (*PrivateAccount, error) { }.PrivateAccount(), nil } -// Generates a new account with private key from SHA256 hash of a secret -func GeneratePrivateAccountFromSecret(secret string) *PrivateAccount { - privateKey := crypto.PrivateKeyFromSecret(secret, crypto.CurveTypeEd25519) +func privateAccount(privateKey crypto.PrivateKey) *PrivateAccount { publicKey := privateKey.GetPublicKey() return ConcretePrivateAccount{ Address: publicKey.GetAddress(), @@ -129,25 +127,12 @@ func GeneratePrivateAccountFromSecret(secret string) *PrivateAccount { }.PrivateAccount() } -func GenerateEthereumAccountFromSecret(secret string) *PrivateAccount { - privateKey := crypto.PrivateKeyFromSecret(secret, crypto.CurveTypeSecp256k1) - publicKey := privateKey.GetPublicKey() - return ConcretePrivateAccount{ - Address: publicKey.GetAddress(), - PublicKey: publicKey, - PrivateKey: privateKey, - }.PrivateAccount() +// Generates a new account with private key from SHA256 hash of a secret +func GeneratePrivateAccountFromSecret(secret string) *PrivateAccount { + return privateAccount(crypto.PrivateKeyFromSecret(secret, crypto.CurveTypeEd25519)) + } -func PrivateAccountFromPrivateKeyBytes(privKeyBytes []byte) (*PrivateAccount, error) { - privateKey, err := crypto.PrivateKeyFromRawBytes(privKeyBytes, crypto.CurveTypeEd25519) - if err != nil { - return nil, err - } - publicKey := privateKey.GetPublicKey() - return ConcretePrivateAccount{ - Address: publicKey.GetAddress(), - PublicKey: publicKey, - PrivateKey: privateKey, - }.PrivateAccount(), nil +func GenerateEthereumAccountFromSecret(secret string) *PrivateAccount { + return privateAccount(crypto.PrivateKeyFromSecret(secret, crypto.CurveTypeSecp256k1)) } diff --git a/acm/validator/validator.go b/acm/validator/validator.go index c428e9be7..0a788441f 100644 --- a/acm/validator/validator.go +++ b/acm/validator/validator.go @@ -38,10 +38,11 @@ func (v *Validator) GetAddress() crypto.Address { } func FromAccount(acc *acm.Account, power uint64) *Validator { - address := acc.GetAddress() + pubKey := acc.GetPublicKey() + address, _ := crypto.AddressFromBytes(pubKey.TendermintAddress().Bytes()) return &Validator{ Address: &address, - PublicKey: acc.GetPublicKey(), + PublicKey: pubKey, Power: power, } } diff --git a/consensus/tendermint/tendermint.go b/consensus/tendermint/tendermint.go index bbdfa6766..eb1700ef8 100644 --- a/consensus/tendermint/tendermint.go +++ b/consensus/tendermint/tendermint.go @@ -79,9 +79,10 @@ func DeriveGenesisDoc(burrowGenesisDoc *genesis.GenesisDoc, appHash []byte) *tmT validators := make([]tmTypes.GenesisValidator, len(burrowGenesisDoc.Validators)) for i, validator := range burrowGenesisDoc.Validators { validators[i] = tmTypes.GenesisValidator{ - PubKey: validator.PublicKey.TendermintPubKey(), - Name: validator.Name, - Power: int64(validator.Amount), + Address: validator.PublicKey.TendermintAddress(), + PubKey: validator.PublicKey.TendermintPubKey(), + Name: validator.Name, + Power: int64(validator.Amount), } } consensusParams := tmTypes.DefaultConsensusParams() diff --git a/crypto/crypto.go b/crypto/crypto.go index fdfe44d83..215b7faf4 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -2,8 +2,6 @@ package crypto import ( "fmt" - - "golang.org/x/crypto/sha3" ) type CurveType uint32 @@ -75,12 +73,3 @@ type Signer interface { type Signable interface { SignBytes(chainID string) ([]byte, error) } - -func LegacyKeccak256Hash(data []byte) ([]byte, error) { - hash := sha3.NewLegacyKeccak256() - _, err := hash.Write(data) - if err != nil { - return nil, err - } - return hash.Sum(nil), nil -} diff --git a/crypto/hash.go b/crypto/hash.go new file mode 100644 index 000000000..ba69d5c29 --- /dev/null +++ b/crypto/hash.go @@ -0,0 +1,26 @@ +package crypto + +import ( + "crypto/sha256" + + "golang.org/x/crypto/ripemd160" + "golang.org/x/crypto/sha3" +) + +func Keccak256(data []byte) []byte { + hash := sha3.NewLegacyKeccak256() + hash.Write(data) + return hash.Sum(nil) +} + +func SHA256(data []byte) []byte { + hash := sha256.New() + hash.Write(data) + return hash.Sum(nil) +} + +func RIPEMD160(data []byte) []byte { + hash := ripemd160.New() + hash.Write(data) + return hash.Sum(nil) +} diff --git a/crypto/private_key.go b/crypto/private_key.go index f4516cf66..b2ac21957 100644 --- a/crypto/private_key.go +++ b/crypto/private_key.go @@ -56,7 +56,7 @@ func (p PrivateKey) Sign(msg []byte) (*Signature, error) { len(p.PrivateKey), btcec.PrivKeyBytesLen) } privKey, _ := btcec.PrivKeyFromBytes(btcec.S256(), p.PrivateKey) - sig, err := privKey.Sign(msg) + sig, err := privKey.Sign(Keccak256(msg)) if err != nil { return nil, err } @@ -101,7 +101,7 @@ func PrivateKeyFromRawBytes(privKeyBytes []byte, curveType CurveType) (PrivateKe if !bytes.Equal(privKey.Serialize(), privKeyBytes) { return PrivateKey{}, fmt.Errorf("serialisation of Secp256k1 private key bytes does not equal") } - return PrivateKey{PrivateKey: privKey.Serialize(), PublicKey: pubKey.SerializeCompressed(), CurveType: CurveTypeSecp256k1}, nil + return PrivateKey{PrivateKey: privKeyBytes, PublicKey: pubKey.SerializeCompressed(), CurveType: CurveTypeSecp256k1}, nil default: return PrivateKey{}, ErrInvalidCurve(curveType) } diff --git a/crypto/public_key.go b/crypto/public_key.go index a16e59d0c..a2b38586a 100644 --- a/crypto/public_key.go +++ b/crypto/public_key.go @@ -97,11 +97,7 @@ func (p PublicKey) Verify(msg []byte, signature *Signature) error { if err != nil { return fmt.Errorf("could not parse DER signature for secp256k1 key: %v", err) } - hash, err := LegacyKeccak256Hash(msg) - if err != nil { - return err - } - if sig.Verify(hash, pub) { + if sig.Verify(Keccak256(msg), pub) { return nil } return fmt.Errorf("signature '%X' is not a valid secp256k1 signature for message: %s", @@ -117,8 +113,11 @@ func (p PublicKey) GetAddress() Address { addr, _ := AddressFromBytes(tmhash.Sum(p.PublicKey)) return addr case CurveTypeSecp256k1: - pub, _ := btcec.ParsePubKey(p.PublicKey.Bytes(), btcec.S256()) - hash, _ := LegacyKeccak256Hash(pub.SerializeUncompressed()[1:]) + pub, err := btcec.ParsePubKey(p.PublicKey.Bytes(), btcec.S256()) + if err != nil { + return Address{} + } + hash := Keccak256(pub.SerializeUncompressed()[1:]) addr, _ := AddressFromBytes(hash[len(hash)-20:]) return addr default: diff --git a/crypto/signature.go b/crypto/signature.go index 44aea97d2..ca2aa27e1 100644 --- a/crypto/signature.go +++ b/crypto/signature.go @@ -33,8 +33,7 @@ func (sig *Signature) String() string { func CompressedSignatureFromParams(v uint64, r, s []byte) []byte { bitlen := (btcec.S256().BitSize + 7) / 8 sig := make([]byte, 1+bitlen*2) - chainID := uint64(1) - sig[0] = byte(v - chainID - 8) + sig[0] = byte(v) copy(sig[1:bitlen+1], r) copy(sig[bitlen+1:], s) return sig diff --git a/crypto/tendermint.go b/crypto/tendermint.go index f7265ba68..570e69b6b 100644 --- a/crypto/tendermint.go +++ b/crypto/tendermint.go @@ -3,6 +3,7 @@ package crypto import ( "fmt" + "github.com/btcsuite/btcd/btcec" abci "github.com/tendermint/tendermint/abci/types" tmCrypto "github.com/tendermint/tendermint/crypto" tmEd25519 "github.com/tendermint/tendermint/crypto/ed25519" @@ -29,7 +30,7 @@ func PublicKeyFromABCIPubKey(pubKey abci.PubKey) (PublicKey, error) { }, nil case CurveTypeSecp256k1.ABCIType(): return PublicKey{ - CurveType: CurveTypeEd25519, + CurveType: CurveTypeSecp256k1, PublicKey: pubKey.Data, }, nil } @@ -61,8 +62,34 @@ func (p PublicKey) TendermintPubKey() tmCrypto.PubKey { } } +func (p PublicKey) TendermintAddress() tmCrypto.Address { + switch p.CurveType { + case CurveTypeEd25519: + return tmCrypto.Address(p.GetAddress().Bytes()) + case CurveTypeSecp256k1: + // Tendermint represents addresses like Bitcoin + return tmCrypto.Address(RIPEMD160(SHA256(p.PublicKey[:]))) + default: + panic(fmt.Sprintf("unknown CurveType %d", p.CurveType)) + } +} + // Signature extensions func (sig Signature) TendermintSignature() []byte { + switch sig.CurveType { + case CurveTypeSecp256k1: + sig, err := btcec.ParseDERSignature(sig.GetSignature(), btcec.S256()) + if err != nil { + return nil + } + // https://github.com/tendermint/tendermint/blob/master/crypto/secp256k1/secp256k1_nocgo.go#L62 + r := sig.R.Bytes() + s := sig.S.Bytes() + data := make([]byte, 64) + copy(data[32-len(r):32], r) + copy(data[64-len(s):64], s) + return data + } return sig.Signature } diff --git a/encoding/rlp/rlp.go b/encoding/rlp/rlp.go index f7fb1f3b2..4b1cc62f6 100644 --- a/encoding/rlp/rlp.go +++ b/encoding/rlp/rlp.go @@ -263,8 +263,6 @@ func decodeLength(input []byte) (uint8, uint8, reflect.Kind, error) { } } - fmt.Println(hex.EncodeToString([]byte{prefix})) - return 0, 0, reflect.Invalid, ErrInvalid } diff --git a/execution/contexts/call_context.go b/execution/contexts/call_context.go index 8fb38193a..26c1018d8 100644 --- a/execution/contexts/call_context.go +++ b/execution/contexts/call_context.go @@ -167,7 +167,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error txCache.UpdateMetaMap(callee, metamap) } } else { - if outAcc == nil || (len(outAcc.EVMCode) == 0 && len(outAcc.WASMCode) == 0) { + if outAcc == nil { // if you call an account that doesn't exist // or an account with no code then we take fees (sorry pal) // NOTE: it's fine to create a contract and call it within one @@ -175,20 +175,11 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error // but to create with one contract and call with another // you have to wait a block to avoid a re-ordering attack // that will take your fees - var exception *errors.Exception - if outAcc == nil { - exception = errors.ErrorCodef(errors.ErrorCodeInvalidAddress, - "CallTx to an address (%v) that does not exist", ctx.tx.Address) - ctx.Logger.Info.Log(structure.ErrorKey, exception, - "caller_address", inAcc.GetAddress(), - "callee_address", ctx.tx.Address) - } else { - exception = errors.ErrorCodef(errors.ErrorCodeInvalidAddress, - "CallTx to an address (%v) that holds no code", ctx.tx.Address) - ctx.Logger.Info.Log(exception, - "caller_address", inAcc.GetAddress(), - "callee_address", ctx.tx.Address) - } + exception := errors.ErrorCodef(errors.ErrorCodeInvalidAddress, + "CallTx to an address (%v) that does not exist", ctx.tx.Address) + ctx.Logger.Info.Log(structure.ErrorKey, exception, + "caller_address", inAcc.GetAddress(), + "callee_address", ctx.tx.Address) ctx.txe.PushError(exception) ctx.CallEvents(exception) return nil diff --git a/execution/contexts/send_context.go b/execution/contexts/send_context.go index 84fb546ac..53a7bff4f 100644 --- a/execution/contexts/send_context.go +++ b/execution/contexts/send_context.go @@ -21,7 +21,7 @@ func (ctx *SendContext) Execute(txe *exec.TxExecution, p payload.Payload) error var ok bool ctx.tx, ok = p.(*payload.SendTx) if !ok { - return fmt.Errorf("payload must be NameTx, but is: %v", txe.Envelope.Tx.Payload) + return fmt.Errorf("payload must be SendTx, but is: %v", txe.Envelope.Tx.Payload) } accounts, inTotal, err := getInputs(ctx.StateWriter, ctx.tx.Inputs) if err != nil { diff --git a/forensics/storage/kvcache_test.go b/forensics/storage/kvcache_test.go index b5aabcefc..29ed90d11 100644 --- a/forensics/storage/kvcache_test.go +++ b/forensics/storage/kvcache_test.go @@ -48,11 +48,11 @@ func TestKVCache_Iterator2(t *testing.T) { } func BenchmarkKVCache_Iterator_1E6_Inserts(b *testing.B) { - benchmarkKVCache_Iterator(b, 1E6) + benchmarkKVCache_Iterator(b, 1e6) } func BenchmarkKVCache_Iterator_1E7_Inserts(b *testing.B) { - benchmarkKVCache_Iterator(b, 1E7) + benchmarkKVCache_Iterator(b, 1e7) } func benchmarkKVCache_Iterator(b *testing.B, inserts int) { diff --git a/integration/integration.go b/integration/integration.go index 3ac5b8b46..93c2b3217 100644 --- a/integration/integration.go +++ b/integration/integration.go @@ -191,12 +191,14 @@ func TestGenesisDoc(addressables []*acm.PrivateAccount, vals ...int) *genesis.Ge for _, i := range vals { name := fmt.Sprintf("user_%d", i) validators[name] = validator.FromAccount(accounts[name], 1<<16) + // Tendermint validators use a different addressing scheme for secp256k1 + accounts[name].Address = validators[name].GetAddress() } return genesis.MakeGenesisDocFromAccounts(ChainName, nil, genesisTime, accounts, validators) } -// Deterministic account generation helper. Pass number of accounts to make +// Default deterministic account generation helper, pass number of accounts to make func MakePrivateAccounts(sec string, n int) []*acm.PrivateAccount { accounts := make([]*acm.PrivateAccount, n) for i := 0; i < n; i++ { diff --git a/integration/keys/keys_server_test.go b/integration/keys/keys_server_test.go index d5338a846..bf90cf98e 100644 --- a/integration/keys/keys_server_test.go +++ b/integration/keys/keys_server_test.go @@ -84,7 +84,7 @@ func TestKeysServer(t *testing.T) { _, err = cli.Verify(ctx, &keys.VerifyRequest{ Signature: sig.GetSignature(), PublicKey: resp.GetPublicKey(), - Message: msg, + Message: hash, }) require.NoError(t, err) }) diff --git a/protobuf/payload.proto b/protobuf/payload.proto index 9838cc74b..c33bcae66 100644 --- a/protobuf/payload.proto +++ b/protobuf/payload.proto @@ -73,6 +73,8 @@ message CallTx { bytes WASM = 6 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false, (gogoproto.jsontag)="tags,omitempty"]; // Set of contracts this code will deploy repeated ContractMeta ContractMeta = 7; + // The upper bound on the price per unit of gas + uint64 GasPrice = 8; } message ContractMeta { diff --git a/rpc/eth.go b/rpc/eth.go index 0a8326bf0..ba960339e 100644 --- a/rpc/eth.go +++ b/rpc/eth.go @@ -9,6 +9,7 @@ import ( "strings" "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/acm/balance" "github.com/hyperledger/burrow/acm/validator" bcm "github.com/hyperledger/burrow/bcm" bin "github.com/hyperledger/burrow/binary" @@ -29,6 +30,10 @@ import ( "github.com/tendermint/tendermint/types" ) +const ( + ChainID = 1 +) + // EthService is a web3 provider type EthService struct { accounts acmstate.IterableStatsReader @@ -89,13 +94,8 @@ func (srv *EthService) Web3Sha3(req *web3.Web3Sha3Params) (*web3.Web3Sha3Result, return nil, err } - hash, err := crypto.LegacyKeccak256Hash(data) - if err != nil { - return nil, err - } - return &web3.Web3Sha3Result{ - HashedData: encoding.HexEncodeBytes(hash), + HashedData: encoding.HexEncodeBytes(crypto.Keccak256(data)), }, nil } @@ -116,9 +116,8 @@ func (srv *EthService) NetPeerCount() (*web3.NetPeerCountResult, error) { // NetVersion returns the hex encoding of the genesis hash, // this is typically a small int (where 1 == Ethereum mainnet) func (srv *EthService) NetVersion() (*web3.NetVersionResult, error) { - doc := srv.blockchain.GenesisDoc() return &web3.NetVersionResult{ - ChainID: encoding.HexEncodeBytes(doc.ShortHash()), + ChainID: encoding.HexEncodeNumber(uint64(ChainID)), }, nil } @@ -168,6 +167,8 @@ func (srv *EthService) EthCall(req *web3.EthCallParams) (*web3.EthCallResult, er txe, err := execution.CallSim(srv.accounts, srv.blockchain, from, to, data, srv.logger) if err != nil { return nil, err + } else if err = txe.GetException(); err != nil { + return nil, err } var result string @@ -195,7 +196,7 @@ func (srv *EthService) EthGetBalance(req *web3.EthGetBalanceParams) (*web3.EthGe } return &web3.EthGetBalanceResult{ - GetBalanceResult: encoding.HexEncodeNumber(acc.Balance), + GetBalanceResult: encoding.HexEncodeBytes(balance.NativeToWei(acc.Balance).Bytes()), }, nil } @@ -212,9 +213,7 @@ func (srv *EthService) EthGetBlockByHash(req *web3.EthGetBlockByHashParams) (*we } return &web3.EthGetBlockByHashResult{ - GetBlockByHashResult: web3.GetBlockByHashResult{ - Block: *block, - }, + GetBlockByHashResult: block, }, web3.ErrNotFound } @@ -231,9 +230,7 @@ func (srv *EthService) EthGetBlockByNumber(req *web3.EthGetBlockByNumberParams) } return &web3.EthGetBlockByNumberResult{ - GetBlockByNumberResult: web3.GetBlockByNumberResult{ - Block: *block, - }, + GetBlockByNumberResult: block, }, nil } @@ -290,21 +287,6 @@ func (srv *EthService) EthGetCode(req *web3.EthGetCodeParams) (*web3.EthGetCodeR }, nil } -// TODO -func (srv *EthService) EthGetRawTransactionByHash(req *web3.EthGetRawTransactionByHashParams) (*web3.EthGetRawTransactionByHashResult, error) { - return nil, web3.ErrNotFound -} - -// TODO -func (srv *EthService) EthGetRawTransactionByBlockHashAndIndex(req *web3.EthGetRawTransactionByBlockHashAndIndexParams) (*web3.EthGetRawTransactionByBlockHashAndIndexResult, error) { - return nil, web3.ErrNotFound -} - -// TODO -func (srv *EthService) EthGetRawTransactionByBlockNumberAndIndex(req *web3.EthGetRawTransactionByBlockNumberAndIndexParams) (*web3.EthGetRawTransactionByBlockNumberAndIndexResult, error) { - return nil, web3.ErrNotFound -} - // TODO func (srv *EthService) EthGetStorageAt(req *web3.EthGetStorageAtParams) (*web3.EthGetStorageAtResult, error) { // addr, err := crypto.AddressFromHexString(req.Address) @@ -359,7 +341,9 @@ func (srv *EthService) EthGetTransactionByHash(req *web3.EthGetTransactionByHash // EthGetTransactionCount returns the number of transactions sent from an address func (srv *EthService) EthGetTransactionCount(req *web3.EthGetTransactionCountParams) (*web3.EthGetTransactionCountResult, error) { // TODO: implement - return nil, web3.ErrNotFound + return &web3.EthGetTransactionCountResult{ + NonceOrNull: encoding.HexEncodeNumber(0), + }, nil } // EthGetTransactionReceipt returns the receipt of a previously committed tx @@ -447,12 +431,24 @@ func (srv *EthService) EthPendingTransactions() (*web3.EthPendingTransactionsRes }, nil } +func (srv *EthService) EthEstimateGas(req *web3.EthEstimateGasParams) (*web3.EthEstimateGasResult, error) { + return &web3.EthEstimateGasResult{ + GasUsed: encoding.HexEncodeNumber(0), + }, nil +} + +func (srv *EthService) EthGasPrice() (*web3.EthGasPriceResult, error) { + return &web3.EthGasPriceResult{ + GasPrice: encoding.HexEncodeNumber(0), + }, nil +} + type RawTx struct { Nonce uint64 `json:"nonce"` GasPrice uint64 `json:"gasPrice"` - Gas uint64 `json:"gas"` + GasLimit uint64 `json:"gasLimit"` To []byte `json:"to"` - Value uint64 `json:"value"` + Value []byte `json:"value"` Data []byte `json:"data"` V uint64 `json:"v"` @@ -460,6 +456,21 @@ type RawTx struct { S []byte `json:"s"` } +// TODO +func (srv *EthService) EthGetRawTransactionByHash(req *web3.EthGetRawTransactionByHashParams) (*web3.EthGetRawTransactionByHashResult, error) { + return nil, web3.ErrNotFound +} + +// TODO +func (srv *EthService) EthGetRawTransactionByBlockHashAndIndex(req *web3.EthGetRawTransactionByBlockHashAndIndexParams) (*web3.EthGetRawTransactionByBlockHashAndIndexResult, error) { + return nil, web3.ErrNotFound +} + +// TODO +func (srv *EthService) EthGetRawTransactionByBlockNumberAndIndex(req *web3.EthGetRawTransactionByBlockNumberAndIndexParams) (*web3.EthGetRawTransactionByBlockNumberAndIndexResult, error) { + return nil, web3.ErrNotFound +} + func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionParams) (*web3.EthSendRawTransactionResult, error) { data, err := encoding.HexDecodeToBytes(req.SignedTransactionData) if err != nil { @@ -472,28 +483,14 @@ func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionPara return nil, err } - toHash := []interface{}{ - rawTx.Nonce, - rawTx.GasPrice, - rawTx.Gas, - rawTx.To, - rawTx.Value, - rawTx.Data, - big.NewInt(1).Uint64(), uint(0), uint(0), - } - - enc, err := rlp.Encode(toHash) - if err != nil { - return nil, err - } - - hash, err := crypto.LegacyKeccak256Hash(enc) + net := uint64(ChainID) + enc, err := txs.RLPEncode(rawTx.Nonce, rawTx.GasPrice, rawTx.GasLimit, rawTx.To, rawTx.Value, rawTx.Data) if err != nil { return nil, err } - sig := crypto.CompressedSignatureFromParams(rawTx.V-1, rawTx.R, rawTx.S) - pub, err := crypto.PublicKeyFromSignature(sig, hash) + sig := crypto.CompressedSignatureFromParams(rawTx.V-net-8-1, rawTx.R, rawTx.S) + pub, err := crypto.PublicKeyFromSignature(sig, crypto.Keccak256(enc)) if err != nil { return nil, err } @@ -509,6 +506,8 @@ func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionPara return nil, err } + amount := balance.WeiToNative(rawTx.Value).Uint64() + txEnv := &txs.Envelope{ Signatories: []txs.Signatory{ { @@ -520,20 +519,18 @@ func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionPara Enc: txs.Envelope_RLP, Tx: &txs.Tx{ ChainID: srv.blockchain.ChainID(), - Payload: &payload.SendTx{ - Inputs: []*payload.TxInput{ - { - Address: from, - Amount: rawTx.Value, - Sequence: rawTx.Nonce, - }, - }, - Outputs: []*payload.TxOutput{ - { - Address: to, - Amount: rawTx.Value, - }, + Payload: &payload.CallTx{ + Input: &payload.TxInput{ + Address: from, + Amount: amount, + // first tx sequence should be 1, + // but metamask starts at 0 + Sequence: rawTx.Nonce + 1, }, + Address: &to, + GasLimit: rawTx.GasLimit, + GasPrice: rawTx.GasPrice, + Data: rawTx.Data, }, }, } @@ -546,14 +543,16 @@ func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionPara return nil, txe.Exception.AsError() } - return nil, nil + return &web3.EthSendRawTransactionResult{ + TransactionHash: encoding.HexEncodeBytes(txe.GetTxHash().Bytes()), + }, nil } // EthSyncing returns this nodes syncing status (i.e. whether it has caught up) func (srv *EthService) EthSyncing() (*web3.EthSyncingResult, error) { // TODO: remaining sync fields return &web3.EthSyncingResult{ - SyncStatus: web3.SyncStatus{ + Syncing: web3.SyncStatus{ CurrentBlock: encoding.HexEncodeNumber(srv.blockchain.LastBlockHeight()), }, }, nil @@ -575,15 +574,31 @@ func (srv *EthService) getBlockHeaderAtHeight(height uint64) (*types.Header, err return srv.blockchain.GetBlockHeader(height) } -func (srv *EthService) getBlockInfoAtHeight(height uint64) (*web3.Block, error) { +func (srv *EthService) getBlockInfoAtHeight(height uint64) (web3.Block, error) { block, err := srv.getBlockHeaderAtHeight(height) if err != nil { - return nil, err + return web3.Block{}, err } else if block == nil { - return nil, fmt.Errorf("block at height %d does not exist", height) - } - - return &web3.Block{ + return web3.Block{}, fmt.Errorf("block at height %d does not exist", height) + } + + return web3.Block{ + Hash: encoding.HexEncodeBytes(block.Hash().Bytes()), + Nonce: "0x0", + Sha3Uncles: "0x0000000000000000000000000000000000000000000000000000000000000000", + Size: "0x0", + Number: encoding.HexEncodeNumber(uint64(block.Height)), + LogsBloom: "0x0", + StateRoot: encoding.HexEncodeBytes(block.AppHash.Bytes()), + ReceiptsRoot: encoding.HexEncodeBytes(block.AppHash.Bytes()), + Miner: encoding.HexEncodeBytes(block.ProposerAddress), + TotalDifficulty: "0x0", + ExtraData: "0x0", + Difficulty: "0x0", + GasLimit: "0x0", + GasUsed: "0x0", + Timestamp: encoding.HexEncodeNumber(uint64(block.Time.Unix())), + ParentHash: encoding.HexEncodeBytes(block.AppHash.Bytes()), TransactionsRoot: encoding.HexEncodeBytes(block.AppHash.Bytes()), }, nil } @@ -662,21 +677,17 @@ func payloadToTx(in payload.Payload) web3.Transaction { } } -// TODO: deprecate? > https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1767.md#rationale - -type SendOrCall struct { - input payload.TxInput - to *crypto.Address - gas uint64 -} +// Note: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1767.md#rationale // EthSendTransaction constructs, signs and broadcasts a tx from the local node func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (*web3.EthSendTransactionResult, error) { - tx := SendOrCall{} + tx := &payload.CallTx{ + Input: new(payload.TxInput), + } var err error if from := req.Transaction.From; from != "" { - tx.input.Address, err = encoding.HexDecodeToAddress(from) + tx.Input.Address, err = encoding.HexDecodeToAddress(from) if err != nil { return nil, fmt.Errorf("failed to parse from address: %v", err) } @@ -685,62 +696,55 @@ func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (* } if value := req.Transaction.Value; value != "" { - tx.input.Amount, err = strconv.ParseUint(value, 0, 64) + tx.Input.Amount, err = strconv.ParseUint(value, 0, 64) if err != nil { return nil, fmt.Errorf("failed to parse amount: %v", err) } } - acc, err := srv.accounts.GetAccount(tx.input.Address) + acc, err := srv.accounts.GetAccount(tx.Input.Address) if err != nil { return nil, err + } else if acc == nil { + return nil, fmt.Errorf("account %s does not exist", tx.Input.Address.String()) } - tx.input.Sequence = acc.Sequence + 1 + tx.Input.Sequence = acc.Sequence + 1 if to := req.Transaction.To; to != "" { addr, err := encoding.HexDecodeToAddress(to) if err != nil { return nil, fmt.Errorf("failed to parse to address: %v", err) } - tx.to = &addr + tx.Address = &addr } // gas provided for the transaction execution - if gas := req.Transaction.Gas; gas != "" { - tx.gas, err = strconv.ParseUint(gas, 0, 64) + if gasLimit := req.Transaction.Gas; gasLimit != "" { + tx.GasLimit, err = strconv.ParseUint(gasLimit, 0, 64) if err != nil { - return nil, fmt.Errorf("failed to parse gas: %v", err) + return nil, fmt.Errorf("failed to parse gasLimit: %v", err) + } + } + + if gasPrice := req.Transaction.GasPrice; gasPrice != "" { + tx.GasPrice, err = strconv.ParseUint(gasPrice, 0, 64) + if err != nil { + return nil, fmt.Errorf("failed to parse gasPrice: %v", err) } } - var input payload.Payload if data := req.Transaction.Data; data != "" { bs, err := encoding.HexDecodeToBytes(data) if err != nil { return nil, fmt.Errorf("failed to parse data: %v", err) } - // if request contains data then do a callTx - input = &payload.CallTx{ - Input: &tx.input, - Address: tx.to, - GasLimit: tx.gas, - Data: bin.HexBytes(bs), - } - } else { - input = &payload.SendTx{ - Inputs: []*payload.TxInput{&tx.input}, - Outputs: []*payload.TxOutput{ - &payload.TxOutput{ - Amount: tx.input.Amount, - }, - }, - } + tx.Data = bin.HexBytes(bs) } - txEnv := txs.Enclose(srv.blockchain.ChainID(), input) + txEnv := txs.Enclose(srv.blockchain.ChainID(), tx) - signer, err := keys.AddressableSigner(srv.keyClient, tx.input.Address) + signer, err := keys.AddressableSigner(srv.keyClient, tx.Input.Address) if err != nil { return nil, err } @@ -778,6 +782,8 @@ func (srv *EthService) EthAccounts() (*web3.EthAccountsResult, error) { key, err := srv.keyStore.GetKey("", data) if err != nil { return nil, fmt.Errorf("could not retrieve key for %s", addr) + } else if key.CurveType != crypto.CurveTypeSecp256k1 { + continue } addrs = append(addrs, encoding.HexEncodeBytes(key.Address.Bytes())) } @@ -787,8 +793,38 @@ func (srv *EthService) EthAccounts() (*web3.EthAccountsResult, error) { }, nil } +// EthSign: https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign func (srv *EthService) EthSign(req *web3.EthSignParams) (*web3.EthSignResult, error) { - return nil, web3.ErrNotFound + addr, err := encoding.HexDecodeToBytes(req.Address) + if err != nil { + return nil, err + } + to, err := crypto.AddressFromBytes(addr) + if err != nil { + return nil, err + } + signer, err := keys.AddressableSigner(srv.keyClient, to) + if err != nil { + return nil, err + } + + data, err := encoding.HexDecodeToBytes(req.Bytes) + if err != nil { + return nil, err + } + + msg := append([]byte{0x19}, []byte("Ethereum Signed Message:\n")...) + msg = append(msg, byte(len(data))) + msg = append(msg, data...) + + sig, err := signer.Sign(crypto.Keccak256(msg)) + if err != nil { + return nil, err + } + + return &web3.EthSignResult{ + Signature: encoding.HexEncodeBytes(sig.RawBytes()), + }, nil } // N / A @@ -856,11 +892,3 @@ func (srv *EthService) EthCoinbase() (*web3.EthCoinbaseResult, error) { func (srv *EthService) EthGetLogs(req *web3.EthGetLogsParams) (*web3.EthGetLogsResult, error) { return nil, web3.ErrNotFound } - -func (srv *EthService) EthEstimateGas(req *web3.EthEstimateGasParams) (*web3.EthEstimateGasResult, error) { - return nil, web3.ErrNotFound -} - -func (srv *EthService) EthGasPrice() (*web3.EthGasPriceResult, error) { - return nil, web3.ErrNotFound -} diff --git a/rpc/eth_test.go b/rpc/eth_test.go index eb9948ba1..357bd4087 100644 --- a/rpc/eth_test.go +++ b/rpc/eth_test.go @@ -19,11 +19,10 @@ import ( "github.com/stretchr/testify/require" ) -func TestWeb3RPCService(t *testing.T) { +func TestWeb3Service(t *testing.T) { ctx := context.Background() - - genesisAccounts := integration.MakePrivateAccounts("accounts", 2) - genesisAccounts = append(genesisAccounts, integration.MakeEthereumAccounts("ethereum", 2)...) + genesisAccounts := integration.MakePrivateAccounts("burrow", 1) + genesisAccounts = append(genesisAccounts, integration.MakeEthereumAccounts("ethereum", 3)...) genesisDoc := integration.TestGenesisDoc(genesisAccounts, 0) config, _ := integration.NewTestConfig(genesisDoc) @@ -85,8 +84,7 @@ func TestWeb3RPCService(t *testing.T) { t.Run("NetVersion", func(t *testing.T) { result, err := eth.NetVersion() require.NoError(t, err) - doc := config.GenesisDoc - require.Equal(t, encoding.HexEncodeBytes(doc.ShortHash()), result.ChainID) + require.Equal(t, encoding.HexEncodeNumber(uint64(rpc.ChainID)), result.ChainID) }) t.Run("EthProtocolVersion", func(t *testing.T) { @@ -104,41 +102,38 @@ func TestWeb3RPCService(t *testing.T) { }) t.Run("EthCreateContract", func(t *testing.T) { - account := genesisAccounts[1] var txHash, contractAddress string - // create contract on chain - t.Run("EthSendTransaction", func(t *testing.T) { - result, err := eth.EthSendTransaction(&web3.EthSendTransactionParams{ - Transaction: web3.Transaction{ - From: encoding.HexEncodeBytes(account.GetAddress().Bytes()), - Gas: encoding.HexEncodeNumber(40), - Data: encoding.HexEncodeBytes(rpc.Bytecode_HelloWorld), - }, - }) - require.NoError(t, err) - txHash = result.TransactionHash - require.NotEmpty(t, txHash) - }) - t.Run("EthSendRawTransaction", func(t *testing.T) { - addr, err := crypto.AddressFromHexString("8A2FD214EAA33FA0CDED164FE7357E6382F6EEAD") - require.NoError(t, err) - - acc, err := kern.State.GetAccount(addr) + to := genesisAccounts[2].GetPublicKey().GetAddress() + acc, err := kern.State.GetAccount(to) require.NoError(t, err) before := acc.GetBalance() - raw := `0xf860018080948a2fd214eaa33fa0cded164fe7357e6382f6eead830300008026a0602370418b098a0509b6c6eb7835d4dd214bc4e5f15ee709f29cb17b3cadede1a018c42ee04c35dfb6d10bd5fef8967918be665a701fa1c54c601b4d38feb83244` + raw := `0xf867808082520894f97798df751deb4b6e39d4cf998ee7cd4dcb9acc880de0b6b3a76400008025a0f0d2396973296cd6a71141c974d4a851f5eae8f08a8fba2dc36a0fef9bd6440ca0171995aa750d3f9f8e4d0eac93ff67634274f3c5acf422723f49ff09a6885422` _, err = eth.EthSendRawTransaction(&web3.EthSendRawTransactionParams{ SignedTransactionData: raw, }) require.NoError(t, err) - acc, err = kern.State.GetAccount(addr) + acc, err = kern.State.GetAccount(to) require.NoError(t, err) after := acc.GetBalance() - require.Equal(t, after, before+196608) + require.Equal(t, after, before+1) + }) + + // create contract on chain + t.Run("EthSendTransaction", func(t *testing.T) { + result, err := eth.EthSendTransaction(&web3.EthSendTransactionParams{ + Transaction: web3.Transaction{ + From: encoding.HexEncodeBytes(genesisAccounts[3].GetAddress().Bytes()), + Gas: encoding.HexEncodeNumber(40), + Data: encoding.HexEncodeBytes(rpc.Bytecode_HelloWorld), + }, + }) + require.NoError(t, err) + txHash = result.TransactionHash + require.NotEmpty(t, txHash) }) t.Run("EthGetTransactionReceipt", func(t *testing.T) { @@ -159,7 +154,7 @@ func TestWeb3RPCService(t *testing.T) { result, err := eth.EthCall(&web3.EthCallParams{ Transaction: web3.Transaction{ - From: encoding.HexEncodeBytes(account.GetAddress().Bytes()), + From: encoding.HexEncodeBytes(genesisAccounts[1].GetAddress().Bytes()), To: contractAddress, Data: encoding.HexAddPrefix(string(packed)), }, @@ -192,9 +187,21 @@ func TestWeb3RPCService(t *testing.T) { t.Run("EthAccounts", func(t *testing.T) { result, err := eth.EthAccounts() require.NoError(t, err) - require.Len(t, result.Addresses, len(genesisAccounts)) + require.Len(t, result.Addresses, len(genesisAccounts)-1) for _, acc := range genesisAccounts { - require.Contains(t, result.Addresses, encoding.HexEncodeBytes(acc.GetAddress().Bytes())) + if acc.PrivateKey().CurveType == crypto.CurveTypeSecp256k1 { + require.Contains(t, result.Addresses, encoding.HexEncodeBytes(acc.GetAddress().Bytes())) + } } }) + + t.Run("EthSign", func(t *testing.T) { + result, err := eth.EthSign(&web3.EthSignParams{ + Address: "0x2c2d14a9a3f0d078ac8b38e3043d78ca8bc11029", + Bytes: "0xdeadbeaf", + }) + require.NoError(t, err) + require.Equal(t, `0x30440220345d17225ac03a575f467cea3a8d5cc2dea42fc89030c42ea175fd5140c542eb02200307004fc21ea592ce5ca013705959292c2de85b71d0fa0c84ebd8b541f505d5`, result.Signature) + }) + } diff --git a/rpc/service.go b/rpc/service.go index 7757a6f49..4a8f17a63 100644 --- a/rpc/service.go +++ b/rpc/service.go @@ -376,7 +376,7 @@ func (s *Service) ConsensusState() (*ResultConsensusState, error) { } func (s *Service) GeneratePrivateAccount() (*ResultGeneratePrivateAccount, error) { - privateAccount, err := acm.GeneratePrivateAccount() + privateAccount, err := acm.GeneratePrivateAccount(crypto.CurveTypeEd25519) if err != nil { return nil, err } diff --git a/rpc/web3/server.go b/rpc/web3/server.go index 74ccfcdbb..20604d025 100644 --- a/rpc/web3/server.go +++ b/rpc/web3/server.go @@ -76,21 +76,21 @@ type RPCRequest struct { JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params json.RawMessage `json:"params"` - ID int `json:"id"` + ID interface{} `json:"id"` } // https://www.jsonrpc.org/specification#response_object type RPCResultResponse struct { JSONRPC string `json:"jsonrpc"` Result interface{} `json:"result"` - ID int `json:"id"` + ID interface{} `json:"id"` } // https://www.jsonrpc.org/specification#response_object type RPCErrorResponse struct { - JSONRPC string `json:"jsonrpc"` - Error *RPCError `json:"error"` - ID int `json:"id"` + JSONRPC string `json:"jsonrpc"` + Error *RPCError `json:"error"` + ID interface{} `json:"id"` } // https://www.jsonrpc.org/specification#error_object @@ -192,14 +192,22 @@ func StructToResult(in interface{}) interface{} { } func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { - if r.Method != http.MethodPost { - WriteError(w, 0, ErrInternal.RPCError()) + if r.Method == http.MethodOptions { + w.Header().Set("Access-Control-Allow-Origin", "*") + w.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET") + w.Header().Set("Access-Control-Allow-Headers", "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range") + w.Header().Set("Accept-Range", "bytes") + w.WriteHeader(http.StatusOK) + w.Write([]byte{}) + return + } else if r.Method != http.MethodPost { + WriteError(w, "", ErrInternal.RPCError()) return } data, err := ioutil.ReadAll(r.Body) if err != nil { - WriteError(w, 0, ErrInvalidRequest.RPCError()) + WriteError(w, nil, ErrInvalidRequest.RPCError()) return } r.Body.Close() @@ -207,12 +215,12 @@ func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { in := new(RPCRequest) err = json.Unmarshal(data, in) if err != nil { - WriteError(w, 0, ErrCouldNotParse.RPCError()) + WriteError(w, nil, ErrCouldNotParse.RPCError()) return } - if in.JSONRPC != JSONRPC || in.Method == "" || in.ID == 0 { - WriteError(w, 0, ErrInvalidParams.RPCError()) + if in.JSONRPC != JSONRPC || in.Method == "" || in.ID == nil { + WriteError(w, nil, ErrInvalidParams.RPCError()) return } @@ -461,7 +469,7 @@ func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { WriteData(w, in.ID, out) } -func WriteError(w http.ResponseWriter, id int, resp *RPCError) { +func WriteError(w http.ResponseWriter, id interface{}, resp *RPCError) { data, err := json.Marshal(&RPCErrorResponse{ JSONRPC: JSONRPC, Error: resp, @@ -474,7 +482,7 @@ func WriteError(w http.ResponseWriter, id int, resp *RPCError) { w.Write(data) } -func WriteData(w http.ResponseWriter, id int, result interface{}) { +func WriteData(w http.ResponseWriter, id interface{}, result interface{}) { resp := &RPCResultResponse{ JSONRPC: JSONRPC, ID: id, diff --git a/rpc/web3/types.go b/rpc/web3/types.go index eb4226ebf..315ae01ec 100644 --- a/rpc/web3/types.go +++ b/rpc/web3/types.go @@ -103,7 +103,6 @@ type Service interface { // Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additionally Filters timeout when they aren't requested with eth_getFilterChanges for a period of time. EthUninstallFilter(*EthUninstallFilterParams) (*EthUninstallFilterResult, error) } - type Web3ClientVersionResult struct { // client version ClientVersion string `json:"clientVersion"` @@ -128,65 +127,47 @@ type NetVersionResult struct { // chain ID associated with the current network ChainID string `json:"chainID"` } -type BlockNumber struct { - // The hex representation of the block's height +type EthBlockNumberResult struct { BlockNumber string `json:"blockNumber"` - - // Hex representation of the integer - Integer string `json:"integer"` } -type EthBlockNumberResult struct { +type BlockNumber struct { // The hex representation of the block's height BlockNumber string `json:"blockNumber"` } type EthCallParams struct { - Transaction Transaction `json:"transaction"` + Transaction - // The hex representation of the block's height BlockNumber string `json:"blockNumber"` } type Transaction struct { - // Hex representation of the integer - BlockNumber string `json:"blockNumber"` - - // Hex representation of a Keccak 256 hash - Hash string `json:"hash"` - + // Hash of the block where this transaction was in. null when its pending + BlockHash string `json:"blockHash"` + // The data field sent with the transaction + Data string `json:"data"` + // address of the receiver. null when its a contract creation transaction + To string `json:"to"` + // ECDSA signature r + R string `json:"r"` // ECDSA signature s S string `json:"s"` - - // Hex representation of a Keccak 256 hash - BlockHash string `json:"blockHash"` - // Address of the sender From string `json:"from"` - // The gas limit provided by the sender in Wei Gas string `json:"gas"` - + // A number only to be used once + Nonce string `json:"nonce"` + // ECDSA recovery id + V string `json:"v"` + // Block number where this transaction was in. null when its pending + BlockNumber string `json:"blockNumber"` + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` + // Integer of the transaction's index position in the block. null when its pending + TransactionIndex string `json:"transactionIndex"` // The gas price willing to be paid by the sender in Wei GasPrice string `json:"gasPrice"` - // Hex representation of a Keccak 256 hash Value string `json:"value"` - - // The data field sent with the transaction - Data string `json:"data"` - - // ECDSA recovery id - V string `json:"v"` - - // A number only to be used once - Nonce string `json:"nonce"` - - // address of the receiver. null when its a contract creation transaction - To string `json:"to"` - - // Hex representation of the integer - TransactionIndex string `json:"transactionIndex"` - - // ECDSA signature r - R string `json:"r"` } type BlockHash struct { // Hex representation of a Keccak 256 hash @@ -209,7 +190,7 @@ type EthCoinbaseResult struct { Address string `json:"address"` } type EthEstimateGasParams struct { - Transaction Transaction `json:"transaction"` + Transaction } type EthEstimateGasResult struct { // Hex representation of the integer @@ -222,146 +203,78 @@ type EthGasPriceResult struct { type EthGetBalanceParams struct { // The address of the account or contract Address string `json:"address"` - // The hex representation of the block's height BlockNumber string `json:"blockNumber"` } +type EthGetBalanceResult struct { + GetBalanceResult string `json:"getBalanceResult"` +} type GetBalanceResult struct { // Hex representation of the integer Integer string `json:"integer"` } -type EthGetBalanceResult struct { - // Hex representation of the integer - GetBalanceResult string `json:"getBalanceResult"` -} type EthGetBlockByHashParams struct { // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` - // If `true` it returns the full transaction objects, if `false` only the hashes of the transactions. IsTransactionsIncluded bool `json:"isTransactionsIncluded"` } +type EthGetBlockByHashResult struct { + GetBlockByHashResult Block `json:"getBlockByHashResult"` +} type GetBlockByHashResult struct { - Block Block `json:"block"` - + Block +} +type Block struct { + // Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter + Transactions []Transactions `json:"transactions"` + // Array of uncle hashes + Uncles []string `json:"uncles"` // Hex representation of a Keccak 256 hash + StateRoot string `json:"stateRoot"` + // The block hash or null when its the pending block Hash string `json:"hash"` - - // Hex representation of the integer + // Randomly selected number to satisfy the proof-of-work or null when its the pending block Nonce string `json:"nonce"` - // Hex representation of a Keccak 256 hash Sha3Uncles string `json:"sha3Uncles"` - - // Hex representation of the integer - TotalDifficulty string `json:"totalDifficulty"` - + // Hex representation of a Keccak 256 hash + TransactionsRoot string `json:"transactionsRoot"` // The 'extra data' field of this block ExtraData string `json:"extraData"` - - // Integer the size of this block in bytes - Size string `json:"size"` - - // Hex representation of the integer - Number string `json:"number"` - - // The bloom filter for the logs of the block or null when its the pending block - LogsBloom string `json:"logsBloom"` - - // Hex representation of a Keccak 256 hash - StateRoot string `json:"stateRoot"` - - // Hex representation of a Keccak 256 hash - ReceiptsRoot string `json:"receiptsRoot"` - - // The address of the beneficiary to whom the mining rewards were given or null when its the pending block - Miner string `json:"miner"` - - // Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter - Transactions []Transactions `json:"transactions"` - - // Array of uncle hashes - Uncles []string `json:"uncles"` - - // Integer of the difficulty for this block - Difficulty string `json:"difficulty"` - // The maximum gas allowed in this block GasLimit string `json:"gasLimit"` - // The unix timestamp for when the block was collated Timestamp string `json:"timestamp"` - - // Hex representation of a Keccak 256 hash - ParentHash string `json:"parentHash"` - - // Hex representation of a Keccak 256 hash - TransactionsRoot string `json:"transactionsRoot"` - - // The total used gas by all transactions in this block - GasUsed string `json:"gasUsed"` -} -type Hash struct { - // Hex representation of a Keccak 256 hash - Keccak string `json:"keccak"` -} -type Block struct { - // Hex representation of a Keccak 256 hash - Hash string `json:"hash"` - - // Hex representation of the integer - Nonce string `json:"nonce"` - - // Hex representation of a Keccak 256 hash - Sha3Uncles string `json:"sha3Uncles"` - - // Integer the size of this block in bytes - Size string `json:"size"` - - // Hex representation of the integer + // The block number or null when its the pending block Number string `json:"number"` - - // The bloom filter for the logs of the block or null when its the pending block - LogsBloom string `json:"logsBloom"` - - // Hex representation of a Keccak 256 hash - StateRoot string `json:"stateRoot"` - // Hex representation of a Keccak 256 hash ReceiptsRoot string `json:"receiptsRoot"` - // The address of the beneficiary to whom the mining rewards were given or null when its the pending block Miner string `json:"miner"` - - // Hex representation of the integer + // Integer of the total difficulty of the chain until this block TotalDifficulty string `json:"totalDifficulty"` - - // The 'extra data' field of this block - ExtraData string `json:"extraData"` - - // Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter - Transactions []Transactions `json:"transactions"` - - // Array of uncle hashes - Uncles []string `json:"uncles"` - + // Integer the size of this block in bytes + Size string `json:"size"` + // The total used gas by all transactions in this block + GasUsed string `json:"gasUsed"` + // Hex representation of a Keccak 256 hash + ParentHash string `json:"parentHash"` // Integer of the difficulty for this block Difficulty string `json:"difficulty"` - - // The maximum gas allowed in this block - GasLimit string `json:"gasLimit"` - - // The unix timestamp for when the block was collated - Timestamp string `json:"timestamp"` - + // The bloom filter for the logs of the block or null when its the pending block + LogsBloom string `json:"logsBloom"` +} +type Transactions struct { + Transaction +} +type Uncles struct { // Hex representation of a Keccak 256 hash - ParentHash string `json:"parentHash"` - + Keccak string `json:"keccak"` +} +type Hash struct { // Hex representation of a Keccak 256 hash - TransactionsRoot string `json:"transactionsRoot"` - - // The total used gas by all transactions in this block - GasUsed string `json:"gasUsed"` + Keccak string `json:"keccak"` } type Nonce struct { // Hex representation of the integer @@ -372,158 +285,45 @@ type Number struct { Integer string `json:"integer"` } type Miner struct { - Address string `json:"address"` -} -type TotalDifficulty struct { - // Hex representation of the integer - Integer string `json:"integer"` -} -type Transactions struct { - Transaction Transaction `json:"transaction"` - - // The gas limit provided by the sender in Wei - Gas string `json:"gas"` - - // The gas price willing to be paid by the sender in Wei - GasPrice string `json:"gasPrice"` - - // Hex representation of a Keccak 256 hash - Value string `json:"value"` - - // Hex representation of a Keccak 256 hash - BlockHash string `json:"blockHash"` - - // Address of the sender - From string `json:"from"` - - // The data field sent with the transaction - Data string `json:"data"` - - // ECDSA recovery id - V string `json:"v"` - - // Hex representation of the integer - TransactionIndex string `json:"transactionIndex"` - - // ECDSA signature r - R string `json:"r"` - - // A number only to be used once - Nonce string `json:"nonce"` - - // address of the receiver. null when its a contract creation transaction - To string `json:"to"` - - // ECDSA signature s - S string `json:"s"` - - // Hex representation of the integer - BlockNumber string `json:"blockNumber"` - - // Hex representation of a Keccak 256 hash - Hash string `json:"hash"` -} -type Uncles struct { - // Hex representation of a Keccak 256 hash - Keccak string `json:"keccak"` -} -type EthGetBlockByHashResult struct { - GetBlockByHashResult GetBlockByHashResult `json:"getBlockByHashResult"` -} -type EthGetBlockByNumberParams struct { - // The hex representation of the block's height - BlockNumber string `json:"blockNumber"` - - // If `true` it returns the full transaction objects, if `false` only the hashes of the transactions. - IsTransactionsIncluded bool `json:"isTransactionsIncluded"` -} -type GetBlockByNumberResult struct { - Block Block `json:"block"` - - // Integer of the difficulty for this block - Difficulty string `json:"difficulty"` - - // The maximum gas allowed in this block - GasLimit string `json:"gasLimit"` - - // The unix timestamp for when the block was collated - Timestamp string `json:"timestamp"` - - // Hex representation of a Keccak 256 hash - ParentHash string `json:"parentHash"` - - // Hex representation of a Keccak 256 hash - TransactionsRoot string `json:"transactionsRoot"` - - // The total used gas by all transactions in this block - GasUsed string `json:"gasUsed"` - - // Hex representation of a Keccak 256 hash - Hash string `json:"hash"` - - // Hex representation of the integer - Nonce string `json:"nonce"` - - // Hex representation of a Keccak 256 hash - Sha3Uncles string `json:"sha3Uncles"` - - // Hex representation of the integer - Number string `json:"number"` - - // The bloom filter for the logs of the block or null when its the pending block - LogsBloom string `json:"logsBloom"` - - // Hex representation of a Keccak 256 hash - StateRoot string `json:"stateRoot"` - - // Hex representation of a Keccak 256 hash - ReceiptsRoot string `json:"receiptsRoot"` - - // The address of the beneficiary to whom the mining rewards were given or null when its the pending block - Miner string `json:"miner"` - - // Hex representation of the integer - TotalDifficulty string `json:"totalDifficulty"` - - // The 'extra data' field of this block - ExtraData string `json:"extraData"` - - // Integer the size of this block in bytes - Size string `json:"size"` - - // Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter - Transactions []Transactions `json:"transactions"` - - // Array of uncle hashes - Uncles []string `json:"uncles"` + Address string `json:"address"` +} +type TotalDifficulty struct { + // Hex representation of the integer + Integer string `json:"integer"` +} +type EthGetBlockByNumberParams struct { + BlockNumber string `json:"blockNumber"` + // If `true` it returns the full transaction objects, if `false` only the hashes of the transactions. + IsTransactionsIncluded bool `json:"isTransactionsIncluded"` } type EthGetBlockByNumberResult struct { - GetBlockByNumberResult GetBlockByNumberResult `json:"getBlockByNumberResult"` + GetBlockByNumberResult Block `json:"getBlockByNumberResult"` +} +type GetBlockByNumberResult struct { + Block } type EthGetBlockTransactionCountByHashParams struct { // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` } +type EthGetBlockTransactionCountByHashResult struct { + // The Number of total transactions in the given block + BlockTransactionCountByHash string `json:"blockTransactionCountByHash"` +} type BlockTransactionCountByHash struct { // Hex representation of the integer Integer string `json:"integer"` } -type EthGetBlockTransactionCountByHashResult struct { - // Hex representation of the integer - BlockTransactionCountByHash string `json:"blockTransactionCountByHash"` -} type EthGetBlockTransactionCountByNumberParams struct { - // The hex representation of the block's height BlockNumber string `json:"blockNumber"` } type EthGetBlockTransactionCountByNumberResult struct { - // Hex representation of the integer + // The Number of total transactions in the given block BlockTransactionCountByHash string `json:"blockTransactionCountByHash"` } type EthGetCodeParams struct { // The address of the contract Address string `json:"address"` - // The hex representation of the block's height BlockNumber string `json:"blockNumber"` } @@ -537,54 +337,41 @@ type EthGetFilterChangesParams struct { } type LogResult struct { // An indexed event generated during a transaction - Log Log `json:"log"` - + Log // Hex representation of the integer LogIndex string `json:"logIndex"` - - // Hex representation of the integer - TransactionIndex string `json:"transactionIndex"` - - // The hex representation of the block's height - BlockNumber string `json:"blockNumber"` - // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` - // Hex representation of a variable length byte array Data string `json:"data"` Topics []Topics `json:"topics"` - // Hex representation of a Keccak 256 hash TransactionHash string `json:"transactionHash"` - + // Hex representation of the integer + TransactionIndex string `json:"transactionIndex"` // Sender of the transaction Address string `json:"address"` + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` } type Log struct { + // Sender of the transaction + Address string `json:"address"` // The hex representation of the block's height BlockNumber string `json:"blockNumber"` - // Hex representation of the integer - LogIndex string `json:"logIndex"` - + Topics []Topics `json:"topics"` + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` // Hex representation of the integer TransactionIndex string `json:"transactionIndex"` - - // Sender of the transaction - Address string `json:"address"` - // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` - // Hex representation of a variable length byte array Data string `json:"data"` - - Topics []Topics `json:"topics"` - - // Hex representation of a Keccak 256 hash - TransactionHash string `json:"transactionHash"` + // Hex representation of the integer + LogIndex string `json:"logIndex"` } type EthGetFilterChangesResult struct { LogResult []LogResult `json:"logResult"` @@ -595,30 +382,23 @@ type EthGetFilterLogsParams struct { } type Logs struct { // An indexed event generated during a transaction - Log Log `json:"log"` - - // Sender of the transaction - Address string `json:"address"` - - // The hex representation of the Keccak 256 of the RLP encoded block - BlockHash string `json:"blockHash"` - + Log // Hex representation of a variable length byte array Data string `json:"data"` + // Hex representation of the integer + LogIndex string `json:"logIndex"` + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` Topics []Topics `json:"topics"` - // Hex representation of a Keccak 256 hash TransactionHash string `json:"transactionHash"` - - // The hex representation of the block's height - BlockNumber string `json:"blockNumber"` - - // Hex representation of the integer - LogIndex string `json:"logIndex"` - // Hex representation of the integer TransactionIndex string `json:"transactionIndex"` + // Sender of the transaction + Address string `json:"address"` } type EthGetFilterLogsResult struct { Logs []Logs `json:"logs"` @@ -634,7 +414,6 @@ type EthGetRawTransactionByHashResult struct { type EthGetRawTransactionByBlockHashAndIndexParams struct { // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` - // Hex representation of the integer Index string `json:"index"` } @@ -643,9 +422,7 @@ type EthGetRawTransactionByBlockHashAndIndexResult struct { RawTransaction string `json:"rawTransaction"` } type EthGetRawTransactionByBlockNumberAndIndexParams struct { - // The hex representation of the block's height BlockNumber string `json:"blockNumber"` - // Hex representation of the integer Index string `json:"index"` } @@ -655,18 +432,15 @@ type EthGetRawTransactionByBlockNumberAndIndexResult struct { } type EthGetLogsParams struct { // A filter used to monitor the blockchain for log/events - Filter Filter `json:"filter"` + Filter } type Filter struct { // The hex representation of the block's height FromBlock string `json:"fromBlock"` - // The hex representation of the block's height ToBlock string `json:"toBlock"` - // Address of the contract from which to monitor events Address string `json:"address"` - // Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with 'or' options Topics []string `json:"topics"` } @@ -683,11 +457,9 @@ type EthGetLogsResult struct { } type EthGetStorageAtParams struct { Address string `json:"address"` - // Hex representation of the storage slot where the variable exists Position string `json:"position"` - // The hex representation of the block's height BlockNumber string `json:"blockNumber"` } type EthGetStorageAtResult struct { @@ -697,389 +469,194 @@ type EthGetStorageAtResult struct { type EthGetTransactionByBlockHashAndIndexParams struct { // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` - // Hex representation of the integer Index string `json:"index"` } -type TransactionResult struct { - Transaction Transaction `json:"transaction"` - - // A number only to be used once - Nonce string `json:"nonce"` - - // address of the receiver. null when its a contract creation transaction - To string `json:"to"` - - // Hex representation of the integer - TransactionIndex string `json:"transactionIndex"` - - // ECDSA signature r - R string `json:"r"` - - // Hex representation of the integer - BlockNumber string `json:"blockNumber"` - - // Hex representation of a Keccak 256 hash - Hash string `json:"hash"` - - // ECDSA signature s - S string `json:"s"` - - // Hex representation of a Keccak 256 hash - BlockHash string `json:"blockHash"` - - // Address of the sender - From string `json:"from"` - - // The gas limit provided by the sender in Wei - Gas string `json:"gas"` - - // The gas price willing to be paid by the sender in Wei - GasPrice string `json:"gasPrice"` - - // Hex representation of a Keccak 256 hash - Value string `json:"value"` - - // The data field sent with the transaction - Data string `json:"data"` - - // ECDSA recovery id - V string `json:"v"` -} type EthGetTransactionByBlockHashAndIndexResult struct { - TransactionResult TransactionResult `json:"transactionResult"` + TransactionResult Transaction `json:"transactionResult"` +} +type TransactionResult struct { + Transaction } type EthGetTransactionByBlockNumberAndIndexParams struct { - // The hex representation of the block's height BlockNumber string `json:"blockNumber"` - // Hex representation of the integer Index string `json:"index"` } type EthGetTransactionByBlockNumberAndIndexResult struct { - TransactionResult TransactionResult `json:"transactionResult"` + TransactionResult Transaction `json:"transactionResult"` } type EthGetTransactionByHashParams struct { // Hex representation of a Keccak 256 hash TransactionHash string `json:"transactionHash"` } type EthGetTransactionByHashResult struct { - Transaction Transaction `json:"transaction"` + Transaction } type EthGetTransactionCountParams struct { - Address string `json:"address"` - - // The hex representation of the block's height - BlockNumber string `json:"blockNumber"` -} -type NonceOrNull struct { - // A number only to be used once - Nonce string `json:"nonce"` -} -type EthGetTransactionCountResult struct { - // A number only to be used once - NonceOrNull string `json:"nonceOrNull"` -} -type EthGetTransactionReceiptParams struct { - // Hex representation of a Keccak 256 hash - TransactionHash string `json:"transactionHash"` -} -type Receipt struct { - // The sender of the transaction - From string `json:"from"` - - // An array of all the logs triggered during the transaction - Logs []Logs `json:"logs"` - - // A 2048 bit bloom filter from the logs of the transaction. Each log sets 3 bits though taking the low-order 11 bits of each of the first three pairs of bytes in a Keccak 256 hash of the log's byte series - LogsBloom string `json:"logsBloom"` - - // Whether or not the transaction threw an error. - Status string `json:"status"` - - // The hex representation of the Keccak 256 of the RLP encoded block - BlockHash string `json:"blockHash"` - - // The hex representation of the block's height - BlockNumber string `json:"blockNumber"` - - // Hex representation of the integer - GasUsed string `json:"gasUsed"` - - // Destination address of the transaction - To string `json:"to"` - - // Hex representation of a Keccak 256 hash - TransactionHash string `json:"transactionHash"` - - // A 2048 bit bloom filter from the logs of the transaction. Each log sets 3 bits though taking the low-order 11 bits of each of the first three pairs of bytes in a Keccak 256 hash of the log's byte series - TransactionIndex string `json:"transactionIndex"` - - // Hex representation of a Keccak 256 hash - PostTransactionState string `json:"postTransactionState"` - - // The contract address created, if the transaction was a contract creation, otherwise null - ContractAddress string `json:"contractAddress"` - - // Hex representation of the integer - CumulativeGasUsed string `json:"cumulativeGasUsed"` -} -type EthGetTransactionReceiptResult struct { - // The receipt of a transaction - Receipt Receipt `json:"receipt"` -} -type EthGetUncleByBlockHashAndIndexParams struct { - // The hex representation of the Keccak 256 of the RLP encoded block - BlockHash string `json:"blockHash"` - - // Hex representation of the integer - Index string `json:"index"` -} -type UncleOrNull struct { - // Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions. - Uncle Uncle `json:"uncle"` - - // The total used gas by all transactions in this block - GasUsed string `json:"gasUsed"` - - // The unix timestamp for when the block was collated - Timestamp string `json:"timestamp"` - - // Hex representation of a Keccak 256 hash - Sha3Uncles string `json:"sha3Uncles"` - - // Hex representation of a Keccak 256 hash - TransactionsRoot string `json:"transactionsRoot"` - - // Hex representation of a Keccak 256 hash - ReceiptsRoot string `json:"receiptsRoot"` - - // Hex representation of a Keccak 256 hash - StateRoot string `json:"stateRoot"` - - // Integer of the difficulty for this block - Difficulty string `json:"difficulty"` - - // The 'extra data' field of this block - ExtraData string `json:"extraData"` - - // Hex representation of a Keccak 256 hash - Hash string `json:"hash"` - - // Hex representation of a Keccak 256 hash - ParentHash string `json:"parentHash"` - - // Hex representation of the integer - Nonce string `json:"nonce"` - - // Integer the size of this block in bytes - Size string `json:"size"` - - // The maximum gas allowed in this block - GasLimit string `json:"gasLimit"` - - // The bloom filter for the logs of the block or null when its the pending block - LogsBloom string `json:"logsBloom"` - - // The address of the beneficiary to whom the mining rewards were given or null when its the pending block - Miner string `json:"miner"` - - // Hex representation of the integer - TotalDifficulty string `json:"totalDifficulty"` - - // Hex representation of the integer - Number string `json:"number"` + Address string `json:"address"` - // Array of uncle hashes - Uncles []string `json:"uncles"` + BlockNumber string `json:"blockNumber"` } -type Uncle struct { - // Hex representation of the integer +type EthGetTransactionCountResult struct { + NonceOrNull string `json:"nonceOrNull"` +} +type NonceOrNull struct { + // A number only to be used once Nonce string `json:"nonce"` - - // Hex representation of a Keccak 256 hash - StateRoot string `json:"stateRoot"` - - // Integer of the difficulty for this block - Difficulty string `json:"difficulty"` - - // The 'extra data' field of this block - ExtraData string `json:"extraData"` - - // Hex representation of a Keccak 256 hash - Hash string `json:"hash"` - +} +type EthGetTransactionReceiptParams struct { // Hex representation of a Keccak 256 hash - ParentHash string `json:"parentHash"` - - // Hex representation of the integer - TotalDifficulty string `json:"totalDifficulty"` - - // Integer the size of this block in bytes - Size string `json:"size"` - - // The maximum gas allowed in this block - GasLimit string `json:"gasLimit"` - - // The bloom filter for the logs of the block or null when its the pending block - LogsBloom string `json:"logsBloom"` - - // The address of the beneficiary to whom the mining rewards were given or null when its the pending block - Miner string `json:"miner"` - + TransactionHash string `json:"transactionHash"` +} +type EthGetTransactionReceiptResult struct { + // returns either a receipt or null + Receipt +} +type Receipt struct { + // The sender of the transaction + From string `json:"from"` // Hex representation of the integer - Number string `json:"number"` - - // Array of uncle hashes - Uncles []string `json:"uncles"` - - // Hex representation of a Keccak 256 hash - ReceiptsRoot string `json:"receiptsRoot"` - - // The total used gas by all transactions in this block GasUsed string `json:"gasUsed"` - - // The unix timestamp for when the block was collated - Timestamp string `json:"timestamp"` - + // A 2048 bit bloom filter from the logs of the transaction. Each log sets 3 bits though taking the low-order 11 bits of each of the first three pairs of bytes in a Keccak 256 hash of the log's byte series + TransactionIndex string `json:"transactionIndex"` + // Whether or not the transaction threw an error. + Status string `json:"status"` + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` + // An array of all the logs triggered during the transaction + Logs []Logs `json:"logs"` + // A 2048 bit bloom filter from the logs of the transaction. Each log sets 3 bits though taking the low-order 11 bits of each of the first three pairs of bytes in a Keccak 256 hash of the log's byte series + LogsBloom string `json:"logsBloom"` + // Destination address of the transaction + To string `json:"to"` // Hex representation of a Keccak 256 hash - Sha3Uncles string `json:"sha3Uncles"` - + TransactionHash string `json:"transactionHash"` // Hex representation of a Keccak 256 hash - TransactionsRoot string `json:"transactionsRoot"` -} -type EthGetUncleByBlockHashAndIndexResult struct { - // Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions. - UncleOrNull UncleOrNull `json:"uncleOrNull"` + PostTransactionState string `json:"postTransactionState"` + // The contract address created, if the transaction was a contract creation, otherwise null + ContractAddress string `json:"contractAddress"` + // Hex representation of the integer + CumulativeGasUsed string `json:"cumulativeGasUsed"` } -type EthGetUncleByBlockNumberAndIndexParams struct { - // The hex representation of the block's height - UncleBlockNumber string `json:"uncleBlockNumber"` - +type EthGetUncleByBlockHashAndIndexParams struct { + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` // Hex representation of the integer Index string `json:"index"` } -type UncleResult struct { +type EthGetUncleByBlockHashAndIndexResult struct { + UncleOrNull Uncle `json:"uncleOrNull"` +} +type UncleOrNull struct { // Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions. - Uncle Uncle `json:"uncle"` - + Uncle +} +type Uncle struct { + // The block hash or null when its the pending block + Hash string `json:"hash"` + // Randomly selected number to satisfy the proof-of-work or null when its the pending block + Nonce string `json:"nonce"` // The bloom filter for the logs of the block or null when its the pending block LogsBloom string `json:"logsBloom"` - + // The unix timestamp for when the block was collated + Timestamp string `json:"timestamp"` + // Array of uncle hashes + Uncles []string `json:"uncles"` + // Hex representation of a Keccak 256 hash + ReceiptsRoot string `json:"receiptsRoot"` // The address of the beneficiary to whom the mining rewards were given or null when its the pending block Miner string `json:"miner"` - - // Hex representation of the integer + // Integer of the difficulty for this block + Difficulty string `json:"difficulty"` + // Integer of the total difficulty of the chain until this block TotalDifficulty string `json:"totalDifficulty"` - - // Integer the size of this block in bytes - Size string `json:"size"` - // The maximum gas allowed in this block GasLimit string `json:"gasLimit"` - - // Hex representation of the integer - Number string `json:"number"` - - // Array of uncle hashes - Uncles []string `json:"uncles"` - - // Hex representation of a Keccak 256 hash - Sha3Uncles string `json:"sha3Uncles"` - - // Hex representation of a Keccak 256 hash - TransactionsRoot string `json:"transactionsRoot"` - - // Hex representation of a Keccak 256 hash - ReceiptsRoot string `json:"receiptsRoot"` - // The total used gas by all transactions in this block GasUsed string `json:"gasUsed"` - - // The unix timestamp for when the block was collated - Timestamp string `json:"timestamp"` - - // Hex representation of a Keccak 256 hash - Hash string `json:"hash"` - + // The block number or null when its the pending block + Number string `json:"number"` // Hex representation of a Keccak 256 hash ParentHash string `json:"parentHash"` - - // Hex representation of the integer - Nonce string `json:"nonce"` - // Hex representation of a Keccak 256 hash StateRoot string `json:"stateRoot"` - - // Integer of the difficulty for this block - Difficulty string `json:"difficulty"` - // The 'extra data' field of this block ExtraData string `json:"extraData"` + // Integer the size of this block in bytes + Size string `json:"size"` + // Hex representation of a Keccak 256 hash + Sha3Uncles string `json:"sha3Uncles"` + // Hex representation of a Keccak 256 hash + TransactionsRoot string `json:"transactionsRoot"` +} +type EthGetUncleByBlockNumberAndIndexParams struct { + // The hex representation of the block's height + UncleBlockNumber string `json:"uncleBlockNumber"` + // Hex representation of the integer + Index string `json:"index"` } type EthGetUncleByBlockNumberAndIndexResult struct { + // returns an uncle or null + UncleResult Uncle `json:"uncleResult"` +} +type UncleResult struct { // Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions. - UncleResult UncleResult `json:"uncleResult"` + Uncle } type EthGetUncleCountByBlockHashParams struct { // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` } +type EthGetUncleCountByBlockHashResult struct { + UncleCountOrNull string `json:"uncleCountOrNull"` +} type UncleCountOrNull struct { // Hex representation of the integer Integer string `json:"integer"` } -type EthGetUncleCountByBlockHashResult struct { - // Hex representation of the integer - UncleCountOrNull string `json:"uncleCountOrNull"` -} type EthGetUncleCountByBlockNumberParams struct { - // The hex representation of the block's height BlockNumber string `json:"blockNumber"` } type EthGetUncleCountByBlockNumberResult struct { - // Hex representation of the integer UncleCountOrNull string `json:"uncleCountOrNull"` } type EthGetProofParams struct { // The address of the account or contract Address string `json:"address"` - // The storage keys of all the storage slots being requested StorageKeys []string `json:"storageKeys"` - // The hex representation of the block's height BlockNumber string `json:"blockNumber"` } type StorageKeys struct { // Hex representation of the integer Integer string `json:"integer"` } +type EthGetProofResult struct { + ProofAccountOrNull ProofAccount `json:"proofAccountOrNull"` +} type ProofAccountOrNull struct { // The merkle proofs of the specified account connecting them to the blockhash of the block specified - ProofAccount ProofAccount `json:"proofAccount"` + ProofAccount } type ProofAccount struct { + // Hex representation of the integer + Balance string `json:"balance"` + // Hex representation of a Keccak 256 hash + CodeHash string `json:"codeHash"` // A number only to be used once Nonce string `json:"nonce"` - // Hex representation of a Keccak 256 hash StorageHash string `json:"storageHash"` - // Current block header PoW hash. StorageProof []StorageProof `json:"storageProof"` - // The address of the account or contract of the request Address string `json:"address"` - // The set of node values needed to traverse a patricia merkle tree (from root to leaf) to retrieve a value AccountProof []string `json:"accountProof"` - - // Hex representation of the integer - Balance string `json:"balance"` - - // Hex representation of a Keccak 256 hash - CodeHash string `json:"codeHash"` } type Proof struct { // Hex representation of a variable length byte array @@ -1088,10 +665,8 @@ type Proof struct { type StorageProof struct { // Hex representation of the integer Key string `json:"key"` - // Hex representation of the integer Value string `json:"value"` - // The set of node values needed to traverse a patricia merkle tree (from root to leaf) to retrieve a value Proof []string `json:"proof"` } @@ -1099,10 +674,6 @@ type AccountProof struct { // Hex representation of a variable length byte array ProofNode string `json:"proofNode"` } -type EthGetProofResult struct { - // The merkle proofs of the specified account connecting them to the blockhash of the block specified - ProofAccount ProofAccount `json:"proofAccount"` -} type EthGetWorkResult struct { Work []string `json:"work"` } @@ -1120,7 +691,7 @@ type EthNewBlockFilterResult struct { } type EthNewFilterParams struct { // A filter used to monitor the blockchain for log/events - Filter Filter `json:"filter"` + Filter } type EthNewFilterResult struct { // Hex representation of the integer @@ -1131,49 +702,35 @@ type EthNewPendingTransactionFilterResult struct { FilterId string `json:"filterId"` } type PendingTransactions struct { - Transaction Transaction `json:"transaction"` - - // A number only to be used once - Nonce string `json:"nonce"` - - // address of the receiver. null when its a contract creation transaction - To string `json:"to"` - - // Hex representation of the integer - TransactionIndex string `json:"transactionIndex"` - - // ECDSA signature r - R string `json:"r"` - - // Hex representation of the integer + Transaction + // Block number where this transaction was in. null when its pending BlockNumber string `json:"blockNumber"` - // Hex representation of a Keccak 256 hash Hash string `json:"hash"` - - // ECDSA signature s - S string `json:"s"` - - // Hex representation of a Keccak 256 hash - BlockHash string `json:"blockHash"` - - // Address of the sender - From string `json:"from"` - - // The gas limit provided by the sender in Wei - Gas string `json:"gas"` - + // Integer of the transaction's index position in the block. null when its pending + TransactionIndex string `json:"transactionIndex"` // The gas price willing to be paid by the sender in Wei GasPrice string `json:"gasPrice"` - // Hex representation of a Keccak 256 hash Value string `json:"value"` - + // Hash of the block where this transaction was in. null when its pending + BlockHash string `json:"blockHash"` // The data field sent with the transaction Data string `json:"data"` - + // address of the receiver. null when its a contract creation transaction + To string `json:"to"` + // ECDSA signature r + R string `json:"r"` + // Address of the sender + From string `json:"from"` + // The gas limit provided by the sender in Wei + Gas string `json:"gas"` + // A number only to be used once + Nonce string `json:"nonce"` // ECDSA recovery id V string `json:"v"` + // ECDSA signature s + S string `json:"s"` } type EthPendingTransactionsResult struct { PendingTransactions []PendingTransactions `json:"pendingTransactions"` @@ -1184,7 +741,6 @@ type EthProtocolVersionResult struct { } type EthSignParams struct { Address string `json:"address"` - // Hex representation of a variable length byte array Bytes string `json:"bytes"` } @@ -1200,7 +756,7 @@ type EthAccountsResult struct { Addresses []string `json:"addresses"` } type EthSendTransactionParams struct { - Transaction Transaction `json:"transaction"` + Transaction } type EthSendTransactionResult struct { // Hex representation of a Keccak 256 hash @@ -1217,7 +773,6 @@ type EthSendRawTransactionResult struct { type EthSubmitHashrateParams struct { // Hex representation of a 256 bit unit of data HashRate string `json:"hashRate"` - // Hex representation of a 256 bit unit of data Id string `json:"id"` } @@ -1228,10 +783,8 @@ type EthSubmitHashrateResult struct { type EthSubmitWorkParams struct { // A number only to be used once Nonce string `json:"nonce"` - // Hex representation of a 256 bit unit of data PowHash string `json:"powHash"` - // Hex representation of a 256 bit unit of data MixHash string `json:"mixHash"` } @@ -1239,30 +792,25 @@ type EthSubmitWorkResult struct { // Whether or not the provided solution is valid SolutionValid bool `json:"solutionValid"` } +type EthSyncingResult struct { + Syncing SyncStatus `json:"syncing"` +} type Syncing struct { // An object with sync status data - SyncStatus SyncStatus `json:"syncStatus"` + SyncStatus } type SyncStatus struct { // Hex representation of the integer StartingBlock string `json:"startingBlock"` - // Hex representation of the integer CurrentBlock string `json:"currentBlock"` - // Hex representation of the integer HighestBlock string `json:"highestBlock"` - // Hex representation of the integer KnownStates string `json:"knownStates"` - // Hex representation of the integer PulledStates string `json:"pulledStates"` } -type EthSyncingResult struct { - // An object with sync status data - SyncStatus SyncStatus `json:"syncStatus"` -} type EthUninstallFilterParams struct { // An identifier used to reference the filter. FilterId string `json:"filterId"` diff --git a/txs/payload/payload.pb.go b/txs/payload/payload.pb.go index 706ce17cc..a3b5e9b8f 100644 --- a/txs/payload/payload.pb.go +++ b/txs/payload/payload.pb.go @@ -306,10 +306,12 @@ type CallTx struct { // WASM bytecode WASM github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,6,opt,name=WASM,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"tags,omitempty"` // Set of contracts this code will deploy - ContractMeta []*ContractMeta `protobuf:"bytes,7,rep,name=ContractMeta,proto3" json:"ContractMeta,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ContractMeta []*ContractMeta `protobuf:"bytes,7,rep,name=ContractMeta,proto3" json:"ContractMeta,omitempty"` + // The upper bound on the price per unit of gas + GasPrice uint64 `protobuf:"varint,8,opt,name=GasPrice,proto3" json:"GasPrice,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CallTx) Reset() { *m = CallTx{} } @@ -372,6 +374,13 @@ func (m *CallTx) GetContractMeta() []*ContractMeta { return nil } +func (m *CallTx) GetGasPrice() uint64 { + if m != nil { + return m.GasPrice + } + return 0 +} + func (*CallTx) XXX_MessageName() string { return "payload.CallTx" } @@ -1035,72 +1044,73 @@ func init() { proto.RegisterFile("payload.proto", fileDescriptor_678c914f1bee6d5 func init() { golang_proto.RegisterFile("payload.proto", fileDescriptor_678c914f1bee6d56) } var fileDescriptor_678c914f1bee6d56 = []byte{ - // 1033 bytes of a gzipped FileDescriptorProto + // 1045 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x66, 0xd7, 0x7f, 0xfa, 0xe2, 0x04, 0x77, 0xa0, 0xc8, 0x8a, 0x84, 0x1d, 0x19, 0x04, - 0x29, 0x34, 0x36, 0xa4, 0xfc, 0x11, 0xb9, 0x20, 0xff, 0x4b, 0x1a, 0xd4, 0x36, 0x61, 0xbc, 0x69, - 0x11, 0x88, 0xc3, 0xd8, 0x1e, 0xd6, 0x2b, 0xd9, 0x3b, 0xcb, 0xee, 0xb8, 0xac, 0x39, 0x71, 0xe0, - 0xc0, 0x15, 0xf5, 0xc2, 0x31, 0x5f, 0x81, 0x6f, 0xc0, 0x31, 0x47, 0xce, 0x1c, 0x22, 0x94, 0x5e, - 0x10, 0x9f, 0x02, 0xcd, 0xec, 0xcc, 0x7a, 0xed, 0x56, 0x8d, 0x13, 0x21, 0x6e, 0x33, 0xef, 0xfd, - 0xe6, 0xbd, 0x37, 0xef, 0xfd, 0xde, 0x9b, 0x81, 0x75, 0x9f, 0x4c, 0x47, 0x8c, 0x0c, 0x6a, 0x7e, - 0xc0, 0x38, 0x43, 0x39, 0xb5, 0xdd, 0xdc, 0x71, 0x5c, 0x3e, 0x9c, 0xf4, 0x6a, 0x7d, 0x36, 0xae, - 0x3b, 0xcc, 0x61, 0x75, 0xa9, 0xef, 0x4d, 0xbe, 0x95, 0x3b, 0xb9, 0x91, 0xab, 0xf8, 0xdc, 0x66, - 0xd1, 0xa7, 0xc1, 0xd8, 0x0d, 0x43, 0x97, 0x79, 0x4a, 0x02, 0xa1, 0x4f, 0xfb, 0xf1, 0xba, 0xfa, - 0x8b, 0x09, 0x66, 0xc3, 0x9b, 0xa2, 0x77, 0x20, 0xdb, 0x22, 0xa3, 0x91, 0x1d, 0x95, 0x8c, 0x2d, - 0x63, 0x7b, 0x6d, 0xf7, 0x95, 0x9a, 0xf6, 0x1e, 0x8b, 0xb1, 0x52, 0x0b, 0x60, 0x97, 0x7a, 0x03, - 0x3b, 0x2a, 0xad, 0x2e, 0x00, 0x63, 0x31, 0x56, 0x6a, 0x01, 0x7c, 0x48, 0xc6, 0xd4, 0x8e, 0x4a, - 0xe6, 0x02, 0x30, 0x16, 0x63, 0xa5, 0x46, 0xef, 0x42, 0xee, 0x98, 0x06, 0xe3, 0xd0, 0x8e, 0x4a, - 0x96, 0x44, 0x16, 0x13, 0xa4, 0x92, 0x63, 0x0d, 0x40, 0x6f, 0x41, 0xe6, 0x80, 0x3d, 0xb1, 0xa3, - 0x52, 0x46, 0x22, 0x37, 0x12, 0xa4, 0x94, 0xe2, 0x58, 0x29, 0x5c, 0x37, 0x99, 0x8c, 0x31, 0xbb, - 0xe0, 0x3a, 0x16, 0x63, 0xa5, 0x46, 0x3b, 0x90, 0x3f, 0xf1, 0x7a, 0x31, 0x34, 0x27, 0xa1, 0x37, - 0x13, 0xa8, 0x56, 0xe0, 0x04, 0x22, 0x22, 0x6d, 0x12, 0xde, 0x1f, 0xda, 0x51, 0x29, 0xbf, 0x10, - 0xa9, 0x92, 0x63, 0x0d, 0x40, 0x77, 0x01, 0x8e, 0x03, 0xe6, 0xb3, 0x90, 0x88, 0xa4, 0xde, 0x90, - 0xf0, 0x57, 0x67, 0x17, 0x4b, 0x54, 0x38, 0x05, 0xdb, 0xb3, 0xce, 0x4e, 0x2b, 0x46, 0xf5, 0xa9, - 0x01, 0x39, 0x3b, 0x3a, 0xf4, 0xfc, 0x09, 0x47, 0x0f, 0x21, 0xd7, 0x18, 0x0c, 0x02, 0x1a, 0x86, - 0xb2, 0x30, 0x85, 0xe6, 0x87, 0x67, 0xe7, 0x95, 0x95, 0x3f, 0xcf, 0x2b, 0x77, 0x52, 0x2c, 0x18, - 0x4e, 0x7d, 0x1a, 0x8c, 0xe8, 0xc0, 0xa1, 0x41, 0xbd, 0x37, 0x09, 0x02, 0xf6, 0x7d, 0xbd, 0x1f, - 0x4c, 0x7d, 0xce, 0x6a, 0xea, 0x2c, 0xd6, 0x46, 0xd0, 0xeb, 0x90, 0x6d, 0x8c, 0xd9, 0xc4, 0xe3, - 0xb2, 0x7c, 0x16, 0x56, 0x3b, 0xb4, 0x09, 0xf9, 0x2e, 0xfd, 0x6e, 0x42, 0xbd, 0x3e, 0x95, 0xf5, - 0xb2, 0x70, 0xb2, 0xdf, 0xb3, 0x7e, 0x3d, 0xad, 0xac, 0x54, 0x23, 0xc8, 0xdb, 0xd1, 0xd1, 0x84, - 0xff, 0x8f, 0x51, 0x29, 0xcf, 0x4f, 0x4d, 0x4d, 0x4e, 0xf4, 0x36, 0x64, 0x64, 0x5e, 0x14, 0x4b, - 0x67, 0xf9, 0x57, 0xf9, 0xc2, 0xb1, 0x1a, 0x7d, 0x3e, 0x0b, 0x70, 0x55, 0x06, 0xf8, 0xfe, 0xf5, - 0x83, 0xdb, 0x84, 0xfc, 0x01, 0x09, 0xef, 0xbb, 0x63, 0x97, 0xeb, 0xd4, 0xe8, 0x3d, 0x2a, 0x82, - 0xb9, 0x4f, 0xa9, 0xe4, 0xad, 0x85, 0xc5, 0x12, 0x1d, 0x82, 0xd5, 0x26, 0x9c, 0x48, 0x82, 0x16, - 0x9a, 0x1f, 0xa9, 0xbc, 0xec, 0xbc, 0xdc, 0x75, 0xcf, 0xf5, 0x48, 0x30, 0xad, 0xdd, 0xa3, 0x51, - 0x73, 0xca, 0x69, 0x88, 0xa5, 0x09, 0xf4, 0x35, 0x58, 0x8f, 0x1b, 0xdd, 0x07, 0x92, 0xc4, 0x85, - 0xe6, 0xc1, 0xb5, 0x4c, 0xfd, 0x73, 0x5e, 0xd9, 0xe0, 0xc4, 0x09, 0xef, 0xb0, 0xb1, 0xcb, 0xe9, - 0xd8, 0xe7, 0x53, 0x2c, 0x8d, 0xa2, 0x4f, 0xa1, 0xd0, 0x62, 0x1e, 0x0f, 0x48, 0x9f, 0x3f, 0xa0, - 0x9c, 0x94, 0x72, 0x5b, 0xe6, 0xf6, 0xda, 0xee, 0xad, 0x59, 0xdb, 0xa7, 0x94, 0x78, 0x0e, 0xaa, - 0xaa, 0x32, 0x99, 0x37, 0x80, 0xbe, 0x80, 0x7c, 0x8b, 0x0d, 0xe8, 0x3d, 0x12, 0x0e, 0x15, 0x29, - 0xae, 0x79, 0xf9, 0xc4, 0x0c, 0x42, 0x60, 0xc9, 0xd8, 0x44, 0x09, 0x6f, 0x60, 0xb9, 0xae, 0xba, - 0x7a, 0xfe, 0xa0, 0x6d, 0xc8, 0xca, 0x62, 0x0b, 0x0e, 0x9a, 0x2f, 0x24, 0x83, 0xd2, 0xa3, 0xf7, - 0x20, 0x17, 0x13, 0x57, 0xb0, 0xc1, 0x9c, 0xeb, 0x72, 0x4d, 0x69, 0xac, 0x11, 0x7b, 0xf9, 0x9f, - 0x4f, 0x2b, 0x2b, 0xf2, 0x86, 0x2c, 0x19, 0x4c, 0x4b, 0xf3, 0xee, 0x63, 0xc8, 0x8b, 0x23, 0x8d, - 0xc0, 0x09, 0xd5, 0x7c, 0x7c, 0xad, 0x96, 0x9a, 0xbf, 0x5a, 0xd7, 0xb4, 0x44, 0x6a, 0x70, 0x82, - 0x55, 0x29, 0xf5, 0xf5, 0xc8, 0x5c, 0xda, 0x1f, 0x02, 0x4b, 0x9c, 0xd0, 0x19, 0x12, 0x6b, 0x21, - 0x93, 0x0c, 0x34, 0x63, 0x99, 0xa4, 0xd2, 0x73, 0x3c, 0x55, 0x1e, 0xf7, 0xf4, 0xa4, 0x5c, 0xd6, - 0x63, 0x2a, 0x3d, 0xce, 0x6c, 0x78, 0x2e, 0x1d, 0xef, 0x6d, 0xc8, 0xc6, 0x79, 0x56, 0xd9, 0x79, - 0x41, 0x21, 0x14, 0x20, 0xe5, 0xe8, 0x47, 0x43, 0x4d, 0xfd, 0x2b, 0x94, 0xbc, 0x05, 0x1b, 0x8d, - 0x7e, 0x5f, 0x0c, 0x91, 0x13, 0x7f, 0x40, 0x38, 0xd5, 0x95, 0xbf, 0x55, 0x93, 0x8f, 0x9f, 0x4d, - 0xc7, 0xfe, 0x88, 0x70, 0xaa, 0x30, 0xb2, 0x1e, 0x06, 0x5e, 0x38, 0x92, 0x0a, 0xe1, 0x6f, 0x23, - 0x3d, 0xce, 0x97, 0xbe, 0x6e, 0x15, 0x0a, 0x8f, 0x18, 0x77, 0x3d, 0xe7, 0x31, 0x75, 0x9d, 0x61, - 0x7c, 0x69, 0x13, 0xcf, 0xc9, 0xd0, 0x09, 0x14, 0xb4, 0x65, 0xd9, 0x3b, 0xa6, 0xec, 0x9d, 0x0f, - 0xae, 0xde, 0x37, 0x73, 0x66, 0xc4, 0xd3, 0xa6, 0xf7, 0xea, 0x59, 0xbd, 0xf9, 0xdc, 0xeb, 0x83, - 0x13, 0x48, 0xea, 0xaa, 0xdf, 0x24, 0x8f, 0xdc, 0x15, 0xd2, 0x5d, 0x06, 0xd3, 0x8e, 0x74, 0x8e, - 0x0b, 0x09, 0xac, 0xe1, 0x4d, 0xb1, 0x50, 0xa4, 0xcc, 0xff, 0x64, 0x80, 0xf5, 0x88, 0x71, 0xfa, - 0x9f, 0xbf, 0x21, 0x4b, 0xe4, 0x3a, 0x15, 0xc6, 0x93, 0x59, 0x7a, 0x92, 0x26, 0x32, 0x52, 0x4d, - 0xb4, 0x05, 0x6b, 0x6d, 0x1a, 0xf6, 0x03, 0xd7, 0xe7, 0x2e, 0xf3, 0x54, 0x7f, 0xa5, 0x45, 0xe9, - 0xcf, 0x80, 0x79, 0xc9, 0x67, 0x20, 0xe5, 0xf7, 0xb7, 0x55, 0xc8, 0x36, 0xc9, 0x68, 0xc4, 0xf8, - 0x5c, 0x85, 0x8c, 0x4b, 0x2b, 0x24, 0x78, 0xb2, 0xef, 0x7a, 0x64, 0xe4, 0xfe, 0xe0, 0x7a, 0x8e, - 0xfa, 0x7e, 0x5d, 0x8f, 0x27, 0x69, 0x33, 0xa8, 0x05, 0xeb, 0xbe, 0x72, 0xd1, 0xe5, 0x84, 0xc7, - 0x33, 0x62, 0x63, 0xf7, 0x8d, 0xd4, 0x65, 0x44, 0xb4, 0x49, 0x44, 0x12, 0x84, 0xe7, 0xcf, 0xa0, - 0x37, 0x21, 0x23, 0x6a, 0x1a, 0x96, 0x32, 0x92, 0x00, 0xeb, 0xc9, 0x61, 0x21, 0xc5, 0xb1, 0xae, - 0xfa, 0x09, 0xac, 0xcf, 0x19, 0x41, 0x05, 0xc8, 0x1f, 0xe3, 0xa3, 0xe3, 0xa3, 0x6e, 0xa7, 0x5d, - 0x5c, 0x11, 0xbb, 0xce, 0x97, 0x9d, 0xd6, 0x89, 0xdd, 0x69, 0x17, 0x0d, 0x04, 0x90, 0xdd, 0x6f, - 0x1c, 0xde, 0xef, 0xb4, 0x8b, 0xab, 0xcd, 0xcf, 0xce, 0x2e, 0xca, 0xc6, 0x1f, 0x17, 0x65, 0xe3, - 0xaf, 0x8b, 0xb2, 0xf1, 0xfb, 0xb3, 0xb2, 0x71, 0xf6, 0xac, 0x6c, 0x7c, 0x75, 0xfb, 0xe5, 0xb7, - 0xe6, 0x51, 0x58, 0x57, 0x51, 0xf4, 0xb2, 0xf2, 0xaf, 0x7b, 0xf7, 0xdf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x8c, 0x43, 0x16, 0xe2, 0x52, 0x0b, 0x00, 0x00, + 0x14, 0xcf, 0x66, 0x37, 0xb6, 0xfb, 0xea, 0x04, 0x77, 0xa0, 0xc8, 0x8a, 0x84, 0x1d, 0x19, 0x04, + 0x29, 0x34, 0x0e, 0xa4, 0xfc, 0x11, 0xb9, 0x20, 0xff, 0x4b, 0x1a, 0xd4, 0x36, 0x66, 0xbc, 0x69, + 0x11, 0x88, 0xc3, 0x78, 0x3d, 0xac, 0x57, 0xb2, 0x77, 0x96, 0xdd, 0x71, 0x59, 0x73, 0xe2, 0xc0, + 0x81, 0x2b, 0xe2, 0xc2, 0x31, 0xdf, 0x00, 0xf1, 0x0d, 0x38, 0xe6, 0xc8, 0x99, 0x43, 0x84, 0xd2, + 0x0b, 0xe2, 0x53, 0xa0, 0x99, 0x9d, 0x59, 0xaf, 0xdd, 0xaa, 0x75, 0x22, 0xc4, 0x6d, 0xe7, 0xbd, + 0xdf, 0xbc, 0xf7, 0xe6, 0xf7, 0x7e, 0xf3, 0x66, 0x61, 0x3d, 0x20, 0xd3, 0x11, 0x23, 0x83, 0x7a, + 0x10, 0x32, 0xce, 0x50, 0x5e, 0x2d, 0x37, 0x77, 0x5c, 0x8f, 0x0f, 0x27, 0xfd, 0xba, 0xc3, 0xc6, + 0xbb, 0x2e, 0x73, 0xd9, 0xae, 0xf4, 0xf7, 0x27, 0x5f, 0xcb, 0x95, 0x5c, 0xc8, 0xaf, 0x64, 0xdf, + 0x66, 0x29, 0xa0, 0xe1, 0xd8, 0x8b, 0x22, 0x8f, 0xf9, 0xca, 0x02, 0x51, 0x40, 0x9d, 0xe4, 0xbb, + 0xf6, 0x93, 0x09, 0x66, 0xc3, 0x9f, 0xa2, 0xb7, 0x20, 0xd7, 0x22, 0xa3, 0x91, 0x1d, 0x97, 0x8d, + 0x2d, 0x63, 0xfb, 0xfa, 0xde, 0x4b, 0x75, 0x9d, 0x3d, 0x31, 0x63, 0xe5, 0x16, 0xc0, 0x1e, 0xf5, + 0x07, 0x76, 0x5c, 0x5e, 0x5d, 0x00, 0x26, 0x66, 0xac, 0xdc, 0x02, 0xf8, 0x80, 0x8c, 0xa9, 0x1d, + 0x97, 0xcd, 0x05, 0x60, 0x62, 0xc6, 0xca, 0x8d, 0xde, 0x86, 0x7c, 0x97, 0x86, 0xe3, 0xc8, 0x8e, + 0xcb, 0x96, 0x44, 0x96, 0x52, 0xa4, 0xb2, 0x63, 0x0d, 0x40, 0x6f, 0xc0, 0xda, 0x21, 0x7b, 0x6c, + 0xc7, 0xe5, 0x35, 0x89, 0xdc, 0x48, 0x91, 0xd2, 0x8a, 0x13, 0xa7, 0x48, 0xdd, 0x64, 0xb2, 0xc6, + 0xdc, 0x42, 0xea, 0xc4, 0x8c, 0x95, 0x1b, 0xed, 0x40, 0xe1, 0xc4, 0xef, 0x27, 0xd0, 0xbc, 0x84, + 0xde, 0x48, 0xa1, 0xda, 0x81, 0x53, 0x88, 0xa8, 0xb4, 0x49, 0xb8, 0x33, 0xb4, 0xe3, 0x72, 0x61, + 0xa1, 0x52, 0x65, 0xc7, 0x1a, 0x80, 0xee, 0x00, 0x74, 0x43, 0x16, 0xb0, 0x88, 0x08, 0x52, 0xaf, + 0x49, 0xf8, 0xcb, 0xb3, 0x83, 0xa5, 0x2e, 0x9c, 0x81, 0xed, 0x5b, 0x67, 0xa7, 0x55, 0xa3, 0xf6, + 0xb3, 0x01, 0x79, 0x3b, 0x3e, 0xf2, 0x83, 0x09, 0x47, 0x0f, 0x20, 0xdf, 0x18, 0x0c, 0x42, 0x1a, + 0x45, 0xb2, 0x31, 0xc5, 0xe6, 0xfb, 0x67, 0xe7, 0xd5, 0x95, 0x3f, 0xcf, 0xab, 0xb7, 0x33, 0x2a, + 0x18, 0x4e, 0x03, 0x1a, 0x8e, 0xe8, 0xc0, 0xa5, 0xe1, 0x6e, 0x7f, 0x12, 0x86, 0xec, 0xdb, 0x5d, + 0x27, 0x9c, 0x06, 0x9c, 0xd5, 0xd5, 0x5e, 0xac, 0x83, 0xa0, 0x57, 0x21, 0xd7, 0x18, 0xb3, 0x89, + 0xcf, 0x65, 0xfb, 0x2c, 0xac, 0x56, 0x68, 0x13, 0x0a, 0x3d, 0xfa, 0xcd, 0x84, 0xfa, 0x0e, 0x95, + 0xfd, 0xb2, 0x70, 0xba, 0xde, 0xb7, 0x7e, 0x39, 0xad, 0xae, 0xd4, 0x62, 0x28, 0xd8, 0xf1, 0xf1, + 0x84, 0xff, 0x8f, 0x55, 0xa9, 0xcc, 0xbf, 0x9a, 0x5a, 0x9c, 0xe8, 0x4d, 0x58, 0x93, 0xbc, 0x28, + 0x95, 0xce, 0xf8, 0x57, 0x7c, 0xe1, 0xc4, 0x8d, 0x3e, 0x9d, 0x15, 0xb8, 0x2a, 0x0b, 0x7c, 0xf7, + 0xea, 0xc5, 0x6d, 0x42, 0xe1, 0x90, 0x44, 0xf7, 0xbc, 0xb1, 0xc7, 0x35, 0x35, 0x7a, 0x8d, 0x4a, + 0x60, 0x1e, 0x50, 0x2a, 0x75, 0x6b, 0x61, 0xf1, 0x89, 0x8e, 0xc0, 0x6a, 0x13, 0x4e, 0xa4, 0x40, + 0x8b, 0xcd, 0x0f, 0x14, 0x2f, 0x3b, 0xcf, 0x4f, 0xdd, 0xf7, 0x7c, 0x12, 0x4e, 0xeb, 0x77, 0x69, + 0xdc, 0x9c, 0x72, 0x1a, 0x61, 0x19, 0x02, 0x7d, 0x09, 0xd6, 0xa3, 0x46, 0xef, 0xbe, 0x14, 0x71, + 0xb1, 0x79, 0x78, 0xa5, 0x50, 0xff, 0x9c, 0x57, 0x37, 0x38, 0x71, 0xa3, 0xdb, 0x6c, 0xec, 0x71, + 0x3a, 0x0e, 0xf8, 0x14, 0xcb, 0xa0, 0xe8, 0x63, 0x28, 0xb6, 0x98, 0xcf, 0x43, 0xe2, 0xf0, 0xfb, + 0x94, 0x93, 0x72, 0x7e, 0xcb, 0xdc, 0xbe, 0xbe, 0x77, 0x73, 0x76, 0xed, 0x33, 0x4e, 0x3c, 0x07, + 0x55, 0x84, 0x74, 0x43, 0xcf, 0xa1, 0xf2, 0x1e, 0x24, 0x84, 0xc8, 0xb5, 0xea, 0xd8, 0x64, 0x3e, + 0x38, 0xfa, 0x0c, 0x0a, 0x2d, 0x36, 0xa0, 0x77, 0x49, 0x34, 0x54, 0x82, 0xb9, 0x22, 0x31, 0x69, + 0x18, 0x84, 0xc0, 0x92, 0x75, 0x8b, 0xf6, 0x5e, 0xc3, 0xf2, 0xbb, 0xe6, 0xe9, 0xd9, 0x84, 0xb6, + 0x21, 0x27, 0x85, 0x20, 0xf4, 0x69, 0x3e, 0x53, 0x28, 0xca, 0x8f, 0xde, 0x81, 0x7c, 0x22, 0x6a, + 0xa1, 0x14, 0x73, 0x6e, 0x02, 0x68, 0xb9, 0x63, 0x8d, 0xd8, 0x2f, 0xfc, 0x78, 0x5a, 0x5d, 0x91, + 0x27, 0x64, 0xe9, 0xd0, 0x5a, 0x5a, 0x93, 0x1f, 0x42, 0x41, 0x6c, 0x69, 0x84, 0x6e, 0xa4, 0x66, + 0xe7, 0x2b, 0xf5, 0xcc, 0x6c, 0xd6, 0xbe, 0xa6, 0x25, 0xa8, 0xc1, 0x29, 0x56, 0x51, 0x1a, 0xe8, + 0x71, 0xba, 0x74, 0x3e, 0x04, 0x96, 0xd8, 0xa1, 0x19, 0x12, 0xdf, 0xc2, 0x26, 0xd5, 0x69, 0x26, + 0x36, 0x29, 0xb3, 0xa7, 0x34, 0xac, 0x32, 0xee, 0xeb, 0x29, 0xba, 0x6c, 0xc6, 0x0c, 0x3d, 0xee, + 0x6c, 0xb0, 0x2e, 0x5d, 0xef, 0x2d, 0xc8, 0x25, 0x3c, 0x2b, 0x76, 0x9e, 0xd1, 0x08, 0x05, 0xc8, + 0x24, 0xfa, 0xde, 0x50, 0x2f, 0xc2, 0x25, 0x5a, 0xde, 0x82, 0x8d, 0x86, 0xe3, 0x88, 0x01, 0x73, + 0x12, 0x0c, 0x08, 0xa7, 0xba, 0xf3, 0x37, 0xeb, 0xf2, 0x61, 0xb4, 0xe9, 0x38, 0x18, 0x11, 0x4e, + 0x15, 0x46, 0xf6, 0xc3, 0xc0, 0x0b, 0x5b, 0x32, 0x25, 0xfc, 0x6d, 0x64, 0x47, 0xfd, 0xd2, 0xc7, + 0xad, 0x41, 0xf1, 0x21, 0xe3, 0x9e, 0xef, 0x3e, 0xa2, 0x9e, 0x3b, 0x4c, 0x0e, 0x6d, 0xe2, 0x39, + 0x1b, 0x3a, 0x81, 0xa2, 0x8e, 0x2c, 0xef, 0x8e, 0x29, 0xef, 0xce, 0x7b, 0x97, 0xbf, 0x37, 0x73, + 0x61, 0xc4, 0xb3, 0xa7, 0xd7, 0xea, 0xc9, 0xbd, 0xf1, 0xd4, 0xcb, 0x84, 0x53, 0x48, 0xe6, 0xa8, + 0x5f, 0xa5, 0x0f, 0xe0, 0x25, 0xe8, 0xae, 0x80, 0x69, 0xc7, 0x9a, 0xe3, 0x62, 0x0a, 0x6b, 0xf8, + 0x53, 0x2c, 0x1c, 0x99, 0xf0, 0x3f, 0x18, 0x60, 0x3d, 0x64, 0x9c, 0xfe, 0xe7, 0xef, 0xcb, 0x12, + 0x5c, 0x67, 0xca, 0x78, 0x3c, 0xa3, 0x27, 0xbd, 0x44, 0x46, 0xe6, 0x12, 0x6d, 0xc1, 0xf5, 0x36, + 0x8d, 0x9c, 0xd0, 0x0b, 0xb8, 0xc7, 0x7c, 0x75, 0xbf, 0xb2, 0xa6, 0xec, 0x8f, 0x82, 0xf9, 0x82, + 0x1f, 0x85, 0x4c, 0xde, 0xdf, 0x56, 0x21, 0xd7, 0x24, 0xa3, 0x11, 0xe3, 0x73, 0x1d, 0x32, 0x5e, + 0xd8, 0x21, 0xa1, 0x93, 0x03, 0xcf, 0x27, 0x23, 0xef, 0x3b, 0xcf, 0x77, 0xd5, 0xaf, 0xd9, 0xd5, + 0x74, 0x92, 0x0d, 0x83, 0x5a, 0xb0, 0x1e, 0xa8, 0x14, 0x3d, 0x4e, 0x78, 0x32, 0x23, 0x36, 0xf6, + 0x5e, 0xcb, 0x1c, 0x46, 0x54, 0x9b, 0x56, 0x24, 0x41, 0x78, 0x7e, 0x0f, 0x7a, 0x1d, 0xd6, 0x44, + 0x4f, 0xa3, 0xf2, 0x9a, 0x14, 0xc0, 0x7a, 0xba, 0x59, 0x58, 0x71, 0xe2, 0xab, 0x7d, 0x04, 0xeb, + 0x73, 0x41, 0x50, 0x11, 0x0a, 0x5d, 0x7c, 0xdc, 0x3d, 0xee, 0x75, 0xda, 0xa5, 0x15, 0xb1, 0xea, + 0x7c, 0xde, 0x69, 0x9d, 0xd8, 0x9d, 0x76, 0xc9, 0x40, 0x00, 0xb9, 0x83, 0xc6, 0xd1, 0xbd, 0x4e, + 0xbb, 0xb4, 0xda, 0xfc, 0xe4, 0xec, 0xa2, 0x62, 0xfc, 0x71, 0x51, 0x31, 0xfe, 0xba, 0xa8, 0x18, + 0xbf, 0x3f, 0xa9, 0x18, 0x67, 0x4f, 0x2a, 0xc6, 0x17, 0xb7, 0x9e, 0x7f, 0x6a, 0x1e, 0x47, 0xbb, + 0xaa, 0x8a, 0x7e, 0x4e, 0xfe, 0x07, 0xdf, 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0x12, 0x32, 0x20, + 0x16, 0x6e, 0x0b, 0x00, 0x00, } func (m *Any) Marshal() (dAtA []byte, err error) { @@ -1360,6 +1370,11 @@ func (m *CallTx) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.GasPrice != 0 { + dAtA[i] = 0x40 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.GasPrice)) + } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -2010,6 +2025,9 @@ func (m *CallTx) Size() (n int) { n += 1 + l + sovPayload(uint64(l)) } } + if m.GasPrice != 0 { + n += 1 + sovPayload(uint64(m.GasPrice)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -3200,6 +3218,25 @@ func (m *CallTx) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType) + } + m.GasPrice = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPayload + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasPrice |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipPayload(dAtA[iNdEx:]) diff --git a/txs/tx.go b/txs/tx.go index b6b4fc50a..14134eae4 100644 --- a/txs/tx.go +++ b/txs/tx.go @@ -21,6 +21,7 @@ import ( "reflect" "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/acm/balance" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/encoding" @@ -84,36 +85,32 @@ func (tx *Tx) SignBytes(env Envelope_Encoding) ([]byte, error) { return bs, nil } +func RLPEncode(seq, gasPrice, gasLimit uint64, address, amount, data []byte) ([]byte, error) { + return rlp.Encode([]interface{}{ + seq, // nonce + gasPrice, // gasPrice + gasLimit, // gasLimit + address, // to + amount, // value + data, // data + uint64(1), // chainID + uint(0), uint(0), + }) +} + func (tx *Tx) SignBytesRLPEncoded() ([]byte, error) { switch pay := tx.Payload.(type) { - case *payload.SendTx: - if len(pay.Inputs) != 1 { - return nil, fmt.Errorf("RLP Encoded SendTx must have exactly one TxInput") - } else if len(pay.Outputs) != 1 { - return nil, fmt.Errorf("RLP Encoded SendTx must have exactly one TxOutput") - } - input := pay.Inputs[0] - output := pay.Outputs[0] - return rlp.Encode([]interface{}{ - input.Sequence, - uint64(0), - uint64(0), - output.Address.Bytes(), - input.Amount, - []byte{}, - uint64(1), uint(0), uint(0), - }) case *payload.CallTx: input := pay.Input - return rlp.Encode([]interface{}{ - input.Sequence, - uint64(0), + return RLPEncode( + input.Sequence-1, + pay.GasPrice, pay.GasLimit, pay.Address.Bytes(), - input.Amount, + balance.NativeToWei(input.Amount).Bytes(), pay.Data.Bytes(), - uint64(1), uint(0), uint(0), - }) + ) + default: return nil, fmt.Errorf("tx type %v not supported for rlp encoding", tx.Payload.Type()) } From b9dadd82beb0804da784fd160b78a2bc65803605 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Wed, 18 Sep 2019 21:29:13 +0100 Subject: [PATCH 009/185] batch json rpc, fix rpc results, add docs Signed-off-by: Gregory Hill --- docs/_sidebar.md | 4 +- docs/reference/web3.md | 49 ++++++ rpc/eth.go | 232 ++++++++++++++++--------- rpc/eth_test.go | 1 + rpc/web3/server.go | 79 +++++---- rpc/web3/types.go | 383 ++++++++++++++++++++--------------------- 6 files changed, 433 insertions(+), 315 deletions(-) create mode 100644 docs/reference/web3.md diff --git a/docs/_sidebar.md b/docs/_sidebar.md index af74110ca..db2415bd8 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -24,6 +24,7 @@ - Reference - [Participants](reference/participants.md) - [Genesis](reference/genesis.md) + - [Logging](reference/logging.md) - [Permissions](reference/permissions.md) - [Transactions](reference/transactions.md) - [State](reference/state.md) @@ -31,5 +32,4 @@ - [Bonding](reference/bonding.md) - [Vent](reference/vent.md) - [WASM](reference/wasm.md) - - [Logging](reference/logging.md) - + - [Web3](reference/web3.md) diff --git a/docs/reference/web3.md b/docs/reference/web3.md new file mode 100644 index 000000000..848cddeb4 --- /dev/null +++ b/docs/reference/web3.md @@ -0,0 +1,49 @@ +# Web3 JSON RPC + +Burrow now ships with a web3 compliant RPC server to integrate with your favorite Ethereum tooling! +We've already tried a few tools to ensure they work correctly, but if you have any problems please +consider submitting a pull request. + +## Blockscout + +[Blockscout](https://github.com/poanetwork/blockscout) is a graphical blockchain explorer for +Ethereum based networks. Before deploying the application, ensure to set the following environment +variables so it can locate your local Burrow node. + +```bash +export ETHEREUM_JSONRPC_VARIANT=ganache +export ETHEREUM_JSONRPC_HTTP_URL=http://localhost:26660 +``` + +## Metamask + +[Metamask](https://metamask.io/) is an open-source identity management application for Ethereum, +typically used as a browser extension. After creating or importing a supported `secp256k1` key pair, +you can simply add Burrow to the list of networks. + +## Remix + +[Remix](https://remix.ethereum.org/) is a web-based integrated development environment for Solidity. +To deploy and run transactions, select `Web3 Provider` as the `Environment` and enter your local RPC +address when prompted. + +## Truffle + +[Truffle](https://www.trufflesuite.com/docs/truffle/overview) makes it easy to develop smart contracts +with automatic compilation, linking and deployment. For a quick introduction, follow the official +[tutorial](https://www.trufflesuite.com/docs/truffle/quickstart) and edit the config `truffle-config.js` +to point to your local node. To ensure Truffle uses this configuration, simply suffix all commands with +the flag `--network burrow`. + +```js +module.exports = { + networks: { + burrow: { + host: "127.0.0.1", + port: 26660, + network_id: "*" + }, + } +}; +``` + diff --git a/rpc/eth.go b/rpc/eth.go index ba960339e..35af2a0e5 100644 --- a/rpc/eth.go +++ b/rpc/eth.go @@ -6,7 +6,6 @@ import ( "fmt" "math/big" "strconv" - "strings" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/acm/balance" @@ -113,7 +112,7 @@ func (srv *EthService) NetPeerCount() (*web3.NetPeerCountResult, error) { }, nil } -// NetVersion returns the hex encoding of the genesis hash, +// NetVersion returns the hex encoding of the network id, // this is typically a small int (where 1 == Ethereum mainnet) func (srv *EthService) NetVersion() (*web3.NetVersionResult, error) { return &web3.NetVersionResult{ @@ -167,8 +166,8 @@ func (srv *EthService) EthCall(req *web3.EthCallParams) (*web3.EthCallResult, er txe, err := execution.CallSim(srv.accounts, srv.blockchain, from, to, data, srv.logger) if err != nil { return nil, err - } else if err = txe.GetException(); err != nil { - return nil, err + } else if txe.Exception != nil { + return nil, txe.Exception.AsError() } var result string @@ -207,7 +206,7 @@ func (srv *EthService) EthGetBlockByHash(req *web3.EthGetBlockByHashParams) (*we return nil, err } - block, err := srv.getBlockInfoAtHeight(height) + block, err := srv.getBlockInfoAtHeight(height, req.IsTransactionsIncluded) if err != nil { return nil, err } @@ -224,7 +223,7 @@ func (srv *EthService) EthGetBlockByNumber(req *web3.EthGetBlockByNumberParams) return nil, err } - block, err := srv.getBlockInfoAtHeight(height) + block, err := srv.getBlockInfoAtHeight(height, req.IsTransactionsIncluded) if err != nil { return nil, err } @@ -287,8 +286,8 @@ func (srv *EthService) EthGetCode(req *web3.EthGetCodeParams) (*web3.EthGetCodeR }, nil } -// TODO func (srv *EthService) EthGetStorageAt(req *web3.EthGetStorageAtParams) (*web3.EthGetStorageAtResult, error) { + // TODO // addr, err := crypto.AddressFromHexString(req.Address) // if err != nil { // return nil, err @@ -297,13 +296,13 @@ func (srv *EthService) EthGetStorageAt(req *web3.EthGetStorageAtParams) (*web3.E return nil, web3.ErrNotFound } -// TODO func (srv *EthService) EthGetTransactionByBlockHashAndIndex(req *web3.EthGetTransactionByBlockHashAndIndexParams) (*web3.EthGetTransactionByBlockHashAndIndexResult, error) { + // TODO return nil, web3.ErrNotFound } -// TODO func (srv *EthService) EthGetTransactionByBlockNumberAndIndex(req *web3.EthGetTransactionByBlockNumberAndIndexParams) (*web3.EthGetTransactionByBlockNumberAndIndexResult, error) { + // TODO return nil, web3.ErrNotFound } @@ -328,13 +327,13 @@ func (srv *EthService) EthGetTransactionByHash(req *web3.EthGetTransactionByHash return nil, err } - tx := payloadToTx(txe.Envelope.Tx.Payload) - tx.Hash = encoding.HexEncodeBytes(txe.GetTxHash()) - tx.BlockNumber = encoding.HexEncodeBytes([]byte(strconv.FormatUint(txe.Height, 10))) - tx.BlockHash = encoding.HexEncodeBytes(head.Hash()) + hash, tx, err := getHashAndCallTxFromExecution(txe) + if err != nil { + return nil, err + } return &web3.EthGetTransactionByHashResult{ - Transaction: tx, + Transaction: getTransaction(head, hash, tx), }, nil } @@ -346,6 +345,22 @@ func (srv *EthService) EthGetTransactionCount(req *web3.EthGetTransactionCountPa }, nil } +func getHashAndCallTxFromEnvelope(env *txs.Envelope) ([]byte, *payload.CallTx, error) { + if env.Tx == nil { + return nil, nil, fmt.Errorf("tx not found for %s", env.String()) + } else if tx, ok := env.Tx.Payload.(*payload.CallTx); ok { + return env.Tx.Hash().Bytes(), tx, nil + } + return nil, nil, fmt.Errorf("tx not valid") +} + +func getHashAndCallTxFromExecution(txe *exec.TxExecution) ([]byte, *payload.CallTx, error) { + if txe.Envelope == nil { + return nil, nil, fmt.Errorf("envelope not found for %s", txe.GetTxHash().String()) + } + return getHashAndCallTxFromEnvelope(txe.Envelope) +} + // EthGetTransactionReceipt returns the receipt of a previously committed tx func (srv *EthService) EthGetTransactionReceipt(req *web3.EthGetTransactionReceiptParams) (*web3.EthGetTransactionReceiptResult, error) { data, err := encoding.HexDecodeToBytes(req.TransactionHash) @@ -360,6 +375,11 @@ func (srv *EthService) EthGetTransactionReceipt(req *web3.EthGetTransactionRecei return nil, fmt.Errorf("tx with hash %s does not exist", req.TransactionHash) } + hash, tx, err := getHashAndCallTxFromExecution(txe) + if err != nil { + return nil, err + } + block, err := srv.blockchain.GetBlockHeader(txe.Height) if err != nil { return nil, err @@ -367,14 +387,16 @@ func (srv *EthService) EthGetTransactionReceipt(req *web3.EthGetTransactionRecei result := &web3.EthGetTransactionReceiptResult{ Receipt: web3.Receipt{ - Status: "0x1", - BlockNumber: encoding.HexEncodeNumber(uint64(block.Height)), - BlockHash: encoding.HexEncodeBytes(block.Hash()), - From: combineInputs(txe.Envelope.Tx.GetInputs()...), - // CumulativeGasUsed - GasUsed: encoding.HexEncodeNumber(txe.Result.GetGasUsed()), - TransactionHash: encoding.HexEncodeBytes(txe.GetTxHash()), - // TransactionIndex: strconv.FormatUint(txe.GetIndex(), 10), + Status: "0x1", + TransactionIndex: "0x0", + CumulativeGasUsed: "0x0", + LogsBloom: "0x0", + BlockNumber: encoding.HexEncodeNumber(uint64(block.Height)), + BlockHash: encoding.HexEncodeBytes(block.Hash()), + From: encoding.HexEncodeBytes(tx.GetInput().Address.Bytes()), + GasUsed: encoding.HexEncodeNumber(txe.Result.GetGasUsed()), + TransactionHash: encoding.HexEncodeBytes(hash), + Logs: []web3.Logs{}, }, } @@ -421,8 +443,12 @@ func (srv *EthService) EthPendingTransactions() (*web3.EthPendingTransactionsRes } for _, env := range envelopes { + hash, tx, err := getHashAndCallTxFromEnvelope(env) + if err != nil { + continue + } pending = append(pending, web3.PendingTransactions{ - Transaction: payloadToTx(env.Tx.Payload), + Transaction: getTransaction(nil, hash, tx), }) } @@ -432,12 +458,14 @@ func (srv *EthService) EthPendingTransactions() (*web3.EthPendingTransactionsRes } func (srv *EthService) EthEstimateGas(req *web3.EthEstimateGasParams) (*web3.EthEstimateGasResult, error) { + // TODO return &web3.EthEstimateGasResult{ GasUsed: encoding.HexEncodeNumber(0), }, nil } func (srv *EthService) EthGasPrice() (*web3.EthGasPriceResult, error) { + // TODO return &web3.EthGasPriceResult{ GasPrice: encoding.HexEncodeNumber(0), }, nil @@ -456,18 +484,18 @@ type RawTx struct { S []byte `json:"s"` } -// TODO func (srv *EthService) EthGetRawTransactionByHash(req *web3.EthGetRawTransactionByHashParams) (*web3.EthGetRawTransactionByHashResult, error) { + // TODO return nil, web3.ErrNotFound } -// TODO func (srv *EthService) EthGetRawTransactionByBlockHashAndIndex(req *web3.EthGetRawTransactionByBlockHashAndIndexParams) (*web3.EthGetRawTransactionByBlockHashAndIndexResult, error) { + // TODO return nil, web3.ErrNotFound } -// TODO func (srv *EthService) EthGetRawTransactionByBlockNumberAndIndex(req *web3.EthGetRawTransactionByBlockNumberAndIndexParams) (*web3.EthGetRawTransactionByBlockNumberAndIndexResult, error) { + // TODO return nil, web3.ErrNotFound } @@ -574,7 +602,38 @@ func (srv *EthService) getBlockHeaderAtHeight(height uint64) (*types.Header, err return srv.blockchain.GetBlockHeader(height) } -func (srv *EthService) getBlockInfoAtHeight(height uint64) (web3.Block, error) { +func hexKeccak(data []byte) string { + return encoding.HexEncodeBytes(crypto.Keccak256(data)) +} + +func hexKeccakAddress(data []byte) string { + addr := crypto.Keccak256(data) + return encoding.HexEncodeBytes(addr[len(addr)-20:]) +} + +func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (web3.Block, error) { + doc := srv.blockchain.GenesisDoc() + if height == 0 { + // genesis + return web3.Block{ + Transactions: make([]web3.Transactions, 0), + Uncles: make([]string, 0), + Number: "0x0", + Nonce: "0x0000000000000000", + Hash: hexKeccak(doc.AppHash.Bytes()), + ParentHash: hexKeccak(doc.AppHash.Bytes()), + ReceiptsRoot: hexKeccak(doc.AppHash.Bytes()), + StateRoot: hexKeccak(doc.AppHash.Bytes()), + Miner: encoding.HexEncodeBytes(doc.Validators[0].Address.Bytes()), + Timestamp: encoding.HexEncodeNumber(uint64(doc.GenesisTime.Unix())), + Size: "0x0", + ExtraData: "0x0", + Difficulty: "0x0", + TotalDifficulty: "0x0", + GasLimit: "0x0", + GasUsed: "0x0", + }, nil + } block, err := srv.getBlockHeaderAtHeight(height) if err != nil { return web3.Block{}, err @@ -582,27 +641,76 @@ func (srv *EthService) getBlockInfoAtHeight(height uint64) (web3.Block, error) { return web3.Block{}, fmt.Errorf("block at height %d does not exist", height) } + transactions := make([]web3.Transactions, 0) + if includeTxs { + txes, err := srv.events.TxsAtHeight(height) + if err != nil { + return web3.Block{}, err + } + for _, txe := range txes { + hash, tx, err := getHashAndCallTxFromExecution(txe) + if err != nil { + continue + } + transactions = append(transactions, web3.Transactions{ + getTransaction(block, hash, tx), + }) + } + } + return web3.Block{ - Hash: encoding.HexEncodeBytes(block.Hash().Bytes()), - Nonce: "0x0", - Sha3Uncles: "0x0000000000000000000000000000000000000000000000000000000000000000", - Size: "0x0", + Hash: hexKeccak(block.Hash().Bytes()), + ParentHash: hexKeccak(block.Hash().Bytes()), + TransactionsRoot: hexKeccakAddress(block.Hash().Bytes()), + StateRoot: hexKeccakAddress(block.Hash().Bytes()), + ReceiptsRoot: hexKeccakAddress(block.Hash().Bytes()), + Nonce: "0x0000000000000000", + Size: encoding.HexEncodeNumber(uint64(block.TotalTxs)), Number: encoding.HexEncodeNumber(uint64(block.Height)), + Miner: encoding.HexEncodeBytes(block.ProposerAddress.Bytes()), LogsBloom: "0x0", - StateRoot: encoding.HexEncodeBytes(block.AppHash.Bytes()), - ReceiptsRoot: encoding.HexEncodeBytes(block.AppHash.Bytes()), - Miner: encoding.HexEncodeBytes(block.ProposerAddress), - TotalDifficulty: "0x0", ExtraData: "0x0", Difficulty: "0x0", + TotalDifficulty: "0x0", GasLimit: "0x0", GasUsed: "0x0", + Sha3Uncles: "0x0", Timestamp: encoding.HexEncodeNumber(uint64(block.Time.Unix())), - ParentHash: encoding.HexEncodeBytes(block.AppHash.Bytes()), - TransactionsRoot: encoding.HexEncodeBytes(block.AppHash.Bytes()), + Transactions: transactions, + Uncles: []string{}, }, nil } +func getTransaction(block *types.Header, hash []byte, tx *payload.CallTx) web3.Transaction { + transaction := web3.Transaction{ + V: "0x0", + R: "0x0", + S: "0x0", + From: encoding.HexEncodeBytes(tx.Input.Address.Bytes()), + Value: encoding.HexEncodeNumber(tx.Input.Amount), + Nonce: encoding.HexEncodeNumber(tx.Input.Sequence), + Gas: encoding.HexEncodeNumber(tx.GasLimit), + GasPrice: encoding.HexEncodeNumber(tx.GasPrice), + Data: encoding.HexEncodeBytes(tx.Data), + } + + if block != nil { + // may be pending + transaction.BlockHash = hexKeccak(block.Hash().Bytes()) + transaction.Hash = encoding.HexEncodeBytes(hash) + transaction.BlockNumber = encoding.HexEncodeNumber(uint64(block.Height)) + transaction.TransactionIndex = encoding.HexEncodeNumber(0) + } + + if tx.Address != nil { + transaction.To = encoding.HexEncodeBytes(tx.Address.Bytes()) + } else { + transaction.To = "null" + } + + return transaction +} + func (srv *EthService) getHeightByWord(height string) (uint64, bool) { switch height { case "earliest": @@ -631,55 +739,8 @@ func (srv *EthService) getHeightByWordOrNumber(i string) (uint64, error) { return height, nil } -func combineInputs(ins ...*payload.TxInput) string { - addrs := make([]string, 0, len(ins)) - for _, i := range ins { - addrs = append(addrs, encoding.HexEncodeBytes(i.Address.Bytes())) - } - return strings.Join(addrs, ",") -} - -func combineOutputs(outs ...*payload.TxOutput) string { - addrs := make([]string, 0, len(outs)) - for _, o := range outs { - addrs = append(addrs, encoding.HexEncodeBytes(o.Address.Bytes())) - } - return strings.Join(addrs, ",") -} - -func payloadToTx(in payload.Payload) web3.Transaction { - switch tx := in.(type) { - case *payload.CallTx: - transaction := web3.Transaction{ - From: encoding.HexEncodeBytes(tx.Input.Address.Bytes()), - Value: encoding.HexEncodeNumber(tx.Input.Amount), - Nonce: encoding.HexEncodeNumber(tx.Input.Sequence), - Gas: encoding.HexEncodeNumber(tx.GasLimit), - Data: encoding.HexEncodeBytes(tx.Data), - } - - if tx.Address != nil { - transaction.To = encoding.HexEncodeBytes(tx.Address.Bytes()) - } else { - transaction.To = "null" - } - - return transaction - case *payload.SendTx: - return web3.Transaction{ - From: combineInputs(tx.Inputs...), - To: combineOutputs(tx.Outputs...), - } - default: - return web3.Transaction{ - From: combineInputs(tx.GetInputs()...), - } - } -} - -// Note: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1767.md#rationale - // EthSendTransaction constructs, signs and broadcasts a tx from the local node +// Note: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1767.md#rationale func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (*web3.EthSendTransactionResult, error) { tx := &payload.CallTx{ Input: new(payload.TxInput), @@ -783,6 +844,7 @@ func (srv *EthService) EthAccounts() (*web3.EthAccountsResult, error) { if err != nil { return nil, fmt.Errorf("could not retrieve key for %s", addr) } else if key.CurveType != crypto.CurveTypeSecp256k1 { + // we only want ethereum keys continue } addrs = append(addrs, encoding.HexEncodeBytes(key.Address.Bytes())) diff --git a/rpc/eth_test.go b/rpc/eth_test.go index 357bd4087..d9fa126b8 100644 --- a/rpc/eth_test.go +++ b/rpc/eth_test.go @@ -159,6 +159,7 @@ func TestWeb3Service(t *testing.T) { Data: encoding.HexAddPrefix(string(packed)), }, }) + require.NoError(t, err) value, err := encoding.HexDecodeToBytes(result.ReturnValue) require.NoError(t, err) diff --git a/rpc/web3/server.go b/rpc/web3/server.go index 20604d025..4e336a4c9 100644 --- a/rpc/web3/server.go +++ b/rpc/web3/server.go @@ -74,23 +74,23 @@ func (c Code) RPCErrorWithMessage(msg string) *RPCError { // https://www.jsonrpc.org/specification#request_object type RPCRequest struct { JSONRPC string `json:"jsonrpc"` + ID interface{} `json:"id"` Method string `json:"method"` Params json.RawMessage `json:"params"` - ID interface{} `json:"id"` } // https://www.jsonrpc.org/specification#response_object type RPCResultResponse struct { JSONRPC string `json:"jsonrpc"` - Result interface{} `json:"result"` ID interface{} `json:"id"` + Result interface{} `json:"result"` } // https://www.jsonrpc.org/specification#response_object type RPCErrorResponse struct { JSONRPC string `json:"jsonrpc"` - Error *RPCError `json:"error"` ID interface{} `json:"id"` + Error *RPCError `json:"error"` } // https://www.jsonrpc.org/specification#error_object @@ -104,6 +104,14 @@ func NewRPCError(code int, msg string) *RPCError { return &RPCError{Code: code, Message: msg} } +func (r *RPCError) AsRPCErrorResponse(id interface{}) RPCErrorResponse { + return RPCErrorResponse{ + JSONRPC: JSONRPC, + ID: id, + Error: r, + } +} + type Server struct { service Service } @@ -194,36 +202,54 @@ func StructToResult(in interface{}) interface{} { func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { if r.Method == http.MethodOptions { w.Header().Set("Access-Control-Allow-Origin", "*") - w.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET") + w.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS") w.Header().Set("Access-Control-Allow-Headers", "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range") w.Header().Set("Accept-Range", "bytes") w.WriteHeader(http.StatusOK) w.Write([]byte{}) return } else if r.Method != http.MethodPost { - WriteError(w, "", ErrInternal.RPCError()) + WriteData(w, ErrInternal.RPCError().AsRPCErrorResponse(nil)) return } data, err := ioutil.ReadAll(r.Body) if err != nil { - WriteError(w, nil, ErrInvalidRequest.RPCError()) + WriteData(w, ErrInvalidRequest.RPCError().AsRPCErrorResponse(nil)) return } r.Body.Close() - in := new(RPCRequest) - err = json.Unmarshal(data, in) + requests := make([]RPCRequest, 0) + err = json.Unmarshal(data, &requests) if err != nil { - WriteError(w, nil, ErrCouldNotParse.RPCError()) - return + request := new(RPCRequest) + err = json.Unmarshal(data, request) + if err != nil { + WriteData(w, ErrCouldNotParse.RPCError().AsRPCErrorResponse(nil)) + return + } + requests = []RPCRequest{*request} } + responses := make([]interface{}, 0) + for _, req := range requests { + responses = append(responses, srv.Do(req)) + } + + if len(responses) == 1 { + WriteData(w, responses[0]) + } else { + WriteData(w, responses) + } +} + +func (srv *Server) Do(in RPCRequest) interface{} { if in.JSONRPC != JSONRPC || in.Method == "" || in.ID == nil { - WriteError(w, nil, ErrInvalidParams.RPCError()) - return + return ErrInvalidParams.RPCError().AsRPCErrorResponse(nil) } + var err error var out interface{} switch in.Method { @@ -462,38 +488,21 @@ func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { } if err != nil { - WriteError(w, in.ID, ErrInternal.RPCErrorWithMessage(err.Error())) - return + return ErrInternal.RPCErrorWithMessage(err.Error()).AsRPCErrorResponse(in.ID) } - WriteData(w, in.ID, out) -} - -func WriteError(w http.ResponseWriter, id interface{}, resp *RPCError) { - data, err := json.Marshal(&RPCErrorResponse{ + return RPCResultResponse{ JSONRPC: JSONRPC, - Error: resp, - ID: id, - }) - if err != nil { - panic(err) + ID: in.ID, + Result: StructToResult(out), } - w.Header().Set("Content-Type", "application/json") - w.Write(data) } -func WriteData(w http.ResponseWriter, id interface{}, result interface{}) { - resp := &RPCResultResponse{ - JSONRPC: JSONRPC, - ID: id, - Result: StructToResult(result), - } +func WriteData(w http.ResponseWriter, resp interface{}) { data, err := json.Marshal(resp) if err != nil { - WriteError(w, id, ErrInternal.RPCError()) - return + panic(err) } w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) w.Write(data) } diff --git a/rpc/web3/types.go b/rpc/web3/types.go index 315ae01ec..4cc18fc2b 100644 --- a/rpc/web3/types.go +++ b/rpc/web3/types.go @@ -127,55 +127,55 @@ type NetVersionResult struct { // chain ID associated with the current network ChainID string `json:"chainID"` } -type EthBlockNumberResult struct { - BlockNumber string `json:"blockNumber"` -} type BlockNumber struct { // The hex representation of the block's height BlockNumber string `json:"blockNumber"` } -type EthCallParams struct { - Transaction - +type EthBlockNumberResult struct { BlockNumber string `json:"blockNumber"` } +type TransactionIndex struct { + // Hex representation of the integer + Integer string `json:"integer"` +} type Transaction struct { + // Integer of the transaction's index position in the block. null when its pending + TransactionIndex string `json:"transactionIndex"` // Hash of the block where this transaction was in. null when its pending BlockHash string `json:"blockHash"` - // The data field sent with the transaction - Data string `json:"data"` - // address of the receiver. null when its a contract creation transaction - To string `json:"to"` - // ECDSA signature r - R string `json:"r"` - // ECDSA signature s - S string `json:"s"` // Address of the sender From string `json:"from"` - // The gas limit provided by the sender in Wei - Gas string `json:"gas"` + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` + // The data field sent with the transaction + Data string `json:"data"` // A number only to be used once Nonce string `json:"nonce"` + // The gas limit provided by the sender in Wei + Gas string `json:"gas"` + // Hex representation of a Keccak 256 hash + Value string `json:"value"` // ECDSA recovery id V string `json:"v"` - // Block number where this transaction was in. null when its pending - BlockNumber string `json:"blockNumber"` - // Hex representation of a Keccak 256 hash - Hash string `json:"hash"` - // Integer of the transaction's index position in the block. null when its pending - TransactionIndex string `json:"transactionIndex"` + // ECDSA signature s + S string `json:"s"` // The gas price willing to be paid by the sender in Wei GasPrice string `json:"gasPrice"` - // Hex representation of a Keccak 256 hash - Value string `json:"value"` + // address of the receiver. null when its a contract creation transaction + To string `json:"to"` + // Block number where this transaction was in. null when its pending + BlockNumber string `json:"blockNumber"` + // ECDSA signature r + R string `json:"r"` } type BlockHash struct { // Hex representation of a Keccak 256 hash Keccak string `json:"keccak"` } -type TransactionIndex struct { - // Hex representation of the integer - Integer string `json:"integer"` +type EthCallParams struct { + Transaction + + BlockNumber string `json:"blockNumber"` } type EthCallResult struct { // Hex representation of a variable length byte array @@ -206,114 +206,114 @@ type EthGetBalanceParams struct { // The hex representation of the block's height BlockNumber string `json:"blockNumber"` } -type EthGetBalanceResult struct { - GetBalanceResult string `json:"getBalanceResult"` -} type GetBalanceResult struct { // Hex representation of the integer Integer string `json:"integer"` } +type EthGetBalanceResult struct { + GetBalanceResult string `json:"getBalanceResult"` +} type EthGetBlockByHashParams struct { // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` // If `true` it returns the full transaction objects, if `false` only the hashes of the transactions. IsTransactionsIncluded bool `json:"isTransactionsIncluded"` } -type EthGetBlockByHashResult struct { - GetBlockByHashResult Block `json:"getBlockByHashResult"` -} -type GetBlockByHashResult struct { - Block -} type Block struct { - // Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter - Transactions []Transactions `json:"transactions"` - // Array of uncle hashes - Uncles []string `json:"uncles"` - // Hex representation of a Keccak 256 hash - StateRoot string `json:"stateRoot"` - // The block hash or null when its the pending block - Hash string `json:"hash"` - // Randomly selected number to satisfy the proof-of-work or null when its the pending block - Nonce string `json:"nonce"` // Hex representation of a Keccak 256 hash Sha3Uncles string `json:"sha3Uncles"` // Hex representation of a Keccak 256 hash TransactionsRoot string `json:"transactionsRoot"` - // The 'extra data' field of this block - ExtraData string `json:"extraData"` - // The maximum gas allowed in this block - GasLimit string `json:"gasLimit"` + // Hex representation of a Keccak 256 hash + ParentHash string `json:"parentHash"` + // The address of the beneficiary to whom the mining rewards were given or null when its the pending block + Miner string `json:"miner"` + // Integer of the difficulty for this block + Difficulty string `json:"difficulty"` + // The total used gas by all transactions in this block + GasUsed string `json:"gasUsed"` // The unix timestamp for when the block was collated Timestamp string `json:"timestamp"` + // Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter + Transactions []Transactions `json:"transactions"` // The block number or null when its the pending block Number string `json:"number"` + // The block hash or null when its the pending block + Hash string `json:"hash"` + // Array of uncle hashes + Uncles []string `json:"uncles"` // Hex representation of a Keccak 256 hash ReceiptsRoot string `json:"receiptsRoot"` - // The address of the beneficiary to whom the mining rewards were given or null when its the pending block - Miner string `json:"miner"` + // The 'extra data' field of this block + ExtraData string `json:"extraData"` + // Hex representation of a Keccak 256 hash + StateRoot string `json:"stateRoot"` // Integer of the total difficulty of the chain until this block TotalDifficulty string `json:"totalDifficulty"` // Integer the size of this block in bytes Size string `json:"size"` - // The total used gas by all transactions in this block - GasUsed string `json:"gasUsed"` - // Hex representation of a Keccak 256 hash - ParentHash string `json:"parentHash"` - // Integer of the difficulty for this block - Difficulty string `json:"difficulty"` + // The maximum gas allowed in this block + GasLimit string `json:"gasLimit"` + // Randomly selected number to satisfy the proof-of-work or null when its the pending block + Nonce string `json:"nonce"` // The bloom filter for the logs of the block or null when its the pending block LogsBloom string `json:"logsBloom"` } +type Miner struct { + Address string `json:"address"` +} type Transactions struct { Transaction } -type Uncles struct { +type Number struct { + // Hex representation of the integer + Integer string `json:"integer"` +} +type Hash struct { // Hex representation of a Keccak 256 hash Keccak string `json:"keccak"` } -type Hash struct { +type Uncles struct { // Hex representation of a Keccak 256 hash Keccak string `json:"keccak"` } -type Nonce struct { +type TotalDifficulty struct { // Hex representation of the integer Integer string `json:"integer"` } -type Number struct { +type Nonce struct { // Hex representation of the integer Integer string `json:"integer"` } -type Miner struct { - Address string `json:"address"` +type GetBlockByHashResult struct { + Block } -type TotalDifficulty struct { - // Hex representation of the integer - Integer string `json:"integer"` +type EthGetBlockByHashResult struct { + GetBlockByHashResult Block `json:"getBlockByHashResult"` } type EthGetBlockByNumberParams struct { BlockNumber string `json:"blockNumber"` // If `true` it returns the full transaction objects, if `false` only the hashes of the transactions. IsTransactionsIncluded bool `json:"isTransactionsIncluded"` } -type EthGetBlockByNumberResult struct { - GetBlockByNumberResult Block `json:"getBlockByNumberResult"` -} type GetBlockByNumberResult struct { Block } +type EthGetBlockByNumberResult struct { + GetBlockByNumberResult Block `json:"getBlockByNumberResult"` +} type EthGetBlockTransactionCountByHashParams struct { // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` } -type EthGetBlockTransactionCountByHashResult struct { - // The Number of total transactions in the given block - BlockTransactionCountByHash string `json:"blockTransactionCountByHash"` -} type BlockTransactionCountByHash struct { // Hex representation of the integer Integer string `json:"integer"` } +type EthGetBlockTransactionCountByHashResult struct { + // The Number of total transactions in the given block + BlockTransactionCountByHash string `json:"blockTransactionCountByHash"` +} type EthGetBlockTransactionCountByNumberParams struct { BlockNumber string `json:"blockNumber"` } @@ -335,43 +335,42 @@ type EthGetFilterChangesParams struct { // An identifier used to reference the filter. FilterId string `json:"filterId"` } -type LogResult struct { - // An indexed event generated during a transaction - Log - // Hex representation of the integer - LogIndex string `json:"logIndex"` - // The hex representation of the Keccak 256 of the RLP encoded block - BlockHash string `json:"blockHash"` - // Hex representation of a variable length byte array - Data string `json:"data"` - +type Log struct { Topics []Topics `json:"topics"` // Hex representation of a Keccak 256 hash TransactionHash string `json:"transactionHash"` - // Hex representation of the integer - TransactionIndex string `json:"transactionIndex"` // Sender of the transaction Address string `json:"address"` + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` // The hex representation of the block's height BlockNumber string `json:"blockNumber"` + // Hex representation of a variable length byte array + Data string `json:"data"` + // Hex representation of the integer + LogIndex string `json:"logIndex"` + // Hex representation of the integer + TransactionIndex string `json:"transactionIndex"` } -type Log struct { - // Sender of the transaction - Address string `json:"address"` - // The hex representation of the block's height - BlockNumber string `json:"blockNumber"` +type LogResult struct { + // An indexed event generated during a transaction + Log Topics []Topics `json:"topics"` // Hex representation of a Keccak 256 hash TransactionHash string `json:"transactionHash"` - // Hex representation of the integer - TransactionIndex string `json:"transactionIndex"` + // Sender of the transaction + Address string `json:"address"` // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` // Hex representation of a variable length byte array Data string `json:"data"` // Hex representation of the integer LogIndex string `json:"logIndex"` + // Hex representation of the integer + TransactionIndex string `json:"transactionIndex"` } type EthGetFilterChangesResult struct { LogResult []LogResult `json:"logResult"` @@ -383,22 +382,22 @@ type EthGetFilterLogsParams struct { type Logs struct { // An indexed event generated during a transaction Log - // Hex representation of a variable length byte array - Data string `json:"data"` // Hex representation of the integer LogIndex string `json:"logIndex"` + // Hex representation of the integer + TransactionIndex string `json:"transactionIndex"` + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` + // Sender of the transaction + Address string `json:"address"` // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` // The hex representation of the block's height BlockNumber string `json:"blockNumber"` + // Hex representation of a variable length byte array + Data string `json:"data"` Topics []Topics `json:"topics"` - // Hex representation of a Keccak 256 hash - TransactionHash string `json:"transactionHash"` - // Hex representation of the integer - TransactionIndex string `json:"transactionIndex"` - // Sender of the transaction - Address string `json:"address"` } type EthGetFilterLogsResult struct { Logs []Logs `json:"logs"` @@ -430,10 +429,6 @@ type EthGetRawTransactionByBlockNumberAndIndexResult struct { // Hex representation of a variable length byte array RawTransaction string `json:"rawTransaction"` } -type EthGetLogsParams struct { - // A filter used to monitor the blockchain for log/events - Filter -} type Filter struct { // The hex representation of the block's height FromBlock string `json:"fromBlock"` @@ -452,6 +447,10 @@ type Topics struct { // Hex representation of a 256 bit unit of data DataWord string `json:"dataWord"` } +type EthGetLogsParams struct { + // A filter used to monitor the blockchain for log/events + Filter +} type EthGetLogsResult struct { Logs []Logs `json:"logs"` } @@ -472,12 +471,12 @@ type EthGetTransactionByBlockHashAndIndexParams struct { // Hex representation of the integer Index string `json:"index"` } -type EthGetTransactionByBlockHashAndIndexResult struct { - TransactionResult Transaction `json:"transactionResult"` -} type TransactionResult struct { Transaction } +type EthGetTransactionByBlockHashAndIndexResult struct { + TransactionResult Transaction `json:"transactionResult"` +} type EthGetTransactionByBlockNumberAndIndexParams struct { BlockNumber string `json:"blockNumber"` // Hex representation of the integer @@ -498,48 +497,46 @@ type EthGetTransactionCountParams struct { BlockNumber string `json:"blockNumber"` } -type EthGetTransactionCountResult struct { - NonceOrNull string `json:"nonceOrNull"` -} type NonceOrNull struct { // A number only to be used once Nonce string `json:"nonce"` } +type EthGetTransactionCountResult struct { + NonceOrNull string `json:"nonceOrNull"` +} type EthGetTransactionReceiptParams struct { // Hex representation of a Keccak 256 hash TransactionHash string `json:"transactionHash"` } -type EthGetTransactionReceiptResult struct { - // returns either a receipt or null - Receipt -} type Receipt struct { - // The sender of the transaction - From string `json:"from"` + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` + // Hex representation of the integer + CumulativeGasUsed string `json:"cumulativeGasUsed"` // Hex representation of the integer GasUsed string `json:"gasUsed"` + // An array of all the logs triggered during the transaction + Logs []Logs `json:"logs"` // A 2048 bit bloom filter from the logs of the transaction. Each log sets 3 bits though taking the low-order 11 bits of each of the first three pairs of bytes in a Keccak 256 hash of the log's byte series TransactionIndex string `json:"transactionIndex"` // Whether or not the transaction threw an error. Status string `json:"status"` // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` - // The hex representation of the block's height - BlockNumber string `json:"blockNumber"` - // An array of all the logs triggered during the transaction - Logs []Logs `json:"logs"` + // The contract address created, if the transaction was a contract creation, otherwise null + ContractAddress string `json:"contractAddress"` + // The sender of the transaction + From string `json:"from"` // A 2048 bit bloom filter from the logs of the transaction. Each log sets 3 bits though taking the low-order 11 bits of each of the first three pairs of bytes in a Keccak 256 hash of the log's byte series LogsBloom string `json:"logsBloom"` // Destination address of the transaction To string `json:"to"` // Hex representation of a Keccak 256 hash TransactionHash string `json:"transactionHash"` - // Hex representation of a Keccak 256 hash - PostTransactionState string `json:"postTransactionState"` - // The contract address created, if the transaction was a contract creation, otherwise null - ContractAddress string `json:"contractAddress"` - // Hex representation of the integer - CumulativeGasUsed string `json:"cumulativeGasUsed"` +} +type EthGetTransactionReceiptResult struct { + // returns either a receipt or null + Receipt } type EthGetUncleByBlockHashAndIndexParams struct { // The hex representation of the Keccak 256 of the RLP encoded block @@ -547,50 +544,50 @@ type EthGetUncleByBlockHashAndIndexParams struct { // Hex representation of the integer Index string `json:"index"` } -type EthGetUncleByBlockHashAndIndexResult struct { - UncleOrNull Uncle `json:"uncleOrNull"` -} -type UncleOrNull struct { - // Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions. - Uncle -} type Uncle struct { - // The block hash or null when its the pending block - Hash string `json:"hash"` // Randomly selected number to satisfy the proof-of-work or null when its the pending block Nonce string `json:"nonce"` - // The bloom filter for the logs of the block or null when its the pending block - LogsBloom string `json:"logsBloom"` - // The unix timestamp for when the block was collated - Timestamp string `json:"timestamp"` - // Array of uncle hashes - Uncles []string `json:"uncles"` // Hex representation of a Keccak 256 hash - ReceiptsRoot string `json:"receiptsRoot"` - // The address of the beneficiary to whom the mining rewards were given or null when its the pending block - Miner string `json:"miner"` - // Integer of the difficulty for this block - Difficulty string `json:"difficulty"` + TransactionsRoot string `json:"transactionsRoot"` // Integer of the total difficulty of the chain until this block TotalDifficulty string `json:"totalDifficulty"` - // The maximum gas allowed in this block - GasLimit string `json:"gasLimit"` + // Integer the size of this block in bytes + Size string `json:"size"` // The total used gas by all transactions in this block GasUsed string `json:"gasUsed"` + // Array of uncle hashes + Uncles []string `json:"uncles"` // The block number or null when its the pending block Number string `json:"number"` + // The block hash or null when its the pending block + Hash string `json:"hash"` // Hex representation of a Keccak 256 hash - ParentHash string `json:"parentHash"` + Sha3Uncles string `json:"sha3Uncles"` // Hex representation of a Keccak 256 hash StateRoot string `json:"stateRoot"` // The 'extra data' field of this block ExtraData string `json:"extraData"` - // Integer the size of this block in bytes - Size string `json:"size"` + // The unix timestamp for when the block was collated + Timestamp string `json:"timestamp"` // Hex representation of a Keccak 256 hash - Sha3Uncles string `json:"sha3Uncles"` + ReceiptsRoot string `json:"receiptsRoot"` + // The address of the beneficiary to whom the mining rewards were given or null when its the pending block + Miner string `json:"miner"` + // The maximum gas allowed in this block + GasLimit string `json:"gasLimit"` // Hex representation of a Keccak 256 hash - TransactionsRoot string `json:"transactionsRoot"` + ParentHash string `json:"parentHash"` + // The bloom filter for the logs of the block or null when its the pending block + LogsBloom string `json:"logsBloom"` + // Integer of the difficulty for this block + Difficulty string `json:"difficulty"` +} +type UncleOrNull struct { + // Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions. + Uncle +} +type EthGetUncleByBlockHashAndIndexResult struct { + UncleOrNull Uncle `json:"uncleOrNull"` } type EthGetUncleByBlockNumberAndIndexParams struct { // The hex representation of the block's height @@ -598,25 +595,25 @@ type EthGetUncleByBlockNumberAndIndexParams struct { // Hex representation of the integer Index string `json:"index"` } -type EthGetUncleByBlockNumberAndIndexResult struct { - // returns an uncle or null - UncleResult Uncle `json:"uncleResult"` -} type UncleResult struct { // Orphaned blocks that can be included in the chain but at a lower block reward. NOTE: An uncle doesn’t contain individual transactions. Uncle } +type EthGetUncleByBlockNumberAndIndexResult struct { + // returns an uncle or null + UncleResult Uncle `json:"uncleResult"` +} type EthGetUncleCountByBlockHashParams struct { // The hex representation of the Keccak 256 of the RLP encoded block BlockHash string `json:"blockHash"` } -type EthGetUncleCountByBlockHashResult struct { - UncleCountOrNull string `json:"uncleCountOrNull"` -} type UncleCountOrNull struct { // Hex representation of the integer Integer string `json:"integer"` } +type EthGetUncleCountByBlockHashResult struct { + UncleCountOrNull string `json:"uncleCountOrNull"` +} type EthGetUncleCountByBlockNumberParams struct { BlockNumber string `json:"blockNumber"` } @@ -635,13 +632,6 @@ type StorageKeys struct { // Hex representation of the integer Integer string `json:"integer"` } -type EthGetProofResult struct { - ProofAccountOrNull ProofAccount `json:"proofAccountOrNull"` -} -type ProofAccountOrNull struct { - // The merkle proofs of the specified account connecting them to the blockhash of the block specified - ProofAccount -} type ProofAccount struct { // Hex representation of the integer Balance string `json:"balance"` @@ -663,17 +653,24 @@ type Proof struct { ProofNode string `json:"proofNode"` } type StorageProof struct { + // The set of node values needed to traverse a patricia merkle tree (from root to leaf) to retrieve a value + Proof []string `json:"proof"` // Hex representation of the integer Key string `json:"key"` // Hex representation of the integer Value string `json:"value"` - // The set of node values needed to traverse a patricia merkle tree (from root to leaf) to retrieve a value - Proof []string `json:"proof"` } type AccountProof struct { // Hex representation of a variable length byte array ProofNode string `json:"proofNode"` } +type ProofAccountOrNull struct { + // The merkle proofs of the specified account connecting them to the blockhash of the block specified + ProofAccount +} +type EthGetProofResult struct { + ProofAccountOrNull ProofAccount `json:"proofAccountOrNull"` +} type EthGetWorkResult struct { Work []string `json:"work"` } @@ -703,34 +700,34 @@ type EthNewPendingTransactionFilterResult struct { } type PendingTransactions struct { Transaction - // Block number where this transaction was in. null when its pending - BlockNumber string `json:"blockNumber"` - // Hex representation of a Keccak 256 hash - Hash string `json:"hash"` // Integer of the transaction's index position in the block. null when its pending TransactionIndex string `json:"transactionIndex"` - // The gas price willing to be paid by the sender in Wei - GasPrice string `json:"gasPrice"` - // Hex representation of a Keccak 256 hash - Value string `json:"value"` // Hash of the block where this transaction was in. null when its pending BlockHash string `json:"blockHash"` - // The data field sent with the transaction - Data string `json:"data"` - // address of the receiver. null when its a contract creation transaction - To string `json:"to"` - // ECDSA signature r - R string `json:"r"` // Address of the sender From string `json:"from"` - // The gas limit provided by the sender in Wei - Gas string `json:"gas"` + // Hex representation of a Keccak 256 hash + Hash string `json:"hash"` + // The data field sent with the transaction + Data string `json:"data"` // A number only to be used once Nonce string `json:"nonce"` + // The gas limit provided by the sender in Wei + Gas string `json:"gas"` + // Hex representation of a Keccak 256 hash + Value string `json:"value"` // ECDSA recovery id V string `json:"v"` // ECDSA signature s S string `json:"s"` + // The gas price willing to be paid by the sender in Wei + GasPrice string `json:"gasPrice"` + // address of the receiver. null when its a contract creation transaction + To string `json:"to"` + // Block number where this transaction was in. null when its pending + BlockNumber string `json:"blockNumber"` + // ECDSA signature r + R string `json:"r"` } type EthPendingTransactionsResult struct { PendingTransactions []PendingTransactions `json:"pendingTransactions"` @@ -792,13 +789,6 @@ type EthSubmitWorkResult struct { // Whether or not the provided solution is valid SolutionValid bool `json:"solutionValid"` } -type EthSyncingResult struct { - Syncing SyncStatus `json:"syncing"` -} -type Syncing struct { - // An object with sync status data - SyncStatus -} type SyncStatus struct { // Hex representation of the integer StartingBlock string `json:"startingBlock"` @@ -811,6 +801,13 @@ type SyncStatus struct { // Hex representation of the integer PulledStates string `json:"pulledStates"` } +type Syncing struct { + // An object with sync status data + SyncStatus +} +type EthSyncingResult struct { + Syncing SyncStatus `json:"syncing"` +} type EthUninstallFilterParams struct { // An identifier used to reference the filter. FilterId string `json:"filterId"` From 8e753db270620be0077eebfd048cff4703557037 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Thu, 19 Sep 2019 13:17:19 +0100 Subject: [PATCH 010/185] fix eth_call decoding, add txcount, block gas limit max fix getBlockByHash and add test Signed-off-by: Gregory Hill --- acm/balance/balance.go | 2 +- rpc/eth.go | 35 +++++++++++++++++++----------- rpc/eth_test.go | 10 ++++++++- txs/tx.go | 48 ++++++++++++++++++++++-------------------- 4 files changed, 58 insertions(+), 37 deletions(-) diff --git a/acm/balance/balance.go b/acm/balance/balance.go index 978575358..a5c9b422e 100644 --- a/acm/balance/balance.go +++ b/acm/balance/balance.go @@ -132,7 +132,7 @@ func (bs Balances) HasPower() bool { } func NativeToWei(n uint64) *big.Int { - // 1 unit == 1 ether + // 1 native unit to 1 ether (wei) x := new(big.Int).SetUint64(n) return new(big.Int).Mul(x, eth) } diff --git a/rpc/eth.go b/rpc/eth.go index 35af2a0e5..0110efcb7 100644 --- a/rpc/eth.go +++ b/rpc/eth.go @@ -160,8 +160,10 @@ func (srv *EthService) EthCall(req *web3.EthCallParams) (*web3.EthCallResult, er } } - // don't hex decode abi - data := []byte(encoding.HexRemovePrefix(req.Transaction.Data)) + data, err := encoding.HexDecodeToBytes(req.Transaction.Data) + if err != nil { + return nil, err + } txe, err := execution.CallSim(srv.accounts, srv.blockchain, from, to, data, srv.logger) if err != nil { @@ -213,7 +215,7 @@ func (srv *EthService) EthGetBlockByHash(req *web3.EthGetBlockByHashParams) (*we return &web3.EthGetBlockByHashResult{ GetBlockByHashResult: block, - }, web3.ErrNotFound + }, nil } // EthGetBlockByNumber returns block info at the given height @@ -247,7 +249,7 @@ func (srv *EthService) EthGetBlockTransactionCountByHash(req *web3.EthGetBlockTr return &web3.EthGetBlockTransactionCountByHashResult{ BlockTransactionCountByHash: encoding.HexEncodeNumber(uint64(block.NumTxs)), - }, web3.ErrNotFound + }, nil } // EthGetBlockTransactionCountByNumber returns the number of transactions in a block matching a given height @@ -339,9 +341,18 @@ func (srv *EthService) EthGetTransactionByHash(req *web3.EthGetTransactionByHash // EthGetTransactionCount returns the number of transactions sent from an address func (srv *EthService) EthGetTransactionCount(req *web3.EthGetTransactionCountParams) (*web3.EthGetTransactionCountResult, error) { - // TODO: implement + addr, err := encoding.HexDecodeToAddress(req.Address) + if err != nil { + return nil, err + } + + acc, err := srv.accounts.GetAccount(addr) + if err != nil { + return nil, err + } + return &web3.EthGetTransactionCountResult{ - NonceOrNull: encoding.HexEncodeNumber(0), + NonceOrNull: encoding.HexEncodeNumber(acc.GetSequence()), }, nil } @@ -587,11 +598,11 @@ func (srv *EthService) EthSyncing() (*web3.EthSyncingResult, error) { } func (srv *EthService) getBlockHeightByHash(hash string) (uint64, error) { - for i := uint64(0); i < srv.blockchain.LastBlockHeight(); i++ { + for i := uint64(1); i < srv.blockchain.LastBlockHeight(); i++ { head, err := srv.blockchain.GetBlockHeader(i) if err != nil { return 0, err - } else if head.Hash().String() == hash { + } else if hexKeccak(head.Hash().Bytes()) == hash { return i, nil } } @@ -661,9 +672,9 @@ func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (web return web3.Block{ Hash: hexKeccak(block.Hash().Bytes()), ParentHash: hexKeccak(block.Hash().Bytes()), - TransactionsRoot: hexKeccakAddress(block.Hash().Bytes()), - StateRoot: hexKeccakAddress(block.Hash().Bytes()), - ReceiptsRoot: hexKeccakAddress(block.Hash().Bytes()), + TransactionsRoot: hexKeccak(block.Hash().Bytes()), + StateRoot: hexKeccak(block.Hash().Bytes()), + ReceiptsRoot: hexKeccak(block.Hash().Bytes()), Nonce: "0x0000000000000000", Size: encoding.HexEncodeNumber(uint64(block.TotalTxs)), Number: encoding.HexEncodeNumber(uint64(block.Height)), @@ -672,7 +683,7 @@ func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (web ExtraData: "0x0", Difficulty: "0x0", TotalDifficulty: "0x0", - GasLimit: "0x0", + GasLimit: encoding.HexEncodeNumber(2<<52 - 1), GasUsed: "0x0", Sha3Uncles: "0x0", Timestamp: encoding.HexEncodeNumber(uint64(block.Time.Unix())), diff --git a/rpc/eth_test.go b/rpc/eth_test.go index d9fa126b8..8302d7b79 100644 --- a/rpc/eth_test.go +++ b/rpc/eth_test.go @@ -156,7 +156,7 @@ func TestWeb3Service(t *testing.T) { Transaction: web3.Transaction{ From: encoding.HexEncodeBytes(genesisAccounts[1].GetAddress().Bytes()), To: contractAddress, - Data: encoding.HexAddPrefix(string(packed)), + Data: encoding.HexEncodeBytes(packed), }, }) require.NoError(t, err) @@ -205,4 +205,12 @@ func TestWeb3Service(t *testing.T) { require.Equal(t, `0x30440220345d17225ac03a575f467cea3a8d5cc2dea42fc89030c42ea175fd5140c542eb02200307004fc21ea592ce5ca013705959292c2de85b71d0fa0c84ebd8b541f505d5`, result.Signature) }) + t.Run("EthGetBlock", func(t *testing.T) { + numberResult, err := eth.EthGetBlockByNumber(&web3.EthGetBlockByNumberParams{BlockNumber: encoding.HexEncodeNumber(1)}) + require.NoError(t, err) + hashResult, err := eth.EthGetBlockByHash(&web3.EthGetBlockByHashParams{BlockHash: numberResult.GetBlockByNumberResult.Hash}) + require.NoError(t, err) + require.Equal(t, numberResult.GetBlockByNumberResult, hashResult.GetBlockByHashResult) + }) + } diff --git a/txs/tx.go b/txs/tx.go index 14134eae4..e3485d0ff 100644 --- a/txs/tx.go +++ b/txs/tx.go @@ -77,12 +77,32 @@ func (tx *Tx) MustSignBytes() []byte { } // Produces the canonical SignBytes (the Tx message that will be signed) for a Tx -func (tx *Tx) SignBytes(env Envelope_Encoding) ([]byte, error) { - bs, err := json.Marshal(tx) - if err != nil { - return nil, fmt.Errorf("could not generate canonical SignBytes for Payload %v: %v", tx.Payload, err) +func (tx *Tx) SignBytes(enc Envelope_Encoding) ([]byte, error) { + switch enc { + case Envelope_JSON: + bs, err := json.Marshal(tx) + if err != nil { + return nil, fmt.Errorf("could not generate canonical SignBytes for Payload %v: %v", tx.Payload, err) + } + return bs, nil + case Envelope_RLP: + switch pay := tx.Payload.(type) { + case *payload.CallTx: + input := pay.Input + return RLPEncode( + input.Sequence-1, + pay.GasPrice, + pay.GasLimit, + pay.Address.Bytes(), + balance.NativeToWei(input.Amount).Bytes(), + pay.Data.Bytes(), + ) + default: + return nil, fmt.Errorf("tx type %v not supported for rlp encoding", tx.Payload.Type()) + } + default: + return nil, fmt.Errorf("encoding type %s not supported", enc.String()) } - return bs, nil } func RLPEncode(seq, gasPrice, gasLimit uint64, address, amount, data []byte) ([]byte, error) { @@ -98,24 +118,6 @@ func RLPEncode(seq, gasPrice, gasLimit uint64, address, amount, data []byte) ([] }) } -func (tx *Tx) SignBytesRLPEncoded() ([]byte, error) { - switch pay := tx.Payload.(type) { - case *payload.CallTx: - input := pay.Input - return RLPEncode( - input.Sequence-1, - pay.GasPrice, - pay.GasLimit, - pay.Address.Bytes(), - balance.NativeToWei(input.Amount).Bytes(), - pay.Data.Bytes(), - ) - - default: - return nil, fmt.Errorf("tx type %v not supported for rlp encoding", tx.Payload.Type()) - } -} - // Serialisation intermediate for switching on type type wrapper struct { ChainID string From d33967c3b49554bbfd121b619ee206075b5de2b0 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Thu, 19 Sep 2019 16:06:41 +0100 Subject: [PATCH 011/185] get tx by hash / number & index Signed-off-by: Gregory Hill --- rpc/eth.go | 79 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 66 insertions(+), 13 deletions(-) diff --git a/rpc/eth.go b/rpc/eth.go index 0110efcb7..fafbbb297 100644 --- a/rpc/eth.go +++ b/rpc/eth.go @@ -290,22 +290,79 @@ func (srv *EthService) EthGetCode(req *web3.EthGetCodeParams) (*web3.EthGetCodeR func (srv *EthService) EthGetStorageAt(req *web3.EthGetStorageAtParams) (*web3.EthGetStorageAtResult, error) { // TODO - // addr, err := crypto.AddressFromHexString(req.Address) - // if err != nil { - // return nil, err - // } - return nil, web3.ErrNotFound } func (srv *EthService) EthGetTransactionByBlockHashAndIndex(req *web3.EthGetTransactionByBlockHashAndIndexParams) (*web3.EthGetTransactionByBlockHashAndIndexResult, error) { - // TODO - return nil, web3.ErrNotFound + height, err := srv.getBlockHeightByHash(req.BlockHash) + if err != nil { + return nil, err + } + + head, err := srv.blockchain.GetBlockHeader(height) + if err != nil { + return nil, err + } + + txes, err := srv.events.TxsAtHeight(height) + if err != nil { + return nil, err + } + + index, err := encoding.HexDecodeToNumber(req.Index) + if err != nil { + return nil, err + } + + for _, txe := range txes { + if txe.GetIndex() == index { + hash, tx, err := getHashAndCallTxFromExecution(txe) + if err != nil { + return nil, err + } + return &web3.EthGetTransactionByBlockHashAndIndexResult{ + TransactionResult: getTransaction(head, hash, tx), + }, nil + } + } + + return nil, fmt.Errorf("tx not found at hash %s, index %d", req.BlockHash, index) } func (srv *EthService) EthGetTransactionByBlockNumberAndIndex(req *web3.EthGetTransactionByBlockNumberAndIndexParams) (*web3.EthGetTransactionByBlockNumberAndIndexResult, error) { - // TODO - return nil, web3.ErrNotFound + height, err := srv.getHeightByWordOrNumber(req.BlockNumber) + if err != nil { + return nil, err + } + + head, err := srv.blockchain.GetBlockHeader(height) + if err != nil { + return nil, err + } + + txes, err := srv.events.TxsAtHeight(height) + if err != nil { + return nil, err + } + + index, err := encoding.HexDecodeToNumber(req.Index) + if err != nil { + return nil, err + } + + for _, txe := range txes { + if txe.GetIndex() == index { + hash, tx, err := getHashAndCallTxFromExecution(txe) + if err != nil { + return nil, err + } + return &web3.EthGetTransactionByBlockNumberAndIndexResult{ + TransactionResult: getTransaction(head, hash, tx), + }, nil + } + } + + return nil, fmt.Errorf("tx not found at height %d, index %d", height, index) } // EthGetTransactionByHash finds a tx by the given hash @@ -318,10 +375,6 @@ func (srv *EthService) EthGetTransactionByHash(req *web3.EthGetTransactionByHash txe, err := srv.events.TxByHash(hash) if err != nil { return nil, err - } else if txe.Envelope == nil { - return nil, fmt.Errorf("no envelope for tx %s", req.TransactionHash) - } else if txe.Envelope.Tx == nil { - return nil, fmt.Errorf("no payload for tx %s", req.TransactionHash) } head, err := srv.blockchain.GetBlockHeader(txe.Height) From 4f379b2b045413a044cfd71c34d067a2fac969f1 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 20 Sep 2019 10:51:14 +0100 Subject: [PATCH 012/185] simplify uint rpc encoding fixup unnecessary casts and encoding split out hex encoding helpers, add tests use more constants, add todos Signed-off-by: Gregory Hill --- encoding/hex.go | 44 ---------- encoding/hex/hex.go | 53 +++++++++++ encoding/hex/hex_test.go | 26 ++++++ encoding/rlp/binary.go | 64 -------------- encoding/rlp/rlp.go | 58 ++++-------- rpc/eth.go | 184 +++++++++++++++++++++------------------ rpc/eth_test.go | 60 ++++++++----- 7 files changed, 234 insertions(+), 255 deletions(-) delete mode 100644 encoding/hex.go create mode 100644 encoding/hex/hex.go create mode 100644 encoding/hex/hex_test.go delete mode 100644 encoding/rlp/binary.go diff --git a/encoding/hex.go b/encoding/hex.go deleted file mode 100644 index 6710b4773..000000000 --- a/encoding/hex.go +++ /dev/null @@ -1,44 +0,0 @@ -package encoding - -import ( - "encoding/hex" - fmt "fmt" - "strconv" - "strings" - - "github.com/hyperledger/burrow/crypto" -) - -const ( - HexPrefix = `0x` -) - -func HexEncodeBytes(data []byte) string { - return HexAddPrefix(hex.EncodeToString(data)) -} - -func HexEncodeNumber(i uint64) string { - return HexAddPrefix(strconv.FormatUint(i, 16)) -} - -func HexAddPrefix(input string) string { - return fmt.Sprintf("%s%s", HexPrefix, input) -} - -func HexRemovePrefix(input string) string { - return strings.Replace(input, HexPrefix, "", -1) -} - -func HexDecodeToBytes(input string) ([]byte, error) { - input = HexRemovePrefix(input) - return hex.DecodeString(input) -} - -func HexDecodeToNumber(i string) (uint64, error) { - return strconv.ParseUint(i, 0, 64) -} - -func HexDecodeToAddress(input string) (crypto.Address, error) { - input = HexRemovePrefix(input) - return crypto.AddressFromHexString(input) -} diff --git a/encoding/hex/hex.go b/encoding/hex/hex.go new file mode 100644 index 000000000..d914d8954 --- /dev/null +++ b/encoding/hex/hex.go @@ -0,0 +1,53 @@ +package encoding + +import ( + "encoding/hex" + fmt "fmt" + "math/big" + "strconv" + "strings" + + "github.com/hyperledger/burrow/crypto" +) + +const ( + HexPrefix = `0x` +) + +func AddPrefix(input string) string { + return fmt.Sprintf("%s%s", HexPrefix, input) +} + +func RemovePrefix(input string) string { + return strings.Replace(input, HexPrefix, "", -1) +} + +func EncodeBytes(data []byte) string { + return AddPrefix(hex.EncodeToString(data)) +} + +func EncodeNumber(i uint64) string { + return AddPrefix(strconv.FormatUint(i, 16)) +} + +func DecodeToBytes(input string) ([]byte, error) { + input = RemovePrefix(input) + return hex.DecodeString(input) +} + +func DecodeToNumber(i string) (uint64, error) { + return strconv.ParseUint(i, 0, 64) +} + +func DecodeToBigInt(input string) (*big.Int, error) { + data, err := DecodeToBytes(input) + if err != nil { + return nil, err + } + return new(big.Int).SetBytes(data), nil +} + +func DecodeToAddress(input string) (crypto.Address, error) { + input = RemovePrefix(input) + return crypto.AddressFromHexString(input) +} diff --git a/encoding/hex/hex_test.go b/encoding/hex/hex_test.go new file mode 100644 index 000000000..234874e51 --- /dev/null +++ b/encoding/hex/hex_test.go @@ -0,0 +1,26 @@ +package encoding + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestEncodeNumber(t *testing.T) { + require.Equal(t, "0x0", EncodeNumber(0)) + i, err := DecodeToNumber("0x0") + require.NoError(t, err) + require.Equal(t, uint64(0), i) + + require.Equal(t, "0x5208", EncodeNumber(21000)) + i, err = DecodeToNumber("0x5208") + require.NoError(t, err) + require.Equal(t, uint64(21000), i) +} + +func TestEncodeBytes(t *testing.T) { + require.Equal(t, "0x68656c6c6f2c20776f726c64", EncodeBytes([]byte("hello, world"))) + b, err := DecodeToBytes("0x68656c6c6f2c20776f726c64") + require.NoError(t, err) + require.Equal(t, []byte("hello, world"), b) +} diff --git a/encoding/rlp/binary.go b/encoding/rlp/binary.go deleted file mode 100644 index f567e9ee3..000000000 --- a/encoding/rlp/binary.go +++ /dev/null @@ -1,64 +0,0 @@ -package rlp - -import ( - "encoding/binary" -) - -func PutUint16(i uint64) []byte { - b := make([]byte, 2) - binary.BigEndian.PutUint16(b, uint16(i)) - return b -} - -func PutUint24(i uint64) []byte { - b := make([]byte, 3) - b[0] = byte(i >> 16) - b[1] = byte(i >> 8) - b[2] = byte(i) - return b -} - -func PutUint32(i uint64) []byte { - b := make([]byte, 4) - binary.BigEndian.PutUint32(b, uint32(i)) - return b -} - -func PutUint40(i uint64) []byte { - b := make([]byte, 5) - b[0] = byte(i >> 32) - b[1] = byte(i >> 24) - b[2] = byte(i >> 16) - b[3] = byte(i >> 8) - b[4] = byte(i) - return b -} - -func PutUint48(i uint64) []byte { - b := make([]byte, 6) - b[0] = byte(i >> 40) - b[1] = byte(i >> 32) - b[2] = byte(i >> 24) - b[3] = byte(i >> 16) - b[4] = byte(i >> 8) - b[5] = byte(i) - return b -} - -func PutUint56(i uint64) []byte { - b := make([]byte, 7) - b[0] = byte(i >> 48) - b[1] = byte(i >> 40) - b[2] = byte(i >> 32) - b[3] = byte(i >> 24) - b[4] = byte(i >> 16) - b[5] = byte(i >> 8) - b[6] = byte(i) - return b -} - -func PutUint64(i uint64) []byte { - b := make([]byte, 8) - binary.BigEndian.PutUint64(b, uint64(i)) - return b -} diff --git a/encoding/rlp/rlp.go b/encoding/rlp/rlp.go index 4b1cc62f6..7a4d2fe43 100644 --- a/encoding/rlp/rlp.go +++ b/encoding/rlp/rlp.go @@ -3,11 +3,9 @@ package rlp import ( "bytes" "encoding/binary" - "encoding/hex" "fmt" "math/bits" "reflect" - "strconv" ) const ( @@ -46,27 +44,13 @@ func encodeUint8(input uint8) ([]byte, error) { } func encodeUint64(i uint64) ([]byte, error) { - size := bits.Len64(uint64(i))/8 + 1 - - switch size { - case 1: + size := bits.Len64(i)/8 + 1 + if size == 1 { return encodeUint8(uint8(i)) - case 2: - return encodeString(PutUint16(i)) - case 3: - return encodeString(PutUint24(i)) - case 4: - return encodeString(PutUint32(i)) - case 5: - return encodeString(PutUint40(i)) - case 6: - return encodeString(PutUint48(i)) - case 7: - return encodeString(PutUint56(i)) - case 8: - return encodeString(PutUint64(i)) } - return nil, nil + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, uint64(i)) + return encodeString(b[8-size:]) } func encodeLength(n, offset int) []byte { @@ -74,17 +58,11 @@ func encodeLength(n, offset int) []byte { return []uint8{uint8(n + offset)} } - length := strconv.FormatUint(uint64(n), 16) - if len(length)%2 == 1 { - length = fmt.Sprintf("0%s", length) - } - - dec, err := hex.DecodeString(length) - if err != nil { - return nil - } - - return append([]byte{uint8(0xb7 + len(string(n)))}, dec...) + i := uint64(n) + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, i) + size := bits.Len64(i)/8 + 1 + return append([]byte{uint8(0xb7 + len(string(n)))}, b[8-size:]...) } func encodeString(input []byte) ([]byte, error) { @@ -199,19 +177,19 @@ func decode(in []byte, out *fields) error { } func decodeLength(input []byte) (uint8, uint8, reflect.Kind, error) { - length := uint8(len(input)) + length := len(input) if length == 0 { return 0, 0, reflect.Invalid, ErrNoInput } - prefix := uint8(input[0]) + prefix := input[0] if prefix <= 0x7f { // single byte return 0, 1, reflect.String, nil - } else if length > prefix-0x80 && prefix <= 0xb7 { + } else if length > int(prefix-0x80) && prefix <= 0xb7 { // short string strLen := prefix - 0x80 if strLen == 1 && uint8(input[1]) <= 0x7f { @@ -219,12 +197,12 @@ func decodeLength(input []byte) (uint8, uint8, reflect.Kind, error) { } return 1, strLen + 1, reflect.String, nil - } else if length > prefix-0xb7 && prefix <= 0xbf { + } else if length > int(prefix-0xb7) && prefix <= 0xbf { // long string next, err := getLength(input[1 : (prefix-0xb7)+1]) if err != nil { return 0, 0, reflect.Invalid, err - } else if length > prefix-0xb7+next { + } else if length > int(prefix-0xb7+next) { lenOfStrLen := prefix - 0xb7 if input[1] == 0 { return 0, 0, reflect.Invalid, fmt.Errorf("multi-byte length must have no leading zero") @@ -238,18 +216,18 @@ func decodeLength(input []byte) (uint8, uint8, reflect.Kind, error) { return lenOfStrLen + 1, lenOfStrLen + strLen, reflect.String, nil } - } else if length > prefix-0xc0 && prefix <= 0xf7 { + } else if length > int(prefix-0xc0) && prefix <= 0xf7 { // short list lenOfList := prefix - 0xc0 return 1, lenOfList + 1, reflect.Slice, nil - } else if prefix <= 0xff && length > prefix-0xf7 { + } else if prefix <= 0xff && length > int(prefix-0xf7) { // long list lenOfListLen := (prefix - 0xf7) + 1 next, err := getLength(input[1:lenOfListLen]) if err != nil { return 0, 0, reflect.Invalid, err - } else if length > prefix-0xf7+next { + } else if length > int(prefix-0xf7+next) { if input[1] == 0 { return 0, 0, reflect.Invalid, fmt.Errorf("multi-byte length must have no leading zero") } diff --git a/rpc/eth.go b/rpc/eth.go index fafbbb297..e5cd66e28 100644 --- a/rpc/eth.go +++ b/rpc/eth.go @@ -14,7 +14,7 @@ import ( bin "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/encoding" + x "github.com/hyperledger/burrow/encoding/hex" "github.com/hyperledger/burrow/encoding/rlp" "github.com/hyperledger/burrow/execution" "github.com/hyperledger/burrow/execution/exec" @@ -30,7 +30,11 @@ import ( ) const ( - ChainID = 1 + chainID = 1 + maxGasLimit = 2<<52 - 1 + hexZero = "0x0" + hexZeroNonce = "0x0000000000000000" + pending = "null" ) // EthService is a web3 provider @@ -88,13 +92,13 @@ func (srv *EthService) Web3ClientVersion() (*web3.Web3ClientVersionResult, error // Web3Sha3 returns Keccak-256 (not the standardized SHA3-256) of the given data func (srv *EthService) Web3Sha3(req *web3.Web3Sha3Params) (*web3.Web3Sha3Result, error) { - data, err := encoding.HexDecodeToBytes(req.Data) + data, err := x.DecodeToBytes(req.Data) if err != nil { return nil, err } return &web3.Web3Sha3Result{ - HashedData: encoding.HexEncodeBytes(crypto.Keccak256(data)), + HashedData: x.EncodeBytes(crypto.Keccak256(data)), }, nil } @@ -108,7 +112,7 @@ func (srv *EthService) NetListening() (*web3.NetListeningResult, error) { // NetPeerCount returns the number of connected peers func (srv *EthService) NetPeerCount() (*web3.NetPeerCountResult, error) { return &web3.NetPeerCountResult{ - NumConnectedPeers: encoding.HexEncodeNumber(uint64(srv.nodeView.Peers().Size())), + NumConnectedPeers: x.EncodeNumber(uint64(srv.nodeView.Peers().Size())), }, nil } @@ -116,7 +120,7 @@ func (srv *EthService) NetPeerCount() (*web3.NetPeerCountResult, error) { // this is typically a small int (where 1 == Ethereum mainnet) func (srv *EthService) NetVersion() (*web3.NetVersionResult, error) { return &web3.NetVersionResult{ - ChainID: encoding.HexEncodeNumber(uint64(ChainID)), + ChainID: x.EncodeNumber(uint64(chainID)), }, nil } @@ -137,7 +141,7 @@ func (srv *EthService) EthChainId() (*web3.EthChainIdResult, error) { // EthBlockNumber returns the latest height func (srv *EthService) EthBlockNumber() (*web3.EthBlockNumberResult, error) { return &web3.EthBlockNumberResult{ - BlockNumber: encoding.HexEncodeNumber(srv.blockchain.LastBlockHeight()), + BlockNumber: x.EncodeNumber(srv.blockchain.LastBlockHeight()), }, nil } @@ -147,20 +151,20 @@ func (srv *EthService) EthCall(req *web3.EthCallParams) (*web3.EthCallResult, er var err error if addr := req.Transaction.To; addr != "" { - to, err = encoding.HexDecodeToAddress(addr) + to, err = x.DecodeToAddress(addr) if err != nil { return nil, err } } if addr := req.Transaction.From; addr != "" { - from, err = encoding.HexDecodeToAddress(addr) + from, err = x.DecodeToAddress(addr) if err != nil { return nil, err } } - data, err := encoding.HexDecodeToBytes(req.Transaction.Data) + data, err := x.DecodeToBytes(req.Transaction.Data) if err != nil { return nil, err } @@ -174,7 +178,7 @@ func (srv *EthService) EthCall(req *web3.EthCallParams) (*web3.EthCallResult, er var result string if r := txe.GetResult(); r != nil { - result = encoding.HexEncodeBytes(r.GetReturn()) + result = x.EncodeBytes(r.GetReturn()) } return &web3.EthCallResult{ @@ -184,11 +188,12 @@ func (srv *EthService) EthCall(req *web3.EthCallParams) (*web3.EthCallResult, er // EthGetBalance returns an accounts balance, or an error if it does not exist func (srv *EthService) EthGetBalance(req *web3.EthGetBalanceParams) (*web3.EthGetBalanceResult, error) { - addr, err := encoding.HexDecodeToAddress(req.Address) + addr, err := x.DecodeToAddress(req.Address) if err != nil { return nil, err } + // TODO: read account state at height acc, err := srv.accounts.GetAccount(addr) if err != nil { return nil, err @@ -197,7 +202,7 @@ func (srv *EthService) EthGetBalance(req *web3.EthGetBalanceParams) (*web3.EthGe } return &web3.EthGetBalanceResult{ - GetBalanceResult: encoding.HexEncodeBytes(balance.NativeToWei(acc.Balance).Bytes()), + GetBalanceResult: x.EncodeBytes(balance.NativeToWei(acc.Balance).Bytes()), }, nil } @@ -248,7 +253,7 @@ func (srv *EthService) EthGetBlockTransactionCountByHash(req *web3.EthGetBlockTr } return &web3.EthGetBlockTransactionCountByHashResult{ - BlockTransactionCountByHash: encoding.HexEncodeNumber(uint64(block.NumTxs)), + BlockTransactionCountByHash: x.EncodeNumber(uint64(block.NumTxs)), }, nil } @@ -265,13 +270,13 @@ func (srv *EthService) EthGetBlockTransactionCountByNumber(req *web3.EthGetBlock } return &web3.EthGetBlockTransactionCountByNumberResult{ - BlockTransactionCountByHash: encoding.HexEncodeNumber(uint64(block.NumTxs)), + BlockTransactionCountByHash: x.EncodeNumber(uint64(block.NumTxs)), }, nil } // EthGetCode returns the EVM bytecode at an address func (srv *EthService) EthGetCode(req *web3.EthGetCodeParams) (*web3.EthGetCodeResult, error) { - addr, err := encoding.HexDecodeToAddress(req.Address) + addr, err := x.DecodeToAddress(req.Address) if err != nil { return nil, err } @@ -284,7 +289,7 @@ func (srv *EthService) EthGetCode(req *web3.EthGetCodeParams) (*web3.EthGetCodeR } return &web3.EthGetCodeResult{ - Bytes: encoding.HexEncodeBytes(acc.EVMCode), + Bytes: x.EncodeBytes(acc.EVMCode), }, nil } @@ -309,7 +314,7 @@ func (srv *EthService) EthGetTransactionByBlockHashAndIndex(req *web3.EthGetTran return nil, err } - index, err := encoding.HexDecodeToNumber(req.Index) + index, err := x.DecodeToNumber(req.Index) if err != nil { return nil, err } @@ -345,7 +350,7 @@ func (srv *EthService) EthGetTransactionByBlockNumberAndIndex(req *web3.EthGetTr return nil, err } - index, err := encoding.HexDecodeToNumber(req.Index) + index, err := x.DecodeToNumber(req.Index) if err != nil { return nil, err } @@ -367,7 +372,7 @@ func (srv *EthService) EthGetTransactionByBlockNumberAndIndex(req *web3.EthGetTr // EthGetTransactionByHash finds a tx by the given hash func (srv *EthService) EthGetTransactionByHash(req *web3.EthGetTransactionByHashParams) (*web3.EthGetTransactionByHashResult, error) { - hash, err := encoding.HexDecodeToBytes(req.TransactionHash) + hash, err := x.DecodeToBytes(req.TransactionHash) if err != nil { return nil, err } @@ -394,18 +399,20 @@ func (srv *EthService) EthGetTransactionByHash(req *web3.EthGetTransactionByHash // EthGetTransactionCount returns the number of transactions sent from an address func (srv *EthService) EthGetTransactionCount(req *web3.EthGetTransactionCountParams) (*web3.EthGetTransactionCountResult, error) { - addr, err := encoding.HexDecodeToAddress(req.Address) + addr, err := x.DecodeToAddress(req.Address) if err != nil { return nil, err } + // TODO: get tx count at height acc, err := srv.accounts.GetAccount(addr) if err != nil { return nil, err } + // TODO: sequence may not always be accurate, is there a better way? return &web3.EthGetTransactionCountResult{ - NonceOrNull: encoding.HexEncodeNumber(acc.GetSequence()), + NonceOrNull: x.EncodeNumber(acc.GetSequence()), }, nil } @@ -427,7 +434,7 @@ func getHashAndCallTxFromExecution(txe *exec.TxExecution) ([]byte, *payload.Call // EthGetTransactionReceipt returns the receipt of a previously committed tx func (srv *EthService) EthGetTransactionReceipt(req *web3.EthGetTransactionReceiptParams) (*web3.EthGetTransactionReceiptResult, error) { - data, err := encoding.HexDecodeToBytes(req.TransactionHash) + data, err := x.DecodeToBytes(req.TransactionHash) if err != nil { return nil, err } @@ -449,24 +456,29 @@ func (srv *EthService) EthGetTransactionReceipt(req *web3.EthGetTransactionRecei return nil, err } + status := x.EncodeNumber(1) + if err := txe.Exception.AsError(); err != nil { + status = x.EncodeNumber(0) + } + result := &web3.EthGetTransactionReceiptResult{ Receipt: web3.Receipt{ - Status: "0x1", - TransactionIndex: "0x0", - CumulativeGasUsed: "0x0", - LogsBloom: "0x0", - BlockNumber: encoding.HexEncodeNumber(uint64(block.Height)), - BlockHash: encoding.HexEncodeBytes(block.Hash()), - From: encoding.HexEncodeBytes(tx.GetInput().Address.Bytes()), - GasUsed: encoding.HexEncodeNumber(txe.Result.GetGasUsed()), - TransactionHash: encoding.HexEncodeBytes(hash), + Status: status, + TransactionIndex: x.EncodeNumber(txe.GetIndex()), + BlockNumber: x.EncodeNumber(uint64(block.Height)), + BlockHash: x.EncodeBytes(block.Hash()), + From: x.EncodeBytes(tx.GetInput().Address.Bytes()), + GasUsed: x.EncodeNumber(txe.Result.GetGasUsed()), + TransactionHash: x.EncodeBytes(hash), + CumulativeGasUsed: hexZero, + LogsBloom: hexZero, Logs: []web3.Logs{}, }, } if txe.Receipt != nil { // hex encoded - result.Receipt.ContractAddress = encoding.HexEncodeBytes(txe.Receipt.ContractAddress.Bytes()) + result.Receipt.ContractAddress = x.EncodeBytes(txe.Receipt.ContractAddress.Bytes()) } return result, nil @@ -524,14 +536,14 @@ func (srv *EthService) EthPendingTransactions() (*web3.EthPendingTransactionsRes func (srv *EthService) EthEstimateGas(req *web3.EthEstimateGasParams) (*web3.EthEstimateGasResult, error) { // TODO return &web3.EthEstimateGasResult{ - GasUsed: encoding.HexEncodeNumber(0), + GasUsed: hexZero, }, nil } func (srv *EthService) EthGasPrice() (*web3.EthGasPriceResult, error) { // TODO return &web3.EthGasPriceResult{ - GasPrice: encoding.HexEncodeNumber(0), + GasPrice: hexZero, }, nil } @@ -564,7 +576,7 @@ func (srv *EthService) EthGetRawTransactionByBlockNumberAndIndex(req *web3.EthGe } func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionParams) (*web3.EthSendRawTransactionResult, error) { - data, err := encoding.HexDecodeToBytes(req.SignedTransactionData) + data, err := x.DecodeToBytes(req.SignedTransactionData) if err != nil { return nil, err } @@ -575,7 +587,7 @@ func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionPara return nil, err } - net := uint64(ChainID) + net := uint64(chainID) enc, err := txs.RLPEncode(rawTx.Nonce, rawTx.GasPrice, rawTx.GasLimit, rawTx.To, rawTx.Value, rawTx.Data) if err != nil { return nil, err @@ -636,7 +648,7 @@ func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionPara } return &web3.EthSendRawTransactionResult{ - TransactionHash: encoding.HexEncodeBytes(txe.GetTxHash().Bytes()), + TransactionHash: x.EncodeBytes(txe.GetTxHash().Bytes()), }, nil } @@ -645,7 +657,7 @@ func (srv *EthService) EthSyncing() (*web3.EthSyncingResult, error) { // TODO: remaining sync fields return &web3.EthSyncingResult{ Syncing: web3.SyncStatus{ - CurrentBlock: encoding.HexEncodeNumber(srv.blockchain.LastBlockHeight()), + CurrentBlock: x.EncodeNumber(srv.blockchain.LastBlockHeight()), }, }, nil } @@ -667,12 +679,12 @@ func (srv *EthService) getBlockHeaderAtHeight(height uint64) (*types.Header, err } func hexKeccak(data []byte) string { - return encoding.HexEncodeBytes(crypto.Keccak256(data)) + return x.EncodeBytes(crypto.Keccak256(data)) } func hexKeccakAddress(data []byte) string { addr := crypto.Keccak256(data) - return encoding.HexEncodeBytes(addr[len(addr)-20:]) + return x.EncodeBytes(addr[len(addr)-20:]) } func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (web3.Block, error) { @@ -682,20 +694,20 @@ func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (web return web3.Block{ Transactions: make([]web3.Transactions, 0), Uncles: make([]string, 0), - Number: "0x0", - Nonce: "0x0000000000000000", + Nonce: hexZeroNonce, Hash: hexKeccak(doc.AppHash.Bytes()), ParentHash: hexKeccak(doc.AppHash.Bytes()), ReceiptsRoot: hexKeccak(doc.AppHash.Bytes()), StateRoot: hexKeccak(doc.AppHash.Bytes()), - Miner: encoding.HexEncodeBytes(doc.Validators[0].Address.Bytes()), - Timestamp: encoding.HexEncodeNumber(uint64(doc.GenesisTime.Unix())), - Size: "0x0", - ExtraData: "0x0", - Difficulty: "0x0", - TotalDifficulty: "0x0", - GasLimit: "0x0", - GasUsed: "0x0", + Miner: x.EncodeBytes(doc.Validators[0].Address.Bytes()), + Timestamp: x.EncodeNumber(uint64(doc.GenesisTime.Unix())), + Number: hexZero, + Size: hexZero, + ExtraData: hexZero, + Difficulty: hexZero, + TotalDifficulty: hexZero, + GasLimit: hexZero, + GasUsed: hexZero, }, nil } block, err := srv.getBlockHeaderAtHeight(height) @@ -728,18 +740,18 @@ func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (web TransactionsRoot: hexKeccak(block.Hash().Bytes()), StateRoot: hexKeccak(block.Hash().Bytes()), ReceiptsRoot: hexKeccak(block.Hash().Bytes()), - Nonce: "0x0000000000000000", - Size: encoding.HexEncodeNumber(uint64(block.TotalTxs)), - Number: encoding.HexEncodeNumber(uint64(block.Height)), - Miner: encoding.HexEncodeBytes(block.ProposerAddress.Bytes()), - LogsBloom: "0x0", - ExtraData: "0x0", - Difficulty: "0x0", - TotalDifficulty: "0x0", - GasLimit: encoding.HexEncodeNumber(2<<52 - 1), - GasUsed: "0x0", - Sha3Uncles: "0x0", - Timestamp: encoding.HexEncodeNumber(uint64(block.Time.Unix())), + Nonce: hexZeroNonce, + Size: x.EncodeNumber(uint64(block.TotalTxs)), + Number: x.EncodeNumber(uint64(block.Height)), + Miner: x.EncodeBytes(block.ProposerAddress.Bytes()), + Sha3Uncles: hexZero, + LogsBloom: hexZero, + ExtraData: hexZero, + Difficulty: hexZero, + TotalDifficulty: hexZero, + GasUsed: hexZero, + GasLimit: x.EncodeNumber(maxGasLimit), + Timestamp: x.EncodeNumber(uint64(block.Time.Unix())), Transactions: transactions, Uncles: []string{}, }, nil @@ -747,29 +759,29 @@ func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (web func getTransaction(block *types.Header, hash []byte, tx *payload.CallTx) web3.Transaction { transaction := web3.Transaction{ - V: "0x0", - R: "0x0", - S: "0x0", - From: encoding.HexEncodeBytes(tx.Input.Address.Bytes()), - Value: encoding.HexEncodeNumber(tx.Input.Amount), - Nonce: encoding.HexEncodeNumber(tx.Input.Sequence), - Gas: encoding.HexEncodeNumber(tx.GasLimit), - GasPrice: encoding.HexEncodeNumber(tx.GasPrice), - Data: encoding.HexEncodeBytes(tx.Data), + V: hexZero, + R: hexZero, + S: hexZero, + From: x.EncodeBytes(tx.Input.Address.Bytes()), + Value: x.EncodeNumber(tx.Input.Amount), + Nonce: x.EncodeNumber(tx.Input.Sequence), + Gas: x.EncodeNumber(tx.GasLimit), + GasPrice: x.EncodeNumber(tx.GasPrice), + Data: x.EncodeBytes(tx.Data), } if block != nil { // may be pending transaction.BlockHash = hexKeccak(block.Hash().Bytes()) - transaction.Hash = encoding.HexEncodeBytes(hash) - transaction.BlockNumber = encoding.HexEncodeNumber(uint64(block.Height)) - transaction.TransactionIndex = encoding.HexEncodeNumber(0) + transaction.Hash = x.EncodeBytes(hash) + transaction.BlockNumber = x.EncodeNumber(uint64(block.Height)) + transaction.TransactionIndex = pending } if tx.Address != nil { - transaction.To = encoding.HexEncodeBytes(tx.Address.Bytes()) + transaction.To = x.EncodeBytes(tx.Address.Bytes()) } else { - transaction.To = "null" + transaction.To = pending } return transaction @@ -788,7 +800,7 @@ func (srv *EthService) getHeightByWord(height string) (uint64, bool) { } func getHeightByNumber(height string) (uint64, error) { - return encoding.HexDecodeToNumber(height) + return x.DecodeToNumber(height) } func (srv *EthService) getHeightByWordOrNumber(i string) (uint64, error) { @@ -812,7 +824,7 @@ func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (* var err error if from := req.Transaction.From; from != "" { - tx.Input.Address, err = encoding.HexDecodeToAddress(from) + tx.Input.Address, err = x.DecodeToAddress(from) if err != nil { return nil, fmt.Errorf("failed to parse from address: %v", err) } @@ -837,7 +849,7 @@ func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (* tx.Input.Sequence = acc.Sequence + 1 if to := req.Transaction.To; to != "" { - addr, err := encoding.HexDecodeToAddress(to) + addr, err := x.DecodeToAddress(to) if err != nil { return nil, fmt.Errorf("failed to parse to address: %v", err) } @@ -860,7 +872,7 @@ func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (* } if data := req.Transaction.Data; data != "" { - bs, err := encoding.HexDecodeToBytes(data) + bs, err := x.DecodeToBytes(data) if err != nil { return nil, fmt.Errorf("failed to parse data: %v", err) } @@ -887,7 +899,7 @@ func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (* } return &web3.EthSendTransactionResult{ - TransactionHash: encoding.HexEncodeBytes(txe.GetTxHash().Bytes()), + TransactionHash: x.EncodeBytes(txe.GetTxHash().Bytes()), }, nil } @@ -911,7 +923,7 @@ func (srv *EthService) EthAccounts() (*web3.EthAccountsResult, error) { // we only want ethereum keys continue } - addrs = append(addrs, encoding.HexEncodeBytes(key.Address.Bytes())) + addrs = append(addrs, x.EncodeBytes(key.Address.Bytes())) } return &web3.EthAccountsResult{ @@ -921,7 +933,7 @@ func (srv *EthService) EthAccounts() (*web3.EthAccountsResult, error) { // EthSign: https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign func (srv *EthService) EthSign(req *web3.EthSignParams) (*web3.EthSignResult, error) { - addr, err := encoding.HexDecodeToBytes(req.Address) + addr, err := x.DecodeToBytes(req.Address) if err != nil { return nil, err } @@ -934,7 +946,7 @@ func (srv *EthService) EthSign(req *web3.EthSignParams) (*web3.EthSignResult, er return nil, err } - data, err := encoding.HexDecodeToBytes(req.Bytes) + data, err := x.DecodeToBytes(req.Bytes) if err != nil { return nil, err } @@ -949,7 +961,7 @@ func (srv *EthService) EthSign(req *web3.EthSignParams) (*web3.EthSignResult, er } return &web3.EthSignResult{ - Signature: encoding.HexEncodeBytes(sig.RawBytes()), + Signature: x.EncodeBytes(sig.RawBytes()), }, nil } diff --git a/rpc/eth_test.go b/rpc/eth_test.go index 8302d7b79..2a94b9521 100644 --- a/rpc/eth_test.go +++ b/rpc/eth_test.go @@ -7,8 +7,9 @@ import ( "strings" "testing" + "github.com/hyperledger/burrow/acm/balance" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/encoding" + x "github.com/hyperledger/burrow/encoding/hex" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/integration" "github.com/hyperledger/burrow/keys" @@ -53,7 +54,8 @@ func TestWeb3Service(t *testing.T) { accountState := kern.State eventsState := kern.State validatorState := kern.State - eth := rpc.NewEthService(accountState, eventsState, kern.Blockchain, validatorState, nodeView, kern.Transactor, store, kern.Logger) + eth := rpc.NewEthService(accountState, eventsState, kern.Blockchain, validatorState, + nodeView, kern.Transactor, store, kern.Logger) t.Run("Web3Sha3", func(t *testing.T) { result, err := eth.Web3Sha3(&web3.Web3Sha3Params{"0x68656c6c6f20776f726c64"}) // hello world @@ -84,7 +86,7 @@ func TestWeb3Service(t *testing.T) { t.Run("NetVersion", func(t *testing.T) { result, err := eth.NetVersion() require.NoError(t, err) - require.Equal(t, encoding.HexEncodeNumber(uint64(rpc.ChainID)), result.ChainID) + require.Equal(t, x.EncodeNumber(1), result.ChainID) }) t.Run("EthProtocolVersion", func(t *testing.T) { @@ -101,34 +103,50 @@ func TestWeb3Service(t *testing.T) { }) }) - t.Run("EthCreateContract", func(t *testing.T) { + t.Run("EthTransactions", func(t *testing.T) { var txHash, contractAddress string - t.Run("EthSendRawTransaction", func(t *testing.T) { - to := genesisAccounts[2].GetPublicKey().GetAddress() - acc, err := kern.State.GetAccount(to) - require.NoError(t, err) - before := acc.GetBalance() + receivee := genesisAccounts[2].GetPublicKey().GetAddress() + acc, err := kern.State.GetAccount(receivee) + require.NoError(t, err) + before := acc.GetBalance() + t.Run("EthSendRawTransaction", func(t *testing.T) { + // see: https://github.com/ethereumjs/ethereumjs-tx/blob/master/examples/transactions.ts#L9 raw := `0xf867808082520894f97798df751deb4b6e39d4cf998ee7cd4dcb9acc880de0b6b3a76400008025a0f0d2396973296cd6a71141c974d4a851f5eae8f08a8fba2dc36a0fef9bd6440ca0171995aa750d3f9f8e4d0eac93ff67634274f3c5acf422723f49ff09a6885422` _, err = eth.EthSendRawTransaction(&web3.EthSendRawTransactionParams{ SignedTransactionData: raw, }) require.NoError(t, err) + }) - acc, err = kern.State.GetAccount(to) + t.Run("EthGetBalance", func(t *testing.T) { + result, err := eth.EthGetBalance(&web3.EthGetBalanceParams{ + Address: x.EncodeBytes(receivee.Bytes()), + BlockNumber: "latest", + }) + require.NoError(t, err) + after, err := x.DecodeToBigInt(result.GetBalanceResult) + require.NoError(t, err) + after = balance.WeiToNative(after.Bytes()) + require.Equal(t, after.Uint64(), before+1) + }) + + t.Run("EthGetTransactionCount", func(t *testing.T) { + result, err := eth.EthGetTransactionCount(&web3.EthGetTransactionCountParams{ + Address: genesisAccounts[1].GetAddress().String(), + }) require.NoError(t, err) - after := acc.GetBalance() - require.Equal(t, after, before+1) + require.Equal(t, x.EncodeNumber(1), result.NonceOrNull) }) // create contract on chain t.Run("EthSendTransaction", func(t *testing.T) { result, err := eth.EthSendTransaction(&web3.EthSendTransactionParams{ Transaction: web3.Transaction{ - From: encoding.HexEncodeBytes(genesisAccounts[3].GetAddress().Bytes()), - Gas: encoding.HexEncodeNumber(40), - Data: encoding.HexEncodeBytes(rpc.Bytecode_HelloWorld), + From: x.EncodeBytes(genesisAccounts[3].GetAddress().Bytes()), + Gas: x.EncodeNumber(40), + Data: x.EncodeBytes(rpc.Bytecode_HelloWorld), }, }) require.NoError(t, err) @@ -154,14 +172,14 @@ func TestWeb3Service(t *testing.T) { result, err := eth.EthCall(&web3.EthCallParams{ Transaction: web3.Transaction{ - From: encoding.HexEncodeBytes(genesisAccounts[1].GetAddress().Bytes()), + From: x.EncodeBytes(genesisAccounts[1].GetAddress().Bytes()), To: contractAddress, - Data: encoding.HexEncodeBytes(packed), + Data: x.EncodeBytes(packed), }, }) require.NoError(t, err) - value, err := encoding.HexDecodeToBytes(result.ReturnValue) + value, err := x.DecodeToBytes(result.ReturnValue) require.NoError(t, err) vars, err := abi.DecodeFunctionReturn(string(rpc.Abi_HelloWorld), "Hello", value) require.NoError(t, err) @@ -175,7 +193,7 @@ func TestWeb3Service(t *testing.T) { Address: contractAddress, }) require.NoError(t, err) - require.Equal(t, encoding.HexEncodeBytes(rpc.DeployedBytecode_HelloWorld), strings.ToLower(result.Bytes)) + require.Equal(t, x.EncodeBytes(rpc.DeployedBytecode_HelloWorld), strings.ToLower(result.Bytes)) }) }) @@ -191,7 +209,7 @@ func TestWeb3Service(t *testing.T) { require.Len(t, result.Addresses, len(genesisAccounts)-1) for _, acc := range genesisAccounts { if acc.PrivateKey().CurveType == crypto.CurveTypeSecp256k1 { - require.Contains(t, result.Addresses, encoding.HexEncodeBytes(acc.GetAddress().Bytes())) + require.Contains(t, result.Addresses, x.EncodeBytes(acc.GetAddress().Bytes())) } } }) @@ -206,7 +224,7 @@ func TestWeb3Service(t *testing.T) { }) t.Run("EthGetBlock", func(t *testing.T) { - numberResult, err := eth.EthGetBlockByNumber(&web3.EthGetBlockByNumberParams{BlockNumber: encoding.HexEncodeNumber(1)}) + numberResult, err := eth.EthGetBlockByNumber(&web3.EthGetBlockByNumberParams{BlockNumber: x.EncodeNumber(1)}) require.NoError(t, err) hashResult, err := eth.EthGetBlockByHash(&web3.EthGetBlockByHashParams{BlockHash: numberResult.GetBlockByNumberResult.Hash}) require.NoError(t, err) From 83a4f80c9e362d9f1bd68c0724ac568890ae20d2 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Thu, 26 Sep 2019 12:54:25 +0100 Subject: [PATCH 013/185] truffle intgration test & curve type conf opt Signed-off-by: Gregory Hill --- Makefile | 8 ++++++-- cmd/burrow/commands/configure.go | 15 +++++++++++--- cmd/burrow/commands/keys.go | 2 +- genesis/spec/genesis_spec.go | 23 ++++++++++----------- genesis/spec/genesis_spec_test.go | 6 +++--- genesis/spec/presets_test.go | 3 ++- genesis/spec/template_account.go | 12 +++++------ rpc/eth.go | 8 ++++++-- tests/web3/truffle.sh | 33 +++++++++++++++++++++++++++++++ 9 files changed, 79 insertions(+), 31 deletions(-) create mode 100755 tests/web3/truffle.sh diff --git a/Makefile b/Makefile index 2480de0a8..a99562f4c 100644 --- a/Makefile +++ b/Makefile @@ -195,6 +195,10 @@ test: check bin/solc test_keys: build_burrow burrow_bin="${REPO}/bin/burrow" tests/keys_server/test.sh +.PHONY: test_truffle +test_truffle: build_burrow + burrow_bin="${REPO}/bin/burrow" tests/web3/truffle.sh + .PHONY: test_integration_vent test_integration_vent: # Include sqlite adapter with tests - will build with CGO but that's probably fine @@ -210,11 +214,11 @@ test_restore: build_burrow bin/solc # Go will attempt to run separate packages in parallel .PHONY: test_integration -test_integration: test_keys test_deploy test_integration_vent_postgres test_restore +test_integration: test_keys test_deploy test_integration_vent_postgres test_restore test_truffle @go test -v -tags integration ./integration/... .PHONY: test_integration_no_postgres -test_integration_no_postgres: test_keys test_deploy test_integration_vent test_restore +test_integration_no_postgres: test_keys test_deploy test_integration_vent test_restore test_truffle @go test -v -tags integration ./integration/... .PHONY: test_deploy diff --git a/cmd/burrow/commands/configure.go b/cmd/burrow/commands/configure.go index 4c24e2dd4..a0794417f 100644 --- a/cmd/burrow/commands/configure.go +++ b/cmd/burrow/commands/configure.go @@ -40,6 +40,8 @@ func Configure(output Output) func(cmd *cli.Cmd) { keysDir := cmd.StringOpt("keys-dir", "", "Directory where keys are stored") + curveType := cmd.StringOpt("curve-type", crypto.CurveTypeEd25519.String(), "Curve type for realising keys") + configTemplateIn := cmd.StringsOpt("config-template-in", nil, "Go text/template input filename to generate config file specified with --config-out") @@ -69,7 +71,7 @@ func Configure(output Output) func(cmd *cli.Cmd) { pool := cmd.BoolOpt("pool", false, "Write config files for all the validators called burrowNNN.toml") - cmd.Spec = "[--keys-url= | --keys-dir=] " + + cmd.Spec = "[--keys-url= | --keys-dir=] [--curve-type=]" + "[ --config-template-in= --config-out=]... " + "[--genesis-spec=] [--separate-genesis-doc=] " + "[--chain-name=] [--restore-dump=] [--json] [--debug] [--pool] " + @@ -107,6 +109,11 @@ func Configure(output Output) func(cmd *cli.Cmd) { pkg := deployment.Config{Keys: make(map[crypto.Address]deployment.Key)} + ct, err := crypto.CurveTypeFromString(*curveType) + if err != nil { + output.Fatalf("could not realise curve type: %v", err) + } + // Genesis Spec if *genesisSpecOpt != "" { genesisSpec := new(spec.GenesisSpec) @@ -122,7 +129,7 @@ func Configure(output Output) func(cmd *cli.Cmd) { keyStore := keys.NewKeyStore(dir, conf.Keys.AllowBadFilePermissions) keyClient := keys.NewLocalKeyClient(keyStore, logging.NewNoopLogger()) - conf.GenesisDoc, err = genesisSpec.GenesisDoc(keyClient) + conf.GenesisDoc, err = genesisSpec.GenesisDoc(keyClient, ct) if err != nil { output.Fatalf("could not generate GenesisDoc from GenesisSpec using MockKeyClient: %v", err) } @@ -152,7 +159,7 @@ func Configure(output Output) func(cmd *cli.Cmd) { if err != nil { output.Fatalf("could not create remote key client: %v", err) } - conf.GenesisDoc, err = genesisSpec.GenesisDoc(keyClient) + conf.GenesisDoc, err = genesisSpec.GenesisDoc(keyClient, ct) if err != nil { output.Fatalf("could not realise GenesisSpec: %v", err) } @@ -289,6 +296,8 @@ func Configure(output Output) func(cmd *cli.Cmd) { conf.Tendermint.ListenPort = fmt.Sprint(26656 + i) conf.RPC.Info.ListenHost = rpc.LocalHost conf.RPC.Info.ListenPort = fmt.Sprint(26758 + i) + conf.RPC.Web3.ListenHost = rpc.LocalHost + conf.RPC.Web3.ListenPort = fmt.Sprint(26860 + i) conf.RPC.GRPC.ListenHost = rpc.LocalHost conf.RPC.GRPC.ListenPort = fmt.Sprint(10997 + i) conf.RPC.Metrics.ListenHost = rpc.LocalHost diff --git a/cmd/burrow/commands/keys.go b/cmd/burrow/commands/keys.go index 12d03641b..f50c3be27 100644 --- a/cmd/burrow/commands/keys.go +++ b/cmd/burrow/commands/keys.go @@ -49,7 +49,7 @@ func Keys(output Output) func(cmd *cli.Cmd) { cmd.Command("server", "run keys server", func(cmd *cli.Cmd) { keysDir := cmd.StringOpt("dir", "", "specify the location of the directory containing key files") badPerm := cmd.BoolOpt("allow-bad-perm", false, "Allow unix key file permissions to be readable other than user") - configOpt := cmd.StringOpt("c config", "", "Use the a specified burrow config file") + configOpt := cmd.StringOpt("c config", "", "Use the specified burrow config file") var conf *config.BurrowConfig diff --git a/genesis/spec/genesis_spec.go b/genesis/spec/genesis_spec.go index 7ea37e6f5..ae0650f0e 100644 --- a/genesis/spec/genesis_spec.go +++ b/genesis/spec/genesis_spec.go @@ -8,6 +8,7 @@ import ( "time" "github.com/hyperledger/burrow/acm/balance" + crypto "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/genesis" "github.com/hyperledger/burrow/keys" "github.com/hyperledger/burrow/permission" @@ -35,18 +36,8 @@ type params struct { ProposalThreshold uint64 `json:",omitempty" toml:",omitempty"` } -func (gs *GenesisSpec) RealiseKeys(keyClient keys.KeyClient) error { - for _, templateAccount := range gs.Accounts { - _, _, err := templateAccount.RealisePublicKeyAndAddress(keyClient) - if err != nil { - return err - } - } - return nil -} - // Produce a fully realised GenesisDoc from a template GenesisDoc that may omit values -func (gs *GenesisSpec) GenesisDoc(keyClient keys.KeyClient) (*genesis.GenesisDoc, error) { +func (gs *GenesisSpec) GenesisDoc(keyClient keys.KeyClient, curve crypto.CurveType) (*genesis.GenesisDoc, error) { genesisDoc := new(genesis.GenesisDoc) if gs.GenesisTime == nil { genesisDoc.GenesisTime = time.Now() @@ -84,7 +75,13 @@ func (gs *GenesisSpec) GenesisDoc(keyClient keys.KeyClient) (*genesis.GenesisDoc } for i, templateAccount := range templateAccounts { - account, err := templateAccount.GenesisAccount(keyClient, i) + ct := curve + if templateAccount.Balances().HasPower() { + // currently only ed25519 is supported for validator keys + ct = crypto.CurveTypeEd25519 + } + + account, err := templateAccount.GenesisAccount(keyClient, i, ct) if err != nil { return nil, fmt.Errorf("could not create Account from template: %v", err) } @@ -93,7 +90,7 @@ func (gs *GenesisSpec) GenesisDoc(keyClient keys.KeyClient) (*genesis.GenesisDoc if templateAccount.Balances().HasPower() { // Note this does not modify the input template templateAccount.Address = &account.Address - validator, err := templateAccount.Validator(keyClient, i) + validator, err := templateAccount.Validator(keyClient, i, ct) if err != nil { return nil, fmt.Errorf("could not create Validator from template: %v", err) } diff --git a/genesis/spec/genesis_spec_test.go b/genesis/spec/genesis_spec_test.go index f40d93b53..286d1a7b2 100644 --- a/genesis/spec/genesis_spec_test.go +++ b/genesis/spec/genesis_spec_test.go @@ -22,7 +22,7 @@ func TestGenesisSpec_GenesisDoc(t *testing.T) { }}, } - genesisDoc, err := genesisSpec.GenesisDoc(keyClient) + genesisDoc, err := genesisSpec.GenesisDoc(keyClient, crypto.CurveTypeEd25519) require.NoError(t, err) require.Len(t, genesisDoc.Accounts, 1) // Should create validator @@ -52,7 +52,7 @@ func TestGenesisSpec_GenesisDoc(t *testing.T) { }}, } - genesisDoc, err = genesisSpec.GenesisDoc(keyClient) + genesisDoc, err = genesisSpec.GenesisDoc(keyClient, crypto.CurveTypeEd25519) require.NoError(t, err) require.Len(t, genesisDoc.Accounts, 2) @@ -67,7 +67,7 @@ func TestGenesisSpec_GenesisDoc(t *testing.T) { // Try an empty spec genesisSpec = GenesisSpec{} - genesisDoc, err = genesisSpec.GenesisDoc(keyClient) + genesisDoc, err = genesisSpec.GenesisDoc(keyClient, crypto.CurveTypeEd25519) require.NoError(t, err) // Similar assersions to first case - should generate our default single identity chain diff --git a/genesis/spec/presets_test.go b/genesis/spec/presets_test.go index 155fb706b..a51b1e3dd 100644 --- a/genesis/spec/presets_test.go +++ b/genesis/spec/presets_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/hyperledger/burrow/acm/balance" + crypto "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/keys/mock" "github.com/hyperledger/burrow/permission" "github.com/stretchr/testify/assert" @@ -13,7 +14,7 @@ import ( func TestMergeGenesisSpecAccounts(t *testing.T) { keyClient := mock.NewKeyClient() gs := MergeGenesisSpecs(FullAccount("0"), ParticipantAccount("1"), ParticipantAccount("2")) - gd, err := gs.GenesisDoc(keyClient) + gd, err := gs.GenesisDoc(keyClient, crypto.CurveTypeEd25519) require.NoError(t, err) assert.Len(t, gd.Validators, 1) assert.Len(t, gd.Accounts, 3) diff --git a/genesis/spec/template_account.go b/genesis/spec/template_account.go index 7ac6804cf..7a9b75ddd 100644 --- a/genesis/spec/template_account.go +++ b/genesis/spec/template_account.go @@ -10,10 +10,10 @@ import ( "github.com/hyperledger/burrow/permission" ) -func (ta TemplateAccount) Validator(keyClient keys.KeyClient, index int) (*genesis.Validator, error) { +func (ta TemplateAccount) Validator(keyClient keys.KeyClient, index int, curve crypto.CurveType) (*genesis.Validator, error) { var err error gv := new(genesis.Validator) - gv.PublicKey, gv.Address, err = ta.RealisePublicKeyAndAddress(keyClient) + gv.PublicKey, gv.Address, err = ta.RealisePublicKeyAndAddress(keyClient, crypto.CurveTypeEd25519) if err != nil { return nil, err } @@ -43,10 +43,10 @@ func (ta TemplateAccount) AccountPermissions() (permission.AccountPermissions, e }, nil } -func (ta TemplateAccount) GenesisAccount(keyClient keys.KeyClient, index int) (*genesis.Account, error) { +func (ta TemplateAccount) GenesisAccount(keyClient keys.KeyClient, index int, curve crypto.CurveType) (*genesis.Account, error) { var err error ga := new(genesis.Account) - ga.PublicKey, ga.Address, err = ta.RealisePublicKeyAndAddress(keyClient) + ga.PublicKey, ga.Address, err = ta.RealisePublicKeyAndAddress(keyClient, curve) if err != nil { return nil, err } @@ -69,11 +69,11 @@ func (ta TemplateAccount) GenesisAccount(keyClient keys.KeyClient, index int) (* // Adds a public key and address to the template. If PublicKey will try to fetch it by Address. // If both PublicKey and Address are not set will use the keyClient to generate a new keypair -func (ta TemplateAccount) RealisePublicKeyAndAddress(keyClient keys.KeyClient) (pubKey crypto.PublicKey, address crypto.Address, err error) { +func (ta TemplateAccount) RealisePublicKeyAndAddress(keyClient keys.KeyClient, curve crypto.CurveType) (pubKey crypto.PublicKey, address crypto.Address, err error) { if ta.PublicKey == nil { if ta.Address == nil { // If neither PublicKey or Address set then generate a new one - address, err = keyClient.Generate(ta.Name, crypto.CurveTypeEd25519) + address, err = keyClient.Generate(ta.Name, curve) if err != nil { return } diff --git a/rpc/eth.go b/rpc/eth.go index e5cd66e28..c29b4172e 100644 --- a/rpc/eth.go +++ b/rpc/eth.go @@ -477,8 +477,10 @@ func (srv *EthService) EthGetTransactionReceipt(req *web3.EthGetTransactionRecei } if txe.Receipt != nil { - // hex encoded result.Receipt.ContractAddress = x.EncodeBytes(txe.Receipt.ContractAddress.Bytes()) + result.Receipt.To = pending + } else if tx.Address != nil { + result.Receipt.To = x.EncodeBytes(tx.Address.Bytes()) } return result, nil @@ -758,6 +760,7 @@ func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (web } func getTransaction(block *types.Header, hash []byte, tx *payload.CallTx) web3.Transaction { + // TODO: sensible defaults for non-call transaction := web3.Transaction{ V: hexZero, R: hexZero, @@ -775,7 +778,7 @@ func getTransaction(block *types.Header, hash []byte, tx *payload.CallTx) web3.T transaction.BlockHash = hexKeccak(block.Hash().Bytes()) transaction.Hash = x.EncodeBytes(hash) transaction.BlockNumber = x.EncodeNumber(uint64(block.Height)) - transaction.TransactionIndex = pending + transaction.TransactionIndex = hexZero } if tx.Address != nil { @@ -923,6 +926,7 @@ func (srv *EthService) EthAccounts() (*web3.EthAccountsResult, error) { // we only want ethereum keys continue } + // TODO: only return accounts that exist in current chain addrs = append(addrs, x.EncodeBytes(key.Address.Bytes())) } diff --git a/tests/web3/truffle.sh b/tests/web3/truffle.sh new file mode 100755 index 000000000..93564d6e4 --- /dev/null +++ b/tests/web3/truffle.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +chain=$(mktemp -d) +cd $chain +$burrow_bin spec -v1 -d2 | $burrow_bin configure -s- --curve-type secp256k1 > burrow.toml +$burrow_bin start &> /dev/null & +burrow_pid=$! + +contracts=$(mktemp -d) +cd $contracts + +function finish { + kill -TERM $burrow_pid + rm -rf "$chain" + rm -rf "$contracts" +} +trap finish EXIT + +npm install -g truffle +truffle unbox metacoin + +cat << EOF > truffle-config.js +module.exports = { + networks: { + burrow: { + host: "127.0.0.1", + port: 26660, + network_id: "*", + }, + } +}; +EOF +truffle test --network burrow \ No newline at end of file From bf94891f4e09fd0ca4a3560d2d84e8f9219d0208 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Thu, 26 Sep 2019 18:29:52 +0100 Subject: [PATCH 014/185] docs cleanup Signed-off-by: Gregory Hill --- docs/INSTALL.md | 38 --- docs/PROPOSALS.md | 11 - docs/README.md | 34 ++- docs/_sidebar.md | 26 +- docs/chain-making.md | 31 --- docs/deploy.md | 16 +- docs/developers.md | 17 +- docs/example/basic-app-website/README.md | 2 +- docs/example/basic-app/README.md | 2 +- docs/reference/consensus.md | 54 ++-- docs/reference/evm.md | 33 ++- docs/reference/genesis.md | 13 +- docs/reference/logging.md | 3 +- docs/reference/participants.md | 32 ++- docs/reference/permissions.md | 5 +- docs/reference/state.md | 19 +- docs/reference/transactions.md | 19 +- docs/reference/vent.md | 34 ++- docs/reference/wasm.md | 25 +- docs/tutorials/1-basics.md | 52 ++++ docs/tutorials/1-run-full-node.md | 34 --- docs/tutorials/2-send-transactions.md | 41 --- docs/tutorials/2-transactions.md | 33 +++ docs/tutorials/3-contracts.md | 30 ++ docs/tutorials/3-deploy-contracts.md | 257 ------------------ docs/tutorials/4-multiple-validators.md | 27 -- docs/tutorials/4-networking.md | 39 +++ .../{5-bonding-validators.md => 5-bonding.md} | 27 +- .../{6-seed-nodes.md => 6-seeding.md} | 89 +++--- docs/tutorials/7-dump-restore.md | 16 +- docs/tutorials/8-proposals.md | 48 ++-- 31 files changed, 476 insertions(+), 631 deletions(-) delete mode 100644 docs/INSTALL.md delete mode 100644 docs/PROPOSALS.md delete mode 100644 docs/chain-making.md create mode 100644 docs/tutorials/1-basics.md delete mode 100644 docs/tutorials/1-run-full-node.md delete mode 100644 docs/tutorials/2-send-transactions.md create mode 100644 docs/tutorials/2-transactions.md create mode 100644 docs/tutorials/3-contracts.md delete mode 100644 docs/tutorials/3-deploy-contracts.md delete mode 100644 docs/tutorials/4-multiple-validators.md create mode 100644 docs/tutorials/4-networking.md rename docs/tutorials/{5-bonding-validators.md => 5-bonding.md} (78%) rename docs/tutorials/{6-seed-nodes.md => 6-seeding.md} (75%) diff --git a/docs/INSTALL.md b/docs/INSTALL.md deleted file mode 100644 index 865f5b401..000000000 --- a/docs/INSTALL.md +++ /dev/null @@ -1,38 +0,0 @@ -# Installation - -## Binary - -Download a binary from our list of [releases](https://github.com/hyperledger/burrow/releases) -and copy it to a suitable location. - -## Source - -[Install Go](https://golang.org/doc/install) (Version >= 1.11) and set `$GOPATH`. - -``` -go get github.com/hyperledger/burrow -cd $GOPATH/src/github.com/hyperledger/burrow -make build -``` - -This will build the `burrow` binary and put it in the `bin/` directory. It can be executed from there or put wherever is convenient. - -You can also install `burrow` into `$BIN_PATH/bin` with `make install`, where `$BIN_PATH` defaults to `$HOME/go/bin` -if not set in environment. - -## Docker - -Each release is also tagged and pushed to [Docker Hub](https://hub.docker.com/r/hyperledger/burrow). -This can act as a direct replacement for the burrow binary, for example the following commands are equivalent: - -```bash -burrow spec -v4 -docker run hyperledger/burrow spec -v4 -``` - -> Ensure to mount local volumes for secrets / configurations when running a container to prevent data loss. - -## Kubernetes - -Use our official [helm charts](https://github.com/helm/charts/tree/master/stable/burrow) to configure and run -a burrow chain in your cluster. \ No newline at end of file diff --git a/docs/PROPOSALS.md b/docs/PROPOSALS.md deleted file mode 100644 index 6147e0594..000000000 --- a/docs/PROPOSALS.md +++ /dev/null @@ -1,11 +0,0 @@ -# ADRs -Architecture Decision Records (ADRs) describe standards for the Hyperledger Burrow platform, including core protocol specifications, and client APIs. - -# Contributing - - 1. Review [ADR-1](ADRs/adr-1.md). - 2. Fork the repository by clicking "Fork" in the top right. - 3. Add your ADR to your fork of the repository. There is a [template ADR here](ADRs/adr-X_template.md). - 4. Submit a Pull Request to Burrow's [ADRs repository](./ADRs/). - -If your ADR requires images, the image files should be included in a subdirectory of the `assets` folder for that ADR as follow: `assets/ADR-X` (for ADR **X**). When linking to an image in the ADR, use relative links such as `../assets/adr-X/image.png`. \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 3d6bd0771..18b7c0c68 100644 --- a/docs/README.md +++ b/docs/README.md @@ -19,26 +19,34 @@ Hyperledger Burrow is a permissioned blockchain node that executes smart contrac Release binaries for different architectures can be found at https://github.com/hyperledger/burrow/releases. -Alternatively you can install directly from source. To do this checkout the repository and from the root run: +### Source -```shell -# With GNU Make installed: -make install +[Install Go](https://golang.org/doc/install) (Version >= 1.11) and set `$GOPATH`. + +``` +go get github.com/hyperledger/burrow +cd $GOPATH/src/github.com/hyperledger/burrow +make build ``` -This will install the `burrow` binary into `$GOPATH/bin` so you will need to have `GOPATH` set and included on you `$PATH` if you want to have the executable available on your system. See the [Go GOPATH documentation](https://golang.org/doc/code.html#GOPATH) for details. +This will build the `burrow` binary and put it in the `bin/` directory. It can be executed from there or put wherever is convenient. + +You can also install `burrow` into `$BIN_PATH/bin` with `make install`, where `$BIN_PATH` defaults to `$HOME/go/bin` +if not set in the environment. -## Very quick start +### Docker -You can spin up a single node chain with: +Each release is also tagged and pushed to [DockerHub](https://hub.docker.com/r/hyperledger/burrow). +This can act as a direct replacement for the burrow binary, for example the following commands are equivalent: -```shell -mkdir burrow-chain && cd burrow-chain -burrow spec -v1 | burrow configure -s- | burrow start -c- +```bash +burrow spec -v4 +docker run hyperledger/burrow spec -v4 ``` -For a more complete (and useful) introduction see our sequence of [tutorials](/docs/tutorials). +> Ensure to mount local volumes for secrets / configurations when running a container to prevent data loss. -## Documentation +### Kubernetes -The canonical location for these docs is: https://hyperledger.github.io/burrow/ +Use our official [helm charts](https://github.com/helm/charts/tree/master/stable/burrow) to configure and run +a burrow chain in your cluster. diff --git a/docs/_sidebar.md b/docs/_sidebar.md index db2415bd8..9c39adcbb 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -1,35 +1,33 @@ - Burrow - [Introduction](README.md) - - [Installation](INSTALL.md) - [Developers](developers.md) - - [Chain Making](chain-making.md) - [Burrow Deploy](deploy.md) - [Burrow.js API](js-api.md) - Examples - [Basic JS API](example/basic-app/README.md) - - [Basic JS API and website](example/basic-app-website/README.md) - + - [Basic JS API and Website](example/basic-app-website/README.md) - Tutorials - - [Single Node](tutorials/1-run-full-node.md) - - [Send Transactions](tutorials/2-send-transactions.md) - - [Deploy Contracts](tutorials/3-deploy-contracts.md) - - [Multiple Validators](tutorials/4-multiple-validators.md) - - [Bonding](tutorials/5-bonding-validators.md) - - [Seed Nodes](tutorials/6-seed-nodes.md) + - [Basics](tutorials/1-basics.md) + - [Transactions](tutorials/2-transactions.md) + - [Contracts](tutorials/3-contracts.md) + - [Networking](tutorials/4-networking.md) + - [Bonding](tutorials/5-bonding.md) + - [Seed Nodes](tutorials/6-seeding.md) - [Dump / Restore](tutorials/7-dump-restore.md) - [Proposals](tutorials/8-proposals.md) - Reference - - [Participants](reference/participants.md) + - [Bonding](reference/bonding.md) + - [Consensus](reference/consensus.md) + - [EVM](reference/evm.md) - [Genesis](reference/genesis.md) - [Logging](reference/logging.md) + - [Participants](reference/participants.md) - [Permissions](reference/permissions.md) - - [Transactions](reference/transactions.md) - [State](reference/state.md) - - [EVM](reference/evm.md) - - [Bonding](reference/bonding.md) + - [Transactions](reference/transactions.md) - [Vent](reference/vent.md) - [WASM](reference/wasm.md) - [Web3](reference/web3.md) diff --git a/docs/chain-making.md b/docs/chain-making.md deleted file mode 100644 index fc28ea02b..000000000 --- a/docs/chain-making.md +++ /dev/null @@ -1,31 +0,0 @@ -# Chain Making - -A Burrow network begins with the act of chain making. This process has three logical steps: - -1. Generate the initial keys for the initial [participants](/docs/reference/participants.md) of the chain -2. Collect public keys and addresses from initial participants and close them into the [genesis document](reference/genesis.md) along with initial configuration for their state. -3. Boot an initial [quorum](/docs/reference/consensus.md#quorum) of network validators - -The steps above can be done by hand, but we have a number sub-commands build into the `burrow` binary to help. Please see our [tutorial series](/docs/tutorials) for detailed walkthroughs. - -## Generating keys - -Burrow consumes its keys through our key signing interface that can be run as a standalone service with: - -```shell -burrow keys server -``` - -This command: - -- Starts a key signing daemon capable of generating new ed25519 keys, naming those keys, signing arbitrary messages, and verifying signed messages. -- Initialises a key store directory in `.keys` (by default) where private key matter is stored. - -It should be noted that the GRPC service exposed by the keys server will sign _any_ inbound requests using the keys it maintains so the machine running the keys service should only allow connections from sources that are trusted to use those keys. - -## Specifying the network - -## Configuring a node - -## Booting a node - diff --git a/docs/deploy.md b/docs/deploy.md index 120178682..20de4dc11 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -1,6 +1,6 @@ -# Burrow deploy yaml (aka playbooks) +# Burrow Deploy (Playbooks) -`burrow deploy` is a tool which can do a number of things: +The Burrow deploy toolkit can do a number of things: * compile Solidity source files (using solc) and deploy to chain * call function on existing contract @@ -14,20 +14,18 @@ burrow deploy needs a script to its commands. This script format bares some simi is in yaml format. The top level structure is an array of [jobs](https://github.com/hyperledger/burrow/blob/develop/deploy/def/job.go). The different job types are [defined here](https://github.com/hyperledger/burrow/blob/develop/deploy/def/jobs.go). -You can invoke burrow from the command line like: +You can invoke burrow from the command line: ```shell burrow deploy -a CF8F9480252B70D59CF5B5F3CAAA75FEAF6A4B33 deploy.yaml ``` -Where `deploy.yaml` is the playbook. - Each job in the playbook has a name. This name can be used in later jobs to refer to the result of a previous job (e.g. the address of a contract which was deployed). The jobs are executed in-order. Whenever an account needs to be specified, the key name in the burrow keys server can also be used. -## deploy job +## Deploy The deploy job compiles a solidity source file to a bin file which is then deployed to the chain. This type of job has the following parameters: @@ -52,13 +50,13 @@ file(s) is named according to the name of the contract(s). To select which contr If the _contract_ is specified as a bin file, compilation will be skipped. It can be useful to separate compilation from deployment using the build job, which is described next. -## build job +## Build The build job is used to only compile solidity and do not do any deployment. This only has one parameter: * _contract:_ the path to the solidity source -## call/query-contract job +## Call / Query-Contract The call and query contract job is for executing contract code by way of running one of the functions. The call job will create a transaction and will have to wait until the next block to retrieve the result; the query-contract job is for accessing read-only functions which do not require @@ -76,6 +74,6 @@ of previous burrow deploy job. In the latter case the name of the job must be sp If the contract was deployed without metadata (e.g. using the burrow js module or with an earlier version of burrow deploy) the abi must be specified. This must be the path to the contract bin file or abi file. -## proposal job +## Proposal This is described in the [proposal tutorial](../tutorials/8-proposals.md). diff --git a/docs/developers.md b/docs/developers.md index f6f421dcc..0e21c8aa5 100644 --- a/docs/developers.md +++ b/docs/developers.md @@ -30,4 +30,19 @@ Install protoc and run `make protobuf_deps`. If you make any changes to the prot * Using the github.com web interface, create a pull request for master <= develop (so merging latest develop into master) * Get someone to merge it. They should check that all commits from develop are included using `git log --oneline origin/develop ^origin/master` * Once master is update to date, switch to master locally run `make tag_release`. This will push the tag which kicks of the release build. -* Optionally send out email on hyperledger burrow mailinglist. Agreements network email should be sent out automatically. \ No newline at end of file +* Optionally send out email on hyperledger burrow mailinglist. Agreements network email should be sent out automatically. + +## Proposals + +### Architecture Decision Records (ADRs) + +ADRs describe standards for the Hyperledger Burrow platform, including core protocol specifications, and client APIs. + +### Contributing + + 1. Review [ADR-1](ADRs/adr-1.md). + 2. Fork the repository by clicking "Fork" in the top right. + 3. Add your ADR to your fork of the repository. There is a [template ADR here](ADRs/adr-X_template.md). + 4. Submit a Pull Request to Burrow's [ADRs repository](./ADRs/). + +If your ADR requires images, the image files should be included in a subdirectory of the `assets` folder for that ADR as follow: `assets/ADR-X` (for ADR **X**). When linking to an image in the ADR, use relative links such as `../assets/adr-X/image.png`. \ No newline at end of file diff --git a/docs/example/basic-app-website/README.md b/docs/example/basic-app-website/README.md index cbe2cd2f4..fb3105e5f 100644 --- a/docs/example/basic-app-website/README.md +++ b/docs/example/basic-app-website/README.md @@ -1,4 +1,4 @@ -# [Example basic-app (with website)](.) +# Example App (& Website) Note that this example is the same as the the basic-app example, apart from step 3. diff --git a/docs/example/basic-app/README.md b/docs/example/basic-app/README.md index ebdc84472..3df22c547 100644 --- a/docs/example/basic-app/README.md +++ b/docs/example/basic-app/README.md @@ -1,4 +1,4 @@ -# [Example basic-app](.) +# Example App This example contains an example solidity contract [simplestorage](simplestorage.sol) and a [node.js application](app.js) that interacts with the contract using [burrow.js](../../../js/README.md). It also contains a [makefile](makefile) that will set up a single node chain, deploy the contract using `burrow deploy`. The node app configures itself to use the the single node chain my looking for [account.json](account.json) and [deploy.output.json](deploy.output.json) files that are emitted by `burrow deploy` and the makefile. diff --git a/docs/reference/consensus.md b/docs/reference/consensus.md index 721d9e7b0..e2bb22906 100644 --- a/docs/reference/consensus.md +++ b/docs/reference/consensus.md @@ -1,6 +1,7 @@ # Consensus -Burrow uses the [Tendermint](https://tendermint.com/) consensus engine to provide a totally ordering of all execution events. Tendermint is a partially synchronous Byzantine Fault Tolerant (BFT) consensus algorithm in the PBFT family. It provides us with: +Burrow uses the [Tendermint](https://tendermint.com/) consensus engine to provide a total ordering of all execution events. +Tendermint is a partially synchronous Byzantine Fault Tolerant (BFT) consensus algorithm in the PBFT family. It provides us with: - Total ordering of input transactions via the consensus algorithm itself - Raw block storage and blockchain @@ -8,21 +9,30 @@ Burrow uses the [Tendermint](https://tendermint.com/) consensus engine to provid ## Quorum -Tendermint requires strictly greater than 2/3 of its validator voting power to be online at all times to make progress and requires that strictly less than 1/3 of its validators are behaving arbitrarily - e.g. maliciously to maintain its safety and liveness guarantees. +Tendermint requires strictly greater than 2/3 of its validator voting power to be online at all times to make progress and requires that strictly less than +1/3 of its validators are behaving arbitrarily - e.g. maliciously to maintain its safety and liveness guarantees. -Restated, we need 2F + 1 validators in order to tolerate F byzantine faults. Which is the tight optimal lower bound on the number of validators for consensus in the partially synchronous byzantine-fault model. +Restated, we need 2F + 1 validators in order to tolerate F byzantine faults. Which is the tight optimal lower bound on the number of validators for consensus +in the partially synchronous byzantine-fault model. -In the context of Tendermint where we have a potentially uneven distribution of voting power amongst validators this bound still applies except we treat each unit of voting power (which is an integral number) as 'a validator' and so provided strictly less than 1/3 of total power is in the hands of misbehaving validators consensus will make progress and remain consistent (i.e. all correct validators will store the identical correct state). +In the context of Tendermint where we have a potentially uneven distribution of voting power amongst validators this bound still applies except we treat each +unit of voting power (which is an integral number) as 'a validator' and so provided strictly less than 1/3 of total power is in the hands of misbehaving validators +consensus will make progress and remain consistent (i.e. all correct validators will store the identical correct state). ## How we use Tendermint -Burrow an Tendermint have their origins in a single codebase - 'eris-db' - where they were developed in tandem. Tendermint was spun off into a separate project and company as a modular reusable component focused exclusively on providing a consensus network layer. It consumes a network configuration and topology (described via its own genesis schema), provides the network connectivity, and consensus algorithm state machine for performing deterministic replication of state across all nodes connected to the network. +Burrow and Tendermint have their origins in a single codebase - 'eris-db' - where they were developed in tandem. Tendermint was spun off into a separate project and company +as a modular reusable component focused exclusively on providing a consensus network layer. It consumes a network configuration and topology (described via its own genesis schema), +provides the network connectivity, and consensus algorithm state machine for performing deterministic replication of state across all nodes connected to the network. -It does this replication by providing a stream of identically ordered transactions to each node via an protocol called the Application BlockChain Interface (ABCI). As far as Tendermint is concerned these transactions are opaque binary blobs, it is down to the 'application' to decide how to deserialise, verify, and apply the transactions to state. From Tendermint's perspective Burrow acts as an ABCI client. +It does this replication by providing a stream of identically ordered transactions to each node via an protocol called the Application BlockChain Interface (ABCI). +As far as Tendermint is concerned these transactions are opaque binary blobs, it is down to the 'application' to decide how to deserialise, verify, and apply the +transactions to state. From Tendermint's perspective Burrow acts as an ABCI client. -Tendermint is designed so it can be run as a standalone service much like a database, in this mode of operation clients send transactions to Tendermint to be included in blocks over its RPC layer and ABCI clients receive requests over the ABCI wire protocol to validate transactions before and after they are included in blocks, with the ability to reject them. - -Burrow does not use Tendermint in this way but instead uses Tendermint as an embedded library. Internally we still use the underlying interfaces of `BroadcastTx` and the ABCI interface but we use them within the context of single Go process. This situation owes something to our shared history, but also provides a number of benefits: +Tendermint is designed so it can be run as a standalone service much like a database, in this mode of operation clients send transactions to Tendermint to be included in blocks +over its RPC layer and ABCI clients receive requests over the ABCI wire protocol to validate transactions before and after they are included in blocks, with the ability to reject them. +Burrow does not use Tendermint in this way but instead uses Tendermint as an embedded library. Internally we still use the underlying interfaces of `BroadcastTx` and the ABCI interface +but we use them within the context of single Go process. This situation owes something to our shared history, but also provides a number of benefits: - We can be more efficient by communicating in-process rather than over RPC layers - Users of Burrow do not need to run multiple services in order to form a network @@ -31,12 +41,15 @@ Burrow does not use Tendermint in this way but instead uses Tendermint as an emb - We can provide control over validators, genesis, and network formation that would be harder to do with separate services - We can provide a single consistent command line interface -The upshot of all of this is that while Tendermint is a crucial part of the Burrow implementation and Burrow is intended to keep an build on its compatibility with public Tendermint and Cosmos networks it is essentially an implementation detail of Burrow. Burrow is not intended to function as a standalone ABCI app. +The upshot of all of this is that while Tendermint is a crucial part of the Burrow implementation and Burrow is intended to keep and build on its compatibility with public Tendermint +and Cosmos networks it is essentially an implementation detail of Burrow. Burrow is not intended to function as a standalone ABCI app. ### What we do not use from Tendermint -There are a number of pieces of functionality you can find documented as part of 'Tendermint the blockchain' that we opt not use as part of 'Tendermint the library'. These points of difference are not just for difference's sake but but because we can provide a more specific coherent version of them as part of Burrow which has its own needs in each of the areas. +There are a number of pieces of functionality you can find documented as part of 'Tendermint the blockchain' that we opt not use as part of 'Tendermint the library'. +These points of difference are not just for difference's sake but but because we can provide a more specific coherent version of them as part of Burrow which has its +own needs in each of the following areas: - The Tendermint HTTP RPC layers - all of our write RPC layers are GRPC-based - The Tendermint transaction index - we have a GRPC execution events service tailored to our own [state](/docs/reference/state.md) @@ -53,12 +66,21 @@ Tendermint maintains its own on-disk state consisting of: - Validator set - Block store -It is able to use these to recover from (in principle) crash-failures, whereby it can detect faulty data (within certain physical bounds) and recover by connecting to other nodes on the network to 'catch up' by replaying blocks. When a node first starts it will enter 'fast sync' mode and catch up to the latest block height on the network. +It is able to use these to recover from (in principle) crash-failures, whereby it can detect faulty data (within certain physical bounds) and recover by connecting to +other nodes on the network to 'catch up' by replaying blocks. When a node first starts it will enter 'fast sync' mode and catch up to the latest block height on the network. -We consider the consensus state entirely the domain of Tendermint - we rely upon Tendermint to order transactions for us. We rely upon this and the WAL to give Burrow crash-fault tolerance - Burrow maintains a checkpoint that runs one block behind, if Burrow was to crash, Tendermint should recover and reply the block overwriting any potentially dirty writes for the block that was in-flight. +We consider the consensus state entirely the domain of Tendermint - we rely upon Tendermint to order transactions for us. We rely upon this and the WAL to give Burrow +crash-fault tolerance - Burrow maintains a checkpoint that runs one block behind, if Burrow was to crash, Tendermint should recover and reply the block overwriting any +potentially dirty writes for the block that was in-flight. -The validator set is something that is administered by Burrow and for which Tendermint necessarily keeps its own accounting. We therefore have representations for the current validator state stored both in Burrow's core code and in our Tendermint library code. We ensure these are synchronised. We furthermore store a complete history of previous validator sets in Burrow. +The validator set is something that is administered by Burrow and for which Tendermint necessarily keeps its own accounting. We therefore have representations for the current +validator state stored both in Burrow's core code and in our Tendermint library code - which we ensure are synchronised. We furthermore store a complete history of previous validator sets. -We have a similar arrangement with the block store - Tendermint is responsible for storing the raw block data which includes the full array of votes and headers relating to consensus and the raw serialised transaction data. However Burrow also has much richer execution event data that comprises a complete trace of all execution events stored as a stream in a merkle tree. This means that there is some redundancy of data between the Tendermint side and Burrow side storage of transactions and blocks. One way to think about this is as Tendermint providing the low level transaction log (as a relational database might) and Burrow the application level schema and indices. We also support a mode of operation (currently just for a single node) involving no consensus (by setting `Enabled = false` in the Tendermint section of the Burrow configuration) where our state storage is exclusive. There are future possibilities enabled by being able to operate without Tendermint including for private state channels and alternative consensus mechanisms. +We have a similar arrangement with the block store - Tendermint is responsible for storing the raw block data which includes the full array of votes and headers relating to consensus +and the raw serialised transaction data. However Burrow also has much richer execution event data that comprises a complete trace of all execution events stored as a stream in a merkle tree. +This means that there is some redundancy of data between the Tendermint side and Burrow side storage of transactions and blocks. One way to think about this is as Tendermint providing the +low level transaction log (as a relational database might) and Burrow the application level schema and indices. We also support a mode of operation (currently just for a single node) +involving no consensus (by setting `Enabled = false` in the Tendermint section of the Burrow configuration) where our state storage is exclusive. There are future possibilities enabled +by being able to operate without Tendermint including for private state channels and alternative consensus mechanisms. -For more details see our [state documentation](/docs/reference/state.md). +For more details see our [state documentation](/reference/state.md). diff --git a/docs/reference/evm.md b/docs/reference/evm.md index 057058e4a..706b3befe 100644 --- a/docs/reference/evm.md +++ b/docs/reference/evm.md @@ -1,25 +1,31 @@ # EVM -Burrow's core execution engine is our Ethereum Virtual Machine (EVM) implementation. This is implemented to be compatible with the core of the EVM specification and so Burrow should run all Solidity code compiled with `solc`. +Burrow's core execution engine is our Ethereum Virtual Machine (EVM) implementation. This is implemented to be compatible with the core of the EVM specification +and so Burrow should run all Solidity code compiled with `solc`. -## Mainnet compatibility +## MainNet Compatibility -Burrow is compatible on the smart contract level (and [shortly](https://github.com/hyperledger/burrow/pull/1238) on the web3 RPC level) but not the network protocol, consensus, or P2P level with public Ethereum mainnet. +Burrow is compatible on the smart contract and web3 RPC levels but not the network protocol, consensus, or P2P level with public Ethereum mainnet. -This affords us a great deal more flexibility and agility to support our core public permissioned side-chain use case than we would otherwise have. We would also argue a number of our variances are technical improvements on public Ethereum for which upgrades are much more difficult. +This affords us a great deal more flexibility and agility to support our core public permissioned side-chain use case than we would otherwise have. +We would also argue a number of our variances are technical improvements on public Ethereum for which upgrades are much more difficult. -## EVM version compatibility +## EVM Version Compatibility -We aim to provide compatibility with the latest EVM version. By EVM version we mean the 'Instruction Set Architecture'. There is not definitive delineation of the EVM and the Ethereum network, but in practice it is usually clear where certain changes (described in [EIP documents](https://github.com/ethereum/EIPs)) are not relevant for Burrow. We use the following heuristic to guide the compatibility of our implementation: +We aim to provide compatibility with the latest EVM version - meaning the specific 'Instruction Set Architecture'. There is not definitive delineation of the EVM +and the Ethereum network, but in practice it is usually clear where certain changes (described in [EIP documents](https://github.com/ethereum/EIPs)) are not relevant for Burrow. +We use the following heuristic to guide the compatibility of our implementation: - All Solidity code compiled with the latest `solc` should run on Burrow - All opcodes defined for the EVM should be implemented in Burrow (where the opcodes assume certain consensus or network protocol fact we try to find an analogous interpretation in Burrow) -As new EIPs are released we incorporate them into Burrow. There is [current work](https://github.com/hyperledger/burrow/issues/1240) to close the gap on some of the newer Ethereum precompile contracts. +As new EIPs are released we incorporate them into Burrow. There is [current work](https://github.com/hyperledger/burrow/issues/1240) to close the gap on some of the newer +Ethereum precompile contracts. -## Extensions to EVM +## Extensions -We have a notion similar to precompile contracts that we call 'SNatives' whereby we mount pseudo-contracts at a particular address with functions that can be called that expose certain native functionality of Burrow. Most prominent is access to our permissioning system. SNatives can be displayed with `burrow snatives`. +We have a notion similar to precompiled contracts that we call 'SNatives' whereby we mount pseudo-contracts at a particular address with functions that can be called that expose +certain native functionality of Burrow. Most prominent is access to our permissioning system. SNatives can be displayed with `burrow snatives`. Much of the innovation that Burrow intends to offer at the smart contract level will be provided through our SNative system including access to: @@ -33,8 +39,11 @@ Much of the innovation that Burrow intends to offer at the smart contract level ## Gas -We only use gas to bound computation; we do not extract a fee for gas used, but we will terminate execution if the gas limit passed to the EVM is exceeded. We expect to make the gas schedule configurable and to provide the ability to extract a fee for gas used as part of our token economic model. +We only use gas to bound computation; we do not extract a fee for gas used, but we will terminate execution if the gas limit passed to the EVM is exceeded. +We expect to make the gas schedule configurable and to provide the ability to extract a fee for gas used as part of our token economic model. -## Library usage +## Library Usage -Burrow aims to also provide a pleasant, extensible, and liberally licensed EVM library via our `execution/evm` package. As such we try to keep the dependencies of this package minimal, keep the public interfaces stable, and are happy to accept changes that improve our developer ergonomics. There have already been successfully integration of Burrow with [Hyperledger Sawtooth](https://github.com/hyperledger/sawtooth-seth) and [Hyperledger Fabric](https://github.com/hyperledger/fabric-chaincode-evm). +Burrow aims to also provide a pleasant, extensible, and liberally licensed EVM library via our `execution/evm` package. As such we try to keep the dependencies of this package minimal, +keep the public interfaces stable, and are happy to accept changes that improve our developer ergonomics. There have already been successful integrations of Burrow with +[Hyperledger Sawtooth](https://github.com/hyperledger/sawtooth-seth) and [Hyperledger Fabric](https://github.com/hyperledger/fabric-chaincode-evm). diff --git a/docs/reference/genesis.md b/docs/reference/genesis.md index 401d0f6b4..0ce895568 100644 --- a/docs/reference/genesis.md +++ b/docs/reference/genesis.md @@ -1,11 +1,17 @@ # Genesis -A blockchain network stores a series of deterministically agreed upon states indexed by a sequentially increasing number called the block height. Once a block is committed at a particular height we can always discover the total state at that height by querying more than 1/3 of the chain (in Burrow's case, and we may need to query more nodes if the ones we speak to disagree). +A blockchain network stores a series of deterministically agreed upon states indexed by a sequentially increasing number called the block height. +Once a block is committed at a particular height we can always discover the total state at that height by querying more than 1/3 of the chain. -The state at block `n+1` is the result of applying the transactions accepted at height `n` on top of the state at height `n`. Following this induction backwards we therefore require some initial state. This initial state is called the 'genesis state'. Unlike all subsequent states that are arrived at by the application of consensus amongst validators this state is defined a priori and defines the identity of the chain that will be built on top of it. Producing the genesis document is a singular big bang event performed by a single party. It cannot occur under consensus because it defines who can participate in consensus in block 1. +The state at block `n+1` is the result of applying the transactions accepted at height `n` on top of the state at height `n`. Following this induction backwards +we therefore require some initial state. This initial state is called the 'genesis state'. Unlike all subsequent states that are arrived at by the application of consensus +amongst validators this state is defined a priori and defines the identity of the chain that will be built on top of it. Producing the genesis document is a singular big bang +event performed by a single party. It cannot occur under consensus because it defines who can participate in consensus at block 1. ## GenesisDoc -In burrow we define the genesis facts in a canonical JSON document called the `GenesisDoc`. The sha256 of this document (with whitespace, as it happens) forms the `GenesisHash` which acts as if it were the hash of a virtual zeroth block. + +In burrow we define the genesis facts in a canonical JSON document called the `GenesisDoc`. The sha256 of this document (with whitespace, as it happens) forms the `GenesisHash` +which acts as if it were the hash of a virtual zeroth block. | Field | Purpose | @@ -18,6 +24,7 @@ In burrow we define the genesis facts in a canonical JSON document called the `G | Validators | The initial validators on the chain that together will decide the value of the next state (see below for more detail) | Here is an example `genesis.json`: + ```json { "GenesisTime": "2019-05-17T10:33:23.476788642Z", diff --git a/docs/reference/logging.md b/docs/reference/logging.md index c9d549518..9e84024c5 100644 --- a/docs/reference/logging.md +++ b/docs/reference/logging.md @@ -1,6 +1,7 @@ # Logging -Logging is highly configurable through the `burrow.toml` `[logging]` section. Each log line is a list of key-value pairs that flows from the root sink through possible child sinks. Each sink can have an output, a transform, and sinks that it outputs to. Below is a more involved example than the one appearing in the default generated config of what you can configure: +Logging is highly configurable through the `burrow.toml` `[logging]` section. Each log line is a list of key-value pairs that flows from the root sink through possible child sinks. +Each sink can have an output, a transform, and sinks that it outputs to. Below is a more involved example than the one appearing in the default generated config of what you can configure: ```toml # This is a top level config section within the main Burrow config diff --git a/docs/reference/participants.md b/docs/reference/participants.md index 7b513eed3..f4756b915 100644 --- a/docs/reference/participants.md +++ b/docs/reference/participants.md @@ -1,6 +1,8 @@ -# Accounts +# Participants -Accounts are identified by an address - this is the EVM's 20-byte native identifier and is encoded in hex in the GenesisDoc. The public key is redundant but included for reference. An account's address is defined as the first 20 bytes of the sha256 hash of the account's public key so an address can be derived from a public key but not the other way around. +## Accounts + +Accounts are identified by an address - this is the EVM's 20-byte native identifier and is encoded in hex in the GenesisDoc. The public key is redundant but included for reference. The `Amount` is an initial amount of Burrow's native token. This native token can serve multiple purposes: @@ -8,9 +10,31 @@ The `Amount` is an initial amount of Burrow's native token. This native token ca - The native token can be used as a value-holding token on a Burrow sidechain in the same was that eth acts as a value token on public Ethereum. - Native token can be be converted via a [BondTx](/docs/reference/transactions.md#bondtx) into validator voting power. -Accounts can also hold EVM or WASM code that is initialised on account creation (and thereafter cannot be changed - except for by [GovTx](/docs/reference/transactions.md#govtx)). You can create a contract by sending a [CallTx](/docs/reference/transactions.md#calltx) using +Accounts can also hold EVM or WASM code that is initialised on account creation (and thereafter cannot be changed - except for by [GovTx](/docs/reference/transactions.md#govtx)). You can create a contract by sending a [CallTx](/reference/transactions.md#calltx) using ## Validators -Validators are the nodes running on the network that are permitted to participant block proposal and voting according to the Tendermint consensus algorithm. Each validator is identified by it public key (ed25519) and can also be described by a corresponding 20-byte address. A validator is assigned a `Power` this determines the relative power of each of its votes and how often it will be rotated into position of block proposer. +Validators are the nodes running on the network that are permitted to participate in block proposal and voting according to the Tendermint consensus algorithm. +Each validator is identified by it public key and can also be described by a corresponding 20-byte address. A validator is assigned a `Power` that determines the relative +power of each of its votes and how often it will be rotated into position of block proposer. + +## Signing + +Burrow supports the following public-key signature systems. + +#### Ed25519 + +This is our default signing algorithm, as defined [here](https://ed25519.cr.yp.to/). We define an address to be the first 20 bytes of the sha256 hash of a public key. + +#### Secp256k1 + +Both Bitcoin and Ethereum adopt Secp256k1 elliptic curves for verification of content, but construct addresses differently: + +| System | Construction | Encoding | +| ------ | ------------ | -------- | +| Bitcoin | `RIPEMD160(SHA256(PublicKey)` | Base58Check | +| Ethereum | `KECCAK256(PublicKey)[-20:]` | Hex | +We adopt the Ethereum style addressing system which takes the last 20 bytes of the `KECCAK256` hash of the public key. +Tendermint adopts Bitcoin's usage pattern meaning that it is not currently possible to use this signature scheme for validators, +though there are [discussions](https://github.com/tendermint/tendermint/issues/2358) to extend this interface. diff --git a/docs/reference/permissions.md b/docs/reference/permissions.md index 546c81d26..6d1604dc9 100644 --- a/docs/reference/permissions.md +++ b/docs/reference/permissions.md @@ -1,7 +1,6 @@ # Permissions -Burrow supports permissions via permission flags and string tags called 'roles'. -The flag permissions are: +Burrow supports permissions via permission flags and string tags called 'roles'. The flag permissions are: | Permission Flag | Capability | Purpose | |-----------------|------------|---------| @@ -42,4 +41,4 @@ An example `genesis.json`: } ``` -See [genesis](genesis.md) for more details on constructing accounts and setting some useful presets. +See [genesis](reference/genesis.md) for more details on constructing accounts and setting some useful presets. diff --git a/docs/reference/state.md b/docs/reference/state.md index becd9124f..2fb3d46ab 100644 --- a/docs/reference/state.md +++ b/docs/reference/state.md @@ -1,6 +1,7 @@ # State -State store by burrow is written our EVM or WASM engines on executing bytecode provided by [`CallTx`](/docs/reference/transactions.md#CallTx) transactions that have been accepted into the blockchain. The state is stored through the following generic interface: +State is written to our EVM or WASM engines on executing bytecode provided by [`CallTx`](/reference/transactions.md#CallTx) transactions that have been +accepted into the blockchain. The state is stored through the following generic interface: ```go type StorageSetter interface { @@ -9,7 +10,8 @@ type StorageSetter interface { } ``` -The raw data stored according depends on a schema determined by the execution engine and contract in question, in the case of the EVM this is described by the ABI generated when a contract is compiled. +The raw data stored according depends on a schema determined by the execution engine and contract in question, in the case of the EVM this is described by the +ABI generated when a contract is compiled. Burrow stores its state in an authenticated key-value data structure - a merkle tree. It has the following features: @@ -17,14 +19,19 @@ Burrow stores its state in an authenticated key-value data structure - a merkle - We are able to provide inclusion proofs for any element of state (not currently exposed by our RPC interfaces). - State has a single unified state root hash that almost surely guarantees identity of state by comparison between state root hashes -## Data structure +## Structure -Burrow stores its core state the `Forext` which is implemented as a merkle tree of commit objects for individual sub-trees thereby providing the state root hash. Each tree in our forest is lazily loaded by prefix (i.e. initialized if it does not exist), returning a read/write tree. This contains immutable snapshots of its history for reading, as well as a mutable tree for accumulating state. All trees ultimately wrap [IAVL](https://github.com/tendermint/iavl), an (immutable) AVL+ library, persisted in [goleveldb](https://github.com/syndtr/goleveldb) - a key/value database. +Burrow stores its core state the `Forest` which is implemented as a merkle tree of commit objects for individual sub-trees thereby providing the state root hash. +Each tree in our forest is lazily loaded by prefix (i.e. initialized if it does not exist), returning a read/write tree. This contains immutable snapshots of its +history for reading, as well as a mutable tree for accumulating state. All trees ultimately wrap [IAVL](https://github.com/tendermint/iavl), an (immutable) AVL+ library, +persisted in [goleveldb](https://github.com/syndtr/goleveldb) - a key/value database. ### Index and derivable data -Alongside our core data we have additional data that can be derived from (such as indices) or is peripheral to (such as contract metadata). Since we can generally detect if these are incorrect or regenerate them we store them in a plain non-authenticated key-value storage called the `Plain` +Alongside our core data we have additional data that can be derived from (such as indices) or is peripheral to (such as contract metadata). +Since we can generally detect if these are incorrect or regenerate them we store them in a plain non-authenticated key-value storage called the `Plain` ### Relationship with Tendermint state -Tendermint also uses merkle trees to store raw block and transaction data. Tendermint blocks close in our state root hash as the `AppHash` thereby creating a merkle graph that conveys the authenticated data structure property to our application state. +Tendermint also uses merkle trees to store raw block and transaction data. Tendermint blocks close in our state root hash as the `AppHash` thereby creating a +merkle graph that conveys the authenticated data structure property to our application state. diff --git a/docs/reference/transactions.md b/docs/reference/transactions.md index 415f95fc5..c041a3124 100644 --- a/docs/reference/transactions.md +++ b/docs/reference/transactions.md @@ -1,10 +1,12 @@ # Transactions -Burrow implements a number of transaction types. Transactions will be ordered by our consensus mechanism (Tendermint) and applied to our application state machine - replicated across all Burrow nodes. Each transaction is applied atomically and runs deterministically. The transactions contain the arguments for an [execution context](/execution/contexts). +Burrow implements a number of transaction types. Transactions will be ordered by our consensus mechanism (Tendermint) and applied to our application state machine - +replicated across all Burrow nodes. Each transaction is applied atomically and runs deterministically. The transactions contain the arguments for an +[execution context](https://github.com/hyperledger/burrow/tree/master/execution/contexts). -Our transactions are defined in Protobuf [here](/protobuf/payload.proto). +Our transactions are defined in Protobuf [here](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto). -Transactions can be built using our GRPC client libraries programmatically, via [burrow.js](/docs/js-api.md), or with`burrow deploy`, see our [deploying contracts guide](/docs/tutorials/3-deploy-contracts.md). +Transactions can be built using our GRPC client libraries programmatically, via [burrow.js](js-api.md), or with `burrow deploy` - see our [deployment guide](deploy.md). ## TxInput @@ -29,19 +31,20 @@ Our core transaction type that calls EVM code, possibly transferring value. It t ## SendTx -Allows [native token](/docs/reference/participants.md) to be sent from multiple inputs to multiple outputs. The basic value transfer function that calls no EVM Code. +Allows [native token](reference/participants.md) to be sent from multiple inputs to multiple outputs. The basic value transfer function that calls no EVM Code. ## NameTx -Provides access to a global name registry service that associates a particular string key with a data payload and an owner. The control of the name is guaranteed for the period of the lease which is a determined by a fee. +Provides access to a global name registry service that associates a particular string key with a data payload and an owner. The control of the name is guaranteed for +the period of the lease which is a determined by a fee. -Note: a future revision will change the way in which leases are calculated. Currently we use a somewhat historically-rooted fixed fee, see the [`NameCostPerBlock` function](/execution/names/names.go). +> A future revision will change the way in which leases are calculated. Currently we use a somewhat historically-rooted fixed fee, see the [`NameCostPerBlock` function](https://github.com/hyperledger/burrow/blob/master/execution/names/names.go#L83). ## BondTx This allows validators nominate themselves to the validator set by placing a bond subtracted from their balance. -For more information see [bonding documentation](/docs/reference/bonding.md) +For more information see the [bonding documentation](reference/bonding.md). ## UnbondTx @@ -57,7 +60,7 @@ An all-powerful transaction for modifying existing accounts. ## ProposalTx -A transaction type containing a batch of transactions on which a ballot is held to determine whether to execute, see [proposals tutorial](/docs/tutorials/8-proposals.md) +A transaction type containing a batch of transactions on which a ballot is held to determine whether to execute, see the [proposals tutorial](tutorials/8-proposals.md). ## PermsTx diff --git a/docs/reference/vent.md b/docs/reference/vent.md index 8f0889822..bb2ac43b0 100644 --- a/docs/reference/vent.md +++ b/docs/reference/vent.md @@ -1,13 +1,21 @@ # Vent - SQL mapping layer -Vent reads specification files called 'projections', parses their contents, and maps EVM LOG event fields to corresponding SQL columns to create or alter database structures. It listens for a stream of block events from Burrow's GRPC service then parses, unpacks, decodes event data, and builds rows to be upserted in matching event tables, rows are upserted atomically in a single database transaction per block. +Vent reads specification files called 'projections', parses their contents, and maps EVM LOG event fields to corresponding SQL columns to create or alter database structures. +It listens for a stream of block events from Burrow's GRPC service then parses, unpacks, decodes event data, and builds rows to be upserted in matching event tables, rows are +upserted atomically in a single database transaction per block. -There are two modes of operation: view mode and log mode. In view mode a primary key is used to locate the row in a table which should be updated (if exists) or inserted (if it does not exist). If the event contains a field matching the optional `DeleteMarkerField` then the row will instead be deleted. As such in view mode Vent can map a stream of EVM LOG events to a CRUD-style table - a view over entities as defined by the choice primary key. Alternatively if no primary keys are specified for a projection Vent operates in log mode where all matched events are inserted - and so log mode operates as an append-only log. Note there is no explicit setting for mode - it depends on the presence or absence of a `"Primary": true` entry in one of the `FieldMappings` of a projection (see below for an example). +There are two modes of operation: view mode and log mode. In view mode a primary key is used to locate the row in a table which should be updated (if exists) or inserted +(if it does not exist). If the event contains a field matching the optional `DeleteMarkerField` then the row will instead be deleted. As such in view mode Vent can map a +stream of EVM LOG events to a CRUD-style table - a view over entities as defined by the choice primary key. Alternatively if no primary keys are specified for a projection +Vent operates in log mode where all matched events are inserted - and so log mode operates as an append-only log. Note there is no explicit setting for mode - it depends on +the presence or absence of a `"Primary": true` entry in one of the `FieldMappings` of a projection (see below for an example). -Vent writes each block of updates atomically and is guaranteed to be crash tolerant. If the Vent process is killed it will resume at the last written height. Burrow stores all previous events in its state so even if you delete the Vent database it can be regenerated deterministically. This feature being a core feature of Vent. +Vent writes each block of updates atomically and is guaranteed to be crash tolerant. If the Vent process is killed it will resume at the last written height. Burrow stores all +previous events in its state so even if you delete the Vent database it can be regenerated deterministically. This feature being a core feature of Vent. ## Projections -A projection is the name given to the configuration files that Vent uses to interpret EVM events as updates or deletion from SQL tables. They provide an object relational mapping between Solidity events and SQL tables. +A projection is the name given to the configuration files that Vent uses to interpret EVM events as updates or deletion from SQL tables. They provide an object relational mapping +between Solidity events and SQL tables. Given a projection, like the following: @@ -77,10 +85,13 @@ contract EventEmitter { We can maintain a view-mode table that feels like that of a ordinary CRUD app though it is backed by a stream of events coming from our Solidity contracts. -Burrow can also emit a JSONSchema for the projection file format with `burrow vent schema`. You can use this to validate your projections using any of the [JSONSchema](https://json-schema.org/) tooling. +Burrow can also emit a JSONSchema for the projection file format with `burrow vent schema`. You can use this to validate your projections using any of the +[JSONSchema](https://json-schema.org/) tooling. ### Projection specification -A projection file is defined as a JSON array of `EventClass` objections. Each `EventClass` specifies a class of events that should be consumed (specified via a filter) in order to generate a SQL table. An `EventClass` holds `FieldMappings` that specify how to map the event fields of a matched EVM event to a destination column (identified by `ColumnName`) of the destination table (identified by `TableName`) +A projection file is defined as a JSON array of `EventClass` objections. Each `EventClass` specifies a class of events that should be consumed (specified via a filter) +in order to generate a SQL table. An `EventClass` holds `FieldMappings` that specify how to map the event fields of a matched EVM event to a destination column +(identified by `ColumnName`) of the destination table (identified by `TableName`) #### EventClass | Field | Type | Required? | Description | @@ -117,7 +128,9 @@ Adapters are database implementations, Vent can store data in different rdbms. In `sqldb/adapters` there's a list of supported adapters (there is also a README.md file in that folder that helps to understand how to implement a new one). ### Notification Triggers -Notification triggers are configured with the `Notify` array of a `FieldMapping`. In a supported database (currently only postrges) they allow you to specify a set of channels on which to notify when a column changes. By including a channel in the `Notify` the column is added to the set of columns for which that channel should receive a notification payload. For example if we have the following spec: +Notification triggers are configured with the `Notify` array of a `FieldMapping`. In a supported database (currently only postrges) they allow you to specify a set of +channels on which to notify when a column changes. By including a channel in the `Notify` the column is added to the set of columns for which that channel should receive +a notification payload. For example if we have the following spec: ```json [ @@ -132,9 +145,12 @@ Notification triggers are configured with the `Notify` array of a `FieldMapping` ] ``` -Then Vent will record a mapping `user -> username, address` and `address -> address` where the left hand side is the notification channel and the right hand side the columns included in the payload on that channel. +Then Vent will record a mapping `user -> username, address` and `address -> address` where the left hand side is the notification channel and the right hand side the columns +included in the payload on that channel. -For each of these mappings a notification trigger function is defined and attached as a trigger for the table to run after an insert, update, or delete. This function calls `pg_notify` (in the case of postgres, the only database for which we support notifications - this is non-standard and we may use a different mechanism in other databases if present). These notification can be consumed by any client connected to the postgres database with `LISTEN ;`, see [Postgres NOTIFY documentation](https://www.postgresql.org/docs/11/sql-notify.html). +For each of these mappings a notification trigger function is defined and attached as a trigger for the table to run after an insert, update, or delete. This function calls +`pg_notify` (in the case of postgres, the only database for which we support notifications - this is non-standard and we may use a different mechanism in other databases if present). +These notification can be consumed by any client connected to the postgres database with `LISTEN ;`, see [Postgres NOTIFY documentation](https://www.postgresql.org/docs/11/sql-notify.html). ## Setup PostgreSQL Database with Docker: diff --git a/docs/reference/wasm.md b/docs/reference/wasm.md index 612d35d20..ebe6343bf 100644 --- a/docs/reference/wasm.md +++ b/docs/reference/wasm.md @@ -1,13 +1,13 @@ # WASM Contracts -burrow supports experimental wasm contracts. Any contract which can be compiled -using [solang](https://github.com/hyperledger-labs/solang) can be run on burrow. +Burrow supports experimental WASM contracts. Specifically, any contract which can be compiled +using [solang](https://github.com/hyperledger-labs/solang) can run on Burrow. ## How to use Write a simple solidity contract which is supported by solang. For example: -``` +```solidity contract foobar { uint64 foo; @@ -23,7 +23,7 @@ contract foobar { And a deploy yaml: -``` +```yaml jobs: - name: deployFoobar @@ -50,25 +50,26 @@ burrow deploy --wasm -a Participant_0 deploy.yaml ## Implementation details -When using wasm, the same account model is used. The only different is that a wasm virtual machine -is used. When a contract is deployed, the wasm code is stored as the account code (this is different -from the EVM model where the constructor "returns" the deployed code). The wasm file which is deployed +When using WASM, the same account model is used. The only different is that a WASM virtual machine +is used. When a contract is deployed, the WASM code is stored as the account code (this is different +from the EVM model where the constructor "returns" the deployed code). The WASM file which is deployed must have two exported functions: -``` +```solidity void constructor(int32*) int32 function(int32*) ``` + When the contract is deployed, burrow calls the constructor function with the abi encoded arguments -stored in wasm memory, pointed to by the single argument. The abi encoded arguments are prefixed with +stored in WASM memory, pointed to by the single argument. The abi encoded arguments are prefixed with the length. -On executing a function call, the exported function called `function` is called . This takes the abi +On executing a function call, the exported function called `function` is called. This takes the abi encoded arguments just like the constructor, and returns a pointer to the abi encoded return values. -From the wasm code we can access contract storage via the following externals: +From the WASM code we can access contract storage via the following externals: -``` +```solidity void set_storage32(int32 key, int32 *ptr, int32 len); void get_storage32(int32 key, int32 *ptr, int32 len); ``` diff --git a/docs/tutorials/1-basics.md b/docs/tutorials/1-basics.md new file mode 100644 index 000000000..c24fc0505 --- /dev/null +++ b/docs/tutorials/1-basics.md @@ -0,0 +1,52 @@ +# Basics + +You can spin up a single node chain with: + +```shell +burrow spec -v1 | burrow configure -s- | burrow start -c- +``` + +## Configuration + +The quick-and-dirty one-liner looks like: + +```shell +# Read spec on stdin +burrow spec -p1 -f1 | burrow configure -s- > burrow.toml +``` + +Which translates into: + +```shell +burrow spec --participant-accounts=1 --full-accounts=1 > genesis-spec.json +burrow configure --genesis-spec=genesis-spec.json > burrow.toml +``` + +> You might want to run this in a clean directory to avoid overwriting any previous spec or config. + +## Running + +Once the `burrow.toml` has been created, we run: + +``` +# To select our validator address by index in the GenesisDoc +burrow start --validator=0 +# Or to select based on address directly (substituting the example address below with your validator's): +burrow start --address=BE584820DC904A55449D7EB0C97607B40224B96E +``` + +If you would like to reset your node, you can just delete its working directory with `rm -rf .burrow`. +In the context of a multi-node chain it will resync with peers, otherwise it will restart from height 0. + +## Keys + +Burrow consumes its keys through our key signing interface that can be run as a standalone service with: + +```shell +burrow keys server +``` + +This command starts a key signing daemon capable of generating new ed25519 and secp256k1 keys, naming those keys, signing arbitrary messages, and verifying signed messages. +It also initializes a key store directory in `.keys` (by default) where private key matter is stored. + +It should be noted that the GRPC service exposed by the keys server will sign _any_ inbound requests using the keys it maintains so the machine running the keys service should only allow connections from sources that are trusted to use those keys. \ No newline at end of file diff --git a/docs/tutorials/1-run-full-node.md b/docs/tutorials/1-run-full-node.md deleted file mode 100644 index 90a8aff91..000000000 --- a/docs/tutorials/1-run-full-node.md +++ /dev/null @@ -1,34 +0,0 @@ -# Configure & Run Burrow - -## Configuration - -The quick-and-dirty one-liner looks like: - -```shell -# Read spec on stdin -burrow spec -p1 -f1 | burrow configure -s- > burrow.toml -``` - -Which translates into: - -```shell -# This is a place we can store config files and burrow's working directory '.burrow' -mkdir chain_dir && cd chain_dir -burrow spec --participant-accounts=1 --full-accounts=1 > genesis-spec.json -burrow configure --genesis-spec=genesis-spec.json > burrow.toml -``` - -## Run Burrow -Once the `burrow.toml` has been created, we run: - -``` -# To select our validator address by index in the GenesisDoc -burrow start --validator=0 -# Or to select based on address directly (substituting the example address below with your validator's): -burrow start --address=BE584820DC904A55449D7EB0C97607B40224B96E -``` - -and the logs will start streaming through. - -If you would like to reset your node, you can just delete its working directory with `rm -rf .burrow`. In the context of a -multi-node chain it will resync with peers, otherwise it will restart from height 0. \ No newline at end of file diff --git a/docs/tutorials/2-send-transactions.md b/docs/tutorials/2-send-transactions.md deleted file mode 100644 index 056915263..000000000 --- a/docs/tutorials/2-send-transactions.md +++ /dev/null @@ -1,41 +0,0 @@ -# Send transactions to a burrow network - -#### Create a deploy file _test.yaml_ -```yaml -jobs: -- name: sendTxTest1 - send: - destination: PUT_HERE_ONE_ACCOUNT_OF_YOUR_GENESIS - amount: 42 -``` - -#### Send it from a node - -```bash -SIGNING_ADDRESS=HERE_ONE_VALIDATOR_ADDRESS_OF_THE_GENESIS -burrow deploy --address $SIGNING_ADDRESS test.yaml -``` - -where you should replace the `--address` field with the `Address` at the top of your `burrow.toml`. - -if you have updated the default burrow GRPC port, parameter `-u` `--chain` is your burrow running node ip:GRPCport. - -It outputs: -``` -*****Executing Job***** - -Job Name => defaultAddr - - -*****Executing Job***** - -Job Name => sendTxTest1 - - -Transaction Hash => 41E0C13D1515F83E6FFDC5032C60682BE1F5B19A -Writing [test.output.json] to current directory -``` - -You can find lot of different transactions example in [jobs fixtures directory](../../tests/jobs_fixtures) - -You may also start to [deploy contracts](deploy-contracts.md). diff --git a/docs/tutorials/2-transactions.md b/docs/tutorials/2-transactions.md new file mode 100644 index 000000000..11563755f --- /dev/null +++ b/docs/tutorials/2-transactions.md @@ -0,0 +1,33 @@ +# Transactions + +Burrow supports a number of [transactions](reference/transactions.md) which denote a unit of computation. +The easiest way to experiment is with our `burrow tx` command, but please checkout the [deployment guide](deploy.md) +for more advanced usage. + +## Getting Started + +Let's start a chain with one validator to process blocks and two participant accounts: + +```shell +burrow spec -v1 -p2 | burrow configure -s- > burrow.toml +burrow start -v0 & +``` + +Make a note of the two participant addresses generated in the `burrow.toml`. + +## Send Token + +Let's formulate a transaction to send funds from one account to another. +Given our two addresses created above, set `$SENDER` and `$RECIPIENT` respectively. +We'll also need to designate an amount of native token available from our sender. + +```shell +burrow tx formulate send -s $SENDER -t $RECIPIENT -a $AMOUNT > tx.json +``` + +To send this transaction to your local node and subsequently the chain (if running more than one validator), +pipe the output above through the following command: + +```shell +burrow tx commit --file tx.json +``` \ No newline at end of file diff --git a/docs/tutorials/3-contracts.md b/docs/tutorials/3-contracts.md new file mode 100644 index 000000000..e5633f6c8 --- /dev/null +++ b/docs/tutorials/3-contracts.md @@ -0,0 +1,30 @@ +# Contracts + +Burrow supports both [Solidity](https://solidity.readthedocs.io/) and [WASM](reference/wasm.md) smart contracts. You may be familiar with this former language +if you have worked previously with Ethereum. If so, you will be pleased to know that Burrow can be used with [Remix](http://remix.ethereum.org/). + +## Getting Started + +Let's start a chain with a single validator: + +```shell +burrow spec -v1 | burrow configure -s- | burrow start -c- +``` + +## Deploy Artifacts + +For this step, we need two things: one or more solidity contracts and a deploy file. Let's take a simple example, found in [this directory](https://github.com/hyperledger/burrow/tree/master/tests/jobs_fixtures/app06-deploy_basic_contract_and_different_solc_types_packed_unpacked). + +We need `deploy.yaml` and `storage.sol` in the same directory with **no other yaml or sol files**. + +> [Solc](https://solidity.readthedocs.io/en/v0.4.21/installing-solidity.html) is required to compile Solidity code. + +From inside that directory, we are ready to deploy. + +```bash +burrow deploy --address $ADDRESS deploy.yaml +``` + +Replace `$ADDRESS` with the address at the top of your `burrow.toml`. + +That's it! You've successfully deployed (and tested) a Solidity contract to a Burrow node. \ No newline at end of file diff --git a/docs/tutorials/3-deploy-contracts.md b/docs/tutorials/3-deploy-contracts.md deleted file mode 100644 index fd4a11b5b..000000000 --- a/docs/tutorials/3-deploy-contracts.md +++ /dev/null @@ -1,257 +0,0 @@ -# Deploy Contracts - -Now that the [burrow node is running](single-full-node.md), we can deploy contracts. - -For this step, we need two things: one or more solidity contracts, and an `deploy.yaml`. - -Let's take a simple example, found in [this directory](../../tests/jobs_fixtures/app06-deploy_basic_contract_and_different_solc_types_packed_unpacked/). - -The `deploy.yaml` should look like: - -```yaml -jobs: - -- name: deployStorageK - deploy: - contract: storage.sol - -- name: setStorageBaseBool - set: - val: "true" - -- name: setStorageBool - call: - destination: $deployStorageK - function: setBool - data: - - $setStorageBaseBool - -- name: queryStorageBool - query-contract: - destination: $deployStorageK - function: getBool - -- name: assertStorageBool - assert: - key: $queryStorageBool - relation: eq - val: $setStorageBaseBool - -# tests string bools: #71 -- name: setStorageBool2 - call: - destination: $deployStorageK - function: setBool2 - data: - - true - -- name: queryStorageBool2 - query-contract: - destination: $deployStorageK - function: getBool2 - -- name: assertStorageBool2 - assert: - key: $queryStorageBool2 - relation: eq - val: "true" - -- name: setStorageBaseInt - set: - val: 50000 - -- name: setStorageInt - call: - destination: $deployStorageK - function: setInt - data: - - $setStorageBaseInt - -- name: queryStorageInt - query-contract: - destination: $deployStorageK - function: getInt - -- name: assertStorageInt - assert: - key: $queryStorageInt - relation: eq - val: $setStorageBaseInt - -- name: setStorageBaseUint - set: - val: 9999999 - -- name: setStorageUint - call: - destination: $deployStorageK - function: setUint - data: - - $setStorageBaseUint - -- name: queryStorageUint - query-contract: - destination: $deployStorageK - function: getUint - -- name: assertStorageUint - assert: - key: $queryStorageUint - relation: eq - val: $setStorageBaseUint - -- name: setStorageBaseAddress - set: - val: "1040E6521541DAB4E7EE57F21226DD17CE9F0FB7" - -- name: setStorageAddress - call: - destination: $deployStorageK - function: setAddress - data: - - $setStorageBaseAddress - -- name: queryStorageAddress - query-contract: - destination: $deployStorageK - function: getAddress - -- name: assertStorageAddress - assert: - key: $queryStorageAddress - relation: eq - val: $setStorageBaseAddress - -- name: setStorageBaseBytes - set: - val: marmatoshi - -- name: setStorageBytes - call: - destination: $deployStorageK - function: setBytes - data: - - $setStorageBaseBytes - -- name: queryStorageBytes - query-contract: - destination: $deployStorageK - function: getBytes - -- name: assertStorageBytes - assert: - key: $queryStorageBytes - relation: eq - val: $setStorageBaseBytes - -- name: setStorageBaseString - set: - val: nakaburrow - -- name: setStorageString - call: - destination: $deployStorageK - function: setString - data: - - $setStorageBaseString - -- name: queryStorageString - query-contract: - destination: $deployStorageK - function: getString - -- name: assertStorageString - assert: - key: $queryStorageString - relation: eq - val: $setStorageBaseString - -``` - -while our Solidity contract (`storage.sol`) looks like: - -```solidity -pragma solidity >=0.0.0; - -contract SimpleStorage { - bool storedBool; - bool storedBool2; - int storedInt; - uint storedUint; - address storedAddress; - bytes32 storedBytes; - string storedString; - - function setBool(bool x) public { - storedBool = x; - } - - function getBool() view public returns (bool retBool) { - return storedBool; - } - - function setBool2(bool x) public { - storedBool2 = x; - } - - function getBool2() view public returns (bool retBool) { - return storedBool2; - } - - function setInt(int x) public { - storedInt = x; - } - - function getInt() view public returns (int retInt) { - return storedInt; - } - - function setUint(uint x) public { - storedUint = x; - } - - function getUint() view public returns (uint retUint) { - return storedUint; - } - - function setAddress(address x) public { - storedAddress = x; - } - - function getAddress() view public returns (address retAddress) { - return storedAddress; - } - - function setBytes(bytes32 x) public { - storedBytes = x; - } - - function getBytes() view public returns (bytes32 retBytes) { - return storedBytes; - } - - function setString(string memory x) public { - storedString = x; - } - - function getString() view public returns (string memory retString) { - return storedString; - } -} -``` - -Both files (`deploy.yaml` & `storage.sol`) should be in the same directory with **no other yaml** or sol files. - -You have to install [solc binary](https://solidity.readthedocs.io/en/v0.4.21/installing-solidity.html) in order to compile Solidity code. - -From inside that directory, we are ready to deploy. - -```bash -burrow deploy --address F71831847564B7008AD30DD56336D9C42787CF63 deploy.yaml -``` - -where you should replace the `--address` field with the `Address` at the top of your `burrow.toml`. - -That's it! You've successfully deployed (and tested) a Solidity contract to a Burrow node. - -Note - that to redeploy the burrow chain later, you will need the same genesis-spec.json and burrow.toml files - so keep hold of them! diff --git a/docs/tutorials/4-multiple-validators.md b/docs/tutorials/4-multiple-validators.md deleted file mode 100644 index 313ee441b..000000000 --- a/docs/tutorials/4-multiple-validators.md +++ /dev/null @@ -1,27 +0,0 @@ -# Multiple validators - -### Configure a chain with 2 full accounts and validators -```bash - rm -rf .burrow* .keys* - burrow spec -f2 | burrow configure -s- --pool - ``` -### Start the network - -#### Start the first node -```bash -burrow start --config=burrow000.toml -``` - -You will see `Blockpool has no peers` in burrow000.log. -The node has not enough validator power in order to have quorum (2/3) on the network, so it is blocked waiting for the second validator to join. - -#### Start the second node - -```bash -burrow start --config=burrow001.toml -``` - -If the connection successed, you will see empty blocks automatically created `Sending vote message` and `Finalizing commit of block with 0 txs`, you can see consensus state: -```bash -curl -s 127.0.0.1:26758/consensus -``` \ No newline at end of file diff --git a/docs/tutorials/4-networking.md b/docs/tutorials/4-networking.md new file mode 100644 index 000000000..6dd6f97a0 --- /dev/null +++ b/docs/tutorials/4-networking.md @@ -0,0 +1,39 @@ +# Networking + +So far we have only run a single validator. What happens if it stops working or loses its data? +We're much better off running multiple nodes in parallel! + +## Getting Started + +Let's configure a local chain with two full accounts: + +```shell +burrow spec -f2 | burrow configure -s- --pool +``` + +You'll notice that Burrow has generated two config files instead of one, hold on to these. + + +## First Node + +```shell +burrow start --config=burrow000.toml +``` + +You will see `blockpool has no peers` in the logs, this means that the node has not got enough validator power in order to have +quorum (2/3) on the network, so it is blocked waiting for the second validator to join. + +## Second Node + +```shell +burrow start --config=burrow001.toml +``` + +If the connection succeeds, you will see empty blocks automatically created. +Look for logs such as `Sending vote message` or `Finalizing commit of block with 0 txs`. + +You can also query the consensus state over our RPC with: + +```shell +curl -s 127.0.0.1:26758/consensus +``` \ No newline at end of file diff --git a/docs/tutorials/5-bonding-validators.md b/docs/tutorials/5-bonding.md similarity index 78% rename from docs/tutorials/5-bonding-validators.md rename to docs/tutorials/5-bonding.md index 8ed16ca7e..9a0fd0695 100644 --- a/docs/tutorials/5-bonding-validators.md +++ b/docs/tutorials/5-bonding.md @@ -1,48 +1,57 @@ -# Bonding Validators +# Bonding + +We can't always expect our validator set to remain the same. New participants, not established at network +formation, may wish to participate at any time. + +## Getting Started We need at least one validator to start the chain, so run the following to construct a genesis of two accounts with the `Bond` permission, one of which is pre-bonded: -```bash +```shell burrow spec -v1 -r1 | burrow configure -s- --pool ``` -Let's start the both nodes: +Let's start both nodes: -```bash +```shell burrow start --config burrow000.toml & burrow start --config burrow001.toml & ``` Query the JSON RPC for all validators in the active set: -```bash +```shell curl -s "localhost:26758/validators" ``` This will return the pre-bonded validator, defined in our pool. +## Joining + To have the second node bond on and produce blocks: -```bash +```shell burrow tx --config burrow001.toml formulate bond --amount 10000 | burrow tx commit ``` Note that this will bond the current account, to bond an alternate account (which is created if it doesn't exist) simply specific the `--source=
` flag in formulation: -```bash +```shell burrow tx --config burrow001.toml formulate bond --source 8A468CC3A28A6E84ED52E433DA21D6E9ED7C1577 --amount 10000 ``` It should now be in the validator set: -```bash +```shell curl -s "localhost:26759/validators" ``` +## Leaving + To unbond this validator: -```bash +```shell burrow tx formulate unbond | burrow tx commit ``` \ No newline at end of file diff --git a/docs/tutorials/6-seed-nodes.md b/docs/tutorials/6-seeding.md similarity index 75% rename from docs/tutorials/6-seed-nodes.md rename to docs/tutorials/6-seeding.md index 53d49406c..cec38ae07 100644 --- a/docs/tutorials/6-seed-nodes.md +++ b/docs/tutorials/6-seeding.md @@ -1,4 +1,4 @@ -# Network with seed nodes +# Seed Nodes ## What is a seed node? @@ -12,8 +12,7 @@ connect to seed nodes once you have received enough addresses, so typically you only need them on the first start. The seed node will immediately disconnect from you after sending you some addresses. -### Seed mode -SeedMode can be enabled on a node. +### Seed Mode If a node is in seed mode it will accept inbound connections, share its address book, then hang up. Seeds modes will do a bit of gossip but not that usefully. @@ -23,31 +22,21 @@ These are different concepts: You do not want to have too many seeds in your network (because they just keep hanging up on other nodes once they've spread their wild oats), but they are useful for accelerating peer exchange (of addresses). -### Persistent peers +### Persistent Peers Persistent peers are peers that you want to connect of regardless of the heuristics and churn dynamics built into the p2p switch. Ordinarily you would not stay connected to a particular peer forever, and you would not indefinitely redial, but you will for a persistent peer. -## Configure network +## Configure -In this quick start, we will few create validator nodes which does not know each other from network point of view. -A seed node will crawl the network and relay everyones addresses. +In this quick start, we will create validator nodes which do not know about each other. +A seed node will crawl the network and relay addresses. -### Configure chain +### Seed Node -```bash -rm -rf .burrow* .keys* -burrow spec --full-accounts=3 | burrow configure -s- > .burrow_init.toml -``` - -### Generate one additional key in another local store for seed node -```bash +```shell burrow spec -f1 | burrow configure --keys-dir=.keys_seed -s- > /dev/null ``` -### Make 3 validator nodes and one seed node config files -From the generated `.burrow_init.toml `file, create new files for each node, and change the content, example: - -#### Seed node `.burrow_seed.toml` modified line from `.burrow_init.toml` ```toml BurrowDir = ".burrow_seed_0" @@ -78,7 +67,15 @@ BurrowDir = ".burrow_seed_0" Enabled = false ``` -#### Validator 1 node `.burrow_val0.toml` modified line from `.burrow_init.toml` +### Validators + +```shell +burrow spec --full-accounts=3 | burrow configure -s- > .burrow_init.toml +``` + +From the generated `.burrow_init.toml` file, create new files for each node, and change the content. + +#### Validator 1 ```toml BurrowDir = ".burrow_node0" @@ -114,7 +111,7 @@ BurrowDir = ".burrow_node0" Enabled = false ``` -#### Validator 2 node `.burrow_val1.toml` modified line from `.burrow_init.toml` +#### Validator 2 ```toml BurrowDir = ".burrow_node1" @@ -150,8 +147,7 @@ BurrowDir = ".burrow_node1" Enabled = false ``` - -#### Validator 3 node `.burrow_val2.toml` modified line from `.burrow_init.toml` +#### Validator 3 ```toml BurrowDir = ".burrow_node2" @@ -187,49 +183,56 @@ BurrowDir = ".burrow_node2" Enabled = false ``` -#### Start the seed node -```bash +## Start Network + +### Seed Node + +```shell burrow start --address=`basename .keys_seed/data/* .json` --config=.burrow_seed.toml > .burrow_seed.log 2>&1 & ``` -#### Find seed node external address +#### Validators + Tendermint requires strict and routable address (not loopback, local etc), you can find the listen address with this command: -```bash + +```shell SEED_URL=`curl -s 127.0.0.1:10001/network | jq -r '.result.ThisNode | [.ID, .ListenAddress] | join("@") | ascii_downcase'` echo $SEED_URL ``` -#### Configure other node to connect to seed node -Update other nodes with that seed address: -```bash +Configure the validator nodes to connect to the seed node: + +```shell sed -i s%PUT_HERE_SEED_NODE_ID@LISTEN_EXTERNAL_ADDRESS%${SEED_URL}% .burrow_val0.toml sed -i s%PUT_HERE_SEED_NODE_ID@LISTEN_EXTERNAL_ADDRESS%${SEED_URL}% .burrow_val1.toml sed -i s%PUT_HERE_SEED_NODE_ID@LISTEN_EXTERNAL_ADDRESS%${SEED_URL}% .burrow_val2.toml ``` -#### Start validator nodes -```bash +Start the network: + +```shell burrow start -v=0 --config=.burrow_val0.toml > .burrow_val0.log 2>&1 & burrow start -v=1 --config=.burrow_val1.toml > .burrow_val1.log 2>&1 & burrow start -v=2 --config=.burrow_val2.toml > .burrow_val2.log 2>&1 & ``` -Nodes will connect to seed node and request addresses, then they will connect to each other and start submitting and voting on blocks. +The nodes should connect to our seed node and request addresses, then they will connect to each other and start submitting and voting on blocks. + -Check network status, validators nodes are connected to each others: -```bash +To check the network status, and that the validator nodes are connected to each other run: + +```shell curl -s 127.0.0.1:40001/network | jq -r '.result.peers[].node_info.moniker' val_node_0 val_node_1 ``` -You can monitor consensus and current blockchain height from the node info websockets: -```bash +You can monitor consensus and current blockchain height from the node info websocket: + +```shell curl -s 127.0.0.1:20001/consensus | jq -r '.result.round_state.height' ``` -At the moment, there is an [issue](https://github.com/tendermint/tendermint/issues/2092) opened in Tendermint with seedMode. - Disable seed mode on the seed node and see how it affects the peers network: ```toml @@ -237,14 +240,16 @@ Disable seed mode on the seed node and see how it affects the peers network: SeedMode = false ``` -Clear nodes folder (Note it will restart the chain from the genesis block): -```bash +Clear nodes folder (it will restart the chain from the genesis block): + +```shell killall burrow rm -rf .burrow_node0 .burrow_node1 .burrow_node2 .burrow_seed_0 ``` Restart all nodes, then check network status (Validator 3 is now connected to all peers, included seed node): -```bash + +```shell curl -s 127.0.0.1:40001/network | jq -r '.result.peers[].node_info.moniker' seed_node_0 val_node_0 diff --git a/docs/tutorials/7-dump-restore.md b/docs/tutorials/7-dump-restore.md index a88939c97..99dc1f4b7 100644 --- a/docs/tutorials/7-dump-restore.md +++ b/docs/tutorials/7-dump-restore.md @@ -3,7 +3,7 @@ Sometimes there are breaking changes in burrow. This provides a method for dumping an old chain, and restoring a new chain with that state. -## Dumping existing state +## Dumping Existing State The `burrow dump` command connects to burrow node and retrieves the following: @@ -16,32 +16,32 @@ This can be dumped in json or go-amino format. The structure is described in (pr it saved in go-amino, but it can be saved in json format by specify `--json`. It is also possible to dump the state at a specific height using `--height`. -## Creating a new chain genesis with state +## Recreate State -So you will need the `.keys` directory of the old chain, the `genesis.json` (called genesis-original in the example below) +You will need the `.keys` directory of the old chain, the `genesis.json` (called genesis-original in the example below) from the old chain and the dump file (called `dump.json` here). -```bash +```shell burrow configure -m BurrowTestRestoreNode -n "Restored Chain" -g genesis-original.json -w genesis.json --restore-dump dump.json > burrow.toml ``` Note that the chain genesis will contain an `AppHash` specific to this restore file. -## Restart the chain with the state +## Restore Chain This will populate the `.burrow` directory with the state. -```bash +```shell burrow restore dump.json ``` This will create a block 0 with the restored state. Normally burrow chains start a height 1. -## Run the new chain +## Start Chain Simply start `burrow` as you would normally. -```bash +```shell burrow start ``` diff --git a/docs/tutorials/8-proposals.md b/docs/tutorials/8-proposals.md index 500e2c3f8..878cfd7d9 100644 --- a/docs/tutorials/8-proposals.md +++ b/docs/tutorials/8-proposals.md @@ -1,15 +1,15 @@ -# Proposals and voting +# Proposals and Voting -burrow proposals are a way of only executing some transactions if it receives enough votes. This can be +Proposals are a way of only executing some transactions if it receives enough votes. This can be useful if, for example, there are some solidity contracts which are shared between multiple parties. The proposal (the transactions) are stored on-chain and other members can verify the proposal before voting on it. Once the proposal receives enough votes, it is instantly and atomically executed. -# Set up a chain for this tutorial +## Setup We want a chain with three participants and a root account for executing proposals. So, creates this with: -``` +```shell burrow spec -v1 -r1 -p3 | burrow configure -s- -w genesis.json > burrow.toml ``` @@ -17,7 +17,7 @@ Note that in the genesis doc there is a ProposalThreshold which is set to 3. Thi needs. We will leave it at three for now. However if you set this to 1, proposals will execute instantly since a proposal already has one vote once it is created (the proposer itself). -# How to create a proposal +## Create a Proposal A proposal is a deployment yaml file, with some minor differences. The transactions which are to be proposed should be contained in a proposal job, which should have a name and a description. This proposal jobs type has a @@ -28,7 +28,7 @@ No jobs of type `Assert` or `QueryContract` are allowed in a proposal. This is our Solidity contract we are proposing: -``` +```solidity pragma solidity > 0.0.0; contract random { @@ -40,7 +40,7 @@ contract random { A standard deploy yaml for this contract would be: -``` +```yaml jobs: - name: deploy_random deploy: @@ -49,14 +49,14 @@ jobs: And it would be deployed like so: -``` +```shell burrow deploy -a Participant_0 random.yaml ``` Now we would like this to be a proposal. So, it needs to go into a proposal job and have it's source address set. The deploy yaml will look like: -``` +```yaml jobs: - name: Propose Deploying contract random proposal: @@ -71,56 +71,64 @@ jobs: Now, to create this proposal: -``` +```shell burrow deploy --proposal-create -a Participant_0 propose-random.yaml ``` The output should end with: -``` +```shell log_channel=Info message="Creating Proposal" hash=5029B2B06D42A6339FBD9A97A230F914E3F655143C66B647979ACD05A04C8451 ``` -# How to vote for a proposal +# Vote for a Proposal So Participant_0 created a proposal. Now you are Participant_1, and Participant_0 tells you he's got this proposal he would like you to vote for. So first of all you want to list the current proposals: +```shell +burrow deploy --list-proposals=PROPOSED ``` -$ burrow deploy --list-proposals=PROPOSED + +```shell log_channel=Info message=Proposal ProposalHash=5029b2b06d42a6339fbd9a97a230f914e3f655143c66b647979acd05a04c8451 Name=random.sol Description="I says we should deploy random.sol" State=PROPOSED Votes=1 ``` Now all we have is a hash. We want to know if this is really the change we are looking for. So, we can verify the proposal using the original deployment yaml and solidity files. You will need the same solidity compiler version for this to work. -``` +```shell burrow deploy -a Participant_1 --proposal-verify propose-random.yaml -... +``` + +```shell log_channel=Info message="Proposal VERIFY SUCCESSFUL" votescount=1 log_channel=Info message=Vote no=0 address=0F73E4EF45EC20BDC7CF5A12EC2F32701C642B9C ``` So the proposal is current, and matches the solidity and deployment files we have. We can now review those changes, and once we're happy with it, we can vote on it using: -``` +```shell burrow deploy -a Participant_1 --proposal-vote propose-random.yaml ``` -# Ratification and execution +# Ratification and Execution Once Participant_2 has run: -``` +```shell burrow deploy -a Participant_2 --proposal-vote propose-random.yaml ``` The contained transactions are executed. This happens in the same block as where the this vote is registered. -# Executed and expired proposals +# Executed and Expired Proposals +```shell +burrow deploy --list-proposals=ALL ``` -$ burrow deploy --list-proposals=ALL + +```shell log_channel=Info message=Proposal ProposalHash=5029b2b06d42a6339fbd9a97a230f914e3f655143c66b647979acd05a04c8451 Name=random.sol Description="I says we should deploy random.sol" State=EXECUTED Votes=3 ``` From 92a10c76c2ddb8250659e7ea69481f0f2aa93664 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 27 Sep 2019 09:24:46 +0100 Subject: [PATCH 015/185] combine gov package with payload Signed-off-by: Gregory Hill --- governance/governance.go | 55 ----------------------- integration/core/kernel_test.go | 19 +++----- integration/governance/governance_test.go | 22 ++++----- txs/payload/gov_tx.go | 52 +++++++++++++++++++++ 4 files changed, 70 insertions(+), 78 deletions(-) delete mode 100644 governance/governance.go diff --git a/governance/governance.go b/governance/governance.go deleted file mode 100644 index 976e6734e..000000000 --- a/governance/governance.go +++ /dev/null @@ -1,55 +0,0 @@ -// The governance package contains functionality for altering permissions, token distribution, consensus parameters, -// validators, and network forks. -package governance - -import ( - "github.com/hyperledger/burrow/acm/balance" - "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/genesis/spec" - "github.com/hyperledger/burrow/permission" - "github.com/hyperledger/burrow/txs/payload" -) - -// TODO: -// - Set validator power -// - Set account amount(s) -// - Set account permissions -// - Set global permissions -// - Set ConsensusParams -// Future considerations: -// - Handle network forks/termination/merging/replacement ? -// - Provide transaction in stasis/sudo (voting?) -// - Handle bonding by other means (e.g. pre-shared key permitting n bondings) -// - Network administered proxies (i.e. instead of keys have password authentication for identities - allow calls to originate as if from address without key?) -// Subject to: -// - Less than 1/3 validator power change per block - -// Creates a GovTx that alters the validator power of id to the power passed -func AlterPowerTx(inputAddress crypto.Address, id crypto.Addressable, power uint64) *payload.GovTx { - return AlterBalanceTx(inputAddress, id, balance.New().Power(power)) -} - -func AlterBalanceTx(inputAddress crypto.Address, id crypto.Addressable, bal balance.Balances) *payload.GovTx { - publicKey := id.GetPublicKey() - return UpdateAccountTx(inputAddress, &spec.TemplateAccount{ - PublicKey: &publicKey, - Amounts: bal, - }) -} - -func AlterPermissionsTx(inputAddress crypto.Address, id crypto.Addressable, perms permission.PermFlag) *payload.GovTx { - address := id.GetAddress() - return UpdateAccountTx(inputAddress, &spec.TemplateAccount{ - Address: &address, - Permissions: permission.PermFlagToStringList(perms), - }) -} - -func UpdateAccountTx(inputAddress crypto.Address, updates ...*spec.TemplateAccount) *payload.GovTx { - return &payload.GovTx{ - Inputs: []*payload.TxInput{{ - Address: inputAddress, - }}, - AccountUpdates: updates, - } -} diff --git a/integration/core/kernel_test.go b/integration/core/kernel_test.go index 962e0c7f5..f29883dcc 100644 --- a/integration/core/kernel_test.go +++ b/integration/core/kernel_test.go @@ -11,19 +11,8 @@ import ( "testing" "time" - "github.com/hyperledger/burrow/logging/loggers" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/governance" - "github.com/hyperledger/burrow/acm/balance" - "github.com/hyperledger/burrow/rpc/rpctransact" - - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "github.com/hyperledger/burrow/config" "github.com/hyperledger/burrow/event" "github.com/hyperledger/burrow/execution/exec" @@ -34,7 +23,13 @@ import ( "github.com/hyperledger/burrow/keys" "github.com/hyperledger/burrow/keys/mock" "github.com/hyperledger/burrow/logging/logconfig" + "github.com/hyperledger/burrow/logging/loggers" + "github.com/hyperledger/burrow/rpc/rpctransact" "github.com/hyperledger/burrow/txs/payload" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) func TestKernel(t *testing.T) { @@ -181,7 +176,7 @@ func bootWaitBlocksShutdown(t testing.TB, validator *acm.PrivateAccount, private txe, err = tcli.BroadcastTxSync(ctx, &rpctransact.TxEnvelopeParam{ Payload: &payload.Any{ - GovTx: governance.AlterBalanceTx(inputAddress, validator, balance.New().Power(pow)), + GovTx: payload.AlterBalanceTx(inputAddress, validator, balance.New().Power(pow)), }, }) handleTxe(txe, err, errCh) diff --git a/integration/governance/governance_test.go b/integration/governance/governance_test.go index 50d2a8dc9..8a19a415f 100644 --- a/integration/governance/governance_test.go +++ b/integration/governance/governance_test.go @@ -15,11 +15,11 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/genesis/spec" - "github.com/hyperledger/burrow/governance" "github.com/hyperledger/burrow/integration" "github.com/hyperledger/burrow/integration/rpctest" "github.com/hyperledger/burrow/permission" "github.com/hyperledger/burrow/rpc/rpcquery" + "github.com/hyperledger/burrow/txs/payload" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" tmcore "github.com/tendermint/tendermint/rpc/core" @@ -62,7 +62,7 @@ func TestGovernance(t *testing.T) { changePower(vs, 8, 9931) err := vs.IterateValidators(func(id crypto.Addressable, power *big.Int) error { - _, err := payloadSync(tcli, governance.AlterPowerTx(inputAddress, id, power.Uint64())) + _, err := payloadSync(tcli, payload.AlterPowerTx(inputAddress, id, power.Uint64())) return err }) require.NoError(t, err) @@ -73,7 +73,7 @@ func TestGovernance(t *testing.T) { assertValidatorsEqual(t, vs, vsOut) // Remove validator from chain - _, err = payloadSync(tcli, governance.AlterPowerTx(inputAddress, account(3), 0)) + _, err = payloadSync(tcli, payload.AlterPowerTx(inputAddress, account(3), 0)) require.NoError(t, err) // Mirror in our check set @@ -115,7 +115,7 @@ func TestGovernance(t *testing.T) { acc1 := acm.GeneratePrivateAccountFromSecret("Foo1") t.Logf("Changing power of new account %v to MaxFlow = %d that should succeed", acc1.GetAddress(), maxFlow) - _, err := payloadSync(tcli, governance.AlterPowerTx(inputAddress, acc1, maxFlow)) + _, err := payloadSync(tcli, payload.AlterPowerTx(inputAddress, acc1, maxFlow)) require.NoError(t, err) maxFlow = getMaxFlow(t, qcli) @@ -123,7 +123,7 @@ func TestGovernance(t *testing.T) { acc2 := acm.GeneratePrivateAccountFromSecret("Foo2") t.Logf("Changing power of new account %v to MaxFlow + 1 = %d that should fail", acc2.GetAddress(), power) - _, err = payloadSync(tcli, governance.AlterPowerTx(inputAddress, acc2, power)) + _, err = payloadSync(tcli, payload.AlterPowerTx(inputAddress, acc2, power)) require.Error(t, err) }) @@ -132,7 +132,7 @@ func TestGovernance(t *testing.T) { tcli := rpctest.NewTransactClient(t, grpcAddress) // Account does not have Root permission inputAddress := genesisAccounts[4].GetAddress() - _, err := payloadSync(tcli, governance.AlterPowerTx(inputAddress, account(5), 3433)) + _, err := payloadSync(tcli, payload.AlterPowerTx(inputAddress, account(5), 3433)) require.Error(t, err) assert.Contains(t, err.Error(), errors.PermissionDenied{Address: inputAddress, Perm: permission.Root}.Error()) }) @@ -144,7 +144,7 @@ func TestGovernance(t *testing.T) { qcli := rpctest.NewQueryClient(t, grpcAddress) var amount uint64 = 18889 acc := account(5) - _, err := payloadSync(tcli, governance.AlterBalanceTx(inputAddress, acc, balance.New().Native(amount))) + _, err := payloadSync(tcli, payload.AlterBalanceTx(inputAddress, acc, balance.New().Native(amount))) require.NoError(t, err) ca, err := qcli.GetAccount(context.Background(), &rpcquery.GetAccountParam{Address: acc.GetAddress()}) require.NoError(t, err) @@ -159,7 +159,7 @@ func TestGovernance(t *testing.T) { tcli := rpctest.NewTransactClient(t, grpcAddress) qcli := rpctest.NewQueryClient(t, grpcAddress) acc := account(5) - _, err := payloadSync(tcli, governance.AlterPermissionsTx(inputAddress, acc, permission.Send)) + _, err := payloadSync(tcli, payload.AlterPermissionsTx(inputAddress, acc, permission.Send)) require.NoError(t, err) ca, err := qcli.GetAccount(context.Background(), &rpcquery.GetAccountParam{Address: acc.GetAddress()}) require.NoError(t, err) @@ -178,7 +178,7 @@ func TestGovernance(t *testing.T) { qcli := rpctest.NewQueryClient(t, grpcAddress) var amount uint64 = 18889 acc := acm.GeneratePrivateAccountFromSecret("we almost certainly don't exist") - govTx := governance.AlterBalanceTx(inputAddress, acc, balance.New().Native(amount)) + govTx := payload.AlterBalanceTx(inputAddress, acc, balance.New().Native(amount)) _, err := payloadSync(tcli, govTx) require.NoError(t, err) ca, err := qcli.GetAccount(context.Background(), &rpcquery.GetAccountParam{Address: acc.GetAddress()}) @@ -195,7 +195,7 @@ func TestGovernance(t *testing.T) { acc := account(2) address := acc.GetAddress() power := uint64(2445) - _, err := payloadSync(tcli, governance.UpdateAccountTx(inputAddress, &spec.TemplateAccount{ + _, err := payloadSync(tcli, payload.UpdateAccountTx(inputAddress, &spec.TemplateAccount{ Address: &address, Amounts: balance.New().Power(power), })) @@ -213,7 +213,7 @@ func TestGovernance(t *testing.T) { address := acc.GetAddress() publicKey := acc.GetPublicKey() power := uint64(2445) - tx := governance.UpdateAccountTx(inputAddress, &spec.TemplateAccount{ + tx := payload.UpdateAccountTx(inputAddress, &spec.TemplateAccount{ Address: &address, PublicKey: &publicKey, Amounts: balance.New().Power(power), diff --git a/txs/payload/gov_tx.go b/txs/payload/gov_tx.go index eb4e5a1d4..e19ac7268 100644 --- a/txs/payload/gov_tx.go +++ b/txs/payload/gov_tx.go @@ -2,8 +2,16 @@ package payload import ( "fmt" + + "github.com/hyperledger/burrow/acm/balance" + "github.com/hyperledger/burrow/crypto" + spec "github.com/hyperledger/burrow/genesis/spec" + permission "github.com/hyperledger/burrow/permission" ) +// GovernanceTx contains functionality for altering permissions, token distribution, consensus parameters, +// validators, and network forks. + func (tx *GovTx) Type() Type { return TypeGovernance } @@ -21,3 +29,47 @@ func (tx *GovTx) Any() *Any { GovTx: tx, } } + +// TODO: +// - Set validator power +// - Set account amount(s) +// - Set account permissions +// - Set global permissions +// - Set ConsensusParams +// Future considerations: +// - Handle network forks/termination/merging/replacement ? +// - Provide transaction in stasis/sudo (voting?) +// - Handle bonding by other means (e.g. pre-shared key permitting n bondings) +// - Network administered proxies (i.e. instead of keys have password authentication for identities - allow calls to originate as if from address without key?) +// Subject to: +// - Less than 1/3 validator power change per block + +// Creates a GovTx that alters the validator power of id to the power passed +func AlterPowerTx(inputAddress crypto.Address, id crypto.Addressable, power uint64) *GovTx { + return AlterBalanceTx(inputAddress, id, balance.New().Power(power)) +} + +func AlterBalanceTx(inputAddress crypto.Address, id crypto.Addressable, bal balance.Balances) *GovTx { + publicKey := id.GetPublicKey() + return UpdateAccountTx(inputAddress, &spec.TemplateAccount{ + PublicKey: &publicKey, + Amounts: bal, + }) +} + +func AlterPermissionsTx(inputAddress crypto.Address, id crypto.Addressable, perms permission.PermFlag) *GovTx { + address := id.GetAddress() + return UpdateAccountTx(inputAddress, &spec.TemplateAccount{ + Address: &address, + Permissions: permission.PermFlagToStringList(perms), + }) +} + +func UpdateAccountTx(inputAddress crypto.Address, updates ...*spec.TemplateAccount) *GovTx { + return &GovTx{ + Inputs: []*TxInput{{ + Address: inputAddress, + }}, + AccountUpdates: updates, + } +} From e9922d51c8a53b8c43ff7bd905fad2c8a8b9e2a7 Mon Sep 17 00:00:00 2001 From: Ry Jones Date: Fri, 27 Sep 2019 03:17:30 -0700 Subject: [PATCH 016/185] Add default SECURITY policy Signed-off-by: Ry Jones --- SECURITY.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..91509aa05 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,12 @@ +# Hyperledger Security Policy + +## Reporting a Security Bug + +If you think you have discovered a security issue in any of the Hyperledger projects, we'd love to hear from you. We will take all security bugs seriously and if confirmed upon investigation we will patch it within a reasonable amount of time and release a public security bulletin discussing the impact and credit the discoverer. + +There are two ways to report a security bug. The easiest is to email a description of the flaw and any related information (e.g. reproduction steps, version) to [security at hyperledger dot org](mailto:security@hyperledger.org). + +The other way is to file a confidential security bug in our [JIRA bug tracking system](https://jira.hyperledger.org). Be sure to set the “Security Level” to “Security issue”. + +The process by which the Hyperledger Security Team handles security bugs is documented further in our [Defect Response page](https://wiki.hyperledger.org/display/HYP/Defect+Response) on our [wiki](https://wiki.hyperledger.org). + From dc38c23e99abecc29deddede580cb635859c0ace Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 27 Sep 2019 12:02:38 +0100 Subject: [PATCH 017/185] split integration tests Signed-off-by: Gregory Hill --- .github/workflows/main.yaml | 29 -------- .github/workflows/test.yaml | 128 ++++++++++++++++++++++++++++++++++++ Makefile | 44 ++++++------- 3 files changed, 150 insertions(+), 51 deletions(-) delete mode 100644 .github/workflows/main.yaml create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml deleted file mode 100644 index 26b01fd96..000000000 --- a/.github/workflows/main.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: main -on: [push, pull_request] -jobs: - test: - name: Test - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v1 - with: - go-version: 1.12 - id: go - - uses: actions/setup-node@v1 - with: - node-version: '8.x' - - uses: actions/checkout@v1 - - run: make build - - run: make test - - run: make test_integration - - run: npm install - - run: make test_js - - docker: - name: Docker - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - run: make docker_build - env: - DOCKER_REPO: "hyperledger/burrow" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 000000000..dfedc2144 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,128 @@ +name: test +on: [push, pull_request] +jobs: + unit: + name: Unit + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v1 + with: + go-version: 1.12 + id: go + - uses: actions/checkout@v1 + - run: make test + - run: make build + - uses: actions/upload-artifact@master + with: + name: burrow + path: bin + + integration: + name: Integration + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: make test_integration + + vent: + name: Vent + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: docker-compose run burrow make test_integration_vent + + docker: + name: Docker + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: make docker_build + env: + DOCKER_REPO: "hyperledger/burrow" + + keys: + name: Keys + runs-on: ubuntu-latest + needs: unit + steps: + - uses: actions/checkout@v1 + - uses: actions/download-artifact@master + with: + name: burrow + path: bin + - run: chmod +x $(pwd)/bin/* + - name: Test + run: | + export PATH=${PATH}:$(pwd)/bin + make test_keys + + truffle: + name: Truffle + runs-on: ubuntu-latest + needs: unit + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '8.x' + - uses: actions/download-artifact@master + with: + name: burrow + path: bin + - run: chmod +x $(pwd)/bin/* + - name: Test + run: | + export PATH=${PATH}:$(pwd)/bin + make test_truffle + + deploy: + name: Deploy + runs-on: ubuntu-latest + needs: unit + steps: + - uses: actions/checkout@v1 + - uses: actions/download-artifact@master + with: + name: burrow + path: bin + - run: chmod +x $(pwd)/bin/* + - name: Test + run: | + export PATH=${PATH}:$(pwd)/bin + make test_deploy + + restore: + name: Dump - Restore + runs-on: ubuntu-latest + needs: unit + steps: + - uses: actions/checkout@v1 + - uses: actions/download-artifact@master + with: + name: burrow + path: bin + - run: chmod +x $(pwd)/bin/* + - name: Test + run: | + export PATH=${PATH}:$(pwd)/bin + make test_restore + + test_js: + name: JS API + runs-on: ubuntu-latest + needs: unit + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '8.x' + - uses: actions/download-artifact@master + with: + name: burrow + path: bin + - run: chmod +x $(pwd)/bin/* + - name: Test + run: | + export PATH=${PATH}:$(pwd)/bin + make npm_install + make test_js \ No newline at end of file diff --git a/Makefile b/Makefile index a99562f4c..7eab6f7d6 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,6 @@ SHELL := /bin/bash REPO := $(shell pwd) -GOFILES := $(shell go list -f "{{.Dir}}" ./...) -PACKAGES := $(shell go list ./... ) # Protobuf generated go files PROTO_FILES = $(shell find . -path ./vendor -prune -o -path ./.gopath_bos -prune -o -type f -name '*.proto' -print) @@ -40,26 +38,26 @@ export GO111MODULE=on .PHONY: check check: @echo "Checking code for formatting style compliance." - @gofmt -l -d ${GOFILES} - @gofmt -l ${GOFILES} | read && echo && echo "Your marmot has found a problem with the formatting style of the code." 1>&2 && exit 1 || true + @gofmt -l -d $(shell go list -f "{{.Dir}}" ./...) + @gofmt -l $(shell go list -f "{{.Dir}}" ./...) | read && echo && echo "Your marmot has found a problem with the formatting style of the code." 1>&2 && exit 1 || true # Just fix it .PHONY: fix fix: - @goimports -l -w ${GOFILES} + @goimports -l -w $(shell go list -f "{{.Dir}}" ./...) # fmt runs gofmt -w on the code, modifying any files that do not match # the style guide. .PHONY: fmt fmt: @echo "Correcting any formatting style corrections." - @gofmt -l -w ${GOFILES} + @gofmt -l -w $(shell go list -f "{{.Dir}}" ./...) # lint installs golint and prints recommendations for coding style. lint: @echo "Running lint checks." go get -u github.com/golang/lint/golint - @for file in $(GOFILES); do \ + @for file in $(shell go list -f "{{.Dir}}" ./...); do \ echo; \ golint --set_exit_status $${file}; \ done @@ -69,13 +67,13 @@ lint: .PHONY: vet vet: @echo "Running go vet." - @go vet ${PACKAGES} + @go vet $(shell go list ./... ) # run the megacheck tool for code compliance .PHONY: megacheck megacheck: @go get honnef.co/go/tools/cmd/megacheck - @for pkg in ${PACKAGES}; do megacheck "$$pkg"; done + @for pkg in $(shell go list ./... ); do megacheck "$$pkg"; done # Protobuffing .PHONY: protobuf_deps @@ -95,7 +93,6 @@ protobuf: $(PROTO_GO_FILES) clean_protobuf: @rm -f $(PROTO_GO_FILES_REAL) - ### PEG query grammar # This allows us to filter tagged objects with things like (EventID = 'foo' OR Height > 10) AND EventName CONTAINS 'frog' @@ -181,22 +178,22 @@ solang: $(SOLANG_GO_FILES) npm_install: npm install +# Test + .PHONY: test_js -test_js: bin/solc build_burrow +test_js: ./tests/scripts/bin_wrapper.sh npm test -# Test - .PHONY: test test: check bin/solc @tests/scripts/bin_wrapper.sh go test ./... ${GO_TEST_ARGS} .PHONY: test_keys -test_keys: build_burrow +test_keys: burrow_bin="${REPO}/bin/burrow" tests/keys_server/test.sh .PHONY: test_truffle -test_truffle: build_burrow +test_truffle: burrow_bin="${REPO}/bin/burrow" tests/web3/truffle.sh .PHONY: test_integration_vent @@ -209,20 +206,23 @@ test_integration_vent_postgres: docker-compose run burrow make test_integration_vent .PHONY: test_restore -test_restore: build_burrow bin/solc +test_restore: @tests/scripts/bin_wrapper.sh tests/dump/test.sh # Go will attempt to run separate packages in parallel + .PHONY: test_integration -test_integration: test_keys test_deploy test_integration_vent_postgres test_restore test_truffle +test_integration: @go test -v -tags integration ./integration/... -.PHONY: test_integration_no_postgres -test_integration_no_postgres: test_keys test_deploy test_integration_vent test_restore test_truffle - @go test -v -tags integration ./integration/... +.PHONY: test_integration_all +test_integration_all: test_keys test_deploy test_integration_vent_postgres test_restore test_truffle test_integration + +.PHONY: test_integration_all_no_postgres +test_integration_all_no_postgres: test_keys test_deploy test_integration_vent test_restore test_truffle test_integration .PHONY: test_deploy -test_deploy: bin/solc build_burrow +test_deploy: @tests/scripts/bin_wrapper.sh tests/deploy.sh bin/solc: ./tests/scripts/deps/solc.sh @@ -233,7 +233,7 @@ bin/solc: ./tests/scripts/deps/solc.sh # test burrow with checks for race conditions .PHONY: test_race test_race: build_race - @go test -race ${PACKAGES} + @go test -race $(shell go list ./... ) ### Clean up From 48256986aa72114b0418d1abcbb9d23948a44a8a Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 27 Sep 2019 10:13:51 +0100 Subject: [PATCH 018/185] implement identifyTx Signed-off-by: Gregory Hill --- acm/account_test.go | 2 +- cmd/burrow/commands/tx.go | 43 +- consensus/abci/peers_filter.go | 6 +- consensus/tendermint/config.go | 12 +- consensus/tendermint/config_test.go | 6 + core/config.go | 5 + core/processes.go | 18 +- crypto/tendermint.go | 6 + deploy/def/client.go | 52 +- deploy/def/job.go | 2 + deploy/def/jobs.go | 24 + deploy/jobs/job_manager.go | 10 + deploy/jobs/jobs_transact.go | 34 ++ docs/ADRs/{draft => }/adr-2_identify-tx.md | 0 .../ADRs/{draft => }/adr-3_bonding-natives.md | 0 docs/reference/bonding.md | 1 - docs/reference/transactions.md | 29 + execution/contexts/identify_context.go | 55 ++ execution/contexts/name_context.go | 2 +- execution/contexts/shared.go | 12 + execution/evm/vm_test.go | 11 +- execution/execution.go | 22 +- execution/execution_test.go | 17 +- execution/names/cache.go | 9 +- execution/proposal/cache.go | 13 +- execution/proposal/proposal.go | 4 +- execution/registry/cache.go | 177 ++++++ execution/registry/registry.go | 81 +++ execution/registry/registry.pb.go | 511 +++++++++++++++++ execution/registry/registry_test.go | 29 + execution/state/registry.go | 78 +++ execution/state/state.go | 51 +- integration/core/kernel_test.go | 17 +- integration/governance/bonding_test.go | 7 +- integration/governance/governance_test.go | 7 +- integration/governance/helpers.go | 41 +- integration/governance/identify_test.go | 113 ++++ integration/integration.go | 25 +- keys/key_client.go | 4 +- permission/perm_flag.go | 9 +- permission/perm_flag_test.go | 2 +- permission/util_test.go | 4 +- protobuf/payload.proto | 12 + protobuf/registry.proto | 32 ++ protobuf/rpcquery.proto | 18 +- protobuf/rpctransact.proto | 2 +- rpc/config.go | 8 + rpc/eth_test.go | 2 +- rpc/result.go | 6 + rpc/rpcinfo/methods.go | 10 +- rpc/rpcquery/query_server.go | 20 +- rpc/rpcquery/rpcquery.pb.go | 357 +++++++++--- rpc/rpctransact/rpctransact.pb.go | 4 +- rpc/service.go | 21 +- txs/payload/identify_tx.go | 35 ++ txs/payload/payload.go | 4 + txs/payload/payload.pb.go | 526 ++++++++++++++---- txs/tx.go | 3 + 58 files changed, 2305 insertions(+), 306 deletions(-) rename docs/ADRs/{draft => }/adr-2_identify-tx.md (100%) rename docs/ADRs/{draft => }/adr-3_bonding-natives.md (100%) create mode 100644 execution/contexts/identify_context.go create mode 100644 execution/registry/cache.go create mode 100644 execution/registry/registry.go create mode 100644 execution/registry/registry.pb.go create mode 100644 execution/registry/registry_test.go create mode 100644 execution/state/registry.go create mode 100644 integration/governance/identify_test.go create mode 100644 protobuf/registry.proto create mode 100644 txs/payload/identify_tx.go diff --git a/acm/account_test.go b/acm/account_test.go index accc7367b..8e97a7a20 100644 --- a/acm/account_test.go +++ b/acm/account_test.go @@ -63,7 +63,7 @@ func TestMarshalJSON(t *testing.T) { expected := fmt.Sprintf(`{"Address":"%s","PublicKey":{"CurveType":"ed25519","PublicKey":"%s"},`+ `"Sequence":4,"Balance":10,"EVMCode":"3C172D",`+ - `"Permissions":{"Base":{"Perms":"root | send | call | createContract | createAccount | bond | name | proposal | input | batch | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole","SetBit":""}}}`, + `"Permissions":{"Base":{"Perms":"root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole","SetBit":""}}}`, acc.Address, acc.PublicKey) assert.Equal(t, expected, string(bs)) assert.NoError(t, err) diff --git a/cmd/burrow/commands/tx.go b/cmd/burrow/commands/tx.go index 144921a5b..0d8bc5923 100644 --- a/cmd/burrow/commands/tx.go +++ b/cmd/burrow/commands/tx.go @@ -3,7 +3,6 @@ package commands import ( "encoding/json" "errors" - "fmt" "io/ioutil" "os" "time" @@ -37,7 +36,7 @@ func Tx(output Output) func(cmd *cli.Cmd) { output.Fatalf("cannot continue with config: %v", err) } - chainHost := jobs.FirstOf(*chainOpt, fmt.Sprintf("%s:%s", conf.RPC.GRPC.ListenHost, conf.RPC.GRPC.ListenPort)) + chainHost := jobs.FirstOf(*chainOpt, conf.RPC.GRPC.ListenAddress()) client := def.NewClient(chainHost, conf.Keys.RemoteAddress, true, time.Duration(*timeoutOpt)*time.Second) logger := logging.NewNoopLogger() address := conf.Address.String() @@ -121,6 +120,42 @@ func Tx(output Output) func(cmd *cli.Cmd) { })) } }) + + cmd.Command("identify", "associate a validator with a node address", func(cmd *cli.Cmd) { + sourceOpt := cmd.StringOpt("source", "", "Address to send from, if not set config is used") + nodeKeyOpt := cmd.StringOpt("node-key", "", "File containing the nodeKey to use, default config") + networkOpt := cmd.StringOpt("network", "", "Publically reachable host IP") + monikerOpt := cmd.StringOpt("moniker", "", "Human readable node ID") + cmd.Spec += "[--source=
] [--node-key=] [--network=
] [--moniker=]" + + cmd.Action = func() { + + tmConf, err := conf.TendermintConfig() + if err != nil { + output.Fatalf("could not construct tendermint config: %v", err) + } + + id := &def.Identify{ + Source: jobs.FirstOf(*sourceOpt, address), + NodeKey: jobs.FirstOf(*nodeKeyOpt, tmConf.NodeKeyFile()), + Moniker: *monikerOpt, + NetAddress: jobs.FirstOf(*networkOpt, conf.Tendermint.ListenHost), + } + + if err := id.Validate(); err != nil { + output.Fatalf("could not validate IdentifyTx: %v", err) + } + + tx, err := jobs.FormulateIdentifyJob(id, address, client, logger) + if err != nil { + output.Fatalf("could not formulate IdentifyTx: %v", err) + } + + output.Printf("%s", source.JSONString(payload.Any{ + IdentifyTx: tx, + })) + } + }) }) cmd.Command("commit", "read and send a tx to mempool", func(cmd *cli.Cmd) { @@ -136,7 +171,7 @@ func Tx(output Output) func(cmd *cli.Cmd) { output.Fatalf("can't continue with config: %v", err) } - chainHost := jobs.FirstOf(*chainOpt, fmt.Sprintf("%s:%s", conf.RPC.GRPC.ListenHost, conf.RPC.GRPC.ListenPort)) + chainHost := jobs.FirstOf(*chainOpt, conf.RPC.GRPC.ListenAddress()) client := def.NewClient(chainHost, conf.Keys.RemoteAddress, true, time.Duration(*timeoutOpt)*time.Second) var rawTx payload.Any @@ -159,6 +194,8 @@ func Tx(output Output) func(cmd *cli.Cmd) { hash, err = makeTx(client, tx) case *payload.UnbondTx: hash, err = makeTx(client, tx) + case *payload.IdentifyTx: + hash, err = makeTx(client, tx) default: output.Fatalf("payload type not recognized") } diff --git a/consensus/abci/peers_filter.go b/consensus/abci/peers_filter.go index 06d432238..f705f6f26 100644 --- a/consensus/abci/peers_filter.go +++ b/consensus/abci/peers_filter.go @@ -2,6 +2,7 @@ package abci import ( "fmt" + "net" "strings" "github.com/hyperledger/burrow/consensus/tendermint/codes" @@ -25,7 +26,6 @@ func (app *App) peersFilter(reqQuery *abciTypes.RequestQuery, respQuery *abciTyp filterType := path[3] peer := path[4] - authorizedPeersID, authorizedPeersAddress := app.authorizedPeersProvider() var authorizedPeers []string switch filterType { @@ -39,7 +39,9 @@ func (app *App) peersFilter(reqQuery *abciTypes.RequestQuery, respQuery *abciTyp peerAuthorized := len(authorizedPeers) == 0 for _, authorizedPeer := range authorizedPeers { - if authorizedPeer == peer { + host, _, err := net.SplitHostPort(peer) + // may have different outbound port in address, so fallback to host + if peer == authorizedPeer || (err == nil && host == authorizedPeer) { peerAuthorized = true break } diff --git a/consensus/tendermint/config.go b/consensus/tendermint/config.go index a6e07713e..2ca6f88ea 100644 --- a/consensus/tendermint/config.go +++ b/consensus/tendermint/config.go @@ -3,6 +3,7 @@ package tendermint import ( "fmt" "math" + "net" "net/url" "strings" "time" @@ -35,6 +36,8 @@ type BurrowTendermintConfig struct { // Set false for private or local networks AddrBookStrict bool Moniker string + // Only accept connections from registered peers + IdentifyPeers bool // Peers ID or address this node is authorize to sync with AuthorizedPeers string // EmptyBlocks mode and possible interval between empty blocks in seconds, one of: @@ -103,7 +106,7 @@ func (btc *BurrowTendermintConfig) Config(rootDir string, timeoutFactor float64) conf.P2P.Seeds = btc.Seeds conf.P2P.SeedMode = btc.SeedMode conf.P2P.PersistentPeers = btc.PersistentPeers - conf.P2P.ListenAddress = fmt.Sprintf("%s:%s", btc.ListenHost, btc.ListenPort) + conf.P2P.ListenAddress = btc.ListenAddress() conf.P2P.ExternalAddress = btc.ExternalAddress conf.P2P.AddrBookStrict = btc.AddrBookStrict // We use this in tests and I am not aware of a strong reason to reject nodes on the same IP with different ports @@ -111,7 +114,8 @@ func (btc *BurrowTendermintConfig) Config(rootDir string, timeoutFactor float64) // Unfortunately this stops metrics from being used at all conf.Instrumentation.Prometheus = false - conf.FilterPeers = btc.AuthorizedPeers != "" + + conf.FilterPeers = btc.IdentifyPeers || btc.AuthorizedPeers != "" } // Disable Tendermint RPC conf.RPC.ListenAddress = "" @@ -143,3 +147,7 @@ func scaleTimeout(factor float64, timeout time.Duration) time.Duration { } return time.Duration(math.Round(factor * float64(timeout))) } + +func (btc *BurrowTendermintConfig) ListenAddress() string { + return net.JoinHostPort(btc.ListenHost, btc.ListenPort) +} diff --git a/consensus/tendermint/config_test.go b/consensus/tendermint/config_test.go index 5b7ec6412..d95cae2e9 100644 --- a/consensus/tendermint/config_test.go +++ b/consensus/tendermint/config_test.go @@ -44,4 +44,10 @@ func TestDefaultBurrowTendermintConfig(t *testing.T) { require.NoError(t, err) assert.Equal(t, time.Duration(0), tmConf.Consensus.CreateEmptyBlocksInterval) assert.True(t, tmConf.Consensus.CreateEmptyBlocks) + + btc.AuthorizedPeers = "" + btc.IdentifyPeers = true + tmConf, err = btc.Config(".burrow", 0.33) + require.NoError(t, err) + assert.Equal(t, true, tmConf.FilterPeers) } diff --git a/core/config.go b/core/config.go index 225945622..743e3c09a 100644 --- a/core/config.go +++ b/core/config.go @@ -8,6 +8,7 @@ import ( "github.com/hyperledger/burrow/consensus/abci" "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/execution" + "github.com/hyperledger/burrow/execution/registry" "github.com/hyperledger/burrow/keys" "github.com/hyperledger/burrow/logging/logconfig" "github.com/hyperledger/burrow/logging/structure" @@ -58,6 +59,10 @@ func (kern *Kernel) LoadTendermintFromConfig(conf *config.BurrowConfig, privVal } authorizedPeersProvider := conf.Tendermint.DefaultAuthorizedPeersProvider() + if conf.Tendermint.IdentifyPeers { + authorizedPeersProvider = registry.AuthorizedPeersProvider(kern.State) + } + kern.database.Stats() kern.info = fmt.Sprintf("Burrow_%s_%s_ValidatorID:%X", project.History.CurrentVersion().String(), diff --git a/core/processes.go b/core/processes.go index 636d6151a..3dd1cb5a7 100644 --- a/core/processes.go +++ b/core/processes.go @@ -60,7 +60,7 @@ func ProfileLauncher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher { Enabled: conf.Enabled, Launch: func() (process.Process, error) { debugServer := &http.Server{ - Addr: fmt.Sprintf("%s:%s", conf.ListenHost, conf.ListenPort), + Addr: conf.ListenAddress(), } go func() { err := debugServer.ListenAndServe() @@ -95,7 +95,9 @@ func NoConsensusLauncher(kern *Kernel) process.Launcher { Launch: func() (process.Process, error) { accountState := kern.State nameRegState := kern.State - kern.Service = rpc.NewService(accountState, nameRegState, kern.Blockchain, kern.State, nil, kern.Logger) + nodeRegState := kern.State + validatorSet := kern.State + kern.Service = rpc.NewService(accountState, nameRegState, nodeRegState, kern.Blockchain, validatorSet, nil, kern.Logger) // TimeoutFactor scales in units of seconds blockDuration := time.Duration(kern.timeoutFactor * float64(time.Second)) //proc := abci.NewProcess(kern.checker, kern.committer, kern.Blockchain, kern.txCodec, blockDuration, kern.Panic) @@ -132,8 +134,9 @@ func TendermintLauncher(kern *Kernel) process.Launcher { accountState := kern.State eventsState := kern.State nameRegState := kern.State + nodeRegState := kern.State validatorState := kern.State - kern.Service = rpc.NewService(accountState, nameRegState, kern.Blockchain, validatorState, nodeView, kern.Logger) + kern.Service = rpc.NewService(accountState, nameRegState, nodeRegState, kern.Blockchain, validatorState, nodeView, kern.Logger) kern.EthService = rpc.NewEthService(accountState, eventsState, kern.Blockchain, validatorState, nodeView, kern.Transactor, kern.keyStore, kern.Logger) if err := kern.Node.Start(); err != nil { @@ -210,7 +213,7 @@ func InfoLauncher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher { Name: InfoProcessName, Enabled: conf.Enabled, Launch: func() (process.Process, error) { - listener, err := process.ListenerFromAddress(fmt.Sprintf("%s:%s", conf.ListenHost, conf.ListenPort)) + listener, err := process.ListenerFromAddress(conf.ListenAddress()) if err != nil { return nil, err } @@ -256,7 +259,7 @@ func MetricsLauncher(kern *Kernel, conf *rpc.MetricsConfig) process.Launcher { Name: MetricsProcessName, Enabled: conf.Enabled, Launch: func() (process.Process, error) { - listener, err := process.ListenerFromAddress(fmt.Sprintf("%s:%s", conf.ListenHost, conf.ListenPort)) + listener, err := process.ListenerFromAddress(conf.ListenAddress()) if err != nil { return nil, err } @@ -284,7 +287,7 @@ func GRPCLauncher(kern *Kernel, conf *rpc.ServerConfig, keyConfig *keys.KeysConf return nil, err } - listener, err := process.ListenerFromAddress(fmt.Sprintf("%s:%s", conf.ListenHost, conf.ListenPort)) + listener, err := process.ListenerFromAddress(conf.ListenAddress()) if err != nil { return nil, err } @@ -308,8 +311,9 @@ func GRPCLauncher(kern *Kernel, conf *rpc.ServerConfig, keyConfig *keys.KeysConf } nameRegState := kern.State + nodeRegState := kern.State proposalRegState := kern.State - rpcquery.RegisterQueryServer(grpcServer, rpcquery.NewQueryServer(kern.State, nameRegState, proposalRegState, + rpcquery.RegisterQueryServer(grpcServer, rpcquery.NewQueryServer(kern.State, nameRegState, nodeRegState, proposalRegState, kern.Blockchain, kern.State, nodeView, kern.Logger)) txCodec := txs.NewProtobufCodec() diff --git a/crypto/tendermint.go b/crypto/tendermint.go index 570e69b6b..44398161d 100644 --- a/crypto/tendermint.go +++ b/crypto/tendermint.go @@ -2,14 +2,20 @@ package crypto import ( "fmt" + "strings" "github.com/btcsuite/btcd/btcec" abci "github.com/tendermint/tendermint/abci/types" tmCrypto "github.com/tendermint/tendermint/crypto" tmEd25519 "github.com/tendermint/tendermint/crypto/ed25519" tmSecp256k1 "github.com/tendermint/tendermint/crypto/secp256k1" + "github.com/tendermint/tendermint/p2p" ) +func NodeIDFromAddress(id Address) p2p.ID { + return p2p.ID(strings.ToLower(id.String())) +} + func PublicKeyFromTendermintPubKey(pubKey tmCrypto.PubKey) (PublicKey, error) { switch pk := pubKey.(type) { case tmEd25519.PubKeyEd25519: diff --git a/deploy/def/client.go b/deploy/def/client.go index 3f1002eb2..1af0d6384 100644 --- a/deploy/def/client.go +++ b/deploy/def/client.go @@ -4,13 +4,10 @@ import ( "context" "fmt" "io" + "reflect" "strconv" "time" - "reflect" - - hex "github.com/tmthrgd/go-hex" - "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/binary" @@ -18,6 +15,7 @@ import ( "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/names" + "github.com/hyperledger/burrow/execution/registry" "github.com/hyperledger/burrow/genesis/spec" "github.com/hyperledger/burrow/keys" "github.com/hyperledger/burrow/logging" @@ -28,6 +26,8 @@ import ( "github.com/hyperledger/burrow/rpc/rpctransact" "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" + "github.com/tendermint/tendermint/p2p" + hex "github.com/tmthrgd/go-hex" "google.golang.org/grpc" ) @@ -674,6 +674,50 @@ func (c *Client) Permissions(arg *PermArg, logger *logging.Logger) (*payload.Per return tx, nil } +type IdentifyArg struct { + Input string + NodeKey string + Moniker string + NetAddress string + Amount string + Sequence string +} + +func (c *Client) Identify(arg *IdentifyArg, logger *logging.Logger) (*payload.IdentifyTx, error) { + logger.InfoMsg("IdentifyTx", "name", arg) + input, err := c.TxInput(arg.Input, arg.Amount, arg.Sequence, true, logger) + if err != nil { + return nil, err + } + + address, err := crypto.AddressFromHexString(arg.Input) + if err != nil { + return nil, err + } + + signer, err := keys.AddressableSigner(c.keyClient, address) + if err != nil { + return nil, err + } + + nodeKey, err := p2p.LoadNodeKey(arg.NodeKey) + if err != nil { + return nil, err + } + + node := ®istry.NodeIdentity{ + Moniker: arg.Moniker, + NetworkAddress: arg.NetAddress, + TendermintNodeID: string(nodeKey.ID()), + ValidatorPublicKey: signer.GetPublicKey(), + } + + return &payload.IdentifyTx{ + Inputs: []*payload.TxInput{input}, + Node: node, + }, nil +} + func (c *Client) TxInput(inputString, amountString, sequenceString string, allowMempoolSigning bool, logger *logging.Logger) (*payload.TxInput, error) { var err error var inputAddress crypto.Address diff --git a/deploy/def/job.go b/deploy/def/job.go index 3368d5c29..6e339d674 100644 --- a/deploy/def/job.go +++ b/deploy/def/job.go @@ -45,6 +45,8 @@ type Job struct { Unbond *Unbond `mapstructure:"unbond,omitempty" json:"unbond,omitempty" yaml:"unbond,omitempty" toml:"unbond"` // Utilize monax:db's native name registry to register a name RegisterName *RegisterName `mapstructure:"register,omitempty" json:"register,omitempty" yaml:"register,omitempty" toml:"register"` + // Validator identify as node key + Identify *Identify `mapstructure:"identify,omitempty" json:"identify,omitempty" yaml:"identify,omitempty" toml:"identify"` // Sends a transaction which will update the permissions of an account. Must be sent from an account which // has root permissions on the blockchain (as set by either the genesis.json or in a subsequence transaction) Permission *Permission `mapstructure:"permission,omitempty" json:"permission,omitempty" yaml:"permission,omitempty" toml:"permission"` diff --git a/deploy/def/jobs.go b/deploy/def/jobs.go index d1652296e..6eab23576 100644 --- a/deploy/def/jobs.go +++ b/deploy/def/jobs.go @@ -265,6 +265,30 @@ func (job *Permission) Validate() error { ) } +type Identify struct { + // (Optional, if account job or global account set) address of the account from which to identify (the + // public key for the account must be available to burrow keys) + Source string `mapstructure:"source" json:"source" yaml:"source" toml:"source"` + // (Required) file containing the tendermint node to identify as + NodeKey string `mapstructure:"nodekey" json:"nodekey" yaml:"nodekey" toml:"nodekey"` + // (Required) publically available network address + NetAddress string `mapstructure:"netaddress" json:"netaddress" yaml:"netaddress" toml:"netaddress"` + // (Optional) publically available network moniker + Moniker string `mapstructure:"moniker" json:"moniker" yaml:"moniker" toml:"moniker"` + + // (Optional, advanced only) sequence to use when burrow keys signs the transaction (do not use unless you + // know what you're doing) + Sequence string `mapstructure:"sequence" json:"sequence" yaml:"sequence" toml:"sequence"` +} + +func (job *Identify) Validate() error { + return validation.ValidateStruct(job, + validation.Field(&job.NodeKey, validation.Required), + validation.Field(&job.NetAddress, validation.Required), + validation.Field(&job.Sequence, rule.Uint64OrPlaceholder), + ) +} + // ------------------------------------------------------------------------ // Contracts Jobs // ------------------------------------------------------------------------ diff --git a/deploy/jobs/job_manager.go b/deploy/jobs/job_manager.go index 5396c7317..3770f41f9 100644 --- a/deploy/jobs/job_manager.go +++ b/deploy/jobs/job_manager.go @@ -216,6 +216,16 @@ func doJobs(playbook *def.Playbook, args *def.DeployArgs, client *def.Client, lo if err != nil { return err } + case *def.Identify: + announce(job.Name, "Identify", logger) + tx, err := FormulateIdentifyJob(job.Identify, playbook.Account, client, logger) + if err != nil { + return err + } + job.Result, err = IdentifyJob(job.Identify, tx, playbook.Account, client, logger) + if err != nil { + return err + } // Contracts jobs case *def.Deploy: diff --git a/deploy/jobs/jobs_transact.go b/deploy/jobs/jobs_transact.go index 0b052407c..f1e5f4d56 100644 --- a/deploy/jobs/jobs_transact.go +++ b/deploy/jobs/jobs_transact.go @@ -214,6 +214,40 @@ func PermissionJob(perm *def.Permission, account string, tx *payload.PermsTx, cl return txe.Receipt.TxHash.String(), nil } +func FormulateIdentifyJob(id *def.Identify, account string, client *def.Client, logger *logging.Logger) (*payload.IdentifyTx, error) { + // Use Default + id.Source = FirstOf(id.Source, account) + + // Formulate tx + logger.InfoMsg("Identify Transaction", + "source", id.Source, + "nodeKey", id.NodeKey, + "netAddress", id.NetAddress) + + return client.Identify(&def.IdentifyArg{ + Input: id.Source, + Moniker: id.Moniker, + NodeKey: id.NodeKey, + NetAddress: id.NetAddress, + Sequence: id.Sequence, + }, logger) +} + +func IdentifyJob(id *def.Identify, tx *payload.IdentifyTx, account string, client *def.Client, logger *logging.Logger) (string, error) { + // Sign, broadcast, display + txe, err := client.SignAndBroadcast(tx, logger) + if err != nil { + return "", util.ChainErrorHandler(account, err, logger) + } + + util.ReadTxSignAndBroadcast(txe, err, logger) + if err != nil { + return "", err + } + + return txe.Receipt.TxHash.String(), nil +} + func FirstOf(inputs ...string) string { for _, in := range inputs { if in != "" { diff --git a/docs/ADRs/draft/adr-2_identify-tx.md b/docs/ADRs/adr-2_identify-tx.md similarity index 100% rename from docs/ADRs/draft/adr-2_identify-tx.md rename to docs/ADRs/adr-2_identify-tx.md diff --git a/docs/ADRs/draft/adr-3_bonding-natives.md b/docs/ADRs/adr-3_bonding-natives.md similarity index 100% rename from docs/ADRs/draft/adr-3_bonding-natives.md rename to docs/ADRs/adr-3_bonding-natives.md diff --git a/docs/reference/bonding.md b/docs/reference/bonding.md index b8bf0931d..5eed60e26 100644 --- a/docs/reference/bonding.md +++ b/docs/reference/bonding.md @@ -22,7 +22,6 @@ To prevent the validator pool changing too quickly over a single block whilst en majority of validators are non-byzantine after the transition, we allow up to `ceil((t)/3) - 1` to be changed where `t` is the current total validator power. - ## Future Work Currently a validator must bond or unbond themselves directly - we enforce a strict relationship diff --git a/docs/reference/transactions.md b/docs/reference/transactions.md index c041a3124..50bb0e55c 100644 --- a/docs/reference/transactions.md +++ b/docs/reference/transactions.md @@ -66,3 +66,32 @@ A transaction type containing a batch of transactions on which a ballot is held A transaction to modify the permissions of accounts. +## IdentifyTx + +When running a closed or permissioned network, it is desirable to restrict the participants. +For example, a consortium may wish to run a shared instance over a wide-area network without +sharing the state to unknown parties. + +As Tendermint handles P2P connectivity for Burrow, it extends a concept known as the 'peer filter'. +This means that on every connection request to a particular node, our app will receive a request to +check a whitelist (if enabled, otherwise allowed by default) - if the source IP address or node key is +unknown then the connection will be rejected. The easiest way to manage this whitelist is to hard code +the respective participants in the config: + +```toml +[Tendermint] + AuthorizedPeers = "DDEF3E93BBF241C737A81E6BA085D0C77C7B51C9@127.0.0.1:26656, + A858F15CD7048F7D6C1B310E016A0B8BA1D44861@127.0.0.1:26657" +``` + +This can become difficult to manage over time, and any change would require a restart of the node. A more +scalable solution is `IdentifyTx`, which allows select participants to be associated with a particular +'node identity' - network address, node key and moniker. Once enabled in the config, a node will only allow +connection requests from entries in its registry. + +```toml +[Tendermint] + IdentifyPeers = true +``` + +For more details, see the [ADR](ADRs/adr-2_identify-tx.md). \ No newline at end of file diff --git a/execution/contexts/identify_context.go b/execution/contexts/identify_context.go new file mode 100644 index 000000000..06a2c446b --- /dev/null +++ b/execution/contexts/identify_context.go @@ -0,0 +1,55 @@ +package contexts + +import ( + "fmt" + + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/execution/registry" + "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/permission" + "github.com/hyperledger/burrow/txs/payload" +) + +type IdentifyContext struct { + NodeWriter registry.ReaderWriter + StateReader acmstate.Reader + Logger *logging.Logger + tx *payload.IdentifyTx +} + +func (ctx *IdentifyContext) Execute(txe *exec.TxExecution, p payload.Payload) error { + var ok bool + ctx.tx, ok = p.(*payload.IdentifyTx) + if !ok { + return fmt.Errorf("payload must be IdentifyTx, but is: %v", txe.Envelope.Tx.Payload) + } + + accounts, _, err := getInputs(ctx.StateReader, ctx.tx.Inputs) + if err != nil { + return err + } + + publicKey := ctx.tx.Node.ValidatorPublicKey + account, err := ctx.StateReader.GetAccount(publicKey.GetAddress()) + if err != nil { + return err + } else if account == nil { + ctx.Logger.InfoMsg("cannot find account", + "public_key", publicKey) + return errors.ErrorCodeInvalidAddress + } + + if _, ok := accounts[account.GetAddress()]; !ok { + return fmt.Errorf("target account %s not in tx inputs", account.Address.String()) + } + + // a pre-bonded node must submit on a peers behalf + err = oneHasPermission(ctx.StateReader, permission.Identify, accounts, ctx.Logger) + if err != nil { + return errors.Wrap(err, "at least one input lacks permission for IdentifyTx") + } + + return ctx.NodeWriter.UpdateNode(account.GetAddress(), ctx.tx.Node) +} diff --git a/execution/contexts/name_context.go b/execution/contexts/name_context.go index 398c9e875..1aa5a9c9d 100644 --- a/execution/contexts/name_context.go +++ b/execution/contexts/name_context.go @@ -175,7 +175,7 @@ func (ctx *NameContext) Execute(txe *exec.TxExecution, p payload.Payload) error return err } - // TODO: maybe we want to take funds on error and allow txs in that don't do anythingi? + // TODO: maybe we want to take funds on error and allow txs in that don't do anything? txe.Input(ctx.tx.Input.Address, nil) txe.Name(entry) diff --git a/execution/contexts/shared.go b/execution/contexts/shared.go index 84959a3f8..252aaff5e 100644 --- a/execution/contexts/shared.go +++ b/execution/contexts/shared.go @@ -174,6 +174,18 @@ func allHavePermission(accountGetter acmstate.AccountGetter, perm permission.Per return nil } +func oneHasPermission(accountGetter acmstate.AccountGetter, perm permission.PermFlag, + accs map[crypto.Address]*acm.Account, logger *logging.Logger) error { + for _, acc := range accs { + if HasPermission(accountGetter, acc, perm, logger) { + return nil + } + } + return errors.PermissionDenied{ + Perm: perm, + } +} + func hasProposalPermission(accountGetter acmstate.AccountGetter, acc *acm.Account, logger *logging.Logger) bool { return HasPermission(accountGetter, acc, permission.Proposal, logger) diff --git a/execution/evm/vm_test.go b/execution/evm/vm_test.go index b4347bbb6..a40ea0167 100644 --- a/execution/evm/vm_test.go +++ b/execution/evm/vm_test.go @@ -1326,18 +1326,21 @@ func TestSubslice(t *testing.T) { func TestHasPermission(t *testing.T) { st := newAppState() + + base, err := permission.BasePermissionsFromStringList([]string{"createContract", "createAccount", "bond", "proposal", "setBase", "unsetBase", "setGlobal", "addRole", "removeRole"}) + require.NoError(t, err) acc := &acm.Account{ Address: newAddress("frog"), Permissions: permission.AccountPermissions{ - Base: BasePermissionsFromStrings(t, - "00100000001000111", - "11011100010111000"), + Base: base, }, } require.NoError(t, st.UpdateAccount(acc)) // Ensure we are falling through to global permissions on those bits not set cache := NewState(st, blockHashGetter) - assert.True(t, HasPermission(cache, acc.Address, PermFlagFromString(t, "100000001000110"))) + flag, err := permission.PermFlagFromStringList([]string{"send", "call", "name", "hasRole"}) + require.NoError(t, err) + assert.True(t, HasPermission(cache, acc.Address, flag)) require.NoError(t, cache.Error()) } diff --git a/execution/execution.go b/execution/execution.go index 174e61e7b..d43c3d93c 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -20,13 +20,9 @@ import ( "runtime/debug" "sync" - "github.com/hyperledger/burrow/acm/validator" - "github.com/hyperledger/burrow/genesis" - - "github.com/hyperledger/burrow/execution/state" - "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/acm/validator" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/event" @@ -36,6 +32,9 @@ import ( "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/names" "github.com/hyperledger/burrow/execution/proposal" + "github.com/hyperledger/burrow/execution/registry" + "github.com/hyperledger/burrow/execution/state" + "github.com/hyperledger/burrow/genesis" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/structure" "github.com/hyperledger/burrow/permission" @@ -57,6 +56,7 @@ func (f ExecutorFunc) Execute(txEnv *txs.Envelope) (*exec.TxExecution, error) { type ExecutorState interface { Update(updater func(ws state.Updatable) error) (hash []byte, version int64, err error) names.Reader + registry.Reader proposal.Reader acmstate.IterableReader validator.IterableReader @@ -87,6 +87,7 @@ type executor struct { state ExecutorState stateCache *acmstate.Cache nameRegCache *names.Cache + nodeRegCache *registry.Cache proposalRegCache *proposal.Cache validatorCache *validator.Cache emitter *event.Emitter @@ -134,6 +135,7 @@ func newExecutor(name string, runCall bool, params Params, backend ExecutorState state: backend, stateCache: acmstate.NewCache(backend, acmstate.Named(name)), nameRegCache: names.NewCache(backend), + nodeRegCache: registry.NewCache(backend), proposalRegCache: proposal.NewCache(backend), validatorCache: validator.NewCache(backend), emitter: emitter, @@ -181,7 +183,11 @@ func newExecutor(name string, runCall bool, params Params, backend ExecutorState payload.TypeUnbond: &contexts.UnbondContext{ ValidatorSet: exe.validatorCache, StateWriter: exe.stateCache, - Logger: exe.logger, + }, + payload.TypeIdentify: &contexts.IdentifyContext{ + NodeWriter: exe.nodeRegCache, + StateReader: exe.stateCache, + Logger: exe.logger, }, } @@ -358,6 +364,10 @@ func (exe *executor) Commit(header *abciTypes.Header) (stateHash []byte, err err if err != nil { return err } + err = exe.nodeRegCache.Flush(ws, exe.state) + if err != nil { + return err + } err = exe.proposalRegCache.Flush(ws, exe.state) if err != nil { return err diff --git a/execution/execution_test.go b/execution/execution_test.go index a985fcbb6..ede6e9192 100644 --- a/execution/execution_test.go +++ b/execution/execution_test.go @@ -22,37 +22,32 @@ import ( "testing" "time" - "github.com/tendermint/tendermint/abci/types" - - "github.com/hyperledger/burrow/execution/state" - - "github.com/hyperledger/burrow/event/query" - - "github.com/hyperledger/burrow/execution/evm/abi" - "golang.org/x/crypto/ripemd160" - - "github.com/stretchr/testify/assert" - "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/bcm" . "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/event" + "github.com/hyperledger/burrow/event/query" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm" + "github.com/hyperledger/burrow/execution/evm/abi" . "github.com/hyperledger/burrow/execution/evm/asm" "github.com/hyperledger/burrow/execution/evm/asm/bc" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/names" + "github.com/hyperledger/burrow/execution/state" "github.com/hyperledger/burrow/genesis" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/permission" "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" hex "github.com/tmthrgd/go-hex" + "golang.org/x/crypto/ripemd160" ) var ( diff --git a/execution/names/cache.go b/execution/names/cache.go index 6513f702e..6904c22a2 100644 --- a/execution/names/cache.go +++ b/execution/names/cache.go @@ -37,8 +37,7 @@ type nameInfo struct { var _ Writer = &Cache{} // Returns a Cache that wraps an underlying NameRegCacheGetter to use on a cache miss, can write to an -// output Writer via Sync. -// Not goroutine safe, use syncStateCache if you need concurrent access +// output Writer via Sync. Not goroutine safe, use syncStateCache if you need concurrent access func NewCache(backend Reader) *Cache { return &Cache{ backend: backend, @@ -90,7 +89,7 @@ func (cache *Cache) RemoveName(name string) error { } // Writes whatever is in the cache to the output Writer state. Does not flush the cache, to do that call Reset() -// after Sync or use Flusth if your wish to use the output state as your next backend +// after Sync or use Flush if your wish to use the output state as your next backend func (cache *Cache) Sync(state Writer) error { cache.Lock() defer cache.Unlock() @@ -102,7 +101,7 @@ func (cache *Cache) Sync(state Writer) error { } sort.Stable(names) - // Update or delete names. + // Update or delete names for _, name := range names { nameInfo := cache.names[name] nameInfo.RLock() @@ -124,7 +123,7 @@ func (cache *Cache) Sync(state Writer) error { return nil } -// Resets the cache to empty initialising the backing map to the same size as the previous iteration. +// Resets the cache to empty initialising the backing map to the same size as the previous iteration func (cache *Cache) Reset(backend Reader) { cache.Lock() defer cache.Unlock() diff --git a/execution/proposal/cache.go b/execution/proposal/cache.go index 1e59aac16..6a6709453 100644 --- a/execution/proposal/cache.go +++ b/execution/proposal/cache.go @@ -24,7 +24,7 @@ import ( "github.com/hyperledger/burrow/txs/payload" ) -// The Cache helps prevent unnecessary IAVLTree updates and garbage generation. +// Cache helps prevent unnecessary IAVLTree updates and garbage generation. type Cache struct { sync.RWMutex backend Reader @@ -63,8 +63,7 @@ func (p ProposalHashArray) Less(i, j int) bool { var _ Writer = &Cache{} -// Returns a Cache that wraps an underlying NameRegCacheGetter to use on a cache miss, can write to an -// output Writer via Sync. +// Returns a Cache, can write to an output Writer via Sync. // Not goroutine safe, use syncStateCache if you need concurrent access func NewCache(backend Reader) *Cache { return &Cache{ @@ -117,19 +116,17 @@ func (cache *Cache) RemoveProposal(proposalHash []byte) error { } // Writes whatever is in the cache to the output Writer state. Does not flush the cache, to do that call Reset() -// after Sync or use Flusth if your wish to use the output state as your next backend +// after Sync or use Flush if your wish to use the output state as your next backend func (cache *Cache) Sync(state Writer) error { cache.Lock() defer cache.Unlock() - // Determine order for names - // note names may be of any length less than some limit var hashes ProposalHashArray for hash := range cache.proposals { hashes = append(hashes, hash) } sort.Stable(hashes) - // Update or delete names. + // Update or delete proposals for _, hash := range hashes { proposalInfo := cache.proposals[hash] proposalInfo.RLock() @@ -151,7 +148,7 @@ func (cache *Cache) Sync(state Writer) error { return nil } -// Resets the cache to empty initialising the backing map to the same size as the previous iteration. +// Resets the cache to empty initialising the backing map to the same size as the previous iteration func (cache *Cache) Reset(backend Reader) { cache.Lock() defer cache.Unlock() diff --git a/execution/proposal/proposal.go b/execution/proposal/proposal.go index b857d55e4..c7d22dae0 100644 --- a/execution/proposal/proposal.go +++ b/execution/proposal/proposal.go @@ -9,9 +9,9 @@ type Reader interface { } type Writer interface { - // Updates the name entry creating it if it does not exist + // Updates the proposal, creating it if it does not exist UpdateProposal(proposalHash []byte, proposal *payload.Ballot) error - // Remove the name entry + // Remove the proposal by hash RemoveProposal(proposalHash []byte) error } diff --git a/execution/registry/cache.go b/execution/registry/cache.go new file mode 100644 index 000000000..49c6d8c05 --- /dev/null +++ b/execution/registry/cache.go @@ -0,0 +1,177 @@ +// Copyright 2017 Monax Industries Limited +// +// 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 registry + +import ( + "fmt" + "sync" + + "github.com/hyperledger/burrow/crypto" +) + +// Cache helps prevent unnecessary IAVLTree updates and garbage generation. +type Cache struct { + sync.RWMutex + backend Reader + registry map[crypto.Address]*nodeInfo +} + +type nodeInfo struct { + sync.RWMutex + node *NodeIdentity + removed bool + updated bool +} + +var _ Writer = &Cache{} + +// NewCache returns a Cache which can write to an output Writer via Sync. +// Not goroutine safe, use syncStateCache if you need concurrent access +func NewCache(backend Reader) *Cache { + return &Cache{ + backend: backend, + registry: make(map[crypto.Address]*nodeInfo), + } +} + +func (cache *Cache) GetNode(addr crypto.Address) (*NodeIdentity, error) { + info, err := cache.get(addr) + if err != nil { + return nil, err + } + info.RLock() + defer info.RUnlock() + if info.removed { + return nil, nil + } + return info.node, nil +} + +func (cache *Cache) GetNodes() NodeList { + nodes := make(NodeList) + for addr := range cache.registry { + n, err := cache.GetNode(addr) + if err != nil { + continue + } + nodes[addr] = n + } + return nodes +} + +func (cache *Cache) UpdateNode(addr crypto.Address, node *NodeIdentity) error { + info, err := cache.get(addr) + if err != nil { + return err + } + info.Lock() + defer info.Unlock() + if info.removed { + return fmt.Errorf("UpdateNode on a removed node: %x", addr) + } + + info.node = node + info.updated = true + return nil +} + +func (cache *Cache) RemoveNode(addr crypto.Address) error { + info, err := cache.get(addr) + if err != nil { + return err + } + info.Lock() + defer info.Unlock() + if info.removed { + return fmt.Errorf("RemoveNode on removed node: %x", addr) + } + info.removed = true + return nil +} + +// Sync writes whatever is in the cache to the output state. Does not flush the cache, to do that call Reset() +// after Sync or use Flush if your wish to use the output state as your next backend +func (cache *Cache) Sync(state Writer) error { + cache.Lock() + defer cache.Unlock() + var addresses []crypto.Address + for addr := range cache.registry { + addresses = append(addresses, addr) + } + + for _, addr := range addresses { + info := cache.registry[addr] + info.RLock() + if info.removed { + err := state.RemoveNode(addr) + if err != nil { + info.RUnlock() + return err + } + } else if info.updated { + err := state.UpdateNode(addr, info.node) + if err != nil { + info.RUnlock() + return err + } + } + info.RUnlock() + } + return nil +} + +// Reset the cache to empty initialising the backing map to the same size as the previous iteration +func (cache *Cache) Reset(backend Reader) { + cache.Lock() + defer cache.Unlock() + cache.backend = backend + cache.registry = make(map[crypto.Address]*nodeInfo) +} + +// Syncs the Cache and Resets it to use Writer as the backend Reader +func (cache *Cache) Flush(output Writer, backend Reader) error { + err := cache.Sync(output) + if err != nil { + return err + } + cache.Reset(backend) + return nil +} + +func (cache *Cache) Backend() Reader { + return cache.backend +} + +func (cache *Cache) get(addr crypto.Address) (*nodeInfo, error) { + cache.RLock() + info := cache.registry[addr] + cache.RUnlock() + if info == nil { + cache.Lock() + defer cache.Unlock() + info = cache.registry[addr] + if info == nil { + node, err := cache.backend.GetNode(addr) + if err != nil { + return nil, err + } + info = &nodeInfo{ + node: node, + } + cache.registry[addr] = info + } + } + return info, nil +} diff --git a/execution/registry/registry.go b/execution/registry/registry.go new file mode 100644 index 000000000..85942b21b --- /dev/null +++ b/execution/registry/registry.go @@ -0,0 +1,81 @@ +// Copyright 2017 Monax Industries Limited +// +// 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 registry + +import ( + "fmt" + + "github.com/hyperledger/burrow/crypto" +) + +// NewSignedNodeIdentity takes a p2p info and returns a node entry +func NewNodeIdentity(nodeKey, moniker, netAddress string, validator crypto.PrivateKey) *NodeIdentity { + return &NodeIdentity{ + Moniker: moniker, + NetworkAddress: netAddress, + TendermintNodeID: nodeKey, + ValidatorPublicKey: validator.GetPublicKey(), + } +} + +func AuthorizedPeersProvider(state IterableReader) func() ([]string, []string) { + return func() ([]string, []string) { + var peerIDs, peerAddrs []string + + for _, node := range state.GetNodes() { + peerIDs = append(peerIDs, node.TendermintNodeID) + peerAddrs = append(peerAddrs, node.NetworkAddress) + } + + return peerIDs, peerAddrs + } +} + +func (rn *NodeIdentity) String() string { + return fmt.Sprintf("RegisterNode{%v -> %v @ %v}", rn.ValidatorPublicKey, rn.TendermintNodeID, rn.NetworkAddress) +} + +type NodeList map[crypto.Address]*NodeIdentity + +type Reader interface { + GetNode(crypto.Address) (*NodeIdentity, error) + GetNodes() NodeList +} + +type Writer interface { + // Updates the node, creating it if it does not exist + UpdateNode(crypto.Address, *NodeIdentity) error + // Remove the proposal by hash + RemoveNode(crypto.Address) error +} + +type ReaderWriter interface { + Reader + Writer +} + +type Iterable interface { + IterateNodes(consumer func(crypto.Address, *NodeIdentity) error) (err error) +} + +type IterableReader interface { + Iterable + Reader +} + +type IterableReaderWriter interface { + Iterable + ReaderWriter +} diff --git a/execution/registry/registry.pb.go b/execution/registry/registry.pb.go new file mode 100644 index 000000000..3e85af564 --- /dev/null +++ b/execution/registry/registry.pb.go @@ -0,0 +1,511 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: registry.proto + +package registry + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" + github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" + io "io" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = golang_proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type NodeIdentity struct { + // Peer moniker name + Moniker string `protobuf:"bytes,1,opt,name=Moniker,proto3" json:"Moniker,omitempty"` + // Peer network address + NetworkAddress string `protobuf:"bytes,2,opt,name=NetworkAddress,proto3" json:"NetworkAddress,omitempty"` + // Node key id (crypto address) + TendermintNodeID string `protobuf:"bytes,3,opt,name=TendermintNodeID,proto3" json:"TendermintNodeID,omitempty"` + // Burrow validator address + ValidatorPublicKey github_com_hyperledger_burrow_crypto.PublicKey `protobuf:"bytes,4,opt,name=ValidatorPublicKey,proto3,customtype=github.com/hyperledger/burrow/crypto.PublicKey" json:"ValidatorPublicKey"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NodeIdentity) Reset() { *m = NodeIdentity{} } +func (*NodeIdentity) ProtoMessage() {} +func (*NodeIdentity) Descriptor() ([]byte, []int) { + return fileDescriptor_41af05d40a615591, []int{0} +} +func (m *NodeIdentity) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeIdentity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NodeIdentity) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeIdentity.Merge(m, src) +} +func (m *NodeIdentity) XXX_Size() int { + return m.Size() +} +func (m *NodeIdentity) XXX_DiscardUnknown() { + xxx_messageInfo_NodeIdentity.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeIdentity proto.InternalMessageInfo + +func (m *NodeIdentity) GetMoniker() string { + if m != nil { + return m.Moniker + } + return "" +} + +func (m *NodeIdentity) GetNetworkAddress() string { + if m != nil { + return m.NetworkAddress + } + return "" +} + +func (m *NodeIdentity) GetTendermintNodeID() string { + if m != nil { + return m.TendermintNodeID + } + return "" +} + +func (*NodeIdentity) XXX_MessageName() string { + return "registry.NodeIdentity" +} +func init() { + proto.RegisterType((*NodeIdentity)(nil), "registry.NodeIdentity") + golang_proto.RegisterType((*NodeIdentity)(nil), "registry.NodeIdentity") +} + +func init() { proto.RegisterFile("registry.proto", fileDescriptor_41af05d40a615591) } +func init() { golang_proto.RegisterFile("registry.proto", fileDescriptor_41af05d40a615591) } + +var fileDescriptor_41af05d40a615591 = []byte{ + // 286 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0x4a, 0x4d, 0xcf, + 0x2c, 0x2e, 0x29, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x7a, 0xc5, 0xc8, + 0xc5, 0xe3, 0x97, 0x9f, 0x92, 0xea, 0x99, 0x92, 0x9a, 0x57, 0x92, 0x59, 0x52, 0x29, 0x24, 0xc1, + 0xc5, 0xee, 0x9b, 0x9f, 0x97, 0x99, 0x9d, 0x5a, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, + 0xe3, 0x0a, 0xa9, 0x71, 0xf1, 0xf9, 0xa5, 0x96, 0x94, 0xe7, 0x17, 0x65, 0x3b, 0xa6, 0xa4, 0x14, + 0xa5, 0x16, 0x17, 0x4b, 0x30, 0x81, 0x15, 0xa0, 0x89, 0x0a, 0x69, 0x71, 0x09, 0x84, 0xa4, 0xe6, + 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, 0x80, 0xcd, 0x76, 0x91, 0x60, 0x06, 0xab, 0xc4, 0x10, + 0x17, 0x4a, 0xe3, 0x12, 0x0a, 0x4b, 0xcc, 0xc9, 0x4c, 0x49, 0x2c, 0xc9, 0x2f, 0x0a, 0x28, 0x4d, + 0xca, 0xc9, 0x4c, 0xf6, 0x4e, 0xad, 0x94, 0x60, 0x51, 0x60, 0xd4, 0xe0, 0x71, 0x32, 0x3b, 0x71, + 0x4f, 0x9e, 0xe1, 0xd6, 0x3d, 0x79, 0x3d, 0x24, 0x1f, 0x65, 0x54, 0x16, 0xa4, 0x16, 0xe5, 0xa4, + 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x27, 0x95, 0x16, 0x15, 0xe5, 0x97, 0xeb, 0x27, 0x17, 0x55, 0x16, + 0x94, 0xe4, 0xeb, 0xc1, 0x75, 0x07, 0x61, 0x31, 0xd1, 0x8a, 0x65, 0xc6, 0x02, 0x79, 0x06, 0x27, + 0xaf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0xbc, 0xf1, 0x48, 0x8e, 0xf1, 0xc1, 0x23, + 0x39, 0xc6, 0x03, 0x8f, 0xe5, 0x18, 0x4f, 0x3c, 0x96, 0x63, 0x8c, 0x32, 0xc0, 0x6f, 0x47, 0x6a, + 0x45, 0x6a, 0x72, 0x69, 0x49, 0x66, 0x7e, 0x9e, 0x3e, 0x2c, 0x9c, 0x93, 0xd8, 0xc0, 0xe1, 0x67, + 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x7f, 0x46, 0x7f, 0x8a, 0x01, 0x00, 0x00, +} + +func (m *NodeIdentity) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NodeIdentity) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Moniker) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintRegistry(dAtA, i, uint64(len(m.Moniker))) + i += copy(dAtA[i:], m.Moniker) + } + if len(m.NetworkAddress) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintRegistry(dAtA, i, uint64(len(m.NetworkAddress))) + i += copy(dAtA[i:], m.NetworkAddress) + } + if len(m.TendermintNodeID) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintRegistry(dAtA, i, uint64(len(m.TendermintNodeID))) + i += copy(dAtA[i:], m.TendermintNodeID) + } + dAtA[i] = 0x22 + i++ + i = encodeVarintRegistry(dAtA, i, uint64(m.ValidatorPublicKey.Size())) + n1, err := m.ValidatorPublicKey.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintRegistry(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *NodeIdentity) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Moniker) + if l > 0 { + n += 1 + l + sovRegistry(uint64(l)) + } + l = len(m.NetworkAddress) + if l > 0 { + n += 1 + l + sovRegistry(uint64(l)) + } + l = len(m.TendermintNodeID) + if l > 0 { + n += 1 + l + sovRegistry(uint64(l)) + } + l = m.ValidatorPublicKey.Size() + n += 1 + l + sovRegistry(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovRegistry(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozRegistry(x uint64) (n int) { + return sovRegistry(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *NodeIdentity) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeIdentity: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeIdentity: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRegistry + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRegistry + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Moniker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRegistry + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRegistry + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TendermintNodeID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRegistry + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRegistry + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TendermintNodeID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorPublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRegistry + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRegistry + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ValidatorPublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRegistry(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRegistry + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRegistry + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRegistry(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRegistry + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRegistry + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRegistry + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthRegistry + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthRegistry + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRegistry + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipRegistry(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthRegistry + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthRegistry = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRegistry = fmt.Errorf("proto: integer overflow") +) diff --git a/execution/registry/registry_test.go b/execution/registry/registry_test.go new file mode 100644 index 000000000..beb8a3fd1 --- /dev/null +++ b/execution/registry/registry_test.go @@ -0,0 +1,29 @@ +package registry + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/crypto" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestEncodeProtobuf(t *testing.T) { + entry := &NodeIdentity{ + Moniker: "test", + TendermintNodeID: "123456789", + ValidatorPublicKey: crypto.PublicKey{ + CurveType: crypto.CurveTypeEd25519, + PublicKey: binary.HexBytes{1, 2, 3, 4, 5}, + }, + NetworkAddress: "localhost", + } + encoded, err := proto.Marshal(entry) + require.NoError(t, err) + entryOut := new(NodeIdentity) + err = proto.Unmarshal(encoded, entryOut) + require.NoError(t, err) + assert.Equal(t, entry, entryOut) +} diff --git a/execution/state/registry.go b/execution/state/registry.go new file mode 100644 index 000000000..ca03ea296 --- /dev/null +++ b/execution/state/registry.go @@ -0,0 +1,78 @@ +package state + +import ( + "fmt" + + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/execution/registry" +) + +var _ registry.IterableReader = &State{} + +func (s *ReadState) GetNode(addr crypto.Address) (*registry.NodeIdentity, error) { + tree, err := s.Forest.Reader(keys.Registry.Prefix()) + if err != nil { + return nil, err + } + nodeBytes := tree.Get(keys.Registry.KeyNoPrefix(addr)) + if nodeBytes == nil { + return nil, nil + } + + regNode := new(registry.NodeIdentity) + return regNode, encoding.Decode(nodeBytes, regNode) +} + +func (ws *writeState) UpdateNode(addr crypto.Address, node *registry.NodeIdentity) error { + if node == nil { + return fmt.Errorf("RegisterNode passed nil node in State") + } + + bs, err := encoding.Encode(node) + if err != nil { + return fmt.Errorf("RegisterNode could not encode node: %v", err) + } + tree, err := ws.forest.Writer(keys.Registry.Prefix()) + if err != nil { + return err + } + + ws.nodeList[addr] = node + tree.Set(keys.Registry.KeyNoPrefix(addr), bs) + return nil +} + +func (ws *writeState) RemoveNode(addr crypto.Address) error { + tree, err := ws.forest.Writer(keys.Registry.Prefix()) + if err != nil { + return err + } + + delete(ws.nodeList, addr) + tree.Delete(keys.Registry.KeyNoPrefix(addr)) + return nil +} + +func (s *ReadState) IterateNodes(consumer func(crypto.Address, *registry.NodeIdentity) error) error { + tree, err := s.Forest.Reader(keys.Registry.Prefix()) + if err != nil { + return err + } + return tree.Iterate(nil, nil, true, func(key []byte, value []byte) error { + rn := new(registry.NodeIdentity) + err := encoding.Decode(value, rn) + if err != nil { + return fmt.Errorf("State.IterateNodes() could not iterate over nodes: %v", err) + } + address, err := crypto.AddressFromBytes(key) + if err != nil { + return fmt.Errorf("could not decode key: %v", err) + } + return consumer(address, rn) + }) +} + +func (s *State) GetNodes() registry.NodeList { + return s.writeState.nodeList +} diff --git a/execution/state/state.go b/execution/state/state.go index 5c0076b1a..06d64a8a4 100644 --- a/execution/state/state.go +++ b/execution/state/state.go @@ -19,6 +19,8 @@ import ( "fmt" "sync" + "github.com/hyperledger/burrow/execution/registry" + "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/acm/validator" @@ -57,6 +59,7 @@ type KeyFormatStore struct { Proposal *storage.MustKeyFormat Validator *storage.MustKeyFormat Event *storage.MustKeyFormat + Registry *storage.MustKeyFormat TxHash *storage.MustKeyFormat Abi *storage.MustKeyFormat } @@ -75,6 +78,8 @@ var keys = KeyFormatStore{ Validator: storage.NewMustKeyFormat("v", crypto.AddressLength), // Height -> StreamEvent Event: storage.NewMustKeyFormat("e", uint64Length), + // Validator -> NodeIdentity + Registry: storage.NewMustKeyFormat("r", crypto.AddressLength), // Stored on the plain // TxHash -> TxHeight, TxIndex @@ -97,6 +102,7 @@ type Updatable interface { acmstate.Writer names.Writer proposal.Writer + registry.Writer validator.Writer AddBlock(blockExecution *exec.BlockExecution) error } @@ -106,6 +112,7 @@ type writeState struct { forest *storage.MutableForest plain *storage.PrefixDB accountStats acmstate.AccountStats + nodeList registry.NodeList ring *validator.Ring } @@ -124,7 +131,7 @@ type State struct { logger *logging.Logger } -// Create a new State object +// NewState creates a new State object func NewState(db dbm.DB) *State { forest, err := storage.NewMutableForest(storage.NewPrefixDB(db, forestPrefix), defaultCacheCapacity) if err != nil { @@ -141,9 +148,10 @@ func NewState(db dbm.DB) *State { History: ring, }, writeState: writeState{ - forest: forest, - plain: plain, - ring: ring, + forest: forest, + plain: plain, + ring: ring, + nodeList: make(registry.NodeList), }, logger: logging.NewNoopLogger(), } @@ -200,18 +208,18 @@ func LoadState(db dbm.DB, version int64) (*State, error) { if err != nil { return nil, fmt.Errorf("could not load MutableForest at version %d: %v", version, err) } + // Populate stats. If this starts taking too long, store the value rather than the full scan at startup - err = s.IterateAccounts(func(acc *acm.Account) error { - if len(acc.EVMCode) > 0 || len(acc.WASMCode) > 0 { - s.writeState.accountStats.AccountsWithCode++ - } else { - s.writeState.accountStats.AccountsWithoutCode++ - } - return nil - }) + err = s.loadAccountStats() if err != nil { return nil, err } + + err = s.loadNodeList() + if err != nil { + return nil, err + } + // load the validator ring ring, err := LoadValidatorRing(version, DefaultValidatorsWindowSize, s.writeState.forest.GetImmutable) if err != nil { @@ -223,6 +231,25 @@ func LoadState(db dbm.DB, version int64) (*State, error) { return s, nil } +func (s *State) loadAccountStats() error { + return s.IterateAccounts(func(acc *acm.Account) error { + if len(acc.EVMCode) > 0 || len(acc.WASMCode) > 0 { + s.writeState.accountStats.AccountsWithCode++ + } else { + s.writeState.accountStats.AccountsWithoutCode++ + } + return nil + }) +} + +func (s *State) loadNodeList() error { + s.writeState.nodeList = make(registry.NodeList) + return s.IterateNodes(func(addr crypto.Address, node *registry.NodeIdentity) error { + s.writeState.nodeList[addr] = node + return nil + }) +} + func (s *State) Version() int64 { return s.writeState.forest.Version() } diff --git a/integration/core/kernel_test.go b/integration/core/kernel_test.go index f29883dcc..75a999bd0 100644 --- a/integration/core/kernel_test.go +++ b/integration/core/kernel_test.go @@ -51,7 +51,7 @@ func testKernel(t *testing.T, opts ...func(*config.BurrowConfig)) { defer cleanup() require.NotNil(t, privateAccounts) require.NotNil(t, privateValidators) - assert.NoError(t, bootWaitBlocksShutdown(t, privateValidators[0], privateAccounts, conf, nil, nil)) + assert.NoError(t, bootWaitBlocksShutdown(t, privateValidators[0], privateAccounts, conf, nil)) }) t.Run("BootShutdownResume", func(t *testing.T) { @@ -74,14 +74,14 @@ func testKernel(t *testing.T, opts ...func(*config.BurrowConfig)) { return true } // First run - err := bootWaitBlocksShutdown(t, privateValidators[0], privateAccounts, testConfig, nil, blockChecker) + err := bootWaitBlocksShutdown(t, privateValidators[0], privateAccounts, testConfig, blockChecker) require.NoError(t, err) // Resume and check we pick up where we left off - err = bootWaitBlocksShutdown(t, privateValidators[0], privateAccounts, testConfig, nil, blockChecker) + err = bootWaitBlocksShutdown(t, privateValidators[0], privateAccounts, testConfig, blockChecker) require.NoError(t, err) // Resuming with mismatched genesis should fail genesisDoc.Salt = []byte("foo") - err = bootWaitBlocksShutdown(t, privateValidators[0], privateAccounts, testConfig, nil, blockChecker) + err = bootWaitBlocksShutdown(t, privateValidators[0], privateAccounts, testConfig, blockChecker) assert.Error(t, err) }) @@ -91,14 +91,14 @@ func testKernel(t *testing.T, opts ...func(*config.BurrowConfig)) { name := "capture" buffer := 100 path := "foo.json" - logging := logconfig.New(). + conf.Logging = logconfig.New(). Root(func(sink *logconfig.SinkConfig) *logconfig.SinkConfig { return sink.SetTransform(logconfig.CaptureTransform(name, buffer, false)). SetOutput(logconfig.FileOutput(path).SetFormat(loggers.JSONFormat)) }) i := 0 gap := 1 - assert.NoError(t, bootWaitBlocksShutdown(t, privateValidators[0], privateAccounts, conf, logging, + assert.NoError(t, bootWaitBlocksShutdown(t, privateValidators[0], privateAccounts, conf, func(block *exec.BlockExecution) (cont bool) { if i == gap { // Send sync signal @@ -129,10 +129,9 @@ func testKernel(t *testing.T, opts ...func(*config.BurrowConfig)) { } func bootWaitBlocksShutdown(t testing.TB, validator *acm.PrivateAccount, privateAccounts []*acm.PrivateAccount, - testConfig *config.BurrowConfig, logging *logconfig.LoggingConfig, - blockChecker func(block *exec.BlockExecution) (cont bool)) error { + testConfig *config.BurrowConfig, blockChecker func(block *exec.BlockExecution) (cont bool)) error { - kern, err := integration.TestKernel(validator, rpctest.PrivateAccounts, testConfig, logging) + kern, err := integration.TestKernel(validator, rpctest.PrivateAccounts, testConfig) if err != nil { return err } diff --git a/integration/governance/bonding_test.go b/integration/governance/bonding_test.go index bf16db284..01aecfdaa 100644 --- a/integration/governance/bonding_test.go +++ b/integration/governance/bonding_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/hyperledger/burrow/bcm" + "github.com/hyperledger/burrow/config" "github.com/hyperledger/burrow/core" "github.com/hyperledger/burrow/integration" "github.com/hyperledger/burrow/integration/rpctest" @@ -17,6 +18,7 @@ import ( func TestBonding(t *testing.T) { genesisAccounts := integration.MakePrivateAccounts("accounts", 6) + genesisConfigs := make([]*config.BurrowConfig, len(genesisAccounts)) genesisKernels := make([]*core.Kernel, len(genesisAccounts)) genesisDoc := integration.TestGenesisDoc(genesisAccounts, 0, 1, 2, 3) genesisDoc.GlobalPermissions = permission.NewAccountPermissions(permission.Input) @@ -25,7 +27,10 @@ func TestBonding(t *testing.T) { // we need at least one validator to start for i, acc := range genesisAccounts { - genesisKernels[i], err = createKernel(genesisDoc, acc, genesisAccounts...) + genesisConfigs[i], err = newConfig(genesisDoc, acc, genesisAccounts...) + require.NoError(t, err) + + genesisKernels[i], err = newKernelAndBoot(genesisConfigs[i], acc, genesisAccounts...) require.NoError(t, err) defer integration.Shutdown(genesisKernels[i]) } diff --git a/integration/governance/governance_test.go b/integration/governance/governance_test.go index 8a19a415f..0e96e4cb8 100644 --- a/integration/governance/governance_test.go +++ b/integration/governance/governance_test.go @@ -11,6 +11,7 @@ import ( "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/balance" "github.com/hyperledger/burrow/acm/validator" + "github.com/hyperledger/burrow/config" "github.com/hyperledger/burrow/core" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/errors" @@ -28,13 +29,17 @@ import ( func TestGovernance(t *testing.T) { genesisAccounts := integration.MakePrivateAccounts("mysecret", 10) // make keys + genesisConfigs := make([]*config.BurrowConfig, len(genesisAccounts)) genesisKernels := make([]*core.Kernel, len(genesisAccounts)) genesisDoc := integration.TestGenesisDoc(genesisAccounts, 0) genesisDoc.Accounts[4].Permissions = permission.NewAccountPermissions(permission.Send | permission.Call) var err error for i, acc := range genesisAccounts { - genesisKernels[i], err = createKernel(genesisDoc, acc, genesisAccounts...) + genesisConfigs[i], err = newConfig(genesisDoc, acc, genesisAccounts...) + require.NoError(t, err) + + genesisKernels[i], err = newKernelAndBoot(genesisConfigs[i], acc, genesisAccounts...) require.NoError(t, err) defer integration.Shutdown(genesisKernels[i]) } diff --git a/integration/governance/helpers.go b/integration/governance/helpers.go index 1c52fe33e..627882c8a 100644 --- a/integration/governance/helpers.go +++ b/integration/governance/helpers.go @@ -11,6 +11,7 @@ import ( "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/validator" + "github.com/hyperledger/burrow/config" "github.com/hyperledger/burrow/core" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/exec" @@ -26,15 +27,16 @@ import ( "github.com/tendermint/tendermint/p2p" ) -func createKernel(genesisDoc *genesis.GenesisDoc, account *acm.PrivateAccount, - keysAccounts ...*acm.PrivateAccount) (kernel *core.Kernel, err error) { +func newConfig(genesisDoc *genesis.GenesisDoc, account *acm.PrivateAccount, + keysAccounts ...*acm.PrivateAccount) (conf *config.BurrowConfig, err error) { // FIXME: some combination of cleanup and shutdown seems to make tests fail on CI - //testConfig, cleanup := integration.NewTestConfig(genesisDoc) + // testConfig, cleanup := integration.NewTestConfig(genesisDoc) testConfig, _ := integration.NewTestConfig(genesisDoc) - //defer cleanup() + // defer cleanup() - logconf := logconfig.New().Root(func(sink *logconfig.SinkConfig) *logconfig.SinkConfig { + // comment to see all logging + testConfig.Logging = logconfig.New().Root(func(sink *logconfig.SinkConfig) *logconfig.SinkConfig { return sink.SetTransform(logconfig.FilterTransform(logconfig.IncludeWhenAllMatch, "total_validator")).SetOutput(logconfig.StdoutOutput()) }) @@ -52,12 +54,18 @@ func createKernel(genesisDoc *genesis.GenesisDoc, account *acm.PrivateAccount, testConfig.Tendermint.ListenHost = host testConfig.Tendermint.ListenPort = port - kernel, err = integration.TestKernel(account, keysAccounts, testConfig, logconf) + err = l.Close() if err != nil { return nil, err } - err = l.Close() + return testConfig, nil +} + +func newKernelAndBoot(conf *config.BurrowConfig, account *acm.PrivateAccount, + keysAccounts ...*acm.PrivateAccount) (kernel *core.Kernel, err error) { + + kernel, err = integration.TestKernel(account, keysAccounts, conf) if err != nil { return nil, err } @@ -115,32 +123,37 @@ func changePower(vs *validator.Set, i int, power uint64) { vs.ChangePower(account(i).GetPublicKey(), new(big.Int).SetUint64(power)) } -func connectKernels(k1, k2 *core.Kernel) { +func connectKernels(k1, k2 *core.Kernel) error { k1Address, err := k1.Node.NodeInfo().NetAddress() if err != nil { - panic(fmt.Errorf("could not get kernel address: %v", err)) + return fmt.Errorf("could not get kernel address: %v", err) } k2Address, err := k2.Node.NodeInfo().NetAddress() if err != nil { - panic(fmt.Errorf("could not get kernel address: %v", err)) + return fmt.Errorf("could not get kernel address: %v", err) } fmt.Printf("Connecting %v -> %v\n", k1Address, k2Address) err = k1.Node.Switch().DialPeerWithAddress(k2Address) if err != nil { switch e := err.(type) { case p2p.ErrRejected: - panic(fmt.Errorf("connection between test kernels was rejected: %v", e)) + return fmt.Errorf("connection between test kernels was rejected: %v", e) default: - panic(fmt.Errorf("could not connect test kernels: %v", err)) + return fmt.Errorf("could not connect test kernels: %v", err) } } + return nil } -func connectAllKernels(ks []*core.Kernel) { +func connectAllKernels(ks []*core.Kernel) error { source := ks[0] for _, dest := range ks[1:] { - connectKernels(source, dest) + err := connectKernels(source, dest) + if err != nil { + return err + } } + return nil } func getMaxFlow(t testing.TB, qcli rpcquery.QueryClient) uint64 { diff --git a/integration/governance/identify_test.go b/integration/governance/identify_test.go new file mode 100644 index 000000000..47a87c6de --- /dev/null +++ b/integration/governance/identify_test.go @@ -0,0 +1,113 @@ +// +build integration + +package governance + +import ( + "context" + "testing" + + "github.com/hyperledger/burrow/config" + "github.com/hyperledger/burrow/consensus/tendermint" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/rpc/rpcquery" + + "github.com/hyperledger/burrow/core" + "github.com/hyperledger/burrow/execution/registry" + "github.com/hyperledger/burrow/integration" + "github.com/hyperledger/burrow/integration/rpctest" + "github.com/hyperledger/burrow/txs/payload" + "github.com/stretchr/testify/require" +) + +func TestIdentify(t *testing.T) { + accounts := integration.MakePrivateAccounts("accounts", 2) + kernels := make([]*core.Kernel, len(accounts)) + configs := make([]*config.BurrowConfig, len(accounts)) + genesisDoc := integration.TestGenesisDoc(accounts, 0) + var err error + + for i, acc := range accounts { + configs[i], err = newConfig(genesisDoc, acc, accounts...) + require.NoError(t, err) + configs[i].Tendermint.IdentifyPeers = true + } + + // start first validator + kernels[0], err = newKernelAndBoot(configs[0], accounts[0], accounts...) + require.NoError(t, err) + defer integration.Shutdown(kernels[0]) + + // identify first validator (self) + node := nodeFromConf(t, + configs[0], + configs[0].Tendermint.ListenAddress(), + accounts[0].ConcretePrivateAccount().PrivateKey) + identifyTx := payload.NewIdentifyTx(accounts[0].GetAddress(), node) + tcli := rpctest.NewTransactClient(t, kernels[0].GRPCListenAddress().String()) + _, err = payloadSync(tcli, identifyTx) + require.NoError(t, err) + + // start second node + kernels[1], err = newKernelAndBoot(configs[1], accounts[1], accounts...) + require.NoError(t, err) + defer integration.Shutdown(kernels[1]) + + // should not connect before identified + err = connectKernels(kernels[1], kernels[0]) + require.Error(t, err) + + // identify second node (from first) + node = nodeFromConf(t, + configs[1], + configs[1].Tendermint.ListenHost, + accounts[1].ConcretePrivateAccount().PrivateKey) + identifyTx = payload.NewIdentifyTx(accounts[1].GetAddress(), node) + _, err = payloadSync(tcli, identifyTx) + require.NoError(t, err) + + // once identified, proceed + err = connectKernels(kernels[1], kernels[0]) + require.NoError(t, err) + + // query first validator for identities + qcli := rpctest.NewQueryClient(t, kernels[0].GRPCListenAddress().String()) + nr, err := qcli.GetNetworkRegistry(context.TODO(), &rpcquery.GetNetworkRegistryParam{}) + require.NoError(t, err) + netset := nr.GetSet() + require.Len(t, netset, 2) + addrs := make([]crypto.Address, len(netset)) + for _, node := range netset { + addrs = append(addrs, node.Address) + } + require.Contains(t, addrs, accounts[0].GetAddress()) + require.Contains(t, addrs, accounts[1].GetAddress()) + + // re-register node with different moniker + configs[1].Tendermint.Moniker = "foobar" + node = nodeFromConf(t, + configs[1], + configs[1].Tendermint.ListenHost, + accounts[1].ConcretePrivateAccount().PrivateKey) + identifyTx = payload.NewIdentifyTx(accounts[1].GetAddress(), node) + _, err = payloadSync(tcli, identifyTx) + require.NoError(t, err) + + // should update second node + nr, err = qcli.GetNetworkRegistry(context.TODO(), &rpcquery.GetNetworkRegistryParam{}) + require.NoError(t, err) + netset = nr.GetSet() + require.Len(t, netset, 2) + names := make([]string, len(netset)) + for _, node := range netset { + names = append(names, node.Node.Moniker) + } + require.Contains(t, names, configs[1].Tendermint.Moniker) +} + +func nodeFromConf(t *testing.T, conf *config.BurrowConfig, host string, val crypto.PrivateKey) *registry.NodeIdentity { + tmConf, err := conf.TendermintConfig() + require.NoError(t, err) + nodeKey, err := tendermint.EnsureNodeKey(tmConf.NodeKeyFile()) + require.NoError(t, err) + return registry.NewNodeIdentity(string(nodeKey.ID()), conf.Tendermint.Moniker, host, val) +} diff --git a/integration/integration.go b/integration/integration.go index 93c2b3217..938cbc3c5 100644 --- a/integration/integration.go +++ b/integration/integration.go @@ -25,8 +25,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/validator" "github.com/hyperledger/burrow/config" @@ -37,9 +35,9 @@ import ( "github.com/hyperledger/burrow/keys/mock" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/logconfig" - lConfig "github.com/hyperledger/burrow/logging/logconfig" "github.com/hyperledger/burrow/permission" "github.com/hyperledger/burrow/rpc" + "github.com/stretchr/testify/require" ) const ( @@ -63,14 +61,16 @@ func RunNode(t testing.TB, genesisDoc *genesis.GenesisDoc, privateAccounts []*ac options ...func(*config.BurrowConfig)) (kern *core.Kernel, shutdown func()) { var err error - var loggingConfig *logconfig.LoggingConfig - testConfig, cleanup := NewTestConfig(genesisDoc, options...) // Uncomment for log output from tests - //loggingConfig = logconfig.New().Root(func(sink *logconfig.SinkConfig) *logconfig.SinkConfig { - // return sink.SetOutput(logconfig.StderrOutput()) - //}) - kern, err = TestKernel(privateAccounts[0], privateAccounts, testConfig, loggingConfig) + // testConfig.Logging = logconfig.New().Root(func(sink *logconfig.SinkConfig) *logconfig.SinkConfig { + // return sink.SetOutput(logconfig.StderrOutput()) + // }) + testConfig.Logging = logconfig.New().Root(func(sink *logconfig.SinkConfig) *logconfig.SinkConfig { + return sink.SetTransform(logconfig.FilterTransform(logconfig.IncludeWhenAllMatch, + "total_validator")).SetOutput(logconfig.StdoutOutput()) + }) + kern, err = TestKernel(privateAccounts[0], privateAccounts, testConfig) require.NoError(t, err) err = kern.Boot() require.NoError(t, err) @@ -118,7 +118,8 @@ func NewTestConfig(genesisDoc *genesis.GenesisDoc, // We use this to wrap tests func TestKernel(validatorAccount *acm.PrivateAccount, keysAccounts []*acm.PrivateAccount, - testConfig *config.BurrowConfig, loggingConfig *lConfig.LoggingConfig) (*core.Kernel, error) { + testConfig *config.BurrowConfig) (*core.Kernel, error) { + fmt.Println("Creating integration test Kernel...") kern, err := core.NewKernel(testConfig.BurrowDir) @@ -127,8 +128,8 @@ func TestKernel(validatorAccount *acm.PrivateAccount, keysAccounts []*acm.Privat } kern.SetLogger(logging.NewNoopLogger()) - if loggingConfig != nil { - err := kern.LoadLoggerFromConfig(loggingConfig) + if testConfig.Logging != nil { + err := kern.LoadLoggerFromConfig(testConfig.Logging) if err != nil { return nil, err } diff --git a/keys/key_client.go b/keys/key_client.go index 2414cf4e7..5824c93f7 100644 --- a/keys/key_client.go +++ b/keys/key_client.go @@ -229,6 +229,6 @@ func (ms *Signer) GetPublicKey() crypto.PublicKey { return ms.publicKey } -func (ms *Signer) Sign(messsage []byte) (*crypto.Signature, error) { - return ms.keyClient.Sign(ms.address, messsage) +func (ms *Signer) Sign(message []byte) (*crypto.Signature, error) { + return ms.keyClient.Sign(ms.address, message) } diff --git a/permission/perm_flag.go b/permission/perm_flag.go index dedc52825..e0f2685d7 100644 --- a/permission/perm_flag.go +++ b/permission/perm_flag.go @@ -38,6 +38,8 @@ const ( Input // 256 // Permission to execute batch transactins Batch // 512 + // Allows account to associate new blockchain nodes + Identify // 1028 // Moderator permissions. // These permissions concern the alteration of the chain permissions listed above. Each permission relates to a @@ -51,7 +53,7 @@ const ( AddRole RemoveRole - NumPermissions uint = 17 // NOTE Adjust this too. We can support upto 64 + NumPermissions uint = 18 // NOTE Adjust this too. We can support upto 64 TopPermFlag PermFlag = 1 << (NumPermissions - 1) AllPermFlags PermFlag = TopPermFlag | (TopPermFlag - 1) @@ -64,6 +66,7 @@ const ( CreateContractString = "createContract" CreateAccountString = "createAccount" BondString = "bond" + IdentifyString = "identify" NameString = "name" ProposalString = "proposal" InputString = "input" @@ -108,6 +111,8 @@ func (pf PermFlag) String() string { return CreateAccountString case Bond: return BondString + case Identify: + return IdentifyString case Name: return NameString case Proposal: @@ -153,6 +158,8 @@ func PermStringToFlag(perm string) (PermFlag, error) { return CreateAccount, nil case BondString: return Bond, nil + case IdentifyString: + return Identify, nil case NameString: return Name, nil case ProposalString: diff --git a/permission/perm_flag_test.go b/permission/perm_flag_test.go index 8ad4d848e..75fe20504 100644 --- a/permission/perm_flag_test.go +++ b/permission/perm_flag_test.go @@ -7,5 +7,5 @@ import ( ) func TestAllPermissions(t *testing.T) { - assert.Equal(t, AllPermFlags, DefaultPermFlags|AddRole|RemoveRole|SetBase|UnsetBase|Root|SetGlobal|Proposal) + assert.Equal(t, AllPermFlags, DefaultPermFlags|AddRole|RemoveRole|SetBase|UnsetBase|Root|SetGlobal|Proposal|Identify) } diff --git a/permission/util_test.go b/permission/util_test.go index b0057b3ec..b2cd11497 100644 --- a/permission/util_test.go +++ b/permission/util_test.go @@ -29,7 +29,7 @@ func TestBasePermissionsToStringList(t *testing.T) { assert.Equal(t, []string{"root", "call", "setBase", "hasRole"}, permStrings) permStrings = BasePermissionsToStringList(allSetBasePermission(AllPermFlags)) - assert.Equal(t, []string{"root", "send", "call", "createContract", "createAccount", "bond", "name", "proposal", "input", "batch", "hasBase", + assert.Equal(t, []string{"root", "send", "call", "createContract", "createAccount", "bond", "name", "proposal", "input", "batch", "identify", "hasBase", "setBase", "unsetBase", "setGlobal", "hasRole", "addRole", "removeRole"}, permStrings) permStrings = BasePermissionsToStringList(allSetBasePermission(AllPermFlags + 1)) @@ -38,7 +38,7 @@ func TestBasePermissionsToStringList(t *testing.T) { func TestBasePermissionsString(t *testing.T) { permissionString := BasePermissionsString(allSetBasePermission(AllPermFlags &^ Root)) - assert.Equal(t, "send | call | createContract | createAccount | bond | name | proposal | input | batch | hasBase | "+ + assert.Equal(t, "send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | "+ "setBase | unsetBase | setGlobal | hasRole | addRole | removeRole", permissionString) } diff --git a/protobuf/payload.proto b/protobuf/payload.proto index c33bcae66..0cad9c724 100644 --- a/protobuf/payload.proto +++ b/protobuf/payload.proto @@ -5,6 +5,7 @@ option go_package = "github.com/hyperledger/burrow/txs/payload"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; import "permission.proto"; +import "registry.proto"; import "spec.proto"; package payload; @@ -33,6 +34,7 @@ message Any { UnbondTx UnbondTx = 7; BatchTx BatchTx = 8; ProposalTx ProposalTx = 9; + IdentifyTx IdentifyTx = 10; } // An input to a transaction that may carry an Amount as a charge and whose sequence number must be one greater than @@ -149,6 +151,16 @@ message ProposalTx { Proposal Proposal = 4; } +message IdentifyTx { + option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + + // Senders + repeated TxInput Inputs = 1; + // Node to register + registry.NodeIdentity Node = 2; +} + message BatchTx { option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_getters) = false; diff --git a/protobuf/registry.proto b/protobuf/registry.proto new file mode 100644 index 000000000..2c701605b --- /dev/null +++ b/protobuf/registry.proto @@ -0,0 +1,32 @@ +syntax = 'proto3'; + +package registry; + +option go_package = "github.com/hyperledger/burrow/execution/registry"; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.stable_marshaler_all) = true; +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +message NodeIdentity { + option (gogoproto.goproto_stringer) = false; + // Peer moniker name + string Moniker = 1; + // Peer network address + string NetworkAddress = 2; + // Node key id (crypto address) + string TendermintNodeID = 3; + // Burrow validator address + bytes ValidatorPublicKey = 4 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.PublicKey", (gogoproto.nullable) = false]; +} + diff --git a/protobuf/rpcquery.proto b/protobuf/rpcquery.proto index f92e1931e..8ad6fbad1 100644 --- a/protobuf/rpcquery.proto +++ b/protobuf/rpcquery.proto @@ -10,6 +10,7 @@ import "github.com/tendermint/tendermint/abci/types/types.proto"; import "names.proto"; import "acm.proto"; import "validator.proto"; +import "registry.proto"; import "rpc.proto"; import "payload.proto"; @@ -28,7 +29,9 @@ service Query { rpc GetName (GetNameParam) returns (names.Entry); rpc ListNames (ListNamesParam) returns (stream names.Entry); - + + // GetNetworkRegistry returns for each validator address, the list of their identified node at the current state + rpc GetNetworkRegistry (GetNetworkRegistryParam) returns (NetworkRegistry); rpc GetValidatorSet (GetValidatorSetParam) returns (ValidatorSet); rpc GetValidatorSetHistory (GetValidatorSetHistoryParam) returns (ValidatorSetHistory); @@ -79,6 +82,10 @@ message ListNamesParam { string Query = 1; } +message GetNetworkRegistryParam { + +} + message GetValidatorSetParam { } @@ -88,6 +95,15 @@ message GetValidatorSetHistoryParam { int64 IncludePrevious = 1; } +message NetworkRegistry { + repeated RegisteredValidator Set = 1; +} + +message RegisteredValidator { + bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; + registry.NodeIdentity Node = 2; +} + message ValidatorSetHistory { repeated ValidatorSet History = 1; } diff --git a/protobuf/rpctransact.proto b/protobuf/rpctransact.proto index 454c76e1d..e2c26c2e4 100644 --- a/protobuf/rpctransact.proto +++ b/protobuf/rpctransact.proto @@ -50,7 +50,7 @@ service Transact { // Formulate and SendTx transaction signed server-side rpc SendTxAsync (payload.SendTx) returns (txs.Receipt); - // Formualte a NameTx signed server-side and wait for it to be included in a block returning the registered name + // Formulate a NameTx signed server-side and wait for it to be included in a block returning the registered name rpc NameTxSync (payload.NameTx) returns (exec.TxExecution); // Formulate a NameTx signed server-side rpc NameTxAsync (payload.NameTx) returns (txs.Receipt); diff --git a/rpc/config.go b/rpc/config.go index f5b2a0f9a..72a8d5efb 100644 --- a/rpc/config.go +++ b/rpc/config.go @@ -1,5 +1,9 @@ package rpc +import ( + "net" +) + // 'LocalHost' gets interpreted as ipv6 // TODO: revisit this const LocalHost = "127.0.0.1" @@ -19,6 +23,10 @@ type ServerConfig struct { ListenPort string } +func (sc *ServerConfig) ListenAddress() string { + return net.JoinHostPort(sc.ListenHost, sc.ListenPort) +} + type MetricsConfig struct { ServerConfig MetricsPath string diff --git a/rpc/eth_test.go b/rpc/eth_test.go index 2a94b9521..283eac256 100644 --- a/rpc/eth_test.go +++ b/rpc/eth_test.go @@ -28,7 +28,7 @@ func TestWeb3Service(t *testing.T) { config, _ := integration.NewTestConfig(genesisDoc) logger := logging.NewNoopLogger() - kern, err := integration.TestKernel(genesisAccounts[0], genesisAccounts, config, nil) + kern, err := integration.TestKernel(genesisAccounts[0], genesisAccounts, config) require.NoError(t, err) err = kern.Boot() defer kern.Shutdown(ctx) diff --git a/rpc/result.go b/rpc/result.go index 37abaad82..48f897ca3 100644 --- a/rpc/result.go +++ b/rpc/result.go @@ -21,6 +21,7 @@ import ( "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/names" + "github.com/hyperledger/burrow/execution/registry" "github.com/hyperledger/burrow/genesis" "github.com/hyperledger/burrow/txs" amino "github.com/tendermint/go-amino" @@ -114,6 +115,11 @@ type ResultNetwork struct { *core_types.ResultNetInfo } +type ResultNetworkRegistry struct { + Address crypto.Address + registry.NodeIdentity +} + type ResultValidators struct { BlockHeight uint64 BondedValidators []*validator.Validator diff --git a/rpc/rpcinfo/methods.go b/rpc/rpcinfo/methods.go index bea4c66c1..e0086e320 100644 --- a/rpc/rpcinfo/methods.go +++ b/rpc/rpcinfo/methods.go @@ -13,8 +13,9 @@ import ( // Method names const ( // Status and healthcheck - Status = "status" - Network = "network" + Status = "status" + Network = "network" + NetworkRegistry = "network/registry" // Accounts Accounts = "accounts" @@ -60,8 +61,9 @@ func GetRoutes(service *rpc.Service) map[string]*server.RPCFunc { // TODO: overhaul this with gRPC-gateway / swagger return map[string]*server.RPCFunc{ // Status - Status: server.NewRPCFunc(service.StatusWithin, "block_time_within,block_seen_time_within"), - Network: server.NewRPCFunc(service.Network, ""), + Status: server.NewRPCFunc(service.StatusWithin, "block_time_within,block_seen_time_within"), + Network: server.NewRPCFunc(service.Network, ""), + NetworkRegistry: server.NewRPCFunc(service.NetworkRegistry, ""), // Accounts Accounts: server.NewRPCFunc(func() (*rpc.ResultAccounts, error) { diff --git a/rpc/rpcquery/query_server.go b/rpc/rpcquery/query_server.go index 9cc4a8036..87b3a8088 100644 --- a/rpc/rpcquery/query_server.go +++ b/rpc/rpcquery/query_server.go @@ -10,10 +10,12 @@ import ( "github.com/hyperledger/burrow/acm/validator" "github.com/hyperledger/burrow/bcm" "github.com/hyperledger/burrow/consensus/tendermint" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/deploy/compile" "github.com/hyperledger/burrow/event/query" "github.com/hyperledger/burrow/execution/names" "github.com/hyperledger/burrow/execution/proposal" + "github.com/hyperledger/burrow/execution/registry" "github.com/hyperledger/burrow/execution/state" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/rpc" @@ -25,6 +27,7 @@ import ( type queryServer struct { accounts acmstate.IterableStatsReader nameReg names.IterableReader + nodeReg registry.IterableReader proposalReg proposal.IterableReader blockchain bcm.BlockchainInfo validators validator.History @@ -34,11 +37,12 @@ type queryServer struct { var _ QueryServer = &queryServer{} -func NewQueryServer(state acmstate.IterableStatsReader, nameReg names.IterableReader, proposalReg proposal.IterableReader, +func NewQueryServer(state acmstate.IterableStatsReader, nameReg names.IterableReader, nodeReg registry.IterableReader, proposalReg proposal.IterableReader, blockchain bcm.BlockchainInfo, validators validator.History, nodeView *tendermint.NodeView, logger *logging.Logger) *queryServer { return &queryServer{ accounts: state, nameReg: nameReg, + nodeReg: nodeReg, proposalReg: proposalReg, blockchain: blockchain, validators: validators, @@ -193,7 +197,19 @@ func (qs *queryServer) GetValidatorSetHistory(ctx context.Context, param *GetVal return history, nil } -// proposals +func (qs *queryServer) GetNetworkRegistry(ctx context.Context, param *GetNetworkRegistryParam) (*NetworkRegistry, error) { + rv := make([]*RegisteredValidator, 0) + err := qs.nodeReg.IterateNodes(func(val crypto.Address, rn *registry.NodeIdentity) error { + rv = append(rv, &RegisteredValidator{ + Address: val, + Node: rn, + }) + return nil + }) + return &NetworkRegistry{Set: rv}, err +} + +// Proposals func (qs *queryServer) GetProposal(ctx context.Context, param *GetProposalParam) (proposal *payload.Ballot, err error) { proposal, err = qs.proposalReg.GetProposal(param.Hash) diff --git a/rpc/rpcquery/rpcquery.pb.go b/rpc/rpcquery/rpcquery.pb.go index ee44c1ed5..ee5005790 100644 --- a/rpc/rpcquery/rpcquery.pb.go +++ b/rpc/rpcquery/rpcquery.pb.go @@ -14,6 +14,7 @@ import ( github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" names "github.com/hyperledger/burrow/execution/names" + registry "github.com/hyperledger/burrow/execution/registry" rpc "github.com/hyperledger/burrow/rpc" payload "github.com/hyperledger/burrow/txs/payload" types "github.com/tendermint/tendermint/abci/types" @@ -393,6 +394,40 @@ func (*ListNamesParam) XXX_MessageName() string { return "rpcquery.ListNamesParam" } +type GetNetworkRegistryParam struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetNetworkRegistryParam) Reset() { *m = GetNetworkRegistryParam{} } +func (m *GetNetworkRegistryParam) String() string { return proto.CompactTextString(m) } +func (*GetNetworkRegistryParam) ProtoMessage() {} +func (*GetNetworkRegistryParam) Descriptor() ([]byte, []int) { + return fileDescriptor_88e25d9b99e39f02, []int{9} +} +func (m *GetNetworkRegistryParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetNetworkRegistryParam.Unmarshal(m, b) +} +func (m *GetNetworkRegistryParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetNetworkRegistryParam.Marshal(b, m, deterministic) +} +func (m *GetNetworkRegistryParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetNetworkRegistryParam.Merge(m, src) +} +func (m *GetNetworkRegistryParam) XXX_Size() int { + return xxx_messageInfo_GetNetworkRegistryParam.Size(m) +} +func (m *GetNetworkRegistryParam) XXX_DiscardUnknown() { + xxx_messageInfo_GetNetworkRegistryParam.DiscardUnknown(m) +} + +var xxx_messageInfo_GetNetworkRegistryParam proto.InternalMessageInfo + +func (*GetNetworkRegistryParam) XXX_MessageName() string { + return "rpcquery.GetNetworkRegistryParam" +} + type GetValidatorSetParam struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -403,7 +438,7 @@ func (m *GetValidatorSetParam) Reset() { *m = GetValidatorSetParam{} } func (m *GetValidatorSetParam) String() string { return proto.CompactTextString(m) } func (*GetValidatorSetParam) ProtoMessage() {} func (*GetValidatorSetParam) Descriptor() ([]byte, []int) { - return fileDescriptor_88e25d9b99e39f02, []int{9} + return fileDescriptor_88e25d9b99e39f02, []int{10} } func (m *GetValidatorSetParam) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetValidatorSetParam.Unmarshal(m, b) @@ -439,7 +474,7 @@ func (m *GetValidatorSetHistoryParam) Reset() { *m = GetValidatorSetHist func (m *GetValidatorSetHistoryParam) String() string { return proto.CompactTextString(m) } func (*GetValidatorSetHistoryParam) ProtoMessage() {} func (*GetValidatorSetHistoryParam) Descriptor() ([]byte, []int) { - return fileDescriptor_88e25d9b99e39f02, []int{10} + return fileDescriptor_88e25d9b99e39f02, []int{11} } func (m *GetValidatorSetHistoryParam) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetValidatorSetHistoryParam.Unmarshal(m, b) @@ -470,6 +505,91 @@ func (*GetValidatorSetHistoryParam) XXX_MessageName() string { return "rpcquery.GetValidatorSetHistoryParam" } +type NetworkRegistry struct { + Set []*RegisteredValidator `protobuf:"bytes,1,rep,name=Set,proto3" json:"Set,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NetworkRegistry) Reset() { *m = NetworkRegistry{} } +func (m *NetworkRegistry) String() string { return proto.CompactTextString(m) } +func (*NetworkRegistry) ProtoMessage() {} +func (*NetworkRegistry) Descriptor() ([]byte, []int) { + return fileDescriptor_88e25d9b99e39f02, []int{12} +} +func (m *NetworkRegistry) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NetworkRegistry.Unmarshal(m, b) +} +func (m *NetworkRegistry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NetworkRegistry.Marshal(b, m, deterministic) +} +func (m *NetworkRegistry) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkRegistry.Merge(m, src) +} +func (m *NetworkRegistry) XXX_Size() int { + return xxx_messageInfo_NetworkRegistry.Size(m) +} +func (m *NetworkRegistry) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkRegistry.DiscardUnknown(m) +} + +var xxx_messageInfo_NetworkRegistry proto.InternalMessageInfo + +func (m *NetworkRegistry) GetSet() []*RegisteredValidator { + if m != nil { + return m.Set + } + return nil +} + +func (*NetworkRegistry) XXX_MessageName() string { + return "rpcquery.NetworkRegistry" +} + +type RegisteredValidator struct { + Address github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address"` + Node *registry.NodeIdentity `protobuf:"bytes,2,opt,name=Node,proto3" json:"Node,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RegisteredValidator) Reset() { *m = RegisteredValidator{} } +func (m *RegisteredValidator) String() string { return proto.CompactTextString(m) } +func (*RegisteredValidator) ProtoMessage() {} +func (*RegisteredValidator) Descriptor() ([]byte, []int) { + return fileDescriptor_88e25d9b99e39f02, []int{13} +} +func (m *RegisteredValidator) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RegisteredValidator.Unmarshal(m, b) +} +func (m *RegisteredValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RegisteredValidator.Marshal(b, m, deterministic) +} +func (m *RegisteredValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegisteredValidator.Merge(m, src) +} +func (m *RegisteredValidator) XXX_Size() int { + return xxx_messageInfo_RegisteredValidator.Size(m) +} +func (m *RegisteredValidator) XXX_DiscardUnknown() { + xxx_messageInfo_RegisteredValidator.DiscardUnknown(m) +} + +var xxx_messageInfo_RegisteredValidator proto.InternalMessageInfo + +func (m *RegisteredValidator) GetNode() *registry.NodeIdentity { + if m != nil { + return m.Node + } + return nil +} + +func (*RegisteredValidator) XXX_MessageName() string { + return "rpcquery.RegisteredValidator" +} + type ValidatorSetHistory struct { History []*ValidatorSet `protobuf:"bytes,1,rep,name=History,proto3" json:"History,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -481,7 +601,7 @@ func (m *ValidatorSetHistory) Reset() { *m = ValidatorSetHistory{} } func (m *ValidatorSetHistory) String() string { return proto.CompactTextString(m) } func (*ValidatorSetHistory) ProtoMessage() {} func (*ValidatorSetHistory) Descriptor() ([]byte, []int) { - return fileDescriptor_88e25d9b99e39f02, []int{11} + return fileDescriptor_88e25d9b99e39f02, []int{14} } func (m *ValidatorSetHistory) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ValidatorSetHistory.Unmarshal(m, b) @@ -524,7 +644,7 @@ func (m *ValidatorSet) Reset() { *m = ValidatorSet{} } func (m *ValidatorSet) String() string { return proto.CompactTextString(m) } func (*ValidatorSet) ProtoMessage() {} func (*ValidatorSet) Descriptor() ([]byte, []int) { - return fileDescriptor_88e25d9b99e39f02, []int{12} + return fileDescriptor_88e25d9b99e39f02, []int{15} } func (m *ValidatorSet) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ValidatorSet.Unmarshal(m, b) @@ -573,7 +693,7 @@ func (m *GetProposalParam) Reset() { *m = GetProposalParam{} } func (m *GetProposalParam) String() string { return proto.CompactTextString(m) } func (*GetProposalParam) ProtoMessage() {} func (*GetProposalParam) Descriptor() ([]byte, []int) { - return fileDescriptor_88e25d9b99e39f02, []int{13} + return fileDescriptor_88e25d9b99e39f02, []int{16} } func (m *GetProposalParam) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetProposalParam.Unmarshal(m, b) @@ -615,7 +735,7 @@ func (m *ListProposalsParam) Reset() { *m = ListProposalsParam{} } func (m *ListProposalsParam) String() string { return proto.CompactTextString(m) } func (*ListProposalsParam) ProtoMessage() {} func (*ListProposalsParam) Descriptor() ([]byte, []int) { - return fileDescriptor_88e25d9b99e39f02, []int{14} + return fileDescriptor_88e25d9b99e39f02, []int{17} } func (m *ListProposalsParam) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListProposalsParam.Unmarshal(m, b) @@ -658,7 +778,7 @@ func (m *ProposalResult) Reset() { *m = ProposalResult{} } func (m *ProposalResult) String() string { return proto.CompactTextString(m) } func (*ProposalResult) ProtoMessage() {} func (*ProposalResult) Descriptor() ([]byte, []int) { - return fileDescriptor_88e25d9b99e39f02, []int{15} + return fileDescriptor_88e25d9b99e39f02, []int{18} } func (m *ProposalResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ProposalResult.Unmarshal(m, b) @@ -706,7 +826,7 @@ func (m *GetStatsParam) Reset() { *m = GetStatsParam{} } func (m *GetStatsParam) String() string { return proto.CompactTextString(m) } func (*GetStatsParam) ProtoMessage() {} func (*GetStatsParam) Descriptor() ([]byte, []int) { - return fileDescriptor_88e25d9b99e39f02, []int{16} + return fileDescriptor_88e25d9b99e39f02, []int{19} } func (m *GetStatsParam) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetStatsParam.Unmarshal(m, b) @@ -742,7 +862,7 @@ func (m *Stats) Reset() { *m = Stats{} } func (m *Stats) String() string { return proto.CompactTextString(m) } func (*Stats) ProtoMessage() {} func (*Stats) Descriptor() ([]byte, []int) { - return fileDescriptor_88e25d9b99e39f02, []int{17} + return fileDescriptor_88e25d9b99e39f02, []int{20} } func (m *Stats) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Stats.Unmarshal(m, b) @@ -791,7 +911,7 @@ func (m *GetBlockParam) Reset() { *m = GetBlockParam{} } func (m *GetBlockParam) String() string { return proto.CompactTextString(m) } func (*GetBlockParam) ProtoMessage() {} func (*GetBlockParam) Descriptor() ([]byte, []int) { - return fileDescriptor_88e25d9b99e39f02, []int{18} + return fileDescriptor_88e25d9b99e39f02, []int{21} } func (m *GetBlockParam) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlockParam.Unmarshal(m, b) @@ -840,10 +960,16 @@ func init() { golang_proto.RegisterType((*GetNameParam)(nil), "rpcquery.GetNameParam") proto.RegisterType((*ListNamesParam)(nil), "rpcquery.ListNamesParam") golang_proto.RegisterType((*ListNamesParam)(nil), "rpcquery.ListNamesParam") + proto.RegisterType((*GetNetworkRegistryParam)(nil), "rpcquery.GetNetworkRegistryParam") + golang_proto.RegisterType((*GetNetworkRegistryParam)(nil), "rpcquery.GetNetworkRegistryParam") proto.RegisterType((*GetValidatorSetParam)(nil), "rpcquery.GetValidatorSetParam") golang_proto.RegisterType((*GetValidatorSetParam)(nil), "rpcquery.GetValidatorSetParam") proto.RegisterType((*GetValidatorSetHistoryParam)(nil), "rpcquery.GetValidatorSetHistoryParam") golang_proto.RegisterType((*GetValidatorSetHistoryParam)(nil), "rpcquery.GetValidatorSetHistoryParam") + proto.RegisterType((*NetworkRegistry)(nil), "rpcquery.NetworkRegistry") + golang_proto.RegisterType((*NetworkRegistry)(nil), "rpcquery.NetworkRegistry") + proto.RegisterType((*RegisteredValidator)(nil), "rpcquery.RegisteredValidator") + golang_proto.RegisterType((*RegisteredValidator)(nil), "rpcquery.RegisteredValidator") proto.RegisterType((*ValidatorSetHistory)(nil), "rpcquery.ValidatorSetHistory") golang_proto.RegisterType((*ValidatorSetHistory)(nil), "rpcquery.ValidatorSetHistory") proto.RegisterType((*ValidatorSet)(nil), "rpcquery.ValidatorSet") @@ -866,67 +992,73 @@ func init() { proto.RegisterFile("rpcquery.proto", fileDescriptor_88e25d9b99e39f func init() { golang_proto.RegisterFile("rpcquery.proto", fileDescriptor_88e25d9b99e39f02) } var fileDescriptor_88e25d9b99e39f02 = []byte{ - // 955 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0x1b, 0x45, - 0x14, 0x66, 0x93, 0xc6, 0x71, 0x8e, 0x1d, 0xbb, 0x9d, 0x06, 0x63, 0xb6, 0xe0, 0x54, 0x23, 0x91, - 0x86, 0xaa, 0x5d, 0x1b, 0xd3, 0x00, 0x02, 0x24, 0x54, 0x57, 0x60, 0x87, 0xd2, 0x28, 0xac, 0xa1, - 0x95, 0x40, 0x42, 0x1a, 0xef, 0x0e, 0xf6, 0x8a, 0xb5, 0xc7, 0xcc, 0xce, 0x16, 0xf6, 0x91, 0x78, - 0x00, 0xae, 0xe1, 0xb2, 0x8f, 0x80, 0x7a, 0x11, 0xa1, 0xf6, 0x45, 0xd0, 0xce, 0xcf, 0x7a, 0x77, - 0xe3, 0x44, 0x80, 0xd4, 0x9b, 0x68, 0xce, 0x99, 0x6f, 0xbe, 0x93, 0x39, 0x73, 0xbe, 0x6f, 0x0d, - 0x0d, 0xbe, 0xf4, 0x7e, 0x8e, 0x29, 0x4f, 0x9c, 0x25, 0x67, 0x82, 0xa1, 0xaa, 0x89, 0xed, 0xbb, - 0xd3, 0x40, 0xcc, 0xe2, 0x89, 0xe3, 0xb1, 0x79, 0x77, 0xca, 0xa6, 0xac, 0x2b, 0x01, 0x93, 0xf8, - 0x47, 0x19, 0xc9, 0x40, 0xae, 0xd4, 0x41, 0xfb, 0xc3, 0x1c, 0x5c, 0xd0, 0x85, 0x4f, 0xf9, 0x3c, - 0x58, 0x88, 0xfc, 0x92, 0x4c, 0xbc, 0xa0, 0x2b, 0x92, 0x25, 0x8d, 0xd4, 0x5f, 0x7d, 0xb0, 0xb6, - 0x20, 0xf3, 0x2c, 0xd8, 0x21, 0xde, 0x5c, 0x2f, 0x9b, 0x4f, 0x49, 0x18, 0xf8, 0x44, 0x30, 0x6e, - 0xf6, 0xf8, 0xd2, 0xd3, 0xcb, 0xdd, 0x25, 0x49, 0x42, 0x46, 0x7c, 0x15, 0xe2, 0x00, 0x6a, 0x63, - 0x41, 0x44, 0x1c, 0x9d, 0x12, 0x4e, 0xe6, 0xe8, 0x10, 0x9a, 0x83, 0x90, 0x79, 0x3f, 0x7d, 0x13, - 0xcc, 0xe9, 0x93, 0x40, 0xcc, 0x82, 0x45, 0xdb, 0xba, 0x69, 0x1d, 0xee, 0xb8, 0xe5, 0x34, 0xea, - 0xc1, 0x75, 0x99, 0x1a, 0x53, 0xba, 0xc8, 0xa1, 0x37, 0x24, 0x7a, 0xdd, 0x16, 0x26, 0xd0, 0x1c, - 0x52, 0x71, 0xdf, 0xf3, 0x58, 0xbc, 0x10, 0xaa, 0xdc, 0x09, 0x6c, 0xdf, 0xf7, 0x7d, 0x4e, 0xa3, - 0x48, 0x96, 0xa9, 0x0f, 0xee, 0x3d, 0x3b, 0xdb, 0x7f, 0xed, 0xf9, 0xd9, 0xfe, 0x9d, 0x5c, 0x4b, - 0x66, 0xc9, 0x92, 0xf2, 0x90, 0xfa, 0x53, 0xca, 0xbb, 0x93, 0x98, 0x73, 0xf6, 0x4b, 0xd7, 0xe3, - 0xc9, 0x52, 0x30, 0x47, 0x9f, 0x75, 0x0d, 0x09, 0xfe, 0xdd, 0x82, 0xab, 0x43, 0x2a, 0x1e, 0x51, - 0x41, 0x7c, 0x22, 0x88, 0x2a, 0xf2, 0x65, 0xb9, 0x48, 0xef, 0x7f, 0x17, 0x40, 0xdf, 0x42, 0xdd, - 0x90, 0x8f, 0x48, 0x34, 0x93, 0xd7, 0xad, 0x0f, 0xde, 0x7b, 0x7e, 0xb6, 0x7f, 0xf7, 0x72, 0xc2, - 0x49, 0xb0, 0x20, 0x3c, 0x71, 0x46, 0xf4, 0xd7, 0x41, 0x22, 0x68, 0xe4, 0x16, 0x68, 0xf0, 0x1d, - 0x68, 0x98, 0xd8, 0xa5, 0x51, 0x1c, 0x0a, 0x64, 0x43, 0xd5, 0x64, 0xf4, 0x0b, 0x64, 0x31, 0xfe, - 0xcd, 0x92, 0x9d, 0x1c, 0x0b, 0xc6, 0xc9, 0x94, 0xbe, 0x92, 0x4e, 0xa2, 0x2f, 0x60, 0xf3, 0x21, - 0x4d, 0xf4, 0xfd, 0xfe, 0x25, 0x97, 0xbe, 0xe3, 0x13, 0xc6, 0xfd, 0xfe, 0xd1, 0x07, 0x6e, 0x4a, - 0x80, 0xbf, 0x87, 0xba, 0xfe, 0x3f, 0x1f, 0x93, 0x30, 0xa6, 0xe8, 0x21, 0x6c, 0xc9, 0x85, 0xfe, - 0x2f, 0x8f, 0x34, 0xf3, 0x7f, 0xec, 0x9e, 0xe2, 0xc0, 0xef, 0xc2, 0xb5, 0xaf, 0x82, 0xc8, 0x8c, - 0x94, 0x1e, 0xe1, 0x3d, 0xd8, 0xfa, 0x3a, 0x55, 0xa1, 0x6e, 0x9b, 0x0a, 0x30, 0x86, 0xfa, 0x90, - 0x8a, 0x13, 0x32, 0xd7, 0xfd, 0x42, 0x70, 0x25, 0x0d, 0x34, 0x48, 0xae, 0xf1, 0x01, 0x34, 0x52, - 0xba, 0x74, 0x7d, 0x29, 0x57, 0x0b, 0xf6, 0x86, 0x54, 0x3c, 0x36, 0x1a, 0x1b, 0x53, 0x35, 0xcd, - 0x78, 0x08, 0x37, 0x4a, 0xf9, 0x51, 0x10, 0x09, 0xc6, 0x93, 0x4c, 0x5b, 0xc7, 0x0b, 0x2f, 0x8c, - 0x7d, 0x7a, 0xca, 0xe9, 0xd3, 0x80, 0xc5, 0xea, 0xa9, 0x36, 0xdd, 0x72, 0x1a, 0x0f, 0xe1, 0xfa, - 0x1a, 0x16, 0xd4, 0x83, 0x6d, 0xbd, 0x6c, 0x5b, 0x37, 0x37, 0x0f, 0x6b, 0xfd, 0x96, 0x93, 0x59, - 0x50, 0x1e, 0xef, 0x1a, 0x18, 0x3e, 0x81, 0x7a, 0x7e, 0x03, 0xb5, 0xa0, 0x32, 0xa3, 0xc1, 0x74, - 0x26, 0x64, 0xe5, 0x2b, 0xae, 0x8e, 0xd0, 0x01, 0x6c, 0x8e, 0xa9, 0x68, 0x6f, 0x48, 0xd6, 0x3d, - 0x67, 0x65, 0x1f, 0xd9, 0x69, 0x37, 0x05, 0xe0, 0x03, 0x29, 0xaf, 0x53, 0xce, 0x96, 0x2c, 0x22, - 0x61, 0xd6, 0x49, 0x29, 0x05, 0xf9, 0xa0, 0xae, 0x5c, 0xe3, 0x1e, 0xa0, 0xb4, 0x93, 0x06, 0xa8, - 0xbb, 0x69, 0x43, 0x55, 0x65, 0xa8, 0x2f, 0xd1, 0x55, 0x37, 0x8b, 0xf1, 0x23, 0x68, 0x18, 0xb4, - 0x56, 0xc0, 0x1a, 0x5e, 0x74, 0x0b, 0x2a, 0x03, 0x12, 0x86, 0x4c, 0xc8, 0xc1, 0xac, 0xf5, 0x9b, - 0x8e, 0x71, 0x33, 0x95, 0x76, 0xf5, 0x36, 0x6e, 0xc2, 0xae, 0x54, 0x08, 0xd1, 0x53, 0x81, 0x29, - 0x6c, 0xc9, 0x08, 0xdd, 0x86, 0xab, 0x66, 0x5e, 0x52, 0x5f, 0x7a, 0xc0, 0x7c, 0xaa, 0x9b, 0x71, - 0x2e, 0x9f, 0x7a, 0x5c, 0x3e, 0xc7, 0x62, 0x21, 0xe1, 0x1b, 0x12, 0xbe, 0x6e, 0x0b, 0xdf, 0x92, - 0x75, 0xa5, 0xfb, 0xa9, 0x3b, 0xb7, 0xa0, 0x32, 0x2a, 0x74, 0x5c, 0x45, 0xfd, 0x3f, 0x2a, 0x7a, - 0xb4, 0x50, 0x1f, 0x2a, 0xca, 0x81, 0xd1, 0xeb, 0xab, 0xe7, 0xcc, 0x79, 0xb2, 0x7d, 0x2d, 0x4d, - 0x3b, 0xaa, 0x2b, 0x1a, 0x79, 0x04, 0xb0, 0xb2, 0x52, 0xf4, 0xe6, 0xea, 0x5c, 0xc9, 0x60, 0xed, - 0xba, 0x93, 0x7e, 0x15, 0x0c, 0xf0, 0x01, 0xd4, 0x72, 0xee, 0x88, 0xec, 0xc2, 0xb9, 0x82, 0x69, - 0xda, 0xed, 0xd5, 0x5e, 0xc9, 0x99, 0x3e, 0x93, 0xb5, 0xb5, 0xa8, 0x4b, 0xb5, 0xf3, 0x96, 0x64, - 0xb7, 0xf2, 0xd7, 0xc9, 0x59, 0xc0, 0x27, 0x50, 0xcf, 0xab, 0x16, 0xdd, 0x58, 0xe1, 0xce, 0xa9, - 0xb9, 0x78, 0x81, 0x9e, 0x85, 0xba, 0xb0, 0xad, 0x75, 0x8c, 0x5a, 0x85, 0xd2, 0x99, 0xb4, 0xed, - 0xba, 0xa3, 0x3e, 0x8b, 0x9f, 0x2f, 0x04, 0x4f, 0xd0, 0x11, 0xec, 0x64, 0xa2, 0x46, 0xed, 0x62, - 0xa9, 0x95, 0xd2, 0x8b, 0x87, 0x7a, 0x16, 0x3a, 0x96, 0x16, 0x5b, 0x10, 0x4f, 0xa7, 0x50, 0xef, - 0x9c, 0xfc, 0xed, 0x0b, 0xd4, 0x88, 0x7e, 0x80, 0xd6, 0x7a, 0x5b, 0x40, 0xef, 0x5c, 0xc8, 0x98, - 0x37, 0x0e, 0xfb, 0xed, 0xf5, 0xc4, 0x86, 0xe5, 0x63, 0xf9, 0xaa, 0x46, 0x3d, 0xa5, 0x57, 0x2d, - 0x68, 0xd5, 0x2e, 0xeb, 0x05, 0x1d, 0xc3, 0x6e, 0x41, 0xa8, 0xe8, 0xad, 0x62, 0x87, 0x8a, 0x0a, - 0xce, 0x4f, 0x45, 0x51, 0xad, 0x3d, 0x0b, 0xdd, 0x83, 0xaa, 0x91, 0x1c, 0x7a, 0xa3, 0x34, 0x15, - 0x46, 0x86, 0x76, 0xb3, 0x38, 0xe2, 0x11, 0xfa, 0x08, 0x1a, 0x46, 0x30, 0x23, 0x4a, 0x7c, 0xca, - 0x4b, 0x67, 0x57, 0x52, 0xb2, 0x77, 0x1d, 0xf5, 0xdb, 0x47, 0xe1, 0x06, 0x9f, 0xfe, 0xf5, 0xa2, - 0x63, 0xfd, 0xfd, 0xa2, 0x63, 0xfd, 0xf9, 0xb2, 0x63, 0x3d, 0x7b, 0xd9, 0xb1, 0xbe, 0xbb, 0x7d, - 0xf9, 0x47, 0x84, 0x2f, 0xbd, 0xae, 0xa1, 0x9e, 0x54, 0xe4, 0xcf, 0x9f, 0xf7, 0xff, 0x09, 0x00, - 0x00, 0xff, 0xff, 0xac, 0x34, 0xcd, 0x8f, 0xc5, 0x09, 0x00, 0x00, + // 1051 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xef, 0x6e, 0x1b, 0x45, + 0x10, 0xe7, 0x9a, 0xc4, 0x71, 0xc6, 0x8e, 0xdd, 0x6e, 0x82, 0x9b, 0x5e, 0xa9, 0x53, 0x56, 0x22, + 0x0d, 0x51, 0x7b, 0x36, 0xa6, 0x01, 0x04, 0x48, 0xa8, 0x8e, 0xc0, 0x0e, 0xa5, 0x51, 0x38, 0x43, + 0x2b, 0x81, 0x84, 0xb4, 0xbe, 0x5b, 0xec, 0x53, 0xcf, 0xb7, 0x66, 0x6f, 0xaf, 0xc5, 0x8f, 0x81, + 0x78, 0x0a, 0x1e, 0x80, 0xef, 0x7c, 0xec, 0x23, 0xa0, 0x7e, 0x88, 0x50, 0xfb, 0x22, 0xe8, 0xf6, + 0x8f, 0x7d, 0x77, 0x71, 0x23, 0x40, 0xf4, 0x8b, 0xb5, 0x33, 0x3b, 0xf3, 0x1b, 0xef, 0xec, 0xfc, + 0x7e, 0x7b, 0x50, 0xe3, 0x53, 0xef, 0xa7, 0x84, 0xf2, 0x99, 0x33, 0xe5, 0x4c, 0x30, 0x54, 0x36, + 0xb6, 0x7d, 0x67, 0x14, 0x88, 0x71, 0x32, 0x74, 0x3c, 0x36, 0x69, 0x8d, 0xd8, 0x88, 0xb5, 0x64, + 0xc0, 0x30, 0xf9, 0x51, 0x5a, 0xd2, 0x90, 0x2b, 0x95, 0x68, 0x7f, 0x98, 0x09, 0x17, 0x34, 0xf2, + 0x29, 0x9f, 0x04, 0x91, 0xc8, 0x2e, 0xc9, 0xd0, 0x0b, 0x5a, 0x62, 0x36, 0xa5, 0xb1, 0xfa, 0xd5, + 0x89, 0x95, 0x88, 0x4c, 0xe6, 0xc6, 0x06, 0xf1, 0x26, 0x7a, 0x59, 0x7f, 0x42, 0xc2, 0xc0, 0x27, + 0x82, 0x71, 0xed, 0xa8, 0x71, 0x3a, 0x0a, 0x62, 0x61, 0xfe, 0xaa, 0xbd, 0xc1, 0xa7, 0x9e, 0x5e, + 0x6e, 0x4e, 0xc9, 0x2c, 0x64, 0xc4, 0x57, 0x26, 0x0e, 0xa0, 0x32, 0x10, 0x44, 0x24, 0xf1, 0x29, + 0xe1, 0x64, 0x82, 0xf6, 0xa1, 0xde, 0x0d, 0x99, 0xf7, 0xf8, 0x9b, 0x60, 0x42, 0x1f, 0x05, 0x62, + 0x1c, 0x44, 0x3b, 0xd6, 0x4d, 0x6b, 0x7f, 0xc3, 0x2d, 0xba, 0x51, 0x1b, 0xb6, 0xa4, 0x6b, 0x40, + 0x69, 0x94, 0x89, 0xbe, 0x24, 0xa3, 0x97, 0x6d, 0x61, 0x02, 0xf5, 0x1e, 0x15, 0xf7, 0x3c, 0x8f, + 0x25, 0x91, 0x50, 0xe5, 0x4e, 0x60, 0xfd, 0x9e, 0xef, 0x73, 0x1a, 0xc7, 0xb2, 0x4c, 0xb5, 0x7b, + 0xf7, 0xd9, 0xd9, 0xee, 0x1b, 0xcf, 0xcf, 0x76, 0x6f, 0x67, 0x5a, 0x34, 0x9e, 0x4d, 0x29, 0x0f, + 0xa9, 0x3f, 0xa2, 0xbc, 0x35, 0x4c, 0x38, 0x67, 0x4f, 0x5b, 0x1e, 0x9f, 0x4d, 0x05, 0x73, 0x74, + 0xae, 0x6b, 0x40, 0xf0, 0xef, 0x16, 0x5c, 0xee, 0x51, 0xf1, 0x80, 0x0a, 0xe2, 0x13, 0x41, 0x54, + 0x91, 0x2f, 0x8b, 0x45, 0xda, 0xff, 0xb9, 0x00, 0xfa, 0x16, 0xaa, 0x06, 0xbc, 0x4f, 0xe2, 0xb1, + 0x3c, 0x6e, 0xb5, 0xfb, 0xde, 0xf3, 0xb3, 0xdd, 0x3b, 0x17, 0x03, 0x0e, 0x83, 0x88, 0xf0, 0x99, + 0xd3, 0xa7, 0x3f, 0x77, 0x67, 0x82, 0xc6, 0x6e, 0x0e, 0x06, 0xdf, 0x86, 0x9a, 0xb1, 0x5d, 0x1a, + 0x27, 0xa1, 0x40, 0x36, 0x94, 0x8d, 0x47, 0xdf, 0xc0, 0xdc, 0xc6, 0xbf, 0x59, 0xb2, 0x93, 0x03, + 0xc1, 0x38, 0x19, 0xd1, 0xd7, 0xd2, 0x49, 0xf4, 0x05, 0xac, 0xdc, 0xa7, 0x33, 0x7d, 0xbe, 0x7f, + 0x88, 0xa5, 0xcf, 0xf8, 0x88, 0x71, 0xbf, 0x73, 0xf8, 0x81, 0x9b, 0x02, 0xe0, 0xef, 0xa1, 0xaa, + 0xff, 0xe7, 0x43, 0x12, 0x26, 0x14, 0xdd, 0x87, 0x35, 0xb9, 0xd0, 0xff, 0xf2, 0x50, 0x23, 0xff, + 0xcb, 0xee, 0x29, 0x0c, 0xfc, 0x2e, 0x5c, 0xf9, 0x2a, 0x88, 0xcd, 0x48, 0xe9, 0x11, 0xde, 0x86, + 0xb5, 0xaf, 0x53, 0x56, 0xea, 0xb6, 0x29, 0x03, 0x63, 0xa8, 0xf6, 0xa8, 0x38, 0x21, 0x13, 0xdd, + 0x2f, 0x04, 0xab, 0xa9, 0xa1, 0x83, 0xe4, 0x1a, 0xef, 0x41, 0x2d, 0x85, 0x4b, 0xd7, 0x17, 0x62, + 0x5d, 0x83, 0xab, 0x29, 0x16, 0x15, 0x4f, 0x19, 0x7f, 0xec, 0x6a, 0xa6, 0xc9, 0x04, 0xdc, 0x80, + 0xed, 0x1e, 0x15, 0x0f, 0x0d, 0x1d, 0x07, 0x54, 0x0d, 0x3a, 0xee, 0xc1, 0xf5, 0x82, 0xbf, 0x1f, + 0xc4, 0x82, 0xe9, 0xb4, 0x94, 0x76, 0xc7, 0x91, 0x17, 0x26, 0x3e, 0x3d, 0xe5, 0xf4, 0x49, 0xc0, + 0x12, 0x75, 0x8b, 0x2b, 0x6e, 0xd1, 0x8d, 0xbb, 0x50, 0x2f, 0x14, 0x46, 0x2d, 0x58, 0x19, 0x50, + 0xb1, 0x63, 0xdd, 0x5c, 0xd9, 0xaf, 0x74, 0x6e, 0x38, 0x73, 0x95, 0x52, 0x01, 0x94, 0x53, 0x7f, + 0x5e, 0xd7, 0x4d, 0x23, 0xf1, 0x2f, 0x16, 0x6c, 0x2d, 0xd9, 0xfc, 0xdf, 0x67, 0xe8, 0x00, 0x56, + 0x4f, 0x98, 0x4f, 0xe5, 0x10, 0x55, 0x3a, 0x0d, 0x67, 0x2e, 0x4a, 0xa9, 0xf7, 0xd8, 0xa7, 0x91, + 0x08, 0xc4, 0xcc, 0x95, 0x31, 0xb8, 0x07, 0x5b, 0x4b, 0xba, 0x83, 0xda, 0xb0, 0xae, 0x97, 0xfa, + 0x7c, 0x8d, 0xc5, 0xf9, 0xb2, 0xf1, 0xae, 0x09, 0xc3, 0x27, 0x50, 0xcd, 0x6e, 0xa0, 0x06, 0x94, + 0xc6, 0x34, 0x18, 0x8d, 0x85, 0x3c, 0xd3, 0xaa, 0xab, 0x2d, 0xb4, 0xa7, 0xba, 0x76, 0x49, 0xa2, + 0x6e, 0x3b, 0x0b, 0x05, 0x2d, 0x34, 0x6b, 0x4f, 0x2a, 0xca, 0x29, 0x67, 0x53, 0x16, 0x93, 0x70, + 0x3e, 0x3c, 0x92, 0xfd, 0xb2, 0x4b, 0xae, 0x5c, 0xe3, 0x36, 0xa0, 0x74, 0x78, 0x4c, 0xa0, 0x1e, + 0x20, 0x1b, 0xca, 0xca, 0x43, 0x7d, 0x19, 0x5d, 0x76, 0xe7, 0x36, 0x7e, 0x00, 0x35, 0x13, 0xad, + 0x49, 0xbf, 0x04, 0x17, 0xdd, 0x82, 0x52, 0x97, 0x84, 0x21, 0x13, 0xba, 0x8d, 0x75, 0xc7, 0x08, + 0xb8, 0x72, 0xbb, 0x7a, 0x1b, 0xd7, 0x61, 0x53, 0x8a, 0x02, 0xd1, 0x44, 0xc0, 0x14, 0xd6, 0xa4, + 0x85, 0x0e, 0xe0, 0xb2, 0xa1, 0x48, 0x2a, 0xc5, 0x47, 0xe9, 0x9d, 0xa8, 0x66, 0x9c, 0xf3, 0xa7, + 0xb2, 0x9e, 0xf5, 0xb1, 0x44, 0x1c, 0x99, 0x2b, 0x5c, 0x75, 0x97, 0x6d, 0xe1, 0x5b, 0xb2, 0xae, + 0x14, 0x7c, 0x75, 0xe6, 0x06, 0x94, 0xfa, 0xb9, 0x8e, 0x2b, 0xab, 0xf3, 0xeb, 0xba, 0x66, 0x13, + 0xea, 0x40, 0x49, 0x3d, 0x3a, 0xe8, 0xcd, 0xc5, 0x75, 0x66, 0x9e, 0x21, 0xfb, 0x4a, 0xea, 0x76, + 0x54, 0x57, 0x74, 0xe4, 0x21, 0xc0, 0xe2, 0xf5, 0x40, 0xd7, 0x16, 0x79, 0x85, 0x37, 0xc5, 0xae, + 0x3a, 0xe9, 0xc3, 0x68, 0x02, 0x8f, 0xa0, 0x92, 0x79, 0x10, 0x90, 0x9d, 0xcb, 0xcb, 0xbd, 0x13, + 0xf6, 0xce, 0x62, 0xaf, 0x20, 0xc6, 0x9f, 0xc9, 0xda, 0x5a, 0xc7, 0x0a, 0xb5, 0xb3, 0x2a, 0x6c, + 0x37, 0xb2, 0xc7, 0xc9, 0xa8, 0xde, 0x27, 0x50, 0xcd, 0x0a, 0x15, 0xba, 0xbe, 0x88, 0x3b, 0x27, + 0x60, 0xf9, 0x03, 0xb4, 0x2d, 0xd4, 0x82, 0x75, 0x2d, 0x5d, 0xa8, 0x91, 0x2b, 0x3d, 0x57, 0x33, + 0xbb, 0xea, 0xa8, 0x2f, 0x83, 0xcf, 0xa3, 0x54, 0x10, 0x0e, 0x61, 0x63, 0xae, 0x63, 0x68, 0x27, + 0x5f, 0x6a, 0x21, 0x6e, 0xf9, 0xa4, 0xb6, 0x85, 0x5c, 0x40, 0xe7, 0x65, 0x0d, 0xbd, 0x9d, 0x2f, + 0xb9, 0x44, 0xf4, 0xec, 0x4c, 0x43, 0x8a, 0xd9, 0xc7, 0xf2, 0xa5, 0xca, 0x11, 0xb2, 0x99, 0x03, + 0x3c, 0x27, 0x95, 0xf6, 0x2b, 0x18, 0x8e, 0x7e, 0x80, 0xc6, 0x72, 0x09, 0x45, 0xef, 0xbc, 0x12, + 0x31, 0x2b, 0xb2, 0xf6, 0x8d, 0xe5, 0xc0, 0x06, 0xe5, 0x63, 0x39, 0x29, 0x86, 0x91, 0x85, 0x49, + 0xc9, 0xf1, 0xdf, 0x2e, 0x72, 0x10, 0x1d, 0xc3, 0x66, 0x8e, 0xfc, 0xe8, 0xad, 0x7c, 0xd7, 0xf3, + 0xaa, 0x90, 0x9d, 0xb4, 0xbc, 0x02, 0xb4, 0x2d, 0x74, 0x17, 0xca, 0x86, 0xc6, 0xe8, 0x6a, 0x61, + 0xd2, 0x0c, 0xb5, 0xed, 0x7a, 0x9e, 0x36, 0x31, 0xfa, 0x08, 0x6a, 0x86, 0x84, 0x7d, 0x4a, 0x7c, + 0xca, 0x0b, 0xb9, 0x0b, 0x7a, 0xda, 0x9b, 0x8e, 0xfa, 0xa4, 0x54, 0x71, 0xdd, 0x4f, 0xff, 0x7c, + 0xd1, 0xb4, 0xfe, 0x7a, 0xd1, 0xb4, 0xfe, 0x78, 0xd9, 0xb4, 0x9e, 0xbd, 0x6c, 0x5a, 0xdf, 0x1d, + 0x5c, 0xac, 0xf6, 0x7c, 0xea, 0xb5, 0x0c, 0xf4, 0xb0, 0x24, 0xbf, 0x22, 0xdf, 0xff, 0x3b, 0x00, + 0x00, 0xff, 0xff, 0xa9, 0x73, 0xa1, 0xad, 0x1c, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -948,6 +1080,8 @@ type QueryClient interface { ListAccounts(ctx context.Context, in *ListAccountsParam, opts ...grpc.CallOption) (Query_ListAccountsClient, error) GetName(ctx context.Context, in *GetNameParam, opts ...grpc.CallOption) (*names.Entry, error) ListNames(ctx context.Context, in *ListNamesParam, opts ...grpc.CallOption) (Query_ListNamesClient, error) + // GetNetworkRegistry returns for each validator address, the list of their identified node at the current state + GetNetworkRegistry(ctx context.Context, in *GetNetworkRegistryParam, opts ...grpc.CallOption) (*NetworkRegistry, error) GetValidatorSet(ctx context.Context, in *GetValidatorSetParam, opts ...grpc.CallOption) (*ValidatorSet, error) GetValidatorSetHistory(ctx context.Context, in *GetValidatorSetHistoryParam, opts ...grpc.CallOption) (*ValidatorSetHistory, error) GetProposal(ctx context.Context, in *GetProposalParam, opts ...grpc.CallOption) (*payload.Ballot, error) @@ -1073,6 +1207,15 @@ func (x *queryListNamesClient) Recv() (*names.Entry, error) { return m, nil } +func (c *queryClient) GetNetworkRegistry(ctx context.Context, in *GetNetworkRegistryParam, opts ...grpc.CallOption) (*NetworkRegistry, error) { + out := new(NetworkRegistry) + err := c.cc.Invoke(ctx, "/rpcquery.Query/GetNetworkRegistry", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) GetValidatorSet(ctx context.Context, in *GetValidatorSetParam, opts ...grpc.CallOption) (*ValidatorSet, error) { out := new(ValidatorSet) err := c.cc.Invoke(ctx, "/rpcquery.Query/GetValidatorSet", in, out, opts...) @@ -1159,6 +1302,8 @@ type QueryServer interface { ListAccounts(*ListAccountsParam, Query_ListAccountsServer) error GetName(context.Context, *GetNameParam) (*names.Entry, error) ListNames(*ListNamesParam, Query_ListNamesServer) error + // GetNetworkRegistry returns for each validator address, the list of their identified node at the current state + GetNetworkRegistry(context.Context, *GetNetworkRegistryParam) (*NetworkRegistry, error) GetValidatorSet(context.Context, *GetValidatorSetParam) (*ValidatorSet, error) GetValidatorSetHistory(context.Context, *GetValidatorSetHistoryParam) (*ValidatorSetHistory, error) GetProposal(context.Context, *GetProposalParam) (*payload.Ballot, error) @@ -1303,6 +1448,24 @@ func (x *queryListNamesServer) Send(m *names.Entry) error { return x.ServerStream.SendMsg(m) } +func _Query_GetNetworkRegistry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNetworkRegistryParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetNetworkRegistry(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcquery.Query/GetNetworkRegistry", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetNetworkRegistry(ctx, req.(*GetNetworkRegistryParam)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_GetValidatorSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetValidatorSetParam) if err := dec(in); err != nil { @@ -1438,6 +1601,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "GetName", Handler: _Query_GetName_Handler, }, + { + MethodName: "GetNetworkRegistry", + Handler: _Query_GetNetworkRegistry_Handler, + }, { MethodName: "GetValidatorSet", Handler: _Query_GetValidatorSet_Handler, @@ -1627,6 +1794,18 @@ func (m *ListNamesParam) Size() (n int) { return n } +func (m *GetNetworkRegistryParam) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *GetValidatorSetParam) Size() (n int) { if m == nil { return 0 @@ -1654,6 +1833,42 @@ func (m *GetValidatorSetHistoryParam) Size() (n int) { return n } +func (m *NetworkRegistry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Set) > 0 { + for _, e := range m.Set { + l = e.Size() + n += 1 + l + sovRpcquery(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RegisteredValidator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Address.Size() + n += 1 + l + sovRpcquery(uint64(l)) + if m.Node != nil { + l = m.Node.Size() + n += 1 + l + sovRpcquery(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *ValidatorSetHistory) Size() (n int) { if m == nil { return 0 diff --git a/rpc/rpctransact/rpctransact.pb.go b/rpc/rpctransact/rpctransact.pb.go index 915e0c193..27a15d200 100644 --- a/rpc/rpctransact/rpctransact.pb.go +++ b/rpc/rpctransact/rpctransact.pb.go @@ -288,7 +288,7 @@ type TransactClient interface { SendTxSync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*exec.TxExecution, error) // Formulate and SendTx transaction signed server-side SendTxAsync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*txs.Receipt, error) - // Formualte a NameTx signed server-side and wait for it to be included in a block returning the registered name + // Formulate a NameTx signed server-side and wait for it to be included in a block returning the registered name NameTxSync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*exec.TxExecution, error) // Formulate a NameTx signed server-side NameTxAsync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*txs.Receipt, error) @@ -434,7 +434,7 @@ type TransactServer interface { SendTxSync(context.Context, *payload.SendTx) (*exec.TxExecution, error) // Formulate and SendTx transaction signed server-side SendTxAsync(context.Context, *payload.SendTx) (*txs.Receipt, error) - // Formualte a NameTx signed server-side and wait for it to be included in a block returning the registered name + // Formulate a NameTx signed server-side and wait for it to be included in a block returning the registered name NameTxSync(context.Context, *payload.NameTx) (*exec.TxExecution, error) // Formulate a NameTx signed server-side NameTxAsync(context.Context, *payload.NameTx) (*txs.Receipt, error) diff --git a/rpc/service.go b/rpc/service.go index 4a8f17a63..12263d913 100644 --- a/rpc/service.go +++ b/rpc/service.go @@ -28,6 +28,7 @@ import ( "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/names" + "github.com/hyperledger/burrow/execution/registry" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/structure" "github.com/hyperledger/burrow/permission" @@ -47,6 +48,7 @@ const MaxBlockLookback = 1000 type Service struct { state acmstate.IterableStatsReader nameReg names.IterableReader + nodeReg registry.IterableReader blockchain bcm.BlockchainInfo validators validator.History nodeView *tendermint.NodeView @@ -55,12 +57,13 @@ type Service struct { // Service provides an internal query and information service with serialisable return types on which can accomodate // a number of transport front ends -func NewService(state acmstate.IterableStatsReader, nameReg names.IterableReader, blockchain bcm.BlockchainInfo, +func NewService(state acmstate.IterableStatsReader, nameReg names.IterableReader, nodeReg registry.IterableReader, blockchain bcm.BlockchainInfo, validators validator.History, nodeView *tendermint.NodeView, logger *logging.Logger) *Service { return &Service{ state: state, nameReg: nameReg, + nodeReg: nodeReg, blockchain: blockchain, validators: validators, nodeView: nodeView, @@ -147,6 +150,22 @@ func (s *Service) Network() (*ResultNetwork, error) { }, nil } +func (s *Service) NetworkRegistry() ([]*ResultNetworkRegistry, error) { + if s.nodeView == nil { + return nil, fmt.Errorf("cannot return network registry info because NodeView not mounted") + } + + rnr := make([]*ResultNetworkRegistry, 0) + err := s.nodeReg.IterateNodes(func(val crypto.Address, rn *registry.NodeIdentity) error { + rnr = append(rnr, &ResultNetworkRegistry{ + Address: val, + NodeIdentity: *rn, + }) + return nil + }) + return rnr, err +} + func (s *Service) Genesis() (*ResultGenesis, error) { return &ResultGenesis{ Genesis: s.blockchain.GenesisDoc(), diff --git a/txs/payload/identify_tx.go b/txs/payload/identify_tx.go new file mode 100644 index 000000000..e58e0fe92 --- /dev/null +++ b/txs/payload/identify_tx.go @@ -0,0 +1,35 @@ +package payload + +import ( + "fmt" + + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/registry" +) + +func NewIdentifyTx(address crypto.Address, node *registry.NodeIdentity) *IdentifyTx { + return &IdentifyTx{ + Inputs: []*TxInput{&TxInput{ + Address: address, + }}, + Node: node, + } +} + +func (tx *IdentifyTx) Type() Type { + return TypeIdentify +} + +func (tx *IdentifyTx) GetInputs() []*TxInput { + return tx.Inputs +} + +func (tx *IdentifyTx) String() string { + return fmt.Sprintf("IdentifyTx{%v -> %v}", tx.Inputs, tx.Node.NetworkAddress) +} + +func (tx *IdentifyTx) Any() *Any { + return &Any{ + IdentifyTx: tx, + } +} diff --git a/txs/payload/payload.go b/txs/payload/payload.go index 95bdbe777..eb80edb88 100644 --- a/txs/payload/payload.go +++ b/txs/payload/payload.go @@ -40,6 +40,7 @@ const ( TypePermissions = Type(0x21) TypeGovernance = Type(0x22) TypeProposal = Type(0x23) + TypeIdentify = Type(0x24) ) type Payload interface { @@ -62,6 +63,7 @@ var nameFromType = map[Type]string{ TypeProposal: "ProposalTx", TypeBond: "BondTx", TypeUnbond: "UnbondTx", + TypeIdentify: "IdentifyTx", } var typeFromName = make(map[string]Type) @@ -130,6 +132,8 @@ func New(txType Type) (Payload, error) { return &UnbondTx{}, nil case TypeProposal: return &ProposalTx{}, nil + case TypeIdentify: + return &IdentifyTx{}, nil } return nil, fmt.Errorf("unknown payload type: %d", txType) } diff --git a/txs/payload/payload.pb.go b/txs/payload/payload.pb.go index a3b5e9b8f..b0f4a98d9 100644 --- a/txs/payload/payload.pb.go +++ b/txs/payload/payload.pb.go @@ -10,6 +10,7 @@ import ( golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" + registry "github.com/hyperledger/burrow/execution/registry" spec "github.com/hyperledger/burrow/genesis/spec" permission "github.com/hyperledger/burrow/permission" io "io" @@ -54,7 +55,7 @@ func (x Ballot_ProposalState) String() string { } func (Ballot_ProposalState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_678c914f1bee6d56, []int{15, 0} + return fileDescriptor_678c914f1bee6d56, []int{16, 0} } // Any encodes a sum type for which only one should be set @@ -68,6 +69,7 @@ type Any struct { UnbondTx *UnbondTx `protobuf:"bytes,7,opt,name=UnbondTx,proto3" json:"UnbondTx,omitempty"` BatchTx *BatchTx `protobuf:"bytes,8,opt,name=BatchTx,proto3" json:"BatchTx,omitempty"` ProposalTx *ProposalTx `protobuf:"bytes,9,opt,name=ProposalTx,proto3" json:"ProposalTx,omitempty"` + IdentifyTx *IdentifyTx `protobuf:"bytes,10,opt,name=IdentifyTx,proto3" json:"IdentifyTx,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -169,6 +171,13 @@ func (m *Any) GetProposalTx() *ProposalTx { return nil } +func (m *Any) GetIdentifyTx() *IdentifyTx { + if m != nil { + return m.IdentifyTx + } + return nil +} + func (*Any) XXX_MessageName() string { return "payload.Any" } @@ -803,6 +812,52 @@ func (*ProposalTx) XXX_MessageName() string { return "payload.ProposalTx" } +type IdentifyTx struct { + // Senders + Inputs []*TxInput `protobuf:"bytes,1,rep,name=Inputs,proto3" json:"Inputs,omitempty"` + // Node to register + Node *registry.NodeIdentity `protobuf:"bytes,2,opt,name=Node,proto3" json:"Node,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IdentifyTx) Reset() { *m = IdentifyTx{} } +func (*IdentifyTx) ProtoMessage() {} +func (*IdentifyTx) Descriptor() ([]byte, []int) { + return fileDescriptor_678c914f1bee6d56, []int{12} +} +func (m *IdentifyTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IdentifyTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IdentifyTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *IdentifyTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_IdentifyTx.Merge(m, src) +} +func (m *IdentifyTx) XXX_Size() int { + return m.Size() +} +func (m *IdentifyTx) XXX_DiscardUnknown() { + xxx_messageInfo_IdentifyTx.DiscardUnknown(m) +} + +var xxx_messageInfo_IdentifyTx proto.InternalMessageInfo + +func (*IdentifyTx) XXX_MessageName() string { + return "payload.IdentifyTx" +} + type BatchTx struct { Inputs []*TxInput `protobuf:"bytes,1,rep,name=Inputs,proto3" json:"Inputs,omitempty"` Txs []*Any `protobuf:"bytes,2,rep,name=Txs,proto3" json:"Txs,omitempty"` @@ -814,7 +869,7 @@ type BatchTx struct { func (m *BatchTx) Reset() { *m = BatchTx{} } func (*BatchTx) ProtoMessage() {} func (*BatchTx) Descriptor() ([]byte, []int) { - return fileDescriptor_678c914f1bee6d56, []int{12} + return fileDescriptor_678c914f1bee6d56, []int{13} } func (m *BatchTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -858,7 +913,7 @@ type Vote struct { func (m *Vote) Reset() { *m = Vote{} } func (*Vote) ProtoMessage() {} func (*Vote) Descriptor() ([]byte, []int) { - return fileDescriptor_678c914f1bee6d56, []int{13} + return fileDescriptor_678c914f1bee6d56, []int{14} } func (m *Vote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -903,7 +958,7 @@ type Proposal struct { func (m *Proposal) Reset() { *m = Proposal{} } func (*Proposal) ProtoMessage() {} func (*Proposal) Descriptor() ([]byte, []int) { - return fileDescriptor_678c914f1bee6d56, []int{14} + return fileDescriptor_678c914f1bee6d56, []int{15} } func (m *Proposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -950,7 +1005,7 @@ func (m *Ballot) Reset() { *m = Ballot{} } func (m *Ballot) String() string { return proto.CompactTextString(m) } func (*Ballot) ProtoMessage() {} func (*Ballot) Descriptor() ([]byte, []int) { - return fileDescriptor_678c914f1bee6d56, []int{15} + return fileDescriptor_678c914f1bee6d56, []int{16} } func (m *Ballot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1030,6 +1085,8 @@ func init() { golang_proto.RegisterType((*GovTx)(nil), "payload.GovTx") proto.RegisterType((*ProposalTx)(nil), "payload.ProposalTx") golang_proto.RegisterType((*ProposalTx)(nil), "payload.ProposalTx") + proto.RegisterType((*IdentifyTx)(nil), "payload.IdentifyTx") + golang_proto.RegisterType((*IdentifyTx)(nil), "payload.IdentifyTx") proto.RegisterType((*BatchTx)(nil), "payload.BatchTx") golang_proto.RegisterType((*BatchTx)(nil), "payload.BatchTx") proto.RegisterType((*Vote)(nil), "payload.Vote") @@ -1044,73 +1101,76 @@ func init() { proto.RegisterFile("payload.proto", fileDescriptor_678c914f1bee6d5 func init() { golang_proto.RegisterFile("payload.proto", fileDescriptor_678c914f1bee6d56) } var fileDescriptor_678c914f1bee6d56 = []byte{ - // 1045 bytes of a gzipped FileDescriptorProto + // 1099 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x66, 0x37, 0xb6, 0xfb, 0xea, 0x04, 0x77, 0xa0, 0xc8, 0x8a, 0x84, 0x1d, 0x19, 0x04, - 0x29, 0x34, 0x0e, 0xa4, 0xfc, 0x11, 0xb9, 0x20, 0xff, 0x4b, 0x1a, 0xd4, 0x36, 0x66, 0xbc, 0x69, - 0x11, 0x88, 0xc3, 0x78, 0x3d, 0xac, 0x57, 0xb2, 0x77, 0x96, 0xdd, 0x71, 0x59, 0x73, 0xe2, 0xc0, - 0x81, 0x2b, 0xe2, 0xc2, 0x31, 0xdf, 0x00, 0xf1, 0x0d, 0x38, 0xe6, 0xc8, 0x99, 0x43, 0x84, 0xd2, - 0x0b, 0xe2, 0x53, 0xa0, 0x99, 0x9d, 0x59, 0xaf, 0xdd, 0xaa, 0x75, 0x22, 0xc4, 0x6d, 0xe7, 0xbd, - 0xdf, 0xbc, 0xf7, 0xe6, 0xf7, 0x7e, 0xf3, 0x66, 0x61, 0x3d, 0x20, 0xd3, 0x11, 0x23, 0x83, 0x7a, - 0x10, 0x32, 0xce, 0x50, 0x5e, 0x2d, 0x37, 0x77, 0x5c, 0x8f, 0x0f, 0x27, 0xfd, 0xba, 0xc3, 0xc6, - 0xbb, 0x2e, 0x73, 0xd9, 0xae, 0xf4, 0xf7, 0x27, 0x5f, 0xcb, 0x95, 0x5c, 0xc8, 0xaf, 0x64, 0xdf, - 0x66, 0x29, 0xa0, 0xe1, 0xd8, 0x8b, 0x22, 0x8f, 0xf9, 0xca, 0x02, 0x51, 0x40, 0x9d, 0xe4, 0xbb, - 0xf6, 0x93, 0x09, 0x66, 0xc3, 0x9f, 0xa2, 0xb7, 0x20, 0xd7, 0x22, 0xa3, 0x91, 0x1d, 0x97, 0x8d, - 0x2d, 0x63, 0xfb, 0xfa, 0xde, 0x4b, 0x75, 0x9d, 0x3d, 0x31, 0x63, 0xe5, 0x16, 0xc0, 0x1e, 0xf5, - 0x07, 0x76, 0x5c, 0x5e, 0x5d, 0x00, 0x26, 0x66, 0xac, 0xdc, 0x02, 0xf8, 0x80, 0x8c, 0xa9, 0x1d, - 0x97, 0xcd, 0x05, 0x60, 0x62, 0xc6, 0xca, 0x8d, 0xde, 0x86, 0x7c, 0x97, 0x86, 0xe3, 0xc8, 0x8e, - 0xcb, 0x96, 0x44, 0x96, 0x52, 0xa4, 0xb2, 0x63, 0x0d, 0x40, 0x6f, 0xc0, 0xda, 0x21, 0x7b, 0x6c, - 0xc7, 0xe5, 0x35, 0x89, 0xdc, 0x48, 0x91, 0xd2, 0x8a, 0x13, 0xa7, 0x48, 0xdd, 0x64, 0xb2, 0xc6, - 0xdc, 0x42, 0xea, 0xc4, 0x8c, 0x95, 0x1b, 0xed, 0x40, 0xe1, 0xc4, 0xef, 0x27, 0xd0, 0xbc, 0x84, - 0xde, 0x48, 0xa1, 0xda, 0x81, 0x53, 0x88, 0xa8, 0xb4, 0x49, 0xb8, 0x33, 0xb4, 0xe3, 0x72, 0x61, - 0xa1, 0x52, 0x65, 0xc7, 0x1a, 0x80, 0xee, 0x00, 0x74, 0x43, 0x16, 0xb0, 0x88, 0x08, 0x52, 0xaf, - 0x49, 0xf8, 0xcb, 0xb3, 0x83, 0xa5, 0x2e, 0x9c, 0x81, 0xed, 0x5b, 0x67, 0xa7, 0x55, 0xa3, 0xf6, - 0xb3, 0x01, 0x79, 0x3b, 0x3e, 0xf2, 0x83, 0x09, 0x47, 0x0f, 0x20, 0xdf, 0x18, 0x0c, 0x42, 0x1a, - 0x45, 0xb2, 0x31, 0xc5, 0xe6, 0xfb, 0x67, 0xe7, 0xd5, 0x95, 0x3f, 0xcf, 0xab, 0xb7, 0x33, 0x2a, - 0x18, 0x4e, 0x03, 0x1a, 0x8e, 0xe8, 0xc0, 0xa5, 0xe1, 0x6e, 0x7f, 0x12, 0x86, 0xec, 0xdb, 0x5d, - 0x27, 0x9c, 0x06, 0x9c, 0xd5, 0xd5, 0x5e, 0xac, 0x83, 0xa0, 0x57, 0x21, 0xd7, 0x18, 0xb3, 0x89, - 0xcf, 0x65, 0xfb, 0x2c, 0xac, 0x56, 0x68, 0x13, 0x0a, 0x3d, 0xfa, 0xcd, 0x84, 0xfa, 0x0e, 0x95, - 0xfd, 0xb2, 0x70, 0xba, 0xde, 0xb7, 0x7e, 0x39, 0xad, 0xae, 0xd4, 0x62, 0x28, 0xd8, 0xf1, 0xf1, - 0x84, 0xff, 0x8f, 0x55, 0xa9, 0xcc, 0xbf, 0x9a, 0x5a, 0x9c, 0xe8, 0x4d, 0x58, 0x93, 0xbc, 0x28, - 0x95, 0xce, 0xf8, 0x57, 0x7c, 0xe1, 0xc4, 0x8d, 0x3e, 0x9d, 0x15, 0xb8, 0x2a, 0x0b, 0x7c, 0xf7, - 0xea, 0xc5, 0x6d, 0x42, 0xe1, 0x90, 0x44, 0xf7, 0xbc, 0xb1, 0xc7, 0x35, 0x35, 0x7a, 0x8d, 0x4a, - 0x60, 0x1e, 0x50, 0x2a, 0x75, 0x6b, 0x61, 0xf1, 0x89, 0x8e, 0xc0, 0x6a, 0x13, 0x4e, 0xa4, 0x40, - 0x8b, 0xcd, 0x0f, 0x14, 0x2f, 0x3b, 0xcf, 0x4f, 0xdd, 0xf7, 0x7c, 0x12, 0x4e, 0xeb, 0x77, 0x69, - 0xdc, 0x9c, 0x72, 0x1a, 0x61, 0x19, 0x02, 0x7d, 0x09, 0xd6, 0xa3, 0x46, 0xef, 0xbe, 0x14, 0x71, - 0xb1, 0x79, 0x78, 0xa5, 0x50, 0xff, 0x9c, 0x57, 0x37, 0x38, 0x71, 0xa3, 0xdb, 0x6c, 0xec, 0x71, - 0x3a, 0x0e, 0xf8, 0x14, 0xcb, 0xa0, 0xe8, 0x63, 0x28, 0xb6, 0x98, 0xcf, 0x43, 0xe2, 0xf0, 0xfb, - 0x94, 0x93, 0x72, 0x7e, 0xcb, 0xdc, 0xbe, 0xbe, 0x77, 0x73, 0x76, 0xed, 0x33, 0x4e, 0x3c, 0x07, - 0x55, 0x84, 0x74, 0x43, 0xcf, 0xa1, 0xf2, 0x1e, 0x24, 0x84, 0xc8, 0xb5, 0xea, 0xd8, 0x64, 0x3e, - 0x38, 0xfa, 0x0c, 0x0a, 0x2d, 0x36, 0xa0, 0x77, 0x49, 0x34, 0x54, 0x82, 0xb9, 0x22, 0x31, 0x69, - 0x18, 0x84, 0xc0, 0x92, 0x75, 0x8b, 0xf6, 0x5e, 0xc3, 0xf2, 0xbb, 0xe6, 0xe9, 0xd9, 0x84, 0xb6, - 0x21, 0x27, 0x85, 0x20, 0xf4, 0x69, 0x3e, 0x53, 0x28, 0xca, 0x8f, 0xde, 0x81, 0x7c, 0x22, 0x6a, - 0xa1, 0x14, 0x73, 0x6e, 0x02, 0x68, 0xb9, 0x63, 0x8d, 0xd8, 0x2f, 0xfc, 0x78, 0x5a, 0x5d, 0x91, - 0x27, 0x64, 0xe9, 0xd0, 0x5a, 0x5a, 0x93, 0x1f, 0x42, 0x41, 0x6c, 0x69, 0x84, 0x6e, 0xa4, 0x66, - 0xe7, 0x2b, 0xf5, 0xcc, 0x6c, 0xd6, 0xbe, 0xa6, 0x25, 0xa8, 0xc1, 0x29, 0x56, 0x51, 0x1a, 0xe8, - 0x71, 0xba, 0x74, 0x3e, 0x04, 0x96, 0xd8, 0xa1, 0x19, 0x12, 0xdf, 0xc2, 0x26, 0xd5, 0x69, 0x26, - 0x36, 0x29, 0xb3, 0xa7, 0x34, 0xac, 0x32, 0xee, 0xeb, 0x29, 0xba, 0x6c, 0xc6, 0x0c, 0x3d, 0xee, - 0x6c, 0xb0, 0x2e, 0x5d, 0xef, 0x2d, 0xc8, 0x25, 0x3c, 0x2b, 0x76, 0x9e, 0xd1, 0x08, 0x05, 0xc8, - 0x24, 0xfa, 0xde, 0x50, 0x2f, 0xc2, 0x25, 0x5a, 0xde, 0x82, 0x8d, 0x86, 0xe3, 0x88, 0x01, 0x73, - 0x12, 0x0c, 0x08, 0xa7, 0xba, 0xf3, 0x37, 0xeb, 0xf2, 0x61, 0xb4, 0xe9, 0x38, 0x18, 0x11, 0x4e, - 0x15, 0x46, 0xf6, 0xc3, 0xc0, 0x0b, 0x5b, 0x32, 0x25, 0xfc, 0x6d, 0x64, 0x47, 0xfd, 0xd2, 0xc7, - 0xad, 0x41, 0xf1, 0x21, 0xe3, 0x9e, 0xef, 0x3e, 0xa2, 0x9e, 0x3b, 0x4c, 0x0e, 0x6d, 0xe2, 0x39, - 0x1b, 0x3a, 0x81, 0xa2, 0x8e, 0x2c, 0xef, 0x8e, 0x29, 0xef, 0xce, 0x7b, 0x97, 0xbf, 0x37, 0x73, - 0x61, 0xc4, 0xb3, 0xa7, 0xd7, 0xea, 0xc9, 0xbd, 0xf1, 0xd4, 0xcb, 0x84, 0x53, 0x48, 0xe6, 0xa8, - 0x5f, 0xa5, 0x0f, 0xe0, 0x25, 0xe8, 0xae, 0x80, 0x69, 0xc7, 0x9a, 0xe3, 0x62, 0x0a, 0x6b, 0xf8, - 0x53, 0x2c, 0x1c, 0x99, 0xf0, 0x3f, 0x18, 0x60, 0x3d, 0x64, 0x9c, 0xfe, 0xe7, 0xef, 0xcb, 0x12, - 0x5c, 0x67, 0xca, 0x78, 0x3c, 0xa3, 0x27, 0xbd, 0x44, 0x46, 0xe6, 0x12, 0x6d, 0xc1, 0xf5, 0x36, - 0x8d, 0x9c, 0xd0, 0x0b, 0xb8, 0xc7, 0x7c, 0x75, 0xbf, 0xb2, 0xa6, 0xec, 0x8f, 0x82, 0xf9, 0x82, - 0x1f, 0x85, 0x4c, 0xde, 0xdf, 0x56, 0x21, 0xd7, 0x24, 0xa3, 0x11, 0xe3, 0x73, 0x1d, 0x32, 0x5e, - 0xd8, 0x21, 0xa1, 0x93, 0x03, 0xcf, 0x27, 0x23, 0xef, 0x3b, 0xcf, 0x77, 0xd5, 0xaf, 0xd9, 0xd5, - 0x74, 0x92, 0x0d, 0x83, 0x5a, 0xb0, 0x1e, 0xa8, 0x14, 0x3d, 0x4e, 0x78, 0x32, 0x23, 0x36, 0xf6, - 0x5e, 0xcb, 0x1c, 0x46, 0x54, 0x9b, 0x56, 0x24, 0x41, 0x78, 0x7e, 0x0f, 0x7a, 0x1d, 0xd6, 0x44, - 0x4f, 0xa3, 0xf2, 0x9a, 0x14, 0xc0, 0x7a, 0xba, 0x59, 0x58, 0x71, 0xe2, 0xab, 0x7d, 0x04, 0xeb, - 0x73, 0x41, 0x50, 0x11, 0x0a, 0x5d, 0x7c, 0xdc, 0x3d, 0xee, 0x75, 0xda, 0xa5, 0x15, 0xb1, 0xea, - 0x7c, 0xde, 0x69, 0x9d, 0xd8, 0x9d, 0x76, 0xc9, 0x40, 0x00, 0xb9, 0x83, 0xc6, 0xd1, 0xbd, 0x4e, - 0xbb, 0xb4, 0xda, 0xfc, 0xe4, 0xec, 0xa2, 0x62, 0xfc, 0x71, 0x51, 0x31, 0xfe, 0xba, 0xa8, 0x18, - 0xbf, 0x3f, 0xa9, 0x18, 0x67, 0x4f, 0x2a, 0xc6, 0x17, 0xb7, 0x9e, 0x7f, 0x6a, 0x1e, 0x47, 0xbb, - 0xaa, 0x8a, 0x7e, 0x4e, 0xfe, 0x07, 0xdf, 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0x12, 0x32, 0x20, - 0x16, 0x6e, 0x0b, 0x00, 0x00, + 0x14, 0xcf, 0x66, 0x37, 0xb6, 0xfb, 0xe2, 0x04, 0x77, 0xa0, 0x95, 0x15, 0x09, 0x3b, 0x32, 0x08, + 0xd2, 0xd2, 0x38, 0x90, 0xf2, 0x47, 0xe4, 0x82, 0xfc, 0x2f, 0x69, 0x50, 0x9b, 0x98, 0xf1, 0xa6, + 0x45, 0x20, 0x0e, 0xeb, 0xf5, 0x74, 0xbd, 0x92, 0xbd, 0xb3, 0xec, 0x8e, 0xcb, 0x2e, 0x27, 0x0e, + 0x1c, 0xb8, 0x73, 0xe1, 0x98, 0x6f, 0x80, 0xf8, 0x06, 0x9c, 0x50, 0x8e, 0x9c, 0x39, 0x44, 0x28, + 0xbd, 0x20, 0x3e, 0x05, 0x9a, 0xd9, 0xd9, 0xf5, 0xd8, 0xad, 0x5a, 0x27, 0x42, 0xbd, 0xcd, 0x7b, + 0xef, 0x37, 0xef, 0xbd, 0x79, 0xef, 0x37, 0x6f, 0x06, 0xd6, 0x7c, 0x2b, 0x1e, 0x51, 0x6b, 0x50, + 0xf7, 0x03, 0xca, 0x28, 0xca, 0x4b, 0x71, 0x63, 0xdb, 0x71, 0xd9, 0x70, 0xd2, 0xaf, 0xdb, 0x74, + 0xbc, 0xe3, 0x50, 0x87, 0xee, 0x08, 0x7b, 0x7f, 0xf2, 0x58, 0x48, 0x42, 0x10, 0xab, 0x64, 0xdf, + 0x46, 0xc9, 0x27, 0xc1, 0xd8, 0x0d, 0x43, 0x97, 0x7a, 0x52, 0xb3, 0x1e, 0x10, 0xc7, 0x0d, 0x59, + 0x10, 0x4b, 0x19, 0x42, 0x9f, 0xd8, 0xc9, 0xba, 0xf6, 0x87, 0x0e, 0x7a, 0xc3, 0x8b, 0xd1, 0xbb, + 0x90, 0x6b, 0x59, 0xa3, 0x91, 0x19, 0x95, 0xb5, 0x4d, 0x6d, 0x6b, 0x75, 0xf7, 0xb5, 0x7a, 0x9a, + 0x4d, 0xa2, 0xc6, 0xd2, 0xcc, 0x81, 0x3d, 0xe2, 0x0d, 0xcc, 0xa8, 0xbc, 0x3c, 0x07, 0x4c, 0xd4, + 0x58, 0x9a, 0x39, 0xf0, 0xc8, 0x1a, 0x13, 0x33, 0x2a, 0xeb, 0x73, 0xc0, 0x44, 0x8d, 0xa5, 0x19, + 0xdd, 0x86, 0x7c, 0x97, 0x04, 0xe3, 0xd0, 0x8c, 0xca, 0x86, 0x40, 0x96, 0x32, 0xa4, 0xd4, 0xe3, + 0x14, 0x80, 0xde, 0x86, 0x95, 0x03, 0xfa, 0xc4, 0x8c, 0xca, 0x2b, 0x02, 0xb9, 0x9e, 0x21, 0x85, + 0x16, 0x27, 0x46, 0x1e, 0xba, 0x49, 0x45, 0x8e, 0xb9, 0xb9, 0xd0, 0x89, 0x1a, 0x4b, 0x33, 0xda, + 0x86, 0xc2, 0x89, 0xd7, 0x4f, 0xa0, 0x79, 0x01, 0xbd, 0x9e, 0x41, 0x53, 0x03, 0xce, 0x20, 0x3c, + 0xd3, 0xa6, 0xc5, 0xec, 0xa1, 0x19, 0x95, 0x0b, 0x73, 0x99, 0x4a, 0x3d, 0x4e, 0x01, 0xe8, 0x2e, + 0x40, 0x37, 0xa0, 0x3e, 0x0d, 0x2d, 0x5e, 0xd4, 0x6b, 0x02, 0xfe, 0xfa, 0xf4, 0x60, 0x99, 0x09, + 0x2b, 0x30, 0xbe, 0xe9, 0x70, 0x40, 0x3c, 0xe6, 0x3e, 0x8e, 0xcd, 0xa8, 0x0c, 0x73, 0x9b, 0xa6, + 0x26, 0xac, 0xc0, 0xf6, 0x8c, 0xb3, 0xd3, 0xaa, 0x56, 0xfb, 0x59, 0x83, 0xbc, 0x19, 0x1d, 0x7a, + 0xfe, 0x84, 0xa1, 0x23, 0xc8, 0x37, 0x06, 0x83, 0x80, 0x84, 0xa1, 0xe8, 0x66, 0xb1, 0xf9, 0xe1, + 0xd9, 0x79, 0x75, 0xe9, 0xaf, 0xf3, 0xea, 0x1d, 0x85, 0x4a, 0xc3, 0xd8, 0x27, 0xc1, 0x88, 0x0c, + 0x1c, 0x12, 0xec, 0xf4, 0x27, 0x41, 0x40, 0xbf, 0xdb, 0xb1, 0x83, 0xd8, 0x67, 0xb4, 0x2e, 0xf7, + 0xe2, 0xd4, 0x09, 0xba, 0x09, 0xb9, 0xc6, 0x98, 0x4e, 0x3c, 0x26, 0x7a, 0x6e, 0x60, 0x29, 0xa1, + 0x0d, 0x28, 0xf4, 0xc8, 0xb7, 0x13, 0xe2, 0xd9, 0x44, 0x34, 0xd9, 0xc0, 0x99, 0xbc, 0x67, 0xfc, + 0x72, 0x5a, 0x5d, 0xaa, 0x45, 0x50, 0x30, 0xa3, 0xe3, 0x09, 0x7b, 0x85, 0x59, 0xc9, 0xc8, 0xbf, + 0xea, 0x29, 0xa3, 0xd1, 0x3b, 0xb0, 0x22, 0xea, 0x22, 0xa9, 0x3d, 0x6d, 0x9a, 0xac, 0x17, 0x4e, + 0xcc, 0xe8, 0xf3, 0x69, 0x82, 0xcb, 0x22, 0xc1, 0xf7, 0xaf, 0x9e, 0xdc, 0x06, 0x14, 0x0e, 0xac, + 0xf0, 0xbe, 0x3b, 0x76, 0x59, 0x5a, 0x9a, 0x54, 0x46, 0x25, 0xd0, 0xf7, 0x09, 0x11, 0x64, 0x37, + 0x30, 0x5f, 0xa2, 0x43, 0x30, 0xda, 0x16, 0xb3, 0x04, 0xab, 0x8b, 0xcd, 0x8f, 0x64, 0x5d, 0xb6, + 0x5f, 0x1c, 0xba, 0xef, 0x7a, 0x56, 0x10, 0xd7, 0xef, 0x91, 0xa8, 0x19, 0x33, 0x12, 0x62, 0xe1, + 0x02, 0x7d, 0x0d, 0xc6, 0xa3, 0x46, 0xef, 0x81, 0x60, 0x7e, 0xb1, 0x79, 0x70, 0x25, 0x57, 0xff, + 0x9e, 0x57, 0xd7, 0x99, 0xe5, 0x84, 0x77, 0xe8, 0xd8, 0x65, 0x64, 0xec, 0xb3, 0x18, 0x0b, 0xa7, + 0xe8, 0x53, 0x28, 0xb6, 0xa8, 0xc7, 0x02, 0xcb, 0x66, 0x0f, 0x08, 0xb3, 0xca, 0xf9, 0x4d, 0x7d, + 0x6b, 0x75, 0xf7, 0xc6, 0x74, 0x56, 0x28, 0x46, 0x3c, 0x03, 0x95, 0x05, 0xe9, 0x06, 0xae, 0x4d, + 0xc4, 0xe5, 0x49, 0x0a, 0x22, 0x64, 0xd9, 0xb1, 0xc9, 0xac, 0x73, 0xf4, 0x05, 0x14, 0x5a, 0x74, + 0x40, 0xee, 0x59, 0xe1, 0x50, 0x12, 0xe6, 0x8a, 0x85, 0xc9, 0xdc, 0x20, 0x04, 0x86, 0xc8, 0x9b, + 0xb7, 0xf7, 0x1a, 0x16, 0xeb, 0x9a, 0x9b, 0x0e, 0x34, 0xb4, 0x05, 0x39, 0x41, 0x04, 0xce, 0x4f, + 0xfd, 0xb9, 0x44, 0x91, 0x76, 0xf4, 0x1e, 0xe4, 0x13, 0x52, 0x73, 0xa6, 0xe8, 0x33, 0x63, 0x23, + 0xa5, 0x3b, 0x4e, 0x11, 0x7b, 0x85, 0x9f, 0x4e, 0xab, 0x4b, 0xe2, 0x84, 0x34, 0x9b, 0x74, 0x0b, + 0x73, 0xf2, 0x63, 0x28, 0xf0, 0x2d, 0x8d, 0xc0, 0x09, 0xe5, 0xc0, 0x7d, 0xa3, 0xae, 0x0c, 0xf8, + 0xd4, 0xd6, 0x34, 0x78, 0x69, 0x70, 0x86, 0x95, 0x25, 0xf5, 0xd3, 0x19, 0xbc, 0x70, 0x3c, 0x04, + 0x06, 0xdf, 0x91, 0x56, 0x88, 0xaf, 0xb9, 0x4e, 0xb0, 0x53, 0x4f, 0x74, 0x82, 0x66, 0xcf, 0x70, + 0x58, 0x46, 0xdc, 0x4b, 0x47, 0xef, 0xa2, 0x11, 0x95, 0xf2, 0x38, 0xd3, 0x69, 0xbc, 0x70, 0xbe, + 0xb7, 0x20, 0x97, 0xd4, 0x59, 0x56, 0xe7, 0x39, 0x8d, 0x90, 0x00, 0x25, 0xd0, 0x0f, 0x9a, 0x7c, + 0x46, 0x2e, 0xd1, 0xf2, 0x16, 0xac, 0x37, 0x6c, 0x9b, 0x0f, 0x98, 0x13, 0x7f, 0x60, 0x31, 0x92, + 0x76, 0xfe, 0x46, 0x5d, 0xbc, 0xa6, 0x26, 0x19, 0xfb, 0x23, 0x8b, 0x11, 0x89, 0x11, 0xfd, 0xd0, + 0xf0, 0xdc, 0x16, 0x25, 0x85, 0x7f, 0x34, 0xf5, 0x7d, 0x58, 0xf8, 0xb8, 0x35, 0x28, 0x3e, 0xa4, + 0xcc, 0xf5, 0x9c, 0x47, 0xc4, 0x75, 0x86, 0xc9, 0xa1, 0x75, 0x3c, 0xa3, 0x43, 0x27, 0x50, 0x4c, + 0x3d, 0x8b, 0xbb, 0xa3, 0x8b, 0xbb, 0xf3, 0xc1, 0xe5, 0xef, 0xcd, 0x8c, 0x1b, 0xfe, 0x56, 0xa6, + 0xb2, 0x7c, 0xa7, 0xaf, 0x3f, 0xf3, 0x9c, 0xe1, 0x0c, 0xa2, 0x1c, 0x75, 0xa4, 0x3e, 0x6a, 0x97, + 0xa8, 0xf8, 0x6d, 0x30, 0x8e, 0xe8, 0x80, 0xc8, 0xc6, 0xde, 0xac, 0x67, 0xbf, 0x18, 0xae, 0x4d, + 0x3c, 0xf2, 0xc1, 0xc4, 0x25, 0x25, 0xda, 0x37, 0xd9, 0x1b, 0x7d, 0x89, 0x50, 0x15, 0xd0, 0xcd, + 0x28, 0xed, 0x68, 0x31, 0x83, 0x35, 0xbc, 0x18, 0x73, 0x83, 0xe2, 0xfe, 0x47, 0x0d, 0x8c, 0x87, + 0x94, 0x91, 0xff, 0xfd, 0x35, 0x5b, 0xa0, 0xb3, 0x4a, 0x1a, 0x4f, 0xa6, 0xcd, 0xc8, 0xae, 0xac, + 0xa6, 0x5c, 0xd9, 0x4d, 0x58, 0x6d, 0x93, 0xd0, 0x0e, 0x5c, 0x9f, 0xb9, 0xd4, 0x93, 0xb7, 0x59, + 0x55, 0xa9, 0x7f, 0x19, 0xfd, 0x25, 0x7f, 0x19, 0x25, 0xee, 0x6f, 0xcb, 0x90, 0x6b, 0x5a, 0xa3, + 0x11, 0x65, 0x33, 0x7c, 0xd0, 0x5e, 0xca, 0x07, 0xce, 0xca, 0x7d, 0xd7, 0xb3, 0x46, 0xee, 0xf7, + 0xae, 0xe7, 0xc8, 0xdf, 0xe3, 0xd5, 0x58, 0xa9, 0xba, 0x41, 0x2d, 0x58, 0xf3, 0x65, 0x88, 0x1e, + 0xb3, 0x58, 0x32, 0x91, 0xd6, 0x77, 0xdf, 0x54, 0x0e, 0xc3, 0xb3, 0xcd, 0x32, 0x12, 0x20, 0x3c, + 0xbb, 0x07, 0xbd, 0x05, 0x2b, 0xbc, 0xa7, 0x61, 0x79, 0x45, 0x10, 0x60, 0x2d, 0xdb, 0xcc, 0xb5, + 0x38, 0xb1, 0xd5, 0x3e, 0x81, 0xb5, 0x19, 0x27, 0xa8, 0x08, 0x85, 0x2e, 0x3e, 0xee, 0x1e, 0xf7, + 0x3a, 0xed, 0xd2, 0x12, 0x97, 0x3a, 0x5f, 0x76, 0x5a, 0x27, 0x66, 0xa7, 0x5d, 0xd2, 0x10, 0x40, + 0x6e, 0xbf, 0x71, 0x78, 0xbf, 0xd3, 0x2e, 0x2d, 0x37, 0x3f, 0x3b, 0xbb, 0xa8, 0x68, 0x7f, 0x5e, + 0x54, 0xb4, 0xbf, 0x2f, 0x2a, 0xda, 0xef, 0x4f, 0x2b, 0xda, 0xd9, 0xd3, 0x8a, 0xf6, 0xd5, 0xad, + 0x17, 0x9f, 0x9a, 0x45, 0xe1, 0x8e, 0xcc, 0xa2, 0x9f, 0x13, 0x5f, 0xf5, 0xbb, 0xff, 0x05, 0x00, + 0x00, 0xff, 0xff, 0x5c, 0xab, 0x20, 0xfa, 0x21, 0x0c, 0x00, 0x00, } func (m *Any) Marshal() (dAtA []byte, err error) { @@ -1218,6 +1278,16 @@ func (m *Any) MarshalTo(dAtA []byte) (int, error) { } i += n9 } + if m.IdentifyTx != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.IdentifyTx.Size())) + n10, err := m.IdentifyTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -1242,11 +1312,11 @@ func (m *TxInput) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) - n10, err := m.Address.MarshalTo(dAtA[i:]) + n11, err := m.Address.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 + i += n11 if m.Amount != 0 { dAtA[i] = 0x10 i++ @@ -1281,11 +1351,11 @@ func (m *TxOutput) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) - n11, err := m.Address.MarshalTo(dAtA[i:]) + n12, err := m.Address.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n12 if m.Amount != 0 { dAtA[i] = 0x10 i++ @@ -1316,21 +1386,21 @@ func (m *CallTx) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n12, err := m.Input.MarshalTo(dAtA[i:]) + n13, err := m.Input.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n13 } if m.Address != nil { dAtA[i] = 0x12 i++ i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) - n13, err := m.Address.MarshalTo(dAtA[i:]) + n14, err := m.Address.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n14 } if m.GasLimit != 0 { dAtA[i] = 0x18 @@ -1345,19 +1415,19 @@ func (m *CallTx) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintPayload(dAtA, i, uint64(m.Data.Size())) - n14, err := m.Data.MarshalTo(dAtA[i:]) + n15, err := m.Data.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n15 dAtA[i] = 0x32 i++ i = encodeVarintPayload(dAtA, i, uint64(m.WASM.Size())) - n15, err := m.WASM.MarshalTo(dAtA[i:]) + n16, err := m.WASM.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n16 if len(m.ContractMeta) > 0 { for _, msg := range m.ContractMeta { dAtA[i] = 0x3a @@ -1399,11 +1469,11 @@ func (m *ContractMeta) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintPayload(dAtA, i, uint64(m.CodeHash.Size())) - n16, err := m.CodeHash.MarshalTo(dAtA[i:]) + n17, err := m.CodeHash.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n17 if len(m.Meta) > 0 { dAtA[i] = 0x12 i++ @@ -1480,20 +1550,20 @@ func (m *PermsTx) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n17, err := m.Input.MarshalTo(dAtA[i:]) + n18, err := m.Input.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n18 } dAtA[i] = 0x12 i++ i = encodeVarintPayload(dAtA, i, uint64(m.PermArgs.Size())) - n18, err := m.PermArgs.MarshalTo(dAtA[i:]) + n19, err := m.PermArgs.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n19 if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -1519,11 +1589,11 @@ func (m *NameTx) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n19, err := m.Input.MarshalTo(dAtA[i:]) + n20, err := m.Input.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n20 } if len(m.Name) > 0 { dAtA[i] = 0x12 @@ -1567,11 +1637,11 @@ func (m *BondTx) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n20, err := m.Input.MarshalTo(dAtA[i:]) + n21, err := m.Input.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n21 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -1598,21 +1668,21 @@ func (m *UnbondTx) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n21, err := m.Input.MarshalTo(dAtA[i:]) + n22, err := m.Input.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n22 } if m.Output != nil { dAtA[i] = 0x12 i++ i = encodeVarintPayload(dAtA, i, uint64(m.Output.Size())) - n22, err := m.Output.MarshalTo(dAtA[i:]) + n23, err := m.Output.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n23 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -1684,11 +1754,11 @@ func (m *ProposalTx) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n23, err := m.Input.MarshalTo(dAtA[i:]) + n24, err := m.Input.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n24 } if m.VotingWeight != 0 { dAtA[i] = 0x10 @@ -1699,21 +1769,64 @@ func (m *ProposalTx) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintPayload(dAtA, i, uint64(m.ProposalHash.Size())) - n24, err := m.ProposalHash.MarshalTo(dAtA[i:]) + n25, err := m.ProposalHash.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n24 + i += n25 } if m.Proposal != nil { dAtA[i] = 0x22 i++ i = encodeVarintPayload(dAtA, i, uint64(m.Proposal.Size())) - n25, err := m.Proposal.MarshalTo(dAtA[i:]) + n26, err := m.Proposal.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n25 + i += n26 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *IdentifyTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IdentifyTx) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Inputs) > 0 { + for _, msg := range m.Inputs { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Node != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Node.Size())) + n27, err := m.Node.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -1784,11 +1897,11 @@ func (m *Vote) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) - n26, err := m.Address.MarshalTo(dAtA[i:]) + n28, err := m.Address.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n26 + i += n28 if m.VotingWeight != 0 { dAtA[i] = 0x10 i++ @@ -1831,11 +1944,11 @@ func (m *Proposal) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintPayload(dAtA, i, uint64(m.BatchTx.Size())) - n27, err := m.BatchTx.MarshalTo(dAtA[i:]) + n29, err := m.BatchTx.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n27 + i += n29 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -1862,21 +1975,21 @@ func (m *Ballot) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintPayload(dAtA, i, uint64(m.Proposal.Size())) - n28, err := m.Proposal.MarshalTo(dAtA[i:]) + n30, err := m.Proposal.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n28 + i += n30 } if m.FinalizingTx != nil { dAtA[i] = 0x12 i++ i = encodeVarintPayload(dAtA, i, uint64(m.FinalizingTx.Size())) - n29, err := m.FinalizingTx.MarshalTo(dAtA[i:]) + n31, err := m.FinalizingTx.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n29 + i += n31 } if m.ProposalState != 0 { dAtA[i] = 0x20 @@ -1952,6 +2065,10 @@ func (m *Any) Size() (n int) { l = m.ProposalTx.Size() n += 1 + l + sovPayload(uint64(l)) } + if m.IdentifyTx != nil { + l = m.IdentifyTx.Size() + n += 1 + l + sovPayload(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -2208,6 +2325,28 @@ func (m *ProposalTx) Size() (n int) { return n } +func (m *IdentifyTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Inputs) > 0 { + for _, e := range m.Inputs { + l = e.Size() + n += 1 + l + sovPayload(uint64(l)) + } + } + if m.Node != nil { + l = m.Node.Size() + n += 1 + l + sovPayload(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *BatchTx) Size() (n int) { if m == nil { return 0 @@ -2343,6 +2482,9 @@ func (this *Any) GetValue() interface{} { if this.ProposalTx != nil { return this.ProposalTx } + if this.IdentifyTx != nil { + return this.IdentifyTx + } return nil } @@ -2366,6 +2508,8 @@ func (this *Any) SetValue(value interface{}) bool { this.BatchTx = vt case *ProposalTx: this.ProposalTx = vt + case *IdentifyTx: + this.IdentifyTx = vt default: return false } @@ -2724,6 +2868,42 @@ func (m *Any) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdentifyTx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPayload + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPayload + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPayload + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.IdentifyTx == nil { + m.IdentifyTx = &IdentifyTx{} + } + if err := m.IdentifyTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPayload(dAtA[iNdEx:]) @@ -4317,6 +4497,130 @@ func (m *ProposalTx) Unmarshal(dAtA []byte) error { } return nil } +func (m *IdentifyTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPayload + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IdentifyTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IdentifyTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Inputs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPayload + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPayload + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPayload + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Inputs = append(m.Inputs, &TxInput{}) + if err := m.Inputs[len(m.Inputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPayload + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPayload + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPayload + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Node == nil { + m.Node = ®istry.NodeIdentity{} + } + if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPayload(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPayload + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPayload + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *BatchTx) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/txs/tx.go b/txs/tx.go index e3485d0ff..c86b52c84 100644 --- a/txs/tx.go +++ b/txs/tx.go @@ -283,5 +283,8 @@ func EnvelopeFromAny(chainID string, p *payload.Any) *Envelope { if p.UnbondTx != nil { return Enclose(chainID, p.UnbondTx) } + if p.IdentifyTx != nil { + return Enclose(chainID, p.IdentifyTx) + } return nil } From dc5c26dc0067099049d50420bf3a216462fcc16f Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 27 Sep 2019 15:46:17 +0100 Subject: [PATCH 019/185] build for more platforms Signed-off-by: Gregory Hill --- .goreleaser.yml | 5 +++++ core/kernel.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 0a27677c3..22041c245 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -9,6 +9,11 @@ builds: - -s -w - -X github.com/hyperledger/burrow/project.commit={{.Commit}} - -X github.com/hyperledger/burrow/project.date={{.Date}} + goos: + - darwin + - linux + - freebsd + - windows archive: replacements: darwin: Darwin diff --git a/core/kernel.go b/core/kernel.go index f915788af..f80aed9bc 100644 --- a/core/kernel.go +++ b/core/kernel.go @@ -314,7 +314,7 @@ func (kern *Kernel) supervise() { syncCh := make(chan os.Signal, 1) signal.Notify(shutdownCh, syscall.SIGINT, syscall.SIGTERM) signal.Notify(reloadCh, syscall.SIGHUP) - signal.Notify(syncCh, syscall.SIGUSR1) + signal.Notify(syncCh, syscall.SIGTRAP) for { select { case <-reloadCh: From 5b217a5e9f621c2f0720e5349382f07f4275df01 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Fri, 27 Sep 2019 16:06:52 +0100 Subject: [PATCH 020/185] Tweak identify docs and don't require account on chain matching validator address Signed-off-by: Silas Davis --- Makefile | 2 +- acm/acm.pb.go | 246 +++-- acm/balance/balance.pb.go | 49 +- acm/validator/validator.pb.go | 13 +- bcm/bcm.pb.go | 191 ++-- consensus/tendermint/tendermint.pb.go | 13 +- crypto/crypto.pb.go | 140 ++- dump/dump.pb.go | 288 ++--- encoding/encoding.pb.go | 49 +- execution/contexts/identify_context.go | 29 +- execution/errors/errors.pb.go | 52 +- execution/exec/exec.pb.go | 1348 +++++++++++++---------- execution/names/names.pb.go | 79 +- execution/registry/registry.go | 10 - execution/registry/registry.pb.go | 90 +- genesis/spec/spec.pb.go | 162 +-- go.mod | 31 +- go.sum | 85 ++ integration/governance/identify_test.go | 7 +- keys/keys.pb.go | 53 +- permission/permission.pb.go | 167 +-- protobuf/registry.proto | 8 +- rpc/rpc.pb.go | 13 +- rpc/rpcdump/rpcdump.pb.go | 23 +- rpc/rpcevents/rpcevents.pb.go | 367 +++--- rpc/rpcquery/rpcquery.pb.go | 62 +- rpc/rpctransact/rpctransact.pb.go | 224 ++-- storage/storage.pb.go | 52 +- txs/payload/payload.pb.go | 1160 +++++++++++-------- txs/txs.pb.go | 221 ++-- 30 files changed, 3047 insertions(+), 2187 deletions(-) diff --git a/Makefile b/Makefile index 7eab6f7d6..e81025b51 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ SHELL := /bin/bash REPO := $(shell pwd) # Protobuf generated go files -PROTO_FILES = $(shell find . -path ./vendor -prune -o -path ./.gopath_bos -prune -o -type f -name '*.proto' -print) +PROTO_FILES = $(shell find . -path ./node_modules -prune -o -path ./.gopath_bos -prune -o -type f -name '*.proto' -print) PROTO_GO_FILES = $(patsubst %.proto, %.pb.go, $(PROTO_FILES)) PROTO_GO_FILES_REAL = $(shell find . -path ./vendor -prune -o -type f -name '*.pb.go' -print) diff --git a/acm/acm.pb.go b/acm/acm.pb.go index 5084917ee..765cfadd2 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -5,6 +5,10 @@ package acm import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -12,8 +16,6 @@ import ( crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" permission "github.com/hyperledger/burrow/permission" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -56,7 +58,7 @@ func (m *Account) XXX_Unmarshal(b []byte) error { } func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -134,7 +136,7 @@ func (m *ContractMeta) XXX_Unmarshal(b []byte) error { } func (m *ContractMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -210,7 +212,7 @@ var fileDescriptor_49ed775bc0a6adf6 = []byte{ func (m *Account) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -218,100 +220,122 @@ func (m *Account) Marshal() (dAtA []byte, err error) { } func (m *Account) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.Address.Size())) - n1, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - dAtA[i] = 0x12 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.PublicKey.Size())) - n2, err := m.PublicKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n2 - if m.Sequence != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.Sequence)) + if m.Forebear != nil { + { + size := m.Forebear.Size() + i -= size + if _, err := m.Forebear.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAcm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 } - if m.Balance != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.Balance)) + if len(m.ContractMeta) > 0 { + for iNdEx := len(m.ContractMeta) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ContractMeta[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAcm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } } - dAtA[i] = 0x2a - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.EVMCode.Size())) - n3, err := m.EVMCode.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.CodeHash.Size() + i -= size + if _, err := m.CodeHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAcm(dAtA, i, uint64(size)) } - i += n3 - dAtA[i] = 0x32 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.Permissions.Size())) - n4, err := m.Permissions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + i-- + dAtA[i] = 0x42 + { + size := m.WASMCode.Size() + i -= size + if _, err := m.WASMCode.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAcm(dAtA, i, uint64(size)) } - i += n4 + i-- dAtA[i] = 0x3a - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.WASMCode.Size())) - n5, err := m.WASMCode.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - dAtA[i] = 0x42 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.CodeHash.Size())) - n6, err := m.CodeHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAcm(dAtA, i, uint64(size)) } - i += n6 - if len(m.ContractMeta) > 0 { - for _, msg := range m.ContractMeta { - dAtA[i] = 0x4a - i++ - i = encodeVarintAcm(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n + i-- + dAtA[i] = 0x32 + { + size := m.EVMCode.Size() + i -= size + if _, err := m.EVMCode.MarshalTo(dAtA[i:]); err != nil { + return 0, err } + i = encodeVarintAcm(dAtA, i, uint64(size)) } - if m.Forebear != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.Forebear.Size())) - n7, err := m.Forebear.MarshalTo(dAtA[i:]) + i-- + dAtA[i] = 0x2a + if m.Balance != 0 { + i = encodeVarintAcm(dAtA, i, uint64(m.Balance)) + i-- + dAtA[i] = 0x20 + } + if m.Sequence != 0 { + i = encodeVarintAcm(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x18 + } + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n7 + i -= size + i = encodeVarintAcm(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAcm(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *ContractMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -319,46 +343,59 @@ func (m *ContractMeta) Marshal() (dAtA []byte, err error) { } func (m *ContractMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContractMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.CodeHash.Size())) - n8, err := m.CodeHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - dAtA[i] = 0x12 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.MetadataHash.Size())) - n9, err := m.MetadataHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n9 if len(m.Metadata) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) i = encodeVarintAcm(dAtA, i, uint64(len(m.Metadata))) - i += copy(dAtA[i:], m.Metadata) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.MetadataHash.Size() + i -= size + if _, err := m.MetadataHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAcm(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0x12 + { + size := m.CodeHash.Size() + i -= size + if _, err := m.CodeHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAcm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func encodeVarintAcm(dAtA []byte, offset int, v uint64) int { + offset -= sovAcm(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Account) Size() (n int) { if m == nil { @@ -421,14 +458,7 @@ func (m *ContractMeta) Size() (n int) { } func sovAcm(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozAcm(x uint64) (n int) { return sovAcm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/acm/balance/balance.pb.go b/acm/balance/balance.pb.go index 30fe3253a..127a69e99 100644 --- a/acm/balance/balance.pb.go +++ b/acm/balance/balance.pb.go @@ -5,11 +5,13 @@ package balance import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -40,7 +42,7 @@ func (m *Balance) XXX_Unmarshal(b []byte) error { } func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -103,7 +105,7 @@ var fileDescriptor_ee25a00b628521b1 = []byte{ func (m *Balance) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -111,34 +113,42 @@ func (m *Balance) Marshal() (dAtA []byte, err error) { } func (m *Balance) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Balance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBalance(dAtA, i, uint64(m.Type)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Amount != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintBalance(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Type != 0 { + i = encodeVarintBalance(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintBalance(dAtA []byte, offset int, v uint64) int { + offset -= sovBalance(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Balance) Size() (n int) { if m == nil { @@ -159,14 +169,7 @@ func (m *Balance) Size() (n int) { } func sovBalance(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozBalance(x uint64) (n int) { return sovBalance(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/acm/validator/validator.pb.go b/acm/validator/validator.pb.go index 4ccac95a6..2caeb7c8a 100644 --- a/acm/validator/validator.pb.go +++ b/acm/validator/validator.pb.go @@ -5,12 +5,14 @@ package validator import ( fmt "fmt" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -123,14 +125,7 @@ func (m *Validator) Size() (n int) { } func sovValidator(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozValidator(x uint64) (n int) { return sovValidator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/bcm/bcm.pb.go b/bcm/bcm.pb.go index 9964a9c63..943ee484a 100644 --- a/bcm/bcm.pb.go +++ b/bcm/bcm.pb.go @@ -5,6 +5,11 @@ package bcm import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + time "time" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -12,9 +17,6 @@ import ( _ "github.com/golang/protobuf/ptypes/duration" _ "github.com/golang/protobuf/ptypes/timestamp" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" - io "io" - math "math" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. @@ -56,7 +58,7 @@ func (m *SyncInfo) XXX_Unmarshal(b []byte) error { } func (m *SyncInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -127,7 +129,7 @@ func (m *PersistedState) XXX_Unmarshal(b []byte) error { } func (m *PersistedState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -207,7 +209,7 @@ var fileDescriptor_0c9ff3e1ca1cc0f1 = []byte{ func (m *SyncInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -215,65 +217,75 @@ func (m *SyncInfo) Marshal() (dAtA []byte, err error) { } func (m *SyncInfo) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SyncInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.LatestBlockHeight != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBcm(dAtA, i, uint64(m.LatestBlockHeight)) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintBcm(dAtA, i, uint64(m.LatestBlockHash.Size())) - n1, err := m.LatestBlockHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n1 - dAtA[i] = 0x1a - i++ - i = encodeVarintBcm(dAtA, i, uint64(m.LatestAppHash.Size())) - n2, err := m.LatestAppHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.LatestBlockDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.LatestBlockDuration):]) + if err1 != nil { + return 0, err1 } - i += n2 - dAtA[i] = 0x22 - i++ - i = encodeVarintBcm(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockTime))) - n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockTime, dAtA[i:]) - if err != nil { - return 0, err + i -= n1 + i = encodeVarintBcm(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x32 + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockSeenTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockSeenTime):]) + if err2 != nil { + return 0, err2 } - i += n3 + i -= n2 + i = encodeVarintBcm(dAtA, i, uint64(n2)) + i-- dAtA[i] = 0x2a - i++ - i = encodeVarintBcm(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockSeenTime))) - n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockSeenTime, dAtA[i:]) - if err != nil { - return 0, err + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockTime):]) + if err3 != nil { + return 0, err3 } - i += n4 - dAtA[i] = 0x32 - i++ - i = encodeVarintBcm(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.LatestBlockDuration))) - n5, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.LatestBlockDuration, dAtA[i:]) - if err != nil { - return 0, err + i -= n3 + i = encodeVarintBcm(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x22 + { + size := m.LatestAppHash.Size() + i -= size + if _, err := m.LatestAppHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBcm(dAtA, i, uint64(size)) } - i += n5 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x1a + { + size := m.LatestBlockHash.Size() + i -= size + if _, err := m.LatestBlockHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBcm(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0x12 + if m.LatestBlockHeight != 0 { + i = encodeVarintBcm(dAtA, i, uint64(m.LatestBlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *PersistedState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -281,53 +293,65 @@ func (m *PersistedState) Marshal() (dAtA []byte, err error) { } func (m *PersistedState) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PersistedState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintBcm(dAtA, i, uint64(m.AppHashAfterLastBlock.Size())) - n6, err := m.AppHashAfterLastBlock.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - dAtA[i] = 0x12 - i++ - i = encodeVarintBcm(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime))) - n7, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size := m.GenesisHash.Size() + i -= size + if _, err := m.GenesisHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBcm(dAtA, i, uint64(size)) } - i += n7 + i-- + dAtA[i] = 0x22 if m.LastBlockHeight != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintBcm(dAtA, i, uint64(m.LastBlockHeight)) + i-- + dAtA[i] = 0x18 } - dAtA[i] = 0x22 - i++ - i = encodeVarintBcm(dAtA, i, uint64(m.GenesisHash.Size())) - n8, err := m.GenesisHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):]) + if err4 != nil { + return 0, err4 } - i += n8 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= n4 + i = encodeVarintBcm(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x12 + { + size := m.AppHashAfterLastBlock.Size() + i -= size + if _, err := m.AppHashAfterLastBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBcm(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func encodeVarintBcm(dAtA []byte, offset int, v uint64) int { + offset -= sovBcm(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *SyncInfo) Size() (n int) { if m == nil { @@ -376,14 +400,7 @@ func (m *PersistedState) Size() (n int) { } func sovBcm(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozBcm(x uint64) (n int) { return sovBcm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/consensus/tendermint/tendermint.pb.go b/consensus/tendermint/tendermint.pb.go index e69ccf726..7031992bb 100644 --- a/consensus/tendermint/tendermint.pb.go +++ b/consensus/tendermint/tendermint.pb.go @@ -5,12 +5,14 @@ package tendermint import ( fmt "fmt" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -182,14 +184,7 @@ func (m *NodeInfo) Size() (n int) { } func sovTendermint(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTendermint(x uint64) (n int) { return sovTendermint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/crypto/crypto.pb.go b/crypto/crypto.pb.go index aa7490042..c2e5b6c91 100644 --- a/crypto/crypto.pb.go +++ b/crypto/crypto.pb.go @@ -5,12 +5,14 @@ package crypto import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -43,7 +45,7 @@ func (m *PublicKey) XXX_Unmarshal(b []byte) error { } func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -92,7 +94,7 @@ func (m *PrivateKey) XXX_Unmarshal(b []byte) error { } func (m *PrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -132,7 +134,7 @@ func (m *Signature) XXX_Unmarshal(b []byte) error { } func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -204,7 +206,7 @@ var fileDescriptor_527278fb02d03321 = []byte{ func (m *PublicKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -212,33 +214,41 @@ func (m *PublicKey) Marshal() (dAtA []byte, err error) { } func (m *PublicKey) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CurveType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size := m.PublicKey.Size() + i -= size + if _, err := m.PublicKey.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintCrypto(dAtA, i, uint64(size)) } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintCrypto(dAtA, i, uint64(m.PublicKey.Size())) - n1, err := m.PublicKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.CurveType != 0 { + i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *PrivateKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -246,37 +256,45 @@ func (m *PrivateKey) Marshal() (dAtA []byte, err error) { } func (m *PrivateKey) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PrivateKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CurveType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) - } - if len(m.PublicKey) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintCrypto(dAtA, i, uint64(len(m.PublicKey))) - i += copy(dAtA[i:], m.PublicKey) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.PrivateKey) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.PrivateKey) + copy(dAtA[i:], m.PrivateKey) i = encodeVarintCrypto(dAtA, i, uint64(len(m.PrivateKey))) - i += copy(dAtA[i:], m.PrivateKey) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintCrypto(dAtA, i, uint64(len(m.PublicKey))) + i-- + dAtA[i] = 0x12 } - return i, nil + if m.CurveType != 0 { + i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *Signature) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -284,35 +302,44 @@ func (m *Signature) Marshal() (dAtA []byte, err error) { } func (m *Signature) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Signature) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CurveType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Signature) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) i = encodeVarintCrypto(dAtA, i, uint64(len(m.Signature))) - i += copy(dAtA[i:], m.Signature) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.CurveType != 0 { + i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintCrypto(dAtA []byte, offset int, v uint64) int { + offset -= sovCrypto(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *PublicKey) Size() (n int) { if m == nil { @@ -374,14 +401,7 @@ func (m *Signature) Size() (n int) { } func sovCrypto(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozCrypto(x uint64) (n int) { return sovCrypto(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/dump/dump.pb.go b/dump/dump.pb.go index ad3cfb437..78522ae90 100644 --- a/dump/dump.pb.go +++ b/dump/dump.pb.go @@ -5,6 +5,11 @@ package dump import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + time "time" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -15,9 +20,6 @@ import ( github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" exec "github.com/hyperledger/burrow/execution/exec" names "github.com/hyperledger/burrow/execution/names" - io "io" - math "math" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. @@ -52,7 +54,7 @@ func (m *Storage) XXX_Unmarshal(b []byte) error { } func (m *Storage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -93,7 +95,7 @@ func (m *AccountStorage) XXX_Unmarshal(b []byte) error { } func (m *AccountStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -147,7 +149,7 @@ func (m *EVMEvent) XXX_Unmarshal(b []byte) error { } func (m *EVMEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -219,7 +221,7 @@ func (m *Dump) XXX_Unmarshal(b []byte) error { } func (m *Dump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -327,7 +329,7 @@ var fileDescriptor_58418148159c29a6 = []byte{ func (m *Storage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -335,36 +337,46 @@ func (m *Storage) Marshal() (dAtA []byte, err error) { } func (m *Storage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Storage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Key.Size())) - n1, err := m.Key.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n1 - dAtA[i] = 0x12 - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Value.Size())) - n2, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDump(dAtA, i, uint64(size)) } - i += n2 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + { + size := m.Key.Size() + i -= size + if _, err := m.Key.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDump(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *AccountStorage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -372,40 +384,50 @@ func (m *AccountStorage) Marshal() (dAtA []byte, err error) { } func (m *AccountStorage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountStorage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Address.Size())) - n3, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n3 if len(m.Storage) > 0 { - for _, msg := range m.Storage { - dAtA[i] = 0x12 - i++ - i = encodeVarintDump(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Storage) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Storage[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDump(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDump(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *EVMEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -413,49 +435,58 @@ func (m *EVMEvent) Marshal() (dAtA []byte, err error) { } func (m *EVMEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EVMEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ChainID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDump(dAtA, i, uint64(len(m.ChainID))) - i += copy(dAtA[i:], m.ChainID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - dAtA[i] = 0x12 - i++ - i = encodeVarintDump(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) - n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) - if err != nil { - return 0, err + if m.Index != 0 { + i = encodeVarintDump(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x20 } - i += n4 if m.Event != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Event.Size())) - n5, err := m.Event.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDump(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0x1a } - if m.Index != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Index)) + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err2 != nil { + return 0, err2 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= n2 + i = encodeVarintDump(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x12 + if len(m.ChainID) > 0 { + i -= len(m.ChainID) + copy(dAtA[i:], m.ChainID) + i = encodeVarintDump(dAtA, i, uint64(len(m.ChainID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Dump) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -463,69 +494,85 @@ func (m *Dump) Marshal() (dAtA []byte, err error) { } func (m *Dump) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Dump) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Height)) - } - if m.Account != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Account.Size())) - n6, err := m.Account.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.AccountStorage != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintDump(dAtA, i, uint64(m.AccountStorage.Size())) - n7, err := m.AccountStorage.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Name != nil { + { + size, err := m.Name.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDump(dAtA, i, uint64(size)) } - i += n7 + i-- + dAtA[i] = 0x2a } if m.EVMEvent != nil { + { + size, err := m.EVMEvent.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDump(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x22 - i++ - i = encodeVarintDump(dAtA, i, uint64(m.EVMEvent.Size())) - n8, err := m.EVMEvent.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if m.AccountStorage != nil { + { + size, err := m.AccountStorage.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDump(dAtA, i, uint64(size)) } - i += n8 + i-- + dAtA[i] = 0x1a } - if m.Name != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Name.Size())) - n9, err := m.Name.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Account != nil { + { + size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDump(dAtA, i, uint64(size)) } - i += n9 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintDump(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintDump(dAtA []byte, offset int, v uint64) int { + offset -= sovDump(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Storage) Size() (n int) { if m == nil { @@ -620,14 +667,7 @@ func (m *Dump) Size() (n int) { } func sovDump(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozDump(x uint64) (n int) { return sovDump(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/encoding/encoding.pb.go b/encoding/encoding.pb.go index 19b1f18ab..5e5056430 100644 --- a/encoding/encoding.pb.go +++ b/encoding/encoding.pb.go @@ -5,11 +5,13 @@ package encoding import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -43,7 +45,7 @@ func (m *TestMessage) XXX_Unmarshal(b []byte) error { } func (m *TestMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -105,7 +107,7 @@ var fileDescriptor_ac330e3fa468db3c = []byte{ func (m *TestMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -113,34 +115,42 @@ func (m *TestMessage) Marshal() (dAtA []byte, err error) { } func (m *TestMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TestMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintEncoding(dAtA, i, uint64(m.Type)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Amount != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintEncoding(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Type != 0 { + i = encodeVarintEncoding(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintEncoding(dAtA []byte, offset int, v uint64) int { + offset -= sovEncoding(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *TestMessage) Size() (n int) { if m == nil { @@ -161,14 +171,7 @@ func (m *TestMessage) Size() (n int) { } func sovEncoding(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozEncoding(x uint64) (n int) { return sovEncoding(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/execution/contexts/identify_context.go b/execution/contexts/identify_context.go index 06a2c446b..de6017111 100644 --- a/execution/contexts/identify_context.go +++ b/execution/contexts/identify_context.go @@ -26,30 +26,23 @@ func (ctx *IdentifyContext) Execute(txe *exec.TxExecution, p payload.Payload) er return fmt.Errorf("payload must be IdentifyTx, but is: %v", txe.Envelope.Tx.Payload) } - accounts, _, err := getInputs(ctx.StateReader, ctx.tx.Inputs) + inputs, _, err := getInputs(ctx.StateReader, ctx.tx.Inputs) if err != nil { return err } - publicKey := ctx.tx.Node.ValidatorPublicKey - account, err := ctx.StateReader.GetAccount(publicKey.GetAddress()) - if err != nil { - return err - } else if account == nil { - ctx.Logger.InfoMsg("cannot find account", - "public_key", publicKey) - return errors.ErrorCodeInvalidAddress - } - - if _, ok := accounts[account.GetAddress()]; !ok { - return fmt.Errorf("target account %s not in tx inputs", account.Address.String()) - } - - // a pre-bonded node must submit on a peers behalf - err = oneHasPermission(ctx.StateReader, permission.Identify, accounts, ctx.Logger) + // One of our inputs must have identify permissions + err = oneHasPermission(ctx.StateReader, permission.Identify, inputs, ctx.Logger) if err != nil { return errors.Wrap(err, "at least one input lacks permission for IdentifyTx") } + // Registry updates must be consensual and binding so we requires signatures from the validator key of the node + // being added + validatorAddress := ctx.tx.Node.ValidatorPublicKey.GetAddress() + if _, ok := inputs[validatorAddress]; !ok { + return fmt.Errorf("IdentifyTx must be signed by node's validator key, but missing %v in inputs", + validatorAddress) + } - return ctx.NodeWriter.UpdateNode(account.GetAddress(), ctx.tx.Node) + return ctx.NodeWriter.UpdateNode(validatorAddress, ctx.tx.Node) } diff --git a/execution/errors/errors.pb.go b/execution/errors/errors.pb.go index 5eafb4e87..ac2825cfa 100644 --- a/execution/errors/errors.pb.go +++ b/execution/errors/errors.pb.go @@ -5,11 +5,13 @@ package errors import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -42,7 +44,7 @@ func (m *Exception) XXX_Unmarshal(b []byte) error { } func (m *Exception) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -105,7 +107,7 @@ var fileDescriptor_24fe73c7f0ddb19c = []byte{ func (m *Exception) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -113,35 +115,44 @@ func (m *Exception) Marshal() (dAtA []byte, err error) { } func (m *Exception) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Code != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintErrors(dAtA, i, uint64(m.Code)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Exception) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Exception) + copy(dAtA[i:], m.Exception) i = encodeVarintErrors(dAtA, i, uint64(len(m.Exception))) - i += copy(dAtA[i:], m.Exception) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Code != 0 { + i = encodeVarintErrors(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintErrors(dAtA []byte, offset int, v uint64) int { + offset -= sovErrors(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Exception) Size() (n int) { if m == nil { @@ -163,14 +174,7 @@ func (m *Exception) Size() (n int) { } func sovErrors(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozErrors(x uint64) (n int) { return sovErrors(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/execution/exec/exec.pb.go b/execution/exec/exec.pb.go index c0e6e4d92..d2623fb4a 100644 --- a/execution/exec/exec.pb.go +++ b/execution/exec/exec.pb.go @@ -5,6 +5,11 @@ package exec import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + time "time" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -20,9 +25,6 @@ import ( txs "github.com/hyperledger/burrow/txs" github_com_hyperledger_burrow_txs_payload "github.com/hyperledger/burrow/txs/payload" types "github.com/tendermint/tendermint/abci/types" - io "io" - math "math" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. @@ -57,7 +59,7 @@ func (m *StreamEvents) XXX_Unmarshal(b []byte) error { } func (m *StreamEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -109,7 +111,7 @@ func (m *StreamEvent) XXX_Unmarshal(b []byte) error { } func (m *StreamEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -186,7 +188,7 @@ func (m *BeginBlock) XXX_Unmarshal(b []byte) error { } func (m *BeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -240,7 +242,7 @@ func (m *EndBlock) XXX_Unmarshal(b []byte) error { } func (m *EndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -291,7 +293,7 @@ func (m *BeginTx) XXX_Unmarshal(b []byte) error { } func (m *BeginTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -353,7 +355,7 @@ func (m *EndTx) XXX_Unmarshal(b []byte) error { } func (m *EndTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -402,7 +404,7 @@ func (m *TxHeader) XXX_Unmarshal(b []byte) error { } func (m *TxHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -473,7 +475,7 @@ func (m *BlockExecution) XXX_Unmarshal(b []byte) error { } func (m *BlockExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -537,7 +539,7 @@ func (m *TxExecutionKey) XXX_Unmarshal(b []byte) error { } func (m *TxExecutionKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -603,7 +605,7 @@ func (m *TxExecution) XXX_Unmarshal(b []byte) error { } func (m *TxExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -685,7 +687,7 @@ func (m *Origin) XXX_Unmarshal(b []byte) error { } func (m *Origin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -765,7 +767,7 @@ func (m *Header) XXX_Unmarshal(b []byte) error { } func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -851,7 +853,7 @@ func (m *Event) XXX_Unmarshal(b []byte) error { } func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -941,7 +943,7 @@ func (m *Result) XXX_Unmarshal(b []byte) error { } func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1011,7 +1013,7 @@ func (m *LogEvent) XXX_Unmarshal(b []byte) error { } func (m *LogEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1055,7 +1057,7 @@ func (m *CallEvent) XXX_Unmarshal(b []byte) error { } func (m *CallEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1116,7 +1118,7 @@ func (m *GovernAccountEvent) XXX_Unmarshal(b []byte) error { } func (m *GovernAccountEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1163,7 +1165,7 @@ func (m *InputEvent) XXX_Unmarshal(b []byte) error { } func (m *InputEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1203,7 +1205,7 @@ func (m *OutputEvent) XXX_Unmarshal(b []byte) error { } func (m *OutputEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1247,7 +1249,7 @@ func (m *CallData) XXX_Unmarshal(b []byte) error { } func (m *CallData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1415,7 +1417,7 @@ var fileDescriptor_4d737c7315c25422 = []byte{ func (m *StreamEvents) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1423,32 +1425,40 @@ func (m *StreamEvents) Marshal() (dAtA []byte, err error) { } func (m *StreamEvents) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StreamEvents) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.StreamEvents) > 0 { - for _, msg := range m.StreamEvents { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.StreamEvents) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.StreamEvents[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *StreamEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1456,80 +1466,98 @@ func (m *StreamEvent) Marshal() (dAtA []byte, err error) { } func (m *StreamEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StreamEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.BeginBlock != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.BeginBlock.Size())) - n1, err := m.BeginBlock.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.BeginTx != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.BeginTx.Size())) - n2, err := m.BeginTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.EndBlock != nil { + { + size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0x32 } - if m.Envelope != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Envelope.Size())) - n3, err := m.Envelope.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.EndTx != nil { + { + size, err := m.EndTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x2a } if m.Event != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Event.Size())) - n4, err := m.Event.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n4 + i-- + dAtA[i] = 0x22 } - if m.EndTx != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.EndTx.Size())) - n5, err := m.EndTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Envelope != nil { + { + size := m.Envelope.Size() + i -= size + if _, err := m.Envelope.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0x1a } - if m.EndBlock != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.EndBlock.Size())) - n6, err := m.EndBlock.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.BeginTx != nil { + { + size, err := m.BeginTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n6 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.BeginBlock != nil { + { + size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *BeginBlock) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1537,35 +1565,43 @@ func (m *BeginBlock) Marshal() (dAtA []byte, err error) { } func (m *BeginBlock) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Height)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Header != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Header.Size())) - n7, err := m.Header.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n7 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *EndBlock) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1573,25 +1609,31 @@ func (m *EndBlock) Marshal() (dAtA []byte, err error) { } func (m *EndBlock) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if m.Height != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *BeginTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1599,50 +1641,62 @@ func (m *BeginTx) Marshal() (dAtA []byte, err error) { } func (m *BeginTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BeginTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TxHeader != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxHeader.Size())) - n8, err := m.TxHeader.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Exception != nil { + { + size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n8 + i-- + dAtA[i] = 0x22 } if m.Result != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Result.Size())) - n9, err := m.Result.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n9 + i-- + dAtA[i] = 0x12 } - if m.Exception != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Exception.Size())) - n10, err := m.Exception.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.TxHeader != nil { + { + size, err := m.TxHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n10 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *EndTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1650,28 +1704,36 @@ func (m *EndTx) Marshal() (dAtA []byte, err error) { } func (m *EndTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EndTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxHash.Size())) - n11, err := m.TxHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size := m.TxHash.Size() + i -= size + if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil } func (m *TxHeader) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1679,53 +1741,63 @@ func (m *TxHeader) Marshal() (dAtA []byte, err error) { } func (m *TxHeader) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TxType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxType)) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxHash.Size())) - n12, err := m.TxHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n12 - if m.Height != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Height)) + if m.Origin != nil { + { + size, err := m.Origin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } if m.Index != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintExec(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x20 } - if m.Origin != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Origin.Size())) - n13, err := m.Origin.MarshalTo(dAtA[i:]) - if err != nil { + if m.Height != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x18 + } + { + size := m.TxHash.Size() + i -= size + if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n13 + i = encodeVarintExec(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + if m.TxType != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.TxType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *BlockExecution) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1733,47 +1805,57 @@ func (m *BlockExecution) Marshal() (dAtA []byte, err error) { } func (m *BlockExecution) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Height)) - } - if m.Header != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Header.Size())) - n14, err := m.Header.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.TxExecutions) > 0 { - for _, msg := range m.TxExecutions { + for iNdEx := len(m.TxExecutions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TxExecutions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + } + } + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *TxExecutionKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1781,30 +1863,36 @@ func (m *TxExecutionKey) Marshal() (dAtA []byte, err error) { } func (m *TxExecutionKey) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxExecutionKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Height)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Offset != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintExec(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *TxExecution) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1812,94 +1900,114 @@ func (m *TxExecution) Marshal() (dAtA []byte, err error) { } func (m *TxExecution) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TxHeader != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxHeader.Size())) - n15, err := m.TxHeader.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Envelope != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Envelope.Size())) - n16, err := m.Envelope.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.TxExecutions) > 0 { + for iNdEx := len(m.TxExecutions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TxExecutions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a } - i += n16 } - if len(m.Events) > 0 { - for _, msg := range m.Events { - dAtA[i] = 0x3a - i++ - i = encodeVarintExec(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.Exception != nil { + { + size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n - } - } - if m.Result != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Result.Size())) - n17, err := m.Result.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n17 + i-- + dAtA[i] = 0x52 } if m.Receipt != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Receipt.Size())) - n18, err := m.Receipt.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - } - if m.Exception != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Exception.Size())) - n19, err := m.Exception.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Receipt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n19 + i-- + dAtA[i] = 0x4a } - if len(m.TxExecutions) > 0 { - for _, msg := range m.TxExecutions { - dAtA[i] = 0x5a - i++ - i = encodeVarintExec(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.Result != nil { + { + size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x42 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } } - return i, nil + if m.Envelope != nil { + { + size := m.Envelope.Size() + i -= size + if _, err := m.Envelope.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.TxHeader != nil { + { + size, err := m.TxHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *Origin) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1907,44 +2015,51 @@ func (m *Origin) Marshal() (dAtA []byte, err error) { } func (m *Origin) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Origin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ChainID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(len(m.ChainID))) - i += copy(dAtA[i:], m.ChainID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Height != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Height)) + n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err18 != nil { + return 0, err18 } + i -= n18 + i = encodeVarintExec(dAtA, i, uint64(n18)) + i-- + dAtA[i] = 0x22 if m.Index != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintExec(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x18 } - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) - n20, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) - if err != nil { - return 0, err + if m.Height != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x10 } - i += n20 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ChainID) > 0 { + i -= len(m.ChainID) + copy(dAtA[i:], m.ChainID) + i = encodeVarintExec(dAtA, i, uint64(len(m.ChainID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Header) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1952,64 +2067,75 @@ func (m *Header) Marshal() (dAtA []byte, err error) { } func (m *Header) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TxType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxType)) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxHash.Size())) - n21, err := m.TxHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n21 - if m.EventType != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.EventType)) + if m.Exception != nil { + { + size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a } - if len(m.EventID) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(len(m.EventID))) - i += copy(dAtA[i:], m.EventID) + if m.Index != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x30 } if m.Height != 0 { - dAtA[i] = 0x28 - i++ i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x28 } - if m.Index != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Index)) + if len(m.EventID) > 0 { + i -= len(m.EventID) + copy(dAtA[i:], m.EventID) + i = encodeVarintExec(dAtA, i, uint64(len(m.EventID))) + i-- + dAtA[i] = 0x22 } - if m.Exception != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Exception.Size())) - n22, err := m.Exception.MarshalTo(dAtA[i:]) - if err != nil { + if m.EventType != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.EventType)) + i-- + dAtA[i] = 0x18 + } + { + size := m.TxHash.Size() + i -= size + if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n22 + i = encodeVarintExec(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + if m.TxType != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.TxType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Event) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2017,80 +2143,98 @@ func (m *Event) Marshal() (dAtA []byte, err error) { } func (m *Event) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Header != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Header.Size())) - n23, err := m.Header.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n23 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Input != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Input.Size())) - n24, err := m.Input.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.GovernAccount != nil { + { + size, err := m.GovernAccount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n24 + i-- + dAtA[i] = 0x32 } - if m.Output != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Output.Size())) - n25, err := m.Output.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Log != nil { + { + size, err := m.Log.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n25 + i-- + dAtA[i] = 0x2a } if m.Call != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Call.Size())) - n26, err := m.Call.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Call.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n26 + i-- + dAtA[i] = 0x22 } - if m.Log != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Log.Size())) - n27, err := m.Log.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Output != nil { + { + size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n27 + i-- + dAtA[i] = 0x1a } - if m.GovernAccount != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.GovernAccount.Size())) - n28, err := m.GovernAccount.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Input != nil { + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n28 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Result) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2098,51 +2242,62 @@ func (m *Result) Marshal() (dAtA []byte, err error) { } func (m *Result) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Result) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Return) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(len(m.Return))) - i += copy(dAtA[i:], m.Return) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.GasUsed != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.GasUsed)) + if m.PermArgs != nil { + { + size, err := m.PermArgs.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } if m.NameEntry != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.NameEntry.Size())) - n29, err := m.NameEntry.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.NameEntry.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n29 + i-- + dAtA[i] = 0x1a } - if m.PermArgs != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.PermArgs.Size())) - n30, err := m.PermArgs.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n30 + if m.GasUsed != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Return) > 0 { + i -= len(m.Return) + copy(dAtA[i:], m.Return) + i = encodeVarintExec(dAtA, i, uint64(len(m.Return))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *LogEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2150,48 +2305,60 @@ func (m *LogEvent) Marshal() (dAtA []byte, err error) { } func (m *LogEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LogEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Address.Size())) - n31, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n31 - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Data.Size())) - n32, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n32 if len(m.Topics) > 0 { - for _, msg := range m.Topics { - dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.Topics[iNdEx].Size() + i -= size + if _, err := m.Topics[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x1a } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.Data.Size() + i -= size + if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0x12 + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *CallEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2199,56 +2366,68 @@ func (m *CallEvent) Marshal() (dAtA []byte, err error) { } func (m *CallEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CallEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CallData != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.CallData.Size())) - n33, err := m.CallData.MarshalTo(dAtA[i:]) - if err != nil { + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.CallType != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.CallType)) + i-- + dAtA[i] = 0x28 + } + { + size := m.Return.Size() + i -= size + if _, err := m.Return.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n33 + i = encodeVarintExec(dAtA, i, uint64(size)) } - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Origin.Size())) - n34, err := m.Origin.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n34 + i-- + dAtA[i] = 0x22 if m.StackDepth != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintExec(dAtA, i, uint64(m.StackDepth)) + i-- + dAtA[i] = 0x18 } - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Return.Size())) - n35, err := m.Return.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n35 - if m.CallType != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.CallType)) + { + size := m.Origin.Size() + i -= size + if _, err := m.Origin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + if m.CallData != nil { + { + size, err := m.CallData.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *GovernAccountEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2256,30 +2435,38 @@ func (m *GovernAccountEvent) Marshal() (dAtA []byte, err error) { } func (m *GovernAccountEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GovernAccountEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if m.AccountUpdate != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.AccountUpdate.Size())) - n36, err := m.AccountUpdate.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.AccountUpdate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n36 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *InputEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2287,28 +2474,36 @@ func (m *InputEvent) Marshal() (dAtA []byte, err error) { } func (m *InputEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InputEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Address.Size())) - n37, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n37 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *OutputEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2316,28 +2511,36 @@ func (m *OutputEvent) Marshal() (dAtA []byte, err error) { } func (m *OutputEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OutputEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Address.Size())) - n38, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n38 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *CallData) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2345,58 +2548,72 @@ func (m *CallData) Marshal() (dAtA []byte, err error) { } func (m *CallData) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CallData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Caller.Size())) - n39, err := m.Caller.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n39 - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Callee.Size())) - n40, err := m.Callee.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n40 - dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Data.Size())) - n41, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Gas != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Gas)) + i-- + dAtA[i] = 0x28 } - i += n41 if m.Value != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintExec(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x20 } - if m.Gas != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Gas)) + { + size := m.Data.Size() + i -= size + if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x1a + { + size := m.Callee.Size() + i -= size + if _, err := m.Callee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0x12 + { + size := m.Caller.Size() + i -= size + if _, err := m.Caller.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func encodeVarintExec(dAtA []byte, offset int, v uint64) int { + offset -= sovExec(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *StreamEvents) Size() (n int) { if m == nil { @@ -2876,14 +3093,7 @@ func (m *CallData) Size() (n int) { } func sovExec(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozExec(x uint64) (n int) { return sovExec(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/execution/names/names.pb.go b/execution/names/names.pb.go index 32b5f872e..efa37e943 100644 --- a/execution/names/names.pb.go +++ b/execution/names/names.pb.go @@ -5,12 +5,14 @@ package names import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -51,7 +53,7 @@ func (m *Entry) XXX_Unmarshal(b []byte) error { } func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -124,7 +126,7 @@ var fileDescriptor_f4268625867c617c = []byte{ func (m *Entry) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -132,49 +134,61 @@ func (m *Entry) Marshal() (dAtA []byte, err error) { } func (m *Entry) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNames(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - dAtA[i] = 0x12 - i++ - i = encodeVarintNames(dAtA, i, uint64(m.Owner.Size())) - n1, err := m.Owner.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Expires != 0 { + i = encodeVarintNames(dAtA, i, uint64(m.Expires)) + i-- + dAtA[i] = 0x20 } - i += n1 if len(m.Data) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Data) + copy(dAtA[i:], m.Data) i = encodeVarintNames(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) + i-- + dAtA[i] = 0x1a } - if m.Expires != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintNames(dAtA, i, uint64(m.Expires)) + { + size := m.Owner.Size() + i -= size + if _, err := m.Owner.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintNames(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNames(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintNames(dAtA []byte, offset int, v uint64) int { + offset -= sovNames(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Entry) Size() (n int) { if m == nil { @@ -202,14 +216,7 @@ func (m *Entry) Size() (n int) { } func sovNames(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozNames(x uint64) (n int) { return sovNames(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/execution/registry/registry.go b/execution/registry/registry.go index 85942b21b..4ea9ca18a 100644 --- a/execution/registry/registry.go +++ b/execution/registry/registry.go @@ -20,16 +20,6 @@ import ( "github.com/hyperledger/burrow/crypto" ) -// NewSignedNodeIdentity takes a p2p info and returns a node entry -func NewNodeIdentity(nodeKey, moniker, netAddress string, validator crypto.PrivateKey) *NodeIdentity { - return &NodeIdentity{ - Moniker: moniker, - NetworkAddress: netAddress, - TendermintNodeID: nodeKey, - ValidatorPublicKey: validator.GetPublicKey(), - } -} - func AuthorizedPeersProvider(state IterableReader) func() ([]string, []string) { return func() ([]string, []string) { var peerIDs, peerAddrs []string diff --git a/execution/registry/registry.pb.go b/execution/registry/registry.pb.go index 3e85af564..14f521402 100644 --- a/execution/registry/registry.pb.go +++ b/execution/registry/registry.pb.go @@ -5,12 +5,14 @@ package registry import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,14 +27,18 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +// NodeIdentity stores and establishes a binding between 4 different types of identifiers, a human readable name, +// a advertised network address, a p2p station-to-station key, and a validator key. Updates must be signed +// by the node key and the validator key to prove the update is consensual. type NodeIdentity struct { // Peer moniker name Moniker string `protobuf:"bytes,1,opt,name=Moniker,proto3" json:"Moniker,omitempty"` // Peer network address NetworkAddress string `protobuf:"bytes,2,opt,name=NetworkAddress,proto3" json:"NetworkAddress,omitempty"` - // Node key id (crypto address) + // The Tendermint p2p node ID TendermintNodeID string `protobuf:"bytes,3,opt,name=TendermintNodeID,proto3" json:"TendermintNodeID,omitempty"` - // Burrow validator address + // The public key that this node will validate with if it becomes a validator (use this to create a binding between + // p2p node ID and validator) ValidatorPublicKey github_com_hyperledger_burrow_crypto.PublicKey `protobuf:"bytes,4,opt,name=ValidatorPublicKey,proto3,customtype=github.com/hyperledger/burrow/crypto.PublicKey" json:"ValidatorPublicKey"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -49,7 +55,7 @@ func (m *NodeIdentity) XXX_Unmarshal(b []byte) error { } func (m *NodeIdentity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -124,7 +130,7 @@ var fileDescriptor_41af05d40a615591 = []byte{ func (m *NodeIdentity) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -132,50 +138,63 @@ func (m *NodeIdentity) Marshal() (dAtA []byte, err error) { } func (m *NodeIdentity) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeIdentity) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Moniker) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRegistry(dAtA, i, uint64(len(m.Moniker))) - i += copy(dAtA[i:], m.Moniker) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.NetworkAddress) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRegistry(dAtA, i, uint64(len(m.NetworkAddress))) - i += copy(dAtA[i:], m.NetworkAddress) + { + size := m.ValidatorPublicKey.Size() + i -= size + if _, err := m.ValidatorPublicKey.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRegistry(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 if len(m.TendermintNodeID) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.TendermintNodeID) + copy(dAtA[i:], m.TendermintNodeID) i = encodeVarintRegistry(dAtA, i, uint64(len(m.TendermintNodeID))) - i += copy(dAtA[i:], m.TendermintNodeID) + i-- + dAtA[i] = 0x1a } - dAtA[i] = 0x22 - i++ - i = encodeVarintRegistry(dAtA, i, uint64(m.ValidatorPublicKey.Size())) - n1, err := m.ValidatorPublicKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.NetworkAddress) > 0 { + i -= len(m.NetworkAddress) + copy(dAtA[i:], m.NetworkAddress) + i = encodeVarintRegistry(dAtA, i, uint64(len(m.NetworkAddress))) + i-- + dAtA[i] = 0x12 } - i += n1 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Moniker) > 0 { + i -= len(m.Moniker) + copy(dAtA[i:], m.Moniker) + i = encodeVarintRegistry(dAtA, i, uint64(len(m.Moniker))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintRegistry(dAtA []byte, offset int, v uint64) int { + offset -= sovRegistry(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *NodeIdentity) Size() (n int) { if m == nil { @@ -204,14 +223,7 @@ func (m *NodeIdentity) Size() (n int) { } func sovRegistry(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRegistry(x uint64) (n int) { return sovRegistry(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/genesis/spec/spec.pb.go b/genesis/spec/spec.pb.go index 313653bb6..7d079ef8d 100644 --- a/genesis/spec/spec.pb.go +++ b/genesis/spec/spec.pb.go @@ -5,6 +5,10 @@ package spec import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -12,8 +16,6 @@ import ( balance "github.com/hyperledger/burrow/acm/balance" crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -50,7 +52,7 @@ func (m *TemplateAccount) XXX_Unmarshal(b []byte) error { } func (m *TemplateAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -147,7 +149,7 @@ var fileDescriptor_423806180556987f = []byte{ func (m *TemplateAccount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -155,102 +157,107 @@ func (m *TemplateAccount) Marshal() (dAtA []byte, err error) { } func (m *TemplateAccount) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TemplateAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSpec(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Address != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintSpec(dAtA, i, uint64(m.Address.Size())) - n1, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Code != nil { + { + size := m.Code.Size() + i -= size + if _, err := m.Code.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintSpec(dAtA, i, uint64(size)) } - i += n1 + i-- + dAtA[i] = 0x3a } - if m.PublicKey != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintSpec(dAtA, i, uint64(m.PublicKey.Size())) - n2, err := m.PublicKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Roles) > 0 { + for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Roles[iNdEx]) + copy(dAtA[i:], m.Roles[iNdEx]) + i = encodeVarintSpec(dAtA, i, uint64(len(m.Roles[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Permissions) > 0 { + for iNdEx := len(m.Permissions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Permissions[iNdEx]) + copy(dAtA[i:], m.Permissions[iNdEx]) + i = encodeVarintSpec(dAtA, i, uint64(len(m.Permissions[iNdEx]))) + i-- + dAtA[i] = 0x2a } - i += n2 } if len(m.Amounts) > 0 { - for _, msg := range m.Amounts { + for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSpec(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x22 - i++ - i = encodeVarintSpec(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + } + } + if m.PublicKey != nil { + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n - } - } - if len(m.Permissions) > 0 { - for _, s := range m.Permissions { - dAtA[i] = 0x2a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.Roles) > 0 { - for _, s := range m.Roles { - dAtA[i] = 0x32 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) + i -= size + i = encodeVarintSpec(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a } - if m.Code != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintSpec(dAtA, i, uint64(m.Code.Size())) - n3, err := m.Code.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Address != nil { + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintSpec(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintSpec(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintSpec(dAtA []byte, offset int, v uint64) int { + offset -= sovSpec(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *TemplateAccount) Size() (n int) { if m == nil { @@ -299,14 +306,7 @@ func (m *TemplateAccount) Size() (n int) { } func sovSpec(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozSpec(x uint64) (n int) { return sovSpec(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/go.mod b/go.mod index ddca8aed2..dde5df21f 100644 --- a/go.mod +++ b/go.mod @@ -8,51 +8,48 @@ require ( github.com/BurntSushi/toml v0.3.1 github.com/OneOfOne/xxhash v1.2.5 github.com/alecthomas/jsonschema v0.0.0-20190122210438-a6952de1bbe6 - github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc // indirect - github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf // indirect github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf // indirect github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c github.com/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9 + github.com/coreos/go-etcd v2.0.0+incompatible // indirect github.com/eapache/channels v1.1.0 github.com/eapache/queue v1.1.0 // indirect github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13 github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8 // indirect github.com/fatih/color v1.7.0 - github.com/fortytw2/leaktest v1.3.0 // indirect - github.com/go-kit/kit v0.8.0 - github.com/go-logfmt/logfmt v0.4.0 // indirect + github.com/go-kit/kit v0.9.0 github.com/go-ozzo/ozzo-validation v3.5.0+incompatible - github.com/gogo/protobuf v1.2.1 + github.com/gogo/protobuf v1.3.0 github.com/golang/protobuf v1.3.2 - github.com/gorilla/websocket v1.4.0 + github.com/gorilla/websocket v1.4.1 github.com/hashicorp/golang-lru v0.5.1 github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365 github.com/imdario/mergo v0.3.7 github.com/jawher/mow.cli v1.1.0 github.com/jmoiron/sqlx v1.2.0 - github.com/kr/pretty v0.1.0 // indirect github.com/lib/pq v1.1.1 github.com/mattn/go-colorable v0.1.2 // indirect github.com/mattn/go-sqlite3 v1.10.0 github.com/monax/relic v2.0.0+incompatible github.com/perlin-network/life v0.0.0-20190521143330-57f3819c2df0 github.com/pkg/errors v0.8.1 - github.com/prometheus/client_golang v0.9.2 - github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 - github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 + github.com/prometheus/client_golang v0.9.3 + github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 + github.com/prometheus/common v0.4.0 github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a github.com/sirupsen/logrus v1.4.2 // indirect - github.com/spf13/viper v1.3.2 + github.com/spf13/viper v1.4.0 github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485 - github.com/stretchr/testify v1.3.0 + github.com/stretchr/testify v1.4.0 github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 github.com/tendermint/go-amino v0.14.1 github.com/tendermint/iavl v0.12.4 - github.com/tendermint/tendermint v0.32.3 - github.com/tendermint/tm-db v0.1.1 + github.com/tendermint/tendermint v0.32.4 + github.com/tendermint/tm-db v0.2.0 github.com/test-go/testify v1.1.4 github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 + github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.1.0 @@ -61,8 +58,6 @@ require ( golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 golang.org/x/sys v0.0.0-20190825160603-fb81701db80f // indirect golang.org/x/text v0.3.2 // indirect - google.golang.org/grpc v1.22.0 - gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect + google.golang.org/grpc v1.23.1 gopkg.in/yaml.v2 v2.2.2 ) diff --git a/go.sum b/go.sum index 493e7b3bb..46416c9ac 100644 --- a/go.sum +++ b/go.sum @@ -1,10 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/alecthomas/jsonschema v0.0.0-20190122210438-a6952de1bbe6 h1:xadBCbc8D9mmkaNfCsEBHbIoCjbayJXJNsY1JjPjNio= github.com/alecthomas/jsonschema v0.0.0-20190122210438-a6952de1bbe6/go.mod h1:qpebaTNSsyUn5rPSJMsfqEtDw71TTggXM6stUDI16HA= @@ -17,6 +19,8 @@ github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf h1:eg0MeVzs github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c h1:aEbSeNALREWXk0G7UdNhR3ayBV7tZ4M2PNmnrCAph6Q= github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= @@ -31,14 +35,20 @@ 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/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9 h1:Iy/9yf1PnKnwH8V0phEnqKE6aSIaqIZ+yn4PQgHF84E= github.com/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9/go.mod h1:6R3C29d3JonDKVjnlzFv5BGL/bfZP+0I7rKHKwiqKP8= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +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/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-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= 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= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/eapache/channels v1.1.0 h1:F1taHcn7/F0i8DYqKXJnyhJcVpp2kgFcNePxXtnyu4k= github.com/eapache/channels v1.1.0/go.mod h1:jMm2qB5Ubtg9zLd+inMZd2/NUvXgzmWXsDaLyQIGfH0= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= @@ -57,9 +67,12 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 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-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= @@ -69,23 +82,34 @@ github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx github.com/go-sql-driver/mysql v1.4.0/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/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.0 h1:G8O7TerXerS4F6sx9OV7/nRfJdnXgHZu/S/7F2SN+UE= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +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/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -106,8 +130,11 @@ github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +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/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 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/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/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= @@ -125,8 +152,12 @@ github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/libp2p/go-buffer-pool v0.0.1 h1:9Rrn/H46cXjaA2HQ5Y8lyhOS1NhTkZ4yuEs2r3Eechg= github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= +github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= +github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= @@ -140,6 +171,8 @@ github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQz github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/monax/relic v2.0.0+incompatible h1:5q+fw8Y7UJJuOBzGV5bZNlBk9k9ii6fzmdpwXsZKMdg= github.com/monax/relic v2.0.0+incompatible/go.mod h1:ZJcXg8m9tYkd2h6VeEZruhRUQPklFKbzFaTxyXrXxVk= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -159,22 +192,38 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= +github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 h1:PnBWHBf+6L0jOqq0gIVUe6Yk0/QMZ640k6NvkxcBf+8= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a h1:9a8MnZMP0X2nLJdBg+pBmGgkJlSaKC2KaQmTCk1XDtE= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +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/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= @@ -187,6 +236,8 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485 h1:tvEO2/Btzw9L4N2VlAHD7AXjk1g1yFTwbGEm8dz7QWY= github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485/go.mod h1:fMlyZAyOBbIsA9SgKX9V3X8DvF+5ImkZ+Z1HZcmo8Ec= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -195,6 +246,8 @@ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoH github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 h1:1oFLiOyVl+W7bnBzGhf7BbIv9loSFQcieWWYIjLqcAw= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6offJMk= @@ -204,12 +257,18 @@ github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJk github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= github.com/tendermint/tendermint v0.32.3 h1:GEnWpGQ795h5oTFNbfBLsY0LW/CW2j6p6HtiYNfxsgg= github.com/tendermint/tendermint v0.32.3/go.mod h1:ZK2c29jl1QRYznIRyRWRDsmm1yvtPzBRT00x4t1JToY= +github.com/tendermint/tendermint v0.32.4 h1:KwZIMtT+ROvfMYO3wine6F9hak3SpngcRcAIzys1J3I= +github.com/tendermint/tendermint v0.32.4/go.mod h1:D2+A3pNjY+Po72X0mTfaXorFhiVI8dh/Zg640FGyGtE= github.com/tendermint/tm-db v0.1.1 h1:G3Xezy3sOk9+ekhjZ/kjArYIs1SmwV+1OUgNkj7RgV0= github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= +github.com/tendermint/tm-db v0.2.0 h1:rJxgdqn6fIiVJZy4zLpY1qVlyD0TU6vhkT4kEf71TQQ= +github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 h1:IlK6taZBmMKDcGfMqIlD4la5BlekNrrLsdtCMSn6aJI= github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= +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/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -219,23 +278,34 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.1.0 h1:ngVtJC9TY/lg0AA/1k48FYhBrhRoFlEmWzsehpNAaZg= github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= 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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 h1:7KByu05hhLed2MO29w7p1XfZvZ13m8mub3shuVftRs0= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +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-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/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-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -243,8 +313,13 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 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= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/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= @@ -257,8 +332,11 @@ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/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-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= @@ -269,8 +347,12 @@ google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2 h1:67iHsV9djwGdZpdZNbLuQj6FOzCaZe3w+vhLjn5AcFA= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0 h1:J0UbZOIrCAl+fpTOf8YLs4dJo8L/owV4LYVtAXQoPkw= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= @@ -279,9 +361,12 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/integration/governance/identify_test.go b/integration/governance/identify_test.go index 47a87c6de..d24dcd853 100644 --- a/integration/governance/identify_test.go +++ b/integration/governance/identify_test.go @@ -109,5 +109,10 @@ func nodeFromConf(t *testing.T, conf *config.BurrowConfig, host string, val cryp require.NoError(t, err) nodeKey, err := tendermint.EnsureNodeKey(tmConf.NodeKeyFile()) require.NoError(t, err) - return registry.NewNodeIdentity(string(nodeKey.ID()), conf.Tendermint.Moniker, host, val) + return ®istry.NodeIdentity{ + ValidatorPublicKey: val.GetPublicKey(), + Moniker: conf.Tendermint.Moniker, + NetworkAddress: host, + TendermintNodeID: string(nodeKey.ID()), + } } diff --git a/keys/keys.pb.go b/keys/keys.pb.go index 3bc1c9df1..7458fbb32 100644 --- a/keys/keys.pb.go +++ b/keys/keys.pb.go @@ -6,12 +6,16 @@ package keys import ( context "context" fmt "fmt" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" crypto "github.com/hyperledger/burrow/crypto" grpc "google.golang.org/grpc" - math "math" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -1342,6 +1346,44 @@ type KeysServer interface { AddName(context.Context, *AddNameRequest) (*AddNameResponse, error) } +// UnimplementedKeysServer can be embedded to have forward compatible implementations. +type UnimplementedKeysServer struct { +} + +func (*UnimplementedKeysServer) GenerateKey(ctx context.Context, req *GenRequest) (*GenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GenerateKey not implemented") +} +func (*UnimplementedKeysServer) PublicKey(ctx context.Context, req *PubRequest) (*PubResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PublicKey not implemented") +} +func (*UnimplementedKeysServer) Sign(ctx context.Context, req *SignRequest) (*SignResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented") +} +func (*UnimplementedKeysServer) Verify(ctx context.Context, req *VerifyRequest) (*VerifyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") +} +func (*UnimplementedKeysServer) Import(ctx context.Context, req *ImportRequest) (*ImportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Import not implemented") +} +func (*UnimplementedKeysServer) ImportJSON(ctx context.Context, req *ImportJSONRequest) (*ImportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportJSON not implemented") +} +func (*UnimplementedKeysServer) Export(ctx context.Context, req *ExportRequest) (*ExportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") +} +func (*UnimplementedKeysServer) Hash(ctx context.Context, req *HashRequest) (*HashResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Hash not implemented") +} +func (*UnimplementedKeysServer) RemoveName(ctx context.Context, req *RemoveNameRequest) (*RemoveNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveName not implemented") +} +func (*UnimplementedKeysServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedKeysServer) AddName(ctx context.Context, req *AddNameRequest) (*AddNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddName not implemented") +} + func RegisterKeysServer(s *grpc.Server, srv KeysServer) { s.RegisterService(&_Keys_serviceDesc, srv) } @@ -2026,14 +2068,7 @@ func (m *AddNameRequest) Size() (n int) { } func sovKeys(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozKeys(x uint64) (n int) { return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/permission/permission.pb.go b/permission/permission.pb.go index bb07ce156..c811523a4 100644 --- a/permission/permission.pb.go +++ b/permission/permission.pb.go @@ -5,12 +5,14 @@ package permission import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -45,7 +47,7 @@ func (m *AccountPermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_AccountPermissions.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -101,7 +103,7 @@ func (m *BasePermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_BasePermissions.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -164,7 +166,7 @@ func (m *PermArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PermArgs.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -256,7 +258,7 @@ var fileDescriptor_c837ef01cbda0ad8 = []byte{ func (m *AccountPermissions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -264,43 +266,45 @@ func (m *AccountPermissions) Marshal() (dAtA []byte, err error) { } func (m *AccountPermissions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountPermissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintPermission(dAtA, i, uint64(m.Base.Size())) - n1, err := m.Base.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n1 if len(m.Roles) > 0 { - for _, s := range m.Roles { + for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Roles[iNdEx]) + copy(dAtA[i:], m.Roles[iNdEx]) + i = encodeVarintPermission(dAtA, i, uint64(len(m.Roles[iNdEx]))) + i-- dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size, err := m.Base.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPermission(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *BasePermissions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -308,26 +312,32 @@ func (m *BasePermissions) Marshal() (dAtA []byte, err error) { } func (m *BasePermissions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BasePermissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0x8 - i++ - i = encodeVarintPermission(dAtA, i, uint64(m.Perms)) - dAtA[i] = 0x10 - i++ - i = encodeVarintPermission(dAtA, i, uint64(m.SetBit)) if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + i = encodeVarintPermission(dAtA, i, uint64(m.SetBit)) + i-- + dAtA[i] = 0x10 + i = encodeVarintPermission(dAtA, i, uint64(m.Perms)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil } func (m *PermArgs) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -335,55 +345,65 @@ func (m *PermArgs) Marshal() (dAtA []byte, err error) { } func (m *PermArgs) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PermArgs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0x8 - i++ - i = encodeVarintPermission(dAtA, i, uint64(m.Action)) - if m.Target != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPermission(dAtA, i, uint64(m.Target.Size())) - n2, err := m.Target.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.Permission != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintPermission(dAtA, i, uint64(*m.Permission)) - } - if m.Role != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintPermission(dAtA, i, uint64(len(*m.Role))) - i += copy(dAtA[i:], *m.Role) - } if m.Value != nil { - dAtA[i] = 0x28 - i++ + i-- if *m.Value { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x28 + } + if m.Role != nil { + i -= len(*m.Role) + copy(dAtA[i:], *m.Role) + i = encodeVarintPermission(dAtA, i, uint64(len(*m.Role))) + i-- + dAtA[i] = 0x22 + } + if m.Permission != nil { + i = encodeVarintPermission(dAtA, i, uint64(*m.Permission)) + i-- + dAtA[i] = 0x18 + } + if m.Target != nil { + { + size := m.Target.Size() + i -= size + if _, err := m.Target.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPermission(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - return i, nil + i = encodeVarintPermission(dAtA, i, uint64(m.Action)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil } func encodeVarintPermission(dAtA []byte, offset int, v uint64) int { + offset -= sovPermission(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *AccountPermissions) Size() (n int) { if m == nil { @@ -444,14 +464,7 @@ func (m *PermArgs) Size() (n int) { } func sovPermission(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPermission(x uint64) (n int) { return sovPermission(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/protobuf/registry.proto b/protobuf/registry.proto index 2c701605b..684208f4f 100644 --- a/protobuf/registry.proto +++ b/protobuf/registry.proto @@ -18,15 +18,19 @@ option (gogoproto.goproto_registration) = true; // Enable generation of XXX_MessageName methods for grpc-go/status. option (gogoproto.messagename_all) = true; +// NodeIdentity stores and establishes a binding between 4 different types of identifiers, a human readable name, +// a advertised network address, a p2p station-to-station key, and a validator key. Updates must be signed +// by the node key and the validator key to prove the update is consensual. message NodeIdentity { option (gogoproto.goproto_stringer) = false; // Peer moniker name string Moniker = 1; // Peer network address string NetworkAddress = 2; - // Node key id (crypto address) + // The Tendermint p2p node ID string TendermintNodeID = 3; - // Burrow validator address + // The public key that this node will validate with if it becomes a validator (use this to create a binding between + // p2p node ID and validator) bytes ValidatorPublicKey = 4 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.PublicKey", (gogoproto.nullable) = false]; } diff --git a/rpc/rpc.pb.go b/rpc/rpc.pb.go index f8a6ab389..4e387f401 100644 --- a/rpc/rpc.pb.go +++ b/rpc/rpc.pb.go @@ -5,6 +5,9 @@ package rpc import ( fmt "fmt" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -12,7 +15,6 @@ import ( bcm "github.com/hyperledger/burrow/bcm" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" tendermint "github.com/hyperledger/burrow/consensus/tendermint" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -195,14 +197,7 @@ func (m *ResultStatus) Size() (n int) { } func sovRpc(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRpc(x uint64) (n int) { return sovRpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/rpc/rpcdump/rpcdump.pb.go b/rpc/rpcdump/rpcdump.pb.go index 11f635b75..34bb4554b 100644 --- a/rpc/rpcdump/rpcdump.pb.go +++ b/rpc/rpcdump/rpcdump.pb.go @@ -6,12 +6,16 @@ package rpcdump import ( context "context" fmt "fmt" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" dump "github.com/hyperledger/burrow/dump" grpc "google.golang.org/grpc" - math "math" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -152,6 +156,14 @@ type DumpServer interface { GetDump(*GetDumpParam, Dump_GetDumpServer) error } +// UnimplementedDumpServer can be embedded to have forward compatible implementations. +type UnimplementedDumpServer struct { +} + +func (*UnimplementedDumpServer) GetDump(req *GetDumpParam, srv Dump_GetDumpServer) error { + return status.Errorf(codes.Unimplemented, "method GetDump not implemented") +} + func RegisterDumpServer(s *grpc.Server, srv DumpServer) { s.RegisterService(&_Dump_serviceDesc, srv) } @@ -207,14 +219,7 @@ func (m *GetDumpParam) Size() (n int) { } func sovRpcdump(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRpcdump(x uint64) (n int) { return sovRpcdump(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/rpc/rpcevents/rpcevents.pb.go b/rpc/rpcevents/rpcevents.pb.go index db293aaea..6fb8d7c4e 100644 --- a/rpc/rpcevents/rpcevents.pb.go +++ b/rpc/rpcevents/rpcevents.pb.go @@ -6,14 +6,18 @@ package rpcevents import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" exec "github.com/hyperledger/burrow/execution/exec" grpc "google.golang.org/grpc" - io "io" - math "math" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -91,7 +95,7 @@ func (m *GetBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_GetBlockRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -152,7 +156,7 @@ func (m *TxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TxRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -239,7 +243,7 @@ func (m *BlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_BlocksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -298,7 +302,7 @@ func (m *EventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_EventsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -358,7 +362,7 @@ func (m *GetTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_GetTxsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -424,7 +428,7 @@ func (m *GetTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_GetTxsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -483,7 +487,7 @@ func (m *Bound) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Bound.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -548,7 +552,7 @@ func (m *BlockRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BlockRange.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -762,6 +766,20 @@ type ExecutionEventsServer interface { Events(*BlocksRequest, ExecutionEvents_EventsServer) error } +// UnimplementedExecutionEventsServer can be embedded to have forward compatible implementations. +type UnimplementedExecutionEventsServer struct { +} + +func (*UnimplementedExecutionEventsServer) Stream(req *BlocksRequest, srv ExecutionEvents_StreamServer) error { + return status.Errorf(codes.Unimplemented, "method Stream not implemented") +} +func (*UnimplementedExecutionEventsServer) Tx(ctx context.Context, req *TxRequest) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method Tx not implemented") +} +func (*UnimplementedExecutionEventsServer) Events(req *BlocksRequest, srv ExecutionEvents_EventsServer) error { + return status.Errorf(codes.Unimplemented, "method Events not implemented") +} + func RegisterExecutionEventsServer(s *grpc.Server, srv ExecutionEventsServer) { s.RegisterService(&_ExecutionEvents_serviceDesc, srv) } @@ -853,7 +871,7 @@ var _ExecutionEvents_serviceDesc = grpc.ServiceDesc{ func (m *GetBlockRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -861,35 +879,41 @@ func (m *GetBlockRequest) Marshal() (dAtA []byte, err error) { } func (m *GetBlockRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Wait { - dAtA[i] = 0x10 - i++ + i-- if m.Wait { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *TxRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -897,38 +921,46 @@ func (m *TxRequest) Marshal() (dAtA []byte, err error) { } func (m *TxRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.TxHash.Size())) - n1, err := m.TxHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n1 if m.Wait { - dAtA[i] = 0x10 - i++ + i-- if m.Wait { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.TxHash.Size() + i -= size + if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpcevents(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *BlocksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -936,36 +968,45 @@ func (m *BlocksRequest) Marshal() (dAtA []byte, err error) { } func (m *BlocksRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlocksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.BlockRange != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.BlockRange.Size())) - n2, err := m.BlockRange.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Query) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Query) + copy(dAtA[i:], m.Query) i = encodeVarintRpcevents(dAtA, i, uint64(len(m.Query))) - i += copy(dAtA[i:], m.Query) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.BlockRange != nil { + { + size, err := m.BlockRange.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcevents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *EventsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -973,37 +1014,45 @@ func (m *EventsResponse) Marshal() (dAtA []byte, err error) { } func (m *EventsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Events) > 0 { - for _, msg := range m.Events { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcevents(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *GetTxsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1011,36 +1060,43 @@ func (m *GetTxsRequest) Marshal() (dAtA []byte, err error) { } func (m *GetTxsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.StartHeight != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.StartHeight)) - } - if m.EndHeight != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.EndHeight)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Query) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Query) + copy(dAtA[i:], m.Query) i = encodeVarintRpcevents(dAtA, i, uint64(len(m.Query))) - i += copy(dAtA[i:], m.Query) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.EndHeight != 0 { + i = encodeVarintRpcevents(dAtA, i, uint64(m.EndHeight)) + i-- + dAtA[i] = 0x10 } - return i, nil + if m.StartHeight != 0 { + i = encodeVarintRpcevents(dAtA, i, uint64(m.StartHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *GetTxsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1048,37 +1104,45 @@ func (m *GetTxsResponse) Marshal() (dAtA []byte, err error) { } func (m *GetTxsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.TxExecutions) > 0 { - for _, msg := range m.TxExecutions { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.TxExecutions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TxExecutions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcevents(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Bound) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1086,30 +1150,36 @@ func (m *Bound) Marshal() (dAtA []byte, err error) { } func (m *Bound) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Bound) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.Type)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Index != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintRpcevents(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Type != 0 { + i = encodeVarintRpcevents(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *BlockRange) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1117,44 +1187,56 @@ func (m *BlockRange) Marshal() (dAtA []byte, err error) { } func (m *BlockRange) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Start != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.Start.Size())) - n3, err := m.Start.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.End != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.End.Size())) - n4, err := m.End.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.End.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcevents(dAtA, i, uint64(size)) } - i += n4 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Start != nil { + { + size, err := m.Start.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcevents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintRpcevents(dAtA []byte, offset int, v uint64) int { + offset -= sovRpcevents(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *GetBlockRequest) Size() (n int) { if m == nil { @@ -1314,14 +1396,7 @@ func (m *BlockRange) Size() (n int) { } func sovRpcevents(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRpcevents(x uint64) (n int) { return sovRpcevents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/rpc/rpcquery/rpcquery.pb.go b/rpc/rpcquery/rpcquery.pb.go index ee5005790..25463b4aa 100644 --- a/rpc/rpcquery/rpcquery.pb.go +++ b/rpc/rpcquery/rpcquery.pb.go @@ -6,6 +6,9 @@ package rpcquery import ( context "context" fmt "fmt" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -19,7 +22,8 @@ import ( payload "github.com/hyperledger/burrow/txs/payload" types "github.com/tendermint/tendermint/abci/types" grpc "google.golang.org/grpc" - math "math" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -1312,6 +1316,53 @@ type QueryServer interface { GetBlockHeader(context.Context, *GetBlockParam) (*types.Header, error) } +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Status(ctx context.Context, req *StatusParam) (*rpc.ResultStatus, error) { + return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") +} +func (*UnimplementedQueryServer) GetAccount(ctx context.Context, req *GetAccountParam) (*acm.Account, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") +} +func (*UnimplementedQueryServer) GetMetadata(ctx context.Context, req *GetMetadataParam) (*MetadataResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented") +} +func (*UnimplementedQueryServer) GetStorage(ctx context.Context, req *GetStorageParam) (*StorageValue, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStorage not implemented") +} +func (*UnimplementedQueryServer) ListAccounts(req *ListAccountsParam, srv Query_ListAccountsServer) error { + return status.Errorf(codes.Unimplemented, "method ListAccounts not implemented") +} +func (*UnimplementedQueryServer) GetName(ctx context.Context, req *GetNameParam) (*names.Entry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetName not implemented") +} +func (*UnimplementedQueryServer) ListNames(req *ListNamesParam, srv Query_ListNamesServer) error { + return status.Errorf(codes.Unimplemented, "method ListNames not implemented") +} +func (*UnimplementedQueryServer) GetNetworkRegistry(ctx context.Context, req *GetNetworkRegistryParam) (*NetworkRegistry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNetworkRegistry not implemented") +} +func (*UnimplementedQueryServer) GetValidatorSet(ctx context.Context, req *GetValidatorSetParam) (*ValidatorSet, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSet not implemented") +} +func (*UnimplementedQueryServer) GetValidatorSetHistory(ctx context.Context, req *GetValidatorSetHistoryParam) (*ValidatorSetHistory, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSetHistory not implemented") +} +func (*UnimplementedQueryServer) GetProposal(ctx context.Context, req *GetProposalParam) (*payload.Ballot, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProposal not implemented") +} +func (*UnimplementedQueryServer) ListProposals(req *ListProposalsParam, srv Query_ListProposalsServer) error { + return status.Errorf(codes.Unimplemented, "method ListProposals not implemented") +} +func (*UnimplementedQueryServer) GetStats(ctx context.Context, req *GetStatsParam) (*Stats, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") +} +func (*UnimplementedQueryServer) GetBlockHeader(ctx context.Context, req *GetBlockParam) (*types.Header, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeader not implemented") +} + func RegisterQueryServer(s *grpc.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } @@ -2005,14 +2056,7 @@ func (m *GetBlockParam) Size() (n int) { } func sovRpcquery(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRpcquery(x uint64) (n int) { return sovRpcquery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/rpc/rpctransact/rpctransact.pb.go b/rpc/rpctransact/rpctransact.pb.go index 27a15d200..0704cdac3 100644 --- a/rpc/rpctransact/rpctransact.pb.go +++ b/rpc/rpctransact/rpctransact.pb.go @@ -6,6 +6,11 @@ package rpctransact import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + time "time" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -17,9 +22,8 @@ import ( txs "github.com/hyperledger/burrow/txs" payload "github.com/hyperledger/burrow/txs/payload" grpc "google.golang.org/grpc" - io "io" - math "math" - time "time" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -58,7 +62,7 @@ func (m *CallCodeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_CallCodeParam.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -116,7 +120,7 @@ func (m *TxEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TxEnvelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -167,7 +171,7 @@ func (m *TxEnvelopeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_TxEnvelopeParam.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -440,6 +444,47 @@ type TransactServer interface { NameTxAsync(context.Context, *payload.NameTx) (*txs.Receipt, error) } +// UnimplementedTransactServer can be embedded to have forward compatible implementations. +type UnimplementedTransactServer struct { +} + +func (*UnimplementedTransactServer) BroadcastTxSync(ctx context.Context, req *TxEnvelopeParam) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method BroadcastTxSync not implemented") +} +func (*UnimplementedTransactServer) BroadcastTxAsync(ctx context.Context, req *TxEnvelopeParam) (*txs.Receipt, error) { + return nil, status.Errorf(codes.Unimplemented, "method BroadcastTxAsync not implemented") +} +func (*UnimplementedTransactServer) SignTx(ctx context.Context, req *TxEnvelopeParam) (*TxEnvelope, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignTx not implemented") +} +func (*UnimplementedTransactServer) FormulateTx(ctx context.Context, req *payload.Any) (*TxEnvelope, error) { + return nil, status.Errorf(codes.Unimplemented, "method FormulateTx not implemented") +} +func (*UnimplementedTransactServer) CallTxSync(ctx context.Context, req *payload.CallTx) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallTxSync not implemented") +} +func (*UnimplementedTransactServer) CallTxAsync(ctx context.Context, req *payload.CallTx) (*txs.Receipt, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallTxAsync not implemented") +} +func (*UnimplementedTransactServer) CallTxSim(ctx context.Context, req *payload.CallTx) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallTxSim not implemented") +} +func (*UnimplementedTransactServer) CallCodeSim(ctx context.Context, req *CallCodeParam) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallCodeSim not implemented") +} +func (*UnimplementedTransactServer) SendTxSync(ctx context.Context, req *payload.SendTx) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendTxSync not implemented") +} +func (*UnimplementedTransactServer) SendTxAsync(ctx context.Context, req *payload.SendTx) (*txs.Receipt, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendTxAsync not implemented") +} +func (*UnimplementedTransactServer) NameTxSync(ctx context.Context, req *payload.NameTx) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method NameTxSync not implemented") +} +func (*UnimplementedTransactServer) NameTxAsync(ctx context.Context, req *payload.NameTx) (*txs.Receipt, error) { + return nil, status.Errorf(codes.Unimplemented, "method NameTxAsync not implemented") +} + func RegisterTransactServer(s *grpc.Server, srv TransactServer) { s.RegisterService(&_Transact_serviceDesc, srv) } @@ -720,7 +765,7 @@ var _Transact_serviceDesc = grpc.ServiceDesc{ func (m *CallCodeParam) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -728,40 +773,50 @@ func (m *CallCodeParam) Marshal() (dAtA []byte, err error) { } func (m *CallCodeParam) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CallCodeParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintRpctransact(dAtA, i, uint64(m.FromAddress.Size())) - n1, err := m.FromAddress.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - if len(m.Code) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpctransact(dAtA, i, uint64(len(m.Code))) - i += copy(dAtA[i:], m.Code) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Data) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Data) + copy(dAtA[i:], m.Data) i = encodeVarintRpctransact(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Code) > 0 { + i -= len(m.Code) + copy(dAtA[i:], m.Code) + i = encodeVarintRpctransact(dAtA, i, uint64(len(m.Code))) + i-- + dAtA[i] = 0x12 } - return i, nil + { + size := m.FromAddress.Size() + i -= size + if _, err := m.FromAddress.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpctransact(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *TxEnvelope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -769,30 +824,38 @@ func (m *TxEnvelope) Marshal() (dAtA []byte, err error) { } func (m *TxEnvelope) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxEnvelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if m.Envelope != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpctransact(dAtA, i, uint64(m.Envelope.Size())) - n2, err := m.Envelope.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.Envelope.Size() + i -= size + if _, err := m.Envelope.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpctransact(dAtA, i, uint64(size)) } - i += n2 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *TxEnvelopeParam) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -800,52 +863,64 @@ func (m *TxEnvelopeParam) Marshal() (dAtA []byte, err error) { } func (m *TxEnvelopeParam) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxEnvelopeParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Envelope != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpctransact(dAtA, i, uint64(m.Envelope.Size())) - n3, err := m.Envelope.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Payload != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpctransact(dAtA, i, uint64(m.Payload.Size())) - n4, err := m.Payload.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 + n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Timeout, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout):]) + if err2 != nil { + return 0, err2 } + i -= n2 + i = encodeVarintRpctransact(dAtA, i, uint64(n2)) + i-- dAtA[i] = 0x1a - i++ - i = encodeVarintRpctransact(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout))) - n5, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Timeout, dAtA[i:]) - if err != nil { - return 0, err + if m.Payload != nil { + { + size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpctransact(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - i += n5 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Envelope != nil { + { + size := m.Envelope.Size() + i -= size + if _, err := m.Envelope.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpctransact(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintRpctransact(dAtA []byte, offset int, v uint64) int { + offset -= sovRpctransact(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *CallCodeParam) Size() (n int) { if m == nil { @@ -908,14 +983,7 @@ func (m *TxEnvelopeParam) Size() (n int) { } func sovRpctransact(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRpctransact(x uint64) (n int) { return sovRpctransact(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/storage/storage.pb.go b/storage/storage.pb.go index dc3eb476b..0f6f881ca 100644 --- a/storage/storage.pb.go +++ b/storage/storage.pb.go @@ -5,11 +5,13 @@ package storage import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -44,7 +46,7 @@ func (m *CommitID) XXX_Unmarshal(b []byte) error { } func (m *CommitID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -106,7 +108,7 @@ var fileDescriptor_0d2c4ccf1453ffdb = []byte{ func (m *CommitID) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -114,35 +116,44 @@ func (m *CommitID) Marshal() (dAtA []byte, err error) { } func (m *CommitID) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Version != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintStorage(dAtA, i, uint64(m.Version)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Hash) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) i = encodeVarintStorage(dAtA, i, uint64(len(m.Hash))) - i += copy(dAtA[i:], m.Hash) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Version != 0 { + i = encodeVarintStorage(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintStorage(dAtA []byte, offset int, v uint64) int { + offset -= sovStorage(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *CommitID) Size() (n int) { if m == nil { @@ -164,14 +175,7 @@ func (m *CommitID) Size() (n int) { } func sovStorage(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozStorage(x uint64) (n int) { return sovStorage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/txs/payload/payload.pb.go b/txs/payload/payload.pb.go index b0f4a98d9..29273c6bf 100644 --- a/txs/payload/payload.pb.go +++ b/txs/payload/payload.pb.go @@ -5,6 +5,10 @@ package payload import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -13,8 +17,6 @@ import ( registry "github.com/hyperledger/burrow/execution/registry" spec "github.com/hyperledger/burrow/genesis/spec" permission "github.com/hyperledger/burrow/permission" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -89,7 +91,7 @@ func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Any.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -209,7 +211,7 @@ func (m *TxInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TxInput.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -270,7 +272,7 @@ func (m *TxOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TxOutput.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -336,7 +338,7 @@ func (m *CallTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CallTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -416,7 +418,7 @@ func (m *ContractMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ContractMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -470,7 +472,7 @@ func (m *SendTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_SendTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -517,7 +519,7 @@ func (m *PermsTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PermsTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -582,7 +584,7 @@ func (m *NameTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_NameTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -654,7 +656,7 @@ func (m *BondTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BondTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -699,7 +701,7 @@ func (m *UnbondTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UnbondTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -743,7 +745,7 @@ func (m *GovTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_GovTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -789,7 +791,7 @@ func (m *ProposalTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_ProposalTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -835,7 +837,7 @@ func (m *IdentifyTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_IdentifyTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -879,7 +881,7 @@ func (m *BatchTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BatchTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -923,7 +925,7 @@ func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Vote.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -968,7 +970,7 @@ func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1015,7 +1017,7 @@ func (m *Ballot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Ballot.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1176,7 +1178,7 @@ var fileDescriptor_678c914f1bee6d56 = []byte{ func (m *Any) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1184,120 +1186,146 @@ func (m *Any) Marshal() (dAtA []byte, err error) { } func (m *Any) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Any) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CallTx != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.CallTx.Size())) - n1, err := m.CallTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.SendTx != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.SendTx.Size())) - n2, err := m.SendTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.IdentifyTx != nil { + { + size, err := m.IdentifyTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0x52 } - if m.NameTx != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.NameTx.Size())) - n3, err := m.NameTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.ProposalTx != nil { + { + size, err := m.ProposalTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x4a } - if m.PermsTx != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.PermsTx.Size())) - n4, err := m.PermsTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.BatchTx != nil { + { + size, err := m.BatchTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n4 + i-- + dAtA[i] = 0x42 } - if m.GovTx != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.GovTx.Size())) - n5, err := m.GovTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.UnbondTx != nil { + { + size, err := m.UnbondTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0x3a } if m.BondTx != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.BondTx.Size())) - n6, err := m.BondTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.BondTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n6 + i-- + dAtA[i] = 0x32 } - if m.UnbondTx != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.UnbondTx.Size())) - n7, err := m.UnbondTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.GovTx != nil { + { + size, err := m.GovTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n7 + i-- + dAtA[i] = 0x2a } - if m.BatchTx != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.BatchTx.Size())) - n8, err := m.BatchTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.PermsTx != nil { + { + size, err := m.PermsTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n8 + i-- + dAtA[i] = 0x22 } - if m.ProposalTx != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.ProposalTx.Size())) - n9, err := m.ProposalTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.NameTx != nil { + { + size, err := m.NameTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n9 + i-- + dAtA[i] = 0x1a } - if m.IdentifyTx != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.IdentifyTx.Size())) - n10, err := m.IdentifyTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.SendTx != nil { + { + size, err := m.SendTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n10 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.CallTx != nil { + { + size, err := m.CallTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *TxInput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1305,38 +1333,46 @@ func (m *TxInput) Marshal() (dAtA []byte, err error) { } func (m *TxInput) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxInput) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) - n11, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - if m.Amount != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Amount)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Sequence != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintPayload(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Amount != 0 { + i = encodeVarintPayload(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x10 } - return i, nil + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *TxOutput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1344,33 +1380,41 @@ func (m *TxOutput) Marshal() (dAtA []byte, err error) { } func (m *TxOutput) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) - n12, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n12 if m.Amount != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintPayload(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *CallTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1378,83 +1422,99 @@ func (m *CallTx) Marshal() (dAtA []byte, err error) { } func (m *CallTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CallTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Input != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n13, err := m.Input.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.GasPrice != 0 { + i = encodeVarintPayload(dAtA, i, uint64(m.GasPrice)) + i-- + dAtA[i] = 0x40 + } + if len(m.ContractMeta) > 0 { + for iNdEx := len(m.ContractMeta) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ContractMeta[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a } - i += n13 } - if m.Address != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) - n14, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { + { + size := m.WASM.Size() + i -= size + if _, err := m.WASM.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n14 + i = encodeVarintPayload(dAtA, i, uint64(size)) } - if m.GasLimit != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x32 + { + size := m.Data.Size() + i -= size + if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a if m.Fee != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintPayload(dAtA, i, uint64(m.Fee)) + i-- + dAtA[i] = 0x20 } - dAtA[i] = 0x2a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Data.Size())) - n15, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.GasLimit != 0 { + i = encodeVarintPayload(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x18 } - i += n15 - dAtA[i] = 0x32 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.WASM.Size())) - n16, err := m.WASM.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Address != nil { + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - i += n16 - if len(m.ContractMeta) > 0 { - for _, msg := range m.ContractMeta { - dAtA[i] = 0x3a - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.Input != nil { + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - if m.GasPrice != 0 { - dAtA[i] = 0x40 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.GasPrice)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ContractMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1462,34 +1522,43 @@ func (m *ContractMeta) Marshal() (dAtA []byte, err error) { } func (m *ContractMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContractMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.CodeHash.Size())) - n17, err := m.CodeHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n17 if len(m.Meta) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Meta) + copy(dAtA[i:], m.Meta) i = encodeVarintPayload(dAtA, i, uint64(len(m.Meta))) - i += copy(dAtA[i:], m.Meta) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.CodeHash.Size() + i -= size + if _, err := m.CodeHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *SendTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1497,44 +1566,54 @@ func (m *SendTx) Marshal() (dAtA []byte, err error) { } func (m *SendTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SendTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Inputs) > 0 { - for _, msg := range m.Inputs { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Outputs) > 0 { - for _, msg := range m.Outputs { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Outputs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Outputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Inputs) > 0 { + for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *PermsTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1542,38 +1621,48 @@ func (m *PermsTx) Marshal() (dAtA []byte, err error) { } func (m *PermsTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PermsTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Input != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n18, err := m.Input.MarshalTo(dAtA[i:]) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.PermArgs.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n18 + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.PermArgs.Size())) - n19, err := m.PermArgs.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n19 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Input != nil { + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *NameTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1581,47 +1670,57 @@ func (m *NameTx) Marshal() (dAtA []byte, err error) { } func (m *NameTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NameTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Input != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n20, err := m.Input.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Name) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.Fee != 0 { + i = encodeVarintPayload(dAtA, i, uint64(m.Fee)) + i-- + dAtA[i] = 0x20 } if len(m.Data) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Data) + copy(dAtA[i:], m.Data) i = encodeVarintPayload(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) + i-- + dAtA[i] = 0x1a } - if m.Fee != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Fee)) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPayload(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Input != nil { + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *BondTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1629,30 +1728,38 @@ func (m *BondTx) Marshal() (dAtA []byte, err error) { } func (m *BondTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BondTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if m.Input != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n21, err := m.Input.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n21 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *UnbondTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1660,40 +1767,50 @@ func (m *UnbondTx) Marshal() (dAtA []byte, err error) { } func (m *UnbondTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnbondTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Input != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n22, err := m.Input.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n22 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Output != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Output.Size())) - n23, err := m.Output.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n23 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Input != nil { + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *GovTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1701,44 +1818,54 @@ func (m *GovTx) Marshal() (dAtA []byte, err error) { } func (m *GovTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GovTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Inputs) > 0 { - for _, msg := range m.Inputs { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.AccountUpdates) > 0 { - for _, msg := range m.AccountUpdates { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.AccountUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AccountUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Inputs) > 0 { + for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *ProposalTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1746,55 +1873,67 @@ func (m *ProposalTx) Marshal() (dAtA []byte, err error) { } func (m *ProposalTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProposalTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Input != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n24, err := m.Input.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n24 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.VotingWeight != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.VotingWeight)) + if m.Proposal != nil { + { + size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } if m.ProposalHash != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.ProposalHash.Size())) - n25, err := m.ProposalHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.ProposalHash.Size() + i -= size + if _, err := m.ProposalHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n25 + i-- + dAtA[i] = 0x1a } - if m.Proposal != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Proposal.Size())) - n26, err := m.Proposal.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n26 + if m.VotingWeight != 0 { + i = encodeVarintPayload(dAtA, i, uint64(m.VotingWeight)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Input != nil { + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *IdentifyTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1802,42 +1941,52 @@ func (m *IdentifyTx) Marshal() (dAtA []byte, err error) { } func (m *IdentifyTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IdentifyTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Inputs) > 0 { - for _, msg := range m.Inputs { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Node != nil { + { + size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - } - if m.Node != nil { + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Node.Size())) - n27, err := m.Node.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n27 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Inputs) > 0 { + for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *BatchTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1845,44 +1994,54 @@ func (m *BatchTx) Marshal() (dAtA []byte, err error) { } func (m *BatchTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Inputs) > 0 { - for _, msg := range m.Inputs { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Txs) > 0 { - for _, msg := range m.Txs { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Txs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Inputs) > 0 { + for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *Vote) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1890,33 +2049,41 @@ func (m *Vote) Marshal() (dAtA []byte, err error) { } func (m *Vote) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) - n28, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n28 if m.VotingWeight != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintPayload(dAtA, i, uint64(m.VotingWeight)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *Proposal) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1924,42 +2091,52 @@ func (m *Proposal) Marshal() (dAtA []byte, err error) { } func (m *Proposal) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.Description) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.BatchTx != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.BatchTx.Size())) - n29, err := m.BatchTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.BatchTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n29 + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintPayload(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPayload(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *Ballot) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1967,61 +2144,75 @@ func (m *Ballot) Marshal() (dAtA []byte, err error) { } func (m *Ballot) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Ballot) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Proposal != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Proposal.Size())) - n30, err := m.Proposal.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n30 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.FinalizingTx != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.FinalizingTx.Size())) - n31, err := m.FinalizingTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Votes) > 0 { + for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } - i += n31 } if m.ProposalState != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintPayload(dAtA, i, uint64(m.ProposalState)) + i-- + dAtA[i] = 0x20 } - if len(m.Votes) > 0 { - for _, msg := range m.Votes { - dAtA[i] = 0x2a - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { + if m.FinalizingTx != nil { + { + size := m.FinalizingTx.Size() + i -= size + if _, err := m.FinalizingTx.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n + i = encodeVarintPayload(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Proposal != nil { + { + size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintPayload(dAtA []byte, offset int, v uint64) int { + offset -= sovPayload(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Any) Size() (n int) { if m == nil { @@ -2442,14 +2633,7 @@ func (m *Ballot) Size() (n int) { } func sovPayload(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPayload(x uint64) (n int) { return sovPayload(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/txs/txs.pb.go b/txs/txs.pb.go index e580c18ac..80232703a 100644 --- a/txs/txs.pb.go +++ b/txs/txs.pb.go @@ -5,6 +5,10 @@ package txs import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" @@ -12,8 +16,6 @@ import ( crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_txs_payload "github.com/hyperledger/burrow/txs/payload" - io "io" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -77,7 +79,7 @@ func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Envelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -138,7 +140,7 @@ func (m *Signatory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Signatory.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -204,7 +206,7 @@ func (m *Receipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Receipt.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -291,7 +293,7 @@ var fileDescriptor_372ebcf753025bdc = []byte{ func (m *Envelope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -299,47 +301,57 @@ func (m *Envelope) Marshal() (dAtA []byte, err error) { } func (m *Envelope) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Envelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Signatories) > 0 { - for _, msg := range m.Signatories { - dAtA[i] = 0xa - i++ - i = encodeVarintTxs(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Enc != 0 { + i = encodeVarintTxs(dAtA, i, uint64(m.Enc)) + i-- + dAtA[i] = 0x18 + } + if m.Tx != nil { + { + size := m.Tx.Size() + i -= size + if _, err := m.Tx.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n + i = encodeVarintTxs(dAtA, i, uint64(size)) } - } - if m.Tx != nil { + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.Tx.Size())) - n1, err := m.Tx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 } - if m.Enc != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.Enc)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Signatories) > 0 { + for iNdEx := len(m.Signatories) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Signatories[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTxs(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *Signatory) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -347,50 +359,62 @@ func (m *Signatory) Marshal() (dAtA []byte, err error) { } func (m *Signatory) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Signatory) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Address != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.Address.Size())) - n2, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Signature != nil { + { + size, err := m.Signature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTxs(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0x22 } if m.PublicKey != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.PublicKey.Size())) - n3, err := m.PublicKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTxs(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x12 } - if m.Signature != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.Signature.Size())) - n4, err := m.Signature.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Address != nil { + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTxs(dAtA, i, uint64(size)) } - i += n4 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Receipt) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -398,55 +422,67 @@ func (m *Receipt) Marshal() (dAtA []byte, err error) { } func (m *Receipt) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Receipt) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TxType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.TxType)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - dAtA[i] = 0x12 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.TxHash.Size())) - n5, err := m.TxHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.ContractAddress.Size() + i -= size + if _, err := m.ContractAddress.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTxs(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0x22 if m.CreatesContract { - dAtA[i] = 0x18 - i++ + i-- if m.CreatesContract { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 } - dAtA[i] = 0x22 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.ContractAddress.Size())) - n6, err := m.ContractAddress.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.TxHash.Size() + i -= size + if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTxs(dAtA, i, uint64(size)) } - i += n6 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + if m.TxType != 0 { + i = encodeVarintTxs(dAtA, i, uint64(m.TxType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintTxs(dAtA []byte, offset int, v uint64) int { + offset -= sovTxs(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Envelope) Size() (n int) { if m == nil { @@ -520,14 +556,7 @@ func (m *Receipt) Size() (n int) { } func sovTxs(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTxs(x uint64) (n int) { return sovTxs(uint64((x << 1) ^ uint64((int64(x) >> 63)))) From 4c04f73194a6e7ee2b095c7949f530c7d8e7eda7 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 27 Sep 2019 17:30:11 +0100 Subject: [PATCH 021/185] update issue templates Signed-off-by: Gregory Hill --- .github/ISSUE_TEMPLATE.md | 12 ----------- .github/ISSUE_TEMPLATE/bug-report.md | 26 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature-request.md | 20 +++++++++++++++++ 3 files changed, 46 insertions(+), 12 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index ffb759270..000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,12 +0,0 @@ -Please include in your bug report: - -- [ ] `burrow version` (docker image tag or branch if built from source) -- [ ] `monax version` (if applicable) -- [ ] `go version` (if applicable) -- [ ] `docker version` (if applicable) -- [ ] operating system details (osx/windows/linux) -- [ ] what you expected to happen -- [ ] what actually happened -- [ ] steps to reproduction - -If issue is a feature request, tell us why this feature is useful. diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 000000000..7ca5385b4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,26 @@ +--- +name: Bug Report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the Bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior. + +**Expected Behavior** +A clear and concise description of what you expected to happen. + +**Technical Details** +- [ ] Burrow Version (docker image tag or branch if built from source) +- [ ] Go Version (if applicable) +- [ ] Docker Version (if applicable) +- [ ] Operating System (osx/windows/linux) + +**Additional Context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 000000000..e1c9a09ad --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,20 @@ +--- +name: Feature Request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 7800ed598e91edcb54fc3ed555fafe4bd6693c52 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 23 Sep 2019 15:21:03 +0100 Subject: [PATCH 022/185] Make natives first class contracts This work clears the ground for 'isotropic' calling between our different execution engines: EVM, Natives, and WASM. In the process it clears up a lot of cruft in an effort to make a better base for implementing our current Tx/ExecutionContexts as natives, i.e. 'everything is a contract'. In particular: - Standardise on 'native' to describe former 'snatives' and introduce package containing 'native' functionality including single implementations for certain core shared functionality (like initialising code, checking permissions, firing events). The idea is that some functionality here can be wrapped up in native.Contract objects and be exposed like the Permissions contract is now. - Remove the evm.State interface and replace it with static helpers and a simpler and generic (across VMs) CallFrame type that takes responsibility for establishing disposal call frames and tracking stack depth. - Introduce the Callable interface and associated State and CallParams types in a new 'engine' package. Make native functions and EVM contracts implement Callable. - Provide evm.Contract that is callable and use dispatcher so that EVM contracts can call native contracts with the same semantics as other EVM contracts. Via engine.Connect(). - Introduces Natives object that collects a selection of Callables and passes external callables to them. - Native callables are made to appear as if resident in state (TODO: include them in backend state for real). Also: Make JS buildable with node 12 and fix revert code TODO: make error code off-by-ones impossible by generating code form burrow (in typescript) Signed-off-by: Silas Davis --- Makefile | 5 +- acm/account.go | 13 + acm/acm.pb.go | 147 +- acm/acmstate/memory_state.go | 23 +- acm/acmstate/state.go | 22 +- bcm/blockchain.go | 8 +- .../commands/{snatives.go => natives.go} | 20 +- cmd/burrow/main.go | 4 +- core/kernel.go | 4 +- docs/reference/evm.md | 4 +- execution/config.go | 22 +- execution/contexts/blockchain.go | 14 - execution/contexts/bond_context.go | 8 +- execution/contexts/call_context.go | 155 +- execution/contexts/governance_context.go | 12 +- execution/contexts/name_context.go | 17 +- execution/contexts/permissions_context.go | 24 +- execution/contexts/proposal_context.go | 20 +- execution/contexts/send_context.go | 14 +- execution/contexts/shared.go | 10 +- execution/contexts/unbond_context.go | 6 +- execution/engine/call_frame.go | 65 + execution/engine/callable.go | 36 + execution/engine/dispatcher.go | 61 + execution/engine/dispatcher_test.go | 82 + execution/engine/state.go | 11 + execution/errors/code.go | 123 ++ execution/errors/errors.go | 259 +-- execution/errors/errors_test.go | 11 - execution/errors/exception.go | 81 + execution/errors/maybe.go | 66 + execution/errors/native.go | 18 +- execution/errors/vm.go | 2 +- execution/evm/contract.go | 977 +++++++++++ execution/evm/evm.go | 143 ++ execution/evm/evm_test.go | 1546 +++++++++++++++++ execution/evm/fake_app_state.go | 99 -- execution/evm/log_event_test.go | 96 - execution/evm/memory.go | 2 +- execution/evm/memory_test.go | 48 +- execution/evm/native.go | 142 -- execution/evm/options.go | 25 - execution/evm/snative.go | 517 ------ execution/evm/stack.go | 11 +- execution/evm/stack_test.go | 25 +- execution/evm/state.go | 430 ----- execution/evm/state_test.go | 86 - execution/evm/vm.go | 1100 ------------ execution/evm/vm_test.go | 1504 ---------------- execution/exec/call_event.go | 2 - execution/{evm => exec}/event_sink.go | 13 +- execution/exec/tx_execution.go | 6 +- execution/execution.go | 60 +- execution/execution_test.go | 262 ++- execution/native/account.go | 218 +++ execution/native/account_test.go | 93 + execution/native/call.go | 39 + execution/native/contract.go | 189 ++ execution/native/function.go | 194 +++ execution/{evm => native}/gas.go | 2 +- execution/native/native.go | 31 + execution/native/native_test.go | 12 + execution/native/natives.go | 154 ++ execution/native/permissions.go | 286 +++ .../permissions_test.go} | 105 +- execution/native/precompiles.go | 95 + execution/native/state.go | 92 + execution/simulated_call.go | 10 +- execution/wasm/wasm.go | 28 +- execution/wasm/wasm_test.go | 7 +- go.mod | 3 +- go.sum | 41 +- integration/rpctransact/call_test.go | 6 +- js/lib/contracts/function.js | 2 +- js/test/get_set_smoke_test/GetSet.sol.go | 7 + package-lock.json | 270 ++- package.json | 9 +- permission/base_permissions.go | 2 +- permission/perm_flag.go | 5 +- protobuf/acm.proto | 16 +- rpc/rpcquery/query_server.go | 34 +- txs/tx.go | 2 +- .../templates/indent_writer.go | 0 .../templates/solidity_templates.go | 22 +- .../templates/solidity_templates_test.go | 10 +- 85 files changed, 5464 insertions(+), 4981 deletions(-) rename cmd/burrow/commands/{snatives.go => natives.go} (73%) delete mode 100644 execution/contexts/blockchain.go create mode 100644 execution/engine/call_frame.go create mode 100644 execution/engine/callable.go create mode 100644 execution/engine/dispatcher.go create mode 100644 execution/engine/dispatcher_test.go create mode 100644 execution/engine/state.go create mode 100644 execution/errors/code.go create mode 100644 execution/errors/exception.go create mode 100644 execution/errors/maybe.go create mode 100644 execution/evm/contract.go create mode 100644 execution/evm/evm.go create mode 100644 execution/evm/evm_test.go delete mode 100644 execution/evm/fake_app_state.go delete mode 100644 execution/evm/log_event_test.go delete mode 100644 execution/evm/native.go delete mode 100644 execution/evm/options.go delete mode 100644 execution/evm/snative.go delete mode 100644 execution/evm/state.go delete mode 100644 execution/evm/state_test.go delete mode 100644 execution/evm/vm.go delete mode 100644 execution/evm/vm_test.go rename execution/{evm => exec}/event_sink.go (59%) create mode 100644 execution/native/account.go create mode 100644 execution/native/account_test.go create mode 100644 execution/native/call.go create mode 100644 execution/native/contract.go create mode 100644 execution/native/function.go rename execution/{evm => native}/gas.go (98%) create mode 100644 execution/native/native.go create mode 100644 execution/native/native_test.go create mode 100644 execution/native/natives.go create mode 100644 execution/native/permissions.go rename execution/{evm/snative_test.go => native/permissions_test.go} (55%) create mode 100644 execution/native/precompiles.go create mode 100644 execution/native/state.go create mode 100644 js/test/get_set_smoke_test/GetSet.sol.go rename util/{snatives => natives}/templates/indent_writer.go (100%) rename util/{snatives => natives}/templates/solidity_templates.go (89%) rename util/{snatives => natives}/templates/solidity_templates_test.go (82%) diff --git a/Makefile b/Makefile index e81025b51..54858d129 100644 --- a/Makefile +++ b/Makefile @@ -19,14 +19,15 @@ PROTO_GO_FILES = $(patsubst %.proto, %.pb.go, $(PROTO_FILES)) PROTO_GO_FILES_REAL = $(shell find . -path ./vendor -prune -o -type f -name '*.pb.go' -print) # Our own Go files containing the compiled bytecode of solidity files as a constant -SOLIDITY_FILES = $(shell find . -path ./vendor -prune -o -path ./tests -prune -o -type f -name '*.sol' -print) +SOLIDITY_FILES = $(shell find . -path ./docs -prune -o -path ./tests -prune -o -type f -name '*.sol' -print) SOLIDITY_GO_FILES = $(patsubst %.sol, %.sol.go, $(SOLIDITY_FILES)) SOLANG_FILES = $(shell find . -path ./vendor -prune -o -path ./tests -prune -o -type f -name '*.solang' -print) SOLANG_GO_FILES = $(patsubst %.solang, %.solang.go, $(SOLANG_FILES)) CI_IMAGE="hyperledger/burrow:ci" -GOPATH?=${HOME}/go +# Gets implicit default GOPATH if not set +GOPATH?=$(shell go env GOPATH) BIN_PATH?=${GOPATH}/bin export GO111MODULE=on diff --git a/acm/account.go b/acm/account.go index 3e0c281bf..01d9423f0 100644 --- a/acm/account.go +++ b/acm/account.go @@ -62,6 +62,19 @@ func (acc *Account) SubtractFromBalance(amount uint64) error { return nil } +// Return bytes of any code-type value that is set. EVM, WASM, or native name +func (acc *Account) Code() []byte { + switch { + case len(acc.EVMCode) > 0: + return acc.EVMCode + case len(acc.WASMCode) > 0: + return acc.WASMCode + case acc.NativeName != "": + return []byte(acc.NativeName) + } + return nil +} + // Conversions // // Using the naming convention is this package of 'As' being diff --git a/acm/acm.pb.go b/acm/acm.pb.go index 765cfadd2..d8f6e1d93 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -31,17 +31,29 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Account struct { - Address github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address"` - PublicKey crypto.PublicKey `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey"` - Sequence uint64 `protobuf:"varint,3,opt,name=Sequence,proto3" json:"Sequence,omitempty"` - Balance uint64 `protobuf:"varint,4,opt,name=Balance,proto3" json:"Balance,omitempty"` - EVMCode Bytecode `protobuf:"bytes,5,opt,name=EVMCode,proto3,customtype=Bytecode" json:"EVMCode"` - Permissions permission.AccountPermissions `protobuf:"bytes,6,opt,name=Permissions,proto3" json:"Permissions"` - WASMCode Bytecode `protobuf:"bytes,7,opt,name=WASMCode,proto3,customtype=Bytecode" json:",omitempty"` - CodeHash github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,8,opt,name=CodeHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"-"` - ContractMeta []*ContractMeta `protobuf:"bytes,9,rep,name=ContractMeta,proto3" json:"ContractMeta,omitempty"` - // The metadata is stored in the deployed account. When the deployed account creates new account (from Solidity/EVM), they point to the original deployed - // account where the metadata is stored. This original account is called the forebear. + Address github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address"` + PublicKey crypto.PublicKey `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey"` + // Sequence counts the number of transactions that have been accepted from this account + Sequence uint64 `protobuf:"varint,3,opt,name=Sequence,proto3" json:"Sequence,omitempty"` + // The account's current native token balance + Balance uint64 `protobuf:"varint,4,opt,name=Balance,proto3" json:"Balance,omitempty"` + // We expect exactly one of EVMCode, WASMCode, and NativeName to be non-empty + // EVM bytecode + EVMCode Bytecode `protobuf:"bytes,5,opt,name=EVMCode,proto3,customtype=Bytecode" json:"EVMCode"` + Permissions permission.AccountPermissions `protobuf:"bytes,6,opt,name=Permissions,proto3" json:"Permissions"` + // WASM bytecode + WASMCode Bytecode `protobuf:"bytes,7,opt,name=WASMCode,proto3,customtype=Bytecode" json:",omitempty"` + // Fully qualified (`.`) name of native contract this for which this account object + // is a sentinel value. Which is to say this account object is a pointer to compiled code and does not contain + // the contract logic in its entirety + NativeName string `protobuf:"bytes,11,opt,name=NativeName,proto3" json:",omitempty"` + // The sha3 hash of the code associated with the account + CodeHash github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,8,opt,name=CodeHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"-"` + // Pointer to the Metadata associated with this account + ContractMeta []*ContractMeta `protobuf:"bytes,9,rep,name=ContractMeta,proto3" json:"ContractMeta,omitempty"` + // The metadata is stored in the deployed account. When the deployed account creates new account + // (from Solidity/EVM), they point to the original deployed account where the metadata is stored. + // This original account is called the forebear. Forebear *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,10,opt,name=Forebear,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Forebear,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -104,6 +116,13 @@ func (m *Account) GetPermissions() permission.AccountPermissions { return permission.AccountPermissions{} } +func (m *Account) GetNativeName() string { + if m != nil { + return m.NativeName + } + return "" +} + func (m *Account) GetContractMeta() []*ContractMeta { if m != nil { return m.ContractMeta @@ -175,38 +194,39 @@ func init() { proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } func init() { golang_proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } var fileDescriptor_49ed775bc0a6adf6 = []byte{ - // 483 bytes of a gzipped FileDescriptorProto + // 506 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x31, 0x6f, 0xd3, 0x40, - 0x14, 0xee, 0x35, 0xa6, 0x76, 0xae, 0x19, 0xca, 0x4d, 0x56, 0x06, 0x3b, 0x74, 0x8a, 0x50, 0xe3, - 0x20, 0x20, 0x4b, 0x98, 0xe2, 0x8a, 0xaa, 0x12, 0x14, 0x15, 0x57, 0x2a, 0x82, 0xed, 0x7c, 0x7e, - 0x24, 0x96, 0x62, 0x9f, 0x39, 0x9f, 0x05, 0xfe, 0x27, 0x8c, 0xfc, 0x14, 0xc6, 0x8c, 0x8c, 0x85, - 0x21, 0x42, 0xe9, 0xd6, 0x5f, 0x81, 0x7c, 0xb9, 0x18, 0x87, 0x21, 0x12, 0x30, 0x25, 0xcf, 0xdf, - 0xf7, 0xbe, 0xef, 0x7b, 0xcf, 0xcf, 0xb8, 0x4d, 0x59, 0xe2, 0x65, 0x82, 0x4b, 0x4e, 0x5a, 0x94, - 0x25, 0xdd, 0xc1, 0x34, 0x96, 0xb3, 0x22, 0xf4, 0x18, 0x4f, 0x86, 0x53, 0x3e, 0xe5, 0x43, 0x85, - 0x85, 0xc5, 0x7b, 0x55, 0xa9, 0x42, 0xfd, 0x5b, 0xf7, 0x74, 0x8f, 0x32, 0x10, 0x49, 0x9c, 0xe7, - 0x31, 0x4f, 0xf5, 0x93, 0x0e, 0x13, 0x65, 0x26, 0x35, 0x7e, 0xfc, 0xdd, 0xc0, 0xe6, 0x84, 0x31, - 0x5e, 0xa4, 0x92, 0xbc, 0xc2, 0xe6, 0x24, 0x8a, 0x04, 0xe4, 0xb9, 0x8d, 0x7a, 0xa8, 0xdf, 0xf1, - 0x9f, 0x2e, 0x96, 0xee, 0xde, 0x8f, 0xa5, 0x7b, 0xd2, 0xf0, 0x9c, 0x95, 0x19, 0x88, 0x39, 0x44, - 0x53, 0x10, 0xc3, 0xb0, 0x10, 0x82, 0x7f, 0x1c, 0x6a, 0x41, 0xdd, 0x1b, 0x6c, 0x44, 0xc8, 0x08, - 0xb7, 0x2f, 0x8b, 0x70, 0x1e, 0xb3, 0x17, 0x50, 0xda, 0xfb, 0x3d, 0xd4, 0x3f, 0x7c, 0x7c, 0xdf, - 0xd3, 0xe4, 0x1a, 0xf0, 0x8d, 0xca, 0x24, 0xf8, 0xcd, 0x24, 0x5d, 0x6c, 0x5d, 0xc1, 0x87, 0x02, - 0x52, 0x06, 0x76, 0xab, 0x87, 0xfa, 0x46, 0x50, 0xd7, 0xc4, 0xc6, 0xa6, 0x4f, 0xe7, 0xb4, 0x82, - 0x0c, 0x05, 0x6d, 0x4a, 0xf2, 0x10, 0x9b, 0xcf, 0xaf, 0x2f, 0x4e, 0x79, 0x04, 0xf6, 0x3d, 0x15, - 0xfe, 0x48, 0x87, 0xb7, 0xfc, 0x52, 0x02, 0xe3, 0x11, 0x04, 0x1b, 0x02, 0x39, 0xc3, 0x87, 0x97, - 0xf5, 0x5a, 0x72, 0xfb, 0x40, 0x45, 0x73, 0xbc, 0xc6, 0xaa, 0xf4, 0x4a, 0x1a, 0x2c, 0x9d, 0xb3, - 0xd9, 0x48, 0xc6, 0xd8, 0x7a, 0x33, 0xb9, 0x5a, 0x9b, 0x9a, 0xca, 0xd4, 0xf9, 0xd3, 0xf4, 0x6e, - 0xe9, 0xe2, 0x13, 0x9e, 0xc4, 0x12, 0x92, 0x4c, 0x96, 0x41, 0xcd, 0x27, 0xd7, 0xd8, 0xaa, 0x7e, - 0xcf, 0x69, 0x3e, 0xb3, 0x2d, 0xd5, 0x3b, 0xd6, 0xbd, 0x83, 0xdd, 0xdb, 0x0e, 0xe3, 0x94, 0x8a, - 0xd2, 0x3b, 0x87, 0x4f, 0x95, 0x47, 0x7e, 0xb7, 0x74, 0xd1, 0x20, 0xa8, 0xb5, 0xc8, 0x08, 0x77, - 0x4e, 0x79, 0x2a, 0x05, 0x65, 0xf2, 0x02, 0x24, 0xb5, 0xdb, 0xbd, 0x96, 0xda, 0x7b, 0x75, 0x46, - 0x4d, 0x20, 0xd8, 0xa2, 0x91, 0x97, 0xd8, 0x3a, 0xe3, 0x02, 0x42, 0xa0, 0xc2, 0xc6, 0x2a, 0xce, - 0xa3, 0xbf, 0x7e, 0xf1, 0xb5, 0xc2, 0xd8, 0xf8, 0xfc, 0xc5, 0xdd, 0x3b, 0xbe, 0x41, 0xdb, 0x59, - 0xc8, 0xeb, 0xc6, 0xcc, 0xeb, 0x0b, 0x1b, 0xfd, 0xd3, 0xcc, 0x8d, 0x71, 0xdf, 0xe2, 0x4e, 0x25, - 0x1d, 0x51, 0x49, 0x95, 0xec, 0xfe, 0xff, 0xc8, 0x6e, 0x49, 0x55, 0x77, 0xb8, 0xa9, 0xd5, 0x1d, - 0xb6, 0x83, 0xba, 0xf6, 0x9f, 0x2d, 0x56, 0x0e, 0xfa, 0xb6, 0x72, 0xd0, 0xcd, 0xca, 0x41, 0x3f, - 0x57, 0x0e, 0xfa, 0x7a, 0xeb, 0xa0, 0xc5, 0xad, 0x83, 0xde, 0x3d, 0xd8, 0x6d, 0x49, 0x59, 0x12, - 0x1e, 0xa8, 0x4f, 0xef, 0xc9, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x68, 0x6a, 0xd3, 0xdb, - 0x03, 0x00, 0x00, + 0x18, 0xed, 0x35, 0x69, 0xe3, 0x5c, 0x22, 0x54, 0x6e, 0x3a, 0x65, 0x70, 0x4c, 0xa7, 0x08, 0x35, + 0x0e, 0x02, 0xb2, 0x84, 0x29, 0xae, 0xa8, 0x2a, 0x41, 0xa3, 0xe2, 0x4a, 0x45, 0xb0, 0x9d, 0xcf, + 0x1f, 0x89, 0xa5, 0xd8, 0x67, 0xce, 0x67, 0xc0, 0x3f, 0x81, 0x7f, 0xc0, 0xc8, 0x4f, 0x61, 0xcc, + 0xc8, 0x58, 0x31, 0x44, 0x28, 0xdd, 0xfa, 0x2b, 0x90, 0x2f, 0x8e, 0x71, 0x3a, 0x54, 0x82, 0x6e, + 0x79, 0x79, 0xef, 0x7b, 0xef, 0xdd, 0xdd, 0x67, 0xdc, 0x64, 0x3c, 0xb4, 0x63, 0x29, 0x94, 0x20, + 0x35, 0xc6, 0xc3, 0x4e, 0x7f, 0x1a, 0xa8, 0x59, 0xea, 0xd9, 0x5c, 0x84, 0x83, 0xa9, 0x98, 0x8a, + 0x81, 0xe6, 0xbc, 0xf4, 0x83, 0x46, 0x1a, 0xe8, 0x5f, 0xeb, 0x99, 0xce, 0x41, 0x0c, 0x32, 0x0c, + 0x92, 0x24, 0x10, 0x51, 0xf1, 0x4f, 0x9b, 0xcb, 0x2c, 0x56, 0x05, 0x7f, 0xf8, 0x75, 0x0f, 0x37, + 0xc6, 0x9c, 0x8b, 0x34, 0x52, 0x64, 0x82, 0x1b, 0x63, 0xdf, 0x97, 0x90, 0x24, 0x14, 0x59, 0xa8, + 0xd7, 0x76, 0x9e, 0x2f, 0x96, 0xdd, 0x9d, 0x5f, 0xcb, 0xee, 0x51, 0x25, 0x73, 0x96, 0xc5, 0x20, + 0xe7, 0xe0, 0x4f, 0x41, 0x0e, 0xbc, 0x54, 0x4a, 0xf1, 0x79, 0x50, 0x18, 0x16, 0xb3, 0xee, 0xc6, + 0x84, 0x0c, 0x71, 0xf3, 0x3c, 0xf5, 0xe6, 0x01, 0x7f, 0x05, 0x19, 0xdd, 0xb5, 0x50, 0xaf, 0xf5, + 0xf4, 0xa1, 0x5d, 0x88, 0x4b, 0xc2, 0xa9, 0xe7, 0x21, 0xee, 0x5f, 0x25, 0xe9, 0x60, 0xe3, 0x02, + 0x3e, 0xa6, 0x10, 0x71, 0xa0, 0x35, 0x0b, 0xf5, 0xea, 0x6e, 0x89, 0x09, 0xc5, 0x0d, 0x87, 0xcd, + 0x59, 0x4e, 0xd5, 0x35, 0xb5, 0x81, 0xe4, 0x31, 0x6e, 0xbc, 0xbc, 0x3c, 0x3b, 0x16, 0x3e, 0xd0, + 0x3d, 0x5d, 0xfe, 0xa0, 0x28, 0x6f, 0x38, 0x99, 0x02, 0x2e, 0x7c, 0x70, 0x37, 0x02, 0x72, 0x82, + 0x5b, 0xe7, 0xe5, 0xb5, 0x24, 0x74, 0x5f, 0x57, 0x33, 0xed, 0xca, 0x55, 0x15, 0x57, 0x52, 0x51, + 0x15, 0x3d, 0xab, 0x83, 0x64, 0x84, 0x8d, 0xb7, 0xe3, 0x8b, 0x75, 0x68, 0x43, 0x87, 0x9a, 0xb7, + 0x43, 0x6f, 0x96, 0x5d, 0x7c, 0x24, 0xc2, 0x40, 0x41, 0x18, 0xab, 0xcc, 0x2d, 0xf5, 0xc4, 0xc6, + 0x78, 0xc2, 0x54, 0xf0, 0x09, 0x26, 0x2c, 0x04, 0xda, 0xb2, 0x50, 0xaf, 0xe9, 0x3c, 0xb8, 0xa5, + 0xae, 0x28, 0xc8, 0x25, 0x36, 0xf2, 0xb9, 0x53, 0x96, 0xcc, 0xa8, 0xa1, 0xb3, 0x46, 0x45, 0x56, + 0xff, 0xee, 0xd7, 0xf1, 0x82, 0x88, 0xc9, 0xcc, 0x3e, 0x85, 0x2f, 0x79, 0xa7, 0xe4, 0x66, 0xd9, + 0x45, 0x7d, 0xb7, 0xf4, 0x22, 0x43, 0xdc, 0x3e, 0x16, 0x91, 0x92, 0x8c, 0xab, 0x33, 0x50, 0x8c, + 0x36, 0xad, 0x9a, 0x7e, 0xa7, 0x7c, 0xed, 0xaa, 0x84, 0xbb, 0x25, 0x23, 0xaf, 0xb1, 0x71, 0x22, + 0x24, 0x78, 0xc0, 0x24, 0xc5, 0xba, 0xce, 0x93, 0x7f, 0x5e, 0x94, 0xd2, 0x61, 0x54, 0xff, 0xf6, + 0xbd, 0xbb, 0x73, 0x78, 0x85, 0xb6, 0xbb, 0x90, 0x37, 0x95, 0x33, 0xaf, 0x37, 0x72, 0xf8, 0x5f, + 0x67, 0xae, 0x1c, 0xf7, 0x1d, 0x6e, 0xe7, 0xd6, 0x3e, 0x53, 0x4c, 0xdb, 0xee, 0xde, 0xc7, 0x76, + 0xcb, 0x2a, 0xdf, 0xdb, 0x0d, 0xd6, 0x7b, 0xdb, 0x74, 0x4b, 0xec, 0xbc, 0x58, 0xac, 0x4c, 0xf4, + 0x73, 0x65, 0xa2, 0xab, 0x95, 0x89, 0x7e, 0xaf, 0x4c, 0xf4, 0xe3, 0xda, 0x44, 0x8b, 0x6b, 0x13, + 0xbd, 0x7f, 0x74, 0x77, 0x24, 0xe3, 0xa1, 0xb7, 0xaf, 0x3f, 0xd5, 0x67, 0x7f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xa2, 0x2c, 0x48, 0xa4, 0x0b, 0x04, 0x00, 0x00, } func (m *Account) Marshal() (dAtA []byte, err error) { @@ -233,6 +253,13 @@ func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.NativeName) > 0 { + i -= len(m.NativeName) + copy(dAtA[i:], m.NativeName) + i = encodeVarintAcm(dAtA, i, uint64(len(m.NativeName))) + i-- + dAtA[i] = 0x5a + } if m.Forebear != nil { { size := m.Forebear.Size() @@ -431,6 +458,10 @@ func (m *Account) Size() (n int) { l = m.Forebear.Size() n += 1 + l + sovAcm(uint64(l)) } + l = len(m.NativeName) + if l > 0 { + n += 1 + l + sovAcm(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -797,6 +828,38 @@ func (m *Account) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NativeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAcm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAcm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAcm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NativeName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAcm(dAtA[iNdEx:]) diff --git a/acm/acmstate/memory_state.go b/acm/acmstate/memory_state.go index 300163792..4c8c0387c 100644 --- a/acm/acmstate/memory_state.go +++ b/acm/acmstate/memory_state.go @@ -1,11 +1,11 @@ package acmstate import ( - "fmt" - "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/permission" ) type MemoryState struct { @@ -19,7 +19,11 @@ var _ IterableReaderWriter = &MemoryState{} // Get an in-memory state IterableReader func NewMemoryState() *MemoryState { return &MemoryState{ - Accounts: make(map[crypto.Address]*acm.Account), + Accounts: map[crypto.Address]*acm.Account{ + acm.GlobalPermissionsAddress: { + Permissions: permission.DefaultAccountPermissions, + }, + }, Storage: make(map[crypto.Address]map[binary.Word256][]byte), Metadata: make(map[MetadataHash]string), } @@ -31,7 +35,7 @@ func (ms *MemoryState) GetAccount(address crypto.Address) (*acm.Account, error) func (ms *MemoryState) UpdateAccount(updatedAccount *acm.Account) error { if updatedAccount == nil { - return fmt.Errorf("UpdateAccount passed nil account in MemoryState") + return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, "UpdateAccount passed nil account in MemoryState") } ms.Accounts[updatedAccount.GetAddress()] = updatedAccount return nil @@ -52,15 +56,16 @@ func (ms *MemoryState) RemoveAccount(address crypto.Address) error { } func (ms *MemoryState) GetStorage(address crypto.Address, key binary.Word256) ([]byte, error) { - storage, ok := ms.Storage[address] + _, ok := ms.Accounts[address] if !ok { - return []byte{}, fmt.Errorf("could not find storage for account %s", address) + return nil, errors.ErrorCodef(errors.ErrorCodeNonExistentAccount, + "could not get storage for non-existent account: %v", address) } - value, ok := storage[key] + storage, ok := ms.Storage[address] if !ok { - return []byte{}, fmt.Errorf("could not find key %x for account %s", key, address) + return nil, nil } - return value, nil + return storage[key], nil } func (ms *MemoryState) SetStorage(address crypto.Address, key binary.Word256, value []byte) error { diff --git a/acm/acmstate/state.go b/acm/acmstate/state.go index d32b56ce1..ca61ddac5 100644 --- a/acm/acmstate/state.go +++ b/acm/acmstate/state.go @@ -1,6 +1,8 @@ package acmstate import ( + "fmt" + "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" @@ -114,7 +116,7 @@ type MetadataGetter interface { type MetadataSetter interface { // Set an Metadata according to it keccak-256 hash. - SetMetadata(metahash MetadataHash, Metadata string) error + SetMetadata(metahash MetadataHash, metadata string) error } type AccountStats struct { @@ -170,20 +172,14 @@ type IterableReaderWriter interface { Writer } -func GlobalPermissionsAccount(getter AccountGetter) *acm.Account { +// Get global permissions from the account at GlobalPermissionsAddress +func GlobalAccountPermissions(getter AccountGetter) (permission.AccountPermissions, error) { acc, err := getter.GetAccount(acm.GlobalPermissionsAddress) if err != nil { - panic("Could not get global permission account, but this must exist") + return permission.AccountPermissions{}, err } - return acc -} - -// Get global permissions from the account at GlobalPermissionsAddress -func GlobalAccountPermissions(getter AccountGetter) permission.AccountPermissions { - if getter == nil { - return permission.AccountPermissions{ - Roles: []string{}, - } + if acc == nil { + return permission.AccountPermissions{}, fmt.Errorf("global permissions account is not defined but must be") } - return GlobalPermissionsAccount(getter).Permissions + return acc.Permissions, nil } diff --git a/bcm/blockchain.go b/bcm/blockchain.go index 79df4727a..aaa4c5f65 100644 --- a/bcm/blockchain.go +++ b/bcm/blockchain.go @@ -41,7 +41,7 @@ type BlockchainInfo interface { LastBlockHash() []byte AppHashAfterLastBlock() []byte // Gets the BlockHash at a height (or nil if no BlockStore mounted or block could not be found) - BlockHash(height uint64) []byte + BlockHash(height uint64) ([]byte, error) // GetBlockHash returns hash of the specific block GetBlockHeader(blockNumber uint64) (*types.Header, error) } @@ -238,12 +238,12 @@ func (bc *Blockchain) SetBlockStore(bs *BlockStore) { bc.blockStore = bs } -func (bc *Blockchain) BlockHash(height uint64) []byte { +func (bc *Blockchain) BlockHash(height uint64) ([]byte, error) { header, err := bc.GetBlockHeader(height) if err != nil { - return nil + return nil, err } - return header.Hash() + return header.Hash(), nil } func (bc *Blockchain) GetBlockHeader(height uint64) (*types.Header, error) { diff --git a/cmd/burrow/commands/snatives.go b/cmd/burrow/commands/natives.go similarity index 73% rename from cmd/burrow/commands/snatives.go rename to cmd/burrow/commands/natives.go index c607353e3..4a2dd2814 100644 --- a/cmd/burrow/commands/snatives.go +++ b/cmd/burrow/commands/natives.go @@ -17,21 +17,27 @@ package commands import ( "fmt" + "github.com/hyperledger/burrow/execution/native" cli "github.com/jawher/mow.cli" - "github.com/hyperledger/burrow/execution/evm" - "github.com/hyperledger/burrow/util/snatives/templates" + "github.com/hyperledger/burrow/util/natives/templates" ) -// Dump SNative contracts -func Snatives(output Output) func(cmd *cli.Cmd) { +// Dump native contracts +func Natives(output Output) func(cmd *cli.Cmd) { return func(cmd *cli.Cmd) { contractsOpt := cmd.StringsOpt("c contracts", nil, "Contracts to generate") cmd.Action = func() { - contracts := evm.SNativeContracts() + callables := native.MustDefaultNatives().Callables() // Index of next contract i := 1 - for _, contract := range contracts { + for _, callable := range callables { + contract, ok := callable.(*native.Contract) + if !ok { + // For now we will omit loose functions (i.e. precompiles) + // They can't be called via Solidity interface contract anyway. + continue + } if len(*contractsOpt) > 0 { found := false for _, c := range *contractsOpt { @@ -50,7 +56,7 @@ func Snatives(output Output) func(cmd *cli.Cmd) { contract.Name, err) } fmt.Println(solidity) - if i < len(contracts) { + if i < len(callables) { // Two new lines between contracts as per Solidity style guide // (the template gives us 1 trailing new line) fmt.Println() diff --git a/cmd/burrow/main.go b/cmd/burrow/main.go index c235eda8b..ad0132128 100644 --- a/cmd/burrow/main.go +++ b/cmd/burrow/main.go @@ -63,8 +63,8 @@ func burrow(output commands.Output) *cli.Cli { app.Command("deploy", "Deploy and test contracts", commands.Deploy(output)) - app.Command("snatives", "Dump Solidity interface contracts for SNatives", - commands.Snatives(output)) + app.Command("natives", "Dump Solidity interface contracts for Burrow native contracts", + commands.Natives(output)) app.Command("vent", "Start the Vent EVM event and blocks consumer service to populated databases from smart contracts", commands.Vent(output)) diff --git a/core/kernel.go b/core/kernel.go index f80aed9bc..cd109701c 100644 --- a/core/kernel.go +++ b/core/kernel.go @@ -71,7 +71,7 @@ type Kernel struct { Logger *logging.Logger database dbm.DB txCodec txs.Codec - exeOptions []execution.ExecutionOption + exeOptions []execution.Option checker execution.BatchExecutor committer execution.BatchCommitter keyClient keys.KeyClient @@ -210,7 +210,7 @@ func (kern *Kernel) GetNodeView() (*tendermint.NodeView, error) { } // AddExecutionOptions extends our execution options -func (kern *Kernel) AddExecutionOptions(opts ...execution.ExecutionOption) { +func (kern *Kernel) AddExecutionOptions(opts ...execution.Option) { kern.exeOptions = append(kern.exeOptions, opts...) } diff --git a/docs/reference/evm.md b/docs/reference/evm.md index 706b3befe..cf4f1f5d7 100644 --- a/docs/reference/evm.md +++ b/docs/reference/evm.md @@ -24,10 +24,10 @@ Ethereum precompile contracts. ## Extensions -We have a notion similar to precompiled contracts that we call 'SNatives' whereby we mount pseudo-contracts at a particular address with functions that can be called that expose +We have a notion similar to precompiled contracts that we call 'natives' whereby we mount pseudo-contracts at a particular address with functions that can be called that expose certain native functionality of Burrow. Most prominent is access to our permissioning system. SNatives can be displayed with `burrow snatives`. -Much of the innovation that Burrow intends to offer at the smart contract level will be provided through our SNative system including access to: +Much of the innovation that Burrow intends to offer at the smart contract level will be provided through our 'native contracts' including access to: - WASM contracts - Global namn/ABI registry diff --git a/execution/config.go b/execution/config.go index e828745ea..09717d7de 100644 --- a/execution/config.go +++ b/execution/config.go @@ -34,28 +34,32 @@ func DefaultExecutionConfig() *ExecutionConfig { } } -type ExecutionOption func(*executor) +type Option func(*executor) -func VMOptions(vmOptions ...func(*evm.VM)) func(*executor) { +func VMOptions(vmOptions evm.Options) func(*executor) { return func(exe *executor) { exe.vmOptions = vmOptions } } -func (ec *ExecutionConfig) ExecutionOptions() ([]ExecutionOption, error) { - var exeOptions []ExecutionOption - var vmOptions []func(*evm.VM) +func (ec *ExecutionConfig) ExecutionOptions() ([]Option, error) { + var exeOptions []Option + vmOptions := evm.Options{ + MemoryProvider: evm.DefaultDynamicMemoryProvider, + CallStackMaxDepth: ec.CallStackMaxDepth, + DataStackInitialCapacity: ec.DataStackInitialCapacity, + DataStackMaxDepth: ec.DataStackMaxDepth, + } for _, option := range ec.VMOptions { switch option { case DebugOpcodes: - vmOptions = append(vmOptions, evm.DebugOpcodes) + vmOptions.DebugOpcodes = true case DumpTokens: - vmOptions = append(vmOptions, evm.DumpTokens) + vmOptions.DumpTokens = true default: return nil, fmt.Errorf("VM option '%s' not recognised", option) } } - vmOptions = append(vmOptions, evm.StackOptions(ec.CallStackMaxDepth, ec.DataStackInitialCapacity, ec.DataStackMaxDepth)) - exeOptions = append(exeOptions, VMOptions(vmOptions...)) + exeOptions = append(exeOptions, VMOptions(vmOptions)) return exeOptions, nil } diff --git a/execution/contexts/blockchain.go b/execution/contexts/blockchain.go deleted file mode 100644 index e8884889c..000000000 --- a/execution/contexts/blockchain.go +++ /dev/null @@ -1,14 +0,0 @@ -package contexts - -import "time" - -// Execution's sufficient view of blockchain -type Blockchain interface { - BlockHash(height uint64) []byte - LastBlockTime() time.Time - BlockchainHeight -} - -type BlockchainHeight interface { - LastBlockHeight() uint64 -} diff --git a/execution/contexts/bond_context.go b/execution/contexts/bond_context.go index b7d31da27..315c2554e 100644 --- a/execution/contexts/bond_context.go +++ b/execution/contexts/bond_context.go @@ -12,7 +12,7 @@ import ( ) type BondContext struct { - StateWriter acmstate.ReaderWriter + State acmstate.ReaderWriter ValidatorSet validator.ReaderWriter Logger *logging.Logger tx *payload.BondTx @@ -28,13 +28,13 @@ func (ctx *BondContext) Execute(txe *exec.TxExecution, p payload.Payload) error // the account initiating the bond power := new(big.Int).SetUint64(ctx.tx.Input.GetAmount()) - account, err := ctx.StateWriter.GetAccount(ctx.tx.Input.Address) + account, err := ctx.State.GetAccount(ctx.tx.Input.Address) if err != nil { return err } // can the account bond? - if !hasBondPermission(ctx.StateWriter, account, ctx.Logger) { + if !hasBondPermission(ctx.State, account, ctx.Logger) { return fmt.Errorf("account '%s' lacks bond permission", account.Address) } @@ -59,5 +59,5 @@ func (ctx *BondContext) Execute(txe *exec.TxExecution, p payload.Payload) error return err } - return ctx.StateWriter.UpdateAccount(account) + return ctx.State.UpdateAccount(account) } diff --git a/execution/contexts/call_context.go b/execution/contexts/call_context.go index 26c1018d8..9f55a1648 100644 --- a/execution/contexts/call_context.go +++ b/execution/contexts/call_context.go @@ -3,13 +3,14 @@ package contexts import ( "fmt" - "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm" "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/execution/native" "github.com/hyperledger/burrow/execution/wasm" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/structure" @@ -20,13 +21,13 @@ import ( const GasLimit = uint64(1000000) type CallContext struct { - StateWriter acmstate.ReaderWriter - RunCall bool - Blockchain Blockchain - VMOptions []func(*evm.VM) - Logger *logging.Logger - tx *payload.CallTx - txe *exec.TxExecution + EVM *evm.EVM + State acmstate.ReaderWriter + Blockchain engine.Blockchain + RunCall bool + Logger *logging.Logger + tx *payload.CallTx + txe *exec.TxExecution } func (ctx *CallContext) Execute(txe *exec.TxExecution, p payload.Payload) error { @@ -52,7 +53,7 @@ func (ctx *CallContext) Execute(txe *exec.TxExecution, p payload.Payload) error func (ctx *CallContext) Precheck() (*acm.Account, *acm.Account, error) { var outAcc *acm.Account // Validate input - inAcc, err := ctx.StateWriter.GetAccount(ctx.tx.Input.Address) + inAcc, err := ctx.State.GetAccount(ctx.tx.Input.Address) if err != nil { return nil, nil, err } @@ -77,33 +78,25 @@ func (ctx *CallContext) Precheck() (*acm.Account, *acm.Account, error) { createContract := ctx.tx.Address == nil if createContract { - if !hasCreateContractPermission(ctx.StateWriter, inAcc, ctx.Logger) { + if !hasCreateContractPermission(ctx.State, inAcc, ctx.Logger) { return nil, nil, fmt.Errorf("account %s does not have CreateContract permission", ctx.tx.Input.Address) } } else { - if !hasCallPermission(ctx.StateWriter, inAcc, ctx.Logger) { + if !hasCallPermission(ctx.State, inAcc, ctx.Logger) { return nil, nil, fmt.Errorf("account %s does not have Call permission", ctx.tx.Input.Address) } - // check if its a native contract - if evm.IsRegisteredNativeContract(*ctx.tx.Address) { - return nil, nil, errors.ErrorCodef(errors.ErrorCodeReservedAddress, - "attempt to call a native contract at %s, "+ - "but native contracts cannot be called using CallTx. Use a "+ - "contract that calls the native contract or the appropriate tx "+ - "type (eg. PermsTx, NameTx)", ctx.tx.Address) - } // Output account may be nil if we are still in mempool and contract was created in same block as this tx // but that's fine, because the account will be created properly when the create tx runs in the block // and then this won't return nil. otherwise, we take their fee // Note: ctx.tx.Address == nil iff createContract so dereference is okay - outAcc, err = ctx.StateWriter.GetAccount(*ctx.tx.Address) + outAcc, err = ctx.State.GetAccount(*ctx.tx.Address) if err != nil { return nil, nil, err } } - err = ctx.StateWriter.UpdateAccount(inAcc) + err = ctx.State.UpdateAccount(inAcc) if err != nil { return nil, nil, err } @@ -116,7 +109,7 @@ func (ctx *CallContext) Check(inAcc *acm.Account, value uint64) error { if err != nil { return err } - err = ctx.StateWriter.UpdateAccount(inAcc) + err = ctx.State.UpdateAccount(inAcc) if err != nil { return err } @@ -124,22 +117,14 @@ func (ctx *CallContext) Check(inAcc *acm.Account, value uint64) error { } func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error { - createContract := ctx.tx.Address == nil // VM call variables - var ( - gas uint64 = ctx.tx.GasLimit - caller crypto.Address = inAcc.Address - callee crypto.Address = crypto.ZeroAddress // initialized below - code []byte = nil - wcode []byte = nil - ret []byte = nil - txCache = evm.NewState(ctx.StateWriter, ctx.Blockchain.BlockHash, acmstate.Named("TxCache")) - params = evm.Params{ - BlockHeight: ctx.Blockchain.LastBlockHeight() + 1, - BlockTime: ctx.Blockchain.LastBlockTime().Unix(), - GasLimit: GasLimit, - } - ) + createContract := ctx.tx.Address == nil + caller := inAcc.Address + txCache := acmstate.NewCache(ctx.State, acmstate.Named("TxCache")) + + var callee crypto.Address + var code []byte + var wcode []byte // get or create callee if createContract { @@ -147,24 +132,18 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error callee = crypto.NewContractAddress(caller, ctx.txe.TxHash) code = ctx.tx.Data wcode = ctx.tx.WASM - txCache.CreateAccount(callee) + err := native.CreateAccount(txCache, callee) + if err != nil { + return err + } ctx.Logger.TraceMsg("Creating new contract", "contract_address", callee, "init_code", code) // store abis - if len(ctx.tx.ContractMeta) > 0 { - metamap := make([]*acm.ContractMeta, len(ctx.tx.ContractMeta)) - for i, abi := range ctx.tx.ContractMeta { - metahash := acmstate.GetMetadataHash(abi.Meta) - metamap[i] = &acm.ContractMeta{ - MetadataHash: metahash[:], - CodeHash: abi.CodeHash, - } - txCache.SetMetadata(metahash, abi.Meta) - } - - txCache.UpdateMetaMap(callee, metamap) + err = native.UpdateContractMeta(txCache, callee, ctx.tx.ContractMeta) + if err != nil { + return err } } else { if outAcc == nil { @@ -185,69 +164,91 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error return nil } callee = outAcc.Address - code = txCache.GetEVMCode(callee) - wcode = txCache.GetWASMCode(callee) + acc, err := txCache.GetAccount(callee) + if err != nil { + return err + } + code = acc.EVMCode + wcode = acc.WASMCode ctx.Logger.TraceMsg("Calling existing contract", "contract_address", callee, "input", ctx.tx.Data, - "contract_code", code) + "evm_code", code, + "wasm_code", wcode) } ctx.Logger.Trace.Log("callee", callee) + var ret []byte + var err error txHash := ctx.txe.Envelope.Tx.Hash() - logger := ctx.Logger.With(structure.TxHashKey, txHash) - var exception errors.CodedError + gas := ctx.tx.GasLimit if len(wcode) != 0 { if createContract { - txCache.InitWASMCode(callee, wcode) + err := native.InitWASMCode(txCache, callee, wcode) + if err != nil { + return err + } } - ret, exception = wasm.RunWASM(txCache, callee, createContract, wcode, ctx.tx.Data) - if exception != nil { + ret, err = wasm.RunWASM(txCache, callee, createContract, wcode, ctx.tx.Data) + if err != nil { // Failure. Charge the gas fee. The 'value' was otherwise not transferred. ctx.Logger.InfoMsg("Error on WASM execution", - structure.ErrorKey, exception) + structure.ErrorKey, err) - ctx.txe.PushError(errors.ErrorCodef(exception.ErrorCode(), "call error: %s\n", - exception.String())) + ctx.txe.PushError(errors.Wrap(err, "call error")) } else { ctx.Logger.TraceMsg("Successful execution") - err := txCache.Sync() + err := txCache.Sync(ctx.State) if err != nil { return err } } - ctx.txe.Return(ret, ctx.tx.GasLimit-gas) } else { // EVM - vmach := evm.NewVM(params, caller, txHash, logger, ctx.VMOptions...) - ret, exception = vmach.Call(txCache, ctx.txe, caller, callee, code, ctx.tx.Data, value, &gas) - if exception != nil { + ctx.EVM.SetNonce(txHash) + ctx.EVM.SetLogger(ctx.Logger.With(structure.TxHashKey, txHash)) + + params := engine.CallParams{ + Origin: caller, + Caller: caller, + Callee: callee, + Input: ctx.tx.Data, + Value: value, + Gas: &gas, + } + + ret, err = ctx.EVM.Execute(txCache, ctx.Blockchain, ctx.txe, params, code) + + if err != nil { // Failure. Charge the gas fee. The 'value' was otherwise not transferred. ctx.Logger.InfoMsg("Error on EVM execution", - structure.ErrorKey, exception) + structure.ErrorKey, err) - ctx.txe.PushError(errors.ErrorCodef(exception.ErrorCode(), "call error: %s\nEVM call trace: %s", - exception.String(), ctx.txe.CallTrace())) + ctx.txe.PushError(errors.Wrapf(err, "call error: %v\nEVM call trace: %s", + err, ctx.txe.CallTrace())) } else { ctx.Logger.TraceMsg("Successful execution") if createContract { - txCache.InitCode(callee, ret) + err := native.InitCode(txCache, callee, ret) + if err != nil { + return err + } } - err := txCache.Sync() + err := txCache.Sync(ctx.State) if err != nil { return err } } - ctx.CallEvents(exception) - ctx.txe.Return(ret, ctx.tx.GasLimit-gas) + ctx.CallEvents(err) } - + ctx.txe.Return(ret, ctx.tx.GasLimit-gas) // Create a receipt from the ret and whether it erred. - ctx.Logger.TraceMsg("VM call complete", + ctx.Logger.TraceMsg("VM Call complete", "caller", caller, "callee", callee, "return", ret, - structure.ErrorKey, exception) + structure.ErrorKey, err) + return nil } diff --git a/execution/contexts/governance_context.go b/execution/contexts/governance_context.go index fde105578..35f4f8578 100644 --- a/execution/contexts/governance_context.go +++ b/execution/contexts/governance_context.go @@ -17,7 +17,7 @@ import ( ) type GovernanceContext struct { - StateWriter acmstate.ReaderWriter + State acmstate.ReaderWriter ValidatorSet validator.ReaderWriter Logger *logging.Logger tx *payload.GovTx @@ -34,13 +34,13 @@ func (ctx *GovernanceContext) Execute(txe *exec.TxExecution, p payload.Payload) return fmt.Errorf("payload must be NameTx, but is: %v", txe.Envelope.Tx.Payload) } // Nothing down with any incoming funds at this point - accounts, _, err := getInputs(ctx.StateWriter, ctx.tx.Inputs) + accounts, _, err := getInputs(ctx.State, ctx.tx.Inputs) if err != nil { return err } // ensure all inputs have root permissions - err = allHavePermission(ctx.StateWriter, permission.Root, accounts, ctx.Logger) + err = allHavePermission(ctx.State, permission.Root, accounts, ctx.Logger) if err != nil { return errors.Wrap(err, "at least one input lacks permission for GovTx") } @@ -50,11 +50,11 @@ func (ctx *GovernanceContext) Execute(txe *exec.TxExecution, p payload.Payload) } for _, update := range ctx.tx.AccountUpdates { - err := VerifyIdentity(ctx.StateWriter, update) + err := VerifyIdentity(ctx.State, update) if err != nil { return fmt.Errorf("GovTx: %v", err) } - account, err := getOrMakeOutput(ctx.StateWriter, accounts, *update.Address, ctx.Logger) + account, err := getOrMakeOutput(ctx.State, accounts, *update.Address, ctx.Logger) if err != nil { return err } @@ -107,7 +107,7 @@ func (ctx *GovernanceContext) UpdateAccount(account *acm.Account, update *spec.T if err != nil { return } - err = ctx.StateWriter.UpdateAccount(account) + err = ctx.State.UpdateAccount(account) return } diff --git a/execution/contexts/name_context.go b/execution/contexts/name_context.go index 1aa5a9c9d..9f5a0e1dc 100644 --- a/execution/contexts/name_context.go +++ b/execution/contexts/name_context.go @@ -6,6 +6,7 @@ import ( "regexp" "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/names" @@ -19,11 +20,11 @@ var regexpAlphaNum = regexp.MustCompile("^[a-zA-Z0-9._/-@]*$") var regexpJSON = regexp.MustCompile(`^[a-zA-Z0-9_/ \-+"':,\n\t.{}()\[\]]*$`) type NameContext struct { - Blockchain BlockchainHeight - StateWriter acmstate.ReaderWriter - NameReg names.ReaderWriter - Logger *logging.Logger - tx *payload.NameTx + Blockchain engine.Blockchain + State acmstate.ReaderWriter + NameReg names.ReaderWriter + Logger *logging.Logger + tx *payload.NameTx } func (ctx *NameContext) Execute(txe *exec.TxExecution, p payload.Payload) error { @@ -33,7 +34,7 @@ func (ctx *NameContext) Execute(txe *exec.TxExecution, p payload.Payload) error return fmt.Errorf("payload must be NameTx, but is: %v", txe.Envelope.Tx.Payload) } // Validate input - inAcc, err := ctx.StateWriter.GetAccount(ctx.tx.Input.Address) + inAcc, err := ctx.State.GetAccount(ctx.tx.Input.Address) if err != nil { return err } @@ -43,7 +44,7 @@ func (ctx *NameContext) Execute(txe *exec.TxExecution, p payload.Payload) error return errors.ErrorCodeInvalidAddress } // check permission - if !hasNamePermission(ctx.StateWriter, inAcc, ctx.Logger) { + if !hasNamePermission(ctx.State, inAcc, ctx.Logger) { return fmt.Errorf("account %s does not have Name permission", ctx.tx.Input.Address) } if ctx.tx.Input.Amount < ctx.tx.Fee { @@ -170,7 +171,7 @@ func (ctx *NameContext) Execute(txe *exec.TxExecution, p payload.Payload) error return errors.ErrorCodef(errors.ErrorCodeInsufficientFunds, "Input account does not have sufficient balance to cover input amount: %v", ctx.tx.Input) } - err = ctx.StateWriter.UpdateAccount(inAcc) + err = ctx.State.UpdateAccount(inAcc) if err != nil { return err } diff --git a/execution/contexts/permissions_context.go b/execution/contexts/permissions_context.go index a11752e78..50bc2c09f 100644 --- a/execution/contexts/permissions_context.go +++ b/execution/contexts/permissions_context.go @@ -14,9 +14,9 @@ import ( ) type PermissionsContext struct { - StateWriter acmstate.ReaderWriter - Logger *logging.Logger - tx *payload.PermsTx + State acmstate.ReaderWriter + Logger *logging.Logger + tx *payload.PermsTx } func (ctx *PermissionsContext) Execute(txe *exec.TxExecution, p payload.Payload) error { @@ -26,7 +26,7 @@ func (ctx *PermissionsContext) Execute(txe *exec.TxExecution, p payload.Payload) return fmt.Errorf("payload must be PermsTx, but is: %v", txe.Envelope.Tx.Payload) } // Validate input - inAcc, err := ctx.StateWriter.GetAccount(ctx.tx.Input.Address) + inAcc, err := ctx.State.GetAccount(ctx.tx.Input.Address) if err != nil { return err } @@ -43,7 +43,7 @@ func (ctx *PermissionsContext) Execute(txe *exec.TxExecution, p payload.Payload) permFlag := ctx.tx.PermArgs.Action // check permission - if !HasPermission(ctx.StateWriter, inAcc, permFlag, ctx.Logger) { + if !HasPermission(ctx.State, inAcc, permFlag, ctx.Logger) { return fmt.Errorf("account %s does not have moderator permission %s (%b)", ctx.tx.Input.Address, permFlag.String(), permFlag) } @@ -59,24 +59,24 @@ func (ctx *PermissionsContext) Execute(txe *exec.TxExecution, p payload.Payload) // this one doesn't make sense from txs return fmt.Errorf("HasBase is for contracts, not humans. Just look at the blockchain") case permission.SetBase: - permAcc, err = mutatePermissions(ctx.StateWriter, *ctx.tx.PermArgs.Target, + permAcc, err = mutatePermissions(ctx.State, *ctx.tx.PermArgs.Target, func(perms *permission.AccountPermissions) error { return perms.Base.Set(*ctx.tx.PermArgs.Permission, *ctx.tx.PermArgs.Value) }) case permission.UnsetBase: - permAcc, err = mutatePermissions(ctx.StateWriter, *ctx.tx.PermArgs.Target, + permAcc, err = mutatePermissions(ctx.State, *ctx.tx.PermArgs.Target, func(perms *permission.AccountPermissions) error { return perms.Base.Unset(*ctx.tx.PermArgs.Permission) }) case permission.SetGlobal: - permAcc, err = mutatePermissions(ctx.StateWriter, acm.GlobalPermissionsAddress, + permAcc, err = mutatePermissions(ctx.State, acm.GlobalPermissionsAddress, func(perms *permission.AccountPermissions) error { return perms.Base.Set(*ctx.tx.PermArgs.Permission, *ctx.tx.PermArgs.Value) }) case permission.HasRole: return fmt.Errorf("HasRole is for contracts, not humans. Just look at the blockchain") case permission.AddRole: - permAcc, err = mutatePermissions(ctx.StateWriter, *ctx.tx.PermArgs.Target, + permAcc, err = mutatePermissions(ctx.State, *ctx.tx.PermArgs.Target, func(perms *permission.AccountPermissions) error { if !perms.AddRole(*ctx.tx.PermArgs.Role) { return fmt.Errorf("role (%s) already exists for account %s", @@ -85,7 +85,7 @@ func (ctx *PermissionsContext) Execute(txe *exec.TxExecution, p payload.Payload) return nil }) case permission.RemoveRole: - permAcc, err = mutatePermissions(ctx.StateWriter, *ctx.tx.PermArgs.Target, + permAcc, err = mutatePermissions(ctx.State, *ctx.tx.PermArgs.Target, func(perms *permission.AccountPermissions) error { if !perms.RemoveRole(*ctx.tx.PermArgs.Role) { return fmt.Errorf("role (%s) does not exist for account %s", @@ -109,12 +109,12 @@ func (ctx *PermissionsContext) Execute(txe *exec.TxExecution, p payload.Payload) return errors.ErrorCodef(errors.ErrorCodeInsufficientFunds, "Input account does not have sufficient balance to cover input amount: %v", ctx.tx.Input) } - err = ctx.StateWriter.UpdateAccount(inAcc) + err = ctx.State.UpdateAccount(inAcc) if err != nil { return err } if permAcc != nil { - err = ctx.StateWriter.UpdateAccount(permAcc) + err = ctx.State.UpdateAccount(permAcc) if err != nil { return err } diff --git a/execution/contexts/proposal_context.go b/execution/contexts/proposal_context.go index 9698c9913..a1585745f 100644 --- a/execution/contexts/proposal_context.go +++ b/execution/contexts/proposal_context.go @@ -21,7 +21,7 @@ import ( type ProposalContext struct { ChainID string ProposalThreshold uint64 - StateWriter acmstate.ReaderWriter + State acmstate.ReaderWriter ValidatorSet validator.Writer ProposalReg proposal.ReaderWriter Logger *logging.Logger @@ -36,7 +36,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er return fmt.Errorf("payload must be ProposalTx, but is: %v", txe.Envelope.Tx.Payload) } // Validate input - inAcc, err := ctx.StateWriter.GetAccount(ctx.tx.Input.Address) + inAcc, err := ctx.State.GetAccount(ctx.tx.Input.Address) if err != nil { return err } @@ -48,7 +48,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er } // check permission - if !hasProposalPermission(ctx.StateWriter, inAcc, ctx.Logger) { + if !hasProposalPermission(ctx.State, inAcc, ctx.Logger) { return fmt.Errorf("account %s does not have Proposal permission", ctx.tx.Input.Address) } @@ -111,12 +111,12 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er } for _, v := range ballot.Votes { - acc, err := ctx.StateWriter.GetAccount(v.Address) + acc, err := ctx.State.GetAccount(v.Address) if err != nil { return err } // Belt and braces, should have already been checked - if !hasProposalPermission(ctx.StateWriter, acc, ctx.Logger) { + if !hasProposalPermission(ctx.State, acc, ctx.Logger) { return fmt.Errorf("account %s does not have Proposal permission", ctx.tx.Input.Address) } votes[v.Address] = v.VotingWeight @@ -124,7 +124,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er for _, i := range ballot.Proposal.BatchTx.GetInputs() { // Validate input - proposeAcc, err := ctx.StateWriter.GetAccount(i.Address) + proposeAcc, err := ctx.State.GetAccount(i.Address) if err != nil { return err } @@ -135,7 +135,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er return errors.ErrorCodeInvalidAddress } - if !hasBatchPermission(ctx.StateWriter, proposeAcc, ctx.Logger) { + if !hasBatchPermission(ctx.State, proposeAcc, ctx.Logger) { return fmt.Errorf("account %s does not have batch permission", i.Address) } @@ -161,7 +161,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er } } - stateCache := acmstate.NewCache(ctx.StateWriter) + stateCache := acmstate.NewCache(ctx.State) for i, step := range ballot.Proposal.BatchTx.Txs { txEnv := txs.EnvelopeFromAny(ctx.ChainID, step) @@ -203,7 +203,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er }() for _, input := range txEnv.Tx.GetInputs() { - acc, err := ctx.StateWriter.GetAccount(input.Address) + acc, err := ctx.State.GetAccount(input.Address) if err != nil { return err } @@ -219,7 +219,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er return fmt.Errorf("proposal expired, sequence number %d for account %s wrong at step %d", input.Sequence, input.Address, i+1) } - ctx.StateWriter.UpdateAccount(acc) + ctx.State.UpdateAccount(acc) } if txExecutor, ok := ctx.Contexts[txEnv.Tx.Type()]; ok { diff --git a/execution/contexts/send_context.go b/execution/contexts/send_context.go index 53a7bff4f..ce6ce7e3d 100644 --- a/execution/contexts/send_context.go +++ b/execution/contexts/send_context.go @@ -12,9 +12,9 @@ import ( ) type SendContext struct { - StateWriter acmstate.ReaderWriter - Logger *logging.Logger - tx *payload.SendTx + State acmstate.ReaderWriter + Logger *logging.Logger + tx *payload.SendTx } func (ctx *SendContext) Execute(txe *exec.TxExecution, p payload.Payload) error { @@ -23,20 +23,20 @@ func (ctx *SendContext) Execute(txe *exec.TxExecution, p payload.Payload) error if !ok { return fmt.Errorf("payload must be SendTx, but is: %v", txe.Envelope.Tx.Payload) } - accounts, inTotal, err := getInputs(ctx.StateWriter, ctx.tx.Inputs) + accounts, inTotal, err := getInputs(ctx.State, ctx.tx.Inputs) if err != nil { return err } // ensure all inputs have send permissions - err = allHavePermission(ctx.StateWriter, permission.Send, accounts, ctx.Logger) + err = allHavePermission(ctx.State, permission.Send, accounts, ctx.Logger) if err != nil { return errors.Wrap(err, "at least one input lacks permission for SendTx") } // add outputs to accounts map // if any outputs don't exist, all inputs must have CreateAccount perm - accounts, err = getOrMakeOutputs(ctx.StateWriter, accounts, ctx.tx.Outputs, ctx.Logger) + accounts, err = getOrMakeOutputs(ctx.State, accounts, ctx.tx.Outputs, ctx.Logger) if err != nil { return err } @@ -67,7 +67,7 @@ func (ctx *SendContext) Execute(txe *exec.TxExecution, p payload.Payload) error } for _, acc := range accounts { - err = ctx.StateWriter.UpdateAccount(acc) + err = ctx.State.UpdateAccount(acc) if err != nil { return err } diff --git a/execution/contexts/shared.go b/execution/contexts/shared.go index 252aaff5e..004fbd63d 100644 --- a/execution/contexts/shared.go +++ b/execution/contexts/shared.go @@ -142,11 +142,19 @@ func HasPermission(accountGetter acmstate.AccountGetter, acc *acm.Account, perm return false } - v, err := acc.Permissions.Base.Compose(acmstate.GlobalAccountPermissions(accountGetter).Base).Get(perm) + globalPerms, err := acmstate.GlobalAccountPermissions(accountGetter) if err != nil { logger.TraceMsg("Error obtaining permission value (will default to false/deny)", "perm_flag", perm.String(), structure.ErrorKey, err) + return false + } + v, err := acc.Permissions.Base.Compose(globalPerms.Base).Get(perm) + if err != nil { + logger.TraceMsg("Error obtaining permission value (will default to false/deny)", + "perm_flag", perm.String(), + structure.ErrorKey, err) + return false } if v { diff --git a/execution/contexts/unbond_context.go b/execution/contexts/unbond_context.go index 04f91223f..31d551903 100644 --- a/execution/contexts/unbond_context.go +++ b/execution/contexts/unbond_context.go @@ -12,7 +12,7 @@ import ( ) type UnbondContext struct { - StateWriter acmstate.ReaderWriter + State acmstate.ReaderWriter ValidatorSet validator.ReaderWriter Logger *logging.Logger tx *payload.UnbondTx @@ -31,7 +31,7 @@ func (ctx *UnbondContext) Execute(txe *exec.TxExecution, p payload.Payload) erro } power := new(big.Int).SetUint64(ctx.tx.Output.GetAmount()) - account, err := ctx.StateWriter.GetAccount(ctx.tx.Input.Address) + account, err := ctx.State.GetAccount(ctx.tx.Input.Address) if err != nil { return err } @@ -46,5 +46,5 @@ func (ctx *UnbondContext) Execute(txe *exec.TxExecution, p payload.Payload) erro return err } - return ctx.StateWriter.UpdateAccount(account) + return ctx.State.UpdateAccount(account) } diff --git a/execution/engine/call_frame.go b/execution/engine/call_frame.go new file mode 100644 index 000000000..62bbc4c12 --- /dev/null +++ b/execution/engine/call_frame.go @@ -0,0 +1,65 @@ +package engine + +import ( + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/execution/errors" +) + +type CallFrame struct { + // Cache this State wraps + *acmstate.Cache + // Where we sync + backend acmstate.ReaderWriter + // In order for nested cache to inherit any options + cacheOptions []acmstate.CacheOption + // Depth of the call stack + callStackDepth uint64 + // Max call stack depth + maxCallStackDepth uint64 +} + +// Create a new CallFrame to hold state updates at a particular level in the call stack +func NewCallFrame(st acmstate.ReaderWriter, cacheOptions ...acmstate.CacheOption) *CallFrame { + return newCallFrame(st, 0, 0, cacheOptions...) +} + +func newCallFrame(st acmstate.ReaderWriter, stackDepth uint64, maxCallStackDepth uint64, cacheOptions ...acmstate.CacheOption) *CallFrame { + return &CallFrame{ + Cache: acmstate.NewCache(st, cacheOptions...), + backend: st, + cacheOptions: cacheOptions, + callStackDepth: stackDepth, + maxCallStackDepth: maxCallStackDepth, + } +} + +// Put this CallFrame in permanent read-only mode +func (st *CallFrame) ReadOnly() *CallFrame { + acmstate.ReadOnly(st.Cache) + return st +} + +func (st *CallFrame) WithMaxCallStackDepth(max uint64) *CallFrame { + st.maxCallStackDepth = max + return st +} + +func (st *CallFrame) NewFrame(cacheOptions ...acmstate.CacheOption) (*CallFrame, error) { + if st.maxCallStackDepth > 0 && st.maxCallStackDepth == st.callStackDepth { + return nil, errors.ErrorCodeCallStackOverflow + } + return newCallFrame(st.Cache, st.callStackDepth+1, st.maxCallStackDepth, + append(st.cacheOptions, cacheOptions...)...), nil +} + +func (st *CallFrame) Sync() error { + err := st.Cache.Sync(st.backend) + if err != nil { + return errors.AsException(err) + } + return nil +} + +func (st *CallFrame) CallStackDepth() uint64 { + return st.callStackDepth +} diff --git a/execution/engine/callable.go b/execution/engine/callable.go new file mode 100644 index 000000000..219d19257 --- /dev/null +++ b/execution/engine/callable.go @@ -0,0 +1,36 @@ +package engine + +import ( + "time" + + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/exec" +) + +type Blockchain interface { + LastBlockHeight() uint64 + LastBlockTime() time.Time + BlockHash(height uint64) ([]byte, error) +} + +type CallParams struct { + CallType exec.CallType + Origin crypto.Address + Caller crypto.Address + Callee crypto.Address + Input []byte + Value uint64 + Gas *uint64 +} + +// Effectively a contract, but can either represent a single function or a contract with multiple functions and a selector +type Callable interface { + Call(state State, params CallParams) (output []byte, err error) + // Fully qualified name of the callable, including any contract qualification +} + +type CallableFunc func(st State, params CallParams) (output []byte, err error) + +func (c CallableFunc) Call(state State, params CallParams) (output []byte, err error) { + return c(state, params) +} diff --git a/execution/engine/dispatcher.go b/execution/engine/dispatcher.go new file mode 100644 index 000000000..f0b74cf8c --- /dev/null +++ b/execution/engine/dispatcher.go @@ -0,0 +1,61 @@ +package engine + +import ( + "github.com/hyperledger/burrow/acm" +) + +type Dispatcher interface { + // If this Dispatcher is capable of dispatching this account (e.g. if it has the correct bytecode) then return a + // Callable that wraps the function, otherwise return nil + Dispatch(acc *acm.Account) Callable +} + +// An ExternalDispatcher is able to Dispatch accounts to external engines as well as Dispatch to itself +type ExternalDispatcher interface { + Dispatcher + SetExternals(externals Dispatcher) +} + +type Dispatchers []Dispatcher + +func NewDispatchers(dispatchers ...Dispatcher) Dispatchers { + out := dispatchers[:0] + // Flatten dispatchers and omit nil dispatchers (allows optional dispatchers in chain) + for i, d := range dispatchers { + ds, ok := d.(Dispatchers) + if ok { + // Add tail to nested dispatchers if one exists + if len(dispatchers) > i { + ds = append(ds, dispatchers[i+1:]...) + } + return append(out, NewDispatchers(ds...)...) + } else if d != nil { + out = append(out, d) + } + } + return out +} + +// Connect ExternalDispatchers eds to each other so that the underlying engines can mutually call contracts hosted by +// other dispatchers +func Connect(eds ...ExternalDispatcher) { + for i, ed := range eds { + // Collect external dispatchers excluding this one (to avoid infinite dispatcher loops!) + others := make([]Dispatcher, 0, len(eds)-1) + for offset := 1; offset < len(eds); offset++ { + idx := (i + offset) % len(eds) + others = append(others, eds[idx]) + } + ed.SetExternals(NewDispatchers(others...)) + } +} + +func (ds Dispatchers) Dispatch(acc *acm.Account) Callable { + for _, d := range ds { + callable := d.Dispatch(acc) + if callable != nil { + return callable + } + } + return nil +} diff --git a/execution/engine/dispatcher_test.go b/execution/engine/dispatcher_test.go new file mode 100644 index 000000000..b9b44cc45 --- /dev/null +++ b/execution/engine/dispatcher_test.go @@ -0,0 +1,82 @@ +package engine + +import ( + "fmt" + "testing" + + "github.com/hyperledger/burrow/acm" + "github.com/stretchr/testify/require" +) + +type testDispatcher struct { + name string + externals Dispatcher +} + +func newDispatcher(name string) *testDispatcher { + return &testDispatcher{ + name: name, + } +} + +func (t *testDispatcher) SetExternals(externals Dispatcher) { + t.externals = externals +} + +func (t *testDispatcher) String() string { + if t.externals != nil { + ds, ok := t.externals.(Dispatchers) + if ok { + var exts []string + for _, d := range ds { + td, ok := d.(*testDispatcher) + if ok { + exts = append(exts, td.name) + } + } + if len(exts) > 0 { + return fmt.Sprintf("%s -> %v", t.name, exts) + } + } + } + return t.name +} + +func (t *testDispatcher) Dispatch(acc *acm.Account) Callable { + return nil +} + +func TestNewDispatchers(t *testing.T) { + d1 := newDispatcher("1") + d2 := newDispatcher("2") + d3 := newDispatcher("3") + + dd1 := NewDispatchers(d1, d2, d3) + + require.Equal(t, "[1 2 3 1 2 3]", fmt.Sprint(NewDispatchers(dd1, dd1))) + require.Equal(t, "[1 2 3 1 3]", fmt.Sprint(NewDispatchers(dd1, d1, d3))) + require.Equal(t, "[3 1 1 2 3]", fmt.Sprint(NewDispatchers(d3, d1, dd1))) +} + +func TestConnect(t *testing.T) { + d1 := newDispatcher("1") + d2 := newDispatcher("2") + d3 := newDispatcher("3") + + // Check we don't panic + Connect() + + // Does nothing but fine + Connect(d1) + require.Equal(t, "1", d1.String()) + + Connect(d1, d2) + require.Equal(t, "1 -> [2]", d1.String()) + require.Equal(t, "2 -> [1]", d2.String()) + require.Equal(t, "3", d3.String()) + + Connect(d1, d2, d3) + require.Equal(t, "1 -> [2 3]", d1.String()) + require.Equal(t, "2 -> [3 1]", d2.String()) + require.Equal(t, "3 -> [1 2]", d3.String()) +} diff --git a/execution/engine/state.go b/execution/engine/state.go new file mode 100644 index 000000000..47de46647 --- /dev/null +++ b/execution/engine/state.go @@ -0,0 +1,11 @@ +package engine + +import ( + "github.com/hyperledger/burrow/execution/exec" +) + +type State struct { + *CallFrame + Blockchain + exec.EventSink +} diff --git a/execution/errors/code.go b/execution/errors/code.go new file mode 100644 index 000000000..a5f4d5e5d --- /dev/null +++ b/execution/errors/code.go @@ -0,0 +1,123 @@ +package errors + +import fmt "fmt" + +type Code uint32 + +const ( + ErrorCodeNone Code = iota + ErrorCodeGeneric + ErrorCodeUnknownAddress + ErrorCodeInsufficientBalance + ErrorCodeInvalidJumpDest + ErrorCodeInsufficientGas + ErrorCodeMemoryOutOfBounds + ErrorCodeCodeOutOfBounds + ErrorCodeInputOutOfBounds + ErrorCodeReturnDataOutOfBounds + ErrorCodeCallStackOverflow + ErrorCodeCallStackUnderflow + ErrorCodeDataStackOverflow + ErrorCodeDataStackUnderflow + ErrorCodeInvalidContract + ErrorCodeNativeContractCodeCopy + ErrorCodeExecutionAborted + ErrorCodeExecutionReverted + ErrorCodePermissionDenied + ErrorCodeNativeFunction + ErrorCodeEventPublish + ErrorCodeInvalidString + ErrorCodeEventMapping + ErrorCodeInvalidAddress + ErrorCodeDuplicateAddress + ErrorCodeInsufficientFunds + ErrorCodeOverpayment + ErrorCodeZeroPayment + ErrorCodeInvalidSequence + ErrorCodeReservedAddress + ErrorCodeIllegalWrite + ErrorCodeIntegerOverflow + ErrorCodeInvalidProposal + ErrorCodeExpiredProposal + ErrorCodeProposalExecuted + ErrorCodeNoInputPermission + ErrorCodeInvalidBlockNumber + ErrorCodeBlockNumberOutOfRange + ErrorCodeAlreadyVoted + ErrorCodeUnresolvedSymbols + ErrorCodeInvalidContractCode + ErrorCodeNonExistentAccount +) + +var codeStrings = map[Code]string{ + ErrorCodeNone: "no error", + ErrorCodeUnknownAddress: "unknown address", + ErrorCodeInsufficientBalance: "insufficient balance", + ErrorCodeInvalidJumpDest: "invalid jump dest", + ErrorCodeInsufficientGas: "insufficient gas", + ErrorCodeMemoryOutOfBounds: "memory out of bounds", + ErrorCodeCodeOutOfBounds: "code out of bounds", + ErrorCodeInputOutOfBounds: "input out of bounds", + ErrorCodeReturnDataOutOfBounds: " data out of bounds", + ErrorCodeCallStackOverflow: "call stack overflow", + ErrorCodeCallStackUnderflow: "call stack underflow", + ErrorCodeDataStackOverflow: "data stack overflow", + ErrorCodeDataStackUnderflow: "data stack underflow", + ErrorCodeInvalidContract: "invalid contract", + ErrorCodePermissionDenied: "permission denied", + ErrorCodeNativeContractCodeCopy: "tried to copy native contract code", + ErrorCodeExecutionAborted: "execution aborted", + ErrorCodeExecutionReverted: "execution reverted", + ErrorCodeNativeFunction: "native function error", + ErrorCodeEventPublish: "event publish error", + ErrorCodeInvalidString: "invalid string", + ErrorCodeEventMapping: "event mapping error", + ErrorCodeGeneric: "generic error", + ErrorCodeInvalidAddress: "invalid address", + ErrorCodeDuplicateAddress: "duplicate address", + ErrorCodeInsufficientFunds: "insufficient funds", + ErrorCodeOverpayment: "overpayment", + ErrorCodeZeroPayment: "zero payment error", + ErrorCodeInvalidSequence: "invalid sequence number", + ErrorCodeReservedAddress: "address is reserved for SNative or internal use", + ErrorCodeIllegalWrite: "callee attempted to illegally modify state", + ErrorCodeIntegerOverflow: "integer overflow", + ErrorCodeInvalidProposal: "proposal is invalid", + ErrorCodeExpiredProposal: "proposal is expired since sequence number does not match", + ErrorCodeProposalExecuted: "proposal has already been executed", + ErrorCodeNoInputPermission: "account has no input permission", + ErrorCodeInvalidBlockNumber: "invalid block number", + ErrorCodeBlockNumberOutOfRange: "block number out of range", + ErrorCodeAlreadyVoted: "vote already registered for this address", + ErrorCodeUnresolvedSymbols: "code has unresolved symbols", + ErrorCodeInvalidContractCode: "contract being created with unexpected code", + ErrorCodeNonExistentAccount: "account does not exist", +} + +func (c Code) ErrorCode() Code { + return c +} + +func (c Code) Uint32() uint32 { + return uint32(c) +} + +func (c Code) Error() string { + return fmt.Sprintf("Error %d: %s", c, c.ErrorMessage()) +} + +func (c Code) ErrorMessage() string { + str, ok := codeStrings[c] + if !ok { + return "Unknown error" + } + return str +} + +func ErrorCode(err error) Code { + exception := AsException(err) + if exception == nil { + return ErrorCodeNone + } + return exception.GetCode() +} diff --git a/execution/errors/errors.go b/execution/errors/errors.go index 7c71f580e..e43702f5a 100644 --- a/execution/errors/errors.go +++ b/execution/errors/errors.go @@ -1,259 +1,22 @@ package errors -import ( - "fmt" -) - type CodedError interface { error ErrorCode() Code - String() string -} - -type Provider interface { - // Returns the an error if errors occurred some execution or nil if none occurred - Error() CodedError + // The error message excluding the code + ErrorMessage() string } +// Error sinks are useful for recording errors but continuing with computation. Implementations may choose to just store +// the first error pushed and ignore subsequent ones or they may record an error trace. Pushing a nil error should have +// no effects. type Sink interface { - PushError(error) -} - -type Code uint32 - -const ( - ErrorCodeGeneric Code = iota - ErrorCodeUnknownAddress - ErrorCodeInsufficientBalance - ErrorCodeInvalidJumpDest - ErrorCodeInsufficientGas - ErrorCodeMemoryOutOfBounds - ErrorCodeCodeOutOfBounds - ErrorCodeInputOutOfBounds - ErrorCodeReturnDataOutOfBounds - ErrorCodeCallStackOverflow - ErrorCodeCallStackUnderflow - ErrorCodeDataStackOverflow - ErrorCodeDataStackUnderflow - ErrorCodeInvalidContract - ErrorCodeNativeContractCodeCopy - ErrorCodeExecutionAborted - ErrorCodeExecutionReverted - ErrorCodePermissionDenied - ErrorCodeNativeFunction - ErrorCodeEventPublish - ErrorCodeInvalidString - ErrorCodeEventMapping - ErrorCodeInvalidAddress - ErrorCodeDuplicateAddress - ErrorCodeInsufficientFunds - ErrorCodeOverpayment - ErrorCodeZeroPayment - ErrorCodeInvalidSequence - ErrorCodeReservedAddress - ErrorCodeIllegalWrite - ErrorCodeIntegerOverflow - ErrorCodeInvalidProposal - ErrorCodeExpiredProposal - ErrorCodeProposalExecuted - ErrorCodeNoInputPermission - ErrorCodeInvalidBlockNumber - ErrorCodeBlockNumberOutOfRange - ErrorCodeAlreadyVoted - ErrorCodeUnresolvedSymbols - ErrorCodeInvalidContractCode -) - -func (c Code) ErrorCode() Code { - return c -} - -func (c Code) Uint32() uint32 { - return uint32(c) -} - -func (c Code) Error() string { - return fmt.Sprintf("Error %d: %s", c, c.String()) -} - -func (c Code) String() string { - switch c { - case ErrorCodeUnknownAddress: - return "unknown address" - case ErrorCodeInsufficientBalance: - return "insufficient balance" - case ErrorCodeInvalidJumpDest: - return "invalid jump dest" - case ErrorCodeInsufficientGas: - return "insufficient gas" - case ErrorCodeMemoryOutOfBounds: - return "memory out of bounds" - case ErrorCodeCodeOutOfBounds: - return "code out of bounds" - case ErrorCodeInputOutOfBounds: - return "input out of bounds" - case ErrorCodeReturnDataOutOfBounds: - return "return data out of bounds" - case ErrorCodeCallStackOverflow: - return "call stack overflow" - case ErrorCodeCallStackUnderflow: - return "call stack underflow" - case ErrorCodeDataStackOverflow: - return "data stack overflow" - case ErrorCodeDataStackUnderflow: - return "data stack underflow" - case ErrorCodeInvalidContract: - return "invalid contract" - case ErrorCodePermissionDenied: - return "permission denied" - case ErrorCodeNativeContractCodeCopy: - return "tried to copy native contract code" - case ErrorCodeExecutionAborted: - return "execution aborted" - case ErrorCodeExecutionReverted: - return "execution reverted" - case ErrorCodeNativeFunction: - return "native function error" - case ErrorCodeEventPublish: - return "event publish error" - case ErrorCodeInvalidString: - return "invalid string" - case ErrorCodeEventMapping: - return "event mapping error" - case ErrorCodeGeneric: - return "generic error" - case ErrorCodeInvalidAddress: - return "invalid address" - case ErrorCodeDuplicateAddress: - return "duplicate address" - case ErrorCodeInsufficientFunds: - return "insufficient funds" - case ErrorCodeOverpayment: - return "overpayment" - case ErrorCodeZeroPayment: - return "zero payment error" - case ErrorCodeInvalidSequence: - return "invalid sequence number" - case ErrorCodeReservedAddress: - return "address is reserved for SNative or internal use" - case ErrorCodeIllegalWrite: - return "callee attempted to illegally modify state" - case ErrorCodeIntegerOverflow: - return "integer overflow" - case ErrorCodeInvalidProposal: - return "proposal is invalid" - case ErrorCodeExpiredProposal: - return "proposal is expired since sequence number does not match" - case ErrorCodeProposalExecuted: - return "proposal has already been executed" - case ErrorCodeNoInputPermission: - return "account has no input permission" - case ErrorCodeInvalidBlockNumber: - return "invalid block number" - case ErrorCodeBlockNumberOutOfRange: - return "block number out of range" - case ErrorCodeAlreadyVoted: - return "vote already registered for this address" - case ErrorCodeUnresolvedSymbols: - return "code has unresolved symbols" - case ErrorCodeInvalidContractCode: - return "contract being created with unexpected code" - default: - return "Unknown error" - } -} - -func NewException(errorCode Code, exception string) *Exception { - if exception == "" { - return nil - } - return &Exception{ - Code: errorCode, - Exception: exception, - } -} - -// Wraps any error as a Exception -func AsException(err error) *Exception { - if err == nil { - return nil - } - switch e := err.(type) { - case *Exception: - return e - case CodedError: - return NewException(e.ErrorCode(), e.String()) - default: - return NewException(ErrorCodeGeneric, err.Error()) - } -} - -func Wrap(err error, message string) *Exception { - ex := AsException(err) - return NewException(ex.ErrorCode(), message+": "+ex.Error()) -} - -func Errorf(format string, a ...interface{}) *Exception { - return ErrorCodef(ErrorCodeGeneric, format, a...) + // Push an error to the error. If a nil error is passed then that value should not be pushed. Returns true iff error + // is non nil. + PushError(error) bool } -func ErrorCodef(errorCode Code, format string, a ...interface{}) *Exception { - return NewException(errorCode, fmt.Sprintf(format, a...)) -} - -func (e *Exception) AsError() error { - // We need to return a bare untyped error here so that err == nil downstream - if e == nil { - return nil - } - return e -} - -func (e *Exception) ErrorCode() Code { - return e.Code -} - -func (e *Exception) Error() string { - return fmt.Sprintf("error %d - %s: %s", e.Code, e.Code.String(), e.Exception) -} - -func (e *Exception) String() string { - if e == nil { - return "" - } - return e.Exception -} - -func (e *Exception) Equal(ce CodedError) bool { - ex := AsException(ce) - if e == nil || ex == nil { - return e == nil && ex == nil - } - return e.Code == ex.Code && e.Exception == ex.Exception -} - -type singleError struct { - CodedError -} - -func FirstOnly() *singleError { - return &singleError{} -} - -func (se *singleError) PushError(err error) { - if se.CodedError == nil { - // Do our nil dance - ex := AsException(err) - if ex != nil { - se.CodedError = ex - } - } -} - -func (se *singleError) Error() CodedError { - return se.CodedError -} - -func (se *singleError) Reset() { - se.CodedError = nil +type Source interface { + // Returns the an error if errors occurred some execution or nil if none occurred + Error() error } diff --git a/execution/errors/errors_test.go b/execution/errors/errors_test.go index 4a6210c90..2b37ba192 100644 --- a/execution/errors/errors_test.go +++ b/execution/errors/errors_test.go @@ -25,14 +25,3 @@ func TestCode_String(t *testing.T) { err := ErrorCodeCodeOutOfBounds fmt.Println(err.Error()) } - -func TestFirstOnly(t *testing.T) { - err := FirstOnly() - // This will be a wrapped nil - it should not register as first error - var ex CodedError = (*Exception)(nil) - err.PushError(ex) - // This one should - realErr := ErrorCodef(ErrorCodeInsufficientBalance, "real error") - err.PushError(realErr) - assert.True(t, realErr.Equal(err.Error())) -} diff --git a/execution/errors/exception.go b/execution/errors/exception.go new file mode 100644 index 000000000..be75e3735 --- /dev/null +++ b/execution/errors/exception.go @@ -0,0 +1,81 @@ +package errors + +import "fmt" + +func NewException(errorCode Code, exception string) *Exception { + if exception == "" { + return nil + } + return &Exception{ + Code: errorCode, + Exception: exception, + } +} + +// Wraps any error as a Exception +func AsException(err error) *Exception { + if err == nil { + return nil + } + switch e := err.(type) { + case *Exception: + return e + case CodedError: + return NewException(e.ErrorCode(), e.ErrorMessage()) + default: + return NewException(ErrorCodeGeneric, err.Error()) + } +} + +func Wrapf(err error, format string, a ...interface{}) *Exception { + ex := AsException(err) + return NewException(ex.Code, fmt.Sprintf(format, a...)) +} + +func Wrap(err error, message string) *Exception { + ex := AsException(err) + return NewException(ex.Code, message+": "+ex.Exception) +} + +func Errorf(format string, a ...interface{}) *Exception { + return ErrorCodef(ErrorCodeGeneric, format, a...) +} + +func ErrorCodef(errorCode Code, format string, a ...interface{}) *Exception { + return NewException(errorCode, fmt.Sprintf(format, a...)) +} + +func (e *Exception) AsError() error { + // We need to return a bare untyped error here so that err == nil downstream + if e == nil { + return nil + } + return e +} + +func (e *Exception) ErrorCode() Code { + return e.Code +} + +func (e *Exception) Error() string { + return fmt.Sprintf("error %d - %s: %s", e.Code, e.Code.ErrorMessage(), e.Exception) +} + +func (e *Exception) String() string { + return e.Error() +} + +func (e *Exception) ErrorMessage() string { + if e == nil { + return "" + } + return e.Exception +} + +func (e *Exception) Equal(ce CodedError) bool { + ex := AsException(ce) + if e == nil || ex == nil { + return e == nil && ex == nil + } + return e.Code == ex.Code && e.Exception == ex.Exception +} diff --git a/execution/errors/maybe.go b/execution/errors/maybe.go new file mode 100644 index 000000000..9ac9d1086 --- /dev/null +++ b/execution/errors/maybe.go @@ -0,0 +1,66 @@ +package errors + +import ( + "github.com/hyperledger/burrow/crypto" +) + +type Maybe struct { + // Any error that may have occurred + error CodedError +} + +func (m *Maybe) Error() error { + if m.error == nil { + return nil + } + return m.error +} + +// Errors pushed to state may end up in TxExecutions and therefore the merkle state so it is essential that errors are +// deterministic and independent of the code path taken to execution (e.g. replay takes a different path to that of +// normal consensus reactor so stack traces may differ - as they may across architectures) +func (m *Maybe) PushError(err error) bool { + if err == nil { + return false + } + if m.error == nil { + // Make sure we are not wrapping a known nil value + ex := AsException(err) + if ex != nil { + m.error = ex + } + } + return true +} + +func (m *Maybe) Uint64(value uint64, err error) uint64 { + if err != nil { + m.PushError(err) + } + return value +} + +func (m *Maybe) Bool(value bool, err error) bool { + if err != nil { + m.PushError(err) + } + return value +} + +func (m *Maybe) Bytes(value []byte, err error) []byte { + if err != nil { + m.PushError(err) + } + return value +} + +func (m *Maybe) Address(value crypto.Address, err error) crypto.Address { + if err != nil { + m.PushError(err) + } + return value +} + +func (m *Maybe) Void(err error) { + m.PushError(err) +} diff --git a/execution/errors/native.go b/execution/errors/native.go index bd64b6f75..0371de07d 100644 --- a/execution/errors/native.go +++ b/execution/errors/native.go @@ -6,15 +6,21 @@ import ( "github.com/hyperledger/burrow/crypto" ) -type LacksSNativePermission struct { - Address crypto.Address - SNative string +type LacksNativePermission struct { + Address crypto.Address + NativeName string } -func (e LacksSNativePermission) Error() string { - return fmt.Sprintf("account %s does not have SNative function call permission: %s", e.Address, e.SNative) +var _ CodedError = &LacksNativePermission{} + +func (e *LacksNativePermission) ErrorMessage() string { + return fmt.Sprintf("account %s does not have native function call permission: %s", e.Address, e.NativeName) +} + +func (e *LacksNativePermission) Error() string { + return e.ErrorMessage() } -func (e LacksSNativePermission) ErrorCode() Code { +func (e *LacksNativePermission) ErrorCode() Code { return ErrorCodeNativeFunction } diff --git a/execution/errors/vm.go b/execution/errors/vm.go index bfcf25ce5..4e0f7bb6c 100644 --- a/execution/errors/vm.go +++ b/execution/errors/vm.go @@ -43,7 +43,7 @@ type CallError struct { func (err CallError) Error() string { buf := new(bytes.Buffer) buf.WriteString("Call error: ") - buf.WriteString(err.CodedError.String()) + buf.WriteString(err.CodedError.Error()) if len(err.NestedErrors) > 0 { buf.WriteString(", nested call errors:\n") for _, nestedErr := range err.NestedErrors { diff --git a/execution/evm/contract.go b/execution/evm/contract.go new file mode 100644 index 000000000..2b94e112f --- /dev/null +++ b/execution/evm/contract.go @@ -0,0 +1,977 @@ +package evm + +import ( + "bytes" + "encoding/binary" + "fmt" + "io/ioutil" + "math/big" + "strings" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/acm/acmstate" + . "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/evm/abi" + . "github.com/hyperledger/burrow/execution/evm/asm" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/execution/native" + "github.com/hyperledger/burrow/permission" + "github.com/hyperledger/burrow/txs" +) + +type Contract struct { + *EVM + code acm.Bytecode +} + +func (c *Contract) Call(state engine.State, params engine.CallParams) ([]byte, error) { + return native.Call(state, params, c.execute) +} + +// Executes the EVM code passed in the appropriate context +func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, error) { + c.debugf("(%d) (%s) %s (code=%d) gas: %v (d) %X\n", + st.CallFrame.CallStackDepth(), params.Caller, params.Callee, len(c.code), *params.Gas, params.Input) + + if len(c.code) == 0 { + return nil, nil + } + + if c.options.DumpTokens { + dumpTokens(c.options.Nonce, params.Caller, params.Callee, c.code) + } + + // Program counter - the index into code that tracks current instruction + var pc int64 + // Return data from a call + var returnData []byte + + // Maybe serves 3 purposes: 1. provides 'capture first error semantics', 2. reduces clutter of error handling + // particular for 1, 3. acts a shared error sink for stack, memory, and the main execute loop + maybe := new(errors.Maybe) + + // Provide stack and memory storage - passing in the callState as an error provider + stack := NewStack(maybe, c.options.DataStackInitialCapacity, c.options.DataStackMaxDepth, params.Gas) + memory := c.options.MemoryProvider(maybe) + + for { + // Check for any error in this frame. + if maybe.Error() != nil { + return nil, maybe.Error() + } + + var op = codeGetOp(c.code, pc) + c.debugf("(pc) %-3d (op) %-14s (st) %-4d (gas) %d", pc, op.String(), stack.Len(), *params.Gas) + // Use BaseOp gas. + maybe.PushError(useGasNegative(params.Gas, native.GasBaseOp)) + + switch op { + + case ADD: // 0x01 + x, y := stack.PopBigInt(), stack.PopBigInt() + sum := new(big.Int).Add(x, y) + res := stack.PushBigInt(sum) + c.debugf(" %v + %v = %v (%v)\n", x, y, sum, res) + + case MUL: // 0x02 + x, y := stack.PopBigInt(), stack.PopBigInt() + prod := new(big.Int).Mul(x, y) + res := stack.PushBigInt(prod) + c.debugf(" %v * %v = %v (%v)\n", x, y, prod, res) + + case SUB: // 0x03 + x, y := stack.PopBigInt(), stack.PopBigInt() + diff := new(big.Int).Sub(x, y) + res := stack.PushBigInt(diff) + c.debugf(" %v - %v = %v (%v)\n", x, y, diff, res) + + case DIV: // 0x04 + x, y := stack.PopBigInt(), stack.PopBigInt() + if y.Sign() == 0 { + stack.Push(Zero256) + c.debugf(" %v / %v = %v\n", x, y, 0) + } else { + div := new(big.Int).Div(x, y) + res := stack.PushBigInt(div) + c.debugf(" %v / %v = %v (%v)\n", x, y, div, res) + } + + case SDIV: // 0x05 + x, y := stack.PopBigIntSigned(), stack.PopBigIntSigned() + if y.Sign() == 0 { + stack.Push(Zero256) + c.debugf(" %v / %v = %v\n", x, y, 0) + } else { + div := new(big.Int).Div(x, y) + res := stack.PushBigInt(div) + c.debugf(" %v / %v = %v (%v)\n", x, y, div, res) + } + + case MOD: // 0x06 + x, y := stack.PopBigInt(), stack.PopBigInt() + if y.Sign() == 0 { + stack.Push(Zero256) + c.debugf(" %v %% %v = %v\n", x, y, 0) + } else { + mod := new(big.Int).Mod(x, y) + res := stack.PushBigInt(mod) + c.debugf(" %v %% %v = %v (%v)\n", x, y, mod, res) + } + + case SMOD: // 0x07 + x, y := stack.PopBigIntSigned(), stack.PopBigIntSigned() + if y.Sign() == 0 { + stack.Push(Zero256) + c.debugf(" %v %% %v = %v\n", x, y, 0) + } else { + mod := new(big.Int).Mod(x, y) + res := stack.PushBigInt(mod) + c.debugf(" %v %% %v = %v (%v)\n", x, y, mod, res) + } + + case ADDMOD: // 0x08 + x, y, z := stack.PopBigInt(), stack.PopBigInt(), stack.PopBigInt() + if z.Sign() == 0 { + stack.Push(Zero256) + c.debugf(" %v %% %v = %v\n", x, y, 0) + } else { + add := new(big.Int).Add(x, y) + mod := add.Mod(add, z) + res := stack.PushBigInt(mod) + c.debugf(" %v + %v %% %v = %v (%v)\n", x, y, z, mod, res) + } + + case MULMOD: // 0x09 + x, y, z := stack.PopBigInt(), stack.PopBigInt(), stack.PopBigInt() + if z.Sign() == 0 { + stack.Push(Zero256) + c.debugf(" %v %% %v = %v\n", x, y, 0) + } else { + mul := new(big.Int).Mul(x, y) + mod := mul.Mod(mul, z) + res := stack.PushBigInt(mod) + c.debugf(" %v * %v %% %v = %v (%v)\n", x, y, z, mod, res) + } + + case EXP: // 0x0A + x, y := stack.PopBigInt(), stack.PopBigInt() + pow := new(big.Int).Exp(x, y, nil) + res := stack.PushBigInt(pow) + c.debugf(" %v ** %v = %v (%v)\n", x, y, pow, res) + + case SIGNEXTEND: // 0x0B + back := stack.PopU64() + if back < Word256Length-1 { + stack.PushBigInt(SignExtend(back, stack.PopBigInt())) + } + + case LT: // 0x10 + x, y := stack.PopBigInt(), stack.PopBigInt() + if x.Cmp(y) < 0 { + stack.Push(One256) + c.debugf(" %v < %v = %v\n", x, y, 1) + } else { + stack.Push(Zero256) + c.debugf(" %v < %v = %v\n", x, y, 0) + } + + case GT: // 0x11 + x, y := stack.PopBigInt(), stack.PopBigInt() + if x.Cmp(y) > 0 { + stack.Push(One256) + c.debugf(" %v > %v = %v\n", x, y, 1) + } else { + stack.Push(Zero256) + c.debugf(" %v > %v = %v\n", x, y, 0) + } + + case SLT: // 0x12 + x, y := stack.PopBigIntSigned(), stack.PopBigIntSigned() + if x.Cmp(y) < 0 { + stack.Push(One256) + c.debugf(" %v < %v = %v\n", x, y, 1) + } else { + stack.Push(Zero256) + c.debugf(" %v < %v = %v\n", x, y, 0) + } + + case SGT: // 0x13 + x, y := stack.PopBigIntSigned(), stack.PopBigIntSigned() + if x.Cmp(y) > 0 { + stack.Push(One256) + c.debugf(" %v > %v = %v\n", x, y, 1) + } else { + stack.Push(Zero256) + c.debugf(" %v > %v = %v\n", x, y, 0) + } + + case EQ: // 0x14 + x, y := stack.Pop(), stack.Pop() + if bytes.Equal(x[:], y[:]) { + stack.Push(One256) + c.debugf(" %v == %v = %v\n", x, y, 1) + } else { + stack.Push(Zero256) + c.debugf(" %v == %v = %v\n", x, y, 0) + } + + case ISZERO: // 0x15 + x := stack.Pop() + if x.IsZero() { + stack.Push(One256) + c.debugf(" %v == 0 = %v\n", x, 1) + } else { + stack.Push(Zero256) + c.debugf(" %v == 0 = %v\n", x, 0) + } + + case AND: // 0x16 + x, y := stack.Pop(), stack.Pop() + z := [32]byte{} + for i := 0; i < 32; i++ { + z[i] = x[i] & y[i] + } + stack.Push(z) + c.debugf(" %v & %v = %v\n", x, y, z) + + case OR: // 0x17 + x, y := stack.Pop(), stack.Pop() + z := [32]byte{} + for i := 0; i < 32; i++ { + z[i] = x[i] | y[i] + } + stack.Push(z) + c.debugf(" %v | %v = %v\n", x, y, z) + + case XOR: // 0x18 + x, y := stack.Pop(), stack.Pop() + z := [32]byte{} + for i := 0; i < 32; i++ { + z[i] = x[i] ^ y[i] + } + stack.Push(z) + c.debugf(" %v ^ %v = %v\n", x, y, z) + + case NOT: // 0x19 + x := stack.Pop() + z := [32]byte{} + for i := 0; i < 32; i++ { + z[i] = ^x[i] + } + stack.Push(z) + c.debugf(" !%v = %v\n", x, z) + + case BYTE: // 0x1A + idx := stack.Pop64() + val := stack.Pop() + res := byte(0) + if idx < 32 { + res = val[idx] + } + stack.Push64(int64(res)) + c.debugf(" => 0x%X\n", res) + + case SHL: //0x1B + shift, x := stack.PopBigInt(), stack.PopBigInt() + + if shift.Cmp(Big256) >= 0 { + reset := big.NewInt(0) + stack.PushBigInt(reset) + c.debugf(" %v << %v = %v\n", x, shift, reset) + } else { + shiftedValue := x.Lsh(x, uint(shift.Uint64())) + stack.PushBigInt(shiftedValue) + c.debugf(" %v << %v = %v\n", x, shift, shiftedValue) + } + + case SHR: //0x1C + shift, x := stack.PopBigInt(), stack.PopBigInt() + + if shift.Cmp(Big256) >= 0 { + reset := big.NewInt(0) + stack.PushBigInt(reset) + c.debugf(" %v << %v = %v\n", x, shift, reset) + } else { + shiftedValue := x.Rsh(x, uint(shift.Uint64())) + stack.PushBigInt(shiftedValue) + c.debugf(" %v << %v = %v\n", x, shift, shiftedValue) + } + + case SAR: //0x1D + shift, x := stack.PopBigInt(), stack.PopBigIntSigned() + + if shift.Cmp(Big256) >= 0 { + reset := big.NewInt(0) + if x.Sign() < 0 { + reset.SetInt64(-1) + } + stack.PushBigInt(reset) + c.debugf(" %v << %v = %v\n", x, shift, reset) + } else { + shiftedValue := x.Rsh(x, uint(shift.Uint64())) + stack.PushBigInt(shiftedValue) + c.debugf(" %v << %v = %v\n", x, shift, shiftedValue) + } + + case SHA3: // 0x20 + maybe.PushError(useGasNegative(params.Gas, native.GasSha3)) + offset, size := stack.PopBigInt(), stack.PopBigInt() + data := memory.Read(offset, size) + data = sha3.Sha3(data) + stack.PushBytes(data) + c.debugf(" => (%v) %X\n", size, data) + + case ADDRESS: // 0x30 + stack.Push(params.Callee.Word256()) + c.debugf(" => %v\n", params.Callee) + + case BALANCE: // 0x31 + address := stack.PopAddress() + maybe.PushError(useGasNegative(params.Gas, native.GasGetAccount)) + balance := mustGetAccount(st.CallFrame, maybe, address).Balance + stack.PushU64(balance) + c.debugf(" => %v (%v)\n", balance, address) + + case ORIGIN: // 0x32 + stack.Push(params.Origin.Word256()) + c.debugf(" => %v\n", params.Origin) + + case CALLER: // 0x33 + stack.Push(params.Caller.Word256()) + c.debugf(" => %v\n", params.Caller) + + case CALLVALUE: // 0x34 + stack.PushU64(params.Value) + c.debugf(" => %v\n", params.Value) + + case CALLDATALOAD: // 0x35 + offset := stack.Pop64() + data := maybe.Bytes(subslice(params.Input, offset, 32)) + res := LeftPadWord256(data) + stack.Push(res) + c.debugf(" => 0x%v\n", res) + + case CALLDATASIZE: // 0x36 + stack.Push64(int64(len(params.Input))) + c.debugf(" => %d\n", len(params.Input)) + + case CALLDATACOPY: // 0x37 + memOff := stack.PopBigInt() + inputOff := stack.Pop64() + length := stack.Pop64() + data := maybe.Bytes(subslice(params.Input, inputOff, length)) + memory.Write(memOff, data) + c.debugf(" => [%v, %v, %v] %X\n", memOff, inputOff, length, data) + + case CODESIZE: // 0x38 + l := int64(len(c.code)) + stack.Push64(l) + c.debugf(" => %d\n", l) + + case CODECOPY: // 0x39 + memOff := stack.PopBigInt() + codeOff := stack.Pop64() + length := stack.Pop64() + data := maybe.Bytes(subslice(c.code, codeOff, length)) + memory.Write(memOff, data) + c.debugf(" => [%v, %v, %v] %X\n", memOff, codeOff, length, data) + + case GASPRICE_DEPRECATED: // 0x3A + stack.Push(Zero256) + c.debugf(" => %v (GASPRICE IS DEPRECATED)\n", Zero256) + + case EXTCODESIZE: // 0x3B + address := stack.PopAddress() + maybe.PushError(useGasNegative(params.Gas, native.GasGetAccount)) + acc := mustGetAccount(st.CallFrame, maybe, address) + if acc == nil { + stack.Push(Zero256) + c.debugf(" => 0\n") + } else { + length := int64(len(acc.EVMCode)) + stack.Push64(length) + c.debugf(" => %d\n", length) + } + case EXTCODECOPY: // 0x3C + address := stack.PopAddress() + maybe.PushError(useGasNegative(params.Gas, native.GasGetAccount)) + acc := mustGetAccount(st.CallFrame, maybe, address) + if acc == nil { + maybe.PushError(errors.ErrorCodeUnknownAddress) + } else { + code := acc.EVMCode + memOff := stack.PopBigInt() + codeOff := stack.Pop64() + length := stack.Pop64() + data := maybe.Bytes(subslice(code, codeOff, length)) + memory.Write(memOff, data) + c.debugf(" => [%v, %v, %v] %X\n", memOff, codeOff, length, data) + } + + case RETURNDATASIZE: // 0x3D + stack.Push64(int64(len(returnData))) + c.debugf(" => %d\n", len(returnData)) + + case RETURNDATACOPY: // 0x3E + memOff, outputOff, length := stack.PopBigInt(), stack.PopBigInt(), stack.PopBigInt() + end := new(big.Int).Add(outputOff, length) + + if end.BitLen() > 64 || uint64(len(returnData)) < end.Uint64() { + maybe.PushError(errors.ErrorCodeReturnDataOutOfBounds) + continue + } + + memory.Write(memOff, returnData) + c.debugf(" => [%v, %v, %v] %X\n", memOff, outputOff, length, returnData) + + case EXTCODEHASH: // 0x3F + address := stack.PopAddress() + + acc := getAccount(st.CallFrame, maybe, address) + if acc == nil { + // In case the account does not exist 0 is pushed to the stack. + stack.PushU64(0) + } else { + // keccak256 hash of a contract's code + var extcodehash Word256 + if len(acc.CodeHash) > 0 { + copy(extcodehash[:], acc.CodeHash) + } else { + copy(extcodehash[:], sha3.Sha3(acc.Code())) + } + stack.Push(extcodehash) + } + + case BLOCKHASH: // 0x40 + blockNumber := stack.PopU64() + + lastBlockHeight := st.Blockchain.LastBlockHeight() + if blockNumber >= lastBlockHeight { + c.debugf(" => attempted to get block hash of a non-existent block: %v", blockNumber) + maybe.PushError(errors.ErrorCodeInvalidBlockNumber) + } else if lastBlockHeight-blockNumber > MaximumAllowedBlockLookBack { + c.debugf(" => attempted to get block hash of a block %d outside of the allowed range "+ + "(must be within %d blocks)", blockNumber, MaximumAllowedBlockLookBack) + maybe.PushError(errors.ErrorCodeBlockNumberOutOfRange) + } else { + hash := maybe.Bytes(st.Blockchain.BlockHash(blockNumber)) + blockHash := LeftPadWord256(hash) + stack.Push(blockHash) + c.debugf(" => 0x%v\n", blockHash) + } + + case COINBASE: // 0x41 + stack.Push(Zero256) + c.debugf(" => 0x%v (NOT SUPPORTED)\n", stack.Peek()) + + case TIMESTAMP: // 0x42 + blockTime := st.Blockchain.LastBlockTime().Unix() + stack.Push64(blockTime) + c.debugf(" => %d\n", blockTime) + + case BLOCKHEIGHT: // 0x43 + number := st.Blockchain.LastBlockHeight() + stack.PushU64(number) + c.debugf(" => %d\n", number) + + case GASLIMIT: // 0x45 + stack.PushU64(*params.Gas) + c.debugf(" => %v\n", *params.Gas) + + case POP: // 0x50 + popped := stack.Pop() + c.debugf(" => 0x%v\n", popped) + + case MLOAD: // 0x51 + offset := stack.PopBigInt() + data := memory.Read(offset, BigWord256Length) + stack.Push(LeftPadWord256(data)) + c.debugf(" => 0x%X @ 0x%v\n", data, offset) + + case MSTORE: // 0x52 + offset, data := stack.PopBigInt(), stack.Pop() + memory.Write(offset, data.Bytes()) + c.debugf(" => 0x%v @ 0x%v\n", data, offset) + + case MSTORE8: // 0x53 + offset := stack.PopBigInt() + val64 := stack.Pop64() + val := byte(val64 & 0xFF) + memory.Write(offset, []byte{val}) + c.debugf(" => [%v] 0x%X\n", offset, val) + + case SLOAD: // 0x54 + loc := stack.Pop() + data := LeftPadWord256(maybe.Bytes(st.CallFrame.GetStorage(params.Callee, loc))) + stack.Push(data) + c.debugf("%v {0x%v = 0x%v}\n", params.Callee, loc, data) + + case SSTORE: // 0x55 + loc, data := stack.Pop(), stack.Pop() + maybe.PushError(useGasNegative(params.Gas, native.GasStorageUpdate)) + maybe.PushError(st.CallFrame.SetStorage(params.Callee, loc, data.Bytes())) + c.debugf("%v {%v := %v}\n", params.Callee, loc, data) + + case JUMP: // 0x56 + to := stack.Pop64() + maybe.PushError(c.jump(c.code, to, &pc)) + continue + + case JUMPI: // 0x57 + pos := stack.Pop64() + cond := stack.Pop() + if !cond.IsZero() { + maybe.PushError(c.jump(c.code, pos, &pc)) + continue + } else { + c.debugf(" ~> false\n") + } + + case PC: // 0x58 + stack.Push64(pc) + + case MSIZE: // 0x59 + // Note: Solidity will write to this offset expecting to find guaranteed + // free memory to be allocated for it if a subsequent MSTORE is made to + // this offset. + capacity := memory.Capacity() + stack.PushBigInt(capacity) + c.debugf(" => 0x%X\n", capacity) + + case GAS: // 0x5A + stack.PushU64(*params.Gas) + c.debugf(" => %X\n", *params.Gas) + + case JUMPDEST: // 0x5B + c.debugf("\n") + // Do nothing + + case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: + a := int64(op - PUSH1 + 1) + codeSegment := maybe.Bytes(subslice(c.code, pc+1, a)) + res := LeftPadWord256(codeSegment) + stack.Push(res) + pc += a + c.debugf(" => 0x%v\n", res) + + case DUP1, DUP2, DUP3, DUP4, DUP5, DUP6, DUP7, DUP8, DUP9, DUP10, DUP11, DUP12, DUP13, DUP14, DUP15, DUP16: + n := int(op - DUP1 + 1) + stack.Dup(n) + c.debugf(" => [%d] 0x%v\n", n, stack.Peek()) + + case SWAP1, SWAP2, SWAP3, SWAP4, SWAP5, SWAP6, SWAP7, SWAP8, SWAP9, SWAP10, SWAP11, SWAP12, SWAP13, SWAP14, SWAP15, SWAP16: + n := int(op - SWAP1 + 2) + stack.Swap(n) + c.debugf(" => [%d] %v\n", n, stack.Peek()) + + case LOG0, LOG1, LOG2, LOG3, LOG4: + n := int(op - LOG0) + topics := make([]Word256, n) + offset, size := stack.PopBigInt(), stack.PopBigInt() + for i := 0; i < n; i++ { + topics[i] = stack.Pop() + } + data := memory.Read(offset, size) + maybe.PushError(st.EventSink.Log(&exec.LogEvent{ + Address: params.Callee, + Topics: topics, + Data: data, + })) + c.debugf(" => T:%X D:%X\n", topics, data) + + case CREATE, CREATE2: // 0xF0, 0xFB + returnData = nil + contractValue := stack.PopU64() + offset, size := stack.PopBigInt(), stack.PopBigInt() + input := memory.Read(offset, size) + + // TODO charge for gas to create account _ the code length * GasCreateByte + maybe.PushError(useGasNegative(params.Gas, native.GasCreateAccount)) + + var newAccountAddress crypto.Address + if op == CREATE { + c.sequence++ + nonce := make([]byte, txs.HashLength+uint64Length) + copy(nonce, c.options.Nonce) + binary.BigEndian.PutUint64(nonce[txs.HashLength:], c.sequence) + newAccountAddress = crypto.NewContractAddress(params.Callee, nonce) + } else if op == CREATE2 { + salt := stack.Pop() + code := mustGetAccount(st.CallFrame, maybe, params.Callee).EVMCode + newAccountAddress = crypto.NewContractAddress2(params.Callee, salt, code) + } + + // Check the CreateContract permission for this account + if maybe.PushError(ensurePermission(st.CallFrame, params.Callee, permission.CreateContract)) { + continue + } + + // Establish a frame in which the putative account exists + childCallFrame, err := st.CallFrame.NewFrame() + maybe.PushError(err) + maybe.PushError(native.CreateAccount(childCallFrame, newAccountAddress)) + + // Run the input to get the contract code. + // NOTE: no need to copy 'input' as per Call contract. + ret, callErr := c.Contract(input).Call( + engine.State{ + CallFrame: childCallFrame, + Blockchain: st.Blockchain, + EventSink: st.EventSink, + }, + engine.CallParams{ + Origin: params.Origin, + Caller: params.Callee, + Callee: newAccountAddress, + Input: input, + Value: contractValue, + Gas: params.Gas, + }) + if callErr != nil { + stack.Push(Zero256) + // Note we both set the return buffer and return the result normally in order to service the error to + // EVM caller + returnData = ret + } else { + // Update the account with its initialised contract code + maybe.PushError(native.InitChildCode(childCallFrame, newAccountAddress, params.Callee, ret)) + maybe.PushError(childCallFrame.Sync()) + stack.PushAddress(newAccountAddress) + } + + case CALL, CALLCODE, DELEGATECALL, STATICCALL: // 0xF1, 0xF2, 0xF4, 0xFA + returnData = nil + + if maybe.PushError(ensurePermission(st.CallFrame, params.Callee, permission.Call)) { + continue + } + // Pull arguments off stack: + gasLimit := stack.PopU64() + target := stack.PopAddress() + value := params.Value + // NOTE: for DELEGATECALL value is preserved from the original + // caller, as such it is not stored on stack as an argument + // for DELEGATECALL and should not be popped. Instead previous + // caller value is used. for CALL and CALLCODE value is stored + // on stack and needs to be overwritten from the given value. + if op != DELEGATECALL && op != STATICCALL { + value = stack.PopU64() + } + // inputs + inOffset, inSize := stack.PopBigInt(), stack.PopBigInt() + // outputs + retOffset := stack.PopBigInt() + retSize := stack.Pop64() + c.debugf(" => %v\n", target) + + // Get the arguments from the memory + // EVM contract + maybe.PushError(useGasNegative(params.Gas, native.GasGetAccount)) + // since CALL is used also for sending funds, + // acc may not exist yet. This is an errors.CodedError for + // CALLCODE, but not for CALL, though I don't think + // ethereum actually cares + acc := getAccount(st.CallFrame, maybe, target) + if acc == nil { + if op != CALL { + maybe.PushError(errors.ErrorCodeUnknownAddress) + continue + } + // We're sending funds to a new account so we must create it first + if maybe.PushError(createAccount(st.CallFrame, params.Callee, target)) { + continue + } + acc = mustGetAccount(st.CallFrame, maybe, target) + } + + // Establish a stack frame and perform the call + childCallFrame, err := st.CallFrame.NewFrame() + if maybe.PushError(err) { + continue + } + childState := engine.State{ + CallFrame: childCallFrame, + Blockchain: st.Blockchain, + EventSink: st.EventSink, + } + // Ensure that gasLimit is reasonable + if *params.Gas < gasLimit { + // EIP150 - the 63/64 rule - rather than errors.CodedError we pass this specified fraction of the total available gas + gasLimit = *params.Gas - *params.Gas/64 + } + // NOTE: we will return any used gas later. + *params.Gas -= gasLimit + + // Setup callee params for call type + + calleeParams := engine.CallParams{ + Origin: params.Origin, + Input: memory.Read(inOffset, inSize), + Value: value, + Gas: &gasLimit, + } + + // Set up the caller/callee context + switch op { + case CALL: + // Calls contract at target from this contract normally + // Value: transferred + // Caller: this contract + // Storage: target + // Code: from target + + calleeParams.CallType = exec.CallTypeCall + calleeParams.Caller = params.Callee + calleeParams.Callee = target + + case STATICCALL: + // Calls contract at target from this contract with no state mutation + // Value: not transferred + // Caller: this contract + // Storage: target (read-only) + // Code: from target + + calleeParams.CallType = exec.CallTypeStatic + calleeParams.Caller = params.Callee + calleeParams.Callee = target + + childState.CallFrame.ReadOnly() + childState.EventSink = exec.NewLogFreeEventSink(childState.EventSink) + + case CALLCODE: + // Calling this contract from itself as if it had the code at target + // Value: transferred + // Caller: this contract + // Storage: this contract + // Code: from target + + calleeParams.CallType = exec.CallTypeCode + calleeParams.Caller = params.Callee + calleeParams.Callee = params.Callee + + case DELEGATECALL: + // Calling this contract from the original caller as if it had the code at target + // Value: not transferred + // Caller: original caller + // Storage: this contract + // Code: from target + + calleeParams.CallType = exec.CallTypeDelegate + calleeParams.Caller = params.Caller + calleeParams.Callee = params.Callee + + default: + panic(fmt.Errorf("switch statement should be exhaustive so this should not have been reached")) + } + + var callErr error + returnData, callErr = c.Dispatch(acc).Call(childState, calleeParams) + + if callErr == nil { + // Sync error is a hard stop + maybe.PushError(childState.CallFrame.Sync()) + } + + // Push result + if callErr != nil { + c.debugf("error from nested sub-call (depth: %v): %s\n", st.CallFrame.CallStackDepth(), callErr.Error()) + // So we can return nested errors.CodedError if the top level return is an errors.CodedError + stack.Push(Zero256) + + if errors.ErrorCode(callErr) == errors.ErrorCodeExecutionReverted { + memory.Write(retOffset, RightPadBytes(returnData, int(retSize))) + } + } else { + stack.Push(One256) + + // Should probably only be necessary when there is no return value and + // returnData is empty, but since EVM expects retSize to be respected this will + // defensively pad or truncate the portion of returnData to be returned. + memory.Write(retOffset, RightPadBytes(returnData, int(retSize))) + } + + // Handle remaining gas. + *params.Gas += *calleeParams.Gas + + c.debugf("resume %s (%v)\n", params.Callee, params.Gas) + + case RETURN: // 0xF3 + offset, size := stack.PopBigInt(), stack.PopBigInt() + output := memory.Read(offset, size) + c.debugf(" => [%v, %v] (%d) 0x%X\n", offset, size, len(output), output) + return output, maybe.Error() + + case REVERT: // 0xFD + offset, size := stack.PopBigInt(), stack.PopBigInt() + output := memory.Read(offset, size) + c.debugf(" => [%v, %v] (%d) 0x%X\n", offset, size, len(output), output) + maybe.PushError(newRevertException(output)) + return output, maybe.Error() + + case INVALID: // 0xFE + maybe.PushError(errors.ErrorCodeExecutionAborted) + return nil, maybe.Error() + + case SELFDESTRUCT: // 0xFF + receiver := stack.PopAddress() + maybe.PushError(useGasNegative(params.Gas, native.GasGetAccount)) + if getAccount(st.CallFrame, maybe, receiver) == nil { + // If receiver address doesn't exist, try to create it + maybe.PushError(useGasNegative(params.Gas, native.GasCreateAccount)) + if maybe.PushError(createAccount(st.CallFrame, params.Callee, receiver)) { + continue + } + } + balance := mustGetAccount(st.CallFrame, maybe, params.Callee).Balance + maybe.PushError(native.UpdateAccount(st.CallFrame, receiver, func(account *acm.Account) error { + return account.AddToBalance(balance) + })) + maybe.PushError(native.RemoveAccount(st.CallFrame, params.Callee)) + c.debugf(" => (%X) %v\n", receiver[:4], balance) + return nil, maybe.Error() + + case STOP: // 0x00 + c.debugf("\n") + return nil, maybe.Error() + + default: + c.debugf("(pc) %-3v Unknown opcode %v\n", pc, op) + maybe.PushError(errors.Errorf("unknown opcode %v", op)) + return nil, maybe.Error() + } + pc++ + } + return nil, maybe.Error() +} + +func (c *Contract) jump(code []byte, to int64, pc *int64) error { + dest := codeGetOp(code, to) + if dest != JUMPDEST { + c.debugf(" ~> %v invalid jump dest %v\n", to, dest) + return errors.ErrorCodeInvalidJumpDest + } + c.debugf(" ~> %v\n", to) + *pc = to + return nil +} + +func createAccount(callFrame *engine.CallFrame, creator, address crypto.Address) error { + err := ensurePermission(callFrame, creator, permission.CreateAccount) + if err != nil { + return err + } + return native.CreateAccount(callFrame, address) +} + +func getAccount(st acmstate.Reader, m *errors.Maybe, address crypto.Address) *acm.Account { + acc, err := st.GetAccount(address) + if err != nil { + m.PushError(err) + return nil + } + return acc +} + +// Guaranteed to return a non-nil account, if the account does not exist returns a pointer to the zero-value of Account +// and pushes an error. +func mustGetAccount(st acmstate.Reader, m *errors.Maybe, address crypto.Address) *acm.Account { + acc := getAccount(st, m, address) + if acc == nil { + m.PushError(errors.ErrorCodef(errors.ErrorCodeNonExistentAccount, "account %v does not exist", address)) + return &acm.Account{} + } + return acc +} + +func ensurePermission(callFrame *engine.CallFrame, address crypto.Address, perm permission.PermFlag) error { + hasPermission, err := native.HasPermission(callFrame, address, perm) + if err != nil { + return err + } else if !hasPermission { + return errors.PermissionDenied{ + Address: address, + Perm: perm, + } + } + return nil +} + +// Try to deduct gasToUse from gasLeft. If ok return false, otherwise +// set err and return true. +func useGasNegative(gasLeft *uint64, gasToUse uint64) error { + if *gasLeft >= gasToUse { + *gasLeft -= gasToUse + } else { + return errors.ErrorCodeInsufficientGas + } + return nil +} + +// Returns a subslice from offset of length length and a bool +// (true iff slice was possible). If the subslice +// extends past the end of data it returns A COPY of the segment at the end of +// data padded with zeroes on the right. If offset == len(data) it returns all +// zeroes. if offset > len(data) it returns a false +func subslice(data []byte, offset, length int64) ([]byte, error) { + size := int64(len(data)) + if size < offset || offset < 0 || length < 0 { + return nil, errors.ErrorCodef(errors.ErrorCodeInputOutOfBounds, + "subslice could not slice data of size %d at offset %d for length %d", size, offset, length) + } + if size < offset+length { + // Extract slice from offset to end padding to requested length + ret := make([]byte, length) + copy(ret, data[offset:]) + return ret, nil + } + return data[offset : offset+length], nil +} + +func codeGetOp(code []byte, n int64) OpCode { + if int64(len(code)) <= n { + return OpCode(0) // stop + } else { + return OpCode(code[n]) + } +} + +// Dump the bytecode being sent to the EVM in the current working directory +func dumpTokens(nonce []byte, caller, callee crypto.Address, code []byte) { + var tokensString string + tokens, err := acm.Bytecode(code).Tokens() + if err != nil { + tokensString = fmt.Sprintf("error generating tokens from bytecode: %v", err) + } else { + tokensString = strings.Join(tokens, "\n") + } + txHashString := "nil-nonce" + if len(nonce) >= 4 { + txHashString = fmt.Sprintf("nonce-%X", nonce[:4]) + } + callerString := "caller-none" + if caller != crypto.ZeroAddress { + callerString = fmt.Sprintf("caller-%v", caller) + } + calleeString := "callee-none" + if callee != crypto.ZeroAddress { + calleeString = fmt.Sprintf("callee-%v", caller) + } + _ = ioutil.WriteFile(fmt.Sprintf("tokens_%s_%s_%s.asm", txHashString, callerString, calleeString), + []byte(tokensString), 0777) +} + +func newRevertException(ret []byte) errors.CodedError { + code := errors.ErrorCodeExecutionReverted + if len(ret) > 0 { + // Attempt decode + reason, err := abi.UnpackRevert(ret) + if err == nil { + return errors.ErrorCodef(code, "with reason '%s'", *reason) + } + } + return code +} diff --git a/execution/evm/evm.go b/execution/evm/evm.go new file mode 100644 index 000000000..0e2539c74 --- /dev/null +++ b/execution/evm/evm.go @@ -0,0 +1,143 @@ +// Copyright 2017 Monax Industries Limited +// +// 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 evm + +import ( + "fmt" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/execution/native" + "github.com/hyperledger/burrow/logging" +) + +const ( + DataStackInitialCapacity = 1024 + MaximumAllowedBlockLookBack = 256 + uint64Length = 8 +) + +type EVM struct { + options Options + sequence uint64 + // Provide any foreign dispatchers to allow calls between VMs + externals engine.Dispatcher + // User dispatcher.CallableProvider to get access to other VMs + logger *logging.Logger +} + +// Options are parameters that are generally stable across a burrow configuration. +// Defaults will be used for any zero values. +type Options struct { + MemoryProvider func(errors.Sink) Memory + Natives *native.Natives + Nonce []byte + DebugOpcodes bool + DumpTokens bool + CallStackMaxDepth uint64 + DataStackInitialCapacity uint64 + DataStackMaxDepth uint64 + Logger *logging.Logger +} + +func New(options Options) *EVM { + // Set defaults + if options.MemoryProvider == nil { + options.MemoryProvider = DefaultDynamicMemoryProvider + } + if options.Logger == nil { + options.Logger = logging.NewNoopLogger() + } + if options.Natives == nil { + options.Natives = native.MustDefaultNatives() + } + vm := &EVM{ + options: options, + } + // TODO: ultimately this wiring belongs a level up, but for the time being it is convenient to handle it here + // since we need to both intercept backend state to serve up natives AND connect the external dispatchers + engine.Connect(vm, options.Natives) + vm.logger = options.Logger.WithScope("NewVM").With("evm_nonce", options.Nonce) + return vm +} + +func Default() *EVM { + return New(Options{}) +} + +// Initiate an EVM call against the provided state pushing events to eventSink. code should contain the EVM bytecode, +// input the CallData (readable by CALLDATALOAD), value the amount of native token to transfer with the call +// an quantity metering the number of computational steps available to the execution according to the gas schedule. +func (vm *EVM) Execute(st acmstate.ReaderWriter, blockchain engine.Blockchain, eventSink exec.EventSink, + params engine.CallParams, code []byte) ([]byte, error) { + + // Make it appear as if natives are stored in state + st = native.NewState(vm.options.Natives, st) + + state := engine.State{ + CallFrame: engine.NewCallFrame(st).WithMaxCallStackDepth(vm.options.CallStackMaxDepth), + Blockchain: blockchain, + EventSink: eventSink, + } + + output, err := vm.Contract(code).Call(state, params) + if err == nil { + // Only sync back when there was no exception + err = state.CallFrame.Sync() + } + // Always return output - we may have a reverted exception for which the return is meaningful + return output, err +} + +// Sets a new nonce and resets the sequence number. Nonces should only be used once! +// A global counter or sufficient randomness will work. +func (vm *EVM) SetNonce(nonce []byte) { + vm.options.Nonce = nonce + vm.sequence = 0 +} + +func (vm *EVM) SetLogger(logger *logging.Logger) { + vm.logger = logger +} + +func (vm *EVM) Dispatch(acc *acm.Account) engine.Callable { + // Try external calls then fallback to EVM + callable := vm.externals.Dispatch(acc) + if callable != nil { + return callable + } + // This supports empty code calls + return vm.Contract(acc.EVMCode) +} + +func (vm *EVM) SetExternals(externals engine.Dispatcher) { + vm.externals = externals +} + +func (vm *EVM) Contract(code []byte) *Contract { + return &Contract{ + EVM: vm, + code: code, + } +} + +func (vm *EVM) debugf(format string, a ...interface{}) { + if vm.options.DebugOpcodes { + fmt.Printf(format, a...) + } +} diff --git a/execution/evm/evm_test.go b/execution/evm/evm_test.go new file mode 100644 index 000000000..86d6f8f1d --- /dev/null +++ b/execution/evm/evm_test.go @@ -0,0 +1,1546 @@ +// Copyright 2017 Monax Industries Limited +// +// 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 evm + +import ( + "bytes" + "encoding/binary" + "reflect" + "testing" + "time" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/acm/acmstate" + . "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/errors" + . "github.com/hyperledger/burrow/execution/evm/asm" + . "github.com/hyperledger/burrow/execution/evm/asm/bc" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/execution/native" + "github.com/hyperledger/burrow/txs" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/tmthrgd/go-hex" +) + +// Test output is a bit clearer if we /dev/null the logging, but can be re-enabled by uncommenting the below +//var logger, _, _ = lifecycle.NewStdErrLogger() + +// Runs a basic loop +func TestEVM(t *testing.T) { + vm := New(Options{ + Natives: native.MustDefaultNatives(), + }) + + t.Run("BasicLoop", func(t *testing.T) { + st := acmstate.NewMemoryState() + blockchain := new(blockchain) + eventSink := exec.NewNoopEventSink() + + // Create accounts + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "101") + + var gas uint64 = 100000 + + bytecode := MustSplice(PUSH1, 0x00, PUSH1, 0x20, MSTORE, JUMPDEST, PUSH2, 0x0F, 0x0F, PUSH1, 0x20, MLOAD, + SLT, ISZERO, PUSH1, 0x1D, JUMPI, PUSH1, 0x01, PUSH1, 0x20, MLOAD, ADD, PUSH1, 0x20, + MSTORE, PUSH1, 0x05, JUMP, JUMPDEST) + + start := time.Now() + output, err := vm.Execute(st, blockchain, eventSink, engine.CallParams{ + Caller: account1, + Callee: account2, + Gas: &gas, + }, bytecode) + t.Logf("Output: %v Error: %v\n", output, err) + t.Logf("Call took: %v", time.Since(start)) + require.NoError(t, err) + }) + + t.Run("SHL", func(t *testing.T) { + st := acmstate.NewMemoryState() + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "101") + + var gas uint64 = 100000 + + //Shift left 0 + bytecode := MustSplice(PUSH1, 0x01, PUSH1, 0x00, SHL, return1()) + output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + value := []byte{0x1} + expected := LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift left 0 + bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x00, SHL, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} + + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Shift left 1 + bytecode = MustSplice(PUSH1, 0x01, PUSH1, 0x01, SHL, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x2} + expected = LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift left 1 + bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x01, SHL, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x2} + expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE} + + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift left 1 + bytecode = MustSplice(PUSH32, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x01, SHL, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE} + + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Shift left 255 + bytecode = MustSplice(PUSH1, 0x01, PUSH1, 0xFF, SHL, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x80} + expected = RightPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift left 255 + bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0xFF, SHL, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x80} + expected = RightPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Shift left 256 (overflow) + bytecode = MustSplice(PUSH1, 0x01, PUSH2, 0x01, 0x00, SHL, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x00} + expected = LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift left 256 (overflow) + bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH2, 0x01, 0x00, SHL, + return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x00} + expected = LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Shift left 257 (overflow) + bytecode = MustSplice(PUSH1, 0x01, PUSH2, 0x01, 0x01, SHL, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x00} + expected = LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + }) + + t.Run("SHR", func(t *testing.T) { + st := acmstate.NewMemoryState() + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "101") + + var gas uint64 = 100000 + + //Shift right 0 + bytecode := MustSplice(PUSH1, 0x01, PUSH1, 0x00, SHR, return1()) + output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + value := []byte{0x1} + expected := LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift right 0 + bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x00, SHR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} + + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Shift right 1 + bytecode = MustSplice(PUSH1, 0x01, PUSH1, 0x01, SHR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x00} + expected = LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift right 1 + bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0x01, SHR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x40} + expected = RightPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift right 1 + bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x01, SHR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + expected = []byte{0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} + + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Shift right 255 + bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0xFF, SHR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x1} + expected = LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift right 255 + bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0xFF, SHR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x1} + expected = LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Shift right 256 (underflow) + bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH2, 0x01, 0x00, SHR, + return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x00} + expected = LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift right 256 (underflow) + bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH2, 0x01, 0x00, SHR, + return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x00} + expected = LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Shift right 257 (underflow) + bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH2, 0x01, 0x01, SHR, + return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x00} + expected = LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + }) + + t.Run("SAR", func(t *testing.T) { + st := acmstate.NewMemoryState() + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "101") + + var gas uint64 = 100000 + + //Shift arith right 0 + bytecode := MustSplice(PUSH1, 0x01, PUSH1, 0x00, SAR, return1()) + output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + value := []byte{0x1} + expected := LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative arith shift right 0 + bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x00, SAR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} + + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Shift arith right 1 + bytecode = MustSplice(PUSH1, 0x01, PUSH1, 0x01, SAR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x00} + expected = LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift arith right 1 + bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0x01, SAR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0xc0} + expected = RightPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift arith right 1 + bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x01, SAR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} + + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Shift arith right 255 + bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0xFF, SAR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} + + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift arith right 255 + bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0xFF, SAR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} + + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift arith right 255 + bytecode = MustSplice(PUSH32, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0xFF, SAR, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []uint8([]byte{0x00}) + expected = RightPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Shift arith right 256 (reset) + bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH2, 0x01, 0x00, SAR, + return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + expected = []uint8([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}) + + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Alternative shift arith right 256 (reset) + bytecode = MustSplice(PUSH32, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH2, 0x01, 0x00, SAR, + return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + value = []byte{0x00} + expected = LeftPadBytes(value, 32) + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + + //Shift arith right 257 (reset) + bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH2, 0x01, 0x01, SAR, + return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} + + assert.Equal(t, expected, output) + + t.Logf("Result: %v == %v\n", output, expected) + + if err != nil { + t.Fatal(err) + } + }) + + //Test attempt to jump to bad destination (position 16) + t.Run("JumpErr", func(t *testing.T) { + st := acmstate.NewMemoryState() + + // Create accounts + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "2") + + var gas uint64 = 100000 + + bytecode := MustSplice(PUSH1, 0x10, JUMP) + + var err error + ch := make(chan struct{}) + go func() { + _, err = call(vm, st, account1, account2, bytecode, nil, &gas) + ch <- struct{}{} + }() + tick := time.NewTicker(time.Second * 2) + select { + case <-tick.C: + t.Fatal("VM ended up in an infinite loop from bad jump dest (it took too long!)") + case <-ch: + if err == nil { + t.Fatal("Expected invalid jump dest err") + } + } + }) + + // Tests the code for a subcurrency contract compiled by serpent + t.Run("Subcurrency", func(t *testing.T) { + st := acmstate.NewMemoryState() + // Create accounts + account1 := newAccount(t, st, "1, 2, 3") + account2 := newAccount(t, st, "3, 2, 1") + + var gas uint64 = 1000 + + bytecode := MustSplice(PUSH3, 0x0F, 0x42, 0x40, CALLER, SSTORE, PUSH29, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, + 0x00, CALLDATALOAD, DIV, PUSH4, 0x15, 0xCF, 0x26, 0x84, DUP2, EQ, ISZERO, PUSH2, + 0x00, 0x46, JUMPI, PUSH1, 0x04, CALLDATALOAD, PUSH1, 0x40, MSTORE, PUSH1, 0x40, + MLOAD, SLOAD, PUSH1, 0x60, MSTORE, PUSH1, 0x20, PUSH1, 0x60, RETURN, JUMPDEST, + PUSH4, 0x69, 0x32, 0x00, 0xCE, DUP2, EQ, ISZERO, PUSH2, 0x00, 0x87, JUMPI, PUSH1, + 0x04, CALLDATALOAD, PUSH1, 0x80, MSTORE, PUSH1, 0x24, CALLDATALOAD, PUSH1, 0xA0, + MSTORE, CALLER, SLOAD, PUSH1, 0xC0, MSTORE, CALLER, PUSH1, 0xE0, MSTORE, PUSH1, + 0xA0, MLOAD, PUSH1, 0xC0, MLOAD, SLT, ISZERO, ISZERO, PUSH2, 0x00, 0x86, JUMPI, + PUSH1, 0xA0, MLOAD, PUSH1, 0xC0, MLOAD, SUB, PUSH1, 0xE0, MLOAD, SSTORE, PUSH1, + 0xA0, MLOAD, PUSH1, 0x80, MLOAD, SLOAD, ADD, PUSH1, 0x80, MLOAD, SSTORE, JUMPDEST, + JUMPDEST, POP, JUMPDEST, PUSH1, 0x00, PUSH1, 0x00, RETURN) + + data := hex.MustDecodeString("693200CE0000000000000000000000004B4363CDE27C2EB05E66357DB05BC5C88F850C1A0000000000000000000000000000000000000000000000000000000000000005") + output, err := call(vm, st, account1, account2, bytecode, data, &gas) + t.Logf("Output: %v Error: %v\n", output, err) + if err != nil { + t.Fatal(err) + } + require.NoError(t, err) + }) + + //This test case is taken from EIP-140 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-140.md); + //it is meant to test the implementation of the REVERT opcode + t.Run("Revert", func(t *testing.T) { + st := acmstate.NewMemoryState() + + // Create accounts + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "1, 0, 1") + + key, value := []byte{0x00}, []byte{0x00} + err := st.SetStorage(account1, LeftPadWord256(key), value) + require.NoError(t, err) + + var gas uint64 = 100000 + + bytecode := MustSplice(PUSH13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x64, 0x61, 0x74, 0x61, + PUSH1, 0x00, SSTORE, PUSH32, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6D, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + PUSH1, 0x00, MSTORE, PUSH1, 0x0E, PUSH1, 0x00, REVERT) + + /*bytecode := MustSplice(PUSH32, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6D, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, PUSH1, 0x00, MSTORE, PUSH1, 0x0E, PUSH1, 0x00, REVERT)*/ + + output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + assert.Error(t, err, "Expected execution reverted error") + + storageVal, err := st.GetStorage(account1, LeftPadWord256(key)) + require.NoError(t, err) + assert.Equal(t, value, storageVal) + + t.Logf("Output: %v\n", output) + }) + + // Test sending tokens from a contract to another account + t.Run("SendCall", func(t *testing.T) { + st := acmstate.NewMemoryState() + + // Create accounts + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "2") + account3 := newAccount(t, st, "3") + + // account1 will call account2 which will trigger CALL opcode to account3 + addr := account3 + contractCode := callContractCode(addr) + + //---------------------------------------------- + // account2 has insufficient balance, should fail + txe := runVM(st, account1, account2, contractCode, 100000) + exCalls := txe.ExceptionalCalls() + require.Len(t, exCalls, 1) + require.Equal(t, errors.ErrorCodeInsufficientBalance, errors.ErrorCode(exCalls[0].Header.Exception)) + + //---------------------------------------------- + // give account2 sufficient balance, should pass + addToBalance(t, st, account2, 100000) + txe = runVM(st, account1, account2, contractCode, 1000) + assert.Nil(t, txe.Exception, "Should have sufficient balance") + + //---------------------------------------------- + // insufficient gas, should fail + txe = runVM(st, account1, account2, contractCode, 100) + assert.NotNil(t, txe.Exception, "Expected insufficient gas error") + }) + + // Test to ensure that contracts called with STATICCALL cannot modify state + // as per https://github.com/ethereum/EIPs/blob/master/EIPS/eip-214.md + t.Run("StaticCallReadOnly", func(t *testing.T) { + gas1, gas2 := byte(0x1), byte(0x1) + value := byte(0x69) + var inOff, inSize, retOff, retSize byte + + logDefault := MustSplice(PUSH1, inSize, PUSH1, inOff) + testRecipient := native.AddressFromName("1") + // check all illegal state modifications in child staticcall frame + for _, illegalContractCode := range []acm.Bytecode{ + MustSplice(PUSH9, "arbitrary", PUSH1, 0x00, SSTORE), + MustSplice(logDefault, LOG0), + MustSplice(logDefault, PUSH1, 0x1, LOG1), + MustSplice(logDefault, PUSH1, 0x1, PUSH1, 0x1, LOG2), + MustSplice(logDefault, PUSH1, 0x1, PUSH1, 0x1, PUSH1, 0x1, LOG3), + MustSplice(logDefault, PUSH1, 0x1, PUSH1, 0x1, PUSH1, 0x1, PUSH1, 0x1, LOG4), + MustSplice(PUSH1, 0x0, PUSH1, 0x0, PUSH1, 0x69, CREATE), + MustSplice(PUSH20, testRecipient, SELFDESTRUCT), + } { + // TODO: CREATE2 + + t.Logf("Testing state-modifying bytecode: %v", illegalContractCode.MustTokens()) + st := acmstate.NewMemoryState() + callee := makeAccountWithCode(t, st, "callee", MustSplice(illegalContractCode, PUSH1, 0x1, return1())) + + // equivalent to CALL, but enforce state immutability for children + code := MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, inOff, + PUSH1, value, PUSH20, callee, PUSH2, gas1, gas2, STATICCALL, PUSH1, retSize, + PUSH1, retOff, RETURN) + caller := makeAccountWithCode(t, st, "caller", code) + + txe := runVM(st, caller, callee, code, 1000) + // the topmost caller can never *illegally* modify state + require.Error(t, txe.Exception) + require.Equal(t, errors.ErrorCodeIllegalWrite, txe.Exception.GetCode(), + "should get an error from child accounts that st is read only") + } + }) + + t.Run("StaticCallWithValue", func(t *testing.T) { + gas1, gas2 := byte(0x1), byte(0x1) + value := byte(0x69) + var inOff, inSize, retOff, retSize byte + + st := acmstate.NewMemoryState() + + finalAddress := makeAccountWithCode(t, st, "final", MustSplice(PUSH1, int64(20), return1())) + + // intermediate account CALLs another contract *with* a value + callee := makeAccountWithCode(t, st, "callee", MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, + inOff, PUSH1, value, PUSH20, finalAddress, PUSH2, gas1, gas2, CALL, returnWord())) + + callerCode := MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, + inOff, PUSH1, value, PUSH20, callee, PUSH2, gas1, gas2, STATICCALL, PUSH1, retSize, + PUSH1, retOff, RETURN) + caller := makeAccountWithCode(t, st, "caller", callerCode) + + addToBalance(t, st, callee, 100000) + txe := runVM(st, caller, callee, callerCode, 1000) + require.NotNil(t, txe.Exception) + require.Equal(t, errors.ErrorCodeIllegalWrite, txe.Exception.GetCode(), + "expected static call violation because of call with value") + }) + + t.Run("StaticCallNoValue", func(t *testing.T) { + gas1, gas2 := byte(0x1), byte(0x1) + value := byte(0x69) + var inOff, inSize, retOff, retSize byte + + // this final test just checks that STATICCALL actually works + st := acmstate.NewMemoryState() + + finalAddress := makeAccountWithCode(t, st, "final", MustSplice(PUSH1, int64(20), return1())) + // intermediate account CALLs another contract *without* a value + callee := makeAccountWithCode(t, st, "callee", MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, + inOff, PUSH1, 0x00, PUSH20, finalAddress, PUSH2, gas1, gas2, CALL, returnWord())) + + callerCode := MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, + inOff, PUSH1, value, PUSH20, callee, PUSH2, gas1, gas2, STATICCALL, PUSH1, retSize, + PUSH1, retOff, RETURN) + caller := makeAccountWithCode(t, st, "caller", callerCode) + + addToBalance(t, st, callee, 100000) + txe := runVM(st, caller, callee, callerCode, 1000) + // no exceptions expected because value never set in children + require.NoError(t, txe.Exception.AsError()) + exCalls := txe.ExceptionalCalls() + require.Len(t, exCalls, 0) + }) + + // Test evm account creation + t.Run("Create", func(t *testing.T) { + st := acmstate.NewMemoryState() + + code := MustSplice(PUSH1, 0x0, PUSH1, 0x0, PUSH1, 0x0, CREATE, PUSH1, 0, MSTORE, PUSH1, 20, PUSH1, 12, RETURN) + callee := makeAccountWithCode(t, st, "callee", code) + // ensure pre-generated address has same sequence number + nonce := make([]byte, txs.HashLength+uint64Length) + binary.BigEndian.PutUint64(nonce[txs.HashLength:], 1) + addr := crypto.NewContractAddress(callee, nonce) + + var gas uint64 = 100000 + caller := newAccount(t, st, "1, 2, 3") + output, err := call(vm, st, caller, callee, code, nil, &gas) + assert.NoError(t, err, "Should return new address without error") + assert.Equal(t, addr.Bytes(), output, "Addresses should be equal") + }) + + // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1014.md + t.Run("Create2", func(t *testing.T) { + st := acmstate.NewMemoryState() + + // salt of 0s + var salt [32]byte + code := MustSplice(PUSH1, 0x0, PUSH1, 0x0, PUSH1, 0x0, PUSH32, salt[:], CREATE2, PUSH1, 0, MSTORE, PUSH1, 20, PUSH1, 12, RETURN) + callee := makeAccountWithCode(t, st, "callee", code) + addr := crypto.NewContractAddress2(callee, salt, code) + + var gas uint64 = 100000 + caller := newAccount(t, st, "1, 2, 3") + output, err := call(vm, st, caller, callee, code, nil, &gas) + assert.NoError(t, err, "Should return new address without error") + assert.Equal(t, addr.Bytes(), output, "Returned value not equal to create2 address") + }) + + // This test was introduced to cover an issues exposed in our handling of the + // gas limit passed from caller to callee on various forms of CALL. + // The idea of this test is to implement a simple DelegateCall in EVM code + // We first run the DELEGATECALL with _just_ enough gas expecting a simple return, + // and then run it with 1 gas unit less, expecting a failure + t.Run("DelegateCallGas", func(t *testing.T) { + st := acmstate.NewMemoryState() + + inOff := 0 + inSize := 0 // no call data + retOff := 0 + retSize := 32 + calleeReturnValue := int64(20) + + callee := makeAccountWithCode(t, st, "callee", MustSplice(PUSH1, calleeReturnValue, PUSH1, 0, MSTORE, PUSH1, 32, PUSH1, 0, RETURN)) + + // 6 op codes total + baseOpsCost := native.GasBaseOp * 6 + // 4 pushes + pushCost := native.GasStackOp * 4 + // 2 pushes 2 pops + returnCost := native.GasStackOp * 4 + // To push success/failure + resumeCost := native.GasStackOp + + // Gas is not allowed to drop to 0 so we add resumecost + delegateCallCost := baseOpsCost + pushCost + returnCost + resumeCost + + // Here we split up the caller code so we can make a DELEGATE call with + // different amounts of gas. The value we sandwich in the middle is the amount + // we subtract from the available gas (that the caller has available), so: + // code := MustSplice(callerCodePrefix, , callerCodeSuffix) + // gives us the code to make the call + callerCodePrefix := MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, + PUSH1, inOff, PUSH20, callee, PUSH1) + callerCodeSuffix := MustSplice(DELEGATECALL, returnWord()) + + // Perform a delegate call + //callerCode := MustSplice(callerCodePrefix, + // Give just enough gas to make the DELEGATECALL + //delegateCallCost, callerCodeSuffix) + //caller := makeAccountWithCode(t, st, "caller", callerCode) + + // Should pass + //txe := runVM(st, caller, callee, callerCode, 100) + //assert.Nil(t, txe.Exception, "Should have sufficient funds for call") + //assert.Equal(t, Int64ToWord256(calleeReturnValue).Bytes(), txe.Result.Return) + + callerCode2 := MustSplice(callerCodePrefix, + // Shouldn't be enough gas to make call + delegateCallCost-1, callerCodeSuffix) + caller2 := makeAccountWithCode(t, st, "caller2", callerCode2) + + // Should fail + txe := runVM(st, caller2, callee, callerCode2, 100) + assert.NotNil(t, txe.Exception, "Should have insufficient gas for call") + }) + + t.Run("MemoryBounds", func(t *testing.T) { + st := acmstate.NewMemoryState() + blockchain := new(blockchain) + eventSink := exec.NewNoopEventSink() + vm := New(Options{ + MemoryProvider: func(err errors.Sink) Memory { + return NewDynamicMemory(1024, 2048, err) + }, + }) + caller := makeAccountWithCode(t, st, "caller", nil) + callee := makeAccountWithCode(t, st, "callee", nil) + gas := uint64(100000) + word := One256 + // This attempts to store a value at the memory boundary and return it + params := engine.CallParams{ + Gas: &gas, + Caller: caller, + Callee: callee, + } + code := MustSplice(pushWord(word), storeAtEnd(), MLOAD, storeAtEnd(), returnAfterStore()) + + output, err := vm.Execute(st, blockchain, eventSink, params, code) + assert.NoError(t, err) + assert.Equal(t, word.Bytes(), output) + + // Same with number + word = Int64ToWord256(232234234432) + code = MustSplice(pushWord(word), storeAtEnd(), MLOAD, storeAtEnd(), returnAfterStore()) + output, err = vm.Execute(st, blockchain, eventSink, params, code) + assert.NoError(t, err) + assert.Equal(t, word.Bytes(), output) + + // Now test a series of boundary stores + code = pushWord(word) + for i := 0; i < 10; i++ { + code = MustSplice(code, storeAtEnd(), MLOAD) + } + code = MustSplice(code, storeAtEnd(), returnAfterStore()) + output, err = vm.Execute(st, blockchain, eventSink, params, code) + assert.NoError(t, err) + assert.Equal(t, word.Bytes(), output) + + // Same as above but we should breach the upper memory limit set in memoryProvider + code = pushWord(word) + for i := 0; i < 100; i++ { + code = MustSplice(code, storeAtEnd(), MLOAD) + } + code = MustSplice(code, storeAtEnd(), returnAfterStore()) + _, err = vm.Execute(st, blockchain, eventSink, params, code) + assert.Error(t, err, "Should hit memory out of bounds") + }) + + t.Run("MsgSender", func(t *testing.T) { + st := acmstate.NewMemoryState() + account1 := newAccount(t, st, "1, 2, 3") + account2 := newAccount(t, st, "3, 2, 1") + var gas uint64 = 100000 + + /* + pragma solidity ^0.5.4; + + contract SimpleStorage { + function get() public constant returns (address) { + return msg.sender; + } + } + */ + + // This bytecode is compiled from Solidity contract above using remix.ethereum.org online compiler + code := hex.MustDecodeString("6060604052341561000f57600080fd5b60ca8061001d6000396000f30060606040526004361060" + + "3f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680636d4ce63c14604457" + + "5b600080fd5b3415604e57600080fd5b60546096565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ff" + + "ffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000339050905600a165627a" + + "7a72305820b9ebf49535372094ae88f56d9ad18f2a79c146c8f56e7ef33b9402924045071e0029") + + var err error + // Run the contract initialisation code to obtain the contract code that would be mounted at account2 + contractCode, err := call(vm, st, account1, account2, code, code, &gas) + require.NoError(t, err) + + // Not needed for this test (since contract code is passed as argument to vm), but this is what an execution + // framework must do + err = native.InitCode(st, account2, contractCode) + require.NoError(t, err) + + // Input is the function hash of `get()` + input := hex.MustDecodeString("6d4ce63c") + + output, err := call(vm, st, account1, account2, contractCode, input, &gas) + require.NoError(t, err) + + assert.Equal(t, account1.Word256().Bytes(), output) + }) + + t.Run("Invalid", func(t *testing.T) { + st := acmstate.NewMemoryState() + + // Create accounts + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "1, 0, 1") + + var gas uint64 = 100000 + + bytecode := MustSplice(PUSH32, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6D, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, PUSH1, 0x00, MSTORE, PUSH1, 0x0E, PUSH1, 0x00, INVALID) + + output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + assert.Equal(t, errors.ErrorCodeExecutionAborted, errors.ErrorCode(err)) + t.Logf("Output: %v Error: %v\n", output, err) + }) + + t.Run("ReturnDataSize", func(t *testing.T) { + st := acmstate.NewMemoryState() + + accountName := "account2addresstests" + + ret := "My return message" + callcode := MustSplice(PUSH32, RightPadWord256([]byte(ret)), PUSH1, 0x00, MSTORE, PUSH1, len(ret), PUSH1, 0x00, RETURN) + + // Create accounts + account1 := newAccount(t, st, "1") + account2 := makeAccountWithCode(t, st, accountName, callcode) + + var gas uint64 = 100000 + + gas1, gas2 := byte(0x1), byte(0x1) + value := byte(0x69) + inOff, inSize := byte(0x0), byte(0x0) // no call data + retOff, retSize := byte(0x0), byte(len(ret)) + + bytecode := MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, inOff, PUSH1, value, + PUSH20, account2, PUSH2, gas1, gas2, CALL, + RETURNDATASIZE, PUSH1, 0x00, MSTORE, PUSH1, 0x20, PUSH1, 0x00, RETURN) + + expected := Uint64ToWord256(uint64(len(ret))).Bytes() + + output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + require.NoError(t, err) + assert.Equal(t, expected, output) + + t.Logf("Output: %v Error: %v\n", output, err) + + if err != nil { + t.Fatal(err) + } + }) + + t.Run("ReturnDataCopy", func(t *testing.T) { + st := acmstate.NewMemoryState() + + accountName := "account2addresstests" + + ret := "My return message" + callcode := MustSplice(PUSH32, RightPadWord256([]byte(ret)), PUSH1, 0x00, MSTORE, PUSH1, len(ret), PUSH1, 0x00, RETURN) + + // Create accounts + account1 := newAccount(t, st, "1") + account2 := makeAccountWithCode(t, st, accountName, callcode) + + var gas uint64 = 100000 + + gas1, gas2 := byte(0x1), byte(0x1) + value := byte(0x69) + inOff, inSize := byte(0x0), byte(0x0) // no call data + retOff, retSize := byte(0x0), byte(len(ret)) + + bytecode := MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, inOff, PUSH1, value, + PUSH20, account2, PUSH2, gas1, gas2, CALL, RETURNDATASIZE, PUSH1, 0x00, PUSH1, 0x00, RETURNDATACOPY, + RETURNDATASIZE, PUSH1, 0x00, RETURN) + + expected := []byte(ret) + + output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + require.NoError(t, err) + assert.Equal(t, expected, output) + + t.Logf("Output: %v Error: %v\n", output, err) + }) + + t.Run("CallNonExistent", func(t *testing.T) { + st := acmstate.NewMemoryState() + blockchain := new(blockchain) + eventSink := exec.NewNoopEventSink() + account1 := newAccount(t, st, "1") + addToBalance(t, st, account1, 100000) + unknownAddress := native.AddressFromName("nonexistent") + var gas uint64 + amt := uint64(100) + params := engine.CallParams{ + Caller: account1, + Callee: unknownAddress, + Value: amt, + Gas: &gas, + } + _, ex := vm.Execute(st, blockchain, eventSink, params, nil) + require.Equal(t, errors.ErrorCodeNonExistentAccount, errors.ErrorCode(ex), + "Should not be able to call account before creating it (even before initialising)") + acc, err := st.GetAccount(unknownAddress) + require.NoError(t, err) + require.Nil(t, acc) + }) + + t.Run("GetBlockHash", func(t *testing.T) { + st := acmstate.NewMemoryState() + blockchain := new(blockchain) + eventSink := exec.NewNoopEventSink() + + // Create accounts + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "101") + + var gas uint64 = 100000 + + bytecode := MustSplice(PUSH1, 2, BLOCKHASH) + + params := engine.CallParams{ + Caller: account1, + Callee: account2, + Gas: &gas, + } + // Non existing block + blockchain.blockHeight = 1 + _, err := vm.Execute(st, blockchain, eventSink, params, bytecode) + require.Equal(t, errors.ErrorCodeInvalidBlockNumber, errors.ErrorCode(err), + "attempt to get block hash of a non-existent block") + + // Excessive old block + blockchain.blockHeight = 258 + bytecode = MustSplice(PUSH1, 1, BLOCKHASH) + + _, err = vm.Execute(st, blockchain, eventSink, params, bytecode) + require.Equal(t, errors.ErrorCodeBlockNumberOutOfRange, errors.ErrorCode(err), + "attempt to get block hash of a block outside of allowed range") + + // Get block hash + blockchain.blockHeight = 257 + bytecode = MustSplice(PUSH1, 2, BLOCKHASH, return1()) + + output, err := vm.Execute(st, blockchain, eventSink, params, bytecode) + assert.NoError(t, err) + assert.Equal(t, LeftPadWord256([]byte{2}), LeftPadWord256(output)) + + // Get block hash fail + blockchain.blockHeight = 3 + bytecode = MustSplice(PUSH1, 4, BLOCKHASH, return1()) + + _, err = vm.Execute(st, blockchain, eventSink, params, bytecode) + require.Equal(t, errors.ErrorCodeInvalidBlockNumber, errors.ErrorCode(err), + "attempt to get block hash failed") + }) + + t.Run("PushWord", func(t *testing.T) { + word := Int64ToWord256(int64(2133213213)) + assert.Equal(t, MustSplice(PUSH4, 0x7F, 0x26, 0x40, 0x1D), pushWord(word)) + word[0] = 1 + assert.Equal(t, MustSplice(PUSH32, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x7F, 0x26, 0x40, 0x1D), pushWord(word)) + assert.Equal(t, MustSplice(PUSH1, 0), pushWord(Word256{})) + assert.Equal(t, MustSplice(PUSH1, 1), pushWord(Int64ToWord256(1))) + }) + + // Kind of indirect test of Splice, but here to avoid import cycles + t.Run("Bytecode", func(t *testing.T) { + assert.Equal(t, + MustSplice(1, 2, 3, 4, 5, 6), + MustSplice(1, 2, 3, MustSplice(4, 5, 6))) + assert.Equal(t, + MustSplice(1, 2, 3, 4, 5, 6, 7, 8), + MustSplice(1, 2, 3, MustSplice(4, MustSplice(5), 6), 7, 8)) + assert.Equal(t, + MustSplice(PUSH1, 2), + MustSplice(byte(PUSH1), 0x02)) + assert.Equal(t, + []byte{}, + MustSplice(MustSplice(MustSplice()))) + + contractAccount := &acm.Account{Address: crypto.AddressFromWord256(Int64ToWord256(102))} + addr := contractAccount.Address + gas1, gas2 := byte(0x1), byte(0x1) + value := byte(0x69) + inOff, inSize := byte(0x0), byte(0x0) // no call data + retOff, retSize := byte(0x0), byte(0x20) + contractCodeBytecode := MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, + inOff, PUSH1, value, PUSH20, addr, PUSH2, gas1, gas2, CALL, PUSH1, retSize, + PUSH1, retOff, RETURN) + contractCode := []byte{0x60, retSize, 0x60, retOff, 0x60, inSize, 0x60, inOff, 0x60, value, 0x73} + contractCode = append(contractCode, addr[:]...) + contractCode = append(contractCode, []byte{0x61, gas1, gas2, 0xf1, 0x60, 0x20, 0x60, 0x0, 0xf3}...) + assert.Equal(t, contractCode, contractCodeBytecode) + }) + + t.Run("Concat", func(t *testing.T) { + assert.Equal(t, + []byte{0x01, 0x02, 0x03, 0x04}, + Concat([]byte{0x01, 0x02}, []byte{0x03, 0x04})) + }) + + t.Run("Subslice", func(t *testing.T) { + const size = 10 + data := make([]byte, size) + for i := 0; i < size; i++ { + data[i] = byte(i) + } + for n := int64(0); n < size; n++ { + data = data[:n] + for offset := int64(-size); offset < size; offset++ { + for length := int64(-size); length < size; length++ { + _, err := subslice(data, offset, length) + if offset < 0 || length < 0 || n < offset { + assert.NotNil(t, err) + } else { + assert.Nil(t, err) + } + } + } + } + + bs, err := subslice([]byte{1, 2, 3, 4, 5, 6, 7, 8}, 4, 32) + require.NoError(t, err) + assert.Equal(t, []byte{ + 5, 6, 7, 8, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, bs) + }) + + t.Run("DataStackOverflow", func(t *testing.T) { + st := acmstate.NewMemoryState() + blockchain := new(blockchain) + eventSink := exec.NewNoopEventSink() + account1 := newAccount(t, st, "1, 2, 3") + account2 := newAccount(t, st, "3, 2, 1") + + var gas uint64 = 100000 + + /* + pragma solidity ^0.5.4; + + contract SimpleStorage { + function get() public constant returns (address) { + return get(); + } + } + */ + + // This bytecode is compiled from Solidity contract above using remix.ethereum.org online compiler + code, err := hex.DecodeString("608060405234801561001057600080fd5b5060d18061001f6000396000f300608060405260043610" + + "603f576000357c0100000000000000000000000000000000000000000000000000000000900463ff" + + "ffffff1680636d4ce63c146044575b600080fd5b348015604f57600080fd5b5060566098565b6040" + + "51808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffff" + + "ffffffffffff16815260200191505060405180910390f35b600060a06098565b9050905600a16562" + + "7a7a72305820daacfba0c21afacb5b67f26bc8021de63eaa560db82f98357d4e513f3249cf350029") + require.NoError(t, err) + + // Run the contract initialisation code to obtain the contract code that would be mounted at account2 + params := engine.CallParams{ + Caller: account1, + Callee: account2, + Input: code, + Gas: &gas, + } + vm := New(Options{ + DataStackMaxDepth: 4, + }) + + code, err = vm.Execute(st, blockchain, eventSink, params, code) + require.NoError(t, err) + + // Input is the function hash of `get()` + params.Input, err = hex.DecodeString("6d4ce63c") + require.NoError(t, err) + + _, ex := vm.Execute(st, blockchain, eventSink, params, code) + require.Equal(t, errors.ErrorCodeDataStackOverflow, errors.ErrorCode(ex), "Should be stack overflow") + }) + + t.Run("CallStackOverflow", func(t *testing.T) { + st := acmstate.NewMemoryState() + blockchain := new(blockchain) + eventSink := exec.NewNoopEventSink() + txe := new(exec.TxExecution) + + account1 := newAccount(t, st, "1, 2, 3") + account2 := newAccount(t, st, "3, 2, 1") + + // Sender accepts lot of gaz but we run on a caped call stack node + var gas uint64 = 100000 + /* + pragma solidity ^0.5.4; + + contract A { + function callMeBack() public { + return require(msg.sender.call(bytes4(keccak256("callMeBack()")),this)); + } + } + */ + + // This bytecode is compiled from Solidity contract above using remix.ethereum.org online compiler + code, err := hex.DecodeString("608060405234801561001057600080fd5b5061017a806100206000396000f3006080604052600436" + + "10610041576000357c01000000000000000000000000000000000000000000000000000000009004" + + "63ffffffff168063692c3b7c14610046575b600080fd5b34801561005257600080fd5b5061005b61" + + "005d565b005b3373ffffffffffffffffffffffffffffffffffffffff1660405180807f63616c6c4d" + + "654261636b28290000000000000000000000000000000000000000815250600c0190506040518091" + + "0390207c010000000000000000000000000000000000000000000000000000000090043060405182" + + "63ffffffff167c010000000000000000000000000000000000000000000000000000000002815260" + + "0401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffff" + + "ffffffffffffff1681526020019150506000604051808303816000875af192505050151561014c57" + + "600080fd5b5600a165627a7a723058209315a40abb8b23b7c2a340e938b01367b419a23818475a2e" + + "ee80d09da3f7ba780029") + require.NoError(t, err) + + params := engine.CallParams{ + Caller: account1, + Callee: account2, + Input: code, + Gas: &gas, + } + options := Options{ + CallStackMaxDepth: 2, + } + vm := New(options) + // Run the contract initialisation code to obtain the contract code that would be mounted at account2 + contractCode, err := vm.Execute(st, blockchain, eventSink, params, code) + require.NoError(t, err) + + err = native.InitCode(st, account1, contractCode) + require.NoError(t, err) + err = native.InitCode(st, account2, contractCode) + require.NoError(t, err) + + // keccak256 hash of 'callMeBack()' + params.Input, err = hex.DecodeString("692c3b7c") + require.NoError(t, err) + + _, err = vm.Execute(st, blockchain, txe, params, contractCode) + // The TxExecution must be an exception to get the callerror + txe.PushError(err) + require.Error(t, err) + callError := txe.CallError() + require.Error(t, callError) + require.Equal(t, errors.ErrorCodeExecutionReverted, errors.ErrorCode(callError)) + // Errors are post-order so first is deepest + require.True(t, len(callError.NestedErrors) > 0) + deepestErr := callError.NestedErrors[0] + require.Equal(t, errors.ErrorCodeCallStackOverflow, errors.ErrorCode(deepestErr)) + assert.Equal(t, options.CallStackMaxDepth, deepestErr.StackDepth) + assert.Equal(t, account2, deepestErr.Callee) + assert.Equal(t, account1, deepestErr.Caller) + }) + + t.Run("ExtCodeHash", func(t *testing.T) { + st := acmstate.NewMemoryState() + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "101") + + var gas uint64 = 100000 + + // The EXTCODEHASH of the account without code is c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 + // what is the keccack256 hash of empty data. + bytecode := MustSplice(PUSH20, account1, EXTCODEHASH, return1()) + output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + assert.NoError(t, err) + assert.Equal(t, hex.MustDecodeString("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"), output) + + // The EXTCODEHASH of a native account is hash of its name. + bytecode = MustSplice(PUSH1, 0x03, EXTCODEHASH, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + assert.NoError(t, err) + assert.Equal(t, sha3.Sha3([]byte("ripemd160Func")), output) + + // EXTCODEHASH of non-existent account should be 0 + bytecode = MustSplice(PUSH1, 0xff, EXTCODEHASH, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + assert.NoError(t, err) + assert.Equal(t, Zero256[:], output) + + // EXTCODEHASH is the hash of an account code + acc := makeAccountWithCode(t, st, "trustedCode", MustSplice(BLOCKHASH, return1())) + bytecode = MustSplice(PUSH20, acc, EXTCODEHASH, return1()) + output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + assert.NoError(t, err) + assert.Equal(t, hex.MustDecodeString("010da270094b5199d3e54f89afe4c66cdd658dd8111a41998714227e14e171bd"), output) + }) + + // Tests logs and events. + t.Run("TestLogEvents", func(t *testing.T) { + expectedData := []byte{0x10} + expectedHeight := uint64(0) + expectedTopics := []Word256{ + Int64ToWord256(1), + Int64ToWord256(2), + Int64ToWord256(3), + Int64ToWord256(4)} + + st := acmstate.NewMemoryState() + blockchain := new(blockchain) + // Create accounts + address1 := crypto.Address{1, 3, 5, 7, 9} + address2 := crypto.Address{2, 4, 6, 8, 10} + + err := native.CreateAccount(st, address1) + require.NoError(t, err) + err = native.CreateAccount(st, address2) + require.NoError(t, err) + + var gas uint64 = 100000 + + mstore8 := byte(MSTORE8) + push1 := byte(PUSH1) + log4 := byte(LOG4) + stop := byte(STOP) + + code := []byte{ + push1, 16, // data value + push1, 0, // memory slot + mstore8, + push1, 4, // topic 4 + push1, 3, // topic 3 + push1, 2, // topic 2 + push1, 1, // topic 1 + push1, 1, // size of data + push1, 0, // data starts at this offset + log4, + stop, + } + + txe := new(exec.TxExecution) + + params := engine.CallParams{ + Caller: address1, + Callee: address2, + Gas: &gas, + } + _, err = vm.Execute(st, blockchain, txe, params, code) + require.NoError(t, err) + + for _, ev := range txe.Events { + if ev.Log != nil { + if !reflect.DeepEqual(ev.Log.Topics, expectedTopics) { + t.Errorf("Event topics are wrong. Got: %v. Expected: %v", ev.Log.Topics, expectedTopics) + } + if !bytes.Equal(ev.Log.Data, expectedData) { + t.Errorf("Event data is wrong. Got: %s. Expected: %s", ev.Log.Data, expectedData) + } + if ev.Header.Height != expectedHeight { + t.Errorf("Event block height is wrong. Got: %d. Expected: %d", ev.Header.Height, expectedHeight) + } + return + } + } + t.Fatalf("Did not see LogEvent") + }) +} + +type blockchain struct { + blockHeight uint64 + blockTime time.Time +} + +func (b *blockchain) LastBlockHeight() uint64 { + return b.blockHeight +} + +func (b *blockchain) LastBlockTime() time.Time { + return b.blockTime +} + +func (b *blockchain) BlockHash(height uint64) ([]byte, error) { + if height > b.blockHeight { + return nil, errors.ErrorCodeInvalidBlockNumber + } + bs := make([]byte, 32) + binary.BigEndian.PutUint64(bs[24:], height) + return bs, nil +} + +// helpers + +func newAccount(t testing.TB, st acmstate.ReaderWriter, name string) crypto.Address { + address := native.AddressFromName(name) + err := native.CreateAccount(st, address) + require.NoError(t, err) + return address +} + +func makeAccountWithCode(t testing.TB, st acmstate.ReaderWriter, name string, code []byte) crypto.Address { + address := native.AddressFromName(name) + err := native.CreateAccount(st, address) + require.NoError(t, err) + err = native.InitCode(st, address, code) + require.NoError(t, err) + addToBalance(t, st, address, 9999999) + return address +} + +func addToBalance(t testing.TB, st acmstate.ReaderWriter, address crypto.Address, amount uint64) { + err := native.UpdateAccount(st, address, func(account *acm.Account) error { + return account.AddToBalance(amount) + }) + require.NoError(t, err) +} + +func call(vm *EVM, st acmstate.ReaderWriter, origin, callee crypto.Address, code []byte, input []byte, + gas *uint64) ([]byte, error) { + return vm.Execute(st, new(blockchain), exec.NewNoopEventSink(), engine.CallParams{ + Caller: origin, + Callee: callee, + Input: input, + Gas: gas, + }, code) +} + +// These code segment helpers exercise the MSTORE MLOAD MSTORE cycle to test +// both of the memory operations. Each MSTORE is done on the memory boundary +// (at MSIZE) which Solidity uses to find guaranteed unallocated memory. + +// storeAtEnd expects the value to be stored to be on top of the stack, it then +// stores that value at the current memory boundary +func storeAtEnd() []byte { + // Pull in MSIZE (to carry forward to MLOAD), swap in value to store, store it at MSIZE + return MustSplice(MSIZE, SWAP1, DUP2, MSTORE) +} + +func returnAfterStore() []byte { + return MustSplice(PUSH1, 32, DUP2, RETURN) +} + +// Store the top element of the stack (which is a 32-byte word) in memory +// and return it. Useful for a simple return value. +func return1() []byte { + return MustSplice(PUSH1, 0, MSTORE, returnWord()) +} + +func returnWord() []byte { + // PUSH1 => return size, PUSH1 => return offset, RETURN + return MustSplice(PUSH1, 32, PUSH1, 0, RETURN) +} + +// Subscribes to an AccCall, runs the vm, returns the output any direct exception +// and then waits for any exceptions transmitted by Data in the AccCall +// event (in the case of no direct error from call we will block waiting for +// at least 1 AccCall event) +func runVM(st acmstate.ReaderWriter, caller, callee crypto.Address, code []byte, gas uint64) *exec.TxExecution { + gasBefore := gas + txe := new(exec.TxExecution) + vm := New(Options{ + DebugOpcodes: true, + }) + params := engine.CallParams{ + Caller: caller, + Callee: callee, + Gas: &gas, + } + output, err := vm.Execute(st, new(blockchain), txe, params, code) + txe.PushError(err) + for _, ev := range txe.ExceptionalCalls() { + txe.PushError(ev.Header.Exception) + } + txe.Return(output, gasBefore-gas) + return txe +} + +// this is code to call another contract (hardcoded as addr) +func callContractCode(addr crypto.Address) []byte { + gas1, gas2 := byte(0x1), byte(0x1) + value := byte(0x69) + inOff, inSize := byte(0x0), byte(0x0) // no call data + retOff, retSize := byte(0x0), byte(0x20) + // this is the code we want to run (send funds to an account and return) + return MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, + inOff, PUSH1, value, PUSH20, addr, PUSH2, gas1, gas2, CALL, PUSH1, retSize, + PUSH1, retOff, RETURN) +} + +// Produce bytecode for a PUSH, b_1, ..., b_N where the N is number of bytes +// contained in the unpadded word +func pushWord(word Word256) []byte { + leadingZeros := byte(0) + for leadingZeros < 32 { + if word[leadingZeros] == 0 { + leadingZeros++ + } else { + return MustSplice(byte(PUSH32)-leadingZeros, word[leadingZeros:]) + } + } + return MustSplice(PUSH1, 0) +} diff --git a/execution/evm/fake_app_state.go b/execution/evm/fake_app_state.go deleted file mode 100644 index e12558e67..000000000 --- a/execution/evm/fake_app_state.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2017 Monax Industries Limited -// -// 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 evm - -import ( - "fmt" - - "bytes" - - "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/acm/acmstate" - . "github.com/hyperledger/burrow/binary" - "github.com/hyperledger/burrow/crypto" -) - -type FakeAppState struct { - accounts map[crypto.Address]*acm.Account - storage map[string][]byte - metadata map[acmstate.MetadataHash]string -} - -var _ acmstate.ReaderWriter = &FakeAppState{} - -func (fas *FakeAppState) GetAccount(addr crypto.Address) (*acm.Account, error) { - account := fas.accounts[addr] - return account, nil -} - -func (fas *FakeAppState) GetMetadata(metahash acmstate.MetadataHash) (string, error) { - return fas.metadata[metahash], nil -} - -func (fas *FakeAppState) SetMetadata(metahash acmstate.MetadataHash, metadata string) error { - fas.metadata[metahash] = metadata - return nil -} - -func (fas *FakeAppState) UpdateAccount(account *acm.Account) error { - fas.accounts[account.GetAddress()] = account - return nil -} - -func (fas *FakeAppState) RemoveAccount(address crypto.Address) error { - _, ok := fas.accounts[address] - if !ok { - panic(fmt.Sprintf("Invalid account addr: %s", address)) - } else { - // Remove account - delete(fas.accounts, address) - } - return nil -} - -func (fas *FakeAppState) GetStorage(addr crypto.Address, key Word256) ([]byte, error) { - _, ok := fas.accounts[addr] - if !ok { - panic(fmt.Sprintf("Invalid account addr: %s", addr)) - } - - value, ok := fas.storage[addr.String()+key.String()] - if ok { - return value, nil - } else { - return []byte{}, nil - } -} - -func (fas *FakeAppState) SetStorage(addr crypto.Address, key Word256, value []byte) error { - _, ok := fas.accounts[addr] - if !ok { - - fmt.Println("\n\n", fas.accountsDump()) - panic(fmt.Sprintf("Invalid account addr: %s", addr)) - } - - fas.storage[addr.String()+key.String()] = value - return nil -} - -func (fas *FakeAppState) accountsDump() string { - buf := new(bytes.Buffer) - fmt.Fprint(buf, "Dumping accounts...", "\n") - for _, acc := range fas.accounts { - fmt.Fprint(buf, acc.GetAddress().String(), "\n") - } - return buf.String() -} diff --git a/execution/evm/log_event_test.go b/execution/evm/log_event_test.go deleted file mode 100644 index e7d567012..000000000 --- a/execution/evm/log_event_test.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2017 Monax Industries Limited -// -// 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 evm - -import ( - "testing" - - "bytes" - "reflect" - - "github.com/hyperledger/burrow/acm" - . "github.com/hyperledger/burrow/binary" - "github.com/hyperledger/burrow/crypto" - . "github.com/hyperledger/burrow/execution/evm/asm" - "github.com/hyperledger/burrow/execution/exec" - "github.com/stretchr/testify/require" -) - -var expectedData = []byte{0x10} -var expectedHeight uint64 = 0 -var expectedTopics = []Word256{ - Int64ToWord256(1), - Int64ToWord256(2), - Int64ToWord256(3), - Int64ToWord256(4)} - -// Tests logs and events. -func TestLog4(t *testing.T) { - st := newAppState() - cache := NewState(st, blockHashGetter) - // Create accounts - account1 := &acm.Account{ - Address: crypto.Address{1, 3, 5, 7, 9}, - } - account2 := &acm.Account{ - Address: crypto.Address{2, 4, 6, 8, 10}, - } - st.accounts[account1.Address] = account1 - st.accounts[account2.Address] = account2 - - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - txe := new(exec.TxExecution) - - var gas uint64 = 100000 - - mstore8 := byte(MSTORE8) - push1 := byte(PUSH1) - log4 := byte(LOG4) - stop := byte(STOP) - - code := []byte{ - push1, 16, // data value - push1, 0, // memory slot - mstore8, - push1, 4, // topic 4 - push1, 3, // topic 3 - push1, 2, // topic 2 - push1, 1, // topic 1 - push1, 1, // size of data - push1, 0, // data starts at this offset - log4, - stop, - } - - _, err := ourVm.Call(cache, txe, account1.Address, account2.Address, code, []byte{}, 0, &gas) - require.NoError(t, err) - - for _, ev := range txe.Events { - if ev.Log != nil { - if !reflect.DeepEqual(ev.Log.Topics, expectedTopics) { - t.Errorf("Event topics are wrong. Got: %v. Expected: %v", ev.Log.Topics, expectedTopics) - } - if !bytes.Equal(ev.Log.Data, expectedData) { - t.Errorf("Event data is wrong. Got: %s. Expected: %s", ev.Log.Data, expectedData) - } - if ev.Header.Height != expectedHeight { - t.Errorf("Event block height is wrong. Got: %d. Expected: %d", ev.Header.Height, expectedHeight) - } - return - } - } - t.Fatalf("Did not see LogEvent") -} diff --git a/execution/evm/memory.go b/execution/evm/memory.go index 01476ca41..07a185ca5 100644 --- a/execution/evm/memory.go +++ b/execution/evm/memory.go @@ -17,7 +17,7 @@ const ( // written to the backing slice at a time when it is grown. A larger number may // lead to fewer calls to append to achieve the desired capacity although it is // unlikely to make a lot of difference. -var zeroBlock []byte = make([]byte, 32) +var zeroBlock = make([]byte, 32) // Interface for a bounded linear memory indexed by a single *big.Int parameter // for each byte in the memory. diff --git a/execution/evm/memory_test.go b/execution/evm/memory_test.go index d51076998..b88bf7388 100644 --- a/execution/evm/memory_test.go +++ b/execution/evm/memory_test.go @@ -13,51 +13,51 @@ import ( // Test static memory allocation with maximum == initial capacity - memory should not grow func TestDynamicMemory_StaticAllocation(t *testing.T) { - err := errors.FirstOnly() - mem := NewDynamicMemory(4, 4, err).(*dynamicMemory) + maybe := new(errors.Maybe) + mem := NewDynamicMemory(4, 4, maybe).(*dynamicMemory) mem.Write(big.NewInt(0), []byte{1}) mem.Write(big.NewInt(1), []byte{0, 0, 1}) assert.Equal(t, []byte{1, 0, 0, 1}, mem.slice) assert.Equal(t, 4, cap(mem.slice), "Slice capacity should not grow") - require.NoError(t, err.Error()) + require.NoError(t, maybe.Error()) } // Test reading beyond the current capacity - memory should grow func TestDynamicMemory_ReadAhead(t *testing.T) { - err := errors.FirstOnly() - mem := NewDynamicMemory(4, 8, err).(*dynamicMemory) + maybe := new(errors.Maybe) + mem := NewDynamicMemory(4, 8, maybe).(*dynamicMemory) value := mem.Read(big.NewInt(2), big.NewInt(4)) - require.NoError(t, err.Error()) + require.NoError(t, maybe.Error()) // Value should be size requested assert.Equal(t, []byte{0, 0, 0, 0}, value) // Slice should have grown to that plus offset assert.Equal(t, []byte{0, 0, 0, 0, 0, 0}, mem.slice) - err.Reset() + *maybe = errors.Maybe{} value = mem.Read(big.NewInt(2), big.NewInt(6)) - require.NoError(t, err.Error()) + require.NoError(t, maybe.Error()) assert.Equal(t, []byte{0, 0, 0, 0, 0, 0}, value) assert.Equal(t, []byte{0, 0, 0, 0, 0, 0, 0, 0}, mem.slice) // Check cannot read out of bounds mem.Read(big.NewInt(2), big.NewInt(7)) - assert.Error(t, err.Error()) + assert.Error(t, maybe.Error()) } // Test writing beyond the current capacity - memory should grow func TestDynamicMemory_WriteAhead(t *testing.T) { - err := errors.FirstOnly() - mem := NewDynamicMemory(4, 8, err).(*dynamicMemory) + maybe := new(errors.Maybe) + mem := NewDynamicMemory(4, 8, maybe).(*dynamicMemory) mem.Write(big.NewInt(4), []byte{1, 2, 3, 4}) - require.NoError(t, err.Error()) + require.NoError(t, maybe.Error()) assert.Equal(t, []byte{0, 0, 0, 0, 1, 2, 3, 4}, mem.slice) mem.Write(big.NewInt(4), []byte{1, 2, 3, 4, 5}) - assert.Error(t, err.Error()) + assert.Error(t, maybe.Error()) } func TestDynamicMemory_WriteRead(t *testing.T) { - err := errors.FirstOnly() + err := new(errors.Maybe) mem := NewDynamicMemory(1, 0x10000000, err).(*dynamicMemory) // Text is out of copyright bytesToWrite := []byte(`He paused. He felt the rhythm of the verse about him in the room. @@ -80,7 +80,7 @@ example. If he could get back again into that mood....`) } func TestDynamicMemory_ZeroInitialMemory(t *testing.T) { - err := errors.FirstOnly() + err := new(errors.Maybe) mem := NewDynamicMemory(0, 16, err).(*dynamicMemory) mem.Write(big.NewInt(4), []byte{1, 2, 3, 4}) require.NoError(t, err.Error()) @@ -88,29 +88,29 @@ func TestDynamicMemory_ZeroInitialMemory(t *testing.T) { } func TestDynamicMemory_Capacity(t *testing.T) { - err := errors.FirstOnly() - mem := NewDynamicMemory(1, 0x10000000, err).(*dynamicMemory) + maybe := new(errors.Maybe) + mem := NewDynamicMemory(1, 0x10000000, maybe).(*dynamicMemory) assert.Equal(t, big.NewInt(1), mem.Capacity()) capacity := big.NewInt(1234) - mem.ensureCapacity(capacity.Uint64()) - require.NoError(t, err.Error()) + maybe.PushError(mem.ensureCapacity(capacity.Uint64())) + require.NoError(t, maybe.Error()) assert.Equal(t, capacity, mem.Capacity()) capacity = big.NewInt(123456789) - mem.ensureCapacity(capacity.Uint64()) - require.NoError(t, err.Error()) + maybe.PushError(mem.ensureCapacity(capacity.Uint64())) + require.NoError(t, maybe.Error()) assert.Equal(t, capacity, mem.Capacity()) // Check doesn't shrink or err - mem.ensureCapacity(12) - require.NoError(t, err.Error()) + maybe.PushError(mem.ensureCapacity(12)) + require.NoError(t, maybe.Error()) assert.Equal(t, capacity, mem.Capacity()) } func TestDynamicMemory_ensureCapacity(t *testing.T) { - mem := NewDynamicMemory(4, 16, errors.FirstOnly()).(*dynamicMemory) + mem := NewDynamicMemory(4, 16, new(errors.Maybe)).(*dynamicMemory) // Check we can grow within bounds err := mem.ensureCapacity(8) require.NoError(t, err) diff --git a/execution/evm/native.go b/execution/evm/native.go deleted file mode 100644 index 9c2382140..000000000 --- a/execution/evm/native.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2017 Monax Industries Limited -// -// 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 evm - -import ( - "crypto/sha256" - - . "github.com/hyperledger/burrow/binary" - "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/logging" - "golang.org/x/crypto/ripemd160" -) - -var registeredNativeContracts = make(map[crypto.Address]NativeContract) - -func IsRegisteredNativeContract(address crypto.Address) bool { - _, ok := registeredNativeContracts[address] - return ok -} - -func RegisterNativeContract(address crypto.Address, fn NativeContract) bool { - _, exists := registeredNativeContracts[address] - if exists { - return false - } - registeredNativeContracts[address] = fn - return true -} - -func init() { - registerNativeContracts() - registerSNativeContracts() -} - -func registerNativeContracts() { - // registeredNativeContracts[Int64ToWord256(1)] = ecrecoverFunc - registeredNativeContracts[crypto.Address{2}] = sha256Func - registeredNativeContracts[crypto.Address{3}] = ripemd160Func - registeredNativeContracts[crypto.Address{4}] = identityFunc -} - -//----------------------------------------------------------------------------- - -func ExecuteNativeContract(address crypto.Address, st Interface, caller crypto.Address, input []byte, gas *uint64, - logger *logging.Logger) ([]byte, errors.CodedError) { - - contract, ok := registeredNativeContracts[address] - if !ok { - return nil, errors.ErrorCodef(errors.ErrorCodeNativeFunction, - "no native contract registered at address: %v", address) - } - output, err := contract(st, caller, input, gas, logger) - if err != nil { - return nil, errors.NewException(errors.ErrorCodeNativeFunction, err.Error()) - } - return output, nil -} - -type NativeContract func(state Interface, caller crypto.Address, input []byte, gas *uint64, - logger *logging.Logger) (output []byte, err error) - -/* Removed due to C dependency -func ecrecoverFunc(state State, caller crypto.Address, input []byte, gas *int64) (output []byte, err error) { - // Deduct gas - gasRequired := GasEcRecover - if *gas < gasRequired { - return nil, ErrInsufficientGas - } else { - *gas -= gasRequired - } - // Recover - hash := input[:32] - v := byte(input[32] - 27) // ignore input[33:64], v is small. - sig := append(input[64:], v) - - recovered, err := secp256k1.RecoverPubkey(hash, sig) - if err != nil { - return nil, err -OH NO STOCASTIC CAT CODING!!!! - } - hashed := sha3.Sha3(recovered[1:]) - return LeftPadBytes(hashed, 32), nil -} -*/ - -func sha256Func(state Interface, caller crypto.Address, input []byte, gas *uint64, - logger *logging.Logger) (output []byte, err error) { - // Deduct gas - gasRequired := uint64((len(input)+31)/32)*GasSha256Word + GasSha256Base - if *gas < gasRequired { - return nil, errors.ErrorCodeInsufficientGas - } else { - *gas -= gasRequired - } - // Hash - hasher := sha256.New() - // CONTRACT: this does not err - hasher.Write(input) - return hasher.Sum(nil), nil -} - -func ripemd160Func(state Interface, caller crypto.Address, input []byte, gas *uint64, - logger *logging.Logger) (output []byte, err error) { - // Deduct gas - gasRequired := uint64((len(input)+31)/32)*GasRipemd160Word + GasRipemd160Base - if *gas < gasRequired { - return nil, errors.ErrorCodeInsufficientGas - } else { - *gas -= gasRequired - } - // Hash - hasher := ripemd160.New() - // CONTRACT: this does not err - hasher.Write(input) - return LeftPadBytes(hasher.Sum(nil), 32), nil -} - -func identityFunc(state Interface, caller crypto.Address, input []byte, gas *uint64, - logger *logging.Logger) (output []byte, err error) { - // Deduct gas - gasRequired := uint64((len(input)+31)/32)*GasIdentityWord + GasIdentityBase - if *gas < gasRequired { - return nil, errors.ErrorCodeInsufficientGas - } else { - *gas -= gasRequired - } - // Return identity - return input, nil -} diff --git a/execution/evm/options.go b/execution/evm/options.go deleted file mode 100644 index 19f127b29..000000000 --- a/execution/evm/options.go +++ /dev/null @@ -1,25 +0,0 @@ -package evm - -import "github.com/hyperledger/burrow/execution/errors" - -func MemoryProvider(memoryProvider func(errors.Sink) Memory) func(*VM) { - return func(vm *VM) { - vm.memoryProvider = memoryProvider - } -} - -func DebugOpcodes(vm *VM) { - vm.debugOpcodes = true -} - -func DumpTokens(vm *VM) { - vm.dumpTokens = true -} - -func StackOptions(callStackMaxDepth uint64, dataStackInitialCapacity uint64, dataStackMaxDepth uint64) func(*VM) { - return func(vm *VM) { - vm.params.CallStackMaxDepth = callStackMaxDepth - vm.params.DataStackInitialCapacity = dataStackInitialCapacity - vm.params.DataStackMaxDepth = dataStackMaxDepth - } -} diff --git a/execution/evm/snative.go b/execution/evm/snative.go deleted file mode 100644 index 0995b2733..000000000 --- a/execution/evm/snative.go +++ /dev/null @@ -1,517 +0,0 @@ -// Copyright 2017 Monax Industries Limited -// -// 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 evm - -import ( - "fmt" - "reflect" - "runtime" - - "strings" - - "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" - "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/execution/evm/abi" - "github.com/hyperledger/burrow/logging" - "github.com/hyperledger/burrow/logging/structure" - "github.com/hyperledger/burrow/permission" -) - -// -// SNative (from 'secure natives') are native (go) contracts that are dispatched -// based on account permissions and can access and modify an account's permissions -// - -// Instructions on adding an SNative function. First declare a function like so: -// -// func unsetBase(context SNativeContext, args unsetBaseArgs) (unsetBaseRets, error) { -// } -// -// The name of the function will be used as the name of the function in solidity. The -// first arguments is SNativeContext; this will give you access to state, and the logger -// etc. The second arguments must be a struct type. The members of this struct must be -// exported (start with uppercase letter), and they will be converted into arguments -// for the solidity function, with the same types. The first return value is a struct -// which defines the return values from solidity just like the arguments. -// -// The second return value must be error. If non-nil is returned for error, then -// the current transaction will be aborted and the execution will stop. -// -// For each contract you will need to create a SNativeContractDescription{} struct, -// with the function listed. Only the PermFlag and the function F needs to be filled -// in for each SNativeFunctionDescription. Add this to the SNativeContracts() function. - -// SNativeContext is the first argument to any snative function. This struct carries -// all the context an snative needs to access e.g. state in burrow. -type SNativeContext struct { - State Interface - Caller crypto.Address - Gas *uint64 - Logger *logging.Logger -} - -// SNativeContractDescription is metadata for SNative contract. Acts as a call target -// from the EVM. Can be used to generate bindings in a smart contract languages. -type SNativeContractDescription struct { - // Comment describing purpose of SNative contract and reason for assembling - // the particular functions - Comment string - // Name of the SNative contract - Name string - functionsByID map[abi.FunctionID]*SNativeFunctionDescription - functions []*SNativeFunctionDescription -} - -// SNativeFunctionDescription is metadata for SNative functions. Act as call targets -// for the EVM when collected into an SNativeContractDescription. Can be used to generate -// bindings in a smart contract languages. -type SNativeFunctionDescription struct { - // Comment describing function's purpose, parameters, and return value - Comment string - // Permissions required to call function - PermFlag permission.PermFlag - // Native function to which calls will be dispatched when a containing - F interface{} - - // Following fields are for only for memoization - - // Function name (used to form signature) - name string - // The abi - abi abi.FunctionSpec -} - -func registerSNativeContracts() { - for _, contract := range SNativeContracts() { - if !RegisterNativeContract(contract.Address(), contract.Dispatch) { - panic(fmt.Errorf("could not register SNative contract %s because address %s already registered", - contract.Address(), contract.Name)) - } - } -} - -// SNativeContracts returns a map of all SNative contracts defined indexed by name -func SNativeContracts() map[string]*SNativeContractDescription { - contracts := []*SNativeContractDescription{ - NewSNativeContract(` - * Interface for managing Secure Native authorizations. - * @dev This interface describes the functions exposed by the SNative permissions layer in burrow. - `, - "Permissions", - &SNativeFunctionDescription{Comment: ` - * @notice Adds a role to an account - * @param Account account address - * @param Role role name - * @return result whether role was added - `, - PermFlag: permission.AddRole, - F: addRole}, - - &SNativeFunctionDescription{Comment: ` - * @notice Removes a role from an account - * @param Account account address - * @param Role role name - * @return result whether role was removed - `, - PermFlag: permission.RemoveRole, - F: removeRole}, - - &SNativeFunctionDescription{Comment: ` - * @notice Indicates whether an account has a role - * @param Account account address - * @param Role role name - * @return result whether account has role - `, - PermFlag: permission.HasRole, - F: hasRole}, - - &SNativeFunctionDescription{Comment: ` - * @notice Sets the permission flags for an account. Makes them explicitly set (on or off). - * @param Account account address - * @param Permission the base permissions flags to set for the account - * @param Set whether to set or unset the permissions flags at the account level - * @return The permission flag that was set as uint64 - `, - PermFlag: permission.SetBase, - F: setBase}, - - &SNativeFunctionDescription{Comment: ` - * @notice Unsets the permissions flags for an account. Causes permissions being unset to fall through to global permissions. - * @param Account account address - * @param Permission the permissions flags to unset for the account - * @return The permission flag that was unset as uint64 - `, - PermFlag: permission.UnsetBase, - F: unsetBase}, - - &SNativeFunctionDescription{Comment: ` - * @notice Indicates whether an account has a subset of permissions set - * @param Account account address - * @param Permission the permissions flags (mask) to check whether enabled against base permissions for the account - * @return result whether account has the passed permissions flags set - `, - PermFlag: permission.HasBase, - F: hasBase}, - - &SNativeFunctionDescription{Comment: ` - * @notice Sets the global (default) permissions flags for the entire chain - * @param Permission the permissions flags to set - * @param Set whether to set (or unset) the permissions flags - * @return The permission flag that was set as uint64 - `, - PermFlag: permission.SetGlobal, - F: setGlobal}, - ), - } - - contractMap := make(map[string]*SNativeContractDescription, len(contracts)) - for _, contract := range contracts { - if _, ok := contractMap[contract.Name]; ok { - // If this happens we have a pseudo compile time error that will be caught - // on native.go init() - panic(fmt.Errorf("duplicate contract with name %s defined. "+ - "Contract names must be unique", contract.Name)) - } - contractMap[contract.Name] = contract - } - return contractMap -} - -// Create a new SNative contract description object by passing a comment, name -// and a list of member functions descriptions -func NewSNativeContract(comment, name string, - functions ...*SNativeFunctionDescription) *SNativeContractDescription { - - functionsByID := make(map[abi.FunctionID]*SNativeFunctionDescription, len(functions)) - for _, f := range functions { - // Get name of function - t := reflect.TypeOf(f.F) - v := reflect.ValueOf(f.F) - // v.String() for functions returns the empty string - fullyqualifiedname := runtime.FuncForPC(v.Pointer()).Name() - a := strings.Split(fullyqualifiedname, ".") - f.name = a[len(a)-1] - - if t.NumIn() != 2 { - panic(fmt.Sprintf("%s must have two arguments", fullyqualifiedname)) - } - - if t.NumOut() != 2 { - panic(fmt.Sprintf("%s must have two return values", fullyqualifiedname)) - } - - if t.In(0) != reflect.TypeOf(SNativeContext{}) { - panic(fmt.Sprintf("first agument of %s must be struct SNativeContext", fullyqualifiedname)) - } - - f.abi = *abi.SpecFromStructReflect(f.name, t.In(1), t.Out(0)) - fid := f.abi.FunctionID - otherF, ok := functionsByID[fid] - if ok { - panic(fmt.Errorf("function with ID %x already defined: %s", fid, otherF.Signature())) - } - functionsByID[fid] = f - } - return &SNativeContractDescription{ - Comment: comment, - Name: name, - functionsByID: functionsByID, - functions: functions, - } -} - -// Dispatch is designed to be called from the EVM once a SNative contract -// has been selected. It is also placed in a registry by registerSNativeContracts -// So it can be looked up by SNative address -func (contract *SNativeContractDescription) Dispatch(st Interface, caller crypto.Address, - args []byte, gas *uint64, logger *logging.Logger) (output []byte, err error) { - - logger = logger.With(structure.ScopeKey, "Dispatch", "contract_name", contract.Name) - - if len(args) < abi.FunctionIDSize { - return nil, errors.ErrorCodef(errors.ErrorCodeNativeFunction, - "SNatives dispatch requires a 4-byte function identifier but arguments are only %v bytes long", - len(args)) - } - - var id abi.FunctionID - copy(id[:], args) - function, err := contract.FunctionByID(id) - if err != nil { - return nil, err - } - - logger.TraceMsg("Dispatching to function", - "caller", caller, - "function_name", function.name) - - remainingArgs := args[abi.FunctionIDSize:] - - // check if we have permission to call this function - if !HasPermission(st, caller, function.PermFlag) { - return nil, errors.LacksSNativePermission{Address: caller, SNative: function.name} - } - - arguments := reflect.New(reflect.TypeOf(function.F).In(1)) - err = abi.Unpack(function.abi.Inputs, remainingArgs, arguments.Interface()) - if err != nil { - return nil, err - } - - ctx := SNativeContext{ - State: st, - Caller: caller, - Gas: gas, - Logger: logger, - } - - fn := reflect.ValueOf(function.F) - rets := fn.Call([]reflect.Value{reflect.ValueOf(ctx), arguments.Elem()}) - if !rets[1].IsNil() { - return nil, rets[1].Interface().(error) - } - err = st.Error() - if err != nil { - return nil, fmt.Errorf("state error in %v: %v", function, err) - } - - return abi.Pack(function.abi.Outputs, rets[0].Interface()) -} - -// We define the address of an SNative contact as the last 20 bytes of the sha3 -// hash of its name -func (contract *SNativeContractDescription) Address() (address crypto.Address) { - hash := sha3.Sha3([]byte(contract.Name)) - copy(address[:], hash[len(hash)-crypto.AddressLength:]) - return -} - -// Get function by calling identifier FunctionSelector -func (contract *SNativeContractDescription) FunctionByID(id abi.FunctionID) (*SNativeFunctionDescription, errors.CodedError) { - f, ok := contract.functionsByID[id] - if !ok { - return nil, - errors.ErrorCodef(errors.ErrorCodeNativeFunction, "unknown SNative function with ID %x", id) - } - return f, nil -} - -// Get function by name -func (contract *SNativeContractDescription) FunctionByName(name string) (*SNativeFunctionDescription, error) { - for _, f := range contract.functions { - if f.name == name { - return f, nil - } - } - return nil, fmt.Errorf("unknown SNative function with name %s", name) -} - -// Get functions in order of declaration -func (contract *SNativeContractDescription) Functions() []*SNativeFunctionDescription { - functions := make([]*SNativeFunctionDescription, len(contract.functions)) - copy(functions, contract.functions) - return functions -} - -// -// SNative functions -// - -// Signature returns the function signature as would be used for ABI hashing -func (function *SNativeFunctionDescription) Signature() string { - argTypeNames := make([]string, len(function.abi.Inputs)) - for i, arg := range function.abi.Inputs { - argTypeNames[i] = arg.EVM.GetSignature() - } - return fmt.Sprintf("%s(%s)", function.name, - strings.Join(argTypeNames, ",")) -} - -// NArgs returns the number of function arguments -func (function *SNativeFunctionDescription) NArgs() int { - return len(function.abi.Inputs) -} - -// Name returns the name for this function -func (function *SNativeFunctionDescription) Name() string { - return function.name -} - -// Abi returns the FunctionSpec for this function -func (function *SNativeFunctionDescription) Abi() abi.FunctionSpec { - return function.abi -} - -func (fn *SNativeFunctionDescription) String() string { - return fmt.Sprintf("SNativeFunction{Name: %s; Inputs: %d; Outputs: %d}", - fn.name, len(fn.abi.Inputs), len(fn.abi.Outputs)) -} - -// Permission function defintions - -// TODO: catch errors, log em, return 0s to the vm (should some errors cause exceptions though?) -type hasBaseArgs struct { - Account crypto.Address - Permission uint64 -} - -type hasBaseRets struct { - Result bool -} - -func hasBase(context SNativeContext, args hasBaseArgs) (hasBaseRets, error) { - if !context.State.Exists(args.Account) { - return hasBaseRets{}, fmt.Errorf("unknown account %s", args.Account) - } - permN := permission.PermFlag(args.Permission) // already shifted - if !permN.IsValid() { - return hasBaseRets{}, permission.ErrInvalidPermission(permN) - } - hasPermission := HasPermission(context.State, args.Account, permN) - context.Logger.Trace.Log("function", "hasBase", - "address", args.Account.String(), - "perm_flag", fmt.Sprintf("%b", permN), - "has_permission", hasPermission) - return hasBaseRets{Result: hasPermission}, nil -} - -type setBaseArgs struct { - Account crypto.Address - Permission uint64 - Set bool -} - -type setBaseRets struct { - Result uint64 -} - -func setBase(context SNativeContext, args setBaseArgs) (setBaseRets, error) { - exists := context.State.Exists(args.Account) - if !exists { - return setBaseRets{}, fmt.Errorf("unknown account %s", args.Account) - } - permN := permission.PermFlag(args.Permission) - if !permN.IsValid() { - return setBaseRets{}, permission.ErrInvalidPermission(permN) - } - context.State.SetPermission(args.Account, permN, args.Set) - context.Logger.Trace.Log("function", "setBase", "address", args.Account.String(), - "permission_flag", fmt.Sprintf("%b", permN), - "permission_value", args.Permission) - return setBaseRets{Result: uint64(permN)}, nil -} - -type unsetBaseArgs struct { - Account crypto.Address - Permission uint64 -} - -type unsetBaseRets struct { - Result uint64 -} - -func unsetBase(context SNativeContext, args unsetBaseArgs) (unsetBaseRets, error) { - if !context.State.Exists(args.Account) { - return unsetBaseRets{}, fmt.Errorf("unknown account %s", args.Account) - } - permN := permission.PermFlag(args.Permission) - if !permN.IsValid() { - return unsetBaseRets{}, permission.ErrInvalidPermission(permN) - } - context.State.UnsetPermission(args.Account, permN) - context.Logger.Trace.Log("function", "unsetBase", "address", args.Account.String(), - "perm_flag", fmt.Sprintf("%b", permN), - "permission_flag", fmt.Sprintf("%b", permN)) - - return unsetBaseRets{Result: uint64(permN)}, nil -} - -type setGlobalArgs struct { - Permission uint64 - Set bool -} - -type setGlobalRets struct { - Result uint64 -} - -func setGlobal(context SNativeContext, args setGlobalArgs) (setGlobalRets, error) { - permN := permission.PermFlag(args.Permission) - if !permN.IsValid() { - return setGlobalRets{}, permission.ErrInvalidPermission(permN) - } - context.State.SetPermission(acm.GlobalPermissionsAddress, permN, args.Set) - context.Logger.Trace.Log("function", "setGlobal", - "permission_flag", fmt.Sprintf("%b", permN), - "permission_value", args.Set) - return setGlobalRets{Result: uint64(permN)}, nil -} - -type hasRoleArgs struct { - Account crypto.Address - Role string -} - -type hasRoleRets struct { - Result bool -} - -func hasRole(context SNativeContext, args hasRoleArgs) (hasRoleRets, error) { - perms := context.State.GetPermissions(args.Account) - if err := context.State.Error(); err != nil { - return hasRoleRets{}, fmt.Errorf("hasRole could not get permissions: %v", err) - } - hasRole := perms.HasRole(args.Role) - context.Logger.Trace.Log("function", "hasRole", "address", args.Account.String(), - "role", args.Role, - "has_role", hasRole) - return hasRoleRets{Result: hasRole}, nil -} - -type addRoleArgs struct { - Account crypto.Address - Role string -} - -type addRoleRets struct { - Result bool -} - -func addRole(context SNativeContext, args addRoleArgs) (addRoleRets, error) { - roleAdded := context.State.AddRole(args.Account, args.Role) - context.Logger.Trace.Log("function", "addRole", "address", args.Account.String(), - "role", args.Role, - "role_added", roleAdded) - return addRoleRets{Result: roleAdded}, nil -} - -type removeRoleArgs struct { - Account crypto.Address - Role string -} - -type removeRoleRets struct { - Result bool -} - -func removeRole(context SNativeContext, args removeRoleArgs) (removeRoleRets, error) { - roleRemoved := context.State.RemoveRole(args.Account, args.Role) - context.Logger.Trace.Log("function", "removeRole", "address", args.Account.String(), - "role", args.Role, - "role_removed", roleRemoved) - return removeRoleRets{Result: roleRemoved}, nil -} diff --git a/execution/evm/stack.go b/execution/evm/stack.go index 188043b84..32aa03fce 100644 --- a/execution/evm/stack.go +++ b/execution/evm/stack.go @@ -22,6 +22,7 @@ import ( . "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/native" ) // Not goroutine safe @@ -34,7 +35,7 @@ type Stack struct { errSink errors.Sink } -func NewStack(initialCapacity uint64, maxCapacity uint64, gas *uint64, errSink errors.Sink) *Stack { +func NewStack(errSink errors.Sink, initialCapacity uint64, maxCapacity uint64, gas *uint64) *Stack { return &Stack{ slice: make([]Word256, initialCapacity), ptr: 0, @@ -57,7 +58,7 @@ func (st *Stack) pushErr(err errors.CodedError) { } func (st *Stack) Push(d Word256) { - st.useGas(GasStackOp) + st.useGas(native.GasStackOp) err := st.ensureCapacity(uint64(st.ptr) + 1) if err != nil { st.pushErr(errors.ErrorCodeDataStackOverflow) @@ -97,7 +98,7 @@ func (st *Stack) PushBigInt(bigInt *big.Int) Word256 { // Pops func (st *Stack) Pop() Word256 { - st.useGas(GasStackOp) + st.useGas(native.GasStackOp) if st.ptr == 0 { st.pushErr(errors.ErrorCodeDataStackUnderflow) return Zero256 @@ -146,7 +147,7 @@ func (st *Stack) Len() int { } func (st *Stack) Swap(n int) { - st.useGas(GasStackOp) + st.useGas(native.GasStackOp) if st.ptr < n { st.pushErr(errors.ErrorCodeDataStackUnderflow) return @@ -155,7 +156,7 @@ func (st *Stack) Swap(n int) { } func (st *Stack) Dup(n int) { - st.useGas(GasStackOp) + st.useGas(native.GasStackOp) if st.ptr < n { st.pushErr(errors.ErrorCodeDataStackUnderflow) return diff --git a/execution/evm/stack_test.go b/execution/evm/stack_test.go index cc91ef30e..7ed585996 100644 --- a/execution/evm/stack_test.go +++ b/execution/evm/stack_test.go @@ -4,16 +4,15 @@ import ( "math" "testing" - "github.com/stretchr/testify/require" - "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/execution/errors" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestStack_MaxDepthInt32(t *testing.T) { var gaz uint64 = math.MaxUint64 - st := NewStack(0, 0, &gaz, errors.FirstOnly()) + st := NewStack(new(errors.Maybe), 0, 0, &gaz) err := st.ensureCapacity(math.MaxInt32 + 1) assert.Error(t, err) @@ -21,9 +20,9 @@ func TestStack_MaxDepthInt32(t *testing.T) { // Test static memory allocation with unlimited depth - memory should grow func TestStack_UnlimitedAllocation(t *testing.T) { - err := errors.FirstOnly() + err := new(errors.Maybe) var gaz uint64 = math.MaxUint64 - st := NewStack(0, 0, &gaz, err) + st := NewStack(err, 0, 0, &gaz) st.Push64(math.MaxInt64) require.NoError(t, err.Error()) @@ -33,9 +32,9 @@ func TestStack_UnlimitedAllocation(t *testing.T) { // Test static memory allocation with maximum == initial capacity - memory should not grow func TestStack_StaticAllocation(t *testing.T) { - err := errors.FirstOnly() + err := new(errors.Maybe) var gaz uint64 = math.MaxUint64 - st := NewStack(4, 4, &gaz, err) + st := NewStack(err, 4, 4, &gaz) for i := 0; i < 4; i++ { st.Push64(math.MaxInt64) @@ -47,9 +46,9 @@ func TestStack_StaticAllocation(t *testing.T) { // Test writing beyond the current capacity - memory should grow func TestDynamicMemory_PushAhead(t *testing.T) { - err := errors.FirstOnly() + err := new(errors.Maybe) var gaz uint64 = math.MaxUint64 - st := NewStack(2, 4, &gaz, err) + st := NewStack(err, 2, 4, &gaz) for i := 0; i < 4; i++ { st.Push64(math.MaxInt64) @@ -57,13 +56,13 @@ func TestDynamicMemory_PushAhead(t *testing.T) { } st.Push64(math.MaxInt64) - assert.Equal(t, errors.ErrorCodeDataStackOverflow, err.Error().ErrorCode()) + assert.Equal(t, errors.ErrorCodeDataStackOverflow, errors.ErrorCode(err.Error())) } func TestStack_ZeroInitialCapacity(t *testing.T) { - err := errors.FirstOnly() + err := new(errors.Maybe) var gaz uint64 = math.MaxUint64 - st := NewStack(0, 16, &gaz, err) + st := NewStack(err, 0, 16, &gaz) require.NoError(t, err.Error()) st.Push64(math.MaxInt64) assert.Equal(t, []binary.Word256{binary.Int64ToWord256(math.MaxInt64)}, st.slice) @@ -71,7 +70,7 @@ func TestStack_ZeroInitialCapacity(t *testing.T) { func TestStack_ensureCapacity(t *testing.T) { var gaz uint64 = math.MaxUint64 - st := NewStack(4, 16, &gaz, errors.FirstOnly()) + st := NewStack(new(errors.Maybe), 4, 16, &gaz) // Check we can grow within bounds err := st.ensureCapacity(8) assert.NoError(t, err) diff --git a/execution/evm/state.go b/execution/evm/state.go deleted file mode 100644 index d9db08f68..000000000 --- a/execution/evm/state.go +++ /dev/null @@ -1,430 +0,0 @@ -package evm - -import ( - "bytes" - "fmt" - - "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/acm/acmstate" - "github.com/hyperledger/burrow/binary" - "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" - "github.com/hyperledger/burrow/deploy/compile" - "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/permission" -) - -type Interface interface { - Reader - Writer - // Capture any errors when accessing or writing state - will return nil if no errors have occurred so far - errors.Provider - errors.Sink - // Create a new cached state over this one inheriting any cache options - NewCache(cacheOptions ...acmstate.CacheOption) Interface - // Sync this state cache to into its originator - Sync() errors.CodedError -} - -type Reader interface { - GetStorage(address crypto.Address, key binary.Word256) []byte - GetBalance(address crypto.Address) uint64 - GetPermissions(address crypto.Address) permission.AccountPermissions - GetEVMCode(address crypto.Address) acm.Bytecode - GetWASMCode(address crypto.Address) acm.Bytecode - GetCodeHash(address crypto.Address) []byte - GetForebear(address crypto.Address) crypto.Address - GetSequence(address crypto.Address) uint64 - Exists(address crypto.Address) bool - // GetBlockHash returns hash of the specific block - GetBlockHash(blockNumber uint64) (binary.Word256, error) -} - -type Writer interface { - CreateAccount(address crypto.Address) - InitWASMCode(address crypto.Address, code []byte) - InitCode(address crypto.Address, code []byte) - InitChildCode(address crypto.Address, forebear crypto.Address, code []byte) - RemoveAccount(address crypto.Address) - SetStorage(address crypto.Address, key binary.Word256, value []byte) - AddToBalance(address crypto.Address, amount uint64) - SubtractFromBalance(address crypto.Address, amount uint64) - SetPermission(address crypto.Address, permFlag permission.PermFlag, value bool) - UnsetPermission(address crypto.Address, permFlag permission.PermFlag) - AddRole(address crypto.Address, role string) bool - RemoveRole(address crypto.Address, role string) bool -} - -type State struct { - // Where we sync - backend acmstate.ReaderWriter - // Block chain info - blockHashGetter func(height uint64) []byte - // Cache this State wraps - cache *acmstate.Cache - // Any error that may have occurred - error errors.CodedError - // In order for nested cache to inherit any options - cacheOptions []acmstate.CacheOption -} - -func NewState(st acmstate.ReaderWriter, blockHashGetter func(height uint64) []byte, cacheOptions ...acmstate.CacheOption) *State { - return &State{ - backend: st, - blockHashGetter: blockHashGetter, - cache: acmstate.NewCache(st, cacheOptions...), - cacheOptions: cacheOptions, - } -} - -func (st *State) NewCache(cacheOptions ...acmstate.CacheOption) Interface { - return NewState(st.cache, st.blockHashGetter, append(st.cacheOptions, cacheOptions...)...) -} - -func (st *State) Sync() errors.CodedError { - // Do not sync if we have erred - if st.error != nil { - return st.error - } - err := st.cache.Sync(st.backend) - if err != nil { - return errors.AsException(err) - } - return nil -} - -func (st *State) Error() errors.CodedError { - if st.error == nil { - return nil - } - return st.error -} - -// Errors pushed to state may end up in TxExecutions and therefore the merkle state so it is essential that errors are -// deterministic and independent of the code path taken to execution (e.g. replay takes a different path to that of -// normal consensus reactor so stack traces may differ - as they may across architectures) -func (st *State) PushError(err error) { - if st.error == nil { - // Make sure we are not wrapping a known nil value - ex := errors.AsException(err) - if ex != nil { - st.error = ex - } - } -} - -// Reader - -func (st *State) GetStorage(address crypto.Address, key binary.Word256) []byte { - value, err := st.cache.GetStorage(address, key) - if err != nil { - st.PushError(err) - return []byte{} - } - return value -} - -func (st *State) GetBalance(address crypto.Address) uint64 { - acc := st.account(address) - if acc == nil { - return 0 - } - return acc.Balance -} - -func (st *State) GetPermissions(address crypto.Address) permission.AccountPermissions { - acc := st.account(address) - if acc == nil { - return permission.AccountPermissions{} - } - return acc.Permissions -} - -func (st *State) GetEVMCode(address crypto.Address) acm.Bytecode { - acc := st.account(address) - if acc == nil { - return nil - } - return acc.EVMCode -} - -func (st *State) GetWASMCode(address crypto.Address) acm.Bytecode { - acc := st.account(address) - if acc == nil { - return nil - } - - return acc.WASMCode -} - -func (st *State) GetCodeHash(address crypto.Address) []byte { - acc := st.account(address) - if acc == nil || len(acc.CodeHash) == 0 { - return nil - } - return acc.CodeHash -} - -func (st *State) Exists(address crypto.Address) bool { - acc, err := st.cache.GetAccount(address) - if err != nil { - st.PushError(err) - return false - } - if acc == nil { - return false - } - return true -} - -func (st *State) GetSequence(address crypto.Address) uint64 { - acc := st.account(address) - if acc == nil { - return 0 - } - return acc.Sequence -} - -func (st *State) GetForebear(address crypto.Address) crypto.Address { - acc := st.account(address) - if acc == nil && acc.Forebear != nil { - return *acc.Forebear - } - return address -} - -// Writer - -func (st *State) CreateAccount(address crypto.Address) { - if st.Exists(address) { - st.PushError(errors.ErrorCodef(errors.ErrorCodeDuplicateAddress, - "tried to create an account at an address that already exists: %v", address)) - return - } - st.updateAccount(&acm.Account{Address: address}) -} - -func (st *State) InitCode(address crypto.Address, code []byte) { - st.initCode(address, nil, code) -} - -func (st *State) InitChildCode(address crypto.Address, parent crypto.Address, code []byte) { - st.initCode(address, &parent, code) - -} - -func (st *State) initCode(address crypto.Address, parent *crypto.Address, code []byte) { - acc := st.mustAccount(address) - if acc == nil { - st.PushError(errors.ErrorCodef(errors.ErrorCodeInvalidAddress, - "tried to initialise code for an account that does not exist: %v", address)) - return - } - if acc.EVMCode != nil || acc.WASMCode != nil { - st.PushError(errors.ErrorCodef(errors.ErrorCodeIllegalWrite, - "tried to initialise code for a contract that already exists: %v", address)) - return - } - - acc.EVMCode = code - - // keccak256 hash of a contract's code - hash := sha3.NewKeccak256() - hash.Write(code) - codehash := hash.Sum(nil) - - forebear := &address - metamap := acc.ContractMeta - if parent != nil { - // find our ancestor, i.e. the initial contract that was deployed, from which this contract descends - ancestor := st.mustAccount(*parent) - if ancestor.Forebear != nil { - ancestor = st.mustAccount(*ancestor.Forebear) - forebear = ancestor.Forebear - } else { - forebear = parent - } - metamap = ancestor.ContractMeta - } - - // If we have a list of ABIs for this contract, we also know what contract code it is allowed to create - // For compatibility with older contracts, allow any contract to be created if we have no mappings - if metamap != nil && len(metamap) > 0 { - found := codehashPermitted(codehash, metamap) - - // Libraries lie about their deployed bytecode - if !found { - deployCodehash := compile.GetDeployCodeHash(code, address) - found = codehashPermitted(deployCodehash, metamap) - } - - if !found { - st.PushError(errors.ErrorCodeInvalidContractCode) - return - } - } - - acc.CodeHash = codehash - acc.Forebear = forebear - - st.updateAccount(acc) -} - -func codehashPermitted(codehash []byte, metamap []*acm.ContractMeta) bool { - for _, m := range metamap { - if bytes.Equal(codehash, m.CodeHash) { - return true - } - } - - return false -} - -func (st *State) InitWASMCode(address crypto.Address, code []byte) { - acc := st.mustAccount(address) - if acc == nil { - st.PushError(errors.ErrorCodef(errors.ErrorCodeInvalidAddress, - "tried to initialise code for an account that does not exist: %v", address)) - return - } - if acc.EVMCode != nil || acc.WASMCode != nil { - st.PushError(errors.ErrorCodef(errors.ErrorCodeIllegalWrite, - "tried to initialise code for a contract that already exists: %v", address)) - return - } - - acc.WASMCode = code - // keccak256 hash of a contract's code - hash := sha3.NewKeccak256() - hash.Write(code) - acc.CodeHash = hash.Sum(nil) - st.updateAccount(acc) -} - -func (st *State) UpdateMetaMap(address crypto.Address, mapping []*acm.ContractMeta) { - acc := st.mustAccount(address) - if acc == nil { - st.PushError(errors.ErrorCodef(errors.ErrorCodeInvalidAddress, - "tried to initialise code for an account that does not exist: %v", address)) - return - } - acc.ContractMeta = mapping - st.updateAccount(acc) -} - -func (st *State) SetMetadata(metahash acmstate.MetadataHash, abi string) error { - return st.cache.SetMetadata(metahash, abi) -} - -func (st *State) RemoveAccount(address crypto.Address) { - if !st.Exists(address) { - st.PushError(errors.ErrorCodef(errors.ErrorCodeDuplicateAddress, - "tried to remove an account at an address that does not exist: %v", address)) - return - } - st.removeAccount(address) -} - -func (st *State) SetStorage(address crypto.Address, key binary.Word256, value []byte) { - err := st.cache.SetStorage(address, key, value) - if err != nil { - st.PushError(err) - } -} - -func (st *State) AddToBalance(address crypto.Address, amount uint64) { - acc := st.mustAccount(address) - if acc == nil { - return - } - st.PushError(acc.AddToBalance(amount)) - st.updateAccount(acc) -} - -func (st *State) SubtractFromBalance(address crypto.Address, amount uint64) { - acc := st.mustAccount(address) - if acc == nil { - return - } - st.PushError(acc.SubtractFromBalance(amount)) - st.updateAccount(acc) -} - -func (st *State) SetPermission(address crypto.Address, permFlag permission.PermFlag, value bool) { - acc := st.mustAccount(address) - if acc == nil { - return - } - st.PushError(acc.Permissions.Base.Set(permFlag, value)) - st.updateAccount(acc) -} - -func (st *State) UnsetPermission(address crypto.Address, permFlag permission.PermFlag) { - acc := st.mustAccount(address) - if acc == nil { - return - } - st.PushError(acc.Permissions.Base.Unset(permFlag)) - st.updateAccount(acc) -} - -func (st *State) AddRole(address crypto.Address, role string) bool { - acc := st.mustAccount(address) - if acc == nil { - return false - } - added := acc.Permissions.AddRole(role) - st.updateAccount(acc) - return added -} - -func (st *State) RemoveRole(address crypto.Address, role string) bool { - acc := st.mustAccount(address) - if acc == nil { - return false - } - removed := acc.Permissions.RemoveRole(role) - st.updateAccount(acc) - return removed -} - -func (st *State) GetBlockHash(height uint64) (binary.Word256, error) { - hash := st.blockHashGetter(height) - if len(hash) == 0 { - st.PushError(fmt.Errorf("got empty BlockHash from blockHashGetter")) - } - return binary.LeftPadWord256(hash), nil -} - -// Helpers - -func (st *State) account(address crypto.Address) *acm.Account { - acc, err := st.cache.GetAccount(address) - if err != nil { - st.PushError(err) - } - return acc -} - -func (st *State) mustAccount(address crypto.Address) *acm.Account { - acc := st.account(address) - if acc == nil { - st.PushError(errors.ErrorCodef(errors.ErrorCodeIllegalWrite, - "attempted to modify non-existent account: %v", address)) - } - return acc -} - -func (st *State) updateAccount(account *acm.Account) { - err := st.cache.UpdateAccount(account) - if err != nil { - st.PushError(err) - } -} - -func (st *State) removeAccount(address crypto.Address) { - err := st.cache.RemoveAccount(address) - if err != nil { - st.PushError(err) - } -} diff --git a/execution/evm/state_test.go b/execution/evm/state_test.go deleted file mode 100644 index dfe7b2780..000000000 --- a/execution/evm/state_test.go +++ /dev/null @@ -1,86 +0,0 @@ -package evm - -import ( - "fmt" - "testing" - - "github.com/hyperledger/burrow/binary" - - "github.com/hyperledger/burrow/acm/acmstate" - "github.com/stretchr/testify/require" - - "github.com/hyperledger/burrow/execution/errors" - "github.com/stretchr/testify/assert" -) - -func TestState_PushError(t *testing.T) { - st := NewState(newAppState(), blockHashGetter) - // This will be a wrapped nil - it should not register as first error - var ex errors.CodedError = (*errors.Exception)(nil) - st.PushError(ex) - // This one should - realErr := errors.ErrorCodef(errors.ErrorCodeInsufficientBalance, "real error") - st.PushError(realErr) - assert.True(t, realErr.Equal(st.Error())) -} - -func TestState_CreateAccount(t *testing.T) { - st := NewState(newAppState(), blockHashGetter) - address := newAddress("frogs") - st.CreateAccount(address) - require.Nil(t, st.Error()) - st.CreateAccount(address) - assertErrorCode(t, errors.ErrorCodeDuplicateAddress, st.Error()) - - st = NewState(newAppState(), blockHashGetter) - st.CreateAccount(address) - require.Nil(t, st.Error()) - st.InitCode(address, []byte{1, 2, 3}) - require.Nil(t, st.Error()) -} - -func TestState_Sync(t *testing.T) { - backend := acmstate.NewCache(newAppState()) - st := NewState(backend, blockHashGetter) - address := newAddress("frogs") - - st.CreateAccount(address) - amt := uint64(1232) - st.AddToBalance(address, amt) - - var err error - err = st.Sync() - require.Nil(t, err) - acc, err := backend.GetAccount(address) - require.NoError(t, err) - assert.Equal(t, acc.Balance, amt) -} - -func TestState_NewCache(t *testing.T) { - st := NewState(newAppState(), blockHashGetter) - address := newAddress("frogs") - - cache := st.NewCache() - cache.CreateAccount(address) - amt := uint64(1232) - cache.AddToBalance(address, amt) - - var err error - assert.Equal(t, uint64(0), st.GetBalance(address)) - require.Nil(t, st.Error()) - - // Sync through to cache - err = cache.Sync() - require.NoError(t, err) - assert.Equal(t, amt, st.GetBalance(address)) - require.Nil(t, st.Error()) - - cache = st.NewCache(acmstate.ReadOnly).NewCache() - require.Nil(t, st.Error()) - cache.AddToBalance(address, amt) - assertErrorCode(t, errors.ErrorCodeIllegalWrite, cache.Error()) -} - -func blockHashGetter(height uint64) []byte { - return binary.LeftPadWord256([]byte(fmt.Sprintf("block_hash_%d", height))).Bytes() -} diff --git a/execution/evm/vm.go b/execution/evm/vm.go deleted file mode 100644 index 3a1a1f021..000000000 --- a/execution/evm/vm.go +++ /dev/null @@ -1,1100 +0,0 @@ -// Copyright 2017 Monax Industries Limited -// -// 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 evm - -import ( - "bytes" - "encoding/binary" - "fmt" - "io/ioutil" - "math/big" - "strings" - - "github.com/hyperledger/burrow/execution/evm/abi" - - "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/acm/acmstate" - . "github.com/hyperledger/burrow/binary" - "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" - "github.com/hyperledger/burrow/execution/errors" - . "github.com/hyperledger/burrow/execution/evm/asm" - "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/logging" - "github.com/hyperledger/burrow/permission" - "github.com/hyperledger/burrow/txs" -) - -const ( - DataStackInitialCapacity = 1024 - MaximumAllowedBlockLookBack = 256 - uint64Length = 8 -) - -type Params struct { - BlockHeight uint64 - BlockTime int64 - GasLimit uint64 - CallStackMaxDepth uint64 - DataStackInitialCapacity uint64 - DataStackMaxDepth uint64 -} - -type VM struct { - memoryProvider func(errors.Sink) Memory - params Params - origin crypto.Address - nonce []byte - stackDepth uint64 - logger *logging.Logger - debugOpcodes bool - dumpTokens bool - sequence uint64 -} - -// Create a new EVM instance. Nonce is required to be globally unique (nearly almost surely) to avoid duplicate -// addresses for EVM created accounts. In Burrow we use TxHash for this but a random nonce or sequence number could be -// used. -func NewVM(params Params, origin crypto.Address, nonce []byte, logger *logging.Logger, options ...func(*VM)) *VM { - vm := &VM{ - memoryProvider: DefaultDynamicMemoryProvider, - params: params, - origin: origin, - stackDepth: 0, - nonce: nonce, - logger: logger.WithScope("NewVM"), - } - for _, option := range options { - option(vm) - } - return vm -} - -func (vm *VM) Debugf(format string, a ...interface{}) { - if vm.debugOpcodes { - fmt.Printf(format, a...) - } -} - -// CONTRACT: it is the duty of the contract writer to call known permissions -// we do not convey if a permission is not set -// (unlike in state/execution, where we guarantee HasPermission is called -// on known permissions and panics else) -// If the perm is not defined in the acc nor set by default in GlobalPermissions, -// this function returns false. -func HasPermission(st Interface, address crypto.Address, perm permission.PermFlag) bool { - globalPerms := st.GetPermissions(acm.GlobalPermissionsAddress) - accPerms := st.GetPermissions(address) - perms := accPerms.Base.Compose(globalPerms.Base) - value, err := perms.Get(perm) - if err != nil { - return false - } - return value -} - -func EnsurePermission(st Interface, address crypto.Address, perm permission.PermFlag) { - if !HasPermission(st, address, perm) { - st.PushError(errors.PermissionDenied{ - Address: address, - Perm: perm, - }) - } -} - -func (vm *VM) fireCallEvent(eventSink EventSink, callType exec.CallType, errProvider errors.Provider, output *[]byte, - callerAddress, calleeAddress crypto.Address, input []byte, value uint64, gas *uint64, errSink errors.Sink) { - // fire the post call event (including exception if applicable) - eventErr := eventSink.Call(&exec.CallEvent{ - CallType: callType, - CallData: &exec.CallData{ - Caller: callerAddress, - Callee: calleeAddress, - Data: input, - Value: value, - Gas: *gas, - }, - Origin: vm.origin, - StackDepth: vm.stackDepth, - Return: *output, - }, errors.AsException(errProvider.Error())) - errSink.PushError(eventErr) -} - -// Initiate an EVM call against the provided state pushing events to eventSink. code should contain the EVM bytecode, -// input the CallData (readable by CALLDATALOAD), value the amount of native token to transfer with the call -// an quantity metering the number of computational steps available to the execution according to the gas schedule. -func (vm *VM) Call(callState Interface, eventSink EventSink, caller, callee crypto.Address, code, - input []byte, value uint64, gas *uint64) (output []byte, err errors.CodedError) { - - // Always return output - we may have a reverted exception for which the return is meaningful - output, err = vm.call(callState, eventSink, caller, callee, code, input, value, gas, exec.CallTypeCall) - if err == nil { - err = callState.Error() - } - return -} - -func (vm *VM) call(callState Interface, eventSink EventSink, caller, callee crypto.Address, code, - input []byte, value uint64, gas *uint64, callType exec.CallType) (output []byte, err errors.CodedError) { - - // fire the post call event (including exception if applicable) and make sure we return the accumulated call error - defer func() { - vm.fireCallEvent(eventSink, callType, callState, &output, caller, callee, input, value, gas, callState) - err = callState.Error() - }() - - callState.PushError(transfer(callState, caller, callee, value)) - callState.PushError(vm.ensureStackDepth()) - - // Early exit - if callState.Error() != nil { - return - } - - if len(code) > 0 { - vm.stackDepth += 1 - output = vm.execute(callState, eventSink, caller, callee, code, input, value, gas) - vm.stackDepth -= 1 - if err != nil { - callState.PushError(err) - callState.PushError(transfer(callState, callee, caller, value)) - } - } - - return -} - -// DelegateCall is executed by the DELEGATECALL opcode, introduced as off Ethereum Homestead. -// The intent of delegate call is to run the code of the callee in the storage context of the caller; -// while preserving the original caller to the previous callee. -// Different to the normal CALL or CALLCODE, the value does not need to be transferred to the callee. -func (vm *VM) delegateCall(callState Interface, eventSink EventSink, caller, callee crypto.Address, - code, input []byte, value uint64, gas *uint64, - callType exec.CallType) (output []byte, err errors.CodedError) { - - // fire the post call event (including exception if applicable) and make sure we return the accumulated call error - defer func() { - vm.fireCallEvent(eventSink, callType, callState, &output, caller, callee, input, value, gas, callState) - err = callState.Error() - }() - - // DelegateCall does not transfer the value to the callee. - - callState.PushError(vm.ensureStackDepth()) - - // Early exit - if callState.Error() != nil { - return - } - - if len(code) > 0 { - vm.stackDepth += 1 - output = vm.execute(callState, eventSink, caller, callee, code, input, value, gas) - vm.stackDepth -= 1 - } - return -} - -// Try to deduct gasToUse from gasLeft. If ok return false, otherwise -// set err and return true. -func useGasNegative(gasLeft *uint64, gasToUse uint64, err errors.Sink) { - if *gasLeft >= gasToUse { - *gasLeft -= gasToUse - } else { - err.PushError(errors.ErrorCodeInsufficientGas) - } -} - -// Executes the EVM code passed in the appropriate context -func (vm *VM) execute(callState Interface, eventSink EventSink, caller, callee crypto.Address, - code, input []byte, value uint64, gas *uint64) (returnData []byte) { - vm.Debugf("(%d) (%s) %s (code=%d) gas: %v (d) %X\n", vm.stackDepth, caller, callee, len(code), *gas, input) - - logger := vm.logger.With("evm_nonce", vm.nonce) - - if vm.dumpTokens { - dumpTokens(vm.nonce, caller, callee, code) - } - - // Program counter - the index into code that tracks current instruction - pc := int64(0) - // Provide stack and memory storage - passing in the callState as an error provider - stack := NewStack(vm.params.DataStackInitialCapacity, vm.params.DataStackMaxDepth, gas, callState) - memory := vm.memoryProvider(callState) - - for { - // Check for any error accrued to state - if callState.Error() != nil { - return - } - - var op = codeGetOp(code, pc) - vm.Debugf("(pc) %-3d (op) %-14s (st) %-4d (gas) %d", pc, op.String(), stack.Len(), *gas) - // Use BaseOp gas. - useGasNegative(gas, GasBaseOp, callState) - - switch op { - - case ADD: // 0x01 - x, y := stack.PopBigInt(), stack.PopBigInt() - sum := new(big.Int).Add(x, y) - res := stack.PushBigInt(sum) - vm.Debugf(" %v + %v = %v (%X)\n", x, y, sum, res) - - case MUL: // 0x02 - x, y := stack.PopBigInt(), stack.PopBigInt() - prod := new(big.Int).Mul(x, y) - res := stack.PushBigInt(prod) - vm.Debugf(" %v * %v = %v (%X)\n", x, y, prod, res) - - case SUB: // 0x03 - x, y := stack.PopBigInt(), stack.PopBigInt() - diff := new(big.Int).Sub(x, y) - res := stack.PushBigInt(diff) - vm.Debugf(" %v - %v = %v (%X)\n", x, y, diff, res) - - case DIV: // 0x04 - x, y := stack.PopBigInt(), stack.PopBigInt() - if y.Sign() == 0 { - stack.Push(Zero256) - vm.Debugf(" %x / %x = %v\n", x, y, 0) - } else { - div := new(big.Int).Div(x, y) - res := stack.PushBigInt(div) - vm.Debugf(" %v / %v = %v (%X)\n", x, y, div, res) - } - - case SDIV: // 0x05 - x, y := stack.PopBigIntSigned(), stack.PopBigIntSigned() - if y.Sign() == 0 { - stack.Push(Zero256) - vm.Debugf(" %x / %x = %v\n", x, y, 0) - } else { - div := new(big.Int).Div(x, y) - res := stack.PushBigInt(div) - vm.Debugf(" %v / %v = %v (%X)\n", x, y, div, res) - } - - case MOD: // 0x06 - x, y := stack.PopBigInt(), stack.PopBigInt() - if y.Sign() == 0 { - stack.Push(Zero256) - vm.Debugf(" %v %% %v = %v\n", x, y, 0) - } else { - mod := new(big.Int).Mod(x, y) - res := stack.PushBigInt(mod) - vm.Debugf(" %v %% %v = %v (%X)\n", x, y, mod, res) - } - - case SMOD: // 0x07 - x, y := stack.PopBigIntSigned(), stack.PopBigIntSigned() - if y.Sign() == 0 { - stack.Push(Zero256) - vm.Debugf(" %v %% %v = %v\n", x, y, 0) - } else { - mod := new(big.Int).Mod(x, y) - res := stack.PushBigInt(mod) - vm.Debugf(" %v %% %v = %v (%X)\n", x, y, mod, res) - } - - case ADDMOD: // 0x08 - x, y, z := stack.PopBigInt(), stack.PopBigInt(), stack.PopBigInt() - if z.Sign() == 0 { - stack.Push(Zero256) - vm.Debugf(" %v %% %v = %v\n", x, y, 0) - } else { - add := new(big.Int).Add(x, y) - mod := add.Mod(add, z) - res := stack.PushBigInt(mod) - vm.Debugf(" %v + %v %% %v = %v (%X)\n", x, y, z, mod, res) - } - - case MULMOD: // 0x09 - x, y, z := stack.PopBigInt(), stack.PopBigInt(), stack.PopBigInt() - if z.Sign() == 0 { - stack.Push(Zero256) - vm.Debugf(" %v %% %v = %v\n", x, y, 0) - } else { - mul := new(big.Int).Mul(x, y) - mod := mul.Mod(mul, z) - res := stack.PushBigInt(mod) - vm.Debugf(" %v * %v %% %v = %v (%X)\n", x, y, z, mod, res) - } - - case EXP: // 0x0A - x, y := stack.PopBigInt(), stack.PopBigInt() - pow := new(big.Int).Exp(x, y, nil) - res := stack.PushBigInt(pow) - vm.Debugf(" %v ** %v = %v (%X)\n", x, y, pow, res) - - case SIGNEXTEND: // 0x0B - back := stack.PopU64() - if back < Word256Length-1 { - stack.PushBigInt(SignExtend(back, stack.PopBigInt())) - } - - case LT: // 0x10 - x, y := stack.PopBigInt(), stack.PopBigInt() - if x.Cmp(y) < 0 { - stack.Push(One256) - vm.Debugf(" %v < %v = %v\n", x, y, 1) - } else { - stack.Push(Zero256) - vm.Debugf(" %v < %v = %v\n", x, y, 0) - } - - case GT: // 0x11 - x, y := stack.PopBigInt(), stack.PopBigInt() - if x.Cmp(y) > 0 { - stack.Push(One256) - vm.Debugf(" %v > %v = %v\n", x, y, 1) - } else { - stack.Push(Zero256) - vm.Debugf(" %v > %v = %v\n", x, y, 0) - } - - case SLT: // 0x12 - x, y := stack.PopBigIntSigned(), stack.PopBigIntSigned() - if x.Cmp(y) < 0 { - stack.Push(One256) - vm.Debugf(" %v < %v = %v\n", x, y, 1) - } else { - stack.Push(Zero256) - vm.Debugf(" %v < %v = %v\n", x, y, 0) - } - - case SGT: // 0x13 - x, y := stack.PopBigIntSigned(), stack.PopBigIntSigned() - if x.Cmp(y) > 0 { - stack.Push(One256) - vm.Debugf(" %v > %v = %v\n", x, y, 1) - } else { - stack.Push(Zero256) - vm.Debugf(" %v > %v = %v\n", x, y, 0) - } - - case EQ: // 0x14 - x, y := stack.Pop(), stack.Pop() - if bytes.Equal(x[:], y[:]) { - stack.Push(One256) - vm.Debugf(" %X == %X = %v\n", x, y, 1) - } else { - stack.Push(Zero256) - vm.Debugf(" %X == %X = %v\n", x, y, 0) - } - - case ISZERO: // 0x15 - x := stack.Pop() - if x.IsZero() { - stack.Push(One256) - vm.Debugf(" %X == 0 = %v\n", x, 1) - } else { - stack.Push(Zero256) - vm.Debugf(" %X == 0 = %v\n", x, 0) - } - - case AND: // 0x16 - x, y := stack.Pop(), stack.Pop() - z := [32]byte{} - for i := 0; i < 32; i++ { - z[i] = x[i] & y[i] - } - stack.Push(z) - vm.Debugf(" %X & %X = %X\n", x, y, z) - - case OR: // 0x17 - x, y := stack.Pop(), stack.Pop() - z := [32]byte{} - for i := 0; i < 32; i++ { - z[i] = x[i] | y[i] - } - stack.Push(z) - vm.Debugf(" %X | %X = %X\n", x, y, z) - - case XOR: // 0x18 - x, y := stack.Pop(), stack.Pop() - z := [32]byte{} - for i := 0; i < 32; i++ { - z[i] = x[i] ^ y[i] - } - stack.Push(z) - vm.Debugf(" %X ^ %X = %X\n", x, y, z) - - case NOT: // 0x19 - x := stack.Pop() - z := [32]byte{} - for i := 0; i < 32; i++ { - z[i] = ^x[i] - } - stack.Push(z) - vm.Debugf(" !%X = %X\n", x, z) - - case BYTE: // 0x1A - idx := stack.Pop64() - val := stack.Pop() - res := byte(0) - if idx < 32 { - res = val[idx] - } - stack.Push64(int64(res)) - vm.Debugf(" => 0x%X\n", res) - - case SHL: //0x1B - shift, x := stack.PopBigInt(), stack.PopBigInt() - - if shift.Cmp(Big256) >= 0 { - reset := big.NewInt(0) - stack.PushBigInt(reset) - vm.Debugf(" %v << %v = %v\n", x, shift, reset) - } else { - shiftedValue := x.Lsh(x, uint(shift.Uint64())) - stack.PushBigInt(shiftedValue) - vm.Debugf(" %v << %v = %v\n", x, shift, shiftedValue) - } - - case SHR: //0x1C - shift, x := stack.PopBigInt(), stack.PopBigInt() - - if shift.Cmp(Big256) >= 0 { - reset := big.NewInt(0) - stack.PushBigInt(reset) - vm.Debugf(" %v << %v = %v\n", x, shift, reset) - } else { - shiftedValue := x.Rsh(x, uint(shift.Uint64())) - stack.PushBigInt(shiftedValue) - vm.Debugf(" %v << %v = %v\n", x, shift, shiftedValue) - } - - case SAR: //0x1D - shift, x := stack.PopBigInt(), stack.PopBigIntSigned() - - if shift.Cmp(Big256) >= 0 { - reset := big.NewInt(0) - if x.Sign() < 0 { - reset.SetInt64(-1) - } - stack.PushBigInt(reset) - vm.Debugf(" %v << %v = %v\n", x, shift, reset) - } else { - shiftedValue := x.Rsh(x, uint(shift.Uint64())) - stack.PushBigInt(shiftedValue) - vm.Debugf(" %v << %v = %v\n", x, shift, shiftedValue) - } - - case SHA3: // 0x20 - useGasNegative(gas, GasSha3, callState) - offset, size := stack.PopBigInt(), stack.PopBigInt() - data := memory.Read(offset, size) - data = sha3.Sha3(data) - stack.PushBytes(data) - vm.Debugf(" => (%v) %X\n", size, data) - - case ADDRESS: // 0x30 - stack.Push(callee.Word256()) - vm.Debugf(" => %X\n", callee) - - case BALANCE: // 0x31 - address := stack.PopAddress() - useGasNegative(gas, GasGetAccount, callState) - balance := callState.GetBalance(address) - stack.PushU64(balance) - vm.Debugf(" => %v (%X)\n", balance, address) - - case ORIGIN: // 0x32 - stack.Push(vm.origin.Word256()) - vm.Debugf(" => %v\n", vm.origin) - - case CALLER: // 0x33 - stack.Push(caller.Word256()) - vm.Debugf(" => %v\n", caller) - - case CALLVALUE: // 0x34 - stack.PushU64(value) - vm.Debugf(" => %v\n", value) - - case CALLDATALOAD: // 0x35 - offset := stack.Pop64() - data := subslice(input, offset, 32, callState) - res := LeftPadWord256(data) - stack.Push(res) - vm.Debugf(" => 0x%X\n", res) - - case CALLDATASIZE: // 0x36 - stack.Push64(int64(len(input))) - vm.Debugf(" => %d\n", len(input)) - - case CALLDATACOPY: // 0x37 - memOff := stack.PopBigInt() - inputOff := stack.Pop64() - length := stack.Pop64() - data := subslice(input, inputOff, length, callState) - memory.Write(memOff, data) - vm.Debugf(" => [%v, %v, %v] %X\n", memOff, inputOff, length, data) - - case CODESIZE: // 0x38 - l := int64(len(code)) - stack.Push64(l) - vm.Debugf(" => %d\n", l) - - case CODECOPY: // 0x39 - memOff := stack.PopBigInt() - codeOff := stack.Pop64() - length := stack.Pop64() - data := subslice(code, codeOff, length, callState) - memory.Write(memOff, data) - vm.Debugf(" => [%v, %v, %v] %X\n", memOff, codeOff, length, data) - - case GASPRICE_DEPRECATED: // 0x3A - stack.Push(Zero256) - vm.Debugf(" => %X (GASPRICE IS DEPRECATED)\n", Zero256) - - case EXTCODESIZE: // 0x3B - address := stack.PopAddress() - useGasNegative(gas, GasGetAccount, callState) - if callState.Exists(address) { - code := callState.GetEVMCode(address) - l := int64(len(code)) - stack.Push64(l) - vm.Debugf(" => %d\n", l) - } else { - if _, ok := registeredNativeContracts[address]; !ok { - callState.PushError(errors.ErrorCodeUnknownAddress) - continue - } - vm.Debugf(" => returning code size of 1 to indicated existence of native contract at %X\n", address) - stack.Push(One256) - } - case EXTCODECOPY: // 0x3C - address := stack.PopAddress() - useGasNegative(gas, GasGetAccount, callState) - if !callState.Exists(address) { - if _, ok := registeredNativeContracts[address]; ok { - vm.Debugf(" => attempted to copy native contract at %v but this is not supported\n", address) - callState.PushError(errors.ErrorCodeNativeContractCodeCopy) - } - callState.PushError(errors.ErrorCodeUnknownAddress) - continue - } - code := callState.GetEVMCode(address) - memOff := stack.PopBigInt() - codeOff := stack.Pop64() - length := stack.Pop64() - data := subslice(code, codeOff, length, callState) - memory.Write(memOff, data) - vm.Debugf(" => [%v, %v, %v] %X\n", memOff, codeOff, length, data) - - case RETURNDATASIZE: // 0x3D - stack.Push64(int64(len(returnData))) - vm.Debugf(" => %d\n", len(returnData)) - - case RETURNDATACOPY: // 0x3E - memOff, outputOff, length := stack.PopBigInt(), stack.PopBigInt(), stack.PopBigInt() - end := new(big.Int).Add(outputOff, length) - - if end.BitLen() > 64 || uint64(len(returnData)) < end.Uint64() { - callState.PushError(errors.ErrorCodeReturnDataOutOfBounds) - continue - } - - memory.Write(memOff, returnData) - vm.Debugf(" => [%v, %v, %v] %X\n", memOff, outputOff, length, returnData) - - case EXTCODEHASH: // 0x3F - address := stack.PopAddress() - - if !callState.Exists(address) { - // In case the account does not exist 0 is pushed to the stack. - stack.PushU64(0) - } else { - // keccak256 hash of a contract's code - var extcodehash Word256 - codehash := callState.GetCodeHash(address) - if codehash != nil { - copy(extcodehash[:], codehash) - } else { - hash := sha3.NewKeccak256() - copy(extcodehash[:], hash.Sum(nil)) - } - - stack.Push(extcodehash) - } - - case BLOCKHASH: // 0x40 - blockNumber := stack.PopU64() - - if blockNumber >= vm.params.BlockHeight { - vm.Debugf(" => attempted to get block hash of a non-existent block: %v", blockNumber) - callState.PushError(errors.ErrorCodeInvalidBlockNumber) - } else if vm.params.BlockHeight-blockNumber > MaximumAllowedBlockLookBack { - vm.Debugf(" => attempted to get block hash of a block %d outside of the allowed range "+ - "(must be within %d blocks)", blockNumber, MaximumAllowedBlockLookBack) - callState.PushError(errors.ErrorCodeBlockNumberOutOfRange) - } else { - blockHash, err := callState.GetBlockHash(blockNumber) - if err != nil { - vm.Debugf(" => error attempted to get block hash: %v, %v", blockNumber, err) - callState.PushError(errors.ErrorCodeInvalidBlockNumber) - } else { - stack.Push(blockHash) - vm.Debugf(" => 0x%X\n", blockHash) - } - } - - case COINBASE: // 0x41 - stack.Push(Zero256) - vm.Debugf(" => 0x%X (NOT SUPPORTED)\n", stack.Peek().Bytes()) - - case TIMESTAMP: // 0x42 - time := vm.params.BlockTime - stack.Push64(int64(time)) - vm.Debugf(" => 0x%X\n", time) - - case BLOCKHEIGHT: // 0x43 - number := vm.params.BlockHeight - stack.PushU64(number) - vm.Debugf(" => 0x%X\n", number) - - case GASLIMIT: // 0x45 - stack.PushU64(vm.params.GasLimit) - vm.Debugf(" => %v\n", vm.params.GasLimit) - - case POP: // 0x50 - popped := stack.Pop() - vm.Debugf(" => 0x%X\n", popped) - - case MLOAD: // 0x51 - offset := stack.PopBigInt() - data := memory.Read(offset, BigWord256Length) - stack.Push(LeftPadWord256(data)) - vm.Debugf(" => 0x%X @ 0x%X\n", data, offset) - - case MSTORE: // 0x52 - offset, data := stack.PopBigInt(), stack.Pop() - memory.Write(offset, data.Bytes()) - vm.Debugf(" => 0x%X @ 0x%X\n", data, offset) - - case MSTORE8: // 0x53 - offset := stack.PopBigInt() - val64 := stack.Pop64() - val := byte(val64 & 0xFF) - memory.Write(offset, []byte{val}) - vm.Debugf(" => [%v] 0x%X\n", offset, val) - - case SLOAD: // 0x54 - loc := stack.Pop() - data := LeftPadWord256(callState.GetStorage(callee, loc)) - stack.Push(data) - vm.Debugf("%s {0x%X = 0x%X}\n", callee, loc, data) - - case SSTORE: // 0x55 - loc, data := stack.Pop(), stack.Pop() - useGasNegative(gas, GasStorageUpdate, callState) - callState.SetStorage(callee, loc, data.Bytes()) - vm.Debugf("%v {%v := %v}\n", callee, loc, data) - - case JUMP: // 0x56 - to := stack.Pop64() - vm.jump(code, to, &pc, callState) - continue - - case JUMPI: // 0x57 - pos := stack.Pop64() - cond := stack.Pop() - if !cond.IsZero() { - vm.jump(code, pos, &pc, callState) - continue - } - vm.Debugf(" ~> false\n") - - case PC: // 0x58 - stack.Push64(pc) - - case MSIZE: // 0x59 - // Note: Solidity will write to this offset expecting to find guaranteed - // free memory to be allocated for it if a subsequent MSTORE is made to - // this offset. - capacity := memory.Capacity() - stack.PushBigInt(capacity) - vm.Debugf(" => 0x%X\n", capacity) - - case GAS: // 0x5A - stack.PushU64(*gas) - vm.Debugf(" => %X\n", *gas) - - case JUMPDEST: // 0x5B - vm.Debugf("\n") - // Do nothing - - case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: - a := int64(op - PUSH1 + 1) - codeSegment := subslice(code, pc+1, a, callState) - res := LeftPadWord256(codeSegment) - stack.Push(res) - pc += a - vm.Debugf(" => 0x%X\n", res) - - case DUP1, DUP2, DUP3, DUP4, DUP5, DUP6, DUP7, DUP8, DUP9, DUP10, DUP11, DUP12, DUP13, DUP14, DUP15, DUP16: - n := int(op - DUP1 + 1) - stack.Dup(n) - vm.Debugf(" => [%d] 0x%X\n", n, stack.Peek().Bytes()) - - case SWAP1, SWAP2, SWAP3, SWAP4, SWAP5, SWAP6, SWAP7, SWAP8, SWAP9, SWAP10, SWAP11, SWAP12, SWAP13, SWAP14, SWAP15, SWAP16: - n := int(op - SWAP1 + 2) - stack.Swap(n) - vm.Debugf(" => [%d] %X\n", n, stack.Peek()) - - case LOG0, LOG1, LOG2, LOG3, LOG4: - n := int(op - LOG0) - topics := make([]Word256, n) - offset, size := stack.PopBigInt(), stack.PopBigInt() - for i := 0; i < n; i++ { - topics[i] = stack.Pop() - } - data := memory.Read(offset, size) - callState.PushError(eventSink.Log(&exec.LogEvent{ - Address: callee, - Topics: topics, - Data: data, - })) - vm.Debugf(" => T:%X D:%X\n", topics, data) - - case CREATE, CREATE2: // 0xF0, 0xFB - returnData = nil - contractValue := stack.PopU64() - offset, size := stack.PopBigInt(), stack.PopBigInt() - input := memory.Read(offset, size) - - // TODO charge for gas to create account _ the code length * GasCreateByte - useGasNegative(gas, GasCreateAccount, callState) - - var newAccount crypto.Address - if op == CREATE { - vm.sequence++ - nonce := make([]byte, txs.HashLength+uint64Length) - copy(nonce, vm.nonce) - binary.BigEndian.PutUint64(nonce[txs.HashLength:], vm.sequence) - newAccount = crypto.NewContractAddress(callee, nonce) - } else if op == CREATE2 { - salt := stack.Pop() - newAccount = crypto.NewContractAddress2(callee, salt, callState.GetEVMCode(callee)) - } - - // Check the CreateContract permission for this account - EnsurePermission(callState, callee, permission.CreateContract) - if callState.Error() != nil { - continue - } - - // Establish a frame in which the putative account exists - childCallState := callState.NewCache() - create(childCallState, newAccount) - - // Run the input to get the contract code. - // NOTE: no need to copy 'input' as per Call contract. - ret, callErr := vm.Call(childCallState, eventSink, callee, newAccount, input, input, contractValue, gas) - if callErr != nil { - stack.Push(Zero256) - // Note we both set the return buffer and return the result normally - returnData = ret - } else { - // Update the account with its initialised contract code - forebear := callState.GetForebear(callee) - childCallState.InitChildCode(newAccount, forebear, ret) - callState.PushError(childCallState.Sync()) - stack.PushAddress(newAccount) - } - - case CALL, CALLCODE, DELEGATECALL, STATICCALL: // 0xF1, 0xF2, 0xF4, 0xFA - returnData = nil - - EnsurePermission(callState, callee, permission.Call) - if callState.Error() != nil { - continue - } - gasLimit := stack.PopU64() - address := stack.PopAddress() - // NOTE: for DELEGATECALL value is preserved from the original - // caller, as such it is not stored on stack as an argument - // for DELEGATECALL and should not be popped. Instead previous - // caller value is used. for CALL and CALLCODE value is stored - // on stack and needs to be overwritten from the given value. - if op != DELEGATECALL && op != STATICCALL { - value = stack.PopU64() - } - // inputs - inOffset, inSize := stack.PopBigInt(), stack.PopBigInt() - // outputs - retOffset := stack.PopBigInt() - retSize := stack.Pop64() - vm.Debugf(" => %v\n", address) - - // Get the arguments from the memory - args := memory.Read(inOffset, inSize) - - // Ensure that gasLimit is reasonable - if *gas < gasLimit { - // EIP150 - the 63/64 rule - rather than errors.CodedError we pass this specified fraction of the total available gas - gasLimit = *gas - *gas/64 - } - // NOTE: we will return any used gas later. - *gas -= gasLimit - - // Begin execution - var callErr errors.CodedError - // Establish a stack frame and perform the call - var childCallState Interface - if IsRegisteredNativeContract(address) { - // Native contract - childCallState = callState.NewCache() - returnData, callErr = ExecuteNativeContract(address, childCallState, callee, args, &gasLimit, logger) - childCallState.PushError(callErr) - // for now we fire the Call event. maybe later we'll fire more particulars - // NOTE: these fire call go_events and not particular go_events for eg name reg or permissions - vm.fireCallEvent(eventSink, exec.CallTypeSNative, childCallState, &returnData, callee, address, args, value, - &gasLimit, childCallState) - } else { - // EVM contract - useGasNegative(gas, GasGetAccount, callState) - // since CALL is used also for sending funds, - // acc may not exist yet. This is an errors.CodedError for - // CALLCODE, but not for CALL, though I don't think - // ethereum actually cares - if !callState.Exists(address) { - if op != CALL { - callState.PushError(errors.ErrorCodeUnknownAddress) - continue - } - // We're sending funds to a new account so we must create it first - createAccount(callState, callee, address) - if callState.Error() != nil { - continue - } - } - switch op { - case CALL: - childCallState = callState.NewCache() - returnData, callErr = vm.call(childCallState, eventSink, callee, address, callState.GetEVMCode(address), - args, value, &gasLimit, exec.CallTypeCall) - - case CALLCODE: - childCallState = callState.NewCache() - returnData, callErr = vm.call(childCallState, eventSink, callee, callee, callState.GetEVMCode(address), - args, value, &gasLimit, exec.CallTypeCode) - - case DELEGATECALL: - childCallState = callState.NewCache() - returnData, callErr = vm.delegateCall(childCallState, eventSink, caller, callee, - callState.GetEVMCode(address), args, value, &gasLimit, exec.CallTypeDelegate) - - case STATICCALL: - childCallState = callState.NewCache(acmstate.ReadOnly) - returnData, callErr = vm.delegateCall(childCallState, NewLogFreeEventSink(eventSink), - callee, address, callState.GetEVMCode(address), args, value, &gasLimit, exec.CallTypeStatic) - - default: - panic(fmt.Errorf("switch statement should be exhaustive so this should not have been reached")) - } - - } - - if callErr == nil { - // Sync error is a hard stop - callState.PushError(childCallState.Sync()) - } - - // Push result - if callErr != nil { - vm.Debugf("error from nested sub-call (depth: %v): %s\n", vm.stackDepth, callErr.Error()) - // So we can return nested errors.CodedError if the top level return is an errors.CodedError - stack.Push(Zero256) - - if callErr.ErrorCode() == errors.ErrorCodeExecutionReverted { - memory.Write(retOffset, RightPadBytes(returnData, int(retSize))) - } - } else { - stack.Push(One256) - - // Should probably only be necessary when there is no return value and - // returnData is empty, but since EVM expects retSize to be respected this will - // defensively pad or truncate the portion of returnData to be returned. - memory.Write(retOffset, RightPadBytes(returnData, int(retSize))) - } - - // Handle remaining gas. - *gas += gasLimit - - vm.Debugf("resume %s (%v)\n", callee, gas) - - case RETURN: // 0xF3 - offset, size := stack.PopBigInt(), stack.PopBigInt() - output := memory.Read(offset, size) - vm.Debugf(" => [%v, %v] (%d) 0x%X\n", offset, size, len(output), output) - return output - - case REVERT: // 0xFD - offset, size := stack.PopBigInt(), stack.PopBigInt() - output := memory.Read(offset, size) - vm.Debugf(" => [%v, %v] (%d) 0x%X\n", offset, size, len(output), output) - callState.PushError(newRevertException(output)) - return output - - case INVALID: // 0xFE - callState.PushError(errors.ErrorCodeExecutionAborted) - return nil - - case SELFDESTRUCT: // 0xFF - receiver := stack.PopAddress() - useGasNegative(gas, GasGetAccount, callState) - if !callState.Exists(receiver) { - // If receiver address doesn't exist, try to create it - useGasNegative(gas, GasCreateAccount, callState) - createAccount(callState, callee, receiver) - if callState.Error() != nil { - continue - } - } - balance := callState.GetBalance(callee) - callState.AddToBalance(receiver, balance) - callState.RemoveAccount(callee) - vm.Debugf(" => (%X) %v\n", receiver[:4], balance) - return nil - - case STOP: // 0x00 - return nil - - default: - vm.Debugf("(pc) %-3v Unknown opcode %v\n", pc, op) - callState.PushError(errors.Errorf("unknown opcode %v", op)) - return nil - } - pc++ - } - return -} - -func createAccount(st Interface, creator, address crypto.Address) { - EnsurePermission(st, creator, permission.CreateAccount) - create(st, address) -} - -func create(st Interface, address crypto.Address) { - if IsRegisteredNativeContract(address) { - st.PushError(errors.ErrorCodef(errors.ErrorCodeReservedAddress, - "cannot create account at %v because that address is reserved for a native contract", address)) - } - st.CreateAccount(address) -} - -// Returns a subslice from offset of length length and a bool -// (true iff slice was possible). If the subslice -// extends past the end of data it returns A COPY of the segment at the end of -// data padded with zeroes on the right. If offset == len(data) it returns all -// zeroes. if offset > len(data) it returns a false -func subslice(data []byte, offset, length int64, err errors.Sink) []byte { - size := int64(len(data)) - if size < offset || offset < 0 || length < 0 { - err.PushError(errors.ErrorCodef(errors.ErrorCodeInputOutOfBounds, - "subslice could not slice data of size %d at offset %d for length %d", size, offset, length)) - return nil - } - if size < offset+length { - // Extract slice from offset to end padding to requested length - ret := make([]byte, length) - copy(ret, data[offset:]) - return ret - } - return data[offset : offset+length] -} - -func codeGetOp(code []byte, n int64) OpCode { - if int64(len(code)) <= n { - return OpCode(0) // stop - } else { - return OpCode(code[n]) - } -} - -func (vm *VM) jump(code []byte, to int64, pc *int64, err errors.Sink) { - dest := codeGetOp(code, to) - if dest != JUMPDEST { - vm.Debugf(" ~> %v invalid jump dest %v\n", to, dest) - err.PushError(errors.ErrorCodeInvalidJumpDest) - return - } - vm.Debugf(" ~> %v\n", to) - *pc = to -} - -func transfer(st Interface, from, to crypto.Address, amount uint64) errors.CodedError { - if amount == 0 { - return nil - } - if st.GetBalance(from) < amount { - return errors.ErrorCodeInsufficientBalance - } else { - st.SubtractFromBalance(from, amount) - st.AddToBalance(to, amount) - } - err := st.Error() - if err != nil { - return err - } - return nil -} - -// Dump the bytecode being sent to the EVM in the current working directory -func dumpTokens(nonce []byte, caller, callee crypto.Address, code []byte) { - var tokensString string - tokens, err := acm.Bytecode(code).Tokens() - if err != nil { - tokensString = fmt.Sprintf("error generating tokens from bytecode: %v", err) - } else { - tokensString = strings.Join(tokens, "\n") - } - txHashString := "nil-nonce" - if len(nonce) >= 4 { - txHashString = fmt.Sprintf("nonce-%X", nonce[:4]) - } - callerString := "caller-none" - if caller != crypto.ZeroAddress { - callerString = fmt.Sprintf("caller-%v", caller) - } - calleeString := "callee-none" - if callee != crypto.ZeroAddress { - calleeString = fmt.Sprintf("callee-%v", caller) - } - ioutil.WriteFile(fmt.Sprintf("tokens_%s_%s_%s.asm", txHashString, callerString, calleeString), - []byte(tokensString), 0777) -} - -func (vm *VM) ensureStackDepth() errors.CodedError { - if vm.params.CallStackMaxDepth > 0 && vm.stackDepth == vm.params.CallStackMaxDepth { - return errors.ErrorCodeCallStackOverflow - } - return nil -} - -func newRevertException(ret []byte) errors.CodedError { - code := errors.ErrorCodeExecutionReverted - if len(ret) > 0 { - // Attempt decode - reason, err := abi.UnpackRevert(ret) - if err == nil { - return errors.ErrorCodef(code, "with reason '%s'", *reason) - } - } - return code -} diff --git a/execution/evm/vm_test.go b/execution/evm/vm_test.go deleted file mode 100644 index a40ea0167..000000000 --- a/execution/evm/vm_test.go +++ /dev/null @@ -1,1504 +0,0 @@ -// Copyright 2017 Monax Industries Limited -// -// 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 evm - -import ( - bin "encoding/binary" - "fmt" - "strconv" - "testing" - "time" - - "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/acm/acmstate" - "github.com/hyperledger/burrow/binary" - . "github.com/hyperledger/burrow/binary" - "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/execution/errors" - . "github.com/hyperledger/burrow/execution/evm/asm" - . "github.com/hyperledger/burrow/execution/evm/asm/bc" - "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/logging" - "github.com/hyperledger/burrow/permission" - "github.com/hyperledger/burrow/txs" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/tmthrgd/go-hex" - "golang.org/x/crypto/ripemd160" -) - -// Test output is a bit clearer if we /dev/null the logging, but can be re-enabled by uncommenting the below -//var logger, _, _ = lifecycle.NewStdErrLogger() -// -var logger = logging.NewNoopLogger() - -type testState struct { - *State - BlockHashProvider func(blockNumber uint64) (Word256, error) -} - -func NewTestState(st acmstate.ReaderWriter, blockHashGetter func(uint64) []byte) *testState { - evmState := NewState(st, blockHashGetter) - return &testState{ - State: evmState, - BlockHashProvider: evmState.GetBlockHash, - } -} - -func newAppState() *FakeAppState { - fas := &FakeAppState{ - accounts: make(map[crypto.Address]*acm.Account), - storage: make(map[string][]byte), - } - // For default permissions - fas.accounts[acm.GlobalPermissionsAddress] = &acm.Account{ - Permissions: permission.DefaultAccountPermissions, - } - return fas -} - -func newParams() Params { - return Params{ - BlockHeight: 0, - BlockTime: 0, - GasLimit: 0, - } -} - -func newAddress(name string) crypto.Address { - hasher := ripemd160.New() - hasher.Write([]byte(name)) - return crypto.MustAddressFromBytes(hasher.Sum(nil)) -} - -func newAccount(st Interface, name string) crypto.Address { - address := newAddress(name) - st.CreateAccount(address) - return address -} - -func makeAccountWithCode(st Interface, name string, code []byte) crypto.Address { - address := newAddress(name) - st.CreateAccount(address) - st.InitCode(address, code) - st.AddToBalance(address, 9999999) - return address -} - -// Runs a basic loop -func TestVM(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - // Create accounts - account1 := newAccount(cache, "1") - account2 := newAccount(cache, "101") - - var gas uint64 = 100000 - - bytecode := MustSplice(PUSH1, 0x00, PUSH1, 0x20, MSTORE, JUMPDEST, PUSH2, 0x0F, 0x0F, PUSH1, 0x20, MLOAD, - SLT, ISZERO, PUSH1, 0x1D, JUMPI, PUSH1, 0x01, PUSH1, 0x20, MLOAD, ADD, PUSH1, 0x20, - MSTORE, PUSH1, 0x05, JUMP, JUMPDEST) - - start := time.Now() - output, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - t.Logf("Output: %v Error: %v\n", output, err) - t.Logf("Call took: %v", time.Since(start)) - require.NoError(t, err) - require.NoError(t, cache.Error()) -} - -func TestSHL(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - account1 := newAccount(cache, "1") - account2 := newAccount(cache, "101") - - var gas uint64 = 100000 - - //Shift left 0 - bytecode := MustSplice(PUSH1, 0x01, PUSH1, 0x00, SHL, return1()) - output, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value := []uint8([]byte{0x1}) - expected := LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift left 0 - bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x00, SHL, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - expected = []uint8([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}) - - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Shift left 1 - bytecode = MustSplice(PUSH1, 0x01, PUSH1, 0x01, SHL, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x2}) - expected = LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift left 1 - bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x01, SHL, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - expected = []uint8([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE}) - - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift left 1 - bytecode = MustSplice(PUSH32, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x01, SHL, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - expected = []uint8([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE}) - - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Shift left 255 - bytecode = MustSplice(PUSH1, 0x01, PUSH1, 0xFF, SHL, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x80}) - expected = RightPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift left 255 - bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0xFF, SHL, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x80}) - expected = RightPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Shift left 256 (overflow) - bytecode = MustSplice(PUSH1, 0x01, PUSH2, 0x01, 0x00, SHL, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x00}) - expected = LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift left 256 (overflow) - bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH2, 0x01, 0x00, SHL, - return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x00}) - expected = LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Shift left 257 (overflow) - bytecode = MustSplice(PUSH1, 0x01, PUSH2, 0x01, 0x01, SHL, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x00}) - expected = LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - require.NoError(t, cache.Error()) -} - -func TestSHR(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - account1 := newAccount(cache, "1") - account2 := newAccount(cache, "101") - - var gas uint64 = 100000 - - //Shift right 0 - bytecode := MustSplice(PUSH1, 0x01, PUSH1, 0x00, SHR, return1()) - output, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value := []uint8([]byte{0x1}) - expected := LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift right 0 - bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x00, SHR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - expected = []uint8([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}) - - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Shift right 1 - bytecode = MustSplice(PUSH1, 0x01, PUSH1, 0x01, SHR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x00}) - expected = LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift right 1 - bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0x01, SHR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x40}) - expected = RightPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift right 1 - bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x01, SHR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - expected = []uint8([]byte{0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}) - - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Shift right 255 - bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0xFF, SHR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x1}) - expected = LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift right 255 - bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0xFF, SHR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x1}) - expected = LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Shift right 256 (underflow) - bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH2, 0x01, 0x00, SHR, - return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x00}) - expected = LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift right 256 (underflow) - bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH2, 0x01, 0x00, SHR, - return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x00}) - expected = LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Shift right 257 (underflow) - bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH2, 0x01, 0x01, SHR, - return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x00}) - expected = LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - require.NoError(t, cache.Error()) -} - -func TestSAR(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - account1 := newAccount(cache, "1") - account2 := newAccount(cache, "101") - - var gas uint64 = 100000 - - //Shift arith right 0 - bytecode := MustSplice(PUSH1, 0x01, PUSH1, 0x00, SAR, return1()) - output, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value := []uint8([]byte{0x1}) - expected := LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative arith shift right 0 - bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x00, SAR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - expected = []uint8([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}) - - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Shift arith right 1 - bytecode = MustSplice(PUSH1, 0x01, PUSH1, 0x01, SAR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x00}) - expected = LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift arith right 1 - bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0x01, SAR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0xc0}) - expected = RightPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift arith right 1 - bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x01, SAR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - expected = []uint8([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}) - - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Shift arith right 255 - bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0xFF, SAR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - expected = []uint8([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}) - - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift arith right 255 - bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0xFF, SAR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - expected = []uint8([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}) - - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift arith right 255 - bytecode = MustSplice(PUSH32, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0xFF, SAR, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x00}) - expected = RightPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Shift arith right 256 (reset) - bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH2, 0x01, 0x00, SAR, - return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - expected = []uint8([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}) - - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Alternative shift arith right 256 (reset) - bytecode = MustSplice(PUSH32, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH2, 0x01, 0x00, SAR, - return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - value = []uint8([]byte{0x00}) - expected = LeftPadBytes(value, 32) - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - //Shift arith right 257 (reset) - bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH2, 0x01, 0x01, SAR, - return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - expected = []uint8([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}) - - assert.Equal(t, expected, output) - - t.Logf("Result: %v == %v\n", output, expected) - - if err != nil { - t.Fatal(err) - } - - require.NoError(t, cache.Error()) -} - -//Test attempt to jump to bad destination (position 16) -func TestJumpErr(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - // Create accounts - account1 := newAccount(cache, "1") - account2 := newAccount(cache, "2") - - var gas uint64 = 100000 - - bytecode := MustSplice(PUSH1, 0x10, JUMP) - - var err error - ch := make(chan struct{}) - go func() { - _, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - ch <- struct{}{} - }() - tick := time.NewTicker(time.Second * 2) - select { - case <-tick.C: - t.Fatal("VM ended up in an infinite loop from bad jump dest (it took too long!)") - case <-ch: - if err == nil { - t.Fatal("Expected invalid jump dest err") - } - } -} - -// Tests the code for a subcurrency contract compiled by serpent -func TestSubcurrency(t *testing.T) { - st := newAppState() - cache := NewState(st, blockHashGetter) - // Create accounts - account1 := newAccount(cache, "1, 2, 3") - account2 := newAccount(cache, "3, 2, 1") - cache.Sync() - - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - var gas uint64 = 1000 - - bytecode := MustSplice(PUSH3, 0x0F, 0x42, 0x40, CALLER, SSTORE, PUSH29, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, - 0x00, CALLDATALOAD, DIV, PUSH4, 0x15, 0xCF, 0x26, 0x84, DUP2, EQ, ISZERO, PUSH2, - 0x00, 0x46, JUMPI, PUSH1, 0x04, CALLDATALOAD, PUSH1, 0x40, MSTORE, PUSH1, 0x40, - MLOAD, SLOAD, PUSH1, 0x60, MSTORE, PUSH1, 0x20, PUSH1, 0x60, RETURN, JUMPDEST, - PUSH4, 0x69, 0x32, 0x00, 0xCE, DUP2, EQ, ISZERO, PUSH2, 0x00, 0x87, JUMPI, PUSH1, - 0x04, CALLDATALOAD, PUSH1, 0x80, MSTORE, PUSH1, 0x24, CALLDATALOAD, PUSH1, 0xA0, - MSTORE, CALLER, SLOAD, PUSH1, 0xC0, MSTORE, CALLER, PUSH1, 0xE0, MSTORE, PUSH1, - 0xA0, MLOAD, PUSH1, 0xC0, MLOAD, SLT, ISZERO, ISZERO, PUSH2, 0x00, 0x86, JUMPI, - PUSH1, 0xA0, MLOAD, PUSH1, 0xC0, MLOAD, SUB, PUSH1, 0xE0, MLOAD, SSTORE, PUSH1, - 0xA0, MLOAD, PUSH1, 0x80, MLOAD, SLOAD, ADD, PUSH1, 0x80, MLOAD, SSTORE, JUMPDEST, - JUMPDEST, POP, JUMPDEST, PUSH1, 0x00, PUSH1, 0x00, RETURN) - - data := hex.MustDecodeString("693200CE0000000000000000000000004B4363CDE27C2EB05E66357DB05BC5C88F850C1A0000000000000000000000000000000000000000000000000000000000000005") - output, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, data, 0, &gas) - t.Logf("Output: %v Error: %v\n", output, err) - if err != nil { - t.Fatal(err) - } - require.NoError(t, cache.Error()) -} - -//This test case is taken from EIP-140 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-140.md); -//it is meant to test the implementation of the REVERT opcode -func TestRevert(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - // Create accounts - account1 := newAccount(cache, "1") - account2 := newAccount(cache, "1, 0, 1") - - key, value := []byte{0x00}, []byte{0x00} - cache.SetStorage(account1, LeftPadWord256(key), value) - - var gas uint64 = 100000 - - bytecode := MustSplice(PUSH13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x64, 0x61, 0x74, 0x61, - PUSH1, 0x00, SSTORE, PUSH32, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6D, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - PUSH1, 0x00, MSTORE, PUSH1, 0x0E, PUSH1, 0x00, REVERT) - - /*bytecode := MustSplice(PUSH32, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6D, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, PUSH1, 0x00, MSTORE, PUSH1, 0x0E, PUSH1, 0x00, REVERT)*/ - - output, cErr := ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - assert.Error(t, cErr, "Expected execution reverted error") - - storageVal := cache.GetStorage(account1, LeftPadWord256(key)) - assert.Equal(t, value, storageVal) - - t.Logf("Output: %v\n", output) -} - -// Test sending tokens from a contract to another account -func TestSendCall(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - // Create accounts - account1 := newAccount(cache, "1") - account2 := newAccount(cache, "2") - account3 := newAccount(cache, "3") - cache.Sync() - - // account1 will call account2 which will trigger CALL opcode to account3 - addr := account3 - contractCode := callContractCode(addr) - - //---------------------------------------------- - // account2 has insufficient balance, should fail - txe := runVM(cache, ourVm, account1, account2, contractCode, 100000) - exCalls := txe.ExceptionalCalls() - require.Len(t, exCalls, 1) - assertErrorCode(t, errors.ErrorCodeInsufficientBalance, exCalls[0].Header.Exception) - - //---------------------------------------------- - // give account2 sufficient balance, should pass - cache.AddToBalance(account2, 100000) - txe = runVM(cache, ourVm, account1, account2, contractCode, 1000) - assert.Nil(t, txe.Exception, "Should have sufficient balance") - - //---------------------------------------------- - // insufficient gas, should fail - txe = runVM(cache, ourVm, account1, account2, contractCode, 100) - assert.NotNil(t, txe.Exception, "Expected insufficient gas error") -} - -// Test to ensure that contracts called with STATICCALL cannot modify state -// as per https://github.com/ethereum/EIPs/blob/master/EIPS/eip-214.md -func TestStaticCallReadOnly(t *testing.T) { - gas1, gas2 := byte(0x1), byte(0x1) - value := byte(0x69) - var inOff, inSize, retOff, retSize byte - - logDefault := MustSplice(PUSH1, inSize, PUSH1, inOff) - testRecipient := newAddress("1") - // check all illegal state modifications in child staticcall frame - for _, illegalContractCode := range []acm.Bytecode{ - MustSplice(PUSH9, "arbitrary", PUSH1, 0x00, SSTORE), - MustSplice(logDefault, LOG0), - MustSplice(logDefault, PUSH1, 0x1, LOG1), - MustSplice(logDefault, PUSH1, 0x1, PUSH1, 0x1, LOG2), - MustSplice(logDefault, PUSH1, 0x1, PUSH1, 0x1, PUSH1, 0x1, LOG3), - MustSplice(logDefault, PUSH1, 0x1, PUSH1, 0x1, PUSH1, 0x1, PUSH1, 0x1, LOG4), - MustSplice(PUSH1, 0x0, PUSH1, 0x0, PUSH1, 0x69, CREATE), - MustSplice(PUSH20, testRecipient, SELFDESTRUCT), - } { - // TODO: CREATE2 - - t.Logf("Testing state-modifying bytecode: %v", illegalContractCode.MustTokens()) - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger, DebugOpcodes) - callee := makeAccountWithCode(cache, "callee", MustSplice(illegalContractCode, PUSH1, 0x1, return1())) - - // equivalent to CALL, but enforce state immutability for children - caller := makeAccountWithCode(cache, "caller", - MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, inOff, - PUSH1, value, PUSH20, callee, PUSH2, gas1, gas2, STATICCALL, PUSH1, retSize, - PUSH1, retOff, RETURN)) - - txe := runVM(cache, ourVm, caller, callee, cache.GetEVMCode(caller), 1000) - // the topmost caller can never *illegally* modify state - require.Error(t, txe.Exception) - assertErrorCode(t, errors.ErrorCodeIllegalWrite, txe.Exception, - "should get an error from child accounts that cache is read only") - } -} - -func TestStaticCallWithValue(t *testing.T) { - gas1, gas2 := byte(0x1), byte(0x1) - value := byte(0x69) - var inOff, inSize, retOff, retSize byte - - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - finalAddress := makeAccountWithCode(cache, "final", MustSplice(PUSH1, int64(20), return1())) - - // intermediate account CALLs another contract *with* a value - callee := makeAccountWithCode(cache, "callee", MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, - inOff, PUSH1, value, PUSH20, finalAddress, PUSH2, gas1, gas2, CALL, returnWord())) - - caller := makeAccountWithCode(cache, "caller", - MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, - inOff, PUSH1, value, PUSH20, callee, PUSH2, gas1, gas2, STATICCALL, PUSH1, retSize, - PUSH1, retOff, RETURN)) - - cache.AddToBalance(callee, 100000) - txe := runVM(cache, ourVm, caller, callee, cache.GetEVMCode(caller), 1000) - require.NotNil(t, txe.Exception) - assertErrorCode(t, errors.ErrorCodeIllegalWrite, txe.Exception, "expected static call violation because of call with value") -} - -func TestStaticCallNoValue(t *testing.T) { - gas1, gas2 := byte(0x1), byte(0x1) - value := byte(0x69) - var inOff, inSize, retOff, retSize byte - - // this final test just checks that STATICCALL actually works - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - finalAddress := makeAccountWithCode(cache, "final", MustSplice(PUSH1, int64(20), return1())) - // intermediate account CALLs another contract *without* a value - callee := makeAccountWithCode(cache, "callee", MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, - inOff, PUSH1, 0x00, PUSH20, finalAddress, PUSH2, gas1, gas2, CALL, returnWord())) - - caller := makeAccountWithCode(cache, "caller", - MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, - inOff, PUSH1, value, PUSH20, callee, PUSH2, gas1, gas2, STATICCALL, PUSH1, retSize, - PUSH1, retOff, RETURN)) - - cache.AddToBalance(callee, 100000) - txe := runVM(cache, ourVm, caller, callee, cache.GetEVMCode(caller), 1000) - // no exceptions expected because value never set in children - require.NoError(t, txe.Exception.AsError()) - exCalls := txe.ExceptionalCalls() - require.Len(t, exCalls, 0) -} - -// Test evm account creation -func TestCreate(t *testing.T) { - st := newAppState() - cache := NewState(st, blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - callee := makeAccountWithCode(cache, "callee", MustSplice(PUSH1, 0x0, PUSH1, 0x0, PUSH1, 0x0, CREATE, PUSH1, 0, MSTORE, PUSH1, 20, PUSH1, 12, RETURN)) - // ensure pre-generated address has same sequence number - nonce := make([]byte, txs.HashLength+uint64Length) - copy(nonce, ourVm.nonce) - bin.BigEndian.PutUint64(nonce[txs.HashLength:], ourVm.sequence+1) - addr := crypto.NewContractAddress(callee, nonce) - - var gas uint64 = 100000 - caller := newAccount(cache, "1, 2, 3") - output, err := ourVm.Call(cache, NewNoopEventSink(), caller, callee, cache.GetEVMCode(callee), []byte{}, 0, &gas) - assert.NoError(t, err, "Should return new address without error") - assert.Equal(t, addr.Bytes(), output, "Addresses should be equal") -} - -// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1014.md -func TestCreate2(t *testing.T) { - st := newAppState() - cache := NewState(st, blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - // salt of 0s - var salt [32]byte - callee := makeAccountWithCode(cache, "callee", MustSplice(PUSH1, 0x0, PUSH1, 0x0, PUSH1, 0x0, PUSH32, salt[:], CREATE2, PUSH1, 0, MSTORE, PUSH1, 20, PUSH1, 12, RETURN)) - addr := crypto.NewContractAddress2(callee, salt, cache.GetEVMCode(callee)) - - var gas uint64 = 100000 - caller := newAccount(cache, "1, 2, 3") - output, err := ourVm.Call(cache, NewNoopEventSink(), caller, callee, cache.GetEVMCode(callee), []byte{}, 0, &gas) - assert.NoError(t, err, "Should return new address without error") - assert.Equal(t, addr.Bytes(), output, "Returned value not equal to create2 address") -} - -// This test was introduced to cover an issues exposed in our handling of the -// gas limit passed from caller to callee on various forms of CALL. -// The idea of this test is to implement a simple DelegateCall in EVM code -// We first run the DELEGATECALL with _just_ enough gas expecting a simple return, -// and then run it with 1 gas unit less, expecting a failure -func TestDelegateCallGas(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - inOff := 0 - inSize := 0 // no call data - retOff := 0 - retSize := 32 - calleeReturnValue := int64(20) - - callee := makeAccountWithCode(cache, "callee", - MustSplice(PUSH1, calleeReturnValue, PUSH1, 0, MSTORE, PUSH1, 32, PUSH1, 0, RETURN)) - - // 6 op codes total - baseOpsCost := GasBaseOp * 6 - // 4 pushes - pushCost := GasStackOp * 4 - // 2 pushes 2 pops - returnCost := GasStackOp * 4 - // To push success/failure - resumeCost := GasStackOp - - // Gas is not allowed to drop to 0 so we add resumecost - delegateCallCost := baseOpsCost + pushCost + returnCost + resumeCost - - // Here we split up the caller code so we can make a DELEGATE call with - // different amounts of gas. The value we sandwich in the middle is the amount - // we subtract from the available gas (that the caller has available), so: - // code := MustSplice(callerCodePrefix, , callerCodeSuffix) - // gives us the code to make the call - callerCodePrefix := MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, - PUSH1, inOff, PUSH20, callee, PUSH1) - callerCodeSuffix := MustSplice(DELEGATECALL, returnWord()) - - // Perform a delegate call - caller := makeAccountWithCode(cache, "caller", MustSplice(callerCodePrefix, - // Give just enough gas to make the DELEGATECALL - delegateCallCost, callerCodeSuffix)) - - // Should pass - txe := runVM(cache, ourVm, caller, callee, cache.GetEVMCode(caller), 100) - assert.Nil(t, txe.Exception, "Should have sufficient funds for call") - assert.Equal(t, Int64ToWord256(calleeReturnValue).Bytes(), txe.Result.Return) - - caller2 := makeAccountWithCode(cache, "caller2", MustSplice(callerCodePrefix, - // Shouldn't be enough gas to make call - delegateCallCost-1, callerCodeSuffix)) - - // Should fail - txe = runVM(cache, ourVm, caller2, callee, cache.GetEVMCode(caller2), 100) - assert.NotNil(t, txe.Exception, "Should have insufficient gas for call") -} - -func TestMemoryBounds(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - memoryProvider := func(err errors.Sink) Memory { - return NewDynamicMemory(1024, 2048, err) - } - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger, MemoryProvider(memoryProvider)) - caller := makeAccountWithCode(cache, "caller", nil) - callee := makeAccountWithCode(cache, "callee", nil) - gas := uint64(100000) - // This attempts to store a value at the memory boundary and return it - word := One256 - output, err := ourVm.Call(cache, NewNoopEventSink(), caller, callee, - MustSplice(pushWord(word), storeAtEnd(), MLOAD, storeAtEnd(), returnAfterStore()), - nil, 0, &gas) - assert.NoError(t, err) - assert.Equal(t, word.Bytes(), output) - - // Same with number - word = Int64ToWord256(232234234432) - output, err = ourVm.Call(cache, NewNoopEventSink(), caller, callee, - MustSplice(pushWord(word), storeAtEnd(), MLOAD, storeAtEnd(), returnAfterStore()), - nil, 0, &gas) - assert.NoError(t, err) - assert.Equal(t, word.Bytes(), output) - - // Now test a series of boundary stores - code := pushWord(word) - for i := 0; i < 10; i++ { - code = MustSplice(code, storeAtEnd(), MLOAD) - } - output, err = ourVm.Call(cache, NewNoopEventSink(), caller, callee, MustSplice(code, storeAtEnd(), returnAfterStore()), - nil, 0, &gas) - assert.NoError(t, err) - assert.Equal(t, word.Bytes(), output) - - // Same as above but we should breach the upper memory limit set in memoryProvider - code = pushWord(word) - for i := 0; i < 100; i++ { - code = MustSplice(code, storeAtEnd(), MLOAD) - } - require.NoError(t, cache.Error()) - _, err = ourVm.Call(cache, NewNoopEventSink(), caller, callee, MustSplice(code, storeAtEnd(), returnAfterStore()), - nil, 0, &gas) - assert.Error(t, err, "Should hit memory out of bounds") -} - -func TestMsgSender(t *testing.T) { - st := newAppState() - cache := NewState(st, blockHashGetter) - account1 := newAccount(cache, "1, 2, 3") - account2 := newAccount(cache, "3, 2, 1") - - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - var gas uint64 = 100000 - - /* - pragma solidity ^0.5.4; - - contract SimpleStorage { - function get() public constant returns (address) { - return msg.sender; - } - } - */ - - // This bytecode is compiled from Solidity contract above using remix.ethereum.org online compiler - code := hex.MustDecodeString("6060604052341561000f57600080fd5b60ca8061001d6000396000f30060606040526004361060" + - "3f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680636d4ce63c14604457" + - "5b600080fd5b3415604e57600080fd5b60546096565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ff" + - "ffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000339050905600a165627a" + - "7a72305820b9ebf49535372094ae88f56d9ad18f2a79c146c8f56e7ef33b9402924045071e0029") - - // Run the contract initialisation code to obtain the contract code that would be mounted at account2 - contractCode, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, code, code, 0, &gas) - require.NoError(t, err) - - // Not needed for this test (since contract code is passed as argument to vm), but this is what an execution - // framework must do - cache.InitCode(account2, contractCode) - - // Input is the function hash of `get()` - input := hex.MustDecodeString("6d4ce63c") - - output, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, contractCode, input, 0, &gas) - require.NoError(t, err) - - assert.Equal(t, account1.Word256().Bytes(), output) - - require.NoError(t, cache.Error()) -} - -func TestInvalid(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - // Create accounts - account1 := newAccount(cache, "1") - account2 := newAccount(cache, "1, 0, 1") - - var gas uint64 = 100000 - - bytecode := MustSplice(PUSH32, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6D, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, PUSH1, 0x00, MSTORE, PUSH1, 0x0E, PUSH1, 0x00, INVALID) - - output, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - assert.Equal(t, errors.ErrorCodeExecutionAborted, err.ErrorCode()) - t.Logf("Output: %v Error: %v\n", output, err) -} - -func TestReturnDataSize(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - accountName := "account2addresstests" - - ret := "My return message" - callcode := MustSplice(PUSH32, RightPadWord256([]byte(ret)), PUSH1, 0x00, MSTORE, PUSH1, len(ret), PUSH1, 0x00, RETURN) - - // Create accounts - account1 := newAccount(cache, "1") - account2 := makeAccountWithCode(cache, accountName, callcode) - - var gas uint64 = 100000 - - gas1, gas2 := byte(0x1), byte(0x1) - value := byte(0x69) - inOff, inSize := byte(0x0), byte(0x0) // no call data - retOff, retSize := byte(0x0), byte(len(ret)) - - bytecode := MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, inOff, PUSH1, value, - PUSH20, account2, PUSH2, gas1, gas2, CALL, - RETURNDATASIZE, PUSH1, 0x00, MSTORE, PUSH1, 0x20, PUSH1, 0x00, RETURN) - - expected := Uint64ToWord256(uint64(len(ret))).Bytes() - - output, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - require.NoError(t, err) - assert.Equal(t, expected, output) - - t.Logf("Output: %v Error: %v\n", output, err) - - if err != nil { - t.Fatal(err) - } - require.NoError(t, cache.Error()) -} - -func TestReturnDataCopy(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - - accountName := "account2addresstests" - - ret := "My return message" - callcode := MustSplice(PUSH32, RightPadWord256([]byte(ret)), PUSH1, 0x00, MSTORE, PUSH1, len(ret), PUSH1, 0x00, RETURN) - - // Create accounts - account1 := newAccount(cache, "1") - account2 := makeAccountWithCode(cache, accountName, callcode) - - var gas uint64 = 100000 - - gas1, gas2 := byte(0x1), byte(0x1) - value := byte(0x69) - inOff, inSize := byte(0x0), byte(0x0) // no call data - retOff, retSize := byte(0x0), byte(len(ret)) - - bytecode := MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, inOff, PUSH1, value, - PUSH20, account2, PUSH2, gas1, gas2, CALL, RETURNDATASIZE, PUSH1, 0x00, PUSH1, 0x00, RETURNDATACOPY, - RETURNDATASIZE, PUSH1, 0x00, RETURN) - - expected := []byte(ret) - - output, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - require.NoError(t, err) - assert.Equal(t, expected, output) - - t.Logf("Output: %v Error: %v\n", output, err) - - require.NoError(t, cache.Error()) -} - -func TestCallNonExistent(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - account1 := newAccount(cache, "1") - cache.AddToBalance(account1, 10000) - unknownAddress := newAddress("nonexistent") - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - var gas uint64 - amt := uint64(100) - _, err := ourVm.Call(cache, NewNoopEventSink(), account1, unknownAddress, nil, nil, amt, &gas) - assertErrorCode(t, errors.ErrorCodeIllegalWrite, err, - "Should not be able to call account before creating it (even before initialising)") - assert.Equal(t, uint64(0), cache.GetBalance(unknownAddress)) -} - -func (ts testState) GetBlockHash(blockNumber uint64) (binary.Word256, error) { - return ts.BlockHashProvider(blockNumber) -} - -func TestGetBlockHash(t *testing.T) { - cache := NewTestState(newAppState(), blockHashGetter) - params := newParams() - - // Create accounts - account1 := newAccount(cache, "1") - account2 := newAccount(cache, "101") - - var gas uint64 = 100000 - - // Non existing block - params.BlockHeight = 1 - ourVm := NewVM(params, crypto.ZeroAddress, nil, logger) - bytecode := MustSplice(PUSH1, 2, BLOCKHASH) - _, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - assertErrorCode(t, errors.ErrorCodeInvalidBlockNumber, err, "attempt to get block hash of a non-existent block") - - // Excessive old block - cache.error = nil - params.BlockHeight = 258 - ourVm = NewVM(params, crypto.ZeroAddress, nil, logger) - bytecode = MustSplice(PUSH1, 1, BLOCKHASH) - - _, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - assertErrorCode(t, errors.ErrorCodeBlockNumberOutOfRange, err, "attempt to get block hash of a block outside of allowed range") - - // Get block hash - cache.error = nil - params.BlockHeight = 257 - cache.BlockHashProvider = func(blockNumber uint64) (Word256, error) { - // Should be just within range 257 - 2 = 255 (and the first and last block count in that range so add one = 256) - assert.Equal(t, uint64(2), blockNumber) - return One256, nil - } - ourVm = NewVM(params, crypto.ZeroAddress, nil, logger) - bytecode = MustSplice(PUSH1, 2, BLOCKHASH, return1()) - - output, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - assert.NoError(t, err) - assert.Equal(t, One256, LeftPadWord256(output)) - - // Get block hash fail - cache.error = nil - params.BlockHeight = 3 - cache.BlockHashProvider = func(blockNumber uint64) (Word256, error) { - assert.Equal(t, uint64(1), blockNumber) - return Zero256, fmt.Errorf("unknown block %v", blockNumber) - } - ourVm = NewVM(params, crypto.ZeroAddress, nil, logger) - bytecode = MustSplice(PUSH1, 1, BLOCKHASH, return1()) - - _, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - assertErrorCode(t, errors.ErrorCodeInvalidBlockNumber, err, "attempt to get block hash failed") -} - -// These code segment helpers exercise the MSTORE MLOAD MSTORE cycle to test -// both of the memory operations. Each MSTORE is done on the memory boundary -// (at MSIZE) which Solidity uses to find guaranteed unallocated memory. - -// storeAtEnd expects the value to be stored to be on top of the stack, it then -// stores that value at the current memory boundary -func storeAtEnd() []byte { - // Pull in MSIZE (to carry forward to MLOAD), swap in value to store, store it at MSIZE - return MustSplice(MSIZE, SWAP1, DUP2, MSTORE) -} - -func returnAfterStore() []byte { - return MustSplice(PUSH1, 32, DUP2, RETURN) -} - -// Store the top element of the stack (which is a 32-byte word) in memory -// and return it. Useful for a simple return value. -func return1() []byte { - return MustSplice(PUSH1, 0, MSTORE, returnWord()) -} - -func returnWord() []byte { - // PUSH1 => return size, PUSH1 => return offset, RETURN - return MustSplice(PUSH1, 32, PUSH1, 0, RETURN) -} - -// Subscribes to an AccCall, runs the vm, returns the output any direct exception -// and then waits for any exceptions transmitted by Data in the AccCall -// event (in the case of no direct error from call we will block waiting for -// at least 1 AccCall event) -func runVM(vmCache Interface, ourVm *VM, caller, callee crypto.Address, contractCode []byte, - gas uint64) *exec.TxExecution { - gasBefore := gas - txe := new(exec.TxExecution) - output, err := ourVm.Call(vmCache, txe, caller, callee, contractCode, []byte{}, 0, &gas) - txe.PushError(err) - for _, ev := range txe.ExceptionalCalls() { - txe.PushError(ev.Header.Exception) - } - txe.Return(output, gasBefore-gas) - return txe -} - -// this is code to call another contract (hardcoded as addr) -func callContractCode(addr crypto.Address) []byte { - gas1, gas2 := byte(0x1), byte(0x1) - value := byte(0x69) - inOff, inSize := byte(0x0), byte(0x0) // no call data - retOff, retSize := byte(0x0), byte(0x20) - // this is the code we want to run (send funds to an account and return) - return MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, - inOff, PUSH1, value, PUSH20, addr, PUSH2, gas1, gas2, CALL, PUSH1, retSize, - PUSH1, retOff, RETURN) -} - -// Produce bytecode for a PUSH, b_1, ..., b_N where the N is number of bytes -// contained in the unpadded word -func pushWord(word Word256) []byte { - leadingZeros := byte(0) - for leadingZeros < 32 { - if word[leadingZeros] == 0 { - leadingZeros++ - } else { - return MustSplice(byte(PUSH32)-leadingZeros, word[leadingZeros:]) - } - } - return MustSplice(PUSH1, 0) -} - -func TestPushWord(t *testing.T) { - word := Int64ToWord256(int64(2133213213)) - assert.Equal(t, MustSplice(PUSH4, 0x7F, 0x26, 0x40, 0x1D), pushWord(word)) - word[0] = 1 - assert.Equal(t, MustSplice(PUSH32, - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0x7F, 0x26, 0x40, 0x1D), pushWord(word)) - assert.Equal(t, MustSplice(PUSH1, 0), pushWord(Word256{})) - assert.Equal(t, MustSplice(PUSH1, 1), pushWord(Int64ToWord256(1))) -} - -// Kind of indirect test of Splice, but here to avoid import cycles -func TestBytecode(t *testing.T) { - assert.Equal(t, - MustSplice(1, 2, 3, 4, 5, 6), - MustSplice(1, 2, 3, MustSplice(4, 5, 6))) - assert.Equal(t, - MustSplice(1, 2, 3, 4, 5, 6, 7, 8), - MustSplice(1, 2, 3, MustSplice(4, MustSplice(5), 6), 7, 8)) - assert.Equal(t, - MustSplice(PUSH1, 2), - MustSplice(byte(PUSH1), 0x02)) - assert.Equal(t, - []byte{}, - MustSplice(MustSplice(MustSplice()))) - - contractAccount := &acm.Account{Address: crypto.AddressFromWord256(Int64ToWord256(102))} - addr := contractAccount.Address - gas1, gas2 := byte(0x1), byte(0x1) - value := byte(0x69) - inOff, inSize := byte(0x0), byte(0x0) // no call data - retOff, retSize := byte(0x0), byte(0x20) - contractCodeBytecode := MustSplice(PUSH1, retSize, PUSH1, retOff, PUSH1, inSize, PUSH1, - inOff, PUSH1, value, PUSH20, addr, PUSH2, gas1, gas2, CALL, PUSH1, retSize, - PUSH1, retOff, RETURN) - contractCode := []byte{0x60, retSize, 0x60, retOff, 0x60, inSize, 0x60, inOff, 0x60, value, 0x73} - contractCode = append(contractCode, addr[:]...) - contractCode = append(contractCode, []byte{0x61, gas1, gas2, 0xf1, 0x60, 0x20, 0x60, 0x0, 0xf3}...) - assert.Equal(t, contractCode, contractCodeBytecode) -} - -func TestConcat(t *testing.T) { - assert.Equal(t, - []byte{0x01, 0x02, 0x03, 0x04}, - Concat([]byte{0x01, 0x02}, []byte{0x03, 0x04})) -} - -func TestSubslice(t *testing.T) { - const size = 10 - data := make([]byte, size) - for i := 0; i < size; i++ { - data[i] = byte(i) - } - err := errors.FirstOnly() - for n := int64(0); n < size; n++ { - data = data[:n] - for offset := int64(-size); offset < size; offset++ { - for length := int64(-size); length < size; length++ { - err.Reset() - subslice(data, offset, length, err) - if offset < 0 || length < 0 || n < offset { - assert.NotNil(t, err.Error()) - } else { - assert.Nil(t, err.Error()) - } - } - } - } - - err.Reset() - assert.Equal(t, []byte{ - 5, 6, 7, 8, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }, subslice([]byte{1, 2, 3, 4, 5, 6, 7, 8}, 4, 32, err)) -} - -func TestHasPermission(t *testing.T) { - st := newAppState() - - base, err := permission.BasePermissionsFromStringList([]string{"createContract", "createAccount", "bond", "proposal", "setBase", "unsetBase", "setGlobal", "addRole", "removeRole"}) - require.NoError(t, err) - acc := &acm.Account{ - Address: newAddress("frog"), - Permissions: permission.AccountPermissions{ - Base: base, - }, - } - require.NoError(t, st.UpdateAccount(acc)) - // Ensure we are falling through to global permissions on those bits not set - cache := NewState(st, blockHashGetter) - flag, err := permission.PermFlagFromStringList([]string{"send", "call", "name", "hasRole"}) - require.NoError(t, err) - assert.True(t, HasPermission(cache, acc.Address, flag)) - require.NoError(t, cache.Error()) -} - -func TestDataStackOverflow(t *testing.T) { - st := newAppState() - cache := NewState(st, blockHashGetter) - account1 := newAccount(cache, "1, 2, 3") - account2 := newAccount(cache, "3, 2, 1") - - params := newParams() - params.DataStackMaxDepth = 4 - ourVm := NewVM(params, crypto.ZeroAddress, nil, logger) - - var gas uint64 = 100000 - - /* - pragma solidity ^0.5.4; - - contract SimpleStorage { - function get() public constant returns (address) { - return get(); - } - } - */ - - // This bytecode is compiled from Solidity contract above using remix.ethereum.org online compiler - code, err := hex.DecodeString("608060405234801561001057600080fd5b5060d18061001f6000396000f300608060405260043610" + - "603f576000357c0100000000000000000000000000000000000000000000000000000000900463ff" + - "ffffff1680636d4ce63c146044575b600080fd5b348015604f57600080fd5b5060566098565b6040" + - "51808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffff" + - "ffffffffffff16815260200191505060405180910390f35b600060a06098565b9050905600a16562" + - "7a7a72305820daacfba0c21afacb5b67f26bc8021de63eaa560db82f98357d4e513f3249cf350029") - require.NoError(t, err) - - // Run the contract initialisation code to obtain the contract code that would be mounted at account2 - eventSink := NewNoopEventSink() - contractCode, err := ourVm.Call(cache, eventSink, account1, account2, code, code, 0, &gas) - require.NoError(t, err) - - // Input is the function hash of `get()` - input, err := hex.DecodeString("6d4ce63c") - require.NoError(t, err) - - _, err = ourVm.Call(cache, eventSink, account1, account2, contractCode, input, 0, &gas) - assertErrorCode(t, errors.ErrorCodeDataStackOverflow, err, "Should be stack overflow") -} - -func TestCallStackOverflow(t *testing.T) { - st := newAppState() - cache := NewState(st, blockHashGetter) - account1 := newAccount(cache, "1, 2, 3") - account2 := newAccount(cache, "3, 2, 1") - - params := newParams() - - // Sender accepts lot of gaz but we run on a caped call stack node - var gas uint64 = 100000 - params.CallStackMaxDepth = 2 - - ourVm := NewVM(params, crypto.ZeroAddress, nil, logger) - - /* - pragma solidity ^0.5.4; - - contract A { - function callMeBack() public { - return require(msg.sender.call(bytes4(keccak256("callMeBack()")),this)); - } - } - */ - - // This bytecode is compiled from Solidity contract above using remix.ethereum.org online compiler - code, err := hex.DecodeString("608060405234801561001057600080fd5b5061017a806100206000396000f3006080604052600436" + - "10610041576000357c01000000000000000000000000000000000000000000000000000000009004" + - "63ffffffff168063692c3b7c14610046575b600080fd5b34801561005257600080fd5b5061005b61" + - "005d565b005b3373ffffffffffffffffffffffffffffffffffffffff1660405180807f63616c6c4d" + - "654261636b28290000000000000000000000000000000000000000815250600c0190506040518091" + - "0390207c010000000000000000000000000000000000000000000000000000000090043060405182" + - "63ffffffff167c010000000000000000000000000000000000000000000000000000000002815260" + - "0401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffff" + - "ffffffffffffff1681526020019150506000604051808303816000875af192505050151561014c57" + - "600080fd5b5600a165627a7a723058209315a40abb8b23b7c2a340e938b01367b419a23818475a2e" + - "ee80d09da3f7ba780029") - require.NoError(t, err) - - // Run the contract initialisation code to obtain the contract code that would be mounted at account2 - contractCode, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, code, code, 0, &gas) - require.NoError(t, err) - - cache.InitCode(account1, contractCode) - cache.InitCode(account2, contractCode) - - // keccak256 hash of 'callMeBack()' - input, err := hex.DecodeString("692c3b7c") - require.NoError(t, err) - - txe := new(exec.TxExecution) - _, err = ourVm.Call(cache, txe, account1, account2, contractCode, input, 0, &gas) - txe.PushError(err) - require.Error(t, err) - callError := txe.CallError() - require.Error(t, callError) - assertErrorCode(t, errors.ErrorCodeExecutionReverted, callError) - // Errors are post-order so first is deepest - deepestErr := callError.NestedErrors[0] - assertErrorCode(t, errors.ErrorCodeCallStackOverflow, deepestErr) - assert.Equal(t, params.CallStackMaxDepth, deepestErr.StackDepth) - assert.Equal(t, account2, deepestErr.Callee) - assert.Equal(t, account1, deepestErr.Caller) -} - -func TestExtCodeHash(t *testing.T) { - cache := NewState(newAppState(), blockHashGetter) - ourVm := NewVM(newParams(), crypto.ZeroAddress, nil, logger) - account1 := newAccount(cache, "1") - account2 := newAccount(cache, "101") - - var gas uint64 = 100000 - - // 1. The EXTCODEHASH of the account without code is c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 - // what is the keccack256 hash of empty data. - bytecode := MustSplice(PUSH20, account1, EXTCODEHASH, return1()) - output, err := ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - assert.NoError(t, err) - assert.Equal(t, hex.MustDecodeString("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"), output) - - // 2. The EXTCODEHASH of non-existent account is 0. - bytecode = MustSplice(PUSH1, 0x03, EXTCODEHASH, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - assert.NoError(t, err) - assert.Equal(t, LeftPadBytes([]uint8([]byte{0x00}), 32), output) - - // 3. EXTCODEHASH is the hash of an account code - acc := makeAccountWithCode(cache, "trustedCode", MustSplice(BLOCKHASH, return1())) - bytecode = MustSplice(PUSH20, acc, EXTCODEHASH, return1()) - output, err = ourVm.Call(cache, NewNoopEventSink(), account1, account2, bytecode, []byte{}, 0, &gas) - assert.NoError(t, err) - assert.Equal(t, hex.MustDecodeString("010da270094b5199d3e54f89afe4c66cdd658dd8111a41998714227e14e171bd"), output) -} - -func BasePermissionsFromStrings(t *testing.T, perms, setBit string) permission.BasePermissions { - return permission.BasePermissions{ - Perms: PermFlagFromString(t, perms), - SetBit: PermFlagFromString(t, setBit), - } -} - -func PermFlagFromString(t *testing.T, binaryString string) permission.PermFlag { - permFlag, err := strconv.ParseUint(binaryString, 2, 64) - require.NoError(t, err) - return permission.PermFlag(permFlag) -} - -func assertErrorCode(t *testing.T, expectedCode errors.Code, err error, msgAndArgs ...interface{}) { - if assert.Error(t, err, msgAndArgs...) { - actualCode := errors.AsException(err).Code - if !assert.Equal(t, expectedCode, actualCode, "expected error code %v", expectedCode) { - t.Logf("Expected '%v' but got '%v'", expectedCode, actualCode) - } - } -} diff --git a/execution/exec/call_event.go b/execution/exec/call_event.go index c7a5ef633..64b721810 100644 --- a/execution/exec/call_event.go +++ b/execution/exec/call_event.go @@ -7,7 +7,6 @@ const ( CallTypeCode = CallType(0x01) CallTypeDelegate = CallType(0x02) CallTypeStatic = CallType(0x03) - CallTypeSNative = CallType(0x04) ) var nameFromCallType = map[CallType]string{ @@ -15,7 +14,6 @@ var nameFromCallType = map[CallType]string{ CallTypeCode: "CallCode", CallTypeDelegate: "DelegateCall", CallTypeStatic: "StaticCall", - CallTypeSNative: "SNativeCall", } var callTypeFromName = make(map[string]CallType) diff --git a/execution/evm/event_sink.go b/execution/exec/event_sink.go similarity index 59% rename from execution/evm/event_sink.go rename to execution/exec/event_sink.go index 04642db24..91ac5821e 100644 --- a/execution/evm/event_sink.go +++ b/execution/exec/event_sink.go @@ -1,13 +1,12 @@ -package evm +package exec import ( "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/execution/exec" ) type EventSink interface { - Call(call *exec.CallEvent, exception *errors.Exception) error - Log(log *exec.LogEvent) error + Call(call *CallEvent, exception *errors.Exception) error + Log(log *LogEvent) error } type noopEventSink struct { @@ -17,11 +16,11 @@ func NewNoopEventSink() *noopEventSink { return &noopEventSink{} } -func (es *noopEventSink) Call(call *exec.CallEvent, exception *errors.Exception) error { +func (es *noopEventSink) Call(call *CallEvent, exception *errors.Exception) error { return nil } -func (es *noopEventSink) Log(log *exec.LogEvent) error { +func (es *noopEventSink) Log(log *LogEvent) error { return nil } @@ -35,7 +34,7 @@ func NewLogFreeEventSink(eventSink EventSink) *logFreeEventSink { } } -func (esc *logFreeEventSink) Log(log *exec.LogEvent) error { +func (esc *logFreeEventSink) Log(log *LogEvent) error { return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, "Log emitted from contract %v, but current call should be log-free", log.Address) } diff --git a/execution/exec/tx_execution.go b/execution/exec/tx_execution.go index effe87acb..6b46dc344 100644 --- a/execution/exec/tx_execution.go +++ b/execution/exec/tx_execution.go @@ -131,7 +131,10 @@ func (txe *TxExecution) GovernAccount(governAccount *GovernAccountEvent, excepti // Errors pushed to TxExecutions end up in merkle state so it is essential that they are deterministic and independent // of the code path taken to execution (e.g. replay takes a different path to that of normal consensus reactor so stack // traces may differ - as they may across architectures) -func (txe *TxExecution) PushError(err error) { +func (txe *TxExecution) PushError(err error) bool { + if err == nil { + return false + } if txe.Exception == nil { // Don't forget the nil jig ex := errors.AsException(err) @@ -139,6 +142,7 @@ func (txe *TxExecution) PushError(err error) { txe.Exception = ex } } + return true } func (txe *TxExecution) CallTrace() string { diff --git a/execution/execution.go b/execution/execution.go index d43c3d93c..47a4a12a0 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -27,6 +27,7 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/event" "github.com/hyperledger/burrow/execution/contexts" + "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm" "github.com/hyperledger/burrow/execution/exec" @@ -93,7 +94,7 @@ type executor struct { emitter *event.Emitter block *exec.BlockExecution logger *logging.Logger - vmOptions []func(*evm.VM) + vmOptions evm.Options contexts map[payload.Type]contexts.Context } @@ -112,23 +113,23 @@ func ParamsFromGenesis(genesisDoc *genesis.GenesisDoc) Params { var _ BatchExecutor = (*executor)(nil) // Wraps a cache of what is variously known as the 'check cache' and 'mempool' -func NewBatchChecker(backend ExecutorState, params Params, blockchain contexts.Blockchain, logger *logging.Logger, - options ...ExecutionOption) BatchExecutor { +func NewBatchChecker(backend ExecutorState, params Params, blockchain engine.Blockchain, logger *logging.Logger, + options ...Option) BatchExecutor { return newExecutor("CheckCache", false, params, backend, blockchain, nil, logger.WithScope("NewBatchExecutor"), options...) } -func NewBatchCommitter(backend ExecutorState, params Params, blockchain contexts.Blockchain, emitter *event.Emitter, - logger *logging.Logger, options ...ExecutionOption) BatchCommitter { +func NewBatchCommitter(backend ExecutorState, params Params, blockchain engine.Blockchain, emitter *event.Emitter, + logger *logging.Logger, options ...Option) BatchCommitter { return newExecutor("CommitCache", true, params, backend, blockchain, emitter, logger.WithScope("NewBatchCommitter"), options...) } -func newExecutor(name string, runCall bool, params Params, backend ExecutorState, blockchain contexts.Blockchain, - emitter *event.Emitter, logger *logging.Logger, options ...ExecutionOption) *executor { +func newExecutor(name string, runCall bool, params Params, backend ExecutorState, blockchain engine.Blockchain, + emitter *event.Emitter, logger *logging.Logger, options ...Option) *executor { exe := &executor{ runCall: runCall, params: params, @@ -149,40 +150,41 @@ func newExecutor(name string, runCall bool, params Params, backend ExecutorState } baseContexts := map[payload.Type]contexts.Context{ - payload.TypeSend: &contexts.SendContext{ - StateWriter: exe.stateCache, - Logger: exe.logger, - }, payload.TypeCall: &contexts.CallContext{ - Blockchain: blockchain, - StateWriter: exe.stateCache, - RunCall: runCall, - VMOptions: exe.vmOptions, - Logger: exe.logger, + EVM: evm.New(exe.vmOptions), + Blockchain: blockchain, + State: exe.stateCache, + RunCall: runCall, + Logger: exe.logger, + }, + payload.TypeSend: &contexts.SendContext{ + State: exe.stateCache, + Logger: exe.logger, }, payload.TypeName: &contexts.NameContext{ - Blockchain: blockchain, - StateWriter: exe.stateCache, - NameReg: exe.nameRegCache, - Logger: exe.logger, + Blockchain: blockchain, + State: exe.stateCache, + NameReg: exe.nameRegCache, + Logger: exe.logger, }, payload.TypePermissions: &contexts.PermissionsContext{ - StateWriter: exe.stateCache, - Logger: exe.logger, + State: exe.stateCache, + Logger: exe.logger, }, payload.TypeGovernance: &contexts.GovernanceContext{ ValidatorSet: exe.validatorCache, - StateWriter: exe.stateCache, + State: exe.stateCache, Logger: exe.logger, }, payload.TypeBond: &contexts.BondContext{ ValidatorSet: exe.validatorCache, - StateWriter: exe.stateCache, + State: exe.stateCache, Logger: exe.logger, }, payload.TypeUnbond: &contexts.UnbondContext{ ValidatorSet: exe.validatorCache, - StateWriter: exe.stateCache, + State: exe.stateCache, + Logger: exe.logger, }, payload.TypeIdentify: &contexts.IdentifyContext{ NodeWriter: exe.nodeRegCache, @@ -195,7 +197,7 @@ func newExecutor(name string, runCall bool, params Params, backend ExecutorState payload.TypeProposal: &contexts.ProposalContext{ ChainID: params.ChainID, ProposalThreshold: params.ProposalThreshold, - StateWriter: exe.stateCache, + State: exe.stateCache, ProposalReg: exe.proposalRegCache, Logger: exe.logger, Contexts: baseContexts, @@ -305,7 +307,11 @@ func (exe *executor) validateInputsAndStorePublicKeys(txEnv *txs.Envelope) error return errors.ErrorCodeInsufficientFunds } // Check for Input permission - v, err := acc.Permissions.Base.Compose(acmstate.GlobalAccountPermissions(exe.stateCache).Base).Get(permission.Input) + globalPerms, err := acmstate.GlobalAccountPermissions(exe.stateCache) + if err != nil { + return err + } + v, err := acc.Permissions.Base.Compose(globalPerms.Base).Get(permission.Input) if err != nil { return err } diff --git a/execution/execution_test.go b/execution/execution_test.go index ede6e9192..6a95e18ed 100644 --- a/execution/execution_test.go +++ b/execution/execution_test.go @@ -30,12 +30,12 @@ import ( "github.com/hyperledger/burrow/event" "github.com/hyperledger/burrow/event/query" "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/execution/evm" "github.com/hyperledger/burrow/execution/evm/abi" . "github.com/hyperledger/burrow/execution/evm/asm" "github.com/hyperledger/burrow/execution/evm/asm/bc" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/names" + "github.com/hyperledger/burrow/execution/native" "github.com/hyperledger/burrow/execution/state" "github.com/hyperledger/burrow/genesis" "github.com/hyperledger/burrow/logging" @@ -51,72 +51,11 @@ import ( ) var ( + permissionsContract = native.Permissions.GetByName("Permissions").(*native.Contract) dbBackend = dbm.MemDBBackend dbDir = "" - permissionsContract = evm.SNativeContracts()["Permissions"] ) -/* -Permission Tests: - -- SendTx: -x - 1 input, no perm, call perm, create perm -x - 1 input, perm -x - 2 inputs, one with perm one without - -- CallTx, CALL -x - 1 input, no perm, send perm, create perm -x - 1 input, perm -x - contract runs call but doesn't have call perm -x - contract runs call and has call perm -x - contract runs call (with perm), runs contract that runs call (without perm) -x - contract runs call (with perm), runs contract that runs call (with perm) - -- CallTx for Create, CREATE -x - 1 input, no perm, send perm, call perm -x - 1 input, perm -x - contract runs create but doesn't have create perm -x - contract runs create but has perm -x - contract runs call with empty address (has call and create perm) - -- NameTx - - no perm, send perm, call perm - - with perm - -- BondTx -x - 1 input, no perm -x - 1 input, perm -x - 1 bonder with perm, input without send or bond -x - 1 bonder with perm, input with send -x - 1 bonder with perm, input with bond -x - 2 inputs, one with perm one without - -- SendTx for new account -x - 1 input, 1 unknown ouput, input with send, not create (fail) -x - 1 input, 1 unknown ouput, input with send and create (pass) -x - 2 inputs, 1 unknown ouput, both inputs with send, one with create, one without (fail) -x - 2 inputs, 1 known output, 1 unknown ouput, one input with create, one without (fail) -x - 2 inputs, 1 unknown ouput, both inputs with send, both inputs with create (pass ) -x - 2 inputs, 1 known output, 1 unknown ouput, both inputs with create, (pass) - - -- CALL for new account -x - unknown output, without create (fail) -x - unknown output, with create (pass) - - -- SNative (CallTx, CALL): - - for each of CallTx, Call -x - call each snative without permission, fails -x - call each snative with permission, pass - - list: -x - base: has,set,unset -x - globals: set -x - roles: has, add, rm - - -*/ - // keys var users = makeUsers(10) var logger = logging.NewNoopLogger() @@ -170,7 +109,7 @@ func TestSendFails(t *testing.T) { require.Error(t, err) // simple send tx to unknown account without create_account perm should fail - acc := getAccount(exe.stateCache, users[3].GetAddress()) + acc := getAccount(t, exe.stateCache, users[3].GetAddress()) err = acc.Permissions.Base.Set(permission.Send, true) require.NoError(t, err) exe.stateCache.UpdateAccount(acc) @@ -449,8 +388,9 @@ func TestCreatePermission(t *testing.T) { require.NoError(t, err) // ensure the contract is there - contractAddr := crypto.NewContractAddress(tx.Input.Address, txHash(tx)) - contractAcc := getAccount(exe.stateCache, contractAddr) + hash := getTxHash(tx) + contractAddr := crypto.NewContractAddress(tx.Input.Address, hash) + contractAcc := getAccount(t, exe.stateCache, contractAddr) if contractAcc == nil { t.Fatalf("failed to create contract %s", contractAddr) } @@ -473,8 +413,9 @@ func TestCreatePermission(t *testing.T) { require.NoError(t, err) // ensure the contract is there - contractAddr = crypto.NewContractAddress(tx.Input.Address, txHash(tx)) - contractAcc = getAccount(exe.stateCache, contractAddr) + hash = getTxHash(tx) + contractAddr = crypto.NewContractAddress(tx.Input.Address, hash) + contractAcc = getAccount(t, exe.stateCache, contractAddr) if contractAcc == nil { t.Fatalf("failed to create contract %s", contractAddr) } @@ -532,7 +473,7 @@ func TestCreatePermission(t *testing.T) { // we need to subscribe to the Call event to detect the exception _, err = execTxWaitAccountCall(t, exe, txEnv, crypto.Address{}) // require.NoError(t, err) - zeroAcc := getAccount(exe.stateCache, crypto.Address{}) + zeroAcc := getAccount(t, exe.stateCache, crypto.Address{}) if len(zeroAcc.EVMCode) != 0 { t.Fatal("the zero account was given code from a CALL!") } @@ -591,7 +532,7 @@ func TestCreateAccountPermission(t *testing.T) { require.Error(t, err) // Two inputs, both with send, both with create, should pass - acc := getAccount(exe.stateCache, users[1].GetAddress()) + acc := getAccount(t, exe.stateCache, users[1].GetAddress()) acc.Permissions.Base.Set(permission.CreateAccount, true) exe.stateCache.UpdateAccount(acc) tx = payload.NewSendTx() @@ -621,7 +562,7 @@ func TestCreateAccountPermission(t *testing.T) { //---------------------------------------------------------- // CALL to unknown account - acc = getAccount(exe.stateCache, users[0].GetAddress()) + acc = getAccount(t, exe.stateCache, users[0].GetAddress()) acc.Permissions.Base.Set(permission.Call, true) err = exe.stateCache.UpdateAccount(acc) require.NoError(t, err) @@ -672,7 +613,7 @@ func TestCreateAccountPermission(t *testing.T) { var DougAddress crypto.Address func init() { - copy(DougAddress[:], ([]byte)("THISISDOUG")) + copy(DougAddress[:], "THISISDOUG") } func TestSNativeCALL(t *testing.T) { @@ -722,9 +663,11 @@ func TestSNativeCALL(t *testing.T) { fmt.Printf("Doug: %s\n", exe.permString(t, users[3].GetAddress())) fmt.Println("\n#### SetBase") // SetBase + snativeAddress, pF, data = snativePermTestInputCALL("setBase", users[3], permission.Bond, false) testSNativeCALLExpectFail(t, exe, doug, snativeAddress, data) testSNativeCALLExpectPass(t, exe, doug, pF, snativeAddress, data, func(ret []byte) error { return nil }) + snativeAddress, pF, data = snativePermTestInputCALL("hasBase", users[3], permission.Bond, false) testSNativeCALLExpectPass(t, exe, doug, pF, snativeAddress, data, func(ret []byte) error { // return value should be true or false as a 32 byte array... @@ -842,13 +785,13 @@ func TestSNativeTx(t *testing.T) { snativeArgs := snativePermTestInputTx("setBase", users[3], permission.Bond, false) testSNativeTxExpectFail(t, batchCommitter, snativeArgs) testSNativeTxExpectPass(t, batchCommitter, permission.SetBase, snativeArgs) - acc := getAccount(batchCommitter.stateCache, users[3].GetAddress()) + acc := getAccount(t, batchCommitter.stateCache, users[3].GetAddress()) if v, _ := acc.Permissions.Base.Get(permission.Bond); v { t.Fatal("expected permission to be set false") } snativeArgs = snativePermTestInputTx("setBase", users[3], permission.CreateContract, true) testSNativeTxExpectPass(t, batchCommitter, permission.SetBase, snativeArgs) - acc = getAccount(batchCommitter.stateCache, users[3].GetAddress()) + acc = getAccount(t, batchCommitter.stateCache, users[3].GetAddress()) if v, _ := acc.Permissions.Base.Get(permission.CreateContract); !v { t.Fatal("expected permission to be set true") } @@ -858,7 +801,7 @@ func TestSNativeTx(t *testing.T) { snativeArgs = snativePermTestInputTx("unsetBase", users[3], permission.CreateContract, false) testSNativeTxExpectFail(t, batchCommitter, snativeArgs) testSNativeTxExpectPass(t, batchCommitter, permission.UnsetBase, snativeArgs) - acc = getAccount(batchCommitter.stateCache, users[3].GetAddress()) + acc = getAccount(t, batchCommitter.stateCache, users[3].GetAddress()) if v, _ := acc.Permissions.Base.Get(permission.CreateContract); v { t.Fatal("expected permission to be set false") } @@ -868,7 +811,7 @@ func TestSNativeTx(t *testing.T) { snativeArgs = snativePermTestInputTx("setGlobal", users[3], permission.CreateContract, true) testSNativeTxExpectFail(t, batchCommitter, snativeArgs) testSNativeTxExpectPass(t, batchCommitter, permission.SetGlobal, snativeArgs) - acc = getAccount(batchCommitter.stateCache, acm.GlobalPermissionsAddress) + acc = getAccount(t, batchCommitter.stateCache, acm.GlobalPermissionsAddress) if v, _ := acc.Permissions.Base.Get(permission.CreateContract); !v { t.Fatal("expected permission to be set true") } @@ -878,7 +821,7 @@ func TestSNativeTx(t *testing.T) { snativeArgs = snativeRoleTestInputTx("addRole", users[3], "chuck") testSNativeTxExpectFail(t, batchCommitter, snativeArgs) testSNativeTxExpectPass(t, batchCommitter, permission.AddRole, snativeArgs) - acc = getAccount(batchCommitter.stateCache, users[3].GetAddress()) + acc = getAccount(t, batchCommitter.stateCache, users[3].GetAddress()) if v := acc.Permissions.HasRole("chuck"); !v { t.Fatal("expected role to be added") } @@ -888,17 +831,17 @@ func TestSNativeTx(t *testing.T) { snativeArgs = snativeRoleTestInputTx("removeRole", users[3], "chuck") testSNativeTxExpectFail(t, batchCommitter, snativeArgs) testSNativeTxExpectPass(t, batchCommitter, permission.RemoveRole, snativeArgs) - acc = getAccount(batchCommitter.stateCache, users[3].GetAddress()) + acc = getAccount(t, batchCommitter.stateCache, users[3].GetAddress()) if v := acc.Permissions.HasRole("chuck"); v { t.Fatal("expected role to be removed") } } func TestTxSequence(t *testing.T) { - st, privAccounts := makeGenesisState(3, true, 1000, 1, true, 1000) - acc0 := getAccount(st, privAccounts[0].GetAddress()) + st, privAccounts := makeGenesisState(3, 1) + acc0 := getAccount(t, st, privAccounts[0].GetAddress()) acc0PubKey := privAccounts[0].GetPublicKey() - acc1 := getAccount(st, privAccounts[1].GetAddress()) + acc1 := getAccount(t, st, privAccounts[1].GetAddress()) // Test a variety of sequence numbers for the tx. // The tx should only pass when i == 1. @@ -916,7 +859,7 @@ func TestTxSequence(t *testing.T) { t.Errorf("Expected good sequence to pass: %v", err) } // Check acc.Sequence. - newAcc0 := getAccount(exe.state, acc0.Address) + newAcc0 := getAccount(t, exe.state, acc0.Address) if newAcc0.Sequence != sequence { t.Errorf("Expected account sequence to change to %v, got %v", sequence, newAcc0.Sequence) @@ -927,7 +870,7 @@ func TestTxSequence(t *testing.T) { t.Errorf("Expected bad sequence to fail") } // Check acc.Sequence. (shouldn't have changed) - newAcc0 := getAccount(exe.state, acc0.Address) + newAcc0 := getAccount(t, exe.state, acc0.Address) if newAcc0.Sequence != acc0.Sequence { t.Errorf("Expected account sequence to not change from %v, got %v", acc0.Sequence, newAcc0.Sequence) @@ -1126,18 +1069,18 @@ var factoryCode = hex.MustDecodeString("60606040526000357C0100000000000000000000 func TestCreates(t *testing.T) { //evm.SetDebug(true) - st, privAccounts := makeGenesisState(3, true, 1000, 1, true, 1000) + st, privAccounts := makeGenesisState(3, 1) //val0 := state.GetValidatorInfo(privValidators[0].Address) - acc0 := getAccount(st, privAccounts[0].GetAddress()) - acc1 := getAccount(st, privAccounts[1].GetAddress()) - acc2 := getAccount(st, privAccounts[2].GetAddress()) + acc0 := getAccount(t, st, privAccounts[0].GetAddress()) + acc1 := getAccount(t, st, privAccounts[1].GetAddress()) + acc2 := getAccount(t, st, privAccounts[2].GetAddress()) exe := makeExecutor(st) - newAcc1 := getAccount(st, acc1.Address) + newAcc1 := getAccount(t, st, acc1.Address) newAcc1.EVMCode = preFactoryCode - newAcc2 := getAccount(st, acc2.Address) + newAcc2 := getAccount(t, st, acc2.Address) newAcc2.EVMCode = factoryCode exe.updateAccounts(t, newAcc1, newAcc2) @@ -1159,12 +1102,12 @@ func TestCreates(t *testing.T) { require.NoError(t, exe.signExecuteCommit(tx, privAccounts[0])) - acc1 = getAccount(st, acc1.Address) + acc1 = getAccount(t, st, acc1.Address) firstCreatedAddress, err := st.GetStorage(acc1.Address, LeftPadWord256(nil)) require.NoError(t, err) require.NotEqual(t, Zero256, firstCreatedAddress, "should not be zero address") - acc0 = getAccount(st, acc0.Address) + acc0 = getAccount(t, st, acc0.Address) // call the pre-factory, triggering the factory to run a create tx = &payload.CallTx{ Input: &payload.TxInput{ @@ -1179,7 +1122,7 @@ func TestCreates(t *testing.T) { require.NoError(t, exe.signExecuteCommit(tx, privAccounts[0])) - acc1 = getAccount(st, acc1.Address) + acc1 = getAccount(t, st, acc1.Address) secondCreatedAddress, err := st.GetStorage(acc1.Address, LeftPadWord256(nil)) require.NoError(t, err) require.NotEqual(t, Zero256, secondCreatedAddress, "should not be zero address") @@ -1190,7 +1133,7 @@ func TestCreates(t *testing.T) { } func TestContractSend(t *testing.T) { - st, privAccounts := makeGenesisState(3, true, 1000, 1, true, 1000) + st, privAccounts := makeGenesisState(3, 1) /* contract Caller { function send(address x){ @@ -1199,13 +1142,13 @@ func TestContractSend(t *testing.T) { } */ callerCode := hex.MustDecodeString("60606040526000357c0100000000000000000000000000000000000000000000000000000000900480633e58c58c146037576035565b005b604b6004808035906020019091905050604d565b005b8073ffffffffffffffffffffffffffffffffffffffff16600034604051809050600060405180830381858888f19350505050505b5056") - sendData := hex.MustDecodeString(hex.EncodeToString(abi.GetFunctionID("send(address)").Bytes())) + sendData := abi.GetFunctionID("send(address)").Bytes() - acc0 := getAccount(st, privAccounts[0].GetAddress()) - acc1 := getAccount(st, privAccounts[1].GetAddress()) - acc2 := getAccount(st, privAccounts[2].GetAddress()) + acc0 := getAccount(t, st, privAccounts[0].GetAddress()) + acc1 := getAccount(t, st, privAccounts[1].GetAddress()) + acc2 := getAccount(t, st, privAccounts[2].GetAddress()) - newAcc1 := getAccount(st, acc1.Address) + newAcc1 := getAccount(t, st, acc1.Address) newAcc1.EVMCode = callerCode _, _, err := st.Update(func(up state.Updatable) error { return up.UpdateAccount(newAcc1) @@ -1231,8 +1174,8 @@ func TestContractSend(t *testing.T) { err = exe.signExecuteCommit(tx, privAccounts[0]) require.NoError(t, err) - acc2 = getAccount(st, acc2.Address) - assert.Equal(t, sendAmt+acc2Balance, acc2.Balance, "value should be transferred") + acc2 = getAccount(t, st, acc2.Address) + require.Equal(t, sendAmt+acc2Balance, acc2.Balance, "value should be transferred") addressNonExistent := newAddress("nobody") @@ -1251,16 +1194,15 @@ func TestContractSend(t *testing.T) { err = exe.signExecuteCommit(tx, privAccounts[0]) require.NoError(t, err) - accNonExistent := getAccount(st, addressNonExistent) + accNonExistent := getAccount(t, st, addressNonExistent) assert.Equal(t, sendAmt, accNonExistent.Balance, "value should have been transferred") } func TestMerklePanic(t *testing.T) { - st, privAccounts := makeGenesisState(3, true, 1000, 1, true, - 1000) + st, privAccounts := makeGenesisState(3, 1) - acc0 := getAccount(st, privAccounts[0].GetAddress()) - acc1 := getAccount(st, privAccounts[1].GetAddress()) + acc0 := getAccount(t, st, privAccounts[0].GetAddress()) + acc1 := getAccount(t, st, privAccounts[1].GetAddress()) // SendTx. { @@ -1287,7 +1229,7 @@ func TestMerklePanic(t *testing.T) { // CallTx. Just runs through it and checks the transfer. See vm, rpc tests for more { stateCallTx := makeExecutor(copyState(t, st)) - newAcc1 := getAccount(stateCallTx, acc1.Address) + newAcc1 := getAccount(t, stateCallTx, acc1.Address) newAcc1.EVMCode = []byte{0x60} err := stateCallTx.stateCache.UpdateAccount(newAcc1) require.NoError(t, err) @@ -1306,13 +1248,48 @@ func TestMerklePanic(t *testing.T) { } } -// TODO: test overflows. -// TODO: test for unbonding validators. +// Ensure we are setting the origin +func TestOrigin(t *testing.T) { + st, privAccounts := makeGenesisState(3, 1) + exe := makeExecutor(st) + + origin := privAccounts[2] + calleeAddress := privAccounts[1].GetAddress() + + // Set a contract that stores the origin address in storage at loc + loc := []byte{3} + err := native.UpdateAccount(exe.stateCache, calleeAddress, func(acc *acm.Account) error { + acc.EVMCode = bc.MustSplice(ORIGIN, PUSH1, loc, SSTORE) + return nil + }) + require.NoError(t, err) + + // Call the origin-storing contract + tx := &payload.CallTx{ + Input: &payload.TxInput{ + Address: origin.GetAddress(), + Sequence: 1, + }, + Address: &calleeAddress, + GasLimit: 1000, + } + + err = exe.signExecuteCommit(tx, origin) + require.NoError(t, err) + + // Check the correct origin value is stored + val, err := st.GetStorage(calleeAddress, LeftPadWord256(loc)) + require.NoError(t, err) + + originAddress := LeftPadWord256(val) + assert.Equal(t, origin.GetAddress(), crypto.AddressFromWord256(originAddress)) +} + func TestTxs(t *testing.T) { - st, privAccounts := makeGenesisState(3, true, 1000, 1, true, 1000) + st, privAccounts := makeGenesisState(3, 1) - acc0 := getAccount(st, privAccounts[0].GetAddress()) - acc1 := getAccount(st, privAccounts[1].GetAddress()) + acc0 := getAccount(t, st, privAccounts[0].GetAddress()) + acc1 := getAccount(t, st, privAccounts[1].GetAddress()) // SendTx. { @@ -1335,12 +1312,12 @@ func TestTxs(t *testing.T) { err := makeExecutor(stateSendTx).signExecuteCommit(tx, privAccounts[0]) require.NoError(t, err) - newAcc0 := getAccount(stateSendTx, acc0.Address) + newAcc0 := getAccount(t, stateSendTx, acc0.Address) if acc0.Balance-1 != newAcc0.Balance { t.Errorf("Unexpected newAcc0 balance. Expected %v, got %v", acc0.Balance-1, newAcc0.Balance) } - newAcc1 := getAccount(stateSendTx, acc1.Address) + newAcc1 := getAccount(t, stateSendTx, acc1.Address) if acc1.Balance+1 != newAcc1.Balance { t.Errorf("Unexpected newAcc1 balance. Expected %v, got %v", acc1.Balance+1, newAcc1.Balance) @@ -1350,7 +1327,7 @@ func TestTxs(t *testing.T) { // CallTx. Just runs through it and checks the transfer. See vm, rpc tests for more { stateCallTx := copyState(t, st) - newAcc1 := getAccount(stateCallTx, acc1.Address) + newAcc1 := getAccount(t, stateCallTx, acc1.Address) newAcc1.EVMCode = []byte{0x60} _, _, err := stateCallTx.Update(func(up state.Updatable) error { return up.UpdateAccount(newAcc1) @@ -1368,12 +1345,12 @@ func TestTxs(t *testing.T) { err = makeExecutor(stateCallTx).signExecuteCommit(tx, privAccounts[0]) require.NoError(t, err) - newAcc0 := getAccount(stateCallTx, acc0.Address) + newAcc0 := getAccount(t, stateCallTx, acc0.Address) if acc0.Balance-1 != newAcc0.Balance { t.Errorf("Unexpected newAcc0 balance. Expected %v, got %v", acc0.Balance-1, newAcc0.Balance) } - newAcc1 = getAccount(stateCallTx, acc1.Address) + newAcc1 = getAccount(t, stateCallTx, acc1.Address) if acc1.Balance+1 != newAcc1.Balance { t.Errorf("Unexpected newAcc1 balance. Expected %v, got %v", acc1.Balance+1, newAcc1.Balance) @@ -1415,7 +1392,7 @@ proof-of-work chain as proof of what happened while they were gone ` err := exe.signExecuteCommit(tx, privAccounts[0]) require.NoError(t, err) - newAcc0 := getAccount(stateNameTx, acc0.Address) + newAcc0 := getAccount(t, stateNameTx, acc0.Address) if acc0.Balance-entryAmount != newAcc0.Balance { t.Errorf("Unexpected newAcc0 balance. Expected %v, got %v", acc0.Balance-entryAmount, newAcc0.Balance) @@ -1440,15 +1417,15 @@ proof-of-work chain as proof of what happened while they were gone ` } func TestSelfDestruct(t *testing.T) { - st, privAccounts := makeGenesisState(3, true, 1000, 1, true, 1000) + st, privAccounts := makeGenesisState(3, 1) - acc0 := getAccount(st, privAccounts[0].GetAddress()) + acc0 := getAccount(t, st, privAccounts[0].GetAddress()) acc0PubKey := privAccounts[0].GetPublicKey() - acc1 := getAccount(st, privAccounts[1].GetAddress()) - acc2 := getAccount(st, privAccounts[2].GetAddress()) + acc1 := getAccount(t, st, privAccounts[1].GetAddress()) + acc2 := getAccount(t, st, privAccounts[2].GetAddress()) sendingAmount, refundedBalance, oldBalance := uint64(1), acc1.Balance, acc2.Balance - newAcc1 := getAccount(st, acc1.Address) + newAcc1 := getAccount(t, st, acc1.Address) // store 0x1 at 0x1, push an address, then self-destruct:) contractCode := []byte{0x60, 0x01, 0x60, 0x01, 0x55, 0x73} @@ -1478,16 +1455,15 @@ func TestSelfDestruct(t *testing.T) { require.NoError(t, err) // acc2 should receive the sent funds and the contracts balance - newAcc2 := getAccount(st, acc2.Address) + newAcc2 := getAccount(t, st, acc2.Address) newBalance := sendingAmount + refundedBalance + oldBalance if newAcc2.Balance != newBalance { t.Errorf("Unexpected newAcc2 balance. Expected %v, got %v", newAcc2.Balance, newBalance) } - newAcc1 = getAccount(st, acc1.Address) - if newAcc1 != nil { - t.Errorf("Expected account to be removed") - } + accRemoved, err := st.GetAccount(acc1.Address) + require.NoError(t, err) + require.Nil(t, accRemoved, "Expected account to be removed") } //------------------------------------------------------------------------------------- @@ -1540,8 +1516,7 @@ func newBaseGenDoc(globalPerm, accountPerm permission.AccountPermissions) genesi } } -func makeGenesisState(numAccounts int, randBalance bool, minBalance uint64, numValidators int, randBonded bool, - minBonded int64) (*state.State, []*acm.PrivateAccount) { +func makeGenesisState(numAccounts int, numValidators int) (*state.State, []*acm.PrivateAccount) { testGenesisDoc, privAccounts, _ := deterministicGenesis.GenesisDoc(numAccounts, numValidators) s0, err := state.MakeGenesisState(dbm.NewMemDB(), testGenesisDoc) if err != nil { @@ -1554,11 +1529,10 @@ func makeGenesisState(numAccounts int, randBalance bool, minBalance uint64, numV return s0, privAccounts } -func getAccount(accountGetter acmstate.AccountGetter, address crypto.Address) *acm.Account { +func getAccount(t testing.TB, accountGetter acmstate.AccountGetter, address crypto.Address) *acm.Account { acc, err := accountGetter.GetAccount(address) - if err != nil { - panic(err) - } + require.NoError(t, err) + require.NotNil(t, acc) return acc } @@ -1577,7 +1551,10 @@ type testExecutor struct { func makeExecutor(state *state.State) *testExecutor { blockchain := newBlockchain(testGenesisDoc) - blockchain.CommitBlockAtHeight(time.Now(), []byte("hashily"), state.Hash(), HeightAtVersion(state.Version())) + err := blockchain.CommitBlockAtHeight(time.Now(), []byte("hashily"), state.Hash(), HeightAtVersion(state.Version())) + if err != nil { + panic(err) + } return &testExecutor{ Blockchain: blockchain, executor: newExecutor("makeExecutorCache", true, ParamsFromGenesis(testGenesisDoc), state, @@ -1625,8 +1602,9 @@ func (te *testExecutor) updateAccounts(t *testing.T, accounts ...*acm.Account) { } } -func txHash(tx payload.Payload) []byte { - return txs.Enclose(testChainID, tx).Tx.Hash() +func getTxHash(tx payload.Payload) []byte { + txEnv := txs.Enclose(testChainID, tx) + return txEnv.Tx.Hash() } func (te *testExecutor) signExecuteCommit(tx payload.Payload, signers ...acm.AddressableSigner) error { @@ -1718,7 +1696,7 @@ func testSNativeTxExpectPass(t *testing.T, batchCommitter *testExecutor, perm pe func testSNativeTx(t *testing.T, expectPass bool, batchCommitter *testExecutor, perm permission.PermFlag, snativeArgs permission.PermArgs) { - acc := getAccount(batchCommitter.stateCache, users[0].GetAddress()) + acc := getAccount(t, batchCommitter.stateCache, users[0].GetAddress()) if expectPass { acc.Permissions.Base.Set(perm, true) } @@ -1750,9 +1728,9 @@ func boolToWord256(v bool) Word256 { } func permNameToFuncID(name string) []byte { - function, err := permissionsContract.FunctionByName(name) - if err != nil { - panic("didn't find snative function signature!") + function := permissionsContract.FunctionByName(name) + if function == nil { + panic(fmt.Errorf("could not find permission function %s", name)) } id := function.Abi().FunctionID return id[:] @@ -1760,7 +1738,7 @@ func permNameToFuncID(name string) []byte { func snativePermTestInputCALL(name string, user acm.AddressableSigner, perm permission.PermFlag, val bool) (addr crypto.Address, pF permission.PermFlag, data []byte) { - addr = permissionsContract.Address() + addr = native.Permissions.GetByName("Permissions").Address() switch name { case "hasBase", "unsetBase": data = user.GetAddress().Word256().Bytes() @@ -1829,7 +1807,7 @@ func snativeRoleTestInputTx(name string, user acm.AddressableSigner, role string func callContractCode(contractAddr crypto.Address) []byte { // calldatacopy into mem and use as input to call memOff, inputOff := byte(0x0), byte(0x0) - value := byte(0x1) + value := byte(0x0) inOff := byte(0x0) retOff, retSize := byte(0x0), byte(0x20) diff --git a/execution/native/account.go b/execution/native/account.go new file mode 100644 index 000000000..8eb3d33f1 --- /dev/null +++ b/execution/native/account.go @@ -0,0 +1,218 @@ +package native + +import ( + "bytes" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/deploy/compile" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/txs/payload" +) + +func CreateAccount(st acmstate.ReaderWriter, address crypto.Address) error { + acc, err := st.GetAccount(address) + if err != nil { + return err + } + if acc != nil { + if acc.NativeName != "" { + return errors.ErrorCodef(errors.ErrorCodeReservedAddress, + "cannot create account at %v because that address is reserved for a native contract '%s'", + address, acc.NativeName) + } + return errors.ErrorCodef(errors.ErrorCodeDuplicateAddress, + "tried to create an account at an address that already exists: %v", address) + } + return st.UpdateAccount(&acm.Account{Address: address}) +} + +func InitCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) error { + return initCode(st, address, nil, code) +} + +func InitChildCode(st acmstate.ReaderWriter, address crypto.Address, parent crypto.Address, code []byte) error { + return initCode(st, address, &parent, code) +} + +func initCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.Address, code []byte) error { + acc, err := mustAccount(st, address) + if err != nil { + return err + } + if acc.EVMCode != nil || acc.WASMCode != nil { + return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, + "tried to initialise code for a contract that already has code: %v", address) + } + + acc.EVMCode = code + + // keccak256 hash of a contract's code + hash := sha3.NewKeccak256() + hash.Write(code) + codehash := hash.Sum(nil) + + forebear := &address + metamap := acc.ContractMeta + if parent != nil { + // find our ancestor, i.e. the initial contract that was deployed, from which this contract descends + ancestor, err := st.GetAccount(*parent) + if err != nil { + return err + } + if ancestor == nil { + return errors.ErrorCodef(errors.ErrorCodeNonExistentAccount, + "parent %v of account %v does not exist", *parent, address) + } + if ancestor.Forebear != nil { + ancestor, err = st.GetAccount(*ancestor.Forebear) + if err != nil { + return err + } + if ancestor == nil { + return errors.ErrorCodef(errors.ErrorCodeNonExistentAccount, + "forebear %v of account %v does not exist", *ancestor.Forebear, *parent) + } + forebear = ancestor.Forebear + } else { + forebear = parent + } + metamap = ancestor.ContractMeta + } + + // If we have a list of ABIs for this contract, we also know what contract code it is allowed to create + // For compatibility with older contracts, allow any contract to be created if we have no mappings + if metamap != nil && len(metamap) > 0 { + found := codehashPermitted(codehash, metamap) + + // Libraries lie about their deployed bytecode + if !found { + deployCodehash := compile.GetDeployCodeHash(code, address) + found = codehashPermitted(deployCodehash, metamap) + } + + if !found { + return errors.ErrorCodef(errors.ErrorCodeInvalidContractCode, + "could not find code with code hash: %X", codehash) + } + } + + acc.CodeHash = codehash + acc.Forebear = forebear + + return st.UpdateAccount(acc) +} + +func codehashPermitted(codehash []byte, metamap []*acm.ContractMeta) bool { + for _, m := range metamap { + if bytes.Equal(codehash, m.CodeHash) { + return true + } + } + + return false +} + +func InitWASMCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) error { + acc, err := mustAccount(st, address) + if err != nil { + return err + } + if acc.EVMCode != nil || acc.WASMCode != nil { + return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, + "tried to re-initialise code for contract %v", address) + } + + acc.WASMCode = code + // keccak256 hash of a contract's code + hash := sha3.NewKeccak256() + hash.Write(code) + acc.CodeHash = hash.Sum(nil) + return st.UpdateAccount(acc) +} + +func Transfer(st acmstate.ReaderWriter, from, to crypto.Address, amount uint64) error { + if amount == 0 { + return nil + } + acc, err := mustAccount(st, from) + if err != nil { + return err + } + if acc.Balance < amount { + return errors.ErrorCodeInsufficientBalance + } + err = UpdateAccount(st, from, func(account *acm.Account) error { + return account.SubtractFromBalance(amount) + }) + if err != nil { + return err + } + return UpdateAccount(st, to, func(account *acm.Account) error { + return account.AddToBalance(amount) + }) +} + +func UpdateContractMeta(st acmstate.ReaderWriter, address crypto.Address, payloadMeta []*payload.ContractMeta) error { + if len(payloadMeta) == 0 { + return nil + } + acc, err := mustAccount(st, address) + if err != nil { + return err + } + + contractMeta := make([]*acm.ContractMeta, len(payloadMeta)) + for i, abi := range payloadMeta { + metahash := acmstate.GetMetadataHash(abi.Meta) + contractMeta[i] = &acm.ContractMeta{ + MetadataHash: metahash[:], + CodeHash: abi.CodeHash, + } + err = st.SetMetadata(metahash, abi.Meta) + if err != nil { + return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, + "cannot update metadata for %v: %v", address, err) + } + } + acc.ContractMeta = contractMeta + return st.UpdateAccount(acc) +} + +func RemoveAccount(st acmstate.ReaderWriter, address crypto.Address) error { + acc, err := st.GetAccount(address) + if err != nil { + return err + } + if acc == nil { + return errors.ErrorCodef(errors.ErrorCodeDuplicateAddress, + "tried to remove an account at an address that does not exist: %v", address) + } + return st.RemoveAccount(address) +} + +func UpdateAccount(st acmstate.ReaderWriter, address crypto.Address, updater func(acc *acm.Account) error) error { + acc, err := mustAccount(st, address) + if err != nil { + return err + } + err = updater(acc) + if err != nil { + return err + } + return st.UpdateAccount(acc) +} + +func mustAccount(st acmstate.Reader, address crypto.Address) (*acm.Account, error) { + acc, err := st.GetAccount(address) + if err != nil { + return nil, err + } + if acc == nil { + return nil, errors.ErrorCodef(errors.ErrorCodeNonExistentAccount, + "account %v does not exist", address) + } + return acc, nil +} diff --git a/execution/native/account_test.go b/execution/native/account_test.go new file mode 100644 index 000000000..73b8d0e78 --- /dev/null +++ b/execution/native/account_test.go @@ -0,0 +1,93 @@ +package native + +import ( + "fmt" + "testing" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/errors" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestState_CreateAccount(t *testing.T) { + st := acmstate.NewMemoryState() + address := AddressFromName("frogs") + err := CreateAccount(st, address) + require.NoError(t, err) + err = CreateAccount(st, address) + require.Error(t, err) + require.Equal(t, errors.ErrorCodeDuplicateAddress, errors.ErrorCode(err)) + + st = acmstate.NewMemoryState() + err = CreateAccount(st, address) + require.NoError(t, err) + err = InitCode(st, address, []byte{1, 2, 3}) + require.NoError(t, err) +} + +func TestState_Sync(t *testing.T) { + backend := acmstate.NewCache(acmstate.NewMemoryState()) + st := engine.NewCallFrame(backend) + address := AddressFromName("frogs") + + err := CreateAccount(st, address) + require.NoError(t, err) + amt := uint64(1232) + addToBalance(t, st, address, amt) + err = st.Sync() + require.NoError(t, err) + + acc, err := backend.GetAccount(address) + require.NoError(t, err) + assert.Equal(t, acc.Balance, amt) +} + +func TestState_NewCache(t *testing.T) { + st := engine.NewCallFrame(acmstate.NewMemoryState()) + address := AddressFromName("frogs") + + cache, err := st.NewFrame() + require.NoError(t, err) + err = CreateAccount(cache, address) + require.NoError(t, err) + amt := uint64(1232) + addToBalance(t, cache, address, amt) + + acc, err := st.GetAccount(address) + require.NoError(t, err) + require.Nil(t, acc) + + // Sync through to cache + err = cache.Sync() + require.NoError(t, err) + + acc, err = mustAccount(cache, address) + require.NoError(t, err) + assert.Equal(t, amt, acc.Balance) + + cache, err = cache.NewFrame(acmstate.ReadOnly) + require.NoError(t, err) + cache, err = cache.NewFrame() + require.NoError(t, err) + err = UpdateAccount(cache, address, func(account *acm.Account) error { + return account.AddToBalance(amt) + }) + require.Error(t, err) + require.Equal(t, errors.ErrorCodeIllegalWrite, errors.ErrorCode(err)) +} + +func blockHashGetter(height uint64) []byte { + return binary.LeftPadWord256([]byte(fmt.Sprintf("block_hash_%d", height))).Bytes() +} + +func addToBalance(t testing.TB, st acmstate.ReaderWriter, address crypto.Address, amt uint64) { + err := UpdateAccount(st, address, func(account *acm.Account) error { + return account.AddToBalance(amt) + }) + require.NoError(t, err) +} diff --git a/execution/native/call.go b/execution/native/call.go new file mode 100644 index 000000000..ed23ce17a --- /dev/null +++ b/execution/native/call.go @@ -0,0 +1,39 @@ +package native + +import ( + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/exec" +) + +// Call provides a standard wrapper for implementing Callable.Call with appropriate error handling and event firing. +func Call(state engine.State, params engine.CallParams, execute func(engine.State, engine.CallParams) ([]byte, error)) ([]byte, error) { + maybe := new(errors.Maybe) + if params.CallType == exec.CallTypeCall || params.CallType == exec.CallTypeCode { + // NOTE: Delegate and Static CallTypes do not transfer the value to the callee. + maybe.PushError(Transfer(state.CallFrame, params.Caller, params.Callee, params.Value)) + } + + output := maybe.Bytes(execute(state, params)) + // fire the post call event (including exception if applicable) and make sure we return the accumulated call error + maybe.PushError(FireCallEvent(state.CallFrame, maybe.Error(), state.EventSink, output, params)) + return output, maybe.Error() +} + +func FireCallEvent(callFrame *engine.CallFrame, callErr error, eventSink exec.EventSink, output []byte, + params engine.CallParams) error { + // fire the post call event (including exception if applicable) + return eventSink.Call(&exec.CallEvent{ + CallType: params.CallType, + CallData: &exec.CallData{ + Caller: params.Caller, + Callee: params.Callee, + Data: params.Input, + Value: params.Value, + Gas: *params.Gas, + }, + Origin: params.Origin, + StackDepth: callFrame.CallStackDepth(), + Return: output, + }, errors.AsException(callErr)) +} diff --git a/execution/native/contract.go b/execution/native/contract.go new file mode 100644 index 000000000..a4f807a89 --- /dev/null +++ b/execution/native/contract.go @@ -0,0 +1,189 @@ +// Copyright 2017 Monax Industries Limited +// +// 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 native + +import ( + "fmt" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/evm/abi" + "github.com/hyperledger/burrow/logging" +) + +// +// SNative (from 'secure natives') are native (go) contracts that are dispatched +// based on account permissions and can access and modify an account's permissions +// + +// Instructions on adding an SNative function. First declare a function like so: +// +// func unsetBase(context Context, args unsetBaseArgs) (unsetBaseRets, error) { +// } +// +// The name of the function will be used as the name of the function in solidity. The +// first arguments is Context; this will give you access to state, and the logger +// etc. The second arguments must be a struct type. The members of this struct must be +// exported (start with uppercase letter), and they will be converted into arguments +// for the solidity function, with the same types. The first return value is a struct +// which defines the return values from solidity just like the arguments. +// +// The second return value must be error. If non-nil is returned for error, then +// the current transaction will be aborted and the execution will stop. +// +// For each contract you will need to create a Contract{} struct, +// with the function listed. Only the PermFlag and the function F needs to be filled +// in for each Function. Add this to the SNativeContracts() function. + +// Contract is metadata for SNative contract. Acts as a call target +// from the EVM. Can be used to generate bindings in a smart contract languages. +type Contract struct { + // Comment describing purpose of SNative contract and reason for assembling + // the particular functions + Comment string + // Name of the SNative contract + Name string + functionsByID map[abi.FunctionID]*Function + functions []*Function + address crypto.Address + logger *logging.Logger +} + +var _ Native = &Contract{} + +// Create a new SNative contract description object by passing a comment, name +// and a list of member functions descriptions +func NewContract(name string, comment string, logger *logging.Logger, fs ...Function) (*Contract, error) { + address := AddressFromName(name) + functionsByID := make(map[abi.FunctionID]*Function, len(fs)) + functions := make([]*Function, len(fs)) + logger = logger.WithScope("NativeContract") + for i, f := range fs { + function := f + err := function.init(address) + if err != nil { + return nil, err + } + if function.abi == nil { + return nil, fmt.Errorf("could not establish ABI for function - contract functions must have a " + + "struct second argument in order to establish ABI") + } + function.contractName = name + function.logger = logger + fid := function.abi.FunctionID + otherF, ok := functionsByID[fid] + if ok { + return nil, fmt.Errorf("function with ID %x already defined: %s", fid, otherF.Signature()) + } + functionsByID[fid] = &function + functions[i] = &function + } + return &Contract{ + Comment: comment, + Name: name, + functionsByID: functionsByID, + functions: functions, + address: address, + logger: logger, + }, nil +} + +// Dispatch is designed to be called from the EVM once a SNative contract +// has been selected. It is also placed in a registry by registerSNativeContracts +// So it can be looked up by SNative address +func (c *Contract) Call(state engine.State, params engine.CallParams) (output []byte, err error) { + if len(params.Input) < abi.FunctionIDSize { + return nil, errors.ErrorCodef(errors.ErrorCodeNativeFunction, + "Burrow Native dispatch requires a 4-byte function identifier but arguments are only %v bytes long", + len(params.Input)) + } + + var id abi.FunctionID + copy(id[:], params.Input) + function, err := c.FunctionByID(id) + if err != nil { + return nil, err + } + + params.Input = params.Input[abi.FunctionIDSize:] + + return function.Call(state, params) +} + +func (c *Contract) SetExternals(externals engine.Dispatcher) { + for _, f := range c.functions { + f.SetExternals(externals) + } +} + +func (c *Contract) FullName() string { + return c.Name +} + +// We define the address of an SNative contact as the last 20 bytes of the sha3 +// hash of its name +func (c *Contract) Address() crypto.Address { + return c.address +} + +// Get function by calling identifier FunctionSelector +func (c *Contract) FunctionByID(id abi.FunctionID) (*Function, errors.CodedError) { + f, ok := c.functionsByID[id] + if !ok { + return nil, + errors.ErrorCodef(errors.ErrorCodeNativeFunction, "unknown SNative function with ID %x", id) + } + return f, nil +} + +// Get function by name +func (c *Contract) FunctionByName(name string) *Function { + for _, f := range c.functions { + if f.name == name { + return f + } + } + return nil +} + +// Get functions in order of declaration +func (c *Contract) Functions() []*Function { + functions := make([]*Function, len(c.functions)) + copy(functions, c.functions) + return functions +} + +func (c *Contract) ContractMeta() []*acm.ContractMeta { + // FIXME: make this return actual ABI metadata + metadata := "{}" + metadataHash := acmstate.GetMetadataHash(metadata) + return []*acm.ContractMeta{ + { + CodeHash: []byte(c.Name), + MetadataHash: metadataHash[:], + Metadata: metadata, + }, + } +} + +func AddressFromName(name string) (address crypto.Address) { + hash := sha3.Sha3([]byte(name)) + copy(address[:], hash[len(hash)-crypto.AddressLength:]) + return +} diff --git a/execution/native/function.go b/execution/native/function.go new file mode 100644 index 000000000..0cbb39687 --- /dev/null +++ b/execution/native/function.go @@ -0,0 +1,194 @@ +package native + +import ( + "fmt" + "reflect" + "runtime" + "strings" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/evm/abi" + "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/permission" +) + +// Function is metadata for native functions. Act as call targets +// for the EVM when collected into an Contract. Can be used to generate +// bindings in a smart contract languages. +type Function struct { + // Comment describing function's purpose, parameters, and return value + Comment string + // Permissions required to call function + PermFlag permission.PermFlag + // Native function to which calls will be dispatched when a containing + F interface{} + // Following fields are for only for memoization + // The name of the contract to which this function belongs (if any) + contractName string + // Function name (used to form signature) + name string + // The abi + abi *abi.FunctionSpec + // Address of containing contract + address crypto.Address + externals engine.Dispatcher + logger *logging.Logger +} + +var _ Native = &Function{} + +// Context is the first argument to any native function. This struct carries +// all the context an native needs to access e.g. state in burrow. +type Context struct { + State engine.State + engine.CallParams + // TODO: this allows us to call back to EVM contracts if we wish - make use of it somewhere... + externals engine.Dispatcher + Logger *logging.Logger +} + +// Created a new function mounted directly at address (i.e. no Solidity contract or function selection) +func NewFunction(comment string, address crypto.Address, permFlag permission.PermFlag, f interface{}) (*Function, error) { + function := &Function{ + Comment: comment, + PermFlag: permFlag, + F: f, + } + err := function.init(address) + if err != nil { + return nil, err + } + return function, nil +} + +func (f *Function) SetExternals(externals engine.Dispatcher) { + // Wrap it to treat nil dispatcher as empty list + f.externals = engine.NewDispatchers(externals) +} + +func (f *Function) Call(state engine.State, params engine.CallParams) ([]byte, error) { + return Call(state, params, f.execute) +} + +func (f *Function) execute(state engine.State, params engine.CallParams) ([]byte, error) { + // check if we have permission to call this function + hasPermission, err := HasPermission(state.CallFrame, params.Caller, f.PermFlag) + if err != nil { + return nil, err + } + if !hasPermission { + return nil, &errors.LacksNativePermission{Address: params.Caller, NativeName: f.name} + } + + ctx := Context{ + State: state, + CallParams: params, + externals: f.externals, + Logger: f.logger, + } + fnv := reflect.ValueOf(f.F) + fnt := fnv.Type() + + args := []reflect.Value{reflect.ValueOf(ctx)} + + if f.abi != nil { + arguments := reflect.New(fnt.In(1)) + err = abi.Unpack(f.abi.Inputs, params.Input, arguments.Interface()) + if err != nil { + return nil, err + } + args = append(args, arguments.Elem()) + } + + rets := fnv.Call(args) + if !rets[1].IsNil() { + return nil, rets[1].Interface().(error) + } + + ret := rets[0].Interface() + if f.abi != nil { + return abi.Pack(f.abi.Outputs, ret) + } + + output, ok := ret.([]byte) + if !ok { + return nil, fmt.Errorf("function has no associated ABI but returns %T instead of []byte", ret) + } + return output, nil +} + +func (f *Function) FullName() string { + if f.contractName != "" { + return f.contractName + "." + f.name + } + return f.name +} + +func (f *Function) Address() crypto.Address { + return f.address +} + +// Signature returns the function signature as would be used for ABI hashing +func (f *Function) Signature() string { + argTypeNames := make([]string, len(f.abi.Inputs)) + for i, arg := range f.abi.Inputs { + argTypeNames[i] = arg.EVM.GetSignature() + } + return fmt.Sprintf("%s(%s)", f.name, strings.Join(argTypeNames, ",")) +} + +// For templates +func (f *Function) Name() string { + return f.name +} + +// NArgs returns the number of function arguments +func (f *Function) NArgs() int { + return len(f.abi.Inputs) +} + +// Abi returns the FunctionSpec for this function +func (f *Function) Abi() *abi.FunctionSpec { + return f.abi +} + +func (f *Function) ContractMeta() []*acm.ContractMeta { + // FIXME: can we do something here - a function is not a contract... + return nil +} + +func (f *Function) String() string { + return fmt.Sprintf("SNativeFunction{Name: %s; Inputs: %d; Outputs: %d}", + f.name, len(f.abi.Inputs), len(f.abi.Outputs)) +} + +func (f *Function) init(address crypto.Address) error { + // Get name of function + t := reflect.TypeOf(f.F) + v := reflect.ValueOf(f.F) + // v.String() for functions returns the empty string + fullyQualifiedName := runtime.FuncForPC(v.Pointer()).Name() + a := strings.Split(fullyQualifiedName, ".") + f.name = a[len(a)-1] + + if t.NumIn() != 1 && t.NumIn() != 2 { + return fmt.Errorf("native function %s must have a one or two arguments", fullyQualifiedName) + } + + if t.NumOut() != 2 { + return fmt.Errorf("native function %s must return a single struct and an error", fullyQualifiedName) + } + + if t.In(0) != reflect.TypeOf(Context{}) { + return fmt.Errorf("first agument of %s must be struct Context", fullyQualifiedName) + } + + if t.NumIn() == 2 { + f.abi = abi.SpecFromStructReflect(f.name, t.In(1), t.Out(0)) + } + f.address = address + return nil +} diff --git a/execution/evm/gas.go b/execution/native/gas.go similarity index 98% rename from execution/evm/gas.go rename to execution/native/gas.go index dff920c15..450389ac6 100644 --- a/execution/evm/gas.go +++ b/execution/native/gas.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package evm +package native const ( GasSha3 uint64 = 1 diff --git a/execution/native/native.go b/execution/native/native.go new file mode 100644 index 000000000..1c36ec1b8 --- /dev/null +++ b/execution/native/native.go @@ -0,0 +1,31 @@ +package native + +import ( + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/engine" +) + +type Native interface { + engine.Callable + SetExternals(externals engine.Dispatcher) + ContractMeta() []*acm.ContractMeta + FullName() string + Address() crypto.Address +} + +func MustDefaultNatives() *Natives { + ns, err := DefaultNatives() + if err != nil { + panic(err) + } + return ns +} + +func DefaultNatives() (*Natives, error) { + ns, err := Merge(Permissions, Precompiles) + if err != nil { + return nil, err + } + return ns, nil +} diff --git a/execution/native/native_test.go b/execution/native/native_test.go new file mode 100644 index 000000000..4142e8fc4 --- /dev/null +++ b/execution/native/native_test.go @@ -0,0 +1,12 @@ +package native + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestDefaultNatives(t *testing.T) { + _, err := DefaultNatives() + require.NoError(t, err) +} diff --git a/execution/native/natives.go b/execution/native/natives.go new file mode 100644 index 000000000..9d661b1a0 --- /dev/null +++ b/execution/native/natives.go @@ -0,0 +1,154 @@ +// Copyright 2017 Monax Industries Limited +// +// 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 native + +import ( + "fmt" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/permission" +) + +type Natives struct { + callableByAddress map[crypto.Address]Native + callableByName map[string]Native + logger *logging.Logger +} + +func New() *Natives { + return &Natives{ + callableByAddress: make(map[crypto.Address]Native), + callableByName: make(map[string]Native), + logger: logging.NewNoopLogger(), + } +} + +func Merge(nss ...*Natives) (*Natives, error) { + n := New() + for _, ns := range nss { + for _, contract := range ns.callableByName { + err := n.register(contract) + if err != nil { + return nil, err + } + } + } + return n, nil +} + +func (ns *Natives) WithLogger(logger *logging.Logger) *Natives { + ns.logger = logger + return ns +} + +func (ns *Natives) Dispatch(acc *acm.Account) engine.Callable { + return ns.GetByAddress(acc.Address) +} + +func (ns *Natives) SetExternals(externals engine.Dispatcher) { + for _, c := range ns.callableByAddress { + c.SetExternals(externals) + } +} + +func (ns *Natives) Callables() []engine.Callable { + callables := make([]engine.Callable, 0, len(ns.callableByAddress)) + for _, c := range ns.callableByAddress { + callables = append(callables, c) + } + return callables +} + +func (ns *Natives) GetByName(name string) Native { + return ns.callableByName[name] +} + +func (ns *Natives) GetContract(name string) *Contract { + c, _ := ns.GetByName(name).(*Contract) + return c +} + +func (ns *Natives) GetFunction(name string) *Function { + f, _ := ns.GetByName(name).(*Function) + return f +} + +func (ns *Natives) GetByAddress(address crypto.Address) Native { + return ns.callableByAddress[address] +} + +func (ns *Natives) IsRegistered(address crypto.Address) bool { + _, ok := ns.callableByAddress[address] + return ok +} + +func (ns *Natives) MustContract(name, comment string, functions ...Function) *Natives { + ns, err := ns.Contract(name, comment, functions...) + if err != nil { + panic(err) + } + return ns +} + +func (ns *Natives) Contract(name, comment string, functions ...Function) (*Natives, error) { + contract, err := NewContract(name, comment, ns.logger, functions...) + if err != nil { + return nil, err + } + err = ns.register(contract) + if err != nil { + return nil, err + } + return ns, nil +} + +func (ns *Natives) MustFunction(comment string, address crypto.Address, permFlag permission.PermFlag, f interface{}) *Natives { + ns, err := ns.Function(comment, address, permFlag, f) + if err != nil { + panic(err) + } + return ns +} + +func (ns *Natives) Function(comment string, address crypto.Address, permFlag permission.PermFlag, f interface{}) (*Natives, error) { + function, err := NewFunction(comment, address, permFlag, f) + if err != nil { + return nil, err + } + err = ns.register(function) + if err != nil { + return nil, err + } + return ns, nil +} + +func (ns *Natives) register(callable Native) error { + name := callable.FullName() + address := callable.Address() + _, ok := ns.callableByName[name] + if ok { + return fmt.Errorf("cannot redeclare contract with name %s", name) + } + _, ok = ns.callableByAddress[address] + if ok { + return fmt.Errorf("cannot redeclare contract with address %v", address) + } + ns.callableByName[name] = callable + ns.callableByAddress[address] = callable + return nil +} diff --git a/execution/native/permissions.go b/execution/native/permissions.go new file mode 100644 index 000000000..7543ec76e --- /dev/null +++ b/execution/native/permissions.go @@ -0,0 +1,286 @@ +package native + +import ( + "fmt" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/permission" +) + +var Permissions = New().MustContract("Permissions", + `* acmstate.ReaderWriter for managing Secure Native authorizations. + * @dev This interface describes the functions exposed by the SNative permissions layer in burrow. + `, + Function{ + Comment: ` + * @notice Adds a role to an account + * @param Account account address + * @param Role role name + * @return result whether role was added + `, + PermFlag: permission.AddRole, + F: addRole, + }, + Function{ + Comment: ` + * @notice Removes a role from an account + * @param Account account address + * @param Role role name + * @return result whether role was removed + `, + PermFlag: permission.RemoveRole, + F: removeRole, + }, + Function{ + Comment: ` + * @notice Indicates whether an account has a role + * @param Account account address + * @param Role role name + * @return result whether account has role + `, + PermFlag: permission.HasRole, + F: hasRole, + }, + Function{ + Comment: ` + * @notice Sets the permission flags for an account. Makes them explicitly set (on or off). + * @param Account account address + * @param Permission the base permissions flags to set for the account + * @param Set whether to set or unset the permissions flags at the account level + * @return The permission flag that was set as uint64 + `, + PermFlag: permission.SetBase, + F: setBase, + }, + Function{ + Comment: ` + * @notice Unsets the permissions flags for an account. Causes permissions being unset to fall through to global permissions. + * @param Account account address + * @param Permission the permissions flags to unset for the account + * @return The permission flag that was unset as uint64 + `, + PermFlag: permission.UnsetBase, + F: unsetBase, + }, + Function{ + Comment: ` + * @notice Indicates whether an account has a subset of permissions set + * @param Account account address + * @param Permission the permissions flags (mask) to check whether enabled against base permissions for the account + * @return result whether account has the passed permissions flags set + `, + PermFlag: permission.HasBase, + F: hasBase, + }, + Function{Comment: ` + * @notice Sets the global (default) permissions flags for the entire chain + * @param Permission the permissions flags to set + * @param Set whether to set (or unset) the permissions flags + * @return The permission flag that was set as uint64 + `, + PermFlag: permission.SetGlobal, + F: setGlobal, + }, +) + +// CONTRACT: it is the duty of the contract writer to call known permissions +// we do not convey if a permission is not set +// (unlike in state/execution, where we guarantee HasPermission is called +// on known permissions and panics else) +// If the perm is not defined in the acc nor set by default in GlobalPermissions, +// this function returns false. +func HasPermission(st acmstate.Reader, address crypto.Address, perm permission.PermFlag) (bool, error) { + acc, err := st.GetAccount(address) + if err != nil { + return false, err + } + if acc == nil { + return false, fmt.Errorf("account %v does not exist", address) + } + globalPerms, err := acmstate.GlobalAccountPermissions(st) + if err != nil { + return false, err + } + perms := acc.Permissions.Base.Compose(globalPerms.Base) + value, err := perms.Get(perm) + if err != nil { + return false, err + } + return value, nil +} + +type hasBaseArgs struct { + Account crypto.Address + Permission uint64 +} + +type hasBaseRets struct { + Result bool +} + +func hasBase(ctx Context, args hasBaseArgs) (hasBaseRets, error) { + permN := permission.PermFlag(args.Permission) // already shifted + if !permN.IsValid() { + return hasBaseRets{}, permission.ErrInvalidPermission(permN) + } + hasPermission, err := HasPermission(ctx.State, args.Account, permN) + if err != nil { + return hasBaseRets{}, err + } + ctx.Logger.Trace.Log("function", "hasBase", + "address", args.Account.String(), + "perm_flag", fmt.Sprintf("%b", permN), + "has_permission", hasPermission) + return hasBaseRets{Result: hasPermission}, nil +} + +type setBaseArgs struct { + Account crypto.Address + Permission uint64 + Set bool +} + +type setBaseRets struct { + Result uint64 +} + +func setBase(ctx Context, args setBaseArgs) (setBaseRets, error) { + permFlag := permission.PermFlag(args.Permission) + if !permFlag.IsValid() { + return setBaseRets{}, permission.ErrInvalidPermission(permFlag) + } + err := UpdateAccount(ctx.State, args.Account, func(acc *acm.Account) error { + return acc.Permissions.Base.Set(permFlag, args.Set) + }) + if err != nil { + return setBaseRets{}, err + } + ctx.Logger.Trace.Log("function", "setBase", "address", args.Account.String(), + "permission_flag", fmt.Sprintf("%b", permFlag), + "permission_value", args.Permission) + return setBaseRets{Result: uint64(permFlag)}, nil +} + +type unsetBaseArgs struct { + Account crypto.Address + Permission uint64 +} + +type unsetBaseRets struct { + Result uint64 +} + +func unsetBase(ctx Context, args unsetBaseArgs) (unsetBaseRets, error) { + permFlag := permission.PermFlag(args.Permission) + if !permFlag.IsValid() { + return unsetBaseRets{}, permission.ErrInvalidPermission(permFlag) + } + err := UpdateAccount(ctx.State, args.Account, func(acc *acm.Account) error { + return acc.Permissions.Base.Unset(permFlag) + }) + if err != nil { + return unsetBaseRets{}, err + } + ctx.Logger.Trace.Log("function", "unsetBase", "address", args.Account.String(), + "perm_flag", fmt.Sprintf("%b", permFlag), + "permission_flag", fmt.Sprintf("%b", permFlag)) + + return unsetBaseRets{Result: uint64(permFlag)}, nil +} + +type setGlobalArgs struct { + Permission uint64 + Set bool +} + +type setGlobalRets struct { + Result uint64 +} + +func setGlobal(ctx Context, args setGlobalArgs) (setGlobalRets, error) { + permFlag := permission.PermFlag(args.Permission) + if !permFlag.IsValid() { + return setGlobalRets{}, permission.ErrInvalidPermission(permFlag) + } + err := UpdateAccount(ctx.State, acm.GlobalPermissionsAddress, func(acc *acm.Account) error { + return acc.Permissions.Base.Set(permFlag, args.Set) + }) + if err != nil { + return setGlobalRets{}, err + } + ctx.Logger.Trace.Log("function", "setGlobal", + "permission_flag", fmt.Sprintf("%b", permFlag), + "permission_value", args.Set) + return setGlobalRets{Result: uint64(permFlag)}, nil +} + +type hasRoleArgs struct { + Account crypto.Address + Role string +} + +type hasRoleRets struct { + Result bool +} + +func hasRole(ctx Context, args hasRoleArgs) (hasRoleRets, error) { + acc, err := mustAccount(ctx.State, args.Account) + if err != nil { + return hasRoleRets{}, err + } + hasRole := acc.Permissions.HasRole(args.Role) + ctx.Logger.Trace.Log("function", "hasRole", "address", args.Account.String(), + "role", args.Role, + "has_role", hasRole) + return hasRoleRets{Result: hasRole}, nil +} + +type addRoleArgs struct { + Account crypto.Address + Role string +} + +type addRoleRets struct { + Result bool +} + +func addRole(ctx Context, args addRoleArgs) (addRoleRets, error) { + ret := addRoleRets{} + err := UpdateAccount(ctx.State, args.Account, func(account *acm.Account) error { + ret.Result = account.Permissions.AddRole(args.Role) + return nil + }) + if err != nil { + return ret, err + } + ctx.Logger.Trace.Log("function", "addRole", "address", args.Account.String(), + "role", args.Role, + "role_added", ret.Result) + return ret, nil +} + +type removeRoleArgs struct { + Account crypto.Address + Role string +} + +type removeRoleRets struct { + Result bool +} + +func removeRole(ctx Context, args removeRoleArgs) (removeRoleRets, error) { + ret := removeRoleRets{} + err := UpdateAccount(ctx.State, args.Account, func(account *acm.Account) error { + ret.Result = account.Permissions.RemoveRole(args.Role) + return nil + }) + if err != nil { + return ret, err + } + ctx.Logger.Trace.Log("function", "removeRole", "address", args.Account.String(), + "role", args.Role, + "role_removed", ret.Result) + return ret, nil +} diff --git a/execution/evm/snative_test.go b/execution/native/permissions_test.go similarity index 55% rename from execution/evm/snative_test.go rename to execution/native/permissions_test.go index 82d7bf295..de6048f26 100644 --- a/execution/evm/snative_test.go +++ b/execution/native/permissions_test.go @@ -12,18 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -package evm +package native import ( "encoding/hex" + "strconv" + "strings" "testing" + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/logging" "github.com/stretchr/testify/require" - "strings" - "github.com/hyperledger/burrow/acm" - . "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/crypto/sha3" "github.com/hyperledger/burrow/execution/errors" @@ -34,7 +38,7 @@ import ( ) // Compiling the Permissions solidity contract at -// (generated by with 'make snatives' function) and passing to +// (generated by 'burrow natives' command) and passing to // https://ethereum.github.io/browser-solidity (toggle details to get list) // yields: // Keep this updated to drive TestPermissionsContractSignatures @@ -48,8 +52,10 @@ b7d4dc0d unsetBase(address,uint64) c4bc7b70 setGlobal(uint64,bool) ` +var logger = logging.NewNoopLogger() + func TestPermissionsContractSignatures(t *testing.T) { - contract := SNativeContracts()["Permissions"] + contract := Permissions.GetByName("Permissions").(*Contract) nFuncs := len(contract.functions) @@ -66,8 +72,8 @@ func TestPermissionsContractSignatures(t *testing.T) { } func TestSNativeContractDescription_Dispatch(t *testing.T) { - contract := SNativeContracts()["Permissions"] - st := newAppState() + contract := Permissions.GetByName("Permissions").(*Contract) + st := acmstate.NewMemoryState() caller := &acm.Account{ Address: crypto.Address{1, 1, 1}, } @@ -76,47 +82,92 @@ func TestSNativeContractDescription_Dispatch(t *testing.T) { } require.NoError(t, st.UpdateAccount(caller)) require.NoError(t, st.UpdateAccount(grantee)) - cache := NewState(st, blockHashGetter) - - function, err := contract.FunctionByName("addRole") - if err != nil { - t.Fatalf("Could not get function: %s", err) + state := engine.State{ + CallFrame: engine.NewCallFrame(st), + EventSink: exec.NewNoopEventSink(), } + + function := contract.FunctionByName("setBase") + require.NotNil(t, function, "Could not get function: %s") funcID := function.Abi().FunctionID gas := uint64(1000) // Should fail since we have no permissions - _, err = contract.Dispatch(cache, caller.Address, bc.MustSplice(funcID[:], grantee.Address, - permFlagToWord256(permission.CreateAccount)), &gas, logger) + input := bc.MustSplice(funcID[:], grantee.Address, permFlagToWord256(permission.CreateAccount)) + params := engine.CallParams{ + Caller: caller.Address, + Input: input, + Gas: &gas, + } + _, err := contract.Call(state, params) if !assert.Error(t, err, "Should fail due to lack of permissions") { return } - assert.IsType(t, err, errors.LacksSNativePermission{}) + assert.Equal(t, errors.ErrorCodeNativeFunction, errors.ErrorCode(err)) // Grant all permissions and dispatch should success - cache.SetPermission(caller.Address, permission.AddRole, true) - require.NoError(t, cache.Error()) - retValue, err := contract.Dispatch(cache, caller.Address, bc.MustSplice(funcID[:], - grantee.Address.Word256(), permFlagToWord256(permission.CreateAccount)), &gas, logger) + err = UpdateAccount(state, caller.Address, func(acc *acm.Account) error { + return acc.Permissions.Base.Set(permission.SetBase, true) + }) require.NoError(t, err) - assert.Equal(t, retValue, LeftPadBytes([]byte{1}, 32)) + bondFlagWord := permFlagToWord256(permission.Bond) + params.Input = bc.MustSplice(funcID[:], grantee.Address.Word256(), bondFlagWord, binary.One256) + + retValue, err := contract.Call(state, params) + require.NoError(t, err) + assert.Equal(t, bondFlagWord[:], retValue) } func TestSNativeContractDescription_Address(t *testing.T) { - contract := NewSNativeContract("A comment", - "CoolButVeryLongNamedContractOfDoom") + contract, err := NewContract("CoolButVeryLongNamedContractOfDoom", "A comment", logger) + require.NoError(t, err) assert.Equal(t, sha3.Sha3(([]byte)(contract.Name))[12:], contract.Address().Bytes()) } +func TestHasPermission(t *testing.T) { + cache := acmstate.NewMemoryState() + + base, err := permission.BasePermissionsFromStringList([]string{"createContract", "createAccount", "bond", "proposal", "setBase", "unsetBase", "setGlobal", "addRole", "removeRole"}) + require.NoError(t, err) + + acc := &acm.Account{ + Address: AddressFromName("frog"), + Permissions: permission.AccountPermissions{ + Base: base, + }, + } + + require.NoError(t, cache.UpdateAccount(acc)) + // Ensure we are falling through to global permissions on those bits not set + + flag := permission.Send | permission.Call | permission.Name | permission.HasRole + hasPermission, err := HasPermission(cache, acc.Address, flag) + require.NoError(t, err) + assert.True(t, hasPermission) +} + // // Helpers // -func assertFunctionIDSignature(t *testing.T, contract *SNativeContractDescription, +func BasePermissionsFromStrings(t *testing.T, perms, setBit string) permission.BasePermissions { + return permission.BasePermissions{ + Perms: PermFlagFromString(t, perms), + SetBit: PermFlagFromString(t, setBit), + } +} + +func PermFlagFromString(t *testing.T, binaryString string) permission.PermFlag { + permFlag, err := strconv.ParseUint(binaryString, 2, 64) + require.NoError(t, err) + return permission.PermFlag(permFlag) +} + +func assertFunctionIDSignature(t *testing.T, contract *Contract, funcIDHex string, expectedSignature string) { fromHex := funcIDFromHex(t, funcIDHex) function, err := contract.FunctionByID(fromHex) assert.NoError(t, err, - "Error retrieving SNativeFunctionDescription with ID %s", funcIDHex) + "Error retrieving Function with ID %s", funcIDHex) if err == nil { assert.Equal(t, expectedSignature, function.Signature()) } @@ -133,8 +184,8 @@ func funcIDFromHex(t *testing.T, hexString string) (funcID abi.FunctionID) { return } -func permFlagToWord256(permFlag permission.PermFlag) Word256 { - return Uint64ToWord256(uint64(permFlag)) +func permFlagToWord256(permFlag permission.PermFlag) binary.Word256 { + return binary.Uint64ToWord256(uint64(permFlag)) } // turns the solidity compiler function summary into a map to drive signature diff --git a/execution/native/precompiles.go b/execution/native/precompiles.go new file mode 100644 index 000000000..045fb8165 --- /dev/null +++ b/execution/native/precompiles.go @@ -0,0 +1,95 @@ +package native + +import ( + "crypto/sha256" + + "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/permission" + "golang.org/x/crypto/ripemd160" +) + +var Precompiles = New(). + MustFunction(`Compute the sha256 hash of input`, + leftPadAddress(2), + permission.None, + sha256Func). + MustFunction(`Compute the ripemd160 hash of input`, + leftPadAddress(3), + permission.None, + ripemd160Func). + MustFunction(`Return an output identical to the input`, + leftPadAddress(4), + permission.None, + identityFunc) + +/* Removed due to C dependency +func ecrecoverFunc(state State, caller crypto.Address, input []byte, gas *int64) (output []byte, err error) { + // Deduct gas + gasRequired := GasEcRecover + if *gas < gasRequired { + return nil, ErrInsufficientGas + } else { + *gas -= gasRequired + } + // Recover + hash := input[:32] + v := byte(input[32] - 27) // ignore input[33:64], v is small. + sig := append(input[64:], v) + + recovered, err := secp256k1.RecoverPubkey(hash, sig) + if err != nil { + return nil, err +OH NO STOCASTIC CAT CODING!!!! + } + hashed := sha3.Sha3(recovered[1:]) + return LeftPadBytes(hashed, 32), nil +} +*/ + +func sha256Func(ctx Context) (output []byte, err error) { + // Deduct gas + gasRequired := uint64((len(ctx.Input)+31)/32)*GasSha256Word + GasSha256Base + if *ctx.Gas < gasRequired { + return nil, errors.ErrorCodeInsufficientGas + } else { + *ctx.Gas -= gasRequired + } + // Hash + hasher := sha256.New() + // CONTRACT: this does not err + hasher.Write(ctx.Input) + return hasher.Sum(nil), nil +} + +func ripemd160Func(ctx Context) (output []byte, err error) { + // Deduct gas + gasRequired := uint64((len(ctx.Input)+31)/32)*GasRipemd160Word + GasRipemd160Base + if *ctx.Gas < gasRequired { + return nil, errors.ErrorCodeInsufficientGas + } else { + *ctx.Gas -= gasRequired + } + // Hash + hasher := ripemd160.New() + // CONTRACT: this does not err + hasher.Write(ctx.Input) + return binary.LeftPadBytes(hasher.Sum(nil), 32), nil +} + +func identityFunc(ctx Context) (output []byte, err error) { + // Deduct gas + gasRequired := uint64((len(ctx.Input)+31)/32)*GasIdentityWord + GasIdentityBase + if *ctx.Gas < gasRequired { + return nil, errors.ErrorCodeInsufficientGas + } else { + *ctx.Gas -= gasRequired + } + // Return identity + return ctx.Input, nil +} + +func leftPadAddress(bs ...byte) crypto.Address { + return crypto.AddressFromWord256(binary.LeftPadWord256(bs)) +} diff --git a/execution/native/state.go b/execution/native/state.go new file mode 100644 index 000000000..db3f69a26 --- /dev/null +++ b/execution/native/state.go @@ -0,0 +1,92 @@ +package native + +import ( + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/errors" +) + +// This wrapper provides a state that behaves 'as if' the natives were stored directly in state. +// TODO: we may want to actually store native account sentinel values (and their metadata) in on-disk state down the line +type State struct { + natives *Natives + backend acmstate.ReaderWriter +} + +// Get a new state that wraps the backend but intercepts any calls to natives returning appropriate errors message +// or an Account sentinel for the particular native +func NewState(natives *Natives, backend acmstate.ReaderWriter) *State { + return &State{ + natives: natives, + backend: backend, + } +} + +func (s *State) UpdateAccount(updatedAccount *acm.Account) error { + err := s.ensureNonNative(updatedAccount.Address, "update account") + if err != nil { + return err + } + return s.backend.UpdateAccount(updatedAccount) +} + +func (s *State) GetAccount(address crypto.Address) (*acm.Account, error) { + contract := s.natives.GetByAddress(address) + if contract != nil { + return account(contract), nil + } + return s.backend.GetAccount(address) +} + +func (s *State) RemoveAccount(address crypto.Address) error { + err := s.ensureNonNative(address, "remove account") + if err != nil { + return err + } + return s.backend.RemoveAccount(address) +} + +func (s *State) GetStorage(address crypto.Address, key binary.Word256) ([]byte, error) { + err := s.ensureNonNative(address, "get storage") + if err != nil { + return nil, err + } + return s.backend.GetStorage(address, key) +} + +func (s *State) SetStorage(address crypto.Address, key binary.Word256, value []byte) error { + err := s.ensureNonNative(address, "set storage") + if err != nil { + return err + } + return s.backend.SetStorage(address, key, value) +} + +func (s *State) GetMetadata(metahash acmstate.MetadataHash) (string, error) { + return s.backend.GetMetadata(metahash) +} + +func (s *State) SetMetadata(metahash acmstate.MetadataHash, metadata string) error { + return s.backend.SetMetadata(metahash, metadata) +} + +func (s *State) ensureNonNative(address crypto.Address, action string) error { + contract := s.natives.GetByAddress(address) + if contract != nil { + return errors.ErrorCodef(errors.ErrorCodeReservedAddress, + "cannot %s at %v because that address is reserved for a native contract '%s'", + action, address, contract.FullName()) + } + return nil +} + +func account(callable Native) *acm.Account { + return &acm.Account{ + Address: callable.Address(), + NativeName: callable.FullName(), + // TODO: this is not populated yet, see FIXME note on native.Contract + ContractMeta: callable.ContractMeta(), + } +} diff --git a/execution/simulated_call.go b/execution/simulated_call.go index ac7e877a5..0c8cfb0af 100644 --- a/execution/simulated_call.go +++ b/execution/simulated_call.go @@ -6,6 +6,7 @@ import ( "github.com/hyperledger/burrow/bcm" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/contexts" + "github.com/hyperledger/burrow/execution/evm" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/txs" @@ -19,10 +20,11 @@ func CallSim(reader acmstate.Reader, blockchain bcm.BlockchainInfo, fromAddress, cache := acmstate.NewCache(reader) exe := contexts.CallContext{ - RunCall: true, - StateWriter: cache, - Blockchain: blockchain, - Logger: logger, + EVM: evm.Default(), + RunCall: true, + State: cache, + Blockchain: blockchain, + Logger: logger, } txe := exec.NewTxExecution(txs.Enclose(blockchain.ChainID(), &payload.CallTx{ diff --git a/execution/wasm/wasm.go b/execution/wasm/wasm.go index 1e3f24218..e9d059132 100644 --- a/execution/wasm/wasm.go +++ b/execution/wasm/wasm.go @@ -4,16 +4,17 @@ import ( "encoding/binary" "fmt" + "github.com/hyperledger/burrow/acm/acmstate" burrow_binary "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/execution/evm" "github.com/perlin-network/life/exec" ) type execContext struct { + errors.Maybe address crypto.Address - state evm.Interface + state acmstate.ReaderWriter } // In EVM, the code for an account is created by the EVM code itself; the code in the EVM deploy transaction is run, @@ -60,7 +61,7 @@ type execContext struct { // - get_storage32(uint32 key, uint8* data, uint32 len) // get contract storage (right pad with zeros) // RunWASM creates a WASM VM, and executes the given WASM contract code -func RunWASM(state evm.Interface, address crypto.Address, createContract bool, wasm, input []byte) (output []byte, cerr errors.CodedError) { +func RunWASM(state acmstate.ReaderWriter, address crypto.Address, createContract bool, wasm, input []byte) (output []byte, cerr error) { defer func() { if r := recover(); r != nil { cerr = errors.ErrorCodeExecutionAborted @@ -73,12 +74,17 @@ func RunWASM(state evm.Interface, address crypto.Address, createContract bool, w DefaultMemoryPages: 2, } - execContext := execContext{address, state} + execContext := execContext{ + address: address, + state: state, + } vm, err := exec.NewVirtualMachine(wasm, config, &execContext, nil) - if err != nil { - return []byte{}, errors.ErrorCodeInvalidContract + return nil, errors.ErrorCodeInvalidContract + } + if execContext.Error() != nil { + return nil, execContext.Error() } // FIXME: Check length @@ -93,13 +99,13 @@ func RunWASM(state evm.Interface, address crypto.Address, createContract bool, w } entryID, ok := vm.GetFunctionExport(wasmFunc) if !ok { - return []byte{}, errors.ErrorCodeUnresolvedSymbols + return nil, errors.ErrorCodeUnresolvedSymbols } // The 0 argument is the offset where our calldata is stored (if any) offset, err := vm.Run(entryID, 0) if err != nil { - return []byte{}, errors.ErrorCodeExecutionAborted + return nil, errors.ErrorCodeExecutionAborted } if offset > 0 { @@ -121,9 +127,9 @@ func (e *execContext) ResolveFunc(module, field string) exec.FunctionImport { return func(vm *exec.VirtualMachine) int64 { key := int(uint32(vm.GetCurrentFrame().Locals[0])) ptr := int(uint32(vm.GetCurrentFrame().Locals[1])) - len := int(uint32(vm.GetCurrentFrame().Locals[2])) + length := int(uint32(vm.GetCurrentFrame().Locals[2])) // FIXME: Check length - e.state.SetStorage(e.address, burrow_binary.Int64ToWord256(int64(key)), vm.Memory[ptr:ptr+len]) + e.Void(e.state.SetStorage(e.address, burrow_binary.Int64ToWord256(int64(key)), vm.Memory[ptr:ptr+length])) return 0 } @@ -132,7 +138,7 @@ func (e *execContext) ResolveFunc(module, field string) exec.FunctionImport { key := int(uint32(vm.GetCurrentFrame().Locals[0])) ptr := int(uint32(vm.GetCurrentFrame().Locals[1])) length := int(uint32(vm.GetCurrentFrame().Locals[2])) - val := e.state.GetStorage(e.address, burrow_binary.Int64ToWord256(int64(key))) + val := e.Bytes(e.state.GetStorage(e.address, burrow_binary.Int64ToWord256(int64(key)))) if len(val) < length { val = append(val, make([]byte, length-len(val))...) } diff --git a/execution/wasm/wasm_test.go b/execution/wasm/wasm_test.go index 2bfce5330..8210d51e1 100644 --- a/execution/wasm/wasm_test.go +++ b/execution/wasm/wasm_test.go @@ -4,10 +4,8 @@ import ( "fmt" "testing" - "github.com/hyperledger/burrow/binary" - "github.com/hyperledger/burrow/execution/evm" - "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/crypto" @@ -15,9 +13,8 @@ import ( ) func TestStaticCallWithValue(t *testing.T) { - cache := evm.NewState(acmstate.NewMemoryState(), blockHashGetter) + cache := acmstate.NewMemoryState() - cache.CreateAccount(crypto.ZeroAddress) // run constructor _, cerr := RunWASM(cache, crypto.ZeroAddress, true, Bytecode_storage_test, []byte{}) require.NoError(t, cerr) diff --git a/go.mod b/go.mod index dde5df21f..db42ae655 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,6 @@ require ( github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf // indirect github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c github.com/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9 - github.com/coreos/go-etcd v2.0.0+incompatible // indirect github.com/eapache/channels v1.1.0 github.com/eapache/queue v1.1.0 // indirect github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13 @@ -42,6 +41,7 @@ require ( github.com/spf13/viper v1.4.0 github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485 github.com/stretchr/testify v1.4.0 + github.com/stumble/gorocksdb v0.0.3 // indirect github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 github.com/tendermint/go-amino v0.14.1 github.com/tendermint/iavl v0.12.4 @@ -49,7 +49,6 @@ require ( github.com/tendermint/tm-db v0.2.0 github.com/test-go/testify v1.1.4 github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 - github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.1.0 diff --git a/go.sum b/go.sum index 46416c9ac..6d66091a4 100644 --- a/go.sum +++ b/go.sum @@ -17,7 +17,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf h1:eg0MeVzsP1G42dRafH3vf+al2vQIJU0YHX+1Tw87oco= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -39,7 +38,6 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 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/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-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -60,6 +58,12 @@ github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8/go.mod h1:o4Dgpcc github.com/etcd-io/bbolt v1.3.2/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/etcd-io/bbolt v1.3.3 h1:gSJmxrs37LgTqR/oyJBWok6k6SvXEUerFTbltIhXkBM= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -69,7 +73,6 @@ github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -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= @@ -83,7 +86,6 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG 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/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.0 h1:G8O7TerXerS4F6sx9OV7/nRfJdnXgHZu/S/7F2SN+UE= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= @@ -103,7 +105,6 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -146,15 +147,11 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/libp2p/go-buffer-pool v0.0.1 h1:9Rrn/H46cXjaA2HQ5Y8lyhOS1NhTkZ4yuEs2r3Eechg= -github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= -github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -190,23 +187,16 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE 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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 h1:PnBWHBf+6L0jOqq0gIVUe6Yk0/QMZ640k6NvkxcBf+8= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a h1:9a8MnZMP0X2nLJdBg+pBmGgkJlSaKC2KaQmTCk1XDtE= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= @@ -214,7 +204,6 @@ github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqn github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= @@ -234,8 +223,6 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= -github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485 h1:tvEO2/Btzw9L4N2VlAHD7AXjk1g1yFTwbGEm8dz7QWY= @@ -244,10 +231,11 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stumble/gorocksdb v0.0.3 h1:9UU+QA1pqFYJuf9+5p7z1IqdE5k0mma4UAeu2wmX8kA= +github.com/stumble/gorocksdb v0.0.3/go.mod h1:v6IHdFBXk5DJ1K4FZ0xi+eY737quiiBxYtSWXadLybY= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 h1:1oFLiOyVl+W7bnBzGhf7BbIv9loSFQcieWWYIjLqcAw= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6offJMk= @@ -255,11 +243,8 @@ github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYM github.com/tendermint/iavl v0.12.4 h1:hd1woxUGISKkfUWBA4mmmTwOua6PQZTJM/F0FDrmMV8= github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= -github.com/tendermint/tendermint v0.32.3 h1:GEnWpGQ795h5oTFNbfBLsY0LW/CW2j6p6HtiYNfxsgg= -github.com/tendermint/tendermint v0.32.3/go.mod h1:ZK2c29jl1QRYznIRyRWRDsmm1yvtPzBRT00x4t1JToY= github.com/tendermint/tendermint v0.32.4 h1:KwZIMtT+ROvfMYO3wine6F9hak3SpngcRcAIzys1J3I= github.com/tendermint/tendermint v0.32.4/go.mod h1:D2+A3pNjY+Po72X0mTfaXorFhiVI8dh/Zg640FGyGtE= -github.com/tendermint/tm-db v0.1.1 h1:G3Xezy3sOk9+ekhjZ/kjArYIs1SmwV+1OUgNkj7RgV0= github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= github.com/tendermint/tm-db v0.2.0 h1:rJxgdqn6fIiVJZy4zLpY1qVlyD0TU6vhkT4kEf71TQQ= github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= @@ -269,7 +254,6 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1 github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 h1:IlK6taZBmMKDcGfMqIlD4la5BlekNrrLsdtCMSn6aJI= github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= 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/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= @@ -290,7 +274,6 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= 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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -301,7 +284,6 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl 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-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -309,7 +291,6 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 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= @@ -320,15 +301,12 @@ golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/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-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= 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-20190825160603-fb81701db80f h1:LCxigP8q3fPRGNVYndYsyHnF0zRrvcoVwZMfb8iQZe4= golang.org/x/sys v0.0.0-20190825160603-fb81701db80f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -341,7 +319,6 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2 h1:67iHsV9djwGdZpdZNbLuQj6FOzCaZe3w+vhLjn5AcFA= @@ -349,13 +326,11 @@ google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoA google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0 h1:J0UbZOIrCAl+fpTOf8YLs4dJo8L/owV4LYVtAXQoPkw= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/integration/rpctransact/call_test.go b/integration/rpctransact/call_test.go index a040f87d9..5e0374950 100644 --- a/integration/rpctransact/call_test.go +++ b/integration/rpctransact/call_test.go @@ -13,6 +13,7 @@ import ( "github.com/hyperledger/burrow/crypto/sha3" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm/abi" + "golang.org/x/crypto/sha3" "github.com/hyperledger/burrow/integration" @@ -385,7 +386,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) err = abi.UnpackEvent(&evAbi, log.Topics, log.Data.Bytes(), data...) require.NoError(t, err) - h := sha3.NewKeccak256() + h := sha3.NewLegacyKeccak256() h.Write([]byte("hash")) expectedHash := h.Sum(nil) // "Downsie!", true, "Donaudampfschifffahrtselektrizitätenhauptbetriebswerkbauunterbeamtengesellschaft", 102, 42, 'hash') @@ -427,7 +428,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) err = abi.UnpackEvent(&evAbi, log.Topics, log.Data.Bytes(), data...) require.NoError(t, err) - h := sha3.NewKeccak256() + h := sha3.NewLegacyKeccak256() h.Write([]byte("hash")) expectedHash := h.Sum(nil) // "Downsie!", true, "Donaudampfschifffahrtselektrizitätenhauptbetriebswerkbauunterbeamtengesellschaft", 102, 42, 'hash') @@ -453,6 +454,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) assert.Equal(t, errors.ErrorCodeExecutionReverted, txe.Exception.Code) revertReason, err := abi.UnpackRevert(txe.Result.Return) require.NoError(t, err) + require.NotNil(t, revertReason) assert.Equal(t, *revertReason, "I have reverted") return }) diff --git a/js/lib/contracts/function.js b/js/lib/contracts/function.js index c44eae642..eb81da314 100644 --- a/js/lib/contracts/function.js +++ b/js/lib/contracts/function.js @@ -128,7 +128,7 @@ var SolidityFunction = function (abi) { if (error) return reject(error) // Handle execution reversions - if (result.Exception && result.Exception.Code === 16) { + if (result.Exception && result.Exception.Code === 17) { // Decode error message if there is one otherwise default if (result.Result.Return.length === 0) { error = new Error('Execution Reverted') diff --git a/js/test/get_set_smoke_test/GetSet.sol.go b/js/test/get_set_smoke_test/GetSet.sol.go new file mode 100644 index 000000000..1449509c9 --- /dev/null +++ b/js/test/get_set_smoke_test/GetSet.sol.go @@ -0,0 +1,7 @@ +package get_set_smoke_test + +import hex "github.com/tmthrgd/go-hex" + +var Bytecode_GetSet = hex.MustDecodeString("608060405234801561001057600080fd5b506104d0806100206000396000f300608060405260043610610098576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680620267a41461009d5780630bcd3b33146100c857806312a7b914146100fb5780631e26fd331461012a5780634ef65c3b146101595780637fcaf6661461018657806389ea642f146101ef578063beca2bcd1461027f578063e6748da9146102aa575b600080fd5b3480156100a957600080fd5b506100b26102db565b6040518082815260200191505060405180910390f35b3480156100d457600080fd5b506100dd6102e4565b60405180826000191660001916815260200191505060405180910390f35b34801561010757600080fd5b506101106102ee565b604051808215151515815260200191505060405180910390f35b34801561013657600080fd5b50610157600480360381019080803515159060200190929190505050610305565b005b34801561016557600080fd5b5061018460048036038101908080359060200190929190505050610322565b005b34801561019257600080fd5b506101ed600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061032c565b005b3480156101fb57600080fd5b50610204610346565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610244578082015181840152602081019050610229565b50505050905090810190601f1680156102715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028b57600080fd5b506102946103e8565b6040518082815260200191505060405180910390f35b3480156102b657600080fd5b506102d960048036038101908080356000191690602001909291905050506103f1565b005b60008054905090565b6000600154905090565b6000600360009054906101000a900460ff16905090565b80600360006101000a81548160ff02191690831515021790555050565b8060008190555050565b80600290805190602001906103429291906103ff565b5050565b606060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103de5780601f106103b3576101008083540402835291602001916103de565b820191906000526020600020905b8154815290600101906020018083116103c157829003601f168201915b5050505050905090565b60006001905090565b806001816000191690555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061044057805160ff191683800117855561046e565b8280016001018555821561046e579182015b8281111561046d578251825591602001919060010190610452565b5b50905061047b919061047f565b5090565b6104a191905b8082111561049d576000816000905550600101610485565b5090565b905600a165627a7a723058209e088e12869635c5763a79db31bfd31c9bb2f980f6c770d6d8aa8176044146050029") +var DeployedBytecode_GetSet = hex.MustDecodeString("608060405260043610610098576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680620267a41461009d5780630bcd3b33146100c857806312a7b914146100fb5780631e26fd331461012a5780634ef65c3b146101595780637fcaf6661461018657806389ea642f146101ef578063beca2bcd1461027f578063e6748da9146102aa575b600080fd5b3480156100a957600080fd5b506100b26102db565b6040518082815260200191505060405180910390f35b3480156100d457600080fd5b506100dd6102e4565b60405180826000191660001916815260200191505060405180910390f35b34801561010757600080fd5b506101106102ee565b604051808215151515815260200191505060405180910390f35b34801561013657600080fd5b50610157600480360381019080803515159060200190929190505050610305565b005b34801561016557600080fd5b5061018460048036038101908080359060200190929190505050610322565b005b34801561019257600080fd5b506101ed600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061032c565b005b3480156101fb57600080fd5b50610204610346565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610244578082015181840152602081019050610229565b50505050905090810190601f1680156102715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028b57600080fd5b506102946103e8565b6040518082815260200191505060405180910390f35b3480156102b657600080fd5b506102d960048036038101908080356000191690602001909291905050506103f1565b005b60008054905090565b6000600154905090565b6000600360009054906101000a900460ff16905090565b80600360006101000a81548160ff02191690831515021790555050565b8060008190555050565b80600290805190602001906103429291906103ff565b5050565b606060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103de5780601f106103b3576101008083540402835291602001916103de565b820191906000526020600020905b8154815290600101906020018083116103c157829003601f168201915b5050505050905090565b60006001905090565b806001816000191690555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061044057805160ff191683800117855561046e565b8280016001018555821561046e579182015b8281111561046d578251825591602001919060010190610452565b5b50905061047b919061047f565b5090565b6104a191905b8082111561049d576000816000905550600101610485565b5090565b905600a165627a7a723058209e088e12869635c5763a79db31bfd31c9bb2f980f6c770d6d8aa8176044146050029") +var Abi_GetSet = []byte(`[{"constant":true,"inputs":[],"name":"getUint","outputs":[{"name":"output","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBytes","outputs":[{"name":"output","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBool","outputs":[{"name":"output","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"input","type":"bool"}],"name":"setBool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"input","type":"uint256"}],"name":"setUint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"input","type":"string"}],"name":"setString","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getString","outputs":[{"name":"output","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"testExist","outputs":[{"name":"output","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"input","type":"bytes32"}],"name":"setBytes","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]`) diff --git a/package-lock.json b/package-lock.json index 8aee4a50e..c158a6ee9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "@monax/burrow", + "name": "@hyperledger/burrow", "requires": true, "lockfileVersion": 1, "dependencies": { @@ -86,15 +86,24 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, + "@types/bytebuffer": { + "version": "5.0.40", + "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.40.tgz", + "integrity": "sha512-h48dyzZrPMz25K6Q4+NCwWaxwXany2FhQg/ErOcdZS1ZpsaDnDMZg8JYLMTGz7uvXKrcKGJUZJlZObyfgdaN9g==", + "requires": { + "@types/long": "*", + "@types/node": "*" + } + }, "@types/long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, "@types/node": { - "version": "10.5.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.2.tgz", - "integrity": "sha512-m9zXmifkZsMHZBOyxZWilMwmTlpC8x5Ty360JKTiXvlXZfBWYpsg9ZZvP/Ye+iZUh+Q+MxDLjItVTWIsfwz+8Q==" + "version": "12.7.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.6.tgz", + "integrity": "sha512-+lUz75GKlq6JKTigPUKd3Op8AZrnaoCut5S0jkjMZAw+i6eRTaM6vtytl/wfSxXyx+GPRTG2NUcbQWgiinnKng==" }, "acorn": { "version": "6.3.0", @@ -190,9 +199,12 @@ "dev": true }, "bindings": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.1.tgz", - "integrity": "sha512-i47mqjF9UbjxJhxGf+pZ6kSxrnI3wBLlnGI2ArWJ4r0VrvDS7ZYXkprq/pLaBWYq4GM0r4zdHY+NNRqEMU7uew==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } }, "bip66": { "version": "1.1.5", @@ -241,15 +253,6 @@ "safe-buffer": "^5.0.1" } }, - "browserify-sha3": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/browserify-sha3/-/browserify-sha3-0.0.4.tgz", - "integrity": "sha1-CGxHuMgjFsnUcCLCYYWVRXbdjiY=", - "requires": { - "js-sha3": "^0.6.1", - "safe-buffer": "^5.1.1" - } - }, "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", @@ -418,9 +421,9 @@ } }, "crypto-js": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.4.tgz", - "integrity": "sha1-IWTxbeLykVELZS10a84302SYMK0=" + "version": "3.1.9-1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", + "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" }, "debug": { "version": "4.1.1", @@ -506,9 +509,9 @@ } }, "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz", + "integrity": "sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -940,26 +943,37 @@ "dev": true }, "ethereumjs-abi": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz", - "integrity": "sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE=", + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", "requires": { - "bn.js": "^4.10.0", - "ethereumjs-util": "^4.3.0" + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" } }, "ethereumjs-util": { - "version": "4.5.0", - "resolved": "http://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz", - "integrity": "sha1-PpQosxfuvaPXJg2FT93alUsfG8Y=", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz", + "integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==", "requires": { - "bn.js": "^4.8.0", + "bn.js": "^4.11.0", "create-hash": "^1.1.2", - "keccakjs": "^0.2.0", + "ethjs-util": "0.1.6", + "keccak": "^1.0.2", "rlp": "^2.0.0", + "safe-buffer": "^5.1.1", "secp256k1": "^3.0.1" } }, + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, "evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", @@ -1031,6 +1045,11 @@ "flat-cache": "^2.0.1" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", @@ -1181,14 +1200,15 @@ "dev": true }, "grpc": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.18.0.tgz", - "integrity": "sha512-M0K67Zhv2ZzCjrTbQvjWgYFPB929L+qAVnbNgXepbfO5kJxUYc30dP8m8vb+o8QdahLHAeYfIqRoIzZRcCB98Q==", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.23.3.tgz", + "integrity": "sha512-7vdzxPw9s5UYch4aUn4hyM5tMaouaxUUkwkgJlwbR4AXMxiYZJOv19N2ps2eKiuUbJovo5fnGF9hg/X91gWYjw==", "requires": { + "@types/bytebuffer": "^5.0.40", "lodash.camelcase": "^4.3.0", "lodash.clone": "^4.5.0", - "nan": "^2.0.0", - "node-pre-gyp": "^0.12.0", + "nan": "^2.13.2", + "node-pre-gyp": "^0.13.0", "protobufjs": "^5.0.3" }, "dependencies": { @@ -1225,7 +1245,7 @@ } }, "chownr": { - "version": "1.1.1", + "version": "1.1.2", "bundled": true }, "code-point-at": { @@ -1245,10 +1265,10 @@ "bundled": true }, "debug": { - "version": "2.6.9", + "version": "3.2.6", "bundled": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "deep-extend": { @@ -1264,7 +1284,7 @@ "bundled": true }, "fs-minipass": { - "version": "1.2.5", + "version": "1.2.6", "bundled": true, "requires": { "minipass": "^2.2.1" @@ -1289,7 +1309,7 @@ } }, "glob": { - "version": "7.1.2", + "version": "7.1.4", "bundled": true, "requires": { "fs.realpath": "^1.0.0", @@ -1305,7 +1325,7 @@ "bundled": true }, "iconv-lite": { - "version": "0.4.23", + "version": "0.4.24", "bundled": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -1327,7 +1347,7 @@ } }, "inherits": { - "version": "2.0.3", + "version": "2.0.4", "bundled": true }, "ini": { @@ -1365,7 +1385,7 @@ } }, "minizlib": { - "version": "1.1.1", + "version": "1.2.1", "bundled": true, "requires": { "minipass": "^2.2.1" @@ -1385,20 +1405,20 @@ } }, "ms": { - "version": "2.0.0", + "version": "2.1.2", "bundled": true }, "needle": { - "version": "2.2.4", + "version": "2.4.0", "bundled": true, "requires": { - "debug": "^2.1.2", + "debug": "^3.2.6", "iconv-lite": "^0.4.4", "sax": "^1.2.4" } }, "node-pre-gyp": { - "version": "0.12.0", + "version": "0.13.0", "bundled": true, "requires": { "detect-libc": "^1.0.2", @@ -1422,11 +1442,11 @@ } }, "npm-bundled": { - "version": "1.0.5", + "version": "1.0.6", "bundled": true }, "npm-packlist": { - "version": "1.1.12", + "version": "1.4.4", "bundled": true, "requires": { "ignore-walk": "^3.0.1", @@ -1479,7 +1499,7 @@ "bundled": true }, "process-nextick-args": { - "version": "2.0.0", + "version": "2.0.1", "bundled": true }, "protobufjs": { @@ -1517,10 +1537,10 @@ } }, "rimraf": { - "version": "2.6.2", + "version": "2.7.1", "bundled": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { @@ -1536,7 +1556,7 @@ "bundled": true }, "semver": { - "version": "5.6.0", + "version": "5.7.1", "bundled": true }, "set-blocking": { @@ -1575,16 +1595,16 @@ "bundled": true }, "tar": { - "version": "4.4.8", + "version": "4.4.10", "bundled": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.3.5", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" } }, "util-deprecate": { @@ -1837,6 +1857,11 @@ "is-extglob": "^2.1.1" } }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, "is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", @@ -1882,11 +1907,6 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "js-sha3": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.6.1.tgz", - "integrity": "sha1-W4n3enR3Z5h39YxKB1JAk0sflcA=" - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -1940,13 +1960,15 @@ "object.assign": "^4.1.0" } }, - "keccakjs": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/keccakjs/-/keccakjs-0.2.3.tgz", - "integrity": "sha512-BjLkNDcfaZ6l8HBG9tH0tpmDv3sS2mA7FNQxFHpCdzP3Gb2MVruXBSuoM66SnVxKJpAr5dKGdkHD+bDokt8fTg==", + "keccak": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", + "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", "requires": { - "browserify-sha3": "^0.0.4", - "sha3": "^1.2.2" + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1", + "safe-buffer": "^5.1.0" } }, "klaw": { @@ -2388,9 +2410,9 @@ "dev": true }, "nan": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", - "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==" + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" }, "natural-compare": { "version": "1.4.0", @@ -2866,6 +2888,11 @@ "long": "^4.0.0" }, "dependencies": { + "@types/node": { + "version": "10.14.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.19.tgz", + "integrity": "sha512-j6Sqt38ssdMKutXBUuAcmWF8QtHW1Fwz/mz4Y+Wd9mzpBiVFirjpNQf363hG5itkG+yGaD+oiLyb50HxJ36l9Q==" + }, "long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", @@ -2919,15 +2946,6 @@ "strip-bom": "^2.0.0" } }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, "strip-bom": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", @@ -3020,28 +3038,12 @@ } }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, "requires": { - "glob": "^7.0.5" - }, - "dependencies": { - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } + "glob": "^7.1.3" } }, "ripemd160": { @@ -3054,10 +3056,11 @@ } }, "rlp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.1.tgz", - "integrity": "sha512-nqB/qy+YjXdp/zj1CjCiDwfLMBPv/XFDol0ir/7O/+Ix90++rvi+QoK1CDJcn8JoqCu2WrPPeRucu4qyIDzALg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.3.tgz", + "integrity": "sha512-l6YVrI7+d2vpW6D6rS05x2Xrmq8oW7v3pieZOJKBEdjuTF4Kz/iwk55Zyh1Zaz+KOB2kC8+2jZlp2u9L4tTzCQ==", "requires": { + "bn.js": "^4.11.1", "safe-buffer": "^5.1.1" } }, @@ -3086,9 +3089,9 @@ } }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" }, "safer-buffer": { "version": "2.1.2", @@ -3097,18 +3100,18 @@ "dev": true }, "secp256k1": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.5.2.tgz", - "integrity": "sha512-iin3kojdybY6NArd+UFsoTuapOF7bnJNf2UbcWXaY3z+E1sJDipl60vtzB5hbO/uquBu7z0fd4VC4Irp+xoFVQ==", - "requires": { - "bindings": "^1.2.1", - "bip66": "^1.1.3", - "bn.js": "^4.11.3", - "create-hash": "^1.1.2", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", + "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", + "requires": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", "drbg.js": "^1.0.1", - "elliptic": "^6.2.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" + "elliptic": "^6.4.1", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" } }, "semver": { @@ -3132,21 +3135,6 @@ "safe-buffer": "^5.0.1" } }, - "sha3": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-1.2.2.tgz", - "integrity": "sha1-pmxQmN5MJbyIM27ItIF9AFvKe6k=", - "requires": { - "nan": "2.10.0" - }, - "dependencies": { - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" - } - } - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -3188,9 +3176,9 @@ } }, "solc": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.24.tgz", - "integrity": "sha512-2xd7Cf1HeVwrIb6Bu1cwY2/TaLRodrppCq3l7rhLimFQgmxptXhTC3+/wesVLpB09F1A2kZgvbMOgH7wvhFnBQ==", + "version": "0.4.26", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.26.tgz", + "integrity": "sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA==", "dev": true, "requires": { "fs-extra": "^0.30.0", @@ -3349,6 +3337,14 @@ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", diff --git a/package.json b/package.json index f052c2723..85b59beec 100644 --- a/package.json +++ b/package.json @@ -14,15 +14,16 @@ }, "dependencies": { "@grpc/proto-loader": "^0.4.0", - "crypto-js": "3.1.4", - "ethereumjs-abi": "^0.6.5", - "grpc": "^1.18.0", + "crypto-js": "^3.1.9-1", + "ethereumjs-abi": "^0.6.8", + "grpc": "^1.23.0", + "nan": "^2.14.0", "protobufjs": "^6.8.6" }, "devDependencies": { "fs-extra": "^7.0.1", "mocha": "6.2.0", - "solc": "0.4.24", + "solc": "^0.4.26", "standard": "13.1.0" }, "engines": { diff --git a/permission/base_permissions.go b/permission/base_permissions.go index 8aa80cd47..5a259bad3 100644 --- a/permission/base_permissions.go +++ b/permission/base_permissions.go @@ -63,5 +63,5 @@ func (bp BasePermissions) Compose(bpFallthrough BasePermissions) BasePermissions } func (bp BasePermissions) String() string { - return fmt.Sprintf("Base: %b; Set: %b", bp.Perms, bp.SetBit) + return fmt.Sprintf("Base: %v; Set: %v", PermFlagToStringList(bp.Perms), PermFlagToStringList(bp.SetBit)) } diff --git a/permission/perm_flag.go b/permission/perm_flag.go index e0f2685d7..728b6f88f 100644 --- a/permission/perm_flag.go +++ b/permission/perm_flag.go @@ -44,7 +44,7 @@ const ( // Moderator permissions. // These permissions concern the alteration of the chain permissions listed above. Each permission relates to a // particular canonical permission mutation or query function. When an account is granted a moderation permission - // it is permitted to call that function. See snative.go for a marked-up description of what each function does. + // it is permitted to call that function. See contract.go for a marked-up description of what each function does. HasBase SetBase UnsetBase @@ -55,6 +55,9 @@ const ( NumPermissions uint = 18 // NOTE Adjust this too. We can support upto 64 + // To allow an operation with no permission flags set at all + None PermFlag = 0 + TopPermFlag PermFlag = 1 << (NumPermissions - 1) AllPermFlags PermFlag = TopPermFlag | (TopPermFlag - 1) DefaultPermFlags PermFlag = Send | Call | CreateContract | CreateAccount | Bond | Name | HasBase | HasRole | Proposal | Input | Batch diff --git a/protobuf/acm.proto b/protobuf/acm.proto index 8df8ef6fa..cd3eac389 100644 --- a/protobuf/acm.proto +++ b/protobuf/acm.proto @@ -20,15 +20,27 @@ message Account { option (gogoproto.goproto_stringer) = false; bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; crypto.PublicKey PublicKey = 2 [(gogoproto.nullable) = false]; + // Sequence counts the number of transactions that have been accepted from this account uint64 Sequence = 3; + // The account's current native token balance uint64 Balance = 4; + // We expect exactly one of EVMCode, WASMCode, and NativeName to be non-empty + // EVM bytecode bytes EVMCode = 5 [(gogoproto.customtype) = "Bytecode", (gogoproto.nullable) = false]; permission.AccountPermissions Permissions = 6 [(gogoproto.nullable) = false]; + // WASM bytecode bytes WASMCode = 7 [(gogoproto.customtype) = "Bytecode", (gogoproto.jsontag) = ",omitempty", (gogoproto.nullable) = false]; + // Fully qualified (`.`) name of native contract this for which this account object + // is a sentinel value. Which is to say this account object is a pointer to compiled code and does not contain + // the contract logic in its entirety + string NativeName = 11 [(gogoproto.jsontag) = ",omitempty"]; + // The sha3 hash of the code associated with the account bytes CodeHash = 8 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false, (gogoproto.jsontag) = "-"]; + // Pointer to the Metadata associated with this account repeated ContractMeta ContractMeta = 9; - // The metadata is stored in the deployed account. When the deployed account creates new account (from Solidity/EVM), they point to the original deployed - // account where the metadata is stored. This original account is called the forebear. + // The metadata is stored in the deployed account. When the deployed account creates new account + // (from Solidity/EVM), they point to the original deployed account where the metadata is stored. + // This original account is called the forebear. bytes Forebear = 10 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"]; } diff --git a/rpc/rpcquery/query_server.go b/rpc/rpcquery/query_server.go index 87b3a8088..29aa47500 100644 --- a/rpc/rpcquery/query_server.go +++ b/rpc/rpcquery/query_server.go @@ -68,47 +68,57 @@ func (qs *queryServer) GetAccount(ctx context.Context, param *GetAccountParam) ( // GetMetadata returns empty metadata string if not found. Metadata can be retrieved by account, or // by metadata hash func (qs *queryServer) GetMetadata(ctx context.Context, param *GetMetadataParam) (*MetadataResult, error) { - metadata := MetadataResult{} - var metahash acmstate.MetadataHash + metadata := &MetadataResult{} + var contractMeta *acm.ContractMeta var err error if param.Address != nil { acc, err := qs.accounts.GetAccount(*param.Address) if err != nil { - return &metadata, err + return metadata, err } if acc != nil && acc.CodeHash != nil { codehash := acc.CodeHash if acc.Forebear != nil { acc, err = qs.accounts.GetAccount(*acc.Forebear) if err != nil { - return &metadata, err + return metadata, err } } - found := false for _, m := range acc.ContractMeta { if bytes.Equal(m.CodeHash, codehash) { - copy(metahash[:], m.MetadataHash) - found = true + contractMeta = m break } } - if !found { + if contractMeta == nil { deployCodehash := compile.GetDeployCodeHash(acc.EVMCode, *param.Address) for _, m := range acc.ContractMeta { if bytes.Equal(m.CodeHash, deployCodehash) { - copy(metahash[:], m.MetadataHash) + contractMeta = m break } } } } } else if param.MetadataHash != nil { - copy(metahash[:], *param.MetadataHash) + contractMeta = &acm.ContractMeta{ + MetadataHash: *param.MetadataHash, + } + } + if contractMeta == nil { + return metadata, nil + } + if contractMeta.Metadata != "" { + // Looks like the metadata is already memoised - (e.g. by native.State) + metadata.Metadata = contractMeta.Metadata + } else { + var metadataHash acmstate.MetadataHash + copy(metadataHash[:], contractMeta.MetadataHash) + metadata.Metadata, err = qs.accounts.GetMetadata(metadataHash) } - metadata.Metadata, err = qs.accounts.GetMetadata(metahash) - return &metadata, err + return metadata, err } func (qs *queryServer) GetStorage(ctx context.Context, param *GetStorageParam) (*StorageValue, error) { diff --git a/txs/tx.go b/txs/tx.go index c86b52c84..96e7916e5 100644 --- a/txs/tx.go +++ b/txs/tx.go @@ -203,7 +203,7 @@ func (tx *Tx) String() string { if tx == nil { return "Tx{nil}" } - return fmt.Sprintf("Tx{TxHash: %s; Payload: %v}", tx.Hash(), tx.Payload) + return fmt.Sprintf("Tx{ChainID: %s; TxHash: %s; Payload: %s}", tx.ChainID, tx.Hash(), tx.MustSignBytes()) } // Regenerate the Tx hash if it has been mutated or as called by Hash() in first instance diff --git a/util/snatives/templates/indent_writer.go b/util/natives/templates/indent_writer.go similarity index 100% rename from util/snatives/templates/indent_writer.go rename to util/natives/templates/indent_writer.go diff --git a/util/snatives/templates/solidity_templates.go b/util/natives/templates/solidity_templates.go similarity index 89% rename from util/snatives/templates/solidity_templates.go rename to util/natives/templates/solidity_templates.go index 3e7c60d76..0eb952ad7 100644 --- a/util/snatives/templates/solidity_templates.go +++ b/util/natives/templates/solidity_templates.go @@ -20,7 +20,7 @@ import ( "strings" "text/template" - "github.com/hyperledger/burrow/execution/evm" + "github.com/hyperledger/burrow/execution/native" "github.com/iancoleman/strcase" ) @@ -67,11 +67,11 @@ func init() { type solidityContract struct { SolidityPragmaVersion string - *evm.SNativeContractDescription + *native.Contract } type solidityFunction struct { - *evm.SNativeFunctionDescription + *native.Function } // @@ -79,15 +79,15 @@ type solidityFunction struct { // // Create a templated solidityContract from an SNative contract description -func NewSolidityContract(contract *evm.SNativeContractDescription) *solidityContract { +func NewSolidityContract(contract *native.Contract) *solidityContract { return &solidityContract{ - SolidityPragmaVersion: ">=0.4.24", - SNativeContractDescription: contract, + SolidityPragmaVersion: ">=0.4.24", + Contract: contract, } } func (contract *solidityContract) Comment() string { - return comment(contract.SNativeContractDescription.Comment) + return comment(contract.Contract.Comment) } // Get a version of the contract name to be used for an instance of the contract @@ -103,7 +103,7 @@ func (contract *solidityContract) InstanceName() string { func (contract *solidityContract) Address() string { return fmt.Sprintf("0x%s", - contract.SNativeContractDescription.Address()) + contract.Contract.Address()) } // Generate Solidity code for this SNative contract @@ -117,7 +117,7 @@ func (contract *solidityContract) Solidity() (string, error) { } func (contract *solidityContract) Functions() []*solidityFunction { - functions := contract.SNativeContractDescription.Functions() + functions := contract.Contract.Functions() solidityFunctions := make([]*solidityFunction, len(functions)) for i, function := range functions { solidityFunctions[i] = NewSolidityFunction(function) @@ -130,7 +130,7 @@ func (contract *solidityContract) Functions() []*solidityFunction { // // Create a templated solidityFunction from an SNative function description -func NewSolidityFunction(function *evm.SNativeFunctionDescription) *solidityFunction { +func NewSolidityFunction(function *native.Function) *solidityFunction { return &solidityFunction{function} } @@ -157,7 +157,7 @@ func (function *solidityFunction) RetList() string { } func (function *solidityFunction) Comment() string { - return comment(function.SNativeFunctionDescription.Comment) + return comment(function.Function.Comment) } func (function *solidityFunction) SolidityIndent(indentLevel uint) (string, error) { diff --git a/util/snatives/templates/solidity_templates_test.go b/util/natives/templates/solidity_templates_test.go similarity index 82% rename from util/snatives/templates/solidity_templates_test.go rename to util/natives/templates/solidity_templates_test.go index 998aa11fd..b3933cf96 100644 --- a/util/snatives/templates/solidity_templates_test.go +++ b/util/natives/templates/solidity_templates_test.go @@ -18,14 +18,14 @@ import ( "fmt" "testing" - "github.com/hyperledger/burrow/execution/evm" + "github.com/hyperledger/burrow/execution/native" "github.com/stretchr/testify/assert" ) func TestSNativeFuncTemplate(t *testing.T) { - contract := evm.SNativeContracts()["Permissions"] - function, err := contract.FunctionByName("removeRole") - if err != nil { + contract := native.MustDefaultNatives().GetContract("Permissions") + function := contract.FunctionByName("removeRole") + if function == nil { t.Fatal("Couldn't get function") } solidityFunction := NewSolidityFunction(function) @@ -37,7 +37,7 @@ func TestSNativeFuncTemplate(t *testing.T) { // This test checks that we can generate the SNative contract interface and // prints it to stdout func TestSNativeContractTemplate(t *testing.T) { - contract := evm.SNativeContracts()["Permissions"] + contract := native.MustDefaultNatives().GetContract("Permissions") solidityContract := NewSolidityContract(contract) solidity, err := solidityContract.Solidity() assert.NoError(t, err) From b17a3832c23c11172b6b580713cdc3da39a86589 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 30 Sep 2019 11:37:26 +0100 Subject: [PATCH 023/185] Remove copypasta sha3 implementation in favour of NewLegacyKeccak256() added to x/crypto Signed-off-by: Silas Davis --- acm/acmstate/state.go | 5 +- bcm/blockchain_test.go | 18 +-- crypto/address.go | 6 +- crypto/sha3/LICENSE | 27 ---- crypto/sha3/PATENTS | 22 --- crypto/sha3/keccakf.go | 171 -------------------- crypto/sha3/sha3.go | 225 --------------------------- deploy/compile/compilers.go | 7 +- execution/evm/abi/event_spec.go | 4 +- execution/evm/abi/function_spec.go | 4 +- execution/evm/contract.go | 6 +- execution/evm/evm_test.go | 4 +- execution/exec/stream_event_test.go | 4 +- execution/native/account.go | 6 +- execution/native/contract.go | 4 +- execution/native/permissions_test.go | 4 +- execution/native/precompiles.go | 2 +- execution/state/events_test.go | 4 +- integration/keys/keys_server_test.go | 4 +- integration/rpctest/helpers.go | 5 +- integration/rpctransact/call_test.go | 1 - 21 files changed, 45 insertions(+), 488 deletions(-) delete mode 100644 crypto/sha3/LICENSE delete mode 100644 crypto/sha3/PATENTS delete mode 100644 crypto/sha3/keccakf.go delete mode 100644 crypto/sha3/sha3.go diff --git a/acm/acmstate/state.go b/acm/acmstate/state.go index ca61ddac5..6d7b92adc 100644 --- a/acm/acmstate/state.go +++ b/acm/acmstate/state.go @@ -6,7 +6,8 @@ import ( "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" + "golang.org/x/crypto/sha3" + "github.com/hyperledger/burrow/permission" "github.com/tmthrgd/go-hex" ) @@ -38,7 +39,7 @@ func (ch MetadataHash) String() string { } func GetMetadataHash(metadata string) (metahash MetadataHash) { - hash := sha3.NewKeccak256() + hash := sha3.NewLegacyKeccak256() hash.Write([]byte(metadata)) copy(metahash[:], hash.Sum(nil)) return diff --git a/bcm/blockchain_test.go b/bcm/blockchain_test.go index 501b26bbf..ea93d2ad4 100644 --- a/bcm/blockchain_test.go +++ b/bcm/blockchain_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/genesis" "github.com/hyperledger/burrow/logging" "github.com/stretchr/testify/assert" @@ -25,16 +25,16 @@ func TestLoadOrNewBlockchain(t *testing.T) { // First block blockTime1 := genesisDoc.GenesisTime.Add(time.Second * 10) - blockHash1 := sha3.Sha3([]byte("blockHash")) - appHash1 := sha3.Sha3([]byte("appHash")) + blockHash1 := crypto.Keccak256([]byte("blockHash")) + appHash1 := crypto.Keccak256([]byte("appHash")) err = blockchain.CommitBlock(blockTime1, blockHash1, appHash1) require.NoError(t, err) assertState(t, blockchain, 1, blockTime1, appHash1) // Second block blockTime2a := blockTime1.Add(time.Second * 30) - blockHash2a := sha3.Sha3(append(blockHash1, 2)) - appHash2a := sha3.Sha3(append(appHash1, 2)) + blockHash2a := crypto.Keccak256(append(blockHash1, 2)) + appHash2a := crypto.Keccak256(append(appHash1, 2)) err = blockchain.CommitBlock(blockTime2a, blockHash2a, appHash2a) require.NoError(t, err) assertState(t, blockchain, 2, blockTime2a, appHash2a) @@ -48,16 +48,16 @@ func TestLoadOrNewBlockchain(t *testing.T) { // Commit (overwriting previous block 2 pointer blockTime2b := blockTime1.Add(time.Second * 30) - blockHash2b := sha3.Sha3(append(blockHash1, 2)) - appHash2b := sha3.Sha3(append(appHash1, 2)) + blockHash2b := crypto.Keccak256(append(blockHash1, 2)) + appHash2b := crypto.Keccak256(append(appHash1, 2)) err = blockchain.CommitBlock(blockTime2b, blockHash2b, appHash2b) require.NoError(t, err) assertState(t, blockchain, 2, blockTime2b, appHash2b) // Commit again to check things are okay blockTime3 := blockTime2b.Add(time.Second * 30) - blockHash3 := sha3.Sha3(append(blockHash2b, 2)) - appHash3 := sha3.Sha3(append(appHash2b, 2)) + blockHash3 := crypto.Keccak256(append(blockHash2b, 2)) + appHash3 := crypto.Keccak256(append(appHash2b, 2)) err = blockchain.CommitBlock(blockTime3, blockHash3, appHash3) require.NoError(t, err) assertState(t, blockchain, 3, blockTime3, appHash3) diff --git a/crypto/address.go b/crypto/address.go index 631c1dcc6..a3bf278db 100644 --- a/crypto/address.go +++ b/crypto/address.go @@ -8,7 +8,7 @@ import ( "fmt" "github.com/hyperledger/burrow/binary" - "github.com/hyperledger/burrow/crypto/sha3" + hex "github.com/tmthrgd/go-hex" ) @@ -214,7 +214,7 @@ func NewContractAddress2(caller Address, salt [binary.Word256Length]byte, initco temp = append(temp, []byte{0xFF}...) temp = append(temp, caller[:]...) temp = append(temp, salt[:]...) - temp = append(temp, sha3.Sha3(initcode)...) - copy(newAddr[:], sha3.Sha3(temp)[12:]) + temp = append(temp, Keccak256(initcode)...) + copy(newAddr[:], Keccak256(temp)[12:]) return } diff --git a/crypto/sha3/LICENSE b/crypto/sha3/LICENSE deleted file mode 100644 index 6a66aea5e..000000000 --- a/crypto/sha3/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/crypto/sha3/PATENTS b/crypto/sha3/PATENTS deleted file mode 100644 index 733099041..000000000 --- a/crypto/sha3/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/crypto/sha3/keccakf.go b/crypto/sha3/keccakf.go deleted file mode 100644 index e12792fdc..000000000 --- a/crypto/sha3/keccakf.go +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sha3 - -// This file implements the core Keccak permutation function necessary for computing SHA3. -// This is implemented in a separate file to allow for replacement by an optimized implementation. -// Nothing in this package is exported. -// For the detailed specification, refer to the Keccak web site (http://keccak.noekeon.org/). - -// rc stores the round constants for use in the ι step. -var rc = [...]uint64{ - 0x0000000000000001, - 0x0000000000008082, - 0x800000000000808A, - 0x8000000080008000, - 0x000000000000808B, - 0x0000000080000001, - 0x8000000080008081, - 0x8000000000008009, - 0x000000000000008A, - 0x0000000000000088, - 0x0000000080008009, - 0x000000008000000A, - 0x000000008000808B, - 0x800000000000008B, - 0x8000000000008089, - 0x8000000000008003, - 0x8000000000008002, - 0x8000000000000080, - 0x000000000000800A, - 0x800000008000000A, - 0x8000000080008081, - 0x8000000000008080, - 0x0000000080000001, - 0x8000000080008008, -} - -// ro_xx represent the rotation offsets for use in the χ step. -// Defining them as const instead of in an array allows the compiler to insert constant shifts. -const ( - ro_00 = 0 // not used - ro_01 = 36 - ro_02 = 3 - ro_03 = 41 - ro_04 = 18 - ro_05 = 1 - ro_06 = 44 - ro_07 = 10 - ro_08 = 45 - ro_09 = 2 - ro_10 = 62 - ro_11 = 6 - ro_12 = 43 - ro_13 = 15 - ro_14 = 61 - ro_15 = 28 - ro_16 = 55 - ro_17 = 25 - ro_18 = 21 - ro_19 = 56 - ro_20 = 27 - ro_21 = 20 - ro_22 = 39 - ro_23 = 8 - ro_24 = 14 -) - -// keccakF computes the complete Keccak-f function consisting of 24 rounds with a different -// constant (rc) in each round. This implementation fully unrolls the round function to avoid -// inner loops, as well as pre-calculating shift offsets. -func (d *digest) keccakF() { - for _, roundConstant := range rc { - // θ step - d.c[0] = d.a[0] ^ d.a[5] ^ d.a[10] ^ d.a[15] ^ d.a[20] - d.c[1] = d.a[1] ^ d.a[6] ^ d.a[11] ^ d.a[16] ^ d.a[21] - d.c[2] = d.a[2] ^ d.a[7] ^ d.a[12] ^ d.a[17] ^ d.a[22] - d.c[3] = d.a[3] ^ d.a[8] ^ d.a[13] ^ d.a[18] ^ d.a[23] - d.c[4] = d.a[4] ^ d.a[9] ^ d.a[14] ^ d.a[19] ^ d.a[24] - - d.d[0] = d.c[4] ^ (d.c[1]<<1 ^ d.c[1]>>63) - d.d[1] = d.c[0] ^ (d.c[2]<<1 ^ d.c[2]>>63) - d.d[2] = d.c[1] ^ (d.c[3]<<1 ^ d.c[3]>>63) - d.d[3] = d.c[2] ^ (d.c[4]<<1 ^ d.c[4]>>63) - d.d[4] = d.c[3] ^ (d.c[0]<<1 ^ d.c[0]>>63) - - d.a[0] ^= d.d[0] - d.a[1] ^= d.d[1] - d.a[2] ^= d.d[2] - d.a[3] ^= d.d[3] - d.a[4] ^= d.d[4] - d.a[5] ^= d.d[0] - d.a[6] ^= d.d[1] - d.a[7] ^= d.d[2] - d.a[8] ^= d.d[3] - d.a[9] ^= d.d[4] - d.a[10] ^= d.d[0] - d.a[11] ^= d.d[1] - d.a[12] ^= d.d[2] - d.a[13] ^= d.d[3] - d.a[14] ^= d.d[4] - d.a[15] ^= d.d[0] - d.a[16] ^= d.d[1] - d.a[17] ^= d.d[2] - d.a[18] ^= d.d[3] - d.a[19] ^= d.d[4] - d.a[20] ^= d.d[0] - d.a[21] ^= d.d[1] - d.a[22] ^= d.d[2] - d.a[23] ^= d.d[3] - d.a[24] ^= d.d[4] - - // ρ and π steps - d.b[0] = d.a[0] - d.b[1] = d.a[6]<>(64-ro_06) - d.b[2] = d.a[12]<>(64-ro_12) - d.b[3] = d.a[18]<>(64-ro_18) - d.b[4] = d.a[24]<>(64-ro_24) - d.b[5] = d.a[3]<>(64-ro_15) - d.b[6] = d.a[9]<>(64-ro_21) - d.b[7] = d.a[10]<>(64-ro_02) - d.b[8] = d.a[16]<>(64-ro_08) - d.b[9] = d.a[22]<>(64-ro_14) - d.b[10] = d.a[1]<>(64-ro_05) - d.b[11] = d.a[7]<>(64-ro_11) - d.b[12] = d.a[13]<>(64-ro_17) - d.b[13] = d.a[19]<>(64-ro_23) - d.b[14] = d.a[20]<>(64-ro_04) - d.b[15] = d.a[4]<>(64-ro_20) - d.b[16] = d.a[5]<>(64-ro_01) - d.b[17] = d.a[11]<>(64-ro_07) - d.b[18] = d.a[17]<>(64-ro_13) - d.b[19] = d.a[23]<>(64-ro_19) - d.b[20] = d.a[2]<>(64-ro_10) - d.b[21] = d.a[8]<>(64-ro_16) - d.b[22] = d.a[14]<>(64-ro_22) - d.b[23] = d.a[15]<>(64-ro_03) - d.b[24] = d.a[21]<>(64-ro_09) - - // χ step - d.a[0] = d.b[0] ^ (^d.b[1] & d.b[2]) - d.a[1] = d.b[1] ^ (^d.b[2] & d.b[3]) - d.a[2] = d.b[2] ^ (^d.b[3] & d.b[4]) - d.a[3] = d.b[3] ^ (^d.b[4] & d.b[0]) - d.a[4] = d.b[4] ^ (^d.b[0] & d.b[1]) - d.a[5] = d.b[5] ^ (^d.b[6] & d.b[7]) - d.a[6] = d.b[6] ^ (^d.b[7] & d.b[8]) - d.a[7] = d.b[7] ^ (^d.b[8] & d.b[9]) - d.a[8] = d.b[8] ^ (^d.b[9] & d.b[5]) - d.a[9] = d.b[9] ^ (^d.b[5] & d.b[6]) - d.a[10] = d.b[10] ^ (^d.b[11] & d.b[12]) - d.a[11] = d.b[11] ^ (^d.b[12] & d.b[13]) - d.a[12] = d.b[12] ^ (^d.b[13] & d.b[14]) - d.a[13] = d.b[13] ^ (^d.b[14] & d.b[10]) - d.a[14] = d.b[14] ^ (^d.b[10] & d.b[11]) - d.a[15] = d.b[15] ^ (^d.b[16] & d.b[17]) - d.a[16] = d.b[16] ^ (^d.b[17] & d.b[18]) - d.a[17] = d.b[17] ^ (^d.b[18] & d.b[19]) - d.a[18] = d.b[18] ^ (^d.b[19] & d.b[15]) - d.a[19] = d.b[19] ^ (^d.b[15] & d.b[16]) - d.a[20] = d.b[20] ^ (^d.b[21] & d.b[22]) - d.a[21] = d.b[21] ^ (^d.b[22] & d.b[23]) - d.a[22] = d.b[22] ^ (^d.b[23] & d.b[24]) - d.a[23] = d.b[23] ^ (^d.b[24] & d.b[20]) - d.a[24] = d.b[24] ^ (^d.b[20] & d.b[21]) - - // ι step - d.a[0] ^= roundConstant - } -} diff --git a/crypto/sha3/sha3.go b/crypto/sha3/sha3.go deleted file mode 100644 index 6f262f217..000000000 --- a/crypto/sha3/sha3.go +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sha3 - -// Package sha3 implements the SHA3 hash algorithm (formerly called Keccak) chosen by NIST in 2012. -// This file provides a SHA3 implementation which implements the standard hash.Hash interface. -// Writing input data, including padding, and reading output data are computed in this file. -// Note that the current implementation can compute the hash of an integral number of bytes only. -// This is a consequence of the hash interface in which a buffer of bytes is passed in. -// The internals of the Keccak-f function are computed in keccakf.go. -// For the detailed specification, refer to the Keccak web site (http://keccak.noekeon.org/). - -import ( - "encoding/binary" - "hash" -) - -// laneSize is the size in bytes of each "lane" of the internal state of SHA3 (5 * 5 * 8). -// Note that changing this size would requires using a type other than uint64 to store each lane. -const laneSize = 8 - -// sliceSize represents the dimensions of the internal state, a square matrix of -// sliceSize ** 2 lanes. This is the size of both the "rows" and "columns" dimensions in the -// terminology of the SHA3 specification. -const sliceSize = 5 - -// numLanes represents the total number of lanes in the state. -const numLanes = sliceSize * sliceSize - -// stateSize is the size in bytes of the internal state of SHA3 (5 * 5 * WSize). -const stateSize = laneSize * numLanes - -// digest represents the partial evaluation of a checksum. -// Note that capacity, and not outputSize, is the critical security parameter, as SHA3 can output -// an arbitrary number of bytes for any given capacity. The Keccak proposal recommends that -// capacity = 2*outputSize to ensure that finding a collision of size outputSize requires -// O(2^{outputSize/2}) computations (the birthday lower bound). Future standards may modify the -// capacity/outputSize ratio to allow for more output with lower cryptographic security. -type digest struct { - a [numLanes]uint64 // main state of the hash - b [numLanes]uint64 // intermediate states - c [sliceSize]uint64 // intermediate states - d [sliceSize]uint64 // intermediate states - outputSize int // desired output size in bytes - capacity int // number of bytes to leave untouched during squeeze/absorb - absorbed int // number of bytes absorbed thus far -} - -// minInt returns the lesser of two integer arguments, to simplify the absorption routine. -func minInt(v1, v2 int) int { - if v1 <= v2 { - return v1 - } - return v2 -} - -// rate returns the number of bytes of the internal state which can be absorbed or squeezed -// in between calls to the permutation function. -func (d *digest) rate() int { - return stateSize - d.capacity -} - -// Reset clears the internal state by zeroing bytes in the state buffer. -// This can be skipped for a newly-created hash state; the default zero-allocated state is correct. -func (d *digest) Reset() { - d.absorbed = 0 - for i := range d.a { - d.a[i] = 0 - } -} - -// BlockSize, required by the hash.Hash interface, does not have a standard intepretation -// for a sponge-based construction like SHA3. We return the data rate: the number of bytes which -// can be absorbed per invocation of the permutation function. For Merkle-Damgård based hashes -// (ie SHA1, SHA2, MD5) the output size of the internal compression function is returned. -// We consider this to be roughly equivalent because it represents the number of bytes of output -// produced per cryptographic operation. -func (d *digest) BlockSize() int { return d.rate() } - -// Size returns the output size of the hash function in bytes. -func (d *digest) Size() int { - return d.outputSize -} - -// unalignedAbsorb is a helper function for Write, which absorbs data that isn't aligned with an -// 8-byte lane. This requires shifting the individual bytes into position in a uint64. -func (d *digest) unalignedAbsorb(p []byte) { - var t uint64 - for i := len(p) - 1; i >= 0; i-- { - t <<= 8 - t |= uint64(p[i]) - } - offset := (d.absorbed) % d.rate() - t <<= 8 * uint(offset%laneSize) - d.a[offset/laneSize] ^= t - d.absorbed += len(p) -} - -// Write "absorbs" bytes into the state of the SHA3 hash, updating as needed when the sponge -// "fills up" with rate() bytes. Since lanes are stored internally as type uint64, this requires -// converting the incoming bytes into uint64s using a little endian interpretation. This -// implementation is optimized for large, aligned writes of multiples of 8 bytes (laneSize). -// Non-aligned or uneven numbers of bytes require shifting and are slower. -func (d *digest) Write(p []byte) (int, error) { - // An initial offset is needed if the we aren't absorbing to the first lane initially. - offset := d.absorbed % d.rate() - toWrite := len(p) - - // The first lane may need to absorb unaligned and/or incomplete data. - if (offset%laneSize != 0 || len(p) < 8) && len(p) > 0 { - toAbsorb := minInt(laneSize-(offset%laneSize), len(p)) - d.unalignedAbsorb(p[:toAbsorb]) - p = p[toAbsorb:] - offset = (d.absorbed) % d.rate() - - // For every rate() bytes absorbed, the state must be permuted via the F Function. - if (d.absorbed)%d.rate() == 0 { - d.keccakF() - } - } - - // This loop should absorb the bulk of the data into full, aligned lanes. - // It will call the update function as necessary. - for len(p) > 7 { - firstLane := offset / laneSize - lastLane := minInt(d.rate()/laneSize, firstLane+len(p)/laneSize) - - // This inner loop absorbs input bytes into the state in groups of 8, converted to uint64s. - for lane := firstLane; lane < lastLane; lane++ { - d.a[lane] ^= binary.LittleEndian.Uint64(p[:laneSize]) - p = p[laneSize:] - } - d.absorbed += (lastLane - firstLane) * laneSize - // For every rate() bytes absorbed, the state must be permuted via the F Function. - if (d.absorbed)%d.rate() == 0 { - d.keccakF() - } - - offset = 0 - } - - // If there are insufficient bytes to fill the final lane, an unaligned absorption. - // This should always start at a correct lane boundary though, or else it would be caught - // by the uneven opening lane case above. - if len(p) > 0 { - d.unalignedAbsorb(p) - } - - return toWrite, nil -} - -// pad computes the SHA3 padding scheme based on the number of bytes absorbed. -// The padding is a 1 bit, followed by an arbitrary number of 0s and then a final 1 bit, such that -// the input bits plus padding bits are a multiple of rate(). Adding the padding simply requires -// xoring an opening and closing bit into the appropriate lanes. -func (d *digest) pad() { - offset := d.absorbed % d.rate() - // The opening pad bit must be shifted into position based on the number of bytes absorbed - padOpenLane := offset / laneSize - d.a[padOpenLane] ^= 0x0000000000000001 << uint(8*(offset%laneSize)) - // The closing padding bit is always in the last position - padCloseLane := (d.rate() / laneSize) - 1 - d.a[padCloseLane] ^= 0x8000000000000000 -} - -// finalize prepares the hash to output data by padding and one final permutation of the state. -func (d *digest) finalize() { - d.pad() - d.keccakF() -} - -// squeeze outputs an arbitrary number of bytes from the hash state. -// Squeezing can require multiple calls to the F function (one per rate() bytes squeezed), -// although this is not the case for standard SHA3 parameters. This implementation only supports -// squeezing a single time, subsequent squeezes may lose alignment. Future implementations -// may wish to support multiple squeeze calls, for example to support use as a PRNG. -func (d *digest) squeeze(in []byte, toSqueeze int) []byte { - // Because we read in blocks of laneSize, we need enough room to read - // an integral number of lanes - needed := toSqueeze + (laneSize-toSqueeze%laneSize)%laneSize - if cap(in)-len(in) < needed { - newIn := make([]byte, len(in), len(in)+needed) - copy(newIn, in) - in = newIn - } - out := in[len(in) : len(in)+needed] - - for len(out) > 0 { - for i := 0; i < d.rate() && len(out) > 0; i += laneSize { - binary.LittleEndian.PutUint64(out[:], d.a[i/laneSize]) - out = out[laneSize:] - } - if len(out) > 0 { - d.keccakF() - } - } - return in[:len(in)+toSqueeze] // Re-slice in case we wrote extra data. -} - -// Sum applies padding to the hash state and then squeezes out the desired nubmer of output bytes. -func (d *digest) Sum(in []byte) []byte { - // Make a copy of the original hash so that caller can keep writing and summing. - dup := *d - dup.finalize() - return dup.squeeze(in, dup.outputSize) -} - -// The NewKeccakX constructors enable initializing a hash in any of the four recommend sizes -// from the Keccak specification, all of which set capacity=2*outputSize. Note that the final -// NIST standard for SHA3 may specify different input/output lengths. -// The output size is indicated in bits but converted into bytes internally. -func NewKeccak224() hash.Hash { return &digest{outputSize: 224 / 8, capacity: 2 * 224 / 8} } -func NewKeccak256() hash.Hash { return &digest{outputSize: 256 / 8, capacity: 2 * 256 / 8} } -func NewKeccak384() hash.Hash { return &digest{outputSize: 384 / 8, capacity: 2 * 384 / 8} } -func NewKeccak512() hash.Hash { return &digest{outputSize: 512 / 8, capacity: 2 * 512 / 8} } - -func Sha3(data ...[]byte) []byte { - d := NewKeccak256() - for _, b := range data { - d.Write(b) - } - return d.Sum(nil) -} diff --git a/deploy/compile/compilers.go b/deploy/compile/compilers.go index 5772a22eb..c20327e45 100644 --- a/deploy/compile/compilers.go +++ b/deploy/compile/compilers.go @@ -12,7 +12,8 @@ import ( "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" + "golang.org/x/crypto/sha3" + "github.com/hyperledger/burrow/execution/evm/asm" "github.com/hyperledger/burrow/logging" hex "github.com/tmthrgd/go-hex" @@ -435,7 +436,7 @@ func (contract *SolidityContract) GetMetadata(logger *logging.Logger) (map[acmst return nil, err } - hash := sha3.NewKeccak256() + hash := sha3.NewLegacyKeccak256() hash.Write(runtime) var codehash acmstate.CodeHash copy(codehash[:], hash.Sum(nil)) @@ -461,7 +462,7 @@ func GetDeployCodeHash(code []byte, address crypto.Address) []byte { code = append([]byte{byte(asm.PUSH20)}, append(make([]byte, crypto.AddressLength), code[crypto.AddressLength+1:]...)...) } - hash := sha3.NewKeccak256() + hash := sha3.NewLegacyKeccak256() hash.Write(code) return hash.Sum(nil) } diff --git a/execution/evm/abi/event_spec.go b/execution/evm/abi/event_spec.go index 6061aa822..146481b0f 100644 --- a/execution/evm/abi/event_spec.go +++ b/execution/evm/abi/event_spec.go @@ -4,9 +4,9 @@ import ( "encoding/json" "reflect" - "github.com/hyperledger/burrow/crypto/sha3" "github.com/hyperledger/burrow/event/query" "github.com/tmthrgd/go-hex" + "golang.org/x/crypto/sha3" ) // Argument is a decoded function parameter, return or event field @@ -73,7 +73,7 @@ func (e *EventSpec) unmarshalSpec(s *specJSON) error { type EventID [EventIDSize]byte func GetEventID(signature string) (id EventID) { - hash := sha3.NewKeccak256() + hash := sha3.NewLegacyKeccak256() hash.Write([]byte(signature)) copy(id[:], hash.Sum(nil)) return diff --git a/execution/evm/abi/function_spec.go b/execution/evm/abi/function_spec.go index ccfca6f79..fffa43862 100644 --- a/execution/evm/abi/function_spec.go +++ b/execution/evm/abi/function_spec.go @@ -3,7 +3,7 @@ package abi import ( "fmt" - "github.com/hyperledger/burrow/crypto/sha3" + "golang.org/x/crypto/sha3" ) // FunctionIDSize is the length of the function selector @@ -19,7 +19,7 @@ type FunctionSpec struct { type FunctionID [FunctionIDSize]byte func GetFunctionID(signature string) (id FunctionID) { - hash := sha3.NewKeccak256() + hash := sha3.NewLegacyKeccak256() hash.Write([]byte(signature)) copy(id[:], hash.Sum(nil)[:4]) return diff --git a/execution/evm/contract.go b/execution/evm/contract.go index 2b94e112f..0b85bdd1c 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -12,7 +12,7 @@ import ( "github.com/hyperledger/burrow/acm/acmstate" . "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm/abi" @@ -321,7 +321,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e maybe.PushError(useGasNegative(params.Gas, native.GasSha3)) offset, size := stack.PopBigInt(), stack.PopBigInt() data := memory.Read(offset, size) - data = sha3.Sha3(data) + data = crypto.Keccak256(data) stack.PushBytes(data) c.debugf(" => (%v) %X\n", size, data) @@ -441,7 +441,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e if len(acc.CodeHash) > 0 { copy(extcodehash[:], acc.CodeHash) } else { - copy(extcodehash[:], sha3.Sha3(acc.Code())) + copy(extcodehash[:], crypto.Keccak256(acc.Code())) } stack.Push(extcodehash) } diff --git a/execution/evm/evm_test.go b/execution/evm/evm_test.go index 86d6f8f1d..8f2b3990e 100644 --- a/execution/evm/evm_test.go +++ b/execution/evm/evm_test.go @@ -25,7 +25,7 @@ import ( "github.com/hyperledger/burrow/acm/acmstate" . "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" . "github.com/hyperledger/burrow/execution/evm/asm" @@ -1325,7 +1325,7 @@ func TestEVM(t *testing.T) { bytecode = MustSplice(PUSH1, 0x03, EXTCODEHASH, return1()) output, err = call(vm, st, account1, account2, bytecode, nil, &gas) assert.NoError(t, err) - assert.Equal(t, sha3.Sha3([]byte("ripemd160Func")), output) + assert.Equal(t, crypto.Keccak256([]byte("ripemd160Func")), output) // EXTCODEHASH of non-existent account should be 0 bytecode = MustSplice(PUSH1, 0xff, EXTCODEHASH, return1()) diff --git a/execution/exec/stream_event_test.go b/execution/exec/stream_event_test.go index 001b56979..e6659f426 100644 --- a/execution/exec/stream_event_test.go +++ b/execution/exec/stream_event_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/genesis" "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" @@ -38,7 +38,7 @@ func TestConsumeBlockExecution(t *testing.T) { be := &BlockExecution{ Header: &types.Header{ ChainID: genesisDoc.ChainID(), - AppHash: sha3.Sha3([]byte("hashily")), + AppHash: crypto.Keccak256([]byte("hashily")), NumTxs: 1, Time: time.Now(), Height: height, diff --git a/execution/native/account.go b/execution/native/account.go index 8eb3d33f1..47ae9bd75 100644 --- a/execution/native/account.go +++ b/execution/native/account.go @@ -6,10 +6,10 @@ import ( "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" "github.com/hyperledger/burrow/deploy/compile" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/txs/payload" + "golang.org/x/crypto/sha3" ) func CreateAccount(st acmstate.ReaderWriter, address crypto.Address) error { @@ -50,7 +50,7 @@ func initCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.A acc.EVMCode = code // keccak256 hash of a contract's code - hash := sha3.NewKeccak256() + hash := sha3.NewLegacyKeccak256() hash.Write(code) codehash := hash.Sum(nil) @@ -127,7 +127,7 @@ func InitWASMCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) acc.WASMCode = code // keccak256 hash of a contract's code - hash := sha3.NewKeccak256() + hash := sha3.NewLegacyKeccak256() hash.Write(code) acc.CodeHash = hash.Sum(nil) return st.UpdateAccount(acc) diff --git a/execution/native/contract.go b/execution/native/contract.go index a4f807a89..4abbbc16c 100644 --- a/execution/native/contract.go +++ b/execution/native/contract.go @@ -20,7 +20,7 @@ import ( "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm/abi" @@ -183,7 +183,7 @@ func (c *Contract) ContractMeta() []*acm.ContractMeta { } func AddressFromName(name string) (address crypto.Address) { - hash := sha3.Sha3([]byte(name)) + hash := crypto.Keccak256([]byte(name)) copy(address[:], hash[len(hash)-crypto.AddressLength:]) return } diff --git a/execution/native/permissions_test.go b/execution/native/permissions_test.go index de6048f26..653500fab 100644 --- a/execution/native/permissions_test.go +++ b/execution/native/permissions_test.go @@ -29,7 +29,7 @@ import ( "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/execution/evm/asm/bc" @@ -121,7 +121,7 @@ func TestSNativeContractDescription_Dispatch(t *testing.T) { func TestSNativeContractDescription_Address(t *testing.T) { contract, err := NewContract("CoolButVeryLongNamedContractOfDoom", "A comment", logger) require.NoError(t, err) - assert.Equal(t, sha3.Sha3(([]byte)(contract.Name))[12:], contract.Address().Bytes()) + assert.Equal(t, crypto.Keccak256(([]byte)(contract.Name))[12:], contract.Address().Bytes()) } func TestHasPermission(t *testing.T) { diff --git a/execution/native/precompiles.go b/execution/native/precompiles.go index 045fb8165..4133a50cc 100644 --- a/execution/native/precompiles.go +++ b/execution/native/precompiles.go @@ -43,7 +43,7 @@ func ecrecoverFunc(state State, caller crypto.Address, input []byte, gas *int64) return nil, err OH NO STOCASTIC CAT CODING!!!! } - hashed := sha3.Sha3(recovered[1:]) + hashed := crypto.Keccak256(recovered[1:]) return LeftPadBytes(hashed, 32), nil } */ diff --git a/execution/state/events_test.go b/execution/state/events_test.go index fe6b58331..ccc47ab9f 100644 --- a/execution/state/events_test.go +++ b/execution/state/events_test.go @@ -8,7 +8,7 @@ import ( "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/config/source" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/execution/exec" "github.com/stretchr/testify/require" dbm "github.com/tendermint/tm-db" @@ -168,7 +168,7 @@ func mkEvent(height, tx, index uint64) *exec.Event { Header: &exec.Header{ Height: height, Index: index, - TxHash: sha3.Sha3([]byte(fmt.Sprintf("txhash%v%v%v", height, tx, index))), + TxHash: crypto.Keccak256([]byte(fmt.Sprintf("txhash%v%v%v", height, tx, index))), EventID: fmt.Sprintf("eventID: %v%v%v", height, tx, index), }, Log: &exec.LogEvent{ diff --git a/integration/keys/keys_server_test.go b/integration/keys/keys_server_test.go index bf90cf98e..6bc299941 100644 --- a/integration/keys/keys_server_test.go +++ b/integration/keys/keys_server_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" + "github.com/hyperledger/burrow/integration" "github.com/hyperledger/burrow/keys" "github.com/stretchr/testify/assert" @@ -76,7 +76,7 @@ func TestKeysServer(t *testing.T) { require.NoError(t, err) msg := []byte("the hash of something!") - hash := sha3.Sha3(msg) + hash := crypto.Keccak256(msg) sig, err := cli.Sign(ctx, &keys.SignRequest{Address: addr, Message: hash}) require.NoError(t, err) diff --git a/integration/rpctest/helpers.go b/integration/rpctest/helpers.go index b68603a01..9e51df43e 100644 --- a/integration/rpctest/helpers.go +++ b/integration/rpctest/helpers.go @@ -6,7 +6,8 @@ import ( "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/crypto/sha3" + "golang.org/x/crypto/sha3" + "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/names" "github.com/hyperledger/burrow/integration" @@ -58,7 +59,7 @@ func CreateContract(cli rpctransact.TransactClient, inputAddress crypto.Address, if metamap != nil { meta = make([]*payload.ContractMeta, len(metamap)) for i, m := range metamap { - hash := sha3.NewKeccak256() + hash := sha3.NewLegacyKeccak256() hash.Write([]byte(m.DeployedCode)) meta[i] = &payload.ContractMeta{ CodeHash: hash.Sum(nil), diff --git a/integration/rpctransact/call_test.go b/integration/rpctransact/call_test.go index 5e0374950..1b4349a2f 100644 --- a/integration/rpctransact/call_test.go +++ b/integration/rpctransact/call_test.go @@ -10,7 +10,6 @@ import ( "sync" "testing" - "github.com/hyperledger/burrow/crypto/sha3" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm/abi" "golang.org/x/crypto/sha3" From a643ea56c77604d8950909bb707658e4247943b9 Mon Sep 17 00:00:00 2001 From: matias diaz Date: Mon, 30 Sep 2019 20:40:37 -0300 Subject: [PATCH 024/185] adding 5th precompile eth contract with fixed gas requirement and adapted to the native format Signed-off-by: matias diaz --- execution/native/precompiles.go | 63 ++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/execution/native/precompiles.go b/execution/native/precompiles.go index 4133a50cc..18d433870 100644 --- a/execution/native/precompiles.go +++ b/execution/native/precompiles.go @@ -2,6 +2,7 @@ package native import ( "crypto/sha256" + "math/big" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" @@ -22,7 +23,11 @@ var Precompiles = New(). MustFunction(`Return an output identical to the input`, leftPadAddress(4), permission.None, - identityFunc) + identityFunc). + MustFunction(`Compute the operation base**exp % mod where the values are big ints`, + leftPadAddress(5), + permission.None, + bigModExp) /* Removed due to C dependency func ecrecoverFunc(state State, caller crypto.Address, input []byte, gas *int64) (output []byte, err error) { @@ -90,6 +95,62 @@ func identityFunc(ctx Context) (output []byte, err error) { return ctx.Input, nil } +const ( + // gas requirement for bigModExp set to 1 + GasRequire uint64 = 1 +) + +// bigModExp: function that implement the EIP 198 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-198.md with a fixed gas requirement) +func bigModExp(ctx Context) (output []byte, err error) { + + if *ctx.Gas < GasRequire { + return nil, errors.ErrorCodeInsufficientGas + } + + *ctx.Gas -= GasRequire + // get the lengths of base, exp and mod + baseLen := new(big.Int).SetBytes(binary.RightPadBytes(ctx.Input[0:32], 32)).Uint64() + expLen := new(big.Int).SetBytes(binary.RightPadBytes(ctx.Input[32:64], 32)).Uint64() + modLen := new(big.Int).SetBytes(binary.RightPadBytes(ctx.Input[64:96], 32)).Uint64() + + // shift input array to the actual values + if len(ctx.Input) > 96 { + ctx.Input = ctx.Input[96:] + } else { + ctx.Input = ctx.Input[:0] + } + + // handle the case when tehre is no base nor mod + if baseLen+modLen == 0 { + return []byte{}, nil + } + + // get the values of base, exp and mod + base := new(big.Int).SetBytes(getData(ctx.Input, 0, baseLen)) + exp := new(big.Int).SetBytes(getData(ctx.Input, baseLen, expLen)) + mod := new(big.Int).SetBytes(getData(ctx.Input, baseLen+expLen, modLen)) + // handle mod 0 + if mod.Sign() == 0 { + return binary.LeftPadBytes([]byte{}, int(modLen)), nil + } + // return base**exp % mod left padded + return binary.LeftPadBytes(new(big.Int).Exp(base, exp, mod).Bytes(), int(modLen)), nil + +} + +// auxiliar function to retrieve data from arrays +func getData(data []byte, start uint64, size uint64) []byte { + length := uint64(len(data)) + if start > length { + start = length + } + end := start + size + if end > length { + end = length + } + return binary.RightPadBytes(data[start:end], int(size)) +} + func leftPadAddress(bs ...byte) crypto.Address { return crypto.AddressFromWord256(binary.LeftPadWord256(bs)) } From f974fb92a99bc7212761f190bfbce89b06f4abc2 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 30 Sep 2019 16:34:44 +0100 Subject: [PATCH 025/185] Refactor errors to make code-gen-able. Also provide nicer metadata. Also improve go fixture generation. Signed-off-by: Silas Davis --- .gitignore | 1 + Makefile | 42 +++--- acm/account.go | 4 +- acm/acmstate/memory_state.go | 4 +- acm/acmstate/state_cache.go | 16 +-- deploy/jobs/jobs_contracts.go | 2 +- execution/contexts/call_context.go | 8 +- execution/contexts/name_context.go | 16 +-- execution/contexts/permissions_context.go | 4 +- execution/contexts/proposal_context.go | 16 +-- execution/contexts/send_context.go | 6 +- execution/contexts/shared.go | 6 +- execution/engine/call_frame.go | 2 +- execution/errors/code.go | 135 +++++------------- execution/errors/code_test.go | 19 +++ execution/errors/codes.go | 90 ++++++++++++ execution/errors/errors.go | 54 ++++++- execution/errors/errors.pb.go | 42 +++--- execution/errors/errors_test.go | 4 +- execution/errors/exception.go | 32 ++--- execution/errors/native.go | 4 +- execution/errors/vm.go | 4 +- execution/evm/contract.go | 28 ++-- execution/evm/evm_test.go | 24 ++-- execution/evm/stack.go | 16 +-- execution/evm/stack_test.go | 2 +- execution/exec/event_sink.go | 2 +- execution/execution.go | 6 +- execution/execution_test.go | 8 +- execution/native/account.go | 22 +-- execution/native/account_test.go | 4 +- execution/native/contract.go | 26 ++-- execution/native/permissions.go | 2 +- execution/native/permissions_test.go | 2 +- execution/native/precompiles.go | 8 +- execution/native/state.go | 2 +- execution/solidity/abi_tester.sol.go | 18 +-- execution/solidity/event_emitter.sol.go | 6 +- execution/solidity/revert.sol.go | 6 +- execution/solidity/strange_loop.sol.go | 6 +- execution/solidity/zero_reset.sol.go | 6 +- execution/transactor.go | 6 +- execution/wasm/wasm.go | 8 +- .../rpcevents/execution_events_server_test.go | 2 +- integration/rpctransact/call_test.go | 4 +- js/test/get_set_smoke_test/GetSet.sol.go | 7 - permission/perm_flag.go | 2 +- protobuf/errors.proto | 2 +- .../permissions.sol | 2 +- util/natives/templates/solidity_templates.go | 10 +- .../templates/solidity_templates_test.go | 2 +- 51 files changed, 417 insertions(+), 333 deletions(-) create mode 100644 execution/errors/code_test.go create mode 100644 execution/errors/codes.go delete mode 100644 js/test/get_set_smoke_test/GetSet.sol.go diff --git a/.gitignore b/.gitignore index e0afbb022..f25e30aa5 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ tests/keys/ .output.json vendor/ node_modules +js/dist diff --git a/Makefile b/Makefile index 54858d129..f7288b39b 100644 --- a/Makefile +++ b/Makefile @@ -13,16 +13,7 @@ SHELL := /bin/bash REPO := $(shell pwd) -# Protobuf generated go files -PROTO_FILES = $(shell find . -path ./node_modules -prune -o -path ./.gopath_bos -prune -o -type f -name '*.proto' -print) -PROTO_GO_FILES = $(patsubst %.proto, %.pb.go, $(PROTO_FILES)) -PROTO_GO_FILES_REAL = $(shell find . -path ./vendor -prune -o -type f -name '*.pb.go' -print) - # Our own Go files containing the compiled bytecode of solidity files as a constant -SOLIDITY_FILES = $(shell find . -path ./docs -prune -o -path ./tests -prune -o -type f -name '*.sol' -print) -SOLIDITY_GO_FILES = $(patsubst %.sol, %.sol.go, $(SOLIDITY_FILES)) -SOLANG_FILES = $(shell find . -path ./vendor -prune -o -path ./tests -prune -o -type f -name '*.solang' -print) -SOLANG_GO_FILES = $(patsubst %.solang, %.solang.go, $(SOLANG_FILES)) CI_IMAGE="hyperledger/burrow:ci" @@ -77,18 +68,25 @@ megacheck: @for pkg in $(shell go list ./... ); do megacheck "$$pkg"; done # Protobuffing -.PHONY: protobuf_deps -protobuf_deps: - @go get -u github.com/gogo/protobuf/protoc-gen-gogo -# @go get -u github.com/golang/protobuf/protoc-gen-go + +# Protobuf generated go files +PROTO_FILES = $(shell find . -path ./node_modules -prune -o -type f -name '*.proto' -print) +PROTO_GO_FILES = $(patsubst %.proto, %.pb.go, $(PROTO_FILES)) +PROTO_GO_FILES_REAL = $(shell find . -path ./vendor -prune -o -type f -name '*.pb.go' -print) + +.PHONY: protobuf +protobuf: $(PROTO_GO_FILES) fix # Implicit compile rule for GRPC/proto files (note since pb.go files no longer generated # in same directory as proto file this just regenerates everything %.pb.go: %.proto protoc -I ./protobuf $< --gogo_out=plugins=grpc:${GOPATH}/src -.PHONY: protobuf -protobuf: $(PROTO_GO_FILES) + +.PHONY: protobuf_deps +protobuf_deps: + @go get -u github.com/gogo/protobuf/protoc-gen-gogo +# @go get -u github.com/golang/protobuf/protoc-gen-go .PHONY: clean_protobuf clean_protobuf: @@ -159,19 +157,19 @@ docker_build: check commit_hash ### Testing github.com/hyperledger/burrow # Solidity fixtures +.PHONY: solidity +solidity: $(patsubst %.sol, %.sol.go, $(wildcard ./execution/solidity/*.sol)) + %.sol.go: %.sol @go run ./deploy/compile/solgo/main.go $^ -# Solidity fixtures +# Solang fixtures +.PHONY: solang +solang: $(patsubst %.solang, %.solang.go, $(wildcard ./execution/wasm/*.solang)) + %.solang.go: %.solang @go run ./deploy/compile/solgo/main.go -wasm $^ -.PHONY: solidity -solidity: $(SOLIDITY_GO_FILES) - -.PHONY: solang -solang: $(SOLANG_GO_FILES) - # node/js # # Install dependency diff --git a/acm/account.go b/acm/account.go index 01d9423f0..4580b3d57 100644 --- a/acm/account.go +++ b/acm/account.go @@ -46,7 +46,7 @@ func (acc *Account) GetAddress() crypto.Address { func (acc *Account) AddToBalance(amount uint64) error { if binary.IsUint64SumOverflow(acc.Balance, amount) { - return errors.ErrorCodef(errors.ErrorCodeIntegerOverflow, + return errors.Errorf(errors.Codes.IntegerOverflow, "uint64 overflow: attempt to add %v to the balance of %s", amount, acc.Address) } acc.Balance += amount @@ -55,7 +55,7 @@ func (acc *Account) AddToBalance(amount uint64) error { func (acc *Account) SubtractFromBalance(amount uint64) error { if amount > acc.Balance { - return errors.ErrorCodef(errors.ErrorCodeInsufficientBalance, + return errors.Errorf(errors.Codes.InsufficientBalance, "insufficient funds: attempt to subtract %v from the balance of %s", amount, acc.Address) } acc.Balance -= amount diff --git a/acm/acmstate/memory_state.go b/acm/acmstate/memory_state.go index 4c8c0387c..4fb698fc8 100644 --- a/acm/acmstate/memory_state.go +++ b/acm/acmstate/memory_state.go @@ -35,7 +35,7 @@ func (ms *MemoryState) GetAccount(address crypto.Address) (*acm.Account, error) func (ms *MemoryState) UpdateAccount(updatedAccount *acm.Account) error { if updatedAccount == nil { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, "UpdateAccount passed nil account in MemoryState") + return errors.Errorf(errors.Codes.IllegalWrite, "UpdateAccount passed nil account in MemoryState") } ms.Accounts[updatedAccount.GetAddress()] = updatedAccount return nil @@ -58,7 +58,7 @@ func (ms *MemoryState) RemoveAccount(address crypto.Address) error { func (ms *MemoryState) GetStorage(address crypto.Address, key binary.Word256) ([]byte, error) { _, ok := ms.Accounts[address] if !ok { - return nil, errors.ErrorCodef(errors.ErrorCodeNonExistentAccount, + return nil, errors.Errorf(errors.Codes.NonExistentAccount, "could not get storage for non-existent account: %v", address) } storage, ok := ms.Storage[address] diff --git a/acm/acmstate/state_cache.go b/acm/acmstate/state_cache.go index ef069a24d..8b0487931 100644 --- a/acm/acmstate/state_cache.go +++ b/acm/acmstate/state_cache.go @@ -90,10 +90,10 @@ func (cache *Cache) GetAccount(address crypto.Address) (*acm.Account, error) { func (cache *Cache) UpdateAccount(account *acm.Account) error { if account == nil { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, "UpdateAccount called with nil account") + return errors.Errorf(errors.Codes.IllegalWrite, "UpdateAccount called with nil account") } if cache.readonly { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, + return errors.Errorf(errors.Codes.IllegalWrite, "UpdateAccount called in a read-only context on account %v", account.GetAddress()) } accInfo, err := cache.get(account.GetAddress()) @@ -103,7 +103,7 @@ func (cache *Cache) UpdateAccount(account *acm.Account) error { accInfo.Lock() defer accInfo.Unlock() if accInfo.removed { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, "UpdateAccount on a removed account: %s", account.GetAddress()) + return errors.Errorf(errors.Codes.IllegalWrite, "UpdateAccount on a removed account: %s", account.GetAddress()) } accInfo.account = account.Copy() accInfo.updated = true @@ -121,7 +121,7 @@ func (cache *Cache) GetMetadata(metahash MetadataHash) (string, error) { func (cache *Cache) SetMetadata(metahash MetadataHash, metadata string) error { if cache.readonly { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, "SetMetadata called in read-only context on metadata hash: %v", metahash) + return errors.Errorf(errors.Codes.IllegalWrite, "SetMetadata called in read-only context on metadata hash: %v", metahash) } cache.Lock() @@ -134,7 +134,7 @@ func (cache *Cache) SetMetadata(metahash MetadataHash, metadata string) error { func (cache *Cache) RemoveAccount(address crypto.Address) error { if cache.readonly { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, "RemoveAccount called on read-only account %v", address) + return errors.Errorf(errors.Codes.IllegalWrite, "RemoveAccount called on read-only account %v", address) } accInfo, err := cache.get(address) if err != nil { @@ -191,12 +191,12 @@ func (cache *Cache) GetStorage(address crypto.Address, key binary.Word256) ([]by // NOTE: Set value to zero to remove. func (cache *Cache) SetStorage(address crypto.Address, key binary.Word256, value []byte) error { if cache.readonly { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, + return errors.Errorf(errors.Codes.IllegalWrite, "SetStorage called in a read-only context on account %v", address) } accInfo, err := cache.get(address) if accInfo.account == nil { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, + return errors.Errorf(errors.Codes.IllegalWrite, "SetStorage called on an account that does not exist: %v", address) } accInfo.Lock() @@ -205,7 +205,7 @@ func (cache *Cache) SetStorage(address crypto.Address, key binary.Word256, value return err } if accInfo.removed { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, "SetStorage on a removed account: %s", address) + return errors.Errorf(errors.Codes.IllegalWrite, "SetStorage on a removed account: %s", address) } accInfo.storage[key] = value accInfo.updated = true diff --git a/deploy/jobs/jobs_contracts.go b/deploy/jobs/jobs_contracts.go index bece7dffc..ebec093e2 100644 --- a/deploy/jobs/jobs_contracts.go +++ b/deploy/jobs/jobs_contracts.go @@ -506,7 +506,7 @@ func CallJob(call *def.Call, tx *payload.CallTx, do *def.DeployArgs, playbook *d if txe.Exception != nil { switch txe.Exception.ErrorCode() { - case errors.ErrorCodeExecutionReverted: + case errors.Codes.ExecutionReverted: message, err := abi.UnpackRevert(txe.Result.Return) if err != nil { return "", nil, err diff --git a/execution/contexts/call_context.go b/execution/contexts/call_context.go index 9f55a1648..4d94d047a 100644 --- a/execution/contexts/call_context.go +++ b/execution/contexts/call_context.go @@ -58,19 +58,19 @@ func (ctx *CallContext) Precheck() (*acm.Account, *acm.Account, error) { return nil, nil, err } if inAcc == nil { - return nil, nil, errors.ErrorCodef(errors.ErrorCodeInvalidAddress, + return nil, nil, errors.Errorf(errors.Codes.InvalidAddress, "Cannot find input account: %v", ctx.tx.Input) } if ctx.tx.Input.Amount < ctx.tx.Fee { - return nil, nil, errors.ErrorCodef(errors.ErrorCodeInsufficientFunds, + return nil, nil, errors.Errorf(errors.Codes.InsufficientFunds, "Send did not send enough to cover the fee: %v", ctx.tx.Input) } // Fees are handle by the CallContext, values transfers (i.e. balances) are handled in the VM (or in Check()) err = inAcc.SubtractFromBalance(ctx.tx.Fee) if err != nil { - return nil, nil, errors.ErrorCodef(errors.ErrorCodeInsufficientFunds, + return nil, nil, errors.Errorf(errors.Codes.InsufficientFunds, "Input account does not have sufficient balance to cover input amount: %v", ctx.tx.Input) } @@ -154,7 +154,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error // but to create with one contract and call with another // you have to wait a block to avoid a re-ordering attack // that will take your fees - exception := errors.ErrorCodef(errors.ErrorCodeInvalidAddress, + exception := errors.Errorf(errors.Codes.InvalidAddress, "CallTx to an address (%v) that does not exist", ctx.tx.Address) ctx.Logger.Info.Log(structure.ErrorKey, exception, "caller_address", inAcc.GetAddress(), diff --git a/execution/contexts/name_context.go b/execution/contexts/name_context.go index 9f5a0e1dc..c7f8d3dfe 100644 --- a/execution/contexts/name_context.go +++ b/execution/contexts/name_context.go @@ -41,7 +41,7 @@ func (ctx *NameContext) Execute(txe *exec.TxExecution, p payload.Payload) error if inAcc == nil { ctx.Logger.InfoMsg("Cannot find input account", "tx_input", ctx.tx.Input) - return errors.ErrorCodeInvalidAddress + return errors.Codes.InvalidAddress } // check permission if !hasNamePermission(ctx.State, inAcc, ctx.Logger) { @@ -50,7 +50,7 @@ func (ctx *NameContext) Execute(txe *exec.TxExecution, p payload.Payload) error if ctx.tx.Input.Amount < ctx.tx.Fee { ctx.Logger.InfoMsg("Sender did not send enough to cover the fee", "tx_input", ctx.tx.Input) - return errors.ErrorCodeInsufficientFunds + return errors.Codes.InsufficientFunds } // validate the input strings @@ -168,7 +168,7 @@ func (ctx *NameContext) Execute(txe *exec.TxExecution, p payload.Payload) error err = inAcc.SubtractFromBalance(value) if err != nil { - return errors.ErrorCodef(errors.ErrorCodeInsufficientFunds, + return errors.Errorf(errors.Codes.InsufficientFunds, "Input account does not have sufficient balance to cover input amount: %v", ctx.tx.Input) } err = ctx.State.UpdateAccount(inAcc) @@ -185,22 +185,22 @@ func (ctx *NameContext) Execute(txe *exec.TxExecution, p payload.Payload) error func validateStrings(tx *payload.NameTx) error { if len(tx.Name) == 0 { - return errors.ErrorCodef(errors.ErrorCodeInvalidString, "name must not be empty") + return errors.Errorf(errors.Codes.InvalidString, "name must not be empty") } if len(tx.Name) > names.MaxNameLength { - return errors.ErrorCodef(errors.ErrorCodeInvalidString, "Name is too long. Max %d bytes", names.MaxNameLength) + return errors.Errorf(errors.Codes.InvalidString, "Name is too long. Max %d bytes", names.MaxNameLength) } if len(tx.Data) > names.MaxDataLength { - return errors.ErrorCodef(errors.ErrorCodeInvalidString, "Data is too long. Max %d bytes", names.MaxDataLength) + return errors.Errorf(errors.Codes.InvalidString, "Data is too long. Max %d bytes", names.MaxDataLength) } if !validateNameRegEntryName(tx.Name) { - return errors.ErrorCodef(errors.ErrorCodeInvalidString, + return errors.Errorf(errors.Codes.InvalidString, "Invalid characters found in NameTx.Name (%s). Only alphanumeric, underscores, dashes, forward slashes, and @ are allowed", tx.Name) } if !validateNameRegEntryData(tx.Data) { - return errors.ErrorCodef(errors.ErrorCodeInvalidString, + return errors.Errorf(errors.Codes.InvalidString, "Invalid characters found in NameTx.Data (%s). Only the kind of things found in a JSON file are allowed", tx.Data) } diff --git a/execution/contexts/permissions_context.go b/execution/contexts/permissions_context.go index 50bc2c09f..771e9cea1 100644 --- a/execution/contexts/permissions_context.go +++ b/execution/contexts/permissions_context.go @@ -33,7 +33,7 @@ func (ctx *PermissionsContext) Execute(txe *exec.TxExecution, p payload.Payload) if inAcc == nil { ctx.Logger.InfoMsg("Cannot find input account", "tx_input", ctx.tx.Input) - return errors.ErrorCodeInvalidAddress + return errors.Codes.InvalidAddress } err = ctx.tx.PermArgs.EnsureValid() @@ -106,7 +106,7 @@ func (ctx *PermissionsContext) Execute(txe *exec.TxExecution, p payload.Payload) inAcc.Balance -= value err = inAcc.SubtractFromBalance(value) if err != nil { - return errors.ErrorCodef(errors.ErrorCodeInsufficientFunds, + return errors.Errorf(errors.Codes.InsufficientFunds, "Input account does not have sufficient balance to cover input amount: %v", ctx.tx.Input) } err = ctx.State.UpdateAccount(inAcc) diff --git a/execution/contexts/proposal_context.go b/execution/contexts/proposal_context.go index a1585745f..579ae25a5 100644 --- a/execution/contexts/proposal_context.go +++ b/execution/contexts/proposal_context.go @@ -44,7 +44,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er if inAcc == nil { ctx.Logger.InfoMsg("Cannot find input account", "tx_input", ctx.tx.Input) - return errors.ErrorCodeInvalidAddress + return errors.Codes.InvalidAddress } // check permission @@ -58,7 +58,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er if ctx.tx.Proposal == nil { // voting for existing proposal if ctx.tx.ProposalHash == nil || ctx.tx.ProposalHash.Size() != sha256.Size { - return errors.ErrorCodeInvalidProposal + return errors.Codes.InvalidProposal } proposalHash = ctx.tx.ProposalHash.Bytes() @@ -69,7 +69,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er } else { if ctx.tx.ProposalHash != nil || ctx.tx.Proposal.BatchTx == nil || len(ctx.tx.Proposal.BatchTx.Txs) == 0 || len(ctx.tx.Proposal.BatchTx.GetInputs()) == 0 { - return errors.ErrorCodeInvalidProposal + return errors.Codes.InvalidProposal } // validate the input strings @@ -98,7 +98,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er for _, vote := range ballot.Votes { for _, i := range ctx.tx.GetInputs() { if i.Address == vote.Address { - return errors.ErrorCodeAlreadyVoted + return errors.Codes.AlreadyVoted } } } @@ -132,7 +132,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er if proposeAcc == nil { ctx.Logger.InfoMsg("Cannot find input account", "tx_input", ctx.tx.Input) - return errors.ErrorCodeInvalidAddress + return errors.Codes.InvalidAddress } if !hasBatchPermission(ctx.State, proposeAcc, ctx.Logger) { @@ -245,16 +245,16 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er func validateProposalStrings(proposal *payload.Proposal) error { if len(proposal.Name) == 0 { - return errors.ErrorCodef(errors.ErrorCodeInvalidString, "name must not be empty") + return errors.Errorf(errors.Codes.InvalidString, "name must not be empty") } if !validateNameRegEntryName(proposal.Name) { - return errors.ErrorCodef(errors.ErrorCodeInvalidString, + return errors.Errorf(errors.Codes.InvalidString, "Invalid characters found in Proposal.Name (%s). Only alphanumeric, underscores, dashes, forward slashes, and @ are allowed", proposal.Name) } if !validateStringPrintable(proposal.Description) { - return errors.ErrorCodef(errors.ErrorCodeInvalidString, + return errors.Errorf(errors.Codes.InvalidString, "Invalid characters found in Proposal.Description (%s). Only printable characters are allowed", proposal.Description) } diff --git a/execution/contexts/send_context.go b/execution/contexts/send_context.go index ce6ce7e3d..45275fd37 100644 --- a/execution/contexts/send_context.go +++ b/execution/contexts/send_context.go @@ -46,13 +46,13 @@ func (ctx *SendContext) Execute(txe *exec.TxExecution, p payload.Payload) error return err } if outTotal > inTotal { - return errors.ErrorCodeInsufficientFunds + return errors.Codes.InsufficientFunds } if outTotal < inTotal { - return errors.ErrorCodeOverpayment + return errors.Codes.Overpayment } if outTotal == 0 { - return errors.ErrorCodeZeroPayment + return errors.Codes.ZeroPayment } // Good! Adjust accounts diff --git a/execution/contexts/shared.go b/execution/contexts/shared.go index 004fbd63d..4cdc36e43 100644 --- a/execution/contexts/shared.go +++ b/execution/contexts/shared.go @@ -28,14 +28,14 @@ func getInputs(accountGetter acmstate.AccountGetter, ins []*payload.TxInput) (ma for _, in := range ins { // Account shouldn't be duplicated if _, ok := accounts[in.Address]; ok { - return nil, total, errors.ErrorCodeDuplicateAddress + return nil, total, errors.Codes.DuplicateAddress } acc, err := accountGetter.GetAccount(in.Address) if err != nil { return nil, total, err } if acc == nil { - return nil, total, errors.ErrorCodeInvalidAddress + return nil, total, errors.Codes.InvalidAddress } accounts[in.Address] = acc total += in.Amount @@ -64,7 +64,7 @@ func getOrMakeOutput(accountGetter acmstate.AccountGetter, accs map[crypto.Addre // Account shouldn't be duplicated if _, ok := accs[outputAddress]; ok { - return nil, errors.ErrorCodeDuplicateAddress + return nil, errors.Codes.DuplicateAddress } acc, err := accountGetter.GetAccount(outputAddress) if err != nil { diff --git a/execution/engine/call_frame.go b/execution/engine/call_frame.go index 62bbc4c12..b565dd511 100644 --- a/execution/engine/call_frame.go +++ b/execution/engine/call_frame.go @@ -46,7 +46,7 @@ func (st *CallFrame) WithMaxCallStackDepth(max uint64) *CallFrame { func (st *CallFrame) NewFrame(cacheOptions ...acmstate.CacheOption) (*CallFrame, error) { if st.maxCallStackDepth > 0 && st.maxCallStackDepth == st.callStackDepth { - return nil, errors.ErrorCodeCallStackOverflow + return nil, errors.Codes.CallStackOverflow } return newCallFrame(st.Cache, st.callStackDepth+1, st.maxCallStackDepth, append(st.cacheOptions, cacheOptions...)...), nil diff --git a/execution/errors/code.go b/execution/errors/code.go index a5f4d5e5d..d184391e4 100644 --- a/execution/errors/code.go +++ b/execution/errors/code.go @@ -1,123 +1,56 @@ package errors -import fmt "fmt" +import ( + "fmt" +) -type Code uint32 +// An annotated version of the pure numeric error code +type Code struct { + Number uint32 + Name string + Description string +} -const ( - ErrorCodeNone Code = iota - ErrorCodeGeneric - ErrorCodeUnknownAddress - ErrorCodeInsufficientBalance - ErrorCodeInvalidJumpDest - ErrorCodeInsufficientGas - ErrorCodeMemoryOutOfBounds - ErrorCodeCodeOutOfBounds - ErrorCodeInputOutOfBounds - ErrorCodeReturnDataOutOfBounds - ErrorCodeCallStackOverflow - ErrorCodeCallStackUnderflow - ErrorCodeDataStackOverflow - ErrorCodeDataStackUnderflow - ErrorCodeInvalidContract - ErrorCodeNativeContractCodeCopy - ErrorCodeExecutionAborted - ErrorCodeExecutionReverted - ErrorCodePermissionDenied - ErrorCodeNativeFunction - ErrorCodeEventPublish - ErrorCodeInvalidString - ErrorCodeEventMapping - ErrorCodeInvalidAddress - ErrorCodeDuplicateAddress - ErrorCodeInsufficientFunds - ErrorCodeOverpayment - ErrorCodeZeroPayment - ErrorCodeInvalidSequence - ErrorCodeReservedAddress - ErrorCodeIllegalWrite - ErrorCodeIntegerOverflow - ErrorCodeInvalidProposal - ErrorCodeExpiredProposal - ErrorCodeProposalExecuted - ErrorCodeNoInputPermission - ErrorCodeInvalidBlockNumber - ErrorCodeBlockNumberOutOfRange - ErrorCodeAlreadyVoted - ErrorCodeUnresolvedSymbols - ErrorCodeInvalidContractCode - ErrorCodeNonExistentAccount -) +func code(description string) *Code { + return &Code{Description: description} +} -var codeStrings = map[Code]string{ - ErrorCodeNone: "no error", - ErrorCodeUnknownAddress: "unknown address", - ErrorCodeInsufficientBalance: "insufficient balance", - ErrorCodeInvalidJumpDest: "invalid jump dest", - ErrorCodeInsufficientGas: "insufficient gas", - ErrorCodeMemoryOutOfBounds: "memory out of bounds", - ErrorCodeCodeOutOfBounds: "code out of bounds", - ErrorCodeInputOutOfBounds: "input out of bounds", - ErrorCodeReturnDataOutOfBounds: " data out of bounds", - ErrorCodeCallStackOverflow: "call stack overflow", - ErrorCodeCallStackUnderflow: "call stack underflow", - ErrorCodeDataStackOverflow: "data stack overflow", - ErrorCodeDataStackUnderflow: "data stack underflow", - ErrorCodeInvalidContract: "invalid contract", - ErrorCodePermissionDenied: "permission denied", - ErrorCodeNativeContractCodeCopy: "tried to copy native contract code", - ErrorCodeExecutionAborted: "execution aborted", - ErrorCodeExecutionReverted: "execution reverted", - ErrorCodeNativeFunction: "native function error", - ErrorCodeEventPublish: "event publish error", - ErrorCodeInvalidString: "invalid string", - ErrorCodeEventMapping: "event mapping error", - ErrorCodeGeneric: "generic error", - ErrorCodeInvalidAddress: "invalid address", - ErrorCodeDuplicateAddress: "duplicate address", - ErrorCodeInsufficientFunds: "insufficient funds", - ErrorCodeOverpayment: "overpayment", - ErrorCodeZeroPayment: "zero payment error", - ErrorCodeInvalidSequence: "invalid sequence number", - ErrorCodeReservedAddress: "address is reserved for SNative or internal use", - ErrorCodeIllegalWrite: "callee attempted to illegally modify state", - ErrorCodeIntegerOverflow: "integer overflow", - ErrorCodeInvalidProposal: "proposal is invalid", - ErrorCodeExpiredProposal: "proposal is expired since sequence number does not match", - ErrorCodeProposalExecuted: "proposal has already been executed", - ErrorCodeNoInputPermission: "account has no input permission", - ErrorCodeInvalidBlockNumber: "invalid block number", - ErrorCodeBlockNumberOutOfRange: "block number out of range", - ErrorCodeAlreadyVoted: "vote already registered for this address", - ErrorCodeUnresolvedSymbols: "code has unresolved symbols", - ErrorCodeInvalidContractCode: "contract being created with unexpected code", - ErrorCodeNonExistentAccount: "account does not exist", +func (c *Code) Equal(other *Code) bool { + if c == nil { + return false + } + return c.Number == other.Number } -func (c Code) ErrorCode() Code { +func (c *Code) ErrorCode() *Code { return c } -func (c Code) Uint32() uint32 { - return uint32(c) +func (c *Code) Uint32() uint32 { + if c == nil { + return 0 + } + return c.Number } -func (c Code) Error() string { - return fmt.Sprintf("Error %d: %s", c, c.ErrorMessage()) +func (c *Code) Error() string { + if c == nil { + return "" + } + return fmt.Sprintf("Error %d: %s", c.Number, c.Description) } -func (c Code) ErrorMessage() string { - str, ok := codeStrings[c] - if !ok { - return "Unknown error" +func (c *Code) ErrorMessage() string { + if c == nil { + return "" } - return str + return c.Description } -func ErrorCode(err error) Code { +func GetCode(err error) *Code { exception := AsException(err) if exception == nil { - return ErrorCodeNone + return Codes.None } return exception.GetCode() } diff --git a/execution/errors/code_test.go b/execution/errors/code_test.go new file mode 100644 index 000000000..d695166dc --- /dev/null +++ b/execution/errors/code_test.go @@ -0,0 +1,19 @@ +package errors + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestCodings(t *testing.T) { + a := Codes.CodeOutOfBounds + b := Codes.CodeOutOfBounds + ap := a + bp := b + require.True(t, ap.Equal(bp)) + require.True(t, ap == bp) + js := Codes.JSON() + fmt.Println(js) +} diff --git a/execution/errors/codes.go b/execution/errors/codes.go new file mode 100644 index 000000000..9d3595016 --- /dev/null +++ b/execution/errors/codes.go @@ -0,0 +1,90 @@ +package errors + +import ( + "encoding/json" + "fmt" + "reflect" +) + +type codes struct { + None *Code + Generic *Code + UnknownAddress *Code + InsufficientBalance *Code + InvalidJumpDest *Code + InsufficientGas *Code + MemoryOutOfBounds *Code + CodeOutOfBounds *Code + InputOutOfBounds *Code + ReturnDataOutOfBounds *Code + CallStackOverflow *Code + CallStackUnderflow *Code + DataStackOverflow *Code + DataStackUnderflow *Code + InvalidContract *Code + NativeContractCodeCopy *Code + ExecutionAborted *Code + ExecutionReverted *Code + PermissionDenied *Code + NativeFunction *Code + EventPublish *Code + InvalidString *Code + EventMapping *Code + InvalidAddress *Code + DuplicateAddress *Code + InsufficientFunds *Code + Overpayment *Code + ZeroPayment *Code + InvalidSequence *Code + ReservedAddress *Code + IllegalWrite *Code + IntegerOverflow *Code + InvalidProposal *Code + ExpiredProposal *Code + ProposalExecuted *Code + NoInputPermission *Code + InvalidBlockNumber *Code + BlockNumberOutOfRange *Code + AlreadyVoted *Code + UnresolvedSymbols *Code + InvalidContractCode *Code + NonExistentAccount *Code + + // For lookup + codes []*Code +} + +func (es *codes) init() error { + rv := reflect.ValueOf(es).Elem() + rt := rv.Type() + es.codes = make([]*Code, 0, rv.NumField()) + for i := 0; i < rv.NumField(); i++ { + ty := rt.Field(i) + // If field is exported + if ty.PkgPath == "" { + coding := rv.Field(i).Interface().(*Code) + if coding.Description == "" { + return fmt.Errorf("error code '%s' has no description", ty.Name) + } + coding.Number = uint32(i) + coding.Name = ty.Name + es.codes = append(es.codes, coding) + } + } + return nil +} + +func (es *codes) JSON() string { + bs, err := json.MarshalIndent(es, "", "\t") + if err != nil { + panic(fmt.Errorf("could not create JSON errors object: %v", err)) + } + return string(bs) +} + +func (es *codes) Get(number uint32) *Code { + if int(number) > len(es.codes)-1 { + return nil + } + return es.codes[number] +} diff --git a/execution/errors/errors.go b/execution/errors/errors.go index e43702f5a..838621ac2 100644 --- a/execution/errors/errors.go +++ b/execution/errors/errors.go @@ -2,7 +2,7 @@ package errors type CodedError interface { error - ErrorCode() Code + ErrorCode() *Code // The error message excluding the code ErrorMessage() string } @@ -20,3 +20,55 @@ type Source interface { // Returns the an error if errors occurred some execution or nil if none occurred Error() error } + +var Codes = codes{ + None: code("none"), + UnknownAddress: code("unknown address"), + InsufficientBalance: code("insufficient balance"), + InvalidJumpDest: code("invalid jump destination"), + InsufficientGas: code("insufficient gas"), + MemoryOutOfBounds: code("memory out of bounds"), + CodeOutOfBounds: code("code out of bounds"), + InputOutOfBounds: code("input out of bounds"), + ReturnDataOutOfBounds: code("data out of bounds"), + CallStackOverflow: code("call stack overflow"), + CallStackUnderflow: code("call stack underflow"), + DataStackOverflow: code("data stack overflow"), + DataStackUnderflow: code("data stack underflow"), + InvalidContract: code("invalid contract"), + PermissionDenied: code("permission denied"), + NativeContractCodeCopy: code("tried to copy native contract code"), + ExecutionAborted: code("execution aborted"), + ExecutionReverted: code("execution reverted"), + NativeFunction: code("native function error"), + EventPublish: code("event publish error"), + InvalidString: code("invalid string"), + EventMapping: code("event mapping error"), + Generic: code("generic error"), + InvalidAddress: code("invalid address"), + DuplicateAddress: code("duplicate address"), + InsufficientFunds: code("insufficient funds"), + Overpayment: code("overpayment"), + ZeroPayment: code("zero payment error"), + InvalidSequence: code("invalid sequence number"), + ReservedAddress: code("address is reserved for SNative or internal use"), + IllegalWrite: code("callee attempted to illegally modify state"), + IntegerOverflow: code("integer overflow"), + InvalidProposal: code("proposal is invalid"), + ExpiredProposal: code("proposal is expired since sequence number does not match"), + ProposalExecuted: code("proposal has already been executed"), + NoInputPermission: code("account has no input permission"), + InvalidBlockNumber: code("invalid block number"), + BlockNumberOutOfRange: code("block number out of range"), + AlreadyVoted: code("vote already registered for this address"), + UnresolvedSymbols: code("code has unresolved symbols"), + InvalidContractCode: code("contract being created with unexpected code"), + NonExistentAccount: code("account does not exist"), +} + +func init() { + err := Codes.init() + if err != nil { + panic(err) + } +} diff --git a/execution/errors/errors.pb.go b/execution/errors/errors.pb.go index ac2825cfa..918082abe 100644 --- a/execution/errors/errors.pb.go +++ b/execution/errors/errors.pb.go @@ -27,7 +27,7 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Exception struct { - Code Code `protobuf:"varint,1,opt,name=Code,proto3,casttype=Code" json:"Code,omitempty"` + CodeNumber uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` Exception string `protobuf:"bytes,2,opt,name=Exception,proto3" json:"Exception,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -62,9 +62,9 @@ func (m *Exception) XXX_DiscardUnknown() { var xxx_messageInfo_Exception proto.InternalMessageInfo -func (m *Exception) GetCode() Code { +func (m *Exception) GetCodeNumber() uint32 { if m != nil { - return m.Code + return m.CodeNumber } return 0 } @@ -88,20 +88,20 @@ func init() { proto.RegisterFile("errors.proto", fileDescriptor_24fe73c7f0ddb19c func init() { golang_proto.RegisterFile("errors.proto", fileDescriptor_24fe73c7f0ddb19c) } var fileDescriptor_24fe73c7f0ddb19c = []byte{ - // 194 bytes of a gzipped FileDescriptorProto + // 202 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x2d, 0x2a, 0xca, 0x2f, 0x2a, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xd2, - 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0xf9, 0x72, 0x71, 0xba, 0x56, - 0x24, 0xa7, 0x16, 0x94, 0x64, 0xe6, 0xe7, 0x09, 0xc9, 0x70, 0xb1, 0x38, 0xe7, 0xa7, 0xa4, 0x4a, - 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x3a, 0x71, 0xfc, 0xba, 0x27, 0x0f, 0xe6, 0x07, 0x81, 0x49, 0x21, - 0x19, 0x24, 0xa5, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x08, 0x01, 0x2b, 0x96, 0x19, 0x0b, - 0xe4, 0x19, 0x9c, 0x3c, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc6, 0x23, 0x39, - 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x0f, 0x3c, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x31, 0x4a, 0x0f, - 0xc9, 0x5d, 0x19, 0x95, 0x05, 0xa9, 0x45, 0x39, 0xa9, 0x29, 0xe9, 0xa9, 0x45, 0xfa, 0x49, 0xa5, - 0x45, 0x45, 0xf9, 0xe5, 0xfa, 0xa9, 0x15, 0xa9, 0xc9, 0xa5, 0x20, 0x83, 0xf4, 0x21, 0xfe, 0x48, - 0x62, 0x03, 0xbb, 0xcf, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x38, 0x0d, 0x6e, 0xa5, 0xe6, 0x00, - 0x00, 0x00, + 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x05, 0x73, 0x71, 0xba, 0x56, + 0x24, 0xa7, 0x16, 0x94, 0x64, 0xe6, 0xe7, 0x09, 0x29, 0x71, 0xb1, 0x38, 0xe7, 0xa7, 0xa4, 0x4a, + 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x3a, 0xf1, 0x3d, 0xba, 0x27, 0xcf, 0x05, 0xe2, 0xfb, 0x95, 0xe6, + 0x26, 0xa5, 0x16, 0x05, 0x81, 0xe5, 0x84, 0x64, 0x90, 0x34, 0x48, 0x30, 0x29, 0x30, 0x6a, 0x70, + 0x06, 0x21, 0x04, 0xac, 0x58, 0x66, 0x2c, 0x90, 0x67, 0x70, 0xf2, 0x38, 0xf1, 0x48, 0x8e, 0xf1, + 0xc2, 0x23, 0x39, 0xc6, 0x1b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x3c, 0xf0, 0x58, 0x8e, + 0xf1, 0xc4, 0x63, 0x39, 0xc6, 0x28, 0x3d, 0x24, 0xd7, 0x65, 0x54, 0x16, 0xa4, 0x16, 0xe5, 0xa4, + 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x27, 0x95, 0x16, 0x15, 0xe5, 0x97, 0xeb, 0xa7, 0x56, 0xa4, 0x26, + 0x97, 0x82, 0x0c, 0xd2, 0x87, 0xf8, 0x26, 0x89, 0x0d, 0xec, 0x4a, 0x63, 0x40, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x43, 0x4f, 0x55, 0x84, 0xec, 0x00, 0x00, 0x00, } func (m *Exception) Marshal() (dAtA []byte, err error) { @@ -135,8 +135,8 @@ func (m *Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if m.Code != 0 { - i = encodeVarintErrors(dAtA, i, uint64(m.Code)) + if m.CodeNumber != 0 { + i = encodeVarintErrors(dAtA, i, uint64(m.CodeNumber)) i-- dAtA[i] = 0x8 } @@ -160,8 +160,8 @@ func (m *Exception) Size() (n int) { } var l int _ = l - if m.Code != 0 { - n += 1 + sovErrors(uint64(m.Code)) + if m.CodeNumber != 0 { + n += 1 + sovErrors(uint64(m.CodeNumber)) } l = len(m.Exception) if l > 0 { @@ -210,9 +210,9 @@ func (m *Exception) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CodeNumber", wireType) } - m.Code = 0 + m.CodeNumber = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowErrors @@ -222,7 +222,7 @@ func (m *Exception) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= Code(b&0x7F) << shift + m.CodeNumber |= uint32(b&0x7F) << shift if b < 0x80 { break } diff --git a/execution/errors/errors_test.go b/execution/errors/errors_test.go index 2b37ba192..c3704696e 100644 --- a/execution/errors/errors_test.go +++ b/execution/errors/errors_test.go @@ -10,7 +10,7 @@ import ( ) func TestErrorCode_MarshalJSON(t *testing.T) { - ec := NewException(ErrorCodeDataStackOverflow, "arrgh") + ec := NewException(Codes.DataStackOverflow, "arrgh") bs, err := json.Marshal(ec) require.NoError(t, err) @@ -22,6 +22,6 @@ func TestErrorCode_MarshalJSON(t *testing.T) { } func TestCode_String(t *testing.T) { - err := ErrorCodeCodeOutOfBounds + err := Codes.CodeOutOfBounds fmt.Println(err.Error()) } diff --git a/execution/errors/exception.go b/execution/errors/exception.go index be75e3735..95f8f2da5 100644 --- a/execution/errors/exception.go +++ b/execution/errors/exception.go @@ -2,13 +2,13 @@ package errors import "fmt" -func NewException(errorCode Code, exception string) *Exception { +func NewException(code *Code, exception string) *Exception { if exception == "" { return nil } return &Exception{ - Code: errorCode, - Exception: exception, + CodeNumber: code.Number, + Exception: exception, } } @@ -23,26 +23,22 @@ func AsException(err error) *Exception { case CodedError: return NewException(e.ErrorCode(), e.ErrorMessage()) default: - return NewException(ErrorCodeGeneric, err.Error()) + return NewException(Codes.Generic, err.Error()) } } func Wrapf(err error, format string, a ...interface{}) *Exception { ex := AsException(err) - return NewException(ex.Code, fmt.Sprintf(format, a...)) + return NewException(Codes.Get(ex.CodeNumber), fmt.Sprintf(format, a...)) } func Wrap(err error, message string) *Exception { ex := AsException(err) - return NewException(ex.Code, message+": "+ex.Exception) + return NewException(Codes.Get(ex.CodeNumber), message+": "+ex.Exception) } -func Errorf(format string, a ...interface{}) *Exception { - return ErrorCodef(ErrorCodeGeneric, format, a...) -} - -func ErrorCodef(errorCode Code, format string, a ...interface{}) *Exception { - return NewException(errorCode, fmt.Sprintf(format, a...)) +func Errorf(code *Code, format string, a ...interface{}) *Exception { + return NewException(code, fmt.Sprintf(format, a...)) } func (e *Exception) AsError() error { @@ -53,12 +49,12 @@ func (e *Exception) AsError() error { return e } -func (e *Exception) ErrorCode() Code { - return e.Code +func (e *Exception) ErrorCode() *Code { + return Codes.Get(e.CodeNumber) } func (e *Exception) Error() string { - return fmt.Sprintf("error %d - %s: %s", e.Code, e.Code.ErrorMessage(), e.Exception) + return fmt.Sprintf("error %d - %s: %s", e.CodeNumber, Codes.Get(e.CodeNumber), e.Exception) } func (e *Exception) String() string { @@ -77,5 +73,9 @@ func (e *Exception) Equal(ce CodedError) bool { if e == nil || ex == nil { return e == nil && ex == nil } - return e.Code == ex.Code && e.Exception == ex.Exception + return e.CodeNumber == ex.CodeNumber && e.Exception == ex.Exception +} + +func (e *Exception) GetCode() *Code { + return Codes.Get(e.CodeNumber) } diff --git a/execution/errors/native.go b/execution/errors/native.go index 0371de07d..00d5b9e91 100644 --- a/execution/errors/native.go +++ b/execution/errors/native.go @@ -21,6 +21,6 @@ func (e *LacksNativePermission) Error() string { return e.ErrorMessage() } -func (e *LacksNativePermission) ErrorCode() Code { - return ErrorCodeNativeFunction +func (e *LacksNativePermission) ErrorCode() *Code { + return Codes.NativeFunction } diff --git a/execution/errors/vm.go b/execution/errors/vm.go index 4e0f7bb6c..74809f194 100644 --- a/execution/errors/vm.go +++ b/execution/errors/vm.go @@ -13,8 +13,8 @@ type PermissionDenied struct { Perm permission.PermFlag } -func (err PermissionDenied) ErrorCode() Code { - return ErrorCodePermissionDenied +func (err PermissionDenied) ErrorCode() *Code { + return Codes.PermissionDenied } func (err PermissionDenied) Error() string { diff --git a/execution/evm/contract.go b/execution/evm/contract.go index 0b85bdd1c..ad0dac64d 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -401,7 +401,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e maybe.PushError(useGasNegative(params.Gas, native.GasGetAccount)) acc := mustGetAccount(st.CallFrame, maybe, address) if acc == nil { - maybe.PushError(errors.ErrorCodeUnknownAddress) + maybe.PushError(errors.Codes.UnknownAddress) } else { code := acc.EVMCode memOff := stack.PopBigInt() @@ -421,7 +421,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e end := new(big.Int).Add(outputOff, length) if end.BitLen() > 64 || uint64(len(returnData)) < end.Uint64() { - maybe.PushError(errors.ErrorCodeReturnDataOutOfBounds) + maybe.PushError(errors.Codes.ReturnDataOutOfBounds) continue } @@ -452,11 +452,11 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e lastBlockHeight := st.Blockchain.LastBlockHeight() if blockNumber >= lastBlockHeight { c.debugf(" => attempted to get block hash of a non-existent block: %v", blockNumber) - maybe.PushError(errors.ErrorCodeInvalidBlockNumber) + maybe.PushError(errors.Codes.InvalidBlockNumber) } else if lastBlockHeight-blockNumber > MaximumAllowedBlockLookBack { c.debugf(" => attempted to get block hash of a block %d outside of the allowed range "+ "(must be within %d blocks)", blockNumber, MaximumAllowedBlockLookBack) - maybe.PushError(errors.ErrorCodeBlockNumberOutOfRange) + maybe.PushError(errors.Codes.BlockNumberOutOfRange) } else { hash := maybe.Bytes(st.Blockchain.BlockHash(blockNumber)) blockHash := LeftPadWord256(hash) @@ -678,7 +678,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e acc := getAccount(st.CallFrame, maybe, target) if acc == nil { if op != CALL { - maybe.PushError(errors.ErrorCodeUnknownAddress) + maybe.PushError(errors.Codes.UnknownAddress) continue } // We're sending funds to a new account so we must create it first @@ -782,7 +782,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e // So we can return nested errors.CodedError if the top level return is an errors.CodedError stack.Push(Zero256) - if errors.ErrorCode(callErr) == errors.ErrorCodeExecutionReverted { + if errors.GetCode(callErr) == errors.Codes.ExecutionReverted { memory.Write(retOffset, RightPadBytes(returnData, int(retSize))) } } else { @@ -813,7 +813,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e return output, maybe.Error() case INVALID: // 0xFE - maybe.PushError(errors.ErrorCodeExecutionAborted) + maybe.PushError(errors.Codes.ExecutionAborted) return nil, maybe.Error() case SELFDESTRUCT: // 0xFF @@ -840,7 +840,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e default: c.debugf("(pc) %-3v Unknown opcode %v\n", pc, op) - maybe.PushError(errors.Errorf("unknown opcode %v", op)) + maybe.PushError(errors.Errorf(errors.Codes.Generic, "unknown opcode %v", op)) return nil, maybe.Error() } pc++ @@ -852,7 +852,7 @@ func (c *Contract) jump(code []byte, to int64, pc *int64) error { dest := codeGetOp(code, to) if dest != JUMPDEST { c.debugf(" ~> %v invalid jump dest %v\n", to, dest) - return errors.ErrorCodeInvalidJumpDest + return errors.Codes.InvalidJumpDest } c.debugf(" ~> %v\n", to) *pc = to @@ -881,7 +881,7 @@ func getAccount(st acmstate.Reader, m *errors.Maybe, address crypto.Address) *ac func mustGetAccount(st acmstate.Reader, m *errors.Maybe, address crypto.Address) *acm.Account { acc := getAccount(st, m, address) if acc == nil { - m.PushError(errors.ErrorCodef(errors.ErrorCodeNonExistentAccount, "account %v does not exist", address)) + m.PushError(errors.Errorf(errors.Codes.NonExistentAccount, "account %v does not exist", address)) return &acm.Account{} } return acc @@ -906,7 +906,7 @@ func useGasNegative(gasLeft *uint64, gasToUse uint64) error { if *gasLeft >= gasToUse { *gasLeft -= gasToUse } else { - return errors.ErrorCodeInsufficientGas + return errors.Codes.InsufficientGas } return nil } @@ -919,7 +919,7 @@ func useGasNegative(gasLeft *uint64, gasToUse uint64) error { func subslice(data []byte, offset, length int64) ([]byte, error) { size := int64(len(data)) if size < offset || offset < 0 || length < 0 { - return nil, errors.ErrorCodef(errors.ErrorCodeInputOutOfBounds, + return nil, errors.Errorf(errors.Codes.InputOutOfBounds, "subslice could not slice data of size %d at offset %d for length %d", size, offset, length) } if size < offset+length { @@ -965,12 +965,12 @@ func dumpTokens(nonce []byte, caller, callee crypto.Address, code []byte) { } func newRevertException(ret []byte) errors.CodedError { - code := errors.ErrorCodeExecutionReverted + code := errors.Codes.ExecutionReverted if len(ret) > 0 { // Attempt decode reason, err := abi.UnpackRevert(ret) if err == nil { - return errors.ErrorCodef(code, "with reason '%s'", *reason) + return errors.Errorf(code, "with reason '%s'", *reason) } } return code diff --git a/execution/evm/evm_test.go b/execution/evm/evm_test.go index 8f2b3990e..75ab6993c 100644 --- a/execution/evm/evm_test.go +++ b/execution/evm/evm_test.go @@ -654,7 +654,7 @@ func TestEVM(t *testing.T) { txe := runVM(st, account1, account2, contractCode, 100000) exCalls := txe.ExceptionalCalls() require.Len(t, exCalls, 1) - require.Equal(t, errors.ErrorCodeInsufficientBalance, errors.ErrorCode(exCalls[0].Header.Exception)) + require.Equal(t, errors.Codes.InsufficientBalance, errors.GetCode(exCalls[0].Header.Exception)) //---------------------------------------------- // give account2 sufficient balance, should pass @@ -703,7 +703,7 @@ func TestEVM(t *testing.T) { txe := runVM(st, caller, callee, code, 1000) // the topmost caller can never *illegally* modify state require.Error(t, txe.Exception) - require.Equal(t, errors.ErrorCodeIllegalWrite, txe.Exception.GetCode(), + require.Equal(t, errors.Codes.IllegalWrite, txe.Exception.ErrorCode(), "should get an error from child accounts that st is read only") } }) @@ -729,7 +729,7 @@ func TestEVM(t *testing.T) { addToBalance(t, st, callee, 100000) txe := runVM(st, caller, callee, callerCode, 1000) require.NotNil(t, txe.Exception) - require.Equal(t, errors.ErrorCodeIllegalWrite, txe.Exception.GetCode(), + require.Equal(t, errors.Codes.IllegalWrite, txe.Exception.ErrorCode(), "expected static call violation because of call with value") }) @@ -960,7 +960,7 @@ func TestEVM(t *testing.T) { 0x00, 0x00, 0x00, PUSH1, 0x00, MSTORE, PUSH1, 0x0E, PUSH1, 0x00, INVALID) output, err := call(vm, st, account1, account2, bytecode, nil, &gas) - assert.Equal(t, errors.ErrorCodeExecutionAborted, errors.ErrorCode(err)) + assert.Equal(t, errors.Codes.ExecutionAborted, errors.GetCode(err)) t.Logf("Output: %v Error: %v\n", output, err) }) @@ -1048,7 +1048,7 @@ func TestEVM(t *testing.T) { Gas: &gas, } _, ex := vm.Execute(st, blockchain, eventSink, params, nil) - require.Equal(t, errors.ErrorCodeNonExistentAccount, errors.ErrorCode(ex), + require.Equal(t, errors.Codes.NonExistentAccount, errors.GetCode(ex), "Should not be able to call account before creating it (even before initialising)") acc, err := st.GetAccount(unknownAddress) require.NoError(t, err) @@ -1076,7 +1076,7 @@ func TestEVM(t *testing.T) { // Non existing block blockchain.blockHeight = 1 _, err := vm.Execute(st, blockchain, eventSink, params, bytecode) - require.Equal(t, errors.ErrorCodeInvalidBlockNumber, errors.ErrorCode(err), + require.Equal(t, errors.Codes.InvalidBlockNumber, errors.GetCode(err), "attempt to get block hash of a non-existent block") // Excessive old block @@ -1084,7 +1084,7 @@ func TestEVM(t *testing.T) { bytecode = MustSplice(PUSH1, 1, BLOCKHASH) _, err = vm.Execute(st, blockchain, eventSink, params, bytecode) - require.Equal(t, errors.ErrorCodeBlockNumberOutOfRange, errors.ErrorCode(err), + require.Equal(t, errors.Codes.BlockNumberOutOfRange, errors.GetCode(err), "attempt to get block hash of a block outside of allowed range") // Get block hash @@ -1100,7 +1100,7 @@ func TestEVM(t *testing.T) { bytecode = MustSplice(PUSH1, 4, BLOCKHASH, return1()) _, err = vm.Execute(st, blockchain, eventSink, params, bytecode) - require.Equal(t, errors.ErrorCodeInvalidBlockNumber, errors.ErrorCode(err), + require.Equal(t, errors.Codes.InvalidBlockNumber, errors.GetCode(err), "attempt to get block hash failed") }) @@ -1230,7 +1230,7 @@ func TestEVM(t *testing.T) { require.NoError(t, err) _, ex := vm.Execute(st, blockchain, eventSink, params, code) - require.Equal(t, errors.ErrorCodeDataStackOverflow, errors.ErrorCode(ex), "Should be stack overflow") + require.Equal(t, errors.Codes.DataStackOverflow, errors.GetCode(ex), "Should be stack overflow") }) t.Run("CallStackOverflow", func(t *testing.T) { @@ -1297,11 +1297,11 @@ func TestEVM(t *testing.T) { require.Error(t, err) callError := txe.CallError() require.Error(t, callError) - require.Equal(t, errors.ErrorCodeExecutionReverted, errors.ErrorCode(callError)) + require.Equal(t, errors.Codes.ExecutionReverted, errors.GetCode(callError)) // Errors are post-order so first is deepest require.True(t, len(callError.NestedErrors) > 0) deepestErr := callError.NestedErrors[0] - require.Equal(t, errors.ErrorCodeCallStackOverflow, errors.ErrorCode(deepestErr)) + require.Equal(t, errors.Codes.CallStackOverflow, errors.GetCode(deepestErr)) assert.Equal(t, options.CallStackMaxDepth, deepestErr.StackDepth) assert.Equal(t, account2, deepestErr.Callee) assert.Equal(t, account1, deepestErr.Caller) @@ -1426,7 +1426,7 @@ func (b *blockchain) LastBlockTime() time.Time { func (b *blockchain) BlockHash(height uint64) ([]byte, error) { if height > b.blockHeight { - return nil, errors.ErrorCodeInvalidBlockNumber + return nil, errors.Codes.InvalidBlockNumber } bs := make([]byte, 32) binary.BigEndian.PutUint64(bs[24:], height) diff --git a/execution/evm/stack.go b/execution/evm/stack.go index 32aa03fce..c7cfb30c7 100644 --- a/execution/evm/stack.go +++ b/execution/evm/stack.go @@ -49,7 +49,7 @@ func (st *Stack) useGas(gasToUse uint64) { if *st.gas > gasToUse { *st.gas -= gasToUse } else { - st.pushErr(errors.ErrorCodeInsufficientGas) + st.pushErr(errors.Codes.InsufficientGas) } } @@ -61,7 +61,7 @@ func (st *Stack) Push(d Word256) { st.useGas(native.GasStackOp) err := st.ensureCapacity(uint64(st.ptr) + 1) if err != nil { - st.pushErr(errors.ErrorCodeDataStackOverflow) + st.pushErr(errors.Codes.DataStackOverflow) return } st.slice[st.ptr] = d @@ -100,7 +100,7 @@ func (st *Stack) PushBigInt(bigInt *big.Int) Word256 { func (st *Stack) Pop() Word256 { st.useGas(native.GasStackOp) if st.ptr == 0 { - st.pushErr(errors.ErrorCodeDataStackUnderflow) + st.pushErr(errors.Codes.DataStackUnderflow) return Zero256 } st.ptr-- @@ -118,7 +118,7 @@ func (st *Stack) PopAddress() crypto.Address { func (st *Stack) Pop64() int64 { d := st.Pop() if Is64BitOverflow(d) { - st.pushErr(errors.ErrorCodef(errors.ErrorCodeIntegerOverflow, "int64 overflow from word: %v", d)) + st.pushErr(errors.Errorf(errors.Codes.IntegerOverflow, "int64 overflow from word: %v", d)) return 0 } return Int64FromWord256(d) @@ -127,7 +127,7 @@ func (st *Stack) Pop64() int64 { func (st *Stack) PopU64() uint64 { d := st.Pop() if Is64BitOverflow(d) { - st.pushErr(errors.ErrorCodef(errors.ErrorCodeIntegerOverflow, "uint64 overflow from word: %v", d)) + st.pushErr(errors.Errorf(errors.Codes.IntegerOverflow, "uint64 overflow from word: %v", d)) return 0 } return Uint64FromWord256(d) @@ -149,7 +149,7 @@ func (st *Stack) Len() int { func (st *Stack) Swap(n int) { st.useGas(native.GasStackOp) if st.ptr < n { - st.pushErr(errors.ErrorCodeDataStackUnderflow) + st.pushErr(errors.Codes.DataStackUnderflow) return } st.slice[st.ptr-n], st.slice[st.ptr-1] = st.slice[st.ptr-1], st.slice[st.ptr-n] @@ -158,7 +158,7 @@ func (st *Stack) Swap(n int) { func (st *Stack) Dup(n int) { st.useGas(native.GasStackOp) if st.ptr < n { - st.pushErr(errors.ErrorCodeDataStackUnderflow) + st.pushErr(errors.Codes.DataStackUnderflow) return } st.Push(st.slice[st.ptr-n]) @@ -167,7 +167,7 @@ func (st *Stack) Dup(n int) { // Not an opcode, costs no gas. func (st *Stack) Peek() Word256 { if st.ptr == 0 { - st.pushErr(errors.ErrorCodeDataStackUnderflow) + st.pushErr(errors.Codes.DataStackUnderflow) return Zero256 } return st.slice[st.ptr-1] diff --git a/execution/evm/stack_test.go b/execution/evm/stack_test.go index 7ed585996..f184f00b7 100644 --- a/execution/evm/stack_test.go +++ b/execution/evm/stack_test.go @@ -56,7 +56,7 @@ func TestDynamicMemory_PushAhead(t *testing.T) { } st.Push64(math.MaxInt64) - assert.Equal(t, errors.ErrorCodeDataStackOverflow, errors.ErrorCode(err.Error())) + assert.Equal(t, errors.Codes.DataStackOverflow, errors.GetCode(err.Error())) } func TestStack_ZeroInitialCapacity(t *testing.T) { diff --git a/execution/exec/event_sink.go b/execution/exec/event_sink.go index 91ac5821e..194573797 100644 --- a/execution/exec/event_sink.go +++ b/execution/exec/event_sink.go @@ -35,6 +35,6 @@ func NewLogFreeEventSink(eventSink EventSink) *logFreeEventSink { } func (esc *logFreeEventSink) Log(log *LogEvent) error { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, + return errors.Errorf(errors.Codes.IllegalWrite, "Log emitted from contract %v, but current call should be log-free", log.Address) } diff --git a/execution/execution.go b/execution/execution.go index 47a4a12a0..43504cfba 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -299,12 +299,12 @@ func (exe *executor) validateInputsAndStorePublicKeys(txEnv *txs.Envelope) error } // Check sequences if acc.Sequence+1 != uint64(in.Sequence) { - return errors.ErrorCodef(errors.ErrorCodeInvalidSequence, "Error invalid sequence in input %v: input has sequence %d, but account has sequence %d, "+ + return errors.Errorf(errors.Codes.InvalidSequence, "Error invalid sequence in input %v: input has sequence %d, but account has sequence %d, "+ "so expected input to have sequence %d", in, in.Sequence, acc.Sequence, acc.Sequence+1) } // Check amount if acc.Balance < uint64(in.Amount) { - return errors.ErrorCodeInsufficientFunds + return errors.Codes.InsufficientFunds } // Check for Input permission globalPerms, err := acmstate.GlobalAccountPermissions(exe.stateCache) @@ -316,7 +316,7 @@ func (exe *executor) validateInputsAndStorePublicKeys(txEnv *txs.Envelope) error return err } if !v { - return errors.ErrorCodeNoInputPermission + return errors.Codes.NoInputPermission } } return nil diff --git a/execution/execution_test.go b/execution/execution_test.go index 6a95e18ed..c4519d8f0 100644 --- a/execution/execution_test.go +++ b/execution/execution_test.go @@ -1409,7 +1409,7 @@ proof-of-work chain as proof of what happened while they were gone ` tx.Input.Sequence += 1 err = exe.signExecuteCommit(tx, privAccounts[0]) require.Error(t, err) - if errors.AsException(err).ErrorCode() != errors.ErrorCodeInvalidString { + if errors.AsException(err).ErrorCode() != errors.Codes.InvalidString { t.Errorf("Expected invalid string error. Got: %v", err) } } @@ -1448,7 +1448,7 @@ func TestSelfDestruct(t *testing.T) { // if we do it again the self-destruct shouldn't happen twice and the caller should lose fee tx.Input.Sequence += 1 err = exe.signExecuteCommit(tx, privAccounts[0]) - assertErrorCode(t, errors.ErrorCodeInvalidAddress, err) + assertErrorCode(t, errors.Codes.InvalidAddress, err) // commit the block _, err = exe.Commit(nil) @@ -1848,9 +1848,9 @@ func wrapContractForCreate(contractCode []byte) []byte { return code } -func assertErrorCode(t *testing.T, expectedCode errors.Code, err error, msgAndArgs ...interface{}) { +func assertErrorCode(t *testing.T, expectedCode *errors.Code, err error, msgAndArgs ...interface{}) { if assert.Error(t, err, msgAndArgs...) { - actualCode := errors.AsException(err).Code + actualCode := errors.AsException(err).ErrorCode() if !assert.Equal(t, expectedCode, actualCode, "expected error code %v", expectedCode) { t.Logf("Expected '%v' but got '%v'", expectedCode, actualCode) } diff --git a/execution/native/account.go b/execution/native/account.go index 47ae9bd75..945a40b4e 100644 --- a/execution/native/account.go +++ b/execution/native/account.go @@ -19,11 +19,11 @@ func CreateAccount(st acmstate.ReaderWriter, address crypto.Address) error { } if acc != nil { if acc.NativeName != "" { - return errors.ErrorCodef(errors.ErrorCodeReservedAddress, + return errors.Errorf(errors.Codes.ReservedAddress, "cannot create account at %v because that address is reserved for a native contract '%s'", address, acc.NativeName) } - return errors.ErrorCodef(errors.ErrorCodeDuplicateAddress, + return errors.Errorf(errors.Codes.DuplicateAddress, "tried to create an account at an address that already exists: %v", address) } return st.UpdateAccount(&acm.Account{Address: address}) @@ -43,7 +43,7 @@ func initCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.A return err } if acc.EVMCode != nil || acc.WASMCode != nil { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, + return errors.Errorf(errors.Codes.IllegalWrite, "tried to initialise code for a contract that already has code: %v", address) } @@ -63,7 +63,7 @@ func initCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.A return err } if ancestor == nil { - return errors.ErrorCodef(errors.ErrorCodeNonExistentAccount, + return errors.Errorf(errors.Codes.NonExistentAccount, "parent %v of account %v does not exist", *parent, address) } if ancestor.Forebear != nil { @@ -72,7 +72,7 @@ func initCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.A return err } if ancestor == nil { - return errors.ErrorCodef(errors.ErrorCodeNonExistentAccount, + return errors.Errorf(errors.Codes.NonExistentAccount, "forebear %v of account %v does not exist", *ancestor.Forebear, *parent) } forebear = ancestor.Forebear @@ -94,7 +94,7 @@ func initCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.A } if !found { - return errors.ErrorCodef(errors.ErrorCodeInvalidContractCode, + return errors.Errorf(errors.Codes.InvalidContractCode, "could not find code with code hash: %X", codehash) } } @@ -121,7 +121,7 @@ func InitWASMCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) return err } if acc.EVMCode != nil || acc.WASMCode != nil { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, + return errors.Errorf(errors.Codes.IllegalWrite, "tried to re-initialise code for contract %v", address) } @@ -142,7 +142,7 @@ func Transfer(st acmstate.ReaderWriter, from, to crypto.Address, amount uint64) return err } if acc.Balance < amount { - return errors.ErrorCodeInsufficientBalance + return errors.Codes.InsufficientBalance } err = UpdateAccount(st, from, func(account *acm.Account) error { return account.SubtractFromBalance(amount) @@ -173,7 +173,7 @@ func UpdateContractMeta(st acmstate.ReaderWriter, address crypto.Address, payloa } err = st.SetMetadata(metahash, abi.Meta) if err != nil { - return errors.ErrorCodef(errors.ErrorCodeIllegalWrite, + return errors.Errorf(errors.Codes.IllegalWrite, "cannot update metadata for %v: %v", address, err) } } @@ -187,7 +187,7 @@ func RemoveAccount(st acmstate.ReaderWriter, address crypto.Address) error { return err } if acc == nil { - return errors.ErrorCodef(errors.ErrorCodeDuplicateAddress, + return errors.Errorf(errors.Codes.DuplicateAddress, "tried to remove an account at an address that does not exist: %v", address) } return st.RemoveAccount(address) @@ -211,7 +211,7 @@ func mustAccount(st acmstate.Reader, address crypto.Address) (*acm.Account, erro return nil, err } if acc == nil { - return nil, errors.ErrorCodef(errors.ErrorCodeNonExistentAccount, + return nil, errors.Errorf(errors.Codes.NonExistentAccount, "account %v does not exist", address) } return acc, nil diff --git a/execution/native/account_test.go b/execution/native/account_test.go index 73b8d0e78..afadba0c9 100644 --- a/execution/native/account_test.go +++ b/execution/native/account_test.go @@ -21,7 +21,7 @@ func TestState_CreateAccount(t *testing.T) { require.NoError(t, err) err = CreateAccount(st, address) require.Error(t, err) - require.Equal(t, errors.ErrorCodeDuplicateAddress, errors.ErrorCode(err)) + require.Equal(t, errors.Codes.DuplicateAddress, errors.GetCode(err)) st = acmstate.NewMemoryState() err = CreateAccount(st, address) @@ -78,7 +78,7 @@ func TestState_NewCache(t *testing.T) { return account.AddToBalance(amt) }) require.Error(t, err) - require.Equal(t, errors.ErrorCodeIllegalWrite, errors.ErrorCode(err)) + require.Equal(t, errors.Codes.IllegalWrite, errors.GetCode(err)) } func blockHashGetter(height uint64) []byte { diff --git a/execution/native/contract.go b/execution/native/contract.go index 4abbbc16c..63d1a63f8 100644 --- a/execution/native/contract.go +++ b/execution/native/contract.go @@ -20,7 +20,6 @@ import ( "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm/abi" @@ -28,11 +27,11 @@ import ( ) // -// SNative (from 'secure natives') are native (go) contracts that are dispatched -// based on account permissions and can access and modify an account's permissions +// Native (go) contracts are dispatched based on account permissions and can access +// and modify an account's permissions // -// Instructions on adding an SNative function. First declare a function like so: +// Instructions on adding an native function. First declare a function like so: // // func unsetBase(context Context, args unsetBaseArgs) (unsetBaseRets, error) { // } @@ -51,13 +50,13 @@ import ( // with the function listed. Only the PermFlag and the function F needs to be filled // in for each Function. Add this to the SNativeContracts() function. -// Contract is metadata for SNative contract. Acts as a call target +// Contract is metadata for native contract. Acts as a call target // from the EVM. Can be used to generate bindings in a smart contract languages. type Contract struct { - // Comment describing purpose of SNative contract and reason for assembling + // Comment describing purpose of native contract and reason for assembling // the particular functions Comment string - // Name of the SNative contract + // Name of the native contract Name string functionsByID map[abi.FunctionID]*Function functions []*Function @@ -67,7 +66,7 @@ type Contract struct { var _ Native = &Contract{} -// Create a new SNative contract description object by passing a comment, name +// Create a new native contract description object by passing a comment, name // and a list of member functions descriptions func NewContract(name string, comment string, logger *logging.Logger, fs ...Function) (*Contract, error) { address := AddressFromName(name) @@ -104,12 +103,11 @@ func NewContract(name string, comment string, logger *logging.Logger, fs ...Func }, nil } -// Dispatch is designed to be called from the EVM once a SNative contract -// has been selected. It is also placed in a registry by registerSNativeContracts -// So it can be looked up by SNative address +// Dispatch is designed to be called from the EVM once a native contract +// has been selected. func (c *Contract) Call(state engine.State, params engine.CallParams) (output []byte, err error) { if len(params.Input) < abi.FunctionIDSize { - return nil, errors.ErrorCodef(errors.ErrorCodeNativeFunction, + return nil, errors.Errorf(errors.Codes.NativeFunction, "Burrow Native dispatch requires a 4-byte function identifier but arguments are only %v bytes long", len(params.Input)) } @@ -136,7 +134,7 @@ func (c *Contract) FullName() string { return c.Name } -// We define the address of an SNative contact as the last 20 bytes of the sha3 +// We define the address of an native contact as the last 20 bytes of the sha3 // hash of its name func (c *Contract) Address() crypto.Address { return c.address @@ -147,7 +145,7 @@ func (c *Contract) FunctionByID(id abi.FunctionID) (*Function, errors.CodedError f, ok := c.functionsByID[id] if !ok { return nil, - errors.ErrorCodef(errors.ErrorCodeNativeFunction, "unknown SNative function with ID %x", id) + errors.Errorf(errors.Codes.NativeFunction, "unknown native function with ID %x", id) } return f, nil } diff --git a/execution/native/permissions.go b/execution/native/permissions.go index 7543ec76e..d12f0a038 100644 --- a/execution/native/permissions.go +++ b/execution/native/permissions.go @@ -11,7 +11,7 @@ import ( var Permissions = New().MustContract("Permissions", `* acmstate.ReaderWriter for managing Secure Native authorizations. - * @dev This interface describes the functions exposed by the SNative permissions layer in burrow. + * @dev This interface describes the functions exposed by the native permissions layer in burrow. `, Function{ Comment: ` diff --git a/execution/native/permissions_test.go b/execution/native/permissions_test.go index 653500fab..f54f5477a 100644 --- a/execution/native/permissions_test.go +++ b/execution/native/permissions_test.go @@ -103,7 +103,7 @@ func TestSNativeContractDescription_Dispatch(t *testing.T) { if !assert.Error(t, err, "Should fail due to lack of permissions") { return } - assert.Equal(t, errors.ErrorCodeNativeFunction, errors.ErrorCode(err)) + assert.Equal(t, errors.Codes.NativeFunction, errors.GetCode(err)) // Grant all permissions and dispatch should success err = UpdateAccount(state, caller.Address, func(acc *acm.Account) error { diff --git a/execution/native/precompiles.go b/execution/native/precompiles.go index 18d433870..bf024b15f 100644 --- a/execution/native/precompiles.go +++ b/execution/native/precompiles.go @@ -57,7 +57,7 @@ func sha256Func(ctx Context) (output []byte, err error) { // Deduct gas gasRequired := uint64((len(ctx.Input)+31)/32)*GasSha256Word + GasSha256Base if *ctx.Gas < gasRequired { - return nil, errors.ErrorCodeInsufficientGas + return nil, errors.Codes.InsufficientGas } else { *ctx.Gas -= gasRequired } @@ -72,7 +72,7 @@ func ripemd160Func(ctx Context) (output []byte, err error) { // Deduct gas gasRequired := uint64((len(ctx.Input)+31)/32)*GasRipemd160Word + GasRipemd160Base if *ctx.Gas < gasRequired { - return nil, errors.ErrorCodeInsufficientGas + return nil, errors.Codes.InsufficientGas } else { *ctx.Gas -= gasRequired } @@ -87,7 +87,7 @@ func identityFunc(ctx Context) (output []byte, err error) { // Deduct gas gasRequired := uint64((len(ctx.Input)+31)/32)*GasIdentityWord + GasIdentityBase if *ctx.Gas < gasRequired { - return nil, errors.ErrorCodeInsufficientGas + return nil, errors.Codes.InsufficientGas } else { *ctx.Gas -= gasRequired } @@ -104,7 +104,7 @@ const ( func bigModExp(ctx Context) (output []byte, err error) { if *ctx.Gas < GasRequire { - return nil, errors.ErrorCodeInsufficientGas + return nil, errors.Codes.InsufficientGas } *ctx.Gas -= GasRequire diff --git a/execution/native/state.go b/execution/native/state.go index db3f69a26..f0982f0dc 100644 --- a/execution/native/state.go +++ b/execution/native/state.go @@ -75,7 +75,7 @@ func (s *State) SetMetadata(metahash acmstate.MetadataHash, metadata string) err func (s *State) ensureNonNative(address crypto.Address, action string) error { contract := s.natives.GetByAddress(address) if contract != nil { - return errors.ErrorCodef(errors.ErrorCodeReservedAddress, + return errors.Errorf(errors.Codes.ReservedAddress, "cannot %s at %v because that address is reserved for a native contract '%s'", action, address, contract.FullName()) } diff --git a/execution/solidity/abi_tester.sol.go b/execution/solidity/abi_tester.sol.go index dd51c61ec..59d833204 100644 --- a/execution/solidity/abi_tester.sol.go +++ b/execution/solidity/abi_tester.sol.go @@ -2,12 +2,12 @@ package solidity import hex "github.com/tmthrgd/go-hex" -var Bytecode_A = hex.MustDecodeString("608060405234801561001057600080fd5b506102d5806100206000396000f3fe608060405234801561001057600080fd5b5060043610610048576000357c010000000000000000000000000000000000000000000000000000000090048063dbdc275d1461004d575b600080fd5b610055610097565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006040516100a5906100c7565b604051809103906000f0801580156100c1573d6000803e3d6000fd5b50905090565b6101d5806100d58339019056fe608060405234801561001057600080fd5b506101b5806100206000396000f3fe608060405234801561001057600080fd5b5060043610610048576000357c010000000000000000000000000000000000000000000000000000000090048063eadf91e31461004d575b600080fd5b610055610097565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006040516100a5906100c7565b604051809103906000f0801580156100c1573d6000803e3d6000fd5b50905090565b60b6806100d48339019056fe6080604052348015600f57600080fd5b5060988061001e6000396000f3fe6080604052348015600f57600080fd5b50600436106045576000357c010000000000000000000000000000000000000000000000000000000090048063ce15daec14604a575b600080fd5b60506066565b6040518082815260200191505060405180910390f35b6000548156fea165627a7a72305820a46c6c19158be05dcccde6ca95b6d92d08b9a1a7b3c5e8f84a26a49628c351600029a165627a7a7230582078d4ba52f8aab390e3df659d41312bbfda3a9db9681cbe604adc461c44b26c8c0029a165627a7a723058205069226ef56be4806b4221a0e82bb89b45e22e56d6e62696cf4bb606c77156390029") -var DeployedBytecode_A = hex.MustDecodeString("608060405234801561001057600080fd5b5060043610610048576000357c010000000000000000000000000000000000000000000000000000000090048063dbdc275d1461004d575b600080fd5b610055610097565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006040516100a5906100c7565b604051809103906000f0801580156100c1573d6000803e3d6000fd5b50905090565b6101d5806100d58339019056fe608060405234801561001057600080fd5b506101b5806100206000396000f3fe608060405234801561001057600080fd5b5060043610610048576000357c010000000000000000000000000000000000000000000000000000000090048063eadf91e31461004d575b600080fd5b610055610097565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006040516100a5906100c7565b604051809103906000f0801580156100c1573d6000803e3d6000fd5b50905090565b60b6806100d48339019056fe6080604052348015600f57600080fd5b5060988061001e6000396000f3fe6080604052348015600f57600080fd5b50600436106045576000357c010000000000000000000000000000000000000000000000000000000090048063ce15daec14604a575b600080fd5b60506066565b6040518082815260200191505060405180910390f35b6000548156fea165627a7a72305820a46c6c19158be05dcccde6ca95b6d92d08b9a1a7b3c5e8f84a26a49628c351600029a165627a7a7230582078d4ba52f8aab390e3df659d41312bbfda3a9db9681cbe604adc461c44b26c8c0029a165627a7a723058205069226ef56be4806b4221a0e82bb89b45e22e56d6e62696cf4bb606c77156390029") -var Abi_A = []byte(`[{"constant":false,"inputs":[],"name":"createB","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]`) -var Bytecode_B = hex.MustDecodeString("608060405234801561001057600080fd5b506101b5806100206000396000f3fe608060405234801561001057600080fd5b5060043610610048576000357c010000000000000000000000000000000000000000000000000000000090048063eadf91e31461004d575b600080fd5b610055610097565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006040516100a5906100c7565b604051809103906000f0801580156100c1573d6000803e3d6000fd5b50905090565b60b6806100d48339019056fe6080604052348015600f57600080fd5b5060988061001e6000396000f3fe6080604052348015600f57600080fd5b50600436106045576000357c010000000000000000000000000000000000000000000000000000000090048063ce15daec14604a575b600080fd5b60506066565b6040518082815260200191505060405180910390f35b6000548156fea165627a7a72305820a46c6c19158be05dcccde6ca95b6d92d08b9a1a7b3c5e8f84a26a49628c351600029a165627a7a7230582078d4ba52f8aab390e3df659d41312bbfda3a9db9681cbe604adc461c44b26c8c0029") -var DeployedBytecode_B = hex.MustDecodeString("608060405234801561001057600080fd5b5060043610610048576000357c010000000000000000000000000000000000000000000000000000000090048063eadf91e31461004d575b600080fd5b610055610097565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006040516100a5906100c7565b604051809103906000f0801580156100c1573d6000803e3d6000fd5b50905090565b60b6806100d48339019056fe6080604052348015600f57600080fd5b5060988061001e6000396000f3fe6080604052348015600f57600080fd5b50600436106045576000357c010000000000000000000000000000000000000000000000000000000090048063ce15daec14604a575b600080fd5b60506066565b6040518082815260200191505060405180910390f35b6000548156fea165627a7a72305820a46c6c19158be05dcccde6ca95b6d92d08b9a1a7b3c5e8f84a26a49628c351600029a165627a7a7230582078d4ba52f8aab390e3df659d41312bbfda3a9db9681cbe604adc461c44b26c8c0029") -var Abi_B = []byte(`[{"constant":false,"inputs":[],"name":"createC","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]`) -var Bytecode_C = hex.MustDecodeString("6080604052348015600f57600080fd5b5060988061001e6000396000f3fe6080604052348015600f57600080fd5b50600436106045576000357c010000000000000000000000000000000000000000000000000000000090048063ce15daec14604a575b600080fd5b60506066565b6040518082815260200191505060405180910390f35b6000548156fea165627a7a72305820a46c6c19158be05dcccde6ca95b6d92d08b9a1a7b3c5e8f84a26a49628c351600029") -var DeployedBytecode_C = hex.MustDecodeString("6080604052348015600f57600080fd5b50600436106045576000357c010000000000000000000000000000000000000000000000000000000090048063ce15daec14604a575b600080fd5b60506066565b6040518082815260200191505060405180910390f35b6000548156fea165627a7a72305820a46c6c19158be05dcccde6ca95b6d92d08b9a1a7b3c5e8f84a26a49628c351600029") -var Abi_C = []byte(`[{"constant":true,"inputs":[],"name":"this_is_c","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]`) +var Bytecode_A = hex.MustDecodeString("608060405234801561001057600080fd5b50610299806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063dbdc275d14610030575b600080fd5b61003861007a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000604051610088906100aa565b604051809103906000f0801580156100a4573d6000803e3d6000fd5b50905090565b6101ad806100b88339019056fe608060405234801561001057600080fd5b5061018d806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063eadf91e314610030575b600080fd5b61003861007a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000604051610088906100aa565b604051809103906000f0801580156100a4573d6000803e3d6000fd5b50905090565b60a2806100b78339019056fe6080604052348015600f57600080fd5b5060848061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063ce15daec14602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000548156fea265627a7a7231582070be037172c1568fc1a690737b372cb36a7c007ab27c2501d3652108b95b1c1064736f6c634300050b0032a265627a7a7231582050636f88296326e5c37becbbdb92bfc056b4db495a75962c52baaeb6b09bdd6164736f6c634300050b0032a265627a7a723158202b4acb837633f6d1282d56953bec7eda4b6a4cc6220b3f74db18eb9d52cbd59664736f6c634300050b0032") +var DeployedBytecode_A = hex.MustDecodeString("608060405234801561001057600080fd5b506004361061002b5760003560e01c8063dbdc275d14610030575b600080fd5b61003861007a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000604051610088906100aa565b604051809103906000f0801580156100a4573d6000803e3d6000fd5b50905090565b6101ad806100b88339019056fe608060405234801561001057600080fd5b5061018d806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063eadf91e314610030575b600080fd5b61003861007a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000604051610088906100aa565b604051809103906000f0801580156100a4573d6000803e3d6000fd5b50905090565b60a2806100b78339019056fe6080604052348015600f57600080fd5b5060848061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063ce15daec14602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000548156fea265627a7a7231582070be037172c1568fc1a690737b372cb36a7c007ab27c2501d3652108b95b1c1064736f6c634300050b0032a265627a7a7231582050636f88296326e5c37becbbdb92bfc056b4db495a75962c52baaeb6b09bdd6164736f6c634300050b0032a265627a7a723158202b4acb837633f6d1282d56953bec7eda4b6a4cc6220b3f74db18eb9d52cbd59664736f6c634300050b0032") +var Abi_A = []byte(`[{"constant":false,"inputs":[],"name":"createB","outputs":[{"internalType":"contract B","name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]`) +var Bytecode_B = hex.MustDecodeString("608060405234801561001057600080fd5b5061018d806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063eadf91e314610030575b600080fd5b61003861007a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000604051610088906100aa565b604051809103906000f0801580156100a4573d6000803e3d6000fd5b50905090565b60a2806100b78339019056fe6080604052348015600f57600080fd5b5060848061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063ce15daec14602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000548156fea265627a7a7231582070be037172c1568fc1a690737b372cb36a7c007ab27c2501d3652108b95b1c1064736f6c634300050b0032a265627a7a7231582050636f88296326e5c37becbbdb92bfc056b4db495a75962c52baaeb6b09bdd6164736f6c634300050b0032") +var DeployedBytecode_B = hex.MustDecodeString("608060405234801561001057600080fd5b506004361061002b5760003560e01c8063eadf91e314610030575b600080fd5b61003861007a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000604051610088906100aa565b604051809103906000f0801580156100a4573d6000803e3d6000fd5b50905090565b60a2806100b78339019056fe6080604052348015600f57600080fd5b5060848061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063ce15daec14602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000548156fea265627a7a7231582070be037172c1568fc1a690737b372cb36a7c007ab27c2501d3652108b95b1c1064736f6c634300050b0032a265627a7a7231582050636f88296326e5c37becbbdb92bfc056b4db495a75962c52baaeb6b09bdd6164736f6c634300050b0032") +var Abi_B = []byte(`[{"constant":false,"inputs":[],"name":"createC","outputs":[{"internalType":"contract C","name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]`) +var Bytecode_C = hex.MustDecodeString("6080604052348015600f57600080fd5b5060848061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063ce15daec14602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000548156fea265627a7a7231582070be037172c1568fc1a690737b372cb36a7c007ab27c2501d3652108b95b1c1064736f6c634300050b0032") +var DeployedBytecode_C = hex.MustDecodeString("6080604052348015600f57600080fd5b506004361060285760003560e01c8063ce15daec14602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000548156fea265627a7a7231582070be037172c1568fc1a690737b372cb36a7c007ab27c2501d3652108b95b1c1064736f6c634300050b0032") +var Abi_C = []byte(`[{"constant":true,"inputs":[],"name":"this_is_c","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]`) diff --git a/execution/solidity/event_emitter.sol.go b/execution/solidity/event_emitter.sol.go index d07a98c37..3ddd330f7 100644 --- a/execution/solidity/event_emitter.sol.go +++ b/execution/solidity/event_emitter.sol.go @@ -2,6 +2,6 @@ package solidity import hex "github.com/tmthrgd/go-hex" -var Bytecode_EventEmitter = hex.MustDecodeString("608060405234801561001057600080fd5b50610264806100206000396000f3fe608060405234801561001057600080fd5b5060043610610053576000357c010000000000000000000000000000000000000000000000000000000090048063508ed79914610058578063e8e49a7114610062575b600080fd5b61006061006c565b005b61006a61012b565b005b60405180807f68617368000000000000000000000000000000000000000000000000000000008152506004019050604051809103902060667f446f776e736965210000000000000000000000000000000000000000000000007f2d989eca8871e173291c8e287f34adebef09917027f9e904c22ce459a2cff0ca6001602a6040518083151515158152602001806020018360000b8152602001828103825260518152602001806101e860519139606001935050505060405180910390a4565b60405180807f68617368000000000000000000000000000000000000000000000000000000008152506004019050604051809103902060667f446f776e736965210000000000000000000000000000000000000000000000007f20aec2a3bcd8050a3a9e852e9d424805bad75ba33b57077464c73ae98d0582696001602a604051808315151515815260200180602001838152602001828103825260518152602001806101e860519139606001935050505060405180910390a456fe446f6e617564616d7066736368696666666168727473656c656b7472697a6974c3a474656e686175707462657472696562737765726b626175756e7465726265616d74656e676573656c6c736368616674a165627a7a72305820b11ba06d97e4448c1d8bf72e259b4d14daf0355f8aae146b40a708406fe037dd0029") -var DeployedBytecode_EventEmitter = hex.MustDecodeString("608060405234801561001057600080fd5b5060043610610053576000357c010000000000000000000000000000000000000000000000000000000090048063508ed79914610058578063e8e49a7114610062575b600080fd5b61006061006c565b005b61006a61012b565b005b60405180807f68617368000000000000000000000000000000000000000000000000000000008152506004019050604051809103902060667f446f776e736965210000000000000000000000000000000000000000000000007f2d989eca8871e173291c8e287f34adebef09917027f9e904c22ce459a2cff0ca6001602a6040518083151515158152602001806020018360000b8152602001828103825260518152602001806101e860519139606001935050505060405180910390a4565b60405180807f68617368000000000000000000000000000000000000000000000000000000008152506004019050604051809103902060667f446f776e736965210000000000000000000000000000000000000000000000007f20aec2a3bcd8050a3a9e852e9d424805bad75ba33b57077464c73ae98d0582696001602a604051808315151515815260200180602001838152602001828103825260518152602001806101e860519139606001935050505060405180910390a456fe446f6e617564616d7066736368696666666168727473656c656b7472697a6974c3a474656e686175707462657472696562737765726b626175756e7465726265616d74656e676573656c6c736368616674a165627a7a72305820b11ba06d97e4448c1d8bf72e259b4d14daf0355f8aae146b40a708406fe037dd0029") -var Abi_EventEmitter = []byte(`[{"constant":false,"inputs":[],"name":"EmitTwo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"EmitOne","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"direction","type":"bytes32"},{"indexed":false,"name":"trueism","type":"bool"},{"indexed":false,"name":"german","type":"string"},{"indexed":true,"name":"newDepth","type":"int64"},{"indexed":false,"name":"bignum","type":"int256"},{"indexed":true,"name":"hash","type":"string"}],"name":"ManyTypes","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"direction","type":"bytes32"},{"indexed":false,"name":"trueism","type":"bool"},{"indexed":false,"name":"german","type":"string"},{"indexed":true,"name":"newDepth","type":"int128"},{"indexed":false,"name":"bignum","type":"int8"},{"indexed":true,"name":"hash","type":"string"}],"name":"ManyTypes2","type":"event"}]`) +var Bytecode_EventEmitter = hex.MustDecodeString("608060405234801561001057600080fd5b50610250806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063508ed7991461003b578063e8e49a7114610045575b600080fd5b61004361004f565b005b61004d61010e565b005b60405180807f68617368000000000000000000000000000000000000000000000000000000008152506004019050604051809103902060667f446f776e736965210000000000000000000000000000000000000000000000007f2d989eca8871e173291c8e287f34adebef09917027f9e904c22ce459a2cff0ca6001602a6040518083151515158152602001806020018360000b8152602001828103825260518152602001806101cb60519139606001935050505060405180910390a4565b60405180807f68617368000000000000000000000000000000000000000000000000000000008152506004019050604051809103902060667f446f776e736965210000000000000000000000000000000000000000000000007f20aec2a3bcd8050a3a9e852e9d424805bad75ba33b57077464c73ae98d0582696001602a604051808315151515815260200180602001838152602001828103825260518152602001806101cb60519139606001935050505060405180910390a456fe446f6e617564616d7066736368696666666168727473656c656b7472697a6974c3a474656e686175707462657472696562737765726b626175756e7465726265616d74656e676573656c6c736368616674a265627a7a723158203c195a0643bb2f371aa1fbbe9e0b8eb41cb92b22a544a5f9ea322b5c806143bf64736f6c634300050b0032") +var DeployedBytecode_EventEmitter = hex.MustDecodeString("608060405234801561001057600080fd5b50600436106100365760003560e01c8063508ed7991461003b578063e8e49a7114610045575b600080fd5b61004361004f565b005b61004d61010e565b005b60405180807f68617368000000000000000000000000000000000000000000000000000000008152506004019050604051809103902060667f446f776e736965210000000000000000000000000000000000000000000000007f2d989eca8871e173291c8e287f34adebef09917027f9e904c22ce459a2cff0ca6001602a6040518083151515158152602001806020018360000b8152602001828103825260518152602001806101cb60519139606001935050505060405180910390a4565b60405180807f68617368000000000000000000000000000000000000000000000000000000008152506004019050604051809103902060667f446f776e736965210000000000000000000000000000000000000000000000007f20aec2a3bcd8050a3a9e852e9d424805bad75ba33b57077464c73ae98d0582696001602a604051808315151515815260200180602001838152602001828103825260518152602001806101cb60519139606001935050505060405180910390a456fe446f6e617564616d7066736368696666666168727473656c656b7472697a6974c3a474656e686175707462657472696562737765726b626175756e7465726265616d74656e676573656c6c736368616674a265627a7a723158203c195a0643bb2f371aa1fbbe9e0b8eb41cb92b22a544a5f9ea322b5c806143bf64736f6c634300050b0032") +var Abi_EventEmitter = []byte(`[{"constant":false,"inputs":[],"name":"EmitTwo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"EmitOne","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"direction","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"trueism","type":"bool"},{"indexed":false,"internalType":"string","name":"german","type":"string"},{"indexed":true,"internalType":"int64","name":"newDepth","type":"int64"},{"indexed":false,"internalType":"int256","name":"bignum","type":"int256"},{"indexed":true,"internalType":"string","name":"hash","type":"string"}],"name":"ManyTypes","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"direction","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"trueism","type":"bool"},{"indexed":false,"internalType":"string","name":"german","type":"string"},{"indexed":true,"internalType":"int128","name":"newDepth","type":"int128"},{"indexed":false,"internalType":"int8","name":"bignum","type":"int8"},{"indexed":true,"internalType":"string","name":"hash","type":"string"}],"name":"ManyTypes2","type":"event"}]`) diff --git a/execution/solidity/revert.sol.go b/execution/solidity/revert.sol.go index bd6339c07..bc18a2e65 100644 --- a/execution/solidity/revert.sol.go +++ b/execution/solidity/revert.sol.go @@ -2,6 +2,6 @@ package solidity import hex "github.com/tmthrgd/go-hex" -var Bytecode_Revert = hex.MustDecodeString("608060405234801561001057600080fd5b50610216806100206000396000f3fe608060405234801561001057600080fd5b5060043610610053576000357c0100000000000000000000000000000000000000000000000000000000900480635b202afb146100585780636037b04c1461008c575b600080fd5b61008a6004803603602081101561006e57600080fd5b81019080803563ffffffff169060200190929190505050610096565b005b6100946101e5565b005b60008163ffffffff161415610113576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f492068617665207265766572746564000000000000000000000000000000000081525060200191505060405180910390fd5b8080600190039150508063ffffffff167ff7f0feb5b4ac5276c55faa8936d962de931ebe8333a2efdc0506878de3979ba960405160405180910390a23073ffffffffffffffffffffffffffffffffffffffff16635b202afb826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808263ffffffff1663ffffffff168152602001915050600060405180830381600087803b1580156101ca57600080fd5b505af11580156101de573d6000803e3d6000fd5b5050505050565b600080fdfea165627a7a7230582021dc462608e362c1ab12bfca9c326514ec64ff6bbe411b6a3b1c41e20a82a8ac0029") -var DeployedBytecode_Revert = hex.MustDecodeString("608060405234801561001057600080fd5b5060043610610053576000357c0100000000000000000000000000000000000000000000000000000000900480635b202afb146100585780636037b04c1461008c575b600080fd5b61008a6004803603602081101561006e57600080fd5b81019080803563ffffffff169060200190929190505050610096565b005b6100946101e5565b005b60008163ffffffff161415610113576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f492068617665207265766572746564000000000000000000000000000000000081525060200191505060405180910390fd5b8080600190039150508063ffffffff167ff7f0feb5b4ac5276c55faa8936d962de931ebe8333a2efdc0506878de3979ba960405160405180910390a23073ffffffffffffffffffffffffffffffffffffffff16635b202afb826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808263ffffffff1663ffffffff168152602001915050600060405180830381600087803b1580156101ca57600080fd5b505af11580156101de573d6000803e3d6000fd5b5050505050565b600080fdfea165627a7a7230582021dc462608e362c1ab12bfca9c326514ec64ff6bbe411b6a3b1c41e20a82a8ac0029") -var Abi_Revert = []byte(`[{"constant":false,"inputs":[{"name":"i","type":"uint32"}],"name":"RevertAt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"RevertNoReason","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"i","type":"uint32"}],"name":"NotReverting","type":"event"}]`) +var Bytecode_Revert = hex.MustDecodeString("608060405234801561001057600080fd5b506101e6806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635b202afb1461003b5780636037b04c1461006f575b600080fd5b61006d6004803603602081101561005157600080fd5b81019080803563ffffffff169060200190929190505050610079565b005b6100776101ac565b005b60008163ffffffff1614156100f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f492068617665207265766572746564000000000000000000000000000000000081525060200191505060405180910390fd5b8080600190039150508063ffffffff167ff7f0feb5b4ac5276c55faa8936d962de931ebe8333a2efdc0506878de3979ba960405160405180910390a23073ffffffffffffffffffffffffffffffffffffffff16635b202afb826040518263ffffffff1660e01b8152600401808263ffffffff1663ffffffff168152602001915050600060405180830381600087803b15801561019157600080fd5b505af11580156101a5573d6000803e3d6000fd5b5050505050565b600080fdfea265627a7a72315820a7b5572a98bc7a4e296bf1ce2bbff026434c6f440f8f2cdbee3a6b121b7df20464736f6c634300050b0032") +var DeployedBytecode_Revert = hex.MustDecodeString("608060405234801561001057600080fd5b50600436106100365760003560e01c80635b202afb1461003b5780636037b04c1461006f575b600080fd5b61006d6004803603602081101561005157600080fd5b81019080803563ffffffff169060200190929190505050610079565b005b6100776101ac565b005b60008163ffffffff1614156100f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f492068617665207265766572746564000000000000000000000000000000000081525060200191505060405180910390fd5b8080600190039150508063ffffffff167ff7f0feb5b4ac5276c55faa8936d962de931ebe8333a2efdc0506878de3979ba960405160405180910390a23073ffffffffffffffffffffffffffffffffffffffff16635b202afb826040518263ffffffff1660e01b8152600401808263ffffffff1663ffffffff168152602001915050600060405180830381600087803b15801561019157600080fd5b505af11580156101a5573d6000803e3d6000fd5b5050505050565b600080fdfea265627a7a72315820a7b5572a98bc7a4e296bf1ce2bbff026434c6f440f8f2cdbee3a6b121b7df20464736f6c634300050b0032") +var Abi_Revert = []byte(`[{"constant":false,"inputs":[{"internalType":"uint32","name":"i","type":"uint32"}],"name":"RevertAt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"RevertNoReason","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"i","type":"uint32"}],"name":"NotReverting","type":"event"}]`) diff --git a/execution/solidity/strange_loop.sol.go b/execution/solidity/strange_loop.sol.go index e9a9f9ee9..5dca076a1 100644 --- a/execution/solidity/strange_loop.sol.go +++ b/execution/solidity/strange_loop.sol.go @@ -2,6 +2,6 @@ package solidity import hex "github.com/tmthrgd/go-hex" -var Bytecode_StrangeLoop = hex.MustDecodeString("60806040526017600055602260015560116002556001600360006101000a81548160ff02191690831515021790555034801561003a57600080fd5b506103d88061004a6000396000f3fe608060405234801561001057600080fd5b5060043610610048576000357c010000000000000000000000000000000000000000000000000000000090048063ebb384dd1461004d575b600080fd5b61005561006b565b6040518082815260200191505060405180910390f35b60006002549050600360009054906101000a900460ff161561026557600154600254121561019f576002600081548092919060010191905055506002547f55707369652100000000000000000000000000000000000000000000000000007f3ff0b1eac80ecf8e93d1a2d7982a9230f8ea7693439fd548687b08a5e292b09760405160405180910390a360025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561015e57600080fd5b505af1158015610172573d6000803e3d6000fd5b505050506040513d602081101561018857600080fd5b810190808051906020019092919050505050610260565b6000600360006101000a81548160ff02191690831515021790555060025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561022357600080fd5b505af1158015610237573d6000803e3d6000fd5b505050506040513d602081101561024d57600080fd5b8101908080519060200190929190505050505b6103a8565b600054600254131561037e57600260008154809291906001900391905055506002547f446f776e736965210000000000000000000000000000000000000000000000007f3ff0b1eac80ecf8e93d1a2d7982a9230f8ea7693439fd548687b08a5e292b09760405160405180910390a360025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561033d57600080fd5b505af1158015610351573d6000803e3d6000fd5b505050506040513d602081101561036757600080fd5b8101908080519060200190929190505050506103a7565b6001600360006101000a81548160ff0219169083151502179055506002549050600090506103a9565b5b5b9056fea165627a7a7230582077bccbcca142d5874668a8185b0909f13f771e47714a970862df714f970211aa0029") -var DeployedBytecode_StrangeLoop = hex.MustDecodeString("608060405234801561001057600080fd5b5060043610610048576000357c010000000000000000000000000000000000000000000000000000000090048063ebb384dd1461004d575b600080fd5b61005561006b565b6040518082815260200191505060405180910390f35b60006002549050600360009054906101000a900460ff161561026557600154600254121561019f576002600081548092919060010191905055506002547f55707369652100000000000000000000000000000000000000000000000000007f3ff0b1eac80ecf8e93d1a2d7982a9230f8ea7693439fd548687b08a5e292b09760405160405180910390a360025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561015e57600080fd5b505af1158015610172573d6000803e3d6000fd5b505050506040513d602081101561018857600080fd5b810190808051906020019092919050505050610260565b6000600360006101000a81548160ff02191690831515021790555060025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561022357600080fd5b505af1158015610237573d6000803e3d6000fd5b505050506040513d602081101561024d57600080fd5b8101908080519060200190929190505050505b6103a8565b600054600254131561037e57600260008154809291906001900391905055506002547f446f776e736965210000000000000000000000000000000000000000000000007f3ff0b1eac80ecf8e93d1a2d7982a9230f8ea7693439fd548687b08a5e292b09760405160405180910390a360025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561033d57600080fd5b505af1158015610351573d6000803e3d6000fd5b505050506040513d602081101561036757600080fd5b8101908080519060200190929190505050506103a7565b6001600360006101000a81548160ff0219169083151502179055506002549050600090506103a9565b5b5b9056fea165627a7a7230582077bccbcca142d5874668a8185b0909f13f771e47714a970862df714f970211aa0029") -var Abi_StrangeLoop = []byte(`[{"constant":false,"inputs":[],"name":"UpsieDownsie","outputs":[{"name":"i","type":"int256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"direction","type":"bytes32"},{"indexed":true,"name":"newDepth","type":"int256"}],"name":"ChangeLevel","type":"event"}]`) +var Bytecode_StrangeLoop = hex.MustDecodeString("60806040526017600055602260015560116002556001600360006101000a81548160ff02191690831515021790555034801561003a57600080fd5b506103708061004a6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063ebb384dd14610030575b600080fd5b61003861004e565b6040518082815260200191505060405180910390f35b60006002549050600360009054906101000a900460ff1615610210576001546002541215610166576002600081548092919060010191905055506002547f55707369652100000000000000000000000000000000000000000000000000007f3ff0b1eac80ecf8e93d1a2d7982a9230f8ea7693439fd548687b08a5e292b09760405160405180910390a360025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561012557600080fd5b505af1158015610139573d6000803e3d6000fd5b505050506040513d602081101561014f57600080fd5b81019080805190602001909291905050505061020b565b6000600360006101000a81548160ff02191690831515021790555060025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156101ce57600080fd5b505af11580156101e2573d6000803e3d6000fd5b505050506040513d60208110156101f857600080fd5b8101908080519060200190929190505050505b610337565b600054600254131561030d57600260008154809291906001900391905055506002547f446f776e736965210000000000000000000000000000000000000000000000007f3ff0b1eac80ecf8e93d1a2d7982a9230f8ea7693439fd548687b08a5e292b09760405160405180910390a360025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156102cc57600080fd5b505af11580156102e0573d6000803e3d6000fd5b505050506040513d60208110156102f657600080fd5b810190808051906020019092919050505050610336565b6001600360006101000a81548160ff021916908315150217905550600254905060009050610338565b5b5b9056fea265627a7a72315820af2e5459a7afcdb6fb21261c4f85e2f492ea013440e8c5677da356f6f95542f264736f6c634300050b0032") +var DeployedBytecode_StrangeLoop = hex.MustDecodeString("608060405234801561001057600080fd5b506004361061002b5760003560e01c8063ebb384dd14610030575b600080fd5b61003861004e565b6040518082815260200191505060405180910390f35b60006002549050600360009054906101000a900460ff1615610210576001546002541215610166576002600081548092919060010191905055506002547f55707369652100000000000000000000000000000000000000000000000000007f3ff0b1eac80ecf8e93d1a2d7982a9230f8ea7693439fd548687b08a5e292b09760405160405180910390a360025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561012557600080fd5b505af1158015610139573d6000803e3d6000fd5b505050506040513d602081101561014f57600080fd5b81019080805190602001909291905050505061020b565b6000600360006101000a81548160ff02191690831515021790555060025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156101ce57600080fd5b505af11580156101e2573d6000803e3d6000fd5b505050506040513d60208110156101f857600080fd5b8101908080519060200190929190505050505b610337565b600054600254131561030d57600260008154809291906001900391905055506002547f446f776e736965210000000000000000000000000000000000000000000000007f3ff0b1eac80ecf8e93d1a2d7982a9230f8ea7693439fd548687b08a5e292b09760405160405180910390a360025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156102cc57600080fd5b505af11580156102e0573d6000803e3d6000fd5b505050506040513d60208110156102f657600080fd5b810190808051906020019092919050505050610336565b6001600360006101000a81548160ff021916908315150217905550600254905060009050610338565b5b5b9056fea265627a7a72315820af2e5459a7afcdb6fb21261c4f85e2f492ea013440e8c5677da356f6f95542f264736f6c634300050b0032") +var Abi_StrangeLoop = []byte(`[{"constant":false,"inputs":[],"name":"UpsieDownsie","outputs":[{"internalType":"int256","name":"i","type":"int256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"direction","type":"bytes32"},{"indexed":true,"internalType":"int256","name":"newDepth","type":"int256"}],"name":"ChangeLevel","type":"event"}]`) diff --git a/execution/solidity/zero_reset.sol.go b/execution/solidity/zero_reset.sol.go index d54770e5e..2e7481874 100644 --- a/execution/solidity/zero_reset.sol.go +++ b/execution/solidity/zero_reset.sol.go @@ -2,6 +2,6 @@ package solidity import hex "github.com/tmthrgd/go-hex" -var Bytecode_ZeroReset = hex.MustDecodeString("608060405234801561001057600080fd5b50610195806100206000396000f3fe608060405234801561001057600080fd5b506004361061007e576000357c0100000000000000000000000000000000000000000000000000000000900480620267a4146100835780634ef65c3b146100a157806362738998146100cf578063747586b8146100ed578063987dc8201461011b578063b15a0d5f14610125575b600080fd5b61008b61012f565b6040518082815260200191505060405180910390f35b6100cd600480360360208110156100b757600080fd5b8101908080359060200190929190505050610139565b005b6100d7610143565b6040518082815260200191505060405180910390f35b6101196004803603602081101561010357600080fd5b810190808035906020019092919050505061014c565b005b610123610156565b005b61012d61015f565b005b6000600154905090565b8060018190555050565b60008054905090565b8060008190555050565b60008081905550565b600060018190555056fea165627a7a72305820f425681ba5df6ad8326c87681bfe7f8a84f407dc25e79a4cb790063ac3a8ba1f0029") -var DeployedBytecode_ZeroReset = hex.MustDecodeString("608060405234801561001057600080fd5b506004361061007e576000357c0100000000000000000000000000000000000000000000000000000000900480620267a4146100835780634ef65c3b146100a157806362738998146100cf578063747586b8146100ed578063987dc8201461011b578063b15a0d5f14610125575b600080fd5b61008b61012f565b6040518082815260200191505060405180910390f35b6100cd600480360360208110156100b757600080fd5b8101908080359060200190929190505050610139565b005b6100d7610143565b6040518082815260200191505060405180910390f35b6101196004803603602081101561010357600080fd5b810190808035906020019092919050505061014c565b005b610123610156565b005b61012d61015f565b005b6000600154905090565b8060018190555050565b60008054905090565b8060008190555050565b60008081905550565b600060018190555056fea165627a7a72305820f425681ba5df6ad8326c87681bfe7f8a84f407dc25e79a4cb790063ac3a8ba1f0029") -var Abi_ZeroReset = []byte(`[{"constant":true,"inputs":[],"name":"getUint","outputs":[{"name":"retUint","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"setUint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getInt","outputs":[{"name":"retInt","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256"}],"name":"setInt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"setIntToZero","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"setUintToZero","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]`) +var Bytecode_ZeroReset = hex.MustDecodeString("608060405234801561001057600080fd5b50610181806100206000396000f3fe608060405234801561001057600080fd5b50600436106100615760003560e01c80620267a4146100665780634ef65c3b1461008457806362738998146100b2578063747586b8146100d0578063987dc820146100fe578063b15a0d5f14610108575b600080fd5b61006e610112565b6040518082815260200191505060405180910390f35b6100b06004803603602081101561009a57600080fd5b810190808035906020019092919050505061011c565b005b6100ba610126565b6040518082815260200191505060405180910390f35b6100fc600480360360208110156100e657600080fd5b810190808035906020019092919050505061012f565b005b610106610139565b005b610110610142565b005b6000600154905090565b8060018190555050565b60008054905090565b8060008190555050565b60008081905550565b600060018190555056fea265627a7a72315820b0d053920fc2777157df814d54282ef8e079d98aebf917dc83eeab6c6623e49364736f6c634300050b0032") +var DeployedBytecode_ZeroReset = hex.MustDecodeString("608060405234801561001057600080fd5b50600436106100615760003560e01c80620267a4146100665780634ef65c3b1461008457806362738998146100b2578063747586b8146100d0578063987dc820146100fe578063b15a0d5f14610108575b600080fd5b61006e610112565b6040518082815260200191505060405180910390f35b6100b06004803603602081101561009a57600080fd5b810190808035906020019092919050505061011c565b005b6100ba610126565b6040518082815260200191505060405180910390f35b6100fc600480360360208110156100e657600080fd5b810190808035906020019092919050505061012f565b005b610106610139565b005b610110610142565b005b6000600154905090565b8060018190555050565b60008054905090565b8060008190555050565b60008081905550565b600060018190555056fea265627a7a72315820b0d053920fc2777157df814d54282ef8e079d98aebf917dc83eeab6c6623e49364736f6c634300050b0032") +var Abi_ZeroReset = []byte(`[{"constant":true,"inputs":[],"name":"getUint","outputs":[{"internalType":"uint256","name":"retUint","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"setUint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getInt","outputs":[{"internalType":"int256","name":"retInt","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"int256","name":"x","type":"int256"}],"name":"setInt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"setIntToZero","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"setUintToZero","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]`) diff --git a/execution/transactor.go b/execution/transactor.go index 944588447..1a0447814 100644 --- a/execution/transactor.go +++ b/execution/transactor.go @@ -104,7 +104,7 @@ func (trans *Transactor) BroadcastTxSync(ctx context.Context, txEnv *txs.Envelop case msg := <-out: txe := msg.(*exec.TxExecution) callError := txe.CallError() - if callError != nil && callError.ErrorCode() != errors.ErrorCodeExecutionReverted { + if callError != nil && callError.ErrorCode() != errors.Codes.ExecutionReverted { return nil, errors.Wrap(callError, "exception during transaction execution") } return txe, nil @@ -233,8 +233,8 @@ func (trans *Transactor) CheckTxSyncRaw(ctx context.Context, txBytes []byte) (*t } return receipt, nil default: - return nil, errors.ErrorCodef(errors.Code(checkTxResponse.Code), - "error returned by Tendermint in BroadcastTxSync ABCI log: %v", checkTxResponse.Log) + return nil, fmt.Errorf("error %d returned by Tendermint in BroadcastTxSync ABCI log: %v", + checkTxResponse.Code, checkTxResponse.Log) } } } diff --git a/execution/wasm/wasm.go b/execution/wasm/wasm.go index e9d059132..2a86407a0 100644 --- a/execution/wasm/wasm.go +++ b/execution/wasm/wasm.go @@ -64,7 +64,7 @@ type execContext struct { func RunWASM(state acmstate.ReaderWriter, address crypto.Address, createContract bool, wasm, input []byte) (output []byte, cerr error) { defer func() { if r := recover(); r != nil { - cerr = errors.ErrorCodeExecutionAborted + cerr = errors.Codes.ExecutionAborted } }() // WASM @@ -81,7 +81,7 @@ func RunWASM(state acmstate.ReaderWriter, address crypto.Address, createContract vm, err := exec.NewVirtualMachine(wasm, config, &execContext, nil) if err != nil { - return nil, errors.ErrorCodeInvalidContract + return nil, errors.Codes.InvalidContract } if execContext.Error() != nil { return nil, execContext.Error() @@ -99,13 +99,13 @@ func RunWASM(state acmstate.ReaderWriter, address crypto.Address, createContract } entryID, ok := vm.GetFunctionExport(wasmFunc) if !ok { - return nil, errors.ErrorCodeUnresolvedSymbols + return nil, errors.Codes.UnresolvedSymbols } // The 0 argument is the offset where our calldata is stored (if any) offset, err := vm.Run(entryID, 0) if err != nil { - return nil, errors.ErrorCodeExecutionAborted + return nil, errors.Codes.ExecutionAborted } if offset > 0 { diff --git a/integration/rpcevents/execution_events_server_test.go b/integration/rpcevents/execution_events_server_test.go index cb6289011..3e564c68d 100644 --- a/integration/rpcevents/execution_events_server_test.go +++ b/integration/rpcevents/execution_events_server_test.go @@ -185,7 +185,7 @@ func TestExecutionEventsTest(t *testing.T) { contractAddress := txe.Receipt.ContractAddress txe, err = rpctest.CallContract(tcli, inputAddress0, contractAddress, data) require.NoError(t, err) - assert.Equal(t, errors.ErrorCodeExecutionReverted, txe.Exception.Code) + assert.Equal(t, errors.Codes.ExecutionReverted, errors.GetCode(txe.Exception)) assert.Contains(t, txe.Exception.Error(), "I have reverted") request := &rpcevents.BlocksRequest{ diff --git a/integration/rpctransact/call_test.go b/integration/rpctransact/call_test.go index 1b4349a2f..bd2dcc8b7 100644 --- a/integration/rpctransact/call_test.go +++ b/integration/rpctransact/call_test.go @@ -450,7 +450,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) require.NoError(t, err) txe, err = rpctest.CallContract(cli, inputAddress, txe.Receipt.ContractAddress, data) require.NoError(t, err) - assert.Equal(t, errors.ErrorCodeExecutionReverted, txe.Exception.Code) + assert.Equal(t, errors.Codes.ExecutionReverted, errors.GetCode(txe.Exception)) revertReason, err := abi.UnpackRevert(txe.Result.Return) require.NoError(t, err) require.NotNil(t, revertReason) @@ -468,7 +468,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) require.NoError(t, err) txe, err = rpctest.CallContract(cli, inputAddress, txe.Receipt.ContractAddress, data) require.NoError(t, err) - assert.Equal(t, errors.ErrorCodeExecutionReverted, txe.Exception.Code) + assert.Equal(t, errors.Codes.ExecutionReverted, errors.GetCode(txe.Exception)) revertReason, err := abi.UnpackRevert(txe.Result.Return) require.NoError(t, err) assert.Nil(t, revertReason) diff --git a/js/test/get_set_smoke_test/GetSet.sol.go b/js/test/get_set_smoke_test/GetSet.sol.go deleted file mode 100644 index 1449509c9..000000000 --- a/js/test/get_set_smoke_test/GetSet.sol.go +++ /dev/null @@ -1,7 +0,0 @@ -package get_set_smoke_test - -import hex "github.com/tmthrgd/go-hex" - -var Bytecode_GetSet = hex.MustDecodeString("608060405234801561001057600080fd5b506104d0806100206000396000f300608060405260043610610098576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680620267a41461009d5780630bcd3b33146100c857806312a7b914146100fb5780631e26fd331461012a5780634ef65c3b146101595780637fcaf6661461018657806389ea642f146101ef578063beca2bcd1461027f578063e6748da9146102aa575b600080fd5b3480156100a957600080fd5b506100b26102db565b6040518082815260200191505060405180910390f35b3480156100d457600080fd5b506100dd6102e4565b60405180826000191660001916815260200191505060405180910390f35b34801561010757600080fd5b506101106102ee565b604051808215151515815260200191505060405180910390f35b34801561013657600080fd5b50610157600480360381019080803515159060200190929190505050610305565b005b34801561016557600080fd5b5061018460048036038101908080359060200190929190505050610322565b005b34801561019257600080fd5b506101ed600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061032c565b005b3480156101fb57600080fd5b50610204610346565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610244578082015181840152602081019050610229565b50505050905090810190601f1680156102715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028b57600080fd5b506102946103e8565b6040518082815260200191505060405180910390f35b3480156102b657600080fd5b506102d960048036038101908080356000191690602001909291905050506103f1565b005b60008054905090565b6000600154905090565b6000600360009054906101000a900460ff16905090565b80600360006101000a81548160ff02191690831515021790555050565b8060008190555050565b80600290805190602001906103429291906103ff565b5050565b606060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103de5780601f106103b3576101008083540402835291602001916103de565b820191906000526020600020905b8154815290600101906020018083116103c157829003601f168201915b5050505050905090565b60006001905090565b806001816000191690555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061044057805160ff191683800117855561046e565b8280016001018555821561046e579182015b8281111561046d578251825591602001919060010190610452565b5b50905061047b919061047f565b5090565b6104a191905b8082111561049d576000816000905550600101610485565b5090565b905600a165627a7a723058209e088e12869635c5763a79db31bfd31c9bb2f980f6c770d6d8aa8176044146050029") -var DeployedBytecode_GetSet = hex.MustDecodeString("608060405260043610610098576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680620267a41461009d5780630bcd3b33146100c857806312a7b914146100fb5780631e26fd331461012a5780634ef65c3b146101595780637fcaf6661461018657806389ea642f146101ef578063beca2bcd1461027f578063e6748da9146102aa575b600080fd5b3480156100a957600080fd5b506100b26102db565b6040518082815260200191505060405180910390f35b3480156100d457600080fd5b506100dd6102e4565b60405180826000191660001916815260200191505060405180910390f35b34801561010757600080fd5b506101106102ee565b604051808215151515815260200191505060405180910390f35b34801561013657600080fd5b50610157600480360381019080803515159060200190929190505050610305565b005b34801561016557600080fd5b5061018460048036038101908080359060200190929190505050610322565b005b34801561019257600080fd5b506101ed600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061032c565b005b3480156101fb57600080fd5b50610204610346565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610244578082015181840152602081019050610229565b50505050905090810190601f1680156102715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028b57600080fd5b506102946103e8565b6040518082815260200191505060405180910390f35b3480156102b657600080fd5b506102d960048036038101908080356000191690602001909291905050506103f1565b005b60008054905090565b6000600154905090565b6000600360009054906101000a900460ff16905090565b80600360006101000a81548160ff02191690831515021790555050565b8060008190555050565b80600290805190602001906103429291906103ff565b5050565b606060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103de5780601f106103b3576101008083540402835291602001916103de565b820191906000526020600020905b8154815290600101906020018083116103c157829003601f168201915b5050505050905090565b60006001905090565b806001816000191690555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061044057805160ff191683800117855561046e565b8280016001018555821561046e579182015b8281111561046d578251825591602001919060010190610452565b5b50905061047b919061047f565b5090565b6104a191905b8082111561049d576000816000905550600101610485565b5090565b905600a165627a7a723058209e088e12869635c5763a79db31bfd31c9bb2f980f6c770d6d8aa8176044146050029") -var Abi_GetSet = []byte(`[{"constant":true,"inputs":[],"name":"getUint","outputs":[{"name":"output","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBytes","outputs":[{"name":"output","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBool","outputs":[{"name":"output","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"input","type":"bool"}],"name":"setBool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"input","type":"uint256"}],"name":"setUint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"input","type":"string"}],"name":"setString","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getString","outputs":[{"name":"output","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"testExist","outputs":[{"name":"output","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"input","type":"bytes32"}],"name":"setBytes","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]`) diff --git a/permission/perm_flag.go b/permission/perm_flag.go index 728b6f88f..b255b73cb 100644 --- a/permission/perm_flag.go +++ b/permission/perm_flag.go @@ -91,7 +91,7 @@ const ( // A particular permission type PermFlag uint64 -// Checks if a permission flag is valid (a known base chain or snative permission) +// Checks if a permission flag is valid (a known base chain or native contract permission) func (pf PermFlag) IsValid() bool { return pf <= AllPermFlags } diff --git a/protobuf/errors.proto b/protobuf/errors.proto index d3ac4cd20..ca5c4b3c4 100644 --- a/protobuf/errors.proto +++ b/protobuf/errors.proto @@ -20,6 +20,6 @@ option (gogoproto.messagename_all) = true; message Exception { option (gogoproto.goproto_stringer) = false; - uint32 Code = 1 [(gogoproto.casttype) = "Code"]; + uint32 Code = 1 [(gogoproto.customname) = "CodeNumber"]; string Exception = 2; } diff --git a/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/permissions.sol b/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/permissions.sol index 2aec52bd3..89fe90bb5 100644 --- a/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/permissions.sol +++ b/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/permissions.sol @@ -3,7 +3,7 @@ pragma solidity >=0.4.0; /** * Interface for managing Secure Native authorizations. -* @dev This interface describes the functions exposed by the SNative permissions layer in burrow. +* @dev This interface describes the functions exposed by the native permissions layer in burrow. * @dev These functions can be accessed as if this contract were deployed at a special address (0x0A758FEB535243577C1A79AE55BED8CA03E226EC). * @dev This special address is defined as the last 20 bytes of the sha3 hash of the the contract name. * @dev To instantiate the contract use: diff --git a/util/natives/templates/solidity_templates.go b/util/natives/templates/solidity_templates.go index 0eb952ad7..47bc48b7b 100644 --- a/util/natives/templates/solidity_templates.go +++ b/util/natives/templates/solidity_templates.go @@ -55,13 +55,13 @@ func init() { Delims("[[", "]]"). Parse(functionTemplateText) if err != nil { - panic(fmt.Errorf("couldn't parse SNative function template: %s", err)) + panic(fmt.Errorf("couldn't parse native function template: %s", err)) } contractTemplate, err = template.New("SolidityContractTemplate"). Delims("[[", "]]"). Parse(contractTemplateText) if err != nil { - panic(fmt.Errorf("couldn't parse SNative contract template: %s", err)) + panic(fmt.Errorf("couldn't parse native contract template: %s", err)) } } @@ -78,7 +78,7 @@ type solidityFunction struct { // Contract // -// Create a templated solidityContract from an SNative contract description +// Create a templated solidityContract from an native contract description func NewSolidityContract(contract *native.Contract) *solidityContract { return &solidityContract{ SolidityPragmaVersion: ">=0.4.24", @@ -106,7 +106,7 @@ func (contract *solidityContract) Address() string { contract.Contract.Address()) } -// Generate Solidity code for this SNative contract +// Generate Solidity code for this native contract func (contract *solidityContract) Solidity() (string, error) { buf := new(bytes.Buffer) err := contractTemplate.Execute(buf, contract) @@ -129,7 +129,7 @@ func (contract *solidityContract) Functions() []*solidityFunction { // Function // -// Create a templated solidityFunction from an SNative function description +// Create a templated solidityFunction from an native function description func NewSolidityFunction(function *native.Function) *solidityFunction { return &solidityFunction{function} } diff --git a/util/natives/templates/solidity_templates_test.go b/util/natives/templates/solidity_templates_test.go index b3933cf96..729dbe7c9 100644 --- a/util/natives/templates/solidity_templates_test.go +++ b/util/natives/templates/solidity_templates_test.go @@ -34,7 +34,7 @@ func TestSNativeFuncTemplate(t *testing.T) { fmt.Println(solidity) } -// This test checks that we can generate the SNative contract interface and +// This test checks that we can generate the native contract interface and // prints it to stdout func TestSNativeContractTemplate(t *testing.T) { contract := native.MustDefaultNatives().GetContract("Permissions") From 7257c0638879820f60a3689020ebcac4ff53449a Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 27 Sep 2019 17:40:52 +0100 Subject: [PATCH 026/185] revert Address -> ValidatorAddress Signed-off-by: Gregory Hill --- cmd/burrow/commands/config_options.go | 10 +++++----- cmd/burrow/commands/configure.go | 2 +- cmd/burrow/commands/restore.go | 2 +- cmd/burrow/commands/start.go | 2 +- cmd/burrow/commands/tx.go | 2 +- config/config.go | 6 +++--- core/config.go | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cmd/burrow/commands/config_options.go b/cmd/burrow/commands/config_options.go index 31a30d713..0a58856de 100644 --- a/cmd/burrow/commands/config_options.go +++ b/cmd/burrow/commands/config_options.go @@ -97,7 +97,7 @@ func (opts *configOptions) obtainBurrowConfig() (*config.BurrowConfig, error) { return nil, err } // Which account am I? - conf.Address, err = accountAddress(conf, *opts.initAddressOpt, *opts.accountIndexOpt, *opts.validatorIndexOpt) + conf.ValidatorAddress, err = accountAddress(conf, *opts.initAddressOpt, *opts.accountIndexOpt, *opts.validatorIndexOpt) if err != nil { return nil, err } @@ -109,9 +109,9 @@ func (opts *configOptions) obtainBurrowConfig() (*config.BurrowConfig, error) { if conf.GenesisDoc != nil && conf.GenesisDoc.ChainID() != "" { chainIDHeader = conf.GenesisDoc.ChainID() + "_" } - if conf.Address != nil { + if conf.ValidatorAddress != nil { // Set a default moniker... since we can at this stage of config completion and it is required for start - conf.Tendermint.Moniker = fmt.Sprintf("%sNode_%s", chainIDHeader, conf.Address) + conf.Tendermint.Moniker = fmt.Sprintf("%sNode_%s", chainIDHeader, conf.ValidatorAddress) } } else { conf.Tendermint.Moniker = *opts.initMonikerOpt @@ -155,8 +155,8 @@ func accountAddress(conf *config.BurrowConfig, addressIn string, accIndex, valIn valIndex, len(conf.GenesisDoc.Validators)) } return &conf.GenesisDoc.Validators[valIndex].Address, nil - } else if conf.Address != nil { - return conf.Address, nil + } else if conf.ValidatorAddress != nil { + return conf.ValidatorAddress, nil } else if conf.GenesisDoc != nil && len(conf.GenesisDoc.Validators) == 1 { return &conf.GenesisDoc.Validators[0].Address, nil } diff --git a/cmd/burrow/commands/configure.go b/cmd/burrow/commands/configure.go index a0794417f..95dcb728b 100644 --- a/cmd/burrow/commands/configure.go +++ b/cmd/burrow/commands/configure.go @@ -289,7 +289,7 @@ func Configure(output Output) func(cmd *cli.Cmd) { } for i, acc := range genesisDoc.Accounts { // set stuff - conf.Address = &acc.Address + conf.ValidatorAddress = &acc.Address conf.Tendermint.PersistentPeers = strings.Join(peers, ",") conf.BurrowDir = fmt.Sprintf(".burrow%03d", i) conf.Tendermint.ListenHost = rpc.LocalHost diff --git a/cmd/burrow/commands/restore.go b/cmd/burrow/commands/restore.go index c89127e12..ee2db63e5 100644 --- a/cmd/burrow/commands/restore.go +++ b/cmd/burrow/commands/restore.go @@ -23,7 +23,7 @@ func Restore(output Output) func(cmd *cli.Cmd) { output.Fatalf("cannot continue with config: %v", err) } - output.Logf("Using validator address: %s", *conf.Address) + output.Logf("Using validator address: %s", *conf.ValidatorAddress) kern, err := core.NewKernel(conf.BurrowDir) if err != nil { diff --git a/cmd/burrow/commands/start.go b/cmd/burrow/commands/start.go index 5ba0e1b98..b9db24c2d 100644 --- a/cmd/burrow/commands/start.go +++ b/cmd/burrow/commands/start.go @@ -20,7 +20,7 @@ func Start(output Output) func(cmd *cli.Cmd) { output.Fatalf("cannot continue with config: %v", err) } - output.Logf("Using validator address: %s", *conf.Address) + output.Logf("Using validator address: %s", *conf.ValidatorAddress) kern, err := core.LoadKernelFromConfig(conf) if err != nil { diff --git a/cmd/burrow/commands/tx.go b/cmd/burrow/commands/tx.go index 0d8bc5923..aa9cd6154 100644 --- a/cmd/burrow/commands/tx.go +++ b/cmd/burrow/commands/tx.go @@ -39,7 +39,7 @@ func Tx(output Output) func(cmd *cli.Cmd) { chainHost := jobs.FirstOf(*chainOpt, conf.RPC.GRPC.ListenAddress()) client := def.NewClient(chainHost, conf.Keys.RemoteAddress, true, time.Duration(*timeoutOpt)*time.Second) logger := logging.NewNoopLogger() - address := conf.Address.String() + address := conf.ValidatorAddress.String() cmd.Command("send", "send value to another account", func(cmd *cli.Cmd) { sourceOpt := cmd.StringOpt("s source", "", "Address to send from, if not set config is used") diff --git a/config/config.go b/config/config.go index 4e503f6aa..9cb6e1746 100644 --- a/config/config.go +++ b/config/config.go @@ -20,8 +20,8 @@ const DefaultGenesisDocJSONFileName = "genesis.json" type BurrowConfig struct { // Set on startup - Address *crypto.Address `json:",omitempty" toml:",omitempty"` - Passphrase *string `json:",omitempty" toml:",omitempty"` + ValidatorAddress *crypto.Address `json:",omitempty" toml:",omitempty"` + Passphrase *string `json:",omitempty" toml:",omitempty"` // From config file BurrowDir string GenesisDoc *genesis.GenesisDoc `json:",omitempty" toml:",omitempty"` @@ -44,7 +44,7 @@ func DefaultBurrowConfig() *BurrowConfig { } func (conf *BurrowConfig) Verify() error { - if conf.Address == nil { + if conf.ValidatorAddress == nil { return fmt.Errorf("could not finalise address - please provide one in config or via --account-address") } return nil diff --git a/core/config.go b/core/config.go index 743e3c09a..0621fb770 100644 --- a/core/config.go +++ b/core/config.go @@ -117,11 +117,11 @@ func LoadKernelFromConfig(conf *config.BurrowConfig) (*Kernel, error) { return nil, fmt.Errorf("could not load state: %v", err) } - if conf.Address == nil { + if conf.ValidatorAddress == nil { return nil, fmt.Errorf("Address must be set") } - privVal, err := kern.PrivValidator(*conf.Address) + privVal, err := kern.PrivValidator(*conf.ValidatorAddress) if err != nil { return nil, fmt.Errorf("could not form PrivValidator from Address: %v", err) } From 174d27105fe746240d99bc59a765fc0dfdecab3c Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Thu, 3 Oct 2019 10:38:15 +0100 Subject: [PATCH 027/185] better lookup for peers filter Signed-off-by: Gregory Hill --- acm/acm.pb.go | 252 ++--- acm/balance/balance.pb.go | 44 +- acm/validator/validator.pb.go | 10 +- bcm/bcm.pb.go | 184 ++-- consensus/abci/app.go | 29 +- consensus/abci/peers_filter.go | 56 +- consensus/abci/peers_filter_test.go | 30 +- consensus/tendermint/config.go | 12 +- consensus/tendermint/config_test.go | 9 +- consensus/tendermint/sign_info.go | 4 +- consensus/tendermint/tendermint.pb.go | 10 +- core/config.go | 2 +- crypto/crypto.go | 1 + crypto/crypto.pb.go | 135 +-- deploy/def/client.go | 7 +- dump/dump.pb.go | 281 ++--- encoding/encoding.pb.go | 44 +- execution/contexts/identify_context.go | 7 +- execution/errors/errors.pb.go | 47 +- execution/exec/exec.pb.go | 1333 ++++++++++------------- execution/names/names.pb.go | 74 +- execution/registry/cache.go | 58 +- execution/registry/registry.go | 100 +- execution/registry/registry.pb.go | 142 ++- execution/registry/registry_test.go | 2 +- execution/state/registry.go | 43 +- execution/state/state.go | 21 +- genesis/spec/spec.pb.go | 157 +-- integration/governance/identify_test.go | 6 +- keys/keys.pb.go | 50 +- permission/permission.pb.go | 162 ++- protobuf/registry.proto | 9 +- rpc/rpc.pb.go | 10 +- rpc/rpcdump/rpcdump.pb.go | 20 +- rpc/rpcevents/rpcevents.pb.go | 362 +++--- rpc/rpcquery/query_server.go | 4 +- rpc/rpcquery/rpcquery.pb.go | 59 +- rpc/rpctransact/rpctransact.pb.go | 217 ++-- rpc/service.go | 4 +- storage/storage.pb.go | 47 +- txs/payload/payload.pb.go | 1155 +++++++++----------- txs/txs.pb.go | 216 ++-- 42 files changed, 2389 insertions(+), 3026 deletions(-) diff --git a/acm/acm.pb.go b/acm/acm.pb.go index d8f6e1d93..f331bc666 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -70,7 +69,7 @@ func (m *Account) XXX_Unmarshal(b []byte) error { } func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -155,7 +154,7 @@ func (m *ContractMeta) XXX_Unmarshal(b []byte) error { } func (m *ContractMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -232,7 +231,7 @@ var fileDescriptor_49ed775bc0a6adf6 = []byte{ func (m *Account) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -240,129 +239,106 @@ func (m *Account) Marshal() (dAtA []byte, err error) { } func (m *Account) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0xa + i++ + i = encodeVarintAcm(dAtA, i, uint64(m.Address.Size())) + n1, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - if len(m.NativeName) > 0 { - i -= len(m.NativeName) - copy(dAtA[i:], m.NativeName) - i = encodeVarintAcm(dAtA, i, uint64(len(m.NativeName))) - i-- - dAtA[i] = 0x5a + i += n1 + dAtA[i] = 0x12 + i++ + i = encodeVarintAcm(dAtA, i, uint64(m.PublicKey.Size())) + n2, err := m.PublicKey.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - if m.Forebear != nil { - { - size := m.Forebear.Size() - i -= size - if _, err := m.Forebear.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintAcm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 + i += n2 + if m.Sequence != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintAcm(dAtA, i, uint64(m.Sequence)) } - if len(m.ContractMeta) > 0 { - for iNdEx := len(m.ContractMeta) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ContractMeta[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAcm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } + if m.Balance != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintAcm(dAtA, i, uint64(m.Balance)) } - { - size := m.CodeHash.Size() - i -= size - if _, err := m.CodeHash.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintAcm(dAtA, i, uint64(size)) + dAtA[i] = 0x2a + i++ + i = encodeVarintAcm(dAtA, i, uint64(m.EVMCode.Size())) + n3, err := m.EVMCode.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x42 - { - size := m.WASMCode.Size() - i -= size - if _, err := m.WASMCode.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintAcm(dAtA, i, uint64(size)) + i += n3 + dAtA[i] = 0x32 + i++ + i = encodeVarintAcm(dAtA, i, uint64(m.Permissions.Size())) + n4, err := m.Permissions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- + i += n4 dAtA[i] = 0x3a - { - size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAcm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - { - size := m.EVMCode.Size() - i -= size - if _, err := m.EVMCode.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintAcm(dAtA, i, uint64(size)) + i++ + i = encodeVarintAcm(dAtA, i, uint64(m.WASMCode.Size())) + n5, err := m.WASMCode.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a - if m.Balance != 0 { - i = encodeVarintAcm(dAtA, i, uint64(m.Balance)) - i-- - dAtA[i] = 0x20 + i += n5 + dAtA[i] = 0x42 + i++ + i = encodeVarintAcm(dAtA, i, uint64(m.CodeHash.Size())) + n6, err := m.CodeHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - if m.Sequence != 0 { - i = encodeVarintAcm(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x18 + i += n6 + if len(m.ContractMeta) > 0 { + for _, msg := range m.ContractMeta { + dAtA[i] = 0x4a + i++ + i = encodeVarintAcm(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - { - size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + if m.Forebear != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintAcm(dAtA, i, uint64(m.Forebear.Size())) + n7, err := m.Forebear.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i -= size - i = encodeVarintAcm(dAtA, i, uint64(size)) + i += n7 } - i-- - dAtA[i] = 0x12 - { - size := m.Address.Size() - i -= size - if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintAcm(dAtA, i, uint64(size)) + if len(m.NativeName) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintAcm(dAtA, i, uint64(len(m.NativeName))) + i += copy(dAtA[i:], m.NativeName) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *ContractMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -370,59 +346,46 @@ func (m *ContractMeta) Marshal() (dAtA []byte, err error) { } func (m *ContractMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0xa + i++ + i = encodeVarintAcm(dAtA, i, uint64(m.CodeHash.Size())) + n8, err := m.CodeHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + dAtA[i] = 0x12 + i++ + i = encodeVarintAcm(dAtA, i, uint64(m.MetadataHash.Size())) + n9, err := m.MetadataHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n9 if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintAcm(dAtA, i, uint64(len(m.Metadata))) - i-- dAtA[i] = 0x1a + i++ + i = encodeVarintAcm(dAtA, i, uint64(len(m.Metadata))) + i += copy(dAtA[i:], m.Metadata) } - { - size := m.MetadataHash.Size() - i -= size - if _, err := m.MetadataHash.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintAcm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.CodeHash.Size() - i -= size - if _, err := m.CodeHash.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintAcm(dAtA, i, uint64(size)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return i, nil } func encodeVarintAcm(dAtA []byte, offset int, v uint64) int { - offset -= sovAcm(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *Account) Size() (n int) { if m == nil { @@ -489,7 +452,14 @@ func (m *ContractMeta) Size() (n int) { } func sovAcm(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozAcm(x uint64) (n int) { return sovAcm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/acm/balance/balance.pb.go b/acm/balance/balance.pb.go index 127a69e99..342618c99 100644 --- a/acm/balance/balance.pb.go +++ b/acm/balance/balance.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -42,7 +41,7 @@ func (m *Balance) XXX_Unmarshal(b []byte) error { } func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -105,7 +104,7 @@ var fileDescriptor_ee25a00b628521b1 = []byte{ func (m *Balance) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -113,42 +112,34 @@ func (m *Balance) Marshal() (dAtA []byte, err error) { } func (m *Balance) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Balance) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Type != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintBalance(dAtA, i, uint64(m.Type)) } if m.Amount != 0 { - i = encodeVarintBalance(dAtA, i, uint64(m.Amount)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintBalance(dAtA, i, uint64(m.Amount)) } - if m.Type != 0 { - i = encodeVarintBalance(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func encodeVarintBalance(dAtA []byte, offset int, v uint64) int { - offset -= sovBalance(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *Balance) Size() (n int) { if m == nil { @@ -169,7 +160,14 @@ func (m *Balance) Size() (n int) { } func sovBalance(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozBalance(x uint64) (n int) { return sovBalance(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/acm/validator/validator.pb.go b/acm/validator/validator.pb.go index 2caeb7c8a..e8987c611 100644 --- a/acm/validator/validator.pb.go +++ b/acm/validator/validator.pb.go @@ -6,7 +6,6 @@ package validator import ( fmt "fmt" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -125,7 +124,14 @@ func (m *Validator) Size() (n int) { } func sovValidator(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozValidator(x uint64) (n int) { return sovValidator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/bcm/bcm.pb.go b/bcm/bcm.pb.go index 943ee484a..4b02315fb 100644 --- a/bcm/bcm.pb.go +++ b/bcm/bcm.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" time "time" _ "github.com/gogo/protobuf/gogoproto" @@ -58,7 +57,7 @@ func (m *SyncInfo) XXX_Unmarshal(b []byte) error { } func (m *SyncInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -129,7 +128,7 @@ func (m *PersistedState) XXX_Unmarshal(b []byte) error { } func (m *PersistedState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -209,7 +208,7 @@ var fileDescriptor_0c9ff3e1ca1cc0f1 = []byte{ func (m *SyncInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -217,75 +216,65 @@ func (m *SyncInfo) Marshal() (dAtA []byte, err error) { } func (m *SyncInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SyncInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.LatestBlockDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.LatestBlockDuration):]) - if err1 != nil { - return 0, err1 + if m.LatestBlockHeight != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintBcm(dAtA, i, uint64(m.LatestBlockHeight)) } - i -= n1 - i = encodeVarintBcm(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x32 - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockSeenTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockSeenTime):]) - if err2 != nil { - return 0, err2 + dAtA[i] = 0x12 + i++ + i = encodeVarintBcm(dAtA, i, uint64(m.LatestBlockHash.Size())) + n1, err := m.LatestBlockHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i -= n2 - i = encodeVarintBcm(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x2a - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockTime):]) - if err3 != nil { - return 0, err3 + i += n1 + dAtA[i] = 0x1a + i++ + i = encodeVarintBcm(dAtA, i, uint64(m.LatestAppHash.Size())) + n2, err := m.LatestAppHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i -= n3 - i = encodeVarintBcm(dAtA, i, uint64(n3)) - i-- + i += n2 dAtA[i] = 0x22 - { - size := m.LatestAppHash.Size() - i -= size - if _, err := m.LatestAppHash.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintBcm(dAtA, i, uint64(size)) + i++ + i = encodeVarintBcm(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockTime))) + n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockTime, dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a - { - size := m.LatestBlockHash.Size() - i -= size - if _, err := m.LatestBlockHash.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintBcm(dAtA, i, uint64(size)) + i += n3 + dAtA[i] = 0x2a + i++ + i = encodeVarintBcm(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockSeenTime))) + n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockSeenTime, dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 - if m.LatestBlockHeight != 0 { - i = encodeVarintBcm(dAtA, i, uint64(m.LatestBlockHeight)) - i-- - dAtA[i] = 0x8 + i += n4 + dAtA[i] = 0x32 + i++ + i = encodeVarintBcm(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.LatestBlockDuration))) + n5, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.LatestBlockDuration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *PersistedState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -293,65 +282,53 @@ func (m *PersistedState) Marshal() (dAtA []byte, err error) { } func (m *PersistedState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PersistedState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size := m.GenesisHash.Size() - i -= size - if _, err := m.GenesisHash.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintBcm(dAtA, i, uint64(size)) + dAtA[i] = 0xa + i++ + i = encodeVarintBcm(dAtA, i, uint64(m.AppHashAfterLastBlock.Size())) + n6, err := m.AppHashAfterLastBlock.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i += n6 + dAtA[i] = 0x12 + i++ + i = encodeVarintBcm(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime))) + n7, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 if m.LastBlockHeight != 0 { - i = encodeVarintBcm(dAtA, i, uint64(m.LastBlockHeight)) - i-- dAtA[i] = 0x18 + i++ + i = encodeVarintBcm(dAtA, i, uint64(m.LastBlockHeight)) } - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):]) - if err4 != nil { - return 0, err4 + dAtA[i] = 0x22 + i++ + i = encodeVarintBcm(dAtA, i, uint64(m.GenesisHash.Size())) + n8, err := m.GenesisHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i -= n4 - i = encodeVarintBcm(dAtA, i, uint64(n4)) - i-- - dAtA[i] = 0x12 - { - size := m.AppHashAfterLastBlock.Size() - i -= size - if _, err := m.AppHashAfterLastBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintBcm(dAtA, i, uint64(size)) + i += n8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return i, nil } func encodeVarintBcm(dAtA []byte, offset int, v uint64) int { - offset -= sovBcm(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *SyncInfo) Size() (n int) { if m == nil { @@ -400,7 +377,14 @@ func (m *PersistedState) Size() (n int) { } func sovBcm(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozBcm(x uint64) (n int) { return sovBcm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/consensus/abci/app.go b/consensus/abci/app.go index 4397bc8f4..19eac238a 100644 --- a/consensus/abci/app.go +++ b/consensus/abci/app.go @@ -32,10 +32,10 @@ type App struct { // Node information to return in Info nodeInfo string // State - blockchain *bcm.Blockchain - validators Validators - mempoolLocker sync.Locker - authorizedPeersProvider PeersFilterProvider + blockchain *bcm.Blockchain + validators Validators + mempoolLocker sync.Locker + authorizedPeers AuthorizedPeers // We need to cache these from BeginBlock for when we need actually need it in Commit block *types.RequestBeginBlock // Function to use to fail gracefully from panic rather than letting Tendermint make us a zombie @@ -46,23 +46,20 @@ type App struct { logger *logging.Logger } -// PeersFilterProvider provides current authorized nodes id and/or addresses -type PeersFilterProvider func() (authorizedPeersID []string, authorizedPeersAddress []string) - var _ types.Application = &App{} func NewApp(nodeInfo string, blockchain *bcm.Blockchain, validators Validators, checker execution.BatchExecutor, - committer execution.BatchCommitter, txDecoder txs.Decoder, authorizedPeersProvider PeersFilterProvider, + committer execution.BatchCommitter, txDecoder txs.Decoder, authorizedPeers AuthorizedPeers, panicFunc func(error), logger *logging.Logger) *App { return &App{ - nodeInfo: nodeInfo, - blockchain: blockchain, - validators: validators, - checker: checker, - committer: committer, - txDecoder: txDecoder, - authorizedPeersProvider: authorizedPeersProvider, - panicFunc: panicFunc, + nodeInfo: nodeInfo, + blockchain: blockchain, + validators: validators, + checker: checker, + committer: committer, + txDecoder: txDecoder, + authorizedPeers: authorizedPeers, + panicFunc: panicFunc, logger: logger.WithScope("abci.NewApp").With(structure.ComponentKey, "ABCI_App", "node_info", nodeInfo), } diff --git a/consensus/abci/peers_filter.go b/consensus/abci/peers_filter.go index f705f6f26..9f51e75b2 100644 --- a/consensus/abci/peers_filter.go +++ b/consensus/abci/peers_filter.go @@ -2,7 +2,6 @@ package abci import ( "fmt" - "net" "strings" "github.com/hyperledger/burrow/consensus/tendermint/codes" @@ -17,6 +16,39 @@ func isPeersFilterQuery(query *abciTypes.RequestQuery) bool { return strings.HasPrefix(query.Path, peersFilterQueryPath) } +// AuthorizedPeers provides current authorized nodes id and/or addresses +type AuthorizedPeers interface { + NumPeers() int + QueryPeerByID(id string) bool + QueryPeerByAddress(id string) bool +} + +type PeerLists struct { + IDs map[string]struct{} + Addresses map[string]struct{} +} + +func NewPeerLists() *PeerLists { + return &PeerLists{ + IDs: make(map[string]struct{}), + Addresses: make(map[string]struct{}), + } +} + +func (p PeerLists) QueryPeerByID(id string) bool { + _, ok := p.IDs[id] + return ok +} + +func (p PeerLists) QueryPeerByAddress(id string) bool { + _, ok := p.Addresses[id] + return ok +} + +func (p PeerLists) NumPeers() int { + return len(p.IDs) +} + func (app *App) peersFilter(reqQuery *abciTypes.RequestQuery, respQuery *abciTypes.ResponseQuery) { app.logger.TraceMsg("abci.App/Query peers filter query", "query_path", reqQuery.Path) path := strings.Split(reqQuery.Path, "/") @@ -26,27 +58,21 @@ func (app *App) peersFilter(reqQuery *abciTypes.RequestQuery, respQuery *abciTyp filterType := path[3] peer := path[4] - authorizedPeersID, authorizedPeersAddress := app.authorizedPeersProvider() - var authorizedPeers []string + + peerAuthorized := app.authorizedPeers.NumPeers() == 0 switch filterType { case "id": - authorizedPeers = authorizedPeersID + if ok := app.authorizedPeers.QueryPeerByID(peer); ok { + peerAuthorized = ok + } case "addr": - authorizedPeers = authorizedPeersAddress + if ok := app.authorizedPeers.QueryPeerByAddress(peer); ok { + peerAuthorized = ok + } default: panic(fmt.Errorf("invalid peers filter query type %v", reqQuery.Path)) } - peerAuthorized := len(authorizedPeers) == 0 - for _, authorizedPeer := range authorizedPeers { - host, _, err := net.SplitHostPort(peer) - // may have different outbound port in address, so fallback to host - if peer == authorizedPeer || (err == nil && host == authorizedPeer) { - peerAuthorized = true - break - } - } - if peerAuthorized { app.logger.TraceMsg("Peer sync authorized", "peer", peer) respQuery.Code = codes.PeerFilterAuthorizedCode diff --git a/consensus/abci/peers_filter_test.go b/consensus/abci/peers_filter_test.go index 7f79110d6..edb2c0123 100644 --- a/consensus/abci/peers_filter_test.go +++ b/consensus/abci/peers_filter_test.go @@ -23,11 +23,9 @@ func TestApp_QueryAuthorizedPeers(t *testing.T) { panicFunc: func(e error) { panicked = true }, - // Given no authorized node defined - authorizedPeersProvider: func() ([]string, []string) { - return []string{}, []string{} - }, logger: logging.NewNoopLogger(), + // Given no authorized node defined + authorizedPeers: &PeerLists{}, } // When authorized node query is raised with any node id @@ -38,8 +36,9 @@ func TestApp_QueryAuthorizedPeers(t *testing.T) { assert.Equal(t, codes.PeerFilterAuthorizedCode, resp.Code) // Given authorized nodes defined - app.authorizedPeersProvider = func() ([]string, []string) { - return []string{aNodeId}, []string{aNodeAddress} + app.authorizedPeers = &PeerLists{ + IDs: map[string]struct{}{aNodeId: {}}, + Addresses: map[string]struct{}{aNodeAddress: {}}, } // When authorized node query is raised for an authorized node by id @@ -72,9 +71,7 @@ func TestApp_QueryAuthorizedPeers(t *testing.T) { // Given a provider which panics assert.False(t, panicked) - app.authorizedPeersProvider = func() ([]string, []string) { - panic("ouch") - } + app.authorizedPeers = new(panicker) // When authorized node query is raised resp = app.Query(*makeTestFilterQuery("addr", "hackMe")) @@ -85,6 +82,21 @@ func TestApp_QueryAuthorizedPeers(t *testing.T) { assert.Equal(t, codes.UnsupportedRequestCode, resp.Code) } +type panicker struct { +} + +func (p panicker) QueryPeerByID(id string) bool { + panic("id") +} + +func (p panicker) QueryPeerByAddress(id string) bool { + panic("address") +} + +func (p panicker) NumPeers() int { + panic("peers") +} + func TestIsPeersFilterQuery(t *testing.T) { assert.True(t, isPeersFilterQuery(makeTestFilterQuery("id", aNodeId))) assert.True(t, isPeersFilterQuery(makeTestFilterQuery("addr", aNodeAddress))) diff --git a/consensus/tendermint/config.go b/consensus/tendermint/config.go index 2ca6f88ea..6b0264f23 100644 --- a/consensus/tendermint/config.go +++ b/consensus/tendermint/config.go @@ -122,23 +122,21 @@ func (btc *BurrowTendermintConfig) Config(rootDir string, timeoutFactor float64) return conf, nil } -func (btc *BurrowTendermintConfig) DefaultAuthorizedPeersProvider() abci.PeersFilterProvider { - var authorizedPeersID, authorizedPeersAddress []string +func (btc *BurrowTendermintConfig) DefaultAuthorizedPeersProvider() abci.AuthorizedPeers { + authorizedPeers := abci.NewPeerLists() authorizedPeersAddrOrID := strings.Split(btc.AuthorizedPeers, ",") for _, authorizedPeerAddrOrID := range authorizedPeersAddrOrID { _, err := url.Parse(authorizedPeerAddrOrID) isNodeAddress := err != nil if isNodeAddress { - authorizedPeersAddress = append(authorizedPeersAddress, authorizedPeerAddrOrID) + authorizedPeers.Addresses[authorizedPeerAddrOrID] = struct{}{} } else { - authorizedPeersID = append(authorizedPeersID, authorizedPeerAddrOrID) + authorizedPeers.IDs[authorizedPeerAddrOrID] = struct{}{} } } - return func() ([]string, []string) { - return authorizedPeersID, authorizedPeersAddress - } + return authorizedPeers } func scaleTimeout(factor float64, timeout time.Duration) time.Duration { diff --git a/consensus/tendermint/config_test.go b/consensus/tendermint/config_test.go index d95cae2e9..517db070c 100644 --- a/consensus/tendermint/config_test.go +++ b/consensus/tendermint/config_test.go @@ -4,17 +4,16 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestDefaultBurrowTendermintConfig(t *testing.T) { btc := DefaultBurrowTendermintConfig() btc.AuthorizedPeers = "127.0.0.1:26656,836AB8674A33416718E5A19557A25ED826B2BDD3" - authorizedPeersID, authorizedPeersAddress := btc.DefaultAuthorizedPeersProvider()() - assert.Equal(t, []string{"127.0.0.1:26656"}, authorizedPeersAddress) - assert.Equal(t, []string{"836AB8674A33416718E5A19557A25ED826B2BDD3"}, authorizedPeersID) + authorizedPeers := btc.DefaultAuthorizedPeersProvider() + assert.True(t, authorizedPeers.QueryPeerByAddress("127.0.0.1:26656")) + assert.True(t, authorizedPeers.QueryPeerByID("836AB8674A33416718E5A19557A25ED826B2BDD3")) tmConf, err := btc.Config(".burrow", 0.33) require.NoError(t, err) diff --git a/consensus/tendermint/sign_info.go b/consensus/tendermint/sign_info.go index 105293bc8..88c5c088d 100644 --- a/consensus/tendermint/sign_info.go +++ b/consensus/tendermint/sign_info.go @@ -39,8 +39,8 @@ type LastSignedInfo struct { Height int64 `json:"height"` Round int `json:"round"` Step int8 `json:"step"` - Signature []byte `json:"signature,omitempty"` // so we dont lose signatures - SignBytes binary.HexBytes `json:"signbytes,omitempty"` // so we dont lose signatures + Signature []byte `json:"signature,omitempty"` // so we don't lose signatures + SignBytes binary.HexBytes `json:"signbytes,omitempty"` // so we don't lose signatures } func NewLastSignedInfo() *LastSignedInfo { diff --git a/consensus/tendermint/tendermint.pb.go b/consensus/tendermint/tendermint.pb.go index 7031992bb..a79c3aedb 100644 --- a/consensus/tendermint/tendermint.pb.go +++ b/consensus/tendermint/tendermint.pb.go @@ -6,7 +6,6 @@ package tendermint import ( fmt "fmt" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -184,7 +183,14 @@ func (m *NodeInfo) Size() (n int) { } func sovTendermint(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozTendermint(x uint64) (n int) { return sovTendermint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/core/config.go b/core/config.go index 0621fb770..c6ff40752 100644 --- a/core/config.go +++ b/core/config.go @@ -60,7 +60,7 @@ func (kern *Kernel) LoadTendermintFromConfig(conf *config.BurrowConfig, privVal authorizedPeersProvider := conf.Tendermint.DefaultAuthorizedPeersProvider() if conf.Tendermint.IdentifyPeers { - authorizedPeersProvider = registry.AuthorizedPeersProvider(kern.State) + authorizedPeersProvider = registry.NewNodeFilter(kern.State) } kern.database.Stats() diff --git a/crypto/crypto.go b/crypto/crypto.go index 215b7faf4..089eb675f 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -24,6 +24,7 @@ func (k CurveType) String() string { return "unknown" } } + func (k CurveType) ABCIType() string { switch k { case CurveTypeSecp256k1: diff --git a/crypto/crypto.pb.go b/crypto/crypto.pb.go index c2e5b6c91..ab32f1738 100644 --- a/crypto/crypto.pb.go +++ b/crypto/crypto.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -45,7 +44,7 @@ func (m *PublicKey) XXX_Unmarshal(b []byte) error { } func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -94,7 +93,7 @@ func (m *PrivateKey) XXX_Unmarshal(b []byte) error { } func (m *PrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -134,7 +133,7 @@ func (m *Signature) XXX_Unmarshal(b []byte) error { } func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -206,7 +205,7 @@ var fileDescriptor_527278fb02d03321 = []byte{ func (m *PublicKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -214,41 +213,33 @@ func (m *PublicKey) Marshal() (dAtA []byte, err error) { } func (m *PublicKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size := m.PublicKey.Size() - i -= size - if _, err := m.PublicKey.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintCrypto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 if m.CurveType != 0 { - i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) - i-- dAtA[i] = 0x8 + i++ + i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) + } + dAtA[i] = 0x12 + i++ + i = encodeVarintCrypto(dAtA, i, uint64(m.PublicKey.Size())) + n1, err := m.PublicKey.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *PrivateKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -256,45 +247,37 @@ func (m *PrivateKey) Marshal() (dAtA []byte, err error) { } func (m *PrivateKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PrivateKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.PrivateKey) > 0 { - i -= len(m.PrivateKey) - copy(dAtA[i:], m.PrivateKey) - i = encodeVarintCrypto(dAtA, i, uint64(len(m.PrivateKey))) - i-- - dAtA[i] = 0x1a + if m.CurveType != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) } if len(m.PublicKey) > 0 { - i -= len(m.PublicKey) - copy(dAtA[i:], m.PublicKey) - i = encodeVarintCrypto(dAtA, i, uint64(len(m.PublicKey))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintCrypto(dAtA, i, uint64(len(m.PublicKey))) + i += copy(dAtA[i:], m.PublicKey) } - if m.CurveType != 0 { - i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) - i-- - dAtA[i] = 0x8 + if len(m.PrivateKey) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintCrypto(dAtA, i, uint64(len(m.PrivateKey))) + i += copy(dAtA[i:], m.PrivateKey) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *Signature) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -302,44 +285,35 @@ func (m *Signature) Marshal() (dAtA []byte, err error) { } func (m *Signature) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Signature) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.CurveType != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) } if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintCrypto(dAtA, i, uint64(len(m.Signature))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintCrypto(dAtA, i, uint64(len(m.Signature))) + i += copy(dAtA[i:], m.Signature) } - if m.CurveType != 0 { - i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func encodeVarintCrypto(dAtA []byte, offset int, v uint64) int { - offset -= sovCrypto(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *PublicKey) Size() (n int) { if m == nil { @@ -401,7 +375,14 @@ func (m *Signature) Size() (n int) { } func sovCrypto(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozCrypto(x uint64) (n int) { return sovCrypto(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/deploy/def/client.go b/deploy/def/client.go index 1af0d6384..8767c7bb3 100644 --- a/deploy/def/client.go +++ b/deploy/def/client.go @@ -705,10 +705,15 @@ func (c *Client) Identify(arg *IdentifyArg, logger *logging.Logger) (*payload.Id return nil, err } + id, err := crypto.AddressFromHexString(string(nodeKey.ID())) + if err != nil { + return nil, err + } + node := ®istry.NodeIdentity{ Moniker: arg.Moniker, NetworkAddress: arg.NetAddress, - TendermintNodeID: string(nodeKey.ID()), + TendermintNodeID: id, ValidatorPublicKey: signer.GetPublicKey(), } diff --git a/dump/dump.pb.go b/dump/dump.pb.go index 78522ae90..9c6bb37bf 100644 --- a/dump/dump.pb.go +++ b/dump/dump.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" time "time" _ "github.com/gogo/protobuf/gogoproto" @@ -54,7 +53,7 @@ func (m *Storage) XXX_Unmarshal(b []byte) error { } func (m *Storage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -95,7 +94,7 @@ func (m *AccountStorage) XXX_Unmarshal(b []byte) error { } func (m *AccountStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -149,7 +148,7 @@ func (m *EVMEvent) XXX_Unmarshal(b []byte) error { } func (m *EVMEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -221,7 +220,7 @@ func (m *Dump) XXX_Unmarshal(b []byte) error { } func (m *Dump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -329,7 +328,7 @@ var fileDescriptor_58418148159c29a6 = []byte{ func (m *Storage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -337,46 +336,36 @@ func (m *Storage) Marshal() (dAtA []byte, err error) { } func (m *Storage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Storage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintDump(dAtA, i, uint64(size)) + dAtA[i] = 0xa + i++ + i = encodeVarintDump(dAtA, i, uint64(m.Key.Size())) + n1, err := m.Key.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- + i += n1 dAtA[i] = 0x12 - { - size := m.Key.Size() - i -= size - if _, err := m.Key.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintDump(dAtA, i, uint64(size)) + i++ + i = encodeVarintDump(dAtA, i, uint64(m.Value.Size())) + n2, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + i += n2 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *AccountStorage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -384,50 +373,40 @@ func (m *AccountStorage) Marshal() (dAtA []byte, err error) { } func (m *AccountStorage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountStorage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0xa + i++ + i = encodeVarintDump(dAtA, i, uint64(m.Address.Size())) + n3, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n3 if len(m.Storage) > 0 { - for iNdEx := len(m.Storage) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Storage[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDump(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.Storage { dAtA[i] = 0x12 + i++ + i = encodeVarintDump(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - { - size := m.Address.Size() - i -= size - if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintDump(dAtA, i, uint64(size)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return i, nil } func (m *EVMEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -435,58 +414,49 @@ func (m *EVMEvent) Marshal() (dAtA []byte, err error) { } func (m *EVMEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EVMEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ChainID) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDump(dAtA, i, uint64(len(m.ChainID))) + i += copy(dAtA[i:], m.ChainID) } - if m.Index != 0 { - i = encodeVarintDump(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x20 + dAtA[i] = 0x12 + i++ + i = encodeVarintDump(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) + n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) + if err != nil { + return 0, err } + i += n4 if m.Event != nil { - { - size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDump(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x1a + i++ + i = encodeVarintDump(dAtA, i, uint64(m.Event.Size())) + n5, err := m.Event.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 } - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err2 != nil { - return 0, err2 + if m.Index != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintDump(dAtA, i, uint64(m.Index)) } - i -= n2 - i = encodeVarintDump(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x12 - if len(m.ChainID) > 0 { - i -= len(m.ChainID) - copy(dAtA[i:], m.ChainID) - i = encodeVarintDump(dAtA, i, uint64(len(m.ChainID))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *Dump) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -494,85 +464,69 @@ func (m *Dump) Marshal() (dAtA []byte, err error) { } func (m *Dump) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Dump) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDump(dAtA, i, uint64(m.Height)) } - if m.Name != nil { - { - size, err := m.Name.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDump(dAtA, i, uint64(size)) + if m.Account != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintDump(dAtA, i, uint64(m.Account.Size())) + n6, err := m.Account.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i += n6 } - if m.EVMEvent != nil { - { - size, err := m.EVMEvent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDump(dAtA, i, uint64(size)) + if m.AccountStorage != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintDump(dAtA, i, uint64(m.AccountStorage.Size())) + n7, err := m.AccountStorage.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i += n7 } - if m.AccountStorage != nil { - { - size, err := m.AccountStorage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDump(dAtA, i, uint64(size)) + if m.EVMEvent != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintDump(dAtA, i, uint64(m.EVMEvent.Size())) + n8, err := m.EVMEvent.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i += n8 } - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDump(dAtA, i, uint64(size)) + if m.Name != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintDump(dAtA, i, uint64(m.Name.Size())) + n9, err := m.Name.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i += n9 } - if m.Height != 0 { - i = encodeVarintDump(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func encodeVarintDump(dAtA []byte, offset int, v uint64) int { - offset -= sovDump(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *Storage) Size() (n int) { if m == nil { @@ -667,7 +621,14 @@ func (m *Dump) Size() (n int) { } func sovDump(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozDump(x uint64) (n int) { return sovDump(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/encoding/encoding.pb.go b/encoding/encoding.pb.go index 5e5056430..16a454d26 100644 --- a/encoding/encoding.pb.go +++ b/encoding/encoding.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -45,7 +44,7 @@ func (m *TestMessage) XXX_Unmarshal(b []byte) error { } func (m *TestMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -107,7 +106,7 @@ var fileDescriptor_ac330e3fa468db3c = []byte{ func (m *TestMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -115,42 +114,34 @@ func (m *TestMessage) Marshal() (dAtA []byte, err error) { } func (m *TestMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TestMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Type != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintEncoding(dAtA, i, uint64(m.Type)) } if m.Amount != 0 { - i = encodeVarintEncoding(dAtA, i, uint64(m.Amount)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintEncoding(dAtA, i, uint64(m.Amount)) } - if m.Type != 0 { - i = encodeVarintEncoding(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func encodeVarintEncoding(dAtA []byte, offset int, v uint64) int { - offset -= sovEncoding(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *TestMessage) Size() (n int) { if m == nil { @@ -171,7 +162,14 @@ func (m *TestMessage) Size() (n int) { } func sovEncoding(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozEncoding(x uint64) (n int) { return sovEncoding(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/execution/contexts/identify_context.go b/execution/contexts/identify_context.go index de6017111..d5d4c5509 100644 --- a/execution/contexts/identify_context.go +++ b/execution/contexts/identify_context.go @@ -36,13 +36,14 @@ func (ctx *IdentifyContext) Execute(txe *exec.TxExecution, p payload.Payload) er if err != nil { return errors.Wrap(err, "at least one input lacks permission for IdentifyTx") } - // Registry updates must be consensual and binding so we requires signatures from the validator key of the node - // being added + + // Registry updates must be consensual and binding so we requires signatures + // from the validator key of the node being added validatorAddress := ctx.tx.Node.ValidatorPublicKey.GetAddress() if _, ok := inputs[validatorAddress]; !ok { return fmt.Errorf("IdentifyTx must be signed by node's validator key, but missing %v in inputs", validatorAddress) } - return ctx.NodeWriter.UpdateNode(validatorAddress, ctx.tx.Node) + return ctx.NodeWriter.UpdateNode(ctx.tx.Node.TendermintNodeID, ctx.tx.Node) } diff --git a/execution/errors/errors.pb.go b/execution/errors/errors.pb.go index 918082abe..3af0d21aa 100644 --- a/execution/errors/errors.pb.go +++ b/execution/errors/errors.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -44,7 +43,7 @@ func (m *Exception) XXX_Unmarshal(b []byte) error { } func (m *Exception) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -107,7 +106,7 @@ var fileDescriptor_24fe73c7f0ddb19c = []byte{ func (m *Exception) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -115,44 +114,35 @@ func (m *Exception) Marshal() (dAtA []byte, err error) { } func (m *Exception) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.CodeNumber != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintErrors(dAtA, i, uint64(m.CodeNumber)) } if len(m.Exception) > 0 { - i -= len(m.Exception) - copy(dAtA[i:], m.Exception) - i = encodeVarintErrors(dAtA, i, uint64(len(m.Exception))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintErrors(dAtA, i, uint64(len(m.Exception))) + i += copy(dAtA[i:], m.Exception) } - if m.CodeNumber != 0 { - i = encodeVarintErrors(dAtA, i, uint64(m.CodeNumber)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func encodeVarintErrors(dAtA []byte, offset int, v uint64) int { - offset -= sovErrors(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *Exception) Size() (n int) { if m == nil { @@ -174,7 +164,14 @@ func (m *Exception) Size() (n int) { } func sovErrors(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozErrors(x uint64) (n int) { return sovErrors(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/execution/exec/exec.pb.go b/execution/exec/exec.pb.go index d2623fb4a..aa23b65fc 100644 --- a/execution/exec/exec.pb.go +++ b/execution/exec/exec.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" time "time" _ "github.com/gogo/protobuf/gogoproto" @@ -59,7 +58,7 @@ func (m *StreamEvents) XXX_Unmarshal(b []byte) error { } func (m *StreamEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -111,7 +110,7 @@ func (m *StreamEvent) XXX_Unmarshal(b []byte) error { } func (m *StreamEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -188,7 +187,7 @@ func (m *BeginBlock) XXX_Unmarshal(b []byte) error { } func (m *BeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -242,7 +241,7 @@ func (m *EndBlock) XXX_Unmarshal(b []byte) error { } func (m *EndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -293,7 +292,7 @@ func (m *BeginTx) XXX_Unmarshal(b []byte) error { } func (m *BeginTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -355,7 +354,7 @@ func (m *EndTx) XXX_Unmarshal(b []byte) error { } func (m *EndTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -404,7 +403,7 @@ func (m *TxHeader) XXX_Unmarshal(b []byte) error { } func (m *TxHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -475,7 +474,7 @@ func (m *BlockExecution) XXX_Unmarshal(b []byte) error { } func (m *BlockExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -539,7 +538,7 @@ func (m *TxExecutionKey) XXX_Unmarshal(b []byte) error { } func (m *TxExecutionKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -605,7 +604,7 @@ func (m *TxExecution) XXX_Unmarshal(b []byte) error { } func (m *TxExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -687,7 +686,7 @@ func (m *Origin) XXX_Unmarshal(b []byte) error { } func (m *Origin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -767,7 +766,7 @@ func (m *Header) XXX_Unmarshal(b []byte) error { } func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -853,7 +852,7 @@ func (m *Event) XXX_Unmarshal(b []byte) error { } func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -943,7 +942,7 @@ func (m *Result) XXX_Unmarshal(b []byte) error { } func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1013,7 +1012,7 @@ func (m *LogEvent) XXX_Unmarshal(b []byte) error { } func (m *LogEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1057,7 +1056,7 @@ func (m *CallEvent) XXX_Unmarshal(b []byte) error { } func (m *CallEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1118,7 +1117,7 @@ func (m *GovernAccountEvent) XXX_Unmarshal(b []byte) error { } func (m *GovernAccountEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1165,7 +1164,7 @@ func (m *InputEvent) XXX_Unmarshal(b []byte) error { } func (m *InputEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1205,7 +1204,7 @@ func (m *OutputEvent) XXX_Unmarshal(b []byte) error { } func (m *OutputEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1249,7 +1248,7 @@ func (m *CallData) XXX_Unmarshal(b []byte) error { } func (m *CallData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1417,7 +1416,7 @@ var fileDescriptor_4d737c7315c25422 = []byte{ func (m *StreamEvents) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1425,40 +1424,32 @@ func (m *StreamEvents) Marshal() (dAtA []byte, err error) { } func (m *StreamEvents) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StreamEvents) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if len(m.StreamEvents) > 0 { - for iNdEx := len(m.StreamEvents) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.StreamEvents[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.StreamEvents { dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *StreamEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1466,98 +1457,80 @@ func (m *StreamEvent) Marshal() (dAtA []byte, err error) { } func (m *StreamEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StreamEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.BeginBlock != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(m.BeginBlock.Size())) + n1, err := m.BeginBlock.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 } - if m.EndBlock != nil { - { - size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.BeginTx != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.BeginTx.Size())) + n2, err := m.BeginTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x32 + i += n2 } - if m.EndTx != nil { - { - size, err := m.EndTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.Envelope != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Envelope.Size())) + n3, err := m.Envelope.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i += n3 } if m.Event != nil { - { - size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x22 - } - if m.Envelope != nil { - { - size := m.Envelope.Size() - i -= size - if _, err := m.Envelope.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExec(dAtA, i, uint64(size)) + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Event.Size())) + n4, err := m.Event.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i += n4 } - if m.BeginTx != nil { - { - size, err := m.BeginTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.EndTx != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintExec(dAtA, i, uint64(m.EndTx.Size())) + n5, err := m.EndTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i += n5 } - if m.BeginBlock != nil { - { - size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.EndBlock != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.EndBlock.Size())) + n6, err := m.EndBlock.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n6 } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *BeginBlock) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1565,43 +1538,35 @@ func (m *BeginBlock) Marshal() (dAtA []byte, err error) { } func (m *BeginBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Height)) } if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Header.Size())) + n7, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 } - if m.Height != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *EndBlock) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1609,31 +1574,25 @@ func (m *EndBlock) Marshal() (dAtA []byte, err error) { } func (m *EndBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if m.Height != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Height)) - i-- dAtA[i] = 0x8 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Height)) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *BeginTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1641,62 +1600,50 @@ func (m *BeginTx) Marshal() (dAtA []byte, err error) { } func (m *BeginTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BeginTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Exception != nil { - { - size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.TxHeader != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(m.TxHeader.Size())) + n8, err := m.TxHeader.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i += n8 } if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Result.Size())) + n9, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 } - if m.TxHeader != nil { - { - size, err := m.TxHeader.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.Exception != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Exception.Size())) + n10, err := m.Exception.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n10 } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *EndTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1704,36 +1651,28 @@ func (m *EndTx) Marshal() (dAtA []byte, err error) { } func (m *EndTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0x1a + i++ + i = encodeVarintExec(dAtA, i, uint64(m.TxHash.Size())) + n11, err := m.TxHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - { - size := m.TxHash.Size() - i -= size - if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExec(dAtA, i, uint64(size)) + i += n11 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil + return i, nil } func (m *TxHeader) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1741,63 +1680,53 @@ func (m *TxHeader) Marshal() (dAtA []byte, err error) { } func (m *TxHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Origin != nil { - { - size, err := m.Origin.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a + if m.TxType != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.TxType)) } - if m.Index != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x20 + dAtA[i] = 0x12 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.TxHash.Size())) + n12, err := m.TxHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n12 if m.Height != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Height)) - i-- dAtA[i] = 0x18 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Height)) + } + if m.Index != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Index)) } - { - size := m.TxHash.Size() - i -= size - if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { + if m.Origin != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Origin.Size())) + n13, err := m.Origin.MarshalTo(dAtA[i:]) + if err != nil { return 0, err } - i = encodeVarintExec(dAtA, i, uint64(size)) + i += n13 } - i-- - dAtA[i] = 0x12 - if m.TxType != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.TxType)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *BlockExecution) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1805,57 +1734,47 @@ func (m *BlockExecution) Marshal() (dAtA []byte, err error) { } func (m *BlockExecution) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Height)) } - if len(m.TxExecutions) > 0 { - for iNdEx := len(m.TxExecutions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TxExecutions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a + if m.Header != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Header.Size())) + n14, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n14 } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if len(m.TxExecutions) > 0 { + for _, msg := range m.TxExecutions { + dAtA[i] = 0x1a + i++ + i = encodeVarintExec(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + i += n } - i-- - dAtA[i] = 0x12 } - if m.Height != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TxExecutionKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1863,36 +1782,30 @@ func (m *TxExecutionKey) Marshal() (dAtA []byte, err error) { } func (m *TxExecutionKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxExecutionKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Height)) } if m.Offset != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Offset)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Offset)) } - if m.Height != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TxExecution) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1900,114 +1813,94 @@ func (m *TxExecution) Marshal() (dAtA []byte, err error) { } func (m *TxExecution) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.TxExecutions) > 0 { - for iNdEx := len(m.TxExecutions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TxExecutions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a + if m.TxHeader != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(m.TxHeader.Size())) + n15, err := m.TxHeader.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n15 } - if m.Exception != nil { - { - size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.Envelope != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Envelope.Size())) + n16, err := m.Envelope.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x52 + i += n16 } - if m.Receipt != nil { - { - size, err := m.Receipt.MarshalToSizedBuffer(dAtA[:i]) + if len(m.Events) > 0 { + for _, msg := range m.Events { + dAtA[i] = 0x3a + i++ + i = encodeVarintExec(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + i += n } - i-- - dAtA[i] = 0x4a } if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x42 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Result.Size())) + n17, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a + if m.Receipt != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Receipt.Size())) + n18, err := m.Receipt.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n18 } - if m.Envelope != nil { - { - size := m.Envelope.Size() - i -= size - if _, err := m.Envelope.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.Exception != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Exception.Size())) + n19, err := m.Exception.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x32 + i += n19 } - if m.TxHeader != nil { - { - size, err := m.TxHeader.MarshalToSizedBuffer(dAtA[:i]) + if len(m.TxExecutions) > 0 { + for _, msg := range m.TxExecutions { + dAtA[i] = 0x5a + i++ + i = encodeVarintExec(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + i += n } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *Origin) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2015,51 +1908,44 @@ func (m *Origin) Marshal() (dAtA []byte, err error) { } func (m *Origin) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Origin) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ChainID) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(len(m.ChainID))) + i += copy(dAtA[i:], m.ChainID) } - n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err18 != nil { - return 0, err18 + if m.Height != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Height)) } - i -= n18 - i = encodeVarintExec(dAtA, i, uint64(n18)) - i-- - dAtA[i] = 0x22 if m.Index != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Index)) - i-- dAtA[i] = 0x18 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Index)) } - if m.Height != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 + dAtA[i] = 0x22 + i++ + i = encodeVarintExec(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) + n20, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) + if err != nil { + return 0, err } - if len(m.ChainID) > 0 { - i -= len(m.ChainID) - copy(dAtA[i:], m.ChainID) - i = encodeVarintExec(dAtA, i, uint64(len(m.ChainID))) - i-- - dAtA[i] = 0xa + i += n20 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *Header) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2067,75 +1953,64 @@ func (m *Header) Marshal() (dAtA []byte, err error) { } func (m *Header) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Exception != nil { - { - size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a + if m.TxType != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.TxType)) } - if m.Index != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x30 + dAtA[i] = 0x12 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.TxHash.Size())) + n21, err := m.TxHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - if m.Height != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x28 + i += n21 + if m.EventType != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.EventType)) } if len(m.EventID) > 0 { - i -= len(m.EventID) - copy(dAtA[i:], m.EventID) - i = encodeVarintExec(dAtA, i, uint64(len(m.EventID))) - i-- dAtA[i] = 0x22 + i++ + i = encodeVarintExec(dAtA, i, uint64(len(m.EventID))) + i += copy(dAtA[i:], m.EventID) } - if m.EventType != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.EventType)) - i-- - dAtA[i] = 0x18 + if m.Height != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Height)) + } + if m.Index != 0 { + dAtA[i] = 0x30 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Index)) } - { - size := m.TxHash.Size() - i -= size - if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { + if m.Exception != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Exception.Size())) + n22, err := m.Exception.MarshalTo(dAtA[i:]) + if err != nil { return 0, err } - i = encodeVarintExec(dAtA, i, uint64(size)) + i += n22 } - i-- - dAtA[i] = 0x12 - if m.TxType != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.TxType)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *Event) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2143,98 +2018,80 @@ func (m *Event) Marshal() (dAtA []byte, err error) { } func (m *Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Header != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Header.Size())) + n23, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 } - if m.GovernAccount != nil { - { - size, err := m.GovernAccount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.Input != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Input.Size())) + n24, err := m.Input.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x32 + i += n24 } - if m.Log != nil { - { - size, err := m.Log.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.Output != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Output.Size())) + n25, err := m.Output.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i += n25 } if m.Call != nil { - { - size, err := m.Call.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x22 - } - if m.Output != nil { - { - size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Call.Size())) + n26, err := m.Call.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i += n26 } - if m.Input != nil { - { - size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.Log != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Log.Size())) + n27, err := m.Log.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i += n27 } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.GovernAccount != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.GovernAccount.Size())) + n28, err := m.GovernAccount.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n28 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *Result) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2242,62 +2099,51 @@ func (m *Result) Marshal() (dAtA []byte, err error) { } func (m *Result) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Result) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Return) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(len(m.Return))) + i += copy(dAtA[i:], m.Return) } - if m.PermArgs != nil { - { - size, err := m.PermArgs.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 + if m.GasUsed != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.GasUsed)) } if m.NameEntry != nil { - { - size, err := m.NameEntry.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x1a + i++ + i = encodeVarintExec(dAtA, i, uint64(m.NameEntry.Size())) + n29, err := m.NameEntry.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n29 } - if m.GasUsed != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.GasUsed)) - i-- - dAtA[i] = 0x10 + if m.PermArgs != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.PermArgs.Size())) + n30, err := m.PermArgs.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n30 } - if len(m.Return) > 0 { - i -= len(m.Return) - copy(dAtA[i:], m.Return) - i = encodeVarintExec(dAtA, i, uint64(len(m.Return))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *LogEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2305,60 +2151,48 @@ func (m *LogEvent) Marshal() (dAtA []byte, err error) { } func (m *LogEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Address.Size())) + n31, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n31 + dAtA[i] = 0x12 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Data.Size())) + n32, err := m.Data.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n32 if len(m.Topics) > 0 { - for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- { - { - size := m.Topics[iNdEx].Size() - i -= size - if _, err := m.Topics[iNdEx].MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.Topics { dAtA[i] = 0x1a + i++ + i = encodeVarintExec(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - { - size := m.Data.Size() - i -= size - if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.Address.Size() - i -= size - if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return i, nil } func (m *CallEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2366,68 +2200,56 @@ func (m *CallEvent) Marshal() (dAtA []byte, err error) { } func (m *CallEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CallEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.CallType != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.CallType)) - i-- - dAtA[i] = 0x28 - } - { - size := m.Return.Size() - i -= size - if _, err := m.Return.MarshalTo(dAtA[i:]); err != nil { + if m.CallData != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(m.CallData.Size())) + n33, err := m.CallData.MarshalTo(dAtA[i:]) + if err != nil { return 0, err } - i = encodeVarintExec(dAtA, i, uint64(size)) + i += n33 } - i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Origin.Size())) + n34, err := m.Origin.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n34 if m.StackDepth != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.StackDepth)) - i-- dAtA[i] = 0x18 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.StackDepth)) } - { - size := m.Origin.Size() - i -= size - if _, err := m.Origin.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExec(dAtA, i, uint64(size)) + dAtA[i] = 0x22 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Return.Size())) + n35, err := m.Return.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 - if m.CallData != nil { - { - size, err := m.CallData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + i += n35 + if m.CallType != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.CallType)) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *GovernAccountEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2435,38 +2257,30 @@ func (m *GovernAccountEvent) Marshal() (dAtA []byte, err error) { } func (m *GovernAccountEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GovernAccountEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if m.AccountUpdate != nil { - { - size, err := m.AccountUpdate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(m.AccountUpdate.Size())) + n36, err := m.AccountUpdate.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n36 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *InputEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2474,36 +2288,28 @@ func (m *InputEvent) Marshal() (dAtA []byte, err error) { } func (m *InputEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InputEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Address.Size())) + n37, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - { - size := m.Address.Size() - i -= size - if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExec(dAtA, i, uint64(size)) + i += n37 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return i, nil } func (m *OutputEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2511,36 +2317,28 @@ func (m *OutputEvent) Marshal() (dAtA []byte, err error) { } func (m *OutputEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OutputEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Address.Size())) + n38, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - { - size := m.Address.Size() - i -= size - if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExec(dAtA, i, uint64(size)) + i += n38 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return i, nil } func (m *CallData) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2548,72 +2346,58 @@ func (m *CallData) Marshal() (dAtA []byte, err error) { } func (m *CallData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CallData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0xa + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Caller.Size())) + n39, err := m.Caller.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - if m.Gas != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Gas)) - i-- - dAtA[i] = 0x28 + i += n39 + dAtA[i] = 0x12 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Callee.Size())) + n40, err := m.Callee.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n40 + dAtA[i] = 0x1a + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Data.Size())) + n41, err := m.Data.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n41 if m.Value != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Value)) - i-- dAtA[i] = 0x20 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Value)) } - { - size := m.Data.Size() - i -= size - if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExec(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size := m.Callee.Size() - i -= size - if _, err := m.Callee.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.Gas != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintExec(dAtA, i, uint64(m.Gas)) } - i-- - dAtA[i] = 0x12 - { - size := m.Caller.Size() - i -= size - if _, err := m.Caller.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExec(dAtA, i, uint64(size)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return i, nil } func encodeVarintExec(dAtA []byte, offset int, v uint64) int { - offset -= sovExec(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *StreamEvents) Size() (n int) { if m == nil { @@ -3093,7 +2877,14 @@ func (m *CallData) Size() (n int) { } func sovExec(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozExec(x uint64) (n int) { return sovExec(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/execution/names/names.pb.go b/execution/names/names.pb.go index efa37e943..e722ee6e0 100644 --- a/execution/names/names.pb.go +++ b/execution/names/names.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -53,7 +52,7 @@ func (m *Entry) XXX_Unmarshal(b []byte) error { } func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -126,7 +125,7 @@ var fileDescriptor_f4268625867c617c = []byte{ func (m *Entry) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -134,61 +133,49 @@ func (m *Entry) Marshal() (dAtA []byte, err error) { } func (m *Entry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintNames(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } - if m.Expires != 0 { - i = encodeVarintNames(dAtA, i, uint64(m.Expires)) - i-- - dAtA[i] = 0x20 + dAtA[i] = 0x12 + i++ + i = encodeVarintNames(dAtA, i, uint64(m.Owner.Size())) + n1, err := m.Owner.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n1 if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintNames(dAtA, i, uint64(len(m.Data))) - i-- dAtA[i] = 0x1a + i++ + i = encodeVarintNames(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) } - { - size := m.Owner.Size() - i -= size - if _, err := m.Owner.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintNames(dAtA, i, uint64(size)) + if m.Expires != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintNames(dAtA, i, uint64(m.Expires)) } - i-- - dAtA[i] = 0x12 - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintNames(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func encodeVarintNames(dAtA []byte, offset int, v uint64) int { - offset -= sovNames(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *Entry) Size() (n int) { if m == nil { @@ -216,7 +203,14 @@ func (m *Entry) Size() (n int) { } func sovNames(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozNames(x uint64) (n int) { return sovNames(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/execution/registry/cache.go b/execution/registry/cache.go index 49c6d8c05..f0f222ce7 100644 --- a/execution/registry/cache.go +++ b/execution/registry/cache.go @@ -26,6 +26,7 @@ type Cache struct { sync.RWMutex backend Reader registry map[crypto.Address]*nodeInfo + stats NodeStats } type nodeInfo struct { @@ -43,11 +44,12 @@ func NewCache(backend Reader) *Cache { return &Cache{ backend: backend, registry: make(map[crypto.Address]*nodeInfo), + stats: NewNodeStats(), } } -func (cache *Cache) GetNode(addr crypto.Address) (*NodeIdentity, error) { - info, err := cache.get(addr) +func (cache *Cache) GetNodeByID(id crypto.Address) (*NodeIdentity, error) { + info, err := cache.get(id) if err != nil { return nil, err } @@ -59,44 +61,43 @@ func (cache *Cache) GetNode(addr crypto.Address) (*NodeIdentity, error) { return info.node, nil } -func (cache *Cache) GetNodes() NodeList { - nodes := make(NodeList) - for addr := range cache.registry { - n, err := cache.GetNode(addr) - if err != nil { - continue - } - nodes[addr] = n - } - return nodes +func (cache *Cache) GetNodeIDsByAddress(net string) ([]crypto.Address, error) { + return cache.stats.GetAddresses(net), nil } -func (cache *Cache) UpdateNode(addr crypto.Address, node *NodeIdentity) error { - info, err := cache.get(addr) +func (cache *Cache) GetNumPeers() int { + return len(cache.registry) +} + +func (cache *Cache) UpdateNode(id crypto.Address, node *NodeIdentity) error { + info, err := cache.get(id) if err != nil { return err } info.Lock() defer info.Unlock() if info.removed { - return fmt.Errorf("UpdateNode on a removed node: %x", addr) + return fmt.Errorf("UpdateNode on a removed node: %x", id) } info.node = node info.updated = true + cache.stats.Remove(info.node) + cache.stats.Insert(node.GetNetworkAddress(), id) return nil } -func (cache *Cache) RemoveNode(addr crypto.Address) error { - info, err := cache.get(addr) +func (cache *Cache) RemoveNode(id crypto.Address) error { + info, err := cache.get(id) if err != nil { return err } info.Lock() defer info.Unlock() if info.removed { - return fmt.Errorf("RemoveNode on removed node: %x", addr) + return fmt.Errorf("RemoveNode on removed node: %x", id) } + cache.stats.Remove(info.node) info.removed = true return nil } @@ -106,22 +107,17 @@ func (cache *Cache) RemoveNode(addr crypto.Address) error { func (cache *Cache) Sync(state Writer) error { cache.Lock() defer cache.Unlock() - var addresses []crypto.Address - for addr := range cache.registry { - addresses = append(addresses, addr) - } - for _, addr := range addresses { - info := cache.registry[addr] + for id, info := range cache.registry { info.RLock() if info.removed { - err := state.RemoveNode(addr) + err := state.RemoveNode(id) if err != nil { info.RUnlock() return err } } else if info.updated { - err := state.UpdateNode(addr, info.node) + err := state.UpdateNode(id, info.node) if err != nil { info.RUnlock() return err @@ -154,23 +150,23 @@ func (cache *Cache) Backend() Reader { return cache.backend } -func (cache *Cache) get(addr crypto.Address) (*nodeInfo, error) { +func (cache *Cache) get(id crypto.Address) (*nodeInfo, error) { cache.RLock() - info := cache.registry[addr] + info := cache.registry[id] cache.RUnlock() if info == nil { cache.Lock() defer cache.Unlock() - info = cache.registry[addr] + info = cache.registry[id] if info == nil { - node, err := cache.backend.GetNode(addr) + node, err := cache.backend.GetNodeByID(id) if err != nil { return nil, err } info = &nodeInfo{ node: node, } - cache.registry[addr] = info + cache.registry[id] = info } } return info, nil diff --git a/execution/registry/registry.go b/execution/registry/registry.go index 4ea9ca18a..378673684 100644 --- a/execution/registry/registry.go +++ b/execution/registry/registry.go @@ -16,38 +16,112 @@ package registry import ( "fmt" + "net" "github.com/hyperledger/burrow/crypto" ) -func AuthorizedPeersProvider(state IterableReader) func() ([]string, []string) { - return func() ([]string, []string) { - var peerIDs, peerAddrs []string +type NodeStats struct { + Addresses map[string]map[crypto.Address]struct{} +} + +func NewNodeStats() NodeStats { + return NodeStats{ + Addresses: make(map[string]map[crypto.Address]struct{}), + } +} - for _, node := range state.GetNodes() { - peerIDs = append(peerIDs, node.TendermintNodeID) - peerAddrs = append(peerAddrs, node.NetworkAddress) - } +func (ns *NodeStats) GetAddresses(net string) []crypto.Address { + nodes := ns.Addresses[net] + addrs := make([]crypto.Address, 0, len(nodes)) + for id := range nodes { + addrs = append(addrs, id) + } + return addrs +} + +func (ns *NodeStats) Insert(net string, id crypto.Address) { + _, ok := ns.Addresses[net] + if !ok { + ns.Addresses[net] = make(map[crypto.Address]struct{}) + } + ns.Addresses[net][id] = struct{}{} +} + +func (ns *NodeStats) Remove(node *NodeIdentity) bool { + _, ok := ns.Addresses[node.GetNetworkAddress()] + if !ok { + return false + } + _, ok = ns.Addresses[node.GetNetworkAddress()][node.TendermintNodeID] + if ok { + delete(ns.Addresses[node.GetNetworkAddress()], node.TendermintNodeID) + return true + } + return false +} + +type NodeFilter struct { + state IterableReader +} - return peerIDs, peerAddrs +func NewNodeFilter(state IterableReader) *NodeFilter { + return &NodeFilter{ + state: state, } } +func (nf *NodeFilter) QueryPeerByID(id string) bool { + addr, err := crypto.AddressFromHexString(id) + if err != nil { + return false + } + + node, err := nf.state.GetNodeByID(addr) + if err != nil || node == nil { + return false + } + return true +} + +func (nf *NodeFilter) findByAddress(addr string) bool { + nodes, err := nf.state.GetNodeIDsByAddress(addr) + if err != nil { + panic(err) + } else if len(nodes) == 0 { + return false + } + return true +} + +func (nf *NodeFilter) QueryPeerByAddress(addr string) bool { + // may have different outbound port in address, so fallback to host + ok := nf.findByAddress(addr) + if ok { + return ok + } + host, _, _ := net.SplitHostPort(addr) + return nf.findByAddress(host) +} + +func (nf *NodeFilter) NumPeers() int { + return nf.state.GetNumPeers() +} + func (rn *NodeIdentity) String() string { return fmt.Sprintf("RegisterNode{%v -> %v @ %v}", rn.ValidatorPublicKey, rn.TendermintNodeID, rn.NetworkAddress) } -type NodeList map[crypto.Address]*NodeIdentity - type Reader interface { - GetNode(crypto.Address) (*NodeIdentity, error) - GetNodes() NodeList + GetNodeByID(crypto.Address) (*NodeIdentity, error) + GetNodeIDsByAddress(net string) ([]crypto.Address, error) + GetNumPeers() int } type Writer interface { // Updates the node, creating it if it does not exist UpdateNode(crypto.Address, *NodeIdentity) error - // Remove the proposal by hash + // Remove the node by address RemoveNode(crypto.Address) error } diff --git a/execution/registry/registry.pb.go b/execution/registry/registry.pb.go index 14f521402..cc6f5c4b0 100644 --- a/execution/registry/registry.pb.go +++ b/execution/registry/registry.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -36,9 +35,9 @@ type NodeIdentity struct { // Peer network address NetworkAddress string `protobuf:"bytes,2,opt,name=NetworkAddress,proto3" json:"NetworkAddress,omitempty"` // The Tendermint p2p node ID - TendermintNodeID string `protobuf:"bytes,3,opt,name=TendermintNodeID,proto3" json:"TendermintNodeID,omitempty"` - // The public key that this node will validate with if it becomes a validator (use this to create a binding between - // p2p node ID and validator) + TendermintNodeID github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,3,opt,name=TendermintNodeID,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"TendermintNodeID"` + // The public key that this node will validate with if it becomes a validator + // (use this to create a binding between p2p node ID and validator) ValidatorPublicKey github_com_hyperledger_burrow_crypto.PublicKey `protobuf:"bytes,4,opt,name=ValidatorPublicKey,proto3,customtype=github.com/hyperledger/burrow/crypto.PublicKey" json:"ValidatorPublicKey"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -55,7 +54,7 @@ func (m *NodeIdentity) XXX_Unmarshal(b []byte) error { } func (m *NodeIdentity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -87,13 +86,6 @@ func (m *NodeIdentity) GetNetworkAddress() string { return "" } -func (m *NodeIdentity) GetTendermintNodeID() string { - if m != nil { - return m.TendermintNodeID - } - return "" -} - func (*NodeIdentity) XXX_MessageName() string { return "registry.NodeIdentity" } @@ -106,31 +98,32 @@ func init() { proto.RegisterFile("registry.proto", fileDescriptor_41af05d40a6155 func init() { golang_proto.RegisterFile("registry.proto", fileDescriptor_41af05d40a615591) } var fileDescriptor_41af05d40a615591 = []byte{ - // 286 bytes of a gzipped FileDescriptorProto + // 296 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0x4a, 0x4d, 0xcf, 0x2c, 0x2e, 0x29, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, - 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x7a, 0xc5, 0xc8, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x5a, 0xc0, 0xc4, 0xc5, 0xe3, 0x97, 0x9f, 0x92, 0xea, 0x99, 0x92, 0x9a, 0x57, 0x92, 0x59, 0x52, 0x29, 0x24, 0xc1, 0xc5, 0xee, 0x9b, 0x9f, 0x97, 0x99, 0x9d, 0x5a, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe3, 0x0a, 0xa9, 0x71, 0xf1, 0xf9, 0xa5, 0x96, 0x94, 0xe7, 0x17, 0x65, 0x3b, 0xa6, 0xa4, 0x14, - 0xa5, 0x16, 0x17, 0x4b, 0x30, 0x81, 0x15, 0xa0, 0x89, 0x0a, 0x69, 0x71, 0x09, 0x84, 0xa4, 0xe6, - 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, 0x80, 0xcd, 0x76, 0x91, 0x60, 0x06, 0xab, 0xc4, 0x10, - 0x17, 0x4a, 0xe3, 0x12, 0x0a, 0x4b, 0xcc, 0xc9, 0x4c, 0x49, 0x2c, 0xc9, 0x2f, 0x0a, 0x28, 0x4d, - 0xca, 0xc9, 0x4c, 0xf6, 0x4e, 0xad, 0x94, 0x60, 0x51, 0x60, 0xd4, 0xe0, 0x71, 0x32, 0x3b, 0x71, - 0x4f, 0x9e, 0xe1, 0xd6, 0x3d, 0x79, 0x3d, 0x24, 0x1f, 0x65, 0x54, 0x16, 0xa4, 0x16, 0xe5, 0xa4, - 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x27, 0x95, 0x16, 0x15, 0xe5, 0x97, 0xeb, 0x27, 0x17, 0x55, 0x16, - 0x94, 0xe4, 0xeb, 0xc1, 0x75, 0x07, 0x61, 0x31, 0xd1, 0x8a, 0x65, 0xc6, 0x02, 0x79, 0x06, 0x27, - 0xaf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0xbc, 0xf1, 0x48, 0x8e, 0xf1, 0xc1, 0x23, - 0x39, 0xc6, 0x03, 0x8f, 0xe5, 0x18, 0x4f, 0x3c, 0x96, 0x63, 0x8c, 0x32, 0xc0, 0x6f, 0x47, 0x6a, - 0x45, 0x6a, 0x72, 0x69, 0x49, 0x66, 0x7e, 0x9e, 0x3e, 0x2c, 0x9c, 0x93, 0xd8, 0xc0, 0xe1, 0x67, - 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x7f, 0x46, 0x7f, 0x8a, 0x01, 0x00, 0x00, + 0xa5, 0x16, 0x17, 0x4b, 0x30, 0x81, 0x15, 0xa0, 0x89, 0x0a, 0x25, 0x70, 0x09, 0x84, 0xa4, 0xe6, + 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, 0x80, 0xcd, 0x76, 0x91, 0x60, 0x56, 0x60, 0xd4, 0xe0, + 0x71, 0x32, 0x39, 0x71, 0x4f, 0x9e, 0xe1, 0xd6, 0x3d, 0x79, 0x1d, 0x24, 0x37, 0x66, 0x54, 0x16, + 0xa4, 0x16, 0xe5, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x27, 0x95, 0x16, 0x15, 0xe5, 0x97, 0xeb, + 0x27, 0x17, 0x55, 0x16, 0x94, 0xe4, 0xeb, 0x41, 0xcd, 0x0b, 0xc2, 0x30, 0x4d, 0x28, 0x8d, 0x4b, + 0x28, 0x2c, 0x31, 0x27, 0x33, 0x25, 0xb1, 0x24, 0xbf, 0x28, 0xa0, 0x34, 0x29, 0x27, 0x33, 0xd9, + 0x3b, 0xb5, 0x52, 0x82, 0x05, 0x6c, 0x87, 0x19, 0xd4, 0x0e, 0x3d, 0xa2, 0xec, 0x80, 0xeb, 0x0e, + 0xc2, 0x62, 0xa2, 0x15, 0xcb, 0x8c, 0x05, 0xf2, 0x0c, 0x4e, 0x5e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, + 0x78, 0x24, 0xc7, 0x78, 0xe3, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x07, 0x1e, 0xcb, 0x31, + 0x9e, 0x78, 0x2c, 0xc7, 0x18, 0x65, 0x80, 0xdf, 0x8e, 0xd4, 0x8a, 0xd4, 0xe4, 0xd2, 0x92, 0xcc, + 0xfc, 0x3c, 0x7d, 0x58, 0xec, 0x24, 0xb1, 0x81, 0x43, 0xdd, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, + 0xbe, 0x93, 0xeb, 0x76, 0xc0, 0x01, 0x00, 0x00, } func (m *NodeIdentity) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -138,63 +131,52 @@ func (m *NodeIdentity) Marshal() (dAtA []byte, err error) { } func (m *NodeIdentity) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeIdentity) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size := m.ValidatorPublicKey.Size() - i -= size - if _, err := m.ValidatorPublicKey.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRegistry(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.TendermintNodeID) > 0 { - i -= len(m.TendermintNodeID) - copy(dAtA[i:], m.TendermintNodeID) - i = encodeVarintRegistry(dAtA, i, uint64(len(m.TendermintNodeID))) - i-- - dAtA[i] = 0x1a + if len(m.Moniker) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintRegistry(dAtA, i, uint64(len(m.Moniker))) + i += copy(dAtA[i:], m.Moniker) } if len(m.NetworkAddress) > 0 { - i -= len(m.NetworkAddress) - copy(dAtA[i:], m.NetworkAddress) - i = encodeVarintRegistry(dAtA, i, uint64(len(m.NetworkAddress))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintRegistry(dAtA, i, uint64(len(m.NetworkAddress))) + i += copy(dAtA[i:], m.NetworkAddress) } - if len(m.Moniker) > 0 { - i -= len(m.Moniker) - copy(dAtA[i:], m.Moniker) - i = encodeVarintRegistry(dAtA, i, uint64(len(m.Moniker))) - i-- - dAtA[i] = 0xa + dAtA[i] = 0x1a + i++ + i = encodeVarintRegistry(dAtA, i, uint64(m.TendermintNodeID.Size())) + n1, err := m.TendermintNodeID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - return len(dAtA) - i, nil + i += n1 + dAtA[i] = 0x22 + i++ + i = encodeVarintRegistry(dAtA, i, uint64(m.ValidatorPublicKey.Size())) + n2, err := m.ValidatorPublicKey.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func encodeVarintRegistry(dAtA []byte, offset int, v uint64) int { - offset -= sovRegistry(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *NodeIdentity) Size() (n int) { if m == nil { @@ -210,10 +192,8 @@ func (m *NodeIdentity) Size() (n int) { if l > 0 { n += 1 + l + sovRegistry(uint64(l)) } - l = len(m.TendermintNodeID) - if l > 0 { - n += 1 + l + sovRegistry(uint64(l)) - } + l = m.TendermintNodeID.Size() + n += 1 + l + sovRegistry(uint64(l)) l = m.ValidatorPublicKey.Size() n += 1 + l + sovRegistry(uint64(l)) if m.XXX_unrecognized != nil { @@ -223,7 +203,14 @@ func (m *NodeIdentity) Size() (n int) { } func sovRegistry(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozRegistry(x uint64) (n int) { return sovRegistry(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -325,7 +312,7 @@ func (m *NodeIdentity) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TendermintNodeID", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegistry @@ -335,23 +322,24 @@ func (m *NodeIdentity) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthRegistry } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthRegistry } if postIndex > l { return io.ErrUnexpectedEOF } - m.TendermintNodeID = string(dAtA[iNdEx:postIndex]) + if err := m.TendermintNodeID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 4: if wireType != 2 { diff --git a/execution/registry/registry_test.go b/execution/registry/registry_test.go index beb8a3fd1..3fe5a5eb8 100644 --- a/execution/registry/registry_test.go +++ b/execution/registry/registry_test.go @@ -13,7 +13,7 @@ import ( func TestEncodeProtobuf(t *testing.T) { entry := &NodeIdentity{ Moniker: "test", - TendermintNodeID: "123456789", + TendermintNodeID: crypto.Address{}, ValidatorPublicKey: crypto.PublicKey{ CurveType: crypto.CurveTypeEd25519, PublicKey: binary.HexBytes{1, 2, 3, 4, 5}, diff --git a/execution/state/registry.go b/execution/state/registry.go index ca03ea296..6a31c51b2 100644 --- a/execution/state/registry.go +++ b/execution/state/registry.go @@ -6,25 +6,35 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/encoding" "github.com/hyperledger/burrow/execution/registry" + "github.com/hyperledger/burrow/storage" ) var _ registry.IterableReader = &State{} -func (s *ReadState) GetNode(addr crypto.Address) (*registry.NodeIdentity, error) { - tree, err := s.Forest.Reader(keys.Registry.Prefix()) +func getNode(forest storage.ForestReader, id crypto.Address) (*registry.NodeIdentity, error) { + tree, err := forest.Reader(keys.Registry.Prefix()) if err != nil { return nil, err } - nodeBytes := tree.Get(keys.Registry.KeyNoPrefix(addr)) + nodeBytes := tree.Get(keys.Registry.KeyNoPrefix(id)) if nodeBytes == nil { return nil, nil } regNode := new(registry.NodeIdentity) return regNode, encoding.Decode(nodeBytes, regNode) + +} + +func (s *ReadState) GetNodeByID(id crypto.Address) (*registry.NodeIdentity, error) { + return getNode(s.Forest, id) } -func (ws *writeState) UpdateNode(addr crypto.Address, node *registry.NodeIdentity) error { +func (s *State) GetNodeIDsByAddress(net string) ([]crypto.Address, error) { + return s.writeState.nodeStats.GetAddresses(net), nil +} + +func (ws *writeState) UpdateNode(id crypto.Address, node *registry.NodeIdentity) error { if node == nil { return fmt.Errorf("RegisterNode passed nil node in State") } @@ -38,19 +48,30 @@ func (ws *writeState) UpdateNode(addr crypto.Address, node *registry.NodeIdentit return err } - ws.nodeList[addr] = node - tree.Set(keys.Registry.KeyNoPrefix(addr), bs) + prev, err := getNode(ws.forest, id) + if err != nil { + return err + } + + ws.nodeStats.Remove(prev) + ws.nodeStats.Insert(node.GetNetworkAddress(), id) + tree.Set(keys.Registry.KeyNoPrefix(id), bs) return nil } -func (ws *writeState) RemoveNode(addr crypto.Address) error { +func (ws *writeState) RemoveNode(id crypto.Address) error { tree, err := ws.forest.Writer(keys.Registry.Prefix()) if err != nil { return err } - delete(ws.nodeList, addr) - tree.Delete(keys.Registry.KeyNoPrefix(addr)) + prev, err := getNode(ws.forest, id) + if err != nil { + return err + } + + ws.nodeStats.Remove(prev) + tree.Delete(keys.Registry.KeyNoPrefix(id)) return nil } @@ -73,6 +94,6 @@ func (s *ReadState) IterateNodes(consumer func(crypto.Address, *registry.NodeIde }) } -func (s *State) GetNodes() registry.NodeList { - return s.writeState.nodeList +func (s *State) GetNumPeers() int { + return len(s.writeState.nodeStats.Addresses) } diff --git a/execution/state/state.go b/execution/state/state.go index 06d64a8a4..930a1378e 100644 --- a/execution/state/state.go +++ b/execution/state/state.go @@ -111,9 +111,9 @@ type Updatable interface { type writeState struct { forest *storage.MutableForest plain *storage.PrefixDB - accountStats acmstate.AccountStats - nodeList registry.NodeList ring *validator.Ring + accountStats acmstate.AccountStats + nodeStats registry.NodeStats } type ReadState struct { @@ -148,10 +148,10 @@ func NewState(db dbm.DB) *State { History: ring, }, writeState: writeState{ - forest: forest, - plain: plain, - ring: ring, - nodeList: make(registry.NodeList), + forest: forest, + plain: plain, + ring: ring, + nodeStats: registry.NewNodeStats(), }, logger: logging.NewNoopLogger(), } @@ -215,7 +215,7 @@ func LoadState(db dbm.DB, version int64) (*State, error) { return nil, err } - err = s.loadNodeList() + err = s.loadNodeStats() if err != nil { return nil, err } @@ -242,10 +242,9 @@ func (s *State) loadAccountStats() error { }) } -func (s *State) loadNodeList() error { - s.writeState.nodeList = make(registry.NodeList) - return s.IterateNodes(func(addr crypto.Address, node *registry.NodeIdentity) error { - s.writeState.nodeList[addr] = node +func (s *State) loadNodeStats() error { + return s.IterateNodes(func(id crypto.Address, node *registry.NodeIdentity) error { + s.writeState.nodeStats.Addresses[node.GetNetworkAddress()][id] = struct{}{} return nil }) } diff --git a/genesis/spec/spec.pb.go b/genesis/spec/spec.pb.go index 7d079ef8d..6afe7cc50 100644 --- a/genesis/spec/spec.pb.go +++ b/genesis/spec/spec.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -52,7 +51,7 @@ func (m *TemplateAccount) XXX_Unmarshal(b []byte) error { } func (m *TemplateAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -149,7 +148,7 @@ var fileDescriptor_423806180556987f = []byte{ func (m *TemplateAccount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -157,107 +156,102 @@ func (m *TemplateAccount) Marshal() (dAtA []byte, err error) { } func (m *TemplateAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TemplateAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Code != nil { - { - size := m.Code.Size() - i -= size - if _, err := m.Code.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintSpec(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintSpec(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } - if len(m.Roles) > 0 { - for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Roles[iNdEx]) - copy(dAtA[i:], m.Roles[iNdEx]) - i = encodeVarintSpec(dAtA, i, uint64(len(m.Roles[iNdEx]))) - i-- - dAtA[i] = 0x32 + if m.Address != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintSpec(dAtA, i, uint64(m.Address.Size())) + n1, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n1 } - if len(m.Permissions) > 0 { - for iNdEx := len(m.Permissions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Permissions[iNdEx]) - copy(dAtA[i:], m.Permissions[iNdEx]) - i = encodeVarintSpec(dAtA, i, uint64(len(m.Permissions[iNdEx]))) - i-- - dAtA[i] = 0x2a + if m.PublicKey != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintSpec(dAtA, i, uint64(m.PublicKey.Size())) + n2, err := m.PublicKey.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n2 } if len(m.Amounts) > 0 { - for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpec(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.Amounts { dAtA[i] = 0x22 - } - } - if m.PublicKey != nil { - { - size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + i++ + i = encodeVarintSpec(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i -= size - i = encodeVarintSpec(dAtA, i, uint64(size)) + i += n } - i-- - dAtA[i] = 0x1a } - if m.Address != nil { - { - size := m.Address.Size() - i -= size - if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintSpec(dAtA, i, uint64(size)) + if len(m.Permissions) > 0 { + for _, s := range m.Permissions { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } - i-- - dAtA[i] = 0x12 } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintSpec(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa + if len(m.Roles) > 0 { + for _, s := range m.Roles { + dAtA[i] = 0x32 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return len(dAtA) - i, nil + if m.Code != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintSpec(dAtA, i, uint64(m.Code.Size())) + n3, err := m.Code.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func encodeVarintSpec(dAtA []byte, offset int, v uint64) int { - offset -= sovSpec(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *TemplateAccount) Size() (n int) { if m == nil { @@ -306,7 +300,14 @@ func (m *TemplateAccount) Size() (n int) { } func sovSpec(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozSpec(x uint64) (n int) { return sovSpec(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/integration/governance/identify_test.go b/integration/governance/identify_test.go index d24dcd853..272b28e1b 100644 --- a/integration/governance/identify_test.go +++ b/integration/governance/identify_test.go @@ -109,10 +109,12 @@ func nodeFromConf(t *testing.T, conf *config.BurrowConfig, host string, val cryp require.NoError(t, err) nodeKey, err := tendermint.EnsureNodeKey(tmConf.NodeKeyFile()) require.NoError(t, err) + addr, err := crypto.AddressFromHexString(string(nodeKey.ID())) + require.NoError(t, err) return ®istry.NodeIdentity{ - ValidatorPublicKey: val.GetPublicKey(), Moniker: conf.Tendermint.Moniker, NetworkAddress: host, - TendermintNodeID: string(nodeKey.ID()), + TendermintNodeID: addr, + ValidatorPublicKey: val.GetPublicKey(), } } diff --git a/keys/keys.pb.go b/keys/keys.pb.go index 7458fbb32..e0ae261fb 100644 --- a/keys/keys.pb.go +++ b/keys/keys.pb.go @@ -7,15 +7,12 @@ import ( context "context" fmt "fmt" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" crypto "github.com/hyperledger/burrow/crypto" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -1346,44 +1343,6 @@ type KeysServer interface { AddName(context.Context, *AddNameRequest) (*AddNameResponse, error) } -// UnimplementedKeysServer can be embedded to have forward compatible implementations. -type UnimplementedKeysServer struct { -} - -func (*UnimplementedKeysServer) GenerateKey(ctx context.Context, req *GenRequest) (*GenResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GenerateKey not implemented") -} -func (*UnimplementedKeysServer) PublicKey(ctx context.Context, req *PubRequest) (*PubResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PublicKey not implemented") -} -func (*UnimplementedKeysServer) Sign(ctx context.Context, req *SignRequest) (*SignResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented") -} -func (*UnimplementedKeysServer) Verify(ctx context.Context, req *VerifyRequest) (*VerifyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") -} -func (*UnimplementedKeysServer) Import(ctx context.Context, req *ImportRequest) (*ImportResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Import not implemented") -} -func (*UnimplementedKeysServer) ImportJSON(ctx context.Context, req *ImportJSONRequest) (*ImportResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImportJSON not implemented") -} -func (*UnimplementedKeysServer) Export(ctx context.Context, req *ExportRequest) (*ExportResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") -} -func (*UnimplementedKeysServer) Hash(ctx context.Context, req *HashRequest) (*HashResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Hash not implemented") -} -func (*UnimplementedKeysServer) RemoveName(ctx context.Context, req *RemoveNameRequest) (*RemoveNameResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveName not implemented") -} -func (*UnimplementedKeysServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") -} -func (*UnimplementedKeysServer) AddName(ctx context.Context, req *AddNameRequest) (*AddNameResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddName not implemented") -} - func RegisterKeysServer(s *grpc.Server, srv KeysServer) { s.RegisterService(&_Keys_serviceDesc, srv) } @@ -2068,7 +2027,14 @@ func (m *AddNameRequest) Size() (n int) { } func sovKeys(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozKeys(x uint64) (n int) { return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/permission/permission.pb.go b/permission/permission.pb.go index c811523a4..b91f0d764 100644 --- a/permission/permission.pb.go +++ b/permission/permission.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -47,7 +46,7 @@ func (m *AccountPermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_AccountPermissions.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -103,7 +102,7 @@ func (m *BasePermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_BasePermissions.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -166,7 +165,7 @@ func (m *PermArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PermArgs.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -258,7 +257,7 @@ var fileDescriptor_c837ef01cbda0ad8 = []byte{ func (m *AccountPermissions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -266,45 +265,43 @@ func (m *AccountPermissions) Marshal() (dAtA []byte, err error) { } func (m *AccountPermissions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountPermissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0xa + i++ + i = encodeVarintPermission(dAtA, i, uint64(m.Base.Size())) + n1, err := m.Base.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n1 if len(m.Roles) > 0 { - for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Roles[iNdEx]) - copy(dAtA[i:], m.Roles[iNdEx]) - i = encodeVarintPermission(dAtA, i, uint64(len(m.Roles[iNdEx]))) - i-- + for _, s := range m.Roles { dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - { - size, err := m.Base.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPermission(dAtA, i, uint64(size)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return i, nil } func (m *BasePermissions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -312,32 +309,26 @@ func (m *BasePermissions) Marshal() (dAtA []byte, err error) { } func (m *BasePermissions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BasePermissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintPermission(dAtA, i, uint64(m.Perms)) + dAtA[i] = 0x10 + i++ + i = encodeVarintPermission(dAtA, i, uint64(m.SetBit)) if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + i += copy(dAtA[i:], m.XXX_unrecognized) } - i = encodeVarintPermission(dAtA, i, uint64(m.SetBit)) - i-- - dAtA[i] = 0x10 - i = encodeVarintPermission(dAtA, i, uint64(m.Perms)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil + return i, nil } func (m *PermArgs) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -345,65 +336,55 @@ func (m *PermArgs) Marshal() (dAtA []byte, err error) { } func (m *PermArgs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PermArgs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.Value != nil { - i-- - if *m.Value { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + dAtA[i] = 0x8 + i++ + i = encodeVarintPermission(dAtA, i, uint64(m.Action)) + if m.Target != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintPermission(dAtA, i, uint64(m.Target.Size())) + n2, err := m.Target.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x28 - } - if m.Role != nil { - i -= len(*m.Role) - copy(dAtA[i:], *m.Role) - i = encodeVarintPermission(dAtA, i, uint64(len(*m.Role))) - i-- - dAtA[i] = 0x22 + i += n2 } if m.Permission != nil { - i = encodeVarintPermission(dAtA, i, uint64(*m.Permission)) - i-- dAtA[i] = 0x18 + i++ + i = encodeVarintPermission(dAtA, i, uint64(*m.Permission)) } - if m.Target != nil { - { - size := m.Target.Size() - i -= size - if _, err := m.Target.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPermission(dAtA, i, uint64(size)) + if m.Role != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintPermission(dAtA, i, uint64(len(*m.Role))) + i += copy(dAtA[i:], *m.Role) + } + if m.Value != nil { + dAtA[i] = 0x28 + i++ + if *m.Value { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i-- - dAtA[i] = 0x12 + i++ } - i = encodeVarintPermission(dAtA, i, uint64(m.Action)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil + return i, nil } func encodeVarintPermission(dAtA []byte, offset int, v uint64) int { - offset -= sovPermission(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *AccountPermissions) Size() (n int) { if m == nil { @@ -464,7 +445,14 @@ func (m *PermArgs) Size() (n int) { } func sovPermission(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozPermission(x uint64) (n int) { return sovPermission(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/protobuf/registry.proto b/protobuf/registry.proto index 684208f4f..e80902beb 100644 --- a/protobuf/registry.proto +++ b/protobuf/registry.proto @@ -28,9 +28,8 @@ message NodeIdentity { // Peer network address string NetworkAddress = 2; // The Tendermint p2p node ID - string TendermintNodeID = 3; - // The public key that this node will validate with if it becomes a validator (use this to create a binding between - // p2p node ID and validator) + bytes TendermintNodeID = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; + // The public key that this node will validate with if it becomes a validator + // (use this to create a binding between p2p node ID and validator) bytes ValidatorPublicKey = 4 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.PublicKey", (gogoproto.nullable) = false]; -} - +} \ No newline at end of file diff --git a/rpc/rpc.pb.go b/rpc/rpc.pb.go index 4e387f401..ab323d8ec 100644 --- a/rpc/rpc.pb.go +++ b/rpc/rpc.pb.go @@ -6,7 +6,6 @@ package rpc import ( fmt "fmt" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -197,7 +196,14 @@ func (m *ResultStatus) Size() (n int) { } func sovRpc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozRpc(x uint64) (n int) { return sovRpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/rpc/rpcdump/rpcdump.pb.go b/rpc/rpcdump/rpcdump.pb.go index 34bb4554b..7173c173b 100644 --- a/rpc/rpcdump/rpcdump.pb.go +++ b/rpc/rpcdump/rpcdump.pb.go @@ -7,15 +7,12 @@ import ( context "context" fmt "fmt" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" dump "github.com/hyperledger/burrow/dump" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -156,14 +153,6 @@ type DumpServer interface { GetDump(*GetDumpParam, Dump_GetDumpServer) error } -// UnimplementedDumpServer can be embedded to have forward compatible implementations. -type UnimplementedDumpServer struct { -} - -func (*UnimplementedDumpServer) GetDump(req *GetDumpParam, srv Dump_GetDumpServer) error { - return status.Errorf(codes.Unimplemented, "method GetDump not implemented") -} - func RegisterDumpServer(s *grpc.Server, srv DumpServer) { s.RegisterService(&_Dump_serviceDesc, srv) } @@ -219,7 +208,14 @@ func (m *GetDumpParam) Size() (n int) { } func sovRpcdump(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozRpcdump(x uint64) (n int) { return sovRpcdump(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/rpc/rpcevents/rpcevents.pb.go b/rpc/rpcevents/rpcevents.pb.go index 6fb8d7c4e..ea0229c54 100644 --- a/rpc/rpcevents/rpcevents.pb.go +++ b/rpc/rpcevents/rpcevents.pb.go @@ -8,7 +8,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -16,8 +15,6 @@ import ( github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" exec "github.com/hyperledger/burrow/execution/exec" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -95,7 +92,7 @@ func (m *GetBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_GetBlockRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -156,7 +153,7 @@ func (m *TxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TxRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -243,7 +240,7 @@ func (m *BlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_BlocksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -302,7 +299,7 @@ func (m *EventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_EventsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -362,7 +359,7 @@ func (m *GetTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_GetTxsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -428,7 +425,7 @@ func (m *GetTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_GetTxsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -487,7 +484,7 @@ func (m *Bound) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Bound.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -552,7 +549,7 @@ func (m *BlockRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BlockRange.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -766,20 +763,6 @@ type ExecutionEventsServer interface { Events(*BlocksRequest, ExecutionEvents_EventsServer) error } -// UnimplementedExecutionEventsServer can be embedded to have forward compatible implementations. -type UnimplementedExecutionEventsServer struct { -} - -func (*UnimplementedExecutionEventsServer) Stream(req *BlocksRequest, srv ExecutionEvents_StreamServer) error { - return status.Errorf(codes.Unimplemented, "method Stream not implemented") -} -func (*UnimplementedExecutionEventsServer) Tx(ctx context.Context, req *TxRequest) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method Tx not implemented") -} -func (*UnimplementedExecutionEventsServer) Events(req *BlocksRequest, srv ExecutionEvents_EventsServer) error { - return status.Errorf(codes.Unimplemented, "method Events not implemented") -} - func RegisterExecutionEventsServer(s *grpc.Server, srv ExecutionEventsServer) { s.RegisterService(&_ExecutionEvents_serviceDesc, srv) } @@ -871,7 +854,7 @@ var _ExecutionEvents_serviceDesc = grpc.ServiceDesc{ func (m *GetBlockRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -879,41 +862,35 @@ func (m *GetBlockRequest) Marshal() (dAtA []byte, err error) { } func (m *GetBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) } if m.Wait { - i-- + dAtA[i] = 0x10 + i++ if m.Wait { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x10 + i++ } - if m.Height != 0 { - i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TxRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -921,46 +898,38 @@ func (m *TxRequest) Marshal() (dAtA []byte, err error) { } func (m *TxRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0xa + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(m.TxHash.Size())) + n1, err := m.TxHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n1 if m.Wait { - i-- + dAtA[i] = 0x10 + i++ if m.Wait { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x10 + i++ } - { - size := m.TxHash.Size() - i -= size - if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRpcevents(dAtA, i, uint64(size)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return i, nil } func (m *BlocksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -968,45 +937,36 @@ func (m *BlocksRequest) Marshal() (dAtA []byte, err error) { } func (m *BlocksRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlocksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.BlockRange != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(m.BlockRange.Size())) + n2, err := m.BlockRange.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 } if len(m.Query) > 0 { - i -= len(m.Query) - copy(dAtA[i:], m.Query) - i = encodeVarintRpcevents(dAtA, i, uint64(len(m.Query))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(len(m.Query))) + i += copy(dAtA[i:], m.Query) } - if m.BlockRange != nil { - { - size, err := m.BlockRange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpcevents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *EventsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1014,45 +974,37 @@ func (m *EventsResponse) Marshal() (dAtA []byte, err error) { } func (m *EventsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) } if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpcevents(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.Events { dAtA[i] = 0x12 + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - if m.Height != 0 { - i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *GetTxsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1060,43 +1012,36 @@ func (m *GetTxsRequest) Marshal() (dAtA []byte, err error) { } func (m *GetTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Query) > 0 { - i -= len(m.Query) - copy(dAtA[i:], m.Query) - i = encodeVarintRpcevents(dAtA, i, uint64(len(m.Query))) - i-- - dAtA[i] = 0x1a + if m.StartHeight != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(m.StartHeight)) } if m.EndHeight != 0 { - i = encodeVarintRpcevents(dAtA, i, uint64(m.EndHeight)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(m.EndHeight)) } - if m.StartHeight != 0 { - i = encodeVarintRpcevents(dAtA, i, uint64(m.StartHeight)) - i-- - dAtA[i] = 0x8 + if len(m.Query) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(len(m.Query))) + i += copy(dAtA[i:], m.Query) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *GetTxsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1104,45 +1049,37 @@ func (m *GetTxsResponse) Marshal() (dAtA []byte, err error) { } func (m *GetTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) } if len(m.TxExecutions) > 0 { - for iNdEx := len(m.TxExecutions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TxExecutions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpcevents(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.TxExecutions { dAtA[i] = 0x12 + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - if m.Height != 0 { - i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *Bound) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1150,36 +1087,30 @@ func (m *Bound) Marshal() (dAtA []byte, err error) { } func (m *Bound) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Bound) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Type != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(m.Type)) } if m.Index != 0 { - i = encodeVarintRpcevents(dAtA, i, uint64(m.Index)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(m.Index)) } - if m.Type != 0 { - i = encodeVarintRpcevents(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *BlockRange) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1187,56 +1118,44 @@ func (m *BlockRange) Marshal() (dAtA []byte, err error) { } func (m *BlockRange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Start != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(m.Start.Size())) + n3, err := m.Start.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 } if m.End != nil { - { - size, err := m.End.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpcevents(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x12 - } - if m.Start != nil { - { - size, err := m.Start.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpcevents(dAtA, i, uint64(size)) + i++ + i = encodeVarintRpcevents(dAtA, i, uint64(m.End.Size())) + n4, err := m.End.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n4 } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func encodeVarintRpcevents(dAtA []byte, offset int, v uint64) int { - offset -= sovRpcevents(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *GetBlockRequest) Size() (n int) { if m == nil { @@ -1396,7 +1315,14 @@ func (m *BlockRange) Size() (n int) { } func sovRpcevents(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozRpcevents(x uint64) (n int) { return sovRpcevents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/rpc/rpcquery/query_server.go b/rpc/rpcquery/query_server.go index 29aa47500..f67ff58b5 100644 --- a/rpc/rpcquery/query_server.go +++ b/rpc/rpcquery/query_server.go @@ -209,9 +209,9 @@ func (qs *queryServer) GetValidatorSetHistory(ctx context.Context, param *GetVal func (qs *queryServer) GetNetworkRegistry(ctx context.Context, param *GetNetworkRegistryParam) (*NetworkRegistry, error) { rv := make([]*RegisteredValidator, 0) - err := qs.nodeReg.IterateNodes(func(val crypto.Address, rn *registry.NodeIdentity) error { + err := qs.nodeReg.IterateNodes(func(id crypto.Address, rn *registry.NodeIdentity) error { rv = append(rv, &RegisteredValidator{ - Address: val, + Address: rn.ValidatorPublicKey.GetAddress(), Node: rn, }) return nil diff --git a/rpc/rpcquery/rpcquery.pb.go b/rpc/rpcquery/rpcquery.pb.go index 25463b4aa..9fb19dcdb 100644 --- a/rpc/rpcquery/rpcquery.pb.go +++ b/rpc/rpcquery/rpcquery.pb.go @@ -7,7 +7,6 @@ import ( context "context" fmt "fmt" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -22,8 +21,6 @@ import ( payload "github.com/hyperledger/burrow/txs/payload" types "github.com/tendermint/tendermint/abci/types" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -1316,53 +1313,6 @@ type QueryServer interface { GetBlockHeader(context.Context, *GetBlockParam) (*types.Header, error) } -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Status(ctx context.Context, req *StatusParam) (*rpc.ResultStatus, error) { - return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") -} -func (*UnimplementedQueryServer) GetAccount(ctx context.Context, req *GetAccountParam) (*acm.Account, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") -} -func (*UnimplementedQueryServer) GetMetadata(ctx context.Context, req *GetMetadataParam) (*MetadataResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented") -} -func (*UnimplementedQueryServer) GetStorage(ctx context.Context, req *GetStorageParam) (*StorageValue, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStorage not implemented") -} -func (*UnimplementedQueryServer) ListAccounts(req *ListAccountsParam, srv Query_ListAccountsServer) error { - return status.Errorf(codes.Unimplemented, "method ListAccounts not implemented") -} -func (*UnimplementedQueryServer) GetName(ctx context.Context, req *GetNameParam) (*names.Entry, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetName not implemented") -} -func (*UnimplementedQueryServer) ListNames(req *ListNamesParam, srv Query_ListNamesServer) error { - return status.Errorf(codes.Unimplemented, "method ListNames not implemented") -} -func (*UnimplementedQueryServer) GetNetworkRegistry(ctx context.Context, req *GetNetworkRegistryParam) (*NetworkRegistry, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNetworkRegistry not implemented") -} -func (*UnimplementedQueryServer) GetValidatorSet(ctx context.Context, req *GetValidatorSetParam) (*ValidatorSet, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSet not implemented") -} -func (*UnimplementedQueryServer) GetValidatorSetHistory(ctx context.Context, req *GetValidatorSetHistoryParam) (*ValidatorSetHistory, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSetHistory not implemented") -} -func (*UnimplementedQueryServer) GetProposal(ctx context.Context, req *GetProposalParam) (*payload.Ballot, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetProposal not implemented") -} -func (*UnimplementedQueryServer) ListProposals(req *ListProposalsParam, srv Query_ListProposalsServer) error { - return status.Errorf(codes.Unimplemented, "method ListProposals not implemented") -} -func (*UnimplementedQueryServer) GetStats(ctx context.Context, req *GetStatsParam) (*Stats, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") -} -func (*UnimplementedQueryServer) GetBlockHeader(ctx context.Context, req *GetBlockParam) (*types.Header, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeader not implemented") -} - func RegisterQueryServer(s *grpc.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } @@ -2056,7 +2006,14 @@ func (m *GetBlockParam) Size() (n int) { } func sovRpcquery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozRpcquery(x uint64) (n int) { return sovRpcquery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/rpc/rpctransact/rpctransact.pb.go b/rpc/rpctransact/rpctransact.pb.go index 0704cdac3..817bdf70a 100644 --- a/rpc/rpctransact/rpctransact.pb.go +++ b/rpc/rpctransact/rpctransact.pb.go @@ -8,7 +8,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" time "time" _ "github.com/gogo/protobuf/gogoproto" @@ -22,8 +21,6 @@ import ( txs "github.com/hyperledger/burrow/txs" payload "github.com/hyperledger/burrow/txs/payload" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -62,7 +59,7 @@ func (m *CallCodeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_CallCodeParam.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -120,7 +117,7 @@ func (m *TxEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TxEnvelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -171,7 +168,7 @@ func (m *TxEnvelopeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_TxEnvelopeParam.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -444,47 +441,6 @@ type TransactServer interface { NameTxAsync(context.Context, *payload.NameTx) (*txs.Receipt, error) } -// UnimplementedTransactServer can be embedded to have forward compatible implementations. -type UnimplementedTransactServer struct { -} - -func (*UnimplementedTransactServer) BroadcastTxSync(ctx context.Context, req *TxEnvelopeParam) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method BroadcastTxSync not implemented") -} -func (*UnimplementedTransactServer) BroadcastTxAsync(ctx context.Context, req *TxEnvelopeParam) (*txs.Receipt, error) { - return nil, status.Errorf(codes.Unimplemented, "method BroadcastTxAsync not implemented") -} -func (*UnimplementedTransactServer) SignTx(ctx context.Context, req *TxEnvelopeParam) (*TxEnvelope, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignTx not implemented") -} -func (*UnimplementedTransactServer) FormulateTx(ctx context.Context, req *payload.Any) (*TxEnvelope, error) { - return nil, status.Errorf(codes.Unimplemented, "method FormulateTx not implemented") -} -func (*UnimplementedTransactServer) CallTxSync(ctx context.Context, req *payload.CallTx) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallTxSync not implemented") -} -func (*UnimplementedTransactServer) CallTxAsync(ctx context.Context, req *payload.CallTx) (*txs.Receipt, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallTxAsync not implemented") -} -func (*UnimplementedTransactServer) CallTxSim(ctx context.Context, req *payload.CallTx) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallTxSim not implemented") -} -func (*UnimplementedTransactServer) CallCodeSim(ctx context.Context, req *CallCodeParam) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallCodeSim not implemented") -} -func (*UnimplementedTransactServer) SendTxSync(ctx context.Context, req *payload.SendTx) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendTxSync not implemented") -} -func (*UnimplementedTransactServer) SendTxAsync(ctx context.Context, req *payload.SendTx) (*txs.Receipt, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendTxAsync not implemented") -} -func (*UnimplementedTransactServer) NameTxSync(ctx context.Context, req *payload.NameTx) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method NameTxSync not implemented") -} -func (*UnimplementedTransactServer) NameTxAsync(ctx context.Context, req *payload.NameTx) (*txs.Receipt, error) { - return nil, status.Errorf(codes.Unimplemented, "method NameTxAsync not implemented") -} - func RegisterTransactServer(s *grpc.Server, srv TransactServer) { s.RegisterService(&_Transact_serviceDesc, srv) } @@ -765,7 +721,7 @@ var _Transact_serviceDesc = grpc.ServiceDesc{ func (m *CallCodeParam) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -773,50 +729,40 @@ func (m *CallCodeParam) Marshal() (dAtA []byte, err error) { } func (m *CallCodeParam) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CallCodeParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintRpctransact(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x1a + dAtA[i] = 0xa + i++ + i = encodeVarintRpctransact(dAtA, i, uint64(m.FromAddress.Size())) + n1, err := m.FromAddress.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n1 if len(m.Code) > 0 { - i -= len(m.Code) - copy(dAtA[i:], m.Code) - i = encodeVarintRpctransact(dAtA, i, uint64(len(m.Code))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintRpctransact(dAtA, i, uint64(len(m.Code))) + i += copy(dAtA[i:], m.Code) } - { - size := m.FromAddress.Size() - i -= size - if _, err := m.FromAddress.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRpctransact(dAtA, i, uint64(size)) + if len(m.Data) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintRpctransact(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TxEnvelope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -824,38 +770,30 @@ func (m *TxEnvelope) Marshal() (dAtA []byte, err error) { } func (m *TxEnvelope) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxEnvelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if m.Envelope != nil { - { - size := m.Envelope.Size() - i -= size - if _, err := m.Envelope.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRpctransact(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0xa + i++ + i = encodeVarintRpctransact(dAtA, i, uint64(m.Envelope.Size())) + n2, err := m.Envelope.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TxEnvelopeParam) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -863,64 +801,52 @@ func (m *TxEnvelopeParam) Marshal() (dAtA []byte, err error) { } func (m *TxEnvelopeParam) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxEnvelopeParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Timeout, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout):]) - if err2 != nil { - return 0, err2 + if m.Envelope != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintRpctransact(dAtA, i, uint64(m.Envelope.Size())) + n3, err := m.Envelope.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 } - i -= n2 - i = encodeVarintRpctransact(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x1a if m.Payload != nil { - { - size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpctransact(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x12 - } - if m.Envelope != nil { - { - size := m.Envelope.Size() - i -= size - if _, err := m.Envelope.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRpctransact(dAtA, i, uint64(size)) + i++ + i = encodeVarintRpctransact(dAtA, i, uint64(m.Payload.Size())) + n4, err := m.Payload.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n4 } - return len(dAtA) - i, nil + dAtA[i] = 0x1a + i++ + i = encodeVarintRpctransact(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout))) + n5, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Timeout, dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func encodeVarintRpctransact(dAtA []byte, offset int, v uint64) int { - offset -= sovRpctransact(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *CallCodeParam) Size() (n int) { if m == nil { @@ -983,7 +909,14 @@ func (m *TxEnvelopeParam) Size() (n int) { } func sovRpctransact(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozRpctransact(x uint64) (n int) { return sovRpctransact(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/rpc/service.go b/rpc/service.go index 12263d913..a95765d41 100644 --- a/rpc/service.go +++ b/rpc/service.go @@ -156,9 +156,9 @@ func (s *Service) NetworkRegistry() ([]*ResultNetworkRegistry, error) { } rnr := make([]*ResultNetworkRegistry, 0) - err := s.nodeReg.IterateNodes(func(val crypto.Address, rn *registry.NodeIdentity) error { + err := s.nodeReg.IterateNodes(func(id crypto.Address, rn *registry.NodeIdentity) error { rnr = append(rnr, &ResultNetworkRegistry{ - Address: val, + Address: rn.ValidatorPublicKey.GetAddress(), NodeIdentity: *rn, }) return nil diff --git a/storage/storage.pb.go b/storage/storage.pb.go index 0f6f881ca..3bbe1d8a1 100644 --- a/storage/storage.pb.go +++ b/storage/storage.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -46,7 +45,7 @@ func (m *CommitID) XXX_Unmarshal(b []byte) error { } func (m *CommitID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -108,7 +107,7 @@ var fileDescriptor_0d2c4ccf1453ffdb = []byte{ func (m *CommitID) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -116,44 +115,35 @@ func (m *CommitID) Marshal() (dAtA []byte, err error) { } func (m *CommitID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Version != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Version)) } if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintStorage(dAtA, i, uint64(len(m.Hash))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(m.Hash))) + i += copy(dAtA[i:], m.Hash) } - if m.Version != 0 { - i = encodeVarintStorage(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x8 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func encodeVarintStorage(dAtA []byte, offset int, v uint64) int { - offset -= sovStorage(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *CommitID) Size() (n int) { if m == nil { @@ -175,7 +165,14 @@ func (m *CommitID) Size() (n int) { } func sovStorage(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozStorage(x uint64) (n int) { return sovStorage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/txs/payload/payload.pb.go b/txs/payload/payload.pb.go index 29273c6bf..2f57f5883 100644 --- a/txs/payload/payload.pb.go +++ b/txs/payload/payload.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -91,7 +90,7 @@ func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Any.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -211,7 +210,7 @@ func (m *TxInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TxInput.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -272,7 +271,7 @@ func (m *TxOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TxOutput.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -338,7 +337,7 @@ func (m *CallTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CallTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -418,7 +417,7 @@ func (m *ContractMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ContractMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -472,7 +471,7 @@ func (m *SendTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_SendTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -519,7 +518,7 @@ func (m *PermsTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PermsTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -584,7 +583,7 @@ func (m *NameTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_NameTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -656,7 +655,7 @@ func (m *BondTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BondTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -701,7 +700,7 @@ func (m *UnbondTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UnbondTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -745,7 +744,7 @@ func (m *GovTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_GovTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -791,7 +790,7 @@ func (m *ProposalTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_ProposalTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -837,7 +836,7 @@ func (m *IdentifyTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_IdentifyTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -881,7 +880,7 @@ func (m *BatchTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BatchTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -925,7 +924,7 @@ func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Vote.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -970,7 +969,7 @@ func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1017,7 +1016,7 @@ func (m *Ballot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Ballot.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -1178,7 +1177,7 @@ var fileDescriptor_678c914f1bee6d56 = []byte{ func (m *Any) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1186,146 +1185,120 @@ func (m *Any) Marshal() (dAtA []byte, err error) { } func (m *Any) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Any) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.CallTx != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.CallTx.Size())) + n1, err := m.CallTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 } - if m.IdentifyTx != nil { - { - size, err := m.IdentifyTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.SendTx != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.SendTx.Size())) + n2, err := m.SendTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x52 + i += n2 } - if m.ProposalTx != nil { - { - size, err := m.ProposalTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.NameTx != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.NameTx.Size())) + n3, err := m.NameTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x4a + i += n3 } - if m.BatchTx != nil { - { - size, err := m.BatchTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.PermsTx != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.PermsTx.Size())) + n4, err := m.PermsTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x42 + i += n4 } - if m.UnbondTx != nil { - { - size, err := m.UnbondTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.GovTx != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.GovTx.Size())) + n5, err := m.GovTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i += n5 } if m.BondTx != nil { - { - size, err := m.BondTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x32 - } - if m.GovTx != nil { - { - size, err := m.GovTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.BondTx.Size())) + n6, err := m.BondTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i += n6 } - if m.PermsTx != nil { - { - size, err := m.PermsTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.UnbondTx != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.UnbondTx.Size())) + n7, err := m.UnbondTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i += n7 } - if m.NameTx != nil { - { - size, err := m.NameTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.BatchTx != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.BatchTx.Size())) + n8, err := m.BatchTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i += n8 } - if m.SendTx != nil { - { - size, err := m.SendTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.ProposalTx != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.ProposalTx.Size())) + n9, err := m.ProposalTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i += n9 } - if m.CallTx != nil { - { - size, err := m.CallTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.IdentifyTx != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.IdentifyTx.Size())) + n10, err := m.IdentifyTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n10 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *TxInput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1333,46 +1306,38 @@ func (m *TxInput) Marshal() (dAtA []byte, err error) { } func (m *TxInput) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxInput) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Sequence != 0 { - i = encodeVarintPayload(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x18 + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) + n11, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n11 if m.Amount != 0 { - i = encodeVarintPayload(dAtA, i, uint64(m.Amount)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Amount)) } - { - size := m.Address.Size() - i -= size - if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.Sequence != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Sequence)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *TxOutput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1380,41 +1345,33 @@ func (m *TxOutput) Marshal() (dAtA []byte, err error) { } func (m *TxOutput) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) + n12, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n12 if m.Amount != 0 { - i = encodeVarintPayload(dAtA, i, uint64(m.Amount)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Amount)) } - { - size := m.Address.Size() - i -= size - if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return i, nil } func (m *CallTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1422,99 +1379,83 @@ func (m *CallTx) Marshal() (dAtA []byte, err error) { } func (m *CallTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CallTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.GasPrice != 0 { - i = encodeVarintPayload(dAtA, i, uint64(m.GasPrice)) - i-- - dAtA[i] = 0x40 - } - if len(m.ContractMeta) > 0 { - for iNdEx := len(m.ContractMeta) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ContractMeta[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - { - size := m.WASM.Size() - i -= size - if _, err := m.WASM.MarshalTo(dAtA[i:]); err != nil { + if m.Input != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) + n13, err := m.Input.MarshalTo(dAtA[i:]) + if err != nil { return 0, err } - i = encodeVarintPayload(dAtA, i, uint64(size)) + i += n13 } - i-- - dAtA[i] = 0x32 - { - size := m.Data.Size() - i -= size - if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { + if m.Address != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) + n14, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { return 0, err } - i = encodeVarintPayload(dAtA, i, uint64(size)) + i += n14 + } + if m.GasLimit != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.GasLimit)) } - i-- - dAtA[i] = 0x2a if m.Fee != 0 { - i = encodeVarintPayload(dAtA, i, uint64(m.Fee)) - i-- dAtA[i] = 0x20 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Fee)) } - if m.GasLimit != 0 { - i = encodeVarintPayload(dAtA, i, uint64(m.GasLimit)) - i-- - dAtA[i] = 0x18 + dAtA[i] = 0x2a + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Data.Size())) + n15, err := m.Data.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - if m.Address != nil { - { - size := m.Address.Size() - i -= size - if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPayload(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + i += n15 + dAtA[i] = 0x32 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.WASM.Size())) + n16, err := m.WASM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - if m.Input != nil { - { - size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + i += n16 + if len(m.ContractMeta) > 0 { + for _, msg := range m.ContractMeta { + dAtA[i] = 0x3a + i++ + i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + i += n } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil + if m.GasPrice != 0 { + dAtA[i] = 0x40 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.GasPrice)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *ContractMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1522,43 +1463,34 @@ func (m *ContractMeta) Marshal() (dAtA []byte, err error) { } func (m *ContractMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.CodeHash.Size())) + n17, err := m.CodeHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n17 if len(m.Meta) > 0 { - i -= len(m.Meta) - copy(dAtA[i:], m.Meta) - i = encodeVarintPayload(dAtA, i, uint64(len(m.Meta))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPayload(dAtA, i, uint64(len(m.Meta))) + i += copy(dAtA[i:], m.Meta) } - { - size := m.CodeHash.Size() - i -= size - if _, err := m.CodeHash.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return i, nil } func (m *SendTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1566,54 +1498,44 @@ func (m *SendTx) Marshal() (dAtA []byte, err error) { } func (m *SendTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SendTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Outputs) > 0 { - for iNdEx := len(m.Outputs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Outputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if len(m.Inputs) > 0 { + for _, msg := range m.Inputs { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i += n } } - if len(m.Inputs) > 0 { - for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if len(m.Outputs) > 0 { + for _, msg := range m.Outputs { + dAtA[i] = 0x12 + i++ + i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *PermsTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1621,48 +1543,38 @@ func (m *PermsTx) Marshal() (dAtA []byte, err error) { } func (m *PermsTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PermsTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size, err := m.PermArgs.MarshalToSizedBuffer(dAtA[:i]) + if m.Input != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) + n18, err := m.Input.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + i += n18 } - i-- dAtA[i] = 0x12 - if m.Input != nil { - { - size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.PermArgs.Size())) + n19, err := m.PermArgs.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - return len(dAtA) - i, nil + i += n19 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *NameTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1670,57 +1582,47 @@ func (m *NameTx) Marshal() (dAtA []byte, err error) { } func (m *NameTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NameTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Input != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) + n20, err := m.Input.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 } - if m.Fee != 0 { - i = encodeVarintPayload(dAtA, i, uint64(m.Fee)) - i-- - dAtA[i] = 0x20 + if len(m.Name) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintPayload(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintPayload(dAtA, i, uint64(len(m.Data))) - i-- dAtA[i] = 0x1a + i++ + i = encodeVarintPayload(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintPayload(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 + if m.Fee != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Fee)) } - if m.Input != nil { - { - size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *BondTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1728,38 +1630,30 @@ func (m *BondTx) Marshal() (dAtA []byte, err error) { } func (m *BondTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BondTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } if m.Input != nil { - { - size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) + n21, err := m.Input.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *UnbondTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1767,50 +1661,40 @@ func (m *UnbondTx) Marshal() (dAtA []byte, err error) { } func (m *UnbondTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnbondTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Input != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) + n22, err := m.Input.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 } if m.Output != nil { - { - size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x12 - } - if m.Input != nil { - { - size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Output.Size())) + n23, err := m.Output.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n23 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *GovTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1818,54 +1702,44 @@ func (m *GovTx) Marshal() (dAtA []byte, err error) { } func (m *GovTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GovTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.AccountUpdates) > 0 { - for iNdEx := len(m.AccountUpdates) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AccountUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if len(m.Inputs) > 0 { + for _, msg := range m.Inputs { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i += n } } - if len(m.Inputs) > 0 { - for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if len(m.AccountUpdates) > 0 { + for _, msg := range m.AccountUpdates { + dAtA[i] = 0x12 + i++ + i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *ProposalTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1873,67 +1747,55 @@ func (m *ProposalTx) Marshal() (dAtA []byte, err error) { } func (m *ProposalTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Proposal != nil { - { - size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.ProposalHash != nil { - { - size := m.ProposalHash.Size() - i -= size - if _, err := m.ProposalHash.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.Input != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) + n24, err := m.Input.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i += n24 } if m.VotingWeight != 0 { - i = encodeVarintPayload(dAtA, i, uint64(m.VotingWeight)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.VotingWeight)) } - if m.Input != nil { - { - size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.ProposalHash != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.ProposalHash.Size())) + n25, err := m.ProposalHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n25 + } + if m.Proposal != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Proposal.Size())) + n26, err := m.Proposal.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *IdentifyTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1941,52 +1803,42 @@ func (m *IdentifyTx) Marshal() (dAtA []byte, err error) { } func (m *IdentifyTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IdentifyTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Node != nil { - { - size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) + if len(m.Inputs) > 0 { + for _, msg := range m.Inputs { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + i += n } - i-- - dAtA[i] = 0x12 } - if len(m.Inputs) > 0 { - for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + if m.Node != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Node.Size())) + n27, err := m.Node.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n27 } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *BatchTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -1994,54 +1846,44 @@ func (m *BatchTx) Marshal() (dAtA []byte, err error) { } func (m *BatchTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Txs) > 0 { - for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Txs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if len(m.Inputs) > 0 { + for _, msg := range m.Inputs { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i += n } } - if len(m.Inputs) > 0 { - for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + if len(m.Txs) > 0 { + for _, msg := range m.Txs { + dAtA[i] = 0x12 + i++ + i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n } } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *Vote) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2049,41 +1891,33 @@ func (m *Vote) Marshal() (dAtA []byte, err error) { } func (m *Vote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) + n28, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n28 if m.VotingWeight != 0 { - i = encodeVarintPayload(dAtA, i, uint64(m.VotingWeight)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.VotingWeight)) } - { - size := m.Address.Size() - i -= size - if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPayload(dAtA, i, uint64(size)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return i, nil } func (m *Proposal) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2091,52 +1925,42 @@ func (m *Proposal) Marshal() (dAtA []byte, err error) { } func (m *Proposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.BatchTx != nil { - { - size, err := m.BatchTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintPayload(dAtA, i, uint64(len(m.Description))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintPayload(dAtA, i, uint64(len(m.Description))) + i += copy(dAtA[i:], m.Description) } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintPayload(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa + if m.BatchTx != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.BatchTx.Size())) + n29, err := m.BatchTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n29 } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *Ballot) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -2144,75 +1968,61 @@ func (m *Ballot) Marshal() (dAtA []byte, err error) { } func (m *Ballot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Ballot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.Proposal != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.Proposal.Size())) + n30, err := m.Proposal.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n30 } - if len(m.Votes) > 0 { - for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a + if m.FinalizingTx != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.FinalizingTx.Size())) + n31, err := m.FinalizingTx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n31 } if m.ProposalState != 0 { - i = encodeVarintPayload(dAtA, i, uint64(m.ProposalState)) - i-- dAtA[i] = 0x20 + i++ + i = encodeVarintPayload(dAtA, i, uint64(m.ProposalState)) } - if m.FinalizingTx != nil { - { - size := m.FinalizingTx.Size() - i -= size - if _, err := m.FinalizingTx.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPayload(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Proposal != nil { - { - size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) + if len(m.Votes) > 0 { + for _, msg := range m.Votes { + dAtA[i] = 0x2a + i++ + i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i -= size - i = encodeVarintPayload(dAtA, i, uint64(size)) + i += n } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func encodeVarintPayload(dAtA []byte, offset int, v uint64) int { - offset -= sovPayload(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *Any) Size() (n int) { if m == nil { @@ -2633,7 +2443,14 @@ func (m *Ballot) Size() (n int) { } func sovPayload(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozPayload(x uint64) (n int) { return sovPayload(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/txs/txs.pb.go b/txs/txs.pb.go index 80232703a..fa222a2ac 100644 --- a/txs/txs.pb.go +++ b/txs/txs.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" io "io" math "math" - math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -79,7 +78,7 @@ func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Envelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -140,7 +139,7 @@ func (m *Signatory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Signatory.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -206,7 +205,7 @@ func (m *Receipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Receipt.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } @@ -293,7 +292,7 @@ var fileDescriptor_372ebcf753025bdc = []byte{ func (m *Envelope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -301,57 +300,47 @@ func (m *Envelope) Marshal() (dAtA []byte, err error) { } func (m *Envelope) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Envelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Enc != 0 { - i = encodeVarintTxs(dAtA, i, uint64(m.Enc)) - i-- - dAtA[i] = 0x18 - } - if m.Tx != nil { - { - size := m.Tx.Size() - i -= size - if _, err := m.Tx.MarshalTo(dAtA[i:]); err != nil { + if len(m.Signatories) > 0 { + for _, msg := range m.Signatories { + dAtA[i] = 0xa + i++ + i = encodeVarintTxs(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { return 0, err } - i = encodeVarintTxs(dAtA, i, uint64(size)) + i += n } - i-- - dAtA[i] = 0x12 } - if len(m.Signatories) > 0 { - for iNdEx := len(m.Signatories) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatories[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTxs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + if m.Tx != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTxs(dAtA, i, uint64(m.Tx.Size())) + n1, err := m.Tx.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n1 + } + if m.Enc != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTxs(dAtA, i, uint64(m.Enc)) } - return len(dAtA) - i, nil + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil } func (m *Signatory) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -359,62 +348,50 @@ func (m *Signatory) Marshal() (dAtA []byte, err error) { } func (m *Signatory) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Signatory) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Signature != nil { - { - size, err := m.Signature.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTxs(dAtA, i, uint64(size)) + if m.Address != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTxs(dAtA, i, uint64(m.Address.Size())) + n2, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i += n2 } if m.PublicKey != nil { - { - size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTxs(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintTxs(dAtA, i, uint64(m.PublicKey.Size())) + n3, err := m.PublicKey.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 } - if m.Address != nil { - { - size := m.Address.Size() - i -= size - if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTxs(dAtA, i, uint64(size)) + if m.Signature != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTxs(dAtA, i, uint64(m.Signature.Size())) + n4, err := m.Signature.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n4 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func (m *Receipt) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -422,67 +399,55 @@ func (m *Receipt) Marshal() (dAtA []byte, err error) { } func (m *Receipt) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Receipt) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + if m.TxType != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTxs(dAtA, i, uint64(m.TxType)) } - { - size := m.ContractAddress.Size() - i -= size - if _, err := m.ContractAddress.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTxs(dAtA, i, uint64(size)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTxs(dAtA, i, uint64(m.TxHash.Size())) + n5, err := m.TxHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i += n5 if m.CreatesContract { - i-- + dAtA[i] = 0x18 + i++ if m.CreatesContract { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x18 + i++ } - { - size := m.TxHash.Size() - i -= size - if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTxs(dAtA, i, uint64(size)) + dAtA[i] = 0x22 + i++ + i = encodeVarintTxs(dAtA, i, uint64(m.ContractAddress.Size())) + n6, err := m.ContractAddress.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 - if m.TxType != 0 { - i = encodeVarintTxs(dAtA, i, uint64(m.TxType)) - i-- - dAtA[i] = 0x8 + i += n6 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } - return len(dAtA) - i, nil + return i, nil } func encodeVarintTxs(dAtA []byte, offset int, v uint64) int { - offset -= sovTxs(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *Envelope) Size() (n int) { if m == nil { @@ -556,7 +521,14 @@ func (m *Receipt) Size() (n int) { } func sovTxs(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozTxs(x uint64) (n int) { return sovTxs(uint64((x << 1) ^ uint64((int64(x) >> 63)))) From 7e7c3e807301fa998e4cad621c35a36a9675730f Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 3 Oct 2019 14:37:59 +0100 Subject: [PATCH 028/185] Tidy up expMod precompile implementation and add test Also: - Removed broken signed integer implementation of Push64/Pop64. It only worked because the numbers dealt with are always positive. In fact all we need on stack is unsigned pushes and pops. - Fixed twos complement handling and sign extension word256.go where it was not correctly implemented (though didn't cause known issue because of the above) - Improved nested call error handling in VM tests while refactoring TxExecution and Events a bit - Used pointer types for ABI and made function spec initialise with signature Signed-off-by: Silas Davis --- .github/workflows/master.yaml | 6 +- .github/workflows/test.yaml | 6 +- binary/integer.go | 46 +++++++---- binary/integer_test.go | 39 ++++----- binary/word256.go | 44 ++++++----- binary/word256_test.go | 20 ++++- cmd/burrow/commands/abi.go | 4 +- cmd/burrow/commands/accounts.go | 4 +- crypto/address.go | 4 +- deploy/jobs/jobs_contracts.go | 2 +- execution/evm/abi/abi.go | 35 ++++---- execution/evm/abi/function_spec.go | 25 ++++-- execution/evm/abi/packing_test.go | 4 +- execution/evm/abi/spec.go | 51 ++++++------ execution/evm/contract.go | 59 +++++++------- execution/evm/evm_test.go | 69 ++++++++++++++-- execution/evm/stack.go | 89 +++++++++------------ execution/exec/event.go | 35 -------- execution/exec/events.go | 114 +++++++++++++++++++++++++++ execution/exec/tx_execution.go | 35 +------- execution/native/gas.go | 2 + execution/native/precompiles.go | 103 ++++++++++++++---------- execution/solidity/big_mod.sol | 31 ++++++++ execution/solidity/big_mod.sol.go | 7 ++ execution/state/accounts.go | 8 +- execution/state/state.go | 2 +- integration/rpctransact/call_test.go | 6 +- permission/base_permissions.go | 14 ++-- vent/service/abi_provider.go | 4 +- vent/service/block_consumer_test.go | 2 +- 30 files changed, 532 insertions(+), 338 deletions(-) create mode 100644 execution/exec/events.go create mode 100644 execution/solidity/big_mod.sol create mode 100644 execution/solidity/big_mod.sol.go diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index 1fca42fdc..1215e6858 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -1,7 +1,7 @@ name: master on: push: - branches: + branches: - master jobs: @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/setup-go@v1 with: - go-version: 1.12 + go-version: 1.13 id: go - uses: actions/checkout@v1 - run: make test @@ -38,4 +38,4 @@ jobs: version=$(./scripts/local_version.sh) echo ${DOCKER_PASS_DEV} | docker login --username ${DOCKER_USER_DEV} ${DOCKER_REPO_DEV} --password-stdin docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO_DEV}:${version} - docker push ${DOCKER_REPO_DEV} \ No newline at end of file + docker push ${DOCKER_REPO_DEV} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index dfedc2144..0e8698995 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,7 +7,7 @@ jobs: steps: - uses: actions/setup-go@v1 with: - go-version: 1.12 + go-version: 1.13 id: go - uses: actions/checkout@v1 - run: make test @@ -122,7 +122,7 @@ jobs: path: bin - run: chmod +x $(pwd)/bin/* - name: Test - run: | + run: | export PATH=${PATH}:$(pwd)/bin make npm_install - make test_js \ No newline at end of file + make test_js diff --git a/binary/integer.go b/binary/integer.go index f2d7b65a9..150a6c3cd 100644 --- a/binary/integer.go +++ b/binary/integer.go @@ -21,9 +21,6 @@ import ( var big1 = big.NewInt(1) var Big256 = big.NewInt(256) -var tt256 = new(big.Int).Lsh(big1, 256) -var tt256m1 = new(big.Int).Sub(new(big.Int).Lsh(big1, 256), big1) -var tt255 = new(big.Int).Lsh(big1, 255) // Returns whether a + b would be a uint64 overflow func IsUint64SumOverflow(a, b uint64) bool { @@ -33,29 +30,43 @@ func IsUint64SumOverflow(a, b uint64) bool { // Converts a possibly negative big int x into a positive big int encoding a twos complement representation of x // truncated to 32 bytes func U256(x *big.Int) *big.Int { - // Note that the And operation induces big.Int to hold a positive representation of a negative number - return new(big.Int).And(x, tt256m1) + return ToTwosComplement(x, Word256Bits) } // Interprets a positive big.Int as a 256-bit two's complement signed integer func S256(x *big.Int) *big.Int { - // Sign bit not set, value is its positive self - if x.Cmp(tt255) < 0 { + return FromTwosComplement(x, Word256Bits) +} + +// Convert a possibly negative big.Int x to a positive big.Int encoded in two's complement +func ToTwosComplement(x *big.Int, n uint) *big.Int { + // And treats negative arguments a if they were twos complement encoded so we end up with a positive number here + // with the twos complement bit pattern + return new(big.Int).And(x, andMask(n)) +} + +// Interprets a positive big.Int as a n-bit two's complement signed integer +func FromTwosComplement(x *big.Int, n uint) *big.Int { + signBit := int(n) - 1 + if x.Bit(signBit) == 0 { + // Sign bit not set => value (v) is positive + // x = |v| = v return x } else { - // negative value is represented - return new(big.Int).Sub(x, tt256) + // Sign bit set => value (v) is negative + // x = 2^n - |v| + b := new(big.Int).Lsh(big1, n) + // v = -|v| = x - 2^n + return new(big.Int).Sub(x, b) } } -// Treats the positive big int x as if it contains an embedded a back + 1 byte signed integer in its least significant +// Treats the positive big int x as if it contains an embedded n bit signed integer in its least significant // bits and extends that sign -func SignExtend(back uint64, x *big.Int) *big.Int { - // we assume x contains a signed integer of back + 1 bytes width - // most significant bit of the back'th byte, - signBit := back*8 + 7 +func SignExtend(x *big.Int, n uint) *big.Int { + signBit := n - 1 // single bit set at sign bit position - mask := new(big.Int).Lsh(big1, uint(signBit)) + mask := new(big.Int).Lsh(big1, signBit) // all bits below sign bit set to 1 all above (including sign bit) set to 0 mask.Sub(mask, big1) if x.Bit(int(signBit)) == 1 { @@ -66,3 +77,8 @@ func SignExtend(back uint64, x *big.Int) *big.Int { return x.And(x, mask) } } + +func andMask(n uint) *big.Int { + x := new(big.Int) + return x.Sub(x.Lsh(big1, n), big1) +} diff --git a/binary/integer_test.go b/binary/integer_test.go index c0c1533fe..07abb7fff 100644 --- a/binary/integer_test.go +++ b/binary/integer_test.go @@ -31,7 +31,6 @@ func zero() *big.Int { var big2E255 = zero().Lsh(big1, 255) var big2E256 = zero().Lsh(big1, 256) -var big2E257 = zero().Lsh(big1, 257) func TestU256(t *testing.T) { expected := big2E255 @@ -90,62 +89,56 @@ func TestS256(t *testing.T) { expected = zero() signed = S256(expected) assertBigIntEqual(t, expected, signed, "Twos complement of zero is fixed poount") - - // Technically undefined but let's not let that stop us - expected = zero().Sub(big2E257, big2E256) - signed = S256(big2E257) - assertBigIntEqual(t, expected, signed, "Out of twos complement bounds") } func TestSignExtend(t *testing.T) { - assertSignExtend(t, 16, 0, + assertSignExtend(t, 16, 8, "0000 0000 1001 0000", "1111 1111 1001 0000") - assertSignExtend(t, 16, 1, + assertSignExtend(t, 16, 16, "1001 0000", "1001 0000") - assertSignExtend(t, 32, 2, + assertSignExtend(t, 32, 24, "0000 0000 1000 0000 1101 0011 1001 0000", "1111 1111 1000 0000 1101 0011 1001 0000") - assertSignExtend(t, 32, 2, + assertSignExtend(t, 32, 24, "0000 0000 0000 0000 1101 0011 1001 0000", "0000 0000 0000 0000 1101 0011 1001 0000") // Here we have a stray bit set in the 4th most significant byte that gets wiped out - assertSignExtend(t, 32, 2, + assertSignExtend(t, 32, 24, "0001 0000 0000 0000 1101 0011 1001 0000", "0000 0000 0000 0000 1101 0011 1001 0000") - assertSignExtend(t, 32, 2, + assertSignExtend(t, 32, 24, "0001 0000 1000 0000 1101 0011 1001 0000", "1111 1111 1000 0000 1101 0011 1001 0000") - assertSignExtend(t, 32, 3, + assertSignExtend(t, 32, 32, "0001 0000 1000 0000 1101 0011 1001 0000", "0001 0000 1000 0000 1101 0011 1001 0000") - assertSignExtend(t, 32, 3, + assertSignExtend(t, 32, 32, "1001 0000 1000 0000 1101 0011 1001 0000", "1001 0000 1000 0000 1101 0011 1001 0000") - assertSignExtend(t, 64, 3, + assertSignExtend(t, 64, 32, "0000 0000 0000 0000 0000 0000 0000 0000 1001 0000 1000 0000 1101 0011 1001 0000", "1111 1111 1111 1111 1111 1111 1111 1111 1001 0000 1000 0000 1101 0011 1001 0000") - assertSignExtend(t, 64, 3, + assertSignExtend(t, 64, 32, "0000 0000 0000 0000 0000 0000 0000 0000 0001 0000 1000 0000 1101 0011 1001 0000", "0000 0000 0000 0000 0000 0000 0000 0000 0001 0000 1000 0000 1101 0011 1001 0000") } -func assertSignExtend(t *testing.T, bitSize int, bytesBack uint64, inputString, expectedString string) bool { - input := intFromString(t, bitSize, inputString) - expected := intFromString(t, bitSize, expectedString) - //actual := SignExtend(big.NewInt(bytesBack), big.NewInt(int64(input))) - actual := SignExtend(bytesBack, big.NewInt(int64(input))) +func assertSignExtend(t *testing.T, extendedBits int, embeddedBits uint, inputString, expectedString string) bool { + input := intFromString(t, extendedBits, inputString) + expected := intFromString(t, extendedBits, expectedString) + actual := SignExtend(big.NewInt(int64(input)), embeddedBits) var ret bool - switch bitSize { + switch extendedBits { case 8: ret = assert.Equal(t, uint8(expected), uint8(actual.Int64())) case 16: @@ -155,7 +148,7 @@ func assertSignExtend(t *testing.T, bitSize int, bytesBack uint64, inputString, case 64: ret = assert.Equal(t, uint64(expected), uint64(actual.Int64())) default: - t.Fatalf("Cannot test SignExtend for non-Go-native bit size %v", bitSize) + t.Fatalf("Cannot test SignExtend for non-Go-native bit size %v", extendedBits) return false } if !ret { diff --git a/binary/word256.go b/binary/word256.go index 00716ba43..2a2243d68 100644 --- a/binary/word256.go +++ b/binary/word256.go @@ -21,7 +21,7 @@ import ( "math/big" "sort" - hex "github.com/tmthrgd/go-hex" + "github.com/tmthrgd/go-hex" ) var ( @@ -29,13 +29,14 @@ var ( One256 = LeftPadWord256([]byte{1}) ) -const Word256Length = 32 +const Word256Bytes = 32 +const Word256Bits = Word256Bytes * 8 -var BigWord256Length = big.NewInt(Word256Length) +var BigWord256Bytes = big.NewInt(Word256Bytes) var trimCutSet = string([]byte{0}) -type Word256 [Word256Length]byte +type Word256 [Word256Bytes]byte func (w *Word256) UnmarshalText(hexBytes []byte) error { bs, err := hex.DecodeString(string(hexBytes)) @@ -109,9 +110,9 @@ func (w *Word256) Unmarshal(data []byte) error { if len(data) == 0 { return nil } - if len(data) != Word256Length { + if len(data) != Word256Bytes { return fmt.Errorf("error unmarshallling Word256 '%X' from bytes: %d bytes but should have %d bytes", - data, len(data), Word256Length) + data, len(data), Word256Bytes) } copy(w[:], data) return nil @@ -125,7 +126,7 @@ func (w *Word256) MarshalTo(data []byte) (int, error) { } func (w Word256) Size() int { - return Word256Length + return Word256Bytes } func Uint64ToWord256(i uint64) (word Word256) { @@ -133,9 +134,24 @@ func Uint64ToWord256(i uint64) (word Word256) { return } -func Int64ToWord256(i int64) (word Word256) { - binary.BigEndian.PutUint64(word[24:], uint64(i)) - return +func Uint64FromWord256(word Word256) uint64 { + return binary.BigEndian.Uint64(word.Postfix(8)) +} + +func Int64ToWord256(i int64) Word256 { + return BigIntToWord256(SignExtend(big.NewInt(i), Word256Bits)) +} + +func Int64FromWord256(word Word256) int64 { + return BigIntFromWord256(word).Int64() +} + +func BigIntToWord256(x *big.Int) Word256 { + return LeftPadWord256(U256(x).Bytes()) +} + +func BigIntFromWord256(word Word256) *big.Int { + return S256(new(big.Int).SetBytes(word[:])) } func RightPadWord256(bz []byte) (word Word256) { @@ -148,14 +164,6 @@ func LeftPadWord256(bz []byte) (word Word256) { return } -func Uint64FromWord256(word Word256) uint64 { - return binary.BigEndian.Uint64(word.Postfix(8)) -} - -func Int64FromWord256(word Word256) int64 { - return int64(Uint64FromWord256(word)) -} - //------------------------------------- type Words256 []Word256 diff --git a/binary/word256_test.go b/binary/word256_test.go index ee0460bfb..7e8bf1e75 100644 --- a/binary/word256_test.go +++ b/binary/word256_test.go @@ -1,12 +1,13 @@ package binary import ( - "testing" - "encoding/json" + "math/big" + "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tmthrgd/go-hex" ) func TestWord256_UnpadLeft(t *testing.T) { @@ -41,6 +42,21 @@ func TestLeftPadWord256(t *testing.T) { LeftPadWord256([]byte{1, 2, 3})) } +func TestTwosComplement(t *testing.T) { + v := Int64ToWord256(-10) + require.Equal(t, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6", + hex.EncodeUpperToString(v[:])) + + upper, ok := new(big.Int).SetString("32423973453453434237423", 10) + require.True(t, ok) + inc, ok := new(big.Int).SetString("3242397345345343421", 10) + require.True(t, ok) + for i := new(big.Int).Neg(upper); i.Cmp(upper) == -1; i.Add(i, inc) { + v := BigIntFromWord256(BigIntToWord256(i)) + require.True(t, i.Cmp(v) == 0, "expected %d == %d", i, v) + } +} + func TestOne256(t *testing.T) { assert.Equal(t, Int64ToWord256(1), One256) } diff --git a/cmd/burrow/commands/abi.go b/cmd/burrow/commands/abi.go index 4f18c939d..16bd54f58 100644 --- a/cmd/burrow/commands/abi.go +++ b/cmd/burrow/commands/abi.go @@ -26,8 +26,8 @@ func Abi(output Output) func(cmd *cli.Cmd) { for id, e := range spec.EventsByID { fmt.Printf("event %s: %s\n", id, e.String()) } - for name, f := range spec.Functions { - fmt.Printf("func %x: %s\n", f.FunctionID, f.String(name)) + for _, f := range spec.Functions { + fmt.Printf("func %x: %s\n", f.FunctionID, f.String()) } } } diff --git a/cmd/burrow/commands/accounts.go b/cmd/burrow/commands/accounts.go index 4b34fb008..e7580af0d 100644 --- a/cmd/burrow/commands/accounts.go +++ b/cmd/burrow/commands/accounts.go @@ -76,8 +76,8 @@ func Accounts(output Output) func(cmd *cli.Cmd) { if len(spec.Functions) > 0 { output.Printf(" Functions:") - for name, f := range spec.Functions { - output.Printf(" %s", f.String(name)) + for _, f := range spec.Functions { + output.Printf(" %s", f.String()) } } diff --git a/crypto/address.go b/crypto/address.go index a3bf278db..4395362f2 100644 --- a/crypto/address.go +++ b/crypto/address.go @@ -208,9 +208,9 @@ func NewContractAddress(caller Address, nonce []byte) (newAddr Address) { return } -func NewContractAddress2(caller Address, salt [binary.Word256Length]byte, initcode []byte) (newAddr Address) { +func NewContractAddress2(caller Address, salt [binary.Word256Bytes]byte, initcode []byte) (newAddr Address) { // sha3(0xff ++ caller.Address() ++ salt ++ sha3(init_code))[12:] - temp := make([]byte, 0, 1+AddressLength+2*binary.Word256Length) + temp := make([]byte, 0, 1+AddressLength+2*binary.Word256Bytes) temp = append(temp, []byte{0xFF}...) temp = append(temp, caller[:]...) temp = append(temp, salt[:]...) diff --git a/deploy/jobs/jobs_contracts.go b/deploy/jobs/jobs_contracts.go index ebec093e2..7a57bf107 100644 --- a/deploy/jobs/jobs_contracts.go +++ b/deploy/jobs/jobs_contracts.go @@ -607,7 +607,7 @@ func logEvents(txe *exec.TxExecution, client *def.Client, logger *logging.Logger vals[i] = new(string) } - if err := abi.UnpackEvent(&evAbi, eventLog.Topics, eventLog.Data, vals...); err == nil { + if err := abi.UnpackEvent(evAbi, eventLog.Topics, eventLog.Data, vals...); err == nil { var fields []interface{} fields = append(fields, "name") fields = append(fields, evAbi.Name) diff --git a/execution/evm/abi/abi.go b/execution/evm/abi/abi.go index 7dddb9b6d..84fab5c59 100644 --- a/execution/evm/abi/abi.go +++ b/execution/evm/abi/abi.go @@ -24,7 +24,7 @@ type Variable struct { // LoadPath loads one abi file or finds all files in a directory func LoadPath(abiFileOrDirs ...string) (*Spec, error) { if len(abiFileOrDirs) == 0 { - return &Spec{}, fmt.Errorf("no ABI file or directory provided") + return nil, fmt.Errorf("no ABI file or directory provided") } specs := make([]*Spec, 0) @@ -46,7 +46,7 @@ func LoadPath(abiFileOrDirs ...string) (*Spec, error) { return nil }) if err != nil { - return &Spec{}, err + return nil, err } } return MergeSpec(specs), nil @@ -183,25 +183,24 @@ func ReadSpecFile(filename string) (*Spec, error) { // described a struct. Both args and rets should be set to the return value of reflect.TypeOf() // with the respective struct as an argument. func SpecFromStructReflect(fname string, args reflect.Type, rets reflect.Type) *FunctionSpec { - s := FunctionSpec{ - Inputs: make([]Argument, args.NumField()), - Outputs: make([]Argument, rets.NumField()), - } + inputs := make([]Argument, args.NumField()) + outputs := make([]Argument, rets.NumField()) + for i := 0; i < args.NumField(); i++ { f := args.Field(i) a := typeFromReflect(f.Type) a.Name = f.Name - s.Inputs[i] = a + inputs[i] = a } + for i := 0; i < rets.NumField(); i++ { f := rets.Field(i) a := typeFromReflect(f.Type) a.Name = f.Name - s.Outputs[i] = a + outputs[i] = a } - s.SetFunctionID(fname) - return &s + return NewFunctionSpec(fname, inputs, outputs) } func SpecFromFunctionReflect(fname string, v reflect.Value, skipIn, skipOut int) *FunctionSpec { @@ -211,20 +210,18 @@ func SpecFromFunctionReflect(fname string, v reflect.Value, skipIn, skipOut int) panic(fmt.Sprintf("%s is not a function", t.Name())) } - s := FunctionSpec{} - s.Inputs = make([]Argument, t.NumIn()-skipIn) - s.Outputs = make([]Argument, t.NumOut()-skipOut) + inputs := make([]Argument, t.NumIn()-skipIn) + outputs := make([]Argument, t.NumOut()-skipOut) - for i := range s.Inputs { - s.Inputs[i] = typeFromReflect(t.In(i + skipIn)) + for i := range inputs { + inputs[i] = typeFromReflect(t.In(i + skipIn)) } - for i := range s.Outputs { - s.Outputs[i] = typeFromReflect(t.Out(i)) + for i := range outputs { + outputs[i] = typeFromReflect(t.Out(i)) } - s.SetFunctionID(fname) - return &s + return NewFunctionSpec(fname, inputs, outputs) } func GetPackingTypes(args []Argument) []interface{} { diff --git a/execution/evm/abi/function_spec.go b/execution/evm/abi/function_spec.go index fffa43862..0ba06173e 100644 --- a/execution/evm/abi/function_spec.go +++ b/execution/evm/abi/function_spec.go @@ -10,6 +10,7 @@ import ( const FunctionIDSize = 4 type FunctionSpec struct { + Name string FunctionID FunctionID Constant bool Inputs []Argument @@ -18,6 +19,17 @@ type FunctionSpec struct { type FunctionID [FunctionIDSize]byte +func NewFunctionSpec(name string, inputs, outputs []Argument) *FunctionSpec { + sig := Signature(name, inputs) + return &FunctionSpec{ + Name: name, + FunctionID: GetFunctionID(sig), + Constant: false, + Inputs: inputs, + Outputs: outputs, + } +} + func GetFunctionID(signature string) (id FunctionID) { hash := sha3.NewLegacyKeccak256() hash.Write([]byte(signature)) @@ -29,14 +41,15 @@ func Signature(name string, args []Argument) string { return name + argsToSignature(args, false) } -func (f *FunctionSpec) String(name string) string { - return name + argsToSignature(f.Inputs, true) + - " returns " + argsToSignature(f.Outputs, true) +// Sets this function as constant +func (f *FunctionSpec) SetConstant() *FunctionSpec { + f.Constant = true + return f } -func (f *FunctionSpec) SetFunctionID(functionName string) { - sig := Signature(functionName, f.Inputs) - f.FunctionID = GetFunctionID(sig) +func (f *FunctionSpec) String() string { + return f.Name + argsToSignature(f.Inputs, true) + + " returns " + argsToSignature(f.Outputs, true) } func (fs FunctionID) Bytes() []byte { diff --git a/execution/evm/abi/packing_test.go b/execution/evm/abi/packing_test.go index c7bf4d6ec..3654ff288 100644 --- a/execution/evm/abi/packing_test.go +++ b/execution/evm/abi/packing_test.go @@ -66,11 +66,11 @@ func TestPackEvent(t *testing.T) { Bignum: 100, Hash: "ba", } - topics, data, err := PackEvent(&eventSpec, in) + topics, data, err := PackEvent(eventSpec, in) require.NoError(t, err) out := new(args) - err = UnpackEvent(&eventSpec, topics, data, out) + err = UnpackEvent(eventSpec, topics, data, out) require.NoError(t, err) }) diff --git a/execution/evm/abi/spec.go b/execution/evm/abi/spec.go index 54e4ace27..4be16346c 100644 --- a/execution/evm/abi/spec.go +++ b/execution/evm/abi/spec.go @@ -12,11 +12,11 @@ import ( // Spec is the ABI for contract decoded. type Spec struct { - Constructor FunctionSpec - Fallback FunctionSpec - Functions map[string]FunctionSpec - EventsByName map[string]EventSpec - EventsByID map[EventID]EventSpec + Constructor *FunctionSpec + Fallback *FunctionSpec + Functions map[string]*FunctionSpec + EventsByName map[string]*EventSpec + EventsByID map[EventID]*EventSpec } type specJSON struct { @@ -30,6 +30,17 @@ type specJSON struct { Anonymous bool } +func NewSpec() *Spec { + return &Spec{ + // Zero value for constructor and fallback function is assumed when those functions are not present + Constructor: &FunctionSpec{}, + Fallback: &FunctionSpec{}, + EventsByName: make(map[string]*EventSpec), + EventsByID: make(map[EventID]*EventSpec), + Functions: make(map[string]*FunctionSpec), + } +} + // ReadSpec takes an ABI and decodes it for futher use func ReadSpec(specBytes []byte) (*Spec, error) { var specJ []specJSON @@ -46,11 +57,7 @@ func ReadSpec(specBytes []byte) (*Spec, error) { specJ = binFile.Abi } - abiSpec := Spec{ - EventsByName: make(map[string]EventSpec), - EventsByID: make(map[EventID]EventSpec), - Functions: make(map[string]FunctionSpec), - } + abiSpec := NewSpec() for _, s := range specJ { switch s.Type { @@ -63,7 +70,7 @@ func ReadSpec(specBytes []byte) (*Spec, error) { abiSpec.Fallback.Inputs = make([]Argument, 0) abiSpec.Fallback.Outputs = make([]Argument, 0) case "event": - var ev EventSpec + ev := new(EventSpec) err = ev.unmarshalSpec(&s) if err != nil { return nil, err @@ -79,24 +86,18 @@ func ReadSpec(specBytes []byte) (*Spec, error) { if err != nil { return nil, err } - fs := FunctionSpec{Inputs: inputs, Outputs: outputs, Constant: s.Constant} - fs.SetFunctionID(s.Name) - abiSpec.Functions[s.Name] = fs + abiSpec.Functions[s.Name] = NewFunctionSpec(s.Name, inputs, outputs).SetConstant() } } - return &abiSpec, nil + return abiSpec, nil } // MergeSpec takes multiple Specs and merges them into once structure. Note that // the same function name or event name can occur in different abis, so there might be // some information loss. func MergeSpec(abiSpec []*Spec) *Spec { - newSpec := Spec{ - EventsByName: make(map[string]EventSpec), - EventsByID: make(map[EventID]EventSpec), - Functions: make(map[string]FunctionSpec), - } + newSpec := NewSpec() for _, s := range abiSpec { for n, f := range s.Functions { @@ -111,7 +112,7 @@ func MergeSpec(abiSpec []*Spec) *Spec { } } - return &newSpec + return newSpec } func (spec *Spec) GetEventAbi(id EventID, addresses crypto.Address) (*EventSpec, error) { @@ -119,7 +120,7 @@ func (spec *Spec) GetEventAbi(id EventID, addresses crypto.Address) (*EventSpec, if !ok { return nil, fmt.Errorf("could not find ABI for event with ID %v", id) } - return &eventSpec, nil + return eventSpec, nil } // Pack ABI encodes a function call. The fname specifies which function should called, if @@ -129,7 +130,7 @@ func (spec *Spec) GetEventAbi(id EventID, addresses crypto.Address) (*EventSpec, // Returns the ABI encoded function call, whether the function is constant according // to the ABI (which means it does not modified contract state) func (spec *Spec) Pack(fname string, args ...interface{}) ([]byte, *FunctionSpec, error) { - var funcSpec FunctionSpec + var funcSpec *FunctionSpec var argSpec []Argument if fname != "" { if _, ok := spec.Functions[fname]; ok { @@ -158,12 +159,12 @@ func (spec *Spec) Pack(fname string, args ...interface{}) ([]byte, *FunctionSpec return nil, nil, err } - return append(packed, packedArgs...), &funcSpec, nil + return append(packed, packedArgs...), funcSpec, nil } // Unpack decodes the return values from a function call func (spec *Spec) Unpack(data []byte, fname string, args ...interface{}) error { - var funcSpec FunctionSpec + var funcSpec *FunctionSpec var argSpec []Argument if fname != "" { if _, ok := spec.Functions[fname]; ok { diff --git a/execution/evm/contract.go b/execution/evm/contract.go index ad0dac64d..5a2026fa8 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -46,7 +46,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e } // Program counter - the index into code that tracks current instruction - var pc int64 + var pc uint64 // Return data from a call var returnData []byte @@ -164,10 +164,13 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e c.debugf(" %v ** %v = %v (%v)\n", x, y, pow, res) case SIGNEXTEND: // 0x0B - back := stack.PopU64() - if back < Word256Length-1 { - stack.PushBigInt(SignExtend(back, stack.PopBigInt())) + back := stack.Pop64() + if back < Word256Bytes-1 { + bits := uint(back*8 + 7) + stack.PushBigInt(SignExtend(stack.PopBigInt(), bits)) } + // Continue leaving the sign extension argument on the stack. This makes sign-extending a no-op if embedded + // integer is already one word wide case LT: // 0x10 x, y := stack.PopBigInt(), stack.PopBigInt() @@ -272,7 +275,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e if idx < 32 { res = val[idx] } - stack.Push64(int64(res)) + stack.Push64(uint64(res)) c.debugf(" => 0x%X\n", res) case SHL: //0x1B @@ -333,7 +336,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e address := stack.PopAddress() maybe.PushError(useGasNegative(params.Gas, native.GasGetAccount)) balance := mustGetAccount(st.CallFrame, maybe, address).Balance - stack.PushU64(balance) + stack.Push64(balance) c.debugf(" => %v (%v)\n", balance, address) case ORIGIN: // 0x32 @@ -345,7 +348,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e c.debugf(" => %v\n", params.Caller) case CALLVALUE: // 0x34 - stack.PushU64(params.Value) + stack.Push64(params.Value) c.debugf(" => %v\n", params.Value) case CALLDATALOAD: // 0x35 @@ -356,7 +359,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e c.debugf(" => 0x%v\n", res) case CALLDATASIZE: // 0x36 - stack.Push64(int64(len(params.Input))) + stack.Push64(uint64(len(params.Input))) c.debugf(" => %d\n", len(params.Input)) case CALLDATACOPY: // 0x37 @@ -368,7 +371,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e c.debugf(" => [%v, %v, %v] %X\n", memOff, inputOff, length, data) case CODESIZE: // 0x38 - l := int64(len(c.code)) + l := uint64(len(c.code)) stack.Push64(l) c.debugf(" => %d\n", l) @@ -392,7 +395,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e stack.Push(Zero256) c.debugf(" => 0\n") } else { - length := int64(len(acc.EVMCode)) + length := uint64(len(acc.EVMCode)) stack.Push64(length) c.debugf(" => %d\n", length) } @@ -413,7 +416,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e } case RETURNDATASIZE: // 0x3D - stack.Push64(int64(len(returnData))) + stack.Push64(uint64(len(returnData))) c.debugf(" => %d\n", len(returnData)) case RETURNDATACOPY: // 0x3E @@ -434,7 +437,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e acc := getAccount(st.CallFrame, maybe, address) if acc == nil { // In case the account does not exist 0 is pushed to the stack. - stack.PushU64(0) + stack.Push64(0) } else { // keccak256 hash of a contract's code var extcodehash Word256 @@ -447,7 +450,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e } case BLOCKHASH: // 0x40 - blockNumber := stack.PopU64() + blockNumber := stack.Pop64() lastBlockHeight := st.Blockchain.LastBlockHeight() if blockNumber >= lastBlockHeight { @@ -470,16 +473,16 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case TIMESTAMP: // 0x42 blockTime := st.Blockchain.LastBlockTime().Unix() - stack.Push64(blockTime) + stack.Push64(uint64(blockTime)) c.debugf(" => %d\n", blockTime) case BLOCKHEIGHT: // 0x43 number := st.Blockchain.LastBlockHeight() - stack.PushU64(number) + stack.Push64(number) c.debugf(" => %d\n", number) case GASLIMIT: // 0x45 - stack.PushU64(*params.Gas) + stack.Push64(*params.Gas) c.debugf(" => %v\n", *params.Gas) case POP: // 0x50 @@ -488,7 +491,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case MLOAD: // 0x51 offset := stack.PopBigInt() - data := memory.Read(offset, BigWord256Length) + data := memory.Read(offset, BigWord256Bytes) stack.Push(LeftPadWord256(data)) c.debugf(" => 0x%X @ 0x%v\n", data, offset) @@ -543,7 +546,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e c.debugf(" => 0x%X\n", capacity) case GAS: // 0x5A - stack.PushU64(*params.Gas) + stack.Push64(*params.Gas) c.debugf(" => %X\n", *params.Gas) case JUMPDEST: // 0x5B @@ -551,7 +554,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e // Do nothing case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: - a := int64(op - PUSH1 + 1) + a := uint64(op - PUSH1 + 1) codeSegment := maybe.Bytes(subslice(c.code, pc+1, a)) res := LeftPadWord256(codeSegment) stack.Push(res) @@ -581,11 +584,11 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e Topics: topics, Data: data, })) - c.debugf(" => T:%X D:%X\n", topics, data) + c.debugf(" => T:%v D:%X\n", topics, data) case CREATE, CREATE2: // 0xF0, 0xFB returnData = nil - contractValue := stack.PopU64() + contractValue := stack.Pop64() offset, size := stack.PopBigInt(), stack.PopBigInt() input := memory.Read(offset, size) @@ -650,7 +653,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e continue } // Pull arguments off stack: - gasLimit := stack.PopU64() + gasLimit := stack.Pop64() target := stack.PopAddress() value := params.Value // NOTE: for DELEGATECALL value is preserved from the original @@ -659,7 +662,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e // caller value is used. for CALL and CALLCODE value is stored // on stack and needs to be overwritten from the given value. if op != DELEGATECALL && op != STATICCALL { - value = stack.PopU64() + value = stack.Pop64() } // inputs inOffset, inSize := stack.PopBigInt(), stack.PopBigInt() @@ -848,7 +851,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e return nil, maybe.Error() } -func (c *Contract) jump(code []byte, to int64, pc *int64) error { +func (c *Contract) jump(code []byte, to uint64, pc *uint64) error { dest := codeGetOp(code, to) if dest != JUMPDEST { c.debugf(" ~> %v invalid jump dest %v\n", to, dest) @@ -916,8 +919,8 @@ func useGasNegative(gasLeft *uint64, gasToUse uint64) error { // extends past the end of data it returns A COPY of the segment at the end of // data padded with zeroes on the right. If offset == len(data) it returns all // zeroes. if offset > len(data) it returns a false -func subslice(data []byte, offset, length int64) ([]byte, error) { - size := int64(len(data)) +func subslice(data []byte, offset, length uint64) ([]byte, error) { + size := uint64(len(data)) if size < offset || offset < 0 || length < 0 { return nil, errors.Errorf(errors.Codes.InputOutOfBounds, "subslice could not slice data of size %d at offset %d for length %d", size, offset, length) @@ -931,8 +934,8 @@ func subslice(data []byte, offset, length int64) ([]byte, error) { return data[offset : offset+length], nil } -func codeGetOp(code []byte, n int64) OpCode { - if int64(len(code)) <= n { +func codeGetOp(code []byte, n uint64) OpCode { + if uint64(len(code)) <= n { return OpCode(0) // stop } else { return OpCode(code[n]) diff --git a/execution/evm/evm_test.go b/execution/evm/evm_test.go index 75ab6993c..7b6e72ab8 100644 --- a/execution/evm/evm_test.go +++ b/execution/evm/evm_test.go @@ -17,6 +17,7 @@ package evm import ( "bytes" "encoding/binary" + "math/big" "reflect" "testing" "time" @@ -25,13 +26,14 @@ import ( "github.com/hyperledger/burrow/acm/acmstate" . "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/evm/abi" . "github.com/hyperledger/burrow/execution/evm/asm" . "github.com/hyperledger/burrow/execution/evm/asm/bc" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/native" + "github.com/hyperledger/burrow/execution/solidity" "github.com/hyperledger/burrow/txs" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -1159,15 +1161,15 @@ func TestEVM(t *testing.T) { for i := 0; i < size; i++ { data[i] = byte(i) } - for n := int64(0); n < size; n++ { + for n := uint64(0); n < size; n++ { data = data[:n] - for offset := int64(-size); offset < size; offset++ { - for length := int64(-size); length < size; length++ { + for offset := uint64(0); offset < size; offset++ { + for length := uint64(0); length < size; length++ { _, err := subslice(data, offset, length) if offset < 0 || length < 0 || n < offset { - assert.NotNil(t, err) + assert.Error(t, err) } else { - assert.Nil(t, err) + assert.NoError(t, err) } } } @@ -1409,6 +1411,49 @@ func TestEVM(t *testing.T) { } t.Fatalf("Did not see LogEvent") }) + + t.Run("BigModExp", func(t *testing.T) { + st := acmstate.NewMemoryState() + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "101") + + // The solidity compiled contract. It calls bigmodexp with b,e,m inputs and compares the result with proof, where m is the mod, b the base, e the exp, and proof the expected result. + bytecode := solidity.DeployedBytecode_BigMod + + // The function "expmod" is an assertion. It takes the base, exponent, modulus, and the expected value and + // returns 1 if the values match. + spec, err := abi.ReadSpec(solidity.Abi_BigMod) + require.NoError(t, err) + + expModFunctionID := spec.Functions["expmod"].FunctionID + + n := int64(10) + for base := -n; base < n; base++ { + for exp := -n; exp < n; exp++ { + for mod := int64(1); mod < n; mod++ { + b := big.NewInt(base) + e := big.NewInt(exp) + m := big.NewInt(mod) + v := new(big.Int).Exp(b, e, m) + if v == nil { + continue + } + + input := MustSplice(expModFunctionID, // expmod function + BigIntToWord256(b), BigIntToWord256(e), BigIntToWord256(m), // base^exp % mod + BigIntToWord256(v)) // == expected + + gas := uint64(10000000) + out, err := call(vm, st, account1, account2, bytecode, input, &gas) + + require.NoError(t, err) + + require.Equal(t, One256, LeftPadWord256(out), "expected %d^%d mod %d == %d", + base, exp, mod, e) + } + } + } + }) } type blockchain struct { @@ -1461,12 +1506,22 @@ func addToBalance(t testing.TB, st acmstate.ReaderWriter, address crypto.Address func call(vm *EVM, st acmstate.ReaderWriter, origin, callee crypto.Address, code []byte, input []byte, gas *uint64) ([]byte, error) { - return vm.Execute(st, new(blockchain), exec.NewNoopEventSink(), engine.CallParams{ + + evs := new(exec.Events) + out, err := vm.Execute(st, new(blockchain), evs, engine.CallParams{ Caller: origin, Callee: callee, Input: input, Gas: gas, }, code) + + if err != nil { + return nil, &errors.CallError{ + CodedError: errors.AsException(err), + NestedErrors: evs.NestedCallErrors(), + } + } + return out, nil } // These code segment helpers exercise the MSTORE MLOAD MSTORE cycle to test diff --git a/execution/evm/stack.go b/execution/evm/stack.go index c7cfb30c7..d1270f871 100644 --- a/execution/evm/stack.go +++ b/execution/evm/stack.go @@ -45,18 +45,6 @@ func NewStack(errSink errors.Sink, initialCapacity uint64, maxCapacity uint64, g } } -func (st *Stack) useGas(gasToUse uint64) { - if *st.gas > gasToUse { - *st.gas -= gasToUse - } else { - st.pushErr(errors.Codes.InsufficientGas) - } -} - -func (st *Stack) pushErr(err errors.CodedError) { - st.errSink.PushError(err) -} - func (st *Stack) Push(d Word256) { st.useGas(native.GasStackOp) err := st.ensureCapacity(uint64(st.ptr) + 1) @@ -68,6 +56,16 @@ func (st *Stack) Push(d Word256) { st.ptr++ } +func (st *Stack) Pop() Word256 { + st.useGas(native.GasStackOp) + if st.ptr == 0 { + st.pushErr(errors.Codes.DataStackUnderflow) + return Zero256 + } + st.ptr-- + return st.slice[st.ptr] +} + // currently only called after sha3.Sha3 func (st *Stack) PushBytes(bz []byte) { if len(bz) != 32 { @@ -80,12 +78,17 @@ func (st *Stack) PushAddress(address crypto.Address) { st.Push(address.Word256()) } -func (st *Stack) Push64(i int64) { - st.Push(Int64ToWord256(i)) +func (st *Stack) Push64(i uint64) { + st.Push(Uint64ToWord256(i)) } -func (st *Stack) PushU64(i uint64) { - st.Push(Uint64ToWord256(i)) +func (st *Stack) Pop64() uint64 { + d := st.Pop() + if Is64BitOverflow(d) { + st.pushErr(errors.Errorf(errors.Codes.IntegerOverflow, "uint64 overflow from word: %v", d)) + return 0 + } + return Uint64FromWord256(d) } // Pushes the bigInt as a Word256 encoding negative values in 32-byte twos complement and returns the encoded result @@ -95,16 +98,13 @@ func (st *Stack) PushBigInt(bigInt *big.Int) Word256 { return word } -// Pops +func (st *Stack) PopBigIntSigned() *big.Int { + return S256(st.PopBigInt()) +} -func (st *Stack) Pop() Word256 { - st.useGas(native.GasStackOp) - if st.ptr == 0 { - st.pushErr(errors.Codes.DataStackUnderflow) - return Zero256 - } - st.ptr-- - return st.slice[st.ptr] +func (st *Stack) PopBigInt() *big.Int { + d := st.Pop() + return new(big.Int).SetBytes(d[:]) } func (st *Stack) PopBytes() []byte { @@ -115,33 +115,6 @@ func (st *Stack) PopAddress() crypto.Address { return crypto.AddressFromWord256(st.Pop()) } -func (st *Stack) Pop64() int64 { - d := st.Pop() - if Is64BitOverflow(d) { - st.pushErr(errors.Errorf(errors.Codes.IntegerOverflow, "int64 overflow from word: %v", d)) - return 0 - } - return Int64FromWord256(d) -} - -func (st *Stack) PopU64() uint64 { - d := st.Pop() - if Is64BitOverflow(d) { - st.pushErr(errors.Errorf(errors.Codes.IntegerOverflow, "uint64 overflow from word: %v", d)) - return 0 - } - return Uint64FromWord256(d) -} - -func (st *Stack) PopBigIntSigned() *big.Int { - return S256(st.PopBigInt()) -} - -func (st *Stack) PopBigInt() *big.Int { - d := st.Pop() - return new(big.Int).SetBytes(d[:]) -} - func (st *Stack) Len() int { return st.ptr } @@ -233,3 +206,15 @@ func (st *Stack) ensureCapacity(newCapacity uint64) error { st.slice = st.slice[:newCapacity] return nil } + +func (st *Stack) useGas(gasToUse uint64) { + if *st.gas > gasToUse { + *st.gas -= gasToUse + } else { + st.pushErr(errors.Codes.InsufficientGas) + } +} + +func (st *Stack) pushErr(err errors.CodedError) { + st.errSink.PushError(err) +} diff --git a/execution/exec/event.go b/execution/exec/event.go index ffa600fcc..824e45dec 100644 --- a/execution/exec/event.go +++ b/execution/exec/event.go @@ -3,9 +3,6 @@ package exec import ( "fmt" "reflect" - - "github.com/hyperledger/burrow/event" - "github.com/hyperledger/burrow/event/query" ) var eventMessageType = reflect.TypeOf(&Event{}).String() @@ -96,35 +93,3 @@ func (ev *Event) Body() string { } return "" } - -// Tags -type Events []*Event - -func (tevs Events) Filter(qry query.Query) Events { - var filtered Events - for _, tev := range tevs { - if qry.Matches(tev) { - filtered = append(filtered, tev) - } - } - return filtered -} - -func (ev *Event) Get(key string) (value interface{}, ok bool) { - switch key { - case event.MessageTypeKey: - return eventMessageType, true - } - if ev == nil { - return nil, false - } - v, ok := ev.Log.Get(key) - if ok { - return v, true - } - v, ok = query.GetReflect(reflect.ValueOf(ev.Header), key) - if ok { - return v, true - } - return query.GetReflect(reflect.ValueOf(ev), key) -} diff --git a/execution/exec/events.go b/execution/exec/events.go new file mode 100644 index 000000000..5961e4137 --- /dev/null +++ b/execution/exec/events.go @@ -0,0 +1,114 @@ +package exec + +import ( + "fmt" + "reflect" + "strings" + + "github.com/hyperledger/burrow/event" + "github.com/hyperledger/burrow/event/query" + "github.com/hyperledger/burrow/execution/errors" +) + +type Events []*Event + +func (evs *Events) Append(tail ...*Event) { + for i, ev := range tail { + if ev != nil && ev.Header != nil { + ev.Header.Index = uint64(len(*evs) + i) + } + } + *evs = append(*evs, tail...) +} + +func (evs *Events) Call(call *CallEvent, exception *errors.Exception) error { + evs.Append(&Event{ + Header: &Header{ + EventType: TypeCall, + EventID: EventStringAccountCall(call.CallData.Callee), + Exception: exception, + }, + Call: call, + }) + return nil +} + +func (evs *Events) Log(log *LogEvent) error { + evs.Append(&Event{ + Header: &Header{ + EventType: TypeLog, + EventID: EventStringLogEvent(log.Address), + }, + Log: log, + }) + return nil +} + +func (evs Events) CallTrace() string { + var calls []string + for _, ev := range evs { + if ev.Call != nil { + ex := "" + if ev.Header.Exception != nil { + ex = fmt.Sprintf(" [%v]", ev.Header.Exception) + } + calls = append(calls, fmt.Sprintf("%v: %v -> %v: %v%s", + ev.Call.CallType, ev.Call.CallData.Caller, ev.Call.CallData.Callee, ev.Call.Return, ex)) + } + } + return strings.Join(calls, "\n") +} + +func (evs Events) ExceptionalCalls() []*Event { + var exCalls []*Event + for _, ev := range evs { + if ev.Call != nil && ev.Header.Exception != nil { + exCalls = append(exCalls, ev) + } + } + return exCalls +} + +func (evs Events) NestedCallErrors() []errors.NestedCallError { + var nestedErrors []errors.NestedCallError + for _, ev := range evs { + if ev.Call != nil && ev.Header.Exception != nil { + nestedErrors = append(nestedErrors, errors.NestedCallError{ + CodedError: ev.Header.Exception, + Caller: ev.Call.CallData.Caller, + Callee: ev.Call.CallData.Callee, + StackDepth: ev.Call.StackDepth, + }) + } + } + return nestedErrors +} + +func (evs Events) Filter(qry query.Query) Events { + var filtered Events + for _, tev := range evs { + if qry.Matches(tev) { + filtered = append(filtered, tev) + } + } + return filtered +} + +func (ev *Event) Get(key string) (value interface{}, ok bool) { + switch key { + case event.MessageTypeKey: + return eventMessageType, true + } + if ev == nil { + return nil, false + } + v, ok := ev.Log.Get(key) + if ok { + return v, true + } + v, ok = query.GetReflect(reflect.ValueOf(ev.Header), key) + if ok { + return v, true + } + return query.GetReflect(reflect.ValueOf(ev), key) +} diff --git a/execution/exec/tx_execution.go b/execution/exec/tx_execution.go index 6b46dc344..cc1d30a5e 100644 --- a/execution/exec/tx_execution.go +++ b/execution/exec/tx_execution.go @@ -3,7 +3,6 @@ package exec import ( "fmt" "reflect" - "strings" "github.com/hyperledger/burrow/binary" @@ -146,48 +145,20 @@ func (txe *TxExecution) PushError(err error) bool { } func (txe *TxExecution) CallTrace() string { - var calls []string - for _, ev := range txe.Events { - if ev.Call != nil { - ex := "" - if ev.Header.Exception != nil { - ex = fmt.Sprintf(" [%v]", ev.Header.Exception) - } - calls = append(calls, fmt.Sprintf("%v: %v -> %v: %v%s", - ev.Call.CallType, ev.Call.CallData.Caller, ev.Call.CallData.Callee, ev.Call.Return, ex)) - } - } - return strings.Join(calls, "\n") + return Events(txe.Events).CallTrace() } func (txe *TxExecution) ExceptionalCalls() []*Event { - var exCalls []*Event - for _, ev := range txe.Events { - if ev.Call != nil && ev.Header.Exception != nil { - exCalls = append(exCalls, ev) - } - } - return exCalls + return Events(txe.Events).ExceptionalCalls() } func (txe *TxExecution) CallError() *errors.CallError { if txe.Exception == nil { return nil } - var nestedErrors []errors.NestedCallError - for _, ev := range txe.Events { - if ev.Call != nil && ev.Header.Exception != nil { - nestedErrors = append(nestedErrors, errors.NestedCallError{ - CodedError: ev.Header.Exception, - Caller: ev.Call.CallData.Caller, - Callee: ev.Call.CallData.Callee, - StackDepth: ev.Call.StackDepth, - }) - } - } return &errors.CallError{ CodedError: txe.Exception, - NestedErrors: nestedErrors, + NestedErrors: Events(txe.Events).NestedCallErrors(), } } diff --git a/execution/native/gas.go b/execution/native/gas.go index 450389ac6..8e0b98211 100644 --- a/execution/native/gas.go +++ b/execution/native/gas.go @@ -28,6 +28,8 @@ const ( GasSha256Base uint64 = 1 GasRipemd160Word uint64 = 1 GasRipemd160Base uint64 = 1 + GasExpModWord uint64 = 1 + GasExpModBase uint64 = 1 GasIdentityWord uint64 = 1 GasIdentityBase uint64 = 1 ) diff --git a/execution/native/precompiles.go b/execution/native/precompiles.go index bf024b15f..ff14fb283 100644 --- a/execution/native/precompiles.go +++ b/execution/native/precompiles.go @@ -2,6 +2,7 @@ package native import ( "crypto/sha256" + "fmt" "math/big" "github.com/hyperledger/burrow/binary" @@ -27,7 +28,11 @@ var Precompiles = New(). MustFunction(`Compute the operation base**exp % mod where the values are big ints`, leftPadAddress(5), permission.None, - bigModExp) + expModFunc) + +func leftPadAddress(bs ...byte) crypto.Address { + return crypto.AddressFromWord256(binary.LeftPadWord256(bs)) +} /* Removed due to C dependency func ecrecoverFunc(state State, caller crypto.Address, input []byte, gas *int64) (output []byte, err error) { @@ -55,7 +60,7 @@ OH NO STOCASTIC CAT CODING!!!! func sha256Func(ctx Context) (output []byte, err error) { // Deduct gas - gasRequired := uint64((len(ctx.Input)+31)/32)*GasSha256Word + GasSha256Base + gasRequired := wordsIn(uint64(len(ctx.Input)))*GasSha256Word + GasSha256Base if *ctx.Gas < gasRequired { return nil, errors.Codes.InsufficientGas } else { @@ -70,7 +75,7 @@ func sha256Func(ctx Context) (output []byte, err error) { func ripemd160Func(ctx Context) (output []byte, err error) { // Deduct gas - gasRequired := uint64((len(ctx.Input)+31)/32)*GasRipemd160Word + GasRipemd160Base + gasRequired := wordsIn(uint64(len(ctx.Input)))*GasRipemd160Word + GasRipemd160Base if *ctx.Gas < gasRequired { return nil, errors.Codes.InsufficientGas } else { @@ -85,7 +90,7 @@ func ripemd160Func(ctx Context) (output []byte, err error) { func identityFunc(ctx Context) (output []byte, err error) { // Deduct gas - gasRequired := uint64((len(ctx.Input)+31)/32)*GasIdentityWord + GasIdentityBase + gasRequired := wordsIn(uint64(len(ctx.Input)))*GasIdentityWord + GasIdentityBase if *ctx.Gas < gasRequired { return nil, errors.Codes.InsufficientGas } else { @@ -95,62 +100,74 @@ func identityFunc(ctx Context) (output []byte, err error) { return ctx.Input, nil } -const ( - // gas requirement for bigModExp set to 1 - GasRequire uint64 = 1 -) - -// bigModExp: function that implement the EIP 198 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-198.md with a fixed gas requirement) -func bigModExp(ctx Context) (output []byte, err error) { +// expMod: function that implements the EIP 198 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-198.md with +// a fixed gas requirement) +func expModFunc(ctx Context) (output []byte, err error) { + const errHeader = "expModFunc" - if *ctx.Gas < GasRequire { - return nil, errors.Codes.InsufficientGas + input, segments, err := cut(ctx.Input, binary.Word256Bytes, binary.Word256Bytes, binary.Word256Bytes) + if err != nil { + return nil, fmt.Errorf("%s: %v", errHeader, err) } - *ctx.Gas -= GasRequire // get the lengths of base, exp and mod - baseLen := new(big.Int).SetBytes(binary.RightPadBytes(ctx.Input[0:32], 32)).Uint64() - expLen := new(big.Int).SetBytes(binary.RightPadBytes(ctx.Input[32:64], 32)).Uint64() - modLen := new(big.Int).SetBytes(binary.RightPadBytes(ctx.Input[64:96], 32)).Uint64() + baseLength := getUint64(segments[0]) + expLength := getUint64(segments[1]) + modLength := getUint64(segments[2]) - // shift input array to the actual values - if len(ctx.Input) > 96 { - ctx.Input = ctx.Input[96:] - } else { - ctx.Input = ctx.Input[:0] + // TODO: implement non-trivial gas schedule for this operation. Probably a parameterised version of the one + // described in EIP though that one seems like a bit of a complicated fudge + gasRequired := GasExpModBase + GasExpModWord*(wordsIn(baseLength)*wordsIn(expLength)*wordsIn(modLength)) + + if *ctx.Gas < gasRequired { + return nil, errors.Codes.InsufficientGas } - // handle the case when tehre is no base nor mod - if baseLen+modLen == 0 { - return []byte{}, nil + *ctx.Gas -= gasRequired + + input, segments, err = cut(input, baseLength, expLength, modLength) + if err != nil { + return nil, fmt.Errorf("%s: %v", errHeader, err) } // get the values of base, exp and mod - base := new(big.Int).SetBytes(getData(ctx.Input, 0, baseLen)) - exp := new(big.Int).SetBytes(getData(ctx.Input, baseLen, expLen)) - mod := new(big.Int).SetBytes(getData(ctx.Input, baseLen+expLen, modLen)) + base := getBigInt(segments[0], baseLength) + exp := getBigInt(segments[1], expLength) + mod := getBigInt(segments[2], modLength) + // handle mod 0 if mod.Sign() == 0 { - return binary.LeftPadBytes([]byte{}, int(modLen)), nil + return binary.LeftPadBytes([]byte{}, int(modLength)), nil } - // return base**exp % mod left padded - return binary.LeftPadBytes(new(big.Int).Exp(base, exp, mod).Bytes(), int(modLen)), nil + // return base**exp % mod left padded + return binary.LeftPadBytes(new(big.Int).Exp(base, exp, mod).Bytes(), int(modLength)), nil } -// auxiliar function to retrieve data from arrays -func getData(data []byte, start uint64, size uint64) []byte { - length := uint64(len(data)) - if start > length { - start = length - } - end := start + size - if end > length { - end = length +// Partition the head of input into segments for each length in lengths. The first return value is the unconsumed tail +// of input and the seconds is the segments. Returns an error if input is of insufficient length to establish each segment. +func cut(input []byte, lengths ...uint64) ([]byte, [][]byte, error) { + segments := make([][]byte, len(lengths)) + for i, length := range lengths { + if uint64(len(input)) < length { + return nil, nil, fmt.Errorf("input is not long enough") + } + segments[i] = input[:length] + input = input[length:] } - return binary.RightPadBytes(data[start:end], int(size)) + return input, segments, nil } -func leftPadAddress(bs ...byte) crypto.Address { - return crypto.AddressFromWord256(binary.LeftPadWord256(bs)) +func getBigInt(bs []byte, numBytes uint64) *big.Int { + bits := uint(numBytes) * 8 + // Push bytes into big.Int and interpret as twos complement encoding with of bits width + return binary.FromTwosComplement(new(big.Int).SetBytes(bs), bits) +} + +func getUint64(bs []byte) uint64 { + return binary.Uint64FromWord256(binary.LeftPadWord256(bs)) +} + +func wordsIn(numBytes uint64) uint64 { + return numBytes + binary.Word256Bytes - 1/binary.Word256Bytes } diff --git a/execution/solidity/big_mod.sol b/execution/solidity/big_mod.sol new file mode 100644 index 000000000..14d0a87d8 --- /dev/null +++ b/execution/solidity/big_mod.sol @@ -0,0 +1,31 @@ +pragma solidity ^0.5.4; + +contract BigMod { + function expmod(int256 base, int256 e, int256 m, int256 proof) public returns (uint256) { + bool success; + int256 o; + + assembly { + + let p := mload(0x40) + // store data assembly-favouring ways + mstore(p, 0x20) // Length of Base + mstore(add(p, 0x20), 0x20) // Length of Exponent + mstore(add(p, 0x40), 0x20) // Length of Modulus + mstore(add(p, 0x60), base) // Base + mstore(add(p, 0x80), e) // Exponent + mstore(add(p, 0xa0), m) // Modulus + // call modexp precompile + success := call(sub(gas, 2000), 0x05, 0, p, 0xc0, p, 0x20) + // gas fiddling + + o := mload(p) + + } + require(success); + if (proof == o) { + return 1; + } + return 0; + } +} diff --git a/execution/solidity/big_mod.sol.go b/execution/solidity/big_mod.sol.go new file mode 100644 index 000000000..7a1a2b6d3 --- /dev/null +++ b/execution/solidity/big_mod.sol.go @@ -0,0 +1,7 @@ +package solidity + +import hex "github.com/tmthrgd/go-hex" + +var Bytecode_BigMod = hex.MustDecodeString("608060405234801561001057600080fd5b5061012a806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a841705414602d575b600080fd5b607460048036036080811015604157600080fd5b8101908080359060200190929190803590602001909291908035906020019092919080359060200190929190505050608a565b6040518082815260200191505060405180910390f35b600080600060405160208152602080820152602060408201528760608201528660808201528560a082015260208160c083600060056107d05a03f1925080519150508160d557600080fd5b8084141560e65760019250505060ed565b6000925050505b94935050505056fea265627a7a72315820636fd56ce071c30b9389006e4ac7d726a569ba9619e4fdc457532cee13b20c0464736f6c634300050c0032") +var DeployedBytecode_BigMod = hex.MustDecodeString("6080604052348015600f57600080fd5b506004361060285760003560e01c8063a841705414602d575b600080fd5b607460048036036080811015604157600080fd5b8101908080359060200190929190803590602001909291908035906020019092919080359060200190929190505050608a565b6040518082815260200191505060405180910390f35b600080600060405160208152602080820152602060408201528760608201528660808201528560a082015260208160c083600060056107d05a03f1925080519150508160d557600080fd5b8084141560e65760019250505060ed565b6000925050505b94935050505056fea265627a7a72315820636fd56ce071c30b9389006e4ac7d726a569ba9619e4fdc457532cee13b20c0464736f6c634300050c0032") +var Abi_BigMod = []byte(`[{"constant":false,"inputs":[{"internalType":"int256","name":"base","type":"int256"},{"internalType":"int256","name":"e","type":"int256"},{"internalType":"int256","name":"m","type":"int256"},{"internalType":"int256","name":"proof","type":"int256"}],"name":"expmod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]`) diff --git a/execution/state/accounts.go b/execution/state/accounts.go index 6524e5486..cef3619f1 100644 --- a/execution/state/accounts.go +++ b/execution/state/accounts.go @@ -149,13 +149,13 @@ func (s *ReadState) IterateStorage(address crypto.Address, consumer func(key bin return tree.Iterate(nil, nil, true, func(key []byte, value []byte) error { - if len(key) != binary.Word256Length { + if len(key) != binary.Word256Bytes { return fmt.Errorf("key '%X' stored for account %s is not a %v-byte word", - key, address, binary.Word256Length) + key, address, binary.Word256Bytes) } - if len(value) != binary.Word256Length { + if len(value) != binary.Word256Bytes { return fmt.Errorf("value '%X' stored for account %s is not a %v-byte word", - key, address, binary.Word256Length) + key, address, binary.Word256Bytes) } return consumer(binary.LeftPadWord256(key), value) }) diff --git a/execution/state/state.go b/execution/state/state.go index 930a1378e..7a6038af0 100644 --- a/execution/state/state.go +++ b/execution/state/state.go @@ -69,7 +69,7 @@ var keys = KeyFormatStore{ // AccountAddress -> Account Account: storage.NewMustKeyFormat("a", crypto.AddressLength), // AccountAddress, Key -> Value - Storage: storage.NewMustKeyFormat("s", crypto.AddressLength, binary.Word256Length), + Storage: storage.NewMustKeyFormat("s", crypto.AddressLength, binary.Word256Bytes), // Name -> Entry Name: storage.NewMustKeyFormat("n", storage.VariadicSegmentLength), // ProposalHash -> Proposal diff --git a/integration/rpctransact/call_test.go b/integration/rpctransact/call_test.go index bd2dcc8b7..b77b83dc3 100644 --- a/integration/rpctransact/call_test.go +++ b/integration/rpctransact/call_test.go @@ -357,7 +357,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) var direction string var depth int64 evAbi := spec.EventsByName["ChangeLevel"] - err = abi.UnpackEvent(&evAbi, log.Topics, log.Data, &direction, &depth) + err = abi.UnpackEvent(evAbi, log.Topics, log.Data, &direction, &depth) require.NoError(t, err) assert.Equal(t, evAbi.ID.Bytes(), log.Topics[0].Bytes()) assert.Equal(t, int64(18), depth) @@ -382,7 +382,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) data := abi.GetPackingTypes(evAbi.Inputs) // Check signature assert.Equal(t, evAbi.ID.Bytes(), log.Topics[0].Bytes()) - err = abi.UnpackEvent(&evAbi, log.Topics, log.Data.Bytes(), data...) + err = abi.UnpackEvent(evAbi, log.Topics, log.Data.Bytes(), data...) require.NoError(t, err) h := sha3.NewLegacyKeccak256() @@ -424,7 +424,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) data[i] = new(string) } } - err = abi.UnpackEvent(&evAbi, log.Topics, log.Data.Bytes(), data...) + err = abi.UnpackEvent(evAbi, log.Topics, log.Data.Bytes(), data...) require.NoError(t, err) h := sha3.NewLegacyKeccak256() diff --git a/permission/base_permissions.go b/permission/base_permissions.go index 5a259bad3..bc07f39e1 100644 --- a/permission/base_permissions.go +++ b/permission/base_permissions.go @@ -6,8 +6,8 @@ import "fmt" // ErrValueNotSet is returned if the permission's set bits are not all on, // and should be caught by caller so the global permission can be fetched func (bp BasePermissions) Get(ty PermFlag) (bool, error) { - if ty == 0 { - return false, ErrInvalidPermission(ty) + if ty == None { + return true, nil } if !bp.IsSet(ty) { return false, ErrValueNotSet(ty) @@ -17,8 +17,8 @@ func (bp BasePermissions) Get(ty PermFlag) (bool, error) { // Set a permission bit. Will set the permission's set bit to true. func (bp *BasePermissions) Set(ty PermFlag, value bool) error { - if ty == 0 { - return ErrInvalidPermission(ty) + if ty == None { + return nil } bp.SetBit |= ty if value { @@ -31,8 +31,8 @@ func (bp *BasePermissions) Set(ty PermFlag, value bool) error { // Set the permission's set bits to false func (bp *BasePermissions) Unset(ty PermFlag) error { - if ty == 0 { - return ErrInvalidPermission(ty) + if ty == None { + return nil } bp.SetBit &= ^ty return nil @@ -40,7 +40,7 @@ func (bp *BasePermissions) Unset(ty PermFlag) error { // Check if the permission is set func (bp BasePermissions) IsSet(ty PermFlag) bool { - if ty == 0 { + if ty == None { return false } return bp.SetBit&ty == ty diff --git a/vent/service/abi_provider.go b/vent/service/abi_provider.go index c339663aa..3b08d478a 100644 --- a/vent/service/abi_provider.go +++ b/vent/service/abi_provider.go @@ -22,7 +22,7 @@ type AbiProvider struct { // NewAbiProvider loads ABIs from the filesystem. A set of zero or more files or directories can be passed in the path // argument. If an event is encountered for which no ABI is known, it is retrieved from burrow func NewAbiProvider(paths []string, cli rpcquery.QueryClient, logger *logging.Logger) (provider *AbiProvider, err error) { - abiSpec := &abi.Spec{} + abiSpec := abi.NewSpec() if len(paths) > 0 { abiSpec, err = abi.LoadPath(paths...) if err != nil { @@ -66,5 +66,5 @@ func (p *AbiProvider) GetEventAbi(eventID abi.EventID, address crypto.Address) ( p.abiSpec = abi.MergeSpec([]*abi.Spec{p.abiSpec, a}) } - return &evAbi, nil + return evAbi, nil } diff --git a/vent/service/block_consumer_test.go b/vent/service/block_consumer_test.go index ecd546c1a..0402408b2 100644 --- a/vent/service/block_consumer_test.go +++ b/vent/service/block_consumer_test.go @@ -46,7 +46,7 @@ func TestBlockConsumer(t *testing.T) { } direction := "frogs" copy(in.Direction, direction) - topics, data, err := abi.PackEvent(&manyTypesEventSpec, in) + topics, data, err := abi.PackEvent(manyTypesEventSpec, in) require.NoError(t, err) log := &exec.LogEvent{ Address: crypto.Address{}, From dd380a1b2773a06199d9c1f18d284179bb4aa9a0 Mon Sep 17 00:00:00 2001 From: AdeebAhmed Date: Tue, 8 Oct 2019 13:29:34 -0500 Subject: [PATCH 029/185] Replace long licence headers with a concise one Signed-off-by: AdeebAhmed --- acm/account.go | 15 ++------------- acm/account_test.go | 15 ++------------- acm/acmstate/state_cache.go | 15 ++------------- acm/private_account.go | 15 ++------------- bcm/blockchain.go | 15 ++------------- binary/byteslice.go | 15 ++------------- binary/integer.go | 15 ++------------- binary/word256.go | 15 ++------------- cmd/burrow/commands/natives.go | 15 ++------------- core/kernel.go | 15 ++------------- event/emitter.go | 15 ++------------- execution/evm/asm/opcodes.go | 15 ++------------- execution/evm/evm.go | 15 ++------------- execution/evm/evm_test.go | 15 ++------------- execution/evm/stack.go | 15 ++------------- execution/exec/log_event.go | 15 ++------------- execution/execution.go | 15 ++------------- execution/execution_test.go | 15 ++------------- execution/names/cache.go | 15 ++------------- execution/names/cache_test.go | 15 ++------------- execution/names/names.go | 15 ++------------- execution/native/contract.go | 15 ++------------- execution/native/gas.go | 15 ++------------- execution/native/natives.go | 15 ++------------- execution/native/permissions_test.go | 15 ++------------- execution/proposal/cache.go | 15 ++------------- execution/registry/cache.go | 15 ++------------- execution/registry/registry.go | 15 ++------------- execution/state/state.go | 15 ++------------- execution/transactor.go | 15 ++------------- execution/transactor_test.go | 15 ++------------- genesis/genesis.go | 15 ++------------- integration/integration.go | 15 ++------------- .../rpcevents/execution_events_server_test.go | 15 ++------------- integration/rpcinfo/info_server_test.go | 15 ++------------- integration/rpctransact/transact_server_test.go | 15 ++------------- keys/key_client.go | 15 ++------------- keys/mock/key_client.go | 15 ++------------- logging/logger.go | 15 ++------------- logging/logger_test.go | 15 ++------------- logging/loggers/burrow_format_logger.go | 15 ++------------- logging/loggers/channel_logger.go | 15 ++------------- logging/loggers/channel_logger_test.go | 15 ++------------- logging/loggers/multiple_output_logger.go | 15 ++------------- logging/loggers/multiple_output_logger_test.go | 15 ++------------- logging/loggers/vector_valued_logger.go | 15 ++------------- logging/loggers/vector_valued_logger_test.go | 15 ++------------- logging/structure/structure.go | 15 ++------------- logging/structure/structure_test.go | 15 ++------------- logging/terminal.go | 15 ++------------- permission/errors.go | 15 ++------------- permission/permissions.go | 15 ++------------- permission/snatives.go | 15 ++------------- permission/util.go | 15 ++------------- rpc/codec.go | 15 ++------------- rpc/jsonrpc.go | 15 ++------------- rpc/metrics/exporter.go | 15 ++------------- rpc/metrics/server.go | 15 ++------------- rpc/result.go | 15 ++------------- rpc/result_test.go | 15 ++------------- rpc/rpcinfo/info_server.go | 15 ++------------- rpc/rpcinfo/infoclient/client.go | 15 ++------------- rpc/service.go | 15 ++------------- txs/tx.go | 15 ++------------- txs/tx_test.go | 15 ++------------- util/architecture/constants.go | 15 ++------------- util/architecture/constants_arm.go | 15 ++------------- util/fs.go | 15 ++------------- util/logging/cmd/main.go | 15 ++------------- util/natives/templates/indent_writer.go | 15 ++------------- util/natives/templates/solidity_templates.go | 15 ++------------- util/natives/templates/solidity_templates_test.go | 15 ++------------- util/os.go | 15 ++------------- util/slice/slice.go | 15 ++------------- util/slice/slice_test.go | 15 ++------------- 75 files changed, 150 insertions(+), 975 deletions(-) diff --git a/acm/account.go b/acm/account.go index 4580b3d57..bde1c375a 100644 --- a/acm/account.go +++ b/acm/account.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package acm diff --git a/acm/account_test.go b/acm/account_test.go index 8e97a7a20..14a8f0e33 100644 --- a/acm/account_test.go +++ b/acm/account_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package acm diff --git a/acm/acmstate/state_cache.go b/acm/acmstate/state_cache.go index 8b0487931..baf801c1c 100644 --- a/acm/acmstate/state_cache.go +++ b/acm/acmstate/state_cache.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package acmstate diff --git a/acm/private_account.go b/acm/private_account.go index 3cc2b7ab6..6b94208df 100644 --- a/acm/private_account.go +++ b/acm/private_account.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package acm diff --git a/bcm/blockchain.go b/bcm/blockchain.go index aaa4c5f65..2f8c70f49 100644 --- a/bcm/blockchain.go +++ b/bcm/blockchain.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package bcm diff --git a/binary/byteslice.go b/binary/byteslice.go index 286280b32..3824f50d9 100644 --- a/binary/byteslice.go +++ b/binary/byteslice.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package binary diff --git a/binary/integer.go b/binary/integer.go index f2d7b65a9..3c5d13d20 100644 --- a/binary/integer.go +++ b/binary/integer.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package binary diff --git a/binary/word256.go b/binary/word256.go index 00716ba43..3dfeb5050 100644 --- a/binary/word256.go +++ b/binary/word256.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package binary diff --git a/cmd/burrow/commands/natives.go b/cmd/burrow/commands/natives.go index 4a2dd2814..89dd8fbb8 100644 --- a/cmd/burrow/commands/natives.go +++ b/cmd/burrow/commands/natives.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package commands diff --git a/core/kernel.go b/core/kernel.go index cd109701c..c76dd0edc 100644 --- a/core/kernel.go +++ b/core/kernel.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package core diff --git a/event/emitter.go b/event/emitter.go index 52d420110..42b9bf94f 100644 --- a/event/emitter.go +++ b/event/emitter.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package event diff --git a/execution/evm/asm/opcodes.go b/execution/evm/asm/opcodes.go index 23d67a159..62344e173 100644 --- a/execution/evm/asm/opcodes.go +++ b/execution/evm/asm/opcodes.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package asm diff --git a/execution/evm/evm.go b/execution/evm/evm.go index 0e2539c74..17a2afd72 100644 --- a/execution/evm/evm.go +++ b/execution/evm/evm.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package evm diff --git a/execution/evm/evm_test.go b/execution/evm/evm_test.go index 75ab6993c..43ec1121c 100644 --- a/execution/evm/evm_test.go +++ b/execution/evm/evm_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package evm diff --git a/execution/evm/stack.go b/execution/evm/stack.go index c7cfb30c7..84ca57765 100644 --- a/execution/evm/stack.go +++ b/execution/evm/stack.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package evm diff --git a/execution/exec/log_event.go b/execution/exec/log_event.go index 9d245963c..5d457cfdf 100644 --- a/execution/exec/log_event.go +++ b/execution/exec/log_event.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package exec diff --git a/execution/execution.go b/execution/execution.go index 43504cfba..547638c83 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package execution diff --git a/execution/execution_test.go b/execution/execution_test.go index c4519d8f0..53bf26229 100644 --- a/execution/execution_test.go +++ b/execution/execution_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package execution diff --git a/execution/names/cache.go b/execution/names/cache.go index 6904c22a2..a2602038b 100644 --- a/execution/names/cache.go +++ b/execution/names/cache.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package names diff --git a/execution/names/cache_test.go b/execution/names/cache_test.go index 7b52912c9..1a5b4d77b 100644 --- a/execution/names/cache_test.go +++ b/execution/names/cache_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package names diff --git a/execution/names/names.go b/execution/names/names.go index fd04f44fd..652f18154 100644 --- a/execution/names/names.go +++ b/execution/names/names.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package names diff --git a/execution/native/contract.go b/execution/native/contract.go index 63d1a63f8..cc5779e40 100644 --- a/execution/native/contract.go +++ b/execution/native/contract.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package native diff --git a/execution/native/gas.go b/execution/native/gas.go index 450389ac6..7b415d662 100644 --- a/execution/native/gas.go +++ b/execution/native/gas.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package native diff --git a/execution/native/natives.go b/execution/native/natives.go index 9d661b1a0..f5389567d 100644 --- a/execution/native/natives.go +++ b/execution/native/natives.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package native diff --git a/execution/native/permissions_test.go b/execution/native/permissions_test.go index f54f5477a..269f2884e 100644 --- a/execution/native/permissions_test.go +++ b/execution/native/permissions_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package native diff --git a/execution/proposal/cache.go b/execution/proposal/cache.go index 6a6709453..61fedb968 100644 --- a/execution/proposal/cache.go +++ b/execution/proposal/cache.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package proposal diff --git a/execution/registry/cache.go b/execution/registry/cache.go index f0f222ce7..46cac74d0 100644 --- a/execution/registry/cache.go +++ b/execution/registry/cache.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package registry diff --git a/execution/registry/registry.go b/execution/registry/registry.go index 378673684..c3cd8062f 100644 --- a/execution/registry/registry.go +++ b/execution/registry/registry.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package registry diff --git a/execution/state/state.go b/execution/state/state.go index 930a1378e..ea60eb6aa 100644 --- a/execution/state/state.go +++ b/execution/state/state.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package state diff --git a/execution/transactor.go b/execution/transactor.go index 1a0447814..1cffac2f1 100644 --- a/execution/transactor.go +++ b/execution/transactor.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package execution diff --git a/execution/transactor_test.go b/execution/transactor_test.go index f796ba203..ac7d5b717 100644 --- a/execution/transactor_test.go +++ b/execution/transactor_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package execution diff --git a/genesis/genesis.go b/genesis/genesis.go index b31b7a8cf..fcd11a751 100644 --- a/genesis/genesis.go +++ b/genesis/genesis.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package genesis diff --git a/integration/integration.go b/integration/integration.go index 938cbc3c5..0ddd21f38 100644 --- a/integration/integration.go +++ b/integration/integration.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package integration diff --git a/integration/rpcevents/execution_events_server_test.go b/integration/rpcevents/execution_events_server_test.go index 3e564c68d..bb9521008 100644 --- a/integration/rpcevents/execution_events_server_test.go +++ b/integration/rpcevents/execution_events_server_test.go @@ -1,19 +1,8 @@ // +build integration // Space above here matters -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package rpcevents diff --git a/integration/rpcinfo/info_server_test.go b/integration/rpcinfo/info_server_test.go index 06bc695b7..4ce7fd050 100644 --- a/integration/rpcinfo/info_server_test.go +++ b/integration/rpcinfo/info_server_test.go @@ -1,19 +1,8 @@ // +build integration // Space above here matters -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package rpcinfo diff --git a/integration/rpctransact/transact_server_test.go b/integration/rpctransact/transact_server_test.go index 7c41e409e..74bb07998 100644 --- a/integration/rpctransact/transact_server_test.go +++ b/integration/rpctransact/transact_server_test.go @@ -1,19 +1,8 @@ // +build integration // Space above here matters -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package rpctransact diff --git a/keys/key_client.go b/keys/key_client.go index 5824c93f7..4720a8e74 100644 --- a/keys/key_client.go +++ b/keys/key_client.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package keys diff --git a/keys/mock/key_client.go b/keys/mock/key_client.go index 34be8f2ed..13580d7bf 100644 --- a/keys/mock/key_client.go +++ b/keys/mock/key_client.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package mock diff --git a/logging/logger.go b/logging/logger.go index 024aa17b4..a3d6219f1 100644 --- a/logging/logger.go +++ b/logging/logger.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package logging diff --git a/logging/logger_test.go b/logging/logger_test.go index cde075ff4..1f427d7a4 100644 --- a/logging/logger_test.go +++ b/logging/logger_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package logging diff --git a/logging/loggers/burrow_format_logger.go b/logging/loggers/burrow_format_logger.go index c4ccfb497..2ee567edb 100644 --- a/logging/loggers/burrow_format_logger.go +++ b/logging/loggers/burrow_format_logger.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package loggers diff --git a/logging/loggers/channel_logger.go b/logging/loggers/channel_logger.go index 26c9145b9..c3363b07d 100644 --- a/logging/loggers/channel_logger.go +++ b/logging/loggers/channel_logger.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package loggers diff --git a/logging/loggers/channel_logger_test.go b/logging/loggers/channel_logger_test.go index ee8a105e9..41ecef8a8 100644 --- a/logging/loggers/channel_logger_test.go +++ b/logging/loggers/channel_logger_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package loggers diff --git a/logging/loggers/multiple_output_logger.go b/logging/loggers/multiple_output_logger.go index 7fe692486..0d621d9a2 100644 --- a/logging/loggers/multiple_output_logger.go +++ b/logging/loggers/multiple_output_logger.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package loggers diff --git a/logging/loggers/multiple_output_logger_test.go b/logging/loggers/multiple_output_logger_test.go index ad41b3ca5..fbf1ebf8f 100644 --- a/logging/loggers/multiple_output_logger_test.go +++ b/logging/loggers/multiple_output_logger_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package loggers diff --git a/logging/loggers/vector_valued_logger.go b/logging/loggers/vector_valued_logger.go index 26f61c1ff..bfea8da78 100644 --- a/logging/loggers/vector_valued_logger.go +++ b/logging/loggers/vector_valued_logger.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package loggers diff --git a/logging/loggers/vector_valued_logger_test.go b/logging/loggers/vector_valued_logger_test.go index 8b60e3596..22221a2c4 100644 --- a/logging/loggers/vector_valued_logger_test.go +++ b/logging/loggers/vector_valued_logger_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package loggers diff --git a/logging/structure/structure.go b/logging/structure/structure.go index a4d5e2461..841b51afc 100644 --- a/logging/structure/structure.go +++ b/logging/structure/structure.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package structure diff --git a/logging/structure/structure_test.go b/logging/structure/structure_test.go index e8064908b..34414e1de 100644 --- a/logging/structure/structure_test.go +++ b/logging/structure/structure_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package structure diff --git a/logging/terminal.go b/logging/terminal.go index 156f602d7..1229287c5 100644 --- a/logging/terminal.go +++ b/logging/terminal.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package logging diff --git a/permission/errors.go b/permission/errors.go index 316ee913d..0bcdc47d9 100644 --- a/permission/errors.go +++ b/permission/errors.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package permission diff --git a/permission/permissions.go b/permission/permissions.go index 3cac17d4e..b06df982e 100644 --- a/permission/permissions.go +++ b/permission/permissions.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package permission diff --git a/permission/snatives.go b/permission/snatives.go index 649fcc111..4e8b37fd6 100644 --- a/permission/snatives.go +++ b/permission/snatives.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package permission diff --git a/permission/util.go b/permission/util.go index fc81e510d..a27edb2dd 100644 --- a/permission/util.go +++ b/permission/util.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package permission diff --git a/rpc/codec.go b/rpc/codec.go index bbf0ba604..2449a4492 100644 --- a/rpc/codec.go +++ b/rpc/codec.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package rpc diff --git a/rpc/jsonrpc.go b/rpc/jsonrpc.go index b9b52e910..b2b200f83 100644 --- a/rpc/jsonrpc.go +++ b/rpc/jsonrpc.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package rpc diff --git a/rpc/metrics/exporter.go b/rpc/metrics/exporter.go index b6a46c882..c9a959f3e 100644 --- a/rpc/metrics/exporter.go +++ b/rpc/metrics/exporter.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package metrics import ( diff --git a/rpc/metrics/server.go b/rpc/metrics/server.go index ac9ed0658..0bc371efe 100644 --- a/rpc/metrics/server.go +++ b/rpc/metrics/server.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package metrics import ( diff --git a/rpc/result.go b/rpc/result.go index 48f897ca3..65af2bbee 100644 --- a/rpc/result.go +++ b/rpc/result.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package rpc diff --git a/rpc/result_test.go b/rpc/result_test.go index c179e7d12..680f274dd 100644 --- a/rpc/result_test.go +++ b/rpc/result_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package rpc diff --git a/rpc/rpcinfo/info_server.go b/rpc/rpcinfo/info_server.go index 156f9c831..b009c901f 100644 --- a/rpc/rpcinfo/info_server.go +++ b/rpc/rpcinfo/info_server.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package rpcinfo diff --git a/rpc/rpcinfo/infoclient/client.go b/rpc/rpcinfo/infoclient/client.go index 292eeb732..3e21683d8 100644 --- a/rpc/rpcinfo/infoclient/client.go +++ b/rpc/rpcinfo/infoclient/client.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package infoclient diff --git a/rpc/service.go b/rpc/service.go index a95765d41..65b4013b2 100644 --- a/rpc/service.go +++ b/rpc/service.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package rpc diff --git a/txs/tx.go b/txs/tx.go index 96e7916e5..68c9935f0 100644 --- a/txs/tx.go +++ b/txs/tx.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package txs diff --git a/txs/tx_test.go b/txs/tx_test.go index 9420d10c6..645c1d99e 100644 --- a/txs/tx_test.go +++ b/txs/tx_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package txs diff --git a/util/architecture/constants.go b/util/architecture/constants.go index 695a5fe16..278605978 100644 --- a/util/architecture/constants.go +++ b/util/architecture/constants.go @@ -1,18 +1,7 @@ // +build !arm -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package architecture diff --git a/util/architecture/constants_arm.go b/util/architecture/constants_arm.go index c677498cb..3bb48f377 100644 --- a/util/architecture/constants_arm.go +++ b/util/architecture/constants_arm.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package architecture diff --git a/util/fs.go b/util/fs.go index f9eea8576..698f640ba 100644 --- a/util/fs.go +++ b/util/fs.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package util diff --git a/util/logging/cmd/main.go b/util/logging/cmd/main.go index d0b8acda2..267ae7fab 100644 --- a/util/logging/cmd/main.go +++ b/util/logging/cmd/main.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package main diff --git a/util/natives/templates/indent_writer.go b/util/natives/templates/indent_writer.go index c395f5a9f..44def9c31 100644 --- a/util/natives/templates/indent_writer.go +++ b/util/natives/templates/indent_writer.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package templates diff --git a/util/natives/templates/solidity_templates.go b/util/natives/templates/solidity_templates.go index 47bc48b7b..0aedc2401 100644 --- a/util/natives/templates/solidity_templates.go +++ b/util/natives/templates/solidity_templates.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package templates diff --git a/util/natives/templates/solidity_templates_test.go b/util/natives/templates/solidity_templates_test.go index 729dbe7c9..fcadaae60 100644 --- a/util/natives/templates/solidity_templates_test.go +++ b/util/natives/templates/solidity_templates_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package templates diff --git a/util/os.go b/util/os.go index a205c1c09..77bb4ac79 100644 --- a/util/os.go +++ b/util/os.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package util diff --git a/util/slice/slice.go b/util/slice/slice.go index 945bee4e4..1218dfdeb 100644 --- a/util/slice/slice.go +++ b/util/slice/slice.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package slice diff --git a/util/slice/slice_test.go b/util/slice/slice_test.go index 8ab47c99a..ddfc4690b 100644 --- a/util/slice/slice_test.go +++ b/util/slice/slice_test.go @@ -1,16 +1,5 @@ -// Copyright 2017 Monax Industries Limited -// -// 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. +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 package slice From 2e12ffc2c1a043c9aac329cf77913b3bb629cb24 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Tue, 8 Oct 2019 15:33:28 -0500 Subject: [PATCH 030/185] Prep 0.29.0 release Signed-off-by: Silas Davis --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++---- NOTES.md | 25 +++++++++++++++++++++++-- project/history.go | 33 +++++++++++++++++++++++++++++---- 3 files changed, 83 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eca041e2b..0ce638ba9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,33 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.29.0] - 2019-10-08 +### Changed +- [Config] Reverted rename of ValidatorAddress to Address in config (each Burrow node has a specific validator key it uses for signing whether or not it is running as a validator right now) + +### Fixed +- [EVM] Return integer overflow error code (not stack overflow) for integer overflow errors +- [Docs] Fix broken examples +- [Deploy] Set input on QueryContract jobs correctly +- [EVM] Fix byte-printing for DebugOpcodes run mode +- [Crypto] Use Tendermint-compatible secp256k1 addressing +- [Natives] Make natives first class contracts and establish Dispatcher and Callable as a common calling convention for natives, EVM, and WASM (pending for WASM). +- [Natives] Fix Ethereum precompile addresses (addresses were padded on right instead of the left) + + +### Added +- [Web3] Implemented Ethereum web3 JSON RPC including sendRawTransaction! +- [Docs] Much docs (see also: https://www.hyperledger.org/blog/2019/10/08/burrow-the-boring-blockchain) +- [Docs] Generate github pages docs index with docsify: https://hyperledger.github.io/burrow/ +- [JS] Publish burrow.js to @hyperledger/burrow +- [State] Store EVM ABI and contract metadata on-chain see [GetMetadata](https://github.com/hyperledger/burrow/blob/e80aad5d8fac1f67dbfec61ea75670f9a38c61a1/protobuf/rpcquery.proto#L25) +- [Tendermint] Upgrade to v0.32.3 +- [Execution] Added IdentifyTx for introducing nodes (binding their NodeID to ValidatorAddress) +- [Natives] Implement Ethereum precompile number 5 - modular exponentiation + + + ## [0.28.2] - 2019-08-21 ### Fixed -- [Vent] The new decode event ABI _before_ filter provides more keys but means vent must have access to all possible LogEvent ABIs when it is started. This is not practical in general so we now will will only err if an event matches but we have no ABI. This means we might not notice we have forgot to include an ABI since an event that _would_ have matched on an ABI spec field (prefixed 'Event') will not just not match, and so fail silently. +- [Vent] The new decode event ABI _before_ filter provides more keys but means vent must have access to all possible LogEvent ABIs when it is started. This is not practical in general so we now will will only err if an event matches but we have no ABI. This means we might not notice we have forgot to include an ABI since an event that _would_ have matched on an ABI spec field (prefixed 'Event') will not just not match, and so fail silently. ## [0.28.1] - 2019-08-21 @@ -66,7 +92,7 @@ - [Consensus] Tendermint config CreateEmptyBlocks, CreateEmptyBlocksInterval now work as intended and prevent empty blocks being produced (except when needed for proof purposes) or when the interval expires (when set) ### Added -- [Dump] burrow dump now has local variant that produces a dump directly from a compatible burrow directory rather than over GRPC. If dumping/restoring between state-incompatible versions use burrow dump remote. +- [Dump] burrow dump now has local variant that produces a dump directly from a compatible burrow directory rather than over GRPC. If dumping/restoring between state-incompatible versions use burrow dump remote. ## [0.26.0] - 2019-06-14 @@ -107,7 +133,7 @@ ### Added - [CLI] Introduced burrow configure --pool for generation of multiple validator configs suitable for running on a single (or many) machines - [CLI] Burrow deploy can now run multiple burrow deploy files (aka playbooks) and run them in parallel -- [Consensus] Now possible to run Burrow without Tendermint in 'NoConsensus' mode by setting Tendermint.Enabled = false for faster local testing. Execution.TimeoutFactor can be used to control how regularly Burrow commits (and is used +- [Consensus] Now possible to run Burrow without Tendermint in 'NoConsensus' mode by setting Tendermint.Enabled = false for faster local testing. Execution.TimeoutFactor can be used to control how regularly Burrow commits (and is used ### Fixed - [Execution] Fixed uint64 underflow (when subtracting fee from balance) not protected against in CallContext @@ -123,7 +149,7 @@ - [CLI] Introduced burrow configure --pool for generation of multiple validator configs suitable for running on a single (or many) machines ### Fixed -- [Metrics] Fix histogram statistics by making counts cumulative +- [Metrics] Fix histogram statistics by making counts cumulative ## [0.24.5] - 2019-03-14 @@ -552,6 +578,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.29.0]: https://github.com/hyperledger/burrow/compare/v0.28.2...v0.29.0 [0.28.2]: https://github.com/hyperledger/burrow/compare/v0.28.1...v0.28.2 [0.28.1]: https://github.com/hyperledger/burrow/compare/v0.28.0...v0.28.1 [0.28.0]: https://github.com/hyperledger/burrow/compare/v0.27.0...v0.28.0 diff --git a/NOTES.md b/NOTES.md index 996ae961d..a87f96172 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,24 @@ -### Fixed -- [Vent] The new decode event ABI _before_ filter provides more keys but means vent must have access to all possible LogEvent ABIs when it is started. This is not practical in general so we now will will only err if an event matches but we have no ABI. This means we might not notice we have forgot to include an ABI since an event that _would_ have matched on an ABI spec field (prefixed 'Event') will not just not match, and so fail silently. +### Changed +- [Config] Reverted rename of ValidatorAddress to Address in config (each Burrow node has a specific validator key it uses for signing whether or not it is running as a validator right now) + +### Fixed +- [EVM] Return integer overflow error code (not stack overflow) for integer overflow errors +- [Docs] Fix broken examples +- [Deploy] Set input on QueryContract jobs correctly +- [EVM] Fix byte-printing for DebugOpcodes run mode +- [Crypto] Use Tendermint-compatible secp256k1 addressing +- [Natives] Make natives first class contracts and establish Dispatcher and Callable as a common calling convention for natives, EVM, and WASM (pending for WASM). +- [Natives] Fix Ethereum precompile addresses (addresses were padded on right instead of the left) + + +### Added +- [Web3] Implemented Ethereum web3 JSON RPC including sendRawTransaction! +- [Docs] Much docs (see also: https://www.hyperledger.org/blog/2019/10/08/burrow-the-boring-blockchain) +- [Docs] Generate github pages docs index with docsify: https://hyperledger.github.io/burrow/ +- [JS] Publish burrow.js to @hyperledger/burrow +- [State] Store EVM ABI and contract metadata on-chain see [GetMetadata](https://github.com/hyperledger/burrow/blob/e80aad5d8fac1f67dbfec61ea75670f9a38c61a1/protobuf/rpcquery.proto#L25) +- [Tendermint] Upgrade to v0.32.3 +- [Execution] Added IdentifyTx for introducing nodes (binding their NodeID to ValidatorAddress) +- [Natives] Implement Ethereum precompile number 5 - modular exponentiation + diff --git a/project/history.go b/project/history.go index d4d508850..53c3682e9 100644 --- a/project/history.go +++ b/project/history.go @@ -48,9 +48,34 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.29.0 - 2019-10-08", + `### Changed +- [Config] Reverted rename of ValidatorAddress to Address in config (each Burrow node has a specific validator key it uses for signing whether or not it is running as a validator right now) + +### Fixed +- [EVM] Return integer overflow error code (not stack overflow) for integer overflow errors +- [Docs] Fix broken examples +- [Deploy] Set input on QueryContract jobs correctly +- [EVM] Fix byte-printing for DebugOpcodes run mode +- [Crypto] Use Tendermint-compatible secp256k1 addressing +- [Natives] Make natives first class contracts and establish Dispatcher and Callable as a common calling convention for natives, EVM, and WASM (pending for WASM). +- [Natives] Fix Ethereum precompile addresses (addresses were padded on right instead of the left) + + +### Added +- [Web3] Implemented Ethereum web3 JSON RPC including sendRawTransaction! +- [Docs] Much docs (see also: https://www.hyperledger.org/blog/2019/10/08/burrow-the-boring-blockchain) +- [Docs] Generate github pages docs index with docsify: https://hyperledger.github.io/burrow/ +- [JS] Publish burrow.js to @hyperledger/burrow +- [State] Store EVM ABI and contract metadata on-chain see [GetMetadata](https://github.com/hyperledger/burrow/blob/e80aad5d8fac1f67dbfec61ea75670f9a38c61a1/protobuf/rpcquery.proto#L25) +- [Tendermint] Upgrade to v0.32.3 +- [Execution] Added IdentifyTx for introducing nodes (binding their NodeID to ValidatorAddress) +- [Natives] Implement Ethereum precompile number 5 - modular exponentiation + +`, "0.28.2 - 2019-08-21", `### Fixed -- [Vent] The new decode event ABI _before_ filter provides more keys but means vent must have access to all possible LogEvent ABIs when it is started. This is not practical in general so we now will will only err if an event matches but we have no ABI. This means we might not notice we have forgot to include an ABI since an event that _would_ have matched on an ABI spec field (prefixed 'Event') will not just not match, and so fail silently. +- [Vent] The new decode event ABI _before_ filter provides more keys but means vent must have access to all possible LogEvent ABIs when it is started. This is not practical in general so we now will will only err if an event matches but we have no ABI. This means we might not notice we have forgot to include an ABI since an event that _would_ have matched on an ABI spec field (prefixed 'Event') will not just not match, and so fail silently. `, "0.28.1 - 2019-08-21", `### Fixed @@ -110,7 +135,7 @@ var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "htt - [Consensus] Tendermint config CreateEmptyBlocks, CreateEmptyBlocksInterval now work as intended and prevent empty blocks being produced (except when needed for proof purposes) or when the interval expires (when set) ### Added -- [Dump] burrow dump now has local variant that produces a dump directly from a compatible burrow directory rather than over GRPC. If dumping/restoring between state-incompatible versions use burrow dump remote. +- [Dump] burrow dump now has local variant that produces a dump directly from a compatible burrow directory rather than over GRPC. If dumping/restoring between state-incompatible versions use burrow dump remote. `, "0.26.0 - 2019-06-14", `### Changed @@ -148,7 +173,7 @@ var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "htt ### Added - [CLI] Introduced burrow configure --pool for generation of multiple validator configs suitable for running on a single (or many) machines - [CLI] Burrow deploy can now run multiple burrow deploy files (aka playbooks) and run them in parallel -- [Consensus] Now possible to run Burrow without Tendermint in 'NoConsensus' mode by setting Tendermint.Enabled = false for faster local testing. Execution.TimeoutFactor can be used to control how regularly Burrow commits (and is used +- [Consensus] Now possible to run Burrow without Tendermint in 'NoConsensus' mode by setting Tendermint.Enabled = false for faster local testing. Execution.TimeoutFactor can be used to control how regularly Burrow commits (and is used ### Fixed - [Execution] Fixed uint64 underflow (when subtracting fee from balance) not protected against in CallContext @@ -163,7 +188,7 @@ var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "htt - [CLI] Introduced burrow configure --pool for generation of multiple validator configs suitable for running on a single (or many) machines ### Fixed -- [Metrics] Fix histogram statistics by making counts cumulative +- [Metrics] Fix histogram statistics by making counts cumulative `, "0.24.5 - 2019-03-14", `### Changed From d0960b133d978332d024c0ccdf84b6718ae92a3b Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 9 Oct 2019 12:03:04 -0500 Subject: [PATCH 031/185] Switch to life fork that depends on versioned go-wagon Signed-off-by: Silas Davis --- execution/wasm/wasm.go | 5 +++-- go.mod | 7 ++++--- go.sum | 18 ++++++++++++++---- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/execution/wasm/wasm.go b/execution/wasm/wasm.go index 2a86407a0..204f8dfa0 100644 --- a/execution/wasm/wasm.go +++ b/execution/wasm/wasm.go @@ -62,6 +62,7 @@ type execContext struct { // RunWASM creates a WASM VM, and executes the given WASM contract code func RunWASM(state acmstate.ReaderWriter, address crypto.Address, createContract bool, wasm, input []byte) (output []byte, cerr error) { + const errHeader = "RunWASM" defer func() { if r := recover(); r != nil { cerr = errors.Codes.ExecutionAborted @@ -81,7 +82,7 @@ func RunWASM(state acmstate.ReaderWriter, address crypto.Address, createContract vm, err := exec.NewVirtualMachine(wasm, config, &execContext, nil) if err != nil { - return nil, errors.Codes.InvalidContract + return nil, errors.Errorf(errors.Codes.InvalidContract, "%s: %v", errHeader, err) } if execContext.Error() != nil { return nil, execContext.Error() @@ -105,7 +106,7 @@ func RunWASM(state acmstate.ReaderWriter, address crypto.Address, createContract // The 0 argument is the offset where our calldata is stored (if any) offset, err := vm.Run(entryID, 0) if err != nil { - return nil, errors.Codes.ExecutionAborted + return nil, errors.Errorf(errors.Codes.ExecutionAborted, "%s: %v", errHeader, err) } if offset > 0 { diff --git a/go.mod b/go.mod index db42ae655..a8569314a 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,9 @@ module github.com/hyperledger/burrow go 1.12 -replace github.com/go-interpreter/wagon v0.0.0 => github.com/perlin-network/wagon v0.3.1-0.20180825141017-f8cb99b55a39 +// replace github.com/perlin-network/life => github.com/silasdavis/life master +// Avoid downstream pain due to unversioned go-wagon dep: +replace github.com/perlin-network/life => github.com/silasdavis/life v0.0.0-20191009191257-e9c2a5fdbc96 require ( github.com/BurntSushi/toml v0.3.1 @@ -31,7 +33,7 @@ require ( github.com/mattn/go-colorable v0.1.2 // indirect github.com/mattn/go-sqlite3 v1.10.0 github.com/monax/relic v2.0.0+incompatible - github.com/perlin-network/life v0.0.0-20190521143330-57f3819c2df0 + github.com/perlin-network/life v0.0.0-20190803100833-89b850c02992 github.com/pkg/errors v0.8.1 github.com/prometheus/client_golang v0.9.3 github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 @@ -56,7 +58,6 @@ require ( golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 golang.org/x/sys v0.0.0-20190825160603-fb81701db80f // indirect - golang.org/x/text v0.3.2 // indirect google.golang.org/grpc v1.23.1 gopkg.in/yaml.v2 v2.2.2 ) diff --git a/go.sum b/go.sum index 6d66091a4..4faf39984 100644 --- a/go.sum +++ b/go.sum @@ -51,6 +51,8 @@ github.com/eapache/channels v1.1.0 h1:F1taHcn7/F0i8DYqKXJnyhJcVpp2kgFcNePxXtnyu4 github.com/eapache/channels v1.1.0/go.mod h1:jMm2qB5Ubtg9zLd+inMZd2/NUvXgzmWXsDaLyQIGfH0= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13 h1:/voSflvo4UvPT0XZy+YQMuUk04topJ2swxyOOyXefMM= github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13/go.mod h1:rQELVIqRXpraeUryHOBadz99ePvEVQmTVpGr8M9QQ4Q= github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8 h1:bD2/rCXwgXJm2vgoSSSCM9IPjVFfEoQFFblzg7HHABI= @@ -72,6 +74,8 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-interpreter/wagon v0.6.1-0.20190923081222-01d3d3376951 h1:2zNSjTofVE4/LGSaJpKB4oYGD5nZsEUdRXzFaFykJzI= +github.com/go-interpreter/wagon v0.6.1-0.20190923081222-01d3d3376951/go.mod h1:5+b/MBYkclRZngKF5s6qrgWxSLgE9F5dFdO1hAueZLc= github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= @@ -177,10 +181,6 @@ github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/perlin-network/life v0.0.0-20190521143330-57f3819c2df0 h1:fP9xTEHvfuArvWXQhRDYHSBNX/3ZaAfFKlxzpZtUsqs= -github.com/perlin-network/life v0.0.0-20190521143330-57f3819c2df0/go.mod h1:z/EH0mO9zbeuTT5NX4u2VqVSG8y2vDQXz6iDKxikW2I= -github.com/perlin-network/wagon v0.3.1-0.20180825141017-f8cb99b55a39 h1:CYHXy6CWxxL7ugjvCbTELOm2j5iRLEWGPl3AQYvretw= -github.com/perlin-network/wagon v0.3.1-0.20180825141017-f8cb99b55a39/go.mod h1:zHOMvbitcZek8oshsMO5VpyBjWjV9X8cn8WTZwdebpM= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -207,6 +207,8 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= 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/silasdavis/life v0.0.0-20191009191257-e9c2a5fdbc96 h1:h+9noX9J+uzeBNUUc0tQcEHyvt4SreDTyZMdBIHE5ac= +github.com/silasdavis/life v0.0.0-20191009191257-e9c2a5fdbc96/go.mod h1:kRj+/HyxhCbkocbIvcK9ikQR/OQzi43RdJ0zWv0hhE8= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -253,6 +255,8 @@ github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmN github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 h1:IlK6taZBmMKDcGfMqIlD4la5BlekNrrLsdtCMSn6aJI= github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= +github.com/twitchyliquid64/golang-asm v0.0.0-20190126203739-365674df15fc h1:RTUQlKzoZZVG3umWNzOYeFecQLIh+dbxXvJp1zPQJTI= +github.com/twitchyliquid64/golang-asm v0.0.0-20190126203739-365674df15fc/go.mod h1:NoCfSFWosfqMqmmD7hApkirIK9ozpHjxRnRxs1l413A= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -288,6 +292,7 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/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-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -303,6 +308,7 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/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-20190306220234-b354f8bf4d9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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-20190825160603-fb81701db80f h1:LCxigP8q3fPRGNVYndYsyHnF0zRrvcoVwZMfb8iQZe4= @@ -319,6 +325,8 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/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-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2 h1:67iHsV9djwGdZpdZNbLuQj6FOzCaZe3w+vhLjn5AcFA= @@ -334,6 +342,8 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= From adf3378e160cddcb4d3594089ba95dc4c6c870c2 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 9 Oct 2019 15:10:01 -0500 Subject: [PATCH 032/185] Fix NPM publish job Signed-off-by: Silas Davis --- .github/workflows/release.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f1d9efeca..5d9a5f679 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,10 +19,13 @@ jobs: if: success() js: - name: NPM + name: NPM runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12.x' - name: Publish env: NPM_EMAIL: ${{ secrets.NPM_EMAIL }} @@ -30,10 +33,11 @@ jobs: NPM_PASS: ${{ secrets.NPM_PASS }} run: | git config --global user.email "${NPM_EMAIL}" + npm install -g npm-cli-login npm-cli-login npm version from-git npm publish --access public . - + docker: name: Docker runs-on: ubuntu-latest @@ -49,4 +53,4 @@ jobs: export tag=$(git tag --points-at HEAD) echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} --password-stdin docker tag ${DOCKER_REPO}:${tag#v} ${DOCKER_REPO}:latest - docker push ${DOCKER_REPO} \ No newline at end of file + docker push ${DOCKER_REPO} From fed6230e308bc1434dbebe520156e27703b18aec Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 10 Oct 2019 13:02:42 -0500 Subject: [PATCH 033/185] Split out metadata cache and interfaces to avoid forcing downstream to implement them Signed-off-by: Silas Davis --- acm/acmstate/metadata_cache.go | 82 ++++++++++++++++++++++++++++ acm/acmstate/state.go | 11 ++-- acm/acmstate/state_cache.go | 60 -------------------- core/processes.go | 8 +-- execution/contexts/call_context.go | 30 ++++++---- execution/execution.go | 26 +++++---- execution/native/account.go | 4 +- execution/native/state.go | 8 --- execution/simulated_call.go | 11 ++-- execution/state/state.go | 1 + integration/rpctransact/call_test.go | 6 +- rpc/rpcquery/query_server.go | 66 +++++++++++----------- 12 files changed, 170 insertions(+), 143 deletions(-) create mode 100644 acm/acmstate/metadata_cache.go diff --git a/acm/acmstate/metadata_cache.go b/acm/acmstate/metadata_cache.go new file mode 100644 index 000000000..acbe60a05 --- /dev/null +++ b/acm/acmstate/metadata_cache.go @@ -0,0 +1,82 @@ +package acmstate + +import ( + "sync" +) + +type metadataInfo struct { + metadata string + updated bool +} + +type MetadataCache struct { + backend MetadataReader + m sync.Map +} + +func NewMetadataCache(backend MetadataReader) *MetadataCache { + return &MetadataCache{ + backend: backend, + } +} + +func (cache *MetadataCache) SetMetadata(metahash MetadataHash, metadata string) error { + cache.m.Store(metahash, &metadataInfo{updated: true, metadata: metadata}) + return nil +} + +func (cache *MetadataCache) GetMetadata(metahash MetadataHash) (string, error) { + metaInfo, err := cache.getMetadata(metahash) + if err != nil { + return "", err + } + + return metaInfo.metadata, nil +} + +// Syncs changes to the backend in deterministic order. Sends storage updates before updating +// the account they belong so that storage values can be taken account of in the update. +func (cache *MetadataCache) Sync(st MetadataWriter) error { + var err error + cache.m.Range(func(key, value interface{}) bool { + hash := key.(MetadataHash) + info := value.(*metadataInfo) + if info.updated { + err = st.SetMetadata(hash, info.metadata) + if err != nil { + return false + } + } + return true + }) + if err != nil { + return err + } + return nil +} + +func (cache *MetadataCache) Flush(output MetadataWriter, backend MetadataReader) error { + err := cache.Sync(output) + if err != nil { + return err + } + cache.m = sync.Map{} + return nil +} + +// Get the cache accountInfo item creating it if necessary +func (cache *MetadataCache) getMetadata(metahash MetadataHash) (*metadataInfo, error) { + value, ok := cache.m.Load(metahash) + if !ok { + metadata, err := cache.backend.GetMetadata(metahash) + if err != nil { + return nil, err + } + metaInfo := &metadataInfo{ + metadata: metadata, + } + cache.m.Store(metahash, metaInfo) + return metaInfo, nil + } + return value.(*metadataInfo), nil +} diff --git a/acm/acmstate/state.go b/acm/acmstate/state.go index 6d7b92adc..b7ba23f21 100644 --- a/acm/acmstate/state.go +++ b/acm/acmstate/state.go @@ -110,12 +110,12 @@ type StorageIterable interface { IterateStorage(address crypto.Address, consumer func(key binary.Word256, value []byte) error) (err error) } -type MetadataGetter interface { +type MetadataReader interface { // Get an Metadata by its hash. This is content-addressed GetMetadata(metahash MetadataHash) (string, error) } -type MetadataSetter interface { +type MetadataWriter interface { // Set an Metadata according to it keccak-256 hash. SetMetadata(metahash MetadataHash, metadata string) error } @@ -135,7 +135,6 @@ type AccountStatsGetter interface { type Reader interface { AccountGetter StorageGetter - MetadataGetter } type Iterable interface { @@ -158,7 +157,6 @@ type IterableStatsReader interface { type Writer interface { AccountUpdater StorageSetter - MetadataSetter } // Read and write account and storage state @@ -167,6 +165,11 @@ type ReaderWriter interface { Writer } +type MetadataReaderWriter interface { + MetadataReader + MetadataWriter +} + type IterableReaderWriter interface { Iterable Reader diff --git a/acm/acmstate/state_cache.go b/acm/acmstate/state_cache.go index baf801c1c..e6fac7fdb 100644 --- a/acm/acmstate/state_cache.go +++ b/acm/acmstate/state_cache.go @@ -19,7 +19,6 @@ type Cache struct { name string backend Reader accounts map[crypto.Address]*accountInfo - metadata map[MetadataHash]*metadataInfo readonly bool } @@ -31,11 +30,6 @@ type accountInfo struct { updated bool } -type metadataInfo struct { - metadata string - updated bool -} - type CacheOption func(*Cache) *Cache // Returns a Cache that wraps an underlying Reader to use on a cache miss, can write to an output Writer @@ -44,7 +38,6 @@ func NewCache(backend Reader, options ...CacheOption) *Cache { cache := &Cache{ backend: backend, accounts: make(map[crypto.Address]*accountInfo), - metadata: make(map[MetadataHash]*metadataInfo), } for _, option := range options { option(cache) @@ -99,28 +92,6 @@ func (cache *Cache) UpdateAccount(account *acm.Account) error { return nil } -func (cache *Cache) GetMetadata(metahash MetadataHash) (string, error) { - metaInfo, err := cache.getMetadata(metahash) - if err != nil { - return "", err - } - - return metaInfo.metadata, nil -} - -func (cache *Cache) SetMetadata(metahash MetadataHash, metadata string) error { - if cache.readonly { - return errors.Errorf(errors.Codes.IllegalWrite, "SetMetadata called in read-only context on metadata hash: %v", metahash) - } - - cache.Lock() - defer cache.Unlock() - - cache.metadata[metahash] = &metadataInfo{updated: true, metadata: metadata} - - return nil -} - func (cache *Cache) RemoveAccount(address crypto.Address) error { if cache.readonly { return errors.Errorf(errors.Codes.IllegalWrite, "RemoveAccount called on read-only account %v", address) @@ -268,14 +239,6 @@ func (cache *Cache) Sync(st Writer) error { accInfo.RUnlock() } - for metahash, metadataInfo := range cache.metadata { - if metadataInfo.updated { - err := st.SetMetadata(metahash, metadataInfo.metadata) - if err != nil { - return err - } - } - } return nil } @@ -327,26 +290,3 @@ func (cache *Cache) get(address crypto.Address) (*accountInfo, error) { } return accInfo, nil } - -// Get the cache accountInfo item creating it if necessary -func (cache *Cache) getMetadata(metahash MetadataHash) (*metadataInfo, error) { - cache.RLock() - metaInfo := cache.metadata[metahash] - cache.RUnlock() - if metaInfo == nil { - cache.Lock() - defer cache.Unlock() - metaInfo = cache.metadata[metahash] - if metaInfo == nil { - metadata, err := cache.backend.GetMetadata(metahash) - if err != nil { - return nil, err - } - metaInfo = &metadataInfo{ - metadata: metadata, - } - cache.metadata[metahash] = metaInfo - } - } - return metaInfo, nil -} diff --git a/core/processes.go b/core/processes.go index 3dd1cb5a7..5a1146529 100644 --- a/core/processes.go +++ b/core/processes.go @@ -309,12 +309,8 @@ func GRPCLauncher(kern *Kernel, conf *rpc.ServerConfig, keyConfig *keys.KeysConf } keys.RegisterKeysServer(grpcServer, ks) } - - nameRegState := kern.State - nodeRegState := kern.State - proposalRegState := kern.State - rpcquery.RegisterQueryServer(grpcServer, rpcquery.NewQueryServer(kern.State, nameRegState, nodeRegState, proposalRegState, - kern.Blockchain, kern.State, nodeView, kern.Logger)) + rpcquery.RegisterQueryServer(grpcServer, rpcquery.NewQueryServer(kern.State, kern.Blockchain, nodeView, + kern.Logger)) txCodec := txs.NewProtobufCodec() rpctransact.RegisterTransactServer(grpcServer, diff --git a/execution/contexts/call_context.go b/execution/contexts/call_context.go index 4d94d047a..299725b75 100644 --- a/execution/contexts/call_context.go +++ b/execution/contexts/call_context.go @@ -21,13 +21,14 @@ import ( const GasLimit = uint64(1000000) type CallContext struct { - EVM *evm.EVM - State acmstate.ReaderWriter - Blockchain engine.Blockchain - RunCall bool - Logger *logging.Logger - tx *payload.CallTx - txe *exec.TxExecution + EVM *evm.EVM + State acmstate.ReaderWriter + MetadataState acmstate.MetadataReaderWriter + Blockchain engine.Blockchain + RunCall bool + Logger *logging.Logger + tx *payload.CallTx + txe *exec.TxExecution } func (ctx *CallContext) Execute(txe *exec.TxExecution, p payload.Payload) error { @@ -121,6 +122,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error createContract := ctx.tx.Address == nil caller := inAcc.Address txCache := acmstate.NewCache(ctx.State, acmstate.Named("TxCache")) + metaCache := acmstate.NewMetadataCache(ctx.MetadataState) var callee crypto.Address var code []byte @@ -141,7 +143,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error "init_code", code) // store abis - err = native.UpdateContractMeta(txCache, callee, ctx.tx.ContractMeta) + err = native.UpdateContractMeta(txCache, metaCache, callee, ctx.tx.ContractMeta) if err != nil { return err } @@ -198,7 +200,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error ctx.txe.PushError(errors.Wrap(err, "call error")) } else { ctx.Logger.TraceMsg("Successful execution") - err := txCache.Sync(ctx.State) + err = ctx.Sync(txCache, metaCache) if err != nil { return err } @@ -234,7 +236,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error return err } } - err := txCache.Sync(ctx.State) + err = ctx.Sync(txCache, metaCache) if err != nil { return err } @@ -259,3 +261,11 @@ func (ctx *CallContext) CallEvents(err error) { ctx.txe.Input(*ctx.tx.Address, errors.AsException(err)) } } + +func (ctx *CallContext) Sync(cache *acmstate.Cache, metaCache *acmstate.MetadataCache) error { + err := cache.Sync(ctx.State) + if err != nil { + return err + } + return metaCache.Sync(ctx.MetadataState) +} diff --git a/execution/execution.go b/execution/execution.go index 547638c83..a9c03fa50 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -45,10 +45,11 @@ func (f ExecutorFunc) Execute(txEnv *txs.Envelope) (*exec.TxExecution, error) { type ExecutorState interface { Update(updater func(ws state.Updatable) error) (hash []byte, version int64, err error) + acmstate.IterableReader + acmstate.MetadataReader names.Reader registry.Reader proposal.Reader - acmstate.IterableReader validator.IterableReader } @@ -76,6 +77,7 @@ type executor struct { params Params state ExecutorState stateCache *acmstate.Cache + metadataCache *acmstate.MetadataCache nameRegCache *names.Cache nodeRegCache *registry.Cache proposalRegCache *proposal.Cache @@ -124,6 +126,7 @@ func newExecutor(name string, runCall bool, params Params, backend ExecutorState params: params, state: backend, stateCache: acmstate.NewCache(backend, acmstate.Named(name)), + metadataCache: acmstate.NewMetadataCache(backend), nameRegCache: names.NewCache(backend), nodeRegCache: registry.NewCache(backend), proposalRegCache: proposal.NewCache(backend), @@ -140,11 +143,12 @@ func newExecutor(name string, runCall bool, params Params, backend ExecutorState baseContexts := map[payload.Type]contexts.Context{ payload.TypeCall: &contexts.CallContext{ - EVM: evm.New(exe.vmOptions), - Blockchain: blockchain, - State: exe.stateCache, - RunCall: runCall, - Logger: exe.logger, + EVM: evm.New(exe.vmOptions), + Blockchain: blockchain, + State: exe.stateCache, + MetadataState: exe.metadataCache, + RunCall: runCall, + Logger: exe.logger, }, payload.TypeSend: &contexts.SendContext{ State: exe.stateCache, @@ -355,6 +359,10 @@ func (exe *executor) Commit(header *abciTypes.Header) (stateHash []byte, err err if err != nil { return err } + err = exe.metadataCache.Flush(ws, exe.state) + if err != nil { + return err + } err = exe.nameRegCache.Flush(ws, exe.state) if err != nil { return err @@ -411,12 +419,6 @@ func (exe *executor) GetAccount(address crypto.Address) (*acm.Account, error) { return exe.stateCache.GetAccount(address) } -func (exe *executor) GetMetadata(metahash acmstate.MetadataHash) (string, error) { - exe.RLock() - defer exe.RUnlock() - return exe.stateCache.GetMetadata(metahash) -} - // Storage func (exe *executor) GetStorage(address crypto.Address, key binary.Word256) ([]byte, error) { exe.RLock() diff --git a/execution/native/account.go b/execution/native/account.go index 945a40b4e..fd073aae2 100644 --- a/execution/native/account.go +++ b/execution/native/account.go @@ -155,7 +155,7 @@ func Transfer(st acmstate.ReaderWriter, from, to crypto.Address, amount uint64) }) } -func UpdateContractMeta(st acmstate.ReaderWriter, address crypto.Address, payloadMeta []*payload.ContractMeta) error { +func UpdateContractMeta(st acmstate.ReaderWriter, metaSt acmstate.MetadataWriter, address crypto.Address, payloadMeta []*payload.ContractMeta) error { if len(payloadMeta) == 0 { return nil } @@ -171,7 +171,7 @@ func UpdateContractMeta(st acmstate.ReaderWriter, address crypto.Address, payloa MetadataHash: metahash[:], CodeHash: abi.CodeHash, } - err = st.SetMetadata(metahash, abi.Meta) + err = metaSt.SetMetadata(metahash, abi.Meta) if err != nil { return errors.Errorf(errors.Codes.IllegalWrite, "cannot update metadata for %v: %v", address, err) diff --git a/execution/native/state.go b/execution/native/state.go index f0982f0dc..96d2dc3a7 100644 --- a/execution/native/state.go +++ b/execution/native/state.go @@ -64,14 +64,6 @@ func (s *State) SetStorage(address crypto.Address, key binary.Word256, value []b return s.backend.SetStorage(address, key, value) } -func (s *State) GetMetadata(metahash acmstate.MetadataHash) (string, error) { - return s.backend.GetMetadata(metahash) -} - -func (s *State) SetMetadata(metahash acmstate.MetadataHash, metadata string) error { - return s.backend.SetMetadata(metahash, metadata) -} - func (s *State) ensureNonNative(address crypto.Address, action string) error { contract := s.natives.GetByAddress(address) if contract != nil { diff --git a/execution/simulated_call.go b/execution/simulated_call.go index 0c8cfb0af..5af263ec1 100644 --- a/execution/simulated_call.go +++ b/execution/simulated_call.go @@ -20,11 +20,12 @@ func CallSim(reader acmstate.Reader, blockchain bcm.BlockchainInfo, fromAddress, cache := acmstate.NewCache(reader) exe := contexts.CallContext{ - EVM: evm.Default(), - RunCall: true, - State: cache, - Blockchain: blockchain, - Logger: logger, + EVM: evm.Default(), + RunCall: true, + State: cache, + MetadataState: acmstate.NewMemoryState(), + Blockchain: blockchain, + Logger: logger, } txe := exec.NewTxExecution(txs.Enclose(blockchain.ChainID(), &payload.CallTx{ diff --git a/execution/state/state.go b/execution/state/state.go index e6ffad094..538e598f2 100644 --- a/execution/state/state.go +++ b/execution/state/state.go @@ -93,6 +93,7 @@ type Updatable interface { proposal.Writer registry.Writer validator.Writer + acmstate.MetadataWriter AddBlock(blockExecution *exec.BlockExecution) error } diff --git a/integration/rpctransact/call_test.go b/integration/rpctransact/call_test.go index b77b83dc3..8778d1e7b 100644 --- a/integration/rpctransact/call_test.go +++ b/integration/rpctransact/call_test.go @@ -310,7 +310,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) qcli := rpctest.NewQueryClient(t, kern.GRPCListenAddress().String()) res, err := qcli.GetMetadata(context.Background(), &rpcquery.GetMetadataParam{Address: &addressA}) require.NoError(t, err) - assert.Equal(t, res.Metadata, string(solidity.Abi_A)) + assert.Equal(t, string(solidity.Abi_A), res.Metadata) // CreateB spec, err := abi.ReadSpec(solidity.Abi_A) require.NoError(t, err) @@ -323,7 +323,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) // check ABI for contract B res, err = qcli.GetMetadata(context.Background(), &rpcquery.GetMetadataParam{Address: &addressB}) require.NoError(t, err) - assert.Equal(t, res.Metadata, string(solidity.Abi_B)) + assert.Equal(t, string(solidity.Abi_B), res.Metadata) // CreateC spec, err = abi.ReadSpec(solidity.Abi_B) require.NoError(t, err) @@ -336,7 +336,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) // check abi for contract C res, err = qcli.GetMetadata(context.Background(), &rpcquery.GetMetadataParam{Address: &addressC}) require.NoError(t, err) - assert.Equal(t, res.Metadata, string(solidity.Abi_C)) + assert.Equal(t, string(solidity.Abi_C), res.Metadata) return }) diff --git a/rpc/rpcquery/query_server.go b/rpc/rpcquery/query_server.go index f67ff58b5..7254b4378 100644 --- a/rpc/rpcquery/query_server.go +++ b/rpc/rpcquery/query_server.go @@ -25,40 +25,40 @@ import ( ) type queryServer struct { - accounts acmstate.IterableStatsReader - nameReg names.IterableReader - nodeReg registry.IterableReader - proposalReg proposal.IterableReader - blockchain bcm.BlockchainInfo - validators validator.History - nodeView *tendermint.NodeView - logger *logging.Logger + state QueryState + blockchain bcm.BlockchainInfo + nodeView *tendermint.NodeView + logger *logging.Logger } var _ QueryServer = &queryServer{} -func NewQueryServer(state acmstate.IterableStatsReader, nameReg names.IterableReader, nodeReg registry.IterableReader, proposalReg proposal.IterableReader, - blockchain bcm.BlockchainInfo, validators validator.History, nodeView *tendermint.NodeView, logger *logging.Logger) *queryServer { +type QueryState interface { + acmstate.IterableStatsReader + acmstate.MetadataReader + names.IterableReader + registry.IterableReader + proposal.IterableReader + validator.History +} + +func NewQueryServer(state QueryState, blockchain bcm.BlockchainInfo, nodeView *tendermint.NodeView, logger *logging.Logger) *queryServer { return &queryServer{ - accounts: state, - nameReg: nameReg, - nodeReg: nodeReg, - proposalReg: proposalReg, - blockchain: blockchain, - validators: validators, - nodeView: nodeView, - logger: logger, + state: state, + blockchain: blockchain, + nodeView: nodeView, + logger: logger, } } func (qs *queryServer) Status(ctx context.Context, param *StatusParam) (*rpc.ResultStatus, error) { - return rpc.Status(qs.blockchain, qs.validators, qs.nodeView, param.BlockTimeWithin, param.BlockSeenTimeWithin) + return rpc.Status(qs.blockchain, qs.state, qs.nodeView, param.BlockTimeWithin, param.BlockSeenTimeWithin) } // Account state func (qs *queryServer) GetAccount(ctx context.Context, param *GetAccountParam) (*acm.Account, error) { - acc, err := qs.accounts.GetAccount(param.Address) + acc, err := qs.state.GetAccount(param.Address) if acc == nil { acc = &acm.Account{} } @@ -72,14 +72,14 @@ func (qs *queryServer) GetMetadata(ctx context.Context, param *GetMetadataParam) var contractMeta *acm.ContractMeta var err error if param.Address != nil { - acc, err := qs.accounts.GetAccount(*param.Address) + acc, err := qs.state.GetAccount(*param.Address) if err != nil { return metadata, err } if acc != nil && acc.CodeHash != nil { codehash := acc.CodeHash if acc.Forebear != nil { - acc, err = qs.accounts.GetAccount(*acc.Forebear) + acc, err = qs.state.GetAccount(*acc.Forebear) if err != nil { return metadata, err } @@ -116,13 +116,13 @@ func (qs *queryServer) GetMetadata(ctx context.Context, param *GetMetadataParam) } else { var metadataHash acmstate.MetadataHash copy(metadataHash[:], contractMeta.MetadataHash) - metadata.Metadata, err = qs.accounts.GetMetadata(metadataHash) + metadata.Metadata, err = qs.state.GetMetadata(metadataHash) } return metadata, err } func (qs *queryServer) GetStorage(ctx context.Context, param *GetStorageParam) (*StorageValue, error) { - val, err := qs.accounts.GetStorage(param.Address, param.Key) + val, err := qs.state.GetStorage(param.Address, param.Key) return &StorageValue{Value: val}, err } @@ -132,7 +132,7 @@ func (qs *queryServer) ListAccounts(param *ListAccountsParam, stream Query_ListA return err } var streamErr error - err = qs.accounts.IterateAccounts(func(acc *acm.Account) error { + err = qs.state.IterateAccounts(func(acc *acm.Account) error { if qry.Matches(acc) { return stream.Send(acc) } else { @@ -148,7 +148,7 @@ func (qs *queryServer) ListAccounts(param *ListAccountsParam, stream Query_ListA // Names func (qs *queryServer) GetName(ctx context.Context, param *GetNameParam) (entry *names.Entry, err error) { - entry, err = qs.nameReg.GetName(param.Name) + entry, err = qs.state.GetName(param.Name) if entry == nil && err == nil { err = fmt.Errorf("name %s not found", param.Name) } @@ -161,7 +161,7 @@ func (qs *queryServer) ListNames(param *ListNamesParam, stream Query_ListNamesSe return err } var streamErr error - err = qs.nameReg.IterateNames(func(entry *names.Entry) error { + err = qs.state.IterateNames(func(entry *names.Entry) error { if qry.Matches(entry) { return stream.Send(entry) } else { @@ -177,7 +177,7 @@ func (qs *queryServer) ListNames(param *ListNamesParam, stream Query_ListNamesSe // Validators func (qs *queryServer) GetValidatorSet(ctx context.Context, param *GetValidatorSetParam) (*ValidatorSet, error) { - set := validator.Copy(qs.validators.Validators(0)) + set := validator.Copy(qs.state.Validators(0)) return &ValidatorSet{ Set: set.Validators(), }, nil @@ -197,7 +197,7 @@ func (qs *queryServer) GetValidatorSetHistory(ctx context.Context, param *GetVal } history := &ValidatorSetHistory{} for i := 0; i < lookback; i++ { - set := validator.Copy(qs.validators.Validators(i)) + set := validator.Copy(qs.state.Validators(i)) vs := &ValidatorSet{ Height: height - uint64(i), Set: set.Validators(), @@ -209,7 +209,7 @@ func (qs *queryServer) GetValidatorSetHistory(ctx context.Context, param *GetVal func (qs *queryServer) GetNetworkRegistry(ctx context.Context, param *GetNetworkRegistryParam) (*NetworkRegistry, error) { rv := make([]*RegisteredValidator, 0) - err := qs.nodeReg.IterateNodes(func(id crypto.Address, rn *registry.NodeIdentity) error { + err := qs.state.IterateNodes(func(id crypto.Address, rn *registry.NodeIdentity) error { rv = append(rv, &RegisteredValidator{ Address: rn.ValidatorPublicKey.GetAddress(), Node: rn, @@ -222,7 +222,7 @@ func (qs *queryServer) GetNetworkRegistry(ctx context.Context, param *GetNetwork // Proposals func (qs *queryServer) GetProposal(ctx context.Context, param *GetProposalParam) (proposal *payload.Ballot, err error) { - proposal, err = qs.proposalReg.GetProposal(param.Hash) + proposal, err = qs.state.GetProposal(param.Hash) if proposal == nil && err == nil { err = fmt.Errorf("proposal %x not found", param.Hash) } @@ -231,7 +231,7 @@ func (qs *queryServer) GetProposal(ctx context.Context, param *GetProposalParam) func (qs *queryServer) ListProposals(param *ListProposalsParam, stream Query_ListProposalsServer) error { var streamErr error - err := qs.proposalReg.IterateProposals(func(hash []byte, ballot *payload.Ballot) error { + err := qs.state.IterateProposals(func(hash []byte, ballot *payload.Ballot) error { if !param.GetProposed() || ballot.ProposalState == payload.Ballot_PROPOSED { return stream.Send(&ProposalResult{Hash: hash, Ballot: ballot}) } else { @@ -245,7 +245,7 @@ func (qs *queryServer) ListProposals(param *ListProposalsParam, stream Query_Lis } func (qs *queryServer) GetStats(ctx context.Context, param *GetStatsParam) (*Stats, error) { - stats := qs.accounts.GetAccountStats() + stats := qs.state.GetAccountStats() return &Stats{ AccountsWithCode: stats.AccountsWithCode, From 0b49481cc18ef788bb33767c98f084d6c5f12af9 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 10 Oct 2019 16:16:16 -0500 Subject: [PATCH 034/185] Prep 0.29.1 release Signed-off-by: Silas Davis --- CHANGELOG.md | 6 ++++++ NOTES.md | 23 +---------------------- project/history.go | 4 ++++ 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ce638ba9..f320c041d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.29.1] - 2019-10-10 +### Changed +- [State] Split metadata and account state to be kinder to downstream EVM integrators + + ## [0.29.0] - 2019-10-08 ### Changed - [Config] Reverted rename of ValidatorAddress to Address in config (each Burrow node has a specific validator key it uses for signing whether or not it is running as a validator right now) @@ -578,6 +583,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.29.1]: https://github.com/hyperledger/burrow/compare/v0.29.0...v0.29.1 [0.29.0]: https://github.com/hyperledger/burrow/compare/v0.28.2...v0.29.0 [0.28.2]: https://github.com/hyperledger/burrow/compare/v0.28.1...v0.28.2 [0.28.1]: https://github.com/hyperledger/burrow/compare/v0.28.0...v0.28.1 diff --git a/NOTES.md b/NOTES.md index a87f96172..4e53357e7 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,24 +1,3 @@ ### Changed -- [Config] Reverted rename of ValidatorAddress to Address in config (each Burrow node has a specific validator key it uses for signing whether or not it is running as a validator right now) - -### Fixed -- [EVM] Return integer overflow error code (not stack overflow) for integer overflow errors -- [Docs] Fix broken examples -- [Deploy] Set input on QueryContract jobs correctly -- [EVM] Fix byte-printing for DebugOpcodes run mode -- [Crypto] Use Tendermint-compatible secp256k1 addressing -- [Natives] Make natives first class contracts and establish Dispatcher and Callable as a common calling convention for natives, EVM, and WASM (pending for WASM). -- [Natives] Fix Ethereum precompile addresses (addresses were padded on right instead of the left) - - -### Added -- [Web3] Implemented Ethereum web3 JSON RPC including sendRawTransaction! -- [Docs] Much docs (see also: https://www.hyperledger.org/blog/2019/10/08/burrow-the-boring-blockchain) -- [Docs] Generate github pages docs index with docsify: https://hyperledger.github.io/burrow/ -- [JS] Publish burrow.js to @hyperledger/burrow -- [State] Store EVM ABI and contract metadata on-chain see [GetMetadata](https://github.com/hyperledger/burrow/blob/e80aad5d8fac1f67dbfec61ea75670f9a38c61a1/protobuf/rpcquery.proto#L25) -- [Tendermint] Upgrade to v0.32.3 -- [Execution] Added IdentifyTx for introducing nodes (binding their NodeID to ValidatorAddress) -- [Natives] Implement Ethereum precompile number 5 - modular exponentiation - +- [State] Split metadata and account state to be kinder to downstream EVM integrators diff --git a/project/history.go b/project/history.go index 53c3682e9..08b43ccbc 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,10 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.29.1 - 2019-10-10", + `### Changed +- [State] Split metadata and account state to be kinder to downstream EVM integrators +`, "0.29.0 - 2019-10-08", `### Changed - [Config] Reverted rename of ValidatorAddress to Address in config (each Burrow node has a specific validator key it uses for signing whether or not it is running as a validator right now) From e2c29ee154d090142de94c6bfb797826181a5513 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Tue, 15 Oct 2019 13:16:22 +0100 Subject: [PATCH 035/185] npm publish - set git config username Signed-off-by: Gregory Hill --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5d9a5f679..d056204ee 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,8 +32,8 @@ jobs: NPM_USER: ${{ secrets.NPM_USER }} NPM_PASS: ${{ secrets.NPM_PASS }} run: | + git config --global user.name "${NPM_USER}" git config --global user.email "${NPM_EMAIL}" - npm install -g npm-cli-login npm-cli-login npm version from-git npm publish --access public . From cf0c991cfcc393201a5fe040938572e86d3666a0 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Tue, 15 Oct 2019 13:17:39 +0100 Subject: [PATCH 036/185] install npm-cli-login Signed-off-by: Gregory Hill --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d056204ee..0367d08e7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,6 +34,7 @@ jobs: run: | git config --global user.name "${NPM_USER}" git config --global user.email "${NPM_EMAIL}" + npm install -g npm-cli-login npm-cli-login npm version from-git npm publish --access public . From 1c60aeba2da13551b452ae399ce8086778a64e39 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Tue, 15 Oct 2019 17:39:33 +0100 Subject: [PATCH 037/185] publish correct npm pkg Signed-off-by: Gregory Hill --- .github/workflows/release.yaml | 1 + CHANGELOG.md | 6 ++++++ NOTES.md | 2 +- project/history.go | 4 ++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0367d08e7..95ade1c25 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,6 +37,7 @@ jobs: npm install -g npm-cli-login npm-cli-login npm version from-git + cp -R js/* . npm publish --access public . docker: diff --git a/CHANGELOG.md b/CHANGELOG.md index f320c041d..4d9e54a96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.29.2] - 2019-10-15 +### Changed +- [NPM] Publish with index.js in TLD + + ## [0.29.1] - 2019-10-10 ### Changed - [State] Split metadata and account state to be kinder to downstream EVM integrators @@ -583,6 +588,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.29.2]: https://github.com/hyperledger/burrow/compare/v0.29.1...v0.29.2 [0.29.1]: https://github.com/hyperledger/burrow/compare/v0.29.0...v0.29.1 [0.29.0]: https://github.com/hyperledger/burrow/compare/v0.28.2...v0.29.0 [0.28.2]: https://github.com/hyperledger/burrow/compare/v0.28.1...v0.28.2 diff --git a/NOTES.md b/NOTES.md index 4e53357e7..d9c04fdc6 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,3 @@ ### Changed -- [State] Split metadata and account state to be kinder to downstream EVM integrators +- [NPM] Publish with index.js in TLD diff --git a/project/history.go b/project/history.go index 08b43ccbc..69cc735ee 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,10 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.29.2 - 2019-10-15", + `### Changed +- [NPM] Publish with index.js in TLD +`, "0.29.1 - 2019-10-10", `### Changed - [State] Split metadata and account state to be kinder to downstream EVM integrators From 7fcd075d490ef9b5642703a8eac28691552e9d41 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Wed, 16 Oct 2019 10:02:44 +0100 Subject: [PATCH 038/185] point npm to index.js Signed-off-by: Gregory Hill --- .github/workflows/release.yaml | 1 - CHANGELOG.md | 6 ++++++ NOTES.md | 2 +- package.json | 2 +- project/history.go | 5 +++++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 95ade1c25..0367d08e7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,7 +37,6 @@ jobs: npm install -g npm-cli-login npm-cli-login npm version from-git - cp -R js/* . npm publish --access public . docker: diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d9e54a96..282a077e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.29.3] - 2019-10-16 +### Changed +- [NPM] Point package.json to index.js + + ## [0.29.2] - 2019-10-15 ### Changed - [NPM] Publish with index.js in TLD @@ -588,6 +593,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.29.3]: https://github.com/hyperledger/burrow/compare/v0.29.2...v0.29.3 [0.29.2]: https://github.com/hyperledger/burrow/compare/v0.29.1...v0.29.2 [0.29.1]: https://github.com/hyperledger/burrow/compare/v0.29.0...v0.29.1 [0.29.0]: https://github.com/hyperledger/burrow/compare/v0.28.2...v0.29.0 diff --git a/NOTES.md b/NOTES.md index d9c04fdc6..9bfead495 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,3 @@ ### Changed -- [NPM] Publish with index.js in TLD +- [NPM] Point package.json to index.js diff --git a/package.json b/package.json index 85b59beec..688175dda 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@hyperledger/burrow", "description": "Javascript library that calls a Hyperledger Burrow server over rpc.", - "main": "./index.js", + "main": "./js/index.js", "author": { "name": "Dennis Mckinnon" }, diff --git a/project/history.go b/project/history.go index 69cc735ee..00d48271b 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,11 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.29.3 - 2019-10-16", + `### Changed +- [NPM] Point package.json to index.js +`, + "0.29.2 - 2019-10-15", `### Changed - [NPM] Publish with index.js in TLD From c284f22dd7298e76775df4cde5496abcad9d799a Mon Sep 17 00:00:00 2001 From: Sean Young Date: Tue, 22 Oct 2019 10:58:27 +0100 Subject: [PATCH 039/185] Move to solidity 0.5.12 Signed-off-by: Sean Young --- Dockerfile | 2 +- execution/solidity/abi_tester.sol | 2 +- execution/solidity/big_mod.sol | 2 +- execution/solidity/event_emitter.sol | 2 +- execution/solidity/revert.sol | 2 +- execution/solidity/strange_loop.sol | 2 +- execution/solidity/zero_reset.sol | 2 +- tests/compilers_fixtures/contractImport1.sol | 2 +- tests/compilers_fixtures/contractImport2.sol | 2 +- tests/compilers_fixtures/contractImport3.sol | 2 +- tests/compilers_fixtures/contractImport4.sol | 2 +- tests/compilers_fixtures/faultyContract.sol | 2 +- tests/compilers_fixtures/libraryContract.sol | 2 +- tests/compilers_fixtures/simpleContract.sol | 2 +- tests/dump/undeclared.sol | 2 +- tests/jobs_fixtures/app40-simple-storage/simple_storage.sol | 2 +- tests/jobs_fixtures/app41-filename-too-long/test.sol | 2 +- tests/jobs_fixtures/app46-meta-mixed-with-normal/test.sol | 2 +- .../app49-return-array-with-RETURNDATACOPY/consumeArray.sol | 2 +- .../app49-return-array-with-RETURNDATACOPY/returnArray.sol | 2 +- .../app50-set-storage-zero/storageIssueWithZero.sol | 2 +- tests/jobs_fixtures/app52-proposal-execute/contract.sol | 2 +- tests/jobs_fixtures/app52-proposal-execute/test.sol | 2 +- tests/jobs_fixtures/app54-static-call/Adoption.sol | 2 +- tests/jobs_fixtures/app54-static-call/AdoptionTest.sol | 2 +- tests/jobs_fixtures/expected-failure-revert/revert.sol | 2 +- tests/scripts/deps/solc.sh | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Dockerfile b/Dockerfile index d32045404..929003c75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # For solc binary -FROM ethereum/solc:0.4.25 as solc-builder +FROM ethereum/solc:0.5.12 as solc-builder # We use a multistage build to avoid bloating our deployment image with build dependencies FROM golang:1.12.0-alpine3.9 as builder diff --git a/execution/solidity/abi_tester.sol b/execution/solidity/abi_tester.sol index 2e66e62bf..14d8eda6f 100644 --- a/execution/solidity/abi_tester.sol +++ b/execution/solidity/abi_tester.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract A { function createB() public returns (B) { diff --git a/execution/solidity/big_mod.sol b/execution/solidity/big_mod.sol index 14d0a87d8..6600ef29e 100644 --- a/execution/solidity/big_mod.sol +++ b/execution/solidity/big_mod.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract BigMod { function expmod(int256 base, int256 e, int256 m, int256 proof) public returns (uint256) { diff --git a/execution/solidity/event_emitter.sol b/execution/solidity/event_emitter.sol index 0af29d9f7..81d967034 100644 --- a/execution/solidity/event_emitter.sol +++ b/execution/solidity/event_emitter.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract EventEmitter { // indexed puts it in topic diff --git a/execution/solidity/revert.sol b/execution/solidity/revert.sol index cc88e89e2..e976e06ac 100644 --- a/execution/solidity/revert.sol +++ b/execution/solidity/revert.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract Revert { event NotReverting(uint32 indexed i); diff --git a/execution/solidity/strange_loop.sol b/execution/solidity/strange_loop.sol index 765edac81..7d9f711e9 100644 --- a/execution/solidity/strange_loop.sol +++ b/execution/solidity/strange_loop.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract StrangeLoop { int top = 23; diff --git a/execution/solidity/zero_reset.sol b/execution/solidity/zero_reset.sol index 7c23b7bf0..f4c4c89b3 100644 --- a/execution/solidity/zero_reset.sol +++ b/execution/solidity/zero_reset.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; // Originally taken from: https://github.com/hyperledger/burrow/issues/847 contract ZeroReset { diff --git a/tests/compilers_fixtures/contractImport1.sol b/tests/compilers_fixtures/contractImport1.sol index db1d2a7e6..a9873accf 100644 --- a/tests/compilers_fixtures/contractImport1.sol +++ b/tests/compilers_fixtures/contractImport1.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; import {importedContract as poop} from './contractImport2.sol'; import "./contractImport3.sol"; diff --git a/tests/compilers_fixtures/contractImport2.sol b/tests/compilers_fixtures/contractImport2.sol index f6986deff..221ccda7d 100644 --- a/tests/compilers_fixtures/contractImport2.sol +++ b/tests/compilers_fixtures/contractImport2.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; import "contractImport3.sol" as moarPoop; contract importedContract { diff --git a/tests/compilers_fixtures/contractImport3.sol b/tests/compilers_fixtures/contractImport3.sol index a409ccb6d..46cca680d 100644 --- a/tests/compilers_fixtures/contractImport3.sol +++ b/tests/compilers_fixtures/contractImport3.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; import * as foo from "contractImport4.sol"; contract map { diff --git a/tests/compilers_fixtures/contractImport4.sol b/tests/compilers_fixtures/contractImport4.sol index 74806b3e3..2b83316b1 100644 --- a/tests/compilers_fixtures/contractImport4.sol +++ b/tests/compilers_fixtures/contractImport4.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract bar { struct Mod { diff --git a/tests/compilers_fixtures/faultyContract.sol b/tests/compilers_fixtures/faultyContract.sol index c2243a6c1..7813e318d 100644 --- a/tests/compilers_fixtures/faultyContract.sol +++ b/tests/compilers_fixtures/faultyContract.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract c { blah } \ No newline at end of file diff --git a/tests/compilers_fixtures/libraryContract.sol b/tests/compilers_fixtures/libraryContract.sol index 1c38ff2df..898807cea 100644 --- a/tests/compilers_fixtures/libraryContract.sol +++ b/tests/compilers_fixtures/libraryContract.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; library Set { // We define a new struct datatype that will be used to diff --git a/tests/compilers_fixtures/simpleContract.sol b/tests/compilers_fixtures/simpleContract.sol index 25d22f3e5..e4963a63c 100644 --- a/tests/compilers_fixtures/simpleContract.sol +++ b/tests/compilers_fixtures/simpleContract.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract c { function f() public { diff --git a/tests/dump/undeclared.sol b/tests/dump/undeclared.sol index a7e72078c..0aab88209 100644 --- a/tests/dump/undeclared.sol +++ b/tests/dump/undeclared.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract test { event Bar(bytes32 a, int b); diff --git a/tests/jobs_fixtures/app40-simple-storage/simple_storage.sol b/tests/jobs_fixtures/app40-simple-storage/simple_storage.sol index 4af027a7e..a1fd8fa90 100644 --- a/tests/jobs_fixtures/app40-simple-storage/simple_storage.sol +++ b/tests/jobs_fixtures/app40-simple-storage/simple_storage.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract SimpleStorage { uint storedData; diff --git a/tests/jobs_fixtures/app41-filename-too-long/test.sol b/tests/jobs_fixtures/app41-filename-too-long/test.sol index 8b1a0eb33..82a403b3b 100644 --- a/tests/jobs_fixtures/app41-filename-too-long/test.sol +++ b/tests/jobs_fixtures/app41-filename-too-long/test.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract Test { } \ No newline at end of file diff --git a/tests/jobs_fixtures/app46-meta-mixed-with-normal/test.sol b/tests/jobs_fixtures/app46-meta-mixed-with-normal/test.sol index 031654be1..20d2328d3 100644 --- a/tests/jobs_fixtures/app46-meta-mixed-with-normal/test.sol +++ b/tests/jobs_fixtures/app46-meta-mixed-with-normal/test.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract Concatenator { string _name; diff --git a/tests/jobs_fixtures/app49-return-array-with-RETURNDATACOPY/consumeArray.sol b/tests/jobs_fixtures/app49-return-array-with-RETURNDATACOPY/consumeArray.sol index 6eecf0072..bc5ef26cf 100644 --- a/tests/jobs_fixtures/app49-return-array-with-RETURNDATACOPY/consumeArray.sol +++ b/tests/jobs_fixtures/app49-return-array-with-RETURNDATACOPY/consumeArray.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; import 'returnArray.sol'; diff --git a/tests/jobs_fixtures/app49-return-array-with-RETURNDATACOPY/returnArray.sol b/tests/jobs_fixtures/app49-return-array-with-RETURNDATACOPY/returnArray.sol index 1d2ac3d53..e6ab9a955 100644 --- a/tests/jobs_fixtures/app49-return-array-with-RETURNDATACOPY/returnArray.sol +++ b/tests/jobs_fixtures/app49-return-array-with-RETURNDATACOPY/returnArray.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract ReturnArray { function singleDigitPrimes() pure external returns (uint256[] memory) { diff --git a/tests/jobs_fixtures/app50-set-storage-zero/storageIssueWithZero.sol b/tests/jobs_fixtures/app50-set-storage-zero/storageIssueWithZero.sol index e0571c14f..44a5c3fea 100644 --- a/tests/jobs_fixtures/app50-set-storage-zero/storageIssueWithZero.sol +++ b/tests/jobs_fixtures/app50-set-storage-zero/storageIssueWithZero.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract storageIssueWithZero { diff --git a/tests/jobs_fixtures/app52-proposal-execute/contract.sol b/tests/jobs_fixtures/app52-proposal-execute/contract.sol index ae0eecef3..fd99d2c7b 100644 --- a/tests/jobs_fixtures/app52-proposal-execute/contract.sol +++ b/tests/jobs_fixtures/app52-proposal-execute/contract.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract foo { uint foobar; diff --git a/tests/jobs_fixtures/app52-proposal-execute/test.sol b/tests/jobs_fixtures/app52-proposal-execute/test.sol index f56f5ebc2..7aa6fe413 100644 --- a/tests/jobs_fixtures/app52-proposal-execute/test.sol +++ b/tests/jobs_fixtures/app52-proposal-execute/test.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract bar { uint foobar; diff --git a/tests/jobs_fixtures/app54-static-call/Adoption.sol b/tests/jobs_fixtures/app54-static-call/Adoption.sol index ed53dc08f..e8f60e7f8 100644 --- a/tests/jobs_fixtures/app54-static-call/Adoption.sol +++ b/tests/jobs_fixtures/app54-static-call/Adoption.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract Adoption { diff --git a/tests/jobs_fixtures/app54-static-call/AdoptionTest.sol b/tests/jobs_fixtures/app54-static-call/AdoptionTest.sol index b5181ba7a..c43754109 100644 --- a/tests/jobs_fixtures/app54-static-call/AdoptionTest.sol +++ b/tests/jobs_fixtures/app54-static-call/AdoptionTest.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; interface AdoptionInterface{ function adopt(uint petId) external returns (uint); function getAdopters() external view returns (address[16] memory); diff --git a/tests/jobs_fixtures/expected-failure-revert/revert.sol b/tests/jobs_fixtures/expected-failure-revert/revert.sol index c7c4ea776..73d18126d 100644 --- a/tests/jobs_fixtures/expected-failure-revert/revert.sol +++ b/tests/jobs_fixtures/expected-failure-revert/revert.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.4; +pragma solidity ^0.5; contract Revert { function RevertIf0(uint32 i) public pure diff --git a/tests/scripts/deps/solc.sh b/tests/scripts/deps/solc.sh index d86299687..6a45c9966 100755 --- a/tests/scripts/deps/solc.sh +++ b/tests/scripts/deps/solc.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e # Static solc that will run on linux included Alpine -SOLC_URL="https://github.com/ethereum/solidity/releases/download/v0.5.4/solc-static-linux" +SOLC_URL="https://github.com/ethereum/solidity/releases/download/v0.5.12/solc-static-linux" SOLC_BIN="$1" wget -O "$SOLC_BIN" "$SOLC_URL" From 0ffaa1d4f3b595dacf9823bf01ca708f910766f9 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Wed, 30 Oct 2019 11:02:03 +0000 Subject: [PATCH 040/185] Remove references to deleted develop branch Development happens on the master branch. Signed-off-by: Sean Young --- README.md | 4 +-- docs/deploy.md | 4 +-- docs/developers.md | 10 +++----- docs/js-api.md | 62 +++++++++++++++++++++++----------------------- 4 files changed, 39 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 07061e8f5..f623ba1df 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![GoDoc](https://godoc.org/github.com/burrow?status.png)](https://godoc.org/github.com/hyperledger/burrow) [![license](https://img.shields.io/github/license/hyperledger/burrow.svg)](LICENSE.md) [![LoC](https://tokei.rs/b1/github/hyperledger/burrow?category=lines)](https://github.com/hyperledger/burrow) -[![codecov](https://codecov.io/gh/hyperledger/burrow/branch/develop/graph/badge.svg)](https://codecov.io/gh/hyperledger/burrow) +[![codecov](https://codecov.io/gh/hyperledger/burrow/branch/master/graph/badge.svg)](https://codecov.io/gh/hyperledger/burrow) Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It executes Ethereum EVM smart contract code (usually written in [Solidity](https://solidity.readthedocs.io)) on a permissioned virtual machine. Burrow provides transaction finality and high transaction throughput on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. @@ -24,7 +24,7 @@ Hyperledger Burrow is a permissioned blockchain node that executes smart contrac ## JavaScript Client -There is a [JavaScript API](https://github.com/hyperledger/burrow/tree/develop/js) +There is a [JavaScript API](https://github.com/hyperledger/burrow/tree/master/js) ## Project Roadmap diff --git a/docs/deploy.md b/docs/deploy.md index 20de4dc11..80a3ef718 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -11,8 +11,8 @@ The Burrow deploy toolkit can do a number of things: * create proposals or vote for a proposal burrow deploy needs a script to its commands. This script format bares some similarity to [ansible](https://www.ansible.com/). It -is in yaml format. The top level structure is an array of [jobs](https://github.com/hyperledger/burrow/blob/develop/deploy/def/job.go). -The different job types are [defined here](https://github.com/hyperledger/burrow/blob/develop/deploy/def/jobs.go). +is in yaml format. The top level structure is an array of [jobs](https://github.com/hyperledger/burrow/blob/master/deploy/def/job.go). +The different job types are [defined here](https://github.com/hyperledger/burrow/blob/master/deploy/def/jobs.go). You can invoke burrow from the command line: diff --git a/docs/developers.md b/docs/developers.md index 0e21c8aa5..44f0ddf66 100644 --- a/docs/developers.md +++ b/docs/developers.md @@ -7,7 +7,7 @@ - [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) - [protoc](http://google.github.io/proto-lens/installing-protoc.html) (libprotoc 3.7.1) -Please also refer to our [contributing guidelines](https://github.com/hyperledger/burrow/blob/develop/.github/CONTRIBUTING.md). +Please also refer to our [contributing guidelines](https://github.com/hyperledger/burrow/blob/master/.github/CONTRIBUTING.md). ## Building @@ -25,10 +25,8 @@ Install protoc and run `make protobuf_deps`. If you make any changes to the prot ## Releasing * First of all make sure everyone is happy with doing a release now. -* Update project/history.go with the latest releases notes and version. Run `make CHANGELOG.md NOTES.md` and make sure this is merged to develop. -* On the develop branch, run `make ready_for_pull_request`. Check for any modified files. -* Using the github.com web interface, create a pull request for master <= develop (so merging latest develop into master) -* Get someone to merge it. They should check that all commits from develop are included using `git log --oneline origin/develop ^origin/master` +* Update project/history.go with the latest releases notes and version. Run `make CHANGELOG.md NOTES.md` and make sure this is merged to master. +* On the master branch, run `make ready_for_pull_request`. Check for any modified files. * Once master is update to date, switch to master locally run `make tag_release`. This will push the tag which kicks of the release build. * Optionally send out email on hyperledger burrow mailinglist. Agreements network email should be sent out automatically. @@ -45,4 +43,4 @@ ADRs describe standards for the Hyperledger Burrow platform, including core prot 3. Add your ADR to your fork of the repository. There is a [template ADR here](ADRs/adr-X_template.md). 4. Submit a Pull Request to Burrow's [ADRs repository](./ADRs/). -If your ADR requires images, the image files should be included in a subdirectory of the `assets` folder for that ADR as follow: `assets/ADR-X` (for ADR **X**). When linking to an image in the ADR, use relative links such as `../assets/adr-X/image.png`. \ No newline at end of file +If your ADR requires images, the image files should be included in a subdirectory of the `assets` folder for that ADR as follow: `assets/ADR-X` (for ADR **X**). When linking to an image in the ADR, use relative links such as `../assets/adr-X/image.png`. diff --git a/docs/js-api.md b/docs/js-api.md index c93a6de9d..4407cf064 100644 --- a/docs/js-api.md +++ b/docs/js-api.md @@ -56,13 +56,13 @@ The table below links to the reference schema for either the protobuf files gove | Component Name | Accessor | | :----------- | :--------------- | -| Transactions | [Burrow.transact](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto) | -| Queries | [Burrow.query](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcquery.proto) | -| EventStream | [Burrow.eventStream](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto) | -| Events | [Burrow.events](https://github.com/hyperledger/burrow/blob/develop/lib/events.js) | -| NameReg | [Burrow.namereg](https://github.com/hyperledger/burrow/blob/develop/lib/namereg.js) | +| Transactions | [Burrow.transact](https://github.com/hyperledger/burrow/blob/master/protobuf/rpctransact.proto) | +| Queries | [Burrow.query](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcquery.proto) | +| EventStream | [Burrow.eventStream](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto) | +| Events | [Burrow.events](https://github.com/hyperledger/burrow/blob/master/lib/events.js) | +| NameReg | [Burrow.namereg](https://github.com/hyperledger/burrow/blob/master/lib/namereg.js) | -| Contracts | [Burrow.contracts](https://github.com/hyperledger/burrow/blob/develop/lib/contractManager.js) | +| Contracts | [Burrow.contracts](https://github.com/hyperledger/burrow/blob/master/lib/contractManager.js) | ### GRPC Access Components @@ -155,43 +155,43 @@ burrow.transact.NameTxSync(setPayload, function(error, data){ | Method | Passed | Returns | | :----- | :--------- | :---- | -| burrow.transact.BroadcastTxSync | [TxEnvelopeParam](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto#L74-L79) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | -| burrow.transact.BroadcastTxASync | [TxEnvelopeParam](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto#L74-L79) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | -| burrow.transact.SignTx | [TxEnvelopeParam](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto#L74-L79) | [TxEnvelope](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto#L70-L72) | -| burrow.transact.FormulateTx | [PayloadParam](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto#L64-L68) | [TxEnvelope](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto#L70-L72) | -| burrow.transact.CallTxSync | [CallTx](https://github.com/hyperledger/burrow/blob/develop/protobuf/payload.proto#L53-L66) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | -| burrow.transact.CallTxAsync | [CallTx](https://github.com/hyperledger/burrow/blob/develop/protobuf/payload.proto#L53-L66) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | -| burrow.transact.CallTxSim | [CallTx](https://github.com/hyperledger/burrow/blob/develop/protobuf/payload.proto#L53-L66) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | -| burrow.transact.SendTxSync | [SendTx](https://github.com/hyperledger/burrow/blob/develop/protobuf/payload.proto#L69-L76) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | -| burrow.transact.SendTxAsync | [SendTx](https://github.com/hyperledger/burrow/blob/develop/protobuf/payload.proto#L69-L76) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | -| burrow.transact.NameTxSync | [NameTx](https://github.com/hyperledger/burrow/blob/develop/protobuf/payload.proto#L88-L98) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | -| burrow.transact.NameTxAsync | [NameTx](https://github.com/hyperledger/burrow/blob/develop/protobuf/payload.proto#L88-L98) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | +| burrow.transact.BroadcastTxSync | [TxEnvelopeParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpctransact.proto#L74-L79) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | +| burrow.transact.BroadcastTxASync | [TxEnvelopeParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpctransact.proto#L74-L79) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | +| burrow.transact.SignTx | [TxEnvelopeParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpctransact.proto#L74-L79) | [TxEnvelope](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto#L70-L72) | +| burrow.transact.FormulateTx | [PayloadParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpctransact.proto#L64-L68) | [TxEnvelope](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto#L70-L72) | +| burrow.transact.CallTxSync | [CallTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L53-L66) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | +| burrow.transact.CallTxAsync | [CallTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L53-L66) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | +| burrow.transact.CallTxSim | [CallTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L53-L66) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | +| burrow.transact.SendTxSync | [SendTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L69-L76) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | +| burrow.transact.SendTxAsync | [SendTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L69-L76) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | +| burrow.transact.NameTxSync | [NameTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L88-L98) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | +| burrow.transact.NameTxAsync | [NameTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L88-L98) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | #### Queries -`Burrow.query` provides access to the burrow GRPC service `rpcquery`. As a GRPC wrapper all the endpoints take a data argument and an optional callback. The format of the data object is specified in the [protobuf files](https://github.com/hyperledger/burrow/tree/develop/js/protobuf). Note that "STREAM" functions take a callback `function(error, data)` which is mandatory and is called any time data is returned. For list Accounts the queryable tags are Address, PublicKey, Sequence, Balance, Code, Permissions (Case sensitive). As an example you can get all accounts with a balance greater than 1000 by `burrow.query.ListAccounts('Balance > 1000', callback)`. Multiple tag criteria can be combined using 'AND' and 'OR' for an example of a combined query see [here](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L87). Similarly for ListNames, the avaible tags are Name, Data, Owner and Exires (once again case sensitive) use is identical to List accounts. +`Burrow.query` provides access to the burrow GRPC service `rpcquery`. As a GRPC wrapper all the endpoints take a data argument and an optional callback. The format of the data object is specified in the [protobuf files](https://github.com/hyperledger/burrow/tree/master/js/protobuf). Note that "STREAM" functions take a callback `function(error, data)` which is mandatory and is called any time data is returned. For list Accounts the queryable tags are Address, PublicKey, Sequence, Balance, Code, Permissions (Case sensitive). As an example you can get all accounts with a balance greater than 1000 by `burrow.query.ListAccounts('Balance > 1000', callback)`. Multiple tag criteria can be combined using 'AND' and 'OR' for an example of a combined query see [here](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L87). Similarly for ListNames, the avaible tags are Name, Data, Owner and Exires (once again case sensitive) use is identical to List accounts. | Method | Passed | Returns | Notes | | :----- | :--------- | :---- | :------- | -| burrow.query.GetAccount | [GetAccountParam](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcquery.proto#L25-L27) | [ConcreteAccount](https://github.com/hyperledger/burrow/blob/develop/protobuf/acm.proto#L23-L31) | | -| burrow.query.ListAccounts | [ListAccountsParam](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcquery.proto#L29-L31) | [ConcreteAccount](https://github.com/hyperledger/burrow/blob/develop/protobuf/acm.proto#L23-L31) | STREAM | -| burrow.query.GetNameParam | [GetNameParam](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcquery.proto#L33-L35) | [Entry](https://github.com/hyperledger/burrow/blob/develop/protobuf/names.proto#L22-L32) | | -| burrow.query.ListNames | [ListNamesParam](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcquery.proto#L37-L39) | [Entry](https://github.com/hyperledger/burrow/blob/develop/protobuf/names.proto#L22-L32) | STREAM| +| burrow.query.GetAccount | [GetAccountParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcquery.proto#L25-L27) | [ConcreteAccount](https://github.com/hyperledger/burrow/blob/develop/protobuf/acm.proto#L23-L31) | | +| burrow.query.ListAccounts | [ListAccountsParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcquery.proto#L29-L31) | [ConcreteAccount](https://github.com/hyperledger/burrow/blob/develop/protobuf/acm.proto#L23-L31) | STREAM | +| burrow.query.GetNameParam | [GetNameParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcquery.proto#L33-L35) | [Entry](https://github.com/hyperledger/burrow/blob/develop/protobuf/names.proto#L22-L32) | | +| burrow.query.ListNames | [ListNamesParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcquery.proto#L37-L39) | [Entry](https://github.com/hyperledger/burrow/blob/develop/protobuf/names.proto#L22-L32) | STREAM| #### EventStream NB: When listening to contract events it is easier to use the contract interface (described below) -`Burrow.executionEvents` provides access to the burrow GRPC service `ExecutionEvents`. As a GRPC wrapper all the endpoints take a data argument and an optional callback. The format of the data object is specified in the [protobuf files](https://github.com/hyperledger/burrow/tree/develop/js/protobuf). Note that "STREAM" functions take a callback `function(error, data)` which is mandatory and is called any time data is returned. +`Burrow.executionEvents` provides access to the burrow GRPC service `ExecutionEvents`. As a GRPC wrapper all the endpoints take a data argument and an optional callback. The format of the data object is specified in the [protobuf files](https://github.com/hyperledger/burrow/tree/master/js/protobuf). Note that "STREAM" functions take a callback `function(error, data)` which is mandatory and is called any time data is returned. | Method | Passed | Returns | Notes | | :----- | :--------- | :---- | :------- | -| burrow.executionEvents.GetBlock | [GetBlockRequest](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L37-L42) | [BlockExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L20-L27) | | -| burrow.executionEvents.GetBlocks | [BlocksRequest](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L51-L89) | [BlockExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L20-L27) | STREAM | -| burrow.executionEvents.GetTx | [GetTxRequest](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L44-L49) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | | -| burrow.executionEvents.GetTxs | [BlocksRequest](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L51-L89) | [GetTxsResponse](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L96-L99) | STREAM | -| burrow.executionEvents.GetEvents | [BlocksRequest](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L51-L89) | [GetEventsResponse](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L91-L94) | STREAM | +| burrow.executionEvents.GetBlock | [GetBlockRequest](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L37-L42) | [BlockExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L20-L27) | | +| burrow.executionEvents.GetBlocks | [BlocksRequest](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L51-L89) | [BlockExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L20-L27) | STREAM | +| burrow.executionEvents.GetTx | [GetTxRequest](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L44-L49) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | | +| burrow.executionEvents.GetTxs | [BlocksRequest](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L51-L89) | [GetTxsResponse](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L96-L99) | STREAM | +| burrow.executionEvents.GetEvents | [BlocksRequest](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L51-L89) | [GetEventsResponse](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L91-L94) | STREAM | *** @@ -234,7 +234,7 @@ Sets an entry in the namereg. It returns a promise if callback not provided. 3. `int` - The number of blocks to register the name for (more blocks = larger fee) 4. `function` - (optional) Function to call upon completion of form `function(error, data)`. ###### Returns -`TxExecution` - The return data object is a [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56). +`TxExecution` - The return data object is a [TxExecution](https://github.com/hyperledger/burrow/blob/master/protobuf/exec.proto#L34-L56). ###### Example ```javascript @@ -267,7 +267,7 @@ Listens to execution events which satisfy the filter query. 2. `Object` - Currently unused. pass `{}` 3. `function` - Signature of `function(error, data)` mandatory ###### Returns -`GetEventsResponse` - The return data object is a [GetEventsResponse](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L91-L94) +`GetEventsResponse` - The return data object is a [GetEventsResponse](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L91-L94) @@ -281,7 +281,7 @@ Listens to EVM event executions from specific contract. 3. `Object` - Currently unused. pass `{}` 4. `function` - Signature of `function(error, data)` mandatory. ###### Returns -`GetEventsResponse` - The return data object is a [GetEventsResponse](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L91-L94) +`GetEventsResponse` - The return data object is a [GetEventsResponse](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L91-L94) From 3d59efd7eaa1bb021220b6ed71712bcd1274363d Mon Sep 17 00:00:00 2001 From: Sean Young Date: Thu, 7 Nov 2019 10:57:25 +0000 Subject: [PATCH 041/185] Fix broken links Signed-off-by: Sean Young --- README.md | 2 +- docs/deploy.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f623ba1df..f1bf15022 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ There is a [JavaScript API](https://github.com/hyperledger/burrow/tree/master/js Project information generally updated on a quarterly basis can be found on the [Hyperledger Burrow Wiki](https://wiki.hyperledger.org/display/burrow). ## Documentation -Burrow getting started documentation is available in the [docs](docs/README.md) directory and in [GoDocs](https://godoc.org/github.com/hyperledger/burrow). +Burrow getting started documentation is available in the [docs](https://hyperledger.github.io/burrow) directory and in [GoDocs](https://godoc.org/github.com/hyperledger/burrow). ## Contribute diff --git a/docs/deploy.md b/docs/deploy.md index 80a3ef718..235f4f333 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -39,7 +39,7 @@ parameters: * _data:_ the arguments to the contract's constructor The solidity source file is compiled using the [solidity compiler](https://github.com/ethereum/solidity) unless the `--wasm` argument was given -on the burrow deploy command line, in which case the [solang compiler](https://github.com/ethereum/solidity) is used. +on the burrow deploy command line, in which case the [solang compiler](https://github.com/hyperledger-labs/solang) is used. The contract is deployed with its metadata, so that we can retrieve the ABI when we need to call a function of this contract. For this reason, the bin file is a modified version of the [solidity output json](https://solidity.readthedocs.io/en/v0.5.11/using-the-compiler.html#output-description). From 949e3a7fd4c7a17316ca05df7d6f5fae77ab9afe Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 22 Nov 2019 10:13:34 +0000 Subject: [PATCH 042/185] bump to 0.29.4 to include solc 0.5 Signed-off-by: Gregory Hill --- CHANGELOG.md | 6 ++++++ NOTES.md | 2 +- project/history.go | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 282a077e2..57e285dc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.29.4] - 2019-11-22 +### Changed +- [Build] Move to solidity 0.5.12 + + ## [0.29.3] - 2019-10-16 ### Changed - [NPM] Point package.json to index.js @@ -593,6 +598,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.29.4]: https://github.com/hyperledger/burrow/compare/v0.29.3...v0.29.4 [0.29.3]: https://github.com/hyperledger/burrow/compare/v0.29.2...v0.29.3 [0.29.2]: https://github.com/hyperledger/burrow/compare/v0.29.1...v0.29.2 [0.29.1]: https://github.com/hyperledger/burrow/compare/v0.29.0...v0.29.1 diff --git a/NOTES.md b/NOTES.md index 9bfead495..742d67496 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,3 @@ ### Changed -- [NPM] Point package.json to index.js +- [Build] Move to solidity 0.5.12 diff --git a/project/history.go b/project/history.go index 00d48271b..c04ed1564 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,11 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.29.4 - 2019-11-22", + `### Changed +- [Build] Move to solidity 0.5.12 +`, + "0.29.3 - 2019-10-16", `### Changed - [NPM] Point package.json to index.js From b0ba2e1ddcbaf7d150b96069b86ed90b04005564 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Fri, 22 Nov 2019 10:26:26 +0000 Subject: [PATCH 043/185] Fix ABCI link Signed-off-by: Sean Young --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f1bf15022..04ff3e502 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It Hyperledger Burrow is a permissioned blockchain node that executes smart contract code following the Ethereum specification. Burrow is built for a multi-chain universe with application specific optimization in mind. Burrow as a node is constructed out of three main components: the consensus engine, the permissioned Ethereum virtual machine and the rpc gateway. More specifically Burrow consists of the following: - **Consensus Engine:** Transactions are ordered and finalised with the Byzantine fault-tolerant Tendermint protocol. The Tendermint protocol provides high transaction throughput over a set of known validators and prevents the blockchain from forking. -- **Application Blockchain Interface (ABCI):** The smart contract application interfaces with the consensus engine over the [ABCI](https://github.com/tendermint/tendermint/abci). The ABCI allows for the consensus engine to remain agnostic from the smart contract application. +- **Application Blockchain Interface (ABCI):** The smart contract application interfaces with the consensus engine over the [ABCI](https://github.com/tendermint/tendermint/tree/master/abci). The ABCI allows for the consensus engine to remain agnostic from the smart contract application. - **Smart Contract Application:** Transactions are validated and applied to the application state in the order that the consensus engine has finalised them. The application state consists of all accounts, the validator set and the name registry. Accounts in Burrow have permissions and either contain smart contract code or correspond to a public-private key pair. A transaction that calls on the smart contract code in a given account will activate the execution of that account’s code in a permissioned virtual machine. - **Permissioned Ethereum Virtual Machine:** This virtual machine is built to observe the Ethereum operation code specification and additionally asserts the correct permissions have been granted. Permissioning is enforced through secure native functions and underlies all smart contract code. An arbitrary but finite amount of gas is handed out for every execution to ensure a finite execution duration - “You don’t need money to play, when you have permission to play”. - **Application Binary Interface (ABI):** Transactions need to be formulated in a binary format that can be processed by the blockchain node. Current tooling provides functionality to compile, deploy and link solidity smart contracts and formulate transactions to call smart contracts on the chain. From bb16fe722bb9d7ef094aee716ebda0883df06f62 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Mon, 9 Dec 2019 12:10:50 +0000 Subject: [PATCH 044/185] upgrade to tendermint v0.32.8 Signed-off-by: Gregory Hill --- CHANGELOG.md | 6 ++++++ NOTES.md | 4 ++-- consensus/abci/process.go | 3 ++- core/processes.go | 14 ++++++++++---- execution/transactor.go | 13 +++++++++---- execution/transactor_test.go | 5 +++-- go.mod | 13 ++++++------- go.sum | 35 +++++++++++++++++++++++++++-------- project/history.go | 5 +++++ 9 files changed, 70 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57e285dc4..e57d296bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.29.5] - 2019-12-09 +### Security +- [Tendermint] Upgraded to v0.32.8, checkTxAsync now includes node ID + + ## [0.29.4] - 2019-11-22 ### Changed - [Build] Move to solidity 0.5.12 @@ -598,6 +603,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.29.5]: https://github.com/hyperledger/burrow/compare/v0.29.4...v0.29.5 [0.29.4]: https://github.com/hyperledger/burrow/compare/v0.29.3...v0.29.4 [0.29.3]: https://github.com/hyperledger/burrow/compare/v0.29.2...v0.29.3 [0.29.2]: https://github.com/hyperledger/burrow/compare/v0.29.1...v0.29.2 diff --git a/NOTES.md b/NOTES.md index 742d67496..a421da009 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,3 @@ -### Changed -- [Build] Move to solidity 0.5.12 +### Security +- [Tendermint] Upgraded to v0.32.8, checkTxAsync now includes node ID diff --git a/consensus/abci/process.go b/consensus/abci/process.go index 23d06b82e..08068dc32 100644 --- a/consensus/abci/process.go +++ b/consensus/abci/process.go @@ -12,6 +12,7 @@ import ( "github.com/hyperledger/burrow/execution" "github.com/hyperledger/burrow/txs" "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/mempool" tmTypes "github.com/tendermint/tendermint/types" ) @@ -47,7 +48,7 @@ func NewProcess(committer execution.BatchCommitter, blockchain *bcm.Blockchain, return p } -func (p *Process) CheckTx(tx tmTypes.Tx, cb func(*types.Response)) error { +func (p *Process) CheckTx(tx tmTypes.Tx, cb func(*types.Response), txInfo mempool.TxInfo) error { const header = "DeliverTx" p.committer.Lock() defer p.committer.Unlock() diff --git a/core/processes.go b/core/processes.go index 5a1146529..7639759b2 100644 --- a/core/processes.go +++ b/core/processes.go @@ -23,6 +23,7 @@ import ( "github.com/hyperledger/burrow/rpc/rpctransact" "github.com/hyperledger/burrow/rpc/web3" "github.com/hyperledger/burrow/txs" + "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/version" hex "github.com/tmthrgd/go-hex" ) @@ -105,8 +106,8 @@ func NoConsensusLauncher(kern *Kernel) process.Launcher { // Provide execution accounts against backend state since we will commit immediately accounts := execution.NewAccounts(kern.committer, kern.keyClient, AccountsRingMutexCount) // Elide consensus and use a CheckTx function that immediately commits any valid transaction - kern.Transactor = execution.NewTransactor(kern.Blockchain, kern.Emitter, accounts, proc.CheckTx, kern.txCodec, - kern.Logger) + kern.Transactor = execution.NewTransactor(kern.Blockchain, + kern.Emitter, accounts, proc.CheckTx, "", kern.txCodec, kern.Logger) return proc, nil }, } @@ -123,13 +124,18 @@ func TendermintLauncher(kern *Kernel) process.Launcher { return nil, fmt.Errorf("%s cannot get NodeView %v", errHeader, err) } + var id p2p.ID + if ni := nodeView.NodeInfo(); ni != nil { + id = p2p.ID(ni.ID.Bytes()) + } + kern.Blockchain.SetBlockStore(bcm.NewBlockStore(nodeView.BlockStore())) // Provide execution accounts against checker state so that we can assign sequence numbers accounts := execution.NewAccounts(kern.checker, kern.keyClient, AccountsRingMutexCount) // Pass transactions to Tendermint's CheckTx function for broadcast and consensus checkTx := kern.Node.Mempool().CheckTx - kern.Transactor = execution.NewTransactor(kern.Blockchain, kern.Emitter, accounts, checkTx, kern.txCodec, - kern.Logger) + kern.Transactor = execution.NewTransactor(kern.Blockchain, + kern.Emitter, accounts, checkTx, id, kern.txCodec, kern.Logger) accountState := kern.State eventsState := kern.State diff --git a/execution/transactor.go b/execution/transactor.go index 1cffac2f1..7fb46276b 100644 --- a/execution/transactor.go +++ b/execution/transactor.go @@ -19,6 +19,8 @@ import ( "github.com/hyperledger/burrow/logging/structure" "github.com/hyperledger/burrow/txs" abciTypes "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/mempool" + "github.com/tendermint/tendermint/p2p" tmTypes "github.com/tendermint/tendermint/types" ) @@ -26,6 +28,8 @@ const ( SubscribeBufferSize = 10 ) +type txChecker func(tx tmTypes.Tx, callback func(*abciTypes.Response), txInfo mempool.TxInfo) error + // Transactor is responsible for helping to formulate, sign, and broadcast transactions to tendermint // // The BroadcastTx* methods are able to work against the mempool Accounts (pending) state rather than the @@ -38,20 +42,21 @@ type Transactor struct { BlockchainInfo bcm.BlockchainInfo Emitter *event.Emitter MempoolAccounts *Accounts - checkTxAsync func(tx tmTypes.Tx, cb func(*abciTypes.Response)) error + checkTxAsync txChecker + nodeID p2p.ID txEncoder txs.Encoder logger *logging.Logger } func NewTransactor(tip bcm.BlockchainInfo, emitter *event.Emitter, mempoolAccounts *Accounts, - checkTxAsync func(tx tmTypes.Tx, cb func(*abciTypes.Response)) error, txEncoder txs.Encoder, - logger *logging.Logger) *Transactor { + checkTxAsync txChecker, id p2p.ID, txEncoder txs.Encoder, logger *logging.Logger) *Transactor { return &Transactor{ BlockchainInfo: tip, Emitter: emitter, MempoolAccounts: mempoolAccounts, checkTxAsync: checkTxAsync, + nodeID: id, txEncoder: txEncoder, logger: logger.With(structure.ComponentKey, "Transactor"), } @@ -229,7 +234,7 @@ func (trans *Transactor) CheckTxSyncRaw(ctx context.Context, txBytes []byte) (*t } func (trans *Transactor) CheckTxAsyncRaw(txBytes []byte, callback func(res *abciTypes.Response)) error { - return trans.checkTxAsync(txBytes, callback) + return trans.checkTxAsync(txBytes, callback, mempool.TxInfo{SenderP2PID: trans.nodeID}) } func (trans *Transactor) CheckTxAsync(txEnv *txs.Envelope, callback func(res *abciTypes.Response)) error { diff --git a/execution/transactor_test.go b/execution/transactor_test.go index ac7d5b717..083c630ba 100644 --- a/execution/transactor_test.go +++ b/execution/transactor_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abciTypes "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/mempool" tmTypes "github.com/tendermint/tendermint/types" ) @@ -42,7 +43,7 @@ func TestTransactor_BroadcastTxSync(t *testing.T) { require.NoError(t, err) height := uint64(35) trans := NewTransactor(bc, evc, NewAccounts(acmstate.NewMemoryState(), mock.NewKeyClient(privAccount), 100), - func(tx tmTypes.Tx, cb func(*abciTypes.Response)) error { + func(tx tmTypes.Tx, cb func(*abciTypes.Response), txInfo mempool.TxInfo) error { txe := exec.NewTxExecution(txEnv) txe.Height = height err := evc.Publish(context.Background(), txe, txe) @@ -58,7 +59,7 @@ func TestTransactor_BroadcastTxSync(t *testing.T) { Data: bs, })) return nil - }, txCodec, logger) + }, "", txCodec, logger) txe, err := trans.BroadcastTxSync(context.Background(), txEnv) require.NoError(t, err) assert.Equal(t, height, txe.Height) diff --git a/go.mod b/go.mod index a8569314a..45f807778 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/fatih/color v1.7.0 github.com/go-kit/kit v0.9.0 github.com/go-ozzo/ozzo-validation v3.5.0+incompatible - github.com/gogo/protobuf v1.3.0 + github.com/gogo/protobuf v1.3.1 github.com/golang/protobuf v1.3.2 github.com/gorilla/websocket v1.4.1 github.com/hashicorp/golang-lru v0.5.1 @@ -36,18 +36,17 @@ require ( github.com/perlin-network/life v0.0.0-20190803100833-89b850c02992 github.com/pkg/errors v0.8.1 github.com/prometheus/client_golang v0.9.3 - github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 + github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 github.com/prometheus/common v0.4.0 github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a github.com/sirupsen/logrus v1.4.2 // indirect - github.com/spf13/viper v1.4.0 + github.com/spf13/viper v1.5.0 github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485 github.com/stretchr/testify v1.4.0 - github.com/stumble/gorocksdb v0.0.3 // indirect github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 github.com/tendermint/go-amino v0.14.1 github.com/tendermint/iavl v0.12.4 - github.com/tendermint/tendermint v0.32.4 + github.com/tendermint/tendermint v0.32.8 github.com/tendermint/tm-db v0.2.0 github.com/test-go/testify v1.1.4 github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 @@ -58,6 +57,6 @@ require ( golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 golang.org/x/sys v0.0.0-20190825160603-fb81701db80f // indirect - google.golang.org/grpc v1.23.1 - gopkg.in/yaml.v2 v2.2.2 + google.golang.org/grpc v1.25.1 + gopkg.in/yaml.v2 v2.2.4 ) diff --git a/go.sum b/go.sum index 4faf39984..b85f42598 100644 --- a/go.sum +++ b/go.sum @@ -32,6 +32,7 @@ github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVa github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9 h1:Iy/9yf1PnKnwH8V0phEnqKE6aSIaqIZ+yn4PQgHF84E= github.com/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9/go.mod h1:6R3C29d3JonDKVjnlzFv5BGL/bfZP+0I7rKHKwiqKP8= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -57,6 +58,8 @@ github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13 h1:/voSflvo4UvPT0XZy+YQM github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13/go.mod h1:rQELVIqRXpraeUryHOBadz99ePvEVQmTVpGr8M9QQ4Q= github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8 h1:bD2/rCXwgXJm2vgoSSSCM9IPjVFfEoQFFblzg7HHABI= github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8/go.mod h1:o4DgpccPNAQAlPSxo7I4L/LWNh2oyr/BBGSynrLTmZM= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.2/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/etcd-io/bbolt v1.3.3 h1:gSJmxrs37LgTqR/oyJBWok6k6SvXEUerFTbltIhXkBM= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= @@ -91,8 +94,8 @@ 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/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.0 h1:G8O7TerXerS4F6sx9OV7/nRfJdnXgHZu/S/7F2SN+UE= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -192,6 +195,8 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= @@ -225,8 +230,8 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= -github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.5.0 h1:GpsTwfsQ27oS/Aha/6d1oD7tpKIqWnOA6tgOX9HHkt4= +github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4= github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485 h1:tvEO2/Btzw9L4N2VlAHD7AXjk1g1yFTwbGEm8dz7QWY= github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485/go.mod h1:fMlyZAyOBbIsA9SgKX9V3X8DvF+5ImkZ+Z1HZcmo8Ec= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -238,6 +243,8 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stumble/gorocksdb v0.0.3 h1:9UU+QA1pqFYJuf9+5p7z1IqdE5k0mma4UAeu2wmX8kA= github.com/stumble/gorocksdb v0.0.3/go.mod h1:v6IHdFBXk5DJ1K4FZ0xi+eY737quiiBxYtSWXadLybY= +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.20190318030020-c3a204f8e965 h1:1oFLiOyVl+W7bnBzGhf7BbIv9loSFQcieWWYIjLqcAw= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6offJMk= @@ -245,8 +252,8 @@ github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYM github.com/tendermint/iavl v0.12.4 h1:hd1woxUGISKkfUWBA4mmmTwOua6PQZTJM/F0FDrmMV8= github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= -github.com/tendermint/tendermint v0.32.4 h1:KwZIMtT+ROvfMYO3wine6F9hak3SpngcRcAIzys1J3I= -github.com/tendermint/tendermint v0.32.4/go.mod h1:D2+A3pNjY+Po72X0mTfaXorFhiVI8dh/Zg640FGyGtE= +github.com/tendermint/tendermint v0.32.8 h1:eOaLJGRi5x/Rb23fiVsxq9c5fZ/6O5QplExlGjNPDVI= +github.com/tendermint/tendermint v0.32.8/go.mod h1:5/B1XZjNYtVBso8o1l/Eg4A0Mhu42lDcmftoQl95j/E= github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= github.com/tendermint/tm-db v0.2.0 h1:rJxgdqn6fIiVJZy4zLpY1qVlyD0TU6vhkT4kEf71TQQ= github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= @@ -283,12 +290,16 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 h1:7KByu05hhLed2MO29w7p1XfZvZ13m8mub3shuVftRs0= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +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-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= @@ -311,6 +322,7 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190306220234-b354f8bf4d9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190825160603-fb81701db80f h1:LCxigP8q3fPRGNVYndYsyHnF0zRrvcoVwZMfb8iQZe4= golang.org/x/sys v0.0.0-20190825160603-fb81701db80f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -321,22 +333,27 @@ golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGm 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-20190114222345-bf090417da8b/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-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= 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.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/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-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2 h1:67iHsV9djwGdZpdZNbLuQj6FOzCaZe3w+vhLjn5AcFA= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= 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= @@ -353,5 +370,7 @@ gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bl gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/project/history.go b/project/history.go index c04ed1564..0123b2f6c 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,11 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.29.5 - 2019-12-09", + `### Security +- [Tendermint] Upgraded to v0.32.8, checkTxAsync now includes node ID +`, + "0.29.4 - 2019-11-22", `### Changed - [Build] Move to solidity 0.5.12 From 060dd7214475658893c65de3b348478121cbfe51 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Sun, 8 Dec 2019 18:29:28 +0000 Subject: [PATCH 045/185] Fix for downstream API: - [Vent] always synchronise block - [RPC] provide height with simulated calls - [RPC] return NotFound GRPC error code from name reg Signed-off-by: Silas Davis --- CHANGELOG.md | 8 ++++++ Makefile | 4 +-- NOTES.md | 8 ++++++ execution/simulated_call.go | 3 +++ project/history.go | 9 ++++++- rpc/rpcquery/query_server.go | 4 ++- vent/service/block_consumer.go | 13 +++------- vent/service/block_consumer_test.go | 16 ++++++------ vent/service/consumer_postgres_test.go | 26 ++++++++++--------- vent/sqldb/sqldb_postgres_test.go | 9 ++++++- vent/sqldb/system_tables.go | 2 +- vent/sqlsol/block_data.go | 10 -------- vent/sqlsol/block_data_test.go | 35 -------------------------- 13 files changed, 68 insertions(+), 79 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e57d296bb..66b53ee4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ ## [0.29.5] - 2019-12-09 ### Security - [Tendermint] Upgraded to v0.32.8, checkTxAsync now includes node ID + +### Changed +- [Vent] Sync every block height to DB and send height notification from _vent_chain table so downstream can check DB sync without --blocks +- [RPC/Query] GetName now returns GRPC NotFound status (rather than unknown) when a requested key is not set. + +### Fixed +- [Execution] Simulated calls (e.g. query contracts) now returns the height of the state on which the query was run. Useful for downstream sync. +- ## [0.29.4] - 2019-11-22 diff --git a/Makefile b/Makefile index f7288b39b..92f94a71d 100644 --- a/Makefile +++ b/Makefile @@ -198,7 +198,7 @@ test_truffle: .PHONY: test_integration_vent test_integration_vent: # Include sqlite adapter with tests - will build with CGO but that's probably fine - go test -v -tags 'integration sqlite' ./vent/... + go test -count=1 -v -tags 'integration sqlite' ./vent/... .PHONY: test_integration_vent_postgres test_integration_vent_postgres: @@ -212,7 +212,7 @@ test_restore: .PHONY: test_integration test_integration: - @go test -v -tags integration ./integration/... + @go test -count=1 -v -tags integration ./integration/... .PHONY: test_integration_all test_integration_all: test_keys test_deploy test_integration_vent_postgres test_restore test_truffle test_integration diff --git a/NOTES.md b/NOTES.md index a421da009..dc45d479f 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,11 @@ ### Security - [Tendermint] Upgraded to v0.32.8, checkTxAsync now includes node ID + +### Changed +- [Vent] Sync every block height to DB and send height notification from _vent_chain table so downstream can check DB sync without --blocks +- [RPC/Query] GetName now returns GRPC NotFound status (rather than unknown) when a requested key is not set. + +### Fixed +- [Execution] Simulated calls (e.g. query contracts) now returns the height of the state on which the query was run. Useful for downstream sync. +- diff --git a/execution/simulated_call.go b/execution/simulated_call.go index 5af263ec1..4b78985b1 100644 --- a/execution/simulated_call.go +++ b/execution/simulated_call.go @@ -36,6 +36,9 @@ func CallSim(reader acmstate.Reader, blockchain bcm.BlockchainInfo, fromAddress, Data: data, GasLimit: contexts.GasLimit, })) + + // Set height for downstream synchronisation purposes + txe.Height = blockchain.LastBlockHeight() err := exe.Execute(txe, txe.Envelope.Tx.Payload) if err != nil { return nil, err diff --git a/project/history.go b/project/history.go index 0123b2f6c..68f0725a9 100644 --- a/project/history.go +++ b/project/history.go @@ -51,8 +51,15 @@ var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "htt "0.29.5 - 2019-12-09", `### Security - [Tendermint] Upgraded to v0.32.8, checkTxAsync now includes node ID -`, + +### Changed +- [Vent] Sync every block height to DB and send height notification from _vent_chain table so downstream can check DB sync without --blocks +- [RPC/Query] GetName now returns GRPC NotFound status (rather than unknown) when a requested key is not set. +### Fixed +- [Execution] Simulated calls (e.g. query contracts) now returns the height of the state on which the query was run. Useful for downstream sync. +- +`, "0.29.4 - 2019-11-22", `### Changed - [Build] Move to solidity 0.5.12 diff --git a/rpc/rpcquery/query_server.go b/rpc/rpcquery/query_server.go index 7254b4378..6226b64c0 100644 --- a/rpc/rpcquery/query_server.go +++ b/rpc/rpcquery/query_server.go @@ -22,6 +22,8 @@ import ( "github.com/hyperledger/burrow/txs/payload" "github.com/tendermint/tendermint/abci/types" tmtypes "github.com/tendermint/tendermint/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) type queryServer struct { @@ -150,7 +152,7 @@ func (qs *queryServer) ListAccounts(param *ListAccountsParam, stream Query_ListA func (qs *queryServer) GetName(ctx context.Context, param *GetNameParam) (entry *names.Entry, err error) { entry, err = qs.state.GetName(param.Name) if entry == nil && err == nil { - err = fmt.Errorf("name %s not found", param.Name) + err = status.Error(codes.NotFound, fmt.Sprintf("name %s not found", param.Name)) } return } diff --git a/vent/service/block_consumer.go b/vent/service/block_consumer.go index b55653d47..ff2d288d2 100644 --- a/vent/service/block_consumer.go +++ b/vent/service/block_consumer.go @@ -126,16 +126,11 @@ func NewBlockConsumer(projection *sqlsol.Projection, opt sqlsol.SpecOpt, getEven // upsert rows in specific SQL event tables and update block number // store block data in SQL tables (if any) - if blockData.PendingRows(fromBlock) { - // gets block data to upsert - blk := blockData.Data - - for name, rows := range blk.Tables { - logger.InfoMsg("Upserting rows in SQL table", "height", fromBlock, "table", name, "action", "UPSERT", "rows", rows) - } - - eventCh <- blk + for name, rows := range blockData.Data.Tables { + logger.InfoMsg("Upserting rows in SQL table", "height", fromBlock, "table", name, "action", "UPSERT", "rows", rows) } + + eventCh <- blockData.Data return nil } } diff --git a/vent/service/block_consumer_test.go b/vent/service/block_consumer_test.go index 0402408b2..217f0efb0 100644 --- a/vent/service/block_consumer_test.go +++ b/vent/service/block_consumer_test.go @@ -127,8 +127,8 @@ func TestBlockConsumer(t *testing.T) { }) require.NoError(t, err) blockConsumer := NewBlockConsumer(projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) - _, err = consumeBlock(blockConsumer, eventCh, log) - require.Equal(t, errTimeout, err) + table, err := consumeBlock(blockConsumer, eventCh, log) + require.Len(t, table, 0, "should match no event") }) // This is possibly 'bad' behaviour - since you may be missing an ABI - but for now it is expected. On-chain ABIs @@ -151,15 +151,17 @@ func TestBlockConsumer(t *testing.T) { require.NoError(t, err) blockConsumer := NewBlockConsumer(projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) - _, err = consumeBlock(blockConsumer, eventCh, log) + table, err := consumeBlock(blockConsumer, eventCh, log) // Check matches require.NoError(t, err) - - // Now Remove the ABI - should timeout indicating we did not match the event, but it wasn't an error + require.Len(t, table, 1) + require.Len(t, table[tableName], 1) + // Now Remove the ABI - should not match the event delete(spec.EventsByID, manyTypesEventSpec.ID) blockConsumer = NewBlockConsumer(projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) - _, err = consumeBlock(blockConsumer, eventCh, log) - require.Equal(t, errTimeout, err) + table, err = consumeBlock(blockConsumer, eventCh, log) + require.NoError(t, err) + require.Len(t, table, 0, "should match no events") }) } diff --git a/vent/service/consumer_postgres_test.go b/vent/service/consumer_postgres_test.go index 6d7a3870f..be81ba870 100644 --- a/vent/service/consumer_postgres_test.go +++ b/vent/service/consumer_postgres_test.go @@ -4,7 +4,6 @@ package service_test import ( "encoding/json" - "strconv" "testing" "time" @@ -78,10 +77,10 @@ func TestPostgresConsumer(t *testing.T) { require.NoError(t, err) type payload struct { - Height string `json:"_height"` + Height uint64 `json:"_height"` } - var height uint64 + heightCh := make(chan uint64) notifications := make(map[string]string) go func() { for n := range listener.Notify { @@ -92,11 +91,9 @@ func TestPostgresConsumer(t *testing.T) { if err != nil { panic(err) } - if pl.Height != "" { - height, err = strconv.ParseUint(pl.Height, 10, 64) - if err != nil { - panic(err) - } + if pl.Height >= txe.Height { + heightCh <- pl.Height + return } } } @@ -105,10 +102,15 @@ func TestPostgresConsumer(t *testing.T) { runConsumer(t, cfg) // Give events a chance - time.Sleep(time.Second) - // Assert we get expected returns - t.Logf("latest height: %d, txe height: %d", height, txe.Height) - assert.True(t, height >= txe.Height) + const timeout = 3 * time.Second + select { + case <-time.After(timeout): + t.Fatalf("timed out after %v waiting for notification", timeout) + case height := <-heightCh: + // Assert we get expected returns + t.Logf("latest height: %d, txe height: %d", height, txe.Height) + assert.True(t, height >= txe.Height) + } assert.Equal(t, `{"_action" : "INSERT", "testdescription" : "\\x5472696767657220697421000000000000000000000000000000000000000000", "testname" : "TestTriggerEvent"}`, notifications["meta"]) assert.Equal(t, `{"_action" : "INSERT", "testdescription" : "\\x5472696767657220697421000000000000000000000000000000000000000000", "testkey" : "\\x544553545f4556454e5453000000000000000000000000000000000000000000", "testname" : "TestTriggerEvent"}`, notifications["keyed_meta"]) diff --git a/vent/sqldb/sqldb_postgres_test.go b/vent/sqldb/sqldb_postgres_test.go index 9e99ff2d9..d454ea668 100644 --- a/vent/sqldb/sqldb_postgres_test.go +++ b/vent/sqldb/sqldb_postgres_test.go @@ -47,6 +47,7 @@ func TestPostgresBlockNotification(t *testing.T) { channelName := "height_notification" pad := db.DBAdapter.(*adapters.PostgresAdapter) + // Run twice to show idempotency for i := 0; i < 2; i++ { query := pad.CreateNotifyFunctionQuery(functionName, channelName, columns.Height) _, err := db.DB.Exec(query) @@ -100,5 +101,11 @@ func TestPostgresBlockNotification(t *testing.T) { _, err = db.GetBlock(test.ChainID, dat.BlockHeight) require.NoError(t, err) - require.NoError(t, <-errCh) + const timeout = 2 * time.Second + select { + case <-time.After(timeout): + t.Fatalf("timed out waiting for notification after %s", timeout) + case err = <-errCh: + require.NoError(t, err) + } } diff --git a/vent/sqldb/system_tables.go b/vent/sqldb/system_tables.go index 69786185f..c930bcd52 100644 --- a/vent/sqldb/system_tables.go +++ b/vent/sqldb/system_tables.go @@ -65,7 +65,6 @@ func (db *SQLDB) systemTablesDefinition() types.EventTables { Type: types.SQLColumnTypeText, }, }, - NotifyChannels: map[string][]string{types.BlockHeightLabel: {columns.Height}}, }, tables.Dictionary: { Name: tables.Dictionary, @@ -117,6 +116,7 @@ func (db *SQLDB) systemTablesDefinition() types.EventTables { Length: digits(maxUint64), }, }, + NotifyChannels: map[string][]string{types.BlockHeightLabel: {columns.Height}}, }, } } diff --git a/vent/sqlsol/block_data.go b/vent/sqlsol/block_data.go index d9273b3ba..9cdb9d4a2 100644 --- a/vent/sqlsol/block_data.go +++ b/vent/sqlsol/block_data.go @@ -38,13 +38,3 @@ func (b *BlockData) GetRows(tableName string) (types.EventDataTable, error) { } return nil, fmt.Errorf("GetRows: tableName does not exists as a table in data structure: %s ", tableName) } - -// PendingRows returns true if the given block has at least one pending row to upsert -func (b *BlockData) PendingRows(height uint64) bool { - hasRows := false - // TODO: understand why the guard on height is needed - what does it prevent? - if b.Data.BlockHeight == height && len(b.Data.Tables) > 0 { - hasRows = true - } - return hasRows -} diff --git a/vent/sqlsol/block_data_test.go b/vent/sqlsol/block_data_test.go index fe00959b5..84b7f2856 100644 --- a/vent/sqlsol/block_data_test.go +++ b/vent/sqlsol/block_data_test.go @@ -32,38 +32,3 @@ func TestGetBlockData(t *testing.T) { require.EqualValues(t, 2, blk.BlockHeight) }) } - -func TestPendingRows(t *testing.T) { - t.Run("successfully returns true if a given block has pending rows to upsert", func(t *testing.T) { - values := make(map[string]interface{}) - values["c1"] = "v1" - values["c2"] = "v2" - - blockData := sqlsol.NewBlockData(99) - blockData.AddRow("TEST_TABLE", types.EventDataRow{Action: types.ActionUpsert, RowData: values}) - - hasRows := blockData.PendingRows(99) - - require.Equal(t, true, hasRows) - }) - - t.Run("successfully returns false if a given block does not have pending rows to upsert", func(t *testing.T) { - values := make(map[string]interface{}) - values["c1"] = "v1" - values["c2"] = "v2" - - blockData := sqlsol.NewBlockData(99) - blockData.AddRow("TEST_TABLE", types.EventDataRow{Action: types.ActionUpsert, RowData: values}) - - hasRows := blockData.PendingRows(88) - - require.Equal(t, false, hasRows) - }) - - t.Run("successfully returns false if a given block does not exists", func(t *testing.T) { - blockData := sqlsol.NewBlockData(0) - hasRows := blockData.PendingRows(999) - - require.Equal(t, false, hasRows) - }) -} From 0c29e9025e6c073ad2c58b0feefe7924ec869ed0 Mon Sep 17 00:00:00 2001 From: Ry Jones Date: Fri, 20 Dec 2019 08:57:47 -0800 Subject: [PATCH 046/185] Add CODEOWNERS Fixes #1291 Signed-off-by: Ry Jones --- CODEOWNERS | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 000000000..9ec6bdf14 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 + +# Burrow maintainers +* @hyperledger/burrow-maintainers From 0280c21a96296adee720c972ccde0a997b6c78f2 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Mon, 20 Jan 2020 12:41:04 +0000 Subject: [PATCH 047/185] if no file given to dump cli, stream to STDOUT Signed-off-by: Gregory Hill --- cmd/burrow/commands/dump.go | 42 ++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/cmd/burrow/commands/dump.go b/cmd/burrow/commands/dump.go index f7fcf208d..843842c90 100644 --- a/cmd/burrow/commands/dump.go +++ b/cmd/burrow/commands/dump.go @@ -21,24 +21,33 @@ type dumpOptions struct { useBinaryEncoding *bool } +func maybeOutput(verbose *bool, output Output, format string, args ...interface{}) { + if verbose != nil && *verbose { + output.Logf(format, args) + } +} + func addDumpOptions(cmd *cli.Cmd, specOptions ...string) *dumpOptions { cmd.Spec += "[--height=] [--binary]" for _, spec := range specOptions { cmd.Spec += " " + spec } - cmd.Spec += " FILE" + cmd.Spec += "[FILE]" return &dumpOptions{ height: cmd.IntOpt("h height", 0, "Block height to dump to, defaults to latest block height"), useBinaryEncoding: cmd.BoolOpt("b binary", false, "Output in binary encoding (default is JSON)"), - filename: cmd.StringArg("FILE", "", "Save dump here"), + filename: cmd.StringArg("FILE", "", "Location to output dump, if no argument is given then this streams to STDOUT"), } } // Dump saves the state from a remote chain func Dump(output Output) func(cmd *cli.Cmd) { return func(cmd *cli.Cmd) { + verbose := cmd.BoolOpt("v verbose", false, "Verbose debug information") + cmd.Spec += "[--verbose]" + cmd.Command("local", "create a dump from local Burrow directory", func(cmd *cli.Cmd) { - output.Logf("dumping from local Burrow dir") + maybeOutput(verbose, output, "dumping from local Burrow dir") configFileOpt := cmd.String(configFileOption) genesisFileOpt := cmd.String(genesisFileOption) @@ -73,18 +82,17 @@ func Dump(output Output) func(cmd *cli.Cmd) { if err != nil { output.Fatalf("could not dump to file %s': %v", *dumpOpts.filename, err) } - output.Logf("dump successfully written to '%s'", *dumpOpts.filename) + maybeOutput(verbose, output, "dump successfully written to '%s'", *dumpOpts.filename) } }) cmd.Command("remote", "pull a dump from a remote Burrow node", func(cmd *cli.Cmd) { chainURLOpt := cmd.StringOpt("c chain", "127.0.0.1:10997", "chain to be used in IP:PORT format") timeoutOpt := cmd.IntOpt("t timeout", 0, "Timeout in seconds") - dumpOpts := addDumpOptions(cmd, "[--chain=]", - "[--timeout=]") + dumpOpts := addDumpOptions(cmd, "[--chain=]", "[--timeout=]") cmd.Action = func() { - output.Logf("dumping from remote chain at %s", *chainURLOpt) + maybeOutput(verbose, output, "dumping from remote chain at %s", *chainURLOpt) ctx, cancel := context.WithCancel(context.Background()) if *timeoutOpt != 0 { @@ -109,7 +117,7 @@ func Dump(output Output) func(cmd *cli.Cmd) { if err != nil { output.Logf("failed to marshal: %v", err) } - output.Logf("dumping from chain: %s", string(stat)) + maybeOutput(verbose, output, "dumping from chain: %s", string(stat)) dc := rpcdump.NewDumpClient(conn) receiver, err := dc.GetDump(ctx, &rpcdump.GetDumpParam{Height: uint64(*dumpOpts.height)}) @@ -121,26 +129,32 @@ func Dump(output Output) func(cmd *cli.Cmd) { if err != nil { output.Fatalf("could not dump to file %s': %v", *dumpOpts.filename, err) } - output.Logf("dump successfully written to '%s'", *dumpOpts.filename) + maybeOutput(verbose, output, "dump successfully written to '%s'", *dumpOpts.filename) } }) } } func dumpToFile(filename string, source dump.Source, useBinaryEncoding bool) error { - f, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) - if err != nil { - return err + var file *os.File + var err error + if filename == "" { + file = os.Stdout + } else { + file, err = os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) + if err != nil { + return err + } } // Receive - err = dump.Write(f, source, useBinaryEncoding, dump.All) + err = dump.Write(file, source, useBinaryEncoding, dump.All) if err != nil { return err } - err = f.Close() + err = file.Close() if err != nil { return err } From 3cb68cfadf15b76337bf818d8f028d678dea4484 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Wed, 22 Jan 2020 11:03:38 +0000 Subject: [PATCH 048/185] publish to npm with auth token Signed-off-by: Gregory Hill --- .github/workflows/master.yaml | 8 ++++---- .github/workflows/release.yaml | 23 +++++++++-------------- .github/workflows/test.yaml | 28 ++++++++++++---------------- 3 files changed, 25 insertions(+), 34 deletions(-) diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index 1215e6858..21be31a08 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -2,11 +2,11 @@ name: master on: push: branches: - - master + - master jobs: cover: - name: Coverage + name: coverage runs-on: ubuntu-latest steps: - uses: actions/setup-go@v1 @@ -23,12 +23,12 @@ jobs: file: ./coverage.txt docker: - name: Docker + name: docker runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - run: make docker_build - - name: Publish Quay Image + - name: publish env: DOCKER_REPO: "hyperledger/burrow" DOCKER_REPO_DEV: "quay.io/monax/burrow" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0367d08e7..7e93a67ff 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,4 @@ -name: Release +name: release on: push: tags: @@ -6,11 +6,11 @@ on: jobs: go: - name: GoReleaser + name: goreleaser runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: Publish + - name: publish uses: docker://goreleaser/goreleaser env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -19,33 +19,28 @@ jobs: if: success() js: - name: NPM + name: npm runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: node-version: '12.x' - - name: Publish + - name: publish env: - NPM_EMAIL: ${{ secrets.NPM_EMAIL }} - NPM_USER: ${{ secrets.NPM_USER }} - NPM_PASS: ${{ secrets.NPM_PASS }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - git config --global user.name "${NPM_USER}" - git config --global user.email "${NPM_EMAIL}" - npm install -g npm-cli-login - npm-cli-login npm version from-git + npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" npm publish --access public . docker: - name: Docker + name: docker runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - run: make docker_build - - name: Publish + - name: publish env: DOCKER_REPO: "hyperledger/burrow" DOCKER_USER: ${{ secrets.DOCKER_USER }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0e8698995..9318a23a1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,8 +1,12 @@ name: test -on: [push, pull_request] +on: + pull_request: + push: + branches: + - master + jobs: unit: - name: Unit runs-on: ubuntu-latest steps: - uses: actions/setup-go@v1 @@ -18,21 +22,18 @@ jobs: path: bin integration: - name: Integration runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - run: make test_integration vent: - name: Vent runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - run: docker-compose run burrow make test_integration_vent docker: - name: Docker runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 @@ -41,7 +42,6 @@ jobs: DOCKER_REPO: "hyperledger/burrow" keys: - name: Keys runs-on: ubuntu-latest needs: unit steps: @@ -51,13 +51,12 @@ jobs: name: burrow path: bin - run: chmod +x $(pwd)/bin/* - - name: Test + - name: test run: | export PATH=${PATH}:$(pwd)/bin make test_keys truffle: - name: Truffle runs-on: ubuntu-latest needs: unit steps: @@ -70,13 +69,12 @@ jobs: name: burrow path: bin - run: chmod +x $(pwd)/bin/* - - name: Test + - name: test run: | export PATH=${PATH}:$(pwd)/bin make test_truffle deploy: - name: Deploy runs-on: ubuntu-latest needs: unit steps: @@ -86,13 +84,12 @@ jobs: name: burrow path: bin - run: chmod +x $(pwd)/bin/* - - name: Test + - name: test run: | export PATH=${PATH}:$(pwd)/bin make test_deploy restore: - name: Dump - Restore runs-on: ubuntu-latest needs: unit steps: @@ -102,13 +99,12 @@ jobs: name: burrow path: bin - run: chmod +x $(pwd)/bin/* - - name: Test + - name: test run: | export PATH=${PATH}:$(pwd)/bin make test_restore - test_js: - name: JS API + js: runs-on: ubuntu-latest needs: unit steps: @@ -121,7 +117,7 @@ jobs: name: burrow path: bin - run: chmod +x $(pwd)/bin/* - - name: Test + - name: test run: | export PATH=${PATH}:$(pwd)/bin make npm_install From 5a9d48f6f79ed698af52030c9eb074ad67a681b0 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Wed, 22 Jan 2020 11:29:20 +0000 Subject: [PATCH 049/185] bump version to 0.29.6 Signed-off-by: Gregory Hill --- CHANGELOG.md | 10 +++++++++- NOTES.md | 9 ++------- project/history.go | 8 +++++++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66b53ee4f..edcda12d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.29.6] - 2020-01-22 +### Changed +- [CLI] Burrow dump can now stream to STDOUT + +### Fixed +- [NPM] Burrow-js is now published via an auth token + + ## [0.29.5] - 2019-12-09 ### Security - [Tendermint] Upgraded to v0.32.8, checkTxAsync now includes node ID @@ -9,7 +17,6 @@ ### Fixed - [Execution] Simulated calls (e.g. query contracts) now returns the height of the state on which the query was run. Useful for downstream sync. -- ## [0.29.4] - 2019-11-22 @@ -611,6 +618,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.29.6]: https://github.com/hyperledger/burrow/compare/v0.29.5...v0.29.6 [0.29.5]: https://github.com/hyperledger/burrow/compare/v0.29.4...v0.29.5 [0.29.4]: https://github.com/hyperledger/burrow/compare/v0.29.3...v0.29.4 [0.29.3]: https://github.com/hyperledger/burrow/compare/v0.29.2...v0.29.3 diff --git a/NOTES.md b/NOTES.md index dc45d479f..972b2e3c5 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,11 +1,6 @@ -### Security -- [Tendermint] Upgraded to v0.32.8, checkTxAsync now includes node ID - ### Changed -- [Vent] Sync every block height to DB and send height notification from _vent_chain table so downstream can check DB sync without --blocks -- [RPC/Query] GetName now returns GRPC NotFound status (rather than unknown) when a requested key is not set. +- [CLI] Burrow dump can now stream to STDOUT ### Fixed -- [Execution] Simulated calls (e.g. query contracts) now returns the height of the state on which the query was run. Useful for downstream sync. -- +- [NPM] Burrow-js is now published via an auth token diff --git a/project/history.go b/project/history.go index 68f0725a9..d7a52c1e0 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,13 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.29.6 - 2020-01-22", + `### Changed +- [CLI] Burrow dump can now stream to STDOUT + +### Fixed +- [NPM] Burrow-js is now published via an auth token +`, "0.29.5 - 2019-12-09", `### Security - [Tendermint] Upgraded to v0.32.8, checkTxAsync now includes node ID @@ -58,7 +65,6 @@ var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "htt ### Fixed - [Execution] Simulated calls (e.g. query contracts) now returns the height of the state on which the query was run. Useful for downstream sync. -- `, "0.29.4 - 2019-11-22", `### Changed From bcfde74669761a3bd1ac72d510bf934046b9b4f7 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Wed, 22 Jan 2020 11:43:44 +0000 Subject: [PATCH 050/185] npm version from-git needs email and name Signed-off-by: Gregory Hill --- .github/workflows/release.yaml | 2 ++ .goreleaser.yml | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7e93a67ff..14dfab767 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,6 +30,8 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | + git config --global user.email "doug@monax.io" + git config --global user.name "doug" npm version from-git npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" npm publish --access public . diff --git a/.goreleaser.yml b/.goreleaser.yml index 22041c245..f4a6be10c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,4 +1,3 @@ -# This is an example goreleaser.yaml file with some sane defaults. # Make sure to check the documentation at http://goreleaser.com builds: - main: ./cmd/burrow From fdc283d82ef4c1fedf9a916706b3cee055a3cf35 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Mon, 27 Jan 2020 12:45:34 +0000 Subject: [PATCH 051/185] base gorelease on newest example Signed-off-by: Gregory Hill --- .github/workflows/release.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 14dfab767..5e933948c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,14 +9,18 @@ jobs: name: goreleaser runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: publish - uses: docker://goreleaser/goreleaser - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v2 + - run: git fetch --prune --unshallow + - uses: actions/setup-go@v1 with: + go-version: 1.13.x + - uses: goreleaser/goreleaser-action@v1 + with: + version: latest args: release --release-notes "NOTES.md" - if: success() + key: ${{ secrets.YOUR_PRIVATE_KEY }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} js: name: npm From c1bfa36b0bd9efe02aeee75c56b47d5fbbfd3b38 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Mon, 27 Jan 2020 13:53:21 +0000 Subject: [PATCH 052/185] release notes for 0.29.7 Signed-off-by: Gregory Hill --- CHANGELOG.md | 6 ++++++ NOTES.md | 5 +---- project/history.go | 4 ++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edcda12d3..c9615c63e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.29.7] - 2020-01-27 +### Fixed +- [Build] Updates to CI build process + + ## [0.29.6] - 2020-01-22 ### Changed - [CLI] Burrow dump can now stream to STDOUT @@ -618,6 +623,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.29.7]: https://github.com/hyperledger/burrow/compare/v0.29.6...v0.29.7 [0.29.6]: https://github.com/hyperledger/burrow/compare/v0.29.5...v0.29.6 [0.29.5]: https://github.com/hyperledger/burrow/compare/v0.29.4...v0.29.5 [0.29.4]: https://github.com/hyperledger/burrow/compare/v0.29.3...v0.29.4 diff --git a/NOTES.md b/NOTES.md index 972b2e3c5..a3b24ef28 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,6 +1,3 @@ -### Changed -- [CLI] Burrow dump can now stream to STDOUT - ### Fixed -- [NPM] Burrow-js is now published via an auth token +- [Build] Updates to CI build process diff --git a/project/history.go b/project/history.go index d7a52c1e0..f5c40184e 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,10 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.29.7 - 2020-01-27", + `### Fixed +- [Build] Updates to CI build process +`, "0.29.6 - 2020-01-22", `### Changed - [CLI] Burrow dump can now stream to STDOUT From ca1e0f5d3bc669d3a835bd1fe606d47bffb797ad Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Mon, 27 Jan 2020 14:31:29 +0000 Subject: [PATCH 053/185] update goreleaser config Signed-off-by: Gregory Hill --- .goreleaser.yml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index f4a6be10c..f360875ec 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,20 +1,22 @@ -# Make sure to check the documentation at http://goreleaser.com +before: + hooks: + - go mod tidy builds: - main: ./cmd/burrow env: - - CGO_ENABLED=0 + - CGO_ENABLED=0 ldflags: - - -extldflags "-static" - - -s -w - - -X github.com/hyperledger/burrow/project.commit={{.Commit}} - - -X github.com/hyperledger/burrow/project.date={{.Date}} + - -extldflags "-static" + - -s -w + - -X github.com/hyperledger/burrow/project.commit={{.Commit}} + - -X github.com/hyperledger/burrow/project.date={{.Date}} goos: - - darwin - - linux - - freebsd - - windows -archive: - replacements: + - darwin + - linux + - freebsd + - windows +archives: +- replacements: darwin: Darwin linux: Linux windows: Windows @@ -28,5 +30,5 @@ changelog: sort: asc filters: exclude: - - '^docs:' - - '^test:' + - '^docs:' + - '^test:' \ No newline at end of file From f7ec5fb3819c857d503044fd22273da189f81488 Mon Sep 17 00:00:00 2001 From: deepakchethan Date: Tue, 11 Feb 2020 04:40:12 +0530 Subject: [PATCH 054/185] Added Maintainers.md Signed-off-by: deepakchethan --- MAINTAINERS.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 MAINTAINERS.md diff --git a/MAINTAINERS.md b/MAINTAINERS.md new file mode 100644 index 000000000..afca68589 --- /dev/null +++ b/MAINTAINERS.md @@ -0,0 +1,29 @@ +Maintainers +=========== + +**Active Maintainers** + +| Name | GitHub | email +|------|--------|------------------- +| Greg Hill | gregdhill | +| Sean Young | seanyoung | +| Casey Kuhlman | compleatang | +| Silas Davis | silasdavis | +| Pierrick Hymbert | phymbert | + +**Emeritus** + +| Name | GitHub | email +|------|--------|------------------- +| Benjamin Bollen | benjaminbollen | +| Dennis Mckinnon | dennismckinnon | +| Ethan Buchman | ebuchman | <> + +**Future Maintainers** + +| Name | GitHub | email +|------|--------|------------------- +| Matias Díaz | madiazp | +| Sean Blucker | smblucker | + + From 38ad50699a0e87dea90b9052ebf9d7b231f88c35 Mon Sep 17 00:00:00 2001 From: deepakchethan Date: Tue, 11 Feb 2020 04:42:01 +0530 Subject: [PATCH 055/185] Removed <> Signed-off-by: deepakchethan --- MAINTAINERS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS.md b/MAINTAINERS.md index afca68589..c44282f21 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -17,7 +17,7 @@ Maintainers |------|--------|------------------- | Benjamin Bollen | benjaminbollen | | Dennis Mckinnon | dennismckinnon | -| Ethan Buchman | ebuchman | <> +| Ethan Buchman | ebuchman | **Future Maintainers** From 4a8fdc4cec593255eec85b69912de5a9b1fa45ac Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Tue, 11 Feb 2020 12:23:30 +0000 Subject: [PATCH 056/185] fixes #1326 - failure to convert crypto.Address to EVMAddress Signed-off-by: Silas Davis --- CHANGELOG.md | 6 ++++++ NOTES.md | 2 +- execution/evm/abi/abi_test.go | 10 +++++++++- execution/evm/abi/primitives.go | 31 ++++++++++++------------------- project/history.go | 4 ++++ 5 files changed, 32 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9615c63e..5ceb4e844 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.29.8] - 2020-02-11 +### Fixed +- [ABI] Fix failure to convert crypto.Address to EVMAddress (https://github.com/hyperledger/burrow/issues/1326) + + ## [0.29.7] - 2020-01-27 ### Fixed - [Build] Updates to CI build process @@ -623,6 +628,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.29.8]: https://github.com/hyperledger/burrow/compare/v0.29.7...v0.29.8 [0.29.7]: https://github.com/hyperledger/burrow/compare/v0.29.6...v0.29.7 [0.29.6]: https://github.com/hyperledger/burrow/compare/v0.29.5...v0.29.6 [0.29.5]: https://github.com/hyperledger/burrow/compare/v0.29.4...v0.29.5 diff --git a/NOTES.md b/NOTES.md index a3b24ef28..6829c1922 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,3 @@ ### Fixed -- [Build] Updates to CI build process +- [ABI] Fix failure to convert crypto.Address to EVMAddress (https://github.com/hyperledger/burrow/issues/1326) diff --git a/execution/evm/abi/abi_test.go b/execution/evm/abi/abi_test.go index 5c84aa495..cf61b6478 100644 --- a/execution/evm/abi/abi_test.go +++ b/execution/evm/abi/abi_test.go @@ -8,6 +8,7 @@ import ( "github.com/tmthrgd/go-hex" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/logging" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -25,6 +26,13 @@ func TestPacker(t *testing.T) { name string expectedOutput []byte }{ + // From: https://github.com/hyperledger/burrow/issues/1326 + { + `[{"constant":false,"inputs":[{"internalType":"address payable","name":"friend","type":"address"}],"name":"sendToAFriend","outputs":[],"payable":true,"stateMutability":"payable","type":"function"}]`, + []interface{}{crypto.Address{1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4}}, + "sendToAFriend", + pad([]byte{1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4}, 32, true), + }, { `[{"constant":false,"inputs":[{"name":"","type":"uint256"}],"name":"UInt","outputs":[],"payable":false,"type":"function"}]`, []interface{}{"1"}, @@ -127,7 +135,7 @@ func TestPacker(t *testing.T) { } { t.Log(test.args) if output, _, err := EncodeFunctionCall(test.ABI, test.name, logging.NewNoopLogger(), test.args...); err != nil { - t.Error("Unexpected error in ", test.name, ": ", err) + t.Errorf("Unexpected error in %s: %v", test.name, err) } else { if !bytes.Equal(output[4:], test.expectedOutput) { t.Errorf("Incorrect output,\n\t expected %v,\n\t got %v", test.expectedOutput, output[4:]) diff --git a/execution/evm/abi/primitives.go b/execution/evm/abi/primitives.go index 5f89715c6..2b386ceaa 100644 --- a/execution/evm/abi/primitives.go +++ b/execution/evm/abi/primitives.go @@ -514,29 +514,22 @@ func (e EVMAddress) GetSignature() string { } func (e EVMAddress) pack(v interface{}) ([]byte, error) { - var err error - a, ok := v.(crypto.Address) - if !ok { - s, ok := v.(string) - if ok { - a, err = crypto.AddressFromHexString(s) - if err != nil { - return nil, err - } - } - } else { - b, ok := v.([]byte) - if !ok { - return nil, fmt.Errorf("cannot map to %s to EVM address", reflect.ValueOf(v).Kind().String()) - } - - a, err = crypto.AddressFromBytes(b) + var bs []byte + switch a := v.(type) { + case crypto.Address: + bs = a[:] + case *crypto.Address: + bs = (*a)[:] + case []byte: + address, err := crypto.AddressFromBytes(a) if err != nil { return nil, err } + bs = address[:] + default: + return nil, fmt.Errorf("cannot map from %s to EVM address", reflect.ValueOf(v).Kind().String()) } - - return pad(a[:], ElementSize, true), nil + return pad(bs, ElementSize, true), nil } func (e EVMAddress) unpack(data []byte, offset int, v interface{}) (int, error) { diff --git a/project/history.go b/project/history.go index f5c40184e..6876c7ee9 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,10 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.29.8 - 2020-02-11", + `### Fixed +- [ABI] Fix failure to convert crypto.Address to EVMAddress (https://github.com/hyperledger/burrow/issues/1326) +`, "0.29.7 - 2020-01-27", `### Fixed - [Build] Updates to CI build process From eb40190690127587b982b1f9357fd6123b40706d Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 14 Feb 2020 16:26:01 +0000 Subject: [PATCH 057/185] fix js docs for npm install Signed-off-by: Gregory Hill --- docs/js-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/js-api.md b/docs/js-api.md index 4407cf064..2bbfa95c8 100644 --- a/docs/js-api.md +++ b/docs/js-api.md @@ -18,7 +18,7 @@ If your distribution of Linux has a version older than 6 then you can update it. ## Install ``` bash -$ npm install @monax/burrow +$ npm install @hyperledger/burrow ``` ## Usage From 1fce6a9b1be426491bda7e15e9dc38b8265e6e53 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Fri, 14 Feb 2020 16:13:30 +0000 Subject: [PATCH 058/185] Replace wasm interface with ewasm Signed-off-by: Sean Young --- deploy/compile/compilers.go | 2 +- docs/reference/wasm.md | 33 +----- execution/contexts/call_context.go | 12 +- execution/wasm/storage_test.solang.go | 4 +- execution/wasm/wasm.go | 155 ++++++++++++-------------- execution/wasm/wasm_test.go | 8 +- 6 files changed, 90 insertions(+), 124 deletions(-) diff --git a/deploy/compile/compilers.go b/deploy/compile/compilers.go index c20327e45..9409749ed 100644 --- a/deploy/compile/compilers.go +++ b/deploy/compile/compilers.go @@ -324,7 +324,7 @@ func EVM(file string, optimize bool, workDir string, libraries map[string]string } func WASM(file string, workDir string, logger *logging.Logger) (*Response, error) { - shellCmd := exec.Command("solang", "--standard-json", file) + shellCmd := exec.Command("solang", "--target", "ewasm", "--standard-json", file) if workDir != "" { shellCmd.Dir = workDir } diff --git a/docs/reference/wasm.md b/docs/reference/wasm.md index ebe6343bf..5977a6e8e 100644 --- a/docs/reference/wasm.md +++ b/docs/reference/wasm.md @@ -1,7 +1,8 @@ # WASM Contracts -Burrow supports experimental WASM contracts. Specifically, any contract which can be compiled -using [solang](https://github.com/hyperledger-labs/solang) can run on Burrow. +Burrow supports experimental [ewasm](https://github.com/ewasm/design) contracts. +Any contract which can be compiled using [Solang](https://github.com/hyperledger-labs/solang) +can run on Burrow. ## How to use @@ -46,30 +47,4 @@ Now run this script using: ``` burrow deploy --wasm -a Participant_0 deploy.yaml -``` - -## Implementation details - -When using WASM, the same account model is used. The only different is that a WASM virtual machine -is used. When a contract is deployed, the WASM code is stored as the account code (this is different -from the EVM model where the constructor "returns" the deployed code). The WASM file which is deployed -must have two exported functions: - -```solidity -void constructor(int32*) -int32 function(int32*) -``` - -When the contract is deployed, burrow calls the constructor function with the abi encoded arguments -stored in WASM memory, pointed to by the single argument. The abi encoded arguments are prefixed with -the length. - -On executing a function call, the exported function called `function` is called. This takes the abi -encoded arguments just like the constructor, and returns a pointer to the abi encoded return values. - -From the WASM code we can access contract storage via the following externals: - -```solidity -void set_storage32(int32 key, int32 *ptr, int32 len); -void get_storage32(int32 key, int32 *ptr, int32 len); -``` +``` \ No newline at end of file diff --git a/execution/contexts/call_context.go b/execution/contexts/call_context.go index 299725b75..6a31fe565 100644 --- a/execution/contexts/call_context.go +++ b/execution/contexts/call_context.go @@ -185,12 +185,6 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error txHash := ctx.txe.Envelope.Tx.Hash() gas := ctx.tx.GasLimit if len(wcode) != 0 { - if createContract { - err := native.InitWASMCode(txCache, callee, wcode) - if err != nil { - return err - } - } ret, err = wasm.RunWASM(txCache, callee, createContract, wcode, ctx.tx.Data) if err != nil { // Failure. Charge the gas fee. The 'value' was otherwise not transferred. @@ -200,6 +194,12 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error ctx.txe.PushError(errors.Wrap(err, "call error")) } else { ctx.Logger.TraceMsg("Successful execution") + if createContract { + err := native.InitWASMCode(txCache, callee, ret) + if err != nil { + return err + } + } err = ctx.Sync(txCache, metaCache) if err != nil { return err diff --git a/execution/wasm/storage_test.solang.go b/execution/wasm/storage_test.solang.go index f3635e11b..a40fcff43 100644 --- a/execution/wasm/storage_test.solang.go +++ b/execution/wasm/storage_test.solang.go @@ -2,5 +2,5 @@ package wasm import hex "github.com/tmthrgd/go-hex" -var Bytecode_storage_test = hex.MustDecodeString("0061736D0100000001220760037F7F7F0060027F7F0060000060017F0060017F017F60027F7F017F6000017E02380303656E760D7365745F73746F726167653332000003656E760D6765745F73746F726167653332000003656E76066D656D6F727902010202030F0E00010102030405000002060203040608017F01418080040B07BB010E095F5F6D656D637079380002085F5F627A65726F380003075F5F627365743800040B5F5F696E69745F686561700005065F5F667265650006085F5F6D616C6C6F630007095F5F7265616C6C6F6300080B5F5F62653332746F6C654E00090B5F5F6C654E746F62653332000A12736F6C3A3A5F5F636F6E7374727563746F72000B10736F6C3A3A676574466F6F506C757332000C0B736F6C3A3A696E63466F6F000D0B636F6E7374727563746F72000E0866756E6374696F6E000F0AF8080E2600034020002001290300370300200041086A2100200141086A21012002417F6A22020D000B0B1C00034020004200370300200041086A21002001417F6A22010D000B0B1C0003402000427F370300200041086A21002001417F6A22010D000B0B2B00410041003602808004410041003602848004410041003A008C800441003F0041F0FF7B6A36028880040BB90101037F02402000450D00410021012000417C6A41003A0000024002400240200041706A22022802002203450D0020032D000C450D01200321010B200041746A2802002203450D020C010B20022003280200220136020002402001450D00200120023602040B200041786A2202200328020820022802006A41106A360200200041746A2802002203450D010B20032D000C0D0020012003360204200320013602002003200041786A28020020032802086A41106A3602080F0B0BA90101047F41808004210102400340024020012D000C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A360208200041003A000C2000200136020420012000360200200141086A20033602000B200141013A000C200141106A0BF50101057F024002400240200041706A22022802002203450D0020032D000C0D00200041786A220428020020032802086A41106A220520014F0D010B41002103410020014103766B21022001100721010340200120036A200020036A290300370300200341086A2103200241016A22020D000B20001006200121000C010B20042005360200200328020022032002360204200220033602002005200141076A41787122066B22054118490D00200020066A2201200336020002402003450D00200341046A20013602000B2001200541706A360208200141003A000C20012002360204200220013602002004200636020020000F0B20000B2D002000411F6A21000340200120002D00003A0000200141016A21012000417F6A21002002417F6A22020D000B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0B2701017F230041106B22002400200042E6003703084100200041086A41081000200041106A24000B2D02017F017E230041106B220024004100200041086A4108100120002903082101200041106A2400200142027C0B3701017F230041106B220024004100200041086A410810012000200029030842017C3703084100200041086A41081000200041106A24000B12001005024020002802000D00100B0F0B000B8E0103037F017E017F23002201210202402000280200220341034D0D002003417C6A21030240200041046A28020041DE9AB88F79470D0020030D01100D41041007220041003602002002240020000F0B20030D00100C21044124100722004120360200200041046A220541041003200141706A2203240020032004370300200320054108100A2002240020000F0B000B") -var Abi_storage_test = []byte(`[{"name":"","type":"constructor","inputs":[],"outputs":[],"constant":false,"payable":false,"stateMutability":"nonpayable"},{"name":"getFooPlus2","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64"}],"constant":true,"payable":false,"stateMutability":"view"},{"name":"incFoo","type":"function","inputs":[],"outputs":[],"constant":false,"payable":false,"stateMutability":"nonpayable"}]`) +var Bytecode_storage_test = hex.MustDecodeString("0061736D01000000013A0B60037F7E7F0060037F7F7F0060027F7F0060000060017F0060017F017F60027F7F017F60047F7F7F7F0060047F7E7E7F006000017E6000017F029B010708657468657265756D06726576657274000208657468657265756D0B73746F726167654C6F6164000208657468657265756D0C73746F7261676553746F7265000208657468657265756D0F67657443616C6C4461746153697A65000A08657468657265756D0C63616C6C44617461436F7079000108657468657265756D0666696E697368000208657468657265756D066D656D6F7279020102020316150001020203040506010101010708080409030303030608017F01418080040B070801046D61696E001A0ACA0E151C00034020002001370300200041086A21002002417F6A22020D000B0B2600034020002001290300370300200041086A2100200141086A21012002417F6A22020D000B0B1C00034020004200370300200041086A21002001417F6A22010D000B0B1C0003402000427F370300200041086A21002001417F6A22010D000B0B2B00410041003602808004410041003602848004410041003A008C800441003F0041F0FF7B6A36028880040BAD0101037F024002402000450D00410021012000417C6A41003A00000240200041706A22022802002203450D00024020032D000C450D00200321010C010B20022003280200220136020002402001450D00200120023602040B200041786A2202200328020820022802006A41106A3602000B200041746A2802002203450D0020032D000C450D010B0F0B20012003360204200320013602002003200041786A28020020032802086A41106A3602080BA90101047F41808004210102400340024020012D000C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A360208200041003A000C2000200136020420012000360200200141086A20033602000B200141013A000C200141106A0BF50101057F024002400240200041706A22022802002203450D0020032D000C0D00200041786A220428020020032802086A41106A220520014F0D010B41002103410020014103766B21022001100C21010340200120036A200020036A290300370300200341086A2103200241016A22020D000B2000100B200121000C010B20042005360200200328020022032002360204200220033602002005200141076A41787122066B22054118490D00200020066A2201200336020002402003450D00200341046A20013602000B2001200541706A360208200141003A000C20012002360204200220013602002004200636020020000F0B20000B2D002000411F6A21000340200120002D00003A0000200141016A21012000417F6A21002002417F6A22020D000B0B29002000417F6A210003402001200020026A2D00003A0000200141016A21012002417F6A22020D000B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0B29002001417F6A21010340200120026A20002D00003A0000200041016A21002002417F6A22020D000B0BE80204077F017E037F027E200020034102746A417C6A21042003210502400340200522064101480D012006417F6A2105200428020021072004417C6A21042007450D000B0B200120034102746A417C6A21042003210502400340200522084101480D012008417F6A2105200428020021072004417C6A21042007450D000B0B024020034101480D002001417C6A21094100210A4200210B4100210C41002105410021010340200A20084E210D024002402005200520084822076A220E2001200A20064E6A22014D0D002000200C200D6A4102746A21042009200520076A4102746A21054200210F200E21070340200F4280808080107C200F200B200535020020043502007E7C2210200B541B210F200441046A21042005417C6A21052010210B2007417F6A220720014A0D000C020B0B4200210F200B21100B200C200D6A210C2002200A4102746A20103E02002010422088200F84210B200E2105200A41016A220A2003470D000B0B0B5201017E02402003450D000240200341C000710D00200141C00020036BAD8820022003AD220486842102200120048621010C010B20012003413F71AD862102420021010B20002002370308200020013703000B5201017E02402003450D000240200341C000710D00200241C00020036BAD8620012003AD220488842101200220048821020C010B20022003413F71AD882101420021020B20002002370308200020013703000B150002402000410171450D000F0B410041001000000B5102017F017E230041D0006B22002400200041386A4200370300200042003703302000420037032820004200370320200041206A20001001200020002903002201370340200041D0006A2400200142027C0B9D0102017F017E23004190016B22002400200041E0006A41186A4200370300200042003703702000420037036820004200370360200041E0006A200041C0006A1001200041206A41186A4200370300200042003703302000420037032820004200370320200020002903402201370380012000200142017C370388012000410410082000200029038801370300200041206A2000100220004190016A24000B5D01017F230041D0006B22002400200041C0006A4200370300200042003703382000420037033020004200370328200042E600370348200041086A4104100820002000290348370308200041286A200041086A1002200041D0006A24000B02000B2501017F100A10032200100C4100200010041019024020000D001018410041BA1110050B000B0BC111010041000BBA110061736D01000000013A0B60037F7E7F0060037F7F7F0060027F7F0060000060017F0060017F017F60027F7F017F60047F7F7F7F0060047F7E7E7F006000017E6000017F029B010708657468657265756D06726576657274000208657468657265756D0B73746F726167654C6F6164000208657468657265756D0C73746F7261676553746F7265000208657468657265756D0F67657443616C6C4461746153697A65000A08657468657265756D0C63616C6C44617461436F7079000108657468657265756D0666696E697368000208657468657265756D066D656D6F72790201020203151400010202030405060101010107080804090303030608017F01418080040B070801046D61696E00190AAA0F141C00034020002001370300200041086A21002002417F6A22020D000B0B2600034020002001290300370300200041086A2100200141086A21012002417F6A22020D000B0B1C00034020004200370300200041086A21002001417F6A22010D000B0B1C0003402000427F370300200041086A21002001417F6A22010D000B0B2B00410041003602808004410041003602848004410041003A008C800441003F0041F0FF7B6A36028880040BAD0101037F024002402000450D00410021012000417C6A41003A00000240200041706A22022802002203450D00024020032D000C450D00200321010C010B20022003280200220136020002402001450D00200120023602040B200041786A2202200328020820022802006A41106A3602000B200041746A2802002203450D0020032D000C450D010B0F0B20012003360204200320013602002003200041786A28020020032802086A41106A3602080BA90101047F41808004210102400340024020012D000C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A360208200041003A000C2000200136020420012000360200200141086A20033602000B200141013A000C200141106A0BF50101057F024002400240200041706A22022802002203450D0020032D000C0D00200041786A220428020020032802086A41106A220520014F0D010B41002103410020014103766B21022001100C21010340200120036A200020036A290300370300200341086A2103200241016A22020D000B2000100B200121000C010B20042005360200200328020022032002360204200220033602002005200141076A41787122066B22054118490D00200020066A2201200336020002402003450D00200341046A20013602000B2001200541706A360208200141003A000C20012002360204200220013602002004200636020020000F0B20000B2D002000411F6A21000340200120002D00003A0000200141016A21012000417F6A21002002417F6A22020D000B0B29002000417F6A210003402001200020026A2D00003A0000200141016A21012002417F6A22020D000B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0B29002001417F6A21010340200120026A20002D00003A0000200041016A21002002417F6A22020D000B0BE80204077F017E037F027E200020034102746A417C6A21042003210502400340200522064101480D012006417F6A2105200428020021072004417C6A21042007450D000B0B200120034102746A417C6A21042003210502400340200522084101480D012008417F6A2105200428020021072004417C6A21042007450D000B0B024020034101480D002001417C6A21094100210A4200210B4100210C41002105410021010340200A20084E210D024002402005200520084822076A220E2001200A20064E6A22014D0D002000200C200D6A4102746A21042009200520076A4102746A21054200210F200E21070340200F4280808080107C200F200B200535020020043502007E7C2210200B541B210F200441046A21042005417C6A21052010210B2007417F6A220720014A0D000C020B0B4200210F200B21100B200C200D6A210C2002200A4102746A20103E02002010422088200F84210B200E2105200A41016A220A2003470D000B0B0B5201017E02402003450D000240200341C000710D00200141C00020036BAD8820022003AD220486842102200120048621010C010B20012003413F71AD862102420021010B20002002370308200020013703000B5201017E02402003450D000240200341C000710D00200241C00020036BAD8620012003AD220488842101200220048821020C010B20022003413F71AD882101420021020B20002002370308200020013703000B150002402000410171450D000F0B410041001000000B5102017F017E230041D0006B22002400200041386A4200370300200042003703302000420037032820004200370320200041206A20001001200020002903002201370340200041D0006A2400200142027C0B9D0102017F017E23004190016B22002400200041E0006A41186A4200370300200042003703702000420037036820004200370360200041E0006A200041C0006A1001200041206A41186A4200370300200042003703302000420037032820004200370320200020002903402201370380012000200142017C370388012000410410082000200029038801370300200041206A2000100220004190016A24000B5D01017F230041D0006B22002400200041C0006A4200370300200042003703382000420037033020004200370328200042E600370348200041086A4104100820002000290348370308200041286A200041086A1002200041D0006A24000B870102047F017E230022002101100A10032202100C22034100200210040240200241034D0D002002417C6A21020240200328020041DE9AB88F79470D0020020D011017410041001005200124000F0B20020D00101621044120100C2202420041041006200041706A22032400200320043703002003200241081010200241201005200124000F0B000B") +var Abi_storage_test = []byte(`[{"name":"","type":"constructor","inputs":[],"outputs":[],"constant":false,"payable":false,"stateMutability":"nonpayable"},{"name":"getFooPlus2","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"constant":true,"payable":false,"stateMutability":"view"},{"name":"incFoo","type":"function","inputs":[],"outputs":[],"constant":false,"payable":false,"stateMutability":"nonpayable"}]`) diff --git a/execution/wasm/wasm.go b/execution/wasm/wasm.go index 204f8dfa0..0220e50b6 100644 --- a/execution/wasm/wasm.go +++ b/execution/wasm/wasm.go @@ -1,7 +1,6 @@ package wasm import ( - "encoding/binary" "fmt" "github.com/hyperledger/burrow/acm/acmstate" @@ -14,60 +13,22 @@ import ( type execContext struct { errors.Maybe address crypto.Address + input []byte + output []byte state acmstate.ReaderWriter } -// In EVM, the code for an account is created by the EVM code itself; the code in the EVM deploy transaction is run, -// and the EVM code returns (via the RETURN) opcode) the code for the contract. In addition, when a new contract is -// created using the "new C()" construct is soldity, the EVM itself passes the code for the new contract. - -// The compiler must embed any contract code for smart contracts it wants to create. -// - This does not allow for circular references: contract A creates contract B, contract B creates contract A. -// - This makes it very hard to support other languages; e.g. go or rust have no such bizarre concepts, and would -// require tricking into supporting this -// - This makes it possible for tricksy contracts that create different contracts at different times. Very hard to -// support static analysis on these contracts -// - This makes it hard to know ahead-of-time what the code for a contract will be - -// Our WASM implementation does not allow for this. The code passed to the deploy transaction, is the contract. Any child contracts must be passed -// during the initial deployment (not implemented yet) - -// ABIs -// Our WASM ABI is entirely compatible with Solidity. This means that solidity EVM can call WASM contracts and vice -// versa. However, in the EVM ABI model the difference between constructor calls and function calls are implicit: the -// constructor code path is different from the function call code path, and there is nothing visible in the binary ABI -// encoded arguments telling you that it is a function call or a constructor. Note function calls do have a 4 byte -// prefix but this is not required; without it the fallback function should be called. - -// So in our WASM model the smart contract has two entry points: constructor and function. - -// ABIs memory space -// In the EVM model, ABIs are passed via the calldata opcodes. This means that the ABI encoded data is not directly -// accessible and has to be copied to smart contract memory. Solidity exposes this via the calldata and memory -// modifiers on variables. - -// In our WASM model, the function and constructor WASM fuctions have one argument and return value. The argument is -// where in WASM memory the ABI encoded arguments are and the return value is the offset where the return data can be -// found. At this offset we first find a 32 bit little endian encoded length (since WASM is little endian and we are -// using 32 bit memory model) followed by the bytes themselves. - -// Contract Storage -// In the EVM model, contract storage is addressed via 256 bit key and the contents is a 256 bit value. For WASM, -// we've changed the contents to a arbitary byte string. This makes it much easier to store/retrieve smaller values -// (e.g. int64) and dynamic length fields (e.g. strings/arrays). - -// Access to contract storage is via WASM externals. -// - set_storage32(uint32 key, uint8* data, uint32 len) // set contract storage -// - get_storage32(uint32 key, uint8* data, uint32 len) // get contract storage (right pad with zeros) +// Implements ewasm, see https://github.com/ewasm/design // RunWASM creates a WASM VM, and executes the given WASM contract code func RunWASM(state acmstate.ReaderWriter, address crypto.Address, createContract bool, wasm, input []byte) (output []byte, cerr error) { - const errHeader = "RunWASM" + const errHeader = "ewasm" defer func() { if r := recover(); r != nil { cerr = errors.Codes.ExecutionAborted } }() + // WASM config := exec.VMConfig{ DisableFloatingPoint: true, @@ -78,8 +39,10 @@ func RunWASM(state acmstate.ReaderWriter, address crypto.Address, createContract execContext := execContext{ address: address, state: state, + input: input, } + // panics in ResolveFunc() will be recovered for us, no need for our own vm, err := exec.NewVirtualMachine(wasm, config, &execContext, nil) if err != nil { return nil, errors.Errorf(errors.Codes.InvalidContract, "%s: %v", errHeader, err) @@ -88,65 +51,93 @@ func RunWASM(state acmstate.ReaderWriter, address crypto.Address, createContract return nil, execContext.Error() } - // FIXME: Check length - if len(input) > 0 { - binary.LittleEndian.PutUint32(vm.Memory[:], uint32(len(input))) - copy(vm.Memory[4:], input) - } - - wasmFunc := "function" - if createContract { - wasmFunc = "constructor" - } - entryID, ok := vm.GetFunctionExport(wasmFunc) + entryID, ok := vm.GetFunctionExport("main") if !ok { return nil, errors.Codes.UnresolvedSymbols } - // The 0 argument is the offset where our calldata is stored (if any) - offset, err := vm.Run(entryID, 0) - if err != nil { + _, err = vm.Run(entryID) + if err != nil && errors.GetCode(err) != errors.Codes.None { return nil, errors.Errorf(errors.Codes.ExecutionAborted, "%s: %v", errHeader, err) } - if offset > 0 { - // FIXME: Check length - length := binary.LittleEndian.Uint32(vm.Memory[offset : offset+4]) - output = vm.Memory[offset+4 : offset+4+int64(length)] - } - - return + return execContext.output, nil } func (e *execContext) ResolveFunc(module, field string) exec.FunctionImport { - if module != "env" { + if module != "ethereum" { panic(fmt.Sprintf("unknown module %s", module)) } switch field { - case "set_storage32": + case "getCallDataSize": return func(vm *exec.VirtualMachine) int64 { - key := int(uint32(vm.GetCurrentFrame().Locals[0])) - ptr := int(uint32(vm.GetCurrentFrame().Locals[1])) - length := int(uint32(vm.GetCurrentFrame().Locals[2])) - // FIXME: Check length - e.Void(e.state.SetStorage(e.address, burrow_binary.Int64ToWord256(int64(key)), vm.Memory[ptr:ptr+length])) - return 0 + return int64(len(e.input)) } - case "get_storage32": + case "callDataCopy": return func(vm *exec.VirtualMachine) int64 { - key := int(uint32(vm.GetCurrentFrame().Locals[0])) - ptr := int(uint32(vm.GetCurrentFrame().Locals[1])) - length := int(uint32(vm.GetCurrentFrame().Locals[2])) - val := e.Bytes(e.state.GetStorage(e.address, burrow_binary.Int64ToWord256(int64(key)))) - if len(val) < length { - val = append(val, make([]byte, length-len(val))...) + destPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataOffset := int(uint32(vm.GetCurrentFrame().Locals[1])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[2])) + + if dataLen > 0 { + copy(vm.Memory[destPtr:], e.input[dataOffset:dataOffset+dataLen]) } - // FIXME: Check length - copy(vm.Memory[ptr:ptr+length], val) + + return 0 + } + + case "storageStore": + return func(vm *exec.VirtualMachine) int64 { + keyPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataPtr := int(uint32(vm.GetCurrentFrame().Locals[1])) + + key := burrow_binary.Word256{} + + copy(key[:], vm.Memory[keyPtr:keyPtr+32]) + + e.Void(e.state.SetStorage(e.address, key, vm.Memory[dataPtr:dataPtr+32])) + return 0 + } + + case "storageLoad": + return func(vm *exec.VirtualMachine) int64 { + + keyPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataPtr := int(uint32(vm.GetCurrentFrame().Locals[1])) + + key := burrow_binary.Word256{} + + copy(key[:], vm.Memory[keyPtr:keyPtr+32]) + + val := e.Bytes(e.state.GetStorage(e.address, key)) + copy(vm.Memory[dataPtr:], val) + return 0 } + + case "finish": + return func(vm *exec.VirtualMachine) int64 { + dataPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[1])) + + e.output = vm.Memory[dataPtr : dataPtr+dataLen] + + panic(errors.Codes.None) + } + + case "revert": + return func(vm *exec.VirtualMachine) int64 { + + dataPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[1])) + + e.output = vm.Memory[dataPtr : dataPtr+dataLen] + + panic(errors.Codes.ExecutionReverted) + } + default: panic(fmt.Sprintf("unknown function %s", field)) } diff --git a/execution/wasm/wasm_test.go b/execution/wasm/wasm_test.go index 8210d51e1..a39620b78 100644 --- a/execution/wasm/wasm_test.go +++ b/execution/wasm/wasm_test.go @@ -16,7 +16,7 @@ func TestStaticCallWithValue(t *testing.T) { cache := acmstate.NewMemoryState() // run constructor - _, cerr := RunWASM(cache, crypto.ZeroAddress, true, Bytecode_storage_test, []byte{}) + runtime, cerr := RunWASM(cache, crypto.ZeroAddress, true, Bytecode_storage_test, []byte{}) require.NoError(t, cerr) // run getFooPlus2 @@ -24,7 +24,7 @@ func TestStaticCallWithValue(t *testing.T) { require.NoError(t, err) calldata, _, err := spec.Pack("getFooPlus2") - returndata, cerr := RunWASM(cache, crypto.ZeroAddress, false, Bytecode_storage_test, calldata) + returndata, cerr := RunWASM(cache, crypto.ZeroAddress, false, runtime, calldata) require.NoError(t, cerr) data := abi.GetPackingTypes(spec.Functions["getFooPlus2"].Outputs) @@ -39,7 +39,7 @@ func TestStaticCallWithValue(t *testing.T) { // call incFoo calldata, _, err = spec.Pack("incFoo") - returndata, cerr = RunWASM(cache, crypto.ZeroAddress, false, Bytecode_storage_test, calldata) + returndata, cerr = RunWASM(cache, crypto.ZeroAddress, false, runtime, calldata) require.NoError(t, cerr) require.Equal(t, returndata, []byte{}) @@ -48,7 +48,7 @@ func TestStaticCallWithValue(t *testing.T) { calldata, _, err = spec.Pack("getFooPlus2") require.NoError(t, err) - returndata, cerr = RunWASM(cache, crypto.ZeroAddress, false, Bytecode_storage_test, calldata) + returndata, cerr = RunWASM(cache, crypto.ZeroAddress, false, runtime, calldata) require.NoError(t, cerr) spec.Unpack(returndata, "getFooPlus2", data...) From 046dc156b8260ca1f966c5466fd2213969b03642 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Sat, 15 Feb 2020 09:46:21 +0000 Subject: [PATCH 059/185] Make postgres tests work again Signed-off-by: Sean Young --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index ea3c620bc..ae5bab13b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,8 @@ services: image: postgres:11-alpine ports: - 5432 + environment: + - POSTGRES_HOST_AUTH_METHOD=trust burrow: build: .github From bf70dabb060a949cb1347b8450811e0f33a3a7dd Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Mon, 17 Feb 2020 15:28:22 +0000 Subject: [PATCH 060/185] upgrade tendermint to v0.33.1 Signed-off-by: Gregory Hill --- .github/Dockerfile | 2 +- .github/workflows/test.yaml | 4 + Dockerfile | 4 +- Makefile | 2 +- bcm/block_store.go | 2 +- bcm/blockchain.go | 34 +++++-- cmd/burrow/commands/explore.go | 22 +++-- consensus/abci/app.go | 1 - consensus/abci/execute_tx.go | 6 +- consensus/abci/execute_tx_test.go | 6 +- consensus/tendermint/tendermint.go | 6 +- event/emitter.go | 6 +- event/pubsub/pubsub.go | 6 +- execution/exec/stream_event_test.go | 1 - execution/state/abi.go | 6 +- execution/state/accounts.go | 8 +- execution/state/events.go | 13 ++- execution/state/names.go | 6 +- execution/state/proposals.go | 6 +- execution/state/registry.go | 6 +- execution/state/validators.go | 6 +- forensics/replay.go | 103 ++++++++++++++++------ forensics/replay_test.go | 22 ++--- forensics/storage/cache_db.go | 58 ++++++++---- forensics/storage/cache_db_test.go | 45 +++++++--- forensics/storage/channel_iterator.go | 9 ++ forensics/storage/kvcache.go | 2 + forensics/storage/multi_iterator.go | 9 ++ forensics/storage/unique_iterator.go | 4 + go.mod | 18 ++-- go.sum | 45 ++++++++++ integration/governance/governance_test.go | 2 +- rpc/eth.go | 15 ++-- rpc/lib/client/ws_client.go | 9 +- rpc/lib/rpc_test.go | 2 +- rpc/lib/server/handlers.go | 10 +-- rpc/lib/server/parse_test.go | 20 ++--- rpc/metrics/exporter.go | 2 +- rpc/metrics/exporter_test.go | 8 +- rpc/result.go | 2 +- rpc/result_test.go | 2 +- storage/forest.go | 23 +++-- storage/forest_test.go | 4 +- storage/key_format.go | 2 +- storage/kvstore.go | 12 +-- storage/prefix.go | 36 +++++--- storage/prefix_db.go | 40 ++++----- storage/prefix_db_test.go | 39 +++++--- storage/prefix_test.go | 5 +- storage/rwtree.go | 6 +- storage/rwtree_test.go | 51 +++++++---- storage/tree.go | 24 +++-- 52 files changed, 524 insertions(+), 258 deletions(-) diff --git a/.github/Dockerfile b/.github/Dockerfile index 240363bed..1ca431307 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.12.6-alpine3.10 +FROM golang:1.13-alpine3.11 MAINTAINER Monax ENV DOCKER_VERSION "17.12.1-ce" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9318a23a1..8002154f8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -24,6 +24,10 @@ jobs: integration: runs-on: ubuntu-latest steps: + - uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go - uses: actions/checkout@v1 - run: make test_integration diff --git a/Dockerfile b/Dockerfile index 929003c75..42a00fc9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # For solc binary FROM ethereum/solc:0.5.12 as solc-builder # We use a multistage build to avoid bloating our deployment image with build dependencies -FROM golang:1.12.0-alpine3.9 as builder +FROM golang:1.13-alpine3.11 as builder RUN apk add --no-cache --update git bash make @@ -13,7 +13,7 @@ WORKDIR $REPO RUN make build # This will be our base container image -FROM alpine:3.9 +FROM alpine:3.11 # Variable arguments to populate labels ARG USER=burrow diff --git a/Makefile b/Makefile index 92f94a71d..84524f355 100644 --- a/Makefile +++ b/Makefile @@ -267,7 +267,7 @@ tag_release: test check docs build .PHONY: build_ci_image build_ci_image: - docker build -t ${CI_IMAGE} -f ./.circleci/Dockerfile . + docker build -t ${CI_IMAGE} -f ./.github/Dockerfile . .PHONY: push_ci_image push_ci_image: build_ci_image diff --git a/bcm/block_store.go b/bcm/block_store.go index b0781fec8..1d3c1b4ae 100644 --- a/bcm/block_store.go +++ b/bcm/block_store.go @@ -23,7 +23,7 @@ func NewBlockStore(blockStore state.BlockStoreRPC) *BlockStore { } } -func NewBlockExplorer(dbBackendType dbm.DBBackendType, dbDir string) *BlockStore { +func NewBlockExplorer(dbBackendType dbm.BackendType, dbDir string) *BlockStore { return NewBlockStore(store.NewBlockStore(dbm.NewDB("blockstore", dbBackendType, dbDir))) } diff --git a/bcm/blockchain.go b/bcm/blockchain.go index 2f8c70f49..5c4b59d06 100644 --- a/bcm/blockchain.go +++ b/bcm/blockchain.go @@ -29,10 +29,12 @@ type BlockchainInfo interface { LastCommitDuration() time.Duration LastBlockHash() []byte AppHashAfterLastBlock() []byte - // Gets the BlockHash at a height (or nil if no BlockStore mounted or block could not be found) + // BlockHash gets the hash at a height (or nil if no BlockStore mounted or block could not be found) BlockHash(height uint64) ([]byte, error) - // GetBlockHash returns hash of the specific block + // GetBlockHeader returns the header at the specified height GetBlockHeader(blockNumber uint64) (*types.Header, error) + // GetNumTxs returns the number of transactions included in a particular block + GetNumTxs(blockNumber uint64) (int, error) } type Blockchain struct { @@ -103,8 +105,10 @@ func GetSyncInfo(blockchain BlockchainInfo) *SyncInfo { } func loadBlockchain(db dbm.DB, genesisDoc *genesis.GenesisDoc) (*Blockchain, error) { - buf := db.Get(stateKey) - if len(buf) == 0 { + buf, err := db.Get(stateKey) + if err != nil { + return nil, err + } else if len(buf) == 0 { return nil, nil } bc, err := decodeBlockchain(buf, genesisDoc) @@ -235,15 +239,31 @@ func (bc *Blockchain) BlockHash(height uint64) ([]byte, error) { return header.Hash(), nil } -func (bc *Blockchain) GetBlockHeader(height uint64) (*types.Header, error) { - const errHeader = "GetBlockHeader():" +func (bc *Blockchain) getBlockMeta(height uint64) (*types.BlockMeta, error) { + const errHeader = "getBlockMeta():" if bc == nil { return nil, fmt.Errorf("%s could not get block hash because Blockchain has not been given access to "+ "tendermint BlockStore", errHeader) } - blockMeta, err := bc.blockStore.BlockMeta(int64(height)) + return bc.blockStore.BlockMeta(int64(height)) +} + +// GetBlockHeader returns the block header at any given height +func (bc *Blockchain) GetBlockHeader(height uint64) (*types.Header, error) { + const errHeader = "GetBlockHeader():" + blockMeta, err := bc.getBlockMeta(height) if err != nil { return nil, fmt.Errorf("%s could not get BlockMeta: %v", errHeader, err) } return &blockMeta.Header, nil } + +// GetNumTxs returns the number of transactions included in a block +func (bc *Blockchain) GetNumTxs(height uint64) (int, error) { + const errHeader = "GetNumTxs():" + blockMeta, err := bc.getBlockMeta(height) + if err != nil { + return 0, fmt.Errorf("%s could not get BlockMeta: %v", errHeader, err) + } + return blockMeta.NumTxs, nil +} diff --git a/cmd/burrow/commands/explore.go b/cmd/burrow/commands/explore.go index 0b1152f77..83128590d 100644 --- a/cmd/burrow/commands/explore.go +++ b/cmd/burrow/commands/explore.go @@ -37,7 +37,7 @@ func Explore(output Output) func(cmd *cli.Cmd) { output.Fatalf("genesis doc is required") } - explorer = bcm.NewBlockExplorer(dbm.DBBackendType(tmConf.DBBackend), tmConf.DBDir()) + explorer = bcm.NewBlockExplorer(dbm.BackendType(tmConf.DBBackend), tmConf.DBDir()) } cmd.Command("dump", "pretty print the state tree at the given height", func(cmd *cli.Cmd) { @@ -52,7 +52,7 @@ func Explore(output Output) func(cmd *cli.Cmd) { } cmd.Action = func() { - replay := forensics.NewReplayFromDir(conf.GenesisDoc, *stateDir) + replay := forensics.NewSourceFromDir(conf.GenesisDoc, *stateDir) height := uint64(*heightOpt) if height == 0 { height, err = replay.LatestHeight() @@ -85,14 +85,20 @@ func Explore(output Output) func(cmd *cli.Cmd) { } cmd.Action = func() { - replay1 := forensics.NewReplayFromDir(conf.GenesisDoc, *goodDir) - replay2 := forensics.NewReplayFromDir(conf.GenesisDoc, *badDir) - - h1, err := replay1.LatestHeight() + replay1 := forensics.NewReplay( + forensics.NewSourceFromDir(conf.GenesisDoc, *goodDir), + forensics.NewSourceFromGenesis(conf.GenesisDoc), + ) + replay2 := forensics.NewReplay( + forensics.NewSourceFromDir(conf.GenesisDoc, *badDir), + forensics.NewSourceFromGenesis(conf.GenesisDoc), + ) + + h1, err := replay1.Src.LatestHeight() if err != nil { output.Fatalf("could not get height for first replay: %v", err) } - h2, err := replay2.LatestHeight() + h2, err := replay2.Src.LatestHeight() if err != nil { output.Fatalf("could not get height for second replay: %v", err) } @@ -120,7 +126,7 @@ func Explore(output Output) func(cmd *cli.Cmd) { if height, err := forensics.CompareCaptures(recap1, recap2); err != nil { output.Printf("difference in capture: %v", err) // TODO: compare at every height? - if err := forensics.CompareStateAtHeight(replay1.State, replay2.State, height); err != nil { + if err := forensics.CompareStateAtHeight(replay1.Dst.State, replay2.Dst.State, height); err != nil { output.Fatalf("difference in state: %v", err) } } diff --git a/consensus/abci/app.go b/consensus/abci/app.go index 19eac238a..c306cd498 100644 --- a/consensus/abci/app.go +++ b/consensus/abci/app.go @@ -262,7 +262,6 @@ func (app *App) Commit() types.ResponseCommit { structure.ScopeKey, "Commit()", "height", app.block.Header.Height, "hash", app.block.Hash, - "txs", app.block.Header.NumTxs, "block_time", blockTime, "last_block_time", app.blockchain.LastBlockTime(), "last_block_duration", app.blockchain.LastCommitDuration(), diff --git a/consensus/abci/execute_tx.go b/consensus/abci/execute_tx.go index 1d641e57d..a46416906 100644 --- a/consensus/abci/execute_tx.go +++ b/consensus/abci/execute_tx.go @@ -11,7 +11,7 @@ import ( "github.com/hyperledger/burrow/logging/structure" "github.com/hyperledger/burrow/txs" "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/common" + "github.com/tendermint/tendermint/libs/kv" ) // Attempt to execute a transaction using ABCI conventions and codes @@ -36,9 +36,9 @@ func ExecuteTx(logHeader string, executor execution.Executor, txDecoder txs.Deco } } - tags := []common.KVPair{{Key: []byte(structure.TxHashKey), Value: []byte(txEnv.Tx.Hash().String())}} + tags := []kv.Pair{{Key: []byte(structure.TxHashKey), Value: []byte(txEnv.Tx.Hash().String())}} if txe.Receipt.CreatesContract { - tags = append(tags, common.KVPair{ + tags = append(tags, kv.Pair{ Key: []byte("created_contract_address"), Value: []byte(txe.Receipt.ContractAddress.String()), }) diff --git a/consensus/abci/execute_tx_test.go b/consensus/abci/execute_tx_test.go index 5358a90e0..c50c8c996 100644 --- a/consensus/abci/execute_tx_test.go +++ b/consensus/abci/execute_tx_test.go @@ -8,14 +8,14 @@ import ( "github.com/hyperledger/burrow/logging" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/common" + "github.com/tendermint/tendermint/libs/kv" ) func TestWithEvents(t *testing.T) { var buf bytes.Buffer logger := logging.NewLogger(log.NewLogfmtLogger(&buf)) - kvp := common.KVPair{Key: []byte("foo"), Value: []byte("bar")} - event := types.Event{Type: "event", Attributes: []common.KVPair{kvp}} + kvp := kv.Pair{Key: []byte("foo"), Value: []byte("bar")} + event := types.Event{Type: "event", Attributes: []kv.Pair{kvp}} events := []types.Event{event} logger = WithEvents(logger, events) logger.InfoMsg("hello, world") diff --git a/consensus/tendermint/tendermint.go b/consensus/tendermint/tendermint.go index eb1700ef8..7f6b706e5 100644 --- a/consensus/tendermint/tendermint.go +++ b/consensus/tendermint/tendermint.go @@ -25,17 +25,17 @@ import ( type Node struct { *node.Node closers []interface { - Close() + Close() error } } -func DBProvider(ID string, backendType dbm.DBBackendType, dbDir string) dbm.DB { +func DBProvider(ID string, backendType dbm.BackendType, dbDir string) dbm.DB { return dbm.NewDB(ID, backendType, dbDir) } // Since Tendermint doesn't close its DB connections func (n *Node) DBProvider(ctx *node.DBContext) (dbm.DB, error) { - db := DBProvider(ctx.ID, dbm.DBBackendType(ctx.Config.DBBackend), ctx.Config.DBDir()) + db := DBProvider(ctx.ID, dbm.BackendType(ctx.Config.DBBackend), ctx.Config.DBDir()) n.closers = append(n.closers, db) return db, nil } diff --git a/event/emitter.go b/event/emitter.go index 42b9bf94f..2c1057954 100644 --- a/event/emitter.go +++ b/event/emitter.go @@ -11,7 +11,7 @@ import ( "github.com/hyperledger/burrow/event/query" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/structure" - "github.com/tendermint/tendermint/libs/common" + "github.com/tendermint/tendermint/libs/service" hex "github.com/tmthrgd/go-hex" ) @@ -22,7 +22,7 @@ const DefaultEventBufferCapacity = 2 << 10 // Emitter has methods for working with events type Emitter struct { - common.BaseService + service.BaseService pubsubServer *pubsub.Server logger *logging.Logger } @@ -30,7 +30,7 @@ type Emitter struct { // NewEmitter initializes an emitter struct with a pubsubServer func NewEmitter() *Emitter { pubsubServer := pubsub.NewServer(pubsub.BufferCapacity(DefaultEventBufferCapacity)) - pubsubServer.BaseService = *common.NewBaseService(nil, "Emitter", pubsubServer) + pubsubServer.BaseService = *service.NewBaseService(nil, "Emitter", pubsubServer) pubsubServer.Start() return &Emitter{ pubsubServer: pubsubServer, diff --git a/event/pubsub/pubsub.go b/event/pubsub/pubsub.go index 6ff16ba40..e6e2dc343 100644 --- a/event/pubsub/pubsub.go +++ b/event/pubsub/pubsub.go @@ -21,7 +21,7 @@ import ( "github.com/hyperledger/burrow/event/query" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/structure" - "github.com/tendermint/tendermint/libs/common" + "github.com/tendermint/tendermint/libs/service" ) type operation int @@ -55,7 +55,7 @@ type cmd struct { // Server allows clients to subscribe/unsubscribe for messages, publishing // messages with or without tags, and manages internal state. type Server struct { - common.BaseService + service.BaseService cmds chan cmd cmdsCap int @@ -76,7 +76,7 @@ func NewServer(options ...Option) *Server { subscriptions: make(map[string]map[string]query.Query), logger: logging.NewNoopLogger(), } - s.BaseService = *common.NewBaseService(nil, "PubSub", s) + s.BaseService = *service.NewBaseService(nil, "PubSub", s) for _, option := range options { option(s) diff --git a/execution/exec/stream_event_test.go b/execution/exec/stream_event_test.go index e6659f426..5eed16eed 100644 --- a/execution/exec/stream_event_test.go +++ b/execution/exec/stream_event_test.go @@ -39,7 +39,6 @@ func TestConsumeBlockExecution(t *testing.T) { Header: &types.Header{ ChainID: genesisDoc.ChainID(), AppHash: crypto.Keccak256([]byte("hashily")), - NumTxs: 1, Time: time.Now(), Height: height, }, diff --git a/execution/state/abi.go b/execution/state/abi.go index a4fb1fe20..cd72a1fd1 100644 --- a/execution/state/abi.go +++ b/execution/state/abi.go @@ -5,10 +5,10 @@ import ( ) func (s *ReadState) GetMetadata(metahash acmstate.MetadataHash) (string, error) { - return string(s.Plain.Get(keys.Abi.Key(metahash.Bytes()))), nil + data, err := s.Plain.Get(keys.Abi.Key(metahash.Bytes())) + return string(data), err } func (ws *writeState) SetMetadata(metahash acmstate.MetadataHash, abi string) error { - ws.plain.Set(keys.Abi.Key(metahash.Bytes()), []byte(abi)) - return nil + return ws.plain.Set(keys.Abi.Key(metahash.Bytes()), []byte(abi)) } diff --git a/execution/state/accounts.go b/execution/state/accounts.go index cef3619f1..10b7173c1 100644 --- a/execution/state/accounts.go +++ b/execution/state/accounts.go @@ -16,8 +16,10 @@ func (s *ReadState) GetAccount(address crypto.Address) (*acm.Account, error) { if err != nil { return nil, err } - accBytes := tree.Get(keys.Account.KeyNoPrefix(address)) - if accBytes == nil { + accBytes, err := tree.Get(keys.Account.KeyNoPrefix(address)) + if err != nil { + return nil, err + } else if accBytes == nil { return nil, nil } account := new(acm.Account) @@ -116,7 +118,7 @@ func (s *ReadState) GetStorage(address crypto.Address, key binary.Word256) ([]by if err != nil { return []byte{}, err } - return tree.Get(keyFormat.KeyNoPrefix(key)), nil + return tree.Get(keyFormat.KeyNoPrefix(key)) } func (ws *writeState) SetStorage(address crypto.Address, key binary.Word256, value []byte) error { diff --git a/execution/state/events.go b/execution/state/events.go index aa422f17c..3685e6b2b 100644 --- a/execution/state/events.go +++ b/execution/state/events.go @@ -105,13 +105,16 @@ func (s *ReadState) TxsAtHeight(height uint64) ([]*exec.TxExecution, error) { func (s *ReadState) TxByHash(txHash []byte) (*exec.TxExecution, error) { const errHeader = "TxByHash():" - bs := s.Plain.Get(keys.TxHash.Key(txHash)) + bs, err := s.Plain.Get(keys.TxHash.Key(txHash)) + if err != nil { + return nil, err + } if len(bs) == 0 { return nil, nil } key := new(exec.TxExecutionKey) - err := encoding.Decode(bs, key) + err = encoding.Decode(bs, key) if err != nil { return nil, err } @@ -121,8 +124,10 @@ func (s *ReadState) TxByHash(txHash []byte) (*exec.TxExecution, error) { return nil, err } - bs = blockTree.Get(keys.Event.KeyNoPrefix(key.Height)) - if len(bs) == 0 { + bs, err = blockTree.Get(keys.Event.KeyNoPrefix(key.Height)) + if err != nil { + return nil, err + } else if len(bs) == 0 { return nil, fmt.Errorf("%s could not retrieve transaction with TxHash %X despite finding reference", errHeader, txHash) } diff --git a/execution/state/names.go b/execution/state/names.go index bcf135af0..25d8e714a 100644 --- a/execution/state/names.go +++ b/execution/state/names.go @@ -14,8 +14,10 @@ func (s *ReadState) GetName(name string) (*names.Entry, error) { if err != nil { return nil, err } - entryBytes := tree.Get(keys.Name.KeyNoPrefix(name)) - if entryBytes == nil { + entryBytes, err := tree.Get(keys.Name.KeyNoPrefix(name)) + if err != nil { + return nil, err + } else if entryBytes == nil { return nil, nil } diff --git a/execution/state/proposals.go b/execution/state/proposals.go index 80eaae409..5b661ab98 100644 --- a/execution/state/proposals.go +++ b/execution/state/proposals.go @@ -14,8 +14,10 @@ func (s *ReadState) GetProposal(proposalHash []byte) (*payload.Ballot, error) { if err != nil { return nil, err } - bs := tree.Get(keys.Proposal.KeyNoPrefix(proposalHash)) - if len(bs) == 0 { + bs, err := tree.Get(keys.Proposal.KeyNoPrefix(proposalHash)) + if err != nil { + return nil, err + } else if len(bs) == 0 { return nil, nil } diff --git a/execution/state/registry.go b/execution/state/registry.go index 6a31c51b2..1e30a609b 100644 --- a/execution/state/registry.go +++ b/execution/state/registry.go @@ -16,8 +16,10 @@ func getNode(forest storage.ForestReader, id crypto.Address) (*registry.NodeIden if err != nil { return nil, err } - nodeBytes := tree.Get(keys.Registry.KeyNoPrefix(id)) - if nodeBytes == nil { + nodeBytes, err := tree.Get(keys.Registry.KeyNoPrefix(id)) + if err != nil { + return nil, err + } else if nodeBytes == nil { return nil, nil } diff --git a/execution/state/validators.go b/execution/state/validators.go index 56945de9c..8fe5aee83 100644 --- a/execution/state/validators.go +++ b/execution/state/validators.go @@ -95,8 +95,10 @@ func (s *ReadState) Power(id crypto.Address) (*big.Int, error) { if err != nil { return nil, err } - bs := tree.Get(keys.Validator.KeyNoPrefix(id)) - if len(bs) == 0 { + bs, err := tree.Get(keys.Validator.KeyNoPrefix(id)) + if err != nil { + return nil, err + } else if len(bs) == 0 { return new(big.Int), nil } v := new(validator.Validator) diff --git a/forensics/replay.go b/forensics/replay.go index 9bb4cb3d2..152bdbb88 100644 --- a/forensics/replay.go +++ b/forensics/replay.go @@ -14,6 +14,7 @@ import ( "github.com/fatih/color" "github.com/hyperledger/burrow/bcm" "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/core" "github.com/hyperledger/burrow/event" "github.com/hyperledger/burrow/execution" @@ -23,14 +24,15 @@ import ( "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/txs" "github.com/pkg/errors" + sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" "github.com/xlab/treeprint" ) -// Replay is a kernel for state replaying -type Replay struct { +// Source is a kernel for tracking state +type Source struct { Explorer *bcm.BlockStore State *state.State db dbm.DB @@ -41,10 +43,10 @@ type Replay struct { logger *logging.Logger } -func NewReplay(burrowDB, tmDB dbm.DB, genesisDoc *genesis.GenesisDoc) *Replay { +func NewSource(burrowDB, tmDB dbm.DB, genesisDoc *genesis.GenesisDoc) *Source { // Avoid writing through to underlying DB cacheDB := storage.NewCacheDB(burrowDB) - return &Replay{ + return &Source{ Explorer: bcm.NewBlockStore(store.NewBlockStore(tmDB)), db: burrowDB, cacheDB: cacheDB, @@ -54,58 +56,105 @@ func NewReplay(burrowDB, tmDB dbm.DB, genesisDoc *genesis.GenesisDoc) *Replay { } } -func NewReplayFromDir(genesisDoc *genesis.GenesisDoc, dbDir string) *Replay { +func NewSourceFromDir(genesisDoc *genesis.GenesisDoc, dbDir string) *Source { burrowDB := dbm.NewDB(core.BurrowDBName, dbm.GoLevelDBBackend, dbDir) tmDB := dbm.NewDB("blockstore", dbm.GoLevelDBBackend, path.Join(dbDir, "data")) - return NewReplay(burrowDB, tmDB, genesisDoc) + return NewSource(burrowDB, tmDB, genesisDoc) +} + +func NewSourceFromGenesis(genesisDoc *genesis.GenesisDoc) *Source { + tmDB := dbm.NewMemDB() + gd := tendermint.DeriveGenesisDoc(genesisDoc, nil) + st, err := sm.MakeGenesisState(&types.GenesisDoc{ + ChainID: gd.ChainID, + Validators: gd.Validators, + AppHash: gd.AppHash, + }) + if err != nil { + panic(err) + } + sm.SaveState(tmDB, st) + burrowDB, burrowState, burrowChain, err := initBurrow(genesisDoc) + if err != nil { + panic(err) + } + src := NewSource(burrowDB, tmDB, genesisDoc) + src.State = burrowState + src.committer = execution.NewBatchCommitter(burrowState, execution.ParamsFromGenesis(genesisDoc), + burrowChain, event.NewEmitter(), logging.NewNoopLogger()) + return src +} + +func initBurrow(gd *genesis.GenesisDoc) (dbm.DB, *state.State, *bcm.Blockchain, error) { + db := dbm.NewMemDB() + st, err := state.MakeGenesisState(db, gd) + if err != nil { + return nil, nil, nil, err + } + err = st.InitialCommit() + if err != nil { + return nil, nil, nil, err + } + chain := bcm.NewBlockchain(db, gd) + return db, st, chain, nil } // LoadAt height -func (re *Replay) LoadAt(height uint64) (err error) { +func (src *Source) LoadAt(height uint64) (err error) { if height >= 1 { // Load and commit previous block - block, err := re.Explorer.Block(int64(height)) + block, err := src.Explorer.Block(int64(height)) if err != nil { return err } - err = re.blockchain.CommitBlockAtHeight(block.Time, block.Hash(), block.Header.AppHash, uint64(block.Height)) + err = src.blockchain.CommitBlockAtHeight(block.Time, block.Hash(), block.Header.AppHash, uint64(block.Height)) if err != nil { return err } } - re.State, err = state.LoadState(re.cacheDB, execution.VersionAtHeight(height)) + src.State, err = state.LoadState(src.cacheDB, execution.VersionAtHeight(height)) if err != nil { return err } // Get our commit machinery - re.committer = execution.NewBatchCommitter(re.State, execution.ParamsFromGenesis(re.genesisDoc), re.blockchain, - event.NewEmitter(), re.logger) + src.committer = execution.NewBatchCommitter(src.State, execution.ParamsFromGenesis(src.genesisDoc), src.blockchain, + event.NewEmitter(), src.logger) return nil } -func (re *Replay) LatestHeight() (uint64, error) { - blockchain, _, err := bcm.LoadOrNewBlockchain(re.db, re.genesisDoc, re.logger) +func (src *Source) LatestHeight() (uint64, error) { + blockchain, _, err := bcm.LoadOrNewBlockchain(src.db, src.genesisDoc, src.logger) if err != nil { return 0, err } return blockchain.LastBlockHeight(), nil } -func (re *Replay) LatestBlockchain() (*bcm.Blockchain, error) { - blockchain, _, err := bcm.LoadOrNewBlockchain(re.db, re.genesisDoc, re.logger) +func (src *Source) LatestBlockchain() (*bcm.Blockchain, error) { + blockchain, _, err := bcm.LoadOrNewBlockchain(src.db, src.genesisDoc, src.logger) if err != nil { return nil, err } - re.blockchain = blockchain + src.blockchain = blockchain return blockchain, nil } +// Replay is a kernel for state replaying +type Replay struct { + Src *Source + Dst *Source +} + +func NewReplay(src, dst *Source) *Replay { + return &Replay{src, dst} +} + // Block loads and commits a block func (re *Replay) Block(height uint64) (*ReplayCapture, error) { // block.AppHash is hash after txs from previous block have been applied - it's the state we want to load on top // of which we will reapply this block txs - if err := re.LoadAt(height - 1); err != nil { + if err := re.Src.LoadAt(height - 1); err != nil { return nil, err } return re.Commit(height) @@ -113,7 +162,7 @@ func (re *Replay) Block(height uint64) (*ReplayCapture, error) { // Blocks iterates through the given range func (re *Replay) Blocks(startHeight, endHeight uint64) ([]*ReplayCapture, error) { - if err := re.LoadAt(startHeight - 1); err != nil { + if err := re.Dst.LoadAt(startHeight - 1); err != nil { return nil, errors.Wrap(err, "State()") } @@ -134,7 +183,7 @@ func (re *Replay) Commit(height uint64) (*ReplayCapture, error) { Height: height, } - block, err := re.Explorer.Block(int64(height)) + block, err := re.Src.Explorer.Block(int64(height)) if err != nil { return nil, errors.Wrap(err, "explorer.Block()") } @@ -142,14 +191,14 @@ func (re *Replay) Commit(height uint64) (*ReplayCapture, error) { return nil, errors.Errorf("Tendermint block height %d != requested block height %d", block.Height, height) } - if height > 1 && !bytes.Equal(re.State.Hash(), block.AppHash) { + if height > 1 && !bytes.Equal(re.Dst.State.Hash(), block.AppHash) { return nil, errors.Errorf("state hash %X does not match AppHash %X at height %d", - re.State.Hash(), block.AppHash[:], height) + re.Dst.State.Hash(), block.AppHash[:], height) } recap.AppHashBefore = binary.HexBytes(block.AppHash) err = block.Transactions(func(txEnv *txs.Envelope) error { - txe, err := re.committer.Execute(txEnv) + txe, err := re.Dst.committer.Execute(txEnv) if err != nil { return errors.Wrap(err, "committer.Execute()") } @@ -161,7 +210,7 @@ func (re *Replay) Commit(height uint64) (*ReplayCapture, error) { } abciHeader := types.TM2PB.Header(&block.Header) - recap.AppHashAfter, err = re.committer.Commit(&abciHeader) + recap.AppHashAfter, err = re.Dst.committer.Commit(&abciHeader) if err != nil { return nil, errors.Wrap(err, "committer.Commit()") } @@ -184,8 +233,10 @@ func iterComp(exp, act *state.ReadState, tree treeprint.Tree, prefix []byte) (ui branch := tree.AddBranch(prefix) return diffs, reader1.Iterate(nil, nil, true, func(key, value []byte) error { - actual := reader2.Get(key) - if !bytes.Equal(actual, value) { + actual, err := reader2.Get(key) + if err != nil { + return err + } else if !bytes.Equal(actual, value) { diffs++ branch.AddNode(color.GreenString("%q -> %q", hex.EncodeToString(key), hex.EncodeToString(value))) branch.AddNode(color.RedString("%q -> %q", hex.EncodeToString(key), hex.EncodeToString(actual))) diff --git a/forensics/replay_test.go b/forensics/replay_test.go index ffc312462..0b12aa486 100644 --- a/forensics/replay_test.go +++ b/forensics/replay_test.go @@ -58,22 +58,15 @@ func TestReplay(t *testing.T) { var height uint64 = 10 genesisDoc, tmDB, burrowDB := makeChain(t, height) - re := NewReplay(burrowDB, tmDB, genesisDoc) + src := NewSource(burrowDB, tmDB, genesisDoc) + dst := NewSourceFromGenesis(genesisDoc) + re := NewReplay(src, dst) + rc, err := re.Blocks(1, height) require.NoError(t, err) require.Len(t, rc, int(height-1)) } -func initBurrow(t *testing.T, gd *genesis.GenesisDoc) (dbm.DB, *state.State, *bcm.Blockchain) { - db := dbm.NewMemDB() - st, err := state.MakeGenesisState(db, gd) - require.NoError(t, err) - err = st.InitialCommit() - require.NoError(t, err) - chain := bcm.NewBlockchain(db, gd) - return db, st, chain -} - func makeChain(t *testing.T, max uint64) (*genesis.GenesisDoc, dbm.DB, dbm.DB) { genesisDoc, _, validators := genesis.NewDeterministicGenesis(0).GenesisDoc(0, 1) @@ -87,7 +80,8 @@ func makeChain(t *testing.T, max uint64) (*genesis.GenesisDoc, dbm.DB, dbm.DB) { }) require.NoError(t, err) - burrowDB, burrowState, burrowChain := initBurrow(t, genesisDoc) + burrowDB, burrowState, burrowChain, err := initBurrow(genesisDoc) + require.NoError(t, err) committer := execution.NewBatchCommitter(burrowState, execution.ParamsFromGenesis(genesisDoc), burrowChain, event.NewEmitter(), logging.NewNoopLogger()) @@ -123,8 +117,8 @@ func makeBlock(t *testing.T, st sm.State, bs *store.BlockStore, commit func(*typ commit(block) partSet := block.MakePartSet(2) - commitSigs := []*types.CommitSig{{Height: height, Timestamp: time.Time{}}} - seenCommit := types.NewCommit(types.BlockID{ + commitSigs := []types.CommitSig{{Timestamp: time.Time{}}} + seenCommit := types.NewCommit(height, 0, types.BlockID{ Hash: block.Hash(), PartsHeader: partSet.Header(), }, commitSigs) diff --git a/forensics/storage/cache_db.go b/forensics/storage/cache_db.go index b8c56ba1f..c93b86dba 100644 --- a/forensics/storage/cache_db.go +++ b/forensics/storage/cache_db.go @@ -18,49 +18,67 @@ func NewCacheDB(backend storage.KVIterableReader) *CacheDB { } // DB implementation -func (cdb *CacheDB) Get(key []byte) []byte { +func (cdb *CacheDB) Get(key []byte) ([]byte, error) { value, deleted := cdb.cache.Info(key) if deleted { - return nil + return nil, nil } if value != nil { - return value + return value, nil } return cdb.backend.Get(key) } -func (cdb *CacheDB) Has(key []byte) bool { +func (cdb *CacheDB) Has(key []byte) (bool, error) { value, deleted := cdb.cache.Info(key) - return !deleted && (value != nil || cdb.backend.Has(key)) + has, err := cdb.backend.Has(key) + if err != nil { + return false, err + } + return !deleted && (value != nil || has), nil } -func (cdb *CacheDB) Iterator(low, high []byte) storage.KVIterator { +func (cdb *CacheDB) Iterator(low, high []byte) (storage.KVIterator, error) { // Keys from cache will sort first because of order in MultiIterator and Uniq will take the first KVs so KVs // appearing in cache will override values from backend. - return Uniq(NewMultiIterator(false, cdb.cache.Iterator(low, high), cdb.backend.Iterator(low, high))) + iterator, err := cdb.backend.Iterator(low, high) + if err != nil { + return nil, err + } + + return Uniq(NewMultiIterator(false, cdb.cache.Iterator(low, high), iterator)), nil } -func (cdb *CacheDB) ReverseIterator(low, high []byte) storage.KVIterator { - return Uniq(NewMultiIterator(true, cdb.cache.ReverseIterator(low, high), cdb.backend.ReverseIterator(low, high))) +func (cdb *CacheDB) ReverseIterator(low, high []byte) (storage.KVIterator, error) { + iterator, err := cdb.backend.ReverseIterator(low, high) + if err != nil { + return nil, err + } + + return Uniq(NewMultiIterator(true, cdb.cache.ReverseIterator(low, high), iterator)), nil } -func (cdb *CacheDB) Set(key, value []byte) { +func (cdb *CacheDB) Set(key, value []byte) error { cdb.cache.Set(key, value) + return nil } -func (cdb *CacheDB) SetSync(key, value []byte) { +func (cdb *CacheDB) SetSync(key, value []byte) error { cdb.cache.Set(key, value) + return nil } -func (cdb *CacheDB) Delete(key []byte) { +func (cdb *CacheDB) Delete(key []byte) error { cdb.cache.Delete(key) + return nil } -func (cdb *CacheDB) DeleteSync(key []byte) { - cdb.Delete(key) +func (cdb *CacheDB) DeleteSync(key []byte) error { + return cdb.Delete(key) } -func (cdb *CacheDB) Close() { +func (cdb *CacheDB) Close() error { + return nil } func (cdb *CacheDB) NewBatch() dbm.Batch { @@ -88,18 +106,20 @@ func (cb *cacheBatch) Delete(key []byte) { cb.cache.Delete(key) } -func (cb *cacheBatch) Write() { +func (cb *cacheBatch) Write() error { cb.cache.WriteTo(cb.backend) + return nil } func (cb *cacheBatch) Close() { } -func (cb *cacheBatch) WriteSync() { - cb.Write() +func (cb *cacheBatch) WriteSync() error { + return cb.Write() } -func (cdb *CacheDB) Print() { +func (cdb *CacheDB) Print() error { + return nil } func (cdb *CacheDB) Stats() map[string]string { diff --git a/forensics/storage/cache_db_test.go b/forensics/storage/cache_db_test.go index ee0309edc..5bfa947c3 100644 --- a/forensics/storage/cache_db_test.go +++ b/forensics/storage/cache_db_test.go @@ -15,25 +15,46 @@ func TestBatchCommit(t *testing.T) { bam := []byte("bam") bosh := []byte("bosh") boom := []byte("boom") + db.Set(foo, bam) - assert.Equal(t, bam, cdb.Get(foo), "underlying writes should be seen") + result, err := cdb.Get(foo) + assert.NoError(t, err) + assert.Equal(t, bam, result, "underlying writes should be seen") cdb.Set(foo, bosh) - assert.Equal(t, bosh, cdb.Get(foo), "writes to CacheDB should be available") + result, err = cdb.Get(foo) + assert.NoError(t, err) + assert.Equal(t, bosh, result, "writes to CacheDB should be available") batch := cdb.NewBatch() batch.Set(foo, bam) - assert.Equal(t, bosh, cdb.Get(foo), "write to batch should not be seen") + result, err = cdb.Get(foo) + assert.NoError(t, err) + assert.Equal(t, bosh, result, "write to batch should not be seen") batch.WriteSync() cdb.Commit(db) - assert.Equal(t, bam, db.Get(foo), "changes should commit") + result, err = db.Get(foo) + assert.NoError(t, err) + assert.Equal(t, bam, result, "changes should commit") cdb.Set(foo, bosh) - assert.Equal(t, bam, db.Get(foo), "uncommitted changes should not be seen in db") + result, err = db.Get(foo) + assert.NoError(t, err) + assert.Equal(t, bam, result, "uncommitted changes should not be seen in db") cdb.Delete(foo) - assert.Nil(t, cdb.Get(foo)) - assert.Equal(t, bam, db.Get(foo)) + result, err = cdb.Get(foo) + assert.NoError(t, err) + assert.Nil(t, result) + result, err = db.Get(foo) + assert.NoError(t, err) + assert.Equal(t, bam, result) cdb.Commit(db) - assert.Nil(t, db.Get(foo)) + result, err = db.Get(foo) + assert.NoError(t, err) + + assert.Nil(t, result) cdb.Set(foo, boom) - assert.Nil(t, db.Get(foo)) + result, err = db.Get(foo) + assert.NoError(t, err) + + assert.Nil(t, result) } func TestCacheDB_Iterator(t *testing.T) { @@ -49,11 +70,13 @@ func TestCacheDB_Iterator(t *testing.T) { cdb.Set(append(foo, bosh...), bosh) cdb.Set(boom, boom) - it := cdb.Iterator(nil, nil) + it, err := cdb.Iterator(nil, nil) + assert.NoError(t, err) kvp := collectIterator(it) fmt.Println(kvp) cdb.Commit(db) - it = db.Iterator(nil, nil) + it, err = db.Iterator(nil, nil) + assert.NoError(t, err) assert.Equal(t, kvp, collectIterator(it)) } diff --git a/forensics/storage/channel_iterator.go b/forensics/storage/channel_iterator.go index a59eb737e..1cdc90234 100644 --- a/forensics/storage/channel_iterator.go +++ b/forensics/storage/channel_iterator.go @@ -94,3 +94,12 @@ func (it *ChannelIterator) Close() { // drain channel if necessary } } + +func (it *ChannelIterator) Error() error { + for range it.ch { + if err := it.Error(); err != nil { + return nil + } + } + return nil +} diff --git a/forensics/storage/kvcache.go b/forensics/storage/kvcache.go index d549038a2..7581213c2 100644 --- a/forensics/storage/kvcache.go +++ b/forensics/storage/kvcache.go @@ -204,6 +204,8 @@ func (kvi *KVCacheIterator) Valid() bool { func (kvi *KVCacheIterator) Close() {} +func (kvi *KVCacheIterator) Error() error { return nil } + func (kvi *KVCacheIterator) sliceIndex() int { if kvi.reverse { //reflect diff --git a/forensics/storage/multi_iterator.go b/forensics/storage/multi_iterator.go index 9a1c8ba7a..8165196eb 100644 --- a/forensics/storage/multi_iterator.go +++ b/forensics/storage/multi_iterator.go @@ -115,3 +115,12 @@ func (mi *MultiIterator) Close() { it.Close() } } + +func (mi *MultiIterator) Error() error { + for _, it := range mi.iterators { + if err := it.Error(); err != nil { + return err + } + } + return nil +} diff --git a/forensics/storage/unique_iterator.go b/forensics/storage/unique_iterator.go index d5904315e..b9fd20c89 100644 --- a/forensics/storage/unique_iterator.go +++ b/forensics/storage/unique_iterator.go @@ -45,3 +45,7 @@ func (ui *uniqueIterator) Value() []byte { func (ui *uniqueIterator) Close() { ui.source.Close() } + +func (ui *uniqueIterator) Error() error { + return ui.source.Error() +} diff --git a/go.mod b/go.mod index 45f807778..8a85db160 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/go-kit/kit v0.9.0 github.com/go-ozzo/ozzo-validation v3.5.0+incompatible github.com/gogo/protobuf v1.3.1 - github.com/golang/protobuf v1.3.2 + github.com/golang/protobuf v1.3.3 github.com/gorilla/websocket v1.4.1 github.com/hashicorp/golang-lru v0.5.1 github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c @@ -34,29 +34,29 @@ require ( github.com/mattn/go-sqlite3 v1.10.0 github.com/monax/relic v2.0.0+incompatible github.com/perlin-network/life v0.0.0-20190803100833-89b850c02992 - github.com/pkg/errors v0.8.1 + github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v0.9.3 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 github.com/prometheus/common v0.4.0 github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a github.com/sirupsen/logrus v1.4.2 // indirect - github.com/spf13/viper v1.5.0 + github.com/spf13/viper v1.6.2 github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485 github.com/stretchr/testify v1.4.0 - github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 + github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d github.com/tendermint/go-amino v0.14.1 - github.com/tendermint/iavl v0.12.4 - github.com/tendermint/tendermint v0.32.8 - github.com/tendermint/tm-db v0.2.0 + github.com/tendermint/iavl v0.13.0 + github.com/tendermint/tendermint v0.33.1 + github.com/tendermint/tm-db v0.4.0 github.com/test-go/testify v1.1.4 github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.1.0 github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca - golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 + golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 golang.org/x/sys v0.0.0-20190825160603-fb81701db80f // indirect - google.golang.org/grpc v1.25.1 + google.golang.org/grpc v1.27.1 gopkg.in/yaml.v2 v2.2.4 ) diff --git a/go.sum b/go.sum index b85f42598..bd85de8f9 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200102211924-4bcbc698314f h1:4O1om+UVU+Hfcihr1timk8YNXHxzZWgCo7ofnrZRApw= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200102211924-4bcbc698314f/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= @@ -42,6 +44,8 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/go-semver v0.2.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/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= +github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= 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= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -59,6 +63,7 @@ github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13/go.mod h1:rQELVIqRXpraeU github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8 h1:bD2/rCXwgXJm2vgoSSSCM9IPjVFfEoQFFblzg7HHABI= github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8/go.mod h1:o4DgpccPNAQAlPSxo7I4L/LWNh2oyr/BBGSynrLTmZM= 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/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.2/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/etcd-io/bbolt v1.3.3 h1:gSJmxrs37LgTqR/oyJBWok6k6SvXEUerFTbltIhXkBM= @@ -86,6 +91,8 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 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= +github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ozzo/ozzo-validation v3.5.0+incompatible h1:sUy/in/P6askYr16XJgTKq/0SZhiWsdg4WZGaLsGQkM= github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= @@ -105,12 +112,15 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= @@ -118,6 +128,10 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= 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/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f h1:8N8XWLZelZNibkhM1FuF+3Ad3YIbgirjdMiVA0eUkaM= +github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= +github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -140,6 +154,7 @@ github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= 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/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 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= @@ -171,6 +186,8 @@ github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK86 github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/monax/relic v2.0.0+incompatible h1:5q+fw8Y7UJJuOBzGV5bZNlBk9k9ii6fzmdpwXsZKMdg= @@ -187,6 +204,8 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -217,6 +236,8 @@ github.com/silasdavis/life v0.0.0-20191009191257-e9c2a5fdbc96/go.mod h1:kRj+/Hyx github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +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/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -232,6 +253,10 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.5.0 h1:GpsTwfsQ27oS/Aha/6d1oD7tpKIqWnOA6tgOX9HHkt4= github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4= +github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= +github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= +github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485 h1:tvEO2/Btzw9L4N2VlAHD7AXjk1g1yFTwbGEm8dz7QWY= github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485/go.mod h1:fMlyZAyOBbIsA9SgKX9V3X8DvF+5ImkZ+Z1HZcmo8Ec= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -247,16 +272,27 @@ 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.20190318030020-c3a204f8e965 h1:1oFLiOyVl+W7bnBzGhf7BbIv9loSFQcieWWYIjLqcAw= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= +github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/tecbot/gorocksdb v0.0.0-20191017175515-d217d93fd4c5/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6offJMk= github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= github.com/tendermint/iavl v0.12.4 h1:hd1woxUGISKkfUWBA4mmmTwOua6PQZTJM/F0FDrmMV8= github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= +github.com/tendermint/iavl v0.13.0 h1:r2sINvNFlJsLlLhGoqlqPlREWYkuK26BvMfkBt+XQnA= +github.com/tendermint/iavl v0.13.0/go.mod h1:7nSUPdrsHEZ2nNZa+9gaIrcJciWd1jCQZXtcyARU82k= github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= github.com/tendermint/tendermint v0.32.8 h1:eOaLJGRi5x/Rb23fiVsxq9c5fZ/6O5QplExlGjNPDVI= github.com/tendermint/tendermint v0.32.8/go.mod h1:5/B1XZjNYtVBso8o1l/Eg4A0Mhu42lDcmftoQl95j/E= +github.com/tendermint/tendermint v0.33.0 h1:TW1g9sQs3YSqKM8o1+opL3/VmBy4Ke/VKV9MxYpqNbI= +github.com/tendermint/tendermint v0.33.0/go.mod h1:s5UoymnPIY+GcA3mMte4P9gpMP8vS7UH7HBXikT1pHI= +github.com/tendermint/tendermint v0.33.1 h1:8f68LUBz8yhISZvaLFP4siXXrLWsWeoYfelbdNtmvm4= +github.com/tendermint/tendermint v0.33.1/go.mod h1:fBOKyrlXOETqQ+heL8x/TZgSdmItON54csyabvktBp0= github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= github.com/tendermint/tm-db v0.2.0 h1:rJxgdqn6fIiVJZy4zLpY1qVlyD0TU6vhkT4kEf71TQQ= github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= +github.com/tendermint/tm-db v0.4.0 h1:iPbCcLbf4nwDFhS39Zo1lpdS1X/cT9CkTlUx17FHQgA= +github.com/tendermint/tm-db v0.4.0/go.mod h1:+Cwhgowrf7NBGXmsqFMbwEtbo80XmyrlY5Jsk95JubQ= github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -290,6 +326,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 h1:7KByu05hhLed2MO29w7p1XfZvZ13m8mub3shuVftRs0= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -335,6 +373,7 @@ golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/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-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -354,6 +393,10 @@ google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= 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= @@ -363,6 +406,8 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogR gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= diff --git a/integration/governance/governance_test.go b/integration/governance/governance_test.go index 0e96e4cb8..a8c96ae7d 100644 --- a/integration/governance/governance_test.go +++ b/integration/governance/governance_test.go @@ -91,7 +91,7 @@ func TestGovernance(t *testing.T) { require.NoError(t, err) height := int64(genesisKernels[0].Blockchain.LastBlockHeight()) genesisKernels[0].Node.ConfigureRPC() - tmVals, err := tmcore.Validators(&rpctypes.Context{}, &height) + tmVals, err := tmcore.Validators(&rpctypes.Context{}, &height, 0, 0) require.NoError(t, err) vsOut = validator.NewTrimSet() diff --git a/rpc/eth.go b/rpc/eth.go index c29b4172e..918e8c917 100644 --- a/rpc/eth.go +++ b/rpc/eth.go @@ -247,13 +247,13 @@ func (srv *EthService) EthGetBlockTransactionCountByHash(req *web3.EthGetBlockTr return nil, err } - block, err := srv.getBlockHeaderAtHeight(height) + numTxs, err := srv.blockchain.GetNumTxs(height) if err != nil { return nil, err } return &web3.EthGetBlockTransactionCountByHashResult{ - BlockTransactionCountByHash: x.EncodeNumber(uint64(block.NumTxs)), + BlockTransactionCountByHash: x.EncodeNumber(uint64(numTxs)), }, nil } @@ -264,13 +264,13 @@ func (srv *EthService) EthGetBlockTransactionCountByNumber(req *web3.EthGetBlock return nil, err } - block, err := srv.getBlockHeaderAtHeight(height) + numTxs, err := srv.blockchain.GetNumTxs(height) if err != nil { return nil, err } return &web3.EthGetBlockTransactionCountByNumberResult{ - BlockTransactionCountByHash: x.EncodeNumber(uint64(block.NumTxs)), + BlockTransactionCountByHash: x.EncodeNumber(uint64(numTxs)), }, nil } @@ -719,6 +719,11 @@ func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (web return web3.Block{}, fmt.Errorf("block at height %d does not exist", height) } + numTxs, err := srv.blockchain.GetNumTxs(height) + if err != nil { + return web3.Block{}, err + } + transactions := make([]web3.Transactions, 0) if includeTxs { txes, err := srv.events.TxsAtHeight(height) @@ -743,7 +748,7 @@ func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (web StateRoot: hexKeccak(block.Hash().Bytes()), ReceiptsRoot: hexKeccak(block.Hash().Bytes()), Nonce: hexZeroNonce, - Size: x.EncodeNumber(uint64(block.TotalTxs)), + Size: x.EncodeNumber(uint64(numTxs)), Number: x.EncodeNumber(uint64(block.Height)), Miner: x.EncodeBytes(block.ProposerAddress.Bytes()), Sha3Uncles: hexZero, diff --git a/rpc/lib/client/ws_client.go b/rpc/lib/client/ws_client.go index 751de2708..c46ad8901 100644 --- a/rpc/lib/client/ws_client.go +++ b/rpc/lib/client/ws_client.go @@ -13,7 +13,8 @@ import ( "github.com/hyperledger/burrow/rpc/lib/types" "github.com/pkg/errors" metrics "github.com/rcrowley/go-metrics" - cmn "github.com/tendermint/tendermint/libs/common" + "github.com/tendermint/tendermint/libs/rand" + "github.com/tendermint/tendermint/libs/service" ) const ( @@ -26,7 +27,7 @@ const ( // WSClient is a WebSocket client. The methods of WSClient are safe for use by // multiple goroutines. type WSClient struct { - cmn.BaseService + service.BaseService conn *websocket.Conn @@ -85,7 +86,7 @@ func NewWSClient(remoteAddr, endpoint string, options ...func(*WSClient)) *WSCli writeWait: defaultWriteWait, pingPeriod: defaultPingPeriod, } - c.BaseService = *cmn.NewBaseService(nil, "WSClient", c) + c.BaseService = *service.NewBaseService(nil, "WSClient", c) for _, option := range options { option(c) } @@ -253,7 +254,7 @@ func (c *WSClient) reconnect() error { }() for { - jitterSeconds := time.Duration(cmn.RandFloat64() * float64(time.Second)) // 1s == (1e9 ns) + jitterSeconds := time.Duration(rand.Float64() * float64(time.Second)) // 1s == (1e9 ns) backoffDuration := jitterSeconds + ((1 << uint(attempt)) * time.Second) c.Logger.Info("reconnecting", "attempt", attempt+1, "backoff_duration", backoffDuration) diff --git a/rpc/lib/rpc_test.go b/rpc/lib/rpc_test.go index d66727439..f3f60f2c2 100644 --- a/rpc/lib/rpc_test.go +++ b/rpc/lib/rpc_test.go @@ -21,7 +21,7 @@ import ( "github.com/hyperledger/burrow/rpc/lib/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - cmn "github.com/tendermint/tendermint/libs/common" + cmn "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/libs/log" ) diff --git a/rpc/lib/server/handlers.go b/rpc/lib/server/handlers.go index b26ef5d17..996bba786 100644 --- a/rpc/lib/server/handlers.go +++ b/rpc/lib/server/handlers.go @@ -20,7 +20,7 @@ import ( "github.com/hyperledger/burrow/logging/structure" "github.com/hyperledger/burrow/rpc/lib/types" "github.com/pkg/errors" - cmn "github.com/tendermint/tendermint/libs/common" + "github.com/tendermint/tendermint/libs/service" ) // RegisterRPCFuncs adds a route for each function in the funcMap, as well as general jsonrpc and websocket handlers for all functions. @@ -366,7 +366,7 @@ const ( // // In case of an error, the connection is stopped. type wsConnection struct { - cmn.BaseService + service.BaseService remoteAddr string baseConn *websocket.Conn @@ -411,7 +411,7 @@ func NewWSConnection(baseConn *websocket.Conn, funcMap map[string]*RPCFunc, option(wsc) } - wsc.BaseService = *cmn.NewBaseService(tendermint.NewLogger(logger.With("remote", baseConn.RemoteAddr())), + wsc.BaseService = *service.NewBaseService(tendermint.NewLogger(logger.With("remote", baseConn.RemoteAddr())), "wsConnection", wsc) return wsc } @@ -457,7 +457,7 @@ func PingPeriod(pingPeriod time.Duration) func(*wsConnection) { } } -// OnStart implements cmn.Service by starting the read and write routines. It +// OnStart implements service.Service by starting the read and write routines. It // blocks until the connection closes. func (wsc *wsConnection) OnStart() error { wsc.writeChan = make(chan types.RPCResponse, wsc.writeChanCapacity) @@ -470,7 +470,7 @@ func (wsc *wsConnection) OnStart() error { return nil } -// OnStop implements cmn.Service by unsubscribing remoteAddr from all subscriptions. +// OnStop implements service.Service by unsubscribing remoteAddr from all subscriptions. func (wsc *wsConnection) OnStop() { // Both read and write loops close the websocket connection when they exit their loops. // The writeChan is never closed, to allow WriteRPCResponse() to fail. diff --git a/rpc/lib/server/parse_test.go b/rpc/lib/server/parse_test.go index 6f3f7dcbe..7b635e4d4 100644 --- a/rpc/lib/server/parse_test.go +++ b/rpc/lib/server/parse_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - cmn "github.com/tendermint/tendermint/libs/common" + "github.com/tendermint/tendermint/libs/bytes" ) func TestParseJSONMap(t *testing.T) { @@ -31,7 +31,7 @@ func TestParseJSONMap(t *testing.T) { // preloading map with values doesn't help tmp := 0 p2 := map[string]interface{}{ - "value": &cmn.HexBytes{}, + "value": &bytes.HexBytes{}, "height": &tmp, } err = json.Unmarshal(input, &p2) @@ -54,7 +54,7 @@ func TestParseJSONMap(t *testing.T) { Height interface{} `json:"height"` }{ Height: &tmp, - Value: &cmn.HexBytes{}, + Value: &bytes.HexBytes{}, } err = json.Unmarshal(input, &p3) if assert.Nil(err) { @@ -62,7 +62,7 @@ func TestParseJSONMap(t *testing.T) { if assert.True(ok, "%#v", p3.Height) { assert.Equal(22, *h) } - v, ok := p3.Value.(*cmn.HexBytes) + v, ok := p3.Value.(*bytes.HexBytes) if assert.True(ok, "%#v", p3.Value) { assert.EqualValues([]byte{0x12, 0x34}, *v) } @@ -70,8 +70,8 @@ func TestParseJSONMap(t *testing.T) { // simplest solution, but hard-coded p4 := struct { - Value cmn.HexBytes `json:"value"` - Height int `json:"height"` + Value bytes.HexBytes `json:"value"` + Height int `json:"height"` }{} err = json.Unmarshal(input, &p4) if assert.Nil(err) { @@ -90,10 +90,10 @@ func TestParseJSONMap(t *testing.T) { assert.Equal(22, h) } - var v cmn.HexBytes + var v bytes.HexBytes err = json.Unmarshal(*p5["value"], &v) if assert.Nil(err) { - assert.Equal(cmn.HexBytes{0x12, 0x34}, v) + assert.Equal(bytes.HexBytes{0x12, 0x34}, v) } } } @@ -119,10 +119,10 @@ func TestParseJSONArray(t *testing.T) { // preloading map with values helps here (unlike map - p2 above) tmp := 0 - p2 := []interface{}{&cmn.HexBytes{}, &tmp} + p2 := []interface{}{&bytes.HexBytes{}, &tmp} err = json.Unmarshal(input, &p2) if assert.Nil(err) { - v, ok := p2[0].(*cmn.HexBytes) + v, ok := p2[0].(*bytes.HexBytes) if assert.True(ok, "%#v", p2[0]) { assert.EqualValues([]byte{0x12, 0x34}, *v) } diff --git a/rpc/metrics/exporter.go b/rpc/metrics/exporter.go index c9a959f3e..963190bdb 100644 --- a/rpc/metrics/exporter.go +++ b/rpc/metrics/exporter.go @@ -271,7 +271,7 @@ func (e *Exporter) getTxBuckets(blockMetas []*types.BlockMeta) error { // Collect number of txs per block as an array of floats txsPerBlock := make([]float64, len(blockMetas)) for i, block := range blockMetas { - txsPerBlock[i] = float64(block.Header.NumTxs) + txsPerBlock[i] = float64(block.NumTxs) } e.datum.TxPerBlockBuckets, e.datum.TotalTxs = e.txPerBlockHistogramBuilder(txsPerBlock) diff --git a/rpc/metrics/exporter_test.go b/rpc/metrics/exporter_test.go index 573320339..82e585771 100644 --- a/rpc/metrics/exporter_test.go +++ b/rpc/metrics/exporter_test.go @@ -60,7 +60,7 @@ func TestExporter_Collect_Histogram(t *testing.T) { timePerBlock[i-1] = block.Header.Time.Sub(blockTime).Seconds() } blockTime = block.Header.Time - numTxsPerBlock[i] = float64(block.Header.NumTxs) + numTxsPerBlock[i] = float64(block.NumTxs) } // Pull out the histograms and make sure they check out @@ -141,16 +141,16 @@ func genBlocks(n int64) []*types.BlockMeta { for i := int64(0); i < n; i++ { blockDuration := time.Second*2 + time.Millisecond*time.Duration(rnd.Int63()>>48) blockTime = blockTime.Add(blockDuration) - bms[i] = blockMeta(i+1, rnd.Int63()>>56, blockTime) + bms[i] = blockMeta(i+1, rnd.Int()>>56, blockTime) } return bms } -func blockMeta(height, numTxs int64, blockTime time.Time) *types.BlockMeta { +func blockMeta(height int64, numTxs int, blockTime time.Time) *types.BlockMeta { return &types.BlockMeta{ + NumTxs: numTxs, Header: types.Header{ Height: height, - NumTxs: numTxs, Time: blockTime, }, } diff --git a/rpc/result.go b/rpc/result.go index 65af2bbee..376b10e98 100644 --- a/rpc/result.go +++ b/rpc/result.go @@ -25,7 +25,7 @@ var aminoCodec = NewAminoCodec() func NewAminoCodec() *amino.Codec { aminoCodec := amino.NewCodec() - consensus.RegisterConsensusMessages(aminoCodec) + consensus.RegisterMessages(aminoCodec) core_types.RegisterAmino(aminoCodec) return aminoCodec } diff --git a/rpc/result_test.go b/rpc/result_test.go index 680f274dd..99989a7eb 100644 --- a/rpc/result_test.go +++ b/rpc/result_test.go @@ -33,7 +33,7 @@ func TestResultGetBlock(t *testing.T) { res := &ResultBlock{ Block: &Block{&tmTypes.Block{ LastCommit: &tmTypes.Commit{ - Precommits: []*tmTypes.CommitSig{ + Signatures: []tmTypes.CommitSig{ { Signature: []byte{1, 2, 3}, }, diff --git a/storage/forest.go b/storage/forest.go index b5874f843..676c4b1b3 100644 --- a/storage/forest.go +++ b/storage/forest.go @@ -94,7 +94,10 @@ var WithOverwriting ForestOption = func(imf *ImmutableForest) { imf.overwriting func NewMutableForest(db dbm.DB, cacheSize int) (*MutableForest, error) { // The tree whose state root hash is the global state hash - commitsTree := NewRWTree(NewPrefixDB(db, commitsPrefix), cacheSize) + commitsTree, err := NewRWTree(NewPrefixDB(db, commitsPrefix), cacheSize) + if err != nil { + return nil, err + } forest, err := NewImmutableForest(commitsTree, NewPrefixDB(db, treePrefix), cacheSize, WithOverwriting) if err != nil { return nil, err @@ -261,7 +264,7 @@ func (imf *ImmutableForest) tree(prefix []byte) (*RWTree, error) { } func (imf *ImmutableForest) commitID(prefix []byte) (*CommitID, error) { - bs := imf.commitsTree.Get(prefix) + bs, _ := imf.commitsTree.Get(prefix) if bs == nil { return new(CommitID), nil } @@ -274,14 +277,17 @@ func (imf *ImmutableForest) commitID(prefix []byte) (*CommitID, error) { func (imf *ImmutableForest) loadOrCreateTree(prefix []byte) (*RWTree, error) { const errHeader = "ImmutableForest.loadOrCreateTree():" - tree := imf.newTree(prefix) + tree, err := imf.newTree(prefix) + if err != nil { + return nil, err + } commitID, err := imf.commitID(prefix) if err != nil { return nil, fmt.Errorf("%s %v", errHeader, err) } if commitID.Version == 0 { // This is the first time we have been asked to load this tree - return imf.newTree(prefix), nil + return imf.newTree(prefix) } err = tree.Load(commitID.Version, imf.overwriting) if err != nil { @@ -291,11 +297,14 @@ func (imf *ImmutableForest) loadOrCreateTree(prefix []byte) (*RWTree, error) { } // Create a new in-memory IAVL tree -func (imf *ImmutableForest) newTree(prefix []byte) *RWTree { +func (imf *ImmutableForest) newTree(prefix []byte) (*RWTree, error) { p := string(prefix) - tree := NewRWTree(NewPrefixDB(imf.treeDB, p), imf.cacheSize) + tree, err := NewRWTree(NewPrefixDB(imf.treeDB, p), imf.cacheSize) + if err != nil { + return nil, err + } imf.treeCache.Add(p, tree) - return tree + return tree, nil } // CommitID serialisation diff --git a/storage/forest_test.go b/storage/forest_test.go index b78adf73c..827153c9a 100644 --- a/storage/forest_test.go +++ b/storage/forest_test.go @@ -31,7 +31,9 @@ func TestMutableForest_Genesis(t *testing.T) { assert.Contains(t, dump, "\"bar\" -> \"nog\"") reader, err := rwf.Reader(prefix) require.NoError(t, err) - require.Equal(t, val1, reader.Get(key1)) + val2, err := reader.Get(key1) + require.NoError(t, err) + require.Equal(t, val1, val2) } diff --git a/storage/key_format.go b/storage/key_format.go index f716cd01c..888dcdc8a 100644 --- a/storage/key_format.go +++ b/storage/key_format.go @@ -211,7 +211,7 @@ func (kf *KeyFormat) Fix(args ...interface{}) (*KeyFormat, error) { // Returns an iterator over the underlying iterable using this KeyFormat's prefix. This is to support proper iteration over the // prefix in the presence of nil start or end which requests iteration to the inclusive edges of the domain. An optional // argument for reverse can be passed to get reverse iteration. -func (kf *KeyFormat) Iterator(iterable KVIterable, start, end []byte, reverse ...bool) KVIterator { +func (kf *KeyFormat) Iterator(iterable KVIterable, start, end []byte, reverse ...bool) (KVIterator, error) { if len(reverse) > 0 && reverse[0] { return kf.prefix.Iterator(iterable.ReverseIterator, start, end) } diff --git a/storage/kvstore.go b/storage/kvstore.go index de2291a41..8ee036a96 100644 --- a/storage/kvstore.go +++ b/storage/kvstore.go @@ -16,13 +16,13 @@ type KVIterable interface { // Iterator must be closed by caller. // To iterate over entire domain, use store.Iterator(nil, nil) // CONTRACT: No writes may happen within a domain while an iterator exists over it. - Iterator(low, high []byte) KVIterator + Iterator(low, high []byte) (KVIterator, error) // Iterator over a domain of keys in descending order. high is exclusive. // must be less than high, or the Iterator is invalid. // Iterator must be closed by caller. // CONTRACT: No writes may happen within a domain while an iterator exists over it. - ReverseIterator(low, high []byte) KVIterator + ReverseIterator(low, high []byte) (KVIterator, error) } // Provides the native iteration for IAVLTree @@ -34,16 +34,16 @@ type KVCallbackIterable interface { type KVReader interface { // Get returns nil iff key doesn't exist. Panics on nil key. - Get(key []byte) []byte + Get(key []byte) ([]byte, error) // Has checks if a key exists. Panics on nil key. - Has(key []byte) bool + Has(key []byte) (bool, error) } type KVWriter interface { // Set sets the key. Panics on nil key. - Set(key, value []byte) + Set(key, value []byte) error // Delete deletes the key. Panics on nil key. - Delete(key []byte) + Delete(key []byte) error } type KVIterableReader interface { diff --git a/storage/prefix.go b/storage/prefix.go index 343708c48..8832077a5 100644 --- a/storage/prefix.go +++ b/storage/prefix.go @@ -89,7 +89,7 @@ func (pi *prefixCallbackIterable) Iterate(start, end []byte, ascending bool, fn }) } -func (p Prefix) Iterator(iteratorFn func(start, end []byte) dbm.Iterator, start, end []byte) KVIterator { +func (p Prefix) Iterator(iteratorFn func(start, end []byte) (dbm.Iterator, error), start, end []byte) (KVIterator, error) { var pstart, pend []byte = p.Key(start), nil if end == nil { @@ -97,12 +97,18 @@ func (p Prefix) Iterator(iteratorFn func(start, end []byte) dbm.Iterator, start, } else { pend = p.Key(end) } + + source, err := iteratorFn(pstart, pend) + if err != nil { + return nil, err + } + return &prefixIterator{ start: start, end: end, prefix: p, - source: iteratorFn(pstart, pend), - } + source: source, + }, nil } func (p Prefix) Iterable(source KVIterable) KVIterable { @@ -117,11 +123,11 @@ type prefixIterable struct { source KVIterable } -func (pi *prefixIterable) Iterator(low, high []byte) KVIterator { +func (pi *prefixIterable) Iterator(low, high []byte) (KVIterator, error) { return pi.prefix.Iterator(pi.source.Iterator, low, high) } -func (pi *prefixIterable) ReverseIterator(low, high []byte) KVIterator { +func (pi *prefixIterable) ReverseIterator(low, high []byte) (KVIterator, error) { return pi.prefix.Iterator(pi.source.ReverseIterator, low, high) } @@ -187,6 +193,10 @@ func (pi *prefixIterator) Close() { pi.source.Close() } +func (pi *prefixIterator) Error() error { + return nil +} + func (pi *prefixIterator) validate() { if pi.invalid { return @@ -203,26 +213,26 @@ type prefixKVStore struct { source KVStore } -func (ps *prefixKVStore) Get(key []byte) []byte { +func (ps *prefixKVStore) Get(key []byte) ([]byte, error) { return ps.source.Get(ps.prefix.Key(key)) } -func (ps *prefixKVStore) Has(key []byte) bool { +func (ps *prefixKVStore) Has(key []byte) (bool, error) { return ps.source.Has(ps.prefix.Key(key)) } -func (ps *prefixKVStore) Set(key, value []byte) { - ps.source.Set(ps.prefix.Key(key), value) +func (ps *prefixKVStore) Set(key, value []byte) error { + return ps.source.Set(ps.prefix.Key(key), value) } -func (ps *prefixKVStore) Delete(key []byte) { - ps.source.Delete(ps.prefix.Key(key)) +func (ps *prefixKVStore) Delete(key []byte) error { + return ps.source.Delete(ps.prefix.Key(key)) } -func (ps *prefixKVStore) Iterator(low, high []byte) KVIterator { +func (ps *prefixKVStore) Iterator(low, high []byte) (KVIterator, error) { return ps.prefix.Iterator(ps.source.Iterator, low, high) } -func (ps *prefixKVStore) ReverseIterator(low, high []byte) KVIterator { +func (ps *prefixKVStore) ReverseIterator(low, high []byte) (KVIterator, error) { return ps.prefix.Iterator(ps.source.ReverseIterator, low, high) } diff --git a/storage/prefix_db.go b/storage/prefix_db.go index 1aa3db479..d11a9e587 100644 --- a/storage/prefix_db.go +++ b/storage/prefix_db.go @@ -19,44 +19,44 @@ func NewPrefixDB(db dbm.DB, prefix string) *PrefixDB { } // DB implementation -func (pdb *PrefixDB) Get(key []byte) []byte { +func (pdb *PrefixDB) Get(key []byte) ([]byte, error) { return pdb.db.Get(pdb.prefix.Key(key)) } -func (pdb *PrefixDB) Has(key []byte) bool { +func (pdb *PrefixDB) Has(key []byte) (bool, error) { return pdb.db.Has(pdb.prefix.Key(key)) } -func (pdb *PrefixDB) Set(key, value []byte) { - pdb.db.Set(pdb.prefix.Key(key), value) +func (pdb *PrefixDB) Set(key, value []byte) error { + return pdb.db.Set(pdb.prefix.Key(key), value) } -func (pdb *PrefixDB) SetSync(key, value []byte) { - pdb.db.SetSync(pdb.prefix.Key(key), value) +func (pdb *PrefixDB) SetSync(key, value []byte) error { + return pdb.db.SetSync(pdb.prefix.Key(key), value) } -func (pdb *PrefixDB) Delete(key []byte) { - pdb.db.Delete(pdb.prefix.Key(key)) +func (pdb *PrefixDB) Delete(key []byte) error { + return pdb.db.Delete(pdb.prefix.Key(key)) } -func (pdb *PrefixDB) DeleteSync(key []byte) { - pdb.db.DeleteSync(pdb.prefix.Key(key)) +func (pdb *PrefixDB) DeleteSync(key []byte) error { + return pdb.db.DeleteSync(pdb.prefix.Key(key)) } -func (pdb *PrefixDB) Iterator(low, high []byte) KVIterator { +func (pdb *PrefixDB) Iterator(low, high []byte) (KVIterator, error) { return pdb.prefix.Iterator(pdb.db.Iterator, low, high) } -func (pdb *PrefixDB) ReverseIterator(low, high []byte) KVIterator { +func (pdb *PrefixDB) ReverseIterator(low, high []byte) (KVIterator, error) { return pdb.prefix.Iterator(pdb.db.ReverseIterator, low, high) } -func (pdb *PrefixDB) Close() { - pdb.db.Close() +func (pdb *PrefixDB) Close() error { + return pdb.db.Close() } -func (pdb *PrefixDB) Print() { - pdb.db.Print() +func (pdb *PrefixDB) Print() error { + return pdb.db.Print() } func (pdb *PrefixDB) Stats() map[string]string { @@ -90,12 +90,12 @@ func (pb *prefixBatch) Delete(key []byte) { pb.batch.Delete(pb.prefix.Key(key)) } -func (pb *prefixBatch) Write() { - pb.batch.Write() +func (pb *prefixBatch) Write() error { + return pb.batch.Write() } -func (pb *prefixBatch) WriteSync() { - pb.batch.WriteSync() +func (pb *prefixBatch) WriteSync() error { + return pb.batch.WriteSync() } func (pb *prefixBatch) Close() { diff --git a/storage/prefix_db_test.go b/storage/prefix_db_test.go index faafe4273..e45a91ebd 100644 --- a/storage/prefix_db_test.go +++ b/storage/prefix_db_test.go @@ -35,7 +35,8 @@ func TestPrefixDBSimple(t *testing.T) { } get := func(key []byte, value []byte) interface{} { - act := db.Get(key) + act, err := db.Get(key) + require.NoError(t, err) return act } @@ -48,7 +49,8 @@ func TestPrefixDBIterator1(t *testing.T) { db := mockDBWithStuff() pdb := NewPrefixDB(db, "key") - itr := pdb.Iterator(nil, nil) + itr, err := pdb.Iterator(nil, nil) + require.NoError(t, err) checkDomain(t, itr, nil, nil) checkItem(t, itr, []byte(""), []byte("value")) checkNext(t, itr, true) @@ -66,7 +68,8 @@ func TestPrefixDBIterator2(t *testing.T) { db := mockDBWithStuff() pdb := NewPrefixDB(db, "key") - itr := pdb.Iterator(nil, []byte("")) + itr, err := pdb.Iterator(nil, []byte("")) + require.NoError(t, err) checkDomain(t, itr, nil, []byte("")) checkInvalid(t, itr) itr.Close() @@ -76,7 +79,8 @@ func TestPrefixDBIterator3(t *testing.T) { db := mockDBWithStuff() pdb := NewPrefixDB(db, "key") - itr := pdb.Iterator([]byte(""), nil) + itr, err := pdb.Iterator([]byte(""), nil) + require.NoError(t, err) checkDomain(t, itr, []byte(""), nil) checkItem(t, itr, []byte(""), []byte("value")) checkNext(t, itr, true) @@ -94,7 +98,8 @@ func TestPrefixDBIterator4(t *testing.T) { db := mockDBWithStuff() pdb := NewPrefixDB(db, "key") - itr := pdb.Iterator([]byte(""), []byte("")) + itr, err := pdb.Iterator([]byte(""), []byte("")) + require.NoError(t, err) checkDomain(t, itr, []byte(""), []byte("")) checkInvalid(t, itr) itr.Close() @@ -104,7 +109,8 @@ func TestPrefixDBReverseIterator1(t *testing.T) { db := mockDBWithStuff() pdb := NewPrefixDB(db, "key") - itr := pdb.ReverseIterator(nil, nil) + itr, err := pdb.ReverseIterator(nil, nil) + require.NoError(t, err) checkDomain(t, itr, nil, nil) checkItem(t, itr, []byte("3"), []byte("value3")) checkNext(t, itr, true) @@ -122,7 +128,8 @@ func TestPrefixDBReverseIterator2(t *testing.T) { db := mockDBWithStuff() pdb := NewPrefixDB(db, "key") - itr := pdb.ReverseIterator([]byte(""), nil) + itr, err := pdb.ReverseIterator([]byte(""), nil) + require.NoError(t, err) checkDomain(t, itr, []byte(""), nil) checkItem(t, itr, []byte("3"), []byte("value3")) checkNext(t, itr, true) @@ -140,7 +147,8 @@ func TestPrefixDBReverseIterator3(t *testing.T) { db := mockDBWithStuff() pdb := NewPrefixDB(db, "key") - itr := pdb.ReverseIterator(nil, []byte("")) + itr, err := pdb.ReverseIterator(nil, []byte("")) + require.NoError(t, err) checkDomain(t, itr, nil, []byte("")) checkInvalid(t, itr) itr.Close() @@ -150,7 +158,8 @@ func TestPrefixDBReverseIterator4(t *testing.T) { db := mockDBWithStuff() pdb := NewPrefixDB(db, "key") - itr := pdb.ReverseIterator([]byte(""), []byte("")) + itr, err := pdb.ReverseIterator([]byte(""), []byte("")) + require.NoError(t, err) checkDomain(t, itr, []byte(""), []byte("")) checkInvalid(t, itr) itr.Close() @@ -160,7 +169,8 @@ func TestPrefixDBReverseIterator5(t *testing.T) { db := mockDBWithStuff() pdb := NewPrefixDB(db, "key") - itr := pdb.ReverseIterator([]byte("1"), nil) + itr, err := pdb.ReverseIterator([]byte("1"), nil) + require.NoError(t, err) checkDomain(t, itr, []byte("1"), nil) checkItem(t, itr, []byte("3"), []byte("value3")) checkNext(t, itr, true) @@ -176,7 +186,8 @@ func TestPrefixDBReverseIterator6(t *testing.T) { db := mockDBWithStuff() pdb := NewPrefixDB(db, "key") - itr := pdb.ReverseIterator([]byte("2"), nil) + itr, err := pdb.ReverseIterator([]byte("2"), nil) + require.NoError(t, err) checkDomain(t, itr, []byte("2"), nil) checkItem(t, itr, []byte("3"), []byte("value3")) checkNext(t, itr, true) @@ -190,7 +201,8 @@ func TestPrefixDBReverseIterator7(t *testing.T) { db := mockDBWithStuff() pdb := NewPrefixDB(db, "key") - itr := pdb.ReverseIterator(nil, []byte("2")) + itr, err := pdb.ReverseIterator(nil, []byte("2")) + require.NoError(t, err) checkDomain(t, itr, nil, []byte("2")) checkItem(t, itr, []byte("1"), []byte("value1")) checkNext(t, itr, true) @@ -216,7 +228,8 @@ func TestBadSuffix(t *testing.T) { } func checkValue(t *testing.T, db dbm.DB, key []byte, valueWanted []byte) { - valueGot := db.Get(key) + valueGot, err := db.Get(key) + require.NoError(t, err) assert.Equal(t, valueWanted, valueGot) } diff --git a/storage/prefix_test.go b/storage/prefix_test.go index 4616fa0c6..7953ef70a 100644 --- a/storage/prefix_test.go +++ b/storage/prefix_test.go @@ -58,7 +58,10 @@ func requireKeysSorted(t *testing.T, keys [][]byte, reverse ...bool) { require.Equal(t, sortedKeys, keys) } -func dumpKeys(it dbm.Iterator) [][]byte { +func dumpKeys(it dbm.Iterator, err error) [][]byte { + if err != nil { + panic(err) + } var keys [][]byte for it.Valid() { keys = append(keys, it.Key()) diff --git a/storage/rwtree.go b/storage/rwtree.go index a8511975d..68a71f8b6 100644 --- a/storage/rwtree.go +++ b/storage/rwtree.go @@ -23,12 +23,12 @@ type RWTree struct { // Creates a concurrency safe version of an IAVL tree whereby reads are routed to the last saved tree. // Writes must be serialised (as they are within a commit for example). -func NewRWTree(db dbm.DB, cacheSize int) *RWTree { - tree := NewMutableTree(db, cacheSize) +func NewRWTree(db dbm.DB, cacheSize int) (*RWTree, error) { + tree, err := NewMutableTree(db, cacheSize) return &RWTree{ tree: tree, ImmutableTree: &ImmutableTree{iavl.NewImmutableTree(db, cacheSize)}, - } + }, err } // Tries to load the execution state from DB, returns nil with no error if no state found diff --git a/storage/rwtree_test.go b/storage/rwtree_test.go index 7f38ab556..44cbcd7f4 100644 --- a/storage/rwtree_test.go +++ b/storage/rwtree_test.go @@ -12,31 +12,40 @@ import ( func TestSave(t *testing.T) { db := dbm.NewMemDB() - rwt := NewRWTree(db, 100) - foo := []byte("foo") - gaa := []byte("gaa") - dam := []byte("dam") - rwt.Set(foo, gaa) - _, _, err := rwt.Save() + rwt, err := NewRWTree(db, 100) require.NoError(t, err) - assert.Equal(t, gaa, rwt.Get(foo)) - rwt.Set(foo, dam) - _, _, err = rwt.Save() - require.NoError(t, err) - assert.Equal(t, dam, rwt.Get(foo)) + + var tests = []struct { + key []byte + value []byte + }{ + {[]byte("foo"), []byte("foo")}, + {[]byte("gaa"), []byte("gaa")}, + {[]byte("dam"), []byte("dam")}, + } + for _, tt := range tests { + rwt.Set(tt.key, tt.value) + _, _, err = rwt.Save() + require.NoError(t, err) + val, err := rwt.Get(tt.key) + require.NoError(t, err) + assert.Equal(t, tt.value, val) + } } func TestEmptyTree(t *testing.T) { db := dbm.NewMemDB() - rwt := NewRWTree(db, 100) + rwt, err := NewRWTree(db, 100) + require.NoError(t, err) fmt.Printf("%X\n", rwt.Hash()) } func TestRollback(t *testing.T) { db := dbm.NewMemDB() - rwt := NewRWTree(db, 100) + rwt, err := NewRWTree(db, 100) + require.NoError(t, err) rwt.Set([]byte("Raffle"), []byte("Topper")) - _, _, err := rwt.Save() + _, _, err = rwt.Save() require.NoError(t, err) foo := []byte("foo") @@ -58,7 +67,8 @@ func TestRollback(t *testing.T) { require.NoError(t, err) // Make a new tree - rwt = NewRWTree(db, 100) + rwt, err = NewRWTree(db, 100) + require.NoError(t, err) err = rwt.Load(version1, true) require.NoError(t, err) // If you load version1 the working hash is that which you saved after version0, i.e. hash0 @@ -82,12 +92,14 @@ func TestRollback(t *testing.T) { func TestVersionDivergence(t *testing.T) { // This test serves as a reminder that IAVL nodes contain the version and a new node is created for every write - rwt1 := NewRWTree(dbm.NewMemDB(), 100) + rwt1, err := NewRWTree(dbm.NewMemDB(), 100) + require.NoError(t, err) rwt1.Set([]byte("Raffle"), []byte("Topper")) hash11, _, err := rwt1.Save() require.NoError(t, err) - rwt2 := NewRWTree(dbm.NewMemDB(), 100) + rwt2, err := NewRWTree(dbm.NewMemDB(), 100) + require.NoError(t, err) rwt2.Set([]byte("Raffle"), []byte("Topper")) hash21, _, err := rwt2.Save() require.NoError(t, err) @@ -103,13 +115,14 @@ func TestVersionDivergence(t *testing.T) { } func TestMutableTree_Iterate(t *testing.T) { - mut := NewMutableTree(dbm.NewMemDB(), 100) + mut, err := NewMutableTree(dbm.NewMemDB(), 100) + require.NoError(t, err) mut.Set([]byte("aa"), []byte("1")) mut.Set([]byte("aab"), []byte("2")) mut.Set([]byte("aac"), []byte("3")) mut.Set([]byte("aad"), []byte("4")) mut.Set([]byte("ab"), []byte("5")) - _, _, err := mut.SaveVersion() + _, _, err = mut.SaveVersion() require.NoError(t, err) mut.IterateRange([]byte("aab"), []byte("aad"), true, func(key []byte, value []byte) bool { fmt.Printf("%q -> %q\n", key, value) diff --git a/storage/tree.go b/storage/tree.go index 22c91b8cc..bfbead75d 100644 --- a/storage/tree.go +++ b/storage/tree.go @@ -16,11 +16,11 @@ type ImmutableTree struct { *iavl.ImmutableTree } -func NewMutableTree(db dbm.DB, cacheSize int) *MutableTree { - tree := iavl.NewMutableTree(db, cacheSize) +func NewMutableTree(db dbm.DB, cacheSize int) (*MutableTree, error) { + tree, err := iavl.NewMutableTree(db, cacheSize) return &MutableTree{ MutableTree: tree, - } + }, err } func (mut *MutableTree) Load(version int64, overwriting bool) error { @@ -57,9 +57,14 @@ func (mut *MutableTree) IterateWriteTree(start, end []byte, ascending bool, fn f return err } -func (mut *MutableTree) Get(key []byte) []byte { +func (mut *MutableTree) Has(key []byte) (bool, error) { + ok := mut.MutableTree.Has(key) + return ok, nil +} + +func (mut *MutableTree) Get(key []byte) ([]byte, error) { _, bs := mut.MutableTree.Get(key) - return bs + return bs, nil } func (mut *MutableTree) GetImmutable(version int64) (*ImmutableTree, error) { @@ -70,9 +75,14 @@ func (mut *MutableTree) GetImmutable(version int64) (*ImmutableTree, error) { return &ImmutableTree{tree}, nil } -func (imt *ImmutableTree) Get(key []byte) []byte { +func (imt *ImmutableTree) Has(key []byte) (bool, error) { + ok := imt.ImmutableTree.Has(key) + return ok, nil +} + +func (imt *ImmutableTree) Get(key []byte) ([]byte, error) { _, value := imt.ImmutableTree.Get(key) - return value + return value, nil } func (imt *ImmutableTree) Iterate(start, end []byte, ascending bool, fn func(key []byte, value []byte) error) error { From 8b9f5d9bb47f02165ae7a5937a63a89f22608d62 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 21 Feb 2020 10:35:03 +0000 Subject: [PATCH 061/185] burrow dump remote shouldn't maintain state Signed-off-by: Gregory Hill --- dump/dump.go | 76 +++++++++++++++------------------------------------- 1 file changed, 22 insertions(+), 54 deletions(-) diff --git a/dump/dump.go b/dump/dump.go index 8143e28a3..b80082884 100644 --- a/dump/dump.go +++ b/dump/dump.go @@ -14,7 +14,6 @@ import ( "github.com/hyperledger/burrow/execution/names" "github.com/hyperledger/burrow/execution/state" "github.com/hyperledger/burrow/logging" - dbm "github.com/tendermint/tm-db" ) const ( @@ -225,67 +224,36 @@ func (ds *Dumper) WithLogger(logger *logging.Logger) *Dumper { // Write a dump to the Writer out by pulling rows from stream func Write(out io.Writer, source Source, useBinaryEncoding bool, options Option) error { - st := state.NewState(dbm.NewMemDB()) - _, _, err := st.Update(func(ws state.Updatable) error { - for { - resp, err := source.Recv() + for { + resp, err := source.Recv() + if err != nil { if err == io.EOF { - break - } - if err != nil { - return fmt.Errorf("failed to recv dump: %v", err) - } - - if options.Enabled(Accounts) { - // update our temporary state - if resp.Account != nil { - err := ws.UpdateAccount(resp.Account) - if err != nil { - return err - } - } - if resp.AccountStorage != nil { - for _, storage := range resp.AccountStorage.Storage { - err := ws.SetStorage(resp.AccountStorage.Address, storage.Key, storage.Value) - if err != nil { - return err - } - } - } - } - - if options.Enabled(Names) { - if resp.Name != nil { - err := ws.UpdateName(resp.Name) - if err != nil { - return err - } - } - } - - if useBinaryEncoding { - _, err := encoding.WriteMessage(out, resp) - if err != nil { - return fmt.Errorf("failed write to binary dump message: %v", err) - } return nil } - bs, err := json.Marshal(resp) + return fmt.Errorf("failed to recv dump: %v", err) + } + + if useBinaryEncoding { + _, err := encoding.WriteMessage(out, resp) if err != nil { - return fmt.Errorf("failed to marshall dump: %v", err) + return fmt.Errorf("failed write to binary dump message: %v", err) } + return nil + } - if len(bs) > 0 { - bs = append(bs, []byte("\n")...) - n, err := out.Write(bs) - if err == nil && n < len(bs) { - return fmt.Errorf("failed to write dump: %v", err) - } + bs, err := json.Marshal(resp) + if err != nil { + return fmt.Errorf("failed to marshal dump: %v", err) + } + + if len(bs) > 0 { + bs = append(bs, []byte("\n")...) + n, err := out.Write(bs) + if err == nil && n < len(bs) { + return fmt.Errorf("failed to write dump: %v", err) } } + } - return nil - }) - return err } From 20dff79133fc30c4b9d9382f14b6ffba48c9e3e0 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Sat, 22 Feb 2020 21:07:12 +0000 Subject: [PATCH 062/185] Update README.md Signed-off-by: Silas Davis --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 04ff3e502..26ff14f1b 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It ## What is Burrow +See [Burrow - the Boring Blockchain](https://wiki.hyperledger.org/display/burrow/Burrow+-+The+Boring+Blockchain) for an introduction to Burrow and its motivating vision. + Hyperledger Burrow is a permissioned blockchain node that executes smart contract code following the Ethereum specification. Burrow is built for a multi-chain universe with application specific optimization in mind. Burrow as a node is constructed out of three main components: the consensus engine, the permissioned Ethereum virtual machine and the rpc gateway. More specifically Burrow consists of the following: - **Consensus Engine:** Transactions are ordered and finalised with the Byzantine fault-tolerant Tendermint protocol. The Tendermint protocol provides high transaction throughput over a set of known validators and prevents the blockchain from forking. From e08f2617fbfa314ef6b211e2aac4a19d1d01566d Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 28 Feb 2020 12:15:18 +0000 Subject: [PATCH 063/185] typescriptify burrow Signed-off-by: Gregory Hill --- .github/workflows/master.yaml | 4 +- .github/workflows/release.yaml | 15 +- .github/workflows/test.yaml | 16 +- Makefile | 28 +- acm/acm.pb.go | 312 +- acm/balance/balance.pb.go | 104 +- acm/validator/validator.pb.go | 12 +- bcm/bcm.pb.go | 244 +- consensus/tendermint/tendermint.pb.go | 12 +- crypto/crypto.pb.go | 195 +- dump/dump.pb.go | 341 +- encoding/encoding.pb.go | 104 +- execution/errors/errors.pb.go | 107 +- execution/exec/exec.pb.go | 1393 +-- execution/names/names.pb.go | 134 +- execution/registry/registry.pb.go | 146 +- genesis/spec/spec.pb.go | 217 +- js/README.md | 10 +- js/index.js | 17 - js/lib/Burrow.js | 59 - js/lib/contractManager.js | 112 - js/lib/contracts/contract.js | 95 - js/lib/contracts/event.js | 79 - js/lib/contracts/function.js | 192 - js/lib/events.js | 37 - js/lib/namereg.js | 21 - js/lib/pipe.js | 63 - js/lib/service.js | 103 - js/lib/test.js | 76 - js/lib/utils/config.js | 10 - js/lib/utils/convert.js | 84 - js/lib/utils/sha3.js | 23 - js/lib/utils/utils.js | 66 - js/package-lock.json | 2622 +++++ package.json => js/package.json | 46 +- js/proto/acm_grpc_pb.d.ts | 1 + js/proto/acm_grpc_pb.js | 1 + js/proto/acm_pb.d.ts | 116 + js/proto/acm_pb.js | 875 ++ js/proto/balance_grpc_pb.d.ts | 1 + js/proto/balance_grpc_pb.js | 1 + js/proto/balance_pb.d.ts | 30 + js/proto/balance_pb.js | 190 + js/proto/bcm_grpc_pb.d.ts | 1 + js/proto/bcm_grpc_pb.js | 1 + js/proto/bcm_pb.d.ts | 96 + js/proto/bcm_pb.js | 706 ++ js/proto/crypto_grpc_pb.d.ts | 1 + js/proto/crypto_grpc_pb.js | 1 + js/proto/crypto_pb.d.ts | 90 + js/proto/crypto_pb.js | 661 ++ js/proto/dump_grpc_pb.d.ts | 1 + js/proto/dump_grpc_pb.js | 1 + js/proto/dump_pb.d.ts | 146 + js/proto/dump_pb.js | 1076 ++ js/proto/encoding_grpc_pb.d.ts | 1 + js/proto/encoding_grpc_pb.js | 1 + js/proto/encoding_pb.d.ts | 30 + js/proto/encoding_pb.js | 190 + js/proto/errors_grpc_pb.d.ts | 1 + js/proto/errors_grpc_pb.js | 1 + js/proto/errors_pb.d.ts | 30 + js/proto/errors_pb.js | 190 + js/proto/exec_grpc_pb.d.ts | 1 + js/proto/exec_grpc_pb.js | 1 + js/proto/exec_pb.d.ts | 701 ++ js/proto/exec_pb.js | 5315 +++++++++ .../gogo/protobuf/gogoproto/gogo_grpc_pb.d.ts | 1 + .../gogo/protobuf/gogoproto/gogo_grpc_pb.js | 1 + .../gogo/protobuf/gogoproto/gogo_pb.d.ts | 158 + .../gogo/protobuf/gogoproto/gogo_pb.js | 1992 ++++ .../tendermint/abci/types/types_grpc_pb.d.ts | 60 + .../tendermint/abci/types/types_grpc_pb.js | 380 + .../tendermint/abci/types/types_pb.d.ts | 1287 +++ .../tendermint/abci/types/types_pb.js | 9613 +++++++++++++++++ .../tendermint/libs/common/types_grpc_pb.d.ts | 1 + .../tendermint/libs/common/types_grpc_pb.js | 1 + .../tendermint/libs/common/types_pb.d.ts | 60 + .../tendermint/libs/common/types_pb.js | 436 + .../google/protobuf/descriptor_grpc_pb.d.ts | 1 + .../google/protobuf/descriptor_grpc_pb.js | 1 + js/proto/google/protobuf/descriptor_pb.d.ts | 1246 +++ js/proto/google/protobuf/descriptor_pb.js | 9499 ++++++++++++++++ .../google/protobuf/timestamp_grpc_pb.d.ts | 1 + js/proto/google/protobuf/timestamp_grpc_pb.js | 1 + js/proto/google/protobuf/timestamp_pb.d.ts | 29 + js/proto/google/protobuf/timestamp_pb.js | 224 + js/proto/keys_grpc_pb.d.ts | 60 + js/proto/keys_grpc_pb.js | 365 + js/proto/keys_pb.d.ts | 545 + js/proto/keys_pb.js | 4050 +++++++ js/proto/names_grpc_pb.d.ts | 1 + js/proto/names_grpc_pb.js | 1 + js/proto/names_pb.d.ts | 40 + js/proto/names_pb.js | 268 + js/proto/payload_grpc_pb.d.ts | 1 + js/proto/payload_grpc_pb.js | 1 + js/proto/payload_pb.d.ts | 589 + js/proto/payload_pb.js | 4453 ++++++++ js/proto/permission_grpc_pb.d.ts | 1 + js/proto/permission_grpc_pb.js | 1 + js/proto/permission_pb.d.ts | 110 + js/proto/permission_pb.js | 808 ++ js/proto/registry_grpc_pb.d.ts | 1 + js/proto/registry_grpc_pb.js | 1 + js/proto/registry_pb.d.ts | 42 + js/proto/registry_pb.js | 292 + js/proto/rpc_grpc_pb.d.ts | 1 + js/proto/rpc_grpc_pb.js | 1 + js/proto/rpc_pb.d.ts | 65 + js/proto/rpc_pb.js | 444 + js/proto/rpcdump_grpc_pb.d.ts | 20 + js/proto/rpcdump_grpc_pb.js | 46 + js/proto/rpcdump_pb.d.ts | 27 + js/proto/rpcdump_pb.js | 165 + js/proto/rpcevents_grpc_pb.d.ts | 27 + js/proto/rpcevents_grpc_pb.js | 107 + js/proto/rpcevents_pb.d.ts | 225 + js/proto/rpcevents_pb.js | 1595 +++ js/proto/rpcquery_grpc_pb.d.ts | 74 + js/proto/rpcquery_grpc_pb.js | 460 + js/proto/rpcquery_pb.d.ts | 497 + js/proto/rpcquery_pb.js | 3720 +++++++ js/proto/rpctransact_grpc_pb.d.ts | 67 + js/proto/rpctransact_grpc_pb.js | 262 + js/proto/rpctransact_pb.d.ts | 100 + js/proto/rpctransact_pb.js | 725 ++ js/proto/spec_grpc_pb.d.ts | 1 + js/proto/spec_grpc_pb.js | 1 + js/proto/spec_pb.d.ts | 64 + js/proto/spec_pb.js | 460 + js/proto/storage_grpc_pb.d.ts | 1 + js/proto/storage_grpc_pb.js | 1 + js/proto/storage_pb.d.ts | 32 + js/proto/storage_pb.js | 214 + js/proto/tendermint_grpc_pb.d.ts | 1 + js/proto/tendermint_grpc_pb.js | 1 + js/proto/tendermint_pb.d.ts | 58 + js/proto/tendermint_pb.js | 400 + js/proto/txs_grpc_pb.d.ts | 1 + js/proto/txs_grpc_pb.js | 1 + js/proto/txs_pb.d.ts | 116 + js/proto/txs_pb.js | 824 ++ js/proto/validator_grpc_pb.d.ts | 1 + js/proto/validator_grpc_pb.js | 1 + js/proto/validator_pb.d.ts | 39 + js/proto/validator_pb.js | 263 + js/src/index.ts | 9 + js/src/lib/Burrow.ts | 52 + js/src/lib/contracts/contract.ts | 89 + js/src/lib/contracts/event.ts | 61 + js/src/lib/contracts/function.ts | 191 + js/src/lib/contracts/manager.ts | 45 + js/src/lib/events.ts | 49 + js/src/lib/namereg.ts | 37 + js/src/lib/pipe.ts | 31 + js/src/lib/utils/convert.ts | 68 + js/src/lib/utils/sha3.ts | 6 + js/src/lib/utils/utils.ts | 24 + js/src/test.ts | 31 + js/src/test/17.test.ts | 50 + .../#175/index.js => src/test/175.test.ts} | 18 +- js/{test/#21/index.js => src/test/21.test.ts} | 20 +- js/src/test/38.test.ts | 42 + js/{test/#17/index.js => src/test/42.test.ts} | 30 +- js/src/test/44.test.ts | 34 + js/{test/#45/index.js => src/test/45.test.ts} | 26 +- js/{test/#46/index.js => src/test/46.test.ts} | 20 +- js/{test/#47/index.js => src/test/47.test.ts} | 18 +- js/{test/#48/index.js => src/test/48.test.ts} | 18 +- js/{test/#50/index.js => src/test/50.test.ts} | 14 +- js/{test/#61/index.js => src/test/61.test.ts} | 18 +- js/{test/#81/index.js => src/test/81.test.ts} | 31 +- js/{ => src}/test/README.md | 0 .../index.js => src/test/abi/abis.test.ts} | 8 +- {tests/js => js/src/test/abi}/deploy.yaml | 0 {tests/js => js/src/test/abi}/random.sol | 2 +- .../event/index.js => src/test/event.test.ts} | 26 +- .../index.js => src/test/functional.test.ts} | 23 +- .../test/get_set_smoke_test/GetSet.sol | 0 .../test/get_set_smoke_test/index.ts} | 1 + .../HTTP/index.js => src/test/http.test.ts} | 16 +- .../index.js => src/test/infloop.test.ts} | 25 +- js/src/test/namereg.test.ts | 25 + .../index.js => src/test/revert.test.ts} | 21 +- .../index.js => src/test/revert2.test.ts} | 21 +- .../index.js => src/test/revert3.test.ts} | 19 +- js/test.sh | 13 + js/test/#38/index.js | 41 - js/test/#42/index.js | 54 - js/test/#44/index.js | 37 - js/test/Namereg/index.js | 27 - js/tsconfig.json | 18 + js/types/solc/index.d.ts | 83 + keys/keys.pb.go | 52 +- package-lock.json | 3757 ------- permission/permission.pb.go | 222 +- rpc/rpc.pb.go | 12 +- rpc/rpcdump/rpcdump.pb.go | 22 +- rpc/rpcevents/rpcevents.pb.go | 422 +- rpc/rpcquery/rpcquery.pb.go | 61 +- rpc/rpctransact/rpctransact.pb.go | 277 +- storage/storage.pb.go | 107 +- tests/js/js.sh | 48 - txs/payload/payload.pb.go | 1215 ++- txs/txs.pb.go | 276 +- 206 files changed, 65152 insertions(+), 8098 deletions(-) delete mode 100644 js/index.js delete mode 100644 js/lib/Burrow.js delete mode 100644 js/lib/contractManager.js delete mode 100644 js/lib/contracts/contract.js delete mode 100644 js/lib/contracts/event.js delete mode 100644 js/lib/contracts/function.js delete mode 100644 js/lib/events.js delete mode 100644 js/lib/namereg.js delete mode 100644 js/lib/pipe.js delete mode 100644 js/lib/service.js delete mode 100644 js/lib/test.js delete mode 100644 js/lib/utils/config.js delete mode 100644 js/lib/utils/convert.js delete mode 100644 js/lib/utils/sha3.js delete mode 100644 js/lib/utils/utils.js create mode 100644 js/package-lock.json rename package.json => js/package.json (54%) create mode 100644 js/proto/acm_grpc_pb.d.ts create mode 100644 js/proto/acm_grpc_pb.js create mode 100644 js/proto/acm_pb.d.ts create mode 100644 js/proto/acm_pb.js create mode 100644 js/proto/balance_grpc_pb.d.ts create mode 100644 js/proto/balance_grpc_pb.js create mode 100644 js/proto/balance_pb.d.ts create mode 100644 js/proto/balance_pb.js create mode 100644 js/proto/bcm_grpc_pb.d.ts create mode 100644 js/proto/bcm_grpc_pb.js create mode 100644 js/proto/bcm_pb.d.ts create mode 100644 js/proto/bcm_pb.js create mode 100644 js/proto/crypto_grpc_pb.d.ts create mode 100644 js/proto/crypto_grpc_pb.js create mode 100644 js/proto/crypto_pb.d.ts create mode 100644 js/proto/crypto_pb.js create mode 100644 js/proto/dump_grpc_pb.d.ts create mode 100644 js/proto/dump_grpc_pb.js create mode 100644 js/proto/dump_pb.d.ts create mode 100644 js/proto/dump_pb.js create mode 100644 js/proto/encoding_grpc_pb.d.ts create mode 100644 js/proto/encoding_grpc_pb.js create mode 100644 js/proto/encoding_pb.d.ts create mode 100644 js/proto/encoding_pb.js create mode 100644 js/proto/errors_grpc_pb.d.ts create mode 100644 js/proto/errors_grpc_pb.js create mode 100644 js/proto/errors_pb.d.ts create mode 100644 js/proto/errors_pb.js create mode 100644 js/proto/exec_grpc_pb.d.ts create mode 100644 js/proto/exec_grpc_pb.js create mode 100644 js/proto/exec_pb.d.ts create mode 100644 js/proto/exec_pb.js create mode 100644 js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.d.ts create mode 100644 js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.js create mode 100644 js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.d.ts create mode 100644 js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js create mode 100644 js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.d.ts create mode 100644 js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.js create mode 100644 js/proto/github.com/tendermint/tendermint/abci/types/types_pb.d.ts create mode 100644 js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js create mode 100644 js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.d.ts create mode 100644 js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.js create mode 100644 js/proto/github.com/tendermint/tendermint/libs/common/types_pb.d.ts create mode 100644 js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js create mode 100644 js/proto/google/protobuf/descriptor_grpc_pb.d.ts create mode 100644 js/proto/google/protobuf/descriptor_grpc_pb.js create mode 100644 js/proto/google/protobuf/descriptor_pb.d.ts create mode 100644 js/proto/google/protobuf/descriptor_pb.js create mode 100644 js/proto/google/protobuf/timestamp_grpc_pb.d.ts create mode 100644 js/proto/google/protobuf/timestamp_grpc_pb.js create mode 100644 js/proto/google/protobuf/timestamp_pb.d.ts create mode 100644 js/proto/google/protobuf/timestamp_pb.js create mode 100644 js/proto/keys_grpc_pb.d.ts create mode 100644 js/proto/keys_grpc_pb.js create mode 100644 js/proto/keys_pb.d.ts create mode 100644 js/proto/keys_pb.js create mode 100644 js/proto/names_grpc_pb.d.ts create mode 100644 js/proto/names_grpc_pb.js create mode 100644 js/proto/names_pb.d.ts create mode 100644 js/proto/names_pb.js create mode 100644 js/proto/payload_grpc_pb.d.ts create mode 100644 js/proto/payload_grpc_pb.js create mode 100644 js/proto/payload_pb.d.ts create mode 100644 js/proto/payload_pb.js create mode 100644 js/proto/permission_grpc_pb.d.ts create mode 100644 js/proto/permission_grpc_pb.js create mode 100644 js/proto/permission_pb.d.ts create mode 100644 js/proto/permission_pb.js create mode 100644 js/proto/registry_grpc_pb.d.ts create mode 100644 js/proto/registry_grpc_pb.js create mode 100644 js/proto/registry_pb.d.ts create mode 100644 js/proto/registry_pb.js create mode 100644 js/proto/rpc_grpc_pb.d.ts create mode 100644 js/proto/rpc_grpc_pb.js create mode 100644 js/proto/rpc_pb.d.ts create mode 100644 js/proto/rpc_pb.js create mode 100644 js/proto/rpcdump_grpc_pb.d.ts create mode 100644 js/proto/rpcdump_grpc_pb.js create mode 100644 js/proto/rpcdump_pb.d.ts create mode 100644 js/proto/rpcdump_pb.js create mode 100644 js/proto/rpcevents_grpc_pb.d.ts create mode 100644 js/proto/rpcevents_grpc_pb.js create mode 100644 js/proto/rpcevents_pb.d.ts create mode 100644 js/proto/rpcevents_pb.js create mode 100644 js/proto/rpcquery_grpc_pb.d.ts create mode 100644 js/proto/rpcquery_grpc_pb.js create mode 100644 js/proto/rpcquery_pb.d.ts create mode 100644 js/proto/rpcquery_pb.js create mode 100644 js/proto/rpctransact_grpc_pb.d.ts create mode 100644 js/proto/rpctransact_grpc_pb.js create mode 100644 js/proto/rpctransact_pb.d.ts create mode 100644 js/proto/rpctransact_pb.js create mode 100644 js/proto/spec_grpc_pb.d.ts create mode 100644 js/proto/spec_grpc_pb.js create mode 100644 js/proto/spec_pb.d.ts create mode 100644 js/proto/spec_pb.js create mode 100644 js/proto/storage_grpc_pb.d.ts create mode 100644 js/proto/storage_grpc_pb.js create mode 100644 js/proto/storage_pb.d.ts create mode 100644 js/proto/storage_pb.js create mode 100644 js/proto/tendermint_grpc_pb.d.ts create mode 100644 js/proto/tendermint_grpc_pb.js create mode 100644 js/proto/tendermint_pb.d.ts create mode 100644 js/proto/tendermint_pb.js create mode 100644 js/proto/txs_grpc_pb.d.ts create mode 100644 js/proto/txs_grpc_pb.js create mode 100644 js/proto/txs_pb.d.ts create mode 100644 js/proto/txs_pb.js create mode 100644 js/proto/validator_grpc_pb.d.ts create mode 100644 js/proto/validator_grpc_pb.js create mode 100644 js/proto/validator_pb.d.ts create mode 100644 js/proto/validator_pb.js create mode 100644 js/src/index.ts create mode 100644 js/src/lib/Burrow.ts create mode 100644 js/src/lib/contracts/contract.ts create mode 100644 js/src/lib/contracts/event.ts create mode 100644 js/src/lib/contracts/function.ts create mode 100644 js/src/lib/contracts/manager.ts create mode 100644 js/src/lib/events.ts create mode 100644 js/src/lib/namereg.ts create mode 100644 js/src/lib/pipe.ts create mode 100644 js/src/lib/utils/convert.ts create mode 100644 js/src/lib/utils/sha3.ts create mode 100644 js/src/lib/utils/utils.ts create mode 100644 js/src/test.ts create mode 100644 js/src/test/17.test.ts rename js/{test/#175/index.js => src/test/175.test.ts} (67%) rename js/{test/#21/index.js => src/test/21.test.ts} (73%) create mode 100644 js/src/test/38.test.ts rename js/{test/#17/index.js => src/test/42.test.ts} (63%) create mode 100644 js/src/test/44.test.ts rename js/{test/#45/index.js => src/test/45.test.ts} (72%) rename js/{test/#46/index.js => src/test/46.test.ts} (57%) rename js/{test/#47/index.js => src/test/47.test.ts} (55%) rename js/{test/#48/index.js => src/test/48.test.ts} (68%) rename js/{test/#50/index.js => src/test/50.test.ts} (70%) rename js/{test/#61/index.js => src/test/61.test.ts} (54%) rename js/{test/#81/index.js => src/test/81.test.ts} (73%) rename js/{ => src}/test/README.md (100%) rename js/{test/Abis/index.js => src/test/abi/abis.test.ts} (82%) rename {tests/js => js/src/test/abi}/deploy.yaml (100%) rename {tests/js => js/src/test/abi}/random.sol (98%) rename js/{test/event/index.js => src/test/event.test.ts} (66%) rename js/{test/Functional/index.js => src/test/functional.test.ts} (77%) rename js/{ => src}/test/get_set_smoke_test/GetSet.sol (100%) rename js/{test/get_set_smoke_test/index.js => src/test/get_set_smoke_test/index.ts} (99%) rename js/{test/HTTP/index.js => src/test/http.test.ts} (64%) rename js/{test/Inf-Loop/index.js => src/test/infloop.test.ts} (58%) create mode 100644 js/src/test/namereg.test.ts rename js/{test/REVERT/index.js => src/test/revert.test.ts} (69%) rename js/{test/REVERT2/index.js => src/test/revert2.test.ts} (70%) rename js/{test/REVERT3/index.js => src/test/revert3.test.ts} (65%) create mode 100755 js/test.sh delete mode 100644 js/test/#38/index.js delete mode 100644 js/test/#42/index.js delete mode 100644 js/test/#44/index.js delete mode 100644 js/test/Namereg/index.js create mode 100644 js/tsconfig.json create mode 100644 js/types/solc/index.d.ts delete mode 100644 package-lock.json delete mode 100755 tests/js/js.sh diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index 21be31a08..b07e34c7e 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -13,7 +13,7 @@ jobs: with: go-version: 1.13 id: go - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - run: make test env: GO_TEST_ARGS: "-coverprofile=coverage.txt -covermode=atomic" @@ -26,7 +26,7 @@ jobs: name: docker runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - run: make docker_build - name: publish env: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5e933948c..56ac3293a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,7 +18,6 @@ jobs: with: version: latest args: release --release-notes "NOTES.md" - key: ${{ secrets.YOUR_PRIVATE_KEY }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -26,17 +25,21 @@ jobs: name: npm runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: '12.x' + - run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10} - name: publish env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - git config --global user.email "doug@monax.io" - git config --global user.name "doug" - npm version from-git + git config --global user.email "${GITHUB_ACTOR}" + git config --global user.name "${GITHUB_ACTOR}" + cd js + npm install + npm run build + npm version $RELEASE_VERSION npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" npm publish --access public . @@ -44,7 +47,7 @@ jobs: name: docker runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - run: make docker_build - name: publish env: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8002154f8..a80dbd6ff 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,7 +13,7 @@ jobs: with: go-version: 1.13 id: go - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - run: make test - run: make build - uses: actions/upload-artifact@master @@ -34,13 +34,13 @@ jobs: vent: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - run: docker-compose run burrow make test_integration_vent docker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - run: make docker_build env: DOCKER_REPO: "hyperledger/burrow" @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest needs: unit steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/download-artifact@master with: name: burrow @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest needs: unit steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: '8.x' @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-latest needs: unit steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/download-artifact@master with: name: burrow @@ -97,7 +97,7 @@ jobs: runs-on: ubuntu-latest needs: unit steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/download-artifact@master with: name: burrow @@ -112,7 +112,7 @@ jobs: runs-on: ubuntu-latest needs: unit steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: '8.x' diff --git a/Makefile b/Makefile index 84524f355..1f86e75c3 100644 --- a/Makefile +++ b/Makefile @@ -69,24 +69,36 @@ megacheck: # Protobuffing -# Protobuf generated go files -PROTO_FILES = $(shell find . -path ./node_modules -prune -o -type f -name '*.proto' -print) +BURROW_TS_PATH = ./js +PROTO_GEN_TS_PATH = ${BURROW_TS_PATH}/proto +PROTOC_GEN_TS_PATH = ${BURROW_TS_PATH}/node_modules/.bin/protoc-gen-ts +PROTOC_GEN_GRPC_PATH= ${BURROW_TS_PATH}/node_modules/.bin/grpc_tools_node_protoc_plugin + +PROTO_FILES = $(shell find . -path $(BURROW_TS_PATH) -prune -o -path ./node_modules -prune -o -type f -name '*.proto' -print) PROTO_GO_FILES = $(patsubst %.proto, %.pb.go, $(PROTO_FILES)) -PROTO_GO_FILES_REAL = $(shell find . -path ./vendor -prune -o -type f -name '*.pb.go' -print) +PROTO_GO_FILES_REAL = $(shell find . -type f -name '*.pb.go' -print) +PROTO_TS_FILES = $(patsubst %.proto, %.pb.ts, $(PROTO_FILES)) .PHONY: protobuf -protobuf: $(PROTO_GO_FILES) fix +protobuf: $(PROTO_GO_FILES) ${PROTO_TS_FILES} fix # Implicit compile rule for GRPC/proto files (note since pb.go files no longer generated # in same directory as proto file this just regenerates everything %.pb.go: %.proto protoc -I ./protobuf $< --gogo_out=plugins=grpc:${GOPATH}/src +%.pb.ts: %.proto + @protoc -I protobuf \ + --plugin="protoc-gen-ts=${PROTOC_GEN_TS_PATH}" \ + --plugin=protoc-gen-grpc=${PROTOC_GEN_GRPC_PATH} \ + --js_out="import_style=commonjs,binary:${PROTO_GEN_TS_PATH}" \ + --ts_out="service=grpc-node:${PROTO_GEN_TS_PATH}" \ + --grpc_out="${PROTO_GEN_TS_PATH}" $< .PHONY: protobuf_deps protobuf_deps: @go get -u github.com/gogo/protobuf/protoc-gen-gogo -# @go get -u github.com/golang/protobuf/protoc-gen-go + @cd ${BURROW_TS_PATH} && npm install --only=dev .PHONY: clean_protobuf clean_protobuf: @@ -171,17 +183,15 @@ solang: $(patsubst %.solang, %.solang.go, $(wildcard ./execution/wasm/*.solang)) @go run ./deploy/compile/solgo/main.go -wasm $^ # node/js -# -# Install dependency .PHONY: npm_install npm_install: - npm install + @cd ${BURROW_TS_PATH} && npm install # Test .PHONY: test_js test_js: - ./tests/scripts/bin_wrapper.sh npm test + @cd ${BURROW_TS_PATH} && npm test .PHONY: test test: check bin/solc diff --git a/acm/acm.pb.go b/acm/acm.pb.go index f331bc666..327221c1e 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -27,7 +28,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Account struct { Address github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address"` @@ -69,7 +70,7 @@ func (m *Account) XXX_Unmarshal(b []byte) error { } func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -154,7 +155,7 @@ func (m *ContractMeta) XXX_Unmarshal(b []byte) error { } func (m *ContractMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -231,7 +232,7 @@ var fileDescriptor_49ed775bc0a6adf6 = []byte{ func (m *Account) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -239,106 +240,129 @@ func (m *Account) Marshal() (dAtA []byte, err error) { } func (m *Account) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.Address.Size())) - n1, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n1 - dAtA[i] = 0x12 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.PublicKey.Size())) - n2, err := m.PublicKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.NativeName) > 0 { + i -= len(m.NativeName) + copy(dAtA[i:], m.NativeName) + i = encodeVarintAcm(dAtA, i, uint64(len(m.NativeName))) + i-- + dAtA[i] = 0x5a } - i += n2 - if m.Sequence != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.Sequence)) + if m.Forebear != nil { + { + size := m.Forebear.Size() + i -= size + if _, err := m.Forebear.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAcm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 } - if m.Balance != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.Balance)) + if len(m.ContractMeta) > 0 { + for iNdEx := len(m.ContractMeta) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ContractMeta[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAcm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } } - dAtA[i] = 0x2a - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.EVMCode.Size())) - n3, err := m.EVMCode.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.CodeHash.Size() + i -= size + if _, err := m.CodeHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAcm(dAtA, i, uint64(size)) } - i += n3 - dAtA[i] = 0x32 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.Permissions.Size())) - n4, err := m.Permissions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + i-- + dAtA[i] = 0x42 + { + size := m.WASMCode.Size() + i -= size + if _, err := m.WASMCode.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAcm(dAtA, i, uint64(size)) } - i += n4 + i-- dAtA[i] = 0x3a - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.WASMCode.Size())) - n5, err := m.WASMCode.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - dAtA[i] = 0x42 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.CodeHash.Size())) - n6, err := m.CodeHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAcm(dAtA, i, uint64(size)) } - i += n6 - if len(m.ContractMeta) > 0 { - for _, msg := range m.ContractMeta { - dAtA[i] = 0x4a - i++ - i = encodeVarintAcm(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n + i-- + dAtA[i] = 0x32 + { + size := m.EVMCode.Size() + i -= size + if _, err := m.EVMCode.MarshalTo(dAtA[i:]); err != nil { + return 0, err } + i = encodeVarintAcm(dAtA, i, uint64(size)) } - if m.Forebear != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.Forebear.Size())) - n7, err := m.Forebear.MarshalTo(dAtA[i:]) + i-- + dAtA[i] = 0x2a + if m.Balance != 0 { + i = encodeVarintAcm(dAtA, i, uint64(m.Balance)) + i-- + dAtA[i] = 0x20 + } + if m.Sequence != 0 { + i = encodeVarintAcm(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x18 + } + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n7 + i -= size + i = encodeVarintAcm(dAtA, i, uint64(size)) } - if len(m.NativeName) > 0 { - dAtA[i] = 0x5a - i++ - i = encodeVarintAcm(dAtA, i, uint64(len(m.NativeName))) - i += copy(dAtA[i:], m.NativeName) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAcm(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *ContractMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -346,46 +370,59 @@ func (m *ContractMeta) Marshal() (dAtA []byte, err error) { } func (m *ContractMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContractMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.CodeHash.Size())) - n8, err := m.CodeHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - dAtA[i] = 0x12 - i++ - i = encodeVarintAcm(dAtA, i, uint64(m.MetadataHash.Size())) - n9, err := m.MetadataHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n9 if len(m.Metadata) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) i = encodeVarintAcm(dAtA, i, uint64(len(m.Metadata))) - i += copy(dAtA[i:], m.Metadata) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.MetadataHash.Size() + i -= size + if _, err := m.MetadataHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAcm(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0x12 + { + size := m.CodeHash.Size() + i -= size + if _, err := m.CodeHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAcm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func encodeVarintAcm(dAtA []byte, offset int, v uint64) int { + offset -= sovAcm(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Account) Size() (n int) { if m == nil { @@ -452,14 +489,7 @@ func (m *ContractMeta) Size() (n int) { } func sovAcm(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozAcm(x uint64) (n int) { return sovAcm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1010,6 +1040,7 @@ func (m *ContractMeta) Unmarshal(dAtA []byte) error { func skipAcm(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1041,10 +1072,8 @@ func skipAcm(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1065,55 +1094,30 @@ func skipAcm(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthAcm } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthAcm - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAcm - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipAcm(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthAcm - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAcm + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthAcm + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthAcm = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAcm = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthAcm = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAcm = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAcm = fmt.Errorf("proto: unexpected end of group") ) diff --git a/acm/balance/balance.pb.go b/acm/balance/balance.pb.go index 342618c99..167ba01f9 100644 --- a/acm/balance/balance.pb.go +++ b/acm/balance/balance.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -23,7 +24,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Balance struct { Type Type `protobuf:"varint,1,opt,name=Type,proto3,casttype=Type" json:"Type,omitempty"` @@ -41,7 +42,7 @@ func (m *Balance) XXX_Unmarshal(b []byte) error { } func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -104,7 +105,7 @@ var fileDescriptor_ee25a00b628521b1 = []byte{ func (m *Balance) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -112,34 +113,42 @@ func (m *Balance) Marshal() (dAtA []byte, err error) { } func (m *Balance) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Balance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBalance(dAtA, i, uint64(m.Type)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Amount != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintBalance(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Type != 0 { + i = encodeVarintBalance(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintBalance(dAtA []byte, offset int, v uint64) int { + offset -= sovBalance(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Balance) Size() (n int) { if m == nil { @@ -160,14 +169,7 @@ func (m *Balance) Size() (n int) { } func sovBalance(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozBalance(x uint64) (n int) { return sovBalance(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -267,6 +269,7 @@ func (m *Balance) Unmarshal(dAtA []byte) error { func skipBalance(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -298,10 +301,8 @@ func skipBalance(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -322,55 +323,30 @@ func skipBalance(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthBalance } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthBalance - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBalance - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipBalance(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthBalance - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupBalance + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthBalance + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthBalance = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowBalance = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthBalance = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowBalance = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupBalance = fmt.Errorf("proto: unexpected end of group") ) diff --git a/acm/validator/validator.pb.go b/acm/validator/validator.pb.go index e8987c611..0f22a9fbf 100644 --- a/acm/validator/validator.pb.go +++ b/acm/validator/validator.pb.go @@ -6,6 +6,7 @@ package validator import ( fmt "fmt" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -24,7 +25,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Validator struct { Address *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address,omitempty"` @@ -124,14 +125,7 @@ func (m *Validator) Size() (n int) { } func sovValidator(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozValidator(x uint64) (n int) { return sovValidator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/bcm/bcm.pb.go b/bcm/bcm.pb.go index 4b02315fb..c0fc0afdf 100644 --- a/bcm/bcm.pb.go +++ b/bcm/bcm.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" time "time" _ "github.com/gogo/protobuf/gogoproto" @@ -29,7 +30,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type SyncInfo struct { LatestBlockHeight uint64 `protobuf:"varint,1,opt,name=LatestBlockHeight,proto3" json:""` @@ -57,7 +58,7 @@ func (m *SyncInfo) XXX_Unmarshal(b []byte) error { } func (m *SyncInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -128,7 +129,7 @@ func (m *PersistedState) XXX_Unmarshal(b []byte) error { } func (m *PersistedState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -208,7 +209,7 @@ var fileDescriptor_0c9ff3e1ca1cc0f1 = []byte{ func (m *SyncInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -216,65 +217,75 @@ func (m *SyncInfo) Marshal() (dAtA []byte, err error) { } func (m *SyncInfo) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SyncInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.LatestBlockHeight != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBcm(dAtA, i, uint64(m.LatestBlockHeight)) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintBcm(dAtA, i, uint64(m.LatestBlockHash.Size())) - n1, err := m.LatestBlockHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n1 - dAtA[i] = 0x1a - i++ - i = encodeVarintBcm(dAtA, i, uint64(m.LatestAppHash.Size())) - n2, err := m.LatestAppHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.LatestBlockDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.LatestBlockDuration):]) + if err1 != nil { + return 0, err1 } - i += n2 - dAtA[i] = 0x22 - i++ - i = encodeVarintBcm(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockTime))) - n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockTime, dAtA[i:]) - if err != nil { - return 0, err + i -= n1 + i = encodeVarintBcm(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x32 + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockSeenTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockSeenTime):]) + if err2 != nil { + return 0, err2 } - i += n3 + i -= n2 + i = encodeVarintBcm(dAtA, i, uint64(n2)) + i-- dAtA[i] = 0x2a - i++ - i = encodeVarintBcm(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockSeenTime))) - n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockSeenTime, dAtA[i:]) - if err != nil { - return 0, err + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockTime):]) + if err3 != nil { + return 0, err3 } - i += n4 - dAtA[i] = 0x32 - i++ - i = encodeVarintBcm(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.LatestBlockDuration))) - n5, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.LatestBlockDuration, dAtA[i:]) - if err != nil { - return 0, err + i -= n3 + i = encodeVarintBcm(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x22 + { + size := m.LatestAppHash.Size() + i -= size + if _, err := m.LatestAppHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBcm(dAtA, i, uint64(size)) } - i += n5 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x1a + { + size := m.LatestBlockHash.Size() + i -= size + if _, err := m.LatestBlockHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBcm(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0x12 + if m.LatestBlockHeight != 0 { + i = encodeVarintBcm(dAtA, i, uint64(m.LatestBlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *PersistedState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -282,53 +293,65 @@ func (m *PersistedState) Marshal() (dAtA []byte, err error) { } func (m *PersistedState) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PersistedState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintBcm(dAtA, i, uint64(m.AppHashAfterLastBlock.Size())) - n6, err := m.AppHashAfterLastBlock.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - dAtA[i] = 0x12 - i++ - i = encodeVarintBcm(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime))) - n7, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size := m.GenesisHash.Size() + i -= size + if _, err := m.GenesisHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBcm(dAtA, i, uint64(size)) } - i += n7 + i-- + dAtA[i] = 0x22 if m.LastBlockHeight != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintBcm(dAtA, i, uint64(m.LastBlockHeight)) + i-- + dAtA[i] = 0x18 } - dAtA[i] = 0x22 - i++ - i = encodeVarintBcm(dAtA, i, uint64(m.GenesisHash.Size())) - n8, err := m.GenesisHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):]) + if err4 != nil { + return 0, err4 } - i += n8 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= n4 + i = encodeVarintBcm(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x12 + { + size := m.AppHashAfterLastBlock.Size() + i -= size + if _, err := m.AppHashAfterLastBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBcm(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func encodeVarintBcm(dAtA []byte, offset int, v uint64) int { + offset -= sovBcm(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *SyncInfo) Size() (n int) { if m == nil { @@ -377,14 +400,7 @@ func (m *PersistedState) Size() (n int) { } func sovBcm(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozBcm(x uint64) (n int) { return sovBcm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -802,6 +818,7 @@ func (m *PersistedState) Unmarshal(dAtA []byte) error { func skipBcm(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -833,10 +850,8 @@ func skipBcm(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -857,55 +872,30 @@ func skipBcm(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthBcm } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthBcm - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBcm - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipBcm(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthBcm - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupBcm + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthBcm + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthBcm = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowBcm = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthBcm = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowBcm = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupBcm = fmt.Errorf("proto: unexpected end of group") ) diff --git a/consensus/tendermint/tendermint.pb.go b/consensus/tendermint/tendermint.pb.go index a79c3aedb..b5040393a 100644 --- a/consensus/tendermint/tendermint.pb.go +++ b/consensus/tendermint/tendermint.pb.go @@ -6,6 +6,7 @@ package tendermint import ( fmt "fmt" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -24,7 +25,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type NodeInfo struct { ID github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=ID,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"ID"` @@ -183,14 +184,7 @@ func (m *NodeInfo) Size() (n int) { } func sovTendermint(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTendermint(x uint64) (n int) { return sovTendermint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/crypto/crypto.pb.go b/crypto/crypto.pb.go index ab32f1738..bbd34dc7d 100644 --- a/crypto/crypto.pb.go +++ b/crypto/crypto.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -24,7 +25,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type PublicKey struct { CurveType CurveType `protobuf:"varint,1,opt,name=CurveType,proto3,casttype=CurveType" json:"CurveType,omitempty"` @@ -44,7 +45,7 @@ func (m *PublicKey) XXX_Unmarshal(b []byte) error { } func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -93,7 +94,7 @@ func (m *PrivateKey) XXX_Unmarshal(b []byte) error { } func (m *PrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -133,7 +134,7 @@ func (m *Signature) XXX_Unmarshal(b []byte) error { } func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -205,7 +206,7 @@ var fileDescriptor_527278fb02d03321 = []byte{ func (m *PublicKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -213,33 +214,41 @@ func (m *PublicKey) Marshal() (dAtA []byte, err error) { } func (m *PublicKey) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CurveType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size := m.PublicKey.Size() + i -= size + if _, err := m.PublicKey.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintCrypto(dAtA, i, uint64(size)) } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintCrypto(dAtA, i, uint64(m.PublicKey.Size())) - n1, err := m.PublicKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.CurveType != 0 { + i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *PrivateKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -247,37 +256,45 @@ func (m *PrivateKey) Marshal() (dAtA []byte, err error) { } func (m *PrivateKey) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PrivateKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CurveType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) - } - if len(m.PublicKey) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintCrypto(dAtA, i, uint64(len(m.PublicKey))) - i += copy(dAtA[i:], m.PublicKey) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.PrivateKey) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.PrivateKey) + copy(dAtA[i:], m.PrivateKey) i = encodeVarintCrypto(dAtA, i, uint64(len(m.PrivateKey))) - i += copy(dAtA[i:], m.PrivateKey) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintCrypto(dAtA, i, uint64(len(m.PublicKey))) + i-- + dAtA[i] = 0x12 + } + if m.CurveType != 0 { + i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Signature) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -285,35 +302,44 @@ func (m *Signature) Marshal() (dAtA []byte, err error) { } func (m *Signature) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Signature) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CurveType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Signature) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) i = encodeVarintCrypto(dAtA, i, uint64(len(m.Signature))) - i += copy(dAtA[i:], m.Signature) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.CurveType != 0 { + i = encodeVarintCrypto(dAtA, i, uint64(m.CurveType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintCrypto(dAtA []byte, offset int, v uint64) int { + offset -= sovCrypto(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *PublicKey) Size() (n int) { if m == nil { @@ -375,14 +401,7 @@ func (m *Signature) Size() (n int) { } func sovCrypto(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozCrypto(x uint64) (n int) { return sovCrypto(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -744,6 +763,7 @@ func (m *Signature) Unmarshal(dAtA []byte) error { func skipCrypto(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -775,10 +795,8 @@ func skipCrypto(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -799,55 +817,30 @@ func skipCrypto(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthCrypto } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthCrypto - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCrypto - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCrypto(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthCrypto - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCrypto + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthCrypto + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthCrypto = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCrypto = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthCrypto = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCrypto = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCrypto = fmt.Errorf("proto: unexpected end of group") ) diff --git a/dump/dump.pb.go b/dump/dump.pb.go index 9c6bb37bf..d3c2c0214 100644 --- a/dump/dump.pb.go +++ b/dump/dump.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" time "time" _ "github.com/gogo/protobuf/gogoproto" @@ -32,7 +33,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Storage struct { Key github_com_hyperledger_burrow_binary.Word256 `protobuf:"bytes,1,opt,name=Key,proto3,customtype=github.com/hyperledger/burrow/binary.Word256" json:"Key"` @@ -53,7 +54,7 @@ func (m *Storage) XXX_Unmarshal(b []byte) error { } func (m *Storage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -94,7 +95,7 @@ func (m *AccountStorage) XXX_Unmarshal(b []byte) error { } func (m *AccountStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -148,7 +149,7 @@ func (m *EVMEvent) XXX_Unmarshal(b []byte) error { } func (m *EVMEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -220,7 +221,7 @@ func (m *Dump) XXX_Unmarshal(b []byte) error { } func (m *Dump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -328,7 +329,7 @@ var fileDescriptor_58418148159c29a6 = []byte{ func (m *Storage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -336,36 +337,46 @@ func (m *Storage) Marshal() (dAtA []byte, err error) { } func (m *Storage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Storage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Key.Size())) - n1, err := m.Key.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n1 - dAtA[i] = 0x12 - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Value.Size())) - n2, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDump(dAtA, i, uint64(size)) } - i += n2 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + { + size := m.Key.Size() + i -= size + if _, err := m.Key.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDump(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *AccountStorage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -373,40 +384,50 @@ func (m *AccountStorage) Marshal() (dAtA []byte, err error) { } func (m *AccountStorage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountStorage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Address.Size())) - n3, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n3 if len(m.Storage) > 0 { - for _, msg := range m.Storage { - dAtA[i] = 0x12 - i++ - i = encodeVarintDump(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Storage) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Storage[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDump(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDump(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *EVMEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -414,49 +435,58 @@ func (m *EVMEvent) Marshal() (dAtA []byte, err error) { } func (m *EVMEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EVMEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ChainID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDump(dAtA, i, uint64(len(m.ChainID))) - i += copy(dAtA[i:], m.ChainID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - dAtA[i] = 0x12 - i++ - i = encodeVarintDump(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) - n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) - if err != nil { - return 0, err + if m.Index != 0 { + i = encodeVarintDump(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x20 } - i += n4 if m.Event != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Event.Size())) - n5, err := m.Event.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDump(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0x1a } - if m.Index != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Index)) + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err2 != nil { + return 0, err2 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= n2 + i = encodeVarintDump(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x12 + if len(m.ChainID) > 0 { + i -= len(m.ChainID) + copy(dAtA[i:], m.ChainID) + i = encodeVarintDump(dAtA, i, uint64(len(m.ChainID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Dump) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -464,69 +494,85 @@ func (m *Dump) Marshal() (dAtA []byte, err error) { } func (m *Dump) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Dump) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Height)) - } - if m.Account != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Account.Size())) - n6, err := m.Account.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.AccountStorage != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintDump(dAtA, i, uint64(m.AccountStorage.Size())) - n7, err := m.AccountStorage.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Name != nil { + { + size, err := m.Name.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDump(dAtA, i, uint64(size)) } - i += n7 + i-- + dAtA[i] = 0x2a } if m.EVMEvent != nil { + { + size, err := m.EVMEvent.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDump(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x22 - i++ - i = encodeVarintDump(dAtA, i, uint64(m.EVMEvent.Size())) - n8, err := m.EVMEvent.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if m.AccountStorage != nil { + { + size, err := m.AccountStorage.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDump(dAtA, i, uint64(size)) } - i += n8 + i-- + dAtA[i] = 0x1a } - if m.Name != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintDump(dAtA, i, uint64(m.Name.Size())) - n9, err := m.Name.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Account != nil { + { + size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDump(dAtA, i, uint64(size)) } - i += n9 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintDump(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintDump(dAtA []byte, offset int, v uint64) int { + offset -= sovDump(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Storage) Size() (n int) { if m == nil { @@ -621,14 +667,7 @@ func (m *Dump) Size() (n int) { } func sovDump(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozDump(x uint64) (n int) { return sovDump(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1268,6 +1307,7 @@ func (m *Dump) Unmarshal(dAtA []byte) error { func skipDump(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1299,10 +1339,8 @@ func skipDump(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1323,55 +1361,30 @@ func skipDump(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthDump } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthDump - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDump - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipDump(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthDump - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDump + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthDump + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthDump = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDump = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthDump = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDump = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDump = fmt.Errorf("proto: unexpected end of group") ) diff --git a/encoding/encoding.pb.go b/encoding/encoding.pb.go index 16a454d26..703b69cb6 100644 --- a/encoding/encoding.pb.go +++ b/encoding/encoding.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -23,7 +24,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // For testing type TestMessage struct { @@ -44,7 +45,7 @@ func (m *TestMessage) XXX_Unmarshal(b []byte) error { } func (m *TestMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -106,7 +107,7 @@ var fileDescriptor_ac330e3fa468db3c = []byte{ func (m *TestMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -114,34 +115,42 @@ func (m *TestMessage) Marshal() (dAtA []byte, err error) { } func (m *TestMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TestMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintEncoding(dAtA, i, uint64(m.Type)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Amount != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintEncoding(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Type != 0 { + i = encodeVarintEncoding(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintEncoding(dAtA []byte, offset int, v uint64) int { + offset -= sovEncoding(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *TestMessage) Size() (n int) { if m == nil { @@ -162,14 +171,7 @@ func (m *TestMessage) Size() (n int) { } func sovEncoding(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozEncoding(x uint64) (n int) { return sovEncoding(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -269,6 +271,7 @@ func (m *TestMessage) Unmarshal(dAtA []byte) error { func skipEncoding(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -300,10 +303,8 @@ func skipEncoding(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -324,55 +325,30 @@ func skipEncoding(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthEncoding } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthEncoding - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEncoding - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipEncoding(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthEncoding - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEncoding + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthEncoding + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthEncoding = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEncoding = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthEncoding = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEncoding = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEncoding = fmt.Errorf("proto: unexpected end of group") ) diff --git a/execution/errors/errors.pb.go b/execution/errors/errors.pb.go index 3af0d21aa..47b0097ae 100644 --- a/execution/errors/errors.pb.go +++ b/execution/errors/errors.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -23,7 +24,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Exception struct { CodeNumber uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` @@ -43,7 +44,7 @@ func (m *Exception) XXX_Unmarshal(b []byte) error { } func (m *Exception) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -106,7 +107,7 @@ var fileDescriptor_24fe73c7f0ddb19c = []byte{ func (m *Exception) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -114,35 +115,44 @@ func (m *Exception) Marshal() (dAtA []byte, err error) { } func (m *Exception) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CodeNumber != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintErrors(dAtA, i, uint64(m.CodeNumber)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Exception) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Exception) + copy(dAtA[i:], m.Exception) i = encodeVarintErrors(dAtA, i, uint64(len(m.Exception))) - i += copy(dAtA[i:], m.Exception) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.CodeNumber != 0 { + i = encodeVarintErrors(dAtA, i, uint64(m.CodeNumber)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintErrors(dAtA []byte, offset int, v uint64) int { + offset -= sovErrors(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Exception) Size() (n int) { if m == nil { @@ -164,14 +174,7 @@ func (m *Exception) Size() (n int) { } func sovErrors(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozErrors(x uint64) (n int) { return sovErrors(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -284,6 +287,7 @@ func (m *Exception) Unmarshal(dAtA []byte) error { func skipErrors(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -315,10 +319,8 @@ func skipErrors(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -339,55 +341,30 @@ func skipErrors(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthErrors } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthErrors - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowErrors - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipErrors(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthErrors - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupErrors + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthErrors + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthErrors = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowErrors = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthErrors = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowErrors = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupErrors = fmt.Errorf("proto: unexpected end of group") ) diff --git a/execution/exec/exec.pb.go b/execution/exec/exec.pb.go index aa23b65fc..f54e15d6a 100644 --- a/execution/exec/exec.pb.go +++ b/execution/exec/exec.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" time "time" _ "github.com/gogo/protobuf/gogoproto" @@ -37,7 +38,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // This message exists purely for framing []StreamEvent type StreamEvents struct { @@ -58,7 +59,7 @@ func (m *StreamEvents) XXX_Unmarshal(b []byte) error { } func (m *StreamEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -110,7 +111,7 @@ func (m *StreamEvent) XXX_Unmarshal(b []byte) error { } func (m *StreamEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -187,7 +188,7 @@ func (m *BeginBlock) XXX_Unmarshal(b []byte) error { } func (m *BeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -241,7 +242,7 @@ func (m *EndBlock) XXX_Unmarshal(b []byte) error { } func (m *EndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -292,7 +293,7 @@ func (m *BeginTx) XXX_Unmarshal(b []byte) error { } func (m *BeginTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -354,7 +355,7 @@ func (m *EndTx) XXX_Unmarshal(b []byte) error { } func (m *EndTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -403,7 +404,7 @@ func (m *TxHeader) XXX_Unmarshal(b []byte) error { } func (m *TxHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -474,7 +475,7 @@ func (m *BlockExecution) XXX_Unmarshal(b []byte) error { } func (m *BlockExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -538,7 +539,7 @@ func (m *TxExecutionKey) XXX_Unmarshal(b []byte) error { } func (m *TxExecutionKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -604,7 +605,7 @@ func (m *TxExecution) XXX_Unmarshal(b []byte) error { } func (m *TxExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -686,7 +687,7 @@ func (m *Origin) XXX_Unmarshal(b []byte) error { } func (m *Origin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -766,7 +767,7 @@ func (m *Header) XXX_Unmarshal(b []byte) error { } func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -852,7 +853,7 @@ func (m *Event) XXX_Unmarshal(b []byte) error { } func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -942,7 +943,7 @@ func (m *Result) XXX_Unmarshal(b []byte) error { } func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1012,7 +1013,7 @@ func (m *LogEvent) XXX_Unmarshal(b []byte) error { } func (m *LogEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1056,7 +1057,7 @@ func (m *CallEvent) XXX_Unmarshal(b []byte) error { } func (m *CallEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1117,7 +1118,7 @@ func (m *GovernAccountEvent) XXX_Unmarshal(b []byte) error { } func (m *GovernAccountEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1164,7 +1165,7 @@ func (m *InputEvent) XXX_Unmarshal(b []byte) error { } func (m *InputEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1204,7 +1205,7 @@ func (m *OutputEvent) XXX_Unmarshal(b []byte) error { } func (m *OutputEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1248,7 +1249,7 @@ func (m *CallData) XXX_Unmarshal(b []byte) error { } func (m *CallData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1416,7 +1417,7 @@ var fileDescriptor_4d737c7315c25422 = []byte{ func (m *StreamEvents) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1424,32 +1425,40 @@ func (m *StreamEvents) Marshal() (dAtA []byte, err error) { } func (m *StreamEvents) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StreamEvents) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.StreamEvents) > 0 { - for _, msg := range m.StreamEvents { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.StreamEvents) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.StreamEvents[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *StreamEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1457,80 +1466,98 @@ func (m *StreamEvent) Marshal() (dAtA []byte, err error) { } func (m *StreamEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StreamEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.BeginBlock != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.BeginBlock.Size())) - n1, err := m.BeginBlock.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.BeginTx != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.BeginTx.Size())) - n2, err := m.BeginTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.EndBlock != nil { + { + size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0x32 } - if m.Envelope != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Envelope.Size())) - n3, err := m.Envelope.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.EndTx != nil { + { + size, err := m.EndTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x2a } if m.Event != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Event.Size())) - n4, err := m.Event.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n4 + i-- + dAtA[i] = 0x22 } - if m.EndTx != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.EndTx.Size())) - n5, err := m.EndTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Envelope != nil { + { + size := m.Envelope.Size() + i -= size + if _, err := m.Envelope.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0x1a } - if m.EndBlock != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.EndBlock.Size())) - n6, err := m.EndBlock.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.BeginTx != nil { + { + size, err := m.BeginTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n6 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.BeginBlock != nil { + { + size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *BeginBlock) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1538,35 +1565,43 @@ func (m *BeginBlock) Marshal() (dAtA []byte, err error) { } func (m *BeginBlock) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Height)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Header != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Header.Size())) - n7, err := m.Header.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n7 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *EndBlock) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1574,25 +1609,31 @@ func (m *EndBlock) Marshal() (dAtA []byte, err error) { } func (m *EndBlock) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if m.Height != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *BeginTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1600,50 +1641,62 @@ func (m *BeginTx) Marshal() (dAtA []byte, err error) { } func (m *BeginTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BeginTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TxHeader != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxHeader.Size())) - n8, err := m.TxHeader.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Exception != nil { + { + size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n8 + i-- + dAtA[i] = 0x22 } if m.Result != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Result.Size())) - n9, err := m.Result.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n9 + i-- + dAtA[i] = 0x12 } - if m.Exception != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Exception.Size())) - n10, err := m.Exception.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.TxHeader != nil { + { + size, err := m.TxHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n10 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *EndTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1651,28 +1704,36 @@ func (m *EndTx) Marshal() (dAtA []byte, err error) { } func (m *EndTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EndTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxHash.Size())) - n11, err := m.TxHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size := m.TxHash.Size() + i -= size + if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil } func (m *TxHeader) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1680,53 +1741,63 @@ func (m *TxHeader) Marshal() (dAtA []byte, err error) { } func (m *TxHeader) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TxType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxType)) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxHash.Size())) - n12, err := m.TxHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n12 - if m.Height != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Height)) + if m.Origin != nil { + { + size, err := m.Origin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } if m.Index != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintExec(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x20 } - if m.Origin != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Origin.Size())) - n13, err := m.Origin.MarshalTo(dAtA[i:]) - if err != nil { + if m.Height != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x18 + } + { + size := m.TxHash.Size() + i -= size + if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n13 + i = encodeVarintExec(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + if m.TxType != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.TxType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *BlockExecution) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1734,47 +1805,57 @@ func (m *BlockExecution) Marshal() (dAtA []byte, err error) { } func (m *BlockExecution) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Height)) - } - if m.Header != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Header.Size())) - n14, err := m.Header.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.TxExecutions) > 0 { - for _, msg := range m.TxExecutions { + for iNdEx := len(m.TxExecutions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TxExecutions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + } + } + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *TxExecutionKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1782,30 +1863,36 @@ func (m *TxExecutionKey) Marshal() (dAtA []byte, err error) { } func (m *TxExecutionKey) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxExecutionKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Height)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Offset != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintExec(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *TxExecution) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1813,94 +1900,114 @@ func (m *TxExecution) Marshal() (dAtA []byte, err error) { } func (m *TxExecution) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TxHeader != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxHeader.Size())) - n15, err := m.TxHeader.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.TxExecutions) > 0 { + for iNdEx := len(m.TxExecutions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TxExecutions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a } - i += n15 } - if m.Envelope != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Envelope.Size())) - n16, err := m.Envelope.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Exception != nil { + { + size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n16 + i-- + dAtA[i] = 0x52 } - if len(m.Events) > 0 { - for _, msg := range m.Events { - dAtA[i] = 0x3a - i++ - i = encodeVarintExec(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.Receipt != nil { + { + size, err := m.Receipt.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x4a } if m.Result != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Result.Size())) - n17, err := m.Result.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n17 + i-- + dAtA[i] = 0x42 } - if m.Receipt != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Receipt.Size())) - n18, err := m.Receipt.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a } - i += n18 } - if m.Exception != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Exception.Size())) - n19, err := m.Exception.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Envelope != nil { + { + size := m.Envelope.Size() + i -= size + if _, err := m.Envelope.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n19 + i-- + dAtA[i] = 0x32 } - if len(m.TxExecutions) > 0 { - for _, msg := range m.TxExecutions { - dAtA[i] = 0x5a - i++ - i = encodeVarintExec(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.TxHeader != nil { + { + size, err := m.TxHeader.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *Origin) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1908,44 +2015,51 @@ func (m *Origin) Marshal() (dAtA []byte, err error) { } func (m *Origin) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Origin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ChainID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(len(m.ChainID))) - i += copy(dAtA[i:], m.ChainID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Height != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Height)) + n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err18 != nil { + return 0, err18 } + i -= n18 + i = encodeVarintExec(dAtA, i, uint64(n18)) + i-- + dAtA[i] = 0x22 if m.Index != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintExec(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x18 } - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) - n20, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) - if err != nil { - return 0, err + if m.Height != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x10 } - i += n20 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ChainID) > 0 { + i -= len(m.ChainID) + copy(dAtA[i:], m.ChainID) + i = encodeVarintExec(dAtA, i, uint64(len(m.ChainID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Header) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1953,64 +2067,75 @@ func (m *Header) Marshal() (dAtA []byte, err error) { } func (m *Header) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TxType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxType)) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.TxHash.Size())) - n21, err := m.TxHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n21 - if m.EventType != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.EventType)) + if m.Exception != nil { + { + size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a } - if len(m.EventID) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(len(m.EventID))) - i += copy(dAtA[i:], m.EventID) + if m.Index != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x30 } if m.Height != 0 { - dAtA[i] = 0x28 - i++ i = encodeVarintExec(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x28 } - if m.Index != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Index)) + if len(m.EventID) > 0 { + i -= len(m.EventID) + copy(dAtA[i:], m.EventID) + i = encodeVarintExec(dAtA, i, uint64(len(m.EventID))) + i-- + dAtA[i] = 0x22 } - if m.Exception != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Exception.Size())) - n22, err := m.Exception.MarshalTo(dAtA[i:]) - if err != nil { + if m.EventType != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.EventType)) + i-- + dAtA[i] = 0x18 + } + { + size := m.TxHash.Size() + i -= size + if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n22 + i = encodeVarintExec(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + if m.TxType != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.TxType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Event) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2018,80 +2143,98 @@ func (m *Event) Marshal() (dAtA []byte, err error) { } func (m *Event) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Header != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Header.Size())) - n23, err := m.Header.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n23 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Input != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Input.Size())) - n24, err := m.Input.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.GovernAccount != nil { + { + size, err := m.GovernAccount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n24 + i-- + dAtA[i] = 0x32 } - if m.Output != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Output.Size())) - n25, err := m.Output.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Log != nil { + { + size, err := m.Log.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n25 + i-- + dAtA[i] = 0x2a } if m.Call != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Call.Size())) - n26, err := m.Call.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Call.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n26 + i-- + dAtA[i] = 0x22 } - if m.Log != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Log.Size())) - n27, err := m.Log.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Output != nil { + { + size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n27 + i-- + dAtA[i] = 0x1a } - if m.GovernAccount != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.GovernAccount.Size())) - n28, err := m.GovernAccount.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Input != nil { + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n28 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Result) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2099,51 +2242,62 @@ func (m *Result) Marshal() (dAtA []byte, err error) { } func (m *Result) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Result) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Return) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(len(m.Return))) - i += copy(dAtA[i:], m.Return) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.GasUsed != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.GasUsed)) + if m.PermArgs != nil { + { + size, err := m.PermArgs.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } if m.NameEntry != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.NameEntry.Size())) - n29, err := m.NameEntry.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.NameEntry.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n29 + i-- + dAtA[i] = 0x1a } - if m.PermArgs != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.PermArgs.Size())) - n30, err := m.PermArgs.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n30 + if m.GasUsed != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Return) > 0 { + i -= len(m.Return) + copy(dAtA[i:], m.Return) + i = encodeVarintExec(dAtA, i, uint64(len(m.Return))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *LogEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2151,48 +2305,60 @@ func (m *LogEvent) Marshal() (dAtA []byte, err error) { } func (m *LogEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LogEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Address.Size())) - n31, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n31 - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Data.Size())) - n32, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n32 if len(m.Topics) > 0 { - for _, msg := range m.Topics { - dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.Topics[iNdEx].Size() + i -= size + if _, err := m.Topics[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x1a } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.Data.Size() + i -= size + if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *CallEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2200,56 +2366,68 @@ func (m *CallEvent) Marshal() (dAtA []byte, err error) { } func (m *CallEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CallEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CallData != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.CallData.Size())) - n33, err := m.CallData.MarshalTo(dAtA[i:]) - if err != nil { + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.CallType != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.CallType)) + i-- + dAtA[i] = 0x28 + } + { + size := m.Return.Size() + i -= size + if _, err := m.Return.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n33 - } - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Origin.Size())) - n34, err := m.Origin.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n34 + i-- + dAtA[i] = 0x22 if m.StackDepth != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintExec(dAtA, i, uint64(m.StackDepth)) + i-- + dAtA[i] = 0x18 } - dAtA[i] = 0x22 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Return.Size())) - n35, err := m.Return.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n35 - if m.CallType != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.CallType)) + { + size := m.Origin.Size() + i -= size + if _, err := m.Origin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + if m.CallData != nil { + { + size, err := m.CallData.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *GovernAccountEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2257,30 +2435,38 @@ func (m *GovernAccountEvent) Marshal() (dAtA []byte, err error) { } func (m *GovernAccountEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GovernAccountEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if m.AccountUpdate != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.AccountUpdate.Size())) - n36, err := m.AccountUpdate.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.AccountUpdate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) } - i += n36 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *InputEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2288,28 +2474,36 @@ func (m *InputEvent) Marshal() (dAtA []byte, err error) { } func (m *InputEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InputEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Address.Size())) - n37, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n37 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *OutputEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2317,28 +2511,36 @@ func (m *OutputEvent) Marshal() (dAtA []byte, err error) { } func (m *OutputEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OutputEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Address.Size())) - n38, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n38 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *CallData) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2346,58 +2548,72 @@ func (m *CallData) Marshal() (dAtA []byte, err error) { } func (m *CallData) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CallData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Caller.Size())) - n39, err := m.Caller.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n39 - dAtA[i] = 0x12 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Callee.Size())) - n40, err := m.Callee.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n40 - dAtA[i] = 0x1a - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Data.Size())) - n41, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Gas != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.Gas)) + i-- + dAtA[i] = 0x28 } - i += n41 if m.Value != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintExec(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x20 } - if m.Gas != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintExec(dAtA, i, uint64(m.Gas)) + { + size := m.Data.Size() + i -= size + if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x1a + { + size := m.Callee.Size() + i -= size + if _, err := m.Callee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Caller.Size() + i -= size + if _, err := m.Caller.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func encodeVarintExec(dAtA []byte, offset int, v uint64) int { + offset -= sovExec(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *StreamEvents) Size() (n int) { if m == nil { @@ -2877,14 +3093,7 @@ func (m *CallData) Size() (n int) { } func sovExec(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozExec(x uint64) (n int) { return sovExec(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -6126,6 +6335,7 @@ func (m *CallData) Unmarshal(dAtA []byte) error { func skipExec(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -6157,10 +6367,8 @@ func skipExec(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -6181,55 +6389,30 @@ func skipExec(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthExec } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthExec - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExec - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipExec(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthExec - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupExec + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthExec + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthExec = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowExec = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthExec = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowExec = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupExec = fmt.Errorf("proto: unexpected end of group") ) diff --git a/execution/names/names.pb.go b/execution/names/names.pb.go index e722ee6e0..815e30c2b 100644 --- a/execution/names/names.pb.go +++ b/execution/names/names.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -24,7 +25,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // NameReg provides a global key value store based on Name, Data pairs that are subject to expiry and ownership by an // account. @@ -52,7 +53,7 @@ func (m *Entry) XXX_Unmarshal(b []byte) error { } func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -125,7 +126,7 @@ var fileDescriptor_f4268625867c617c = []byte{ func (m *Entry) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -133,49 +134,61 @@ func (m *Entry) Marshal() (dAtA []byte, err error) { } func (m *Entry) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNames(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - dAtA[i] = 0x12 - i++ - i = encodeVarintNames(dAtA, i, uint64(m.Owner.Size())) - n1, err := m.Owner.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Expires != 0 { + i = encodeVarintNames(dAtA, i, uint64(m.Expires)) + i-- + dAtA[i] = 0x20 } - i += n1 if len(m.Data) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Data) + copy(dAtA[i:], m.Data) i = encodeVarintNames(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) + i-- + dAtA[i] = 0x1a } - if m.Expires != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintNames(dAtA, i, uint64(m.Expires)) + { + size := m.Owner.Size() + i -= size + if _, err := m.Owner.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintNames(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNames(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintNames(dAtA []byte, offset int, v uint64) int { + offset -= sovNames(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Entry) Size() (n int) { if m == nil { @@ -203,14 +216,7 @@ func (m *Entry) Size() (n int) { } func sovNames(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozNames(x uint64) (n int) { return sovNames(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -388,6 +394,7 @@ func (m *Entry) Unmarshal(dAtA []byte) error { func skipNames(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -419,10 +426,8 @@ func skipNames(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -443,55 +448,30 @@ func skipNames(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthNames } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthNames - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNames - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipNames(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthNames - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupNames + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthNames + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthNames = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNames = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthNames = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNames = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupNames = fmt.Errorf("proto: unexpected end of group") ) diff --git a/execution/registry/registry.pb.go b/execution/registry/registry.pb.go index cc6f5c4b0..1980c798c 100644 --- a/execution/registry/registry.pb.go +++ b/execution/registry/registry.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -24,7 +25,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // NodeIdentity stores and establishes a binding between 4 different types of identifiers, a human readable name, // a advertised network address, a p2p station-to-station key, and a validator key. Updates must be signed @@ -54,7 +55,7 @@ func (m *NodeIdentity) XXX_Unmarshal(b []byte) error { } func (m *NodeIdentity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -123,7 +124,7 @@ var fileDescriptor_41af05d40a615591 = []byte{ func (m *NodeIdentity) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -131,52 +132,66 @@ func (m *NodeIdentity) Marshal() (dAtA []byte, err error) { } func (m *NodeIdentity) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeIdentity) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Moniker) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRegistry(dAtA, i, uint64(len(m.Moniker))) - i += copy(dAtA[i:], m.Moniker) - } - if len(m.NetworkAddress) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRegistry(dAtA, i, uint64(len(m.NetworkAddress))) - i += copy(dAtA[i:], m.NetworkAddress) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - dAtA[i] = 0x1a - i++ - i = encodeVarintRegistry(dAtA, i, uint64(m.TendermintNodeID.Size())) - n1, err := m.TendermintNodeID.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.ValidatorPublicKey.Size() + i -= size + if _, err := m.ValidatorPublicKey.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRegistry(dAtA, i, uint64(size)) } - i += n1 + i-- dAtA[i] = 0x22 - i++ - i = encodeVarintRegistry(dAtA, i, uint64(m.ValidatorPublicKey.Size())) - n2, err := m.ValidatorPublicKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.TendermintNodeID.Size() + i -= size + if _, err := m.TendermintNodeID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRegistry(dAtA, i, uint64(size)) } - i += n2 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x1a + if len(m.NetworkAddress) > 0 { + i -= len(m.NetworkAddress) + copy(dAtA[i:], m.NetworkAddress) + i = encodeVarintRegistry(dAtA, i, uint64(len(m.NetworkAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Moniker) > 0 { + i -= len(m.Moniker) + copy(dAtA[i:], m.Moniker) + i = encodeVarintRegistry(dAtA, i, uint64(len(m.Moniker))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintRegistry(dAtA []byte, offset int, v uint64) int { + offset -= sovRegistry(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *NodeIdentity) Size() (n int) { if m == nil { @@ -203,14 +218,7 @@ func (m *NodeIdentity) Size() (n int) { } func sovRegistry(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRegistry(x uint64) (n int) { return sovRegistry(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -402,6 +410,7 @@ func (m *NodeIdentity) Unmarshal(dAtA []byte) error { func skipRegistry(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -433,10 +442,8 @@ func skipRegistry(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -457,55 +464,30 @@ func skipRegistry(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthRegistry } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthRegistry - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRegistry - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipRegistry(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthRegistry - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRegistry + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthRegistry + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthRegistry = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRegistry = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthRegistry = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRegistry = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRegistry = fmt.Errorf("proto: unexpected end of group") ) diff --git a/genesis/spec/spec.pb.go b/genesis/spec/spec.pb.go index 6afe7cc50..dc7643094 100644 --- a/genesis/spec/spec.pb.go +++ b/genesis/spec/spec.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -27,7 +28,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type TemplateAccount struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` @@ -51,7 +52,7 @@ func (m *TemplateAccount) XXX_Unmarshal(b []byte) error { } func (m *TemplateAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -148,7 +149,7 @@ var fileDescriptor_423806180556987f = []byte{ func (m *TemplateAccount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -156,102 +157,107 @@ func (m *TemplateAccount) Marshal() (dAtA []byte, err error) { } func (m *TemplateAccount) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TemplateAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSpec(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Address != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintSpec(dAtA, i, uint64(m.Address.Size())) - n1, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Code != nil { + { + size := m.Code.Size() + i -= size + if _, err := m.Code.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintSpec(dAtA, i, uint64(size)) } - i += n1 + i-- + dAtA[i] = 0x3a } - if m.PublicKey != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintSpec(dAtA, i, uint64(m.PublicKey.Size())) - n2, err := m.PublicKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Roles) > 0 { + for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Roles[iNdEx]) + copy(dAtA[i:], m.Roles[iNdEx]) + i = encodeVarintSpec(dAtA, i, uint64(len(m.Roles[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Permissions) > 0 { + for iNdEx := len(m.Permissions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Permissions[iNdEx]) + copy(dAtA[i:], m.Permissions[iNdEx]) + i = encodeVarintSpec(dAtA, i, uint64(len(m.Permissions[iNdEx]))) + i-- + dAtA[i] = 0x2a } - i += n2 } if len(m.Amounts) > 0 { - for _, msg := range m.Amounts { + for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSpec(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x22 - i++ - i = encodeVarintSpec(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + } + } + if m.PublicKey != nil { + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n - } - } - if len(m.Permissions) > 0 { - for _, s := range m.Permissions { - dAtA[i] = 0x2a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.Roles) > 0 { - for _, s := range m.Roles { - dAtA[i] = 0x32 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) + i -= size + i = encodeVarintSpec(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a } - if m.Code != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintSpec(dAtA, i, uint64(m.Code.Size())) - n3, err := m.Code.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Address != nil { + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintSpec(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintSpec(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintSpec(dAtA []byte, offset int, v uint64) int { + offset -= sovSpec(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *TemplateAccount) Size() (n int) { if m == nil { @@ -300,14 +306,7 @@ func (m *TemplateAccount) Size() (n int) { } func sovSpec(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozSpec(x uint64) (n int) { return sovSpec(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -605,6 +604,7 @@ func (m *TemplateAccount) Unmarshal(dAtA []byte) error { func skipSpec(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -636,10 +636,8 @@ func skipSpec(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -660,55 +658,30 @@ func skipSpec(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthSpec } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthSpec - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSpec - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipSpec(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthSpec - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSpec + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthSpec + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthSpec = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSpec = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthSpec = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSpec = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSpec = fmt.Errorf("proto: unexpected end of group") ) diff --git a/js/README.md b/js/README.md index ca5e17f47..99db26c3c 100644 --- a/js/README.md +++ b/js/README.md @@ -1,13 +1,9 @@ -# @monax/burrow (Alpha) +# @hyperledger/burrow -This is a JavaScript API for communicating with a [Hyperledger Burrow](https://github.com/hyperledger/burrow) server, which implements the GRPC spec. +This is a TypeScript API for communicating with a [Hyperledger Burrow](https://github.com/hyperledger/burrow) server, which implements the GRPC spec. [![npm version][npm-image]][npm-url] -## New Library - -Previously our client libs were broken into two components `@monax/legacy-db.js` and `@monax/legacy-contract.js`. These have both been replaced by this library `@monax/burrow`. This upgrade was part of a major re-write on the back-end and as such ONLY `@monax/burrow` SHOULD BE USED WITH BURROW VERSIONS GREATER THAN 0.20.0. There is NO BACKWARDS COMPATIBILITY of this lib with versions of burrow less than 0.20.0. There will be a short guide below for upgrading existing applications to new burrow versions. - ## Version compatibility -This lib's version is pegged to burrow's version on the minor. So @monax/burrow at version X.Y.^ will work with burrow version X.Y.^ where ^ means latest patch version. The patch version numbering will not always correspond. If you are having difficulties getting this lib to work with a burrow release please first make sure you have the latest patch version of each. \ No newline at end of file +This lib's version is pegged to burrow's version on the minor. So @hyperledger/burrow at version X.Y.^ will work with burrow version X.Y.^ where ^ means latest patch version. The patch version numbering will not always correspond. If you are having difficulties getting this lib to work with a burrow release please first make sure you have the latest patch version of each. \ No newline at end of file diff --git a/js/index.js b/js/index.js deleted file mode 100644 index c47f3410e..000000000 --- a/js/index.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @file index.js - * @fileOverview Index file for the Burrow javascript API. This file contains a factory method - * for creating a new Burrow instance. - * @author Andreas Olofsson - * @module index - */ -'use strict' - -var Burrow = require('./lib/Burrow') -var utils = require('./lib/utils/utils') - -module.exports = { - createInstance: Burrow.createInstance, - Burrow: Burrow, - utils: utils -} diff --git a/js/lib/Burrow.js b/js/lib/Burrow.js deleted file mode 100644 index 7b1606c38..000000000 --- a/js/lib/Burrow.js +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file Burrow.js - * @fileOverview Factory module for the Burrow class. - * @author Dennis Mckinnon - * @module Burrow - */ - -'use strict' - -var Service = require('./service') -var events = require('./events.js') - -var Pipe = require('./pipe') -var ContractManager = require('./contractManager') -var Namereg = require('./namereg') - -/** - * Create a new instance of the Burrow class. - * - * @param {string} URL - URL of Burrow instance. - * @returns {Burrow} - A new instance of the Burrow class. - */ -exports.createInstance = function (URL, account, options) { - URL = (typeof URL === 'string' ? URL : URL.host + ':' + URL.port) - return new Burrow(URL, account, options) -} - -/** - * The main class. - * - * @param {string} URL - URL of Burrow instance. - * @constructor - */ -function Burrow (URL, account, options) { - this.URL = URL - this.tag = options.tag - - if (!account) { - this.readonly = true - this.account = null - } else { - this.readonly = false - this.account = account - } - - this.executionEvents = Service('rpcevents.proto', 'rpcevents', 'ExecutionEvents', URL) - - this.transact = Service('rpctransact.proto', 'rpctransact', 'Transact', URL) - this.query = Service('rpcquery.proto', 'rpcquery', 'Query', URL) - - // This is the execution events streaming service running on top of the raw streaming function. - this.events = events(this) - - // Contracts stuff running on top of grpc - this.pipe = new Pipe(this) - this.contracts = new ContractManager(this, options) - - this.namereg = new Namereg(this) -} diff --git a/js/lib/contractManager.js b/js/lib/contractManager.js deleted file mode 100644 index 3c6b60f59..000000000 --- a/js/lib/contractManager.js +++ /dev/null @@ -1,112 +0,0 @@ -/** - * @file contractManager.js - * @author Dennis Mckinnon - * @date 2018 - * @module contracts - */ - -var Contract = require('./contracts/contract') - -var defaultHandlers = { - call: function (result) { - // console.log(result) - return result.raw - }, - con: function (result) { - // console.log(result) - return result.contractAddress - } -} - -var nullHandler = function (result) { return result } - -function ContractManager (burrow, options) { - options = Object.assign({ objectReturn: false }, options) - var handlers = Object.assign({}, defaultHandlers, options.handlers) - this.burrow = burrow - this.handlers = handlers - - // In the future change the default handler to use nullhandler by default - if (options.objectReturn) { - this.handlers.call = nullHandler - } else { - console.log('DEPRECATION WARNING. In the future the default behaviour of contract calls will be to return the full result object (instead of an array of arguments)') - console.log('If you wish to keep existing behaviour you can recreate it by using a handler function for calls.') - console.log('This can be done by passing {handlers: {call: function(result){return result.raw}} as an option to burrow object creation (new burrow(URL, account, options))') - } -} - -/** - * Should be called to create new contract on a blockchain - * - * @method new - * @param {Object} abi object (required) - * @param {string} byteCode - Hex encoded bytecode of contact - * @param {*} [contract] constructor param1 (optional) - * @param {*} [contract] constructor param2 (optional) - * @param {Function} callback (optional) - * @param {Object} Handlers (optional) - * @returns {Contract} returns a promise if no callback provided - */ -ContractManager.prototype.deploy = function () { - // parse arguments - var callback = null - var handlers = Object.assign({}, this.handlers) - - var args = Array.prototype.slice.call(arguments) - if (args[args.length - 1] instanceof Object) { - handlers = Object.assign(handlers, args.pop()) - } - - if (args[args.length - 1] instanceof Function) { - callback = args.pop() - } - - // TODO just pass in the bytecode and set it don't do this merging - var abi = args.shift() - var byteCode = args.shift() - - var contract = new Contract(abi, null, byteCode, this.burrow, handlers) - var P = contract._constructor.apply(contract, args).then((address) => { contract.address = address; return contract }) - - if (callback) { - P.then((contract) => { return callback(null, contract) }) - .catch((err) => { return callback(err) }) - } else { - return P.then(() => { return contract }) - } -} - -/** - * Creates a contract object interface from an abi - * - * @method new - * @param {Object} abi - abi object for contract - * @param {string} byteCode - Hex encoded bytecode of contact [can be null] - * @param {string} address - default contract address [can be null] - * @returns {Contract} returns contract interface object - */ -ContractManager.prototype.new = function (abi, byteCode, address, handlers) { - handlers = Object.assign({}, this.handlers, handlers) - return new Contract(abi, address, byteCode, this.burrow, handlers) -} - -/** - * Creates a contract object interface from an address without ABI. - * The contract must be deployed using a recent burrow deploy which registers - * metadata. - * - * @method address - * @param {string} address - default contract address [can be null] - * @returns {Contract} returns contract interface object - */ -ContractManager.prototype.address = function (address, handlers) { - handlers = Object.assign({}, this.handlers, handlers) - return this.burrow.query.GetMetadata({ Address: Buffer.from(address, 'hex') }) - .then((data) => { - const abi = JSON.parse(data.Metadata).Abi - return this.burrow.contracts.new(abi, null, address, handlers) - }) -} - -module.exports = ContractManager diff --git a/js/lib/contracts/contract.js b/js/lib/contracts/contract.js deleted file mode 100644 index 8e844003e..000000000 --- a/js/lib/contracts/contract.js +++ /dev/null @@ -1,95 +0,0 @@ -'use strict' - -var SolidityEvent = require('./event') -var SolidityFunction = require('./function') - -/** - * The contract type. This class is instantiated internally through the factory. - * - * @method Contract - * @param {Array} abi - * @param {string} address - * @param {pipe} pipe; - * @param {Function} outputFormatter - the output formatter. - */ -var Contract = function (abi, address, code, burrow, handlers) { - this.address = address - this.abi = abi - this.code = code - this.burrow = burrow - this.handlers = handlers - - addFunctionsToContract(this) - addEventsToContract(this) -} - -/** - * Should be called to add functions to contract object - * - * @method addFunctionsToContract - * @param {Contract} contract - * @param {Array} abi - * TODO - * @param {function} pipe - The pipe (added internally). - * @param {function} outputFormatter - the output formatter (added internally). - */ - -var addFunctionsToContract = function (contract) { - contract.abi.filter(function (json) { - return (json.type === 'function' || json.type === 'constructor') - }).forEach(function (json) { - let {displayName, typeName, call, encode, decode} = SolidityFunction(json) - - if (json.type === 'constructor') { - contract._constructor = call.bind(contract, false, contract.handlers.con, '') - } else { - // bind the function call to the contract, specify if call or transact is desired - var execute = call.bind(contract, json.constant, contract.handlers.call, null) - execute.sim = call.bind(contract, true, contract.handlers.call, null) - // These allow the interface to be used for a generic contract of this type - execute.at = call.bind(contract, json.constant, contract.handlers.call) - execute.atSim = call.bind(contract, true, contract.handlers.call) - - execute.encode = encode.bind(contract) - execute.decode = decode.bind(contract) - - // Attach to the contract object - if (!contract[displayName]) { - contract[displayName] = execute - } - contract[displayName][typeName] = execute - } - }) - - // Not every abi has a constructor specification. - // If it doesn't we force a _constructor with null abi - if (!contract._constructor) { - let {call} = SolidityFunction(null) - contract._constructor = call.bind(contract, false, contract.handlers.con, '') - } -} - -/** - * Should be called to add events to contract object - * - * @method addEventsToContract - * @param {Contract} contract - * @param {Array} abi - */ -var addEventsToContract = function (contract) { - contract.abi.filter(function (json) { - return json.type === 'event' - }).forEach(function (json) { - let {displayName, typeName, call} = SolidityEvent(json) - - var execute = call.bind(contract, null) - execute.once = call.bind(contract, null) - execute.at = call.bind(contract) - if (!contract[displayName]) { - contract[displayName] = execute - } - contract[displayName][typeName] = call.bind(contract) - }) -} - -module.exports = Contract diff --git a/js/lib/contracts/event.js b/js/lib/contracts/event.js deleted file mode 100644 index 04a43493e..000000000 --- a/js/lib/contracts/event.js +++ /dev/null @@ -1,79 +0,0 @@ -var utils = require('../utils/utils') -var coder = require('ethereumjs-abi') -var convert = require('../utils/convert') -var sha3 = require('../utils/sha3') - -/** - * This prototype should be used to create event filters - */ - -var types = function (abi, indexed) { - return abi.inputs.filter(function (i) { - return i.indexed === indexed - }).map(function (i) { - return i.type - }) -} -/** - * Should be used to decode indexed params and options - * - * @method decode - * @param {Object} data - * @return {Object} result object with decoded indexed && not indexed params - */ -var decode = function (abi, data) { - var argTopics = abi.anonymous ? data.Topics : data.Topics.slice(1) - var indexedParamsABI = types(abi, true) - var nonIndexedParamsABI = types(abi, false) - var indexedData = Buffer.concat(argTopics) - var indexedParams = convert.abiToBurrow(indexedParamsABI, coder.rawDecode(indexedParamsABI, indexedData)) - - // var notIndexedData = data.Data.slice(2) - var nonIndexedParams = convert.abiToBurrow(nonIndexedParamsABI, coder.rawDecode(nonIndexedParamsABI, data.Data)) - - // var result = formatters.outputLogFormatter(data); - var result = {} - result.event = utils.transformToFullName(abi) - result.address = data.Address - - result.args = abi.inputs.reduce(function (acc, current) { - acc[current.name] = current.indexed ? indexedParams.shift() : nonIndexedParams.shift() - return acc - }, {}) - - return result -} - -var SolidityEvent = function (abi) { - var name = utils.transformToFullName(abi) - var displayName = utils.extractDisplayName(name) - var typeName = utils.extractTypeName(name) - var signature = sha3(name) - - var call = function (address, callback) { - address = address || this.address - if (!callback) { throw new Error('Can not subscribe to an event without a callback') }; - - return this.burrow.pipe.eventSub(address, signature, (error, event) => { - if (error) return callback(error) - - try { - var decoded = decode(abi, event.Log) - } catch (error) { - return callback(error) - } - - const converted = Object.assign( - {}, - decoded, - {args: decoded.args} - ) - - return callback(null, converted) - }) - } - - return {displayName, typeName, call} -} - -module.exports = SolidityEvent diff --git a/js/lib/contracts/function.js b/js/lib/contracts/function.js deleted file mode 100644 index eb81da314..000000000 --- a/js/lib/contracts/function.js +++ /dev/null @@ -1,192 +0,0 @@ -var utils = require('../utils/utils') -var convert = require('../utils/convert') -// var formatters = require('./formatters'); -var sha3 = require('../utils/sha3') -var coder = require('ethereumjs-abi') - -var config = require('../utils/config') -var ZERO_ADDRESS = Buffer.from('0000000000000000000000000000000000000000', 'hex') - -var functionSig = function (abi) { - var name = utils.transformToFullName(abi) - return sha3(name).slice(0, 8) -} - -var types = function (args) { - return args.map(function (arg) { - return arg.type - }) -} - -var txPayload = function (data, account, address) { - var payload = {} - - payload.Input = {Address: Buffer.from(account || ZERO_ADDRESS, 'hex'), Amount: 0} - payload.Address = address ? Buffer.from(address, 'hex') : null - payload.GasLimit = config.DEFAULT_GAS - payload.Fee = 0 - payload.Data = Buffer.from(data, 'hex') - - return payload -} - -var encodeF = function (abi, args, bytecode) { - if (abi) { - var abiInputs = types(abi.inputs) - args = convert.burrowToAbi(abiInputs, args) // If abi is passed, convert values accordingly - } - - // If bytecode provided then this is a creation call, bytecode goes first - if (bytecode) { - var data = bytecode - if (abi) data += convert.bytesTB(coder.rawEncode(abiInputs, args)) - return data - } else { - return functionSig(abi) + convert.bytesTB(coder.rawEncode(abiInputs, args)) - } -} - -var decodeF = function (abi, output) { - if (!output) { - return - } - - var outputs = abi.outputs - var outputTypes = types(outputs) - - // Decode raw bytes to arguments - var raw = convert.abiToBurrow(outputTypes, coder.rawDecode(outputTypes, Buffer.from(output, 'hex'))) - - // If an object is wanted, - var result = {raw: raw.slice()} - - var args = outputs.reduce(function (acc, current) { - var value = raw.shift() - if (current.name) { - acc[current.name] = value - } - return acc - }, {}) - - result.values = args - - return result -} - -/** - * Calls a contract function. - * - * @method call - * @param {...Object} Contract function arguments - * @param {function} - * @return {String} output bytes - */ -var SolidityFunction = function (abi) { - var isCon = (abi == null || abi.type === 'constructor') - var name - var displayName - var typeName - - if (!isCon) { - name = utils.transformToFullName(abi) - displayName = utils.extractDisplayName(name) - typeName = utils.extractTypeName(name) - } - - // It might seem weird to include copies of the functions in here and above - // My reason is the code above can be used "functionally" whereas this version - // Uses implicit attributes of this object. - // I want to keep them separate in the case that we want to move all the functional - // components together and maybe even... write tests for them (gasp!) - var encode = function () { - var args = Array.prototype.slice.call(arguments) - return encodeF(abi, args, isCon ? this.code : null) - } - - var decode = function (data) { - return decodeF(abi, data, this.objectReturn) - } - - var call = function () { - var args = Array.prototype.slice.call(arguments) - var isSim = args.shift() - var handler = args.shift() || function (result) { return result } - var address = args.shift() || this.address - - if (isCon) { address = null } - - var callback - if (utils.isFunction(args[args.length - 1])) { callback = args.pop() }; - - var self = this - - var P = new Promise(function (resolve, reject) { - if (address == null && !isCon) reject(new Error('Address not provided to call')) - if (abi != null && abi.inputs.length !== args.length) reject(new Error('Insufficient arguments passed to function: ' + (isCon ? 'constructor' : name))) - // Post process the return - var post = function (error, result) { - if (error) return reject(error) - - // Handle execution reversions - if (result.Exception && result.Exception.Code === 17) { - // Decode error message if there is one otherwise default - if (result.Result.Return.length === 0) { - error = new Error('Execution Reverted') - } else { - // Strip first 4 bytes(function signature) the decode as a string - error = new Error(coder.rawDecode(['string'], result.Result.Return.slice(4))[0]) - } - error.code = 'ERR_EXECUTION_REVERT' - return reject(error) - } - - // Unpack return arguments - var returnObj = {} - if (!isCon) { - try { - returnObj = decodeF(abi, result.Result.Return, self.objectReturn) - } catch (e) { - return reject(e) - } - } - - // Meta Data (address, caller, height, etc) - returnObj.contractAddress = result.Receipt.ContractAddress.toString('hex').toUpperCase() - returnObj.height = result.Header.Height - returnObj.index = result.Header.Index - returnObj.hash = result.Header.TxHash.toString('hex').toUpperCase() - returnObj.type = result.Header.TxType - returnObj.result = result.Result - returnObj.tx = result.Envelope - returnObj.caller = convert.recApply(result.Envelope.Signatories, convert.bytesTB) - - return resolve(returnObj) - } - - // Decide if to make a "call" or a "transaction" - // For the moment we need to use the burrowtoweb3 function to prefix bytes with 0x - // otherwise the coder will give an error with bugnumber not a number - // TODO investigate if other libs or an updated lib will fix this - // var data = encodeF(abi, utils.burrowToWeb3(args), isCon ? self.code : null) - var data = encodeF(abi, args, isCon ? self.code : null) - var payload = txPayload(data, self.burrow.account || ZERO_ADDRESS, address) - - if (isSim) { - self.burrow.pipe.call(payload, post) - } else { - self.burrow.pipe.transact(payload, post) - } - }) - - if (callback) { - P.then(handler).then((result) => { return callback(null, result) }) - .catch((err) => { return callback(err) }) - } else { - return P.then(handler) - } - } - - return {displayName, typeName, call, encode, decode} -} - -module.exports = SolidityFunction diff --git a/js/lib/events.js b/js/lib/events.js deleted file mode 100644 index c100cb282..000000000 --- a/js/lib/events.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict' - -function Events (burrow) { - this.burrow = burrow -} - -module.exports = function (burrow) { - return new Events(burrow) -} - -Events.prototype.listen = function (Query, options, callback) { - // TODO Construct blockrange from options - var BlockRange = { - Start: { - Type: 3, - Index: 0 - }, - End: { - Type: 4, - Index: 0 - } - } - - return this.burrow.executionEvents.Events({ BlockRange, Query }, function (err, data) { - if (err) { - return callback(err) - } - for (var i = 0; i < data.Events.length; i++) { - callback(null, data.Events[i]) - }; - }) -} - -Events.prototype.subContractEvents = function (address, signature, options, callback) { - var filter = "EventType = 'LogEvent' AND Address = '" + address.toUpperCase() + "'" + " AND Log0 = '" + signature.toUpperCase() + "'" - return this.listen(filter, {}, callback) -} diff --git a/js/lib/namereg.js b/js/lib/namereg.js deleted file mode 100644 index bacbf6f6b..000000000 --- a/js/lib/namereg.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict' - -function Namereg (burrow) { - this.burrow = burrow -} - -Namereg.prototype.set = function (name, data, lease, callback) { - var payload = {} - payload.Input = { Address: Buffer.from(this.burrow.account, 'hex'), Amount: 50000 } - payload.Name = name - payload.Data = data - payload.Fee = 5000// 1 * lease * (data.length + 32); - return this.burrow.transact.NameTxSync(payload, callback) -} - -Namereg.prototype.get = function (name, callback) { - var payload = { Name: name } - return this.burrow.query.GetName(payload, callback) -} - -module.exports = Namereg diff --git a/js/lib/pipe.js b/js/lib/pipe.js deleted file mode 100644 index bbc272ed8..000000000 --- a/js/lib/pipe.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * @file dev_pipe.js - * @fileOverview Base class for the dev-pipe. - * @author Andreas Olofsson - * @module pipe/dev_pipe - */ -'use strict' - -/** - * Constructor for the Pipe class. - * - * @type {Pipe} - */ -module.exports = Pipe - -/** - * DevPipe transacts using the unsafe private-key transactions. - * - * @param {*} burrow - the burrow object. - * @param {string} accounts - the private key to use when sending transactions. NOTE: This means a private key - * will be passed over the net, so it should only be used when developing, or if it's 100% certain that the - * Burrow server and this script runs on the same machine, or communication is secure. The recommended way - * will be to call a signing function on the client side, like in a browser plugin. - * - * @constructor - */ -function Pipe (burrow) { - this.burrow = burrow -} - -/** - * Used to send a transaction. - * @param {module:solidity/function~TxPayload} txPayload - The payload object. - * @param callback - The error-first callback. The 'data' param is a contract address in the case of a - * create transactions, otherwise it's the return value. - */ -Pipe.prototype.transact = function (txPayload, callback) { - this.burrow.transact.CallTxSync(txPayload, callback) -} - -/** - * Used to do a call. - * @param {module:solidity/function~TxPayload} txPayload - The payload object. - * @param callback - The error-first callback. - */ -Pipe.prototype.call = function (txPayload, callback) { - this.burrow.transact.CallTxSim(txPayload, callback) -} - -/** - * Used to subscribe to Solidity events from a given account. - * - * @param {string} accountAddress - the address of the account. - * @param {function} createCallback - error-first callback. The data object is the EventSub object. - * @param {function} eventCallback - error-first callback. The data object is a solidity event object. - */ -Pipe.prototype.eventSub = function (accountAddress, signature, callback) { - return this.burrow.events.subContractEvents(accountAddress, signature, {}, callback) -} - -Pipe.prototype.burrow = function () { - return this.burrow -} diff --git a/js/lib/service.js b/js/lib/service.js deleted file mode 100644 index c831cde74..000000000 --- a/js/lib/service.js +++ /dev/null @@ -1,103 +0,0 @@ -'use strict' - -var protoLoader = require('@grpc/proto-loader') -var grpc = require('grpc') -var protobuf = require('protobufjs') -var path = require('path') - -const PROTO_PATH = path.join(__dirname, '../../protobuf/') -const GITHUB_PATH = path.join(PROTO_PATH, 'github.com/') - -const options = { - keepCase: true, - longs: String, - enums: String, - defaults: true, - oneofs: true, - includeDirs: [PROTO_PATH, GITHUB_PATH] -} - -function removeNested (object) { - if (!object) return - - var newObject = {} - - for (var key in object) { - if (key === 'nested') { - return removeNested(object.nested) - } - - if (typeof object[key] === 'object' && object[key].constructor === Object) { - newObject[key] = removeNested(object[key]) - } else { - newObject[key] = object[key] - } - } - return newObject -} - -function wrapGRPC (name) { - return function (params, callback) { - // Fetch requestType and ResponseType - var pName = this.packageName - var sName = this.serviceName - - var reqStream = this.pbJSON[pName][sName].methods[name].requestStream - var resStream = this.pbJSON[pName][sName].methods[name].responseStream - - if (reqStream) { - throw new Error("Can't call a requestStream method") - } - - if (resStream) { - if (!callback) throw new Error('Callback not provided') - - var call = this.client[name](params) - call.on('data', (data) => { - callback(null, data) - }) - call.on('error', (error) => { - callback(error) - }) - // Return a function that will close the stream when called - return () => { - console.log('WARNING: stream closing is not implemented') - } - } else { - // Make call through client - var P = new Promise((resolve, reject) => { - this.client[name](params, function (err, result) { - if (err) return reject(err) - resolve(result) - }) - }) - if (callback) { - return P.then((result) => { callback(null, result) }).catch((err) => { callback(err) }) - } else { - return P - } - } - } -} - -function Service (filePath, packageName, serviceName, URL) { - this.URL = URL - this.packageName = packageName - this.serviceName = serviceName - - filePath = PROTO_PATH + filePath - var protoPackage = protoLoader.loadSync(filePath, options) - - this.service = grpc.loadPackageDefinition(protoPackage) - this.pbJSON = removeNested(protobuf.loadSync(filePath).toJSON()) - - this.client = new this.service[packageName][serviceName](URL, grpc.credentials.createInsecure()) - - for (var method in this.pbJSON[packageName][serviceName].methods) { - this[method] = wrapGRPC(method).bind(this) - } -} - -module.exports = function (file, packageName, serviceName, URL) { - return new Service(file, packageName, serviceName, URL) -} diff --git a/js/lib/test.js b/js/lib/test.js deleted file mode 100644 index d2c8de56e..000000000 --- a/js/lib/test.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict' - -const Burrow = require('..') -const url = require('url') -const Solidity = require('solc') - -const blockchainUrl = (urlObj) => { - var envUrl = {} - if (process.env.BURROW_GRPC_PORT) envUrl.port = process.env.BURROW_GRPC_PORT - if (process.env.BURROW_HOST) envUrl.hostname = process.env.BURROW_HOST - - urlObj = Object.assign({ port: '20997', hostname: '127.0.0.1' }, envUrl, urlObj) - return url.format(urlObj) -} - -// Convenience function to compile Solidity code in tests. -const compile = (source, name) => { - const compiled = Solidity.compile(source, 1) - if (compiled.errors) { - throw new Error(compiled.errors) - } - const contract = compiled.contracts[name] - const abi = JSON.parse(contract.interface) - const bytecode = contract.bytecode - - return { abi, bytecode } -} - -// Return a contract manager in the test harness. -const Test = (options) => { - options = options || {} - const urlString = (typeof options.url === 'string' ? options.url : blockchainUrl(options.url)) - delete options.url - let account - let burrow - - return { - before: (burrowOptions, callback) => - function () { - if (typeof burrowOptions === 'function') { - callback = burrowOptions - burrowOptions = {} - } - if (!burrowOptions) burrowOptions = {} - - try { - account = JSON.parse(process.env.account) - } catch (err) { - return Promise.reject(new Error('Could not parse required account JSON: ' + process.env.account + ' Make sure you are passing a valid account json string as an env var account=\'{accountdata}\'')) - } - - // Options overrules defaults - // burrowOptions = Object.assign(burrowOptions, options) - - burrow = Burrow.createInstance(urlString, account.address, burrowOptions) - - if (callback) { - return callback(burrow) // eslint-disable-line - } - }, - - it: (callback) => - function () { - return callback(burrow) // eslint-disable-line - }, - - after: () => - function () { - } - } -} - -module.exports = { - compile, - Test -} diff --git a/js/lib/utils/config.js b/js/lib/utils/config.js deleted file mode 100644 index 146854965..000000000 --- a/js/lib/utils/config.js +++ /dev/null @@ -1,10 +0,0 @@ - -/** @file config.js - * @author Dennis Mckinnon - * @date 2019 - * @module utils/config - */ - -module.exports = { - DEFAULT_GAS: 1111111111 -} diff --git a/js/lib/utils/convert.js b/js/lib/utils/convert.js deleted file mode 100644 index dfe04cf0b..000000000 --- a/js/lib/utils/convert.js +++ /dev/null @@ -1,84 +0,0 @@ - -var recApply = function (arg, func) { - let newArg - if (Array.isArray(arg)) { - newArg = [] - for (var i = 0; i < arg.length; i++) { - newArg.push(recApply(arg[i], func)) - }; - } else { - newArg = func(arg) - } - return newArg -} - -var addressTB = function (arg) { - return arg.toUpperCase() -} - -var addressTA = function (arg) { - if (!/^0x/i.test(arg)) { - return '0x' + arg - } - return arg -} - -var bytesTB = function (arg) { - return arg.toString('hex').toUpperCase() -} - -var bytesTA = function (arg) { - if (typeof (arg) === 'string' && /^0x/i.test(arg)) { - arg = arg.slice(2) - } - return Buffer.from(arg, 'hex') - // if (!/^0x/i.test(arg)) { - // return '0x' + arg - // } - // return arg -} - -var numberTB = function (arg) { - return arg.toNumber() -} - -var abiToBurrow = function (puts, args) { - var out = [] - for (var i = 0; i < puts.length; i++) { - if (/address/i.test(puts[i])) { - out.push(recApply(args[i], addressTB)) - } else if (/bytes/i.test(puts[i])) { - out.push(recApply(args[i], bytesTB)) - } else if (/int/i.test(puts[i])) { - out.push(recApply(args[i], numberTB)) - } else { - out.push(args[i]) - } - }; - return out -} - -var burrowToAbi = function (puts, args) { - var out = [] - for (var i = 0; i < puts.length; i++) { - if (/address/i.test(puts[i])) { - out.push(recApply(args[i], addressTA)) - } else if (/bytes/i.test(puts[i])) { - out.push(recApply(args[i], bytesTA)) - } else { - out.push(args[i]) - } - }; - return out -} - -module.exports = { - abiToBurrow: abiToBurrow, - burrowToAbi: burrowToAbi, - addressTA: addressTA, - addressTB: addressTB, - bytesTA: bytesTA, - bytesTB: bytesTB, - numberTB: numberTB, - recApply: recApply -} diff --git a/js/lib/utils/sha3.js b/js/lib/utils/sha3.js deleted file mode 100644 index c74ac50b4..000000000 --- a/js/lib/utils/sha3.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @file sha3.js - * @author Marek Kotewicz - * @author Andreas Olofsson - * @date 2015 - * @module utils/sha3 - */ -var utils = require('./utils') -var sha3 = require('crypto-js/sha3') - -module.exports = function (str, isNew) { - if (str.substr(0, 2) === '0x' && !isNew) { - console.warn('requirement of using web3.fromAscii before sha3 is deprecated') - console.warn('new usage: \'web3.sha3("hello")\'') - console.warn('see https://github.com/ethereum/web3.js/pull/205') - console.warn('if you need to hash hex value, you can do \'sha3("0xfff", true)\'') - str = utils.toAscii(str) - } - - return sha3(str, { - outputLength: 256 - }).toString().toUpperCase() -} diff --git a/js/lib/utils/utils.js b/js/lib/utils/utils.js deleted file mode 100644 index 6d79aab36..000000000 --- a/js/lib/utils/utils.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @file utils.js - * @author Marek Kotewicz - * @author Andreas Olofsson - * @date 2015 - * @module utils/utils - */ - -/** - * Should be used to create full function/event name from json abi - * - * @method transformToFullName - * @param {Object} json - json-abi - * @return {String} full fnction/event name - */ -var transformToFullName = function (json) { - if (json.name.indexOf('(') !== -1) { - return json.name - } - - var typeName = json.inputs.map(function (i) { - return i.type - }).join() - return json.name + '(' + typeName + ')' -} - -/** - * Should be called to get display name of contract function - * - * @method extractDisplayName - * @param {String} name of function/event - * @returns {String} display name for function/event eg. multiply(uint256) -> multiply - */ -var extractDisplayName = function (name) { - var length = name.indexOf('(') - return length !== -1 ? name.substr(0, length) : name -} - -/** - * - * @param {String} name - the name. - * @returns {String} overloaded part of function/event name - */ -var extractTypeName = function (name) { - /// TODO: make it invulnerable - var length = name.indexOf('(') - return length !== -1 ? name.substr(length + 1, name.length - 1 - (length + 1)).replace(' ', '') : '' -} - -/** - * Returns true if object is function, otherwise false - * - * @method isFunction - * @param {Object} object - object to test - * @return {Boolean} - */ -var isFunction = function (object) { - return typeof object === 'function' -} - -module.exports = { - transformToFullName: transformToFullName, - extractDisplayName: extractDisplayName, - extractTypeName: extractTypeName, - isFunction: isFunction -} diff --git a/js/package-lock.json b/js/package-lock.json new file mode 100644 index 000000000..0cf85fcf5 --- /dev/null +++ b/js/package-lock.json @@ -0,0 +1,2622 @@ +{ + "name": "@hyperledger/burrow", + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "requires": { + "@types/node": "*" + } + }, + "@types/bytebuffer": { + "version": "5.0.40", + "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.40.tgz", + "integrity": "sha512-h48dyzZrPMz25K6Q4+NCwWaxwXany2FhQg/ErOcdZS1ZpsaDnDMZg8JYLMTGz7uvXKrcKGJUZJlZObyfgdaN9g==", + "requires": { + "@types/long": "*", + "@types/node": "*" + } + }, + "@types/ethereumjs-abi": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@types/ethereumjs-abi/-/ethereumjs-abi-0.6.3.tgz", + "integrity": "sha512-DnHvqPkrJS5w4yZexTa5bdPNb8IyKPYciou0+zZCIg5fpzvGtyptTvshy0uZKzti2/k/markwjlxWRBWt7Mjuw==", + "requires": { + "@types/node": "*" + } + }, + "@types/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", + "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" + }, + "@types/mocha": { + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", + "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", + "dev": true + }, + "@types/node": { + "version": "13.1.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.8.tgz", + "integrity": "sha512-6XzyyNM9EKQW4HKuzbo/CkOIjn/evtCmsU+MUM1xDfJ+3/rNjBttM1NgN7AOQvN6tP1Sl1D1PIKMreTArnxM9A==" + }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "arg": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.2.tgz", + "integrity": "sha512-+ytCkGcBtHZ3V2r2Z06AncYO8jz46UEamcspGoU8lHcEbpn6J77QK0vdWvChsclg/tM5XIJC5tnjmPp7Eq6Obg==" + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "ascli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", + "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", + "requires": { + "colour": "~0.7.1", + "optjs": "~3.2.2" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "bn.js": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "buffer": { + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", + "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "bytebuffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", + "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", + "requires": { + "long": "~3" + } + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colour": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", + "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" + }, + "command-exists": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.8.tgz", + "integrity": "sha512-PM54PkseWbiiD/mMsbvW351/u+dafwTJ0ye2qB60G1aGQP9j3xK2gmMDc+R34L3nDtx4qMCitXT75mkbkGJDLw==" + }, + "commander": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", + "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + }, + "drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "requires": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + } + }, + "elliptic": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + } + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "es-abstract": { + "version": "1.17.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.3.tgz", + "integrity": "sha512-AwiVPKf3sKGMoWtFw0J7Y4MTZ4Iek67k4COWOwHqS8B9TOZ71DCfcoBmdamy8Y6mj4MDz0+VNUpC2HKHFHA3pg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "ethereumjs-abi": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", + "requires": { + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + } + } + }, + "ethereumjs-util": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", + "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "0.1.6", + "keccak": "^2.0.0", + "rlp": "^2.2.3", + "secp256k1": "^3.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + } + } + }, + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + } + }, + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "google-protobuf": { + "version": "3.11.2", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.11.2.tgz", + "integrity": "sha512-T4fin7lcYLUPj2ChUZ4DvfuuHtg3xi1621qeRZt2J7SvOQusOzq+sDT4vbotWTCjUXJoR36CA016LlhtPy80uQ==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "grpc": { + "version": "1.24.2", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.24.2.tgz", + "integrity": "sha512-EG3WH6AWMVvAiV15d+lr+K77HJ/KV/3FvMpjKjulXHbTwgDZkhkcWbwhxFAoTdxTkQvy0WFcO3Nog50QBbHZWw==", + "requires": { + "@types/bytebuffer": "^5.0.40", + "lodash.camelcase": "^4.3.0", + "lodash.clone": "^4.5.0", + "nan": "^2.13.2", + "node-pre-gyp": "^0.14.0", + "protobufjs": "^5.0.3" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.3", + "bundled": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "debug": { + "version": "3.2.6", + "bundled": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true + }, + "fs-minipass": { + "version": "1.2.7", + "bundled": true, + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.4", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.3", + "bundled": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "bundled": true + }, + "minipass": { + "version": "2.9.0", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "bundled": true, + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "bundled": true + } + } + }, + "ms": { + "version": "2.1.2", + "bundled": true + }, + "needle": { + "version": "2.4.0", + "bundled": true, + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.14.0", + "bundled": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4.4.2" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true + }, + "npm-packlist": { + "version": "1.4.6", + "bundled": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "process-nextick-args": { + "version": "2.0.1", + "bundled": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.7.1", + "bundled": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true + }, + "sax": { + "version": "1.2.4", + "bundled": true + }, + "semver": { + "version": "5.7.1", + "bundled": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true + }, + "tar": { + "version": "4.4.13", + "bundled": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "yallist": { + "version": "3.1.1", + "bundled": true + } + } + }, + "grpc-tools": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.8.1.tgz", + "integrity": "sha512-CvZLshEDbum8ZtB8r3bn6JsrHs3L7S1jf7PTa02nZSLmcLTKbiXH5UYrte06Kh7SdzFmkxPMaOsys2rCs+HRjA==", + "dev": true, + "requires": { + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "needle": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "dev": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.6.0", + "bundled": true, + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "keccak": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", + "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", + "requires": { + "bindings": "^1.5.0", + "inherits": "^2.0.4", + "nan": "^2.14.0", + "safe-buffer": "^5.2.0" + } + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + }, + "lodash.clone": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", + "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=" + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + }, + "make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==" + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "mem": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + } + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mocha": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz", + "integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "2.2.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "ms": "2.1.1", + "node-environment-flags": "1.0.5", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.2.2", + "yargs-parser": "13.0.0", + "yargs-unparser": "1.5.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + } + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", + "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.0.0" + } + } + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-environment-flags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", + "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "optjs": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", + "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true + }, + "p-limit": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "protobufjs": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", + "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", + "requires": { + "ascli": "~1", + "bytebuffer": "~5", + "glob": "^7.0.5", + "yargs": "^3.10.0" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rlp": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.4.tgz", + "integrity": "sha512-fdq2yYCWpAQBhwkZv+Z8o/Z4sPmYm1CUq6P7n6lVTOdb949CnqA0sndXal5C1NleSVSZm6q5F3iEbauyVln/iw==", + "requires": { + "bn.js": "^4.11.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + } + } + }, + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + }, + "secp256k1": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", + "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", + "requires": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.5.2", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + } + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "sha3": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.1.tgz", + "integrity": "sha512-hj6dCLbWByenZarg2gb2VFD9zoY5kr/FMriDcbtVDLJ5geOWGOJCI0jQUjAzoY/ZHlkt8BSEbh9KJEDT8AGuJQ==", + "requires": { + "buffer": "5.4.3" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "solc": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.6.1.tgz", + "integrity": "sha512-iKqNYps2p++x8L9sBg7JeAJb7EmW8VJ/2asAzwlLYcUhj86AzuWLe94UTSQHv1SSCCj/x6lya8twvXkZtlTbIQ==", + "requires": { + "command-exists": "^1.2.8", + "commander": "3.0.2", + "fs-extra": "^0.30.0", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-support": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string.prototype.trimleft": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", + "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", + "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "ts-node": { + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.6.2.tgz", + "integrity": "sha512-4mZEbofxGqLL2RImpe3zMJukvEvcO1XP8bj8ozBPySdCUXEcU5cIRwR0aM3R+VoZq7iXc8N86NC0FspGRqP4gg==", + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.6", + "yn": "3.1.1" + } + }, + "ts-protoc-gen": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/ts-protoc-gen/-/ts-protoc-gen-0.12.0.tgz", + "integrity": "sha512-V7jnICJxKqalBrnJSMTW5tB9sGi48gOC325bfcM7TDNUItVOlaMM//rQmuo49ybipk/SyJTnWXgtJnhHCevNJw==", + "dev": true, + "requires": { + "google-protobuf": "^3.6.1" + } + }, + "typescript": { + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", + "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==" + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + } + }, + "yargs-parser": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", + "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } + } + }, + "yargs-unparser": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", + "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.11", + "yargs": "^12.0.5" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + } + } +} diff --git a/package.json b/js/package.json similarity index 54% rename from package.json rename to js/package.json index 688175dda..1e066c029 100644 --- a/package.json +++ b/js/package.json @@ -1,33 +1,33 @@ { "name": "@hyperledger/burrow", - "description": "Javascript library that calls a Hyperledger Burrow server over rpc.", - "main": "./js/index.js", + "description": "TypeScript library that calls a Hyperledger Burrow server over GRPC.", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "author": { "name": "Dennis Mckinnon" }, "files": [ - "js", - "protobuf" + "dist", + "proto" ], "bugs": { "url": "https://github.com/hyperledger/burrow/issues" }, "dependencies": { - "@grpc/proto-loader": "^0.4.0", - "crypto-js": "^3.1.9-1", + "@types/ethereumjs-abi": "^0.6.3", "ethereumjs-abi": "^0.6.8", - "grpc": "^1.23.0", - "nan": "^2.14.0", - "protobufjs": "^6.8.6" + "bn.js": "^5.1.1", + "grpc": "^1.24.2", + "sha3": "^2.1.1", + "solc": "^0.6.1", + "ts-node": "^8.6.2", + "typescript": "^3.7.4" }, "devDependencies": { - "fs-extra": "^7.0.1", + "@types/mocha": "^5.2.7", "mocha": "6.2.0", - "solc": "^0.4.26", - "standard": "13.1.0" - }, - "engines": { - "node": ">=6" + "grpc-tools": "^1.8.1", + "ts-protoc-gen": "^0.12.0" }, "homepage": "https://github.com/hyperledger/burrow/", "keywords": [ @@ -55,19 +55,7 @@ "url": "git+https://github.com/hyperledger/burrow.git" }, "scripts": { - "precommit": "standard --fix js/**/*.js", - "pretest": "standard --fix js/**/*.js", - "test": "./tests/js/js.sh" - }, - "standard": { - "globals": [ - "after", - "afterEach", - "before", - "beforeEach", - "describe", - "it", - "run" - ] + "build": "tsc --build", + "test": "./test.sh 'src/test/*.test.ts'" } } diff --git a/js/proto/acm_grpc_pb.d.ts b/js/proto/acm_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/acm_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/acm_grpc_pb.js b/js/proto/acm_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/acm_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/acm_pb.d.ts b/js/proto/acm_pb.d.ts new file mode 100644 index 000000000..c5dff84aa --- /dev/null +++ b/js/proto/acm_pb.d.ts @@ -0,0 +1,116 @@ +// package: acm +// file: acm.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as permission_pb from "./permission_pb"; +import * as crypto_pb from "./crypto_pb"; + +export class Account extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + hasPublickey(): boolean; + clearPublickey(): void; + getPublickey(): crypto_pb.PublicKey | undefined; + setPublickey(value?: crypto_pb.PublicKey): void; + + getSequence(): number; + setSequence(value: number): void; + + getBalance(): number; + setBalance(value: number): void; + + getEvmcode(): Uint8Array | string; + getEvmcode_asU8(): Uint8Array; + getEvmcode_asB64(): string; + setEvmcode(value: Uint8Array | string): void; + + hasPermissions(): boolean; + clearPermissions(): void; + getPermissions(): permission_pb.AccountPermissions | undefined; + setPermissions(value?: permission_pb.AccountPermissions): void; + + getWasmcode(): Uint8Array | string; + getWasmcode_asU8(): Uint8Array; + getWasmcode_asB64(): string; + setWasmcode(value: Uint8Array | string): void; + + getNativename(): string; + setNativename(value: string): void; + + getCodehash(): Uint8Array | string; + getCodehash_asU8(): Uint8Array; + getCodehash_asB64(): string; + setCodehash(value: Uint8Array | string): void; + + clearContractmetaList(): void; + getContractmetaList(): Array; + setContractmetaList(value: Array): void; + addContractmeta(value?: ContractMeta, index?: number): ContractMeta; + + getForebear(): Uint8Array | string; + getForebear_asU8(): Uint8Array; + getForebear_asB64(): string; + setForebear(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Account.AsObject; + static toObject(includeInstance: boolean, msg: Account): Account.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Account, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Account; + static deserializeBinaryFromReader(message: Account, reader: jspb.BinaryReader): Account; +} + +export namespace Account { + export type AsObject = { + address: Uint8Array | string, + publickey?: crypto_pb.PublicKey.AsObject, + sequence: number, + balance: number, + evmcode: Uint8Array | string, + permissions?: permission_pb.AccountPermissions.AsObject, + wasmcode: Uint8Array | string, + nativename: string, + codehash: Uint8Array | string, + contractmetaList: Array, + forebear: Uint8Array | string, + } +} + +export class ContractMeta extends jspb.Message { + getCodehash(): Uint8Array | string; + getCodehash_asU8(): Uint8Array; + getCodehash_asB64(): string; + setCodehash(value: Uint8Array | string): void; + + getMetadatahash(): Uint8Array | string; + getMetadatahash_asU8(): Uint8Array; + getMetadatahash_asB64(): string; + setMetadatahash(value: Uint8Array | string): void; + + getMetadata(): string; + setMetadata(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractMeta.AsObject; + static toObject(includeInstance: boolean, msg: ContractMeta): ContractMeta.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractMeta, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractMeta; + static deserializeBinaryFromReader(message: ContractMeta, reader: jspb.BinaryReader): ContractMeta; +} + +export namespace ContractMeta { + export type AsObject = { + codehash: Uint8Array | string, + metadatahash: Uint8Array | string, + metadata: string, + } +} + diff --git a/js/proto/acm_pb.js b/js/proto/acm_pb.js new file mode 100644 index 000000000..d68eb3976 --- /dev/null +++ b/js/proto/acm_pb.js @@ -0,0 +1,875 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var permission_pb = require('./permission_pb.js'); +goog.object.extend(proto, permission_pb); +var crypto_pb = require('./crypto_pb.js'); +goog.object.extend(proto, crypto_pb); +goog.exportSymbol('proto.acm.Account', null, global); +goog.exportSymbol('proto.acm.ContractMeta', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.acm.Account = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.acm.Account.repeatedFields_, null); +}; +goog.inherits(proto.acm.Account, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.acm.Account.displayName = 'proto.acm.Account'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.acm.ContractMeta = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.acm.ContractMeta, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.acm.ContractMeta.displayName = 'proto.acm.ContractMeta'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.acm.Account.repeatedFields_ = [9]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.acm.Account.prototype.toObject = function(opt_includeInstance) { + return proto.acm.Account.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.acm.Account} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.acm.Account.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + publickey: (f = msg.getPublickey()) && crypto_pb.PublicKey.toObject(includeInstance, f), + sequence: jspb.Message.getFieldWithDefault(msg, 3, 0), + balance: jspb.Message.getFieldWithDefault(msg, 4, 0), + evmcode: msg.getEvmcode_asB64(), + permissions: (f = msg.getPermissions()) && permission_pb.AccountPermissions.toObject(includeInstance, f), + wasmcode: msg.getWasmcode_asB64(), + nativename: jspb.Message.getFieldWithDefault(msg, 11, ""), + codehash: msg.getCodehash_asB64(), + contractmetaList: jspb.Message.toObjectList(msg.getContractmetaList(), + proto.acm.ContractMeta.toObject, includeInstance), + forebear: msg.getForebear_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.acm.Account} + */ +proto.acm.Account.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.acm.Account; + return proto.acm.Account.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.acm.Account} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.acm.Account} + */ +proto.acm.Account.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = new crypto_pb.PublicKey; + reader.readMessage(value,crypto_pb.PublicKey.deserializeBinaryFromReader); + msg.setPublickey(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEvmcode(value); + break; + case 6: + var value = new permission_pb.AccountPermissions; + reader.readMessage(value,permission_pb.AccountPermissions.deserializeBinaryFromReader); + msg.setPermissions(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWasmcode(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setNativename(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCodehash(value); + break; + case 9: + var value = new proto.acm.ContractMeta; + reader.readMessage(value,proto.acm.ContractMeta.deserializeBinaryFromReader); + msg.addContractmeta(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setForebear(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.acm.Account.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.acm.Account.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.acm.Account} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.acm.Account.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPublickey(); + if (f != null) { + writer.writeMessage( + 2, + f, + crypto_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getBalance(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getEvmcode_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getPermissions(); + if (f != null) { + writer.writeMessage( + 6, + f, + permission_pb.AccountPermissions.serializeBinaryToWriter + ); + } + f = message.getWasmcode_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getNativename(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } + f = message.getCodehash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getContractmetaList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.acm.ContractMeta.serializeBinaryToWriter + ); + } + f = message.getForebear_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, + f + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.acm.Account.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.acm.Account.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.acm.Account.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.acm.Account.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional crypto.PublicKey PublicKey = 2; + * @return {?proto.crypto.PublicKey} + */ +proto.acm.Account.prototype.getPublickey = function() { + return /** @type{?proto.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, crypto_pb.PublicKey, 2)); +}; + + +/** @param {?proto.crypto.PublicKey|undefined} value */ +proto.acm.Account.prototype.setPublickey = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.acm.Account.prototype.clearPublickey = function() { + this.setPublickey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.acm.Account.prototype.hasPublickey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 Sequence = 3; + * @return {number} + */ +proto.acm.Account.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.acm.Account.prototype.setSequence = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 Balance = 4; + * @return {number} + */ +proto.acm.Account.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.acm.Account.prototype.setBalance = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes EVMCode = 5; + * @return {!(string|Uint8Array)} + */ +proto.acm.Account.prototype.getEvmcode = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes EVMCode = 5; + * This is a type-conversion wrapper around `getEvmcode()` + * @return {string} + */ +proto.acm.Account.prototype.getEvmcode_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEvmcode())); +}; + + +/** + * optional bytes EVMCode = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEvmcode()` + * @return {!Uint8Array} + */ +proto.acm.Account.prototype.getEvmcode_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEvmcode())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.acm.Account.prototype.setEvmcode = function(value) { + jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional permission.AccountPermissions Permissions = 6; + * @return {?proto.permission.AccountPermissions} + */ +proto.acm.Account.prototype.getPermissions = function() { + return /** @type{?proto.permission.AccountPermissions} */ ( + jspb.Message.getWrapperField(this, permission_pb.AccountPermissions, 6)); +}; + + +/** @param {?proto.permission.AccountPermissions|undefined} value */ +proto.acm.Account.prototype.setPermissions = function(value) { + jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.acm.Account.prototype.clearPermissions = function() { + this.setPermissions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.acm.Account.prototype.hasPermissions = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes WASMCode = 7; + * @return {!(string|Uint8Array)} + */ +proto.acm.Account.prototype.getWasmcode = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes WASMCode = 7; + * This is a type-conversion wrapper around `getWasmcode()` + * @return {string} + */ +proto.acm.Account.prototype.getWasmcode_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getWasmcode())); +}; + + +/** + * optional bytes WASMCode = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getWasmcode()` + * @return {!Uint8Array} + */ +proto.acm.Account.prototype.getWasmcode_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getWasmcode())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.acm.Account.prototype.setWasmcode = function(value) { + jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional string NativeName = 11; + * @return {string} + */ +proto.acm.Account.prototype.getNativename = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** @param {string} value */ +proto.acm.Account.prototype.setNativename = function(value) { + jspb.Message.setProto3StringField(this, 11, value); +}; + + +/** + * optional bytes CodeHash = 8; + * @return {!(string|Uint8Array)} + */ +proto.acm.Account.prototype.getCodehash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes CodeHash = 8; + * This is a type-conversion wrapper around `getCodehash()` + * @return {string} + */ +proto.acm.Account.prototype.getCodehash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCodehash())); +}; + + +/** + * optional bytes CodeHash = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCodehash()` + * @return {!Uint8Array} + */ +proto.acm.Account.prototype.getCodehash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCodehash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.acm.Account.prototype.setCodehash = function(value) { + jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * repeated ContractMeta ContractMeta = 9; + * @return {!Array} + */ +proto.acm.Account.prototype.getContractmetaList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.acm.ContractMeta, 9)); +}; + + +/** @param {!Array} value */ +proto.acm.Account.prototype.setContractmetaList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.acm.ContractMeta=} opt_value + * @param {number=} opt_index + * @return {!proto.acm.ContractMeta} + */ +proto.acm.Account.prototype.addContractmeta = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.acm.ContractMeta, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.acm.Account.prototype.clearContractmetaList = function() { + this.setContractmetaList([]); +}; + + +/** + * optional bytes Forebear = 10; + * @return {!(string|Uint8Array)} + */ +proto.acm.Account.prototype.getForebear = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * optional bytes Forebear = 10; + * This is a type-conversion wrapper around `getForebear()` + * @return {string} + */ +proto.acm.Account.prototype.getForebear_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getForebear())); +}; + + +/** + * optional bytes Forebear = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getForebear()` + * @return {!Uint8Array} + */ +proto.acm.Account.prototype.getForebear_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getForebear())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.acm.Account.prototype.setForebear = function(value) { + jspb.Message.setProto3BytesField(this, 10, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.acm.ContractMeta.prototype.toObject = function(opt_includeInstance) { + return proto.acm.ContractMeta.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.acm.ContractMeta} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.acm.ContractMeta.toObject = function(includeInstance, msg) { + var f, obj = { + codehash: msg.getCodehash_asB64(), + metadatahash: msg.getMetadatahash_asB64(), + metadata: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.acm.ContractMeta} + */ +proto.acm.ContractMeta.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.acm.ContractMeta; + return proto.acm.ContractMeta.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.acm.ContractMeta} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.acm.ContractMeta} + */ +proto.acm.ContractMeta.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCodehash(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMetadatahash(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.acm.ContractMeta.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.acm.ContractMeta.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.acm.ContractMeta} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.acm.ContractMeta.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCodehash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getMetadatahash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getMetadata(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional bytes CodeHash = 1; + * @return {!(string|Uint8Array)} + */ +proto.acm.ContractMeta.prototype.getCodehash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes CodeHash = 1; + * This is a type-conversion wrapper around `getCodehash()` + * @return {string} + */ +proto.acm.ContractMeta.prototype.getCodehash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCodehash())); +}; + + +/** + * optional bytes CodeHash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCodehash()` + * @return {!Uint8Array} + */ +proto.acm.ContractMeta.prototype.getCodehash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCodehash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.acm.ContractMeta.prototype.setCodehash = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes MetadataHash = 2; + * @return {!(string|Uint8Array)} + */ +proto.acm.ContractMeta.prototype.getMetadatahash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes MetadataHash = 2; + * This is a type-conversion wrapper around `getMetadatahash()` + * @return {string} + */ +proto.acm.ContractMeta.prototype.getMetadatahash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMetadatahash())); +}; + + +/** + * optional bytes MetadataHash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMetadatahash()` + * @return {!Uint8Array} + */ +proto.acm.ContractMeta.prototype.getMetadatahash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMetadatahash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.acm.ContractMeta.prototype.setMetadatahash = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string Metadata = 3; + * @return {string} + */ +proto.acm.ContractMeta.prototype.getMetadata = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.acm.ContractMeta.prototype.setMetadata = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.acm); diff --git a/js/proto/balance_grpc_pb.d.ts b/js/proto/balance_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/balance_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/balance_grpc_pb.js b/js/proto/balance_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/balance_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/balance_pb.d.ts b/js/proto/balance_pb.d.ts new file mode 100644 index 000000000..1cb67d81c --- /dev/null +++ b/js/proto/balance_pb.d.ts @@ -0,0 +1,30 @@ +// package: balance +// file: balance.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; + +export class Balance extends jspb.Message { + getType(): number; + setType(value: number): void; + + getAmount(): number; + setAmount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Balance.AsObject; + static toObject(includeInstance: boolean, msg: Balance): Balance.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Balance, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Balance; + static deserializeBinaryFromReader(message: Balance, reader: jspb.BinaryReader): Balance; +} + +export namespace Balance { + export type AsObject = { + type: number, + amount: number, + } +} + diff --git a/js/proto/balance_pb.js b/js/proto/balance_pb.js new file mode 100644 index 000000000..f2cefffe7 --- /dev/null +++ b/js/proto/balance_pb.js @@ -0,0 +1,190 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +goog.exportSymbol('proto.balance.Balance', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.balance.Balance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.balance.Balance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.balance.Balance.displayName = 'proto.balance.Balance'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.balance.Balance.prototype.toObject = function(opt_includeInstance) { + return proto.balance.Balance.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.balance.Balance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.balance.Balance.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.balance.Balance} + */ +proto.balance.Balance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.balance.Balance; + return proto.balance.Balance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.balance.Balance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.balance.Balance} + */ +proto.balance.Balance.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.balance.Balance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.balance.Balance.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.balance.Balance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.balance.Balance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint32 Type = 1; + * @return {number} + */ +proto.balance.Balance.prototype.getType = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.balance.Balance.prototype.setType = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 Amount = 2; + * @return {number} + */ +proto.balance.Balance.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.balance.Balance.prototype.setAmount = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.balance); diff --git a/js/proto/bcm_grpc_pb.d.ts b/js/proto/bcm_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/bcm_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/bcm_grpc_pb.js b/js/proto/bcm_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/bcm_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/bcm_pb.d.ts b/js/proto/bcm_pb.d.ts new file mode 100644 index 000000000..b7cad5727 --- /dev/null +++ b/js/proto/bcm_pb.d.ts @@ -0,0 +1,96 @@ +// package: bcm +// file: bcm.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; + +export class SyncInfo extends jspb.Message { + getLatestblockheight(): number; + setLatestblockheight(value: number): void; + + getLatestblockhash(): Uint8Array | string; + getLatestblockhash_asU8(): Uint8Array; + getLatestblockhash_asB64(): string; + setLatestblockhash(value: Uint8Array | string): void; + + getLatestapphash(): Uint8Array | string; + getLatestapphash_asU8(): Uint8Array; + getLatestapphash_asB64(): string; + setLatestapphash(value: Uint8Array | string): void; + + hasLatestblocktime(): boolean; + clearLatestblocktime(): void; + getLatestblocktime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLatestblocktime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + hasLatestblockseentime(): boolean; + clearLatestblockseentime(): void; + getLatestblockseentime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLatestblockseentime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + hasLatestblockduration(): boolean; + clearLatestblockduration(): void; + getLatestblockduration(): google_protobuf_duration_pb.Duration | undefined; + setLatestblockduration(value?: google_protobuf_duration_pb.Duration): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncInfo.AsObject; + static toObject(includeInstance: boolean, msg: SyncInfo): SyncInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncInfo; + static deserializeBinaryFromReader(message: SyncInfo, reader: jspb.BinaryReader): SyncInfo; +} + +export namespace SyncInfo { + export type AsObject = { + latestblockheight: number, + latestblockhash: Uint8Array | string, + latestapphash: Uint8Array | string, + latestblocktime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + latestblockseentime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + latestblockduration?: google_protobuf_duration_pb.Duration.AsObject, + } +} + +export class PersistedState extends jspb.Message { + getApphashafterlastblock(): Uint8Array | string; + getApphashafterlastblock_asU8(): Uint8Array; + getApphashafterlastblock_asB64(): string; + setApphashafterlastblock(value: Uint8Array | string): void; + + hasLastblocktime(): boolean; + clearLastblocktime(): void; + getLastblocktime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastblocktime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getLastblockheight(): number; + setLastblockheight(value: number): void; + + getGenesishash(): Uint8Array | string; + getGenesishash_asU8(): Uint8Array; + getGenesishash_asB64(): string; + setGenesishash(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PersistedState.AsObject; + static toObject(includeInstance: boolean, msg: PersistedState): PersistedState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PersistedState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PersistedState; + static deserializeBinaryFromReader(message: PersistedState, reader: jspb.BinaryReader): PersistedState; +} + +export namespace PersistedState { + export type AsObject = { + apphashafterlastblock: Uint8Array | string, + lastblocktime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + lastblockheight: number, + genesishash: Uint8Array | string, + } +} + diff --git a/js/proto/bcm_pb.js b/js/proto/bcm_pb.js new file mode 100644 index 000000000..277fc2cb7 --- /dev/null +++ b/js/proto/bcm_pb.js @@ -0,0 +1,706 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +goog.exportSymbol('proto.bcm.PersistedState', null, global); +goog.exportSymbol('proto.bcm.SyncInfo', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.bcm.SyncInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bcm.SyncInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bcm.SyncInfo.displayName = 'proto.bcm.SyncInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.bcm.PersistedState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bcm.PersistedState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bcm.PersistedState.displayName = 'proto.bcm.PersistedState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.bcm.SyncInfo.prototype.toObject = function(opt_includeInstance) { + return proto.bcm.SyncInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.bcm.SyncInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bcm.SyncInfo.toObject = function(includeInstance, msg) { + var f, obj = { + latestblockheight: jspb.Message.getFieldWithDefault(msg, 1, 0), + latestblockhash: msg.getLatestblockhash_asB64(), + latestapphash: msg.getLatestapphash_asB64(), + latestblocktime: (f = msg.getLatestblocktime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + latestblockseentime: (f = msg.getLatestblockseentime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + latestblockduration: (f = msg.getLatestblockduration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bcm.SyncInfo} + */ +proto.bcm.SyncInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bcm.SyncInfo; + return proto.bcm.SyncInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bcm.SyncInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bcm.SyncInfo} + */ +proto.bcm.SyncInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLatestblockheight(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLatestblockhash(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLatestapphash(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLatestblocktime(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLatestblockseentime(value); + break; + case 6: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setLatestblockduration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bcm.SyncInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.bcm.SyncInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bcm.SyncInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bcm.SyncInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLatestblockheight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getLatestblockhash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getLatestapphash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getLatestblocktime(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLatestblockseentime(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLatestblockduration(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 LatestBlockHeight = 1; + * @return {number} + */ +proto.bcm.SyncInfo.prototype.getLatestblockheight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.bcm.SyncInfo.prototype.setLatestblockheight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes LatestBlockHash = 2; + * @return {!(string|Uint8Array)} + */ +proto.bcm.SyncInfo.prototype.getLatestblockhash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes LatestBlockHash = 2; + * This is a type-conversion wrapper around `getLatestblockhash()` + * @return {string} + */ +proto.bcm.SyncInfo.prototype.getLatestblockhash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLatestblockhash())); +}; + + +/** + * optional bytes LatestBlockHash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLatestblockhash()` + * @return {!Uint8Array} + */ +proto.bcm.SyncInfo.prototype.getLatestblockhash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLatestblockhash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.bcm.SyncInfo.prototype.setLatestblockhash = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes LatestAppHash = 3; + * @return {!(string|Uint8Array)} + */ +proto.bcm.SyncInfo.prototype.getLatestapphash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes LatestAppHash = 3; + * This is a type-conversion wrapper around `getLatestapphash()` + * @return {string} + */ +proto.bcm.SyncInfo.prototype.getLatestapphash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLatestapphash())); +}; + + +/** + * optional bytes LatestAppHash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLatestapphash()` + * @return {!Uint8Array} + */ +proto.bcm.SyncInfo.prototype.getLatestapphash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLatestapphash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.bcm.SyncInfo.prototype.setLatestapphash = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp LatestBlockTime = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.bcm.SyncInfo.prototype.getLatestblocktime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +proto.bcm.SyncInfo.prototype.setLatestblocktime = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.bcm.SyncInfo.prototype.clearLatestblocktime = function() { + this.setLatestblocktime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bcm.SyncInfo.prototype.hasLatestblocktime = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Timestamp LatestBlockSeenTime = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.bcm.SyncInfo.prototype.getLatestblockseentime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +proto.bcm.SyncInfo.prototype.setLatestblockseentime = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.bcm.SyncInfo.prototype.clearLatestblockseentime = function() { + this.setLatestblockseentime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bcm.SyncInfo.prototype.hasLatestblockseentime = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Duration LatestBlockDuration = 6; + * @return {?proto.google.protobuf.Duration} + */ +proto.bcm.SyncInfo.prototype.getLatestblockduration = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 6)); +}; + + +/** @param {?proto.google.protobuf.Duration|undefined} value */ +proto.bcm.SyncInfo.prototype.setLatestblockduration = function(value) { + jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.bcm.SyncInfo.prototype.clearLatestblockduration = function() { + this.setLatestblockduration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bcm.SyncInfo.prototype.hasLatestblockduration = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.bcm.PersistedState.prototype.toObject = function(opt_includeInstance) { + return proto.bcm.PersistedState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.bcm.PersistedState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bcm.PersistedState.toObject = function(includeInstance, msg) { + var f, obj = { + apphashafterlastblock: msg.getApphashafterlastblock_asB64(), + lastblocktime: (f = msg.getLastblocktime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + lastblockheight: jspb.Message.getFieldWithDefault(msg, 3, 0), + genesishash: msg.getGenesishash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bcm.PersistedState} + */ +proto.bcm.PersistedState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bcm.PersistedState; + return proto.bcm.PersistedState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bcm.PersistedState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bcm.PersistedState} + */ +proto.bcm.PersistedState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setApphashafterlastblock(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastblocktime(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLastblockheight(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setGenesishash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bcm.PersistedState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.bcm.PersistedState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bcm.PersistedState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bcm.PersistedState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getApphashafterlastblock_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getLastblocktime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLastblockheight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getGenesishash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional bytes AppHashAfterLastBlock = 1; + * @return {!(string|Uint8Array)} + */ +proto.bcm.PersistedState.prototype.getApphashafterlastblock = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes AppHashAfterLastBlock = 1; + * This is a type-conversion wrapper around `getApphashafterlastblock()` + * @return {string} + */ +proto.bcm.PersistedState.prototype.getApphashafterlastblock_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getApphashafterlastblock())); +}; + + +/** + * optional bytes AppHashAfterLastBlock = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getApphashafterlastblock()` + * @return {!Uint8Array} + */ +proto.bcm.PersistedState.prototype.getApphashafterlastblock_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getApphashafterlastblock())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.bcm.PersistedState.prototype.setApphashafterlastblock = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp LastBlockTime = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.bcm.PersistedState.prototype.getLastblocktime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +proto.bcm.PersistedState.prototype.setLastblocktime = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.bcm.PersistedState.prototype.clearLastblocktime = function() { + this.setLastblocktime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bcm.PersistedState.prototype.hasLastblocktime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 LastBlockHeight = 3; + * @return {number} + */ +proto.bcm.PersistedState.prototype.getLastblockheight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.bcm.PersistedState.prototype.setLastblockheight = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes GenesisHash = 4; + * @return {!(string|Uint8Array)} + */ +proto.bcm.PersistedState.prototype.getGenesishash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes GenesisHash = 4; + * This is a type-conversion wrapper around `getGenesishash()` + * @return {string} + */ +proto.bcm.PersistedState.prototype.getGenesishash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getGenesishash())); +}; + + +/** + * optional bytes GenesisHash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getGenesishash()` + * @return {!Uint8Array} + */ +proto.bcm.PersistedState.prototype.getGenesishash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getGenesishash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.bcm.PersistedState.prototype.setGenesishash = function(value) { + jspb.Message.setProto3BytesField(this, 4, value); +}; + + +goog.object.extend(exports, proto.bcm); diff --git a/js/proto/crypto_grpc_pb.d.ts b/js/proto/crypto_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/crypto_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/crypto_grpc_pb.js b/js/proto/crypto_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/crypto_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/crypto_pb.d.ts b/js/proto/crypto_pb.d.ts new file mode 100644 index 000000000..d0c868ff3 --- /dev/null +++ b/js/proto/crypto_pb.d.ts @@ -0,0 +1,90 @@ +// package: crypto +// file: crypto.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; + +export class PublicKey extends jspb.Message { + getCurvetype(): number; + setCurvetype(value: number): void; + + getPublickey(): Uint8Array | string; + getPublickey_asU8(): Uint8Array; + getPublickey_asB64(): string; + setPublickey(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PublicKey.AsObject; + static toObject(includeInstance: boolean, msg: PublicKey): PublicKey.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PublicKey, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PublicKey; + static deserializeBinaryFromReader(message: PublicKey, reader: jspb.BinaryReader): PublicKey; +} + +export namespace PublicKey { + export type AsObject = { + curvetype: number, + publickey: Uint8Array | string, + } +} + +export class PrivateKey extends jspb.Message { + getCurvetype(): number; + setCurvetype(value: number): void; + + getPublickey(): Uint8Array | string; + getPublickey_asU8(): Uint8Array; + getPublickey_asB64(): string; + setPublickey(value: Uint8Array | string): void; + + getPrivatekey(): Uint8Array | string; + getPrivatekey_asU8(): Uint8Array; + getPrivatekey_asB64(): string; + setPrivatekey(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PrivateKey.AsObject; + static toObject(includeInstance: boolean, msg: PrivateKey): PrivateKey.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PrivateKey, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PrivateKey; + static deserializeBinaryFromReader(message: PrivateKey, reader: jspb.BinaryReader): PrivateKey; +} + +export namespace PrivateKey { + export type AsObject = { + curvetype: number, + publickey: Uint8Array | string, + privatekey: Uint8Array | string, + } +} + +export class Signature extends jspb.Message { + getCurvetype(): number; + setCurvetype(value: number): void; + + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Signature.AsObject; + static toObject(includeInstance: boolean, msg: Signature): Signature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Signature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Signature; + static deserializeBinaryFromReader(message: Signature, reader: jspb.BinaryReader): Signature; +} + +export namespace Signature { + export type AsObject = { + curvetype: number, + signature: Uint8Array | string, + } +} + diff --git a/js/proto/crypto_pb.js b/js/proto/crypto_pb.js new file mode 100644 index 000000000..9aa32a492 --- /dev/null +++ b/js/proto/crypto_pb.js @@ -0,0 +1,661 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +goog.exportSymbol('proto.crypto.PrivateKey', null, global); +goog.exportSymbol('proto.crypto.PublicKey', null, global); +goog.exportSymbol('proto.crypto.Signature', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.crypto.PublicKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.crypto.PublicKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.crypto.PublicKey.displayName = 'proto.crypto.PublicKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.crypto.PrivateKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.crypto.PrivateKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.crypto.PrivateKey.displayName = 'proto.crypto.PrivateKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.crypto.Signature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.crypto.Signature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.crypto.Signature.displayName = 'proto.crypto.Signature'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.crypto.PublicKey.prototype.toObject = function(opt_includeInstance) { + return proto.crypto.PublicKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.crypto.PublicKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.crypto.PublicKey.toObject = function(includeInstance, msg) { + var f, obj = { + curvetype: jspb.Message.getFieldWithDefault(msg, 1, 0), + publickey: msg.getPublickey_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.crypto.PublicKey} + */ +proto.crypto.PublicKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.crypto.PublicKey; + return proto.crypto.PublicKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.crypto.PublicKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.crypto.PublicKey} + */ +proto.crypto.PublicKey.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCurvetype(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPublickey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.crypto.PublicKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.crypto.PublicKey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.crypto.PublicKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.crypto.PublicKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCurvetype(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getPublickey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional uint32 CurveType = 1; + * @return {number} + */ +proto.crypto.PublicKey.prototype.getCurvetype = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.crypto.PublicKey.prototype.setCurvetype = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes PublicKey = 2; + * @return {!(string|Uint8Array)} + */ +proto.crypto.PublicKey.prototype.getPublickey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes PublicKey = 2; + * This is a type-conversion wrapper around `getPublickey()` + * @return {string} + */ +proto.crypto.PublicKey.prototype.getPublickey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPublickey())); +}; + + +/** + * optional bytes PublicKey = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPublickey()` + * @return {!Uint8Array} + */ +proto.crypto.PublicKey.prototype.getPublickey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPublickey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.crypto.PublicKey.prototype.setPublickey = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.crypto.PrivateKey.prototype.toObject = function(opt_includeInstance) { + return proto.crypto.PrivateKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.crypto.PrivateKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.crypto.PrivateKey.toObject = function(includeInstance, msg) { + var f, obj = { + curvetype: jspb.Message.getFieldWithDefault(msg, 1, 0), + publickey: msg.getPublickey_asB64(), + privatekey: msg.getPrivatekey_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.crypto.PrivateKey} + */ +proto.crypto.PrivateKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.crypto.PrivateKey; + return proto.crypto.PrivateKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.crypto.PrivateKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.crypto.PrivateKey} + */ +proto.crypto.PrivateKey.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCurvetype(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPublickey(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPrivatekey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.crypto.PrivateKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.crypto.PrivateKey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.crypto.PrivateKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.crypto.PrivateKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCurvetype(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getPublickey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getPrivatekey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional uint32 CurveType = 1; + * @return {number} + */ +proto.crypto.PrivateKey.prototype.getCurvetype = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.crypto.PrivateKey.prototype.setCurvetype = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes PublicKey = 2; + * @return {!(string|Uint8Array)} + */ +proto.crypto.PrivateKey.prototype.getPublickey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes PublicKey = 2; + * This is a type-conversion wrapper around `getPublickey()` + * @return {string} + */ +proto.crypto.PrivateKey.prototype.getPublickey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPublickey())); +}; + + +/** + * optional bytes PublicKey = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPublickey()` + * @return {!Uint8Array} + */ +proto.crypto.PrivateKey.prototype.getPublickey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPublickey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.crypto.PrivateKey.prototype.setPublickey = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes PrivateKey = 3; + * @return {!(string|Uint8Array)} + */ +proto.crypto.PrivateKey.prototype.getPrivatekey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes PrivateKey = 3; + * This is a type-conversion wrapper around `getPrivatekey()` + * @return {string} + */ +proto.crypto.PrivateKey.prototype.getPrivatekey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPrivatekey())); +}; + + +/** + * optional bytes PrivateKey = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPrivatekey()` + * @return {!Uint8Array} + */ +proto.crypto.PrivateKey.prototype.getPrivatekey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPrivatekey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.crypto.PrivateKey.prototype.setPrivatekey = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.crypto.Signature.prototype.toObject = function(opt_includeInstance) { + return proto.crypto.Signature.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.crypto.Signature} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.crypto.Signature.toObject = function(includeInstance, msg) { + var f, obj = { + curvetype: jspb.Message.getFieldWithDefault(msg, 1, 0), + signature: msg.getSignature_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.crypto.Signature} + */ +proto.crypto.Signature.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.crypto.Signature; + return proto.crypto.Signature.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.crypto.Signature} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.crypto.Signature} + */ +proto.crypto.Signature.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCurvetype(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.crypto.Signature.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.crypto.Signature.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.crypto.Signature} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.crypto.Signature.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCurvetype(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional uint32 CurveType = 1; + * @return {number} + */ +proto.crypto.Signature.prototype.getCurvetype = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.crypto.Signature.prototype.setCurvetype = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes Signature = 2; + * @return {!(string|Uint8Array)} + */ +proto.crypto.Signature.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Signature = 2; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.crypto.Signature.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes Signature = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.crypto.Signature.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.crypto.Signature.prototype.setSignature = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.crypto); diff --git a/js/proto/dump_grpc_pb.d.ts b/js/proto/dump_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/dump_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/dump_grpc_pb.js b/js/proto/dump_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/dump_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/dump_pb.d.ts b/js/proto/dump_pb.d.ts new file mode 100644 index 000000000..965eb5975 --- /dev/null +++ b/js/proto/dump_pb.d.ts @@ -0,0 +1,146 @@ +// package: dump +// file: dump.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as acm_pb from "./acm_pb"; +import * as exec_pb from "./exec_pb"; +import * as names_pb from "./names_pb"; + +export class Storage extends jspb.Message { + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): void; + + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Storage.AsObject; + static toObject(includeInstance: boolean, msg: Storage): Storage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Storage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Storage; + static deserializeBinaryFromReader(message: Storage, reader: jspb.BinaryReader): Storage; +} + +export namespace Storage { + export type AsObject = { + key: Uint8Array | string, + value: Uint8Array | string, + } +} + +export class AccountStorage extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + clearStorageList(): void; + getStorageList(): Array; + setStorageList(value: Array): void; + addStorage(value?: Storage, index?: number): Storage; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AccountStorage.AsObject; + static toObject(includeInstance: boolean, msg: AccountStorage): AccountStorage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AccountStorage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AccountStorage; + static deserializeBinaryFromReader(message: AccountStorage, reader: jspb.BinaryReader): AccountStorage; +} + +export namespace AccountStorage { + export type AsObject = { + address: Uint8Array | string, + storageList: Array, + } +} + +export class EVMEvent extends jspb.Message { + getChainid(): string; + setChainid(value: string): void; + + getIndex(): number; + setIndex(value: number): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): exec_pb.LogEvent | undefined; + setEvent(value?: exec_pb.LogEvent): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EVMEvent.AsObject; + static toObject(includeInstance: boolean, msg: EVMEvent): EVMEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EVMEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EVMEvent; + static deserializeBinaryFromReader(message: EVMEvent, reader: jspb.BinaryReader): EVMEvent; +} + +export namespace EVMEvent { + export type AsObject = { + chainid: string, + index: number, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + event?: exec_pb.LogEvent.AsObject, + } +} + +export class Dump extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + hasAccount(): boolean; + clearAccount(): void; + getAccount(): acm_pb.Account | undefined; + setAccount(value?: acm_pb.Account): void; + + hasAccountstorage(): boolean; + clearAccountstorage(): void; + getAccountstorage(): AccountStorage | undefined; + setAccountstorage(value?: AccountStorage): void; + + hasEvmevent(): boolean; + clearEvmevent(): void; + getEvmevent(): EVMEvent | undefined; + setEvmevent(value?: EVMEvent): void; + + hasName(): boolean; + clearName(): void; + getName(): names_pb.Entry | undefined; + setName(value?: names_pb.Entry): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Dump.AsObject; + static toObject(includeInstance: boolean, msg: Dump): Dump.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Dump, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Dump; + static deserializeBinaryFromReader(message: Dump, reader: jspb.BinaryReader): Dump; +} + +export namespace Dump { + export type AsObject = { + height: number, + account?: acm_pb.Account.AsObject, + accountstorage?: AccountStorage.AsObject, + evmevent?: EVMEvent.AsObject, + name?: names_pb.Entry.AsObject, + } +} + diff --git a/js/proto/dump_pb.js b/js/proto/dump_pb.js new file mode 100644 index 000000000..88a222784 --- /dev/null +++ b/js/proto/dump_pb.js @@ -0,0 +1,1076 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var acm_pb = require('./acm_pb.js'); +goog.object.extend(proto, acm_pb); +var exec_pb = require('./exec_pb.js'); +goog.object.extend(proto, exec_pb); +var names_pb = require('./names_pb.js'); +goog.object.extend(proto, names_pb); +goog.exportSymbol('proto.dump.AccountStorage', null, global); +goog.exportSymbol('proto.dump.Dump', null, global); +goog.exportSymbol('proto.dump.EVMEvent', null, global); +goog.exportSymbol('proto.dump.Storage', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.dump.Storage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.dump.Storage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.dump.Storage.displayName = 'proto.dump.Storage'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.dump.AccountStorage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.dump.AccountStorage.repeatedFields_, null); +}; +goog.inherits(proto.dump.AccountStorage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.dump.AccountStorage.displayName = 'proto.dump.AccountStorage'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.dump.EVMEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.dump.EVMEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.dump.EVMEvent.displayName = 'proto.dump.EVMEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.dump.Dump = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.dump.Dump, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.dump.Dump.displayName = 'proto.dump.Dump'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.dump.Storage.prototype.toObject = function(opt_includeInstance) { + return proto.dump.Storage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.dump.Storage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.dump.Storage.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.dump.Storage} + */ +proto.dump.Storage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.dump.Storage; + return proto.dump.Storage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.dump.Storage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.dump.Storage} + */ +proto.dump.Storage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.dump.Storage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.dump.Storage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.dump.Storage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.dump.Storage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes Key = 1; + * @return {!(string|Uint8Array)} + */ +proto.dump.Storage.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Key = 1; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.dump.Storage.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes Key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.dump.Storage.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.dump.Storage.prototype.setKey = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes Value = 2; + * @return {!(string|Uint8Array)} + */ +proto.dump.Storage.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Value = 2; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.dump.Storage.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes Value = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.dump.Storage.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.dump.Storage.prototype.setValue = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.dump.AccountStorage.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.dump.AccountStorage.prototype.toObject = function(opt_includeInstance) { + return proto.dump.AccountStorage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.dump.AccountStorage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.dump.AccountStorage.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + storageList: jspb.Message.toObjectList(msg.getStorageList(), + proto.dump.Storage.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.dump.AccountStorage} + */ +proto.dump.AccountStorage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.dump.AccountStorage; + return proto.dump.AccountStorage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.dump.AccountStorage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.dump.AccountStorage} + */ +proto.dump.AccountStorage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = new proto.dump.Storage; + reader.readMessage(value,proto.dump.Storage.deserializeBinaryFromReader); + msg.addStorage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.dump.AccountStorage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.dump.AccountStorage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.dump.AccountStorage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.dump.AccountStorage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getStorageList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.dump.Storage.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.dump.AccountStorage.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.dump.AccountStorage.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.dump.AccountStorage.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.dump.AccountStorage.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * repeated Storage Storage = 2; + * @return {!Array} + */ +proto.dump.AccountStorage.prototype.getStorageList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.dump.Storage, 2)); +}; + + +/** @param {!Array} value */ +proto.dump.AccountStorage.prototype.setStorageList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.dump.Storage=} opt_value + * @param {number=} opt_index + * @return {!proto.dump.Storage} + */ +proto.dump.AccountStorage.prototype.addStorage = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.dump.Storage, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.dump.AccountStorage.prototype.clearStorageList = function() { + this.setStorageList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.dump.EVMEvent.prototype.toObject = function(opt_includeInstance) { + return proto.dump.EVMEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.dump.EVMEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.dump.EVMEvent.toObject = function(includeInstance, msg) { + var f, obj = { + chainid: jspb.Message.getFieldWithDefault(msg, 1, ""), + index: jspb.Message.getFieldWithDefault(msg, 4, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + event: (f = msg.getEvent()) && exec_pb.LogEvent.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.dump.EVMEvent} + */ +proto.dump.EVMEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.dump.EVMEvent; + return proto.dump.EVMEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.dump.EVMEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.dump.EVMEvent} + */ +proto.dump.EVMEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChainid(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIndex(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 3: + var value = new exec_pb.LogEvent; + reader.readMessage(value,exec_pb.LogEvent.deserializeBinaryFromReader); + msg.setEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.dump.EVMEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.dump.EVMEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.dump.EVMEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.dump.EVMEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 3, + f, + exec_pb.LogEvent.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string ChainID = 1; + * @return {string} + */ +proto.dump.EVMEvent.prototype.getChainid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.dump.EVMEvent.prototype.setChainid = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 Index = 4; + * @return {number} + */ +proto.dump.EVMEvent.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.dump.EVMEvent.prototype.setIndex = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp Time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.dump.EVMEvent.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +proto.dump.EVMEvent.prototype.setTime = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.dump.EVMEvent.prototype.clearTime = function() { + this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.dump.EVMEvent.prototype.hasTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional exec.LogEvent Event = 3; + * @return {?proto.exec.LogEvent} + */ +proto.dump.EVMEvent.prototype.getEvent = function() { + return /** @type{?proto.exec.LogEvent} */ ( + jspb.Message.getWrapperField(this, exec_pb.LogEvent, 3)); +}; + + +/** @param {?proto.exec.LogEvent|undefined} value */ +proto.dump.EVMEvent.prototype.setEvent = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.dump.EVMEvent.prototype.clearEvent = function() { + this.setEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.dump.EVMEvent.prototype.hasEvent = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.dump.Dump.prototype.toObject = function(opt_includeInstance) { + return proto.dump.Dump.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.dump.Dump} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.dump.Dump.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + account: (f = msg.getAccount()) && acm_pb.Account.toObject(includeInstance, f), + accountstorage: (f = msg.getAccountstorage()) && proto.dump.AccountStorage.toObject(includeInstance, f), + evmevent: (f = msg.getEvmevent()) && proto.dump.EVMEvent.toObject(includeInstance, f), + name: (f = msg.getName()) && names_pb.Entry.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.dump.Dump} + */ +proto.dump.Dump.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.dump.Dump; + return proto.dump.Dump.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.dump.Dump} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.dump.Dump} + */ +proto.dump.Dump.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = new acm_pb.Account; + reader.readMessage(value,acm_pb.Account.deserializeBinaryFromReader); + msg.setAccount(value); + break; + case 3: + var value = new proto.dump.AccountStorage; + reader.readMessage(value,proto.dump.AccountStorage.deserializeBinaryFromReader); + msg.setAccountstorage(value); + break; + case 4: + var value = new proto.dump.EVMEvent; + reader.readMessage(value,proto.dump.EVMEvent.deserializeBinaryFromReader); + msg.setEvmevent(value); + break; + case 5: + var value = new names_pb.Entry; + reader.readMessage(value,names_pb.Entry.deserializeBinaryFromReader); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.dump.Dump.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.dump.Dump.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.dump.Dump} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.dump.Dump.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getAccount(); + if (f != null) { + writer.writeMessage( + 2, + f, + acm_pb.Account.serializeBinaryToWriter + ); + } + f = message.getAccountstorage(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.dump.AccountStorage.serializeBinaryToWriter + ); + } + f = message.getEvmevent(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.dump.EVMEvent.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f != null) { + writer.writeMessage( + 5, + f, + names_pb.Entry.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 Height = 1; + * @return {number} + */ +proto.dump.Dump.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.dump.Dump.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional acm.Account Account = 2; + * @return {?proto.acm.Account} + */ +proto.dump.Dump.prototype.getAccount = function() { + return /** @type{?proto.acm.Account} */ ( + jspb.Message.getWrapperField(this, acm_pb.Account, 2)); +}; + + +/** @param {?proto.acm.Account|undefined} value */ +proto.dump.Dump.prototype.setAccount = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.dump.Dump.prototype.clearAccount = function() { + this.setAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.dump.Dump.prototype.hasAccount = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional AccountStorage AccountStorage = 3; + * @return {?proto.dump.AccountStorage} + */ +proto.dump.Dump.prototype.getAccountstorage = function() { + return /** @type{?proto.dump.AccountStorage} */ ( + jspb.Message.getWrapperField(this, proto.dump.AccountStorage, 3)); +}; + + +/** @param {?proto.dump.AccountStorage|undefined} value */ +proto.dump.Dump.prototype.setAccountstorage = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.dump.Dump.prototype.clearAccountstorage = function() { + this.setAccountstorage(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.dump.Dump.prototype.hasAccountstorage = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional EVMEvent EVMEvent = 4; + * @return {?proto.dump.EVMEvent} + */ +proto.dump.Dump.prototype.getEvmevent = function() { + return /** @type{?proto.dump.EVMEvent} */ ( + jspb.Message.getWrapperField(this, proto.dump.EVMEvent, 4)); +}; + + +/** @param {?proto.dump.EVMEvent|undefined} value */ +proto.dump.Dump.prototype.setEvmevent = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.dump.Dump.prototype.clearEvmevent = function() { + this.setEvmevent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.dump.Dump.prototype.hasEvmevent = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional names.Entry Name = 5; + * @return {?proto.names.Entry} + */ +proto.dump.Dump.prototype.getName = function() { + return /** @type{?proto.names.Entry} */ ( + jspb.Message.getWrapperField(this, names_pb.Entry, 5)); +}; + + +/** @param {?proto.names.Entry|undefined} value */ +proto.dump.Dump.prototype.setName = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.dump.Dump.prototype.clearName = function() { + this.setName(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.dump.Dump.prototype.hasName = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +goog.object.extend(exports, proto.dump); diff --git a/js/proto/encoding_grpc_pb.d.ts b/js/proto/encoding_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/encoding_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/encoding_grpc_pb.js b/js/proto/encoding_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/encoding_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/encoding_pb.d.ts b/js/proto/encoding_pb.d.ts new file mode 100644 index 000000000..1f900c155 --- /dev/null +++ b/js/proto/encoding_pb.d.ts @@ -0,0 +1,30 @@ +// package: encoding +// file: encoding.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; + +export class TestMessage extends jspb.Message { + getType(): number; + setType(value: number): void; + + getAmount(): number; + setAmount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TestMessage.AsObject; + static toObject(includeInstance: boolean, msg: TestMessage): TestMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TestMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TestMessage; + static deserializeBinaryFromReader(message: TestMessage, reader: jspb.BinaryReader): TestMessage; +} + +export namespace TestMessage { + export type AsObject = { + type: number, + amount: number, + } +} + diff --git a/js/proto/encoding_pb.js b/js/proto/encoding_pb.js new file mode 100644 index 000000000..17cbf7f21 --- /dev/null +++ b/js/proto/encoding_pb.js @@ -0,0 +1,190 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +goog.exportSymbol('proto.encoding.TestMessage', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.encoding.TestMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.encoding.TestMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.encoding.TestMessage.displayName = 'proto.encoding.TestMessage'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.encoding.TestMessage.prototype.toObject = function(opt_includeInstance) { + return proto.encoding.TestMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.encoding.TestMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.encoding.TestMessage.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.encoding.TestMessage} + */ +proto.encoding.TestMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.encoding.TestMessage; + return proto.encoding.TestMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.encoding.TestMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.encoding.TestMessage} + */ +proto.encoding.TestMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.encoding.TestMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.encoding.TestMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.encoding.TestMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.encoding.TestMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint32 Type = 1; + * @return {number} + */ +proto.encoding.TestMessage.prototype.getType = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.encoding.TestMessage.prototype.setType = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 Amount = 2; + * @return {number} + */ +proto.encoding.TestMessage.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.encoding.TestMessage.prototype.setAmount = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.encoding); diff --git a/js/proto/errors_grpc_pb.d.ts b/js/proto/errors_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/errors_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/errors_grpc_pb.js b/js/proto/errors_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/errors_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/errors_pb.d.ts b/js/proto/errors_pb.d.ts new file mode 100644 index 000000000..daac39ee7 --- /dev/null +++ b/js/proto/errors_pb.d.ts @@ -0,0 +1,30 @@ +// package: errors +// file: errors.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; + +export class Exception extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + getException(): string; + setException(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Exception.AsObject; + static toObject(includeInstance: boolean, msg: Exception): Exception.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Exception, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Exception; + static deserializeBinaryFromReader(message: Exception, reader: jspb.BinaryReader): Exception; +} + +export namespace Exception { + export type AsObject = { + code: number, + exception: string, + } +} + diff --git a/js/proto/errors_pb.js b/js/proto/errors_pb.js new file mode 100644 index 000000000..f2d51ba54 --- /dev/null +++ b/js/proto/errors_pb.js @@ -0,0 +1,190 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +goog.exportSymbol('proto.errors.Exception', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.errors.Exception = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.errors.Exception, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.errors.Exception.displayName = 'proto.errors.Exception'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.errors.Exception.prototype.toObject = function(opt_includeInstance) { + return proto.errors.Exception.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.errors.Exception} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.errors.Exception.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + exception: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.errors.Exception} + */ +proto.errors.Exception.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.errors.Exception; + return proto.errors.Exception.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.errors.Exception} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.errors.Exception} + */ +proto.errors.Exception.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setException(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.errors.Exception.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.errors.Exception.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.errors.Exception} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.errors.Exception.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getException(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint32 Code = 1; + * @return {number} + */ +proto.errors.Exception.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.errors.Exception.prototype.setCode = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string Exception = 2; + * @return {string} + */ +proto.errors.Exception.prototype.getException = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.errors.Exception.prototype.setException = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.errors); diff --git a/js/proto/exec_grpc_pb.d.ts b/js/proto/exec_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/exec_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/exec_grpc_pb.js b/js/proto/exec_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/exec_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/exec_pb.d.ts b/js/proto/exec_pb.d.ts new file mode 100644 index 000000000..13611dd94 --- /dev/null +++ b/js/proto/exec_pb.d.ts @@ -0,0 +1,701 @@ +// package: exec +// file: exec.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as github_com_tendermint_tendermint_abci_types_types_pb from "./github.com/tendermint/tendermint/abci/types/types_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as errors_pb from "./errors_pb"; +import * as names_pb from "./names_pb"; +import * as txs_pb from "./txs_pb"; +import * as permission_pb from "./permission_pb"; +import * as spec_pb from "./spec_pb"; + +export class StreamEvents extends jspb.Message { + clearStreameventsList(): void; + getStreameventsList(): Array; + setStreameventsList(value: Array): void; + addStreamevents(value?: StreamEvent, index?: number): StreamEvent; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamEvents.AsObject; + static toObject(includeInstance: boolean, msg: StreamEvents): StreamEvents.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamEvents, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamEvents; + static deserializeBinaryFromReader(message: StreamEvents, reader: jspb.BinaryReader): StreamEvents; +} + +export namespace StreamEvents { + export type AsObject = { + streameventsList: Array, + } +} + +export class StreamEvent extends jspb.Message { + hasBeginblock(): boolean; + clearBeginblock(): void; + getBeginblock(): BeginBlock | undefined; + setBeginblock(value?: BeginBlock): void; + + hasBegintx(): boolean; + clearBegintx(): void; + getBegintx(): BeginTx | undefined; + setBegintx(value?: BeginTx): void; + + hasEnvelope(): boolean; + clearEnvelope(): void; + getEnvelope(): txs_pb.Envelope | undefined; + setEnvelope(value?: txs_pb.Envelope): void; + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): Event | undefined; + setEvent(value?: Event): void; + + hasEndtx(): boolean; + clearEndtx(): void; + getEndtx(): EndTx | undefined; + setEndtx(value?: EndTx): void; + + hasEndblock(): boolean; + clearEndblock(): void; + getEndblock(): EndBlock | undefined; + setEndblock(value?: EndBlock): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamEvent.AsObject; + static toObject(includeInstance: boolean, msg: StreamEvent): StreamEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamEvent; + static deserializeBinaryFromReader(message: StreamEvent, reader: jspb.BinaryReader): StreamEvent; +} + +export namespace StreamEvent { + export type AsObject = { + beginblock?: BeginBlock.AsObject, + begintx?: BeginTx.AsObject, + envelope?: txs_pb.Envelope.AsObject, + event?: Event.AsObject, + endtx?: EndTx.AsObject, + endblock?: EndBlock.AsObject, + } +} + +export class BeginBlock extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + hasHeader(): boolean; + clearHeader(): void; + getHeader(): github_com_tendermint_tendermint_abci_types_types_pb.Header | undefined; + setHeader(value?: github_com_tendermint_tendermint_abci_types_types_pb.Header): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BeginBlock.AsObject; + static toObject(includeInstance: boolean, msg: BeginBlock): BeginBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BeginBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BeginBlock; + static deserializeBinaryFromReader(message: BeginBlock, reader: jspb.BinaryReader): BeginBlock; +} + +export namespace BeginBlock { + export type AsObject = { + height: number, + header?: github_com_tendermint_tendermint_abci_types_types_pb.Header.AsObject, + } +} + +export class EndBlock extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EndBlock.AsObject; + static toObject(includeInstance: boolean, msg: EndBlock): EndBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EndBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EndBlock; + static deserializeBinaryFromReader(message: EndBlock, reader: jspb.BinaryReader): EndBlock; +} + +export namespace EndBlock { + export type AsObject = { + height: number, + } +} + +export class BeginTx extends jspb.Message { + hasTxheader(): boolean; + clearTxheader(): void; + getTxheader(): TxHeader | undefined; + setTxheader(value?: TxHeader): void; + + hasResult(): boolean; + clearResult(): void; + getResult(): Result | undefined; + setResult(value?: Result): void; + + hasException(): boolean; + clearException(): void; + getException(): errors_pb.Exception | undefined; + setException(value?: errors_pb.Exception): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BeginTx.AsObject; + static toObject(includeInstance: boolean, msg: BeginTx): BeginTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BeginTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BeginTx; + static deserializeBinaryFromReader(message: BeginTx, reader: jspb.BinaryReader): BeginTx; +} + +export namespace BeginTx { + export type AsObject = { + txheader?: TxHeader.AsObject, + result?: Result.AsObject, + exception?: errors_pb.Exception.AsObject, + } +} + +export class EndTx extends jspb.Message { + getTxhash(): Uint8Array | string; + getTxhash_asU8(): Uint8Array; + getTxhash_asB64(): string; + setTxhash(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EndTx.AsObject; + static toObject(includeInstance: boolean, msg: EndTx): EndTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EndTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EndTx; + static deserializeBinaryFromReader(message: EndTx, reader: jspb.BinaryReader): EndTx; +} + +export namespace EndTx { + export type AsObject = { + txhash: Uint8Array | string, + } +} + +export class TxHeader extends jspb.Message { + getTxtype(): number; + setTxtype(value: number): void; + + getTxhash(): Uint8Array | string; + getTxhash_asU8(): Uint8Array; + getTxhash_asB64(): string; + setTxhash(value: Uint8Array | string): void; + + getHeight(): number; + setHeight(value: number): void; + + getIndex(): number; + setIndex(value: number): void; + + hasOrigin(): boolean; + clearOrigin(): void; + getOrigin(): Origin | undefined; + setOrigin(value?: Origin): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxHeader.AsObject; + static toObject(includeInstance: boolean, msg: TxHeader): TxHeader.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxHeader, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxHeader; + static deserializeBinaryFromReader(message: TxHeader, reader: jspb.BinaryReader): TxHeader; +} + +export namespace TxHeader { + export type AsObject = { + txtype: number, + txhash: Uint8Array | string, + height: number, + index: number, + origin?: Origin.AsObject, + } +} + +export class BlockExecution extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + hasHeader(): boolean; + clearHeader(): void; + getHeader(): github_com_tendermint_tendermint_abci_types_types_pb.Header | undefined; + setHeader(value?: github_com_tendermint_tendermint_abci_types_types_pb.Header): void; + + clearTxexecutionsList(): void; + getTxexecutionsList(): Array; + setTxexecutionsList(value: Array): void; + addTxexecutions(value?: TxExecution, index?: number): TxExecution; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockExecution.AsObject; + static toObject(includeInstance: boolean, msg: BlockExecution): BlockExecution.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockExecution, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockExecution; + static deserializeBinaryFromReader(message: BlockExecution, reader: jspb.BinaryReader): BlockExecution; +} + +export namespace BlockExecution { + export type AsObject = { + height: number, + header?: github_com_tendermint_tendermint_abci_types_types_pb.Header.AsObject, + txexecutionsList: Array, + } +} + +export class TxExecutionKey extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + getOffset(): number; + setOffset(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxExecutionKey.AsObject; + static toObject(includeInstance: boolean, msg: TxExecutionKey): TxExecutionKey.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxExecutionKey, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxExecutionKey; + static deserializeBinaryFromReader(message: TxExecutionKey, reader: jspb.BinaryReader): TxExecutionKey; +} + +export namespace TxExecutionKey { + export type AsObject = { + height: number, + offset: number, + } +} + +export class TxExecution extends jspb.Message { + hasHeader(): boolean; + clearHeader(): void; + getHeader(): TxHeader | undefined; + setHeader(value?: TxHeader): void; + + hasEnvelope(): boolean; + clearEnvelope(): void; + getEnvelope(): txs_pb.Envelope | undefined; + setEnvelope(value?: txs_pb.Envelope): void; + + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): void; + addEvents(value?: Event, index?: number): Event; + + hasResult(): boolean; + clearResult(): void; + getResult(): Result | undefined; + setResult(value?: Result): void; + + hasReceipt(): boolean; + clearReceipt(): void; + getReceipt(): txs_pb.Receipt | undefined; + setReceipt(value?: txs_pb.Receipt): void; + + hasException(): boolean; + clearException(): void; + getException(): errors_pb.Exception | undefined; + setException(value?: errors_pb.Exception): void; + + clearTxexecutionsList(): void; + getTxexecutionsList(): Array; + setTxexecutionsList(value: Array): void; + addTxexecutions(value?: TxExecution, index?: number): TxExecution; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxExecution.AsObject; + static toObject(includeInstance: boolean, msg: TxExecution): TxExecution.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxExecution, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxExecution; + static deserializeBinaryFromReader(message: TxExecution, reader: jspb.BinaryReader): TxExecution; +} + +export namespace TxExecution { + export type AsObject = { + header?: TxHeader.AsObject, + envelope?: txs_pb.Envelope.AsObject, + eventsList: Array, + result?: Result.AsObject, + receipt?: txs_pb.Receipt.AsObject, + exception?: errors_pb.Exception.AsObject, + txexecutionsList: Array, + } +} + +export class Origin extends jspb.Message { + getChainid(): string; + setChainid(value: string): void; + + getHeight(): number; + setHeight(value: number): void; + + getIndex(): number; + setIndex(value: number): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Origin.AsObject; + static toObject(includeInstance: boolean, msg: Origin): Origin.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Origin, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Origin; + static deserializeBinaryFromReader(message: Origin, reader: jspb.BinaryReader): Origin; +} + +export namespace Origin { + export type AsObject = { + chainid: string, + height: number, + index: number, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class Header extends jspb.Message { + getTxtype(): number; + setTxtype(value: number): void; + + getTxhash(): Uint8Array | string; + getTxhash_asU8(): Uint8Array; + getTxhash_asB64(): string; + setTxhash(value: Uint8Array | string): void; + + getEventtype(): number; + setEventtype(value: number): void; + + getEventid(): string; + setEventid(value: string): void; + + getHeight(): number; + setHeight(value: number): void; + + getIndex(): number; + setIndex(value: number): void; + + hasException(): boolean; + clearException(): void; + getException(): errors_pb.Exception | undefined; + setException(value?: errors_pb.Exception): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Header.AsObject; + static toObject(includeInstance: boolean, msg: Header): Header.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Header; + static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; +} + +export namespace Header { + export type AsObject = { + txtype: number, + txhash: Uint8Array | string, + eventtype: number, + eventid: string, + height: number, + index: number, + exception?: errors_pb.Exception.AsObject, + } +} + +export class Event extends jspb.Message { + hasHeader(): boolean; + clearHeader(): void; + getHeader(): Header | undefined; + setHeader(value?: Header): void; + + hasInput(): boolean; + clearInput(): void; + getInput(): InputEvent | undefined; + setInput(value?: InputEvent): void; + + hasOutput(): boolean; + clearOutput(): void; + getOutput(): OutputEvent | undefined; + setOutput(value?: OutputEvent): void; + + hasCall(): boolean; + clearCall(): void; + getCall(): CallEvent | undefined; + setCall(value?: CallEvent): void; + + hasLog(): boolean; + clearLog(): void; + getLog(): LogEvent | undefined; + setLog(value?: LogEvent): void; + + hasGovernaccount(): boolean; + clearGovernaccount(): void; + getGovernaccount(): GovernAccountEvent | undefined; + setGovernaccount(value?: GovernAccountEvent): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Event.AsObject; + static toObject(includeInstance: boolean, msg: Event): Event.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Event, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Event; + static deserializeBinaryFromReader(message: Event, reader: jspb.BinaryReader): Event; +} + +export namespace Event { + export type AsObject = { + header?: Header.AsObject, + input?: InputEvent.AsObject, + output?: OutputEvent.AsObject, + call?: CallEvent.AsObject, + log?: LogEvent.AsObject, + governaccount?: GovernAccountEvent.AsObject, + } +} + +export class Result extends jspb.Message { + getReturn(): Uint8Array | string; + getReturn_asU8(): Uint8Array; + getReturn_asB64(): string; + setReturn(value: Uint8Array | string): void; + + getGasused(): number; + setGasused(value: number): void; + + hasNameentry(): boolean; + clearNameentry(): void; + getNameentry(): names_pb.Entry | undefined; + setNameentry(value?: names_pb.Entry): void; + + hasPermargs(): boolean; + clearPermargs(): void; + getPermargs(): permission_pb.PermArgs | undefined; + setPermargs(value?: permission_pb.PermArgs): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result; +} + +export namespace Result { + export type AsObject = { + return: Uint8Array | string, + gasused: number, + nameentry?: names_pb.Entry.AsObject, + permargs?: permission_pb.PermArgs.AsObject, + } +} + +export class LogEvent extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + clearTopicsList(): void; + getTopicsList(): Array; + getTopicsList_asU8(): Array; + getTopicsList_asB64(): Array; + setTopicsList(value: Array): void; + addTopics(value: Uint8Array | string, index?: number): Uint8Array | string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LogEvent.AsObject; + static toObject(includeInstance: boolean, msg: LogEvent): LogEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LogEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LogEvent; + static deserializeBinaryFromReader(message: LogEvent, reader: jspb.BinaryReader): LogEvent; +} + +export namespace LogEvent { + export type AsObject = { + address: Uint8Array | string, + data: Uint8Array | string, + topicsList: Array, + } +} + +export class CallEvent extends jspb.Message { + getCalltype(): number; + setCalltype(value: number): void; + + hasCalldata(): boolean; + clearCalldata(): void; + getCalldata(): CallData | undefined; + setCalldata(value?: CallData): void; + + getOrigin(): Uint8Array | string; + getOrigin_asU8(): Uint8Array; + getOrigin_asB64(): string; + setOrigin(value: Uint8Array | string): void; + + getStackdepth(): number; + setStackdepth(value: number): void; + + getReturn(): Uint8Array | string; + getReturn_asU8(): Uint8Array; + getReturn_asB64(): string; + setReturn(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CallEvent.AsObject; + static toObject(includeInstance: boolean, msg: CallEvent): CallEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CallEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CallEvent; + static deserializeBinaryFromReader(message: CallEvent, reader: jspb.BinaryReader): CallEvent; +} + +export namespace CallEvent { + export type AsObject = { + calltype: number, + calldata?: CallData.AsObject, + origin: Uint8Array | string, + stackdepth: number, + return: Uint8Array | string, + } +} + +export class GovernAccountEvent extends jspb.Message { + hasAccountupdate(): boolean; + clearAccountupdate(): void; + getAccountupdate(): spec_pb.TemplateAccount | undefined; + setAccountupdate(value?: spec_pb.TemplateAccount): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GovernAccountEvent.AsObject; + static toObject(includeInstance: boolean, msg: GovernAccountEvent): GovernAccountEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GovernAccountEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GovernAccountEvent; + static deserializeBinaryFromReader(message: GovernAccountEvent, reader: jspb.BinaryReader): GovernAccountEvent; +} + +export namespace GovernAccountEvent { + export type AsObject = { + accountupdate?: spec_pb.TemplateAccount.AsObject, + } +} + +export class InputEvent extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InputEvent.AsObject; + static toObject(includeInstance: boolean, msg: InputEvent): InputEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InputEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InputEvent; + static deserializeBinaryFromReader(message: InputEvent, reader: jspb.BinaryReader): InputEvent; +} + +export namespace InputEvent { + export type AsObject = { + address: Uint8Array | string, + } +} + +export class OutputEvent extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OutputEvent.AsObject; + static toObject(includeInstance: boolean, msg: OutputEvent): OutputEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OutputEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OutputEvent; + static deserializeBinaryFromReader(message: OutputEvent, reader: jspb.BinaryReader): OutputEvent; +} + +export namespace OutputEvent { + export type AsObject = { + address: Uint8Array | string, + } +} + +export class CallData extends jspb.Message { + getCaller(): Uint8Array | string; + getCaller_asU8(): Uint8Array; + getCaller_asB64(): string; + setCaller(value: Uint8Array | string): void; + + getCallee(): Uint8Array | string; + getCallee_asU8(): Uint8Array; + getCallee_asB64(): string; + setCallee(value: Uint8Array | string): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + getValue(): number; + setValue(value: number): void; + + getGas(): number; + setGas(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CallData.AsObject; + static toObject(includeInstance: boolean, msg: CallData): CallData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CallData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CallData; + static deserializeBinaryFromReader(message: CallData, reader: jspb.BinaryReader): CallData; +} + +export namespace CallData { + export type AsObject = { + caller: Uint8Array | string, + callee: Uint8Array | string, + data: Uint8Array | string, + value: number, + gas: number, + } +} + diff --git a/js/proto/exec_pb.js b/js/proto/exec_pb.js new file mode 100644 index 000000000..1240d06e7 --- /dev/null +++ b/js/proto/exec_pb.js @@ -0,0 +1,5315 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var github_com_tendermint_tendermint_abci_types_types_pb = require('./github.com/tendermint/tendermint/abci/types/types_pb.js'); +goog.object.extend(proto, github_com_tendermint_tendermint_abci_types_types_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var errors_pb = require('./errors_pb.js'); +goog.object.extend(proto, errors_pb); +var names_pb = require('./names_pb.js'); +goog.object.extend(proto, names_pb); +var txs_pb = require('./txs_pb.js'); +goog.object.extend(proto, txs_pb); +var permission_pb = require('./permission_pb.js'); +goog.object.extend(proto, permission_pb); +var spec_pb = require('./spec_pb.js'); +goog.object.extend(proto, spec_pb); +goog.exportSymbol('proto.exec.BeginBlock', null, global); +goog.exportSymbol('proto.exec.BeginTx', null, global); +goog.exportSymbol('proto.exec.BlockExecution', null, global); +goog.exportSymbol('proto.exec.CallData', null, global); +goog.exportSymbol('proto.exec.CallEvent', null, global); +goog.exportSymbol('proto.exec.EndBlock', null, global); +goog.exportSymbol('proto.exec.EndTx', null, global); +goog.exportSymbol('proto.exec.Event', null, global); +goog.exportSymbol('proto.exec.GovernAccountEvent', null, global); +goog.exportSymbol('proto.exec.Header', null, global); +goog.exportSymbol('proto.exec.InputEvent', null, global); +goog.exportSymbol('proto.exec.LogEvent', null, global); +goog.exportSymbol('proto.exec.Origin', null, global); +goog.exportSymbol('proto.exec.OutputEvent', null, global); +goog.exportSymbol('proto.exec.Result', null, global); +goog.exportSymbol('proto.exec.StreamEvent', null, global); +goog.exportSymbol('proto.exec.StreamEvents', null, global); +goog.exportSymbol('proto.exec.TxExecution', null, global); +goog.exportSymbol('proto.exec.TxExecutionKey', null, global); +goog.exportSymbol('proto.exec.TxHeader', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.StreamEvents = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.StreamEvents.repeatedFields_, null); +}; +goog.inherits(proto.exec.StreamEvents, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.StreamEvents.displayName = 'proto.exec.StreamEvents'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.StreamEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.StreamEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.StreamEvent.displayName = 'proto.exec.StreamEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.BeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.BeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.BeginBlock.displayName = 'proto.exec.BeginBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.EndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.EndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.EndBlock.displayName = 'proto.exec.EndBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.BeginTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.BeginTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.BeginTx.displayName = 'proto.exec.BeginTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.EndTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.EndTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.EndTx.displayName = 'proto.exec.EndTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.TxHeader = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.TxHeader, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.TxHeader.displayName = 'proto.exec.TxHeader'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.BlockExecution = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.BlockExecution.repeatedFields_, null); +}; +goog.inherits(proto.exec.BlockExecution, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.BlockExecution.displayName = 'proto.exec.BlockExecution'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.TxExecutionKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.TxExecutionKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.TxExecutionKey.displayName = 'proto.exec.TxExecutionKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.TxExecution = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.TxExecution.repeatedFields_, null); +}; +goog.inherits(proto.exec.TxExecution, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.TxExecution.displayName = 'proto.exec.TxExecution'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.Origin = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.Origin, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.Origin.displayName = 'proto.exec.Origin'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.Header.displayName = 'proto.exec.Header'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.Event = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.Event, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.Event.displayName = 'proto.exec.Event'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.Result = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.Result, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.Result.displayName = 'proto.exec.Result'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.LogEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.LogEvent.repeatedFields_, null); +}; +goog.inherits(proto.exec.LogEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.LogEvent.displayName = 'proto.exec.LogEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.CallEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.CallEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.CallEvent.displayName = 'proto.exec.CallEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.GovernAccountEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.GovernAccountEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.GovernAccountEvent.displayName = 'proto.exec.GovernAccountEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.InputEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.InputEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.InputEvent.displayName = 'proto.exec.InputEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.OutputEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.OutputEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.OutputEvent.displayName = 'proto.exec.OutputEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.CallData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.CallData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.CallData.displayName = 'proto.exec.CallData'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.exec.StreamEvents.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.StreamEvents.prototype.toObject = function(opt_includeInstance) { + return proto.exec.StreamEvents.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.StreamEvents} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.StreamEvents.toObject = function(includeInstance, msg) { + var f, obj = { + streameventsList: jspb.Message.toObjectList(msg.getStreameventsList(), + proto.exec.StreamEvent.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.StreamEvents} + */ +proto.exec.StreamEvents.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.StreamEvents; + return proto.exec.StreamEvents.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.StreamEvents} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.StreamEvents} + */ +proto.exec.StreamEvents.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.exec.StreamEvent; + reader.readMessage(value,proto.exec.StreamEvent.deserializeBinaryFromReader); + msg.addStreamevents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.StreamEvents.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.StreamEvents.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.StreamEvents} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.StreamEvents.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStreameventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.exec.StreamEvent.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated StreamEvent StreamEvents = 1; + * @return {!Array} + */ +proto.exec.StreamEvents.prototype.getStreameventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.exec.StreamEvent, 1)); +}; + + +/** @param {!Array} value */ +proto.exec.StreamEvents.prototype.setStreameventsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.exec.StreamEvent=} opt_value + * @param {number=} opt_index + * @return {!proto.exec.StreamEvent} + */ +proto.exec.StreamEvents.prototype.addStreamevents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.exec.StreamEvent, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.exec.StreamEvents.prototype.clearStreameventsList = function() { + this.setStreameventsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.StreamEvent.prototype.toObject = function(opt_includeInstance) { + return proto.exec.StreamEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.StreamEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.StreamEvent.toObject = function(includeInstance, msg) { + var f, obj = { + beginblock: (f = msg.getBeginblock()) && proto.exec.BeginBlock.toObject(includeInstance, f), + begintx: (f = msg.getBegintx()) && proto.exec.BeginTx.toObject(includeInstance, f), + envelope: (f = msg.getEnvelope()) && txs_pb.Envelope.toObject(includeInstance, f), + event: (f = msg.getEvent()) && proto.exec.Event.toObject(includeInstance, f), + endtx: (f = msg.getEndtx()) && proto.exec.EndTx.toObject(includeInstance, f), + endblock: (f = msg.getEndblock()) && proto.exec.EndBlock.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.StreamEvent} + */ +proto.exec.StreamEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.StreamEvent; + return proto.exec.StreamEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.StreamEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.StreamEvent} + */ +proto.exec.StreamEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.exec.BeginBlock; + reader.readMessage(value,proto.exec.BeginBlock.deserializeBinaryFromReader); + msg.setBeginblock(value); + break; + case 2: + var value = new proto.exec.BeginTx; + reader.readMessage(value,proto.exec.BeginTx.deserializeBinaryFromReader); + msg.setBegintx(value); + break; + case 3: + var value = new txs_pb.Envelope; + reader.readMessage(value,txs_pb.Envelope.deserializeBinaryFromReader); + msg.setEnvelope(value); + break; + case 4: + var value = new proto.exec.Event; + reader.readMessage(value,proto.exec.Event.deserializeBinaryFromReader); + msg.setEvent(value); + break; + case 5: + var value = new proto.exec.EndTx; + reader.readMessage(value,proto.exec.EndTx.deserializeBinaryFromReader); + msg.setEndtx(value); + break; + case 6: + var value = new proto.exec.EndBlock; + reader.readMessage(value,proto.exec.EndBlock.deserializeBinaryFromReader); + msg.setEndblock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.StreamEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.StreamEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.StreamEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.StreamEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBeginblock(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.exec.BeginBlock.serializeBinaryToWriter + ); + } + f = message.getBegintx(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.exec.BeginTx.serializeBinaryToWriter + ); + } + f = message.getEnvelope(); + if (f != null) { + writer.writeMessage( + 3, + f, + txs_pb.Envelope.serializeBinaryToWriter + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.exec.Event.serializeBinaryToWriter + ); + } + f = message.getEndtx(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.exec.EndTx.serializeBinaryToWriter + ); + } + f = message.getEndblock(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.exec.EndBlock.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BeginBlock BeginBlock = 1; + * @return {?proto.exec.BeginBlock} + */ +proto.exec.StreamEvent.prototype.getBeginblock = function() { + return /** @type{?proto.exec.BeginBlock} */ ( + jspb.Message.getWrapperField(this, proto.exec.BeginBlock, 1)); +}; + + +/** @param {?proto.exec.BeginBlock|undefined} value */ +proto.exec.StreamEvent.prototype.setBeginblock = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.StreamEvent.prototype.clearBeginblock = function() { + this.setBeginblock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.StreamEvent.prototype.hasBeginblock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional BeginTx BeginTx = 2; + * @return {?proto.exec.BeginTx} + */ +proto.exec.StreamEvent.prototype.getBegintx = function() { + return /** @type{?proto.exec.BeginTx} */ ( + jspb.Message.getWrapperField(this, proto.exec.BeginTx, 2)); +}; + + +/** @param {?proto.exec.BeginTx|undefined} value */ +proto.exec.StreamEvent.prototype.setBegintx = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.StreamEvent.prototype.clearBegintx = function() { + this.setBegintx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.StreamEvent.prototype.hasBegintx = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional txs.Envelope Envelope = 3; + * @return {?proto.txs.Envelope} + */ +proto.exec.StreamEvent.prototype.getEnvelope = function() { + return /** @type{?proto.txs.Envelope} */ ( + jspb.Message.getWrapperField(this, txs_pb.Envelope, 3)); +}; + + +/** @param {?proto.txs.Envelope|undefined} value */ +proto.exec.StreamEvent.prototype.setEnvelope = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.StreamEvent.prototype.clearEnvelope = function() { + this.setEnvelope(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.StreamEvent.prototype.hasEnvelope = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Event Event = 4; + * @return {?proto.exec.Event} + */ +proto.exec.StreamEvent.prototype.getEvent = function() { + return /** @type{?proto.exec.Event} */ ( + jspb.Message.getWrapperField(this, proto.exec.Event, 4)); +}; + + +/** @param {?proto.exec.Event|undefined} value */ +proto.exec.StreamEvent.prototype.setEvent = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.StreamEvent.prototype.clearEvent = function() { + this.setEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.StreamEvent.prototype.hasEvent = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional EndTx EndTx = 5; + * @return {?proto.exec.EndTx} + */ +proto.exec.StreamEvent.prototype.getEndtx = function() { + return /** @type{?proto.exec.EndTx} */ ( + jspb.Message.getWrapperField(this, proto.exec.EndTx, 5)); +}; + + +/** @param {?proto.exec.EndTx|undefined} value */ +proto.exec.StreamEvent.prototype.setEndtx = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.StreamEvent.prototype.clearEndtx = function() { + this.setEndtx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.StreamEvent.prototype.hasEndtx = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional EndBlock EndBlock = 6; + * @return {?proto.exec.EndBlock} + */ +proto.exec.StreamEvent.prototype.getEndblock = function() { + return /** @type{?proto.exec.EndBlock} */ ( + jspb.Message.getWrapperField(this, proto.exec.EndBlock, 6)); +}; + + +/** @param {?proto.exec.EndBlock|undefined} value */ +proto.exec.StreamEvent.prototype.setEndblock = function(value) { + jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.StreamEvent.prototype.clearEndblock = function() { + this.setEndblock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.StreamEvent.prototype.hasEndblock = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.BeginBlock.prototype.toObject = function(opt_includeInstance) { + return proto.exec.BeginBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.BeginBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.BeginBlock.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + header: (f = msg.getHeader()) && github_com_tendermint_tendermint_abci_types_types_pb.Header.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.BeginBlock} + */ +proto.exec.BeginBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.BeginBlock; + return proto.exec.BeginBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.BeginBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.BeginBlock} + */ +proto.exec.BeginBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = new github_com_tendermint_tendermint_abci_types_types_pb.Header; + reader.readMessage(value,github_com_tendermint_tendermint_abci_types_types_pb.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.BeginBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.BeginBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.BeginBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.BeginBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + github_com_tendermint_tendermint_abci_types_types_pb.Header.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 Height = 1; + * @return {number} + */ +proto.exec.BeginBlock.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.exec.BeginBlock.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional types.Header Header = 2; + * @return {?proto.types.Header} + */ +proto.exec.BeginBlock.prototype.getHeader = function() { + return /** @type{?proto.types.Header} */ ( + jspb.Message.getWrapperField(this, github_com_tendermint_tendermint_abci_types_types_pb.Header, 2)); +}; + + +/** @param {?proto.types.Header|undefined} value */ +proto.exec.BeginBlock.prototype.setHeader = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.BeginBlock.prototype.clearHeader = function() { + this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.BeginBlock.prototype.hasHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.EndBlock.prototype.toObject = function(opt_includeInstance) { + return proto.exec.EndBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.EndBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.EndBlock.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.EndBlock} + */ +proto.exec.EndBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.EndBlock; + return proto.exec.EndBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.EndBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.EndBlock} + */ +proto.exec.EndBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.EndBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.EndBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.EndBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.EndBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 Height = 1; + * @return {number} + */ +proto.exec.EndBlock.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.exec.EndBlock.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.BeginTx.prototype.toObject = function(opt_includeInstance) { + return proto.exec.BeginTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.BeginTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.BeginTx.toObject = function(includeInstance, msg) { + var f, obj = { + txheader: (f = msg.getTxheader()) && proto.exec.TxHeader.toObject(includeInstance, f), + result: (f = msg.getResult()) && proto.exec.Result.toObject(includeInstance, f), + exception: (f = msg.getException()) && errors_pb.Exception.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.BeginTx} + */ +proto.exec.BeginTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.BeginTx; + return proto.exec.BeginTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.BeginTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.BeginTx} + */ +proto.exec.BeginTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.exec.TxHeader; + reader.readMessage(value,proto.exec.TxHeader.deserializeBinaryFromReader); + msg.setTxheader(value); + break; + case 2: + var value = new proto.exec.Result; + reader.readMessage(value,proto.exec.Result.deserializeBinaryFromReader); + msg.setResult(value); + break; + case 4: + var value = new errors_pb.Exception; + reader.readMessage(value,errors_pb.Exception.deserializeBinaryFromReader); + msg.setException(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.BeginTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.BeginTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.BeginTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.BeginTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxheader(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.exec.TxHeader.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.exec.Result.serializeBinaryToWriter + ); + } + f = message.getException(); + if (f != null) { + writer.writeMessage( + 4, + f, + errors_pb.Exception.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TxHeader TxHeader = 1; + * @return {?proto.exec.TxHeader} + */ +proto.exec.BeginTx.prototype.getTxheader = function() { + return /** @type{?proto.exec.TxHeader} */ ( + jspb.Message.getWrapperField(this, proto.exec.TxHeader, 1)); +}; + + +/** @param {?proto.exec.TxHeader|undefined} value */ +proto.exec.BeginTx.prototype.setTxheader = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.BeginTx.prototype.clearTxheader = function() { + this.setTxheader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.BeginTx.prototype.hasTxheader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Result Result = 2; + * @return {?proto.exec.Result} + */ +proto.exec.BeginTx.prototype.getResult = function() { + return /** @type{?proto.exec.Result} */ ( + jspb.Message.getWrapperField(this, proto.exec.Result, 2)); +}; + + +/** @param {?proto.exec.Result|undefined} value */ +proto.exec.BeginTx.prototype.setResult = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.BeginTx.prototype.clearResult = function() { + this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.BeginTx.prototype.hasResult = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional errors.Exception Exception = 4; + * @return {?proto.errors.Exception} + */ +proto.exec.BeginTx.prototype.getException = function() { + return /** @type{?proto.errors.Exception} */ ( + jspb.Message.getWrapperField(this, errors_pb.Exception, 4)); +}; + + +/** @param {?proto.errors.Exception|undefined} value */ +proto.exec.BeginTx.prototype.setException = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.BeginTx.prototype.clearException = function() { + this.setException(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.BeginTx.prototype.hasException = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.EndTx.prototype.toObject = function(opt_includeInstance) { + return proto.exec.EndTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.EndTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.EndTx.toObject = function(includeInstance, msg) { + var f, obj = { + txhash: msg.getTxhash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.EndTx} + */ +proto.exec.EndTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.EndTx; + return proto.exec.EndTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.EndTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.EndTx} + */ +proto.exec.EndTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxhash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.EndTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.EndTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.EndTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.EndTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxhash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional bytes TxHash = 3; + * @return {!(string|Uint8Array)} + */ +proto.exec.EndTx.prototype.getTxhash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes TxHash = 3; + * This is a type-conversion wrapper around `getTxhash()` + * @return {string} + */ +proto.exec.EndTx.prototype.getTxhash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxhash())); +}; + + +/** + * optional bytes TxHash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxhash()` + * @return {!Uint8Array} + */ +proto.exec.EndTx.prototype.getTxhash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxhash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.EndTx.prototype.setTxhash = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.TxHeader.prototype.toObject = function(opt_includeInstance) { + return proto.exec.TxHeader.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.TxHeader} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.TxHeader.toObject = function(includeInstance, msg) { + var f, obj = { + txtype: jspb.Message.getFieldWithDefault(msg, 1, 0), + txhash: msg.getTxhash_asB64(), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + index: jspb.Message.getFieldWithDefault(msg, 4, 0), + origin: (f = msg.getOrigin()) && proto.exec.Origin.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.TxHeader} + */ +proto.exec.TxHeader.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.TxHeader; + return proto.exec.TxHeader.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.TxHeader} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.TxHeader} + */ +proto.exec.TxHeader.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTxtype(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxhash(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIndex(value); + break; + case 5: + var value = new proto.exec.Origin; + reader.readMessage(value,proto.exec.Origin.deserializeBinaryFromReader); + msg.setOrigin(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.TxHeader.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.TxHeader.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.TxHeader} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.TxHeader.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxtype(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getTxhash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getOrigin(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.exec.Origin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 TxType = 1; + * @return {number} + */ +proto.exec.TxHeader.prototype.getTxtype = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.exec.TxHeader.prototype.setTxtype = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes TxHash = 2; + * @return {!(string|Uint8Array)} + */ +proto.exec.TxHeader.prototype.getTxhash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes TxHash = 2; + * This is a type-conversion wrapper around `getTxhash()` + * @return {string} + */ +proto.exec.TxHeader.prototype.getTxhash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxhash())); +}; + + +/** + * optional bytes TxHash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxhash()` + * @return {!Uint8Array} + */ +proto.exec.TxHeader.prototype.getTxhash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxhash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.TxHeader.prototype.setTxhash = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional uint64 Height = 3; + * @return {number} + */ +proto.exec.TxHeader.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.exec.TxHeader.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 Index = 4; + * @return {number} + */ +proto.exec.TxHeader.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.exec.TxHeader.prototype.setIndex = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional Origin Origin = 5; + * @return {?proto.exec.Origin} + */ +proto.exec.TxHeader.prototype.getOrigin = function() { + return /** @type{?proto.exec.Origin} */ ( + jspb.Message.getWrapperField(this, proto.exec.Origin, 5)); +}; + + +/** @param {?proto.exec.Origin|undefined} value */ +proto.exec.TxHeader.prototype.setOrigin = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.TxHeader.prototype.clearOrigin = function() { + this.setOrigin(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.TxHeader.prototype.hasOrigin = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.exec.BlockExecution.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.BlockExecution.prototype.toObject = function(opt_includeInstance) { + return proto.exec.BlockExecution.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.BlockExecution} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.BlockExecution.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + header: (f = msg.getHeader()) && github_com_tendermint_tendermint_abci_types_types_pb.Header.toObject(includeInstance, f), + txexecutionsList: jspb.Message.toObjectList(msg.getTxexecutionsList(), + proto.exec.TxExecution.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.BlockExecution} + */ +proto.exec.BlockExecution.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.BlockExecution; + return proto.exec.BlockExecution.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.BlockExecution} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.BlockExecution} + */ +proto.exec.BlockExecution.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = new github_com_tendermint_tendermint_abci_types_types_pb.Header; + reader.readMessage(value,github_com_tendermint_tendermint_abci_types_types_pb.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 3: + var value = new proto.exec.TxExecution; + reader.readMessage(value,proto.exec.TxExecution.deserializeBinaryFromReader); + msg.addTxexecutions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.BlockExecution.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.BlockExecution.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.BlockExecution} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.BlockExecution.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + github_com_tendermint_tendermint_abci_types_types_pb.Header.serializeBinaryToWriter + ); + } + f = message.getTxexecutionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.exec.TxExecution.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 Height = 1; + * @return {number} + */ +proto.exec.BlockExecution.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.exec.BlockExecution.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional types.Header Header = 2; + * @return {?proto.types.Header} + */ +proto.exec.BlockExecution.prototype.getHeader = function() { + return /** @type{?proto.types.Header} */ ( + jspb.Message.getWrapperField(this, github_com_tendermint_tendermint_abci_types_types_pb.Header, 2)); +}; + + +/** @param {?proto.types.Header|undefined} value */ +proto.exec.BlockExecution.prototype.setHeader = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.BlockExecution.prototype.clearHeader = function() { + this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.BlockExecution.prototype.hasHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated TxExecution TxExecutions = 3; + * @return {!Array} + */ +proto.exec.BlockExecution.prototype.getTxexecutionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.exec.TxExecution, 3)); +}; + + +/** @param {!Array} value */ +proto.exec.BlockExecution.prototype.setTxexecutionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.exec.TxExecution=} opt_value + * @param {number=} opt_index + * @return {!proto.exec.TxExecution} + */ +proto.exec.BlockExecution.prototype.addTxexecutions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.exec.TxExecution, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.exec.BlockExecution.prototype.clearTxexecutionsList = function() { + this.setTxexecutionsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.TxExecutionKey.prototype.toObject = function(opt_includeInstance) { + return proto.exec.TxExecutionKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.TxExecutionKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.TxExecutionKey.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + offset: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.TxExecutionKey} + */ +proto.exec.TxExecutionKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.TxExecutionKey; + return proto.exec.TxExecutionKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.TxExecutionKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.TxExecutionKey} + */ +proto.exec.TxExecutionKey.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOffset(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.TxExecutionKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.TxExecutionKey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.TxExecutionKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.TxExecutionKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getOffset(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 Height = 1; + * @return {number} + */ +proto.exec.TxExecutionKey.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.exec.TxExecutionKey.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 Offset = 2; + * @return {number} + */ +proto.exec.TxExecutionKey.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.exec.TxExecutionKey.prototype.setOffset = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.exec.TxExecution.repeatedFields_ = [7,11]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.TxExecution.prototype.toObject = function(opt_includeInstance) { + return proto.exec.TxExecution.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.TxExecution} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.TxExecution.toObject = function(includeInstance, msg) { + var f, obj = { + header: (f = msg.getHeader()) && proto.exec.TxHeader.toObject(includeInstance, f), + envelope: (f = msg.getEnvelope()) && txs_pb.Envelope.toObject(includeInstance, f), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.exec.Event.toObject, includeInstance), + result: (f = msg.getResult()) && proto.exec.Result.toObject(includeInstance, f), + receipt: (f = msg.getReceipt()) && txs_pb.Receipt.toObject(includeInstance, f), + exception: (f = msg.getException()) && errors_pb.Exception.toObject(includeInstance, f), + txexecutionsList: jspb.Message.toObjectList(msg.getTxexecutionsList(), + proto.exec.TxExecution.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.TxExecution} + */ +proto.exec.TxExecution.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.TxExecution; + return proto.exec.TxExecution.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.TxExecution} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.TxExecution} + */ +proto.exec.TxExecution.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.exec.TxHeader; + reader.readMessage(value,proto.exec.TxHeader.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 6: + var value = new txs_pb.Envelope; + reader.readMessage(value,txs_pb.Envelope.deserializeBinaryFromReader); + msg.setEnvelope(value); + break; + case 7: + var value = new proto.exec.Event; + reader.readMessage(value,proto.exec.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + case 8: + var value = new proto.exec.Result; + reader.readMessage(value,proto.exec.Result.deserializeBinaryFromReader); + msg.setResult(value); + break; + case 9: + var value = new txs_pb.Receipt; + reader.readMessage(value,txs_pb.Receipt.deserializeBinaryFromReader); + msg.setReceipt(value); + break; + case 10: + var value = new errors_pb.Exception; + reader.readMessage(value,errors_pb.Exception.deserializeBinaryFromReader); + msg.setException(value); + break; + case 11: + var value = new proto.exec.TxExecution; + reader.readMessage(value,proto.exec.TxExecution.deserializeBinaryFromReader); + msg.addTxexecutions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.TxExecution.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.TxExecution.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.TxExecution} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.TxExecution.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.exec.TxHeader.serializeBinaryToWriter + ); + } + f = message.getEnvelope(); + if (f != null) { + writer.writeMessage( + 6, + f, + txs_pb.Envelope.serializeBinaryToWriter + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.exec.Event.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.exec.Result.serializeBinaryToWriter + ); + } + f = message.getReceipt(); + if (f != null) { + writer.writeMessage( + 9, + f, + txs_pb.Receipt.serializeBinaryToWriter + ); + } + f = message.getException(); + if (f != null) { + writer.writeMessage( + 10, + f, + errors_pb.Exception.serializeBinaryToWriter + ); + } + f = message.getTxexecutionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.exec.TxExecution.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TxHeader Header = 1; + * @return {?proto.exec.TxHeader} + */ +proto.exec.TxExecution.prototype.getHeader = function() { + return /** @type{?proto.exec.TxHeader} */ ( + jspb.Message.getWrapperField(this, proto.exec.TxHeader, 1)); +}; + + +/** @param {?proto.exec.TxHeader|undefined} value */ +proto.exec.TxExecution.prototype.setHeader = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.TxExecution.prototype.clearHeader = function() { + this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.TxExecution.prototype.hasHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional txs.Envelope Envelope = 6; + * @return {?proto.txs.Envelope} + */ +proto.exec.TxExecution.prototype.getEnvelope = function() { + return /** @type{?proto.txs.Envelope} */ ( + jspb.Message.getWrapperField(this, txs_pb.Envelope, 6)); +}; + + +/** @param {?proto.txs.Envelope|undefined} value */ +proto.exec.TxExecution.prototype.setEnvelope = function(value) { + jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.TxExecution.prototype.clearEnvelope = function() { + this.setEnvelope(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.TxExecution.prototype.hasEnvelope = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * repeated Event Events = 7; + * @return {!Array} + */ +proto.exec.TxExecution.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.exec.Event, 7)); +}; + + +/** @param {!Array} value */ +proto.exec.TxExecution.prototype.setEventsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.exec.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.exec.Event} + */ +proto.exec.TxExecution.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.exec.Event, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.exec.TxExecution.prototype.clearEventsList = function() { + this.setEventsList([]); +}; + + +/** + * optional Result Result = 8; + * @return {?proto.exec.Result} + */ +proto.exec.TxExecution.prototype.getResult = function() { + return /** @type{?proto.exec.Result} */ ( + jspb.Message.getWrapperField(this, proto.exec.Result, 8)); +}; + + +/** @param {?proto.exec.Result|undefined} value */ +proto.exec.TxExecution.prototype.setResult = function(value) { + jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.TxExecution.prototype.clearResult = function() { + this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.TxExecution.prototype.hasResult = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional txs.Receipt Receipt = 9; + * @return {?proto.txs.Receipt} + */ +proto.exec.TxExecution.prototype.getReceipt = function() { + return /** @type{?proto.txs.Receipt} */ ( + jspb.Message.getWrapperField(this, txs_pb.Receipt, 9)); +}; + + +/** @param {?proto.txs.Receipt|undefined} value */ +proto.exec.TxExecution.prototype.setReceipt = function(value) { + jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.TxExecution.prototype.clearReceipt = function() { + this.setReceipt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.TxExecution.prototype.hasReceipt = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional errors.Exception Exception = 10; + * @return {?proto.errors.Exception} + */ +proto.exec.TxExecution.prototype.getException = function() { + return /** @type{?proto.errors.Exception} */ ( + jspb.Message.getWrapperField(this, errors_pb.Exception, 10)); +}; + + +/** @param {?proto.errors.Exception|undefined} value */ +proto.exec.TxExecution.prototype.setException = function(value) { + jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.TxExecution.prototype.clearException = function() { + this.setException(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.TxExecution.prototype.hasException = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * repeated TxExecution TxExecutions = 11; + * @return {!Array} + */ +proto.exec.TxExecution.prototype.getTxexecutionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.exec.TxExecution, 11)); +}; + + +/** @param {!Array} value */ +proto.exec.TxExecution.prototype.setTxexecutionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.exec.TxExecution=} opt_value + * @param {number=} opt_index + * @return {!proto.exec.TxExecution} + */ +proto.exec.TxExecution.prototype.addTxexecutions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.exec.TxExecution, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.exec.TxExecution.prototype.clearTxexecutionsList = function() { + this.setTxexecutionsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.Origin.prototype.toObject = function(opt_includeInstance) { + return proto.exec.Origin.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.Origin} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.Origin.toObject = function(includeInstance, msg) { + var f, obj = { + chainid: jspb.Message.getFieldWithDefault(msg, 1, ""), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + index: jspb.Message.getFieldWithDefault(msg, 3, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.Origin} + */ +proto.exec.Origin.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.Origin; + return proto.exec.Origin.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.Origin} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.Origin} + */ +proto.exec.Origin.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChainid(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIndex(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.Origin.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.Origin.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.Origin} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.Origin.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string ChainID = 1; + * @return {string} + */ +proto.exec.Origin.prototype.getChainid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.exec.Origin.prototype.setChainid = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 Height = 2; + * @return {number} + */ +proto.exec.Origin.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.exec.Origin.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 Index = 3; + * @return {number} + */ +proto.exec.Origin.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.exec.Origin.prototype.setIndex = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp Time = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.exec.Origin.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +proto.exec.Origin.prototype.setTime = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.Origin.prototype.clearTime = function() { + this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.Origin.prototype.hasTime = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.Header.prototype.toObject = function(opt_includeInstance) { + return proto.exec.Header.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.Header} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.Header.toObject = function(includeInstance, msg) { + var f, obj = { + txtype: jspb.Message.getFieldWithDefault(msg, 1, 0), + txhash: msg.getTxhash_asB64(), + eventtype: jspb.Message.getFieldWithDefault(msg, 3, 0), + eventid: jspb.Message.getFieldWithDefault(msg, 4, ""), + height: jspb.Message.getFieldWithDefault(msg, 5, 0), + index: jspb.Message.getFieldWithDefault(msg, 6, 0), + exception: (f = msg.getException()) && errors_pb.Exception.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.Header} + */ +proto.exec.Header.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.Header; + return proto.exec.Header.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.Header} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.Header} + */ +proto.exec.Header.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTxtype(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxhash(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setEventtype(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setEventid(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIndex(value); + break; + case 7: + var value = new errors_pb.Exception; + reader.readMessage(value,errors_pb.Exception.deserializeBinaryFromReader); + msg.setException(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.Header.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.Header.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.Header} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.Header.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxtype(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getTxhash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getEventtype(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getEventid(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getException(); + if (f != null) { + writer.writeMessage( + 7, + f, + errors_pb.Exception.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 TxType = 1; + * @return {number} + */ +proto.exec.Header.prototype.getTxtype = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.exec.Header.prototype.setTxtype = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes TxHash = 2; + * @return {!(string|Uint8Array)} + */ +proto.exec.Header.prototype.getTxhash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes TxHash = 2; + * This is a type-conversion wrapper around `getTxhash()` + * @return {string} + */ +proto.exec.Header.prototype.getTxhash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxhash())); +}; + + +/** + * optional bytes TxHash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxhash()` + * @return {!Uint8Array} + */ +proto.exec.Header.prototype.getTxhash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxhash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.Header.prototype.setTxhash = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional uint32 EventType = 3; + * @return {number} + */ +proto.exec.Header.prototype.getEventtype = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.exec.Header.prototype.setEventtype = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string EventID = 4; + * @return {string} + */ +proto.exec.Header.prototype.getEventid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.exec.Header.prototype.setEventid = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 Height = 5; + * @return {number} + */ +proto.exec.Header.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.exec.Header.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 Index = 6; + * @return {number} + */ +proto.exec.Header.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.exec.Header.prototype.setIndex = function(value) { + jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional errors.Exception Exception = 7; + * @return {?proto.errors.Exception} + */ +proto.exec.Header.prototype.getException = function() { + return /** @type{?proto.errors.Exception} */ ( + jspb.Message.getWrapperField(this, errors_pb.Exception, 7)); +}; + + +/** @param {?proto.errors.Exception|undefined} value */ +proto.exec.Header.prototype.setException = function(value) { + jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.Header.prototype.clearException = function() { + this.setException(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.Header.prototype.hasException = function() { + return jspb.Message.getField(this, 7) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.Event.prototype.toObject = function(opt_includeInstance) { + return proto.exec.Event.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.Event} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.Event.toObject = function(includeInstance, msg) { + var f, obj = { + header: (f = msg.getHeader()) && proto.exec.Header.toObject(includeInstance, f), + input: (f = msg.getInput()) && proto.exec.InputEvent.toObject(includeInstance, f), + output: (f = msg.getOutput()) && proto.exec.OutputEvent.toObject(includeInstance, f), + call: (f = msg.getCall()) && proto.exec.CallEvent.toObject(includeInstance, f), + log: (f = msg.getLog()) && proto.exec.LogEvent.toObject(includeInstance, f), + governaccount: (f = msg.getGovernaccount()) && proto.exec.GovernAccountEvent.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.Event} + */ +proto.exec.Event.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.Event; + return proto.exec.Event.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.Event} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.Event} + */ +proto.exec.Event.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.exec.Header; + reader.readMessage(value,proto.exec.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 2: + var value = new proto.exec.InputEvent; + reader.readMessage(value,proto.exec.InputEvent.deserializeBinaryFromReader); + msg.setInput(value); + break; + case 3: + var value = new proto.exec.OutputEvent; + reader.readMessage(value,proto.exec.OutputEvent.deserializeBinaryFromReader); + msg.setOutput(value); + break; + case 4: + var value = new proto.exec.CallEvent; + reader.readMessage(value,proto.exec.CallEvent.deserializeBinaryFromReader); + msg.setCall(value); + break; + case 5: + var value = new proto.exec.LogEvent; + reader.readMessage(value,proto.exec.LogEvent.deserializeBinaryFromReader); + msg.setLog(value); + break; + case 6: + var value = new proto.exec.GovernAccountEvent; + reader.readMessage(value,proto.exec.GovernAccountEvent.deserializeBinaryFromReader); + msg.setGovernaccount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.Event.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.Event.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.Event} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.Event.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.exec.Header.serializeBinaryToWriter + ); + } + f = message.getInput(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.exec.InputEvent.serializeBinaryToWriter + ); + } + f = message.getOutput(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.exec.OutputEvent.serializeBinaryToWriter + ); + } + f = message.getCall(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.exec.CallEvent.serializeBinaryToWriter + ); + } + f = message.getLog(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.exec.LogEvent.serializeBinaryToWriter + ); + } + f = message.getGovernaccount(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.exec.GovernAccountEvent.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Header Header = 1; + * @return {?proto.exec.Header} + */ +proto.exec.Event.prototype.getHeader = function() { + return /** @type{?proto.exec.Header} */ ( + jspb.Message.getWrapperField(this, proto.exec.Header, 1)); +}; + + +/** @param {?proto.exec.Header|undefined} value */ +proto.exec.Event.prototype.setHeader = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.Event.prototype.clearHeader = function() { + this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.Event.prototype.hasHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional InputEvent Input = 2; + * @return {?proto.exec.InputEvent} + */ +proto.exec.Event.prototype.getInput = function() { + return /** @type{?proto.exec.InputEvent} */ ( + jspb.Message.getWrapperField(this, proto.exec.InputEvent, 2)); +}; + + +/** @param {?proto.exec.InputEvent|undefined} value */ +proto.exec.Event.prototype.setInput = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.Event.prototype.clearInput = function() { + this.setInput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.Event.prototype.hasInput = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional OutputEvent Output = 3; + * @return {?proto.exec.OutputEvent} + */ +proto.exec.Event.prototype.getOutput = function() { + return /** @type{?proto.exec.OutputEvent} */ ( + jspb.Message.getWrapperField(this, proto.exec.OutputEvent, 3)); +}; + + +/** @param {?proto.exec.OutputEvent|undefined} value */ +proto.exec.Event.prototype.setOutput = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.Event.prototype.clearOutput = function() { + this.setOutput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.Event.prototype.hasOutput = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional CallEvent Call = 4; + * @return {?proto.exec.CallEvent} + */ +proto.exec.Event.prototype.getCall = function() { + return /** @type{?proto.exec.CallEvent} */ ( + jspb.Message.getWrapperField(this, proto.exec.CallEvent, 4)); +}; + + +/** @param {?proto.exec.CallEvent|undefined} value */ +proto.exec.Event.prototype.setCall = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.Event.prototype.clearCall = function() { + this.setCall(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.Event.prototype.hasCall = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional LogEvent Log = 5; + * @return {?proto.exec.LogEvent} + */ +proto.exec.Event.prototype.getLog = function() { + return /** @type{?proto.exec.LogEvent} */ ( + jspb.Message.getWrapperField(this, proto.exec.LogEvent, 5)); +}; + + +/** @param {?proto.exec.LogEvent|undefined} value */ +proto.exec.Event.prototype.setLog = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.Event.prototype.clearLog = function() { + this.setLog(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.Event.prototype.hasLog = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional GovernAccountEvent GovernAccount = 6; + * @return {?proto.exec.GovernAccountEvent} + */ +proto.exec.Event.prototype.getGovernaccount = function() { + return /** @type{?proto.exec.GovernAccountEvent} */ ( + jspb.Message.getWrapperField(this, proto.exec.GovernAccountEvent, 6)); +}; + + +/** @param {?proto.exec.GovernAccountEvent|undefined} value */ +proto.exec.Event.prototype.setGovernaccount = function(value) { + jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.Event.prototype.clearGovernaccount = function() { + this.setGovernaccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.Event.prototype.hasGovernaccount = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.Result.prototype.toObject = function(opt_includeInstance) { + return proto.exec.Result.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.Result.toObject = function(includeInstance, msg) { + var f, obj = { + pb_return: msg.getReturn_asB64(), + gasused: jspb.Message.getFieldWithDefault(msg, 2, 0), + nameentry: (f = msg.getNameentry()) && names_pb.Entry.toObject(includeInstance, f), + permargs: (f = msg.getPermargs()) && permission_pb.PermArgs.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.Result} + */ +proto.exec.Result.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.Result; + return proto.exec.Result.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.Result} + */ +proto.exec.Result.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setReturn(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGasused(value); + break; + case 3: + var value = new names_pb.Entry; + reader.readMessage(value,names_pb.Entry.deserializeBinaryFromReader); + msg.setNameentry(value); + break; + case 4: + var value = new permission_pb.PermArgs; + reader.readMessage(value,permission_pb.PermArgs.deserializeBinaryFromReader); + msg.setPermargs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.Result.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.Result.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.Result.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReturn_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getGasused(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getNameentry(); + if (f != null) { + writer.writeMessage( + 3, + f, + names_pb.Entry.serializeBinaryToWriter + ); + } + f = message.getPermargs(); + if (f != null) { + writer.writeMessage( + 4, + f, + permission_pb.PermArgs.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes Return = 1; + * @return {!(string|Uint8Array)} + */ +proto.exec.Result.prototype.getReturn = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Return = 1; + * This is a type-conversion wrapper around `getReturn()` + * @return {string} + */ +proto.exec.Result.prototype.getReturn_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getReturn())); +}; + + +/** + * optional bytes Return = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getReturn()` + * @return {!Uint8Array} + */ +proto.exec.Result.prototype.getReturn_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getReturn())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.Result.prototype.setReturn = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 GasUsed = 2; + * @return {number} + */ +proto.exec.Result.prototype.getGasused = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.exec.Result.prototype.setGasused = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional names.Entry NameEntry = 3; + * @return {?proto.names.Entry} + */ +proto.exec.Result.prototype.getNameentry = function() { + return /** @type{?proto.names.Entry} */ ( + jspb.Message.getWrapperField(this, names_pb.Entry, 3)); +}; + + +/** @param {?proto.names.Entry|undefined} value */ +proto.exec.Result.prototype.setNameentry = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.Result.prototype.clearNameentry = function() { + this.setNameentry(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.Result.prototype.hasNameentry = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional permission.PermArgs PermArgs = 4; + * @return {?proto.permission.PermArgs} + */ +proto.exec.Result.prototype.getPermargs = function() { + return /** @type{?proto.permission.PermArgs} */ ( + jspb.Message.getWrapperField(this, permission_pb.PermArgs, 4)); +}; + + +/** @param {?proto.permission.PermArgs|undefined} value */ +proto.exec.Result.prototype.setPermargs = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.Result.prototype.clearPermargs = function() { + this.setPermargs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.Result.prototype.hasPermargs = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.exec.LogEvent.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.LogEvent.prototype.toObject = function(opt_includeInstance) { + return proto.exec.LogEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.LogEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.LogEvent.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + data: msg.getData_asB64(), + topicsList: msg.getTopicsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.LogEvent} + */ +proto.exec.LogEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.LogEvent; + return proto.exec.LogEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.LogEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.LogEvent} + */ +proto.exec.LogEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addTopics(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.LogEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.LogEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.LogEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.LogEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getTopicsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.exec.LogEvent.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.exec.LogEvent.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.exec.LogEvent.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.LogEvent.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes Data = 2; + * @return {!(string|Uint8Array)} + */ +proto.exec.LogEvent.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.exec.LogEvent.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes Data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.exec.LogEvent.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.LogEvent.prototype.setData = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated bytes Topics = 3; + * @return {!(Array|Array)} + */ +proto.exec.LogEvent.prototype.getTopicsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes Topics = 3; + * This is a type-conversion wrapper around `getTopicsList()` + * @return {!Array} + */ +proto.exec.LogEvent.prototype.getTopicsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTopicsList())); +}; + + +/** + * repeated bytes Topics = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTopicsList()` + * @return {!Array} + */ +proto.exec.LogEvent.prototype.getTopicsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTopicsList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.exec.LogEvent.prototype.setTopicsList = function(value) { + jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.exec.LogEvent.prototype.addTopics = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.exec.LogEvent.prototype.clearTopicsList = function() { + this.setTopicsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.CallEvent.prototype.toObject = function(opt_includeInstance) { + return proto.exec.CallEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.CallEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.CallEvent.toObject = function(includeInstance, msg) { + var f, obj = { + calltype: jspb.Message.getFieldWithDefault(msg, 5, 0), + calldata: (f = msg.getCalldata()) && proto.exec.CallData.toObject(includeInstance, f), + origin: msg.getOrigin_asB64(), + stackdepth: jspb.Message.getFieldWithDefault(msg, 3, 0), + pb_return: msg.getReturn_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.CallEvent} + */ +proto.exec.CallEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.CallEvent; + return proto.exec.CallEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.CallEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.CallEvent} + */ +proto.exec.CallEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCalltype(value); + break; + case 1: + var value = new proto.exec.CallData; + reader.readMessage(value,proto.exec.CallData.deserializeBinaryFromReader); + msg.setCalldata(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOrigin(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStackdepth(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setReturn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.CallEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.CallEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.CallEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.CallEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCalltype(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getCalldata(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.exec.CallData.serializeBinaryToWriter + ); + } + f = message.getOrigin_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getStackdepth(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getReturn_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional uint32 CallType = 5; + * @return {number} + */ +proto.exec.CallEvent.prototype.getCalltype = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.exec.CallEvent.prototype.setCalltype = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional CallData CallData = 1; + * @return {?proto.exec.CallData} + */ +proto.exec.CallEvent.prototype.getCalldata = function() { + return /** @type{?proto.exec.CallData} */ ( + jspb.Message.getWrapperField(this, proto.exec.CallData, 1)); +}; + + +/** @param {?proto.exec.CallData|undefined} value */ +proto.exec.CallEvent.prototype.setCalldata = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.CallEvent.prototype.clearCalldata = function() { + this.setCalldata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.CallEvent.prototype.hasCalldata = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes Origin = 2; + * @return {!(string|Uint8Array)} + */ +proto.exec.CallEvent.prototype.getOrigin = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Origin = 2; + * This is a type-conversion wrapper around `getOrigin()` + * @return {string} + */ +proto.exec.CallEvent.prototype.getOrigin_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOrigin())); +}; + + +/** + * optional bytes Origin = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOrigin()` + * @return {!Uint8Array} + */ +proto.exec.CallEvent.prototype.getOrigin_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOrigin())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.CallEvent.prototype.setOrigin = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional uint64 StackDepth = 3; + * @return {number} + */ +proto.exec.CallEvent.prototype.getStackdepth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.exec.CallEvent.prototype.setStackdepth = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes Return = 4; + * @return {!(string|Uint8Array)} + */ +proto.exec.CallEvent.prototype.getReturn = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes Return = 4; + * This is a type-conversion wrapper around `getReturn()` + * @return {string} + */ +proto.exec.CallEvent.prototype.getReturn_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getReturn())); +}; + + +/** + * optional bytes Return = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getReturn()` + * @return {!Uint8Array} + */ +proto.exec.CallEvent.prototype.getReturn_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getReturn())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.CallEvent.prototype.setReturn = function(value) { + jspb.Message.setProto3BytesField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.GovernAccountEvent.prototype.toObject = function(opt_includeInstance) { + return proto.exec.GovernAccountEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.GovernAccountEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.GovernAccountEvent.toObject = function(includeInstance, msg) { + var f, obj = { + accountupdate: (f = msg.getAccountupdate()) && spec_pb.TemplateAccount.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.GovernAccountEvent} + */ +proto.exec.GovernAccountEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.GovernAccountEvent; + return proto.exec.GovernAccountEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.GovernAccountEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.GovernAccountEvent} + */ +proto.exec.GovernAccountEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new spec_pb.TemplateAccount; + reader.readMessage(value,spec_pb.TemplateAccount.deserializeBinaryFromReader); + msg.setAccountupdate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.GovernAccountEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.GovernAccountEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.GovernAccountEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.GovernAccountEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccountupdate(); + if (f != null) { + writer.writeMessage( + 1, + f, + spec_pb.TemplateAccount.serializeBinaryToWriter + ); + } +}; + + +/** + * optional spec.TemplateAccount AccountUpdate = 1; + * @return {?proto.spec.TemplateAccount} + */ +proto.exec.GovernAccountEvent.prototype.getAccountupdate = function() { + return /** @type{?proto.spec.TemplateAccount} */ ( + jspb.Message.getWrapperField(this, spec_pb.TemplateAccount, 1)); +}; + + +/** @param {?proto.spec.TemplateAccount|undefined} value */ +proto.exec.GovernAccountEvent.prototype.setAccountupdate = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.exec.GovernAccountEvent.prototype.clearAccountupdate = function() { + this.setAccountupdate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.GovernAccountEvent.prototype.hasAccountupdate = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.InputEvent.prototype.toObject = function(opt_includeInstance) { + return proto.exec.InputEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.InputEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.InputEvent.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.InputEvent} + */ +proto.exec.InputEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.InputEvent; + return proto.exec.InputEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.InputEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.InputEvent} + */ +proto.exec.InputEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.InputEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.InputEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.InputEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.InputEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.exec.InputEvent.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.exec.InputEvent.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.exec.InputEvent.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.InputEvent.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.OutputEvent.prototype.toObject = function(opt_includeInstance) { + return proto.exec.OutputEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.OutputEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.OutputEvent.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.OutputEvent} + */ +proto.exec.OutputEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.OutputEvent; + return proto.exec.OutputEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.OutputEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.OutputEvent} + */ +proto.exec.OutputEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.OutputEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.OutputEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.OutputEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.OutputEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.exec.OutputEvent.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.exec.OutputEvent.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.exec.OutputEvent.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.OutputEvent.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.CallData.prototype.toObject = function(opt_includeInstance) { + return proto.exec.CallData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.CallData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.CallData.toObject = function(includeInstance, msg) { + var f, obj = { + caller: msg.getCaller_asB64(), + callee: msg.getCallee_asB64(), + data: msg.getData_asB64(), + value: jspb.Message.getFieldWithDefault(msg, 4, 0), + gas: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.CallData} + */ +proto.exec.CallData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.CallData; + return proto.exec.CallData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.CallData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.CallData} + */ +proto.exec.CallData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCaller(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCallee(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setValue(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.CallData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.CallData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.CallData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.CallData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCaller_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getCallee_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getValue(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getGas(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } +}; + + +/** + * optional bytes Caller = 1; + * @return {!(string|Uint8Array)} + */ +proto.exec.CallData.prototype.getCaller = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Caller = 1; + * This is a type-conversion wrapper around `getCaller()` + * @return {string} + */ +proto.exec.CallData.prototype.getCaller_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCaller())); +}; + + +/** + * optional bytes Caller = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCaller()` + * @return {!Uint8Array} + */ +proto.exec.CallData.prototype.getCaller_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCaller())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.CallData.prototype.setCaller = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes Callee = 2; + * @return {!(string|Uint8Array)} + */ +proto.exec.CallData.prototype.getCallee = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Callee = 2; + * This is a type-conversion wrapper around `getCallee()` + * @return {string} + */ +proto.exec.CallData.prototype.getCallee_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCallee())); +}; + + +/** + * optional bytes Callee = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCallee()` + * @return {!Uint8Array} + */ +proto.exec.CallData.prototype.getCallee_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCallee())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.CallData.prototype.setCallee = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes Data = 3; + * @return {!(string|Uint8Array)} + */ +proto.exec.CallData.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes Data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.exec.CallData.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes Data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.exec.CallData.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.exec.CallData.prototype.setData = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint64 Value = 4; + * @return {number} + */ +proto.exec.CallData.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.exec.CallData.prototype.setValue = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 Gas = 5; + * @return {number} + */ +proto.exec.CallData.prototype.getGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.exec.CallData.prototype.setGas = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +goog.object.extend(exports, proto.exec); diff --git a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.d.ts b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.js b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.d.ts b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.d.ts new file mode 100644 index 000000000..e1c3a368a --- /dev/null +++ b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.d.ts @@ -0,0 +1,158 @@ +// package: gogoproto +// file: github.com/gogo/protobuf/gogoproto/gogo.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + + export const goprotoEnumPrefix: jspb.ExtensionFieldInfo; + + export const goprotoEnumStringer: jspb.ExtensionFieldInfo; + + export const enumStringer: jspb.ExtensionFieldInfo; + + export const enumCustomname: jspb.ExtensionFieldInfo; + + export const enumdecl: jspb.ExtensionFieldInfo; + + export const enumvalueCustomname: jspb.ExtensionFieldInfo; + + export const goprotoGettersAll: jspb.ExtensionFieldInfo; + + export const goprotoEnumPrefixAll: jspb.ExtensionFieldInfo; + + export const goprotoStringerAll: jspb.ExtensionFieldInfo; + + export const verboseEqualAll: jspb.ExtensionFieldInfo; + + export const faceAll: jspb.ExtensionFieldInfo; + + export const gostringAll: jspb.ExtensionFieldInfo; + + export const populateAll: jspb.ExtensionFieldInfo; + + export const stringerAll: jspb.ExtensionFieldInfo; + + export const onlyoneAll: jspb.ExtensionFieldInfo; + + export const equalAll: jspb.ExtensionFieldInfo; + + export const descriptionAll: jspb.ExtensionFieldInfo; + + export const testgenAll: jspb.ExtensionFieldInfo; + + export const benchgenAll: jspb.ExtensionFieldInfo; + + export const marshalerAll: jspb.ExtensionFieldInfo; + + export const unmarshalerAll: jspb.ExtensionFieldInfo; + + export const stableMarshalerAll: jspb.ExtensionFieldInfo; + + export const sizerAll: jspb.ExtensionFieldInfo; + + export const goprotoEnumStringerAll: jspb.ExtensionFieldInfo; + + export const enumStringerAll: jspb.ExtensionFieldInfo; + + export const unsafeMarshalerAll: jspb.ExtensionFieldInfo; + + export const unsafeUnmarshalerAll: jspb.ExtensionFieldInfo; + + export const goprotoExtensionsMapAll: jspb.ExtensionFieldInfo; + + export const goprotoUnrecognizedAll: jspb.ExtensionFieldInfo; + + export const gogoprotoImport: jspb.ExtensionFieldInfo; + + export const protosizerAll: jspb.ExtensionFieldInfo; + + export const compareAll: jspb.ExtensionFieldInfo; + + export const typedeclAll: jspb.ExtensionFieldInfo; + + export const enumdeclAll: jspb.ExtensionFieldInfo; + + export const goprotoRegistration: jspb.ExtensionFieldInfo; + + export const messagenameAll: jspb.ExtensionFieldInfo; + + export const goprotoSizecacheAll: jspb.ExtensionFieldInfo; + + export const goprotoUnkeyedAll: jspb.ExtensionFieldInfo; + + export const goprotoGetters: jspb.ExtensionFieldInfo; + + export const goprotoStringer: jspb.ExtensionFieldInfo; + + export const verboseEqual: jspb.ExtensionFieldInfo; + + export const face: jspb.ExtensionFieldInfo; + + export const gostring: jspb.ExtensionFieldInfo; + + export const populate: jspb.ExtensionFieldInfo; + + export const stringer: jspb.ExtensionFieldInfo; + + export const onlyone: jspb.ExtensionFieldInfo; + + export const equal: jspb.ExtensionFieldInfo; + + export const description: jspb.ExtensionFieldInfo; + + export const testgen: jspb.ExtensionFieldInfo; + + export const benchgen: jspb.ExtensionFieldInfo; + + export const marshaler: jspb.ExtensionFieldInfo; + + export const unmarshaler: jspb.ExtensionFieldInfo; + + export const stableMarshaler: jspb.ExtensionFieldInfo; + + export const sizer: jspb.ExtensionFieldInfo; + + export const unsafeMarshaler: jspb.ExtensionFieldInfo; + + export const unsafeUnmarshaler: jspb.ExtensionFieldInfo; + + export const goprotoExtensionsMap: jspb.ExtensionFieldInfo; + + export const goprotoUnrecognized: jspb.ExtensionFieldInfo; + + export const protosizer: jspb.ExtensionFieldInfo; + + export const compare: jspb.ExtensionFieldInfo; + + export const typedecl: jspb.ExtensionFieldInfo; + + export const messagename: jspb.ExtensionFieldInfo; + + export const goprotoSizecache: jspb.ExtensionFieldInfo; + + export const goprotoUnkeyed: jspb.ExtensionFieldInfo; + + export const nullable: jspb.ExtensionFieldInfo; + + export const embed: jspb.ExtensionFieldInfo; + + export const customtype: jspb.ExtensionFieldInfo; + + export const customname: jspb.ExtensionFieldInfo; + + export const jsontag: jspb.ExtensionFieldInfo; + + export const moretags: jspb.ExtensionFieldInfo; + + export const casttype: jspb.ExtensionFieldInfo; + + export const castkey: jspb.ExtensionFieldInfo; + + export const castvalue: jspb.ExtensionFieldInfo; + + export const stdtime: jspb.ExtensionFieldInfo; + + export const stdduration: jspb.ExtensionFieldInfo; + + export const wktpointer: jspb.ExtensionFieldInfo; + diff --git a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js new file mode 100644 index 000000000..4d7ad97c0 --- /dev/null +++ b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js @@ -0,0 +1,1992 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.gogoproto.benchgen', null, global); +goog.exportSymbol('proto.gogoproto.benchgenAll', null, global); +goog.exportSymbol('proto.gogoproto.castkey', null, global); +goog.exportSymbol('proto.gogoproto.casttype', null, global); +goog.exportSymbol('proto.gogoproto.castvalue', null, global); +goog.exportSymbol('proto.gogoproto.compare', null, global); +goog.exportSymbol('proto.gogoproto.compareAll', null, global); +goog.exportSymbol('proto.gogoproto.customname', null, global); +goog.exportSymbol('proto.gogoproto.customtype', null, global); +goog.exportSymbol('proto.gogoproto.description', null, global); +goog.exportSymbol('proto.gogoproto.descriptionAll', null, global); +goog.exportSymbol('proto.gogoproto.embed', null, global); +goog.exportSymbol('proto.gogoproto.enumCustomname', null, global); +goog.exportSymbol('proto.gogoproto.enumStringer', null, global); +goog.exportSymbol('proto.gogoproto.enumStringerAll', null, global); +goog.exportSymbol('proto.gogoproto.enumdecl', null, global); +goog.exportSymbol('proto.gogoproto.enumdeclAll', null, global); +goog.exportSymbol('proto.gogoproto.enumvalueCustomname', null, global); +goog.exportSymbol('proto.gogoproto.equal', null, global); +goog.exportSymbol('proto.gogoproto.equalAll', null, global); +goog.exportSymbol('proto.gogoproto.face', null, global); +goog.exportSymbol('proto.gogoproto.faceAll', null, global); +goog.exportSymbol('proto.gogoproto.gogoprotoImport', null, global); +goog.exportSymbol('proto.gogoproto.goprotoEnumPrefix', null, global); +goog.exportSymbol('proto.gogoproto.goprotoEnumPrefixAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoEnumStringer', null, global); +goog.exportSymbol('proto.gogoproto.goprotoEnumStringerAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoExtensionsMap', null, global); +goog.exportSymbol('proto.gogoproto.goprotoExtensionsMapAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoGetters', null, global); +goog.exportSymbol('proto.gogoproto.goprotoGettersAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoRegistration', null, global); +goog.exportSymbol('proto.gogoproto.goprotoSizecache', null, global); +goog.exportSymbol('proto.gogoproto.goprotoSizecacheAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoStringer', null, global); +goog.exportSymbol('proto.gogoproto.goprotoStringerAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoUnkeyed', null, global); +goog.exportSymbol('proto.gogoproto.goprotoUnkeyedAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoUnrecognized', null, global); +goog.exportSymbol('proto.gogoproto.goprotoUnrecognizedAll', null, global); +goog.exportSymbol('proto.gogoproto.gostring', null, global); +goog.exportSymbol('proto.gogoproto.gostringAll', null, global); +goog.exportSymbol('proto.gogoproto.jsontag', null, global); +goog.exportSymbol('proto.gogoproto.marshaler', null, global); +goog.exportSymbol('proto.gogoproto.marshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.messagename', null, global); +goog.exportSymbol('proto.gogoproto.messagenameAll', null, global); +goog.exportSymbol('proto.gogoproto.moretags', null, global); +goog.exportSymbol('proto.gogoproto.nullable', null, global); +goog.exportSymbol('proto.gogoproto.onlyone', null, global); +goog.exportSymbol('proto.gogoproto.onlyoneAll', null, global); +goog.exportSymbol('proto.gogoproto.populate', null, global); +goog.exportSymbol('proto.gogoproto.populateAll', null, global); +goog.exportSymbol('proto.gogoproto.protosizer', null, global); +goog.exportSymbol('proto.gogoproto.protosizerAll', null, global); +goog.exportSymbol('proto.gogoproto.sizer', null, global); +goog.exportSymbol('proto.gogoproto.sizerAll', null, global); +goog.exportSymbol('proto.gogoproto.stableMarshaler', null, global); +goog.exportSymbol('proto.gogoproto.stableMarshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.stdduration', null, global); +goog.exportSymbol('proto.gogoproto.stdtime', null, global); +goog.exportSymbol('proto.gogoproto.stringer', null, global); +goog.exportSymbol('proto.gogoproto.stringerAll', null, global); +goog.exportSymbol('proto.gogoproto.testgen', null, global); +goog.exportSymbol('proto.gogoproto.testgenAll', null, global); +goog.exportSymbol('proto.gogoproto.typedecl', null, global); +goog.exportSymbol('proto.gogoproto.typedeclAll', null, global); +goog.exportSymbol('proto.gogoproto.unmarshaler', null, global); +goog.exportSymbol('proto.gogoproto.unmarshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.unsafeMarshaler', null, global); +goog.exportSymbol('proto.gogoproto.unsafeMarshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.unsafeUnmarshaler', null, global); +goog.exportSymbol('proto.gogoproto.unsafeUnmarshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.verboseEqual', null, global); +goog.exportSymbol('proto.gogoproto.verboseEqualAll', null, global); +goog.exportSymbol('proto.gogoproto.wktpointer', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoEnumPrefix`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoEnumPrefix = new jspb.ExtensionFieldInfo( + 62001, + {goprotoEnumPrefix: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoEnumPrefix, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62001] = proto.gogoproto.goprotoEnumPrefix; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoEnumStringer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoEnumStringer = new jspb.ExtensionFieldInfo( + 62021, + {goprotoEnumStringer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62021] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoEnumStringer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62021] = proto.gogoproto.goprotoEnumStringer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumStringer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumStringer = new jspb.ExtensionFieldInfo( + 62022, + {enumStringer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62022] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumStringer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62022] = proto.gogoproto.enumStringer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumCustomname`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumCustomname = new jspb.ExtensionFieldInfo( + 62023, + {enumCustomname: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62023] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumCustomname, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62023] = proto.gogoproto.enumCustomname; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumdecl`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumdecl = new jspb.ExtensionFieldInfo( + 62024, + {enumdecl: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62024] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumdecl, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62024] = proto.gogoproto.enumdecl; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumvalueCustomname`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumvalueCustomname = new jspb.ExtensionFieldInfo( + 66001, + {enumvalueCustomname: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumValueOptions.extensionsBinary[66001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumvalueCustomname, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumValueOptions.extensions[66001] = proto.gogoproto.enumvalueCustomname; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoGettersAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoGettersAll = new jspb.ExtensionFieldInfo( + 63001, + {goprotoGettersAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoGettersAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63001] = proto.gogoproto.goprotoGettersAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoEnumPrefixAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoEnumPrefixAll = new jspb.ExtensionFieldInfo( + 63002, + {goprotoEnumPrefixAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63002] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoEnumPrefixAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63002] = proto.gogoproto.goprotoEnumPrefixAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoStringerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoStringerAll = new jspb.ExtensionFieldInfo( + 63003, + {goprotoStringerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63003] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoStringerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63003] = proto.gogoproto.goprotoStringerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `verboseEqualAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.verboseEqualAll = new jspb.ExtensionFieldInfo( + 63004, + {verboseEqualAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63004] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.verboseEqualAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63004] = proto.gogoproto.verboseEqualAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `faceAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.faceAll = new jspb.ExtensionFieldInfo( + 63005, + {faceAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63005] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.faceAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63005] = proto.gogoproto.faceAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `gostringAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.gostringAll = new jspb.ExtensionFieldInfo( + 63006, + {gostringAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63006] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.gostringAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63006] = proto.gogoproto.gostringAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `populateAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.populateAll = new jspb.ExtensionFieldInfo( + 63007, + {populateAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63007] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.populateAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63007] = proto.gogoproto.populateAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stringerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stringerAll = new jspb.ExtensionFieldInfo( + 63008, + {stringerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63008] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stringerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63008] = proto.gogoproto.stringerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `onlyoneAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.onlyoneAll = new jspb.ExtensionFieldInfo( + 63009, + {onlyoneAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63009] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.onlyoneAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63009] = proto.gogoproto.onlyoneAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `equalAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.equalAll = new jspb.ExtensionFieldInfo( + 63013, + {equalAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63013] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.equalAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63013] = proto.gogoproto.equalAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `descriptionAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.descriptionAll = new jspb.ExtensionFieldInfo( + 63014, + {descriptionAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63014] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.descriptionAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63014] = proto.gogoproto.descriptionAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `testgenAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.testgenAll = new jspb.ExtensionFieldInfo( + 63015, + {testgenAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63015] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.testgenAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63015] = proto.gogoproto.testgenAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `benchgenAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.benchgenAll = new jspb.ExtensionFieldInfo( + 63016, + {benchgenAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63016] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.benchgenAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63016] = proto.gogoproto.benchgenAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `marshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.marshalerAll = new jspb.ExtensionFieldInfo( + 63017, + {marshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63017] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.marshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63017] = proto.gogoproto.marshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unmarshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unmarshalerAll = new jspb.ExtensionFieldInfo( + 63018, + {unmarshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63018] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unmarshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63018] = proto.gogoproto.unmarshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stableMarshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stableMarshalerAll = new jspb.ExtensionFieldInfo( + 63019, + {stableMarshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63019] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stableMarshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63019] = proto.gogoproto.stableMarshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `sizerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.sizerAll = new jspb.ExtensionFieldInfo( + 63020, + {sizerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63020] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.sizerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63020] = proto.gogoproto.sizerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoEnumStringerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoEnumStringerAll = new jspb.ExtensionFieldInfo( + 63021, + {goprotoEnumStringerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63021] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoEnumStringerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63021] = proto.gogoproto.goprotoEnumStringerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumStringerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumStringerAll = new jspb.ExtensionFieldInfo( + 63022, + {enumStringerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63022] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumStringerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63022] = proto.gogoproto.enumStringerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unsafeMarshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unsafeMarshalerAll = new jspb.ExtensionFieldInfo( + 63023, + {unsafeMarshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63023] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unsafeMarshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63023] = proto.gogoproto.unsafeMarshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unsafeUnmarshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unsafeUnmarshalerAll = new jspb.ExtensionFieldInfo( + 63024, + {unsafeUnmarshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63024] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unsafeUnmarshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63024] = proto.gogoproto.unsafeUnmarshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoExtensionsMapAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoExtensionsMapAll = new jspb.ExtensionFieldInfo( + 63025, + {goprotoExtensionsMapAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63025] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoExtensionsMapAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63025] = proto.gogoproto.goprotoExtensionsMapAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoUnrecognizedAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoUnrecognizedAll = new jspb.ExtensionFieldInfo( + 63026, + {goprotoUnrecognizedAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63026] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoUnrecognizedAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63026] = proto.gogoproto.goprotoUnrecognizedAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `gogoprotoImport`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.gogoprotoImport = new jspb.ExtensionFieldInfo( + 63027, + {gogoprotoImport: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63027] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.gogoprotoImport, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63027] = proto.gogoproto.gogoprotoImport; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `protosizerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.protosizerAll = new jspb.ExtensionFieldInfo( + 63028, + {protosizerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63028] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.protosizerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63028] = proto.gogoproto.protosizerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `compareAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.compareAll = new jspb.ExtensionFieldInfo( + 63029, + {compareAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63029] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.compareAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63029] = proto.gogoproto.compareAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `typedeclAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.typedeclAll = new jspb.ExtensionFieldInfo( + 63030, + {typedeclAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63030] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.typedeclAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63030] = proto.gogoproto.typedeclAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumdeclAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumdeclAll = new jspb.ExtensionFieldInfo( + 63031, + {enumdeclAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63031] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumdeclAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63031] = proto.gogoproto.enumdeclAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoRegistration`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoRegistration = new jspb.ExtensionFieldInfo( + 63032, + {goprotoRegistration: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63032] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoRegistration, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63032] = proto.gogoproto.goprotoRegistration; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `messagenameAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.messagenameAll = new jspb.ExtensionFieldInfo( + 63033, + {messagenameAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63033] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.messagenameAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63033] = proto.gogoproto.messagenameAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoSizecacheAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoSizecacheAll = new jspb.ExtensionFieldInfo( + 63034, + {goprotoSizecacheAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63034] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoSizecacheAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63034] = proto.gogoproto.goprotoSizecacheAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoUnkeyedAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoUnkeyedAll = new jspb.ExtensionFieldInfo( + 63035, + {goprotoUnkeyedAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63035] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoUnkeyedAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63035] = proto.gogoproto.goprotoUnkeyedAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoGetters`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoGetters = new jspb.ExtensionFieldInfo( + 64001, + {goprotoGetters: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoGetters, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64001] = proto.gogoproto.goprotoGetters; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoStringer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoStringer = new jspb.ExtensionFieldInfo( + 64003, + {goprotoStringer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64003] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoStringer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64003] = proto.gogoproto.goprotoStringer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `verboseEqual`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.verboseEqual = new jspb.ExtensionFieldInfo( + 64004, + {verboseEqual: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64004] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.verboseEqual, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64004] = proto.gogoproto.verboseEqual; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `face`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.face = new jspb.ExtensionFieldInfo( + 64005, + {face: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64005] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.face, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64005] = proto.gogoproto.face; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `gostring`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.gostring = new jspb.ExtensionFieldInfo( + 64006, + {gostring: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64006] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.gostring, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64006] = proto.gogoproto.gostring; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `populate`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.populate = new jspb.ExtensionFieldInfo( + 64007, + {populate: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64007] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.populate, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64007] = proto.gogoproto.populate; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stringer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stringer = new jspb.ExtensionFieldInfo( + 67008, + {stringer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[67008] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stringer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[67008] = proto.gogoproto.stringer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `onlyone`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.onlyone = new jspb.ExtensionFieldInfo( + 64009, + {onlyone: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64009] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.onlyone, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64009] = proto.gogoproto.onlyone; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `equal`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.equal = new jspb.ExtensionFieldInfo( + 64013, + {equal: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64013] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.equal, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64013] = proto.gogoproto.equal; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `description`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.description = new jspb.ExtensionFieldInfo( + 64014, + {description: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64014] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.description, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64014] = proto.gogoproto.description; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `testgen`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.testgen = new jspb.ExtensionFieldInfo( + 64015, + {testgen: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64015] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.testgen, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64015] = proto.gogoproto.testgen; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `benchgen`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.benchgen = new jspb.ExtensionFieldInfo( + 64016, + {benchgen: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64016] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.benchgen, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64016] = proto.gogoproto.benchgen; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `marshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.marshaler = new jspb.ExtensionFieldInfo( + 64017, + {marshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64017] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.marshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64017] = proto.gogoproto.marshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unmarshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unmarshaler = new jspb.ExtensionFieldInfo( + 64018, + {unmarshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64018] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unmarshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64018] = proto.gogoproto.unmarshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stableMarshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stableMarshaler = new jspb.ExtensionFieldInfo( + 64019, + {stableMarshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64019] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stableMarshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64019] = proto.gogoproto.stableMarshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `sizer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.sizer = new jspb.ExtensionFieldInfo( + 64020, + {sizer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64020] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.sizer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64020] = proto.gogoproto.sizer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unsafeMarshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unsafeMarshaler = new jspb.ExtensionFieldInfo( + 64023, + {unsafeMarshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64023] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unsafeMarshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64023] = proto.gogoproto.unsafeMarshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unsafeUnmarshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unsafeUnmarshaler = new jspb.ExtensionFieldInfo( + 64024, + {unsafeUnmarshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64024] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unsafeUnmarshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64024] = proto.gogoproto.unsafeUnmarshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoExtensionsMap`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoExtensionsMap = new jspb.ExtensionFieldInfo( + 64025, + {goprotoExtensionsMap: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64025] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoExtensionsMap, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64025] = proto.gogoproto.goprotoExtensionsMap; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoUnrecognized`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoUnrecognized = new jspb.ExtensionFieldInfo( + 64026, + {goprotoUnrecognized: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64026] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoUnrecognized, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64026] = proto.gogoproto.goprotoUnrecognized; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `protosizer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.protosizer = new jspb.ExtensionFieldInfo( + 64028, + {protosizer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64028] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.protosizer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64028] = proto.gogoproto.protosizer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `compare`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.compare = new jspb.ExtensionFieldInfo( + 64029, + {compare: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64029] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.compare, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64029] = proto.gogoproto.compare; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `typedecl`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.typedecl = new jspb.ExtensionFieldInfo( + 64030, + {typedecl: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64030] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.typedecl, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64030] = proto.gogoproto.typedecl; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `messagename`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.messagename = new jspb.ExtensionFieldInfo( + 64033, + {messagename: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64033] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.messagename, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64033] = proto.gogoproto.messagename; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoSizecache`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoSizecache = new jspb.ExtensionFieldInfo( + 64034, + {goprotoSizecache: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64034] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoSizecache, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64034] = proto.gogoproto.goprotoSizecache; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoUnkeyed`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoUnkeyed = new jspb.ExtensionFieldInfo( + 64035, + {goprotoUnkeyed: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64035] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoUnkeyed, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64035] = proto.gogoproto.goprotoUnkeyed; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `nullable`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.nullable = new jspb.ExtensionFieldInfo( + 65001, + {nullable: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.nullable, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65001] = proto.gogoproto.nullable; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `embed`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.embed = new jspb.ExtensionFieldInfo( + 65002, + {embed: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65002] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.embed, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65002] = proto.gogoproto.embed; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `customtype`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.customtype = new jspb.ExtensionFieldInfo( + 65003, + {customtype: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65003] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.customtype, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65003] = proto.gogoproto.customtype; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `customname`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.customname = new jspb.ExtensionFieldInfo( + 65004, + {customname: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65004] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.customname, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65004] = proto.gogoproto.customname; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `jsontag`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.jsontag = new jspb.ExtensionFieldInfo( + 65005, + {jsontag: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65005] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.jsontag, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65005] = proto.gogoproto.jsontag; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `moretags`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.moretags = new jspb.ExtensionFieldInfo( + 65006, + {moretags: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65006] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.moretags, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65006] = proto.gogoproto.moretags; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `casttype`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.casttype = new jspb.ExtensionFieldInfo( + 65007, + {casttype: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65007] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.casttype, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65007] = proto.gogoproto.casttype; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `castkey`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.castkey = new jspb.ExtensionFieldInfo( + 65008, + {castkey: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65008] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.castkey, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65008] = proto.gogoproto.castkey; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `castvalue`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.castvalue = new jspb.ExtensionFieldInfo( + 65009, + {castvalue: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65009] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.castvalue, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65009] = proto.gogoproto.castvalue; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stdtime`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stdtime = new jspb.ExtensionFieldInfo( + 65010, + {stdtime: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65010] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stdtime, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65010] = proto.gogoproto.stdtime; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stdduration`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stdduration = new jspb.ExtensionFieldInfo( + 65011, + {stdduration: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65011] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stdduration, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65011] = proto.gogoproto.stdduration; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `wktpointer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.wktpointer = new jspb.ExtensionFieldInfo( + 65012, + {wktpointer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65012] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.wktpointer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65012] = proto.gogoproto.wktpointer; + +goog.object.extend(exports, proto.gogoproto); diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.d.ts b/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.d.ts new file mode 100644 index 000000000..91a114321 --- /dev/null +++ b/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.d.ts @@ -0,0 +1,60 @@ +// GENERATED CODE -- DO NOT EDIT! + +// package: types +// file: github.com/tendermint/tendermint/abci/types/types.proto + +import * as github_com_tendermint_tendermint_abci_types_types_pb from "../../../../../github.com/tendermint/tendermint/abci/types/types_pb"; +import * as grpc from "grpc"; + +interface IABCIApplicationService extends grpc.ServiceDefinition { + echo: grpc.MethodDefinition; + flush: grpc.MethodDefinition; + info: grpc.MethodDefinition; + setOption: grpc.MethodDefinition; + deliverTx: grpc.MethodDefinition; + checkTx: grpc.MethodDefinition; + query: grpc.MethodDefinition; + commit: grpc.MethodDefinition; + initChain: grpc.MethodDefinition; + beginBlock: grpc.MethodDefinition; + endBlock: grpc.MethodDefinition; +} + +export const ABCIApplicationService: IABCIApplicationService; + +export class ABCIApplicationClient extends grpc.Client { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + echo(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, callback: grpc.requestCallback): grpc.ClientUnaryCall; + echo(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + echo(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + flush(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, callback: grpc.requestCallback): grpc.ClientUnaryCall; + flush(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + flush(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + info(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, callback: grpc.requestCallback): grpc.ClientUnaryCall; + info(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + info(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + setOption(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, callback: grpc.requestCallback): grpc.ClientUnaryCall; + setOption(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + setOption(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + deliverTx(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; + deliverTx(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + deliverTx(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + checkTx(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; + checkTx(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + checkTx(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + query(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, callback: grpc.requestCallback): grpc.ClientUnaryCall; + query(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + query(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + commit(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, callback: grpc.requestCallback): grpc.ClientUnaryCall; + commit(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + commit(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + initChain(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, callback: grpc.requestCallback): grpc.ClientUnaryCall; + initChain(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + initChain(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + beginBlock(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, callback: grpc.requestCallback): grpc.ClientUnaryCall; + beginBlock(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + beginBlock(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + endBlock(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, callback: grpc.requestCallback): grpc.ClientUnaryCall; + endBlock(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + endBlock(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; +} diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.js b/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.js new file mode 100644 index 000000000..de65dee46 --- /dev/null +++ b/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.js @@ -0,0 +1,380 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var github_com_tendermint_tendermint_abci_types_types_pb = require('../../../../../github.com/tendermint/tendermint/abci/types/types_pb.js'); +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +var github_com_tendermint_tendermint_libs_common_types_pb = require('../../../../../github.com/tendermint/tendermint/libs/common/types_pb.js'); + +function serialize_types_RequestBeginBlock(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock)) { + throw new Error('Expected argument of type types.RequestBeginBlock'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_RequestBeginBlock(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_RequestCheckTx(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx)) { + throw new Error('Expected argument of type types.RequestCheckTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_RequestCheckTx(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_RequestCommit(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit)) { + throw new Error('Expected argument of type types.RequestCommit'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_RequestCommit(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_RequestDeliverTx(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx)) { + throw new Error('Expected argument of type types.RequestDeliverTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_RequestDeliverTx(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_RequestEcho(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho)) { + throw new Error('Expected argument of type types.RequestEcho'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_RequestEcho(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_RequestEndBlock(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock)) { + throw new Error('Expected argument of type types.RequestEndBlock'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_RequestEndBlock(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_RequestFlush(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush)) { + throw new Error('Expected argument of type types.RequestFlush'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_RequestFlush(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_RequestInfo(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo)) { + throw new Error('Expected argument of type types.RequestInfo'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_RequestInfo(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_RequestInitChain(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain)) { + throw new Error('Expected argument of type types.RequestInitChain'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_RequestInitChain(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_RequestQuery(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery)) { + throw new Error('Expected argument of type types.RequestQuery'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_RequestQuery(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_RequestSetOption(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption)) { + throw new Error('Expected argument of type types.RequestSetOption'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_RequestSetOption(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_ResponseBeginBlock(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock)) { + throw new Error('Expected argument of type types.ResponseBeginBlock'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_ResponseBeginBlock(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_ResponseCheckTx(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx)) { + throw new Error('Expected argument of type types.ResponseCheckTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_ResponseCheckTx(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_ResponseCommit(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit)) { + throw new Error('Expected argument of type types.ResponseCommit'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_ResponseCommit(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_ResponseDeliverTx(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx)) { + throw new Error('Expected argument of type types.ResponseDeliverTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_ResponseDeliverTx(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_ResponseEcho(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho)) { + throw new Error('Expected argument of type types.ResponseEcho'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_ResponseEcho(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_ResponseEndBlock(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock)) { + throw new Error('Expected argument of type types.ResponseEndBlock'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_ResponseEndBlock(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_ResponseFlush(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush)) { + throw new Error('Expected argument of type types.ResponseFlush'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_ResponseFlush(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_ResponseInfo(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo)) { + throw new Error('Expected argument of type types.ResponseInfo'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_ResponseInfo(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_ResponseInitChain(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain)) { + throw new Error('Expected argument of type types.ResponseInitChain'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_ResponseInitChain(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_ResponseQuery(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery)) { + throw new Error('Expected argument of type types.ResponseQuery'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_ResponseQuery(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_ResponseSetOption(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption)) { + throw new Error('Expected argument of type types.ResponseSetOption'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_ResponseSetOption(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// ---------------------------------------- +// Service Definition +// +var ABCIApplicationService = exports.ABCIApplicationService = { + echo: { + path: '/types.ABCIApplication/Echo', + requestStream: false, + responseStream: false, + requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, + responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho, + requestSerialize: serialize_types_RequestEcho, + requestDeserialize: deserialize_types_RequestEcho, + responseSerialize: serialize_types_ResponseEcho, + responseDeserialize: deserialize_types_ResponseEcho, + }, + flush: { + path: '/types.ABCIApplication/Flush', + requestStream: false, + responseStream: false, + requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, + responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush, + requestSerialize: serialize_types_RequestFlush, + requestDeserialize: deserialize_types_RequestFlush, + responseSerialize: serialize_types_ResponseFlush, + responseDeserialize: deserialize_types_ResponseFlush, + }, + info: { + path: '/types.ABCIApplication/Info', + requestStream: false, + responseStream: false, + requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, + responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo, + requestSerialize: serialize_types_RequestInfo, + requestDeserialize: deserialize_types_RequestInfo, + responseSerialize: serialize_types_ResponseInfo, + responseDeserialize: deserialize_types_ResponseInfo, + }, + setOption: { + path: '/types.ABCIApplication/SetOption', + requestStream: false, + responseStream: false, + requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, + responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption, + requestSerialize: serialize_types_RequestSetOption, + requestDeserialize: deserialize_types_RequestSetOption, + responseSerialize: serialize_types_ResponseSetOption, + responseDeserialize: deserialize_types_ResponseSetOption, + }, + deliverTx: { + path: '/types.ABCIApplication/DeliverTx', + requestStream: false, + responseStream: false, + requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, + responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx, + requestSerialize: serialize_types_RequestDeliverTx, + requestDeserialize: deserialize_types_RequestDeliverTx, + responseSerialize: serialize_types_ResponseDeliverTx, + responseDeserialize: deserialize_types_ResponseDeliverTx, + }, + checkTx: { + path: '/types.ABCIApplication/CheckTx', + requestStream: false, + responseStream: false, + requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, + responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx, + requestSerialize: serialize_types_RequestCheckTx, + requestDeserialize: deserialize_types_RequestCheckTx, + responseSerialize: serialize_types_ResponseCheckTx, + responseDeserialize: deserialize_types_ResponseCheckTx, + }, + query: { + path: '/types.ABCIApplication/Query', + requestStream: false, + responseStream: false, + requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, + responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery, + requestSerialize: serialize_types_RequestQuery, + requestDeserialize: deserialize_types_RequestQuery, + responseSerialize: serialize_types_ResponseQuery, + responseDeserialize: deserialize_types_ResponseQuery, + }, + commit: { + path: '/types.ABCIApplication/Commit', + requestStream: false, + responseStream: false, + requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, + responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit, + requestSerialize: serialize_types_RequestCommit, + requestDeserialize: deserialize_types_RequestCommit, + responseSerialize: serialize_types_ResponseCommit, + responseDeserialize: deserialize_types_ResponseCommit, + }, + initChain: { + path: '/types.ABCIApplication/InitChain', + requestStream: false, + responseStream: false, + requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, + responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain, + requestSerialize: serialize_types_RequestInitChain, + requestDeserialize: deserialize_types_RequestInitChain, + responseSerialize: serialize_types_ResponseInitChain, + responseDeserialize: deserialize_types_ResponseInitChain, + }, + beginBlock: { + path: '/types.ABCIApplication/BeginBlock', + requestStream: false, + responseStream: false, + requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, + responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock, + requestSerialize: serialize_types_RequestBeginBlock, + requestDeserialize: deserialize_types_RequestBeginBlock, + responseSerialize: serialize_types_ResponseBeginBlock, + responseDeserialize: deserialize_types_ResponseBeginBlock, + }, + endBlock: { + path: '/types.ABCIApplication/EndBlock', + requestStream: false, + responseStream: false, + requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, + responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock, + requestSerialize: serialize_types_RequestEndBlock, + requestDeserialize: deserialize_types_RequestEndBlock, + responseSerialize: serialize_types_ResponseEndBlock, + responseDeserialize: deserialize_types_ResponseEndBlock, + }, +}; + +exports.ABCIApplicationClient = grpc.makeGenericClientConstructor(ABCIApplicationService); diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.d.ts b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.d.ts new file mode 100644 index 000000000..8501ca556 --- /dev/null +++ b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.d.ts @@ -0,0 +1,1287 @@ +// package: types +// file: github.com/tendermint/tendermint/abci/types/types.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as github_com_tendermint_tendermint_libs_common_types_pb from "../../../../../github.com/tendermint/tendermint/libs/common/types_pb"; + +export class Request extends jspb.Message { + hasEcho(): boolean; + clearEcho(): void; + getEcho(): RequestEcho | undefined; + setEcho(value?: RequestEcho): void; + + hasFlush(): boolean; + clearFlush(): void; + getFlush(): RequestFlush | undefined; + setFlush(value?: RequestFlush): void; + + hasInfo(): boolean; + clearInfo(): void; + getInfo(): RequestInfo | undefined; + setInfo(value?: RequestInfo): void; + + hasSetOption(): boolean; + clearSetOption(): void; + getSetOption(): RequestSetOption | undefined; + setSetOption(value?: RequestSetOption): void; + + hasInitChain(): boolean; + clearInitChain(): void; + getInitChain(): RequestInitChain | undefined; + setInitChain(value?: RequestInitChain): void; + + hasQuery(): boolean; + clearQuery(): void; + getQuery(): RequestQuery | undefined; + setQuery(value?: RequestQuery): void; + + hasBeginBlock(): boolean; + clearBeginBlock(): void; + getBeginBlock(): RequestBeginBlock | undefined; + setBeginBlock(value?: RequestBeginBlock): void; + + hasCheckTx(): boolean; + clearCheckTx(): void; + getCheckTx(): RequestCheckTx | undefined; + setCheckTx(value?: RequestCheckTx): void; + + hasDeliverTx(): boolean; + clearDeliverTx(): void; + getDeliverTx(): RequestDeliverTx | undefined; + setDeliverTx(value?: RequestDeliverTx): void; + + hasEndBlock(): boolean; + clearEndBlock(): void; + getEndBlock(): RequestEndBlock | undefined; + setEndBlock(value?: RequestEndBlock): void; + + hasCommit(): boolean; + clearCommit(): void; + getCommit(): RequestCommit | undefined; + setCommit(value?: RequestCommit): void; + + getValueCase(): Request.ValueCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Request.AsObject; + static toObject(includeInstance: boolean, msg: Request): Request.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Request, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Request; + static deserializeBinaryFromReader(message: Request, reader: jspb.BinaryReader): Request; +} + +export namespace Request { + export type AsObject = { + echo?: RequestEcho.AsObject, + flush?: RequestFlush.AsObject, + info?: RequestInfo.AsObject, + setOption?: RequestSetOption.AsObject, + initChain?: RequestInitChain.AsObject, + query?: RequestQuery.AsObject, + beginBlock?: RequestBeginBlock.AsObject, + checkTx?: RequestCheckTx.AsObject, + deliverTx?: RequestDeliverTx.AsObject, + endBlock?: RequestEndBlock.AsObject, + commit?: RequestCommit.AsObject, + } + + export enum ValueCase { + VALUE_NOT_SET = 0, + ECHO = 2, + FLUSH = 3, + INFO = 4, + SET_OPTION = 5, + INIT_CHAIN = 6, + QUERY = 7, + BEGIN_BLOCK = 8, + CHECK_TX = 9, + DELIVER_TX = 19, + END_BLOCK = 11, + COMMIT = 12, + } +} + +export class RequestEcho extends jspb.Message { + getMessage(): string; + setMessage(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestEcho.AsObject; + static toObject(includeInstance: boolean, msg: RequestEcho): RequestEcho.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestEcho, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestEcho; + static deserializeBinaryFromReader(message: RequestEcho, reader: jspb.BinaryReader): RequestEcho; +} + +export namespace RequestEcho { + export type AsObject = { + message: string, + } +} + +export class RequestFlush extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestFlush.AsObject; + static toObject(includeInstance: boolean, msg: RequestFlush): RequestFlush.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestFlush, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestFlush; + static deserializeBinaryFromReader(message: RequestFlush, reader: jspb.BinaryReader): RequestFlush; +} + +export namespace RequestFlush { + export type AsObject = { + } +} + +export class RequestInfo extends jspb.Message { + getVersion(): string; + setVersion(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestInfo.AsObject; + static toObject(includeInstance: boolean, msg: RequestInfo): RequestInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestInfo; + static deserializeBinaryFromReader(message: RequestInfo, reader: jspb.BinaryReader): RequestInfo; +} + +export namespace RequestInfo { + export type AsObject = { + version: string, + } +} + +export class RequestSetOption extends jspb.Message { + getKey(): string; + setKey(value: string): void; + + getValue(): string; + setValue(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestSetOption.AsObject; + static toObject(includeInstance: boolean, msg: RequestSetOption): RequestSetOption.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestSetOption, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestSetOption; + static deserializeBinaryFromReader(message: RequestSetOption, reader: jspb.BinaryReader): RequestSetOption; +} + +export namespace RequestSetOption { + export type AsObject = { + key: string, + value: string, + } +} + +export class RequestInitChain extends jspb.Message { + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getChainId(): string; + setChainId(value: string): void; + + hasConsensusParams(): boolean; + clearConsensusParams(): void; + getConsensusParams(): ConsensusParams | undefined; + setConsensusParams(value?: ConsensusParams): void; + + clearValidatorsList(): void; + getValidatorsList(): Array; + setValidatorsList(value: Array): void; + addValidators(value?: ValidatorUpdate, index?: number): ValidatorUpdate; + + getAppStateBytes(): Uint8Array | string; + getAppStateBytes_asU8(): Uint8Array; + getAppStateBytes_asB64(): string; + setAppStateBytes(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestInitChain.AsObject; + static toObject(includeInstance: boolean, msg: RequestInitChain): RequestInitChain.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestInitChain, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestInitChain; + static deserializeBinaryFromReader(message: RequestInitChain, reader: jspb.BinaryReader): RequestInitChain; +} + +export namespace RequestInitChain { + export type AsObject = { + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + chainId: string, + consensusParams?: ConsensusParams.AsObject, + validatorsList: Array, + appStateBytes: Uint8Array | string, + } +} + +export class RequestQuery extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + getPath(): string; + setPath(value: string): void; + + getHeight(): number; + setHeight(value: number): void; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestQuery.AsObject; + static toObject(includeInstance: boolean, msg: RequestQuery): RequestQuery.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestQuery, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestQuery; + static deserializeBinaryFromReader(message: RequestQuery, reader: jspb.BinaryReader): RequestQuery; +} + +export namespace RequestQuery { + export type AsObject = { + data: Uint8Array | string, + path: string, + height: number, + prove: boolean, + } +} + +export class RequestBeginBlock extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + + hasHeader(): boolean; + clearHeader(): void; + getHeader(): Header | undefined; + setHeader(value?: Header): void; + + hasLastCommitInfo(): boolean; + clearLastCommitInfo(): void; + getLastCommitInfo(): LastCommitInfo | undefined; + setLastCommitInfo(value?: LastCommitInfo): void; + + clearByzantineValidatorsList(): void; + getByzantineValidatorsList(): Array; + setByzantineValidatorsList(value: Array): void; + addByzantineValidators(value?: Evidence, index?: number): Evidence; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestBeginBlock.AsObject; + static toObject(includeInstance: boolean, msg: RequestBeginBlock): RequestBeginBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestBeginBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestBeginBlock; + static deserializeBinaryFromReader(message: RequestBeginBlock, reader: jspb.BinaryReader): RequestBeginBlock; +} + +export namespace RequestBeginBlock { + export type AsObject = { + hash: Uint8Array | string, + header?: Header.AsObject, + lastCommitInfo?: LastCommitInfo.AsObject, + byzantineValidatorsList: Array, + } +} + +export class RequestCheckTx extends jspb.Message { + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestCheckTx.AsObject; + static toObject(includeInstance: boolean, msg: RequestCheckTx): RequestCheckTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestCheckTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestCheckTx; + static deserializeBinaryFromReader(message: RequestCheckTx, reader: jspb.BinaryReader): RequestCheckTx; +} + +export namespace RequestCheckTx { + export type AsObject = { + tx: Uint8Array | string, + } +} + +export class RequestDeliverTx extends jspb.Message { + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestDeliverTx.AsObject; + static toObject(includeInstance: boolean, msg: RequestDeliverTx): RequestDeliverTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestDeliverTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestDeliverTx; + static deserializeBinaryFromReader(message: RequestDeliverTx, reader: jspb.BinaryReader): RequestDeliverTx; +} + +export namespace RequestDeliverTx { + export type AsObject = { + tx: Uint8Array | string, + } +} + +export class RequestEndBlock extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestEndBlock.AsObject; + static toObject(includeInstance: boolean, msg: RequestEndBlock): RequestEndBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestEndBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestEndBlock; + static deserializeBinaryFromReader(message: RequestEndBlock, reader: jspb.BinaryReader): RequestEndBlock; +} + +export namespace RequestEndBlock { + export type AsObject = { + height: number, + } +} + +export class RequestCommit extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestCommit.AsObject; + static toObject(includeInstance: boolean, msg: RequestCommit): RequestCommit.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestCommit, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestCommit; + static deserializeBinaryFromReader(message: RequestCommit, reader: jspb.BinaryReader): RequestCommit; +} + +export namespace RequestCommit { + export type AsObject = { + } +} + +export class Response extends jspb.Message { + hasException(): boolean; + clearException(): void; + getException(): ResponseException | undefined; + setException(value?: ResponseException): void; + + hasEcho(): boolean; + clearEcho(): void; + getEcho(): ResponseEcho | undefined; + setEcho(value?: ResponseEcho): void; + + hasFlush(): boolean; + clearFlush(): void; + getFlush(): ResponseFlush | undefined; + setFlush(value?: ResponseFlush): void; + + hasInfo(): boolean; + clearInfo(): void; + getInfo(): ResponseInfo | undefined; + setInfo(value?: ResponseInfo): void; + + hasSetOption(): boolean; + clearSetOption(): void; + getSetOption(): ResponseSetOption | undefined; + setSetOption(value?: ResponseSetOption): void; + + hasInitChain(): boolean; + clearInitChain(): void; + getInitChain(): ResponseInitChain | undefined; + setInitChain(value?: ResponseInitChain): void; + + hasQuery(): boolean; + clearQuery(): void; + getQuery(): ResponseQuery | undefined; + setQuery(value?: ResponseQuery): void; + + hasBeginBlock(): boolean; + clearBeginBlock(): void; + getBeginBlock(): ResponseBeginBlock | undefined; + setBeginBlock(value?: ResponseBeginBlock): void; + + hasCheckTx(): boolean; + clearCheckTx(): void; + getCheckTx(): ResponseCheckTx | undefined; + setCheckTx(value?: ResponseCheckTx): void; + + hasDeliverTx(): boolean; + clearDeliverTx(): void; + getDeliverTx(): ResponseDeliverTx | undefined; + setDeliverTx(value?: ResponseDeliverTx): void; + + hasEndBlock(): boolean; + clearEndBlock(): void; + getEndBlock(): ResponseEndBlock | undefined; + setEndBlock(value?: ResponseEndBlock): void; + + hasCommit(): boolean; + clearCommit(): void; + getCommit(): ResponseCommit | undefined; + setCommit(value?: ResponseCommit): void; + + getValueCase(): Response.ValueCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Response.AsObject; + static toObject(includeInstance: boolean, msg: Response): Response.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Response, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Response; + static deserializeBinaryFromReader(message: Response, reader: jspb.BinaryReader): Response; +} + +export namespace Response { + export type AsObject = { + exception?: ResponseException.AsObject, + echo?: ResponseEcho.AsObject, + flush?: ResponseFlush.AsObject, + info?: ResponseInfo.AsObject, + setOption?: ResponseSetOption.AsObject, + initChain?: ResponseInitChain.AsObject, + query?: ResponseQuery.AsObject, + beginBlock?: ResponseBeginBlock.AsObject, + checkTx?: ResponseCheckTx.AsObject, + deliverTx?: ResponseDeliverTx.AsObject, + endBlock?: ResponseEndBlock.AsObject, + commit?: ResponseCommit.AsObject, + } + + export enum ValueCase { + VALUE_NOT_SET = 0, + EXCEPTION = 1, + ECHO = 2, + FLUSH = 3, + INFO = 4, + SET_OPTION = 5, + INIT_CHAIN = 6, + QUERY = 7, + BEGIN_BLOCK = 8, + CHECK_TX = 9, + DELIVER_TX = 10, + END_BLOCK = 11, + COMMIT = 12, + } +} + +export class ResponseException extends jspb.Message { + getError(): string; + setError(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseException.AsObject; + static toObject(includeInstance: boolean, msg: ResponseException): ResponseException.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseException, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseException; + static deserializeBinaryFromReader(message: ResponseException, reader: jspb.BinaryReader): ResponseException; +} + +export namespace ResponseException { + export type AsObject = { + error: string, + } +} + +export class ResponseEcho extends jspb.Message { + getMessage(): string; + setMessage(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseEcho.AsObject; + static toObject(includeInstance: boolean, msg: ResponseEcho): ResponseEcho.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseEcho, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseEcho; + static deserializeBinaryFromReader(message: ResponseEcho, reader: jspb.BinaryReader): ResponseEcho; +} + +export namespace ResponseEcho { + export type AsObject = { + message: string, + } +} + +export class ResponseFlush extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseFlush.AsObject; + static toObject(includeInstance: boolean, msg: ResponseFlush): ResponseFlush.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseFlush, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseFlush; + static deserializeBinaryFromReader(message: ResponseFlush, reader: jspb.BinaryReader): ResponseFlush; +} + +export namespace ResponseFlush { + export type AsObject = { + } +} + +export class ResponseInfo extends jspb.Message { + getData(): string; + setData(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + getLastBlockHeight(): number; + setLastBlockHeight(value: number): void; + + getLastBlockAppHash(): Uint8Array | string; + getLastBlockAppHash_asU8(): Uint8Array; + getLastBlockAppHash_asB64(): string; + setLastBlockAppHash(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseInfo.AsObject; + static toObject(includeInstance: boolean, msg: ResponseInfo): ResponseInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseInfo; + static deserializeBinaryFromReader(message: ResponseInfo, reader: jspb.BinaryReader): ResponseInfo; +} + +export namespace ResponseInfo { + export type AsObject = { + data: string, + version: string, + lastBlockHeight: number, + lastBlockAppHash: Uint8Array | string, + } +} + +export class ResponseSetOption extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + getLog(): string; + setLog(value: string): void; + + getInfo(): string; + setInfo(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseSetOption.AsObject; + static toObject(includeInstance: boolean, msg: ResponseSetOption): ResponseSetOption.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseSetOption, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseSetOption; + static deserializeBinaryFromReader(message: ResponseSetOption, reader: jspb.BinaryReader): ResponseSetOption; +} + +export namespace ResponseSetOption { + export type AsObject = { + code: number, + log: string, + info: string, + } +} + +export class ResponseInitChain extends jspb.Message { + hasConsensusParams(): boolean; + clearConsensusParams(): void; + getConsensusParams(): ConsensusParams | undefined; + setConsensusParams(value?: ConsensusParams): void; + + clearValidatorsList(): void; + getValidatorsList(): Array; + setValidatorsList(value: Array): void; + addValidators(value?: ValidatorUpdate, index?: number): ValidatorUpdate; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseInitChain.AsObject; + static toObject(includeInstance: boolean, msg: ResponseInitChain): ResponseInitChain.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseInitChain, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseInitChain; + static deserializeBinaryFromReader(message: ResponseInitChain, reader: jspb.BinaryReader): ResponseInitChain; +} + +export namespace ResponseInitChain { + export type AsObject = { + consensusParams?: ConsensusParams.AsObject, + validatorsList: Array, + } +} + +export class ResponseQuery extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + getLog(): string; + setLog(value: string): void; + + getInfo(): string; + setInfo(value: string): void; + + getIndex(): number; + setIndex(value: number): void; + + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): void; + + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; + + getProof(): Uint8Array | string; + getProof_asU8(): Uint8Array; + getProof_asB64(): string; + setProof(value: Uint8Array | string): void; + + getHeight(): number; + setHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseQuery.AsObject; + static toObject(includeInstance: boolean, msg: ResponseQuery): ResponseQuery.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseQuery, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseQuery; + static deserializeBinaryFromReader(message: ResponseQuery, reader: jspb.BinaryReader): ResponseQuery; +} + +export namespace ResponseQuery { + export type AsObject = { + code: number, + log: string, + info: string, + index: number, + key: Uint8Array | string, + value: Uint8Array | string, + proof: Uint8Array | string, + height: number, + } +} + +export class ResponseBeginBlock extends jspb.Message { + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseBeginBlock.AsObject; + static toObject(includeInstance: boolean, msg: ResponseBeginBlock): ResponseBeginBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseBeginBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseBeginBlock; + static deserializeBinaryFromReader(message: ResponseBeginBlock, reader: jspb.BinaryReader): ResponseBeginBlock; +} + +export namespace ResponseBeginBlock { + export type AsObject = { + tagsList: Array, + } +} + +export class ResponseCheckTx extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + getLog(): string; + setLog(value: string): void; + + getInfo(): string; + setInfo(value: string): void; + + getGasWanted(): number; + setGasWanted(value: number): void; + + getGasUsed(): number; + setGasUsed(value: number): void; + + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseCheckTx.AsObject; + static toObject(includeInstance: boolean, msg: ResponseCheckTx): ResponseCheckTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseCheckTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseCheckTx; + static deserializeBinaryFromReader(message: ResponseCheckTx, reader: jspb.BinaryReader): ResponseCheckTx; +} + +export namespace ResponseCheckTx { + export type AsObject = { + code: number, + data: Uint8Array | string, + log: string, + info: string, + gasWanted: number, + gasUsed: number, + tagsList: Array, + } +} + +export class ResponseDeliverTx extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + getLog(): string; + setLog(value: string): void; + + getInfo(): string; + setInfo(value: string): void; + + getGasWanted(): number; + setGasWanted(value: number): void; + + getGasUsed(): number; + setGasUsed(value: number): void; + + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseDeliverTx.AsObject; + static toObject(includeInstance: boolean, msg: ResponseDeliverTx): ResponseDeliverTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseDeliverTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseDeliverTx; + static deserializeBinaryFromReader(message: ResponseDeliverTx, reader: jspb.BinaryReader): ResponseDeliverTx; +} + +export namespace ResponseDeliverTx { + export type AsObject = { + code: number, + data: Uint8Array | string, + log: string, + info: string, + gasWanted: number, + gasUsed: number, + tagsList: Array, + } +} + +export class ResponseEndBlock extends jspb.Message { + clearValidatorUpdatesList(): void; + getValidatorUpdatesList(): Array; + setValidatorUpdatesList(value: Array): void; + addValidatorUpdates(value?: ValidatorUpdate, index?: number): ValidatorUpdate; + + hasConsensusParamUpdates(): boolean; + clearConsensusParamUpdates(): void; + getConsensusParamUpdates(): ConsensusParams | undefined; + setConsensusParamUpdates(value?: ConsensusParams): void; + + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseEndBlock.AsObject; + static toObject(includeInstance: boolean, msg: ResponseEndBlock): ResponseEndBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseEndBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseEndBlock; + static deserializeBinaryFromReader(message: ResponseEndBlock, reader: jspb.BinaryReader): ResponseEndBlock; +} + +export namespace ResponseEndBlock { + export type AsObject = { + validatorUpdatesList: Array, + consensusParamUpdates?: ConsensusParams.AsObject, + tagsList: Array, + } +} + +export class ResponseCommit extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseCommit.AsObject; + static toObject(includeInstance: boolean, msg: ResponseCommit): ResponseCommit.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseCommit, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseCommit; + static deserializeBinaryFromReader(message: ResponseCommit, reader: jspb.BinaryReader): ResponseCommit; +} + +export namespace ResponseCommit { + export type AsObject = { + data: Uint8Array | string, + } +} + +export class ConsensusParams extends jspb.Message { + hasBlockSize(): boolean; + clearBlockSize(): void; + getBlockSize(): BlockSize | undefined; + setBlockSize(value?: BlockSize): void; + + hasTxSize(): boolean; + clearTxSize(): void; + getTxSize(): TxSize | undefined; + setTxSize(value?: TxSize): void; + + hasBlockGossip(): boolean; + clearBlockGossip(): void; + getBlockGossip(): BlockGossip | undefined; + setBlockGossip(value?: BlockGossip): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConsensusParams.AsObject; + static toObject(includeInstance: boolean, msg: ConsensusParams): ConsensusParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConsensusParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConsensusParams; + static deserializeBinaryFromReader(message: ConsensusParams, reader: jspb.BinaryReader): ConsensusParams; +} + +export namespace ConsensusParams { + export type AsObject = { + blockSize?: BlockSize.AsObject, + txSize?: TxSize.AsObject, + blockGossip?: BlockGossip.AsObject, + } +} + +export class BlockSize extends jspb.Message { + getMaxBytes(): number; + setMaxBytes(value: number): void; + + getMaxGas(): number; + setMaxGas(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockSize.AsObject; + static toObject(includeInstance: boolean, msg: BlockSize): BlockSize.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockSize, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockSize; + static deserializeBinaryFromReader(message: BlockSize, reader: jspb.BinaryReader): BlockSize; +} + +export namespace BlockSize { + export type AsObject = { + maxBytes: number, + maxGas: number, + } +} + +export class TxSize extends jspb.Message { + getMaxBytes(): number; + setMaxBytes(value: number): void; + + getMaxGas(): number; + setMaxGas(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxSize.AsObject; + static toObject(includeInstance: boolean, msg: TxSize): TxSize.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxSize, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxSize; + static deserializeBinaryFromReader(message: TxSize, reader: jspb.BinaryReader): TxSize; +} + +export namespace TxSize { + export type AsObject = { + maxBytes: number, + maxGas: number, + } +} + +export class BlockGossip extends jspb.Message { + getBlockPartSizeBytes(): number; + setBlockPartSizeBytes(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockGossip.AsObject; + static toObject(includeInstance: boolean, msg: BlockGossip): BlockGossip.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockGossip, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockGossip; + static deserializeBinaryFromReader(message: BlockGossip, reader: jspb.BinaryReader): BlockGossip; +} + +export namespace BlockGossip { + export type AsObject = { + blockPartSizeBytes: number, + } +} + +export class LastCommitInfo extends jspb.Message { + getRound(): number; + setRound(value: number): void; + + clearVotesList(): void; + getVotesList(): Array; + setVotesList(value: Array): void; + addVotes(value?: VoteInfo, index?: number): VoteInfo; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LastCommitInfo.AsObject; + static toObject(includeInstance: boolean, msg: LastCommitInfo): LastCommitInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LastCommitInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LastCommitInfo; + static deserializeBinaryFromReader(message: LastCommitInfo, reader: jspb.BinaryReader): LastCommitInfo; +} + +export namespace LastCommitInfo { + export type AsObject = { + round: number, + votesList: Array, + } +} + +export class Header extends jspb.Message { + getChainId(): string; + setChainId(value: string): void; + + getHeight(): number; + setHeight(value: number): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getNumTxs(): number; + setNumTxs(value: number): void; + + getTotalTxs(): number; + setTotalTxs(value: number): void; + + hasLastBlockId(): boolean; + clearLastBlockId(): void; + getLastBlockId(): BlockID | undefined; + setLastBlockId(value?: BlockID): void; + + getLastCommitHash(): Uint8Array | string; + getLastCommitHash_asU8(): Uint8Array; + getLastCommitHash_asB64(): string; + setLastCommitHash(value: Uint8Array | string): void; + + getDataHash(): Uint8Array | string; + getDataHash_asU8(): Uint8Array; + getDataHash_asB64(): string; + setDataHash(value: Uint8Array | string): void; + + getValidatorsHash(): Uint8Array | string; + getValidatorsHash_asU8(): Uint8Array; + getValidatorsHash_asB64(): string; + setValidatorsHash(value: Uint8Array | string): void; + + getNextValidatorsHash(): Uint8Array | string; + getNextValidatorsHash_asU8(): Uint8Array; + getNextValidatorsHash_asB64(): string; + setNextValidatorsHash(value: Uint8Array | string): void; + + getConsensusHash(): Uint8Array | string; + getConsensusHash_asU8(): Uint8Array; + getConsensusHash_asB64(): string; + setConsensusHash(value: Uint8Array | string): void; + + getAppHash(): Uint8Array | string; + getAppHash_asU8(): Uint8Array; + getAppHash_asB64(): string; + setAppHash(value: Uint8Array | string): void; + + getLastResultsHash(): Uint8Array | string; + getLastResultsHash_asU8(): Uint8Array; + getLastResultsHash_asB64(): string; + setLastResultsHash(value: Uint8Array | string): void; + + getEvidenceHash(): Uint8Array | string; + getEvidenceHash_asU8(): Uint8Array; + getEvidenceHash_asB64(): string; + setEvidenceHash(value: Uint8Array | string): void; + + getProposerAddress(): Uint8Array | string; + getProposerAddress_asU8(): Uint8Array; + getProposerAddress_asB64(): string; + setProposerAddress(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Header.AsObject; + static toObject(includeInstance: boolean, msg: Header): Header.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Header; + static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; +} + +export namespace Header { + export type AsObject = { + chainId: string, + height: number, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + numTxs: number, + totalTxs: number, + lastBlockId?: BlockID.AsObject, + lastCommitHash: Uint8Array | string, + dataHash: Uint8Array | string, + validatorsHash: Uint8Array | string, + nextValidatorsHash: Uint8Array | string, + consensusHash: Uint8Array | string, + appHash: Uint8Array | string, + lastResultsHash: Uint8Array | string, + evidenceHash: Uint8Array | string, + proposerAddress: Uint8Array | string, + } +} + +export class BlockID extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + + hasPartsHeader(): boolean; + clearPartsHeader(): void; + getPartsHeader(): PartSetHeader | undefined; + setPartsHeader(value?: PartSetHeader): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockID.AsObject; + static toObject(includeInstance: boolean, msg: BlockID): BlockID.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockID, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockID; + static deserializeBinaryFromReader(message: BlockID, reader: jspb.BinaryReader): BlockID; +} + +export namespace BlockID { + export type AsObject = { + hash: Uint8Array | string, + partsHeader?: PartSetHeader.AsObject, + } +} + +export class PartSetHeader extends jspb.Message { + getTotal(): number; + setTotal(value: number): void; + + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PartSetHeader.AsObject; + static toObject(includeInstance: boolean, msg: PartSetHeader): PartSetHeader.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PartSetHeader, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PartSetHeader; + static deserializeBinaryFromReader(message: PartSetHeader, reader: jspb.BinaryReader): PartSetHeader; +} + +export namespace PartSetHeader { + export type AsObject = { + total: number, + hash: Uint8Array | string, + } +} + +export class Validator extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getPower(): number; + setPower(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Validator.AsObject; + static toObject(includeInstance: boolean, msg: Validator): Validator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Validator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Validator; + static deserializeBinaryFromReader(message: Validator, reader: jspb.BinaryReader): Validator; +} + +export namespace Validator { + export type AsObject = { + address: Uint8Array | string, + power: number, + } +} + +export class ValidatorUpdate extends jspb.Message { + hasPubKey(): boolean; + clearPubKey(): void; + getPubKey(): PubKey | undefined; + setPubKey(value?: PubKey): void; + + getPower(): number; + setPower(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidatorUpdate.AsObject; + static toObject(includeInstance: boolean, msg: ValidatorUpdate): ValidatorUpdate.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValidatorUpdate, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidatorUpdate; + static deserializeBinaryFromReader(message: ValidatorUpdate, reader: jspb.BinaryReader): ValidatorUpdate; +} + +export namespace ValidatorUpdate { + export type AsObject = { + pubKey?: PubKey.AsObject, + power: number, + } +} + +export class VoteInfo extends jspb.Message { + hasValidator(): boolean; + clearValidator(): void; + getValidator(): Validator | undefined; + setValidator(value?: Validator): void; + + getSignedLastBlock(): boolean; + setSignedLastBlock(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VoteInfo.AsObject; + static toObject(includeInstance: boolean, msg: VoteInfo): VoteInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VoteInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VoteInfo; + static deserializeBinaryFromReader(message: VoteInfo, reader: jspb.BinaryReader): VoteInfo; +} + +export namespace VoteInfo { + export type AsObject = { + validator?: Validator.AsObject, + signedLastBlock: boolean, + } +} + +export class PubKey extends jspb.Message { + getType(): string; + setType(value: string): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PubKey.AsObject; + static toObject(includeInstance: boolean, msg: PubKey): PubKey.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PubKey, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PubKey; + static deserializeBinaryFromReader(message: PubKey, reader: jspb.BinaryReader): PubKey; +} + +export namespace PubKey { + export type AsObject = { + type: string, + data: Uint8Array | string, + } +} + +export class Evidence extends jspb.Message { + getType(): string; + setType(value: string): void; + + hasValidator(): boolean; + clearValidator(): void; + getValidator(): Validator | undefined; + setValidator(value?: Validator): void; + + getHeight(): number; + setHeight(value: number): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getTotalVotingPower(): number; + setTotalVotingPower(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Evidence.AsObject; + static toObject(includeInstance: boolean, msg: Evidence): Evidence.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Evidence, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Evidence; + static deserializeBinaryFromReader(message: Evidence, reader: jspb.BinaryReader): Evidence; +} + +export namespace Evidence { + export type AsObject = { + type: string, + validator?: Validator.AsObject, + height: number, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + totalVotingPower: number, + } +} + diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js new file mode 100644 index 000000000..149058bd4 --- /dev/null +++ b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js @@ -0,0 +1,9613 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var github_com_tendermint_tendermint_libs_common_types_pb = require('../../../../../github.com/tendermint/tendermint/libs/common/types_pb.js'); +goog.object.extend(proto, github_com_tendermint_tendermint_libs_common_types_pb); +goog.exportSymbol('proto.types.BlockGossip', null, global); +goog.exportSymbol('proto.types.BlockID', null, global); +goog.exportSymbol('proto.types.BlockSize', null, global); +goog.exportSymbol('proto.types.ConsensusParams', null, global); +goog.exportSymbol('proto.types.Evidence', null, global); +goog.exportSymbol('proto.types.Header', null, global); +goog.exportSymbol('proto.types.LastCommitInfo', null, global); +goog.exportSymbol('proto.types.PartSetHeader', null, global); +goog.exportSymbol('proto.types.PubKey', null, global); +goog.exportSymbol('proto.types.Request', null, global); +goog.exportSymbol('proto.types.RequestBeginBlock', null, global); +goog.exportSymbol('proto.types.RequestCheckTx', null, global); +goog.exportSymbol('proto.types.RequestCommit', null, global); +goog.exportSymbol('proto.types.RequestDeliverTx', null, global); +goog.exportSymbol('proto.types.RequestEcho', null, global); +goog.exportSymbol('proto.types.RequestEndBlock', null, global); +goog.exportSymbol('proto.types.RequestFlush', null, global); +goog.exportSymbol('proto.types.RequestInfo', null, global); +goog.exportSymbol('proto.types.RequestInitChain', null, global); +goog.exportSymbol('proto.types.RequestQuery', null, global); +goog.exportSymbol('proto.types.RequestSetOption', null, global); +goog.exportSymbol('proto.types.Response', null, global); +goog.exportSymbol('proto.types.ResponseBeginBlock', null, global); +goog.exportSymbol('proto.types.ResponseCheckTx', null, global); +goog.exportSymbol('proto.types.ResponseCommit', null, global); +goog.exportSymbol('proto.types.ResponseDeliverTx', null, global); +goog.exportSymbol('proto.types.ResponseEcho', null, global); +goog.exportSymbol('proto.types.ResponseEndBlock', null, global); +goog.exportSymbol('proto.types.ResponseException', null, global); +goog.exportSymbol('proto.types.ResponseFlush', null, global); +goog.exportSymbol('proto.types.ResponseInfo', null, global); +goog.exportSymbol('proto.types.ResponseInitChain', null, global); +goog.exportSymbol('proto.types.ResponseQuery', null, global); +goog.exportSymbol('proto.types.ResponseSetOption', null, global); +goog.exportSymbol('proto.types.TxSize', null, global); +goog.exportSymbol('proto.types.Validator', null, global); +goog.exportSymbol('proto.types.ValidatorUpdate', null, global); +goog.exportSymbol('proto.types.VoteInfo', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.Request = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.types.Request.oneofGroups_); +}; +goog.inherits(proto.types.Request, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.Request.displayName = 'proto.types.Request'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestEcho = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestEcho, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.RequestEcho.displayName = 'proto.types.RequestEcho'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestFlush = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestFlush, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.RequestFlush.displayName = 'proto.types.RequestFlush'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.RequestInfo.displayName = 'proto.types.RequestInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestSetOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestSetOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.RequestSetOption.displayName = 'proto.types.RequestSetOption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestInitChain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.RequestInitChain.repeatedFields_, null); +}; +goog.inherits(proto.types.RequestInitChain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.RequestInitChain.displayName = 'proto.types.RequestInitChain'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.RequestQuery.displayName = 'proto.types.RequestQuery'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestBeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.RequestBeginBlock.repeatedFields_, null); +}; +goog.inherits(proto.types.RequestBeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.RequestBeginBlock.displayName = 'proto.types.RequestBeginBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestCheckTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestCheckTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.RequestCheckTx.displayName = 'proto.types.RequestCheckTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestDeliverTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestDeliverTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.RequestDeliverTx.displayName = 'proto.types.RequestDeliverTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestEndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestEndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.RequestEndBlock.displayName = 'proto.types.RequestEndBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestCommit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestCommit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.RequestCommit.displayName = 'proto.types.RequestCommit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.Response = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.types.Response.oneofGroups_); +}; +goog.inherits(proto.types.Response, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.Response.displayName = 'proto.types.Response'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseException = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseException, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ResponseException.displayName = 'proto.types.ResponseException'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseEcho = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseEcho, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ResponseEcho.displayName = 'proto.types.ResponseEcho'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseFlush = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseFlush, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ResponseFlush.displayName = 'proto.types.ResponseFlush'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ResponseInfo.displayName = 'proto.types.ResponseInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseSetOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseSetOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ResponseSetOption.displayName = 'proto.types.ResponseSetOption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseInitChain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseInitChain.repeatedFields_, null); +}; +goog.inherits(proto.types.ResponseInitChain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ResponseInitChain.displayName = 'proto.types.ResponseInitChain'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ResponseQuery.displayName = 'proto.types.ResponseQuery'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseBeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseBeginBlock.repeatedFields_, null); +}; +goog.inherits(proto.types.ResponseBeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ResponseBeginBlock.displayName = 'proto.types.ResponseBeginBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseCheckTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseCheckTx.repeatedFields_, null); +}; +goog.inherits(proto.types.ResponseCheckTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ResponseCheckTx.displayName = 'proto.types.ResponseCheckTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseDeliverTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseDeliverTx.repeatedFields_, null); +}; +goog.inherits(proto.types.ResponseDeliverTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ResponseDeliverTx.displayName = 'proto.types.ResponseDeliverTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseEndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseEndBlock.repeatedFields_, null); +}; +goog.inherits(proto.types.ResponseEndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ResponseEndBlock.displayName = 'proto.types.ResponseEndBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseCommit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseCommit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ResponseCommit.displayName = 'proto.types.ResponseCommit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ConsensusParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ConsensusParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ConsensusParams.displayName = 'proto.types.ConsensusParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.BlockSize = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.BlockSize, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.BlockSize.displayName = 'proto.types.BlockSize'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.TxSize = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.TxSize, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.TxSize.displayName = 'proto.types.TxSize'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.BlockGossip = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.BlockGossip, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.BlockGossip.displayName = 'proto.types.BlockGossip'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.LastCommitInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.LastCommitInfo.repeatedFields_, null); +}; +goog.inherits(proto.types.LastCommitInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.LastCommitInfo.displayName = 'proto.types.LastCommitInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.Header.displayName = 'proto.types.Header'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.BlockID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.BlockID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.BlockID.displayName = 'proto.types.BlockID'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.PartSetHeader = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.PartSetHeader, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.PartSetHeader.displayName = 'proto.types.PartSetHeader'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.Validator.displayName = 'proto.types.Validator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ValidatorUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ValidatorUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.ValidatorUpdate.displayName = 'proto.types.ValidatorUpdate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.VoteInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.VoteInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.VoteInfo.displayName = 'proto.types.VoteInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.PubKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.PubKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.PubKey.displayName = 'proto.types.PubKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.Evidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.Evidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.types.Evidence.displayName = 'proto.types.Evidence'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.types.Request.oneofGroups_ = [[2,3,4,5,6,7,8,9,19,11,12]]; + +/** + * @enum {number} + */ +proto.types.Request.ValueCase = { + VALUE_NOT_SET: 0, + ECHO: 2, + FLUSH: 3, + INFO: 4, + SET_OPTION: 5, + INIT_CHAIN: 6, + QUERY: 7, + BEGIN_BLOCK: 8, + CHECK_TX: 9, + DELIVER_TX: 19, + END_BLOCK: 11, + COMMIT: 12 +}; + +/** + * @return {proto.types.Request.ValueCase} + */ +proto.types.Request.prototype.getValueCase = function() { + return /** @type {proto.types.Request.ValueCase} */(jspb.Message.computeOneofCase(this, proto.types.Request.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.Request.prototype.toObject = function(opt_includeInstance) { + return proto.types.Request.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.Request} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.Request.toObject = function(includeInstance, msg) { + var f, obj = { + echo: (f = msg.getEcho()) && proto.types.RequestEcho.toObject(includeInstance, f), + flush: (f = msg.getFlush()) && proto.types.RequestFlush.toObject(includeInstance, f), + info: (f = msg.getInfo()) && proto.types.RequestInfo.toObject(includeInstance, f), + setOption: (f = msg.getSetOption()) && proto.types.RequestSetOption.toObject(includeInstance, f), + initChain: (f = msg.getInitChain()) && proto.types.RequestInitChain.toObject(includeInstance, f), + query: (f = msg.getQuery()) && proto.types.RequestQuery.toObject(includeInstance, f), + beginBlock: (f = msg.getBeginBlock()) && proto.types.RequestBeginBlock.toObject(includeInstance, f), + checkTx: (f = msg.getCheckTx()) && proto.types.RequestCheckTx.toObject(includeInstance, f), + deliverTx: (f = msg.getDeliverTx()) && proto.types.RequestDeliverTx.toObject(includeInstance, f), + endBlock: (f = msg.getEndBlock()) && proto.types.RequestEndBlock.toObject(includeInstance, f), + commit: (f = msg.getCommit()) && proto.types.RequestCommit.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.Request} + */ +proto.types.Request.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.Request; + return proto.types.Request.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.Request} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.Request} + */ +proto.types.Request.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new proto.types.RequestEcho; + reader.readMessage(value,proto.types.RequestEcho.deserializeBinaryFromReader); + msg.setEcho(value); + break; + case 3: + var value = new proto.types.RequestFlush; + reader.readMessage(value,proto.types.RequestFlush.deserializeBinaryFromReader); + msg.setFlush(value); + break; + case 4: + var value = new proto.types.RequestInfo; + reader.readMessage(value,proto.types.RequestInfo.deserializeBinaryFromReader); + msg.setInfo(value); + break; + case 5: + var value = new proto.types.RequestSetOption; + reader.readMessage(value,proto.types.RequestSetOption.deserializeBinaryFromReader); + msg.setSetOption(value); + break; + case 6: + var value = new proto.types.RequestInitChain; + reader.readMessage(value,proto.types.RequestInitChain.deserializeBinaryFromReader); + msg.setInitChain(value); + break; + case 7: + var value = new proto.types.RequestQuery; + reader.readMessage(value,proto.types.RequestQuery.deserializeBinaryFromReader); + msg.setQuery(value); + break; + case 8: + var value = new proto.types.RequestBeginBlock; + reader.readMessage(value,proto.types.RequestBeginBlock.deserializeBinaryFromReader); + msg.setBeginBlock(value); + break; + case 9: + var value = new proto.types.RequestCheckTx; + reader.readMessage(value,proto.types.RequestCheckTx.deserializeBinaryFromReader); + msg.setCheckTx(value); + break; + case 19: + var value = new proto.types.RequestDeliverTx; + reader.readMessage(value,proto.types.RequestDeliverTx.deserializeBinaryFromReader); + msg.setDeliverTx(value); + break; + case 11: + var value = new proto.types.RequestEndBlock; + reader.readMessage(value,proto.types.RequestEndBlock.deserializeBinaryFromReader); + msg.setEndBlock(value); + break; + case 12: + var value = new proto.types.RequestCommit; + reader.readMessage(value,proto.types.RequestCommit.deserializeBinaryFromReader); + msg.setCommit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.Request.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.Request.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.Request} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.Request.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEcho(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.types.RequestEcho.serializeBinaryToWriter + ); + } + f = message.getFlush(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.types.RequestFlush.serializeBinaryToWriter + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.types.RequestInfo.serializeBinaryToWriter + ); + } + f = message.getSetOption(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.types.RequestSetOption.serializeBinaryToWriter + ); + } + f = message.getInitChain(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.types.RequestInitChain.serializeBinaryToWriter + ); + } + f = message.getQuery(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.types.RequestQuery.serializeBinaryToWriter + ); + } + f = message.getBeginBlock(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.types.RequestBeginBlock.serializeBinaryToWriter + ); + } + f = message.getCheckTx(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.types.RequestCheckTx.serializeBinaryToWriter + ); + } + f = message.getDeliverTx(); + if (f != null) { + writer.writeMessage( + 19, + f, + proto.types.RequestDeliverTx.serializeBinaryToWriter + ); + } + f = message.getEndBlock(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.types.RequestEndBlock.serializeBinaryToWriter + ); + } + f = message.getCommit(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.types.RequestCommit.serializeBinaryToWriter + ); + } +}; + + +/** + * optional RequestEcho echo = 2; + * @return {?proto.types.RequestEcho} + */ +proto.types.Request.prototype.getEcho = function() { + return /** @type{?proto.types.RequestEcho} */ ( + jspb.Message.getWrapperField(this, proto.types.RequestEcho, 2)); +}; + + +/** @param {?proto.types.RequestEcho|undefined} value */ +proto.types.Request.prototype.setEcho = function(value) { + jspb.Message.setOneofWrapperField(this, 2, proto.types.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Request.prototype.clearEcho = function() { + this.setEcho(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Request.prototype.hasEcho = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional RequestFlush flush = 3; + * @return {?proto.types.RequestFlush} + */ +proto.types.Request.prototype.getFlush = function() { + return /** @type{?proto.types.RequestFlush} */ ( + jspb.Message.getWrapperField(this, proto.types.RequestFlush, 3)); +}; + + +/** @param {?proto.types.RequestFlush|undefined} value */ +proto.types.Request.prototype.setFlush = function(value) { + jspb.Message.setOneofWrapperField(this, 3, proto.types.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Request.prototype.clearFlush = function() { + this.setFlush(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Request.prototype.hasFlush = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional RequestInfo info = 4; + * @return {?proto.types.RequestInfo} + */ +proto.types.Request.prototype.getInfo = function() { + return /** @type{?proto.types.RequestInfo} */ ( + jspb.Message.getWrapperField(this, proto.types.RequestInfo, 4)); +}; + + +/** @param {?proto.types.RequestInfo|undefined} value */ +proto.types.Request.prototype.setInfo = function(value) { + jspb.Message.setOneofWrapperField(this, 4, proto.types.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Request.prototype.clearInfo = function() { + this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Request.prototype.hasInfo = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional RequestSetOption set_option = 5; + * @return {?proto.types.RequestSetOption} + */ +proto.types.Request.prototype.getSetOption = function() { + return /** @type{?proto.types.RequestSetOption} */ ( + jspb.Message.getWrapperField(this, proto.types.RequestSetOption, 5)); +}; + + +/** @param {?proto.types.RequestSetOption|undefined} value */ +proto.types.Request.prototype.setSetOption = function(value) { + jspb.Message.setOneofWrapperField(this, 5, proto.types.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Request.prototype.clearSetOption = function() { + this.setSetOption(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Request.prototype.hasSetOption = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional RequestInitChain init_chain = 6; + * @return {?proto.types.RequestInitChain} + */ +proto.types.Request.prototype.getInitChain = function() { + return /** @type{?proto.types.RequestInitChain} */ ( + jspb.Message.getWrapperField(this, proto.types.RequestInitChain, 6)); +}; + + +/** @param {?proto.types.RequestInitChain|undefined} value */ +proto.types.Request.prototype.setInitChain = function(value) { + jspb.Message.setOneofWrapperField(this, 6, proto.types.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Request.prototype.clearInitChain = function() { + this.setInitChain(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Request.prototype.hasInitChain = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional RequestQuery query = 7; + * @return {?proto.types.RequestQuery} + */ +proto.types.Request.prototype.getQuery = function() { + return /** @type{?proto.types.RequestQuery} */ ( + jspb.Message.getWrapperField(this, proto.types.RequestQuery, 7)); +}; + + +/** @param {?proto.types.RequestQuery|undefined} value */ +proto.types.Request.prototype.setQuery = function(value) { + jspb.Message.setOneofWrapperField(this, 7, proto.types.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Request.prototype.clearQuery = function() { + this.setQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Request.prototype.hasQuery = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional RequestBeginBlock begin_block = 8; + * @return {?proto.types.RequestBeginBlock} + */ +proto.types.Request.prototype.getBeginBlock = function() { + return /** @type{?proto.types.RequestBeginBlock} */ ( + jspb.Message.getWrapperField(this, proto.types.RequestBeginBlock, 8)); +}; + + +/** @param {?proto.types.RequestBeginBlock|undefined} value */ +proto.types.Request.prototype.setBeginBlock = function(value) { + jspb.Message.setOneofWrapperField(this, 8, proto.types.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Request.prototype.clearBeginBlock = function() { + this.setBeginBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Request.prototype.hasBeginBlock = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional RequestCheckTx check_tx = 9; + * @return {?proto.types.RequestCheckTx} + */ +proto.types.Request.prototype.getCheckTx = function() { + return /** @type{?proto.types.RequestCheckTx} */ ( + jspb.Message.getWrapperField(this, proto.types.RequestCheckTx, 9)); +}; + + +/** @param {?proto.types.RequestCheckTx|undefined} value */ +proto.types.Request.prototype.setCheckTx = function(value) { + jspb.Message.setOneofWrapperField(this, 9, proto.types.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Request.prototype.clearCheckTx = function() { + this.setCheckTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Request.prototype.hasCheckTx = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional RequestDeliverTx deliver_tx = 19; + * @return {?proto.types.RequestDeliverTx} + */ +proto.types.Request.prototype.getDeliverTx = function() { + return /** @type{?proto.types.RequestDeliverTx} */ ( + jspb.Message.getWrapperField(this, proto.types.RequestDeliverTx, 19)); +}; + + +/** @param {?proto.types.RequestDeliverTx|undefined} value */ +proto.types.Request.prototype.setDeliverTx = function(value) { + jspb.Message.setOneofWrapperField(this, 19, proto.types.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Request.prototype.clearDeliverTx = function() { + this.setDeliverTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Request.prototype.hasDeliverTx = function() { + return jspb.Message.getField(this, 19) != null; +}; + + +/** + * optional RequestEndBlock end_block = 11; + * @return {?proto.types.RequestEndBlock} + */ +proto.types.Request.prototype.getEndBlock = function() { + return /** @type{?proto.types.RequestEndBlock} */ ( + jspb.Message.getWrapperField(this, proto.types.RequestEndBlock, 11)); +}; + + +/** @param {?proto.types.RequestEndBlock|undefined} value */ +proto.types.Request.prototype.setEndBlock = function(value) { + jspb.Message.setOneofWrapperField(this, 11, proto.types.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Request.prototype.clearEndBlock = function() { + this.setEndBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Request.prototype.hasEndBlock = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional RequestCommit commit = 12; + * @return {?proto.types.RequestCommit} + */ +proto.types.Request.prototype.getCommit = function() { + return /** @type{?proto.types.RequestCommit} */ ( + jspb.Message.getWrapperField(this, proto.types.RequestCommit, 12)); +}; + + +/** @param {?proto.types.RequestCommit|undefined} value */ +proto.types.Request.prototype.setCommit = function(value) { + jspb.Message.setOneofWrapperField(this, 12, proto.types.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Request.prototype.clearCommit = function() { + this.setCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Request.prototype.hasCommit = function() { + return jspb.Message.getField(this, 12) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.RequestEcho.prototype.toObject = function(opt_includeInstance) { + return proto.types.RequestEcho.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.RequestEcho} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestEcho.toObject = function(includeInstance, msg) { + var f, obj = { + message: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.RequestEcho} + */ +proto.types.RequestEcho.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.RequestEcho; + return proto.types.RequestEcho.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.RequestEcho} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.RequestEcho} + */ +proto.types.RequestEcho.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.RequestEcho.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.RequestEcho.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.RequestEcho} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestEcho.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.types.RequestEcho.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.types.RequestEcho.prototype.setMessage = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.RequestFlush.prototype.toObject = function(opt_includeInstance) { + return proto.types.RequestFlush.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.RequestFlush} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestFlush.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.RequestFlush} + */ +proto.types.RequestFlush.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.RequestFlush; + return proto.types.RequestFlush.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.RequestFlush} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.RequestFlush} + */ +proto.types.RequestFlush.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.RequestFlush.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.RequestFlush.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.RequestFlush} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestFlush.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.RequestInfo.prototype.toObject = function(opt_includeInstance) { + return proto.types.RequestInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.RequestInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestInfo.toObject = function(includeInstance, msg) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.RequestInfo} + */ +proto.types.RequestInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.RequestInfo; + return proto.types.RequestInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.RequestInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.RequestInfo} + */ +proto.types.RequestInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.RequestInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.RequestInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.RequestInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string version = 1; + * @return {string} + */ +proto.types.RequestInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.types.RequestInfo.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.RequestSetOption.prototype.toObject = function(opt_includeInstance) { + return proto.types.RequestSetOption.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.RequestSetOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestSetOption.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.RequestSetOption} + */ +proto.types.RequestSetOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.RequestSetOption; + return proto.types.RequestSetOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.RequestSetOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.RequestSetOption} + */ +proto.types.RequestSetOption.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.RequestSetOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.RequestSetOption.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.RequestSetOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestSetOption.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.types.RequestSetOption.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.types.RequestSetOption.prototype.setKey = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string value = 2; + * @return {string} + */ +proto.types.RequestSetOption.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.types.RequestSetOption.prototype.setValue = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.types.RequestInitChain.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.RequestInitChain.prototype.toObject = function(opt_includeInstance) { + return proto.types.RequestInitChain.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.RequestInitChain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestInitChain.toObject = function(includeInstance, msg) { + var f, obj = { + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + chainId: jspb.Message.getFieldWithDefault(msg, 2, ""), + consensusParams: (f = msg.getConsensusParams()) && proto.types.ConsensusParams.toObject(includeInstance, f), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.types.ValidatorUpdate.toObject, includeInstance), + appStateBytes: msg.getAppStateBytes_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.RequestInitChain} + */ +proto.types.RequestInitChain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.RequestInitChain; + return proto.types.RequestInitChain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.RequestInitChain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.RequestInitChain} + */ +proto.types.RequestInitChain.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 3: + var value = new proto.types.ConsensusParams; + reader.readMessage(value,proto.types.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParams(value); + break; + case 4: + var value = new proto.types.ValidatorUpdate; + reader.readMessage(value,proto.types.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppStateBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.RequestInitChain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.RequestInitChain.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.RequestInitChain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestInitChain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getConsensusParams(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.types.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.types.ValidatorUpdate.serializeBinaryToWriter + ); + } + f = message.getAppStateBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional google.protobuf.Timestamp time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.types.RequestInitChain.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +proto.types.RequestInitChain.prototype.setTime = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.RequestInitChain.prototype.clearTime = function() { + this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.RequestInitChain.prototype.hasTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string chain_id = 2; + * @return {string} + */ +proto.types.RequestInitChain.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.types.RequestInitChain.prototype.setChainId = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional ConsensusParams consensus_params = 3; + * @return {?proto.types.ConsensusParams} + */ +proto.types.RequestInitChain.prototype.getConsensusParams = function() { + return /** @type{?proto.types.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, proto.types.ConsensusParams, 3)); +}; + + +/** @param {?proto.types.ConsensusParams|undefined} value */ +proto.types.RequestInitChain.prototype.setConsensusParams = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.RequestInitChain.prototype.clearConsensusParams = function() { + this.setConsensusParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.RequestInitChain.prototype.hasConsensusParams = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated ValidatorUpdate validators = 4; + * @return {!Array} + */ +proto.types.RequestInitChain.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.types.ValidatorUpdate, 4)); +}; + + +/** @param {!Array} value */ +proto.types.RequestInitChain.prototype.setValidatorsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.types.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.types.ValidatorUpdate} + */ +proto.types.RequestInitChain.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.types.ValidatorUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.types.RequestInitChain.prototype.clearValidatorsList = function() { + this.setValidatorsList([]); +}; + + +/** + * optional bytes app_state_bytes = 5; + * @return {!(string|Uint8Array)} + */ +proto.types.RequestInitChain.prototype.getAppStateBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes app_state_bytes = 5; + * This is a type-conversion wrapper around `getAppStateBytes()` + * @return {string} + */ +proto.types.RequestInitChain.prototype.getAppStateBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppStateBytes())); +}; + + +/** + * optional bytes app_state_bytes = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppStateBytes()` + * @return {!Uint8Array} + */ +proto.types.RequestInitChain.prototype.getAppStateBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppStateBytes())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.RequestInitChain.prototype.setAppStateBytes = function(value) { + jspb.Message.setProto3BytesField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.RequestQuery.prototype.toObject = function(opt_includeInstance) { + return proto.types.RequestQuery.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.RequestQuery} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestQuery.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + path: jspb.Message.getFieldWithDefault(msg, 2, ""), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + prove: jspb.Message.getFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.RequestQuery} + */ +proto.types.RequestQuery.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.RequestQuery; + return proto.types.RequestQuery.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.RequestQuery} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.RequestQuery} + */ +proto.types.RequestQuery.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPath(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.RequestQuery.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.RequestQuery.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.RequestQuery} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestQuery.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.types.RequestQuery.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.types.RequestQuery.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.types.RequestQuery.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.RequestQuery.prototype.setData = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string path = 2; + * @return {string} + */ +proto.types.RequestQuery.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.types.RequestQuery.prototype.setPath = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.types.RequestQuery.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.types.RequestQuery.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bool prove = 4; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.types.RequestQuery.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); +}; + + +/** @param {boolean} value */ +proto.types.RequestQuery.prototype.setProve = function(value) { + jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.types.RequestBeginBlock.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.RequestBeginBlock.prototype.toObject = function(opt_includeInstance) { + return proto.types.RequestBeginBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.RequestBeginBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestBeginBlock.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_asB64(), + header: (f = msg.getHeader()) && proto.types.Header.toObject(includeInstance, f), + lastCommitInfo: (f = msg.getLastCommitInfo()) && proto.types.LastCommitInfo.toObject(includeInstance, f), + byzantineValidatorsList: jspb.Message.toObjectList(msg.getByzantineValidatorsList(), + proto.types.Evidence.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.RequestBeginBlock} + */ +proto.types.RequestBeginBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.RequestBeginBlock; + return proto.types.RequestBeginBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.RequestBeginBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.RequestBeginBlock} + */ +proto.types.RequestBeginBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 2: + var value = new proto.types.Header; + reader.readMessage(value,proto.types.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 3: + var value = new proto.types.LastCommitInfo; + reader.readMessage(value,proto.types.LastCommitInfo.deserializeBinaryFromReader); + msg.setLastCommitInfo(value); + break; + case 4: + var value = new proto.types.Evidence; + reader.readMessage(value,proto.types.Evidence.deserializeBinaryFromReader); + msg.addByzantineValidators(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.RequestBeginBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.RequestBeginBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.RequestBeginBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestBeginBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.types.Header.serializeBinaryToWriter + ); + } + f = message.getLastCommitInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.types.LastCommitInfo.serializeBinaryToWriter + ); + } + f = message.getByzantineValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.types.Evidence.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.types.RequestBeginBlock.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes hash = 1; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.types.RequestBeginBlock.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.types.RequestBeginBlock.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.RequestBeginBlock.prototype.setHash = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional Header header = 2; + * @return {?proto.types.Header} + */ +proto.types.RequestBeginBlock.prototype.getHeader = function() { + return /** @type{?proto.types.Header} */ ( + jspb.Message.getWrapperField(this, proto.types.Header, 2)); +}; + + +/** @param {?proto.types.Header|undefined} value */ +proto.types.RequestBeginBlock.prototype.setHeader = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.RequestBeginBlock.prototype.clearHeader = function() { + this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.RequestBeginBlock.prototype.hasHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional LastCommitInfo last_commit_info = 3; + * @return {?proto.types.LastCommitInfo} + */ +proto.types.RequestBeginBlock.prototype.getLastCommitInfo = function() { + return /** @type{?proto.types.LastCommitInfo} */ ( + jspb.Message.getWrapperField(this, proto.types.LastCommitInfo, 3)); +}; + + +/** @param {?proto.types.LastCommitInfo|undefined} value */ +proto.types.RequestBeginBlock.prototype.setLastCommitInfo = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.RequestBeginBlock.prototype.clearLastCommitInfo = function() { + this.setLastCommitInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.RequestBeginBlock.prototype.hasLastCommitInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated Evidence byzantine_validators = 4; + * @return {!Array} + */ +proto.types.RequestBeginBlock.prototype.getByzantineValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.types.Evidence, 4)); +}; + + +/** @param {!Array} value */ +proto.types.RequestBeginBlock.prototype.setByzantineValidatorsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.types.Evidence=} opt_value + * @param {number=} opt_index + * @return {!proto.types.Evidence} + */ +proto.types.RequestBeginBlock.prototype.addByzantineValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.types.Evidence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.types.RequestBeginBlock.prototype.clearByzantineValidatorsList = function() { + this.setByzantineValidatorsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { + return proto.types.RequestCheckTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.RequestCheckTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestCheckTx.toObject = function(includeInstance, msg) { + var f, obj = { + tx: msg.getTx_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.RequestCheckTx} + */ +proto.types.RequestCheckTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.RequestCheckTx; + return proto.types.RequestCheckTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.RequestCheckTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.RequestCheckTx} + */ +proto.types.RequestCheckTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.RequestCheckTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.RequestCheckTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.RequestCheckTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestCheckTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes tx = 1; + * @return {!(string|Uint8Array)} + */ +proto.types.RequestCheckTx.prototype.getTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes tx = 1; + * This is a type-conversion wrapper around `getTx()` + * @return {string} + */ +proto.types.RequestCheckTx.prototype.getTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTx())); +}; + + +/** + * optional bytes tx = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTx()` + * @return {!Uint8Array} + */ +proto.types.RequestCheckTx.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.RequestCheckTx.prototype.setTx = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.RequestDeliverTx.prototype.toObject = function(opt_includeInstance) { + return proto.types.RequestDeliverTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.RequestDeliverTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestDeliverTx.toObject = function(includeInstance, msg) { + var f, obj = { + tx: msg.getTx_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.RequestDeliverTx} + */ +proto.types.RequestDeliverTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.RequestDeliverTx; + return proto.types.RequestDeliverTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.RequestDeliverTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.RequestDeliverTx} + */ +proto.types.RequestDeliverTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.RequestDeliverTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.RequestDeliverTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.RequestDeliverTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestDeliverTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes tx = 1; + * @return {!(string|Uint8Array)} + */ +proto.types.RequestDeliverTx.prototype.getTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes tx = 1; + * This is a type-conversion wrapper around `getTx()` + * @return {string} + */ +proto.types.RequestDeliverTx.prototype.getTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTx())); +}; + + +/** + * optional bytes tx = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTx()` + * @return {!Uint8Array} + */ +proto.types.RequestDeliverTx.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.RequestDeliverTx.prototype.setTx = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.RequestEndBlock.prototype.toObject = function(opt_includeInstance) { + return proto.types.RequestEndBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.RequestEndBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestEndBlock.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.RequestEndBlock} + */ +proto.types.RequestEndBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.RequestEndBlock; + return proto.types.RequestEndBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.RequestEndBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.RequestEndBlock} + */ +proto.types.RequestEndBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.RequestEndBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.RequestEndBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.RequestEndBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestEndBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.types.RequestEndBlock.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.types.RequestEndBlock.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.RequestCommit.prototype.toObject = function(opt_includeInstance) { + return proto.types.RequestCommit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.RequestCommit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestCommit.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.RequestCommit} + */ +proto.types.RequestCommit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.RequestCommit; + return proto.types.RequestCommit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.RequestCommit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.RequestCommit} + */ +proto.types.RequestCommit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.RequestCommit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.RequestCommit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.RequestCommit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.RequestCommit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.types.Response.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12]]; + +/** + * @enum {number} + */ +proto.types.Response.ValueCase = { + VALUE_NOT_SET: 0, + EXCEPTION: 1, + ECHO: 2, + FLUSH: 3, + INFO: 4, + SET_OPTION: 5, + INIT_CHAIN: 6, + QUERY: 7, + BEGIN_BLOCK: 8, + CHECK_TX: 9, + DELIVER_TX: 10, + END_BLOCK: 11, + COMMIT: 12 +}; + +/** + * @return {proto.types.Response.ValueCase} + */ +proto.types.Response.prototype.getValueCase = function() { + return /** @type {proto.types.Response.ValueCase} */(jspb.Message.computeOneofCase(this, proto.types.Response.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.Response.prototype.toObject = function(opt_includeInstance) { + return proto.types.Response.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.Response} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.Response.toObject = function(includeInstance, msg) { + var f, obj = { + exception: (f = msg.getException()) && proto.types.ResponseException.toObject(includeInstance, f), + echo: (f = msg.getEcho()) && proto.types.ResponseEcho.toObject(includeInstance, f), + flush: (f = msg.getFlush()) && proto.types.ResponseFlush.toObject(includeInstance, f), + info: (f = msg.getInfo()) && proto.types.ResponseInfo.toObject(includeInstance, f), + setOption: (f = msg.getSetOption()) && proto.types.ResponseSetOption.toObject(includeInstance, f), + initChain: (f = msg.getInitChain()) && proto.types.ResponseInitChain.toObject(includeInstance, f), + query: (f = msg.getQuery()) && proto.types.ResponseQuery.toObject(includeInstance, f), + beginBlock: (f = msg.getBeginBlock()) && proto.types.ResponseBeginBlock.toObject(includeInstance, f), + checkTx: (f = msg.getCheckTx()) && proto.types.ResponseCheckTx.toObject(includeInstance, f), + deliverTx: (f = msg.getDeliverTx()) && proto.types.ResponseDeliverTx.toObject(includeInstance, f), + endBlock: (f = msg.getEndBlock()) && proto.types.ResponseEndBlock.toObject(includeInstance, f), + commit: (f = msg.getCommit()) && proto.types.ResponseCommit.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.Response} + */ +proto.types.Response.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.Response; + return proto.types.Response.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.Response} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.Response} + */ +proto.types.Response.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.types.ResponseException; + reader.readMessage(value,proto.types.ResponseException.deserializeBinaryFromReader); + msg.setException(value); + break; + case 2: + var value = new proto.types.ResponseEcho; + reader.readMessage(value,proto.types.ResponseEcho.deserializeBinaryFromReader); + msg.setEcho(value); + break; + case 3: + var value = new proto.types.ResponseFlush; + reader.readMessage(value,proto.types.ResponseFlush.deserializeBinaryFromReader); + msg.setFlush(value); + break; + case 4: + var value = new proto.types.ResponseInfo; + reader.readMessage(value,proto.types.ResponseInfo.deserializeBinaryFromReader); + msg.setInfo(value); + break; + case 5: + var value = new proto.types.ResponseSetOption; + reader.readMessage(value,proto.types.ResponseSetOption.deserializeBinaryFromReader); + msg.setSetOption(value); + break; + case 6: + var value = new proto.types.ResponseInitChain; + reader.readMessage(value,proto.types.ResponseInitChain.deserializeBinaryFromReader); + msg.setInitChain(value); + break; + case 7: + var value = new proto.types.ResponseQuery; + reader.readMessage(value,proto.types.ResponseQuery.deserializeBinaryFromReader); + msg.setQuery(value); + break; + case 8: + var value = new proto.types.ResponseBeginBlock; + reader.readMessage(value,proto.types.ResponseBeginBlock.deserializeBinaryFromReader); + msg.setBeginBlock(value); + break; + case 9: + var value = new proto.types.ResponseCheckTx; + reader.readMessage(value,proto.types.ResponseCheckTx.deserializeBinaryFromReader); + msg.setCheckTx(value); + break; + case 10: + var value = new proto.types.ResponseDeliverTx; + reader.readMessage(value,proto.types.ResponseDeliverTx.deserializeBinaryFromReader); + msg.setDeliverTx(value); + break; + case 11: + var value = new proto.types.ResponseEndBlock; + reader.readMessage(value,proto.types.ResponseEndBlock.deserializeBinaryFromReader); + msg.setEndBlock(value); + break; + case 12: + var value = new proto.types.ResponseCommit; + reader.readMessage(value,proto.types.ResponseCommit.deserializeBinaryFromReader); + msg.setCommit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.Response.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.Response.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.Response} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.Response.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getException(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.types.ResponseException.serializeBinaryToWriter + ); + } + f = message.getEcho(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.types.ResponseEcho.serializeBinaryToWriter + ); + } + f = message.getFlush(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.types.ResponseFlush.serializeBinaryToWriter + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.types.ResponseInfo.serializeBinaryToWriter + ); + } + f = message.getSetOption(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.types.ResponseSetOption.serializeBinaryToWriter + ); + } + f = message.getInitChain(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.types.ResponseInitChain.serializeBinaryToWriter + ); + } + f = message.getQuery(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.types.ResponseQuery.serializeBinaryToWriter + ); + } + f = message.getBeginBlock(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.types.ResponseBeginBlock.serializeBinaryToWriter + ); + } + f = message.getCheckTx(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.types.ResponseCheckTx.serializeBinaryToWriter + ); + } + f = message.getDeliverTx(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.types.ResponseDeliverTx.serializeBinaryToWriter + ); + } + f = message.getEndBlock(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.types.ResponseEndBlock.serializeBinaryToWriter + ); + } + f = message.getCommit(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.types.ResponseCommit.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ResponseException exception = 1; + * @return {?proto.types.ResponseException} + */ +proto.types.Response.prototype.getException = function() { + return /** @type{?proto.types.ResponseException} */ ( + jspb.Message.getWrapperField(this, proto.types.ResponseException, 1)); +}; + + +/** @param {?proto.types.ResponseException|undefined} value */ +proto.types.Response.prototype.setException = function(value) { + jspb.Message.setOneofWrapperField(this, 1, proto.types.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Response.prototype.clearException = function() { + this.setException(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Response.prototype.hasException = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ResponseEcho echo = 2; + * @return {?proto.types.ResponseEcho} + */ +proto.types.Response.prototype.getEcho = function() { + return /** @type{?proto.types.ResponseEcho} */ ( + jspb.Message.getWrapperField(this, proto.types.ResponseEcho, 2)); +}; + + +/** @param {?proto.types.ResponseEcho|undefined} value */ +proto.types.Response.prototype.setEcho = function(value) { + jspb.Message.setOneofWrapperField(this, 2, proto.types.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Response.prototype.clearEcho = function() { + this.setEcho(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Response.prototype.hasEcho = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ResponseFlush flush = 3; + * @return {?proto.types.ResponseFlush} + */ +proto.types.Response.prototype.getFlush = function() { + return /** @type{?proto.types.ResponseFlush} */ ( + jspb.Message.getWrapperField(this, proto.types.ResponseFlush, 3)); +}; + + +/** @param {?proto.types.ResponseFlush|undefined} value */ +proto.types.Response.prototype.setFlush = function(value) { + jspb.Message.setOneofWrapperField(this, 3, proto.types.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Response.prototype.clearFlush = function() { + this.setFlush(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Response.prototype.hasFlush = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ResponseInfo info = 4; + * @return {?proto.types.ResponseInfo} + */ +proto.types.Response.prototype.getInfo = function() { + return /** @type{?proto.types.ResponseInfo} */ ( + jspb.Message.getWrapperField(this, proto.types.ResponseInfo, 4)); +}; + + +/** @param {?proto.types.ResponseInfo|undefined} value */ +proto.types.Response.prototype.setInfo = function(value) { + jspb.Message.setOneofWrapperField(this, 4, proto.types.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Response.prototype.clearInfo = function() { + this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Response.prototype.hasInfo = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional ResponseSetOption set_option = 5; + * @return {?proto.types.ResponseSetOption} + */ +proto.types.Response.prototype.getSetOption = function() { + return /** @type{?proto.types.ResponseSetOption} */ ( + jspb.Message.getWrapperField(this, proto.types.ResponseSetOption, 5)); +}; + + +/** @param {?proto.types.ResponseSetOption|undefined} value */ +proto.types.Response.prototype.setSetOption = function(value) { + jspb.Message.setOneofWrapperField(this, 5, proto.types.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Response.prototype.clearSetOption = function() { + this.setSetOption(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Response.prototype.hasSetOption = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional ResponseInitChain init_chain = 6; + * @return {?proto.types.ResponseInitChain} + */ +proto.types.Response.prototype.getInitChain = function() { + return /** @type{?proto.types.ResponseInitChain} */ ( + jspb.Message.getWrapperField(this, proto.types.ResponseInitChain, 6)); +}; + + +/** @param {?proto.types.ResponseInitChain|undefined} value */ +proto.types.Response.prototype.setInitChain = function(value) { + jspb.Message.setOneofWrapperField(this, 6, proto.types.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Response.prototype.clearInitChain = function() { + this.setInitChain(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Response.prototype.hasInitChain = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional ResponseQuery query = 7; + * @return {?proto.types.ResponseQuery} + */ +proto.types.Response.prototype.getQuery = function() { + return /** @type{?proto.types.ResponseQuery} */ ( + jspb.Message.getWrapperField(this, proto.types.ResponseQuery, 7)); +}; + + +/** @param {?proto.types.ResponseQuery|undefined} value */ +proto.types.Response.prototype.setQuery = function(value) { + jspb.Message.setOneofWrapperField(this, 7, proto.types.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Response.prototype.clearQuery = function() { + this.setQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Response.prototype.hasQuery = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional ResponseBeginBlock begin_block = 8; + * @return {?proto.types.ResponseBeginBlock} + */ +proto.types.Response.prototype.getBeginBlock = function() { + return /** @type{?proto.types.ResponseBeginBlock} */ ( + jspb.Message.getWrapperField(this, proto.types.ResponseBeginBlock, 8)); +}; + + +/** @param {?proto.types.ResponseBeginBlock|undefined} value */ +proto.types.Response.prototype.setBeginBlock = function(value) { + jspb.Message.setOneofWrapperField(this, 8, proto.types.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Response.prototype.clearBeginBlock = function() { + this.setBeginBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Response.prototype.hasBeginBlock = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional ResponseCheckTx check_tx = 9; + * @return {?proto.types.ResponseCheckTx} + */ +proto.types.Response.prototype.getCheckTx = function() { + return /** @type{?proto.types.ResponseCheckTx} */ ( + jspb.Message.getWrapperField(this, proto.types.ResponseCheckTx, 9)); +}; + + +/** @param {?proto.types.ResponseCheckTx|undefined} value */ +proto.types.Response.prototype.setCheckTx = function(value) { + jspb.Message.setOneofWrapperField(this, 9, proto.types.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Response.prototype.clearCheckTx = function() { + this.setCheckTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Response.prototype.hasCheckTx = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional ResponseDeliverTx deliver_tx = 10; + * @return {?proto.types.ResponseDeliverTx} + */ +proto.types.Response.prototype.getDeliverTx = function() { + return /** @type{?proto.types.ResponseDeliverTx} */ ( + jspb.Message.getWrapperField(this, proto.types.ResponseDeliverTx, 10)); +}; + + +/** @param {?proto.types.ResponseDeliverTx|undefined} value */ +proto.types.Response.prototype.setDeliverTx = function(value) { + jspb.Message.setOneofWrapperField(this, 10, proto.types.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Response.prototype.clearDeliverTx = function() { + this.setDeliverTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Response.prototype.hasDeliverTx = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional ResponseEndBlock end_block = 11; + * @return {?proto.types.ResponseEndBlock} + */ +proto.types.Response.prototype.getEndBlock = function() { + return /** @type{?proto.types.ResponseEndBlock} */ ( + jspb.Message.getWrapperField(this, proto.types.ResponseEndBlock, 11)); +}; + + +/** @param {?proto.types.ResponseEndBlock|undefined} value */ +proto.types.Response.prototype.setEndBlock = function(value) { + jspb.Message.setOneofWrapperField(this, 11, proto.types.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Response.prototype.clearEndBlock = function() { + this.setEndBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Response.prototype.hasEndBlock = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional ResponseCommit commit = 12; + * @return {?proto.types.ResponseCommit} + */ +proto.types.Response.prototype.getCommit = function() { + return /** @type{?proto.types.ResponseCommit} */ ( + jspb.Message.getWrapperField(this, proto.types.ResponseCommit, 12)); +}; + + +/** @param {?proto.types.ResponseCommit|undefined} value */ +proto.types.Response.prototype.setCommit = function(value) { + jspb.Message.setOneofWrapperField(this, 12, proto.types.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Response.prototype.clearCommit = function() { + this.setCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Response.prototype.hasCommit = function() { + return jspb.Message.getField(this, 12) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ResponseException.prototype.toObject = function(opt_includeInstance) { + return proto.types.ResponseException.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ResponseException} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseException.toObject = function(includeInstance, msg) { + var f, obj = { + error: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ResponseException} + */ +proto.types.ResponseException.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ResponseException; + return proto.types.ResponseException.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ResponseException} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ResponseException} + */ +proto.types.ResponseException.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ResponseException.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ResponseException.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ResponseException} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseException.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string error = 1; + * @return {string} + */ +proto.types.ResponseException.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.types.ResponseException.prototype.setError = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ResponseEcho.prototype.toObject = function(opt_includeInstance) { + return proto.types.ResponseEcho.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ResponseEcho} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseEcho.toObject = function(includeInstance, msg) { + var f, obj = { + message: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ResponseEcho} + */ +proto.types.ResponseEcho.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ResponseEcho; + return proto.types.ResponseEcho.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ResponseEcho} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ResponseEcho} + */ +proto.types.ResponseEcho.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ResponseEcho.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ResponseEcho.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ResponseEcho} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseEcho.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.types.ResponseEcho.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.types.ResponseEcho.prototype.setMessage = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ResponseFlush.prototype.toObject = function(opt_includeInstance) { + return proto.types.ResponseFlush.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ResponseFlush} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseFlush.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ResponseFlush} + */ +proto.types.ResponseFlush.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ResponseFlush; + return proto.types.ResponseFlush.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ResponseFlush} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ResponseFlush} + */ +proto.types.ResponseFlush.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ResponseFlush.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ResponseFlush.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ResponseFlush} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseFlush.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ResponseInfo.prototype.toObject = function(opt_includeInstance) { + return proto.types.ResponseInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ResponseInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseInfo.toObject = function(includeInstance, msg) { + var f, obj = { + data: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: jspb.Message.getFieldWithDefault(msg, 2, ""), + lastBlockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + lastBlockAppHash: msg.getLastBlockAppHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ResponseInfo} + */ +proto.types.ResponseInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ResponseInfo; + return proto.types.ResponseInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ResponseInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ResponseInfo} + */ +proto.types.ResponseInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastBlockHeight(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastBlockAppHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ResponseInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ResponseInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ResponseInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLastBlockHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getLastBlockAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional string data = 1; + * @return {string} + */ +proto.types.ResponseInfo.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.types.ResponseInfo.prototype.setData = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string version = 2; + * @return {string} + */ +proto.types.ResponseInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.types.ResponseInfo.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 last_block_height = 3; + * @return {number} + */ +proto.types.ResponseInfo.prototype.getLastBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.types.ResponseInfo.prototype.setLastBlockHeight = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes last_block_app_hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.types.ResponseInfo.prototype.getLastBlockAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes last_block_app_hash = 4; + * This is a type-conversion wrapper around `getLastBlockAppHash()` + * @return {string} + */ +proto.types.ResponseInfo.prototype.getLastBlockAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastBlockAppHash())); +}; + + +/** + * optional bytes last_block_app_hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastBlockAppHash()` + * @return {!Uint8Array} + */ +proto.types.ResponseInfo.prototype.getLastBlockAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastBlockAppHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.ResponseInfo.prototype.setLastBlockAppHash = function(value) { + jspb.Message.setProto3BytesField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ResponseSetOption.prototype.toObject = function(opt_includeInstance) { + return proto.types.ResponseSetOption.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ResponseSetOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseSetOption.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ResponseSetOption} + */ +proto.types.ResponseSetOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ResponseSetOption; + return proto.types.ResponseSetOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ResponseSetOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ResponseSetOption} + */ +proto.types.ResponseSetOption.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ResponseSetOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ResponseSetOption.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ResponseSetOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseSetOption.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.types.ResponseSetOption.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.types.ResponseSetOption.prototype.setCode = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.types.ResponseSetOption.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.types.ResponseSetOption.prototype.setLog = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.types.ResponseSetOption.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.types.ResponseSetOption.prototype.setInfo = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.types.ResponseInitChain.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ResponseInitChain.prototype.toObject = function(opt_includeInstance) { + return proto.types.ResponseInitChain.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ResponseInitChain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseInitChain.toObject = function(includeInstance, msg) { + var f, obj = { + consensusParams: (f = msg.getConsensusParams()) && proto.types.ConsensusParams.toObject(includeInstance, f), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.types.ValidatorUpdate.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ResponseInitChain} + */ +proto.types.ResponseInitChain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ResponseInitChain; + return proto.types.ResponseInitChain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ResponseInitChain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ResponseInitChain} + */ +proto.types.ResponseInitChain.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.types.ConsensusParams; + reader.readMessage(value,proto.types.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParams(value); + break; + case 2: + var value = new proto.types.ValidatorUpdate; + reader.readMessage(value,proto.types.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidators(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ResponseInitChain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ResponseInitChain.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ResponseInitChain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseInitChain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.types.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.types.ValidatorUpdate.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ConsensusParams consensus_params = 1; + * @return {?proto.types.ConsensusParams} + */ +proto.types.ResponseInitChain.prototype.getConsensusParams = function() { + return /** @type{?proto.types.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, proto.types.ConsensusParams, 1)); +}; + + +/** @param {?proto.types.ConsensusParams|undefined} value */ +proto.types.ResponseInitChain.prototype.setConsensusParams = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.ResponseInitChain.prototype.clearConsensusParams = function() { + this.setConsensusParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.ResponseInitChain.prototype.hasConsensusParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated ValidatorUpdate validators = 2; + * @return {!Array} + */ +proto.types.ResponseInitChain.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.types.ValidatorUpdate, 2)); +}; + + +/** @param {!Array} value */ +proto.types.ResponseInitChain.prototype.setValidatorsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.types.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.types.ValidatorUpdate} + */ +proto.types.ResponseInitChain.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.types.ValidatorUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.types.ResponseInitChain.prototype.clearValidatorsList = function() { + this.setValidatorsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ResponseQuery.prototype.toObject = function(opt_includeInstance) { + return proto.types.ResponseQuery.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ResponseQuery} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseQuery.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: jspb.Message.getFieldWithDefault(msg, 4, ""), + index: jspb.Message.getFieldWithDefault(msg, 5, 0), + key: msg.getKey_asB64(), + value: msg.getValue_asB64(), + proof: msg.getProof_asB64(), + height: jspb.Message.getFieldWithDefault(msg, 9, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ResponseQuery} + */ +proto.types.ResponseQuery.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ResponseQuery; + return proto.types.ResponseQuery.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ResponseQuery} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ResponseQuery} + */ +proto.types.ResponseQuery.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setIndex(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProof(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ResponseQuery.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ResponseQuery.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ResponseQuery} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseQuery.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProof_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.types.ResponseQuery.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.types.ResponseQuery.prototype.setCode = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.types.ResponseQuery.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.types.ResponseQuery.prototype.setLog = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.types.ResponseQuery.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.types.ResponseQuery.prototype.setInfo = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 index = 5; + * @return {number} + */ +proto.types.ResponseQuery.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.types.ResponseQuery.prototype.setIndex = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional bytes key = 6; + * @return {!(string|Uint8Array)} + */ +proto.types.ResponseQuery.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes key = 6; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.types.ResponseQuery.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.types.ResponseQuery.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.ResponseQuery.prototype.setKey = function(value) { + jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional bytes value = 7; + * @return {!(string|Uint8Array)} + */ +proto.types.ResponseQuery.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes value = 7; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.types.ResponseQuery.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.types.ResponseQuery.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.ResponseQuery.prototype.setValue = function(value) { + jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional bytes proof = 8; + * @return {!(string|Uint8Array)} + */ +proto.types.ResponseQuery.prototype.getProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes proof = 8; + * This is a type-conversion wrapper around `getProof()` + * @return {string} + */ +proto.types.ResponseQuery.prototype.getProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProof())); +}; + + +/** + * optional bytes proof = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProof()` + * @return {!Uint8Array} + */ +proto.types.ResponseQuery.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.ResponseQuery.prototype.setProof = function(value) { + jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * optional int64 height = 9; + * @return {number} + */ +proto.types.ResponseQuery.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.types.ResponseQuery.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 9, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.types.ResponseBeginBlock.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ResponseBeginBlock.prototype.toObject = function(opt_includeInstance) { + return proto.types.ResponseBeginBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ResponseBeginBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseBeginBlock.toObject = function(includeInstance, msg) { + var f, obj = { + tagsList: jspb.Message.toObjectList(msg.getTagsList(), + github_com_tendermint_tendermint_libs_common_types_pb.KVPair.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ResponseBeginBlock} + */ +proto.types.ResponseBeginBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ResponseBeginBlock; + return proto.types.ResponseBeginBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ResponseBeginBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ResponseBeginBlock} + */ +proto.types.ResponseBeginBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + reader.readMessage(value,github_com_tendermint_tendermint_libs_common_types_pb.KVPair.deserializeBinaryFromReader); + msg.addTags(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ResponseBeginBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ResponseBeginBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ResponseBeginBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseBeginBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + github_com_tendermint_tendermint_libs_common_types_pb.KVPair.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated common.KVPair tags = 1; + * @return {!Array} + */ +proto.types.ResponseBeginBlock.prototype.getTagsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, github_com_tendermint_tendermint_libs_common_types_pb.KVPair, 1)); +}; + + +/** @param {!Array} value */ +proto.types.ResponseBeginBlock.prototype.setTagsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.common.KVPair=} opt_value + * @param {number=} opt_index + * @return {!proto.common.KVPair} + */ +proto.types.ResponseBeginBlock.prototype.addTags = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.common.KVPair, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.types.ResponseBeginBlock.prototype.clearTagsList = function() { + this.setTagsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.types.ResponseCheckTx.repeatedFields_ = [7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { + return proto.types.ResponseCheckTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ResponseCheckTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseCheckTx.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + data: msg.getData_asB64(), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: jspb.Message.getFieldWithDefault(msg, 4, ""), + gasWanted: jspb.Message.getFieldWithDefault(msg, 5, 0), + gasUsed: jspb.Message.getFieldWithDefault(msg, 6, 0), + tagsList: jspb.Message.toObjectList(msg.getTagsList(), + github_com_tendermint_tendermint_libs_common_types_pb.KVPair.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ResponseCheckTx} + */ +proto.types.ResponseCheckTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ResponseCheckTx; + return proto.types.ResponseCheckTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ResponseCheckTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ResponseCheckTx} + */ +proto.types.ResponseCheckTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasWanted(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasUsed(value); + break; + case 7: + var value = new github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + reader.readMessage(value,github_com_tendermint_tendermint_libs_common_types_pb.KVPair.deserializeBinaryFromReader); + msg.addTags(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ResponseCheckTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ResponseCheckTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ResponseCheckTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseCheckTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getGasWanted(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getGasUsed(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + github_com_tendermint_tendermint_libs_common_types_pb.KVPair.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.types.ResponseCheckTx.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.types.ResponseCheckTx.prototype.setCode = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.types.ResponseCheckTx.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.types.ResponseCheckTx.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.types.ResponseCheckTx.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.ResponseCheckTx.prototype.setData = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.types.ResponseCheckTx.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.types.ResponseCheckTx.prototype.setLog = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.types.ResponseCheckTx.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.types.ResponseCheckTx.prototype.setInfo = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 gas_wanted = 5; + * @return {number} + */ +proto.types.ResponseCheckTx.prototype.getGasWanted = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.types.ResponseCheckTx.prototype.setGasWanted = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 gas_used = 6; + * @return {number} + */ +proto.types.ResponseCheckTx.prototype.getGasUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.types.ResponseCheckTx.prototype.setGasUsed = function(value) { + jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * repeated common.KVPair tags = 7; + * @return {!Array} + */ +proto.types.ResponseCheckTx.prototype.getTagsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, github_com_tendermint_tendermint_libs_common_types_pb.KVPair, 7)); +}; + + +/** @param {!Array} value */ +proto.types.ResponseCheckTx.prototype.setTagsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.common.KVPair=} opt_value + * @param {number=} opt_index + * @return {!proto.common.KVPair} + */ +proto.types.ResponseCheckTx.prototype.addTags = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.common.KVPair, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.types.ResponseCheckTx.prototype.clearTagsList = function() { + this.setTagsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.types.ResponseDeliverTx.repeatedFields_ = [7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ResponseDeliverTx.prototype.toObject = function(opt_includeInstance) { + return proto.types.ResponseDeliverTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ResponseDeliverTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseDeliverTx.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + data: msg.getData_asB64(), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: jspb.Message.getFieldWithDefault(msg, 4, ""), + gasWanted: jspb.Message.getFieldWithDefault(msg, 5, 0), + gasUsed: jspb.Message.getFieldWithDefault(msg, 6, 0), + tagsList: jspb.Message.toObjectList(msg.getTagsList(), + github_com_tendermint_tendermint_libs_common_types_pb.KVPair.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ResponseDeliverTx} + */ +proto.types.ResponseDeliverTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ResponseDeliverTx; + return proto.types.ResponseDeliverTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ResponseDeliverTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ResponseDeliverTx} + */ +proto.types.ResponseDeliverTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasWanted(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasUsed(value); + break; + case 7: + var value = new github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + reader.readMessage(value,github_com_tendermint_tendermint_libs_common_types_pb.KVPair.deserializeBinaryFromReader); + msg.addTags(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ResponseDeliverTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ResponseDeliverTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ResponseDeliverTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseDeliverTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getGasWanted(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getGasUsed(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + github_com_tendermint_tendermint_libs_common_types_pb.KVPair.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.types.ResponseDeliverTx.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.types.ResponseDeliverTx.prototype.setCode = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.types.ResponseDeliverTx.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.types.ResponseDeliverTx.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.types.ResponseDeliverTx.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.ResponseDeliverTx.prototype.setData = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.types.ResponseDeliverTx.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.types.ResponseDeliverTx.prototype.setLog = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.types.ResponseDeliverTx.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.types.ResponseDeliverTx.prototype.setInfo = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 gas_wanted = 5; + * @return {number} + */ +proto.types.ResponseDeliverTx.prototype.getGasWanted = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.types.ResponseDeliverTx.prototype.setGasWanted = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 gas_used = 6; + * @return {number} + */ +proto.types.ResponseDeliverTx.prototype.getGasUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.types.ResponseDeliverTx.prototype.setGasUsed = function(value) { + jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * repeated common.KVPair tags = 7; + * @return {!Array} + */ +proto.types.ResponseDeliverTx.prototype.getTagsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, github_com_tendermint_tendermint_libs_common_types_pb.KVPair, 7)); +}; + + +/** @param {!Array} value */ +proto.types.ResponseDeliverTx.prototype.setTagsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.common.KVPair=} opt_value + * @param {number=} opt_index + * @return {!proto.common.KVPair} + */ +proto.types.ResponseDeliverTx.prototype.addTags = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.common.KVPair, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.types.ResponseDeliverTx.prototype.clearTagsList = function() { + this.setTagsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.types.ResponseEndBlock.repeatedFields_ = [1,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ResponseEndBlock.prototype.toObject = function(opt_includeInstance) { + return proto.types.ResponseEndBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ResponseEndBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseEndBlock.toObject = function(includeInstance, msg) { + var f, obj = { + validatorUpdatesList: jspb.Message.toObjectList(msg.getValidatorUpdatesList(), + proto.types.ValidatorUpdate.toObject, includeInstance), + consensusParamUpdates: (f = msg.getConsensusParamUpdates()) && proto.types.ConsensusParams.toObject(includeInstance, f), + tagsList: jspb.Message.toObjectList(msg.getTagsList(), + github_com_tendermint_tendermint_libs_common_types_pb.KVPair.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ResponseEndBlock} + */ +proto.types.ResponseEndBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ResponseEndBlock; + return proto.types.ResponseEndBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ResponseEndBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ResponseEndBlock} + */ +proto.types.ResponseEndBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.types.ValidatorUpdate; + reader.readMessage(value,proto.types.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidatorUpdates(value); + break; + case 2: + var value = new proto.types.ConsensusParams; + reader.readMessage(value,proto.types.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParamUpdates(value); + break; + case 3: + var value = new github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + reader.readMessage(value,github_com_tendermint_tendermint_libs_common_types_pb.KVPair.deserializeBinaryFromReader); + msg.addTags(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ResponseEndBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ResponseEndBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ResponseEndBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseEndBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorUpdatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.types.ValidatorUpdate.serializeBinaryToWriter + ); + } + f = message.getConsensusParamUpdates(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.types.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + github_com_tendermint_tendermint_libs_common_types_pb.KVPair.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ValidatorUpdate validator_updates = 1; + * @return {!Array} + */ +proto.types.ResponseEndBlock.prototype.getValidatorUpdatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.types.ValidatorUpdate, 1)); +}; + + +/** @param {!Array} value */ +proto.types.ResponseEndBlock.prototype.setValidatorUpdatesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.types.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.types.ValidatorUpdate} + */ +proto.types.ResponseEndBlock.prototype.addValidatorUpdates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.types.ValidatorUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.types.ResponseEndBlock.prototype.clearValidatorUpdatesList = function() { + this.setValidatorUpdatesList([]); +}; + + +/** + * optional ConsensusParams consensus_param_updates = 2; + * @return {?proto.types.ConsensusParams} + */ +proto.types.ResponseEndBlock.prototype.getConsensusParamUpdates = function() { + return /** @type{?proto.types.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, proto.types.ConsensusParams, 2)); +}; + + +/** @param {?proto.types.ConsensusParams|undefined} value */ +proto.types.ResponseEndBlock.prototype.setConsensusParamUpdates = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.ResponseEndBlock.prototype.clearConsensusParamUpdates = function() { + this.setConsensusParamUpdates(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.ResponseEndBlock.prototype.hasConsensusParamUpdates = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated common.KVPair tags = 3; + * @return {!Array} + */ +proto.types.ResponseEndBlock.prototype.getTagsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, github_com_tendermint_tendermint_libs_common_types_pb.KVPair, 3)); +}; + + +/** @param {!Array} value */ +proto.types.ResponseEndBlock.prototype.setTagsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.common.KVPair=} opt_value + * @param {number=} opt_index + * @return {!proto.common.KVPair} + */ +proto.types.ResponseEndBlock.prototype.addTags = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.common.KVPair, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.types.ResponseEndBlock.prototype.clearTagsList = function() { + this.setTagsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ResponseCommit.prototype.toObject = function(opt_includeInstance) { + return proto.types.ResponseCommit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ResponseCommit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseCommit.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ResponseCommit} + */ +proto.types.ResponseCommit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ResponseCommit; + return proto.types.ResponseCommit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ResponseCommit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ResponseCommit} + */ +proto.types.ResponseCommit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ResponseCommit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ResponseCommit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ResponseCommit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ResponseCommit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.types.ResponseCommit.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.types.ResponseCommit.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.types.ResponseCommit.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.ResponseCommit.prototype.setData = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ConsensusParams.prototype.toObject = function(opt_includeInstance) { + return proto.types.ConsensusParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ConsensusParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ConsensusParams.toObject = function(includeInstance, msg) { + var f, obj = { + blockSize: (f = msg.getBlockSize()) && proto.types.BlockSize.toObject(includeInstance, f), + txSize: (f = msg.getTxSize()) && proto.types.TxSize.toObject(includeInstance, f), + blockGossip: (f = msg.getBlockGossip()) && proto.types.BlockGossip.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ConsensusParams} + */ +proto.types.ConsensusParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ConsensusParams; + return proto.types.ConsensusParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ConsensusParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ConsensusParams} + */ +proto.types.ConsensusParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.types.BlockSize; + reader.readMessage(value,proto.types.BlockSize.deserializeBinaryFromReader); + msg.setBlockSize(value); + break; + case 2: + var value = new proto.types.TxSize; + reader.readMessage(value,proto.types.TxSize.deserializeBinaryFromReader); + msg.setTxSize(value); + break; + case 3: + var value = new proto.types.BlockGossip; + reader.readMessage(value,proto.types.BlockGossip.deserializeBinaryFromReader); + msg.setBlockGossip(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ConsensusParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ConsensusParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ConsensusParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ConsensusParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockSize(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.types.BlockSize.serializeBinaryToWriter + ); + } + f = message.getTxSize(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.types.TxSize.serializeBinaryToWriter + ); + } + f = message.getBlockGossip(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.types.BlockGossip.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BlockSize block_size = 1; + * @return {?proto.types.BlockSize} + */ +proto.types.ConsensusParams.prototype.getBlockSize = function() { + return /** @type{?proto.types.BlockSize} */ ( + jspb.Message.getWrapperField(this, proto.types.BlockSize, 1)); +}; + + +/** @param {?proto.types.BlockSize|undefined} value */ +proto.types.ConsensusParams.prototype.setBlockSize = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.ConsensusParams.prototype.clearBlockSize = function() { + this.setBlockSize(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.ConsensusParams.prototype.hasBlockSize = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional TxSize tx_size = 2; + * @return {?proto.types.TxSize} + */ +proto.types.ConsensusParams.prototype.getTxSize = function() { + return /** @type{?proto.types.TxSize} */ ( + jspb.Message.getWrapperField(this, proto.types.TxSize, 2)); +}; + + +/** @param {?proto.types.TxSize|undefined} value */ +proto.types.ConsensusParams.prototype.setTxSize = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.ConsensusParams.prototype.clearTxSize = function() { + this.setTxSize(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.ConsensusParams.prototype.hasTxSize = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional BlockGossip block_gossip = 3; + * @return {?proto.types.BlockGossip} + */ +proto.types.ConsensusParams.prototype.getBlockGossip = function() { + return /** @type{?proto.types.BlockGossip} */ ( + jspb.Message.getWrapperField(this, proto.types.BlockGossip, 3)); +}; + + +/** @param {?proto.types.BlockGossip|undefined} value */ +proto.types.ConsensusParams.prototype.setBlockGossip = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.ConsensusParams.prototype.clearBlockGossip = function() { + this.setBlockGossip(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.ConsensusParams.prototype.hasBlockGossip = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.BlockSize.prototype.toObject = function(opt_includeInstance) { + return proto.types.BlockSize.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.BlockSize} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.BlockSize.toObject = function(includeInstance, msg) { + var f, obj = { + maxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxGas: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.BlockSize} + */ +proto.types.BlockSize.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.BlockSize; + return proto.types.BlockSize.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.BlockSize} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.BlockSize} + */ +proto.types.BlockSize.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxBytes(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxGas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.BlockSize.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.BlockSize.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.BlockSize} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.BlockSize.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxBytes(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getMaxGas(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int32 max_bytes = 1; + * @return {number} + */ +proto.types.BlockSize.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.types.BlockSize.prototype.setMaxBytes = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 max_gas = 2; + * @return {number} + */ +proto.types.BlockSize.prototype.getMaxGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.types.BlockSize.prototype.setMaxGas = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.TxSize.prototype.toObject = function(opt_includeInstance) { + return proto.types.TxSize.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.TxSize} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.TxSize.toObject = function(includeInstance, msg) { + var f, obj = { + maxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxGas: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.TxSize} + */ +proto.types.TxSize.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.TxSize; + return proto.types.TxSize.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.TxSize} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.TxSize} + */ +proto.types.TxSize.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxBytes(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxGas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.TxSize.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.TxSize.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.TxSize} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.TxSize.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxBytes(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getMaxGas(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int32 max_bytes = 1; + * @return {number} + */ +proto.types.TxSize.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.types.TxSize.prototype.setMaxBytes = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 max_gas = 2; + * @return {number} + */ +proto.types.TxSize.prototype.getMaxGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.types.TxSize.prototype.setMaxGas = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.BlockGossip.prototype.toObject = function(opt_includeInstance) { + return proto.types.BlockGossip.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.BlockGossip} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.BlockGossip.toObject = function(includeInstance, msg) { + var f, obj = { + blockPartSizeBytes: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.BlockGossip} + */ +proto.types.BlockGossip.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.BlockGossip; + return proto.types.BlockGossip.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.BlockGossip} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.BlockGossip} + */ +proto.types.BlockGossip.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBlockPartSizeBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.BlockGossip.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.BlockGossip.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.BlockGossip} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.BlockGossip.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockPartSizeBytes(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } +}; + + +/** + * optional int32 block_part_size_bytes = 1; + * @return {number} + */ +proto.types.BlockGossip.prototype.getBlockPartSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.types.BlockGossip.prototype.setBlockPartSizeBytes = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.types.LastCommitInfo.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.LastCommitInfo.prototype.toObject = function(opt_includeInstance) { + return proto.types.LastCommitInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.LastCommitInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.LastCommitInfo.toObject = function(includeInstance, msg) { + var f, obj = { + round: jspb.Message.getFieldWithDefault(msg, 1, 0), + votesList: jspb.Message.toObjectList(msg.getVotesList(), + proto.types.VoteInfo.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.LastCommitInfo} + */ +proto.types.LastCommitInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.LastCommitInfo; + return proto.types.LastCommitInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.LastCommitInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.LastCommitInfo} + */ +proto.types.LastCommitInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 2: + var value = new proto.types.VoteInfo; + reader.readMessage(value,proto.types.VoteInfo.deserializeBinaryFromReader); + msg.addVotes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.LastCommitInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.LastCommitInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.LastCommitInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.LastCommitInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.types.VoteInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 round = 1; + * @return {number} + */ +proto.types.LastCommitInfo.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.types.LastCommitInfo.prototype.setRound = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated VoteInfo votes = 2; + * @return {!Array} + */ +proto.types.LastCommitInfo.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.types.VoteInfo, 2)); +}; + + +/** @param {!Array} value */ +proto.types.LastCommitInfo.prototype.setVotesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.types.VoteInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.types.VoteInfo} + */ +proto.types.LastCommitInfo.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.types.VoteInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.types.LastCommitInfo.prototype.clearVotesList = function() { + this.setVotesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.Header.prototype.toObject = function(opt_includeInstance) { + return proto.types.Header.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.Header} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.Header.toObject = function(includeInstance, msg) { + var f, obj = { + chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + numTxs: jspb.Message.getFieldWithDefault(msg, 4, 0), + totalTxs: jspb.Message.getFieldWithDefault(msg, 5, 0), + lastBlockId: (f = msg.getLastBlockId()) && proto.types.BlockID.toObject(includeInstance, f), + lastCommitHash: msg.getLastCommitHash_asB64(), + dataHash: msg.getDataHash_asB64(), + validatorsHash: msg.getValidatorsHash_asB64(), + nextValidatorsHash: msg.getNextValidatorsHash_asB64(), + consensusHash: msg.getConsensusHash_asB64(), + appHash: msg.getAppHash_asB64(), + lastResultsHash: msg.getLastResultsHash_asB64(), + evidenceHash: msg.getEvidenceHash_asB64(), + proposerAddress: msg.getProposerAddress_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.Header} + */ +proto.types.Header.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.Header; + return proto.types.Header.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.Header} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.Header} + */ +proto.types.Header.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNumTxs(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalTxs(value); + break; + case 6: + var value = new proto.types.BlockID; + reader.readMessage(value,proto.types.BlockID.deserializeBinaryFromReader); + msg.setLastBlockId(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastCommitHash(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDataHash(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValidatorsHash(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNextValidatorsHash(value); + break; + case 11: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setConsensusHash(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppHash(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastResultsHash(value); + break; + case 14: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEvidenceHash(value); + break; + case 15: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProposerAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.Header.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.Header.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.Header} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.Header.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getNumTxs(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getTotalTxs(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getLastBlockId(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getLastCommitHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getDataHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getValidatorsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 9, + f + ); + } + f = message.getNextValidatorsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, + f + ); + } + f = message.getConsensusHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 11, + f + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 12, + f + ); + } + f = message.getLastResultsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 13, + f + ); + } + f = message.getEvidenceHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 14, + f + ); + } + f = message.getProposerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 15, + f + ); + } +}; + + +/** + * optional string chain_id = 1; + * @return {string} + */ +proto.types.Header.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.types.Header.prototype.setChainId = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.types.Header.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.types.Header.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.types.Header.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +proto.types.Header.prototype.setTime = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Header.prototype.clearTime = function() { + this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Header.prototype.hasTime = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int64 num_txs = 4; + * @return {number} + */ +proto.types.Header.prototype.getNumTxs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.types.Header.prototype.setNumTxs = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 total_txs = 5; + * @return {number} + */ +proto.types.Header.prototype.getTotalTxs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.types.Header.prototype.setTotalTxs = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional BlockID last_block_id = 6; + * @return {?proto.types.BlockID} + */ +proto.types.Header.prototype.getLastBlockId = function() { + return /** @type{?proto.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.types.BlockID, 6)); +}; + + +/** @param {?proto.types.BlockID|undefined} value */ +proto.types.Header.prototype.setLastBlockId = function(value) { + jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Header.prototype.clearLastBlockId = function() { + this.setLastBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Header.prototype.hasLastBlockId = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes last_commit_hash = 7; + * @return {!(string|Uint8Array)} + */ +proto.types.Header.prototype.getLastCommitHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes last_commit_hash = 7; + * This is a type-conversion wrapper around `getLastCommitHash()` + * @return {string} + */ +proto.types.Header.prototype.getLastCommitHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastCommitHash())); +}; + + +/** + * optional bytes last_commit_hash = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastCommitHash()` + * @return {!Uint8Array} + */ +proto.types.Header.prototype.getLastCommitHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastCommitHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.Header.prototype.setLastCommitHash = function(value) { + jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional bytes data_hash = 8; + * @return {!(string|Uint8Array)} + */ +proto.types.Header.prototype.getDataHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes data_hash = 8; + * This is a type-conversion wrapper around `getDataHash()` + * @return {string} + */ +proto.types.Header.prototype.getDataHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataHash())); +}; + + +/** + * optional bytes data_hash = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataHash()` + * @return {!Uint8Array} + */ +proto.types.Header.prototype.getDataHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDataHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.Header.prototype.setDataHash = function(value) { + jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * optional bytes validators_hash = 9; + * @return {!(string|Uint8Array)} + */ +proto.types.Header.prototype.getValidatorsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes validators_hash = 9; + * This is a type-conversion wrapper around `getValidatorsHash()` + * @return {string} + */ +proto.types.Header.prototype.getValidatorsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValidatorsHash())); +}; + + +/** + * optional bytes validators_hash = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValidatorsHash()` + * @return {!Uint8Array} + */ +proto.types.Header.prototype.getValidatorsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorsHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.Header.prototype.setValidatorsHash = function(value) { + jspb.Message.setProto3BytesField(this, 9, value); +}; + + +/** + * optional bytes next_validators_hash = 10; + * @return {!(string|Uint8Array)} + */ +proto.types.Header.prototype.getNextValidatorsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * optional bytes next_validators_hash = 10; + * This is a type-conversion wrapper around `getNextValidatorsHash()` + * @return {string} + */ +proto.types.Header.prototype.getNextValidatorsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNextValidatorsHash())); +}; + + +/** + * optional bytes next_validators_hash = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNextValidatorsHash()` + * @return {!Uint8Array} + */ +proto.types.Header.prototype.getNextValidatorsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNextValidatorsHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.Header.prototype.setNextValidatorsHash = function(value) { + jspb.Message.setProto3BytesField(this, 10, value); +}; + + +/** + * optional bytes consensus_hash = 11; + * @return {!(string|Uint8Array)} + */ +proto.types.Header.prototype.getConsensusHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * optional bytes consensus_hash = 11; + * This is a type-conversion wrapper around `getConsensusHash()` + * @return {string} + */ +proto.types.Header.prototype.getConsensusHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getConsensusHash())); +}; + + +/** + * optional bytes consensus_hash = 11; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getConsensusHash()` + * @return {!Uint8Array} + */ +proto.types.Header.prototype.getConsensusHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getConsensusHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.Header.prototype.setConsensusHash = function(value) { + jspb.Message.setProto3BytesField(this, 11, value); +}; + + +/** + * optional bytes app_hash = 12; + * @return {!(string|Uint8Array)} + */ +proto.types.Header.prototype.getAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes app_hash = 12; + * This is a type-conversion wrapper around `getAppHash()` + * @return {string} + */ +proto.types.Header.prototype.getAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppHash())); +}; + + +/** + * optional bytes app_hash = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppHash()` + * @return {!Uint8Array} + */ +proto.types.Header.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.Header.prototype.setAppHash = function(value) { + jspb.Message.setProto3BytesField(this, 12, value); +}; + + +/** + * optional bytes last_results_hash = 13; + * @return {!(string|Uint8Array)} + */ +proto.types.Header.prototype.getLastResultsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes last_results_hash = 13; + * This is a type-conversion wrapper around `getLastResultsHash()` + * @return {string} + */ +proto.types.Header.prototype.getLastResultsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastResultsHash())); +}; + + +/** + * optional bytes last_results_hash = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastResultsHash()` + * @return {!Uint8Array} + */ +proto.types.Header.prototype.getLastResultsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastResultsHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.Header.prototype.setLastResultsHash = function(value) { + jspb.Message.setProto3BytesField(this, 13, value); +}; + + +/** + * optional bytes evidence_hash = 14; + * @return {!(string|Uint8Array)} + */ +proto.types.Header.prototype.getEvidenceHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * optional bytes evidence_hash = 14; + * This is a type-conversion wrapper around `getEvidenceHash()` + * @return {string} + */ +proto.types.Header.prototype.getEvidenceHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEvidenceHash())); +}; + + +/** + * optional bytes evidence_hash = 14; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEvidenceHash()` + * @return {!Uint8Array} + */ +proto.types.Header.prototype.getEvidenceHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEvidenceHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.Header.prototype.setEvidenceHash = function(value) { + jspb.Message.setProto3BytesField(this, 14, value); +}; + + +/** + * optional bytes proposer_address = 15; + * @return {!(string|Uint8Array)} + */ +proto.types.Header.prototype.getProposerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * optional bytes proposer_address = 15; + * This is a type-conversion wrapper around `getProposerAddress()` + * @return {string} + */ +proto.types.Header.prototype.getProposerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProposerAddress())); +}; + + +/** + * optional bytes proposer_address = 15; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProposerAddress()` + * @return {!Uint8Array} + */ +proto.types.Header.prototype.getProposerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProposerAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.Header.prototype.setProposerAddress = function(value) { + jspb.Message.setProto3BytesField(this, 15, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.BlockID.prototype.toObject = function(opt_includeInstance) { + return proto.types.BlockID.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.BlockID} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.BlockID.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_asB64(), + partsHeader: (f = msg.getPartsHeader()) && proto.types.PartSetHeader.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.BlockID} + */ +proto.types.BlockID.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.BlockID; + return proto.types.BlockID.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.BlockID} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.BlockID} + */ +proto.types.BlockID.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 2: + var value = new proto.types.PartSetHeader; + reader.readMessage(value,proto.types.PartSetHeader.deserializeBinaryFromReader); + msg.setPartsHeader(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.BlockID.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.BlockID.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.BlockID} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.BlockID.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPartsHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.types.PartSetHeader.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.types.BlockID.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes hash = 1; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.types.BlockID.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.types.BlockID.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.BlockID.prototype.setHash = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional PartSetHeader parts_header = 2; + * @return {?proto.types.PartSetHeader} + */ +proto.types.BlockID.prototype.getPartsHeader = function() { + return /** @type{?proto.types.PartSetHeader} */ ( + jspb.Message.getWrapperField(this, proto.types.PartSetHeader, 2)); +}; + + +/** @param {?proto.types.PartSetHeader|undefined} value */ +proto.types.BlockID.prototype.setPartsHeader = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.BlockID.prototype.clearPartsHeader = function() { + this.setPartsHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.BlockID.prototype.hasPartsHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.PartSetHeader.prototype.toObject = function(opt_includeInstance) { + return proto.types.PartSetHeader.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.PartSetHeader} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.PartSetHeader.toObject = function(includeInstance, msg) { + var f, obj = { + total: jspb.Message.getFieldWithDefault(msg, 1, 0), + hash: msg.getHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.PartSetHeader} + */ +proto.types.PartSetHeader.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.PartSetHeader; + return proto.types.PartSetHeader.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.PartSetHeader} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.PartSetHeader} + */ +proto.types.PartSetHeader.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTotal(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.PartSetHeader.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.PartSetHeader.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.PartSetHeader} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.PartSetHeader.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotal(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional int32 total = 1; + * @return {number} + */ +proto.types.PartSetHeader.prototype.getTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.types.PartSetHeader.prototype.setTotal = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.types.PartSetHeader.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes hash = 2; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.types.PartSetHeader.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.types.PartSetHeader.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.PartSetHeader.prototype.setHash = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.Validator.prototype.toObject = function(opt_includeInstance) { + return proto.types.Validator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.Validator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.Validator.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + power: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.Validator} + */ +proto.types.Validator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.Validator; + return proto.types.Validator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.Validator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.Validator} + */ +proto.types.Validator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.Validator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.Validator.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.Validator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.Validator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes address = 1; + * @return {!(string|Uint8Array)} + */ +proto.types.Validator.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.types.Validator.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.types.Validator.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.Validator.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional int64 power = 3; + * @return {number} + */ +proto.types.Validator.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.types.Validator.prototype.setPower = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.ValidatorUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.types.ValidatorUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.ValidatorUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ValidatorUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: (f = msg.getPubKey()) && proto.types.PubKey.toObject(includeInstance, f), + power: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.ValidatorUpdate} + */ +proto.types.ValidatorUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.ValidatorUpdate; + return proto.types.ValidatorUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.ValidatorUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.ValidatorUpdate} + */ +proto.types.ValidatorUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.types.PubKey; + reader.readMessage(value,proto.types.PubKey.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.ValidatorUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.ValidatorUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.ValidatorUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.ValidatorUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.types.PubKey.serializeBinaryToWriter + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional PubKey pub_key = 1; + * @return {?proto.types.PubKey} + */ +proto.types.ValidatorUpdate.prototype.getPubKey = function() { + return /** @type{?proto.types.PubKey} */ ( + jspb.Message.getWrapperField(this, proto.types.PubKey, 1)); +}; + + +/** @param {?proto.types.PubKey|undefined} value */ +proto.types.ValidatorUpdate.prototype.setPubKey = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.ValidatorUpdate.prototype.clearPubKey = function() { + this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.ValidatorUpdate.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 power = 2; + * @return {number} + */ +proto.types.ValidatorUpdate.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.types.ValidatorUpdate.prototype.setPower = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.VoteInfo.prototype.toObject = function(opt_includeInstance) { + return proto.types.VoteInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.VoteInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.VoteInfo.toObject = function(includeInstance, msg) { + var f, obj = { + validator: (f = msg.getValidator()) && proto.types.Validator.toObject(includeInstance, f), + signedLastBlock: jspb.Message.getFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.VoteInfo} + */ +proto.types.VoteInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.VoteInfo; + return proto.types.VoteInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.VoteInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.VoteInfo} + */ +proto.types.VoteInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.types.Validator; + reader.readMessage(value,proto.types.Validator.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSignedLastBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.VoteInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.VoteInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.VoteInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.VoteInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.types.Validator.serializeBinaryToWriter + ); + } + f = message.getSignedLastBlock(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional Validator validator = 1; + * @return {?proto.types.Validator} + */ +proto.types.VoteInfo.prototype.getValidator = function() { + return /** @type{?proto.types.Validator} */ ( + jspb.Message.getWrapperField(this, proto.types.Validator, 1)); +}; + + +/** @param {?proto.types.Validator|undefined} value */ +proto.types.VoteInfo.prototype.setValidator = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.VoteInfo.prototype.clearValidator = function() { + this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.VoteInfo.prototype.hasValidator = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool signed_last_block = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.types.VoteInfo.prototype.getSignedLastBlock = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.types.VoteInfo.prototype.setSignedLastBlock = function(value) { + jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.PubKey.prototype.toObject = function(opt_includeInstance) { + return proto.types.PubKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.PubKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.PubKey.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.PubKey} + */ +proto.types.PubKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.PubKey; + return proto.types.PubKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.PubKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.PubKey} + */ +proto.types.PubKey.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.PubKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.PubKey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.PubKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.PubKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.types.PubKey.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.types.PubKey.prototype.setType = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.types.PubKey.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.types.PubKey.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.types.PubKey.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.types.PubKey.prototype.setData = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.types.Evidence.prototype.toObject = function(opt_includeInstance) { + return proto.types.Evidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.types.Evidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.Evidence.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + validator: (f = msg.getValidator()) && proto.types.Validator.toObject(includeInstance, f), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + totalVotingPower: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.types.Evidence} + */ +proto.types.Evidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.types.Evidence; + return proto.types.Evidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.types.Evidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.types.Evidence} + */ +proto.types.Evidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = new proto.types.Validator; + reader.readMessage(value,proto.types.Validator.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.types.Evidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.types.Evidence.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.types.Evidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.types.Evidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.types.Validator.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.types.Evidence.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.types.Evidence.prototype.setType = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Validator validator = 2; + * @return {?proto.types.Validator} + */ +proto.types.Evidence.prototype.getValidator = function() { + return /** @type{?proto.types.Validator} */ ( + jspb.Message.getWrapperField(this, proto.types.Validator, 2)); +}; + + +/** @param {?proto.types.Validator|undefined} value */ +proto.types.Evidence.prototype.setValidator = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Evidence.prototype.clearValidator = function() { + this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Evidence.prototype.hasValidator = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.types.Evidence.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.types.Evidence.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.types.Evidence.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +proto.types.Evidence.prototype.setTime = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.types.Evidence.prototype.clearTime = function() { + this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.types.Evidence.prototype.hasTime = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int64 total_voting_power = 5; + * @return {number} + */ +proto.types.Evidence.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.types.Evidence.prototype.setTotalVotingPower = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +goog.object.extend(exports, proto.types); diff --git a/js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.d.ts b/js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.js b/js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.d.ts b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.d.ts new file mode 100644 index 000000000..2fc8ea2f2 --- /dev/null +++ b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.d.ts @@ -0,0 +1,60 @@ +// package: common +// file: github.com/tendermint/tendermint/libs/common/types.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb"; + +export class KVPair extends jspb.Message { + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): void; + + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KVPair.AsObject; + static toObject(includeInstance: boolean, msg: KVPair): KVPair.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KVPair, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KVPair; + static deserializeBinaryFromReader(message: KVPair, reader: jspb.BinaryReader): KVPair; +} + +export namespace KVPair { + export type AsObject = { + key: Uint8Array | string, + value: Uint8Array | string, + } +} + +export class KI64Pair extends jspb.Message { + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): void; + + getValue(): number; + setValue(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KI64Pair.AsObject; + static toObject(includeInstance: boolean, msg: KI64Pair): KI64Pair.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KI64Pair, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KI64Pair; + static deserializeBinaryFromReader(message: KI64Pair, reader: jspb.BinaryReader): KI64Pair; +} + +export namespace KI64Pair { + export type AsObject = { + key: Uint8Array | string, + value: number, + } +} + diff --git a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js new file mode 100644 index 000000000..50a8dd5ff --- /dev/null +++ b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js @@ -0,0 +1,436 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +goog.exportSymbol('proto.common.KI64Pair', null, global); +goog.exportSymbol('proto.common.KVPair', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.common.KVPair = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.common.KVPair, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.common.KVPair.displayName = 'proto.common.KVPair'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.common.KI64Pair = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.common.KI64Pair, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.common.KI64Pair.displayName = 'proto.common.KI64Pair'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.common.KVPair.prototype.toObject = function(opt_includeInstance) { + return proto.common.KVPair.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.common.KVPair} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.common.KVPair.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.common.KVPair} + */ +proto.common.KVPair.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.common.KVPair; + return proto.common.KVPair.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.common.KVPair} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.common.KVPair} + */ +proto.common.KVPair.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.common.KVPair.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.common.KVPair.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.common.KVPair} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.common.KVPair.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.common.KVPair.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes key = 1; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.common.KVPair.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.common.KVPair.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.common.KVPair.prototype.setKey = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.common.KVPair.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes value = 2; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.common.KVPair.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.common.KVPair.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.common.KVPair.prototype.setValue = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.common.KI64Pair.prototype.toObject = function(opt_includeInstance) { + return proto.common.KI64Pair.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.common.KI64Pair} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.common.KI64Pair.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + value: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.common.KI64Pair} + */ +proto.common.KI64Pair.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.common.KI64Pair; + return proto.common.KI64Pair.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.common.KI64Pair} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.common.KI64Pair} + */ +proto.common.KI64Pair.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.common.KI64Pair.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.common.KI64Pair.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.common.KI64Pair} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.common.KI64Pair.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.common.KI64Pair.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes key = 1; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.common.KI64Pair.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.common.KI64Pair.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.common.KI64Pair.prototype.setKey = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional int64 value = 2; + * @return {number} + */ +proto.common.KI64Pair.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.common.KI64Pair.prototype.setValue = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.common); diff --git a/js/proto/google/protobuf/descriptor_grpc_pb.d.ts b/js/proto/google/protobuf/descriptor_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/google/protobuf/descriptor_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/google/protobuf/descriptor_grpc_pb.js b/js/proto/google/protobuf/descriptor_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/google/protobuf/descriptor_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/google/protobuf/descriptor_pb.d.ts b/js/proto/google/protobuf/descriptor_pb.d.ts new file mode 100644 index 000000000..8825105ae --- /dev/null +++ b/js/proto/google/protobuf/descriptor_pb.d.ts @@ -0,0 +1,1246 @@ +// package: google.protobuf +// file: google/protobuf/descriptor.proto + +import * as jspb from "google-protobuf"; + +export class FileDescriptorSet extends jspb.Message { + clearFileList(): void; + getFileList(): Array; + setFileList(value: Array): void; + addFile(value?: FileDescriptorProto, index?: number): FileDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileDescriptorSet.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorSet): FileDescriptorSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileDescriptorSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileDescriptorSet; + static deserializeBinaryFromReader(message: FileDescriptorSet, reader: jspb.BinaryReader): FileDescriptorSet; +} + +export namespace FileDescriptorSet { + export type AsObject = { + fileList: Array, + } +} + +export class FileDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + hasPackage(): boolean; + clearPackage(): void; + getPackage(): string | undefined; + setPackage(value: string): void; + + clearDependencyList(): void; + getDependencyList(): Array; + setDependencyList(value: Array): void; + addDependency(value: string, index?: number): string; + + clearPublicDependencyList(): void; + getPublicDependencyList(): Array; + setPublicDependencyList(value: Array): void; + addPublicDependency(value: number, index?: number): number; + + clearWeakDependencyList(): void; + getWeakDependencyList(): Array; + setWeakDependencyList(value: Array): void; + addWeakDependency(value: number, index?: number): number; + + clearMessageTypeList(): void; + getMessageTypeList(): Array; + setMessageTypeList(value: Array): void; + addMessageType(value?: DescriptorProto, index?: number): DescriptorProto; + + clearEnumTypeList(): void; + getEnumTypeList(): Array; + setEnumTypeList(value: Array): void; + addEnumType(value?: EnumDescriptorProto, index?: number): EnumDescriptorProto; + + clearServiceList(): void; + getServiceList(): Array; + setServiceList(value: Array): void; + addService(value?: ServiceDescriptorProto, index?: number): ServiceDescriptorProto; + + clearExtensionList(): void; + getExtensionList(): Array; + setExtensionList(value: Array): void; + addExtension(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): FileOptions | undefined; + setOptions(value?: FileOptions): void; + + hasSourceCodeInfo(): boolean; + clearSourceCodeInfo(): void; + getSourceCodeInfo(): SourceCodeInfo | undefined; + setSourceCodeInfo(value?: SourceCodeInfo): void; + + hasSyntax(): boolean; + clearSyntax(): void; + getSyntax(): string | undefined; + setSyntax(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorProto): FileDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileDescriptorProto; + static deserializeBinaryFromReader(message: FileDescriptorProto, reader: jspb.BinaryReader): FileDescriptorProto; +} + +export namespace FileDescriptorProto { + export type AsObject = { + name?: string, + pb_package?: string, + dependencyList: Array, + publicDependencyList: Array, + weakDependencyList: Array, + messageTypeList: Array, + enumTypeList: Array, + serviceList: Array, + extensionList: Array, + options?: FileOptions.AsObject, + sourceCodeInfo?: SourceCodeInfo.AsObject, + syntax?: string, + } +} + +export class DescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + clearFieldList(): void; + getFieldList(): Array; + setFieldList(value: Array): void; + addField(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; + + clearExtensionList(): void; + getExtensionList(): Array; + setExtensionList(value: Array): void; + addExtension(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; + + clearNestedTypeList(): void; + getNestedTypeList(): Array; + setNestedTypeList(value: Array): void; + addNestedType(value?: DescriptorProto, index?: number): DescriptorProto; + + clearEnumTypeList(): void; + getEnumTypeList(): Array; + setEnumTypeList(value: Array): void; + addEnumType(value?: EnumDescriptorProto, index?: number): EnumDescriptorProto; + + clearExtensionRangeList(): void; + getExtensionRangeList(): Array; + setExtensionRangeList(value: Array): void; + addExtensionRange(value?: DescriptorProto.ExtensionRange, index?: number): DescriptorProto.ExtensionRange; + + clearOneofDeclList(): void; + getOneofDeclList(): Array; + setOneofDeclList(value: Array): void; + addOneofDecl(value?: OneofDescriptorProto, index?: number): OneofDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): MessageOptions | undefined; + setOptions(value?: MessageOptions): void; + + clearReservedRangeList(): void; + getReservedRangeList(): Array; + setReservedRangeList(value: Array): void; + addReservedRange(value?: DescriptorProto.ReservedRange, index?: number): DescriptorProto.ReservedRange; + + clearReservedNameList(): void; + getReservedNameList(): Array; + setReservedNameList(value: Array): void; + addReservedName(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: DescriptorProto): DescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DescriptorProto; + static deserializeBinaryFromReader(message: DescriptorProto, reader: jspb.BinaryReader): DescriptorProto; +} + +export namespace DescriptorProto { + export type AsObject = { + name?: string, + fieldList: Array, + extensionList: Array, + nestedTypeList: Array, + enumTypeList: Array, + extensionRangeList: Array, + oneofDeclList: Array, + options?: MessageOptions.AsObject, + reservedRangeList: Array, + reservedNameList: Array, + } + + export class ExtensionRange extends jspb.Message { + hasStart(): boolean; + clearStart(): void; + getStart(): number | undefined; + setStart(value: number): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): ExtensionRangeOptions | undefined; + setOptions(value?: ExtensionRangeOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExtensionRange.AsObject; + static toObject(includeInstance: boolean, msg: ExtensionRange): ExtensionRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExtensionRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExtensionRange; + static deserializeBinaryFromReader(message: ExtensionRange, reader: jspb.BinaryReader): ExtensionRange; + } + + export namespace ExtensionRange { + export type AsObject = { + start?: number, + end?: number, + options?: ExtensionRangeOptions.AsObject, + } + } + + export class ReservedRange extends jspb.Message { + hasStart(): boolean; + clearStart(): void; + getStart(): number | undefined; + setStart(value: number): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ReservedRange.AsObject; + static toObject(includeInstance: boolean, msg: ReservedRange): ReservedRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ReservedRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ReservedRange; + static deserializeBinaryFromReader(message: ReservedRange, reader: jspb.BinaryReader): ReservedRange; + } + + export namespace ReservedRange { + export type AsObject = { + start?: number, + end?: number, + } + } +} + +export class ExtensionRangeOptions extends jspb.Message { + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExtensionRangeOptions.AsObject; + static toObject(includeInstance: boolean, msg: ExtensionRangeOptions): ExtensionRangeOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExtensionRangeOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExtensionRangeOptions; + static deserializeBinaryFromReader(message: ExtensionRangeOptions, reader: jspb.BinaryReader): ExtensionRangeOptions; +} + +export namespace ExtensionRangeOptions { + export type AsObject = { + uninterpretedOptionList: Array, + } +} + +export class FieldDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number | undefined; + setNumber(value: number): void; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): FieldDescriptorProto.LabelMap[keyof FieldDescriptorProto.LabelMap] | undefined; + setLabel(value: FieldDescriptorProto.LabelMap[keyof FieldDescriptorProto.LabelMap]): void; + + hasType(): boolean; + clearType(): void; + getType(): FieldDescriptorProto.TypeMap[keyof FieldDescriptorProto.TypeMap] | undefined; + setType(value: FieldDescriptorProto.TypeMap[keyof FieldDescriptorProto.TypeMap]): void; + + hasTypeName(): boolean; + clearTypeName(): void; + getTypeName(): string | undefined; + setTypeName(value: string): void; + + hasExtendee(): boolean; + clearExtendee(): void; + getExtendee(): string | undefined; + setExtendee(value: string): void; + + hasDefaultValue(): boolean; + clearDefaultValue(): void; + getDefaultValue(): string | undefined; + setDefaultValue(value: string): void; + + hasOneofIndex(): boolean; + clearOneofIndex(): void; + getOneofIndex(): number | undefined; + setOneofIndex(value: number): void; + + hasJsonName(): boolean; + clearJsonName(): void; + getJsonName(): string | undefined; + setJsonName(value: string): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): FieldOptions | undefined; + setOptions(value?: FieldOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FieldDescriptorProto): FieldDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldDescriptorProto; + static deserializeBinaryFromReader(message: FieldDescriptorProto, reader: jspb.BinaryReader): FieldDescriptorProto; +} + +export namespace FieldDescriptorProto { + export type AsObject = { + name?: string, + number?: number, + label?: FieldDescriptorProto.LabelMap[keyof FieldDescriptorProto.LabelMap], + type?: FieldDescriptorProto.TypeMap[keyof FieldDescriptorProto.TypeMap], + typeName?: string, + extendee?: string, + defaultValue?: string, + oneofIndex?: number, + jsonName?: string, + options?: FieldOptions.AsObject, + } + + export interface TypeMap { + TYPE_DOUBLE: 1; + TYPE_FLOAT: 2; + TYPE_INT64: 3; + TYPE_UINT64: 4; + TYPE_INT32: 5; + TYPE_FIXED64: 6; + TYPE_FIXED32: 7; + TYPE_BOOL: 8; + TYPE_STRING: 9; + TYPE_GROUP: 10; + TYPE_MESSAGE: 11; + TYPE_BYTES: 12; + TYPE_UINT32: 13; + TYPE_ENUM: 14; + TYPE_SFIXED32: 15; + TYPE_SFIXED64: 16; + TYPE_SINT32: 17; + TYPE_SINT64: 18; + } + + export const Type: TypeMap; + + export interface LabelMap { + LABEL_OPTIONAL: 1; + LABEL_REQUIRED: 2; + LABEL_REPEATED: 3; + } + + export const Label: LabelMap; +} + +export class OneofDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): OneofOptions | undefined; + setOptions(value?: OneofOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: OneofDescriptorProto): OneofDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofDescriptorProto; + static deserializeBinaryFromReader(message: OneofDescriptorProto, reader: jspb.BinaryReader): OneofDescriptorProto; +} + +export namespace OneofDescriptorProto { + export type AsObject = { + name?: string, + options?: OneofOptions.AsObject, + } +} + +export class EnumDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + clearValueList(): void; + getValueList(): Array; + setValueList(value: Array): void; + addValue(value?: EnumValueDescriptorProto, index?: number): EnumValueDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): EnumOptions | undefined; + setOptions(value?: EnumOptions): void; + + clearReservedRangeList(): void; + getReservedRangeList(): Array; + setReservedRangeList(value: Array): void; + addReservedRange(value?: EnumDescriptorProto.EnumReservedRange, index?: number): EnumDescriptorProto.EnumReservedRange; + + clearReservedNameList(): void; + getReservedNameList(): Array; + setReservedNameList(value: Array): void; + addReservedName(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumDescriptorProto): EnumDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumDescriptorProto; + static deserializeBinaryFromReader(message: EnumDescriptorProto, reader: jspb.BinaryReader): EnumDescriptorProto; +} + +export namespace EnumDescriptorProto { + export type AsObject = { + name?: string, + valueList: Array, + options?: EnumOptions.AsObject, + reservedRangeList: Array, + reservedNameList: Array, + } + + export class EnumReservedRange extends jspb.Message { + hasStart(): boolean; + clearStart(): void; + getStart(): number | undefined; + setStart(value: number): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumReservedRange.AsObject; + static toObject(includeInstance: boolean, msg: EnumReservedRange): EnumReservedRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumReservedRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumReservedRange; + static deserializeBinaryFromReader(message: EnumReservedRange, reader: jspb.BinaryReader): EnumReservedRange; + } + + export namespace EnumReservedRange { + export type AsObject = { + start?: number, + end?: number, + } + } +} + +export class EnumValueDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number | undefined; + setNumber(value: number): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): EnumValueOptions | undefined; + setOptions(value?: EnumValueOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValueDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueDescriptorProto): EnumValueDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValueDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValueDescriptorProto; + static deserializeBinaryFromReader(message: EnumValueDescriptorProto, reader: jspb.BinaryReader): EnumValueDescriptorProto; +} + +export namespace EnumValueDescriptorProto { + export type AsObject = { + name?: string, + number?: number, + options?: EnumValueOptions.AsObject, + } +} + +export class ServiceDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + clearMethodList(): void; + getMethodList(): Array; + setMethodList(value: Array): void; + addMethod(value?: MethodDescriptorProto, index?: number): MethodDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): ServiceOptions | undefined; + setOptions(value?: ServiceOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: ServiceDescriptorProto): ServiceDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceDescriptorProto; + static deserializeBinaryFromReader(message: ServiceDescriptorProto, reader: jspb.BinaryReader): ServiceDescriptorProto; +} + +export namespace ServiceDescriptorProto { + export type AsObject = { + name?: string, + methodList: Array, + options?: ServiceOptions.AsObject, + } +} + +export class MethodDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + hasInputType(): boolean; + clearInputType(): void; + getInputType(): string | undefined; + setInputType(value: string): void; + + hasOutputType(): boolean; + clearOutputType(): void; + getOutputType(): string | undefined; + setOutputType(value: string): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): MethodOptions | undefined; + setOptions(value?: MethodOptions): void; + + hasClientStreaming(): boolean; + clearClientStreaming(): void; + getClientStreaming(): boolean | undefined; + setClientStreaming(value: boolean): void; + + hasServerStreaming(): boolean; + clearServerStreaming(): void; + getServerStreaming(): boolean | undefined; + setServerStreaming(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MethodDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: MethodDescriptorProto): MethodDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MethodDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MethodDescriptorProto; + static deserializeBinaryFromReader(message: MethodDescriptorProto, reader: jspb.BinaryReader): MethodDescriptorProto; +} + +export namespace MethodDescriptorProto { + export type AsObject = { + name?: string, + inputType?: string, + outputType?: string, + options?: MethodOptions.AsObject, + clientStreaming?: boolean, + serverStreaming?: boolean, + } +} + +export class FileOptions extends jspb.Message { + hasJavaPackage(): boolean; + clearJavaPackage(): void; + getJavaPackage(): string | undefined; + setJavaPackage(value: string): void; + + hasJavaOuterClassname(): boolean; + clearJavaOuterClassname(): void; + getJavaOuterClassname(): string | undefined; + setJavaOuterClassname(value: string): void; + + hasJavaMultipleFiles(): boolean; + clearJavaMultipleFiles(): void; + getJavaMultipleFiles(): boolean | undefined; + setJavaMultipleFiles(value: boolean): void; + + hasJavaGenerateEqualsAndHash(): boolean; + clearJavaGenerateEqualsAndHash(): void; + getJavaGenerateEqualsAndHash(): boolean | undefined; + setJavaGenerateEqualsAndHash(value: boolean): void; + + hasJavaStringCheckUtf8(): boolean; + clearJavaStringCheckUtf8(): void; + getJavaStringCheckUtf8(): boolean | undefined; + setJavaStringCheckUtf8(value: boolean): void; + + hasOptimizeFor(): boolean; + clearOptimizeFor(): void; + getOptimizeFor(): FileOptions.OptimizeModeMap[keyof FileOptions.OptimizeModeMap] | undefined; + setOptimizeFor(value: FileOptions.OptimizeModeMap[keyof FileOptions.OptimizeModeMap]): void; + + hasGoPackage(): boolean; + clearGoPackage(): void; + getGoPackage(): string | undefined; + setGoPackage(value: string): void; + + hasCcGenericServices(): boolean; + clearCcGenericServices(): void; + getCcGenericServices(): boolean | undefined; + setCcGenericServices(value: boolean): void; + + hasJavaGenericServices(): boolean; + clearJavaGenericServices(): void; + getJavaGenericServices(): boolean | undefined; + setJavaGenericServices(value: boolean): void; + + hasPyGenericServices(): boolean; + clearPyGenericServices(): void; + getPyGenericServices(): boolean | undefined; + setPyGenericServices(value: boolean): void; + + hasPhpGenericServices(): boolean; + clearPhpGenericServices(): void; + getPhpGenericServices(): boolean | undefined; + setPhpGenericServices(value: boolean): void; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + hasCcEnableArenas(): boolean; + clearCcEnableArenas(): void; + getCcEnableArenas(): boolean | undefined; + setCcEnableArenas(value: boolean): void; + + hasObjcClassPrefix(): boolean; + clearObjcClassPrefix(): void; + getObjcClassPrefix(): string | undefined; + setObjcClassPrefix(value: string): void; + + hasCsharpNamespace(): boolean; + clearCsharpNamespace(): void; + getCsharpNamespace(): string | undefined; + setCsharpNamespace(value: string): void; + + hasSwiftPrefix(): boolean; + clearSwiftPrefix(): void; + getSwiftPrefix(): string | undefined; + setSwiftPrefix(value: string): void; + + hasPhpClassPrefix(): boolean; + clearPhpClassPrefix(): void; + getPhpClassPrefix(): string | undefined; + setPhpClassPrefix(value: string): void; + + hasPhpNamespace(): boolean; + clearPhpNamespace(): void; + getPhpNamespace(): string | undefined; + setPhpNamespace(value: string): void; + + hasPhpMetadataNamespace(): boolean; + clearPhpMetadataNamespace(): void; + getPhpMetadataNamespace(): string | undefined; + setPhpMetadataNamespace(value: string): void; + + hasRubyPackage(): boolean; + clearRubyPackage(): void; + getRubyPackage(): string | undefined; + setRubyPackage(value: string): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileOptions.AsObject; + static toObject(includeInstance: boolean, msg: FileOptions): FileOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileOptions; + static deserializeBinaryFromReader(message: FileOptions, reader: jspb.BinaryReader): FileOptions; +} + +export namespace FileOptions { + export type AsObject = { + javaPackage?: string, + javaOuterClassname?: string, + javaMultipleFiles?: boolean, + javaGenerateEqualsAndHash?: boolean, + javaStringCheckUtf8?: boolean, + optimizeFor?: FileOptions.OptimizeModeMap[keyof FileOptions.OptimizeModeMap], + goPackage?: string, + ccGenericServices?: boolean, + javaGenericServices?: boolean, + pyGenericServices?: boolean, + phpGenericServices?: boolean, + deprecated?: boolean, + ccEnableArenas?: boolean, + objcClassPrefix?: string, + csharpNamespace?: string, + swiftPrefix?: string, + phpClassPrefix?: string, + phpNamespace?: string, + phpMetadataNamespace?: string, + rubyPackage?: string, + uninterpretedOptionList: Array, + } + + export interface OptimizeModeMap { + SPEED: 1; + CODE_SIZE: 2; + LITE_RUNTIME: 3; + } + + export const OptimizeMode: OptimizeModeMap; +} + +export class MessageOptions extends jspb.Message { + hasMessageSetWireFormat(): boolean; + clearMessageSetWireFormat(): void; + getMessageSetWireFormat(): boolean | undefined; + setMessageSetWireFormat(value: boolean): void; + + hasNoStandardDescriptorAccessor(): boolean; + clearNoStandardDescriptorAccessor(): void; + getNoStandardDescriptorAccessor(): boolean | undefined; + setNoStandardDescriptorAccessor(value: boolean): void; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + hasMapEntry(): boolean; + clearMapEntry(): void; + getMapEntry(): boolean | undefined; + setMapEntry(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MessageOptions.AsObject; + static toObject(includeInstance: boolean, msg: MessageOptions): MessageOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MessageOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MessageOptions; + static deserializeBinaryFromReader(message: MessageOptions, reader: jspb.BinaryReader): MessageOptions; +} + +export namespace MessageOptions { + export type AsObject = { + messageSetWireFormat?: boolean, + noStandardDescriptorAccessor?: boolean, + deprecated?: boolean, + mapEntry?: boolean, + uninterpretedOptionList: Array, + } +} + +export class FieldOptions extends jspb.Message { + hasCtype(): boolean; + clearCtype(): void; + getCtype(): FieldOptions.CTypeMap[keyof FieldOptions.CTypeMap] | undefined; + setCtype(value: FieldOptions.CTypeMap[keyof FieldOptions.CTypeMap]): void; + + hasPacked(): boolean; + clearPacked(): void; + getPacked(): boolean | undefined; + setPacked(value: boolean): void; + + hasJstype(): boolean; + clearJstype(): void; + getJstype(): FieldOptions.JSTypeMap[keyof FieldOptions.JSTypeMap] | undefined; + setJstype(value: FieldOptions.JSTypeMap[keyof FieldOptions.JSTypeMap]): void; + + hasLazy(): boolean; + clearLazy(): void; + getLazy(): boolean | undefined; + setLazy(value: boolean): void; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + hasWeak(): boolean; + clearWeak(): void; + getWeak(): boolean | undefined; + setWeak(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldOptions.AsObject; + static toObject(includeInstance: boolean, msg: FieldOptions): FieldOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldOptions; + static deserializeBinaryFromReader(message: FieldOptions, reader: jspb.BinaryReader): FieldOptions; +} + +export namespace FieldOptions { + export type AsObject = { + ctype?: FieldOptions.CTypeMap[keyof FieldOptions.CTypeMap], + packed?: boolean, + jstype?: FieldOptions.JSTypeMap[keyof FieldOptions.JSTypeMap], + lazy?: boolean, + deprecated?: boolean, + weak?: boolean, + uninterpretedOptionList: Array, + } + + export interface CTypeMap { + STRING: 0; + CORD: 1; + STRING_PIECE: 2; + } + + export const CType: CTypeMap; + + export interface JSTypeMap { + JS_NORMAL: 0; + JS_STRING: 1; + JS_NUMBER: 2; + } + + export const JSType: JSTypeMap; +} + +export class OneofOptions extends jspb.Message { + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofOptions.AsObject; + static toObject(includeInstance: boolean, msg: OneofOptions): OneofOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofOptions; + static deserializeBinaryFromReader(message: OneofOptions, reader: jspb.BinaryReader): OneofOptions; +} + +export namespace OneofOptions { + export type AsObject = { + uninterpretedOptionList: Array, + } +} + +export class EnumOptions extends jspb.Message { + hasAllowAlias(): boolean; + clearAllowAlias(): void; + getAllowAlias(): boolean | undefined; + setAllowAlias(value: boolean): void; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumOptions): EnumOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumOptions; + static deserializeBinaryFromReader(message: EnumOptions, reader: jspb.BinaryReader): EnumOptions; +} + +export namespace EnumOptions { + export type AsObject = { + allowAlias?: boolean, + deprecated?: boolean, + uninterpretedOptionList: Array, + } +} + +export class EnumValueOptions extends jspb.Message { + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValueOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueOptions): EnumValueOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValueOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValueOptions; + static deserializeBinaryFromReader(message: EnumValueOptions, reader: jspb.BinaryReader): EnumValueOptions; +} + +export namespace EnumValueOptions { + export type AsObject = { + deprecated?: boolean, + uninterpretedOptionList: Array, + } +} + +export class ServiceOptions extends jspb.Message { + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceOptions.AsObject; + static toObject(includeInstance: boolean, msg: ServiceOptions): ServiceOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceOptions; + static deserializeBinaryFromReader(message: ServiceOptions, reader: jspb.BinaryReader): ServiceOptions; +} + +export namespace ServiceOptions { + export type AsObject = { + deprecated?: boolean, + uninterpretedOptionList: Array, + } +} + +export class MethodOptions extends jspb.Message { + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + hasIdempotencyLevel(): boolean; + clearIdempotencyLevel(): void; + getIdempotencyLevel(): MethodOptions.IdempotencyLevelMap[keyof MethodOptions.IdempotencyLevelMap] | undefined; + setIdempotencyLevel(value: MethodOptions.IdempotencyLevelMap[keyof MethodOptions.IdempotencyLevelMap]): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MethodOptions.AsObject; + static toObject(includeInstance: boolean, msg: MethodOptions): MethodOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MethodOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MethodOptions; + static deserializeBinaryFromReader(message: MethodOptions, reader: jspb.BinaryReader): MethodOptions; +} + +export namespace MethodOptions { + export type AsObject = { + deprecated?: boolean, + idempotencyLevel?: MethodOptions.IdempotencyLevelMap[keyof MethodOptions.IdempotencyLevelMap], + uninterpretedOptionList: Array, + } + + export interface IdempotencyLevelMap { + IDEMPOTENCY_UNKNOWN: 0; + NO_SIDE_EFFECTS: 1; + IDEMPOTENT: 2; + } + + export const IdempotencyLevel: IdempotencyLevelMap; +} + +export class UninterpretedOption extends jspb.Message { + clearNameList(): void; + getNameList(): Array; + setNameList(value: Array): void; + addName(value?: UninterpretedOption.NamePart, index?: number): UninterpretedOption.NamePart; + + hasIdentifierValue(): boolean; + clearIdentifierValue(): void; + getIdentifierValue(): string | undefined; + setIdentifierValue(value: string): void; + + hasPositiveIntValue(): boolean; + clearPositiveIntValue(): void; + getPositiveIntValue(): number | undefined; + setPositiveIntValue(value: number): void; + + hasNegativeIntValue(): boolean; + clearNegativeIntValue(): void; + getNegativeIntValue(): number | undefined; + setNegativeIntValue(value: number): void; + + hasDoubleValue(): boolean; + clearDoubleValue(): void; + getDoubleValue(): number | undefined; + setDoubleValue(value: number): void; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): Uint8Array | string; + getStringValue_asU8(): Uint8Array; + getStringValue_asB64(): string; + setStringValue(value: Uint8Array | string): void; + + hasAggregateValue(): boolean; + clearAggregateValue(): void; + getAggregateValue(): string | undefined; + setAggregateValue(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UninterpretedOption.AsObject; + static toObject(includeInstance: boolean, msg: UninterpretedOption): UninterpretedOption.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UninterpretedOption, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UninterpretedOption; + static deserializeBinaryFromReader(message: UninterpretedOption, reader: jspb.BinaryReader): UninterpretedOption; +} + +export namespace UninterpretedOption { + export type AsObject = { + nameList: Array, + identifierValue?: string, + positiveIntValue?: number, + negativeIntValue?: number, + doubleValue?: number, + stringValue: Uint8Array | string, + aggregateValue?: string, + } + + export class NamePart extends jspb.Message { + hasNamePart(): boolean; + clearNamePart(): void; + getNamePart(): string | undefined; + setNamePart(value: string): void; + + hasIsExtension(): boolean; + clearIsExtension(): void; + getIsExtension(): boolean | undefined; + setIsExtension(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NamePart.AsObject; + static toObject(includeInstance: boolean, msg: NamePart): NamePart.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NamePart, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NamePart; + static deserializeBinaryFromReader(message: NamePart, reader: jspb.BinaryReader): NamePart; + } + + export namespace NamePart { + export type AsObject = { + namePart?: string, + isExtension?: boolean, + } + } +} + +export class SourceCodeInfo extends jspb.Message { + clearLocationList(): void; + getLocationList(): Array; + setLocationList(value: Array): void; + addLocation(value?: SourceCodeInfo.Location, index?: number): SourceCodeInfo.Location; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SourceCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: SourceCodeInfo): SourceCodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SourceCodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SourceCodeInfo; + static deserializeBinaryFromReader(message: SourceCodeInfo, reader: jspb.BinaryReader): SourceCodeInfo; +} + +export namespace SourceCodeInfo { + export type AsObject = { + locationList: Array, + } + + export class Location extends jspb.Message { + clearPathList(): void; + getPathList(): Array; + setPathList(value: Array): void; + addPath(value: number, index?: number): number; + + clearSpanList(): void; + getSpanList(): Array; + setSpanList(value: Array): void; + addSpan(value: number, index?: number): number; + + hasLeadingComments(): boolean; + clearLeadingComments(): void; + getLeadingComments(): string | undefined; + setLeadingComments(value: string): void; + + hasTrailingComments(): boolean; + clearTrailingComments(): void; + getTrailingComments(): string | undefined; + setTrailingComments(value: string): void; + + clearLeadingDetachedCommentsList(): void; + getLeadingDetachedCommentsList(): Array; + setLeadingDetachedCommentsList(value: Array): void; + addLeadingDetachedComments(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Location.AsObject; + static toObject(includeInstance: boolean, msg: Location): Location.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Location, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Location; + static deserializeBinaryFromReader(message: Location, reader: jspb.BinaryReader): Location; + } + + export namespace Location { + export type AsObject = { + pathList: Array, + spanList: Array, + leadingComments?: string, + trailingComments?: string, + leadingDetachedCommentsList: Array, + } + } +} + +export class GeneratedCodeInfo extends jspb.Message { + clearAnnotationList(): void; + getAnnotationList(): Array; + setAnnotationList(value: Array): void; + addAnnotation(value?: GeneratedCodeInfo.Annotation, index?: number): GeneratedCodeInfo.Annotation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GeneratedCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: GeneratedCodeInfo): GeneratedCodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GeneratedCodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GeneratedCodeInfo; + static deserializeBinaryFromReader(message: GeneratedCodeInfo, reader: jspb.BinaryReader): GeneratedCodeInfo; +} + +export namespace GeneratedCodeInfo { + export type AsObject = { + annotationList: Array, + } + + export class Annotation extends jspb.Message { + clearPathList(): void; + getPathList(): Array; + setPathList(value: Array): void; + addPath(value: number, index?: number): number; + + hasSourceFile(): boolean; + clearSourceFile(): void; + getSourceFile(): string | undefined; + setSourceFile(value: string): void; + + hasBegin(): boolean; + clearBegin(): void; + getBegin(): number | undefined; + setBegin(value: number): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Annotation.AsObject; + static toObject(includeInstance: boolean, msg: Annotation): Annotation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Annotation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Annotation; + static deserializeBinaryFromReader(message: Annotation, reader: jspb.BinaryReader): Annotation; + } + + export namespace Annotation { + export type AsObject = { + pathList: Array, + sourceFile?: string, + begin?: number, + end?: number, + } + } +} + diff --git a/js/proto/google/protobuf/descriptor_pb.js b/js/proto/google/protobuf/descriptor_pb.js new file mode 100644 index 000000000..ded89114d --- /dev/null +++ b/js/proto/google/protobuf/descriptor_pb.js @@ -0,0 +1,9499 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.DescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.DescriptorProto.ExtensionRange', null, global); +goog.exportSymbol('proto.google.protobuf.DescriptorProto.ReservedRange', null, global); +goog.exportSymbol('proto.google.protobuf.EnumDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.EnumDescriptorProto.EnumReservedRange', null, global); +goog.exportSymbol('proto.google.protobuf.EnumOptions', null, global); +goog.exportSymbol('proto.google.protobuf.EnumValueDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.EnumValueOptions', null, global); +goog.exportSymbol('proto.google.protobuf.ExtensionRangeOptions', null, global); +goog.exportSymbol('proto.google.protobuf.FieldDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.FieldDescriptorProto.Label', null, global); +goog.exportSymbol('proto.google.protobuf.FieldDescriptorProto.Type', null, global); +goog.exportSymbol('proto.google.protobuf.FieldOptions', null, global); +goog.exportSymbol('proto.google.protobuf.FieldOptions.CType', null, global); +goog.exportSymbol('proto.google.protobuf.FieldOptions.JSType', null, global); +goog.exportSymbol('proto.google.protobuf.FileDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.FileDescriptorSet', null, global); +goog.exportSymbol('proto.google.protobuf.FileOptions', null, global); +goog.exportSymbol('proto.google.protobuf.FileOptions.OptimizeMode', null, global); +goog.exportSymbol('proto.google.protobuf.GeneratedCodeInfo', null, global); +goog.exportSymbol('proto.google.protobuf.GeneratedCodeInfo.Annotation', null, global); +goog.exportSymbol('proto.google.protobuf.MessageOptions', null, global); +goog.exportSymbol('proto.google.protobuf.MethodDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.MethodOptions', null, global); +goog.exportSymbol('proto.google.protobuf.MethodOptions.IdempotencyLevel', null, global); +goog.exportSymbol('proto.google.protobuf.OneofDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.OneofOptions', null, global); +goog.exportSymbol('proto.google.protobuf.ServiceDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.ServiceOptions', null, global); +goog.exportSymbol('proto.google.protobuf.SourceCodeInfo', null, global); +goog.exportSymbol('proto.google.protobuf.SourceCodeInfo.Location', null, global); +goog.exportSymbol('proto.google.protobuf.UninterpretedOption', null, global); +goog.exportSymbol('proto.google.protobuf.UninterpretedOption.NamePart', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FileDescriptorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorSet.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileDescriptorSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FileDescriptorSet.displayName = 'proto.google.protobuf.FileDescriptorSet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FileDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FileDescriptorProto.displayName = 'proto.google.protobuf.FileDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.DescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.DescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DescriptorProto.displayName = 'proto.google.protobuf.DescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.DescriptorProto.ExtensionRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto.ExtensionRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DescriptorProto.ExtensionRange.displayName = 'proto.google.protobuf.DescriptorProto.ExtensionRange'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.DescriptorProto.ReservedRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto.ReservedRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DescriptorProto.ReservedRange.displayName = 'proto.google.protobuf.DescriptorProto.ReservedRange'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ExtensionRangeOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ExtensionRangeOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ExtensionRangeOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ExtensionRangeOptions.displayName = 'proto.google.protobuf.ExtensionRangeOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FieldDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.FieldDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FieldDescriptorProto.displayName = 'proto.google.protobuf.FieldDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.OneofDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.OneofDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.OneofDescriptorProto.displayName = 'proto.google.protobuf.OneofDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.EnumDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumDescriptorProto.displayName = 'proto.google.protobuf.EnumDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.displayName = 'proto.google.protobuf.EnumDescriptorProto.EnumReservedRange'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumValueDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.EnumValueDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumValueDescriptorProto.displayName = 'proto.google.protobuf.EnumValueDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ServiceDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ServiceDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ServiceDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ServiceDescriptorProto.displayName = 'proto.google.protobuf.ServiceDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.MethodDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.MethodDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.MethodDescriptorProto.displayName = 'proto.google.protobuf.MethodDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FileOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FileOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FileOptions.displayName = 'proto.google.protobuf.FileOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FileOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FileOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.MessageOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MessageOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.MessageOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.MessageOptions.displayName = 'proto.google.protobuf.MessageOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MessageOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MessageOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FieldOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FieldOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FieldOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FieldOptions.displayName = 'proto.google.protobuf.FieldOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FieldOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FieldOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.OneofOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.OneofOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.OneofOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.OneofOptions.displayName = 'proto.google.protobuf.OneofOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.OneofOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.OneofOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumOptions.displayName = 'proto.google.protobuf.EnumOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumValueOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumValueOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumValueOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumValueOptions.displayName = 'proto.google.protobuf.EnumValueOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumValueOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumValueOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ServiceOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ServiceOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ServiceOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ServiceOptions.displayName = 'proto.google.protobuf.ServiceOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ServiceOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ServiceOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.MethodOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MethodOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.MethodOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.MethodOptions.displayName = 'proto.google.protobuf.MethodOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MethodOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MethodOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.UninterpretedOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.UninterpretedOption.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.UninterpretedOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.UninterpretedOption.displayName = 'proto.google.protobuf.UninterpretedOption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.UninterpretedOption.NamePart = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.UninterpretedOption.NamePart, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.UninterpretedOption.NamePart.displayName = 'proto.google.protobuf.UninterpretedOption.NamePart'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.SourceCodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.SourceCodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.SourceCodeInfo.displayName = 'proto.google.protobuf.SourceCodeInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.SourceCodeInfo.Location = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.SourceCodeInfo.Location, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.SourceCodeInfo.Location.displayName = 'proto.google.protobuf.SourceCodeInfo.Location'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.GeneratedCodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.GeneratedCodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.GeneratedCodeInfo.displayName = 'proto.google.protobuf.GeneratedCodeInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.GeneratedCodeInfo.Annotation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.GeneratedCodeInfo.Annotation.displayName = 'proto.google.protobuf.GeneratedCodeInfo.Annotation'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FileDescriptorSet.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FileDescriptorSet.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FileDescriptorSet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FileDescriptorSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileDescriptorSet.toObject = function(includeInstance, msg) { + var f, obj = { + fileList: jspb.Message.toObjectList(msg.getFileList(), + proto.google.protobuf.FileDescriptorProto.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FileDescriptorSet} + */ +proto.google.protobuf.FileDescriptorSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FileDescriptorSet; + return proto.google.protobuf.FileDescriptorSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FileDescriptorSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FileDescriptorSet} + */ +proto.google.protobuf.FileDescriptorSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.FileDescriptorProto; + reader.readMessage(value,proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader); + msg.addFile(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FileDescriptorSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FileDescriptorSet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FileDescriptorSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileDescriptorSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFileList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FileDescriptorProto file = 1; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorSet.prototype.getFileList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FileDescriptorProto, 1)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.FileDescriptorSet.prototype.setFileList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.FileDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} + */ +proto.google.protobuf.FileDescriptorSet.prototype.addFile = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.FileDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.FileDescriptorSet.prototype.clearFileList = function() { + this.setFileList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FileDescriptorProto.repeatedFields_ = [3,10,11,4,5,6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FileDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FileDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getField(msg, 1), + pb_package: jspb.Message.getField(msg, 2), + dependencyList: jspb.Message.getRepeatedField(msg, 3), + publicDependencyList: jspb.Message.getRepeatedField(msg, 10), + weakDependencyList: jspb.Message.getRepeatedField(msg, 11), + messageTypeList: jspb.Message.toObjectList(msg.getMessageTypeList(), + proto.google.protobuf.DescriptorProto.toObject, includeInstance), + enumTypeList: jspb.Message.toObjectList(msg.getEnumTypeList(), + proto.google.protobuf.EnumDescriptorProto.toObject, includeInstance), + serviceList: jspb.Message.toObjectList(msg.getServiceList(), + proto.google.protobuf.ServiceDescriptorProto.toObject, includeInstance), + extensionList: jspb.Message.toObjectList(msg.getExtensionList(), + proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), + options: (f = msg.getOptions()) && proto.google.protobuf.FileOptions.toObject(includeInstance, f), + sourceCodeInfo: (f = msg.getSourceCodeInfo()) && proto.google.protobuf.SourceCodeInfo.toObject(includeInstance, f), + syntax: jspb.Message.getField(msg, 12) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FileDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FileDescriptorProto; + return proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FileDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FileDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPackage(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addDependency(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt32()); + msg.addPublicDependency(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt32()); + msg.addWeakDependency(value); + break; + case 4: + var value = new proto.google.protobuf.DescriptorProto; + reader.readMessage(value,proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader); + msg.addMessageType(value); + break; + case 5: + var value = new proto.google.protobuf.EnumDescriptorProto; + reader.readMessage(value,proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader); + msg.addEnumType(value); + break; + case 6: + var value = new proto.google.protobuf.ServiceDescriptorProto; + reader.readMessage(value,proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader); + msg.addService(value); + break; + case 7: + var value = new proto.google.protobuf.FieldDescriptorProto; + reader.readMessage(value,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader); + msg.addExtension$(value); + break; + case 8: + var value = new proto.google.protobuf.FileOptions; + reader.readMessage(value,proto.google.protobuf.FileOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 9: + var value = new proto.google.protobuf.SourceCodeInfo; + reader.readMessage(value,proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader); + msg.setSourceCodeInfo(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setSyntax(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FileDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getDependencyList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getPublicDependencyList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 10, + f + ); + } + f = message.getWeakDependencyList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 11, + f + ); + } + f = message.getMessageTypeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.google.protobuf.DescriptorProto.serializeBinaryToWriter + ); + } + f = message.getEnumTypeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getServiceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getExtensionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.protobuf.FileOptions.serializeBinaryToWriter + ); + } + f = message.getSourceCodeInfo(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeString( + 12, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileDescriptorProto.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearName = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string package = 2; + * @return {string} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileDescriptorProto.prototype.setPackage = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearPackage = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasPackage = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated string dependency = 3; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getDependencyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.FileDescriptorProto.prototype.setDependencyList = function(value) { + jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.google.protobuf.FileDescriptorProto.prototype.addDependency = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearDependencyList = function() { + this.setDependencyList([]); +}; + + +/** + * repeated int32 public_dependency = 10; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getPublicDependencyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.FileDescriptorProto.prototype.setPublicDependencyList = function(value) { + jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + */ +proto.google.protobuf.FileDescriptorProto.prototype.addPublicDependency = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearPublicDependencyList = function() { + this.setPublicDependencyList([]); +}; + + +/** + * repeated int32 weak_dependency = 11; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getWeakDependencyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 11)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.FileDescriptorProto.prototype.setWeakDependencyList = function(value) { + jspb.Message.setField(this, 11, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + */ +proto.google.protobuf.FileDescriptorProto.prototype.addWeakDependency = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 11, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearWeakDependencyList = function() { + this.setWeakDependencyList([]); +}; + + +/** + * repeated DescriptorProto message_type = 4; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getMessageTypeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto, 4)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.FileDescriptorProto.prototype.setMessageTypeList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.google.protobuf.DescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.prototype.addMessageType = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.protobuf.DescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearMessageTypeList = function() { + this.setMessageTypeList([]); +}; + + +/** + * repeated EnumDescriptorProto enum_type = 5; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getEnumTypeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumDescriptorProto, 5)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.FileDescriptorProto.prototype.setEnumTypeList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.google.protobuf.EnumDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.prototype.addEnumType = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.google.protobuf.EnumDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearEnumTypeList = function() { + this.setEnumTypeList([]); +}; + + +/** + * repeated ServiceDescriptorProto service = 6; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getServiceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.ServiceDescriptorProto, 6)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.FileDescriptorProto.prototype.setServiceList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.google.protobuf.ServiceDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.ServiceDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.prototype.addService = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.protobuf.ServiceDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearServiceList = function() { + this.setServiceList([]); +}; + + +/** + * repeated FieldDescriptorProto extension = 7; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getExtensionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldDescriptorProto, 7)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.FileDescriptorProto.prototype.setExtensionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.prototype.addExtension$ = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.google.protobuf.FieldDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearExtensionList = function() { + this.setExtensionList([]); +}; + + +/** + * optional FileOptions options = 8; + * @return {?proto.google.protobuf.FileOptions} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.FileOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FileOptions, 8)); +}; + + +/** @param {?proto.google.protobuf.FileOptions|undefined} value */ +proto.google.protobuf.FileDescriptorProto.prototype.setOptions = function(value) { + jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearOptions = function() { + this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional SourceCodeInfo source_code_info = 9; + * @return {?proto.google.protobuf.SourceCodeInfo} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getSourceCodeInfo = function() { + return /** @type{?proto.google.protobuf.SourceCodeInfo} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.SourceCodeInfo, 9)); +}; + + +/** @param {?proto.google.protobuf.SourceCodeInfo|undefined} value */ +proto.google.protobuf.FileDescriptorProto.prototype.setSourceCodeInfo = function(value) { + jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearSourceCodeInfo = function() { + this.setSourceCodeInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasSourceCodeInfo = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string syntax = 12; + * @return {string} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getSyntax = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileDescriptorProto.prototype.setSyntax = function(value) { + jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearSyntax = function() { + jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasSyntax = function() { + return jspb.Message.getField(this, 12) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.DescriptorProto.repeatedFields_ = [2,6,3,4,5,8,9,10]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.DescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.DescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getField(msg, 1), + fieldList: jspb.Message.toObjectList(msg.getFieldList(), + proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), + extensionList: jspb.Message.toObjectList(msg.getExtensionList(), + proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), + nestedTypeList: jspb.Message.toObjectList(msg.getNestedTypeList(), + proto.google.protobuf.DescriptorProto.toObject, includeInstance), + enumTypeList: jspb.Message.toObjectList(msg.getEnumTypeList(), + proto.google.protobuf.EnumDescriptorProto.toObject, includeInstance), + extensionRangeList: jspb.Message.toObjectList(msg.getExtensionRangeList(), + proto.google.protobuf.DescriptorProto.ExtensionRange.toObject, includeInstance), + oneofDeclList: jspb.Message.toObjectList(msg.getOneofDeclList(), + proto.google.protobuf.OneofDescriptorProto.toObject, includeInstance), + options: (f = msg.getOptions()) && proto.google.protobuf.MessageOptions.toObject(includeInstance, f), + reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), + proto.google.protobuf.DescriptorProto.ReservedRange.toObject, includeInstance), + reservedNameList: jspb.Message.getRepeatedField(msg, 10) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.DescriptorProto} + */ +proto.google.protobuf.DescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.DescriptorProto; + return proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.DescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.DescriptorProto} + */ +proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.protobuf.FieldDescriptorProto; + reader.readMessage(value,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader); + msg.addField(value); + break; + case 6: + var value = new proto.google.protobuf.FieldDescriptorProto; + reader.readMessage(value,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader); + msg.addExtension$(value); + break; + case 3: + var value = new proto.google.protobuf.DescriptorProto; + reader.readMessage(value,proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader); + msg.addNestedType(value); + break; + case 4: + var value = new proto.google.protobuf.EnumDescriptorProto; + reader.readMessage(value,proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader); + msg.addEnumType(value); + break; + case 5: + var value = new proto.google.protobuf.DescriptorProto.ExtensionRange; + reader.readMessage(value,proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader); + msg.addExtensionRange(value); + break; + case 8: + var value = new proto.google.protobuf.OneofDescriptorProto; + reader.readMessage(value,proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader); + msg.addOneofDecl(value); + break; + case 7: + var value = new proto.google.protobuf.MessageOptions; + reader.readMessage(value,proto.google.protobuf.MessageOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 9: + var value = new proto.google.protobuf.DescriptorProto.ReservedRange; + reader.readMessage(value,proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader); + msg.addReservedRange(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.addReservedName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.DescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.DescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.DescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getFieldList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getExtensionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getNestedTypeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.google.protobuf.DescriptorProto.serializeBinaryToWriter + ); + } + f = message.getEnumTypeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getExtensionRangeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter + ); + } + f = message.getOneofDeclList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.google.protobuf.MessageOptions.serializeBinaryToWriter + ); + } + f = message.getReservedRangeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter + ); + } + f = message.getReservedNameList(); + if (f.length > 0) { + writer.writeRepeatedString( + 10, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.DescriptorProto.ExtensionRange.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.toObject = function(includeInstance, msg) { + var f, obj = { + start: jspb.Message.getField(msg, 1), + end: jspb.Message.getField(msg, 2), + options: (f = msg.getOptions()) && proto.google.protobuf.ExtensionRangeOptions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.DescriptorProto.ExtensionRange; + return proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setStart(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEnd(value); + break; + case 3: + var value = new proto.google.protobuf.ExtensionRangeOptions; + reader.readMessage(value,proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 start = 1; + * @return {number} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getStart = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setStart = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearStart = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 end = 2; + * @return {number} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getEnd = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setEnd = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearEnd = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ExtensionRangeOptions options = 3; + * @return {?proto.google.protobuf.ExtensionRangeOptions} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.ExtensionRangeOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.ExtensionRangeOptions, 3)); +}; + + +/** @param {?proto.google.protobuf.ExtensionRangeOptions|undefined} value */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setOptions = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearOptions = function() { + this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasOptions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.DescriptorProto.ReservedRange.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.ReservedRange.toObject = function(includeInstance, msg) { + var f, obj = { + start: jspb.Message.getField(msg, 1), + end: jspb.Message.getField(msg, 2) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.DescriptorProto.ReservedRange; + return proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setStart(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int32 start = 1; + * @return {number} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getStart = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setStart = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearStart = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 end = 2; + * @return {number} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getEnd = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setEnd = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearEnd = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.DescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.DescriptorProto.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.DescriptorProto.prototype.clearName = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated FieldDescriptorProto field = 2; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getFieldList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldDescriptorProto, 2)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.DescriptorProto.prototype.setFieldList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addField = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.FieldDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.DescriptorProto.prototype.clearFieldList = function() { + this.setFieldList([]); +}; + + +/** + * repeated FieldDescriptorProto extension = 6; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getExtensionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldDescriptorProto, 6)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.DescriptorProto.prototype.setExtensionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addExtension$ = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.protobuf.FieldDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.DescriptorProto.prototype.clearExtensionList = function() { + this.setExtensionList([]); +}; + + +/** + * repeated DescriptorProto nested_type = 3; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getNestedTypeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto, 3)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.DescriptorProto.prototype.setNestedTypeList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.google.protobuf.DescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addNestedType = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.DescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.DescriptorProto.prototype.clearNestedTypeList = function() { + this.setNestedTypeList([]); +}; + + +/** + * repeated EnumDescriptorProto enum_type = 4; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getEnumTypeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumDescriptorProto, 4)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.DescriptorProto.prototype.setEnumTypeList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.google.protobuf.EnumDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addEnumType = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.protobuf.EnumDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.DescriptorProto.prototype.clearEnumTypeList = function() { + this.setEnumTypeList([]); +}; + + +/** + * repeated ExtensionRange extension_range = 5; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getExtensionRangeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto.ExtensionRange, 5)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.DescriptorProto.prototype.setExtensionRangeList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} + */ +proto.google.protobuf.DescriptorProto.prototype.addExtensionRange = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.google.protobuf.DescriptorProto.ExtensionRange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.DescriptorProto.prototype.clearExtensionRangeList = function() { + this.setExtensionRangeList([]); +}; + + +/** + * repeated OneofDescriptorProto oneof_decl = 8; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getOneofDeclList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.OneofDescriptorProto, 8)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.DescriptorProto.prototype.setOneofDeclList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.google.protobuf.OneofDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.OneofDescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addOneofDecl = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.google.protobuf.OneofDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.DescriptorProto.prototype.clearOneofDeclList = function() { + this.setOneofDeclList([]); +}; + + +/** + * optional MessageOptions options = 7; + * @return {?proto.google.protobuf.MessageOptions} + */ +proto.google.protobuf.DescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.MessageOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.MessageOptions, 7)); +}; + + +/** @param {?proto.google.protobuf.MessageOptions|undefined} value */ +proto.google.protobuf.DescriptorProto.prototype.setOptions = function(value) { + jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.google.protobuf.DescriptorProto.prototype.clearOptions = function() { + this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * repeated ReservedRange reserved_range = 9; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getReservedRangeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto.ReservedRange, 9)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.DescriptorProto.prototype.setReservedRangeList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.google.protobuf.DescriptorProto.ReservedRange=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} + */ +proto.google.protobuf.DescriptorProto.prototype.addReservedRange = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.google.protobuf.DescriptorProto.ReservedRange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.DescriptorProto.prototype.clearReservedRangeList = function() { + this.setReservedRangeList([]); +}; + + +/** + * repeated string reserved_name = 10; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getReservedNameList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.DescriptorProto.prototype.setReservedNameList = function(value) { + jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.google.protobuf.DescriptorProto.prototype.addReservedName = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.DescriptorProto.prototype.clearReservedNameList = function() { + this.setReservedNameList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.ExtensionRangeOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.ExtensionRangeOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.ExtensionRangeOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ExtensionRangeOptions.toObject = function(includeInstance, msg) { + var f, obj = { + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.ExtensionRangeOptions.extensions, proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.ExtensionRangeOptions} + */ +proto.google.protobuf.ExtensionRangeOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.ExtensionRangeOptions; + return proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.ExtensionRangeOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.ExtensionRangeOptions} + */ +proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.ExtensionRangeOptions.extensionsBinary, + proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension, + proto.google.protobuf.ExtensionRangeOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.ExtensionRangeOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.ExtensionRangeOptions.extensionsBinary, proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension); +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.ExtensionRangeOptions.prototype.setUninterpretedOptionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionList = function() { + this.setUninterpretedOptionList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FieldDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FieldDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getField(msg, 1), + number: jspb.Message.getField(msg, 3), + label: jspb.Message.getField(msg, 4), + type: jspb.Message.getField(msg, 5), + typeName: jspb.Message.getField(msg, 6), + extendee: jspb.Message.getField(msg, 2), + defaultValue: jspb.Message.getField(msg, 7), + oneofIndex: jspb.Message.getField(msg, 9), + jsonName: jspb.Message.getField(msg, 10), + options: (f = msg.getOptions()) && proto.google.protobuf.FieldOptions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.FieldDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FieldDescriptorProto; + return proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FieldDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumber(value); + break; + case 4: + var value = /** @type {!proto.google.protobuf.FieldDescriptorProto.Label} */ (reader.readEnum()); + msg.setLabel(value); + break; + case 5: + var value = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (reader.readEnum()); + msg.setType(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setTypeName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setExtendee(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setDefaultValue(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt32()); + msg.setOneofIndex(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setJsonName(value); + break; + case 8: + var value = new proto.google.protobuf.FieldOptions; + reader.readMessage(value,proto.google.protobuf.FieldOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FieldDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt32( + 3, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldDescriptorProto.Label} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeEnum( + 4, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeEnum( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeInt32( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeString( + 10, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.protobuf.FieldOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.FieldDescriptorProto.Type = { + TYPE_DOUBLE: 1, + TYPE_FLOAT: 2, + TYPE_INT64: 3, + TYPE_UINT64: 4, + TYPE_INT32: 5, + TYPE_FIXED64: 6, + TYPE_FIXED32: 7, + TYPE_BOOL: 8, + TYPE_STRING: 9, + TYPE_GROUP: 10, + TYPE_MESSAGE: 11, + TYPE_BYTES: 12, + TYPE_UINT32: 13, + TYPE_ENUM: 14, + TYPE_SFIXED32: 15, + TYPE_SFIXED64: 16, + TYPE_SINT32: 17, + TYPE_SINT64: 18 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FieldDescriptorProto.Label = { + LABEL_OPTIONAL: 1, + LABEL_REQUIRED: 2, + LABEL_REPEATED: 3 +}; + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FieldDescriptorProto.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearName = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 number = 3; + * @return {number} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.FieldDescriptorProto.prototype.setNumber = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearNumber = function() { + jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasNumber = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Label label = 4; + * @return {!proto.google.protobuf.FieldDescriptorProto.Label} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getLabel = function() { + return /** @type {!proto.google.protobuf.FieldDescriptorProto.Label} */ (jspb.Message.getFieldWithDefault(this, 4, 1)); +}; + + +/** @param {!proto.google.protobuf.FieldDescriptorProto.Label} value */ +proto.google.protobuf.FieldDescriptorProto.prototype.setLabel = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearLabel = function() { + jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasLabel = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Type type = 5; + * @return {!proto.google.protobuf.FieldDescriptorProto.Type} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getType = function() { + return /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getFieldWithDefault(this, 5, 1)); +}; + + +/** @param {!proto.google.protobuf.FieldDescriptorProto.Type} value */ +proto.google.protobuf.FieldDescriptorProto.prototype.setType = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearType = function() { + jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasType = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string type_name = 6; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FieldDescriptorProto.prototype.setTypeName = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearTypeName = function() { + jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasTypeName = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string extendee = 2; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getExtendee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FieldDescriptorProto.prototype.setExtendee = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearExtendee = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasExtendee = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string default_value = 7; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getDefaultValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FieldDescriptorProto.prototype.setDefaultValue = function(value) { + jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearDefaultValue = function() { + jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasDefaultValue = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional int32 oneof_index = 9; + * @return {number} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getOneofIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.FieldDescriptorProto.prototype.setOneofIndex = function(value) { + jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearOneofIndex = function() { + jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasOneofIndex = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string json_name = 10; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getJsonName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FieldDescriptorProto.prototype.setJsonName = function(value) { + jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearJsonName = function() { + jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasJsonName = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional FieldOptions options = 8; + * @return {?proto.google.protobuf.FieldOptions} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.FieldOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FieldOptions, 8)); +}; + + +/** @param {?proto.google.protobuf.FieldOptions|undefined} value */ +proto.google.protobuf.FieldDescriptorProto.prototype.setOptions = function(value) { + jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearOptions = function() { + this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.OneofDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.OneofDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.OneofDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getField(msg, 1), + options: (f = msg.getOptions()) && proto.google.protobuf.OneofOptions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.OneofDescriptorProto} + */ +proto.google.protobuf.OneofDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.OneofDescriptorProto; + return proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.OneofDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.OneofDescriptorProto} + */ +proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.protobuf.OneofOptions; + reader.readMessage(value,proto.google.protobuf.OneofOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.OneofDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.protobuf.OneofOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.OneofDescriptorProto.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.OneofDescriptorProto.prototype.clearName = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional OneofOptions options = 2; + * @return {?proto.google.protobuf.OneofOptions} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.OneofOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.OneofOptions, 2)); +}; + + +/** @param {?proto.google.protobuf.OneofOptions|undefined} value */ +proto.google.protobuf.OneofDescriptorProto.prototype.setOptions = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.google.protobuf.OneofDescriptorProto.prototype.clearOptions = function() { + this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.EnumDescriptorProto.repeatedFields_ = [2,4,5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.EnumDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getField(msg, 1), + valueList: jspb.Message.toObjectList(msg.getValueList(), + proto.google.protobuf.EnumValueDescriptorProto.toObject, includeInstance), + options: (f = msg.getOptions()) && proto.google.protobuf.EnumOptions.toObject(includeInstance, f), + reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject, includeInstance), + reservedNameList: jspb.Message.getRepeatedField(msg, 5) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.EnumDescriptorProto} + */ +proto.google.protobuf.EnumDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumDescriptorProto; + return proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumDescriptorProto} + */ +proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.protobuf.EnumValueDescriptorProto; + reader.readMessage(value,proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader); + msg.addValue(value); + break; + case 3: + var value = new proto.google.protobuf.EnumOptions; + reader.readMessage(value,proto.google.protobuf.EnumOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 4: + var value = new proto.google.protobuf.EnumDescriptorProto.EnumReservedRange; + reader.readMessage(value,proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader); + msg.addReservedRange(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addReservedName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getValueList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.EnumOptions.serializeBinaryToWriter + ); + } + f = message.getReservedRangeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter + ); + } + f = message.getReservedNameList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject = function(includeInstance, msg) { + var f, obj = { + start: jspb.Message.getField(msg, 1), + end: jspb.Message.getField(msg, 2) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumDescriptorProto.EnumReservedRange; + return proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setStart(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int32 start = 1; + * @return {number} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getStart = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setStart = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearStart = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 end = 2; + * @return {number} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getEnd = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setEnd = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearEnd = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.EnumDescriptorProto.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearName = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated EnumValueDescriptorProto value = 2; + * @return {!Array} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getValueList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumValueDescriptorProto, 2)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.EnumDescriptorProto.prototype.setValueList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.EnumValueDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumValueDescriptorProto} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.addValue = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.EnumValueDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearValueList = function() { + this.setValueList([]); +}; + + +/** + * optional EnumOptions options = 3; + * @return {?proto.google.protobuf.EnumOptions} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.EnumOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.EnumOptions, 3)); +}; + + +/** @param {?proto.google.protobuf.EnumOptions|undefined} value */ +proto.google.protobuf.EnumDescriptorProto.prototype.setOptions = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearOptions = function() { + this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated EnumReservedRange reserved_range = 4; + * @return {!Array} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getReservedRangeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, 4)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.EnumDescriptorProto.prototype.setReservedRangeList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.addReservedRange = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedRangeList = function() { + this.setReservedRangeList([]); +}; + + +/** + * repeated string reserved_name = 5; + * @return {!Array} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getReservedNameList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.EnumDescriptorProto.prototype.setReservedNameList = function(value) { + jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.google.protobuf.EnumDescriptorProto.prototype.addReservedName = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedNameList = function() { + this.setReservedNameList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumValueDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.EnumValueDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumValueDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getField(msg, 1), + number: jspb.Message.getField(msg, 2), + options: (f = msg.getOptions()) && proto.google.protobuf.EnumValueOptions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} + */ +proto.google.protobuf.EnumValueDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumValueDescriptorProto; + return proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumValueDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} + */ +proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumber(value); + break; + case 3: + var value = new proto.google.protobuf.EnumValueOptions; + reader.readMessage(value,proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumValueDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.clearName = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 number = 2; + * @return {number} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.setNumber = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.clearNumber = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.hasNumber = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional EnumValueOptions options = 3; + * @return {?proto.google.protobuf.EnumValueOptions} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.EnumValueOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.EnumValueOptions, 3)); +}; + + +/** @param {?proto.google.protobuf.EnumValueOptions|undefined} value */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.setOptions = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.clearOptions = function() { + this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.ServiceDescriptorProto.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.ServiceDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.ServiceDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ServiceDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getField(msg, 1), + methodList: jspb.Message.toObjectList(msg.getMethodList(), + proto.google.protobuf.MethodDescriptorProto.toObject, includeInstance), + options: (f = msg.getOptions()) && proto.google.protobuf.ServiceOptions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.ServiceDescriptorProto} + */ +proto.google.protobuf.ServiceDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.ServiceDescriptorProto; + return proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.ServiceDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.ServiceDescriptorProto} + */ +proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.protobuf.MethodDescriptorProto; + reader.readMessage(value,proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader); + msg.addMethod(value); + break; + case 3: + var value = new proto.google.protobuf.ServiceOptions; + reader.readMessage(value,proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.ServiceDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getMethodList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.ServiceOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.ServiceDescriptorProto.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.clearName = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated MethodDescriptorProto method = 2; + * @return {!Array} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.getMethodList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.MethodDescriptorProto, 2)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.ServiceDescriptorProto.prototype.setMethodList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.MethodDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.MethodDescriptorProto} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.addMethod = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.MethodDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.clearMethodList = function() { + this.setMethodList([]); +}; + + +/** + * optional ServiceOptions options = 3; + * @return {?proto.google.protobuf.ServiceOptions} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.ServiceOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.ServiceOptions, 3)); +}; + + +/** @param {?proto.google.protobuf.ServiceOptions|undefined} value */ +proto.google.protobuf.ServiceDescriptorProto.prototype.setOptions = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.clearOptions = function() { + this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.MethodDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.MethodDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MethodDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getField(msg, 1), + inputType: jspb.Message.getField(msg, 2), + outputType: jspb.Message.getField(msg, 3), + options: (f = msg.getOptions()) && proto.google.protobuf.MethodOptions.toObject(includeInstance, f), + clientStreaming: jspb.Message.getFieldWithDefault(msg, 5, false), + serverStreaming: jspb.Message.getFieldWithDefault(msg, 6, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.MethodDescriptorProto} + */ +proto.google.protobuf.MethodDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.MethodDescriptorProto; + return proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.MethodDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.MethodDescriptorProto} + */ +proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setInputType(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOutputType(value); + break; + case 4: + var value = new proto.google.protobuf.MethodOptions; + reader.readMessage(value,proto.google.protobuf.MethodOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setClientStreaming(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setServerStreaming(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.MethodDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.protobuf.MethodOptions.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBool( + 5, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBool( + 6, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.MethodDescriptorProto.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearName = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string input_type = 2; + * @return {string} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getInputType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.MethodDescriptorProto.prototype.setInputType = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearInputType = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasInputType = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string output_type = 3; + * @return {string} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getOutputType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.MethodDescriptorProto.prototype.setOutputType = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearOutputType = function() { + jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasOutputType = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional MethodOptions options = 4; + * @return {?proto.google.protobuf.MethodOptions} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.MethodOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.MethodOptions, 4)); +}; + + +/** @param {?proto.google.protobuf.MethodOptions|undefined} value */ +proto.google.protobuf.MethodDescriptorProto.prototype.setOptions = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearOptions = function() { + this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool client_streaming = 5; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getClientStreaming = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.MethodDescriptorProto.prototype.setClientStreaming = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearClientStreaming = function() { + jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasClientStreaming = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool server_streaming = 6; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getServerStreaming = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.MethodDescriptorProto.prototype.setServerStreaming = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearServerStreaming = function() { + jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasServerStreaming = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FileOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FileOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FileOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileOptions.toObject = function(includeInstance, msg) { + var f, obj = { + javaPackage: jspb.Message.getField(msg, 1), + javaOuterClassname: jspb.Message.getField(msg, 8), + javaMultipleFiles: jspb.Message.getFieldWithDefault(msg, 10, false), + javaGenerateEqualsAndHash: jspb.Message.getField(msg, 20), + javaStringCheckUtf8: jspb.Message.getFieldWithDefault(msg, 27, false), + optimizeFor: jspb.Message.getFieldWithDefault(msg, 9, 1), + goPackage: jspb.Message.getField(msg, 11), + ccGenericServices: jspb.Message.getFieldWithDefault(msg, 16, false), + javaGenericServices: jspb.Message.getFieldWithDefault(msg, 17, false), + pyGenericServices: jspb.Message.getFieldWithDefault(msg, 18, false), + phpGenericServices: jspb.Message.getFieldWithDefault(msg, 42, false), + deprecated: jspb.Message.getFieldWithDefault(msg, 23, false), + ccEnableArenas: jspb.Message.getFieldWithDefault(msg, 31, false), + objcClassPrefix: jspb.Message.getField(msg, 36), + csharpNamespace: jspb.Message.getField(msg, 37), + swiftPrefix: jspb.Message.getField(msg, 39), + phpClassPrefix: jspb.Message.getField(msg, 40), + phpNamespace: jspb.Message.getField(msg, 41), + phpMetadataNamespace: jspb.Message.getField(msg, 44), + rubyPackage: jspb.Message.getField(msg, 45), + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.FileOptions.extensions, proto.google.protobuf.FileOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FileOptions} + */ +proto.google.protobuf.FileOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FileOptions; + return proto.google.protobuf.FileOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FileOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FileOptions} + */ +proto.google.protobuf.FileOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setJavaPackage(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setJavaOuterClassname(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJavaMultipleFiles(value); + break; + case 20: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJavaGenerateEqualsAndHash(value); + break; + case 27: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJavaStringCheckUtf8(value); + break; + case 9: + var value = /** @type {!proto.google.protobuf.FileOptions.OptimizeMode} */ (reader.readEnum()); + msg.setOptimizeFor(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setGoPackage(value); + break; + case 16: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCcGenericServices(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJavaGenericServices(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPyGenericServices(value); + break; + case 42: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPhpGenericServices(value); + break; + case 23: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 31: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCcEnableArenas(value); + break; + case 36: + var value = /** @type {string} */ (reader.readString()); + msg.setObjcClassPrefix(value); + break; + case 37: + var value = /** @type {string} */ (reader.readString()); + msg.setCsharpNamespace(value); + break; + case 39: + var value = /** @type {string} */ (reader.readString()); + msg.setSwiftPrefix(value); + break; + case 40: + var value = /** @type {string} */ (reader.readString()); + msg.setPhpClassPrefix(value); + break; + case 41: + var value = /** @type {string} */ (reader.readString()); + msg.setPhpNamespace(value); + break; + case 44: + var value = /** @type {string} */ (reader.readString()); + msg.setPhpMetadataNamespace(value); + break; + case 45: + var value = /** @type {string} */ (reader.readString()); + msg.setRubyPackage(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.FileOptions.extensionsBinary, + proto.google.protobuf.FileOptions.prototype.getExtension, + proto.google.protobuf.FileOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FileOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FileOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FileOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeBool( + 10, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 20)); + if (f != null) { + writer.writeBool( + 20, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 27)); + if (f != null) { + writer.writeBool( + 27, + f + ); + } + f = /** @type {!proto.google.protobuf.FileOptions.OptimizeMode} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeEnum( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeString( + 11, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 16)); + if (f != null) { + writer.writeBool( + 16, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeBool( + 17, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 18)); + if (f != null) { + writer.writeBool( + 18, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 42)); + if (f != null) { + writer.writeBool( + 42, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 23)); + if (f != null) { + writer.writeBool( + 23, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 31)); + if (f != null) { + writer.writeBool( + 31, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 36)); + if (f != null) { + writer.writeString( + 36, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 37)); + if (f != null) { + writer.writeString( + 37, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 39)); + if (f != null) { + writer.writeString( + 39, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 40)); + if (f != null) { + writer.writeString( + 40, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 41)); + if (f != null) { + writer.writeString( + 41, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 44)); + if (f != null) { + writer.writeString( + 44, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 45)); + if (f != null) { + writer.writeString( + 45, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.FileOptions.extensionsBinary, proto.google.protobuf.FileOptions.prototype.getExtension); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.FileOptions.OptimizeMode = { + SPEED: 1, + CODE_SIZE: 2, + LITE_RUNTIME: 3 +}; + +/** + * optional string java_package = 1; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getJavaPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileOptions.prototype.setJavaPackage = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearJavaPackage = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaPackage = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string java_outer_classname = 8; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getJavaOuterClassname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileOptions.prototype.setJavaOuterClassname = function(value) { + jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearJavaOuterClassname = function() { + jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaOuterClassname = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional bool java_multiple_files = 10; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getJavaMultipleFiles = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FileOptions.prototype.setJavaMultipleFiles = function(value) { + jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearJavaMultipleFiles = function() { + jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaMultipleFiles = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional bool java_generate_equals_and_hash = 20; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getJavaGenerateEqualsAndHash = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 20, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FileOptions.prototype.setJavaGenerateEqualsAndHash = function(value) { + jspb.Message.setField(this, 20, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearJavaGenerateEqualsAndHash = function() { + jspb.Message.setField(this, 20, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaGenerateEqualsAndHash = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional bool java_string_check_utf8 = 27; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getJavaStringCheckUtf8 = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 27, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FileOptions.prototype.setJavaStringCheckUtf8 = function(value) { + jspb.Message.setField(this, 27, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearJavaStringCheckUtf8 = function() { + jspb.Message.setField(this, 27, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaStringCheckUtf8 = function() { + return jspb.Message.getField(this, 27) != null; +}; + + +/** + * optional OptimizeMode optimize_for = 9; + * @return {!proto.google.protobuf.FileOptions.OptimizeMode} + */ +proto.google.protobuf.FileOptions.prototype.getOptimizeFor = function() { + return /** @type {!proto.google.protobuf.FileOptions.OptimizeMode} */ (jspb.Message.getFieldWithDefault(this, 9, 1)); +}; + + +/** @param {!proto.google.protobuf.FileOptions.OptimizeMode} value */ +proto.google.protobuf.FileOptions.prototype.setOptimizeFor = function(value) { + jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearOptimizeFor = function() { + jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasOptimizeFor = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string go_package = 11; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getGoPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileOptions.prototype.setGoPackage = function(value) { + jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearGoPackage = function() { + jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasGoPackage = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional bool cc_generic_services = 16; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getCcGenericServices = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 16, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FileOptions.prototype.setCcGenericServices = function(value) { + jspb.Message.setField(this, 16, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearCcGenericServices = function() { + jspb.Message.setField(this, 16, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasCcGenericServices = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional bool java_generic_services = 17; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getJavaGenericServices = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 17, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FileOptions.prototype.setJavaGenericServices = function(value) { + jspb.Message.setField(this, 17, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearJavaGenericServices = function() { + jspb.Message.setField(this, 17, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaGenericServices = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * optional bool py_generic_services = 18; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getPyGenericServices = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FileOptions.prototype.setPyGenericServices = function(value) { + jspb.Message.setField(this, 18, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearPyGenericServices = function() { + jspb.Message.setField(this, 18, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPyGenericServices = function() { + return jspb.Message.getField(this, 18) != null; +}; + + +/** + * optional bool php_generic_services = 42; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getPhpGenericServices = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 42, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FileOptions.prototype.setPhpGenericServices = function(value) { + jspb.Message.setField(this, 42, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearPhpGenericServices = function() { + jspb.Message.setField(this, 42, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPhpGenericServices = function() { + return jspb.Message.getField(this, 42) != null; +}; + + +/** + * optional bool deprecated = 23; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 23, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FileOptions.prototype.setDeprecated = function(value) { + jspb.Message.setField(this, 23, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearDeprecated = function() { + jspb.Message.setField(this, 23, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 23) != null; +}; + + +/** + * optional bool cc_enable_arenas = 31; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getCcEnableArenas = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 31, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FileOptions.prototype.setCcEnableArenas = function(value) { + jspb.Message.setField(this, 31, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearCcEnableArenas = function() { + jspb.Message.setField(this, 31, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasCcEnableArenas = function() { + return jspb.Message.getField(this, 31) != null; +}; + + +/** + * optional string objc_class_prefix = 36; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getObjcClassPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 36, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileOptions.prototype.setObjcClassPrefix = function(value) { + jspb.Message.setField(this, 36, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearObjcClassPrefix = function() { + jspb.Message.setField(this, 36, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasObjcClassPrefix = function() { + return jspb.Message.getField(this, 36) != null; +}; + + +/** + * optional string csharp_namespace = 37; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getCsharpNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 37, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileOptions.prototype.setCsharpNamespace = function(value) { + jspb.Message.setField(this, 37, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearCsharpNamespace = function() { + jspb.Message.setField(this, 37, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasCsharpNamespace = function() { + return jspb.Message.getField(this, 37) != null; +}; + + +/** + * optional string swift_prefix = 39; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getSwiftPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 39, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileOptions.prototype.setSwiftPrefix = function(value) { + jspb.Message.setField(this, 39, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearSwiftPrefix = function() { + jspb.Message.setField(this, 39, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasSwiftPrefix = function() { + return jspb.Message.getField(this, 39) != null; +}; + + +/** + * optional string php_class_prefix = 40; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getPhpClassPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 40, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileOptions.prototype.setPhpClassPrefix = function(value) { + jspb.Message.setField(this, 40, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearPhpClassPrefix = function() { + jspb.Message.setField(this, 40, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPhpClassPrefix = function() { + return jspb.Message.getField(this, 40) != null; +}; + + +/** + * optional string php_namespace = 41; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getPhpNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 41, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileOptions.prototype.setPhpNamespace = function(value) { + jspb.Message.setField(this, 41, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearPhpNamespace = function() { + jspb.Message.setField(this, 41, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPhpNamespace = function() { + return jspb.Message.getField(this, 41) != null; +}; + + +/** + * optional string php_metadata_namespace = 44; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getPhpMetadataNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 44, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileOptions.prototype.setPhpMetadataNamespace = function(value) { + jspb.Message.setField(this, 44, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearPhpMetadataNamespace = function() { + jspb.Message.setField(this, 44, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPhpMetadataNamespace = function() { + return jspb.Message.getField(this, 44) != null; +}; + + +/** + * optional string ruby_package = 45; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getRubyPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 45, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.FileOptions.prototype.setRubyPackage = function(value) { + jspb.Message.setField(this, 45, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FileOptions.prototype.clearRubyPackage = function() { + jspb.Message.setField(this, 45, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasRubyPackage = function() { + return jspb.Message.getField(this, 45) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.FileOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.FileOptions.prototype.setUninterpretedOptionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.FileOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.FileOptions.prototype.clearUninterpretedOptionList = function() { + this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.MessageOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.MessageOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.MessageOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MessageOptions.toObject = function(includeInstance, msg) { + var f, obj = { + messageSetWireFormat: jspb.Message.getFieldWithDefault(msg, 1, false), + noStandardDescriptorAccessor: jspb.Message.getFieldWithDefault(msg, 2, false), + deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), + mapEntry: jspb.Message.getField(msg, 7), + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.MessageOptions.extensions, proto.google.protobuf.MessageOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.MessageOptions} + */ +proto.google.protobuf.MessageOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.MessageOptions; + return proto.google.protobuf.MessageOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.MessageOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.MessageOptions} + */ +proto.google.protobuf.MessageOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMessageSetWireFormat(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setNoStandardDescriptorAccessor(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMapEntry(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.MessageOptions.extensionsBinary, + proto.google.protobuf.MessageOptions.prototype.getExtension, + proto.google.protobuf.MessageOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.MessageOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.MessageOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.MessageOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MessageOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBool( + 7, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.MessageOptions.extensionsBinary, proto.google.protobuf.MessageOptions.prototype.getExtension); +}; + + +/** + * optional bool message_set_wire_format = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getMessageSetWireFormat = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.MessageOptions.prototype.setMessageSetWireFormat = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.MessageOptions.prototype.clearMessageSetWireFormat = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasMessageSetWireFormat = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool no_standard_descriptor_accessor = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getNoStandardDescriptorAccessor = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.MessageOptions.prototype.setNoStandardDescriptorAccessor = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.MessageOptions.prototype.clearNoStandardDescriptorAccessor = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasNoStandardDescriptorAccessor = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool deprecated = 3; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.MessageOptions.prototype.setDeprecated = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.MessageOptions.prototype.clearDeprecated = function() { + jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool map_entry = 7; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getMapEntry = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 7, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.MessageOptions.prototype.setMapEntry = function(value) { + jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.MessageOptions.prototype.clearMapEntry = function() { + jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasMapEntry = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.MessageOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.MessageOptions.prototype.setUninterpretedOptionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.MessageOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.MessageOptions.prototype.clearUninterpretedOptionList = function() { + this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FieldOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FieldOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FieldOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldOptions.toObject = function(includeInstance, msg) { + var f, obj = { + ctype: jspb.Message.getFieldWithDefault(msg, 1, 0), + packed: jspb.Message.getField(msg, 2), + jstype: jspb.Message.getFieldWithDefault(msg, 6, 0), + lazy: jspb.Message.getFieldWithDefault(msg, 5, false), + deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), + weak: jspb.Message.getFieldWithDefault(msg, 10, false), + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.FieldOptions.extensions, proto.google.protobuf.FieldOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FieldOptions} + */ +proto.google.protobuf.FieldOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FieldOptions; + return proto.google.protobuf.FieldOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FieldOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FieldOptions} + */ +proto.google.protobuf.FieldOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.google.protobuf.FieldOptions.CType} */ (reader.readEnum()); + msg.setCtype(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPacked(value); + break; + case 6: + var value = /** @type {!proto.google.protobuf.FieldOptions.JSType} */ (reader.readEnum()); + msg.setJstype(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLazy(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setWeak(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.FieldOptions.extensionsBinary, + proto.google.protobuf.FieldOptions.prototype.getExtension, + proto.google.protobuf.FieldOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FieldOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FieldOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FieldOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.google.protobuf.FieldOptions.CType} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldOptions.JSType} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeEnum( + 6, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBool( + 5, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeBool( + 10, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.FieldOptions.extensionsBinary, proto.google.protobuf.FieldOptions.prototype.getExtension); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.FieldOptions.CType = { + STRING: 0, + CORD: 1, + STRING_PIECE: 2 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FieldOptions.JSType = { + JS_NORMAL: 0, + JS_STRING: 1, + JS_NUMBER: 2 +}; + +/** + * optional CType ctype = 1; + * @return {!proto.google.protobuf.FieldOptions.CType} + */ +proto.google.protobuf.FieldOptions.prototype.getCtype = function() { + return /** @type {!proto.google.protobuf.FieldOptions.CType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.google.protobuf.FieldOptions.CType} value */ +proto.google.protobuf.FieldOptions.prototype.setCtype = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldOptions.prototype.clearCtype = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasCtype = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool packed = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getPacked = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FieldOptions.prototype.setPacked = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldOptions.prototype.clearPacked = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasPacked = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional JSType jstype = 6; + * @return {!proto.google.protobuf.FieldOptions.JSType} + */ +proto.google.protobuf.FieldOptions.prototype.getJstype = function() { + return /** @type {!proto.google.protobuf.FieldOptions.JSType} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {!proto.google.protobuf.FieldOptions.JSType} value */ +proto.google.protobuf.FieldOptions.prototype.setJstype = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldOptions.prototype.clearJstype = function() { + jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasJstype = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bool lazy = 5; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getLazy = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FieldOptions.prototype.setLazy = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldOptions.prototype.clearLazy = function() { + jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasLazy = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool deprecated = 3; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FieldOptions.prototype.setDeprecated = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldOptions.prototype.clearDeprecated = function() { + jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool weak = 10; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getWeak = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.FieldOptions.prototype.setWeak = function(value) { + jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.FieldOptions.prototype.clearWeak = function() { + jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasWeak = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.FieldOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.FieldOptions.prototype.setUninterpretedOptionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.FieldOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.FieldOptions.prototype.clearUninterpretedOptionList = function() { + this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.OneofOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.OneofOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.OneofOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.OneofOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.OneofOptions.toObject = function(includeInstance, msg) { + var f, obj = { + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.OneofOptions.extensions, proto.google.protobuf.OneofOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.OneofOptions} + */ +proto.google.protobuf.OneofOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.OneofOptions; + return proto.google.protobuf.OneofOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.OneofOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.OneofOptions} + */ +proto.google.protobuf.OneofOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.OneofOptions.extensionsBinary, + proto.google.protobuf.OneofOptions.prototype.getExtension, + proto.google.protobuf.OneofOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.OneofOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.OneofOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.OneofOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.OneofOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.OneofOptions.extensionsBinary, proto.google.protobuf.OneofOptions.prototype.getExtension); +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.OneofOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.OneofOptions.prototype.setUninterpretedOptionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.OneofOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.OneofOptions.prototype.clearUninterpretedOptionList = function() { + this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.EnumOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.EnumOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumOptions.toObject = function(includeInstance, msg) { + var f, obj = { + allowAlias: jspb.Message.getField(msg, 2), + deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.EnumOptions.extensions, proto.google.protobuf.EnumOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.EnumOptions} + */ +proto.google.protobuf.EnumOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumOptions; + return proto.google.protobuf.EnumOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumOptions} + */ +proto.google.protobuf.EnumOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowAlias(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.EnumOptions.extensionsBinary, + proto.google.protobuf.EnumOptions.prototype.getExtension, + proto.google.protobuf.EnumOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.EnumOptions.extensionsBinary, proto.google.protobuf.EnumOptions.prototype.getExtension); +}; + + +/** + * optional bool allow_alias = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.getAllowAlias = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.EnumOptions.prototype.setAllowAlias = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.EnumOptions.prototype.clearAllowAlias = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.hasAllowAlias = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool deprecated = 3; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.EnumOptions.prototype.setDeprecated = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.EnumOptions.prototype.clearDeprecated = function() { + jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.EnumOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.EnumOptions.prototype.setUninterpretedOptionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.EnumOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.EnumOptions.prototype.clearUninterpretedOptionList = function() { + this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.EnumValueOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumValueOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.EnumValueOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumValueOptions.toObject = function(includeInstance, msg) { + var f, obj = { + deprecated: jspb.Message.getFieldWithDefault(msg, 1, false), + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.EnumValueOptions.extensions, proto.google.protobuf.EnumValueOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.EnumValueOptions} + */ +proto.google.protobuf.EnumValueOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumValueOptions; + return proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumValueOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumValueOptions} + */ +proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.EnumValueOptions.extensionsBinary, + proto.google.protobuf.EnumValueOptions.prototype.getExtension, + proto.google.protobuf.EnumValueOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumValueOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumValueOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.EnumValueOptions.extensionsBinary, proto.google.protobuf.EnumValueOptions.prototype.getExtension); +}; + + +/** + * optional bool deprecated = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.EnumValueOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.EnumValueOptions.prototype.setDeprecated = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.EnumValueOptions.prototype.clearDeprecated = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.EnumValueOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.EnumValueOptions.prototype.setUninterpretedOptionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.EnumValueOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.EnumValueOptions.prototype.clearUninterpretedOptionList = function() { + this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.ServiceOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.ServiceOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.ServiceOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ServiceOptions.toObject = function(includeInstance, msg) { + var f, obj = { + deprecated: jspb.Message.getFieldWithDefault(msg, 33, false), + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.ServiceOptions.extensions, proto.google.protobuf.ServiceOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.ServiceOptions} + */ +proto.google.protobuf.ServiceOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.ServiceOptions; + return proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.ServiceOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.ServiceOptions} + */ +proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 33: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.ServiceOptions.extensionsBinary, + proto.google.protobuf.ServiceOptions.prototype.getExtension, + proto.google.protobuf.ServiceOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.ServiceOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.ServiceOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.ServiceOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ServiceOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 33)); + if (f != null) { + writer.writeBool( + 33, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.ServiceOptions.extensionsBinary, proto.google.protobuf.ServiceOptions.prototype.getExtension); +}; + + +/** + * optional bool deprecated = 33; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.ServiceOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 33, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.ServiceOptions.prototype.setDeprecated = function(value) { + jspb.Message.setField(this, 33, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.ServiceOptions.prototype.clearDeprecated = function() { + jspb.Message.setField(this, 33, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ServiceOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 33) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.ServiceOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.ServiceOptions.prototype.setUninterpretedOptionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.ServiceOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.ServiceOptions.prototype.clearUninterpretedOptionList = function() { + this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.MethodOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.MethodOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.MethodOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MethodOptions.toObject = function(includeInstance, msg) { + var f, obj = { + deprecated: jspb.Message.getFieldWithDefault(msg, 33, false), + idempotencyLevel: jspb.Message.getFieldWithDefault(msg, 34, 0), + uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.MethodOptions.extensions, proto.google.protobuf.MethodOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.MethodOptions} + */ +proto.google.protobuf.MethodOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.MethodOptions; + return proto.google.protobuf.MethodOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.MethodOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.MethodOptions} + */ +proto.google.protobuf.MethodOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 33: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 34: + var value = /** @type {!proto.google.protobuf.MethodOptions.IdempotencyLevel} */ (reader.readEnum()); + msg.setIdempotencyLevel(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.MethodOptions.extensionsBinary, + proto.google.protobuf.MethodOptions.prototype.getExtension, + proto.google.protobuf.MethodOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.MethodOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.MethodOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.MethodOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MethodOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 33)); + if (f != null) { + writer.writeBool( + 33, + f + ); + } + f = /** @type {!proto.google.protobuf.MethodOptions.IdempotencyLevel} */ (jspb.Message.getField(message, 34)); + if (f != null) { + writer.writeEnum( + 34, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.MethodOptions.extensionsBinary, proto.google.protobuf.MethodOptions.prototype.getExtension); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.MethodOptions.IdempotencyLevel = { + IDEMPOTENCY_UNKNOWN: 0, + NO_SIDE_EFFECTS: 1, + IDEMPOTENT: 2 +}; + +/** + * optional bool deprecated = 33; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.MethodOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 33, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.MethodOptions.prototype.setDeprecated = function(value) { + jspb.Message.setField(this, 33, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.MethodOptions.prototype.clearDeprecated = function() { + jspb.Message.setField(this, 33, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 33) != null; +}; + + +/** + * optional IdempotencyLevel idempotency_level = 34; + * @return {!proto.google.protobuf.MethodOptions.IdempotencyLevel} + */ +proto.google.protobuf.MethodOptions.prototype.getIdempotencyLevel = function() { + return /** @type {!proto.google.protobuf.MethodOptions.IdempotencyLevel} */ (jspb.Message.getFieldWithDefault(this, 34, 0)); +}; + + +/** @param {!proto.google.protobuf.MethodOptions.IdempotencyLevel} value */ +proto.google.protobuf.MethodOptions.prototype.setIdempotencyLevel = function(value) { + jspb.Message.setField(this, 34, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.MethodOptions.prototype.clearIdempotencyLevel = function() { + jspb.Message.setField(this, 34, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodOptions.prototype.hasIdempotencyLevel = function() { + return jspb.Message.getField(this, 34) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.MethodOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.MethodOptions.prototype.setUninterpretedOptionList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.MethodOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.MethodOptions.prototype.clearUninterpretedOptionList = function() { + this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.UninterpretedOption.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.UninterpretedOption.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.UninterpretedOption.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.UninterpretedOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UninterpretedOption.toObject = function(includeInstance, msg) { + var f, obj = { + nameList: jspb.Message.toObjectList(msg.getNameList(), + proto.google.protobuf.UninterpretedOption.NamePart.toObject, includeInstance), + identifierValue: jspb.Message.getField(msg, 3), + positiveIntValue: jspb.Message.getField(msg, 4), + negativeIntValue: jspb.Message.getField(msg, 5), + doubleValue: jspb.Message.getOptionalFloatingPointField(msg, 6), + stringValue: msg.getStringValue_asB64(), + aggregateValue: jspb.Message.getField(msg, 8) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.UninterpretedOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.UninterpretedOption; + return proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.UninterpretedOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new proto.google.protobuf.UninterpretedOption.NamePart; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader); + msg.addName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setIdentifierValue(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPositiveIntValue(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNegativeIntValue(value); + break; + case 6: + var value = /** @type {number} */ (reader.readDouble()); + msg.setDoubleValue(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStringValue(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setAggregateValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.UninterpretedOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.UninterpretedOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNameList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeInt64( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeDouble( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.UninterpretedOption.NamePart.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.UninterpretedOption.NamePart} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UninterpretedOption.NamePart.toObject = function(includeInstance, msg) { + var f, obj = { + namePart: jspb.Message.getField(msg, 1), + isExtension: jspb.Message.getField(msg, 2) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} + */ +proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.UninterpretedOption.NamePart; + return proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.UninterpretedOption.NamePart} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} + */ +proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNamePart(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsExtension(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.UninterpretedOption.NamePart} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * required string name_part = 1; + * @return {string} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.getNamePart = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.setNamePart = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearNamePart = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasNamePart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * required bool is_extension = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.getIsExtension = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.setIsExtension = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearIsExtension = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasIsExtension = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated NamePart name = 2; + * @return {!Array} + */ +proto.google.protobuf.UninterpretedOption.prototype.getNameList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption.NamePart, 2)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.UninterpretedOption.prototype.setNameList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption.NamePart=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} + */ +proto.google.protobuf.UninterpretedOption.prototype.addName = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.UninterpretedOption.NamePart, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.UninterpretedOption.prototype.clearNameList = function() { + this.setNameList([]); +}; + + +/** + * optional string identifier_value = 3; + * @return {string} + */ +proto.google.protobuf.UninterpretedOption.prototype.getIdentifierValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.UninterpretedOption.prototype.setIdentifierValue = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.UninterpretedOption.prototype.clearIdentifierValue = function() { + jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasIdentifierValue = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 positive_int_value = 4; + * @return {number} + */ +proto.google.protobuf.UninterpretedOption.prototype.getPositiveIntValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.UninterpretedOption.prototype.setPositiveIntValue = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.UninterpretedOption.prototype.clearPositiveIntValue = function() { + jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasPositiveIntValue = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int64 negative_int_value = 5; + * @return {number} + */ +proto.google.protobuf.UninterpretedOption.prototype.getNegativeIntValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.UninterpretedOption.prototype.setNegativeIntValue = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.UninterpretedOption.prototype.clearNegativeIntValue = function() { + jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasNegativeIntValue = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional double double_value = 6; + * @return {number} + */ +proto.google.protobuf.UninterpretedOption.prototype.getDoubleValue = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 6, 0.0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.UninterpretedOption.prototype.setDoubleValue = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.UninterpretedOption.prototype.clearDoubleValue = function() { + jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasDoubleValue = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes string_value = 7; + * @return {!(string|Uint8Array)} + */ +proto.google.protobuf.UninterpretedOption.prototype.getStringValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes string_value = 7; + * This is a type-conversion wrapper around `getStringValue()` + * @return {string} + */ +proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStringValue())); +}; + + +/** + * optional bytes string_value = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStringValue()` + * @return {!Uint8Array} + */ +proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStringValue())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.google.protobuf.UninterpretedOption.prototype.setStringValue = function(value) { + jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.UninterpretedOption.prototype.clearStringValue = function() { + jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasStringValue = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string aggregate_value = 8; + * @return {string} + */ +proto.google.protobuf.UninterpretedOption.prototype.getAggregateValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.UninterpretedOption.prototype.setAggregateValue = function(value) { + jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.UninterpretedOption.prototype.clearAggregateValue = function() { + jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasAggregateValue = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.SourceCodeInfo.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.SourceCodeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.SourceCodeInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.SourceCodeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.SourceCodeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + locationList: jspb.Message.toObjectList(msg.getLocationList(), + proto.google.protobuf.SourceCodeInfo.Location.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.SourceCodeInfo} + */ +proto.google.protobuf.SourceCodeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.SourceCodeInfo; + return proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.SourceCodeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.SourceCodeInfo} + */ +proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.SourceCodeInfo.Location; + reader.readMessage(value,proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader); + msg.addLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.SourceCodeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.SourceCodeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_ = [1,2,6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.SourceCodeInfo.Location.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.SourceCodeInfo.Location} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.SourceCodeInfo.Location.toObject = function(includeInstance, msg) { + var f, obj = { + pathList: jspb.Message.getRepeatedField(msg, 1), + spanList: jspb.Message.getRepeatedField(msg, 2), + leadingComments: jspb.Message.getField(msg, 3), + trailingComments: jspb.Message.getField(msg, 4), + leadingDetachedCommentsList: jspb.Message.getRepeatedField(msg, 6) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} + */ +proto.google.protobuf.SourceCodeInfo.Location.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.SourceCodeInfo.Location; + return proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.SourceCodeInfo.Location} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} + */ +proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Array} */ (reader.readPackedInt32()); + msg.setPathList(value); + break; + case 2: + var value = /** @type {!Array} */ (reader.readPackedInt32()); + msg.setSpanList(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLeadingComments(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setTrailingComments(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addLeadingDetachedComments(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.SourceCodeInfo.Location} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPathList(); + if (f.length > 0) { + writer.writePackedInt32( + 1, + f + ); + } + f = message.getSpanList(); + if (f.length > 0) { + writer.writePackedInt32( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = message.getLeadingDetachedCommentsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } +}; + + +/** + * repeated int32 path = 1; + * @return {!Array} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getPathList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setPathList = function(value) { + jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.addPath = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearPathList = function() { + this.setPathList([]); +}; + + +/** + * repeated int32 span = 2; + * @return {!Array} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getSpanList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setSpanList = function(value) { + jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.addSpan = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearSpanList = function() { + this.setSpanList([]); +}; + + +/** + * optional string leading_comments = 3; + * @return {string} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingComments = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingComments = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingComments = function() { + jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.hasLeadingComments = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string trailing_comments = 4; + * @return {string} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getTrailingComments = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setTrailingComments = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearTrailingComments = function() { + jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.hasTrailingComments = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * repeated string leading_detached_comments = 6; + * @return {!Array} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingDetachedCommentsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingDetachedCommentsList = function(value) { + jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.addLeadingDetachedComments = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingDetachedCommentsList = function() { + this.setLeadingDetachedCommentsList([]); +}; + + +/** + * repeated Location location = 1; + * @return {!Array} + */ +proto.google.protobuf.SourceCodeInfo.prototype.getLocationList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.SourceCodeInfo.Location, 1)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.SourceCodeInfo.prototype.setLocationList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.SourceCodeInfo.Location=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} + */ +proto.google.protobuf.SourceCodeInfo.prototype.addLocation = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.SourceCodeInfo.Location, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.SourceCodeInfo.prototype.clearLocationList = function() { + this.setLocationList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.GeneratedCodeInfo.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.GeneratedCodeInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.GeneratedCodeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.GeneratedCodeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + annotationList: jspb.Message.toObjectList(msg.getAnnotationList(), + proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.GeneratedCodeInfo} + */ +proto.google.protobuf.GeneratedCodeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.GeneratedCodeInfo; + return proto.google.protobuf.GeneratedCodeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.GeneratedCodeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.GeneratedCodeInfo} + */ +proto.google.protobuf.GeneratedCodeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.GeneratedCodeInfo.Annotation; + reader.readMessage(value,proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader); + msg.addAnnotation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.GeneratedCodeInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.GeneratedCodeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.GeneratedCodeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAnnotationList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject = function(includeInstance, msg) { + var f, obj = { + pathList: jspb.Message.getRepeatedField(msg, 1), + sourceFile: jspb.Message.getField(msg, 2), + begin: jspb.Message.getField(msg, 3), + end: jspb.Message.getField(msg, 4) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.GeneratedCodeInfo.Annotation; + return proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Array} */ (reader.readPackedInt32()); + msg.setPathList(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceFile(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBegin(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPathList(); + if (f.length > 0) { + writer.writePackedInt32( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * repeated int32 path = 1; + * @return {!Array} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getPathList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setPathList = function(value) { + jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.addPath = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearPathList = function() { + this.setPathList([]); +}; + + +/** + * optional string source_file = 2; + * @return {string} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getSourceFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setSourceFile = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearSourceFile = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasSourceFile = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int32 begin = 3; + * @return {number} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getBegin = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setBegin = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearBegin = function() { + jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasBegin = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int32 end = 4; + * @return {number} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getEnd = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setEnd = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearEnd = function() { + jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasEnd = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * repeated Annotation annotation = 1; + * @return {!Array} + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.getAnnotationList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.GeneratedCodeInfo.Annotation, 1)); +}; + + +/** @param {!Array} value */ +proto.google.protobuf.GeneratedCodeInfo.prototype.setAnnotationList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.addAnnotation = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.GeneratedCodeInfo.Annotation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.clearAnnotationList = function() { + this.setAnnotationList([]); +}; + + +goog.object.extend(exports, proto.google.protobuf); diff --git a/js/proto/google/protobuf/timestamp_grpc_pb.d.ts b/js/proto/google/protobuf/timestamp_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/google/protobuf/timestamp_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/google/protobuf/timestamp_grpc_pb.js b/js/proto/google/protobuf/timestamp_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/google/protobuf/timestamp_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/google/protobuf/timestamp_pb.d.ts b/js/proto/google/protobuf/timestamp_pb.d.ts new file mode 100644 index 000000000..931c24658 --- /dev/null +++ b/js/proto/google/protobuf/timestamp_pb.d.ts @@ -0,0 +1,29 @@ +// package: google.protobuf +// file: google/protobuf/timestamp.proto + +import * as jspb from "google-protobuf"; + +export class Timestamp extends jspb.Message { + getSeconds(): number; + setSeconds(value: number): void; + + getNanos(): number; + setNanos(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Timestamp.AsObject; + static toObject(includeInstance: boolean, msg: Timestamp): Timestamp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Timestamp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Timestamp; + static deserializeBinaryFromReader(message: Timestamp, reader: jspb.BinaryReader): Timestamp; +} + +export namespace Timestamp { + export type AsObject = { + seconds: number, + nanos: number, + } +} + diff --git a/js/proto/google/protobuf/timestamp_pb.js b/js/proto/google/protobuf/timestamp_pb.js new file mode 100644 index 000000000..3c225b7bb --- /dev/null +++ b/js/proto/google/protobuf/timestamp_pb.js @@ -0,0 +1,224 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.Timestamp', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.Timestamp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Timestamp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Timestamp.displayName = 'proto.google.protobuf.Timestamp'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.Timestamp.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Timestamp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.Timestamp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Timestamp.toObject = function(includeInstance, msg) { + var f, obj = { + seconds: jspb.Message.getFieldWithDefault(msg, 1, 0), + nanos: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.Timestamp} + */ +proto.google.protobuf.Timestamp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Timestamp; + return proto.google.protobuf.Timestamp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Timestamp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Timestamp} + */ +proto.google.protobuf.Timestamp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSeconds(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNanos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.Timestamp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Timestamp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Timestamp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Timestamp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSeconds(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getNanos(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int64 seconds = 1; + * @return {number} + */ +proto.google.protobuf.Timestamp.prototype.getSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.Timestamp.prototype.setSeconds = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 nanos = 2; + * @return {number} + */ +proto.google.protobuf.Timestamp.prototype.getNanos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.google.protobuf.Timestamp.prototype.setNanos = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.protobuf); +/* This code will be inserted into generated code for + * google/protobuf/timestamp.proto. */ + +/** + * Returns a JavaScript 'Date' object corresponding to this Timestamp. + * @return {!Date} + */ +proto.google.protobuf.Timestamp.prototype.toDate = function() { + var seconds = this.getSeconds(); + var nanos = this.getNanos(); + + return new Date((seconds * 1000) + (nanos / 1000000)); +}; + + +/** + * Sets the value of this Timestamp object to be the given Date. + * @param {!Date} value The value to set. + */ +proto.google.protobuf.Timestamp.prototype.fromDate = function(value) { + this.setSeconds(Math.floor(value.getTime() / 1000)); + this.setNanos(value.getMilliseconds() * 1000000); +}; + + +/** + * Factory method that returns a Timestamp object with value equal to + * the given Date. + * @param {!Date} value The value to set. + * @return {!proto.google.protobuf.Timestamp} + */ +proto.google.protobuf.Timestamp.fromDate = function(value) { + var timestamp = new proto.google.protobuf.Timestamp(); + timestamp.fromDate(value); + return timestamp; +}; diff --git a/js/proto/keys_grpc_pb.d.ts b/js/proto/keys_grpc_pb.d.ts new file mode 100644 index 000000000..7d5b0930c --- /dev/null +++ b/js/proto/keys_grpc_pb.d.ts @@ -0,0 +1,60 @@ +// GENERATED CODE -- DO NOT EDIT! + +// package: keys +// file: keys.proto + +import * as keys_pb from "./keys_pb"; +import * as grpc from "grpc"; + +interface IKeysService extends grpc.ServiceDefinition { + generateKey: grpc.MethodDefinition; + publicKey: grpc.MethodDefinition; + sign: grpc.MethodDefinition; + verify: grpc.MethodDefinition; + import: grpc.MethodDefinition; + importJSON: grpc.MethodDefinition; + export: grpc.MethodDefinition; + hash: grpc.MethodDefinition; + removeName: grpc.MethodDefinition; + list: grpc.MethodDefinition; + addName: grpc.MethodDefinition; +} + +export const KeysService: IKeysService; + +export class KeysClient extends grpc.Client { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + generateKey(argument: keys_pb.GenRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + generateKey(argument: keys_pb.GenRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + generateKey(argument: keys_pb.GenRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + publicKey(argument: keys_pb.PubRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + publicKey(argument: keys_pb.PubRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + publicKey(argument: keys_pb.PubRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + sign(argument: keys_pb.SignRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + sign(argument: keys_pb.SignRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + sign(argument: keys_pb.SignRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + verify(argument: keys_pb.VerifyRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + verify(argument: keys_pb.VerifyRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + verify(argument: keys_pb.VerifyRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + import(argument: keys_pb.ImportRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + import(argument: keys_pb.ImportRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + import(argument: keys_pb.ImportRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + importJSON(argument: keys_pb.ImportJSONRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + importJSON(argument: keys_pb.ImportJSONRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + importJSON(argument: keys_pb.ImportJSONRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + export(argument: keys_pb.ExportRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + export(argument: keys_pb.ExportRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + export(argument: keys_pb.ExportRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + hash(argument: keys_pb.HashRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + hash(argument: keys_pb.HashRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + hash(argument: keys_pb.HashRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + removeName(argument: keys_pb.RemoveNameRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + removeName(argument: keys_pb.RemoveNameRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + removeName(argument: keys_pb.RemoveNameRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + list(argument: keys_pb.ListRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + list(argument: keys_pb.ListRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + list(argument: keys_pb.ListRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + addName(argument: keys_pb.AddNameRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + addName(argument: keys_pb.AddNameRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + addName(argument: keys_pb.AddNameRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; +} diff --git a/js/proto/keys_grpc_pb.js b/js/proto/keys_grpc_pb.js new file mode 100644 index 000000000..ed7f5c6f5 --- /dev/null +++ b/js/proto/keys_grpc_pb.js @@ -0,0 +1,365 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var keys_pb = require('./keys_pb.js'); +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +var crypto_pb = require('./crypto_pb.js'); + +function serialize_keys_AddNameRequest(arg) { + if (!(arg instanceof keys_pb.AddNameRequest)) { + throw new Error('Expected argument of type keys.AddNameRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_AddNameRequest(buffer_arg) { + return keys_pb.AddNameRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_AddNameResponse(arg) { + if (!(arg instanceof keys_pb.AddNameResponse)) { + throw new Error('Expected argument of type keys.AddNameResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_AddNameResponse(buffer_arg) { + return keys_pb.AddNameResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_ExportRequest(arg) { + if (!(arg instanceof keys_pb.ExportRequest)) { + throw new Error('Expected argument of type keys.ExportRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_ExportRequest(buffer_arg) { + return keys_pb.ExportRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_ExportResponse(arg) { + if (!(arg instanceof keys_pb.ExportResponse)) { + throw new Error('Expected argument of type keys.ExportResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_ExportResponse(buffer_arg) { + return keys_pb.ExportResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_GenRequest(arg) { + if (!(arg instanceof keys_pb.GenRequest)) { + throw new Error('Expected argument of type keys.GenRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_GenRequest(buffer_arg) { + return keys_pb.GenRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_GenResponse(arg) { + if (!(arg instanceof keys_pb.GenResponse)) { + throw new Error('Expected argument of type keys.GenResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_GenResponse(buffer_arg) { + return keys_pb.GenResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_HashRequest(arg) { + if (!(arg instanceof keys_pb.HashRequest)) { + throw new Error('Expected argument of type keys.HashRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_HashRequest(buffer_arg) { + return keys_pb.HashRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_HashResponse(arg) { + if (!(arg instanceof keys_pb.HashResponse)) { + throw new Error('Expected argument of type keys.HashResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_HashResponse(buffer_arg) { + return keys_pb.HashResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_ImportJSONRequest(arg) { + if (!(arg instanceof keys_pb.ImportJSONRequest)) { + throw new Error('Expected argument of type keys.ImportJSONRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_ImportJSONRequest(buffer_arg) { + return keys_pb.ImportJSONRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_ImportRequest(arg) { + if (!(arg instanceof keys_pb.ImportRequest)) { + throw new Error('Expected argument of type keys.ImportRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_ImportRequest(buffer_arg) { + return keys_pb.ImportRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_ImportResponse(arg) { + if (!(arg instanceof keys_pb.ImportResponse)) { + throw new Error('Expected argument of type keys.ImportResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_ImportResponse(buffer_arg) { + return keys_pb.ImportResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_ListRequest(arg) { + if (!(arg instanceof keys_pb.ListRequest)) { + throw new Error('Expected argument of type keys.ListRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_ListRequest(buffer_arg) { + return keys_pb.ListRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_ListResponse(arg) { + if (!(arg instanceof keys_pb.ListResponse)) { + throw new Error('Expected argument of type keys.ListResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_ListResponse(buffer_arg) { + return keys_pb.ListResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_PubRequest(arg) { + if (!(arg instanceof keys_pb.PubRequest)) { + throw new Error('Expected argument of type keys.PubRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_PubRequest(buffer_arg) { + return keys_pb.PubRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_PubResponse(arg) { + if (!(arg instanceof keys_pb.PubResponse)) { + throw new Error('Expected argument of type keys.PubResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_PubResponse(buffer_arg) { + return keys_pb.PubResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_RemoveNameRequest(arg) { + if (!(arg instanceof keys_pb.RemoveNameRequest)) { + throw new Error('Expected argument of type keys.RemoveNameRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_RemoveNameRequest(buffer_arg) { + return keys_pb.RemoveNameRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_RemoveNameResponse(arg) { + if (!(arg instanceof keys_pb.RemoveNameResponse)) { + throw new Error('Expected argument of type keys.RemoveNameResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_RemoveNameResponse(buffer_arg) { + return keys_pb.RemoveNameResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_SignRequest(arg) { + if (!(arg instanceof keys_pb.SignRequest)) { + throw new Error('Expected argument of type keys.SignRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_SignRequest(buffer_arg) { + return keys_pb.SignRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_SignResponse(arg) { + if (!(arg instanceof keys_pb.SignResponse)) { + throw new Error('Expected argument of type keys.SignResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_SignResponse(buffer_arg) { + return keys_pb.SignResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_VerifyRequest(arg) { + if (!(arg instanceof keys_pb.VerifyRequest)) { + throw new Error('Expected argument of type keys.VerifyRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_VerifyRequest(buffer_arg) { + return keys_pb.VerifyRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_keys_VerifyResponse(arg) { + if (!(arg instanceof keys_pb.VerifyResponse)) { + throw new Error('Expected argument of type keys.VerifyResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_keys_VerifyResponse(buffer_arg) { + return keys_pb.VerifyResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var KeysService = exports.KeysService = { + generateKey: { + path: '/keys.Keys/GenerateKey', + requestStream: false, + responseStream: false, + requestType: keys_pb.GenRequest, + responseType: keys_pb.GenResponse, + requestSerialize: serialize_keys_GenRequest, + requestDeserialize: deserialize_keys_GenRequest, + responseSerialize: serialize_keys_GenResponse, + responseDeserialize: deserialize_keys_GenResponse, + }, + publicKey: { + path: '/keys.Keys/PublicKey', + requestStream: false, + responseStream: false, + requestType: keys_pb.PubRequest, + responseType: keys_pb.PubResponse, + requestSerialize: serialize_keys_PubRequest, + requestDeserialize: deserialize_keys_PubRequest, + responseSerialize: serialize_keys_PubResponse, + responseDeserialize: deserialize_keys_PubResponse, + }, + sign: { + path: '/keys.Keys/Sign', + requestStream: false, + responseStream: false, + requestType: keys_pb.SignRequest, + responseType: keys_pb.SignResponse, + requestSerialize: serialize_keys_SignRequest, + requestDeserialize: deserialize_keys_SignRequest, + responseSerialize: serialize_keys_SignResponse, + responseDeserialize: deserialize_keys_SignResponse, + }, + verify: { + path: '/keys.Keys/Verify', + requestStream: false, + responseStream: false, + requestType: keys_pb.VerifyRequest, + responseType: keys_pb.VerifyResponse, + requestSerialize: serialize_keys_VerifyRequest, + requestDeserialize: deserialize_keys_VerifyRequest, + responseSerialize: serialize_keys_VerifyResponse, + responseDeserialize: deserialize_keys_VerifyResponse, + }, + import: { + path: '/keys.Keys/Import', + requestStream: false, + responseStream: false, + requestType: keys_pb.ImportRequest, + responseType: keys_pb.ImportResponse, + requestSerialize: serialize_keys_ImportRequest, + requestDeserialize: deserialize_keys_ImportRequest, + responseSerialize: serialize_keys_ImportResponse, + responseDeserialize: deserialize_keys_ImportResponse, + }, + importJSON: { + path: '/keys.Keys/ImportJSON', + requestStream: false, + responseStream: false, + requestType: keys_pb.ImportJSONRequest, + responseType: keys_pb.ImportResponse, + requestSerialize: serialize_keys_ImportJSONRequest, + requestDeserialize: deserialize_keys_ImportJSONRequest, + responseSerialize: serialize_keys_ImportResponse, + responseDeserialize: deserialize_keys_ImportResponse, + }, + export: { + path: '/keys.Keys/Export', + requestStream: false, + responseStream: false, + requestType: keys_pb.ExportRequest, + responseType: keys_pb.ExportResponse, + requestSerialize: serialize_keys_ExportRequest, + requestDeserialize: deserialize_keys_ExportRequest, + responseSerialize: serialize_keys_ExportResponse, + responseDeserialize: deserialize_keys_ExportResponse, + }, + hash: { + path: '/keys.Keys/Hash', + requestStream: false, + responseStream: false, + requestType: keys_pb.HashRequest, + responseType: keys_pb.HashResponse, + requestSerialize: serialize_keys_HashRequest, + requestDeserialize: deserialize_keys_HashRequest, + responseSerialize: serialize_keys_HashResponse, + responseDeserialize: deserialize_keys_HashResponse, + }, + removeName: { + path: '/keys.Keys/RemoveName', + requestStream: false, + responseStream: false, + requestType: keys_pb.RemoveNameRequest, + responseType: keys_pb.RemoveNameResponse, + requestSerialize: serialize_keys_RemoveNameRequest, + requestDeserialize: deserialize_keys_RemoveNameRequest, + responseSerialize: serialize_keys_RemoveNameResponse, + responseDeserialize: deserialize_keys_RemoveNameResponse, + }, + list: { + path: '/keys.Keys/List', + requestStream: false, + responseStream: false, + requestType: keys_pb.ListRequest, + responseType: keys_pb.ListResponse, + requestSerialize: serialize_keys_ListRequest, + requestDeserialize: deserialize_keys_ListRequest, + responseSerialize: serialize_keys_ListResponse, + responseDeserialize: deserialize_keys_ListResponse, + }, + addName: { + path: '/keys.Keys/AddName', + requestStream: false, + responseStream: false, + requestType: keys_pb.AddNameRequest, + responseType: keys_pb.AddNameResponse, + requestSerialize: serialize_keys_AddNameRequest, + requestDeserialize: deserialize_keys_AddNameRequest, + responseSerialize: serialize_keys_AddNameResponse, + responseDeserialize: deserialize_keys_AddNameResponse, + }, +}; + +exports.KeysClient = grpc.makeGenericClientConstructor(KeysService); diff --git a/js/proto/keys_pb.d.ts b/js/proto/keys_pb.d.ts new file mode 100644 index 000000000..6b272c975 --- /dev/null +++ b/js/proto/keys_pb.d.ts @@ -0,0 +1,545 @@ +// package: keys +// file: keys.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as crypto_pb from "./crypto_pb"; + +export class ListRequest extends jspb.Message { + getKeyname(): string; + setKeyname(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListRequest): ListRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListRequest; + static deserializeBinaryFromReader(message: ListRequest, reader: jspb.BinaryReader): ListRequest; +} + +export namespace ListRequest { + export type AsObject = { + keyname: string, + } +} + +export class VerifyResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VerifyResponse.AsObject; + static toObject(includeInstance: boolean, msg: VerifyResponse): VerifyResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VerifyResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VerifyResponse; + static deserializeBinaryFromReader(message: VerifyResponse, reader: jspb.BinaryReader): VerifyResponse; +} + +export namespace VerifyResponse { + export type AsObject = { + } +} + +export class RemoveNameResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoveNameResponse.AsObject; + static toObject(includeInstance: boolean, msg: RemoveNameResponse): RemoveNameResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoveNameResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoveNameResponse; + static deserializeBinaryFromReader(message: RemoveNameResponse, reader: jspb.BinaryReader): RemoveNameResponse; +} + +export namespace RemoveNameResponse { + export type AsObject = { + } +} + +export class AddNameResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddNameResponse.AsObject; + static toObject(includeInstance: boolean, msg: AddNameResponse): AddNameResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddNameResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddNameResponse; + static deserializeBinaryFromReader(message: AddNameResponse, reader: jspb.BinaryReader): AddNameResponse; +} + +export namespace AddNameResponse { + export type AsObject = { + } +} + +export class RemoveNameRequest extends jspb.Message { + getKeyname(): string; + setKeyname(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoveNameRequest.AsObject; + static toObject(includeInstance: boolean, msg: RemoveNameRequest): RemoveNameRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoveNameRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoveNameRequest; + static deserializeBinaryFromReader(message: RemoveNameRequest, reader: jspb.BinaryReader): RemoveNameRequest; +} + +export namespace RemoveNameRequest { + export type AsObject = { + keyname: string, + } +} + +export class GenRequest extends jspb.Message { + getPassphrase(): string; + setPassphrase(value: string): void; + + getCurvetype(): string; + setCurvetype(value: string): void; + + getKeyname(): string; + setKeyname(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenRequest.AsObject; + static toObject(includeInstance: boolean, msg: GenRequest): GenRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenRequest; + static deserializeBinaryFromReader(message: GenRequest, reader: jspb.BinaryReader): GenRequest; +} + +export namespace GenRequest { + export type AsObject = { + passphrase: string, + curvetype: string, + keyname: string, + } +} + +export class GenResponse extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenResponse.AsObject; + static toObject(includeInstance: boolean, msg: GenResponse): GenResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenResponse; + static deserializeBinaryFromReader(message: GenResponse, reader: jspb.BinaryReader): GenResponse; +} + +export namespace GenResponse { + export type AsObject = { + address: string, + } +} + +export class PubRequest extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PubRequest.AsObject; + static toObject(includeInstance: boolean, msg: PubRequest): PubRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PubRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PubRequest; + static deserializeBinaryFromReader(message: PubRequest, reader: jspb.BinaryReader): PubRequest; +} + +export namespace PubRequest { + export type AsObject = { + address: string, + name: string, + } +} + +export class PubResponse extends jspb.Message { + getPublickey(): Uint8Array | string; + getPublickey_asU8(): Uint8Array; + getPublickey_asB64(): string; + setPublickey(value: Uint8Array | string): void; + + getCurvetype(): string; + setCurvetype(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PubResponse.AsObject; + static toObject(includeInstance: boolean, msg: PubResponse): PubResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PubResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PubResponse; + static deserializeBinaryFromReader(message: PubResponse, reader: jspb.BinaryReader): PubResponse; +} + +export namespace PubResponse { + export type AsObject = { + publickey: Uint8Array | string, + curvetype: string, + } +} + +export class ImportJSONRequest extends jspb.Message { + getPassphrase(): string; + setPassphrase(value: string): void; + + getJson(): string; + setJson(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ImportJSONRequest.AsObject; + static toObject(includeInstance: boolean, msg: ImportJSONRequest): ImportJSONRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ImportJSONRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ImportJSONRequest; + static deserializeBinaryFromReader(message: ImportJSONRequest, reader: jspb.BinaryReader): ImportJSONRequest; +} + +export namespace ImportJSONRequest { + export type AsObject = { + passphrase: string, + json: string, + } +} + +export class ImportResponse extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ImportResponse.AsObject; + static toObject(includeInstance: boolean, msg: ImportResponse): ImportResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ImportResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ImportResponse; + static deserializeBinaryFromReader(message: ImportResponse, reader: jspb.BinaryReader): ImportResponse; +} + +export namespace ImportResponse { + export type AsObject = { + address: string, + } +} + +export class ImportRequest extends jspb.Message { + getPassphrase(): string; + setPassphrase(value: string): void; + + getName(): string; + setName(value: string): void; + + getCurvetype(): string; + setCurvetype(value: string): void; + + getKeybytes(): Uint8Array | string; + getKeybytes_asU8(): Uint8Array; + getKeybytes_asB64(): string; + setKeybytes(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ImportRequest.AsObject; + static toObject(includeInstance: boolean, msg: ImportRequest): ImportRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ImportRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ImportRequest; + static deserializeBinaryFromReader(message: ImportRequest, reader: jspb.BinaryReader): ImportRequest; +} + +export namespace ImportRequest { + export type AsObject = { + passphrase: string, + name: string, + curvetype: string, + keybytes: Uint8Array | string, + } +} + +export class ExportRequest extends jspb.Message { + getPassphrase(): string; + setPassphrase(value: string): void; + + getName(): string; + setName(value: string): void; + + getAddress(): string; + setAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExportRequest.AsObject; + static toObject(includeInstance: boolean, msg: ExportRequest): ExportRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExportRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExportRequest; + static deserializeBinaryFromReader(message: ExportRequest, reader: jspb.BinaryReader): ExportRequest; +} + +export namespace ExportRequest { + export type AsObject = { + passphrase: string, + name: string, + address: string, + } +} + +export class ExportResponse extends jspb.Message { + getPublickey(): Uint8Array | string; + getPublickey_asU8(): Uint8Array; + getPublickey_asB64(): string; + setPublickey(value: Uint8Array | string): void; + + getPrivatekey(): Uint8Array | string; + getPrivatekey_asU8(): Uint8Array; + getPrivatekey_asB64(): string; + setPrivatekey(value: Uint8Array | string): void; + + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getCurvetype(): string; + setCurvetype(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExportResponse.AsObject; + static toObject(includeInstance: boolean, msg: ExportResponse): ExportResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExportResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExportResponse; + static deserializeBinaryFromReader(message: ExportResponse, reader: jspb.BinaryReader): ExportResponse; +} + +export namespace ExportResponse { + export type AsObject = { + publickey: Uint8Array | string, + privatekey: Uint8Array | string, + address: Uint8Array | string, + curvetype: string, + } +} + +export class SignRequest extends jspb.Message { + getPassphrase(): string; + setPassphrase(value: string): void; + + getAddress(): string; + setAddress(value: string): void; + + getName(): string; + setName(value: string): void; + + getMessage(): Uint8Array | string; + getMessage_asU8(): Uint8Array; + getMessage_asB64(): string; + setMessage(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignRequest.AsObject; + static toObject(includeInstance: boolean, msg: SignRequest): SignRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SignRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignRequest; + static deserializeBinaryFromReader(message: SignRequest, reader: jspb.BinaryReader): SignRequest; +} + +export namespace SignRequest { + export type AsObject = { + passphrase: string, + address: string, + name: string, + message: Uint8Array | string, + } +} + +export class SignResponse extends jspb.Message { + hasSignature(): boolean; + clearSignature(): void; + getSignature(): crypto_pb.Signature | undefined; + setSignature(value?: crypto_pb.Signature): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignResponse.AsObject; + static toObject(includeInstance: boolean, msg: SignResponse): SignResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SignResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignResponse; + static deserializeBinaryFromReader(message: SignResponse, reader: jspb.BinaryReader): SignResponse; +} + +export namespace SignResponse { + export type AsObject = { + signature?: crypto_pb.Signature.AsObject, + } +} + +export class VerifyRequest extends jspb.Message { + getPublickey(): Uint8Array | string; + getPublickey_asU8(): Uint8Array; + getPublickey_asB64(): string; + setPublickey(value: Uint8Array | string): void; + + getMessage(): Uint8Array | string; + getMessage_asU8(): Uint8Array; + getMessage_asB64(): string; + setMessage(value: Uint8Array | string): void; + + hasSignature(): boolean; + clearSignature(): void; + getSignature(): crypto_pb.Signature | undefined; + setSignature(value?: crypto_pb.Signature): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VerifyRequest.AsObject; + static toObject(includeInstance: boolean, msg: VerifyRequest): VerifyRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VerifyRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VerifyRequest; + static deserializeBinaryFromReader(message: VerifyRequest, reader: jspb.BinaryReader): VerifyRequest; +} + +export namespace VerifyRequest { + export type AsObject = { + publickey: Uint8Array | string, + message: Uint8Array | string, + signature?: crypto_pb.Signature.AsObject, + } +} + +export class HashRequest extends jspb.Message { + getHashtype(): string; + setHashtype(value: string): void; + + getMessage(): Uint8Array | string; + getMessage_asU8(): Uint8Array; + getMessage_asB64(): string; + setMessage(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HashRequest.AsObject; + static toObject(includeInstance: boolean, msg: HashRequest): HashRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HashRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HashRequest; + static deserializeBinaryFromReader(message: HashRequest, reader: jspb.BinaryReader): HashRequest; +} + +export namespace HashRequest { + export type AsObject = { + hashtype: string, + message: Uint8Array | string, + } +} + +export class HashResponse extends jspb.Message { + getHash(): string; + setHash(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HashResponse.AsObject; + static toObject(includeInstance: boolean, msg: HashResponse): HashResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HashResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HashResponse; + static deserializeBinaryFromReader(message: HashResponse, reader: jspb.BinaryReader): HashResponse; +} + +export namespace HashResponse { + export type AsObject = { + hash: string, + } +} + +export class KeyID extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + clearKeynameList(): void; + getKeynameList(): Array; + setKeynameList(value: Array): void; + addKeyname(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KeyID.AsObject; + static toObject(includeInstance: boolean, msg: KeyID): KeyID.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KeyID, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KeyID; + static deserializeBinaryFromReader(message: KeyID, reader: jspb.BinaryReader): KeyID; +} + +export namespace KeyID { + export type AsObject = { + address: string, + keynameList: Array, + } +} + +export class ListResponse extends jspb.Message { + clearKeyList(): void; + getKeyList(): Array; + setKeyList(value: Array): void; + addKey(value?: KeyID, index?: number): KeyID; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListResponse): ListResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListResponse; + static deserializeBinaryFromReader(message: ListResponse, reader: jspb.BinaryReader): ListResponse; +} + +export namespace ListResponse { + export type AsObject = { + keyList: Array, + } +} + +export class AddNameRequest extends jspb.Message { + getKeyname(): string; + setKeyname(value: string): void; + + getAddress(): string; + setAddress(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddNameRequest.AsObject; + static toObject(includeInstance: boolean, msg: AddNameRequest): AddNameRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddNameRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddNameRequest; + static deserializeBinaryFromReader(message: AddNameRequest, reader: jspb.BinaryReader): AddNameRequest; +} + +export namespace AddNameRequest { + export type AsObject = { + keyname: string, + address: string, + } +} + diff --git a/js/proto/keys_pb.js b/js/proto/keys_pb.js new file mode 100644 index 000000000..6c52fab78 --- /dev/null +++ b/js/proto/keys_pb.js @@ -0,0 +1,4050 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var crypto_pb = require('./crypto_pb.js'); +goog.object.extend(proto, crypto_pb); +goog.exportSymbol('proto.keys.AddNameRequest', null, global); +goog.exportSymbol('proto.keys.AddNameResponse', null, global); +goog.exportSymbol('proto.keys.ExportRequest', null, global); +goog.exportSymbol('proto.keys.ExportResponse', null, global); +goog.exportSymbol('proto.keys.GenRequest', null, global); +goog.exportSymbol('proto.keys.GenResponse', null, global); +goog.exportSymbol('proto.keys.HashRequest', null, global); +goog.exportSymbol('proto.keys.HashResponse', null, global); +goog.exportSymbol('proto.keys.ImportJSONRequest', null, global); +goog.exportSymbol('proto.keys.ImportRequest', null, global); +goog.exportSymbol('proto.keys.ImportResponse', null, global); +goog.exportSymbol('proto.keys.KeyID', null, global); +goog.exportSymbol('proto.keys.ListRequest', null, global); +goog.exportSymbol('proto.keys.ListResponse', null, global); +goog.exportSymbol('proto.keys.PubRequest', null, global); +goog.exportSymbol('proto.keys.PubResponse', null, global); +goog.exportSymbol('proto.keys.RemoveNameRequest', null, global); +goog.exportSymbol('proto.keys.RemoveNameResponse', null, global); +goog.exportSymbol('proto.keys.SignRequest', null, global); +goog.exportSymbol('proto.keys.SignResponse', null, global); +goog.exportSymbol('proto.keys.VerifyRequest', null, global); +goog.exportSymbol('proto.keys.VerifyResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ListRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ListRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ListRequest.displayName = 'proto.keys.ListRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.VerifyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.VerifyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.VerifyResponse.displayName = 'proto.keys.VerifyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.RemoveNameResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.RemoveNameResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.RemoveNameResponse.displayName = 'proto.keys.RemoveNameResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.AddNameResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.AddNameResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.AddNameResponse.displayName = 'proto.keys.AddNameResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.RemoveNameRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.RemoveNameRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.RemoveNameRequest.displayName = 'proto.keys.RemoveNameRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.GenRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.GenRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.GenRequest.displayName = 'proto.keys.GenRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.GenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.GenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.GenResponse.displayName = 'proto.keys.GenResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.PubRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.PubRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.PubRequest.displayName = 'proto.keys.PubRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.PubResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.PubResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.PubResponse.displayName = 'proto.keys.PubResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ImportJSONRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ImportJSONRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ImportJSONRequest.displayName = 'proto.keys.ImportJSONRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ImportResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ImportResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ImportResponse.displayName = 'proto.keys.ImportResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ImportRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ImportRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ImportRequest.displayName = 'proto.keys.ImportRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ExportRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ExportRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ExportRequest.displayName = 'proto.keys.ExportRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ExportResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ExportResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ExportResponse.displayName = 'proto.keys.ExportResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.SignRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.SignRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.SignRequest.displayName = 'proto.keys.SignRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.SignResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.SignResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.SignResponse.displayName = 'proto.keys.SignResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.VerifyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.VerifyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.VerifyRequest.displayName = 'proto.keys.VerifyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.HashRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.HashRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.HashRequest.displayName = 'proto.keys.HashRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.HashResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.HashResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.HashResponse.displayName = 'proto.keys.HashResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.KeyID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.keys.KeyID.repeatedFields_, null); +}; +goog.inherits(proto.keys.KeyID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.KeyID.displayName = 'proto.keys.KeyID'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ListResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.keys.ListResponse.repeatedFields_, null); +}; +goog.inherits(proto.keys.ListResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ListResponse.displayName = 'proto.keys.ListResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.AddNameRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.AddNameRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.AddNameRequest.displayName = 'proto.keys.AddNameRequest'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.ListRequest.prototype.toObject = function(opt_includeInstance) { + return proto.keys.ListRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.ListRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ListRequest.toObject = function(includeInstance, msg) { + var f, obj = { + keyname: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.ListRequest} + */ +proto.keys.ListRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.ListRequest; + return proto.keys.ListRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.ListRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.ListRequest} + */ +proto.keys.ListRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKeyname(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.ListRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.ListRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.ListRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ListRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string KeyName = 1; + * @return {string} + */ +proto.keys.ListRequest.prototype.getKeyname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.ListRequest.prototype.setKeyname = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.VerifyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.keys.VerifyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.VerifyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.VerifyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.VerifyResponse} + */ +proto.keys.VerifyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.VerifyResponse; + return proto.keys.VerifyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.VerifyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.VerifyResponse} + */ +proto.keys.VerifyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.VerifyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.VerifyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.VerifyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.VerifyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.RemoveNameResponse.prototype.toObject = function(opt_includeInstance) { + return proto.keys.RemoveNameResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.RemoveNameResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.RemoveNameResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.RemoveNameResponse} + */ +proto.keys.RemoveNameResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.RemoveNameResponse; + return proto.keys.RemoveNameResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.RemoveNameResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.RemoveNameResponse} + */ +proto.keys.RemoveNameResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.RemoveNameResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.RemoveNameResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.RemoveNameResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.RemoveNameResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.AddNameResponse.prototype.toObject = function(opt_includeInstance) { + return proto.keys.AddNameResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.AddNameResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.AddNameResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.AddNameResponse} + */ +proto.keys.AddNameResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.AddNameResponse; + return proto.keys.AddNameResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.AddNameResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.AddNameResponse} + */ +proto.keys.AddNameResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.AddNameResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.AddNameResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.AddNameResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.AddNameResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.RemoveNameRequest.prototype.toObject = function(opt_includeInstance) { + return proto.keys.RemoveNameRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.RemoveNameRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.RemoveNameRequest.toObject = function(includeInstance, msg) { + var f, obj = { + keyname: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.RemoveNameRequest} + */ +proto.keys.RemoveNameRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.RemoveNameRequest; + return proto.keys.RemoveNameRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.RemoveNameRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.RemoveNameRequest} + */ +proto.keys.RemoveNameRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKeyname(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.RemoveNameRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.RemoveNameRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.RemoveNameRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.RemoveNameRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string KeyName = 1; + * @return {string} + */ +proto.keys.RemoveNameRequest.prototype.getKeyname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.RemoveNameRequest.prototype.setKeyname = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.GenRequest.prototype.toObject = function(opt_includeInstance) { + return proto.keys.GenRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.GenRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.GenRequest.toObject = function(includeInstance, msg) { + var f, obj = { + passphrase: jspb.Message.getFieldWithDefault(msg, 1, ""), + curvetype: jspb.Message.getFieldWithDefault(msg, 2, ""), + keyname: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.GenRequest} + */ +proto.keys.GenRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.GenRequest; + return proto.keys.GenRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.GenRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.GenRequest} + */ +proto.keys.GenRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPassphrase(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCurvetype(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setKeyname(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.GenRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.GenRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.GenRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.GenRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPassphrase(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCurvetype(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getKeyname(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string Passphrase = 1; + * @return {string} + */ +proto.keys.GenRequest.prototype.getPassphrase = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.GenRequest.prototype.setPassphrase = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string CurveType = 2; + * @return {string} + */ +proto.keys.GenRequest.prototype.getCurvetype = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.keys.GenRequest.prototype.setCurvetype = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string KeyName = 3; + * @return {string} + */ +proto.keys.GenRequest.prototype.getKeyname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.keys.GenRequest.prototype.setKeyname = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.GenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.keys.GenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.GenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.GenResponse.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.GenResponse} + */ +proto.keys.GenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.GenResponse; + return proto.keys.GenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.GenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.GenResponse} + */ +proto.keys.GenResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.GenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.GenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.GenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.GenResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string Address = 1; + * @return {string} + */ +proto.keys.GenResponse.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.GenResponse.prototype.setAddress = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.PubRequest.prototype.toObject = function(opt_includeInstance) { + return proto.keys.PubRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.PubRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.PubRequest.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.PubRequest} + */ +proto.keys.PubRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.PubRequest; + return proto.keys.PubRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.PubRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.PubRequest} + */ +proto.keys.PubRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.PubRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.PubRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.PubRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.PubRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string Address = 1; + * @return {string} + */ +proto.keys.PubRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.PubRequest.prototype.setAddress = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string Name = 2; + * @return {string} + */ +proto.keys.PubRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.keys.PubRequest.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.PubResponse.prototype.toObject = function(opt_includeInstance) { + return proto.keys.PubResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.PubResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.PubResponse.toObject = function(includeInstance, msg) { + var f, obj = { + publickey: msg.getPublickey_asB64(), + curvetype: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.PubResponse} + */ +proto.keys.PubResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.PubResponse; + return proto.keys.PubResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.PubResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.PubResponse} + */ +proto.keys.PubResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPublickey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCurvetype(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.PubResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.PubResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.PubResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.PubResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPublickey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getCurvetype(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional bytes PublicKey = 1; + * @return {!(string|Uint8Array)} + */ +proto.keys.PubResponse.prototype.getPublickey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes PublicKey = 1; + * This is a type-conversion wrapper around `getPublickey()` + * @return {string} + */ +proto.keys.PubResponse.prototype.getPublickey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPublickey())); +}; + + +/** + * optional bytes PublicKey = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPublickey()` + * @return {!Uint8Array} + */ +proto.keys.PubResponse.prototype.getPublickey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPublickey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.keys.PubResponse.prototype.setPublickey = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string CurveType = 2; + * @return {string} + */ +proto.keys.PubResponse.prototype.getCurvetype = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.keys.PubResponse.prototype.setCurvetype = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.ImportJSONRequest.prototype.toObject = function(opt_includeInstance) { + return proto.keys.ImportJSONRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.ImportJSONRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ImportJSONRequest.toObject = function(includeInstance, msg) { + var f, obj = { + passphrase: jspb.Message.getFieldWithDefault(msg, 1, ""), + json: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.ImportJSONRequest} + */ +proto.keys.ImportJSONRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.ImportJSONRequest; + return proto.keys.ImportJSONRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.ImportJSONRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.ImportJSONRequest} + */ +proto.keys.ImportJSONRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPassphrase(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setJson(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.ImportJSONRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.ImportJSONRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.ImportJSONRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ImportJSONRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPassphrase(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getJson(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string Passphrase = 1; + * @return {string} + */ +proto.keys.ImportJSONRequest.prototype.getPassphrase = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.ImportJSONRequest.prototype.setPassphrase = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string JSON = 2; + * @return {string} + */ +proto.keys.ImportJSONRequest.prototype.getJson = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.keys.ImportJSONRequest.prototype.setJson = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.ImportResponse.prototype.toObject = function(opt_includeInstance) { + return proto.keys.ImportResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.ImportResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ImportResponse.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.ImportResponse} + */ +proto.keys.ImportResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.ImportResponse; + return proto.keys.ImportResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.ImportResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.ImportResponse} + */ +proto.keys.ImportResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.ImportResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.ImportResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.ImportResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ImportResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string Address = 1; + * @return {string} + */ +proto.keys.ImportResponse.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.ImportResponse.prototype.setAddress = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.ImportRequest.prototype.toObject = function(opt_includeInstance) { + return proto.keys.ImportRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.ImportRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ImportRequest.toObject = function(includeInstance, msg) { + var f, obj = { + passphrase: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + curvetype: jspb.Message.getFieldWithDefault(msg, 3, ""), + keybytes: msg.getKeybytes_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.ImportRequest} + */ +proto.keys.ImportRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.ImportRequest; + return proto.keys.ImportRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.ImportRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.ImportRequest} + */ +proto.keys.ImportRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPassphrase(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCurvetype(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKeybytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.ImportRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.ImportRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.ImportRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ImportRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPassphrase(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCurvetype(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getKeybytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional string Passphrase = 1; + * @return {string} + */ +proto.keys.ImportRequest.prototype.getPassphrase = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.ImportRequest.prototype.setPassphrase = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string Name = 2; + * @return {string} + */ +proto.keys.ImportRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.keys.ImportRequest.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string CurveType = 3; + * @return {string} + */ +proto.keys.ImportRequest.prototype.getCurvetype = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.keys.ImportRequest.prototype.setCurvetype = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bytes KeyBytes = 4; + * @return {!(string|Uint8Array)} + */ +proto.keys.ImportRequest.prototype.getKeybytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes KeyBytes = 4; + * This is a type-conversion wrapper around `getKeybytes()` + * @return {string} + */ +proto.keys.ImportRequest.prototype.getKeybytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKeybytes())); +}; + + +/** + * optional bytes KeyBytes = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKeybytes()` + * @return {!Uint8Array} + */ +proto.keys.ImportRequest.prototype.getKeybytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKeybytes())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.keys.ImportRequest.prototype.setKeybytes = function(value) { + jspb.Message.setProto3BytesField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.ExportRequest.prototype.toObject = function(opt_includeInstance) { + return proto.keys.ExportRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.ExportRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ExportRequest.toObject = function(includeInstance, msg) { + var f, obj = { + passphrase: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + address: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.ExportRequest} + */ +proto.keys.ExportRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.ExportRequest; + return proto.keys.ExportRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.ExportRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.ExportRequest} + */ +proto.keys.ExportRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPassphrase(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.ExportRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.ExportRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.ExportRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ExportRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPassphrase(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string Passphrase = 1; + * @return {string} + */ +proto.keys.ExportRequest.prototype.getPassphrase = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.ExportRequest.prototype.setPassphrase = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string Name = 2; + * @return {string} + */ +proto.keys.ExportRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.keys.ExportRequest.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string Address = 3; + * @return {string} + */ +proto.keys.ExportRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.keys.ExportRequest.prototype.setAddress = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.ExportResponse.prototype.toObject = function(opt_includeInstance) { + return proto.keys.ExportResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.ExportResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ExportResponse.toObject = function(includeInstance, msg) { + var f, obj = { + publickey: msg.getPublickey_asB64(), + privatekey: msg.getPrivatekey_asB64(), + address: msg.getAddress_asB64(), + curvetype: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.ExportResponse} + */ +proto.keys.ExportResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.ExportResponse; + return proto.keys.ExportResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.ExportResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.ExportResponse} + */ +proto.keys.ExportResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPublickey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPrivatekey(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setCurvetype(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.ExportResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.ExportResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.ExportResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ExportResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPublickey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPrivatekey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getCurvetype(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional bytes Publickey = 1; + * @return {!(string|Uint8Array)} + */ +proto.keys.ExportResponse.prototype.getPublickey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Publickey = 1; + * This is a type-conversion wrapper around `getPublickey()` + * @return {string} + */ +proto.keys.ExportResponse.prototype.getPublickey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPublickey())); +}; + + +/** + * optional bytes Publickey = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPublickey()` + * @return {!Uint8Array} + */ +proto.keys.ExportResponse.prototype.getPublickey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPublickey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.keys.ExportResponse.prototype.setPublickey = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes Privatekey = 2; + * @return {!(string|Uint8Array)} + */ +proto.keys.ExportResponse.prototype.getPrivatekey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Privatekey = 2; + * This is a type-conversion wrapper around `getPrivatekey()` + * @return {string} + */ +proto.keys.ExportResponse.prototype.getPrivatekey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPrivatekey())); +}; + + +/** + * optional bytes Privatekey = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPrivatekey()` + * @return {!Uint8Array} + */ +proto.keys.ExportResponse.prototype.getPrivatekey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPrivatekey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.keys.ExportResponse.prototype.setPrivatekey = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes Address = 3; + * @return {!(string|Uint8Array)} + */ +proto.keys.ExportResponse.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes Address = 3; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.keys.ExportResponse.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.keys.ExportResponse.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.keys.ExportResponse.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string CurveType = 4; + * @return {string} + */ +proto.keys.ExportResponse.prototype.getCurvetype = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.keys.ExportResponse.prototype.setCurvetype = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.SignRequest.prototype.toObject = function(opt_includeInstance) { + return proto.keys.SignRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.SignRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.SignRequest.toObject = function(includeInstance, msg) { + var f, obj = { + passphrase: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + message: msg.getMessage_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.SignRequest} + */ +proto.keys.SignRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.SignRequest; + return proto.keys.SignRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.SignRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.SignRequest} + */ +proto.keys.SignRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPassphrase(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.SignRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.SignRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.SignRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.SignRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPassphrase(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMessage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional string Passphrase = 1; + * @return {string} + */ +proto.keys.SignRequest.prototype.getPassphrase = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.SignRequest.prototype.setPassphrase = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string Address = 2; + * @return {string} + */ +proto.keys.SignRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.keys.SignRequest.prototype.setAddress = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string Name = 3; + * @return {string} + */ +proto.keys.SignRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.keys.SignRequest.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bytes Message = 4; + * @return {!(string|Uint8Array)} + */ +proto.keys.SignRequest.prototype.getMessage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes Message = 4; + * This is a type-conversion wrapper around `getMessage()` + * @return {string} + */ +proto.keys.SignRequest.prototype.getMessage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMessage())); +}; + + +/** + * optional bytes Message = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMessage()` + * @return {!Uint8Array} + */ +proto.keys.SignRequest.prototype.getMessage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMessage())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.keys.SignRequest.prototype.setMessage = function(value) { + jspb.Message.setProto3BytesField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.SignResponse.prototype.toObject = function(opt_includeInstance) { + return proto.keys.SignResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.SignResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.SignResponse.toObject = function(includeInstance, msg) { + var f, obj = { + signature: (f = msg.getSignature()) && crypto_pb.Signature.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.SignResponse} + */ +proto.keys.SignResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.SignResponse; + return proto.keys.SignResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.SignResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.SignResponse} + */ +proto.keys.SignResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var value = new crypto_pb.Signature; + reader.readMessage(value,crypto_pb.Signature.deserializeBinaryFromReader); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.SignResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.SignResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.SignResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.SignResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignature(); + if (f != null) { + writer.writeMessage( + 3, + f, + crypto_pb.Signature.serializeBinaryToWriter + ); + } +}; + + +/** + * optional crypto.Signature Signature = 3; + * @return {?proto.crypto.Signature} + */ +proto.keys.SignResponse.prototype.getSignature = function() { + return /** @type{?proto.crypto.Signature} */ ( + jspb.Message.getWrapperField(this, crypto_pb.Signature, 3)); +}; + + +/** @param {?proto.crypto.Signature|undefined} value */ +proto.keys.SignResponse.prototype.setSignature = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.keys.SignResponse.prototype.clearSignature = function() { + this.setSignature(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.keys.SignResponse.prototype.hasSignature = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.VerifyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.keys.VerifyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.VerifyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.VerifyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + publickey: msg.getPublickey_asB64(), + message: msg.getMessage_asB64(), + signature: (f = msg.getSignature()) && crypto_pb.Signature.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.VerifyRequest} + */ +proto.keys.VerifyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.VerifyRequest; + return proto.keys.VerifyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.VerifyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.VerifyRequest} + */ +proto.keys.VerifyRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPublickey(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMessage(value); + break; + case 5: + var value = new crypto_pb.Signature; + reader.readMessage(value,crypto_pb.Signature.deserializeBinaryFromReader); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.VerifyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.VerifyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.VerifyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.VerifyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPublickey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getMessage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getSignature(); + if (f != null) { + writer.writeMessage( + 5, + f, + crypto_pb.Signature.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes PublicKey = 2; + * @return {!(string|Uint8Array)} + */ +proto.keys.VerifyRequest.prototype.getPublickey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes PublicKey = 2; + * This is a type-conversion wrapper around `getPublickey()` + * @return {string} + */ +proto.keys.VerifyRequest.prototype.getPublickey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPublickey())); +}; + + +/** + * optional bytes PublicKey = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPublickey()` + * @return {!Uint8Array} + */ +proto.keys.VerifyRequest.prototype.getPublickey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPublickey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.keys.VerifyRequest.prototype.setPublickey = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes Message = 3; + * @return {!(string|Uint8Array)} + */ +proto.keys.VerifyRequest.prototype.getMessage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes Message = 3; + * This is a type-conversion wrapper around `getMessage()` + * @return {string} + */ +proto.keys.VerifyRequest.prototype.getMessage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMessage())); +}; + + +/** + * optional bytes Message = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMessage()` + * @return {!Uint8Array} + */ +proto.keys.VerifyRequest.prototype.getMessage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMessage())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.keys.VerifyRequest.prototype.setMessage = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional crypto.Signature Signature = 5; + * @return {?proto.crypto.Signature} + */ +proto.keys.VerifyRequest.prototype.getSignature = function() { + return /** @type{?proto.crypto.Signature} */ ( + jspb.Message.getWrapperField(this, crypto_pb.Signature, 5)); +}; + + +/** @param {?proto.crypto.Signature|undefined} value */ +proto.keys.VerifyRequest.prototype.setSignature = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.keys.VerifyRequest.prototype.clearSignature = function() { + this.setSignature(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.keys.VerifyRequest.prototype.hasSignature = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.HashRequest.prototype.toObject = function(opt_includeInstance) { + return proto.keys.HashRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.HashRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.HashRequest.toObject = function(includeInstance, msg) { + var f, obj = { + hashtype: jspb.Message.getFieldWithDefault(msg, 1, ""), + message: msg.getMessage_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.HashRequest} + */ +proto.keys.HashRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.HashRequest; + return proto.keys.HashRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.HashRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.HashRequest} + */ +proto.keys.HashRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setHashtype(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.HashRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.HashRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.HashRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.HashRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHashtype(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMessage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string Hashtype = 1; + * @return {string} + */ +proto.keys.HashRequest.prototype.getHashtype = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.HashRequest.prototype.setHashtype = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes Message = 2; + * @return {!(string|Uint8Array)} + */ +proto.keys.HashRequest.prototype.getMessage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Message = 2; + * This is a type-conversion wrapper around `getMessage()` + * @return {string} + */ +proto.keys.HashRequest.prototype.getMessage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMessage())); +}; + + +/** + * optional bytes Message = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMessage()` + * @return {!Uint8Array} + */ +proto.keys.HashRequest.prototype.getMessage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMessage())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.keys.HashRequest.prototype.setMessage = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.HashResponse.prototype.toObject = function(opt_includeInstance) { + return proto.keys.HashResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.HashResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.HashResponse.toObject = function(includeInstance, msg) { + var f, obj = { + hash: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.HashResponse} + */ +proto.keys.HashResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.HashResponse; + return proto.keys.HashResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.HashResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.HashResponse} + */ +proto.keys.HashResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.HashResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.HashResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.HashResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.HashResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string Hash = 1; + * @return {string} + */ +proto.keys.HashResponse.prototype.getHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.HashResponse.prototype.setHash = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.keys.KeyID.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { + return proto.keys.KeyID.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.KeyID} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.KeyID.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + keynameList: jspb.Message.getRepeatedField(msg, 2) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.KeyID} + */ +proto.keys.KeyID.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.KeyID; + return proto.keys.KeyID.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.KeyID} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.KeyID} + */ +proto.keys.KeyID.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addKeyname(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.KeyID.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.KeyID.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.KeyID} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.KeyID.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKeynameList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string Address = 1; + * @return {string} + */ +proto.keys.KeyID.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.KeyID.prototype.setAddress = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string KeyName = 2; + * @return {!Array} + */ +proto.keys.KeyID.prototype.getKeynameList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** @param {!Array} value */ +proto.keys.KeyID.prototype.setKeynameList = function(value) { + jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.keys.KeyID.prototype.addKeyname = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.keys.KeyID.prototype.clearKeynameList = function() { + this.setKeynameList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.keys.ListResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.ListResponse.prototype.toObject = function(opt_includeInstance) { + return proto.keys.ListResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.ListResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ListResponse.toObject = function(includeInstance, msg) { + var f, obj = { + keyList: jspb.Message.toObjectList(msg.getKeyList(), + proto.keys.KeyID.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.ListResponse} + */ +proto.keys.ListResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.ListResponse; + return proto.keys.ListResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.ListResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.ListResponse} + */ +proto.keys.ListResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.keys.KeyID; + reader.readMessage(value,proto.keys.KeyID.deserializeBinaryFromReader); + msg.addKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.ListResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.ListResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.ListResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.ListResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.keys.KeyID.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated KeyID key = 1; + * @return {!Array} + */ +proto.keys.ListResponse.prototype.getKeyList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.keys.KeyID, 1)); +}; + + +/** @param {!Array} value */ +proto.keys.ListResponse.prototype.setKeyList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.keys.KeyID=} opt_value + * @param {number=} opt_index + * @return {!proto.keys.KeyID} + */ +proto.keys.ListResponse.prototype.addKey = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.keys.KeyID, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.keys.ListResponse.prototype.clearKeyList = function() { + this.setKeyList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.keys.AddNameRequest.prototype.toObject = function(opt_includeInstance) { + return proto.keys.AddNameRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.keys.AddNameRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.AddNameRequest.toObject = function(includeInstance, msg) { + var f, obj = { + keyname: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.keys.AddNameRequest} + */ +proto.keys.AddNameRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.keys.AddNameRequest; + return proto.keys.AddNameRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.keys.AddNameRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.keys.AddNameRequest} + */ +proto.keys.AddNameRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKeyname(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.keys.AddNameRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.keys.AddNameRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.keys.AddNameRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.keys.AddNameRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string Keyname = 1; + * @return {string} + */ +proto.keys.AddNameRequest.prototype.getKeyname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.keys.AddNameRequest.prototype.setKeyname = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string Address = 2; + * @return {string} + */ +proto.keys.AddNameRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.keys.AddNameRequest.prototype.setAddress = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.keys); diff --git a/js/proto/names_grpc_pb.d.ts b/js/proto/names_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/names_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/names_grpc_pb.js b/js/proto/names_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/names_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/names_pb.d.ts b/js/proto/names_pb.d.ts new file mode 100644 index 000000000..b6dadd6cb --- /dev/null +++ b/js/proto/names_pb.d.ts @@ -0,0 +1,40 @@ +// package: names +// file: names.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; + +export class Entry extends jspb.Message { + getName(): string; + setName(value: string): void; + + getOwner(): Uint8Array | string; + getOwner_asU8(): Uint8Array; + getOwner_asB64(): string; + setOwner(value: Uint8Array | string): void; + + getData(): string; + setData(value: string): void; + + getExpires(): number; + setExpires(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Entry.AsObject; + static toObject(includeInstance: boolean, msg: Entry): Entry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Entry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Entry; + static deserializeBinaryFromReader(message: Entry, reader: jspb.BinaryReader): Entry; +} + +export namespace Entry { + export type AsObject = { + name: string, + owner: Uint8Array | string, + data: string, + expires: number, + } +} + diff --git a/js/proto/names_pb.js b/js/proto/names_pb.js new file mode 100644 index 000000000..2e6708c96 --- /dev/null +++ b/js/proto/names_pb.js @@ -0,0 +1,268 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +goog.exportSymbol('proto.names.Entry', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.names.Entry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.names.Entry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.names.Entry.displayName = 'proto.names.Entry'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.names.Entry.prototype.toObject = function(opt_includeInstance) { + return proto.names.Entry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.names.Entry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.names.Entry.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + owner: msg.getOwner_asB64(), + data: jspb.Message.getFieldWithDefault(msg, 3, ""), + expires: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.names.Entry} + */ +proto.names.Entry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.names.Entry; + return proto.names.Entry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.names.Entry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.names.Entry} + */ +proto.names.Entry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOwner(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpires(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.names.Entry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.names.Entry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.names.Entry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.names.Entry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOwner_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getExpires(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional string Name = 1; + * @return {string} + */ +proto.names.Entry.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.names.Entry.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes Owner = 2; + * @return {!(string|Uint8Array)} + */ +proto.names.Entry.prototype.getOwner = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Owner = 2; + * This is a type-conversion wrapper around `getOwner()` + * @return {string} + */ +proto.names.Entry.prototype.getOwner_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOwner())); +}; + + +/** + * optional bytes Owner = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOwner()` + * @return {!Uint8Array} + */ +proto.names.Entry.prototype.getOwner_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOwner())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.names.Entry.prototype.setOwner = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string Data = 3; + * @return {string} + */ +proto.names.Entry.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.names.Entry.prototype.setData = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 Expires = 4; + * @return {number} + */ +proto.names.Entry.prototype.getExpires = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.names.Entry.prototype.setExpires = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +goog.object.extend(exports, proto.names); diff --git a/js/proto/payload_grpc_pb.d.ts b/js/proto/payload_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/payload_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/payload_grpc_pb.js b/js/proto/payload_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/payload_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/payload_pb.d.ts b/js/proto/payload_pb.d.ts new file mode 100644 index 000000000..048fe89a0 --- /dev/null +++ b/js/proto/payload_pb.d.ts @@ -0,0 +1,589 @@ +// package: payload +// file: payload.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as permission_pb from "./permission_pb"; +import * as registry_pb from "./registry_pb"; +import * as spec_pb from "./spec_pb"; + +export class Any extends jspb.Message { + hasCalltx(): boolean; + clearCalltx(): void; + getCalltx(): CallTx | undefined; + setCalltx(value?: CallTx): void; + + hasSendtx(): boolean; + clearSendtx(): void; + getSendtx(): SendTx | undefined; + setSendtx(value?: SendTx): void; + + hasNametx(): boolean; + clearNametx(): void; + getNametx(): NameTx | undefined; + setNametx(value?: NameTx): void; + + hasPermstx(): boolean; + clearPermstx(): void; + getPermstx(): PermsTx | undefined; + setPermstx(value?: PermsTx): void; + + hasGovtx(): boolean; + clearGovtx(): void; + getGovtx(): GovTx | undefined; + setGovtx(value?: GovTx): void; + + hasBondtx(): boolean; + clearBondtx(): void; + getBondtx(): BondTx | undefined; + setBondtx(value?: BondTx): void; + + hasUnbondtx(): boolean; + clearUnbondtx(): void; + getUnbondtx(): UnbondTx | undefined; + setUnbondtx(value?: UnbondTx): void; + + hasBatchtx(): boolean; + clearBatchtx(): void; + getBatchtx(): BatchTx | undefined; + setBatchtx(value?: BatchTx): void; + + hasProposaltx(): boolean; + clearProposaltx(): void; + getProposaltx(): ProposalTx | undefined; + setProposaltx(value?: ProposalTx): void; + + hasIdentifytx(): boolean; + clearIdentifytx(): void; + getIdentifytx(): IdentifyTx | undefined; + setIdentifytx(value?: IdentifyTx): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Any.AsObject; + static toObject(includeInstance: boolean, msg: Any): Any.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Any, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Any; + static deserializeBinaryFromReader(message: Any, reader: jspb.BinaryReader): Any; +} + +export namespace Any { + export type AsObject = { + calltx?: CallTx.AsObject, + sendtx?: SendTx.AsObject, + nametx?: NameTx.AsObject, + permstx?: PermsTx.AsObject, + govtx?: GovTx.AsObject, + bondtx?: BondTx.AsObject, + unbondtx?: UnbondTx.AsObject, + batchtx?: BatchTx.AsObject, + proposaltx?: ProposalTx.AsObject, + identifytx?: IdentifyTx.AsObject, + } +} + +export class TxInput extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getAmount(): number; + setAmount(value: number): void; + + getSequence(): number; + setSequence(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxInput.AsObject; + static toObject(includeInstance: boolean, msg: TxInput): TxInput.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxInput, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxInput; + static deserializeBinaryFromReader(message: TxInput, reader: jspb.BinaryReader): TxInput; +} + +export namespace TxInput { + export type AsObject = { + address: Uint8Array | string, + amount: number, + sequence: number, + } +} + +export class TxOutput extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getAmount(): number; + setAmount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxOutput.AsObject; + static toObject(includeInstance: boolean, msg: TxOutput): TxOutput.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxOutput, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxOutput; + static deserializeBinaryFromReader(message: TxOutput, reader: jspb.BinaryReader): TxOutput; +} + +export namespace TxOutput { + export type AsObject = { + address: Uint8Array | string, + amount: number, + } +} + +export class CallTx extends jspb.Message { + hasInput(): boolean; + clearInput(): void; + getInput(): TxInput | undefined; + setInput(value?: TxInput): void; + + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getGaslimit(): number; + setGaslimit(value: number): void; + + getFee(): number; + setFee(value: number): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + getWasm(): Uint8Array | string; + getWasm_asU8(): Uint8Array; + getWasm_asB64(): string; + setWasm(value: Uint8Array | string): void; + + clearContractmetaList(): void; + getContractmetaList(): Array; + setContractmetaList(value: Array): void; + addContractmeta(value?: ContractMeta, index?: number): ContractMeta; + + getGasprice(): number; + setGasprice(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CallTx.AsObject; + static toObject(includeInstance: boolean, msg: CallTx): CallTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CallTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CallTx; + static deserializeBinaryFromReader(message: CallTx, reader: jspb.BinaryReader): CallTx; +} + +export namespace CallTx { + export type AsObject = { + input?: TxInput.AsObject, + address: Uint8Array | string, + gaslimit: number, + fee: number, + data: Uint8Array | string, + wasm: Uint8Array | string, + contractmetaList: Array, + gasprice: number, + } +} + +export class ContractMeta extends jspb.Message { + getCodehash(): Uint8Array | string; + getCodehash_asU8(): Uint8Array; + getCodehash_asB64(): string; + setCodehash(value: Uint8Array | string): void; + + getMeta(): string; + setMeta(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractMeta.AsObject; + static toObject(includeInstance: boolean, msg: ContractMeta): ContractMeta.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractMeta, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractMeta; + static deserializeBinaryFromReader(message: ContractMeta, reader: jspb.BinaryReader): ContractMeta; +} + +export namespace ContractMeta { + export type AsObject = { + codehash: Uint8Array | string, + meta: string, + } +} + +export class SendTx extends jspb.Message { + clearInputsList(): void; + getInputsList(): Array; + setInputsList(value: Array): void; + addInputs(value?: TxInput, index?: number): TxInput; + + clearOutputsList(): void; + getOutputsList(): Array; + setOutputsList(value: Array): void; + addOutputs(value?: TxOutput, index?: number): TxOutput; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendTx.AsObject; + static toObject(includeInstance: boolean, msg: SendTx): SendTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SendTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SendTx; + static deserializeBinaryFromReader(message: SendTx, reader: jspb.BinaryReader): SendTx; +} + +export namespace SendTx { + export type AsObject = { + inputsList: Array, + outputsList: Array, + } +} + +export class PermsTx extends jspb.Message { + hasInput(): boolean; + clearInput(): void; + getInput(): TxInput | undefined; + setInput(value?: TxInput): void; + + hasPermargs(): boolean; + clearPermargs(): void; + getPermargs(): permission_pb.PermArgs | undefined; + setPermargs(value?: permission_pb.PermArgs): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PermsTx.AsObject; + static toObject(includeInstance: boolean, msg: PermsTx): PermsTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PermsTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PermsTx; + static deserializeBinaryFromReader(message: PermsTx, reader: jspb.BinaryReader): PermsTx; +} + +export namespace PermsTx { + export type AsObject = { + input?: TxInput.AsObject, + permargs?: permission_pb.PermArgs.AsObject, + } +} + +export class NameTx extends jspb.Message { + hasInput(): boolean; + clearInput(): void; + getInput(): TxInput | undefined; + setInput(value?: TxInput): void; + + getName(): string; + setName(value: string): void; + + getData(): string; + setData(value: string): void; + + getFee(): number; + setFee(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NameTx.AsObject; + static toObject(includeInstance: boolean, msg: NameTx): NameTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NameTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NameTx; + static deserializeBinaryFromReader(message: NameTx, reader: jspb.BinaryReader): NameTx; +} + +export namespace NameTx { + export type AsObject = { + input?: TxInput.AsObject, + name: string, + data: string, + fee: number, + } +} + +export class BondTx extends jspb.Message { + hasInput(): boolean; + clearInput(): void; + getInput(): TxInput | undefined; + setInput(value?: TxInput): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BondTx.AsObject; + static toObject(includeInstance: boolean, msg: BondTx): BondTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BondTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BondTx; + static deserializeBinaryFromReader(message: BondTx, reader: jspb.BinaryReader): BondTx; +} + +export namespace BondTx { + export type AsObject = { + input?: TxInput.AsObject, + } +} + +export class UnbondTx extends jspb.Message { + hasInput(): boolean; + clearInput(): void; + getInput(): TxInput | undefined; + setInput(value?: TxInput): void; + + hasOutput(): boolean; + clearOutput(): void; + getOutput(): TxOutput | undefined; + setOutput(value?: TxOutput): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UnbondTx.AsObject; + static toObject(includeInstance: boolean, msg: UnbondTx): UnbondTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UnbondTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UnbondTx; + static deserializeBinaryFromReader(message: UnbondTx, reader: jspb.BinaryReader): UnbondTx; +} + +export namespace UnbondTx { + export type AsObject = { + input?: TxInput.AsObject, + output?: TxOutput.AsObject, + } +} + +export class GovTx extends jspb.Message { + clearInputsList(): void; + getInputsList(): Array; + setInputsList(value: Array): void; + addInputs(value?: TxInput, index?: number): TxInput; + + clearAccountupdatesList(): void; + getAccountupdatesList(): Array; + setAccountupdatesList(value: Array): void; + addAccountupdates(value?: spec_pb.TemplateAccount, index?: number): spec_pb.TemplateAccount; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GovTx.AsObject; + static toObject(includeInstance: boolean, msg: GovTx): GovTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GovTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GovTx; + static deserializeBinaryFromReader(message: GovTx, reader: jspb.BinaryReader): GovTx; +} + +export namespace GovTx { + export type AsObject = { + inputsList: Array, + accountupdatesList: Array, + } +} + +export class ProposalTx extends jspb.Message { + hasInput(): boolean; + clearInput(): void; + getInput(): TxInput | undefined; + setInput(value?: TxInput): void; + + getVotingweight(): number; + setVotingweight(value: number): void; + + getProposalhash(): Uint8Array | string; + getProposalhash_asU8(): Uint8Array; + getProposalhash_asB64(): string; + setProposalhash(value: Uint8Array | string): void; + + hasProposal(): boolean; + clearProposal(): void; + getProposal(): Proposal | undefined; + setProposal(value?: Proposal): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProposalTx.AsObject; + static toObject(includeInstance: boolean, msg: ProposalTx): ProposalTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProposalTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProposalTx; + static deserializeBinaryFromReader(message: ProposalTx, reader: jspb.BinaryReader): ProposalTx; +} + +export namespace ProposalTx { + export type AsObject = { + input?: TxInput.AsObject, + votingweight: number, + proposalhash: Uint8Array | string, + proposal?: Proposal.AsObject, + } +} + +export class IdentifyTx extends jspb.Message { + clearInputsList(): void; + getInputsList(): Array; + setInputsList(value: Array): void; + addInputs(value?: TxInput, index?: number): TxInput; + + hasNode(): boolean; + clearNode(): void; + getNode(): registry_pb.NodeIdentity | undefined; + setNode(value?: registry_pb.NodeIdentity): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentifyTx.AsObject; + static toObject(includeInstance: boolean, msg: IdentifyTx): IdentifyTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentifyTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentifyTx; + static deserializeBinaryFromReader(message: IdentifyTx, reader: jspb.BinaryReader): IdentifyTx; +} + +export namespace IdentifyTx { + export type AsObject = { + inputsList: Array, + node?: registry_pb.NodeIdentity.AsObject, + } +} + +export class BatchTx extends jspb.Message { + clearInputsList(): void; + getInputsList(): Array; + setInputsList(value: Array): void; + addInputs(value?: TxInput, index?: number): TxInput; + + clearTxsList(): void; + getTxsList(): Array; + setTxsList(value: Array): void; + addTxs(value?: Any, index?: number): Any; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BatchTx.AsObject; + static toObject(includeInstance: boolean, msg: BatchTx): BatchTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BatchTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BatchTx; + static deserializeBinaryFromReader(message: BatchTx, reader: jspb.BinaryReader): BatchTx; +} + +export namespace BatchTx { + export type AsObject = { + inputsList: Array, + txsList: Array, + } +} + +export class Vote extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getVotingweight(): number; + setVotingweight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Vote.AsObject; + static toObject(includeInstance: boolean, msg: Vote): Vote.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Vote, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Vote; + static deserializeBinaryFromReader(message: Vote, reader: jspb.BinaryReader): Vote; +} + +export namespace Vote { + export type AsObject = { + address: Uint8Array | string, + votingweight: number, + } +} + +export class Proposal extends jspb.Message { + getName(): string; + setName(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + hasBatchtx(): boolean; + clearBatchtx(): void; + getBatchtx(): BatchTx | undefined; + setBatchtx(value?: BatchTx): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Proposal.AsObject; + static toObject(includeInstance: boolean, msg: Proposal): Proposal.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Proposal, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Proposal; + static deserializeBinaryFromReader(message: Proposal, reader: jspb.BinaryReader): Proposal; +} + +export namespace Proposal { + export type AsObject = { + name: string, + description: string, + batchtx?: BatchTx.AsObject, + } +} + +export class Ballot extends jspb.Message { + hasProposal(): boolean; + clearProposal(): void; + getProposal(): Proposal | undefined; + setProposal(value?: Proposal): void; + + getFinalizingtx(): Uint8Array | string; + getFinalizingtx_asU8(): Uint8Array; + getFinalizingtx_asB64(): string; + setFinalizingtx(value: Uint8Array | string): void; + + getProposalstate(): Ballot.ProposalStateMap[keyof Ballot.ProposalStateMap]; + setProposalstate(value: Ballot.ProposalStateMap[keyof Ballot.ProposalStateMap]): void; + + clearVotesList(): void; + getVotesList(): Array; + setVotesList(value: Array): void; + addVotes(value?: Vote, index?: number): Vote; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Ballot.AsObject; + static toObject(includeInstance: boolean, msg: Ballot): Ballot.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Ballot, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Ballot; + static deserializeBinaryFromReader(message: Ballot, reader: jspb.BinaryReader): Ballot; +} + +export namespace Ballot { + export type AsObject = { + proposal?: Proposal.AsObject, + finalizingtx: Uint8Array | string, + proposalstate: Ballot.ProposalStateMap[keyof Ballot.ProposalStateMap], + votesList: Array, + } + + export interface ProposalStateMap { + PROPOSED: 0; + EXECUTED: 1; + FAILED: 2; + } + + export const ProposalState: ProposalStateMap; +} + diff --git a/js/proto/payload_pb.js b/js/proto/payload_pb.js new file mode 100644 index 000000000..0db942d9e --- /dev/null +++ b/js/proto/payload_pb.js @@ -0,0 +1,4453 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var permission_pb = require('./permission_pb.js'); +goog.object.extend(proto, permission_pb); +var registry_pb = require('./registry_pb.js'); +goog.object.extend(proto, registry_pb); +var spec_pb = require('./spec_pb.js'); +goog.object.extend(proto, spec_pb); +goog.exportSymbol('proto.payload.Any', null, global); +goog.exportSymbol('proto.payload.Ballot', null, global); +goog.exportSymbol('proto.payload.Ballot.ProposalState', null, global); +goog.exportSymbol('proto.payload.BatchTx', null, global); +goog.exportSymbol('proto.payload.BondTx', null, global); +goog.exportSymbol('proto.payload.CallTx', null, global); +goog.exportSymbol('proto.payload.ContractMeta', null, global); +goog.exportSymbol('proto.payload.GovTx', null, global); +goog.exportSymbol('proto.payload.IdentifyTx', null, global); +goog.exportSymbol('proto.payload.NameTx', null, global); +goog.exportSymbol('proto.payload.PermsTx', null, global); +goog.exportSymbol('proto.payload.Proposal', null, global); +goog.exportSymbol('proto.payload.ProposalTx', null, global); +goog.exportSymbol('proto.payload.SendTx', null, global); +goog.exportSymbol('proto.payload.TxInput', null, global); +goog.exportSymbol('proto.payload.TxOutput', null, global); +goog.exportSymbol('proto.payload.UnbondTx', null, global); +goog.exportSymbol('proto.payload.Vote', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.Any = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.Any, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.Any.displayName = 'proto.payload.Any'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.TxInput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.TxInput, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.TxInput.displayName = 'proto.payload.TxInput'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.TxOutput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.TxOutput, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.TxOutput.displayName = 'proto.payload.TxOutput'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.CallTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.CallTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.CallTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.CallTx.displayName = 'proto.payload.CallTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.ContractMeta = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.ContractMeta, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.ContractMeta.displayName = 'proto.payload.ContractMeta'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.SendTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.SendTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.SendTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.SendTx.displayName = 'proto.payload.SendTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.PermsTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.PermsTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.PermsTx.displayName = 'proto.payload.PermsTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.NameTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.NameTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.NameTx.displayName = 'proto.payload.NameTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.BondTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.BondTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.BondTx.displayName = 'proto.payload.BondTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.UnbondTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.UnbondTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.UnbondTx.displayName = 'proto.payload.UnbondTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.GovTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.GovTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.GovTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.GovTx.displayName = 'proto.payload.GovTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.ProposalTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.ProposalTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.ProposalTx.displayName = 'proto.payload.ProposalTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.IdentifyTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.IdentifyTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.IdentifyTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.IdentifyTx.displayName = 'proto.payload.IdentifyTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.BatchTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.BatchTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.BatchTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.BatchTx.displayName = 'proto.payload.BatchTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.Vote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.Vote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.Vote.displayName = 'proto.payload.Vote'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.Proposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.Proposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.Proposal.displayName = 'proto.payload.Proposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.Ballot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.Ballot.repeatedFields_, null); +}; +goog.inherits(proto.payload.Ballot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.Ballot.displayName = 'proto.payload.Ballot'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.Any.prototype.toObject = function(opt_includeInstance) { + return proto.payload.Any.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.Any} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.Any.toObject = function(includeInstance, msg) { + var f, obj = { + calltx: (f = msg.getCalltx()) && proto.payload.CallTx.toObject(includeInstance, f), + sendtx: (f = msg.getSendtx()) && proto.payload.SendTx.toObject(includeInstance, f), + nametx: (f = msg.getNametx()) && proto.payload.NameTx.toObject(includeInstance, f), + permstx: (f = msg.getPermstx()) && proto.payload.PermsTx.toObject(includeInstance, f), + govtx: (f = msg.getGovtx()) && proto.payload.GovTx.toObject(includeInstance, f), + bondtx: (f = msg.getBondtx()) && proto.payload.BondTx.toObject(includeInstance, f), + unbondtx: (f = msg.getUnbondtx()) && proto.payload.UnbondTx.toObject(includeInstance, f), + batchtx: (f = msg.getBatchtx()) && proto.payload.BatchTx.toObject(includeInstance, f), + proposaltx: (f = msg.getProposaltx()) && proto.payload.ProposalTx.toObject(includeInstance, f), + identifytx: (f = msg.getIdentifytx()) && proto.payload.IdentifyTx.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.Any} + */ +proto.payload.Any.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.Any; + return proto.payload.Any.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.Any} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.Any} + */ +proto.payload.Any.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.payload.CallTx; + reader.readMessage(value,proto.payload.CallTx.deserializeBinaryFromReader); + msg.setCalltx(value); + break; + case 2: + var value = new proto.payload.SendTx; + reader.readMessage(value,proto.payload.SendTx.deserializeBinaryFromReader); + msg.setSendtx(value); + break; + case 3: + var value = new proto.payload.NameTx; + reader.readMessage(value,proto.payload.NameTx.deserializeBinaryFromReader); + msg.setNametx(value); + break; + case 4: + var value = new proto.payload.PermsTx; + reader.readMessage(value,proto.payload.PermsTx.deserializeBinaryFromReader); + msg.setPermstx(value); + break; + case 5: + var value = new proto.payload.GovTx; + reader.readMessage(value,proto.payload.GovTx.deserializeBinaryFromReader); + msg.setGovtx(value); + break; + case 6: + var value = new proto.payload.BondTx; + reader.readMessage(value,proto.payload.BondTx.deserializeBinaryFromReader); + msg.setBondtx(value); + break; + case 7: + var value = new proto.payload.UnbondTx; + reader.readMessage(value,proto.payload.UnbondTx.deserializeBinaryFromReader); + msg.setUnbondtx(value); + break; + case 8: + var value = new proto.payload.BatchTx; + reader.readMessage(value,proto.payload.BatchTx.deserializeBinaryFromReader); + msg.setBatchtx(value); + break; + case 9: + var value = new proto.payload.ProposalTx; + reader.readMessage(value,proto.payload.ProposalTx.deserializeBinaryFromReader); + msg.setProposaltx(value); + break; + case 10: + var value = new proto.payload.IdentifyTx; + reader.readMessage(value,proto.payload.IdentifyTx.deserializeBinaryFromReader); + msg.setIdentifytx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.Any.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.Any.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.Any} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.Any.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCalltx(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.payload.CallTx.serializeBinaryToWriter + ); + } + f = message.getSendtx(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.payload.SendTx.serializeBinaryToWriter + ); + } + f = message.getNametx(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.payload.NameTx.serializeBinaryToWriter + ); + } + f = message.getPermstx(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.payload.PermsTx.serializeBinaryToWriter + ); + } + f = message.getGovtx(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.payload.GovTx.serializeBinaryToWriter + ); + } + f = message.getBondtx(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.payload.BondTx.serializeBinaryToWriter + ); + } + f = message.getUnbondtx(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.payload.UnbondTx.serializeBinaryToWriter + ); + } + f = message.getBatchtx(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.payload.BatchTx.serializeBinaryToWriter + ); + } + f = message.getProposaltx(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.payload.ProposalTx.serializeBinaryToWriter + ); + } + f = message.getIdentifytx(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.payload.IdentifyTx.serializeBinaryToWriter + ); + } +}; + + +/** + * optional CallTx CallTx = 1; + * @return {?proto.payload.CallTx} + */ +proto.payload.Any.prototype.getCalltx = function() { + return /** @type{?proto.payload.CallTx} */ ( + jspb.Message.getWrapperField(this, proto.payload.CallTx, 1)); +}; + + +/** @param {?proto.payload.CallTx|undefined} value */ +proto.payload.Any.prototype.setCalltx = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.Any.prototype.clearCalltx = function() { + this.setCalltx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.Any.prototype.hasCalltx = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional SendTx SendTx = 2; + * @return {?proto.payload.SendTx} + */ +proto.payload.Any.prototype.getSendtx = function() { + return /** @type{?proto.payload.SendTx} */ ( + jspb.Message.getWrapperField(this, proto.payload.SendTx, 2)); +}; + + +/** @param {?proto.payload.SendTx|undefined} value */ +proto.payload.Any.prototype.setSendtx = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.Any.prototype.clearSendtx = function() { + this.setSendtx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.Any.prototype.hasSendtx = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional NameTx NameTx = 3; + * @return {?proto.payload.NameTx} + */ +proto.payload.Any.prototype.getNametx = function() { + return /** @type{?proto.payload.NameTx} */ ( + jspb.Message.getWrapperField(this, proto.payload.NameTx, 3)); +}; + + +/** @param {?proto.payload.NameTx|undefined} value */ +proto.payload.Any.prototype.setNametx = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.Any.prototype.clearNametx = function() { + this.setNametx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.Any.prototype.hasNametx = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional PermsTx PermsTx = 4; + * @return {?proto.payload.PermsTx} + */ +proto.payload.Any.prototype.getPermstx = function() { + return /** @type{?proto.payload.PermsTx} */ ( + jspb.Message.getWrapperField(this, proto.payload.PermsTx, 4)); +}; + + +/** @param {?proto.payload.PermsTx|undefined} value */ +proto.payload.Any.prototype.setPermstx = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.Any.prototype.clearPermstx = function() { + this.setPermstx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.Any.prototype.hasPermstx = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional GovTx GovTx = 5; + * @return {?proto.payload.GovTx} + */ +proto.payload.Any.prototype.getGovtx = function() { + return /** @type{?proto.payload.GovTx} */ ( + jspb.Message.getWrapperField(this, proto.payload.GovTx, 5)); +}; + + +/** @param {?proto.payload.GovTx|undefined} value */ +proto.payload.Any.prototype.setGovtx = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.Any.prototype.clearGovtx = function() { + this.setGovtx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.Any.prototype.hasGovtx = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional BondTx BondTx = 6; + * @return {?proto.payload.BondTx} + */ +proto.payload.Any.prototype.getBondtx = function() { + return /** @type{?proto.payload.BondTx} */ ( + jspb.Message.getWrapperField(this, proto.payload.BondTx, 6)); +}; + + +/** @param {?proto.payload.BondTx|undefined} value */ +proto.payload.Any.prototype.setBondtx = function(value) { + jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.Any.prototype.clearBondtx = function() { + this.setBondtx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.Any.prototype.hasBondtx = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional UnbondTx UnbondTx = 7; + * @return {?proto.payload.UnbondTx} + */ +proto.payload.Any.prototype.getUnbondtx = function() { + return /** @type{?proto.payload.UnbondTx} */ ( + jspb.Message.getWrapperField(this, proto.payload.UnbondTx, 7)); +}; + + +/** @param {?proto.payload.UnbondTx|undefined} value */ +proto.payload.Any.prototype.setUnbondtx = function(value) { + jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.Any.prototype.clearUnbondtx = function() { + this.setUnbondtx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.Any.prototype.hasUnbondtx = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional BatchTx BatchTx = 8; + * @return {?proto.payload.BatchTx} + */ +proto.payload.Any.prototype.getBatchtx = function() { + return /** @type{?proto.payload.BatchTx} */ ( + jspb.Message.getWrapperField(this, proto.payload.BatchTx, 8)); +}; + + +/** @param {?proto.payload.BatchTx|undefined} value */ +proto.payload.Any.prototype.setBatchtx = function(value) { + jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.Any.prototype.clearBatchtx = function() { + this.setBatchtx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.Any.prototype.hasBatchtx = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional ProposalTx ProposalTx = 9; + * @return {?proto.payload.ProposalTx} + */ +proto.payload.Any.prototype.getProposaltx = function() { + return /** @type{?proto.payload.ProposalTx} */ ( + jspb.Message.getWrapperField(this, proto.payload.ProposalTx, 9)); +}; + + +/** @param {?proto.payload.ProposalTx|undefined} value */ +proto.payload.Any.prototype.setProposaltx = function(value) { + jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.Any.prototype.clearProposaltx = function() { + this.setProposaltx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.Any.prototype.hasProposaltx = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional IdentifyTx IdentifyTx = 10; + * @return {?proto.payload.IdentifyTx} + */ +proto.payload.Any.prototype.getIdentifytx = function() { + return /** @type{?proto.payload.IdentifyTx} */ ( + jspb.Message.getWrapperField(this, proto.payload.IdentifyTx, 10)); +}; + + +/** @param {?proto.payload.IdentifyTx|undefined} value */ +proto.payload.Any.prototype.setIdentifytx = function(value) { + jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.Any.prototype.clearIdentifytx = function() { + this.setIdentifytx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.Any.prototype.hasIdentifytx = function() { + return jspb.Message.getField(this, 10) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.TxInput.prototype.toObject = function(opt_includeInstance) { + return proto.payload.TxInput.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.TxInput} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.TxInput.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + sequence: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.TxInput} + */ +proto.payload.TxInput.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.TxInput; + return proto.payload.TxInput.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.TxInput} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.TxInput} + */ +proto.payload.TxInput.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSequence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.TxInput.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.TxInput.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.TxInput} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.TxInput.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.payload.TxInput.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.payload.TxInput.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.payload.TxInput.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.payload.TxInput.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 Amount = 2; + * @return {number} + */ +proto.payload.TxInput.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.payload.TxInput.prototype.setAmount = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 Sequence = 3; + * @return {number} + */ +proto.payload.TxInput.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.payload.TxInput.prototype.setSequence = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.TxOutput.prototype.toObject = function(opt_includeInstance) { + return proto.payload.TxOutput.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.TxOutput} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.TxOutput.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.TxOutput} + */ +proto.payload.TxOutput.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.TxOutput; + return proto.payload.TxOutput.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.TxOutput} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.TxOutput} + */ +proto.payload.TxOutput.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.TxOutput.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.TxOutput.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.TxOutput} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.TxOutput.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.payload.TxOutput.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.payload.TxOutput.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.payload.TxOutput.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.payload.TxOutput.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 Amount = 2; + * @return {number} + */ +proto.payload.TxOutput.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.payload.TxOutput.prototype.setAmount = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.payload.CallTx.repeatedFields_ = [7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.CallTx.prototype.toObject = function(opt_includeInstance) { + return proto.payload.CallTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.CallTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.CallTx.toObject = function(includeInstance, msg) { + var f, obj = { + input: (f = msg.getInput()) && proto.payload.TxInput.toObject(includeInstance, f), + address: msg.getAddress_asB64(), + gaslimit: jspb.Message.getFieldWithDefault(msg, 3, 0), + fee: jspb.Message.getFieldWithDefault(msg, 4, 0), + data: msg.getData_asB64(), + wasm: msg.getWasm_asB64(), + contractmetaList: jspb.Message.toObjectList(msg.getContractmetaList(), + proto.payload.ContractMeta.toObject, includeInstance), + gasprice: jspb.Message.getFieldWithDefault(msg, 8, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.CallTx} + */ +proto.payload.CallTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.CallTx; + return proto.payload.CallTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.CallTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.CallTx} + */ +proto.payload.CallTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.payload.TxInput; + reader.readMessage(value,proto.payload.TxInput.deserializeBinaryFromReader); + msg.setInput(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGaslimit(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFee(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWasm(value); + break; + case 7: + var value = new proto.payload.ContractMeta; + reader.readMessage(value,proto.payload.ContractMeta.deserializeBinaryFromReader); + msg.addContractmeta(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGasprice(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.CallTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.CallTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.CallTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.CallTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInput(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.payload.TxInput.serializeBinaryToWriter + ); + } + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getGaslimit(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getWasm_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getContractmetaList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.payload.ContractMeta.serializeBinaryToWriter + ); + } + f = message.getGasprice(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } +}; + + +/** + * optional TxInput Input = 1; + * @return {?proto.payload.TxInput} + */ +proto.payload.CallTx.prototype.getInput = function() { + return /** @type{?proto.payload.TxInput} */ ( + jspb.Message.getWrapperField(this, proto.payload.TxInput, 1)); +}; + + +/** @param {?proto.payload.TxInput|undefined} value */ +proto.payload.CallTx.prototype.setInput = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.CallTx.prototype.clearInput = function() { + this.setInput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.CallTx.prototype.hasInput = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes Address = 2; + * @return {!(string|Uint8Array)} + */ +proto.payload.CallTx.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Address = 2; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.payload.CallTx.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.payload.CallTx.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.payload.CallTx.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional uint64 GasLimit = 3; + * @return {number} + */ +proto.payload.CallTx.prototype.getGaslimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.payload.CallTx.prototype.setGaslimit = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 Fee = 4; + * @return {number} + */ +proto.payload.CallTx.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.payload.CallTx.prototype.setFee = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes Data = 5; + * @return {!(string|Uint8Array)} + */ +proto.payload.CallTx.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes Data = 5; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.payload.CallTx.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes Data = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.payload.CallTx.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.payload.CallTx.prototype.setData = function(value) { + jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional bytes WASM = 6; + * @return {!(string|Uint8Array)} + */ +proto.payload.CallTx.prototype.getWasm = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes WASM = 6; + * This is a type-conversion wrapper around `getWasm()` + * @return {string} + */ +proto.payload.CallTx.prototype.getWasm_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getWasm())); +}; + + +/** + * optional bytes WASM = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getWasm()` + * @return {!Uint8Array} + */ +proto.payload.CallTx.prototype.getWasm_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getWasm())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.payload.CallTx.prototype.setWasm = function(value) { + jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * repeated ContractMeta ContractMeta = 7; + * @return {!Array} + */ +proto.payload.CallTx.prototype.getContractmetaList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.payload.ContractMeta, 7)); +}; + + +/** @param {!Array} value */ +proto.payload.CallTx.prototype.setContractmetaList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.payload.ContractMeta=} opt_value + * @param {number=} opt_index + * @return {!proto.payload.ContractMeta} + */ +proto.payload.CallTx.prototype.addContractmeta = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.payload.ContractMeta, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.payload.CallTx.prototype.clearContractmetaList = function() { + this.setContractmetaList([]); +}; + + +/** + * optional uint64 GasPrice = 8; + * @return {number} + */ +proto.payload.CallTx.prototype.getGasprice = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.payload.CallTx.prototype.setGasprice = function(value) { + jspb.Message.setProto3IntField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.ContractMeta.prototype.toObject = function(opt_includeInstance) { + return proto.payload.ContractMeta.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.ContractMeta} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.ContractMeta.toObject = function(includeInstance, msg) { + var f, obj = { + codehash: msg.getCodehash_asB64(), + meta: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.ContractMeta} + */ +proto.payload.ContractMeta.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.ContractMeta; + return proto.payload.ContractMeta.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.ContractMeta} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.ContractMeta} + */ +proto.payload.ContractMeta.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCodehash(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMeta(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.ContractMeta.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.ContractMeta.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.ContractMeta} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.ContractMeta.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCodehash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getMeta(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional bytes CodeHash = 1; + * @return {!(string|Uint8Array)} + */ +proto.payload.ContractMeta.prototype.getCodehash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes CodeHash = 1; + * This is a type-conversion wrapper around `getCodehash()` + * @return {string} + */ +proto.payload.ContractMeta.prototype.getCodehash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCodehash())); +}; + + +/** + * optional bytes CodeHash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCodehash()` + * @return {!Uint8Array} + */ +proto.payload.ContractMeta.prototype.getCodehash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCodehash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.payload.ContractMeta.prototype.setCodehash = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string Meta = 2; + * @return {string} + */ +proto.payload.ContractMeta.prototype.getMeta = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.payload.ContractMeta.prototype.setMeta = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.payload.SendTx.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.SendTx.prototype.toObject = function(opt_includeInstance) { + return proto.payload.SendTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.SendTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.SendTx.toObject = function(includeInstance, msg) { + var f, obj = { + inputsList: jspb.Message.toObjectList(msg.getInputsList(), + proto.payload.TxInput.toObject, includeInstance), + outputsList: jspb.Message.toObjectList(msg.getOutputsList(), + proto.payload.TxOutput.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.SendTx} + */ +proto.payload.SendTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.SendTx; + return proto.payload.SendTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.SendTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.SendTx} + */ +proto.payload.SendTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.payload.TxInput; + reader.readMessage(value,proto.payload.TxInput.deserializeBinaryFromReader); + msg.addInputs(value); + break; + case 2: + var value = new proto.payload.TxOutput; + reader.readMessage(value,proto.payload.TxOutput.deserializeBinaryFromReader); + msg.addOutputs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.SendTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.SendTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.SendTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.SendTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.payload.TxInput.serializeBinaryToWriter + ); + } + f = message.getOutputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.payload.TxOutput.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TxInput Inputs = 1; + * @return {!Array} + */ +proto.payload.SendTx.prototype.getInputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.payload.TxInput, 1)); +}; + + +/** @param {!Array} value */ +proto.payload.SendTx.prototype.setInputsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.payload.TxInput=} opt_value + * @param {number=} opt_index + * @return {!proto.payload.TxInput} + */ +proto.payload.SendTx.prototype.addInputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.TxInput, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.payload.SendTx.prototype.clearInputsList = function() { + this.setInputsList([]); +}; + + +/** + * repeated TxOutput Outputs = 2; + * @return {!Array} + */ +proto.payload.SendTx.prototype.getOutputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.payload.TxOutput, 2)); +}; + + +/** @param {!Array} value */ +proto.payload.SendTx.prototype.setOutputsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.payload.TxOutput=} opt_value + * @param {number=} opt_index + * @return {!proto.payload.TxOutput} + */ +proto.payload.SendTx.prototype.addOutputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.payload.TxOutput, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.payload.SendTx.prototype.clearOutputsList = function() { + this.setOutputsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.PermsTx.prototype.toObject = function(opt_includeInstance) { + return proto.payload.PermsTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.PermsTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.PermsTx.toObject = function(includeInstance, msg) { + var f, obj = { + input: (f = msg.getInput()) && proto.payload.TxInput.toObject(includeInstance, f), + permargs: (f = msg.getPermargs()) && permission_pb.PermArgs.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.PermsTx} + */ +proto.payload.PermsTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.PermsTx; + return proto.payload.PermsTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.PermsTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.PermsTx} + */ +proto.payload.PermsTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.payload.TxInput; + reader.readMessage(value,proto.payload.TxInput.deserializeBinaryFromReader); + msg.setInput(value); + break; + case 2: + var value = new permission_pb.PermArgs; + reader.readMessage(value,permission_pb.PermArgs.deserializeBinaryFromReader); + msg.setPermargs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.PermsTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.PermsTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.PermsTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.PermsTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInput(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.payload.TxInput.serializeBinaryToWriter + ); + } + f = message.getPermargs(); + if (f != null) { + writer.writeMessage( + 2, + f, + permission_pb.PermArgs.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TxInput Input = 1; + * @return {?proto.payload.TxInput} + */ +proto.payload.PermsTx.prototype.getInput = function() { + return /** @type{?proto.payload.TxInput} */ ( + jspb.Message.getWrapperField(this, proto.payload.TxInput, 1)); +}; + + +/** @param {?proto.payload.TxInput|undefined} value */ +proto.payload.PermsTx.prototype.setInput = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.PermsTx.prototype.clearInput = function() { + this.setInput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.PermsTx.prototype.hasInput = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional permission.PermArgs PermArgs = 2; + * @return {?proto.permission.PermArgs} + */ +proto.payload.PermsTx.prototype.getPermargs = function() { + return /** @type{?proto.permission.PermArgs} */ ( + jspb.Message.getWrapperField(this, permission_pb.PermArgs, 2)); +}; + + +/** @param {?proto.permission.PermArgs|undefined} value */ +proto.payload.PermsTx.prototype.setPermargs = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.PermsTx.prototype.clearPermargs = function() { + this.setPermargs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.PermsTx.prototype.hasPermargs = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.NameTx.prototype.toObject = function(opt_includeInstance) { + return proto.payload.NameTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.NameTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.NameTx.toObject = function(includeInstance, msg) { + var f, obj = { + input: (f = msg.getInput()) && proto.payload.TxInput.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + data: jspb.Message.getFieldWithDefault(msg, 3, ""), + fee: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.NameTx} + */ +proto.payload.NameTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.NameTx; + return proto.payload.NameTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.NameTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.NameTx} + */ +proto.payload.NameTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.payload.TxInput; + reader.readMessage(value,proto.payload.TxInput.deserializeBinaryFromReader); + msg.setInput(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.NameTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.NameTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.NameTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.NameTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInput(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.payload.TxInput.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional TxInput Input = 1; + * @return {?proto.payload.TxInput} + */ +proto.payload.NameTx.prototype.getInput = function() { + return /** @type{?proto.payload.TxInput} */ ( + jspb.Message.getWrapperField(this, proto.payload.TxInput, 1)); +}; + + +/** @param {?proto.payload.TxInput|undefined} value */ +proto.payload.NameTx.prototype.setInput = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.NameTx.prototype.clearInput = function() { + this.setInput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.NameTx.prototype.hasInput = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string Name = 2; + * @return {string} + */ +proto.payload.NameTx.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.payload.NameTx.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string Data = 3; + * @return {string} + */ +proto.payload.NameTx.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.payload.NameTx.prototype.setData = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 Fee = 4; + * @return {number} + */ +proto.payload.NameTx.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.payload.NameTx.prototype.setFee = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.BondTx.prototype.toObject = function(opt_includeInstance) { + return proto.payload.BondTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.BondTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.BondTx.toObject = function(includeInstance, msg) { + var f, obj = { + input: (f = msg.getInput()) && proto.payload.TxInput.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.BondTx} + */ +proto.payload.BondTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.BondTx; + return proto.payload.BondTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.BondTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.BondTx} + */ +proto.payload.BondTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.payload.TxInput; + reader.readMessage(value,proto.payload.TxInput.deserializeBinaryFromReader); + msg.setInput(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.BondTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.BondTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.BondTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.BondTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInput(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.payload.TxInput.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TxInput Input = 1; + * @return {?proto.payload.TxInput} + */ +proto.payload.BondTx.prototype.getInput = function() { + return /** @type{?proto.payload.TxInput} */ ( + jspb.Message.getWrapperField(this, proto.payload.TxInput, 1)); +}; + + +/** @param {?proto.payload.TxInput|undefined} value */ +proto.payload.BondTx.prototype.setInput = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.BondTx.prototype.clearInput = function() { + this.setInput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.BondTx.prototype.hasInput = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.UnbondTx.prototype.toObject = function(opt_includeInstance) { + return proto.payload.UnbondTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.UnbondTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.UnbondTx.toObject = function(includeInstance, msg) { + var f, obj = { + input: (f = msg.getInput()) && proto.payload.TxInput.toObject(includeInstance, f), + output: (f = msg.getOutput()) && proto.payload.TxOutput.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.UnbondTx} + */ +proto.payload.UnbondTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.UnbondTx; + return proto.payload.UnbondTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.UnbondTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.UnbondTx} + */ +proto.payload.UnbondTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.payload.TxInput; + reader.readMessage(value,proto.payload.TxInput.deserializeBinaryFromReader); + msg.setInput(value); + break; + case 2: + var value = new proto.payload.TxOutput; + reader.readMessage(value,proto.payload.TxOutput.deserializeBinaryFromReader); + msg.setOutput(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.UnbondTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.UnbondTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.UnbondTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.UnbondTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInput(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.payload.TxInput.serializeBinaryToWriter + ); + } + f = message.getOutput(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.payload.TxOutput.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TxInput Input = 1; + * @return {?proto.payload.TxInput} + */ +proto.payload.UnbondTx.prototype.getInput = function() { + return /** @type{?proto.payload.TxInput} */ ( + jspb.Message.getWrapperField(this, proto.payload.TxInput, 1)); +}; + + +/** @param {?proto.payload.TxInput|undefined} value */ +proto.payload.UnbondTx.prototype.setInput = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.UnbondTx.prototype.clearInput = function() { + this.setInput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.UnbondTx.prototype.hasInput = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional TxOutput Output = 2; + * @return {?proto.payload.TxOutput} + */ +proto.payload.UnbondTx.prototype.getOutput = function() { + return /** @type{?proto.payload.TxOutput} */ ( + jspb.Message.getWrapperField(this, proto.payload.TxOutput, 2)); +}; + + +/** @param {?proto.payload.TxOutput|undefined} value */ +proto.payload.UnbondTx.prototype.setOutput = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.UnbondTx.prototype.clearOutput = function() { + this.setOutput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.UnbondTx.prototype.hasOutput = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.payload.GovTx.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.GovTx.prototype.toObject = function(opt_includeInstance) { + return proto.payload.GovTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.GovTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.GovTx.toObject = function(includeInstance, msg) { + var f, obj = { + inputsList: jspb.Message.toObjectList(msg.getInputsList(), + proto.payload.TxInput.toObject, includeInstance), + accountupdatesList: jspb.Message.toObjectList(msg.getAccountupdatesList(), + spec_pb.TemplateAccount.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.GovTx} + */ +proto.payload.GovTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.GovTx; + return proto.payload.GovTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.GovTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.GovTx} + */ +proto.payload.GovTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.payload.TxInput; + reader.readMessage(value,proto.payload.TxInput.deserializeBinaryFromReader); + msg.addInputs(value); + break; + case 2: + var value = new spec_pb.TemplateAccount; + reader.readMessage(value,spec_pb.TemplateAccount.deserializeBinaryFromReader); + msg.addAccountupdates(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.GovTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.GovTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.GovTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.GovTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.payload.TxInput.serializeBinaryToWriter + ); + } + f = message.getAccountupdatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + spec_pb.TemplateAccount.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TxInput Inputs = 1; + * @return {!Array} + */ +proto.payload.GovTx.prototype.getInputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.payload.TxInput, 1)); +}; + + +/** @param {!Array} value */ +proto.payload.GovTx.prototype.setInputsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.payload.TxInput=} opt_value + * @param {number=} opt_index + * @return {!proto.payload.TxInput} + */ +proto.payload.GovTx.prototype.addInputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.TxInput, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.payload.GovTx.prototype.clearInputsList = function() { + this.setInputsList([]); +}; + + +/** + * repeated spec.TemplateAccount AccountUpdates = 2; + * @return {!Array} + */ +proto.payload.GovTx.prototype.getAccountupdatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, spec_pb.TemplateAccount, 2)); +}; + + +/** @param {!Array} value */ +proto.payload.GovTx.prototype.setAccountupdatesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.spec.TemplateAccount=} opt_value + * @param {number=} opt_index + * @return {!proto.spec.TemplateAccount} + */ +proto.payload.GovTx.prototype.addAccountupdates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spec.TemplateAccount, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.payload.GovTx.prototype.clearAccountupdatesList = function() { + this.setAccountupdatesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.ProposalTx.prototype.toObject = function(opt_includeInstance) { + return proto.payload.ProposalTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.ProposalTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.ProposalTx.toObject = function(includeInstance, msg) { + var f, obj = { + input: (f = msg.getInput()) && proto.payload.TxInput.toObject(includeInstance, f), + votingweight: jspb.Message.getFieldWithDefault(msg, 2, 0), + proposalhash: msg.getProposalhash_asB64(), + proposal: (f = msg.getProposal()) && proto.payload.Proposal.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.ProposalTx} + */ +proto.payload.ProposalTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.ProposalTx; + return proto.payload.ProposalTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.ProposalTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.ProposalTx} + */ +proto.payload.ProposalTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.payload.TxInput; + reader.readMessage(value,proto.payload.TxInput.deserializeBinaryFromReader); + msg.setInput(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVotingweight(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProposalhash(value); + break; + case 4: + var value = new proto.payload.Proposal; + reader.readMessage(value,proto.payload.Proposal.deserializeBinaryFromReader); + msg.setProposal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.ProposalTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.ProposalTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.ProposalTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.ProposalTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInput(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.payload.TxInput.serializeBinaryToWriter + ); + } + f = message.getVotingweight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getProposalhash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getProposal(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.payload.Proposal.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TxInput Input = 1; + * @return {?proto.payload.TxInput} + */ +proto.payload.ProposalTx.prototype.getInput = function() { + return /** @type{?proto.payload.TxInput} */ ( + jspb.Message.getWrapperField(this, proto.payload.TxInput, 1)); +}; + + +/** @param {?proto.payload.TxInput|undefined} value */ +proto.payload.ProposalTx.prototype.setInput = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.ProposalTx.prototype.clearInput = function() { + this.setInput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.ProposalTx.prototype.hasInput = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 VotingWeight = 2; + * @return {number} + */ +proto.payload.ProposalTx.prototype.getVotingweight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.payload.ProposalTx.prototype.setVotingweight = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes ProposalHash = 3; + * @return {!(string|Uint8Array)} + */ +proto.payload.ProposalTx.prototype.getProposalhash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes ProposalHash = 3; + * This is a type-conversion wrapper around `getProposalhash()` + * @return {string} + */ +proto.payload.ProposalTx.prototype.getProposalhash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProposalhash())); +}; + + +/** + * optional bytes ProposalHash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProposalhash()` + * @return {!Uint8Array} + */ +proto.payload.ProposalTx.prototype.getProposalhash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProposalhash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.payload.ProposalTx.prototype.setProposalhash = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional Proposal Proposal = 4; + * @return {?proto.payload.Proposal} + */ +proto.payload.ProposalTx.prototype.getProposal = function() { + return /** @type{?proto.payload.Proposal} */ ( + jspb.Message.getWrapperField(this, proto.payload.Proposal, 4)); +}; + + +/** @param {?proto.payload.Proposal|undefined} value */ +proto.payload.ProposalTx.prototype.setProposal = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.ProposalTx.prototype.clearProposal = function() { + this.setProposal(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.ProposalTx.prototype.hasProposal = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.payload.IdentifyTx.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.IdentifyTx.prototype.toObject = function(opt_includeInstance) { + return proto.payload.IdentifyTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.IdentifyTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.IdentifyTx.toObject = function(includeInstance, msg) { + var f, obj = { + inputsList: jspb.Message.toObjectList(msg.getInputsList(), + proto.payload.TxInput.toObject, includeInstance), + node: (f = msg.getNode()) && registry_pb.NodeIdentity.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.IdentifyTx} + */ +proto.payload.IdentifyTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.IdentifyTx; + return proto.payload.IdentifyTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.IdentifyTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.IdentifyTx} + */ +proto.payload.IdentifyTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.payload.TxInput; + reader.readMessage(value,proto.payload.TxInput.deserializeBinaryFromReader); + msg.addInputs(value); + break; + case 2: + var value = new registry_pb.NodeIdentity; + reader.readMessage(value,registry_pb.NodeIdentity.deserializeBinaryFromReader); + msg.setNode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.IdentifyTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.IdentifyTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.IdentifyTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.IdentifyTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.payload.TxInput.serializeBinaryToWriter + ); + } + f = message.getNode(); + if (f != null) { + writer.writeMessage( + 2, + f, + registry_pb.NodeIdentity.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TxInput Inputs = 1; + * @return {!Array} + */ +proto.payload.IdentifyTx.prototype.getInputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.payload.TxInput, 1)); +}; + + +/** @param {!Array} value */ +proto.payload.IdentifyTx.prototype.setInputsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.payload.TxInput=} opt_value + * @param {number=} opt_index + * @return {!proto.payload.TxInput} + */ +proto.payload.IdentifyTx.prototype.addInputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.TxInput, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.payload.IdentifyTx.prototype.clearInputsList = function() { + this.setInputsList([]); +}; + + +/** + * optional registry.NodeIdentity Node = 2; + * @return {?proto.registry.NodeIdentity} + */ +proto.payload.IdentifyTx.prototype.getNode = function() { + return /** @type{?proto.registry.NodeIdentity} */ ( + jspb.Message.getWrapperField(this, registry_pb.NodeIdentity, 2)); +}; + + +/** @param {?proto.registry.NodeIdentity|undefined} value */ +proto.payload.IdentifyTx.prototype.setNode = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.IdentifyTx.prototype.clearNode = function() { + this.setNode(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.IdentifyTx.prototype.hasNode = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.payload.BatchTx.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.BatchTx.prototype.toObject = function(opt_includeInstance) { + return proto.payload.BatchTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.BatchTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.BatchTx.toObject = function(includeInstance, msg) { + var f, obj = { + inputsList: jspb.Message.toObjectList(msg.getInputsList(), + proto.payload.TxInput.toObject, includeInstance), + txsList: jspb.Message.toObjectList(msg.getTxsList(), + proto.payload.Any.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.BatchTx} + */ +proto.payload.BatchTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.BatchTx; + return proto.payload.BatchTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.BatchTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.BatchTx} + */ +proto.payload.BatchTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.payload.TxInput; + reader.readMessage(value,proto.payload.TxInput.deserializeBinaryFromReader); + msg.addInputs(value); + break; + case 2: + var value = new proto.payload.Any; + reader.readMessage(value,proto.payload.Any.deserializeBinaryFromReader); + msg.addTxs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.BatchTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.BatchTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.BatchTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.BatchTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.payload.TxInput.serializeBinaryToWriter + ); + } + f = message.getTxsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.payload.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TxInput Inputs = 1; + * @return {!Array} + */ +proto.payload.BatchTx.prototype.getInputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.payload.TxInput, 1)); +}; + + +/** @param {!Array} value */ +proto.payload.BatchTx.prototype.setInputsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.payload.TxInput=} opt_value + * @param {number=} opt_index + * @return {!proto.payload.TxInput} + */ +proto.payload.BatchTx.prototype.addInputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.payload.TxInput, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.payload.BatchTx.prototype.clearInputsList = function() { + this.setInputsList([]); +}; + + +/** + * repeated Any Txs = 2; + * @return {!Array} + */ +proto.payload.BatchTx.prototype.getTxsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.payload.Any, 2)); +}; + + +/** @param {!Array} value */ +proto.payload.BatchTx.prototype.setTxsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.payload.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.payload.Any} + */ +proto.payload.BatchTx.prototype.addTxs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.payload.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.payload.BatchTx.prototype.clearTxsList = function() { + this.setTxsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.Vote.prototype.toObject = function(opt_includeInstance) { + return proto.payload.Vote.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.Vote} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.Vote.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + votingweight: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.Vote} + */ +proto.payload.Vote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.Vote; + return proto.payload.Vote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.Vote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.Vote} + */ +proto.payload.Vote.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVotingweight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.Vote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.Vote.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.Vote} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.Vote.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getVotingweight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.payload.Vote.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.payload.Vote.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.payload.Vote.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.payload.Vote.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional int64 VotingWeight = 2; + * @return {number} + */ +proto.payload.Vote.prototype.getVotingweight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.payload.Vote.prototype.setVotingweight = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.Proposal.prototype.toObject = function(opt_includeInstance) { + return proto.payload.Proposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.Proposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.Proposal.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + batchtx: (f = msg.getBatchtx()) && proto.payload.BatchTx.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.Proposal} + */ +proto.payload.Proposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.Proposal; + return proto.payload.Proposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.Proposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.Proposal} + */ +proto.payload.Proposal.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = new proto.payload.BatchTx; + reader.readMessage(value,proto.payload.BatchTx.deserializeBinaryFromReader); + msg.setBatchtx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.Proposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.Proposal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.Proposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.Proposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getBatchtx(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.payload.BatchTx.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string Name = 1; + * @return {string} + */ +proto.payload.Proposal.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.payload.Proposal.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string Description = 2; + * @return {string} + */ +proto.payload.Proposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.payload.Proposal.prototype.setDescription = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional BatchTx BatchTx = 3; + * @return {?proto.payload.BatchTx} + */ +proto.payload.Proposal.prototype.getBatchtx = function() { + return /** @type{?proto.payload.BatchTx} */ ( + jspb.Message.getWrapperField(this, proto.payload.BatchTx, 3)); +}; + + +/** @param {?proto.payload.BatchTx|undefined} value */ +proto.payload.Proposal.prototype.setBatchtx = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.Proposal.prototype.clearBatchtx = function() { + this.setBatchtx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.Proposal.prototype.hasBatchtx = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.payload.Ballot.repeatedFields_ = [5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.payload.Ballot.prototype.toObject = function(opt_includeInstance) { + return proto.payload.Ballot.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.payload.Ballot} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.Ballot.toObject = function(includeInstance, msg) { + var f, obj = { + proposal: (f = msg.getProposal()) && proto.payload.Proposal.toObject(includeInstance, f), + finalizingtx: msg.getFinalizingtx_asB64(), + proposalstate: jspb.Message.getFieldWithDefault(msg, 4, 0), + votesList: jspb.Message.toObjectList(msg.getVotesList(), + proto.payload.Vote.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.payload.Ballot} + */ +proto.payload.Ballot.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.payload.Ballot; + return proto.payload.Ballot.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.payload.Ballot} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.payload.Ballot} + */ +proto.payload.Ballot.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.payload.Proposal; + reader.readMessage(value,proto.payload.Proposal.deserializeBinaryFromReader); + msg.setProposal(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFinalizingtx(value); + break; + case 4: + var value = /** @type {!proto.payload.Ballot.ProposalState} */ (reader.readEnum()); + msg.setProposalstate(value); + break; + case 5: + var value = new proto.payload.Vote; + reader.readMessage(value,proto.payload.Vote.deserializeBinaryFromReader); + msg.addVotes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.payload.Ballot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.payload.Ballot.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.payload.Ballot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.payload.Ballot.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposal(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.payload.Proposal.serializeBinaryToWriter + ); + } + f = message.getFinalizingtx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProposalstate(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.payload.Vote.serializeBinaryToWriter + ); + } +}; + + +/** + * @enum {number} + */ +proto.payload.Ballot.ProposalState = { + PROPOSED: 0, + EXECUTED: 1, + FAILED: 2 +}; + +/** + * optional Proposal Proposal = 1; + * @return {?proto.payload.Proposal} + */ +proto.payload.Ballot.prototype.getProposal = function() { + return /** @type{?proto.payload.Proposal} */ ( + jspb.Message.getWrapperField(this, proto.payload.Proposal, 1)); +}; + + +/** @param {?proto.payload.Proposal|undefined} value */ +proto.payload.Ballot.prototype.setProposal = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.payload.Ballot.prototype.clearProposal = function() { + this.setProposal(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.payload.Ballot.prototype.hasProposal = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes FinalizingTx = 2; + * @return {!(string|Uint8Array)} + */ +proto.payload.Ballot.prototype.getFinalizingtx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes FinalizingTx = 2; + * This is a type-conversion wrapper around `getFinalizingtx()` + * @return {string} + */ +proto.payload.Ballot.prototype.getFinalizingtx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFinalizingtx())); +}; + + +/** + * optional bytes FinalizingTx = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFinalizingtx()` + * @return {!Uint8Array} + */ +proto.payload.Ballot.prototype.getFinalizingtx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFinalizingtx())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.payload.Ballot.prototype.setFinalizingtx = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional ProposalState proposalState = 4; + * @return {!proto.payload.Ballot.ProposalState} + */ +proto.payload.Ballot.prototype.getProposalstate = function() { + return /** @type {!proto.payload.Ballot.ProposalState} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {!proto.payload.Ballot.ProposalState} value */ +proto.payload.Ballot.prototype.setProposalstate = function(value) { + jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * repeated Vote Votes = 5; + * @return {!Array} + */ +proto.payload.Ballot.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.payload.Vote, 5)); +}; + + +/** @param {!Array} value */ +proto.payload.Ballot.prototype.setVotesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.payload.Vote=} opt_value + * @param {number=} opt_index + * @return {!proto.payload.Vote} + */ +proto.payload.Ballot.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.payload.Vote, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.payload.Ballot.prototype.clearVotesList = function() { + this.setVotesList([]); +}; + + +goog.object.extend(exports, proto.payload); diff --git a/js/proto/permission_grpc_pb.d.ts b/js/proto/permission_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/permission_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/permission_grpc_pb.js b/js/proto/permission_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/permission_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/permission_pb.d.ts b/js/proto/permission_pb.d.ts new file mode 100644 index 000000000..dab1ad03c --- /dev/null +++ b/js/proto/permission_pb.d.ts @@ -0,0 +1,110 @@ +// package: permission +// file: permission.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; + +export class AccountPermissions extends jspb.Message { + hasBase(): boolean; + clearBase(): void; + getBase(): BasePermissions | undefined; + setBase(value?: BasePermissions): void; + + clearRolesList(): void; + getRolesList(): Array; + setRolesList(value: Array): void; + addRoles(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AccountPermissions.AsObject; + static toObject(includeInstance: boolean, msg: AccountPermissions): AccountPermissions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AccountPermissions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AccountPermissions; + static deserializeBinaryFromReader(message: AccountPermissions, reader: jspb.BinaryReader): AccountPermissions; +} + +export namespace AccountPermissions { + export type AsObject = { + base?: BasePermissions.AsObject, + rolesList: Array, + } +} + +export class BasePermissions extends jspb.Message { + hasPerms(): boolean; + clearPerms(): void; + getPerms(): number | undefined; + setPerms(value: number): void; + + hasSetbit(): boolean; + clearSetbit(): void; + getSetbit(): number | undefined; + setSetbit(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BasePermissions.AsObject; + static toObject(includeInstance: boolean, msg: BasePermissions): BasePermissions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BasePermissions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BasePermissions; + static deserializeBinaryFromReader(message: BasePermissions, reader: jspb.BinaryReader): BasePermissions; +} + +export namespace BasePermissions { + export type AsObject = { + perms?: number, + setbit?: number, + } +} + +export class PermArgs extends jspb.Message { + hasAction(): boolean; + clearAction(): void; + getAction(): number | undefined; + setAction(value: number): void; + + hasTarget(): boolean; + clearTarget(): void; + getTarget(): Uint8Array | string; + getTarget_asU8(): Uint8Array; + getTarget_asB64(): string; + setTarget(value: Uint8Array | string): void; + + hasPermission(): boolean; + clearPermission(): void; + getPermission(): number | undefined; + setPermission(value: number): void; + + hasRole(): boolean; + clearRole(): void; + getRole(): string | undefined; + setRole(value: string): void; + + hasValue(): boolean; + clearValue(): void; + getValue(): boolean | undefined; + setValue(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PermArgs.AsObject; + static toObject(includeInstance: boolean, msg: PermArgs): PermArgs.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PermArgs, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PermArgs; + static deserializeBinaryFromReader(message: PermArgs, reader: jspb.BinaryReader): PermArgs; +} + +export namespace PermArgs { + export type AsObject = { + action?: number, + target: Uint8Array | string, + permission?: number, + role?: string, + value?: boolean, + } +} + diff --git a/js/proto/permission_pb.js b/js/proto/permission_pb.js new file mode 100644 index 000000000..f40b43223 --- /dev/null +++ b/js/proto/permission_pb.js @@ -0,0 +1,808 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +goog.exportSymbol('proto.permission.AccountPermissions', null, global); +goog.exportSymbol('proto.permission.BasePermissions', null, global); +goog.exportSymbol('proto.permission.PermArgs', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.permission.AccountPermissions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.permission.AccountPermissions.repeatedFields_, null); +}; +goog.inherits(proto.permission.AccountPermissions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.permission.AccountPermissions.displayName = 'proto.permission.AccountPermissions'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.permission.BasePermissions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.permission.BasePermissions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.permission.BasePermissions.displayName = 'proto.permission.BasePermissions'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.permission.PermArgs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.permission.PermArgs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.permission.PermArgs.displayName = 'proto.permission.PermArgs'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.permission.AccountPermissions.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.permission.AccountPermissions.prototype.toObject = function(opt_includeInstance) { + return proto.permission.AccountPermissions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.permission.AccountPermissions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.permission.AccountPermissions.toObject = function(includeInstance, msg) { + var f, obj = { + base: (f = msg.getBase()) && proto.permission.BasePermissions.toObject(includeInstance, f), + rolesList: jspb.Message.getRepeatedField(msg, 2) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.permission.AccountPermissions} + */ +proto.permission.AccountPermissions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.permission.AccountPermissions; + return proto.permission.AccountPermissions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.permission.AccountPermissions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.permission.AccountPermissions} + */ +proto.permission.AccountPermissions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.permission.BasePermissions; + reader.readMessage(value,proto.permission.BasePermissions.deserializeBinaryFromReader); + msg.setBase(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addRoles(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.permission.AccountPermissions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.permission.AccountPermissions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.permission.AccountPermissions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.permission.AccountPermissions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBase(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.permission.BasePermissions.serializeBinaryToWriter + ); + } + f = message.getRolesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional BasePermissions Base = 1; + * @return {?proto.permission.BasePermissions} + */ +proto.permission.AccountPermissions.prototype.getBase = function() { + return /** @type{?proto.permission.BasePermissions} */ ( + jspb.Message.getWrapperField(this, proto.permission.BasePermissions, 1)); +}; + + +/** @param {?proto.permission.BasePermissions|undefined} value */ +proto.permission.AccountPermissions.prototype.setBase = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.permission.AccountPermissions.prototype.clearBase = function() { + this.setBase(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.permission.AccountPermissions.prototype.hasBase = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated string Roles = 2; + * @return {!Array} + */ +proto.permission.AccountPermissions.prototype.getRolesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** @param {!Array} value */ +proto.permission.AccountPermissions.prototype.setRolesList = function(value) { + jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.permission.AccountPermissions.prototype.addRoles = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.permission.AccountPermissions.prototype.clearRolesList = function() { + this.setRolesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstance) { + return proto.permission.BasePermissions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.permission.BasePermissions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.permission.BasePermissions.toObject = function(includeInstance, msg) { + var f, obj = { + perms: jspb.Message.getField(msg, 1), + setbit: jspb.Message.getField(msg, 2) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.permission.BasePermissions} + */ +proto.permission.BasePermissions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.permission.BasePermissions; + return proto.permission.BasePermissions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.permission.BasePermissions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.permission.BasePermissions} + */ +proto.permission.BasePermissions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPerms(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSetbit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.permission.BasePermissions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.permission.BasePermissions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.permission.BasePermissions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.permission.BasePermissions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 Perms = 1; + * @return {number} + */ +proto.permission.BasePermissions.prototype.getPerms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.permission.BasePermissions.prototype.setPerms = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.permission.BasePermissions.prototype.clearPerms = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.permission.BasePermissions.prototype.hasPerms = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 SetBit = 2; + * @return {number} + */ +proto.permission.BasePermissions.prototype.getSetbit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.permission.BasePermissions.prototype.setSetbit = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.permission.BasePermissions.prototype.clearSetbit = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.permission.BasePermissions.prototype.hasSetbit = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { + return proto.permission.PermArgs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.permission.PermArgs} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.permission.PermArgs.toObject = function(includeInstance, msg) { + var f, obj = { + action: jspb.Message.getField(msg, 1), + target: msg.getTarget_asB64(), + permission: jspb.Message.getField(msg, 3), + role: jspb.Message.getField(msg, 4), + value: jspb.Message.getField(msg, 5) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.permission.PermArgs} + */ +proto.permission.PermArgs.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.permission.PermArgs; + return proto.permission.PermArgs.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.permission.PermArgs} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.permission.PermArgs} + */ +proto.permission.PermArgs.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAction(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTarget(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPermission(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setRole(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.permission.PermArgs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.permission.PermArgs.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.permission.PermArgs} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.permission.PermArgs.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional uint64 Action = 1; + * @return {number} + */ +proto.permission.PermArgs.prototype.getAction = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.permission.PermArgs.prototype.setAction = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.permission.PermArgs.prototype.clearAction = function() { + jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.permission.PermArgs.prototype.hasAction = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes Target = 2; + * @return {!(string|Uint8Array)} + */ +proto.permission.PermArgs.prototype.getTarget = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Target = 2; + * This is a type-conversion wrapper around `getTarget()` + * @return {string} + */ +proto.permission.PermArgs.prototype.getTarget_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTarget())); +}; + + +/** + * optional bytes Target = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTarget()` + * @return {!Uint8Array} + */ +proto.permission.PermArgs.prototype.getTarget_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTarget())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.permission.PermArgs.prototype.setTarget = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.permission.PermArgs.prototype.clearTarget = function() { + jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.permission.PermArgs.prototype.hasTarget = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 Permission = 3; + * @return {number} + */ +proto.permission.PermArgs.prototype.getPermission = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.permission.PermArgs.prototype.setPermission = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.permission.PermArgs.prototype.clearPermission = function() { + jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.permission.PermArgs.prototype.hasPermission = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string Role = 4; + * @return {string} + */ +proto.permission.PermArgs.prototype.getRole = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.permission.PermArgs.prototype.setRole = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.permission.PermArgs.prototype.clearRole = function() { + jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.permission.PermArgs.prototype.hasRole = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool Value = 5; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.permission.PermArgs.prototype.getValue = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); +}; + + +/** @param {boolean} value */ +proto.permission.PermArgs.prototype.setValue = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + */ +proto.permission.PermArgs.prototype.clearValue = function() { + jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.permission.PermArgs.prototype.hasValue = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +goog.object.extend(exports, proto.permission); diff --git a/js/proto/registry_grpc_pb.d.ts b/js/proto/registry_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/registry_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/registry_grpc_pb.js b/js/proto/registry_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/registry_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/registry_pb.d.ts b/js/proto/registry_pb.d.ts new file mode 100644 index 000000000..9be2627d2 --- /dev/null +++ b/js/proto/registry_pb.d.ts @@ -0,0 +1,42 @@ +// package: registry +// file: registry.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; + +export class NodeIdentity extends jspb.Message { + getMoniker(): string; + setMoniker(value: string): void; + + getNetworkaddress(): string; + setNetworkaddress(value: string): void; + + getTendermintnodeid(): Uint8Array | string; + getTendermintnodeid_asU8(): Uint8Array; + getTendermintnodeid_asB64(): string; + setTendermintnodeid(value: Uint8Array | string): void; + + getValidatorpublickey(): Uint8Array | string; + getValidatorpublickey_asU8(): Uint8Array; + getValidatorpublickey_asB64(): string; + setValidatorpublickey(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NodeIdentity.AsObject; + static toObject(includeInstance: boolean, msg: NodeIdentity): NodeIdentity.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NodeIdentity, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NodeIdentity; + static deserializeBinaryFromReader(message: NodeIdentity, reader: jspb.BinaryReader): NodeIdentity; +} + +export namespace NodeIdentity { + export type AsObject = { + moniker: string, + networkaddress: string, + tendermintnodeid: Uint8Array | string, + validatorpublickey: Uint8Array | string, + } +} + diff --git a/js/proto/registry_pb.js b/js/proto/registry_pb.js new file mode 100644 index 000000000..c37ccb219 --- /dev/null +++ b/js/proto/registry_pb.js @@ -0,0 +1,292 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +goog.exportSymbol('proto.registry.NodeIdentity', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.registry.NodeIdentity = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.registry.NodeIdentity, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.registry.NodeIdentity.displayName = 'proto.registry.NodeIdentity'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.registry.NodeIdentity.prototype.toObject = function(opt_includeInstance) { + return proto.registry.NodeIdentity.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.registry.NodeIdentity} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.registry.NodeIdentity.toObject = function(includeInstance, msg) { + var f, obj = { + moniker: jspb.Message.getFieldWithDefault(msg, 1, ""), + networkaddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + tendermintnodeid: msg.getTendermintnodeid_asB64(), + validatorpublickey: msg.getValidatorpublickey_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.registry.NodeIdentity} + */ +proto.registry.NodeIdentity.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.registry.NodeIdentity; + return proto.registry.NodeIdentity.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.registry.NodeIdentity} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.registry.NodeIdentity} + */ +proto.registry.NodeIdentity.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMoniker(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNetworkaddress(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTendermintnodeid(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValidatorpublickey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.registry.NodeIdentity.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.registry.NodeIdentity.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.registry.NodeIdentity} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.registry.NodeIdentity.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMoniker(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getNetworkaddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTendermintnodeid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getValidatorpublickey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional string Moniker = 1; + * @return {string} + */ +proto.registry.NodeIdentity.prototype.getMoniker = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.registry.NodeIdentity.prototype.setMoniker = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string NetworkAddress = 2; + * @return {string} + */ +proto.registry.NodeIdentity.prototype.getNetworkaddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.registry.NodeIdentity.prototype.setNetworkaddress = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes TendermintNodeID = 3; + * @return {!(string|Uint8Array)} + */ +proto.registry.NodeIdentity.prototype.getTendermintnodeid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes TendermintNodeID = 3; + * This is a type-conversion wrapper around `getTendermintnodeid()` + * @return {string} + */ +proto.registry.NodeIdentity.prototype.getTendermintnodeid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTendermintnodeid())); +}; + + +/** + * optional bytes TendermintNodeID = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTendermintnodeid()` + * @return {!Uint8Array} + */ +proto.registry.NodeIdentity.prototype.getTendermintnodeid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTendermintnodeid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.registry.NodeIdentity.prototype.setTendermintnodeid = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bytes ValidatorPublicKey = 4; + * @return {!(string|Uint8Array)} + */ +proto.registry.NodeIdentity.prototype.getValidatorpublickey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes ValidatorPublicKey = 4; + * This is a type-conversion wrapper around `getValidatorpublickey()` + * @return {string} + */ +proto.registry.NodeIdentity.prototype.getValidatorpublickey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValidatorpublickey())); +}; + + +/** + * optional bytes ValidatorPublicKey = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValidatorpublickey()` + * @return {!Uint8Array} + */ +proto.registry.NodeIdentity.prototype.getValidatorpublickey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorpublickey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.registry.NodeIdentity.prototype.setValidatorpublickey = function(value) { + jspb.Message.setProto3BytesField(this, 4, value); +}; + + +goog.object.extend(exports, proto.registry); diff --git a/js/proto/rpc_grpc_pb.d.ts b/js/proto/rpc_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/rpc_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/rpc_grpc_pb.js b/js/proto/rpc_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/rpc_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/rpc_pb.d.ts b/js/proto/rpc_pb.d.ts new file mode 100644 index 000000000..287c6a32e --- /dev/null +++ b/js/proto/rpc_pb.d.ts @@ -0,0 +1,65 @@ +// package: rpc +// file: rpc.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as tendermint_pb from "./tendermint_pb"; +import * as validator_pb from "./validator_pb"; +import * as bcm_pb from "./bcm_pb"; + +export class ResultStatus extends jspb.Message { + getChainid(): string; + setChainid(value: string): void; + + getRunid(): string; + setRunid(value: string): void; + + getBurrowversion(): string; + setBurrowversion(value: string): void; + + getGenesishash(): Uint8Array | string; + getGenesishash_asU8(): Uint8Array; + getGenesishash_asB64(): string; + setGenesishash(value: Uint8Array | string): void; + + hasNodeinfo(): boolean; + clearNodeinfo(): void; + getNodeinfo(): tendermint_pb.NodeInfo | undefined; + setNodeinfo(value?: tendermint_pb.NodeInfo): void; + + hasSyncinfo(): boolean; + clearSyncinfo(): void; + getSyncinfo(): bcm_pb.SyncInfo | undefined; + setSyncinfo(value?: bcm_pb.SyncInfo): void; + + getCatchingup(): boolean; + setCatchingup(value: boolean): void; + + hasValidatorinfo(): boolean; + clearValidatorinfo(): void; + getValidatorinfo(): validator_pb.Validator | undefined; + setValidatorinfo(value?: validator_pb.Validator): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResultStatus.AsObject; + static toObject(includeInstance: boolean, msg: ResultStatus): ResultStatus.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResultStatus, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResultStatus; + static deserializeBinaryFromReader(message: ResultStatus, reader: jspb.BinaryReader): ResultStatus; +} + +export namespace ResultStatus { + export type AsObject = { + chainid: string, + runid: string, + burrowversion: string, + genesishash: Uint8Array | string, + nodeinfo?: tendermint_pb.NodeInfo.AsObject, + syncinfo?: bcm_pb.SyncInfo.AsObject, + catchingup: boolean, + validatorinfo?: validator_pb.Validator.AsObject, + } +} + diff --git a/js/proto/rpc_pb.js b/js/proto/rpc_pb.js new file mode 100644 index 000000000..3b00a5cc1 --- /dev/null +++ b/js/proto/rpc_pb.js @@ -0,0 +1,444 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var tendermint_pb = require('./tendermint_pb.js'); +goog.object.extend(proto, tendermint_pb); +var validator_pb = require('./validator_pb.js'); +goog.object.extend(proto, validator_pb); +var bcm_pb = require('./bcm_pb.js'); +goog.object.extend(proto, bcm_pb); +goog.exportSymbol('proto.rpc.ResultStatus', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpc.ResultStatus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpc.ResultStatus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpc.ResultStatus.displayName = 'proto.rpc.ResultStatus'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpc.ResultStatus.prototype.toObject = function(opt_includeInstance) { + return proto.rpc.ResultStatus.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpc.ResultStatus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpc.ResultStatus.toObject = function(includeInstance, msg) { + var f, obj = { + chainid: jspb.Message.getFieldWithDefault(msg, 1, ""), + runid: jspb.Message.getFieldWithDefault(msg, 2, ""), + burrowversion: jspb.Message.getFieldWithDefault(msg, 3, ""), + genesishash: msg.getGenesishash_asB64(), + nodeinfo: (f = msg.getNodeinfo()) && tendermint_pb.NodeInfo.toObject(includeInstance, f), + syncinfo: (f = msg.getSyncinfo()) && bcm_pb.SyncInfo.toObject(includeInstance, f), + catchingup: jspb.Message.getFieldWithDefault(msg, 8, false), + validatorinfo: (f = msg.getValidatorinfo()) && validator_pb.Validator.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpc.ResultStatus} + */ +proto.rpc.ResultStatus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpc.ResultStatus; + return proto.rpc.ResultStatus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpc.ResultStatus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpc.ResultStatus} + */ +proto.rpc.ResultStatus.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChainid(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRunid(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBurrowversion(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setGenesishash(value); + break; + case 5: + var value = new tendermint_pb.NodeInfo; + reader.readMessage(value,tendermint_pb.NodeInfo.deserializeBinaryFromReader); + msg.setNodeinfo(value); + break; + case 6: + var value = new bcm_pb.SyncInfo; + reader.readMessage(value,bcm_pb.SyncInfo.deserializeBinaryFromReader); + msg.setSyncinfo(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCatchingup(value); + break; + case 7: + var value = new validator_pb.Validator; + reader.readMessage(value,validator_pb.Validator.deserializeBinaryFromReader); + msg.setValidatorinfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpc.ResultStatus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpc.ResultStatus.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpc.ResultStatus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpc.ResultStatus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRunid(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getBurrowversion(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getGenesishash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getNodeinfo(); + if (f != null) { + writer.writeMessage( + 5, + f, + tendermint_pb.NodeInfo.serializeBinaryToWriter + ); + } + f = message.getSyncinfo(); + if (f != null) { + writer.writeMessage( + 6, + f, + bcm_pb.SyncInfo.serializeBinaryToWriter + ); + } + f = message.getCatchingup(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getValidatorinfo(); + if (f != null) { + writer.writeMessage( + 7, + f, + validator_pb.Validator.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string ChainID = 1; + * @return {string} + */ +proto.rpc.ResultStatus.prototype.getChainid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.rpc.ResultStatus.prototype.setChainid = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string RunID = 2; + * @return {string} + */ +proto.rpc.ResultStatus.prototype.getRunid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.rpc.ResultStatus.prototype.setRunid = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string BurrowVersion = 3; + * @return {string} + */ +proto.rpc.ResultStatus.prototype.getBurrowversion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.rpc.ResultStatus.prototype.setBurrowversion = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bytes GenesisHash = 4; + * @return {!(string|Uint8Array)} + */ +proto.rpc.ResultStatus.prototype.getGenesishash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes GenesisHash = 4; + * This is a type-conversion wrapper around `getGenesishash()` + * @return {string} + */ +proto.rpc.ResultStatus.prototype.getGenesishash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getGenesishash())); +}; + + +/** + * optional bytes GenesisHash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getGenesishash()` + * @return {!Uint8Array} + */ +proto.rpc.ResultStatus.prototype.getGenesishash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getGenesishash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpc.ResultStatus.prototype.setGenesishash = function(value) { + jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional tendermint.NodeInfo NodeInfo = 5; + * @return {?proto.tendermint.NodeInfo} + */ +proto.rpc.ResultStatus.prototype.getNodeinfo = function() { + return /** @type{?proto.tendermint.NodeInfo} */ ( + jspb.Message.getWrapperField(this, tendermint_pb.NodeInfo, 5)); +}; + + +/** @param {?proto.tendermint.NodeInfo|undefined} value */ +proto.rpc.ResultStatus.prototype.setNodeinfo = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.rpc.ResultStatus.prototype.clearNodeinfo = function() { + this.setNodeinfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.rpc.ResultStatus.prototype.hasNodeinfo = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bcm.SyncInfo SyncInfo = 6; + * @return {?proto.bcm.SyncInfo} + */ +proto.rpc.ResultStatus.prototype.getSyncinfo = function() { + return /** @type{?proto.bcm.SyncInfo} */ ( + jspb.Message.getWrapperField(this, bcm_pb.SyncInfo, 6)); +}; + + +/** @param {?proto.bcm.SyncInfo|undefined} value */ +proto.rpc.ResultStatus.prototype.setSyncinfo = function(value) { + jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.rpc.ResultStatus.prototype.clearSyncinfo = function() { + this.setSyncinfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.rpc.ResultStatus.prototype.hasSyncinfo = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bool CatchingUp = 8; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.rpc.ResultStatus.prototype.getCatchingup = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 8, false)); +}; + + +/** @param {boolean} value */ +proto.rpc.ResultStatus.prototype.setCatchingup = function(value) { + jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional validator.Validator ValidatorInfo = 7; + * @return {?proto.validator.Validator} + */ +proto.rpc.ResultStatus.prototype.getValidatorinfo = function() { + return /** @type{?proto.validator.Validator} */ ( + jspb.Message.getWrapperField(this, validator_pb.Validator, 7)); +}; + + +/** @param {?proto.validator.Validator|undefined} value */ +proto.rpc.ResultStatus.prototype.setValidatorinfo = function(value) { + jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.rpc.ResultStatus.prototype.clearValidatorinfo = function() { + this.setValidatorinfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.rpc.ResultStatus.prototype.hasValidatorinfo = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +goog.object.extend(exports, proto.rpc); diff --git a/js/proto/rpcdump_grpc_pb.d.ts b/js/proto/rpcdump_grpc_pb.d.ts new file mode 100644 index 000000000..3585069f5 --- /dev/null +++ b/js/proto/rpcdump_grpc_pb.d.ts @@ -0,0 +1,20 @@ +// GENERATED CODE -- DO NOT EDIT! + +// package: rpcdump +// file: rpcdump.proto + +import * as rpcdump_pb from "./rpcdump_pb"; +import * as dump_pb from "./dump_pb"; +import * as grpc from "grpc"; + +interface IDumpService extends grpc.ServiceDefinition { + getDump: grpc.MethodDefinition; +} + +export const DumpService: IDumpService; + +export class DumpClient extends grpc.Client { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + getDump(argument: rpcdump_pb.GetDumpParam, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; + getDump(argument: rpcdump_pb.GetDumpParam, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; +} diff --git a/js/proto/rpcdump_grpc_pb.js b/js/proto/rpcdump_grpc_pb.js new file mode 100644 index 000000000..b9abc69f5 --- /dev/null +++ b/js/proto/rpcdump_grpc_pb.js @@ -0,0 +1,46 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var rpcdump_pb = require('./rpcdump_pb.js'); +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +var dump_pb = require('./dump_pb.js'); + +function serialize_dump_Dump(arg) { + if (!(arg instanceof dump_pb.Dump)) { + throw new Error('Expected argument of type dump.Dump'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_dump_Dump(buffer_arg) { + return dump_pb.Dump.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcdump_GetDumpParam(arg) { + if (!(arg instanceof rpcdump_pb.GetDumpParam)) { + throw new Error('Expected argument of type rpcdump.GetDumpParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcdump_GetDumpParam(buffer_arg) { + return rpcdump_pb.GetDumpParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var DumpService = exports.DumpService = { + getDump: { + path: '/rpcdump.Dump/GetDump', + requestStream: false, + responseStream: true, + requestType: rpcdump_pb.GetDumpParam, + responseType: dump_pb.Dump, + requestSerialize: serialize_rpcdump_GetDumpParam, + requestDeserialize: deserialize_rpcdump_GetDumpParam, + responseSerialize: serialize_dump_Dump, + responseDeserialize: deserialize_dump_Dump, + }, +}; + +exports.DumpClient = grpc.makeGenericClientConstructor(DumpService); diff --git a/js/proto/rpcdump_pb.d.ts b/js/proto/rpcdump_pb.d.ts new file mode 100644 index 000000000..cdd962306 --- /dev/null +++ b/js/proto/rpcdump_pb.d.ts @@ -0,0 +1,27 @@ +// package: rpcdump +// file: rpcdump.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as dump_pb from "./dump_pb"; + +export class GetDumpParam extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDumpParam.AsObject; + static toObject(includeInstance: boolean, msg: GetDumpParam): GetDumpParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDumpParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDumpParam; + static deserializeBinaryFromReader(message: GetDumpParam, reader: jspb.BinaryReader): GetDumpParam; +} + +export namespace GetDumpParam { + export type AsObject = { + height: number, + } +} + diff --git a/js/proto/rpcdump_pb.js b/js/proto/rpcdump_pb.js new file mode 100644 index 000000000..5efd0c4d9 --- /dev/null +++ b/js/proto/rpcdump_pb.js @@ -0,0 +1,165 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var dump_pb = require('./dump_pb.js'); +goog.object.extend(proto, dump_pb); +goog.exportSymbol('proto.rpcdump.GetDumpParam', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcdump.GetDumpParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcdump.GetDumpParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcdump.GetDumpParam.displayName = 'proto.rpcdump.GetDumpParam'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcdump.GetDumpParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcdump.GetDumpParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcdump.GetDumpParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcdump.GetDumpParam.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcdump.GetDumpParam} + */ +proto.rpcdump.GetDumpParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcdump.GetDumpParam; + return proto.rpcdump.GetDumpParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcdump.GetDumpParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcdump.GetDumpParam} + */ +proto.rpcdump.GetDumpParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcdump.GetDumpParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcdump.GetDumpParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcdump.GetDumpParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcdump.GetDumpParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.rpcdump.GetDumpParam.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.rpcdump.GetDumpParam.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +goog.object.extend(exports, proto.rpcdump); diff --git a/js/proto/rpcevents_grpc_pb.d.ts b/js/proto/rpcevents_grpc_pb.d.ts new file mode 100644 index 000000000..5809fe690 --- /dev/null +++ b/js/proto/rpcevents_grpc_pb.d.ts @@ -0,0 +1,27 @@ +// GENERATED CODE -- DO NOT EDIT! + +// package: rpcevents +// file: rpcevents.proto + +import * as rpcevents_pb from "./rpcevents_pb"; +import * as exec_pb from "./exec_pb"; +import * as grpc from "grpc"; + +interface IExecutionEventsService extends grpc.ServiceDefinition { + stream: grpc.MethodDefinition; + tx: grpc.MethodDefinition; + events: grpc.MethodDefinition; +} + +export const ExecutionEventsService: IExecutionEventsService; + +export class ExecutionEventsClient extends grpc.Client { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + stream(argument: rpcevents_pb.BlocksRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; + stream(argument: rpcevents_pb.BlocksRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; + tx(argument: rpcevents_pb.TxRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + tx(argument: rpcevents_pb.TxRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + tx(argument: rpcevents_pb.TxRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + events(argument: rpcevents_pb.BlocksRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; + events(argument: rpcevents_pb.BlocksRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; +} diff --git a/js/proto/rpcevents_grpc_pb.js b/js/proto/rpcevents_grpc_pb.js new file mode 100644 index 000000000..7e526e52d --- /dev/null +++ b/js/proto/rpcevents_grpc_pb.js @@ -0,0 +1,107 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var rpcevents_pb = require('./rpcevents_pb.js'); +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +var exec_pb = require('./exec_pb.js'); + +function serialize_exec_StreamEvent(arg) { + if (!(arg instanceof exec_pb.StreamEvent)) { + throw new Error('Expected argument of type exec.StreamEvent'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_exec_StreamEvent(buffer_arg) { + return exec_pb.StreamEvent.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_exec_TxExecution(arg) { + if (!(arg instanceof exec_pb.TxExecution)) { + throw new Error('Expected argument of type exec.TxExecution'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_exec_TxExecution(buffer_arg) { + return exec_pb.TxExecution.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcevents_BlocksRequest(arg) { + if (!(arg instanceof rpcevents_pb.BlocksRequest)) { + throw new Error('Expected argument of type rpcevents.BlocksRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcevents_BlocksRequest(buffer_arg) { + return rpcevents_pb.BlocksRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcevents_EventsResponse(arg) { + if (!(arg instanceof rpcevents_pb.EventsResponse)) { + throw new Error('Expected argument of type rpcevents.EventsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcevents_EventsResponse(buffer_arg) { + return rpcevents_pb.EventsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcevents_TxRequest(arg) { + if (!(arg instanceof rpcevents_pb.TxRequest)) { + throw new Error('Expected argument of type rpcevents.TxRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcevents_TxRequest(buffer_arg) { + return rpcevents_pb.TxRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// -------------------------------------------------- +// Execution events +var ExecutionEventsService = exports.ExecutionEventsService = { + // Get StreamEvents (including transactions) for a range of block heights +stream: { + path: '/rpcevents.ExecutionEvents/Stream', + requestStream: false, + responseStream: true, + requestType: rpcevents_pb.BlocksRequest, + responseType: exec_pb.StreamEvent, + requestSerialize: serialize_rpcevents_BlocksRequest, + requestDeserialize: deserialize_rpcevents_BlocksRequest, + responseSerialize: serialize_exec_StreamEvent, + responseDeserialize: deserialize_exec_StreamEvent, + }, + // Get a particular TxExecution by hash +tx: { + path: '/rpcevents.ExecutionEvents/Tx', + requestStream: false, + responseStream: false, + requestType: rpcevents_pb.TxRequest, + responseType: exec_pb.TxExecution, + requestSerialize: serialize_rpcevents_TxRequest, + requestDeserialize: deserialize_rpcevents_TxRequest, + responseSerialize: serialize_exec_TxExecution, + responseDeserialize: deserialize_exec_TxExecution, + }, + // GetEvents provides events streaming one block at a time - that is all events emitted in a particular block +// are guaranteed to be delivered in each GetEventsResponse +events: { + path: '/rpcevents.ExecutionEvents/Events', + requestStream: false, + responseStream: true, + requestType: rpcevents_pb.BlocksRequest, + responseType: rpcevents_pb.EventsResponse, + requestSerialize: serialize_rpcevents_BlocksRequest, + requestDeserialize: deserialize_rpcevents_BlocksRequest, + responseSerialize: serialize_rpcevents_EventsResponse, + responseDeserialize: deserialize_rpcevents_EventsResponse, + }, +}; + +exports.ExecutionEventsClient = grpc.makeGenericClientConstructor(ExecutionEventsService); diff --git a/js/proto/rpcevents_pb.d.ts b/js/proto/rpcevents_pb.d.ts new file mode 100644 index 000000000..c338c5d6d --- /dev/null +++ b/js/proto/rpcevents_pb.d.ts @@ -0,0 +1,225 @@ +// package: rpcevents +// file: rpcevents.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as exec_pb from "./exec_pb"; + +export class GetBlockRequest extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + getWait(): boolean; + setWait(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetBlockRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetBlockRequest): GetBlockRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetBlockRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetBlockRequest; + static deserializeBinaryFromReader(message: GetBlockRequest, reader: jspb.BinaryReader): GetBlockRequest; +} + +export namespace GetBlockRequest { + export type AsObject = { + height: number, + wait: boolean, + } +} + +export class TxRequest extends jspb.Message { + getTxhash(): Uint8Array | string; + getTxhash_asU8(): Uint8Array; + getTxhash_asB64(): string; + setTxhash(value: Uint8Array | string): void; + + getWait(): boolean; + setWait(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxRequest.AsObject; + static toObject(includeInstance: boolean, msg: TxRequest): TxRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxRequest; + static deserializeBinaryFromReader(message: TxRequest, reader: jspb.BinaryReader): TxRequest; +} + +export namespace TxRequest { + export type AsObject = { + txhash: Uint8Array | string, + wait: boolean, + } +} + +export class BlocksRequest extends jspb.Message { + hasBlockrange(): boolean; + clearBlockrange(): void; + getBlockrange(): BlockRange | undefined; + setBlockrange(value?: BlockRange): void; + + getQuery(): string; + setQuery(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlocksRequest.AsObject; + static toObject(includeInstance: boolean, msg: BlocksRequest): BlocksRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlocksRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlocksRequest; + static deserializeBinaryFromReader(message: BlocksRequest, reader: jspb.BinaryReader): BlocksRequest; +} + +export namespace BlocksRequest { + export type AsObject = { + blockrange?: BlockRange.AsObject, + query: string, + } +} + +export class EventsResponse extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): void; + addEvents(value?: exec_pb.Event, index?: number): exec_pb.Event; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EventsResponse.AsObject; + static toObject(includeInstance: boolean, msg: EventsResponse): EventsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EventsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventsResponse; + static deserializeBinaryFromReader(message: EventsResponse, reader: jspb.BinaryReader): EventsResponse; +} + +export namespace EventsResponse { + export type AsObject = { + height: number, + eventsList: Array, + } +} + +export class GetTxsRequest extends jspb.Message { + getStartheight(): number; + setStartheight(value: number): void; + + getEndheight(): number; + setEndheight(value: number): void; + + getQuery(): string; + setQuery(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTxsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetTxsRequest): GetTxsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTxsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTxsRequest; + static deserializeBinaryFromReader(message: GetTxsRequest, reader: jspb.BinaryReader): GetTxsRequest; +} + +export namespace GetTxsRequest { + export type AsObject = { + startheight: number, + endheight: number, + query: string, + } +} + +export class GetTxsResponse extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + clearTxexecutionsList(): void; + getTxexecutionsList(): Array; + setTxexecutionsList(value: Array): void; + addTxexecutions(value?: exec_pb.TxExecution, index?: number): exec_pb.TxExecution; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTxsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetTxsResponse): GetTxsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTxsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTxsResponse; + static deserializeBinaryFromReader(message: GetTxsResponse, reader: jspb.BinaryReader): GetTxsResponse; +} + +export namespace GetTxsResponse { + export type AsObject = { + height: number, + txexecutionsList: Array, + } +} + +export class Bound extends jspb.Message { + getType(): Bound.BoundTypeMap[keyof Bound.BoundTypeMap]; + setType(value: Bound.BoundTypeMap[keyof Bound.BoundTypeMap]): void; + + getIndex(): number; + setIndex(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Bound.AsObject; + static toObject(includeInstance: boolean, msg: Bound): Bound.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Bound, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Bound; + static deserializeBinaryFromReader(message: Bound, reader: jspb.BinaryReader): Bound; +} + +export namespace Bound { + export type AsObject = { + type: Bound.BoundTypeMap[keyof Bound.BoundTypeMap], + index: number, + } + + export interface BoundTypeMap { + ABSOLUTE: 0; + RELATIVE: 1; + FIRST: 2; + LATEST: 3; + STREAM: 4; + } + + export const BoundType: BoundTypeMap; +} + +export class BlockRange extends jspb.Message { + hasStart(): boolean; + clearStart(): void; + getStart(): Bound | undefined; + setStart(value?: Bound): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): Bound | undefined; + setEnd(value?: Bound): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockRange.AsObject; + static toObject(includeInstance: boolean, msg: BlockRange): BlockRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockRange; + static deserializeBinaryFromReader(message: BlockRange, reader: jspb.BinaryReader): BlockRange; +} + +export namespace BlockRange { + export type AsObject = { + start?: Bound.AsObject, + end?: Bound.AsObject, + } +} + diff --git a/js/proto/rpcevents_pb.js b/js/proto/rpcevents_pb.js new file mode 100644 index 000000000..feed93236 --- /dev/null +++ b/js/proto/rpcevents_pb.js @@ -0,0 +1,1595 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var exec_pb = require('./exec_pb.js'); +goog.object.extend(proto, exec_pb); +goog.exportSymbol('proto.rpcevents.BlockRange', null, global); +goog.exportSymbol('proto.rpcevents.BlocksRequest', null, global); +goog.exportSymbol('proto.rpcevents.Bound', null, global); +goog.exportSymbol('proto.rpcevents.Bound.BoundType', null, global); +goog.exportSymbol('proto.rpcevents.EventsResponse', null, global); +goog.exportSymbol('proto.rpcevents.GetBlockRequest', null, global); +goog.exportSymbol('proto.rpcevents.GetTxsRequest', null, global); +goog.exportSymbol('proto.rpcevents.GetTxsResponse', null, global); +goog.exportSymbol('proto.rpcevents.TxRequest', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.GetBlockRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.GetBlockRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.GetBlockRequest.displayName = 'proto.rpcevents.GetBlockRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.TxRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.TxRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.TxRequest.displayName = 'proto.rpcevents.TxRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.BlocksRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.BlocksRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.BlocksRequest.displayName = 'proto.rpcevents.BlocksRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.EventsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcevents.EventsResponse.repeatedFields_, null); +}; +goog.inherits(proto.rpcevents.EventsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.EventsResponse.displayName = 'proto.rpcevents.EventsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.GetTxsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.GetTxsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.GetTxsRequest.displayName = 'proto.rpcevents.GetTxsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.GetTxsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcevents.GetTxsResponse.repeatedFields_, null); +}; +goog.inherits(proto.rpcevents.GetTxsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.GetTxsResponse.displayName = 'proto.rpcevents.GetTxsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.Bound = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.Bound, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.Bound.displayName = 'proto.rpcevents.Bound'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.BlockRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.BlockRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.BlockRange.displayName = 'proto.rpcevents.BlockRange'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstance) { + return proto.rpcevents.GetBlockRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcevents.GetBlockRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.GetBlockRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + wait: jspb.Message.getFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcevents.GetBlockRequest} + */ +proto.rpcevents.GetBlockRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcevents.GetBlockRequest; + return proto.rpcevents.GetBlockRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcevents.GetBlockRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcevents.GetBlockRequest} + */ +proto.rpcevents.GetBlockRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setWait(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcevents.GetBlockRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcevents.GetBlockRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcevents.GetBlockRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.GetBlockRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getWait(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional uint64 Height = 1; + * @return {number} + */ +proto.rpcevents.GetBlockRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.rpcevents.GetBlockRequest.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool Wait = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.rpcevents.GetBlockRequest.prototype.getWait = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.rpcevents.GetBlockRequest.prototype.setWait = function(value) { + jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { + return proto.rpcevents.TxRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcevents.TxRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.TxRequest.toObject = function(includeInstance, msg) { + var f, obj = { + txhash: msg.getTxhash_asB64(), + wait: jspb.Message.getFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcevents.TxRequest} + */ +proto.rpcevents.TxRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcevents.TxRequest; + return proto.rpcevents.TxRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcevents.TxRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcevents.TxRequest} + */ +proto.rpcevents.TxRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxhash(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setWait(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcevents.TxRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcevents.TxRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcevents.TxRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.TxRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxhash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getWait(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bytes TxHash = 1; + * @return {!(string|Uint8Array)} + */ +proto.rpcevents.TxRequest.prototype.getTxhash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes TxHash = 1; + * This is a type-conversion wrapper around `getTxhash()` + * @return {string} + */ +proto.rpcevents.TxRequest.prototype.getTxhash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxhash())); +}; + + +/** + * optional bytes TxHash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxhash()` + * @return {!Uint8Array} + */ +proto.rpcevents.TxRequest.prototype.getTxhash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxhash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpcevents.TxRequest.prototype.setTxhash = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool Wait = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.rpcevents.TxRequest.prototype.getWait = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.rpcevents.TxRequest.prototype.setWait = function(value) { + jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcevents.BlocksRequest.prototype.toObject = function(opt_includeInstance) { + return proto.rpcevents.BlocksRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcevents.BlocksRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.BlocksRequest.toObject = function(includeInstance, msg) { + var f, obj = { + blockrange: (f = msg.getBlockrange()) && proto.rpcevents.BlockRange.toObject(includeInstance, f), + query: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcevents.BlocksRequest} + */ +proto.rpcevents.BlocksRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcevents.BlocksRequest; + return proto.rpcevents.BlocksRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcevents.BlocksRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcevents.BlocksRequest} + */ +proto.rpcevents.BlocksRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.rpcevents.BlockRange; + reader.readMessage(value,proto.rpcevents.BlockRange.deserializeBinaryFromReader); + msg.setBlockrange(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setQuery(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcevents.BlocksRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcevents.BlocksRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcevents.BlocksRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.BlocksRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockrange(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.rpcevents.BlockRange.serializeBinaryToWriter + ); + } + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional BlockRange BlockRange = 1; + * @return {?proto.rpcevents.BlockRange} + */ +proto.rpcevents.BlocksRequest.prototype.getBlockrange = function() { + return /** @type{?proto.rpcevents.BlockRange} */ ( + jspb.Message.getWrapperField(this, proto.rpcevents.BlockRange, 1)); +}; + + +/** @param {?proto.rpcevents.BlockRange|undefined} value */ +proto.rpcevents.BlocksRequest.prototype.setBlockrange = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.rpcevents.BlocksRequest.prototype.clearBlockrange = function() { + this.setBlockrange(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.rpcevents.BlocksRequest.prototype.hasBlockrange = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string Query = 2; + * @return {string} + */ +proto.rpcevents.BlocksRequest.prototype.getQuery = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.rpcevents.BlocksRequest.prototype.setQuery = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.rpcevents.EventsResponse.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcevents.EventsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.rpcevents.EventsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcevents.EventsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.EventsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + exec_pb.Event.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcevents.EventsResponse} + */ +proto.rpcevents.EventsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcevents.EventsResponse; + return proto.rpcevents.EventsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcevents.EventsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcevents.EventsResponse} + */ +proto.rpcevents.EventsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = new exec_pb.Event; + reader.readMessage(value,exec_pb.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcevents.EventsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcevents.EventsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcevents.EventsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.EventsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + exec_pb.Event.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 Height = 1; + * @return {number} + */ +proto.rpcevents.EventsResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.rpcevents.EventsResponse.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated exec.Event Events = 2; + * @return {!Array} + */ +proto.rpcevents.EventsResponse.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, exec_pb.Event, 2)); +}; + + +/** @param {!Array} value */ +proto.rpcevents.EventsResponse.prototype.setEventsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.exec.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.exec.Event} + */ +proto.rpcevents.EventsResponse.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.exec.Event, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.rpcevents.EventsResponse.prototype.clearEventsList = function() { + this.setEventsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcevents.GetTxsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.rpcevents.GetTxsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcevents.GetTxsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.GetTxsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + startheight: jspb.Message.getFieldWithDefault(msg, 1, 0), + endheight: jspb.Message.getFieldWithDefault(msg, 2, 0), + query: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcevents.GetTxsRequest} + */ +proto.rpcevents.GetTxsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcevents.GetTxsRequest; + return proto.rpcevents.GetTxsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcevents.GetTxsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcevents.GetTxsRequest} + */ +proto.rpcevents.GetTxsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartheight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setEndheight(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setQuery(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcevents.GetTxsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcevents.GetTxsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcevents.GetTxsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.GetTxsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartheight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getEndheight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional uint64 StartHeight = 1; + * @return {number} + */ +proto.rpcevents.GetTxsRequest.prototype.getStartheight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.rpcevents.GetTxsRequest.prototype.setStartheight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 EndHeight = 2; + * @return {number} + */ +proto.rpcevents.GetTxsRequest.prototype.getEndheight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.rpcevents.GetTxsRequest.prototype.setEndheight = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string Query = 3; + * @return {string} + */ +proto.rpcevents.GetTxsRequest.prototype.getQuery = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.rpcevents.GetTxsRequest.prototype.setQuery = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.rpcevents.GetTxsResponse.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcevents.GetTxsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.rpcevents.GetTxsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcevents.GetTxsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.GetTxsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + txexecutionsList: jspb.Message.toObjectList(msg.getTxexecutionsList(), + exec_pb.TxExecution.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcevents.GetTxsResponse} + */ +proto.rpcevents.GetTxsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcevents.GetTxsResponse; + return proto.rpcevents.GetTxsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcevents.GetTxsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcevents.GetTxsResponse} + */ +proto.rpcevents.GetTxsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = new exec_pb.TxExecution; + reader.readMessage(value,exec_pb.TxExecution.deserializeBinaryFromReader); + msg.addTxexecutions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcevents.GetTxsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcevents.GetTxsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcevents.GetTxsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.GetTxsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getTxexecutionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + exec_pb.TxExecution.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 Height = 1; + * @return {number} + */ +proto.rpcevents.GetTxsResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.rpcevents.GetTxsResponse.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated exec.TxExecution TxExecutions = 2; + * @return {!Array} + */ +proto.rpcevents.GetTxsResponse.prototype.getTxexecutionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, exec_pb.TxExecution, 2)); +}; + + +/** @param {!Array} value */ +proto.rpcevents.GetTxsResponse.prototype.setTxexecutionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.exec.TxExecution=} opt_value + * @param {number=} opt_index + * @return {!proto.exec.TxExecution} + */ +proto.rpcevents.GetTxsResponse.prototype.addTxexecutions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.exec.TxExecution, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.rpcevents.GetTxsResponse.prototype.clearTxexecutionsList = function() { + this.setTxexecutionsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcevents.Bound.prototype.toObject = function(opt_includeInstance) { + return proto.rpcevents.Bound.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcevents.Bound} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.Bound.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + index: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcevents.Bound} + */ +proto.rpcevents.Bound.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcevents.Bound; + return proto.rpcevents.Bound.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcevents.Bound} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcevents.Bound} + */ +proto.rpcevents.Bound.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.rpcevents.Bound.BoundType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIndex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcevents.Bound.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcevents.Bound.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcevents.Bound} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.Bound.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.rpcevents.Bound.BoundType = { + ABSOLUTE: 0, + RELATIVE: 1, + FIRST: 2, + LATEST: 3, + STREAM: 4 +}; + +/** + * optional BoundType Type = 1; + * @return {!proto.rpcevents.Bound.BoundType} + */ +proto.rpcevents.Bound.prototype.getType = function() { + return /** @type {!proto.rpcevents.Bound.BoundType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.rpcevents.Bound.BoundType} value */ +proto.rpcevents.Bound.prototype.setType = function(value) { + jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional uint64 Index = 2; + * @return {number} + */ +proto.rpcevents.Bound.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.rpcevents.Bound.prototype.setIndex = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcevents.BlockRange.prototype.toObject = function(opt_includeInstance) { + return proto.rpcevents.BlockRange.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcevents.BlockRange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.BlockRange.toObject = function(includeInstance, msg) { + var f, obj = { + start: (f = msg.getStart()) && proto.rpcevents.Bound.toObject(includeInstance, f), + end: (f = msg.getEnd()) && proto.rpcevents.Bound.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcevents.BlockRange} + */ +proto.rpcevents.BlockRange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcevents.BlockRange; + return proto.rpcevents.BlockRange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcevents.BlockRange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcevents.BlockRange} + */ +proto.rpcevents.BlockRange.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.rpcevents.Bound; + reader.readMessage(value,proto.rpcevents.Bound.deserializeBinaryFromReader); + msg.setStart(value); + break; + case 2: + var value = new proto.rpcevents.Bound; + reader.readMessage(value,proto.rpcevents.Bound.deserializeBinaryFromReader); + msg.setEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcevents.BlockRange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcevents.BlockRange.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcevents.BlockRange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcevents.BlockRange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStart(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.rpcevents.Bound.serializeBinaryToWriter + ); + } + f = message.getEnd(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.rpcevents.Bound.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Bound Start = 1; + * @return {?proto.rpcevents.Bound} + */ +proto.rpcevents.BlockRange.prototype.getStart = function() { + return /** @type{?proto.rpcevents.Bound} */ ( + jspb.Message.getWrapperField(this, proto.rpcevents.Bound, 1)); +}; + + +/** @param {?proto.rpcevents.Bound|undefined} value */ +proto.rpcevents.BlockRange.prototype.setStart = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.rpcevents.BlockRange.prototype.clearStart = function() { + this.setStart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.rpcevents.BlockRange.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Bound End = 2; + * @return {?proto.rpcevents.Bound} + */ +proto.rpcevents.BlockRange.prototype.getEnd = function() { + return /** @type{?proto.rpcevents.Bound} */ ( + jspb.Message.getWrapperField(this, proto.rpcevents.Bound, 2)); +}; + + +/** @param {?proto.rpcevents.Bound|undefined} value */ +proto.rpcevents.BlockRange.prototype.setEnd = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.rpcevents.BlockRange.prototype.clearEnd = function() { + this.setEnd(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.rpcevents.BlockRange.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.rpcevents); diff --git a/js/proto/rpcquery_grpc_pb.d.ts b/js/proto/rpcquery_grpc_pb.d.ts new file mode 100644 index 000000000..9c48ba004 --- /dev/null +++ b/js/proto/rpcquery_grpc_pb.d.ts @@ -0,0 +1,74 @@ +// GENERATED CODE -- DO NOT EDIT! + +// package: rpcquery +// file: rpcquery.proto + +import * as rpcquery_pb from "./rpcquery_pb"; +import * as github_com_tendermint_tendermint_abci_types_types_pb from "./github.com/tendermint/tendermint/abci/types/types_pb"; +import * as names_pb from "./names_pb"; +import * as acm_pb from "./acm_pb"; +import * as rpc_pb from "./rpc_pb"; +import * as payload_pb from "./payload_pb"; +import * as grpc from "grpc"; + +interface IQueryService extends grpc.ServiceDefinition { + status: grpc.MethodDefinition; + getAccount: grpc.MethodDefinition; + getMetadata: grpc.MethodDefinition; + getStorage: grpc.MethodDefinition; + listAccounts: grpc.MethodDefinition; + getName: grpc.MethodDefinition; + listNames: grpc.MethodDefinition; + getNetworkRegistry: grpc.MethodDefinition; + getValidatorSet: grpc.MethodDefinition; + getValidatorSetHistory: grpc.MethodDefinition; + getProposal: grpc.MethodDefinition; + listProposals: grpc.MethodDefinition; + getStats: grpc.MethodDefinition; + getBlockHeader: grpc.MethodDefinition; +} + +export const QueryService: IQueryService; + +export class QueryClient extends grpc.Client { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + status(argument: rpcquery_pb.StatusParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + status(argument: rpcquery_pb.StatusParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + status(argument: rpcquery_pb.StatusParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getAccount(argument: rpcquery_pb.GetAccountParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getAccount(argument: rpcquery_pb.GetAccountParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getAccount(argument: rpcquery_pb.GetAccountParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getMetadata(argument: rpcquery_pb.GetMetadataParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getMetadata(argument: rpcquery_pb.GetMetadataParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getMetadata(argument: rpcquery_pb.GetMetadataParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getStorage(argument: rpcquery_pb.GetStorageParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getStorage(argument: rpcquery_pb.GetStorageParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getStorage(argument: rpcquery_pb.GetStorageParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + listAccounts(argument: rpcquery_pb.ListAccountsParam, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; + listAccounts(argument: rpcquery_pb.ListAccountsParam, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; + getName(argument: rpcquery_pb.GetNameParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getName(argument: rpcquery_pb.GetNameParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getName(argument: rpcquery_pb.GetNameParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + listNames(argument: rpcquery_pb.ListNamesParam, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; + listNames(argument: rpcquery_pb.ListNamesParam, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; + getNetworkRegistry(argument: rpcquery_pb.GetNetworkRegistryParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getNetworkRegistry(argument: rpcquery_pb.GetNetworkRegistryParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getNetworkRegistry(argument: rpcquery_pb.GetNetworkRegistryParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getValidatorSet(argument: rpcquery_pb.GetValidatorSetParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getValidatorSet(argument: rpcquery_pb.GetValidatorSetParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getValidatorSet(argument: rpcquery_pb.GetValidatorSetParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getValidatorSetHistory(argument: rpcquery_pb.GetValidatorSetHistoryParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getValidatorSetHistory(argument: rpcquery_pb.GetValidatorSetHistoryParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getValidatorSetHistory(argument: rpcquery_pb.GetValidatorSetHistoryParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getProposal(argument: rpcquery_pb.GetProposalParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getProposal(argument: rpcquery_pb.GetProposalParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getProposal(argument: rpcquery_pb.GetProposalParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + listProposals(argument: rpcquery_pb.ListProposalsParam, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; + listProposals(argument: rpcquery_pb.ListProposalsParam, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; + getStats(argument: rpcquery_pb.GetStatsParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getStats(argument: rpcquery_pb.GetStatsParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getStats(argument: rpcquery_pb.GetStatsParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getBlockHeader(argument: rpcquery_pb.GetBlockParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getBlockHeader(argument: rpcquery_pb.GetBlockParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getBlockHeader(argument: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; +} diff --git a/js/proto/rpcquery_grpc_pb.js b/js/proto/rpcquery_grpc_pb.js new file mode 100644 index 000000000..30f7f0af9 --- /dev/null +++ b/js/proto/rpcquery_grpc_pb.js @@ -0,0 +1,460 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var rpcquery_pb = require('./rpcquery_pb.js'); +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +var github_com_tendermint_tendermint_abci_types_types_pb = require('./github.com/tendermint/tendermint/abci/types/types_pb.js'); +var names_pb = require('./names_pb.js'); +var acm_pb = require('./acm_pb.js'); +var validator_pb = require('./validator_pb.js'); +var registry_pb = require('./registry_pb.js'); +var rpc_pb = require('./rpc_pb.js'); +var payload_pb = require('./payload_pb.js'); + +function serialize_acm_Account(arg) { + if (!(arg instanceof acm_pb.Account)) { + throw new Error('Expected argument of type acm.Account'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_acm_Account(buffer_arg) { + return acm_pb.Account.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_names_Entry(arg) { + if (!(arg instanceof names_pb.Entry)) { + throw new Error('Expected argument of type names.Entry'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_names_Entry(buffer_arg) { + return names_pb.Entry.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_payload_Ballot(arg) { + if (!(arg instanceof payload_pb.Ballot)) { + throw new Error('Expected argument of type payload.Ballot'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_payload_Ballot(buffer_arg) { + return payload_pb.Ballot.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpc_ResultStatus(arg) { + if (!(arg instanceof rpc_pb.ResultStatus)) { + throw new Error('Expected argument of type rpc.ResultStatus'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpc_ResultStatus(buffer_arg) { + return rpc_pb.ResultStatus.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_GetAccountParam(arg) { + if (!(arg instanceof rpcquery_pb.GetAccountParam)) { + throw new Error('Expected argument of type rpcquery.GetAccountParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_GetAccountParam(buffer_arg) { + return rpcquery_pb.GetAccountParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_GetBlockParam(arg) { + if (!(arg instanceof rpcquery_pb.GetBlockParam)) { + throw new Error('Expected argument of type rpcquery.GetBlockParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_GetBlockParam(buffer_arg) { + return rpcquery_pb.GetBlockParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_GetMetadataParam(arg) { + if (!(arg instanceof rpcquery_pb.GetMetadataParam)) { + throw new Error('Expected argument of type rpcquery.GetMetadataParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_GetMetadataParam(buffer_arg) { + return rpcquery_pb.GetMetadataParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_GetNameParam(arg) { + if (!(arg instanceof rpcquery_pb.GetNameParam)) { + throw new Error('Expected argument of type rpcquery.GetNameParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_GetNameParam(buffer_arg) { + return rpcquery_pb.GetNameParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_GetNetworkRegistryParam(arg) { + if (!(arg instanceof rpcquery_pb.GetNetworkRegistryParam)) { + throw new Error('Expected argument of type rpcquery.GetNetworkRegistryParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_GetNetworkRegistryParam(buffer_arg) { + return rpcquery_pb.GetNetworkRegistryParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_GetProposalParam(arg) { + if (!(arg instanceof rpcquery_pb.GetProposalParam)) { + throw new Error('Expected argument of type rpcquery.GetProposalParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_GetProposalParam(buffer_arg) { + return rpcquery_pb.GetProposalParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_GetStatsParam(arg) { + if (!(arg instanceof rpcquery_pb.GetStatsParam)) { + throw new Error('Expected argument of type rpcquery.GetStatsParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_GetStatsParam(buffer_arg) { + return rpcquery_pb.GetStatsParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_GetStorageParam(arg) { + if (!(arg instanceof rpcquery_pb.GetStorageParam)) { + throw new Error('Expected argument of type rpcquery.GetStorageParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_GetStorageParam(buffer_arg) { + return rpcquery_pb.GetStorageParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_GetValidatorSetHistoryParam(arg) { + if (!(arg instanceof rpcquery_pb.GetValidatorSetHistoryParam)) { + throw new Error('Expected argument of type rpcquery.GetValidatorSetHistoryParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_GetValidatorSetHistoryParam(buffer_arg) { + return rpcquery_pb.GetValidatorSetHistoryParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_GetValidatorSetParam(arg) { + if (!(arg instanceof rpcquery_pb.GetValidatorSetParam)) { + throw new Error('Expected argument of type rpcquery.GetValidatorSetParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_GetValidatorSetParam(buffer_arg) { + return rpcquery_pb.GetValidatorSetParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_ListAccountsParam(arg) { + if (!(arg instanceof rpcquery_pb.ListAccountsParam)) { + throw new Error('Expected argument of type rpcquery.ListAccountsParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_ListAccountsParam(buffer_arg) { + return rpcquery_pb.ListAccountsParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_ListNamesParam(arg) { + if (!(arg instanceof rpcquery_pb.ListNamesParam)) { + throw new Error('Expected argument of type rpcquery.ListNamesParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_ListNamesParam(buffer_arg) { + return rpcquery_pb.ListNamesParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_ListProposalsParam(arg) { + if (!(arg instanceof rpcquery_pb.ListProposalsParam)) { + throw new Error('Expected argument of type rpcquery.ListProposalsParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_ListProposalsParam(buffer_arg) { + return rpcquery_pb.ListProposalsParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_MetadataResult(arg) { + if (!(arg instanceof rpcquery_pb.MetadataResult)) { + throw new Error('Expected argument of type rpcquery.MetadataResult'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_MetadataResult(buffer_arg) { + return rpcquery_pb.MetadataResult.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_NetworkRegistry(arg) { + if (!(arg instanceof rpcquery_pb.NetworkRegistry)) { + throw new Error('Expected argument of type rpcquery.NetworkRegistry'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_NetworkRegistry(buffer_arg) { + return rpcquery_pb.NetworkRegistry.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_ProposalResult(arg) { + if (!(arg instanceof rpcquery_pb.ProposalResult)) { + throw new Error('Expected argument of type rpcquery.ProposalResult'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_ProposalResult(buffer_arg) { + return rpcquery_pb.ProposalResult.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_Stats(arg) { + if (!(arg instanceof rpcquery_pb.Stats)) { + throw new Error('Expected argument of type rpcquery.Stats'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_Stats(buffer_arg) { + return rpcquery_pb.Stats.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_StatusParam(arg) { + if (!(arg instanceof rpcquery_pb.StatusParam)) { + throw new Error('Expected argument of type rpcquery.StatusParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_StatusParam(buffer_arg) { + return rpcquery_pb.StatusParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_StorageValue(arg) { + if (!(arg instanceof rpcquery_pb.StorageValue)) { + throw new Error('Expected argument of type rpcquery.StorageValue'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_StorageValue(buffer_arg) { + return rpcquery_pb.StorageValue.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_ValidatorSet(arg) { + if (!(arg instanceof rpcquery_pb.ValidatorSet)) { + throw new Error('Expected argument of type rpcquery.ValidatorSet'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_ValidatorSet(buffer_arg) { + return rpcquery_pb.ValidatorSet.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpcquery_ValidatorSetHistory(arg) { + if (!(arg instanceof rpcquery_pb.ValidatorSetHistory)) { + throw new Error('Expected argument of type rpcquery.ValidatorSetHistory'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpcquery_ValidatorSetHistory(buffer_arg) { + return rpcquery_pb.ValidatorSetHistory.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_types_Header(arg) { + if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.Header)) { + throw new Error('Expected argument of type types.Header'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_types_Header(buffer_arg) { + return github_com_tendermint_tendermint_abci_types_types_pb.Header.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var QueryService = exports.QueryService = { + status: { + path: '/rpcquery.Query/Status', + requestStream: false, + responseStream: false, + requestType: rpcquery_pb.StatusParam, + responseType: rpc_pb.ResultStatus, + requestSerialize: serialize_rpcquery_StatusParam, + requestDeserialize: deserialize_rpcquery_StatusParam, + responseSerialize: serialize_rpc_ResultStatus, + responseDeserialize: deserialize_rpc_ResultStatus, + }, + getAccount: { + path: '/rpcquery.Query/GetAccount', + requestStream: false, + responseStream: false, + requestType: rpcquery_pb.GetAccountParam, + responseType: acm_pb.Account, + requestSerialize: serialize_rpcquery_GetAccountParam, + requestDeserialize: deserialize_rpcquery_GetAccountParam, + responseSerialize: serialize_acm_Account, + responseDeserialize: deserialize_acm_Account, + }, + getMetadata: { + path: '/rpcquery.Query/GetMetadata', + requestStream: false, + responseStream: false, + requestType: rpcquery_pb.GetMetadataParam, + responseType: rpcquery_pb.MetadataResult, + requestSerialize: serialize_rpcquery_GetMetadataParam, + requestDeserialize: deserialize_rpcquery_GetMetadataParam, + responseSerialize: serialize_rpcquery_MetadataResult, + responseDeserialize: deserialize_rpcquery_MetadataResult, + }, + getStorage: { + path: '/rpcquery.Query/GetStorage', + requestStream: false, + responseStream: false, + requestType: rpcquery_pb.GetStorageParam, + responseType: rpcquery_pb.StorageValue, + requestSerialize: serialize_rpcquery_GetStorageParam, + requestDeserialize: deserialize_rpcquery_GetStorageParam, + responseSerialize: serialize_rpcquery_StorageValue, + responseDeserialize: deserialize_rpcquery_StorageValue, + }, + listAccounts: { + path: '/rpcquery.Query/ListAccounts', + requestStream: false, + responseStream: true, + requestType: rpcquery_pb.ListAccountsParam, + responseType: acm_pb.Account, + requestSerialize: serialize_rpcquery_ListAccountsParam, + requestDeserialize: deserialize_rpcquery_ListAccountsParam, + responseSerialize: serialize_acm_Account, + responseDeserialize: deserialize_acm_Account, + }, + getName: { + path: '/rpcquery.Query/GetName', + requestStream: false, + responseStream: false, + requestType: rpcquery_pb.GetNameParam, + responseType: names_pb.Entry, + requestSerialize: serialize_rpcquery_GetNameParam, + requestDeserialize: deserialize_rpcquery_GetNameParam, + responseSerialize: serialize_names_Entry, + responseDeserialize: deserialize_names_Entry, + }, + listNames: { + path: '/rpcquery.Query/ListNames', + requestStream: false, + responseStream: true, + requestType: rpcquery_pb.ListNamesParam, + responseType: names_pb.Entry, + requestSerialize: serialize_rpcquery_ListNamesParam, + requestDeserialize: deserialize_rpcquery_ListNamesParam, + responseSerialize: serialize_names_Entry, + responseDeserialize: deserialize_names_Entry, + }, + // GetNetworkRegistry returns for each validator address, the list of their identified node at the current state +getNetworkRegistry: { + path: '/rpcquery.Query/GetNetworkRegistry', + requestStream: false, + responseStream: false, + requestType: rpcquery_pb.GetNetworkRegistryParam, + responseType: rpcquery_pb.NetworkRegistry, + requestSerialize: serialize_rpcquery_GetNetworkRegistryParam, + requestDeserialize: deserialize_rpcquery_GetNetworkRegistryParam, + responseSerialize: serialize_rpcquery_NetworkRegistry, + responseDeserialize: deserialize_rpcquery_NetworkRegistry, + }, + getValidatorSet: { + path: '/rpcquery.Query/GetValidatorSet', + requestStream: false, + responseStream: false, + requestType: rpcquery_pb.GetValidatorSetParam, + responseType: rpcquery_pb.ValidatorSet, + requestSerialize: serialize_rpcquery_GetValidatorSetParam, + requestDeserialize: deserialize_rpcquery_GetValidatorSetParam, + responseSerialize: serialize_rpcquery_ValidatorSet, + responseDeserialize: deserialize_rpcquery_ValidatorSet, + }, + getValidatorSetHistory: { + path: '/rpcquery.Query/GetValidatorSetHistory', + requestStream: false, + responseStream: false, + requestType: rpcquery_pb.GetValidatorSetHistoryParam, + responseType: rpcquery_pb.ValidatorSetHistory, + requestSerialize: serialize_rpcquery_GetValidatorSetHistoryParam, + requestDeserialize: deserialize_rpcquery_GetValidatorSetHistoryParam, + responseSerialize: serialize_rpcquery_ValidatorSetHistory, + responseDeserialize: deserialize_rpcquery_ValidatorSetHistory, + }, + getProposal: { + path: '/rpcquery.Query/GetProposal', + requestStream: false, + responseStream: false, + requestType: rpcquery_pb.GetProposalParam, + responseType: payload_pb.Ballot, + requestSerialize: serialize_rpcquery_GetProposalParam, + requestDeserialize: deserialize_rpcquery_GetProposalParam, + responseSerialize: serialize_payload_Ballot, + responseDeserialize: deserialize_payload_Ballot, + }, + listProposals: { + path: '/rpcquery.Query/ListProposals', + requestStream: false, + responseStream: true, + requestType: rpcquery_pb.ListProposalsParam, + responseType: rpcquery_pb.ProposalResult, + requestSerialize: serialize_rpcquery_ListProposalsParam, + requestDeserialize: deserialize_rpcquery_ListProposalsParam, + responseSerialize: serialize_rpcquery_ProposalResult, + responseDeserialize: deserialize_rpcquery_ProposalResult, + }, + getStats: { + path: '/rpcquery.Query/GetStats', + requestStream: false, + responseStream: false, + requestType: rpcquery_pb.GetStatsParam, + responseType: rpcquery_pb.Stats, + requestSerialize: serialize_rpcquery_GetStatsParam, + requestDeserialize: deserialize_rpcquery_GetStatsParam, + responseSerialize: serialize_rpcquery_Stats, + responseDeserialize: deserialize_rpcquery_Stats, + }, + getBlockHeader: { + path: '/rpcquery.Query/GetBlockHeader', + requestStream: false, + responseStream: false, + requestType: rpcquery_pb.GetBlockParam, + responseType: github_com_tendermint_tendermint_abci_types_types_pb.Header, + requestSerialize: serialize_rpcquery_GetBlockParam, + requestDeserialize: deserialize_rpcquery_GetBlockParam, + responseSerialize: serialize_types_Header, + responseDeserialize: deserialize_types_Header, + }, +}; + +exports.QueryClient = grpc.makeGenericClientConstructor(QueryService); diff --git a/js/proto/rpcquery_pb.d.ts b/js/proto/rpcquery_pb.d.ts new file mode 100644 index 000000000..129bf6aca --- /dev/null +++ b/js/proto/rpcquery_pb.d.ts @@ -0,0 +1,497 @@ +// package: rpcquery +// file: rpcquery.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as github_com_tendermint_tendermint_abci_types_types_pb from "./github.com/tendermint/tendermint/abci/types/types_pb"; +import * as names_pb from "./names_pb"; +import * as acm_pb from "./acm_pb"; +import * as validator_pb from "./validator_pb"; +import * as registry_pb from "./registry_pb"; +import * as rpc_pb from "./rpc_pb"; +import * as payload_pb from "./payload_pb"; + +export class StatusParam extends jspb.Message { + getBlocktimewithin(): string; + setBlocktimewithin(value: string): void; + + getBlockseentimewithin(): string; + setBlockseentimewithin(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StatusParam.AsObject; + static toObject(includeInstance: boolean, msg: StatusParam): StatusParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StatusParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StatusParam; + static deserializeBinaryFromReader(message: StatusParam, reader: jspb.BinaryReader): StatusParam; +} + +export namespace StatusParam { + export type AsObject = { + blocktimewithin: string, + blockseentimewithin: string, + } +} + +export class GetAccountParam extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetAccountParam.AsObject; + static toObject(includeInstance: boolean, msg: GetAccountParam): GetAccountParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetAccountParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetAccountParam; + static deserializeBinaryFromReader(message: GetAccountParam, reader: jspb.BinaryReader): GetAccountParam; +} + +export namespace GetAccountParam { + export type AsObject = { + address: Uint8Array | string, + } +} + +export class GetMetadataParam extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getMetadatahash(): Uint8Array | string; + getMetadatahash_asU8(): Uint8Array; + getMetadatahash_asB64(): string; + setMetadatahash(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetMetadataParam.AsObject; + static toObject(includeInstance: boolean, msg: GetMetadataParam): GetMetadataParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetMetadataParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetMetadataParam; + static deserializeBinaryFromReader(message: GetMetadataParam, reader: jspb.BinaryReader): GetMetadataParam; +} + +export namespace GetMetadataParam { + export type AsObject = { + address: Uint8Array | string, + metadatahash: Uint8Array | string, + } +} + +export class MetadataResult extends jspb.Message { + getMetadata(): string; + setMetadata(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MetadataResult.AsObject; + static toObject(includeInstance: boolean, msg: MetadataResult): MetadataResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MetadataResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MetadataResult; + static deserializeBinaryFromReader(message: MetadataResult, reader: jspb.BinaryReader): MetadataResult; +} + +export namespace MetadataResult { + export type AsObject = { + metadata: string, + } +} + +export class GetStorageParam extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStorageParam.AsObject; + static toObject(includeInstance: boolean, msg: GetStorageParam): GetStorageParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetStorageParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStorageParam; + static deserializeBinaryFromReader(message: GetStorageParam, reader: jspb.BinaryReader): GetStorageParam; +} + +export namespace GetStorageParam { + export type AsObject = { + address: Uint8Array | string, + key: Uint8Array | string, + } +} + +export class StorageValue extends jspb.Message { + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StorageValue.AsObject; + static toObject(includeInstance: boolean, msg: StorageValue): StorageValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StorageValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StorageValue; + static deserializeBinaryFromReader(message: StorageValue, reader: jspb.BinaryReader): StorageValue; +} + +export namespace StorageValue { + export type AsObject = { + value: Uint8Array | string, + } +} + +export class ListAccountsParam extends jspb.Message { + getQuery(): string; + setQuery(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListAccountsParam.AsObject; + static toObject(includeInstance: boolean, msg: ListAccountsParam): ListAccountsParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListAccountsParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListAccountsParam; + static deserializeBinaryFromReader(message: ListAccountsParam, reader: jspb.BinaryReader): ListAccountsParam; +} + +export namespace ListAccountsParam { + export type AsObject = { + query: string, + } +} + +export class GetNameParam extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetNameParam.AsObject; + static toObject(includeInstance: boolean, msg: GetNameParam): GetNameParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetNameParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetNameParam; + static deserializeBinaryFromReader(message: GetNameParam, reader: jspb.BinaryReader): GetNameParam; +} + +export namespace GetNameParam { + export type AsObject = { + name: string, + } +} + +export class ListNamesParam extends jspb.Message { + getQuery(): string; + setQuery(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListNamesParam.AsObject; + static toObject(includeInstance: boolean, msg: ListNamesParam): ListNamesParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListNamesParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListNamesParam; + static deserializeBinaryFromReader(message: ListNamesParam, reader: jspb.BinaryReader): ListNamesParam; +} + +export namespace ListNamesParam { + export type AsObject = { + query: string, + } +} + +export class GetNetworkRegistryParam extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetNetworkRegistryParam.AsObject; + static toObject(includeInstance: boolean, msg: GetNetworkRegistryParam): GetNetworkRegistryParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetNetworkRegistryParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetNetworkRegistryParam; + static deserializeBinaryFromReader(message: GetNetworkRegistryParam, reader: jspb.BinaryReader): GetNetworkRegistryParam; +} + +export namespace GetNetworkRegistryParam { + export type AsObject = { + } +} + +export class GetValidatorSetParam extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetValidatorSetParam.AsObject; + static toObject(includeInstance: boolean, msg: GetValidatorSetParam): GetValidatorSetParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetValidatorSetParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetValidatorSetParam; + static deserializeBinaryFromReader(message: GetValidatorSetParam, reader: jspb.BinaryReader): GetValidatorSetParam; +} + +export namespace GetValidatorSetParam { + export type AsObject = { + } +} + +export class GetValidatorSetHistoryParam extends jspb.Message { + getIncludeprevious(): number; + setIncludeprevious(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetValidatorSetHistoryParam.AsObject; + static toObject(includeInstance: boolean, msg: GetValidatorSetHistoryParam): GetValidatorSetHistoryParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetValidatorSetHistoryParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetValidatorSetHistoryParam; + static deserializeBinaryFromReader(message: GetValidatorSetHistoryParam, reader: jspb.BinaryReader): GetValidatorSetHistoryParam; +} + +export namespace GetValidatorSetHistoryParam { + export type AsObject = { + includeprevious: number, + } +} + +export class NetworkRegistry extends jspb.Message { + clearSetList(): void; + getSetList(): Array; + setSetList(value: Array): void; + addSet(value?: RegisteredValidator, index?: number): RegisteredValidator; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NetworkRegistry.AsObject; + static toObject(includeInstance: boolean, msg: NetworkRegistry): NetworkRegistry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NetworkRegistry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NetworkRegistry; + static deserializeBinaryFromReader(message: NetworkRegistry, reader: jspb.BinaryReader): NetworkRegistry; +} + +export namespace NetworkRegistry { + export type AsObject = { + setList: Array, + } +} + +export class RegisteredValidator extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + hasNode(): boolean; + clearNode(): void; + getNode(): registry_pb.NodeIdentity | undefined; + setNode(value?: registry_pb.NodeIdentity): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RegisteredValidator.AsObject; + static toObject(includeInstance: boolean, msg: RegisteredValidator): RegisteredValidator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RegisteredValidator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RegisteredValidator; + static deserializeBinaryFromReader(message: RegisteredValidator, reader: jspb.BinaryReader): RegisteredValidator; +} + +export namespace RegisteredValidator { + export type AsObject = { + address: Uint8Array | string, + node?: registry_pb.NodeIdentity.AsObject, + } +} + +export class ValidatorSetHistory extends jspb.Message { + clearHistoryList(): void; + getHistoryList(): Array; + setHistoryList(value: Array): void; + addHistory(value?: ValidatorSet, index?: number): ValidatorSet; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidatorSetHistory.AsObject; + static toObject(includeInstance: boolean, msg: ValidatorSetHistory): ValidatorSetHistory.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValidatorSetHistory, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidatorSetHistory; + static deserializeBinaryFromReader(message: ValidatorSetHistory, reader: jspb.BinaryReader): ValidatorSetHistory; +} + +export namespace ValidatorSetHistory { + export type AsObject = { + historyList: Array, + } +} + +export class ValidatorSet extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + clearSetList(): void; + getSetList(): Array; + setSetList(value: Array): void; + addSet(value?: validator_pb.Validator, index?: number): validator_pb.Validator; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidatorSet.AsObject; + static toObject(includeInstance: boolean, msg: ValidatorSet): ValidatorSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValidatorSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidatorSet; + static deserializeBinaryFromReader(message: ValidatorSet, reader: jspb.BinaryReader): ValidatorSet; +} + +export namespace ValidatorSet { + export type AsObject = { + height: number, + setList: Array, + } +} + +export class GetProposalParam extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetProposalParam.AsObject; + static toObject(includeInstance: boolean, msg: GetProposalParam): GetProposalParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetProposalParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetProposalParam; + static deserializeBinaryFromReader(message: GetProposalParam, reader: jspb.BinaryReader): GetProposalParam; +} + +export namespace GetProposalParam { + export type AsObject = { + hash: Uint8Array | string, + } +} + +export class ListProposalsParam extends jspb.Message { + getProposed(): boolean; + setProposed(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListProposalsParam.AsObject; + static toObject(includeInstance: boolean, msg: ListProposalsParam): ListProposalsParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListProposalsParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListProposalsParam; + static deserializeBinaryFromReader(message: ListProposalsParam, reader: jspb.BinaryReader): ListProposalsParam; +} + +export namespace ListProposalsParam { + export type AsObject = { + proposed: boolean, + } +} + +export class ProposalResult extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + + hasBallot(): boolean; + clearBallot(): void; + getBallot(): payload_pb.Ballot | undefined; + setBallot(value?: payload_pb.Ballot): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProposalResult.AsObject; + static toObject(includeInstance: boolean, msg: ProposalResult): ProposalResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProposalResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProposalResult; + static deserializeBinaryFromReader(message: ProposalResult, reader: jspb.BinaryReader): ProposalResult; +} + +export namespace ProposalResult { + export type AsObject = { + hash: Uint8Array | string, + ballot?: payload_pb.Ballot.AsObject, + } +} + +export class GetStatsParam extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStatsParam.AsObject; + static toObject(includeInstance: boolean, msg: GetStatsParam): GetStatsParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetStatsParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStatsParam; + static deserializeBinaryFromReader(message: GetStatsParam, reader: jspb.BinaryReader): GetStatsParam; +} + +export namespace GetStatsParam { + export type AsObject = { + } +} + +export class Stats extends jspb.Message { + getAccountswithcode(): number; + setAccountswithcode(value: number): void; + + getAccountswithoutcode(): number; + setAccountswithoutcode(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Stats.AsObject; + static toObject(includeInstance: boolean, msg: Stats): Stats.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Stats, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Stats; + static deserializeBinaryFromReader(message: Stats, reader: jspb.BinaryReader): Stats; +} + +export namespace Stats { + export type AsObject = { + accountswithcode: number, + accountswithoutcode: number, + } +} + +export class GetBlockParam extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetBlockParam.AsObject; + static toObject(includeInstance: boolean, msg: GetBlockParam): GetBlockParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetBlockParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetBlockParam; + static deserializeBinaryFromReader(message: GetBlockParam, reader: jspb.BinaryReader): GetBlockParam; +} + +export namespace GetBlockParam { + export type AsObject = { + height: number, + } +} + diff --git a/js/proto/rpcquery_pb.js b/js/proto/rpcquery_pb.js new file mode 100644 index 000000000..f013bb83f --- /dev/null +++ b/js/proto/rpcquery_pb.js @@ -0,0 +1,3720 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var github_com_tendermint_tendermint_abci_types_types_pb = require('./github.com/tendermint/tendermint/abci/types/types_pb.js'); +goog.object.extend(proto, github_com_tendermint_tendermint_abci_types_types_pb); +var names_pb = require('./names_pb.js'); +goog.object.extend(proto, names_pb); +var acm_pb = require('./acm_pb.js'); +goog.object.extend(proto, acm_pb); +var validator_pb = require('./validator_pb.js'); +goog.object.extend(proto, validator_pb); +var registry_pb = require('./registry_pb.js'); +goog.object.extend(proto, registry_pb); +var rpc_pb = require('./rpc_pb.js'); +goog.object.extend(proto, rpc_pb); +var payload_pb = require('./payload_pb.js'); +goog.object.extend(proto, payload_pb); +goog.exportSymbol('proto.rpcquery.GetAccountParam', null, global); +goog.exportSymbol('proto.rpcquery.GetBlockParam', null, global); +goog.exportSymbol('proto.rpcquery.GetMetadataParam', null, global); +goog.exportSymbol('proto.rpcquery.GetNameParam', null, global); +goog.exportSymbol('proto.rpcquery.GetNetworkRegistryParam', null, global); +goog.exportSymbol('proto.rpcquery.GetProposalParam', null, global); +goog.exportSymbol('proto.rpcquery.GetStatsParam', null, global); +goog.exportSymbol('proto.rpcquery.GetStorageParam', null, global); +goog.exportSymbol('proto.rpcquery.GetValidatorSetHistoryParam', null, global); +goog.exportSymbol('proto.rpcquery.GetValidatorSetParam', null, global); +goog.exportSymbol('proto.rpcquery.ListAccountsParam', null, global); +goog.exportSymbol('proto.rpcquery.ListNamesParam', null, global); +goog.exportSymbol('proto.rpcquery.ListProposalsParam', null, global); +goog.exportSymbol('proto.rpcquery.MetadataResult', null, global); +goog.exportSymbol('proto.rpcquery.NetworkRegistry', null, global); +goog.exportSymbol('proto.rpcquery.ProposalResult', null, global); +goog.exportSymbol('proto.rpcquery.RegisteredValidator', null, global); +goog.exportSymbol('proto.rpcquery.Stats', null, global); +goog.exportSymbol('proto.rpcquery.StatusParam', null, global); +goog.exportSymbol('proto.rpcquery.StorageValue', null, global); +goog.exportSymbol('proto.rpcquery.ValidatorSet', null, global); +goog.exportSymbol('proto.rpcquery.ValidatorSetHistory', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.StatusParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.StatusParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.StatusParam.displayName = 'proto.rpcquery.StatusParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetAccountParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetAccountParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetAccountParam.displayName = 'proto.rpcquery.GetAccountParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetMetadataParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetMetadataParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetMetadataParam.displayName = 'proto.rpcquery.GetMetadataParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.MetadataResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.MetadataResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.MetadataResult.displayName = 'proto.rpcquery.MetadataResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetStorageParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetStorageParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetStorageParam.displayName = 'proto.rpcquery.GetStorageParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.StorageValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.StorageValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.StorageValue.displayName = 'proto.rpcquery.StorageValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ListAccountsParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.ListAccountsParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.ListAccountsParam.displayName = 'proto.rpcquery.ListAccountsParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetNameParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetNameParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetNameParam.displayName = 'proto.rpcquery.GetNameParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ListNamesParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.ListNamesParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.ListNamesParam.displayName = 'proto.rpcquery.ListNamesParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetNetworkRegistryParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetNetworkRegistryParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetNetworkRegistryParam.displayName = 'proto.rpcquery.GetNetworkRegistryParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetValidatorSetParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetValidatorSetParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetValidatorSetParam.displayName = 'proto.rpcquery.GetValidatorSetParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetValidatorSetHistoryParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetValidatorSetHistoryParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetValidatorSetHistoryParam.displayName = 'proto.rpcquery.GetValidatorSetHistoryParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.NetworkRegistry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.NetworkRegistry.repeatedFields_, null); +}; +goog.inherits(proto.rpcquery.NetworkRegistry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.NetworkRegistry.displayName = 'proto.rpcquery.NetworkRegistry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.RegisteredValidator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.RegisteredValidator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.RegisteredValidator.displayName = 'proto.rpcquery.RegisteredValidator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ValidatorSetHistory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.ValidatorSetHistory.repeatedFields_, null); +}; +goog.inherits(proto.rpcquery.ValidatorSetHistory, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.ValidatorSetHistory.displayName = 'proto.rpcquery.ValidatorSetHistory'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ValidatorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.ValidatorSet.repeatedFields_, null); +}; +goog.inherits(proto.rpcquery.ValidatorSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.ValidatorSet.displayName = 'proto.rpcquery.ValidatorSet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetProposalParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetProposalParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetProposalParam.displayName = 'proto.rpcquery.GetProposalParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ListProposalsParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.ListProposalsParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.ListProposalsParam.displayName = 'proto.rpcquery.ListProposalsParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ProposalResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.ProposalResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.ProposalResult.displayName = 'proto.rpcquery.ProposalResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetStatsParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetStatsParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetStatsParam.displayName = 'proto.rpcquery.GetStatsParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.Stats = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.Stats, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.Stats.displayName = 'proto.rpcquery.Stats'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetBlockParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetBlockParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetBlockParam.displayName = 'proto.rpcquery.GetBlockParam'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.StatusParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.StatusParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.StatusParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.StatusParam.toObject = function(includeInstance, msg) { + var f, obj = { + blocktimewithin: jspb.Message.getFieldWithDefault(msg, 1, ""), + blockseentimewithin: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.StatusParam} + */ +proto.rpcquery.StatusParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.StatusParam; + return proto.rpcquery.StatusParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.StatusParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.StatusParam} + */ +proto.rpcquery.StatusParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBlocktimewithin(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBlockseentimewithin(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.StatusParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.StatusParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.StatusParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.StatusParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlocktimewithin(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBlockseentimewithin(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string BlockTimeWithin = 1; + * @return {string} + */ +proto.rpcquery.StatusParam.prototype.getBlocktimewithin = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.rpcquery.StatusParam.prototype.setBlocktimewithin = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string BlockSeenTimeWithin = 2; + * @return {string} + */ +proto.rpcquery.StatusParam.prototype.getBlockseentimewithin = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.rpcquery.StatusParam.prototype.setBlockseentimewithin = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.GetAccountParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.GetAccountParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.GetAccountParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetAccountParam.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.GetAccountParam} + */ +proto.rpcquery.GetAccountParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.GetAccountParam; + return proto.rpcquery.GetAccountParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.GetAccountParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.GetAccountParam} + */ +proto.rpcquery.GetAccountParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.GetAccountParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.GetAccountParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.GetAccountParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetAccountParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.rpcquery.GetAccountParam.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.rpcquery.GetAccountParam.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.rpcquery.GetAccountParam.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpcquery.GetAccountParam.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.GetMetadataParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.GetMetadataParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.GetMetadataParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetMetadataParam.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + metadatahash: msg.getMetadatahash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.GetMetadataParam} + */ +proto.rpcquery.GetMetadataParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.GetMetadataParam; + return proto.rpcquery.GetMetadataParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.GetMetadataParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.GetMetadataParam} + */ +proto.rpcquery.GetMetadataParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMetadatahash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.GetMetadataParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.GetMetadataParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.GetMetadataParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetMetadataParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getMetadatahash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.rpcquery.GetMetadataParam.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.rpcquery.GetMetadataParam.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.rpcquery.GetMetadataParam.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpcquery.GetMetadataParam.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes MetadataHash = 2; + * @return {!(string|Uint8Array)} + */ +proto.rpcquery.GetMetadataParam.prototype.getMetadatahash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes MetadataHash = 2; + * This is a type-conversion wrapper around `getMetadatahash()` + * @return {string} + */ +proto.rpcquery.GetMetadataParam.prototype.getMetadatahash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMetadatahash())); +}; + + +/** + * optional bytes MetadataHash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMetadatahash()` + * @return {!Uint8Array} + */ +proto.rpcquery.GetMetadataParam.prototype.getMetadatahash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMetadatahash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpcquery.GetMetadataParam.prototype.setMetadatahash = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.MetadataResult.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.MetadataResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.MetadataResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.MetadataResult.toObject = function(includeInstance, msg) { + var f, obj = { + metadata: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.MetadataResult} + */ +proto.rpcquery.MetadataResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.MetadataResult; + return proto.rpcquery.MetadataResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.MetadataResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.MetadataResult} + */ +proto.rpcquery.MetadataResult.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.MetadataResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.MetadataResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.MetadataResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.MetadataResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMetadata(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string Metadata = 1; + * @return {string} + */ +proto.rpcquery.MetadataResult.prototype.getMetadata = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.rpcquery.MetadataResult.prototype.setMetadata = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.GetStorageParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.GetStorageParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.GetStorageParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetStorageParam.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + key: msg.getKey_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.GetStorageParam} + */ +proto.rpcquery.GetStorageParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.GetStorageParam; + return proto.rpcquery.GetStorageParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.GetStorageParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.GetStorageParam} + */ +proto.rpcquery.GetStorageParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.GetStorageParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.GetStorageParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.GetStorageParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetStorageParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.rpcquery.GetStorageParam.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.rpcquery.GetStorageParam.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.rpcquery.GetStorageParam.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpcquery.GetStorageParam.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes Key = 2; + * @return {!(string|Uint8Array)} + */ +proto.rpcquery.GetStorageParam.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Key = 2; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.rpcquery.GetStorageParam.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes Key = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.rpcquery.GetStorageParam.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpcquery.GetStorageParam.prototype.setKey = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.StorageValue.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.StorageValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.StorageValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.StorageValue.toObject = function(includeInstance, msg) { + var f, obj = { + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.StorageValue} + */ +proto.rpcquery.StorageValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.StorageValue; + return proto.rpcquery.StorageValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.StorageValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.StorageValue} + */ +proto.rpcquery.StorageValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.StorageValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.StorageValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.StorageValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.StorageValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes Value = 1; + * @return {!(string|Uint8Array)} + */ +proto.rpcquery.StorageValue.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Value = 1; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.rpcquery.StorageValue.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes Value = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.rpcquery.StorageValue.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpcquery.StorageValue.prototype.setValue = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.ListAccountsParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.ListAccountsParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.ListAccountsParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.ListAccountsParam.toObject = function(includeInstance, msg) { + var f, obj = { + query: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.ListAccountsParam} + */ +proto.rpcquery.ListAccountsParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.ListAccountsParam; + return proto.rpcquery.ListAccountsParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.ListAccountsParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.ListAccountsParam} + */ +proto.rpcquery.ListAccountsParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setQuery(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.ListAccountsParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.ListAccountsParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.ListAccountsParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.ListAccountsParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string Query = 1; + * @return {string} + */ +proto.rpcquery.ListAccountsParam.prototype.getQuery = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.rpcquery.ListAccountsParam.prototype.setQuery = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.GetNameParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.GetNameParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.GetNameParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetNameParam.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.GetNameParam} + */ +proto.rpcquery.GetNameParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.GetNameParam; + return proto.rpcquery.GetNameParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.GetNameParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.GetNameParam} + */ +proto.rpcquery.GetNameParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.GetNameParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.GetNameParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.GetNameParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetNameParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string Name = 1; + * @return {string} + */ +proto.rpcquery.GetNameParam.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.rpcquery.GetNameParam.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.ListNamesParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.ListNamesParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.ListNamesParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.ListNamesParam.toObject = function(includeInstance, msg) { + var f, obj = { + query: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.ListNamesParam} + */ +proto.rpcquery.ListNamesParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.ListNamesParam; + return proto.rpcquery.ListNamesParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.ListNamesParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.ListNamesParam} + */ +proto.rpcquery.ListNamesParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setQuery(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.ListNamesParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.ListNamesParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.ListNamesParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.ListNamesParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string Query = 1; + * @return {string} + */ +proto.rpcquery.ListNamesParam.prototype.getQuery = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.rpcquery.ListNamesParam.prototype.setQuery = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.GetNetworkRegistryParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.GetNetworkRegistryParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.GetNetworkRegistryParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetNetworkRegistryParam.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.GetNetworkRegistryParam} + */ +proto.rpcquery.GetNetworkRegistryParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.GetNetworkRegistryParam; + return proto.rpcquery.GetNetworkRegistryParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.GetNetworkRegistryParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.GetNetworkRegistryParam} + */ +proto.rpcquery.GetNetworkRegistryParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.GetNetworkRegistryParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.GetNetworkRegistryParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.GetNetworkRegistryParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetNetworkRegistryParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.GetValidatorSetParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.GetValidatorSetParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.GetValidatorSetParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetValidatorSetParam.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.GetValidatorSetParam} + */ +proto.rpcquery.GetValidatorSetParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.GetValidatorSetParam; + return proto.rpcquery.GetValidatorSetParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.GetValidatorSetParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.GetValidatorSetParam} + */ +proto.rpcquery.GetValidatorSetParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.GetValidatorSetParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.GetValidatorSetParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.GetValidatorSetParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetValidatorSetParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.GetValidatorSetHistoryParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.GetValidatorSetHistoryParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.GetValidatorSetHistoryParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetValidatorSetHistoryParam.toObject = function(includeInstance, msg) { + var f, obj = { + includeprevious: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.GetValidatorSetHistoryParam} + */ +proto.rpcquery.GetValidatorSetHistoryParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.GetValidatorSetHistoryParam; + return proto.rpcquery.GetValidatorSetHistoryParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.GetValidatorSetHistoryParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.GetValidatorSetHistoryParam} + */ +proto.rpcquery.GetValidatorSetHistoryParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setIncludeprevious(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.GetValidatorSetHistoryParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.GetValidatorSetHistoryParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.GetValidatorSetHistoryParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetValidatorSetHistoryParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncludeprevious(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 IncludePrevious = 1; + * @return {number} + */ +proto.rpcquery.GetValidatorSetHistoryParam.prototype.getIncludeprevious = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.rpcquery.GetValidatorSetHistoryParam.prototype.setIncludeprevious = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.rpcquery.NetworkRegistry.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.NetworkRegistry.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.NetworkRegistry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.NetworkRegistry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.NetworkRegistry.toObject = function(includeInstance, msg) { + var f, obj = { + setList: jspb.Message.toObjectList(msg.getSetList(), + proto.rpcquery.RegisteredValidator.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.NetworkRegistry} + */ +proto.rpcquery.NetworkRegistry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.NetworkRegistry; + return proto.rpcquery.NetworkRegistry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.NetworkRegistry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.NetworkRegistry} + */ +proto.rpcquery.NetworkRegistry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.rpcquery.RegisteredValidator; + reader.readMessage(value,proto.rpcquery.RegisteredValidator.deserializeBinaryFromReader); + msg.addSet(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.NetworkRegistry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.NetworkRegistry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.NetworkRegistry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.NetworkRegistry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSetList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.rpcquery.RegisteredValidator.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated RegisteredValidator Set = 1; + * @return {!Array} + */ +proto.rpcquery.NetworkRegistry.prototype.getSetList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.rpcquery.RegisteredValidator, 1)); +}; + + +/** @param {!Array} value */ +proto.rpcquery.NetworkRegistry.prototype.setSetList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.rpcquery.RegisteredValidator=} opt_value + * @param {number=} opt_index + * @return {!proto.rpcquery.RegisteredValidator} + */ +proto.rpcquery.NetworkRegistry.prototype.addSet = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.rpcquery.RegisteredValidator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.rpcquery.NetworkRegistry.prototype.clearSetList = function() { + this.setSetList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.RegisteredValidator.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.RegisteredValidator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.RegisteredValidator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.RegisteredValidator.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + node: (f = msg.getNode()) && registry_pb.NodeIdentity.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.RegisteredValidator} + */ +proto.rpcquery.RegisteredValidator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.RegisteredValidator; + return proto.rpcquery.RegisteredValidator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.RegisteredValidator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.RegisteredValidator} + */ +proto.rpcquery.RegisteredValidator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = new registry_pb.NodeIdentity; + reader.readMessage(value,registry_pb.NodeIdentity.deserializeBinaryFromReader); + msg.setNode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.RegisteredValidator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.RegisteredValidator.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.RegisteredValidator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.RegisteredValidator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getNode(); + if (f != null) { + writer.writeMessage( + 2, + f, + registry_pb.NodeIdentity.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.rpcquery.RegisteredValidator.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.rpcquery.RegisteredValidator.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.rpcquery.RegisteredValidator.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpcquery.RegisteredValidator.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional registry.NodeIdentity Node = 2; + * @return {?proto.registry.NodeIdentity} + */ +proto.rpcquery.RegisteredValidator.prototype.getNode = function() { + return /** @type{?proto.registry.NodeIdentity} */ ( + jspb.Message.getWrapperField(this, registry_pb.NodeIdentity, 2)); +}; + + +/** @param {?proto.registry.NodeIdentity|undefined} value */ +proto.rpcquery.RegisteredValidator.prototype.setNode = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.rpcquery.RegisteredValidator.prototype.clearNode = function() { + this.setNode(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.rpcquery.RegisteredValidator.prototype.hasNode = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.rpcquery.ValidatorSetHistory.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.ValidatorSetHistory.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.ValidatorSetHistory.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.ValidatorSetHistory} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.ValidatorSetHistory.toObject = function(includeInstance, msg) { + var f, obj = { + historyList: jspb.Message.toObjectList(msg.getHistoryList(), + proto.rpcquery.ValidatorSet.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.ValidatorSetHistory} + */ +proto.rpcquery.ValidatorSetHistory.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.ValidatorSetHistory; + return proto.rpcquery.ValidatorSetHistory.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.ValidatorSetHistory} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.ValidatorSetHistory} + */ +proto.rpcquery.ValidatorSetHistory.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.rpcquery.ValidatorSet; + reader.readMessage(value,proto.rpcquery.ValidatorSet.deserializeBinaryFromReader); + msg.addHistory(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.ValidatorSetHistory.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.ValidatorSetHistory.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.ValidatorSetHistory} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.ValidatorSetHistory.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHistoryList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.rpcquery.ValidatorSet.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ValidatorSet History = 1; + * @return {!Array} + */ +proto.rpcquery.ValidatorSetHistory.prototype.getHistoryList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.rpcquery.ValidatorSet, 1)); +}; + + +/** @param {!Array} value */ +proto.rpcquery.ValidatorSetHistory.prototype.setHistoryList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.rpcquery.ValidatorSet=} opt_value + * @param {number=} opt_index + * @return {!proto.rpcquery.ValidatorSet} + */ +proto.rpcquery.ValidatorSetHistory.prototype.addHistory = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.rpcquery.ValidatorSet, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.rpcquery.ValidatorSetHistory.prototype.clearHistoryList = function() { + this.setHistoryList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.rpcquery.ValidatorSet.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.ValidatorSet.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.ValidatorSet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.ValidatorSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.ValidatorSet.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + setList: jspb.Message.toObjectList(msg.getSetList(), + validator_pb.Validator.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.ValidatorSet} + */ +proto.rpcquery.ValidatorSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.ValidatorSet; + return proto.rpcquery.ValidatorSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.ValidatorSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.ValidatorSet} + */ +proto.rpcquery.ValidatorSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = new validator_pb.Validator; + reader.readMessage(value,validator_pb.Validator.deserializeBinaryFromReader); + msg.addSet(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.ValidatorSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.ValidatorSet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.ValidatorSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.ValidatorSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSetList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + validator_pb.Validator.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.rpcquery.ValidatorSet.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.rpcquery.ValidatorSet.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated validator.Validator Set = 2; + * @return {!Array} + */ +proto.rpcquery.ValidatorSet.prototype.getSetList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, validator_pb.Validator, 2)); +}; + + +/** @param {!Array} value */ +proto.rpcquery.ValidatorSet.prototype.setSetList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.validator.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.validator.Validator} + */ +proto.rpcquery.ValidatorSet.prototype.addSet = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.validator.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.rpcquery.ValidatorSet.prototype.clearSetList = function() { + this.setSetList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.GetProposalParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.GetProposalParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.GetProposalParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetProposalParam.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.GetProposalParam} + */ +proto.rpcquery.GetProposalParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.GetProposalParam; + return proto.rpcquery.GetProposalParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.GetProposalParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.GetProposalParam} + */ +proto.rpcquery.GetProposalParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.GetProposalParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.GetProposalParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.GetProposalParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetProposalParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes Hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.rpcquery.GetProposalParam.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Hash = 1; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.rpcquery.GetProposalParam.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes Hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.rpcquery.GetProposalParam.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpcquery.GetProposalParam.prototype.setHash = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.ListProposalsParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.ListProposalsParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.ListProposalsParam.toObject = function(includeInstance, msg) { + var f, obj = { + proposed: jspb.Message.getFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.ListProposalsParam} + */ +proto.rpcquery.ListProposalsParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.ListProposalsParam; + return proto.rpcquery.ListProposalsParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.ListProposalsParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.ListProposalsParam} + */ +proto.rpcquery.ListProposalsParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProposed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.ListProposalsParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.ListProposalsParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.ListProposalsParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.ListProposalsParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposed(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool Proposed = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.rpcquery.ListProposalsParam.prototype.getProposed = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.rpcquery.ListProposalsParam.prototype.setProposed = function(value) { + jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.ProposalResult.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.ProposalResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.ProposalResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.ProposalResult.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_asB64(), + ballot: (f = msg.getBallot()) && payload_pb.Ballot.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.ProposalResult} + */ +proto.rpcquery.ProposalResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.ProposalResult; + return proto.rpcquery.ProposalResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.ProposalResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.ProposalResult} + */ +proto.rpcquery.ProposalResult.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 2: + var value = new payload_pb.Ballot; + reader.readMessage(value,payload_pb.Ballot.deserializeBinaryFromReader); + msg.setBallot(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.ProposalResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.ProposalResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.ProposalResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.ProposalResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getBallot(); + if (f != null) { + writer.writeMessage( + 2, + f, + payload_pb.Ballot.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes Hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.rpcquery.ProposalResult.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Hash = 1; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.rpcquery.ProposalResult.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes Hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.rpcquery.ProposalResult.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpcquery.ProposalResult.prototype.setHash = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional payload.Ballot Ballot = 2; + * @return {?proto.payload.Ballot} + */ +proto.rpcquery.ProposalResult.prototype.getBallot = function() { + return /** @type{?proto.payload.Ballot} */ ( + jspb.Message.getWrapperField(this, payload_pb.Ballot, 2)); +}; + + +/** @param {?proto.payload.Ballot|undefined} value */ +proto.rpcquery.ProposalResult.prototype.setBallot = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.rpcquery.ProposalResult.prototype.clearBallot = function() { + this.setBallot(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.rpcquery.ProposalResult.prototype.hasBallot = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.GetStatsParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.GetStatsParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.GetStatsParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetStatsParam.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.GetStatsParam} + */ +proto.rpcquery.GetStatsParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.GetStatsParam; + return proto.rpcquery.GetStatsParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.GetStatsParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.GetStatsParam} + */ +proto.rpcquery.GetStatsParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.GetStatsParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.GetStatsParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.GetStatsParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetStatsParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.Stats.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.Stats.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.Stats} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.Stats.toObject = function(includeInstance, msg) { + var f, obj = { + accountswithcode: jspb.Message.getFieldWithDefault(msg, 1, 0), + accountswithoutcode: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.Stats} + */ +proto.rpcquery.Stats.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.Stats; + return proto.rpcquery.Stats.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.Stats} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.Stats} + */ +proto.rpcquery.Stats.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAccountswithcode(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAccountswithoutcode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.Stats.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.Stats.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.Stats} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.Stats.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccountswithcode(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getAccountswithoutcode(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 AccountsWithCode = 1; + * @return {number} + */ +proto.rpcquery.Stats.prototype.getAccountswithcode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.rpcquery.Stats.prototype.setAccountswithcode = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 AccountsWithoutCode = 2; + * @return {number} + */ +proto.rpcquery.Stats.prototype.getAccountswithoutcode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.rpcquery.Stats.prototype.setAccountswithoutcode = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpcquery.GetBlockParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpcquery.GetBlockParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpcquery.GetBlockParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetBlockParam.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpcquery.GetBlockParam} + */ +proto.rpcquery.GetBlockParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpcquery.GetBlockParam; + return proto.rpcquery.GetBlockParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpcquery.GetBlockParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpcquery.GetBlockParam} + */ +proto.rpcquery.GetBlockParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpcquery.GetBlockParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpcquery.GetBlockParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpcquery.GetBlockParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpcquery.GetBlockParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 Height = 1; + * @return {number} + */ +proto.rpcquery.GetBlockParam.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.rpcquery.GetBlockParam.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +goog.object.extend(exports, proto.rpcquery); diff --git a/js/proto/rpctransact_grpc_pb.d.ts b/js/proto/rpctransact_grpc_pb.d.ts new file mode 100644 index 000000000..75d5978b5 --- /dev/null +++ b/js/proto/rpctransact_grpc_pb.d.ts @@ -0,0 +1,67 @@ +// GENERATED CODE -- DO NOT EDIT! + +// package: rpctransact +// file: rpctransact.proto + +import * as rpctransact_pb from "./rpctransact_pb"; +import * as exec_pb from "./exec_pb"; +import * as payload_pb from "./payload_pb"; +import * as txs_pb from "./txs_pb"; +import * as grpc from "grpc"; + +interface ITransactService extends grpc.ServiceDefinition { + broadcastTxSync: grpc.MethodDefinition; + broadcastTxAsync: grpc.MethodDefinition; + signTx: grpc.MethodDefinition; + formulateTx: grpc.MethodDefinition; + callTxSync: grpc.MethodDefinition; + callTxAsync: grpc.MethodDefinition; + callTxSim: grpc.MethodDefinition; + callCodeSim: grpc.MethodDefinition; + sendTxSync: grpc.MethodDefinition; + sendTxAsync: grpc.MethodDefinition; + nameTxSync: grpc.MethodDefinition; + nameTxAsync: grpc.MethodDefinition; +} + +export const TransactService: ITransactService; + +export class TransactClient extends grpc.Client { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + broadcastTxSync(argument: rpctransact_pb.TxEnvelopeParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + broadcastTxSync(argument: rpctransact_pb.TxEnvelopeParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + broadcastTxSync(argument: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + broadcastTxAsync(argument: rpctransact_pb.TxEnvelopeParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + broadcastTxAsync(argument: rpctransact_pb.TxEnvelopeParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + broadcastTxAsync(argument: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + signTx(argument: rpctransact_pb.TxEnvelopeParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + signTx(argument: rpctransact_pb.TxEnvelopeParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + signTx(argument: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + formulateTx(argument: payload_pb.Any, callback: grpc.requestCallback): grpc.ClientUnaryCall; + formulateTx(argument: payload_pb.Any, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + formulateTx(argument: payload_pb.Any, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + callTxSync(argument: payload_pb.CallTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; + callTxSync(argument: payload_pb.CallTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + callTxSync(argument: payload_pb.CallTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + callTxAsync(argument: payload_pb.CallTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; + callTxAsync(argument: payload_pb.CallTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + callTxAsync(argument: payload_pb.CallTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + callTxSim(argument: payload_pb.CallTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; + callTxSim(argument: payload_pb.CallTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + callTxSim(argument: payload_pb.CallTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + callCodeSim(argument: rpctransact_pb.CallCodeParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; + callCodeSim(argument: rpctransact_pb.CallCodeParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + callCodeSim(argument: rpctransact_pb.CallCodeParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + sendTxSync(argument: payload_pb.SendTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; + sendTxSync(argument: payload_pb.SendTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + sendTxSync(argument: payload_pb.SendTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + sendTxAsync(argument: payload_pb.SendTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; + sendTxAsync(argument: payload_pb.SendTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + sendTxAsync(argument: payload_pb.SendTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + nameTxSync(argument: payload_pb.NameTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; + nameTxSync(argument: payload_pb.NameTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + nameTxSync(argument: payload_pb.NameTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + nameTxAsync(argument: payload_pb.NameTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; + nameTxAsync(argument: payload_pb.NameTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + nameTxAsync(argument: payload_pb.NameTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; +} diff --git a/js/proto/rpctransact_grpc_pb.js b/js/proto/rpctransact_grpc_pb.js new file mode 100644 index 000000000..230c0b12c --- /dev/null +++ b/js/proto/rpctransact_grpc_pb.js @@ -0,0 +1,262 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var rpctransact_pb = require('./rpctransact_pb.js'); +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +var exec_pb = require('./exec_pb.js'); +var payload_pb = require('./payload_pb.js'); +var txs_pb = require('./txs_pb.js'); + +function serialize_exec_TxExecution(arg) { + if (!(arg instanceof exec_pb.TxExecution)) { + throw new Error('Expected argument of type exec.TxExecution'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_exec_TxExecution(buffer_arg) { + return exec_pb.TxExecution.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_payload_Any(arg) { + if (!(arg instanceof payload_pb.Any)) { + throw new Error('Expected argument of type payload.Any'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_payload_Any(buffer_arg) { + return payload_pb.Any.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_payload_CallTx(arg) { + if (!(arg instanceof payload_pb.CallTx)) { + throw new Error('Expected argument of type payload.CallTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_payload_CallTx(buffer_arg) { + return payload_pb.CallTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_payload_NameTx(arg) { + if (!(arg instanceof payload_pb.NameTx)) { + throw new Error('Expected argument of type payload.NameTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_payload_NameTx(buffer_arg) { + return payload_pb.NameTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_payload_SendTx(arg) { + if (!(arg instanceof payload_pb.SendTx)) { + throw new Error('Expected argument of type payload.SendTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_payload_SendTx(buffer_arg) { + return payload_pb.SendTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpctransact_CallCodeParam(arg) { + if (!(arg instanceof rpctransact_pb.CallCodeParam)) { + throw new Error('Expected argument of type rpctransact.CallCodeParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpctransact_CallCodeParam(buffer_arg) { + return rpctransact_pb.CallCodeParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpctransact_TxEnvelope(arg) { + if (!(arg instanceof rpctransact_pb.TxEnvelope)) { + throw new Error('Expected argument of type rpctransact.TxEnvelope'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpctransact_TxEnvelope(buffer_arg) { + return rpctransact_pb.TxEnvelope.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_rpctransact_TxEnvelopeParam(arg) { + if (!(arg instanceof rpctransact_pb.TxEnvelopeParam)) { + throw new Error('Expected argument of type rpctransact.TxEnvelopeParam'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_rpctransact_TxEnvelopeParam(buffer_arg) { + return rpctransact_pb.TxEnvelopeParam.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_txs_Receipt(arg) { + if (!(arg instanceof txs_pb.Receipt)) { + throw new Error('Expected argument of type txs.Receipt'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_txs_Receipt(buffer_arg) { + return txs_pb.Receipt.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// Transaction Service Definition +var TransactService = exports.TransactService = { + // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side +// and wait for it to be included in block +broadcastTxSync: { + path: '/rpctransact.Transact/BroadcastTxSync', + requestStream: false, + responseStream: false, + requestType: rpctransact_pb.TxEnvelopeParam, + responseType: exec_pb.TxExecution, + requestSerialize: serialize_rpctransact_TxEnvelopeParam, + requestDeserialize: deserialize_rpctransact_TxEnvelopeParam, + responseSerialize: serialize_exec_TxExecution, + responseDeserialize: deserialize_exec_TxExecution, + }, + // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side +broadcastTxAsync: { + path: '/rpctransact.Transact/BroadcastTxAsync', + requestStream: false, + responseStream: false, + requestType: rpctransact_pb.TxEnvelopeParam, + responseType: txs_pb.Receipt, + requestSerialize: serialize_rpctransact_TxEnvelopeParam, + requestDeserialize: deserialize_rpctransact_TxEnvelopeParam, + responseSerialize: serialize_txs_Receipt, + responseDeserialize: deserialize_txs_Receipt, + }, + // Sign transaction server-side +signTx: { + path: '/rpctransact.Transact/SignTx', + requestStream: false, + responseStream: false, + requestType: rpctransact_pb.TxEnvelopeParam, + responseType: rpctransact_pb.TxEnvelope, + requestSerialize: serialize_rpctransact_TxEnvelopeParam, + requestDeserialize: deserialize_rpctransact_TxEnvelopeParam, + responseSerialize: serialize_rpctransact_TxEnvelope, + responseDeserialize: deserialize_rpctransact_TxEnvelope, + }, + // Formulate a transaction from a Payload and retrun the envelop with the Tx bytes ready to sign +formulateTx: { + path: '/rpctransact.Transact/FormulateTx', + requestStream: false, + responseStream: false, + requestType: payload_pb.Any, + responseType: rpctransact_pb.TxEnvelope, + requestSerialize: serialize_payload_Any, + requestDeserialize: deserialize_payload_Any, + responseSerialize: serialize_rpctransact_TxEnvelope, + responseDeserialize: deserialize_rpctransact_TxEnvelope, + }, + // Formulate and sign a CallTx transaction signed server-side and wait for it to be included in a block, retrieving response +callTxSync: { + path: '/rpctransact.Transact/CallTxSync', + requestStream: false, + responseStream: false, + requestType: payload_pb.CallTx, + responseType: exec_pb.TxExecution, + requestSerialize: serialize_payload_CallTx, + requestDeserialize: deserialize_payload_CallTx, + responseSerialize: serialize_exec_TxExecution, + responseDeserialize: deserialize_exec_TxExecution, + }, + // Formulate and sign a CallTx transaction signed server-side +callTxAsync: { + path: '/rpctransact.Transact/CallTxAsync', + requestStream: false, + responseStream: false, + requestType: payload_pb.CallTx, + responseType: txs_pb.Receipt, + requestSerialize: serialize_payload_CallTx, + requestDeserialize: deserialize_payload_CallTx, + responseSerialize: serialize_txs_Receipt, + responseDeserialize: deserialize_txs_Receipt, + }, + // Perform a 'simulated' call of a contract against the current committed EVM state without any changes been saved +// and wait for the transaction to be included in a block +callTxSim: { + path: '/rpctransact.Transact/CallTxSim', + requestStream: false, + responseStream: false, + requestType: payload_pb.CallTx, + responseType: exec_pb.TxExecution, + requestSerialize: serialize_payload_CallTx, + requestDeserialize: deserialize_payload_CallTx, + responseSerialize: serialize_exec_TxExecution, + responseDeserialize: deserialize_exec_TxExecution, + }, + // Perform a 'simulated' execution of provided code against the current committed EVM state without any changes been saved +callCodeSim: { + path: '/rpctransact.Transact/CallCodeSim', + requestStream: false, + responseStream: false, + requestType: rpctransact_pb.CallCodeParam, + responseType: exec_pb.TxExecution, + requestSerialize: serialize_rpctransact_CallCodeParam, + requestDeserialize: deserialize_rpctransact_CallCodeParam, + responseSerialize: serialize_exec_TxExecution, + responseDeserialize: deserialize_exec_TxExecution, + }, + // Formulate a SendTx transaction signed server-side and wait for it to be included in a block, retrieving response +sendTxSync: { + path: '/rpctransact.Transact/SendTxSync', + requestStream: false, + responseStream: false, + requestType: payload_pb.SendTx, + responseType: exec_pb.TxExecution, + requestSerialize: serialize_payload_SendTx, + requestDeserialize: deserialize_payload_SendTx, + responseSerialize: serialize_exec_TxExecution, + responseDeserialize: deserialize_exec_TxExecution, + }, + // Formulate and SendTx transaction signed server-side +sendTxAsync: { + path: '/rpctransact.Transact/SendTxAsync', + requestStream: false, + responseStream: false, + requestType: payload_pb.SendTx, + responseType: txs_pb.Receipt, + requestSerialize: serialize_payload_SendTx, + requestDeserialize: deserialize_payload_SendTx, + responseSerialize: serialize_txs_Receipt, + responseDeserialize: deserialize_txs_Receipt, + }, + // Formulate a NameTx signed server-side and wait for it to be included in a block returning the registered name +nameTxSync: { + path: '/rpctransact.Transact/NameTxSync', + requestStream: false, + responseStream: false, + requestType: payload_pb.NameTx, + responseType: exec_pb.TxExecution, + requestSerialize: serialize_payload_NameTx, + requestDeserialize: deserialize_payload_NameTx, + responseSerialize: serialize_exec_TxExecution, + responseDeserialize: deserialize_exec_TxExecution, + }, + // Formulate a NameTx signed server-side +nameTxAsync: { + path: '/rpctransact.Transact/NameTxAsync', + requestStream: false, + responseStream: false, + requestType: payload_pb.NameTx, + responseType: txs_pb.Receipt, + requestSerialize: serialize_payload_NameTx, + requestDeserialize: deserialize_payload_NameTx, + responseSerialize: serialize_txs_Receipt, + responseDeserialize: deserialize_txs_Receipt, + }, +}; + +exports.TransactClient = grpc.makeGenericClientConstructor(TransactService); diff --git a/js/proto/rpctransact_pb.d.ts b/js/proto/rpctransact_pb.d.ts new file mode 100644 index 000000000..0269b8842 --- /dev/null +++ b/js/proto/rpctransact_pb.d.ts @@ -0,0 +1,100 @@ +// package: rpctransact +// file: rpctransact.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as exec_pb from "./exec_pb"; +import * as payload_pb from "./payload_pb"; +import * as txs_pb from "./txs_pb"; + +export class CallCodeParam extends jspb.Message { + getFromaddress(): Uint8Array | string; + getFromaddress_asU8(): Uint8Array; + getFromaddress_asB64(): string; + setFromaddress(value: Uint8Array | string): void; + + getCode(): Uint8Array | string; + getCode_asU8(): Uint8Array; + getCode_asB64(): string; + setCode(value: Uint8Array | string): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CallCodeParam.AsObject; + static toObject(includeInstance: boolean, msg: CallCodeParam): CallCodeParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CallCodeParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CallCodeParam; + static deserializeBinaryFromReader(message: CallCodeParam, reader: jspb.BinaryReader): CallCodeParam; +} + +export namespace CallCodeParam { + export type AsObject = { + fromaddress: Uint8Array | string, + code: Uint8Array | string, + data: Uint8Array | string, + } +} + +export class TxEnvelope extends jspb.Message { + hasEnvelope(): boolean; + clearEnvelope(): void; + getEnvelope(): txs_pb.Envelope | undefined; + setEnvelope(value?: txs_pb.Envelope): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxEnvelope.AsObject; + static toObject(includeInstance: boolean, msg: TxEnvelope): TxEnvelope.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxEnvelope, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxEnvelope; + static deserializeBinaryFromReader(message: TxEnvelope, reader: jspb.BinaryReader): TxEnvelope; +} + +export namespace TxEnvelope { + export type AsObject = { + envelope?: txs_pb.Envelope.AsObject, + } +} + +export class TxEnvelopeParam extends jspb.Message { + hasEnvelope(): boolean; + clearEnvelope(): void; + getEnvelope(): txs_pb.Envelope | undefined; + setEnvelope(value?: txs_pb.Envelope): void; + + hasPayload(): boolean; + clearPayload(): void; + getPayload(): payload_pb.Any | undefined; + setPayload(value?: payload_pb.Any): void; + + hasTimeout(): boolean; + clearTimeout(): void; + getTimeout(): google_protobuf_duration_pb.Duration | undefined; + setTimeout(value?: google_protobuf_duration_pb.Duration): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxEnvelopeParam.AsObject; + static toObject(includeInstance: boolean, msg: TxEnvelopeParam): TxEnvelopeParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxEnvelopeParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxEnvelopeParam; + static deserializeBinaryFromReader(message: TxEnvelopeParam, reader: jspb.BinaryReader): TxEnvelopeParam; +} + +export namespace TxEnvelopeParam { + export type AsObject = { + envelope?: txs_pb.Envelope.AsObject, + payload?: payload_pb.Any.AsObject, + timeout?: google_protobuf_duration_pb.Duration.AsObject, + } +} + diff --git a/js/proto/rpctransact_pb.js b/js/proto/rpctransact_pb.js new file mode 100644 index 000000000..06e8e9386 --- /dev/null +++ b/js/proto/rpctransact_pb.js @@ -0,0 +1,725 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +var exec_pb = require('./exec_pb.js'); +goog.object.extend(proto, exec_pb); +var payload_pb = require('./payload_pb.js'); +goog.object.extend(proto, payload_pb); +var txs_pb = require('./txs_pb.js'); +goog.object.extend(proto, txs_pb); +goog.exportSymbol('proto.rpctransact.CallCodeParam', null, global); +goog.exportSymbol('proto.rpctransact.TxEnvelope', null, global); +goog.exportSymbol('proto.rpctransact.TxEnvelopeParam', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpctransact.CallCodeParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpctransact.CallCodeParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpctransact.CallCodeParam.displayName = 'proto.rpctransact.CallCodeParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpctransact.TxEnvelope = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpctransact.TxEnvelope, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpctransact.TxEnvelope.displayName = 'proto.rpctransact.TxEnvelope'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpctransact.TxEnvelopeParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpctransact.TxEnvelopeParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpctransact.TxEnvelopeParam.displayName = 'proto.rpctransact.TxEnvelopeParam'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpctransact.CallCodeParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpctransact.CallCodeParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpctransact.CallCodeParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpctransact.CallCodeParam.toObject = function(includeInstance, msg) { + var f, obj = { + fromaddress: msg.getFromaddress_asB64(), + code: msg.getCode_asB64(), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpctransact.CallCodeParam} + */ +proto.rpctransact.CallCodeParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpctransact.CallCodeParam; + return proto.rpctransact.CallCodeParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpctransact.CallCodeParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpctransact.CallCodeParam} + */ +proto.rpctransact.CallCodeParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFromaddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCode(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpctransact.CallCodeParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpctransact.CallCodeParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpctransact.CallCodeParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpctransact.CallCodeParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFromaddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getCode_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional bytes FromAddress = 1; + * @return {!(string|Uint8Array)} + */ +proto.rpctransact.CallCodeParam.prototype.getFromaddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes FromAddress = 1; + * This is a type-conversion wrapper around `getFromaddress()` + * @return {string} + */ +proto.rpctransact.CallCodeParam.prototype.getFromaddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFromaddress())); +}; + + +/** + * optional bytes FromAddress = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFromaddress()` + * @return {!Uint8Array} + */ +proto.rpctransact.CallCodeParam.prototype.getFromaddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFromaddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpctransact.CallCodeParam.prototype.setFromaddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes Code = 2; + * @return {!(string|Uint8Array)} + */ +proto.rpctransact.CallCodeParam.prototype.getCode = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Code = 2; + * This is a type-conversion wrapper around `getCode()` + * @return {string} + */ +proto.rpctransact.CallCodeParam.prototype.getCode_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCode())); +}; + + +/** + * optional bytes Code = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCode()` + * @return {!Uint8Array} + */ +proto.rpctransact.CallCodeParam.prototype.getCode_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCode())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpctransact.CallCodeParam.prototype.setCode = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes Data = 3; + * @return {!(string|Uint8Array)} + */ +proto.rpctransact.CallCodeParam.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes Data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.rpctransact.CallCodeParam.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes Data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.rpctransact.CallCodeParam.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.rpctransact.CallCodeParam.prototype.setData = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpctransact.TxEnvelope.prototype.toObject = function(opt_includeInstance) { + return proto.rpctransact.TxEnvelope.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpctransact.TxEnvelope} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpctransact.TxEnvelope.toObject = function(includeInstance, msg) { + var f, obj = { + envelope: (f = msg.getEnvelope()) && txs_pb.Envelope.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpctransact.TxEnvelope} + */ +proto.rpctransact.TxEnvelope.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpctransact.TxEnvelope; + return proto.rpctransact.TxEnvelope.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpctransact.TxEnvelope} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpctransact.TxEnvelope} + */ +proto.rpctransact.TxEnvelope.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new txs_pb.Envelope; + reader.readMessage(value,txs_pb.Envelope.deserializeBinaryFromReader); + msg.setEnvelope(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpctransact.TxEnvelope.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpctransact.TxEnvelope.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpctransact.TxEnvelope} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpctransact.TxEnvelope.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEnvelope(); + if (f != null) { + writer.writeMessage( + 1, + f, + txs_pb.Envelope.serializeBinaryToWriter + ); + } +}; + + +/** + * optional txs.Envelope Envelope = 1; + * @return {?proto.txs.Envelope} + */ +proto.rpctransact.TxEnvelope.prototype.getEnvelope = function() { + return /** @type{?proto.txs.Envelope} */ ( + jspb.Message.getWrapperField(this, txs_pb.Envelope, 1)); +}; + + +/** @param {?proto.txs.Envelope|undefined} value */ +proto.rpctransact.TxEnvelope.prototype.setEnvelope = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.rpctransact.TxEnvelope.prototype.clearEnvelope = function() { + this.setEnvelope(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.rpctransact.TxEnvelope.prototype.hasEnvelope = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.rpctransact.TxEnvelopeParam.prototype.toObject = function(opt_includeInstance) { + return proto.rpctransact.TxEnvelopeParam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.rpctransact.TxEnvelopeParam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpctransact.TxEnvelopeParam.toObject = function(includeInstance, msg) { + var f, obj = { + envelope: (f = msg.getEnvelope()) && txs_pb.Envelope.toObject(includeInstance, f), + payload: (f = msg.getPayload()) && payload_pb.Any.toObject(includeInstance, f), + timeout: (f = msg.getTimeout()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.rpctransact.TxEnvelopeParam} + */ +proto.rpctransact.TxEnvelopeParam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.rpctransact.TxEnvelopeParam; + return proto.rpctransact.TxEnvelopeParam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.rpctransact.TxEnvelopeParam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.rpctransact.TxEnvelopeParam} + */ +proto.rpctransact.TxEnvelopeParam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new txs_pb.Envelope; + reader.readMessage(value,txs_pb.Envelope.deserializeBinaryFromReader); + msg.setEnvelope(value); + break; + case 2: + var value = new payload_pb.Any; + reader.readMessage(value,payload_pb.Any.deserializeBinaryFromReader); + msg.setPayload(value); + break; + case 3: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setTimeout(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.rpctransact.TxEnvelopeParam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.rpctransact.TxEnvelopeParam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.rpctransact.TxEnvelopeParam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.rpctransact.TxEnvelopeParam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEnvelope(); + if (f != null) { + writer.writeMessage( + 1, + f, + txs_pb.Envelope.serializeBinaryToWriter + ); + } + f = message.getPayload(); + if (f != null) { + writer.writeMessage( + 2, + f, + payload_pb.Any.serializeBinaryToWriter + ); + } + f = message.getTimeout(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional txs.Envelope Envelope = 1; + * @return {?proto.txs.Envelope} + */ +proto.rpctransact.TxEnvelopeParam.prototype.getEnvelope = function() { + return /** @type{?proto.txs.Envelope} */ ( + jspb.Message.getWrapperField(this, txs_pb.Envelope, 1)); +}; + + +/** @param {?proto.txs.Envelope|undefined} value */ +proto.rpctransact.TxEnvelopeParam.prototype.setEnvelope = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.rpctransact.TxEnvelopeParam.prototype.clearEnvelope = function() { + this.setEnvelope(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.rpctransact.TxEnvelopeParam.prototype.hasEnvelope = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional payload.Any Payload = 2; + * @return {?proto.payload.Any} + */ +proto.rpctransact.TxEnvelopeParam.prototype.getPayload = function() { + return /** @type{?proto.payload.Any} */ ( + jspb.Message.getWrapperField(this, payload_pb.Any, 2)); +}; + + +/** @param {?proto.payload.Any|undefined} value */ +proto.rpctransact.TxEnvelopeParam.prototype.setPayload = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.rpctransact.TxEnvelopeParam.prototype.clearPayload = function() { + this.setPayload(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.rpctransact.TxEnvelopeParam.prototype.hasPayload = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Duration Timeout = 3; + * @return {?proto.google.protobuf.Duration} + */ +proto.rpctransact.TxEnvelopeParam.prototype.getTimeout = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 3)); +}; + + +/** @param {?proto.google.protobuf.Duration|undefined} value */ +proto.rpctransact.TxEnvelopeParam.prototype.setTimeout = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.rpctransact.TxEnvelopeParam.prototype.clearTimeout = function() { + this.setTimeout(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.rpctransact.TxEnvelopeParam.prototype.hasTimeout = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.rpctransact); diff --git a/js/proto/spec_grpc_pb.d.ts b/js/proto/spec_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/spec_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/spec_grpc_pb.js b/js/proto/spec_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/spec_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/spec_pb.d.ts b/js/proto/spec_pb.d.ts new file mode 100644 index 000000000..17b318d73 --- /dev/null +++ b/js/proto/spec_pb.d.ts @@ -0,0 +1,64 @@ +// package: spec +// file: spec.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as crypto_pb from "./crypto_pb"; +import * as balance_pb from "./balance_pb"; + +export class TemplateAccount extends jspb.Message { + getName(): string; + setName(value: string): void; + + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + hasPublickey(): boolean; + clearPublickey(): void; + getPublickey(): crypto_pb.PublicKey | undefined; + setPublickey(value?: crypto_pb.PublicKey): void; + + clearAmountsList(): void; + getAmountsList(): Array; + setAmountsList(value: Array): void; + addAmounts(value?: balance_pb.Balance, index?: number): balance_pb.Balance; + + clearPermissionsList(): void; + getPermissionsList(): Array; + setPermissionsList(value: Array): void; + addPermissions(value: string, index?: number): string; + + clearRolesList(): void; + getRolesList(): Array; + setRolesList(value: Array): void; + addRoles(value: string, index?: number): string; + + getCode(): Uint8Array | string; + getCode_asU8(): Uint8Array; + getCode_asB64(): string; + setCode(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TemplateAccount.AsObject; + static toObject(includeInstance: boolean, msg: TemplateAccount): TemplateAccount.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TemplateAccount, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TemplateAccount; + static deserializeBinaryFromReader(message: TemplateAccount, reader: jspb.BinaryReader): TemplateAccount; +} + +export namespace TemplateAccount { + export type AsObject = { + name: string, + address: Uint8Array | string, + publickey?: crypto_pb.PublicKey.AsObject, + amountsList: Array, + permissionsList: Array, + rolesList: Array, + code: Uint8Array | string, + } +} + diff --git a/js/proto/spec_pb.js b/js/proto/spec_pb.js new file mode 100644 index 000000000..cfe5df863 --- /dev/null +++ b/js/proto/spec_pb.js @@ -0,0 +1,460 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var crypto_pb = require('./crypto_pb.js'); +goog.object.extend(proto, crypto_pb); +var balance_pb = require('./balance_pb.js'); +goog.object.extend(proto, balance_pb); +goog.exportSymbol('proto.spec.TemplateAccount', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.spec.TemplateAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.spec.TemplateAccount.repeatedFields_, null); +}; +goog.inherits(proto.spec.TemplateAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.spec.TemplateAccount.displayName = 'proto.spec.TemplateAccount'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.spec.TemplateAccount.repeatedFields_ = [4,5,6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.spec.TemplateAccount.prototype.toObject = function(opt_includeInstance) { + return proto.spec.TemplateAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.spec.TemplateAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.TemplateAccount.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: msg.getAddress_asB64(), + publickey: (f = msg.getPublickey()) && crypto_pb.PublicKey.toObject(includeInstance, f), + amountsList: jspb.Message.toObjectList(msg.getAmountsList(), + balance_pb.Balance.toObject, includeInstance), + permissionsList: jspb.Message.getRepeatedField(msg, 5), + rolesList: jspb.Message.getRepeatedField(msg, 6), + code: msg.getCode_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.spec.TemplateAccount} + */ +proto.spec.TemplateAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.spec.TemplateAccount; + return proto.spec.TemplateAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.spec.TemplateAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.spec.TemplateAccount} + */ +proto.spec.TemplateAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 3: + var value = new crypto_pb.PublicKey; + reader.readMessage(value,crypto_pb.PublicKey.deserializeBinaryFromReader); + msg.setPublickey(value); + break; + case 4: + var value = new balance_pb.Balance; + reader.readMessage(value,balance_pb.Balance.deserializeBinaryFromReader); + msg.addAmounts(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addPermissions(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addRoles(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.spec.TemplateAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.spec.TemplateAccount.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.spec.TemplateAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.spec.TemplateAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getPublickey(); + if (f != null) { + writer.writeMessage( + 3, + f, + crypto_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getAmountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + balance_pb.Balance.serializeBinaryToWriter + ); + } + f = message.getPermissionsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } + f = message.getRolesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } + f = message.getCode_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } +}; + + +/** + * optional string Name = 1; + * @return {string} + */ +proto.spec.TemplateAccount.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.spec.TemplateAccount.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes Address = 2; + * @return {!(string|Uint8Array)} + */ +proto.spec.TemplateAccount.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Address = 2; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.spec.TemplateAccount.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.spec.TemplateAccount.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.spec.TemplateAccount.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional crypto.PublicKey PublicKey = 3; + * @return {?proto.crypto.PublicKey} + */ +proto.spec.TemplateAccount.prototype.getPublickey = function() { + return /** @type{?proto.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, crypto_pb.PublicKey, 3)); +}; + + +/** @param {?proto.crypto.PublicKey|undefined} value */ +proto.spec.TemplateAccount.prototype.setPublickey = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.spec.TemplateAccount.prototype.clearPublickey = function() { + this.setPublickey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.spec.TemplateAccount.prototype.hasPublickey = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated balance.Balance Amounts = 4; + * @return {!Array} + */ +proto.spec.TemplateAccount.prototype.getAmountsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, balance_pb.Balance, 4)); +}; + + +/** @param {!Array} value */ +proto.spec.TemplateAccount.prototype.setAmountsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.balance.Balance=} opt_value + * @param {number=} opt_index + * @return {!proto.balance.Balance} + */ +proto.spec.TemplateAccount.prototype.addAmounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.balance.Balance, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.spec.TemplateAccount.prototype.clearAmountsList = function() { + this.setAmountsList([]); +}; + + +/** + * repeated string Permissions = 5; + * @return {!Array} + */ +proto.spec.TemplateAccount.prototype.getPermissionsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** @param {!Array} value */ +proto.spec.TemplateAccount.prototype.setPermissionsList = function(value) { + jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.spec.TemplateAccount.prototype.addPermissions = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.spec.TemplateAccount.prototype.clearPermissionsList = function() { + this.setPermissionsList([]); +}; + + +/** + * repeated string Roles = 6; + * @return {!Array} + */ +proto.spec.TemplateAccount.prototype.getRolesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** @param {!Array} value */ +proto.spec.TemplateAccount.prototype.setRolesList = function(value) { + jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.spec.TemplateAccount.prototype.addRoles = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.spec.TemplateAccount.prototype.clearRolesList = function() { + this.setRolesList([]); +}; + + +/** + * optional bytes Code = 7; + * @return {!(string|Uint8Array)} + */ +proto.spec.TemplateAccount.prototype.getCode = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes Code = 7; + * This is a type-conversion wrapper around `getCode()` + * @return {string} + */ +proto.spec.TemplateAccount.prototype.getCode_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCode())); +}; + + +/** + * optional bytes Code = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCode()` + * @return {!Uint8Array} + */ +proto.spec.TemplateAccount.prototype.getCode_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCode())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.spec.TemplateAccount.prototype.setCode = function(value) { + jspb.Message.setProto3BytesField(this, 7, value); +}; + + +goog.object.extend(exports, proto.spec); diff --git a/js/proto/storage_grpc_pb.d.ts b/js/proto/storage_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/storage_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/storage_grpc_pb.js b/js/proto/storage_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/storage_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/storage_pb.d.ts b/js/proto/storage_pb.d.ts new file mode 100644 index 000000000..8216319a0 --- /dev/null +++ b/js/proto/storage_pb.d.ts @@ -0,0 +1,32 @@ +// package: storage +// file: storage.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; + +export class CommitID extends jspb.Message { + getVersion(): number; + setVersion(value: number): void; + + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CommitID.AsObject; + static toObject(includeInstance: boolean, msg: CommitID): CommitID.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CommitID, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CommitID; + static deserializeBinaryFromReader(message: CommitID, reader: jspb.BinaryReader): CommitID; +} + +export namespace CommitID { + export type AsObject = { + version: number, + hash: Uint8Array | string, + } +} + diff --git a/js/proto/storage_pb.js b/js/proto/storage_pb.js new file mode 100644 index 000000000..467f53a7d --- /dev/null +++ b/js/proto/storage_pb.js @@ -0,0 +1,214 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +goog.exportSymbol('proto.storage.CommitID', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.storage.CommitID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.storage.CommitID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.storage.CommitID.displayName = 'proto.storage.CommitID'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.storage.CommitID.prototype.toObject = function(opt_includeInstance) { + return proto.storage.CommitID.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.storage.CommitID} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.storage.CommitID.toObject = function(includeInstance, msg) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, 0), + hash: msg.getHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.storage.CommitID} + */ +proto.storage.CommitID.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.storage.CommitID; + return proto.storage.CommitID.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.storage.CommitID} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.storage.CommitID} + */ +proto.storage.CommitID.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVersion(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.storage.CommitID.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.storage.CommitID.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.storage.CommitID} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.storage.CommitID.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional int64 Version = 1; + * @return {number} + */ +proto.storage.CommitID.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.storage.CommitID.prototype.setVersion = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes Hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.storage.CommitID.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Hash = 2; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.storage.CommitID.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes Hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.storage.CommitID.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.storage.CommitID.prototype.setHash = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.storage); diff --git a/js/proto/tendermint_grpc_pb.d.ts b/js/proto/tendermint_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/tendermint_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/tendermint_grpc_pb.js b/js/proto/tendermint_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint_pb.d.ts b/js/proto/tendermint_pb.d.ts new file mode 100644 index 000000000..8678f2589 --- /dev/null +++ b/js/proto/tendermint_pb.d.ts @@ -0,0 +1,58 @@ +// package: tendermint +// file: tendermint.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; + +export class NodeInfo extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): void; + + getListenaddress(): string; + setListenaddress(value: string): void; + + getNetwork(): string; + setNetwork(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + getChannels(): Uint8Array | string; + getChannels_asU8(): Uint8Array; + getChannels_asB64(): string; + setChannels(value: Uint8Array | string): void; + + getMoniker(): string; + setMoniker(value: string): void; + + getRpcaddress(): string; + setRpcaddress(value: string): void; + + getTxindex(): string; + setTxindex(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: NodeInfo): NodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NodeInfo; + static deserializeBinaryFromReader(message: NodeInfo, reader: jspb.BinaryReader): NodeInfo; +} + +export namespace NodeInfo { + export type AsObject = { + id: Uint8Array | string, + listenaddress: string, + network: string, + version: string, + channels: Uint8Array | string, + moniker: string, + rpcaddress: string, + txindex: string, + } +} + diff --git a/js/proto/tendermint_pb.js b/js/proto/tendermint_pb.js new file mode 100644 index 000000000..67f898ff2 --- /dev/null +++ b/js/proto/tendermint_pb.js @@ -0,0 +1,400 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +goog.exportSymbol('proto.tendermint.NodeInfo', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.NodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.NodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.NodeInfo.displayName = 'proto.tendermint.NodeInfo'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.NodeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.NodeInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.NodeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.NodeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + listenaddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + network: jspb.Message.getFieldWithDefault(msg, 3, ""), + version: jspb.Message.getFieldWithDefault(msg, 4, ""), + channels: msg.getChannels_asB64(), + moniker: jspb.Message.getFieldWithDefault(msg, 6, ""), + rpcaddress: jspb.Message.getFieldWithDefault(msg, 7, ""), + txindex: jspb.Message.getFieldWithDefault(msg, 8, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.NodeInfo} + */ +proto.tendermint.NodeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.NodeInfo; + return proto.tendermint.NodeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.NodeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.NodeInfo} + */ +proto.tendermint.NodeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setListenaddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setNetwork(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChannels(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setMoniker(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setRpcaddress(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setTxindex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.NodeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.NodeInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.NodeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.NodeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getListenaddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getNetwork(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getChannels_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getMoniker(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getRpcaddress(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getTxindex(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional bytes ID = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.NodeInfo.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes ID = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.tendermint.NodeInfo.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes ID = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.tendermint.NodeInfo.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.tendermint.NodeInfo.prototype.setId = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string ListenAddress = 2; + * @return {string} + */ +proto.tendermint.NodeInfo.prototype.getListenaddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.tendermint.NodeInfo.prototype.setListenaddress = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string Network = 3; + * @return {string} + */ +proto.tendermint.NodeInfo.prototype.getNetwork = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.tendermint.NodeInfo.prototype.setNetwork = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string Version = 4; + * @return {string} + */ +proto.tendermint.NodeInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.tendermint.NodeInfo.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bytes Channels = 5; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.NodeInfo.prototype.getChannels = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes Channels = 5; + * This is a type-conversion wrapper around `getChannels()` + * @return {string} + */ +proto.tendermint.NodeInfo.prototype.getChannels_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChannels())); +}; + + +/** + * optional bytes Channels = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChannels()` + * @return {!Uint8Array} + */ +proto.tendermint.NodeInfo.prototype.getChannels_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChannels())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.tendermint.NodeInfo.prototype.setChannels = function(value) { + jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional string Moniker = 6; + * @return {string} + */ +proto.tendermint.NodeInfo.prototype.getMoniker = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.tendermint.NodeInfo.prototype.setMoniker = function(value) { + jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string RPCAddress = 7; + * @return {string} + */ +proto.tendermint.NodeInfo.prototype.getRpcaddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** @param {string} value */ +proto.tendermint.NodeInfo.prototype.setRpcaddress = function(value) { + jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string TxIndex = 8; + * @return {string} + */ +proto.tendermint.NodeInfo.prototype.getTxindex = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** @param {string} value */ +proto.tendermint.NodeInfo.prototype.setTxindex = function(value) { + jspb.Message.setProto3StringField(this, 8, value); +}; + + +goog.object.extend(exports, proto.tendermint); diff --git a/js/proto/txs_grpc_pb.d.ts b/js/proto/txs_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/txs_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/txs_grpc_pb.js b/js/proto/txs_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/txs_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/txs_pb.d.ts b/js/proto/txs_pb.d.ts new file mode 100644 index 000000000..25b0567ac --- /dev/null +++ b/js/proto/txs_pb.d.ts @@ -0,0 +1,116 @@ +// package: txs +// file: txs.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as crypto_pb from "./crypto_pb"; + +export class Envelope extends jspb.Message { + clearSignatoriesList(): void; + getSignatoriesList(): Array; + setSignatoriesList(value: Array): void; + addSignatories(value?: Signatory, index?: number): Signatory; + + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): void; + + getEnc(): Envelope.EncodingMap[keyof Envelope.EncodingMap]; + setEnc(value: Envelope.EncodingMap[keyof Envelope.EncodingMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Envelope.AsObject; + static toObject(includeInstance: boolean, msg: Envelope): Envelope.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Envelope, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Envelope; + static deserializeBinaryFromReader(message: Envelope, reader: jspb.BinaryReader): Envelope; +} + +export namespace Envelope { + export type AsObject = { + signatoriesList: Array, + tx: Uint8Array | string, + enc: Envelope.EncodingMap[keyof Envelope.EncodingMap], + } + + export interface EncodingMap { + JSON: 0; + RLP: 1; + } + + export const Encoding: EncodingMap; +} + +export class Signatory extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + hasPublickey(): boolean; + clearPublickey(): void; + getPublickey(): crypto_pb.PublicKey | undefined; + setPublickey(value?: crypto_pb.PublicKey): void; + + hasSignature(): boolean; + clearSignature(): void; + getSignature(): crypto_pb.Signature | undefined; + setSignature(value?: crypto_pb.Signature): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Signatory.AsObject; + static toObject(includeInstance: boolean, msg: Signatory): Signatory.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Signatory, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Signatory; + static deserializeBinaryFromReader(message: Signatory, reader: jspb.BinaryReader): Signatory; +} + +export namespace Signatory { + export type AsObject = { + address: Uint8Array | string, + publickey?: crypto_pb.PublicKey.AsObject, + signature?: crypto_pb.Signature.AsObject, + } +} + +export class Receipt extends jspb.Message { + getTxtype(): number; + setTxtype(value: number): void; + + getTxhash(): Uint8Array | string; + getTxhash_asU8(): Uint8Array; + getTxhash_asB64(): string; + setTxhash(value: Uint8Array | string): void; + + getCreatescontract(): boolean; + setCreatescontract(value: boolean): void; + + getContractaddress(): Uint8Array | string; + getContractaddress_asU8(): Uint8Array; + getContractaddress_asB64(): string; + setContractaddress(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Receipt.AsObject; + static toObject(includeInstance: boolean, msg: Receipt): Receipt.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Receipt, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Receipt; + static deserializeBinaryFromReader(message: Receipt, reader: jspb.BinaryReader): Receipt; +} + +export namespace Receipt { + export type AsObject = { + txtype: number, + txhash: Uint8Array | string, + createscontract: boolean, + contractaddress: Uint8Array | string, + } +} + diff --git a/js/proto/txs_pb.js b/js/proto/txs_pb.js new file mode 100644 index 000000000..4192f3148 --- /dev/null +++ b/js/proto/txs_pb.js @@ -0,0 +1,824 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var crypto_pb = require('./crypto_pb.js'); +goog.object.extend(proto, crypto_pb); +goog.exportSymbol('proto.txs.Envelope', null, global); +goog.exportSymbol('proto.txs.Envelope.Encoding', null, global); +goog.exportSymbol('proto.txs.Receipt', null, global); +goog.exportSymbol('proto.txs.Signatory', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.txs.Envelope = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.txs.Envelope.repeatedFields_, null); +}; +goog.inherits(proto.txs.Envelope, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.txs.Envelope.displayName = 'proto.txs.Envelope'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.txs.Signatory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.txs.Signatory, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.txs.Signatory.displayName = 'proto.txs.Signatory'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.txs.Receipt = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.txs.Receipt, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.txs.Receipt.displayName = 'proto.txs.Receipt'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.txs.Envelope.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.txs.Envelope.prototype.toObject = function(opt_includeInstance) { + return proto.txs.Envelope.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.txs.Envelope} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.txs.Envelope.toObject = function(includeInstance, msg) { + var f, obj = { + signatoriesList: jspb.Message.toObjectList(msg.getSignatoriesList(), + proto.txs.Signatory.toObject, includeInstance), + tx: msg.getTx_asB64(), + enc: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.txs.Envelope} + */ +proto.txs.Envelope.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.txs.Envelope; + return proto.txs.Envelope.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.txs.Envelope} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.txs.Envelope} + */ +proto.txs.Envelope.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.txs.Signatory; + reader.readMessage(value,proto.txs.Signatory.deserializeBinaryFromReader); + msg.addSignatories(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTx(value); + break; + case 3: + var value = /** @type {!proto.txs.Envelope.Encoding} */ (reader.readEnum()); + msg.setEnc(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.txs.Envelope.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.txs.Envelope.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.txs.Envelope} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.txs.Envelope.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignatoriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.txs.Signatory.serializeBinaryToWriter + ); + } + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getEnc(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.txs.Envelope.Encoding = { + JSON: 0, + RLP: 1 +}; + +/** + * repeated Signatory Signatories = 1; + * @return {!Array} + */ +proto.txs.Envelope.prototype.getSignatoriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.txs.Signatory, 1)); +}; + + +/** @param {!Array} value */ +proto.txs.Envelope.prototype.setSignatoriesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.txs.Signatory=} opt_value + * @param {number=} opt_index + * @return {!proto.txs.Signatory} + */ +proto.txs.Envelope.prototype.addSignatories = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.txs.Signatory, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + */ +proto.txs.Envelope.prototype.clearSignatoriesList = function() { + this.setSignatoriesList([]); +}; + + +/** + * optional bytes Tx = 2; + * @return {!(string|Uint8Array)} + */ +proto.txs.Envelope.prototype.getTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Tx = 2; + * This is a type-conversion wrapper around `getTx()` + * @return {string} + */ +proto.txs.Envelope.prototype.getTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTx())); +}; + + +/** + * optional bytes Tx = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTx()` + * @return {!Uint8Array} + */ +proto.txs.Envelope.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.txs.Envelope.prototype.setTx = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional Encoding Enc = 3; + * @return {!proto.txs.Envelope.Encoding} + */ +proto.txs.Envelope.prototype.getEnc = function() { + return /** @type {!proto.txs.Envelope.Encoding} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {!proto.txs.Envelope.Encoding} value */ +proto.txs.Envelope.prototype.setEnc = function(value) { + jspb.Message.setProto3EnumField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.txs.Signatory.prototype.toObject = function(opt_includeInstance) { + return proto.txs.Signatory.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.txs.Signatory} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.txs.Signatory.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + publickey: (f = msg.getPublickey()) && crypto_pb.PublicKey.toObject(includeInstance, f), + signature: (f = msg.getSignature()) && crypto_pb.Signature.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.txs.Signatory} + */ +proto.txs.Signatory.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.txs.Signatory; + return proto.txs.Signatory.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.txs.Signatory} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.txs.Signatory} + */ +proto.txs.Signatory.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = new crypto_pb.PublicKey; + reader.readMessage(value,crypto_pb.PublicKey.deserializeBinaryFromReader); + msg.setPublickey(value); + break; + case 4: + var value = new crypto_pb.Signature; + reader.readMessage(value,crypto_pb.Signature.deserializeBinaryFromReader); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.txs.Signatory.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.txs.Signatory.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.txs.Signatory} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.txs.Signatory.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPublickey(); + if (f != null) { + writer.writeMessage( + 2, + f, + crypto_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getSignature(); + if (f != null) { + writer.writeMessage( + 4, + f, + crypto_pb.Signature.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.txs.Signatory.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.txs.Signatory.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.txs.Signatory.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.txs.Signatory.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional crypto.PublicKey PublicKey = 2; + * @return {?proto.crypto.PublicKey} + */ +proto.txs.Signatory.prototype.getPublickey = function() { + return /** @type{?proto.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, crypto_pb.PublicKey, 2)); +}; + + +/** @param {?proto.crypto.PublicKey|undefined} value */ +proto.txs.Signatory.prototype.setPublickey = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.txs.Signatory.prototype.clearPublickey = function() { + this.setPublickey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.txs.Signatory.prototype.hasPublickey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional crypto.Signature Signature = 4; + * @return {?proto.crypto.Signature} + */ +proto.txs.Signatory.prototype.getSignature = function() { + return /** @type{?proto.crypto.Signature} */ ( + jspb.Message.getWrapperField(this, crypto_pb.Signature, 4)); +}; + + +/** @param {?proto.crypto.Signature|undefined} value */ +proto.txs.Signatory.prototype.setSignature = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.txs.Signatory.prototype.clearSignature = function() { + this.setSignature(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.txs.Signatory.prototype.hasSignature = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.txs.Receipt.prototype.toObject = function(opt_includeInstance) { + return proto.txs.Receipt.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.txs.Receipt} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.txs.Receipt.toObject = function(includeInstance, msg) { + var f, obj = { + txtype: jspb.Message.getFieldWithDefault(msg, 1, 0), + txhash: msg.getTxhash_asB64(), + createscontract: jspb.Message.getFieldWithDefault(msg, 3, false), + contractaddress: msg.getContractaddress_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.txs.Receipt} + */ +proto.txs.Receipt.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.txs.Receipt; + return proto.txs.Receipt.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.txs.Receipt} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.txs.Receipt} + */ +proto.txs.Receipt.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTxtype(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxhash(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCreatescontract(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractaddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.txs.Receipt.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.txs.Receipt.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.txs.Receipt} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.txs.Receipt.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxtype(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getTxhash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getCreatescontract(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getContractaddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional uint32 TxType = 1; + * @return {number} + */ +proto.txs.Receipt.prototype.getTxtype = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.txs.Receipt.prototype.setTxtype = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes TxHash = 2; + * @return {!(string|Uint8Array)} + */ +proto.txs.Receipt.prototype.getTxhash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes TxHash = 2; + * This is a type-conversion wrapper around `getTxhash()` + * @return {string} + */ +proto.txs.Receipt.prototype.getTxhash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxhash())); +}; + + +/** + * optional bytes TxHash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxhash()` + * @return {!Uint8Array} + */ +proto.txs.Receipt.prototype.getTxhash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxhash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.txs.Receipt.prototype.setTxhash = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bool CreatesContract = 3; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.txs.Receipt.prototype.getCreatescontract = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); +}; + + +/** @param {boolean} value */ +proto.txs.Receipt.prototype.setCreatescontract = function(value) { + jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional bytes ContractAddress = 4; + * @return {!(string|Uint8Array)} + */ +proto.txs.Receipt.prototype.getContractaddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes ContractAddress = 4; + * This is a type-conversion wrapper around `getContractaddress()` + * @return {string} + */ +proto.txs.Receipt.prototype.getContractaddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractaddress())); +}; + + +/** + * optional bytes ContractAddress = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContractaddress()` + * @return {!Uint8Array} + */ +proto.txs.Receipt.prototype.getContractaddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractaddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.txs.Receipt.prototype.setContractaddress = function(value) { + jspb.Message.setProto3BytesField(this, 4, value); +}; + + +goog.object.extend(exports, proto.txs); diff --git a/js/proto/validator_grpc_pb.d.ts b/js/proto/validator_grpc_pb.d.ts new file mode 100644 index 000000000..51b4d6959 --- /dev/null +++ b/js/proto/validator_grpc_pb.d.ts @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/validator_grpc_pb.js b/js/proto/validator_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/validator_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/validator_pb.d.ts b/js/proto/validator_pb.d.ts new file mode 100644 index 000000000..ac9da6810 --- /dev/null +++ b/js/proto/validator_pb.d.ts @@ -0,0 +1,39 @@ +// package: validator +// file: validator.proto + +import * as jspb from "google-protobuf"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as crypto_pb from "./crypto_pb"; + +export class Validator extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + hasPublickey(): boolean; + clearPublickey(): void; + getPublickey(): crypto_pb.PublicKey | undefined; + setPublickey(value?: crypto_pb.PublicKey): void; + + getPower(): number; + setPower(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Validator.AsObject; + static toObject(includeInstance: boolean, msg: Validator): Validator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Validator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Validator; + static deserializeBinaryFromReader(message: Validator, reader: jspb.BinaryReader): Validator; +} + +export namespace Validator { + export type AsObject = { + address: Uint8Array | string, + publickey?: crypto_pb.PublicKey.AsObject, + power: number, + } +} + diff --git a/js/proto/validator_pb.js b/js/proto/validator_pb.js new file mode 100644 index 000000000..40622b57b --- /dev/null +++ b/js/proto/validator_pb.js @@ -0,0 +1,263 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var crypto_pb = require('./crypto_pb.js'); +goog.object.extend(proto, crypto_pb); +goog.exportSymbol('proto.validator.Validator', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validator.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.validator.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validator.Validator.displayName = 'proto.validator.Validator'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.validator.Validator.prototype.toObject = function(opt_includeInstance) { + return proto.validator.Validator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validator.Validator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validator.Validator.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + publickey: (f = msg.getPublickey()) && crypto_pb.PublicKey.toObject(includeInstance, f), + power: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validator.Validator} + */ +proto.validator.Validator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validator.Validator; + return proto.validator.Validator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validator.Validator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validator.Validator} + */ +proto.validator.Validator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = new crypto_pb.PublicKey; + reader.readMessage(value,crypto_pb.PublicKey.deserializeBinaryFromReader); + msg.setPublickey(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validator.Validator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validator.Validator.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validator.Validator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validator.Validator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPublickey(); + if (f != null) { + writer.writeMessage( + 2, + f, + crypto_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.validator.Validator.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.validator.Validator.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.validator.Validator.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.validator.Validator.prototype.setAddress = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional crypto.PublicKey PublicKey = 2; + * @return {?proto.crypto.PublicKey} + */ +proto.validator.Validator.prototype.getPublickey = function() { + return /** @type{?proto.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, crypto_pb.PublicKey, 2)); +}; + + +/** @param {?proto.crypto.PublicKey|undefined} value */ +proto.validator.Validator.prototype.setPublickey = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + */ +proto.validator.Validator.prototype.clearPublickey = function() { + this.setPublickey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validator.Validator.prototype.hasPublickey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 Power = 3; + * @return {number} + */ +proto.validator.Validator.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.validator.Validator.prototype.setPower = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +goog.object.extend(exports, proto.validator); diff --git a/js/src/index.ts b/js/src/index.ts new file mode 100644 index 000000000..f09abc966 --- /dev/null +++ b/js/src/index.ts @@ -0,0 +1,9 @@ +import { Burrow } from './lib/Burrow'; +import { Contract } from './lib/contracts/contract'; +import * as utils from './lib/utils/utils'; + +export { + Burrow, + Contract, + utils, +} \ No newline at end of file diff --git a/js/src/lib/Burrow.ts b/js/src/lib/Burrow.ts new file mode 100644 index 000000000..e73ee7929 --- /dev/null +++ b/js/src/lib/Burrow.ts @@ -0,0 +1,52 @@ +import { Events } from './events'; +import { Pipe } from './pipe'; +import { ContractManager } from './contracts/manager'; +import { Namereg } from './namereg'; +import { TransactClient } from '../../proto/rpctransact_grpc_pb'; +import { QueryClient } from '../../proto/rpcquery_grpc_pb'; +import { ExecutionEventsClient } from '../../proto/rpcevents_grpc_pb'; +import * as grpc from 'grpc'; + +export type Error = grpc.ServiceError; + +export class Burrow { + URL: string; + account: string; + + events: Events; + pipe: Pipe; + contracts: ContractManager; + namereg: Namereg; + + ec: ExecutionEventsClient; + tc: TransactClient; + qc: QueryClient; + + constructor(URL: string, account: string) { + this.URL = URL; + this.account = account; + + this.ec = new ExecutionEventsClient(URL, grpc.credentials.createInsecure()); + this.tc = new TransactClient(URL, grpc.credentials.createInsecure()); + this.qc = new QueryClient(URL, grpc.credentials.createInsecure()); + + // This is the execution events streaming service running on top of the raw streaming function. + this.events = new Events(this.ec); + + // Contracts stuff running on top of grpc + this.pipe = new Pipe(this.tc, this.events); + this.contracts = new ContractManager(this); + + this.namereg = new Namereg(merge(this.tc, this.qc), this.account); + } +} + +function merge(...args: any[]): any { + const next = {}; + for (const obj of args) { + for (const key in obj) { + next[key] = obj[key]; + } + } + return next; +}; diff --git a/js/src/lib/contracts/contract.ts b/js/src/lib/contracts/contract.ts new file mode 100644 index 000000000..215a7bcb3 --- /dev/null +++ b/js/src/lib/contracts/contract.ts @@ -0,0 +1,89 @@ +import { SolidityEvent } from './event'; +import { SolidityFunction, Handler } from './function'; +import { Burrow } from '../Burrow'; +import { Function, Event } from 'solc'; + +type FunctionOrEvent = Function | Event; + +export interface Handlers { + call?: Handler + deploy?: Handler +} + +const defaultHandlers: Handlers = { + call: function (result) { return result.raw }, + deploy: function (result) { return result.contractAddress } +} + +export class Contract { + abi: Array; + address: string; + code: string; + burrow: Burrow; + handlers: Handlers; + + _constructor: any; + + constructor(abi: Array, code: string, address: string, burrow: Burrow, handlers?: Handlers) { + handlers = Object.assign({}, defaultHandlers, handlers); + + this.address = address; + this.abi = abi; + this.code = code; + this.burrow = burrow; + this.handlers = handlers; + addFunctionsToContract(this); + addEventsToContract(this); + } +} + +const addFunctionsToContract = function (contract: Contract) { + (contract.abi.filter(json => { + return (json.type === 'function' || json.type === 'constructor'); + }) as Function[]).forEach(function (json) { + let {displayName, typeName, call, encode, decode} = SolidityFunction(json, contract.burrow); + + if (json.type === 'constructor') { + contract._constructor = call.bind(contract, false, contract.handlers.deploy, ''); + } else { + // bind the function call to the contract, specify if call or transact is desired + let execute = call.bind(contract, json.constant, contract.handlers.call, null); + execute.sim = call.bind(contract, true, contract.handlers.call, null); + // These allow the interface to be used for a generic contract of this type + execute.at = call.bind(contract, json.constant, contract.handlers.call); + execute.atSim = call.bind(contract, true, contract.handlers.call); + + execute.encode = encode.bind(contract); + execute.decode = decode.bind(contract); + + // Attach to the contract object + if (!contract[displayName]) { + contract[displayName] = execute; + } + contract[displayName][typeName] = execute; + } + }) + + // Not every abi has a constructor specification. + // If it doesn't we force a _constructor with null abi + if (!contract._constructor) { + const {call} = SolidityFunction(null, contract.burrow); + contract._constructor = call.bind(contract, false, contract.handlers.deploy, ''); + } +} + +const addEventsToContract = function (contract: Contract) { + (contract.abi.filter(json => { + return json.type === 'event' + }) as Event[]).forEach(json => { + const {displayName, typeName, call} = SolidityEvent(json, contract.burrow); + + const execute = call.bind(contract, null); + execute.once = call.bind(contract, null); + execute.at = call.bind(contract); + if (!contract[displayName]) { + contract[displayName] = execute; + } + contract[displayName][typeName] = call.bind(contract); + }) +} \ No newline at end of file diff --git a/js/src/lib/contracts/event.ts b/js/src/lib/contracts/event.ts new file mode 100644 index 000000000..b4d3f373b --- /dev/null +++ b/js/src/lib/contracts/event.ts @@ -0,0 +1,61 @@ +import * as utils from '../utils/utils'; +import * as coder from 'ethereumjs-abi'; +import * as convert from '../utils/convert'; +import sha3 from '../utils/sha3'; +import { Burrow, Error } from '../Burrow'; +import { LogEvent } from '../../../proto/exec_pb' +import { Event, EventInput } from 'solc'; + +const types = (abi: Array, indexed: boolean) => + abi.filter(i => i.indexed === indexed).map(i => i.type); + +type EventResult = { + event?: string + address?: Uint8Array + args?: Record +} + +const decode = function (abi: Event, data: LogEvent): EventResult { + if (!data) return + + const argTopics = abi.anonymous ? data.getTopicsList_asU8() : data.getTopicsList_asU8().slice(1) + const indexedParamsABI = types(abi.inputs, true) + const nonIndexedParamsABI = types(abi.inputs, false) + const indexedData = Buffer.concat(argTopics) + const indexedParams = convert.abiToBurrow(indexedParamsABI, coder.rawDecode(indexedParamsABI, indexedData)) + const nonIndexedParams = convert.abiToBurrow(nonIndexedParamsABI, coder.rawDecode(nonIndexedParamsABI, Buffer.from(data.getData_asU8()))) + + return { + event: utils.transformToFullName(abi), + address: data.getAddress_asU8(), + args: abi.inputs.reduce(function (acc, current) { + acc[current.name] = current.indexed ? indexedParams.shift() : nonIndexedParams.shift() + return acc + }, {}), + }; +} + +export const SolidityEvent = function (abi: Event, burrow: Burrow) { + const name = utils.transformToFullName(abi); + const displayName = utils.extractDisplayName(name); + const typeName = utils.extractTypeName(name); + const signature = sha3(name); + + const call = function (address: string, callback: (err: Error, decoded: EventResult) => void) { + address = address || this.address; + if (!callback) throw new Error('Can not subscribe to an event without a callback.'); + + return burrow.pipe.eventSub(address, signature, (err, event) => { + if (err) callback(err, null); + let decoded: EventResult; + try { + decoded = decode(abi, event); + } catch (err) { + return callback(err, null); + } + callback(null, decoded); + }); + } + + return {displayName, typeName, call}; +} \ No newline at end of file diff --git a/js/src/lib/contracts/function.ts b/js/src/lib/contracts/function.ts new file mode 100644 index 000000000..467f737e0 --- /dev/null +++ b/js/src/lib/contracts/function.ts @@ -0,0 +1,191 @@ +import * as utils from '../utils/utils'; +import * as coder from 'ethereumjs-abi'; +import * as convert from '../utils/convert'; +import * as grpc from 'grpc'; +import sha3 from '../utils/sha3'; +import { TxInput, CallTx } from '../../../proto/payload_pb'; +import { TxExecution, Result } from '../../../proto/exec_pb'; +import { Burrow, Error } from '../Burrow'; +import { Envelope } from '../../../proto/txs_pb'; +import { Function, FunctionInput, FunctionOutput } from 'solc'; + +type FunctionIO = FunctionInput & FunctionOutput; + +export const DEFAULT_GAS = 1111111111; + +type TransactionResult = { + contractAddress: string + height: number + index: number + hash: string + type: number + result: Result.AsObject + tx: Envelope.AsObject + caller: string | string[] +} & DecodedResult + +type DecodedResult = { + raw?: any[] + values?: Record +} + +export type Handler = (result: TransactionResult) => any + +function fnSignature(abi: Function) { + const name = utils.transformToFullName(abi) + return sha3(name).slice(0, 8) +} + +const types = (args: Array) => args.map(arg => arg.type); + +function txPayload(data: string, account: string, address: string): CallTx { + const input = new TxInput(); + input.setAddress(Buffer.from(account, 'hex')); + input.setAmount(0); + + const payload = new CallTx(); + payload.setInput(input); + if (address) payload.setAddress(Buffer.from(address, 'hex')); + payload.setGaslimit(DEFAULT_GAS); + payload.setFee(0); + payload.setData(Buffer.from(data, 'hex')); + + return payload +} + +const encodeF = function (abi: Function, args: Array, bytecode: string): string { + let abiInputs: string[]; + if (abi) { + abiInputs = types(abi.inputs) + args = convert.burrowToAbi(abiInputs, args) // If abi is passed, convert values accordingly + } + + // If bytecode provided then this is a creation call, bytecode goes first + if (bytecode) { + let data = bytecode + if (abi) data += convert.bytesTB(coder.rawEncode(abiInputs, args)) + return data + } else { + return fnSignature(abi) + convert.bytesTB(coder.rawEncode(abiInputs, args)) + } +} + +const decodeF = function (abi: Function, output: Uint8Array): DecodedResult { + if (!output) return + + let outputs = abi.outputs; + let outputTypes = types(outputs); + + // Decode raw bytes to arguments + let raw = convert.abiToBurrow(outputTypes, coder.rawDecode(outputTypes, Buffer.from(output))); + let result: DecodedResult = {raw: raw.slice()} + + result.values = outputs.reduce(function (acc, current) { + let value = raw.shift(); + if (current.name) { + acc[current.name] = value; + } + return acc; + }, {}); + + return result; +} + +export const SolidityFunction = function (abi: Function, burrow: Burrow) { + let isConstructor = (abi == null || abi.type === 'constructor'); + let name: string; + let displayName: string; + let typeName: string; + if (!isConstructor) { + name = utils.transformToFullName(abi); + displayName = utils.extractDisplayName(name); + typeName = utils.extractTypeName(name); + } + + // It might seem weird to include copies of the functions in here and above + // My reason is the code above can be used "functionally" whereas this version + // Uses implicit attributes of this object. + // I want to keep them separate in the case that we want to move all the functional + // components together and maybe even... write tests for them (gasp!) + const encode = function () { + let args = Array.prototype.slice.call(arguments) + return encodeF(abi, args, isConstructor ? this.code : null) + } + + const decode = function (data) { + return decodeF(abi, data) + } + + const call = async function (isSim: boolean, handler: Handler, address: string, ...args: any[]) { + handler = handler || function (result) { return result }; + address = address || this.address; + if (isConstructor) { address = null }; + const self = this; + + let P = new Promise(function (resolve, reject) { + if (address == null && !isConstructor) reject(new Error('Address not provided to call')) + if (abi != null && abi.inputs.length !== args.length) reject(new Error('Insufficient arguments passed to function: ' + (isConstructor ? 'constructor' : name))) + // Post process the return + let post = function (error: Error, result: TxExecution) { + if (error) return reject(error) + + // Handle execution reversions + if (result.hasException()) { + // Decode error message if there is one otherwise default + if (result.getResult().getReturn().length === 0) { + error = new Error('Execution Reverted') + } else { + // Strip first 4 bytes(function signature) the decode as a string + error = new Error(coder.rawDecode(['string'], Buffer.from(result.getResult().getReturn_asU8().slice(4)))[0]) + } + error.code = grpc.status.ABORTED; + return reject(error) + } + + // Meta Data (address, caller, height, etc) + let returnObj: TransactionResult = { + contractAddress: Buffer.from(result.getReceipt().getContractaddress_asU8()).toString('hex').toUpperCase(), + height: result.getHeader().getHeight(), + index: result.getHeader().getIndex(), + hash: Buffer.from(result.getHeader().getTxhash_asU8()).toString('hex').toUpperCase(), + type: result.getHeader().getTxtype(), + result: result.getResult().toObject(), + tx: result.getEnvelope().toObject(), + caller: convert.recApply(convert.bytesTB, result.getEnvelope().getSignatoriesList().map(sig => sig.getAddress_asU8())), + } + + // Unpack return arguments + if (!isConstructor) { + try { + let {raw, values} = decodeF(abi, result.getResult().getReturn_asU8()); + returnObj.raw = raw; + returnObj.values = values; + } catch (e) { + return reject(e) + } + } + + return resolve(returnObj); + } + + // Decide if to make a "call" or a "transaction" + // For the moment we need to use the burrowtoweb3 function to prefix bytes with 0x + // otherwise the coder will give an error with bignumber not a number + // TODO investigate if other libs or an updated lib will fix this + // let data = encodeF(abi, utils.burrowToWeb3(args), isCon ? self.code : null) + let data = encodeF(abi, args, isConstructor ? self.code : null) + let payload = txPayload(data, burrow.account, address) + + if (isSim) { + burrow.pipe.call(payload, post) + } else { + burrow.pipe.transact(payload, post) + } + }) + + const result = await P; + return handler(result); + } + + return {displayName, typeName, call, encode, decode} +} \ No newline at end of file diff --git a/js/src/lib/contracts/manager.ts b/js/src/lib/contracts/manager.ts new file mode 100644 index 000000000..9f5bd2858 --- /dev/null +++ b/js/src/lib/contracts/manager.ts @@ -0,0 +1,45 @@ +import { Contract, Handlers } from './contract'; +import { Burrow } from '../Burrow'; +import { GetMetadataParam } from '../../../proto/rpcquery_pb'; +import { Function, Event } from 'solc'; + +type FunctionOrEvent = Function | Event; + +export class ContractManager { + burrow: Burrow; + + constructor(burrow: Burrow) { + this.burrow = burrow; + } + + deploy(abi: Array, byteCode: string, handlers?: Handlers, ...args: any[]): Promise { + return new Promise((resolve, reject) => { + let contract = new Contract(abi, byteCode, null, this.burrow, handlers) + contract._constructor.apply(contract, args).then((address: string) => { + contract.address = address; + resolve(contract); + }); + }); + } + + /** + * Creates a contract object interface from an address without ABI. + * The contract must be deployed using a recent burrow deploy which registers + * metadata. + * + * @method address + * @param {string} address - default contract address [can be null] + * @returns {Contract} returns contract interface object + */ + address(address: string, handlers?: Handlers): Promise { + const msg = new GetMetadataParam(); + msg.setAddress(Buffer.from(address, 'hex')); + + return new Promise((resolve, reject) => + this.burrow.qc.getMetadata(msg, (err, res) => { + if (err) reject(err); + const abi = JSON.parse(res.getMetadata()).Abi; + resolve(new Contract(abi, null, address, this.burrow, handlers)); + })) + } +} \ No newline at end of file diff --git a/js/src/lib/events.ts b/js/src/lib/events.ts new file mode 100644 index 000000000..14b3513fa --- /dev/null +++ b/js/src/lib/events.ts @@ -0,0 +1,49 @@ +import { ExecutionEventsClient } from '../../proto/rpcevents_grpc_pb'; +import { BlocksRequest, BlockRange, Bound, EventsResponse } from '../../proto/rpcevents_pb'; +import { LogEvent } from '../../proto/exec_pb'; +import { Error } from './Burrow'; +import * as grpc from 'grpc'; + +export type EventStream = grpc.ClientReadableStream; + +export class Events { + burrow: ExecutionEventsClient; + + constructor(burrow: ExecutionEventsClient) { + this.burrow = burrow; + } + + listen(query: string, callback: (err: Error, log: LogEvent) => void): EventStream { + const start = new Bound(); + start.setType(3); + start.setIndex(0); + const end = new Bound(); + end.setType(4); + end.setIndex(0); + + const range = new BlockRange(); + range.setStart(start); + range.setEnd(end); + + const arg = new BlocksRequest(); + arg.setBlockrange(range); + arg.setQuery(query); + + let stream = this.burrow.events(arg); + stream.on('data', (data: EventsResponse) => { + data.getEventsList().map(event => { + callback(null, event.getLog()); + }); + }); + stream.on('error', (err: Error) => + err.code === grpc.status.CANCELLED ? callback(null, null) : callback(err, null)); + stream.on('close', () => callback(null, null)); + stream.on('end', () => callback(null, null)); + return stream; + } + + subContractEvents(address: string, signature: string, callback: (err: Error, log: LogEvent) => void) { + const filter = "EventType = 'LogEvent' AND Address = '" + address.toUpperCase() + "'" + " AND Log0 = '" + signature.toUpperCase() + "'"; + return this.listen(filter, callback); + } +} \ No newline at end of file diff --git a/js/src/lib/namereg.ts b/js/src/lib/namereg.ts new file mode 100644 index 000000000..e5e375f53 --- /dev/null +++ b/js/src/lib/namereg.ts @@ -0,0 +1,37 @@ +import { QueryClient } from '../../proto/rpcquery_grpc_pb'; +import { GetNameParam } from '../../proto/rpcquery_pb'; +import { Entry } from '../../proto/names_pb'; +import { TransactClient } from '../../proto/rpctransact_grpc_pb'; +import { TxInput, NameTx } from '../../proto/payload_pb'; +import { TxExecution } from '../../proto/exec_pb'; +import * as grpc from 'grpc'; + +export class Namereg { + burrow: TransactClient & QueryClient; + account: string; + + constructor(burrow: TransactClient & QueryClient, account: string) { + this.burrow = burrow; + this.account = account; + } + + set(name: string, data: string, lease = 50000, fee = 5000, callback: grpc.requestCallback) { + const input = new TxInput(); + input.setAddress(Buffer.from(this.account, 'hex')); + input.setAmount(lease); + + const payload = new NameTx(); + payload.setInput(input); + payload.setName(name); + payload.setData(data); + payload.setFee(fee); + + return this.burrow.nameTxSync(payload, callback); + } + + get(name: string, callback: grpc.requestCallback) { + const payload = new GetNameParam(); + payload.setName(name); + return this.burrow.getName(payload, callback) + } +} \ No newline at end of file diff --git a/js/src/lib/pipe.ts b/js/src/lib/pipe.ts new file mode 100644 index 000000000..acc3aaedf --- /dev/null +++ b/js/src/lib/pipe.ts @@ -0,0 +1,31 @@ +import { TransactClient } from '../../proto/rpctransact_grpc_pb'; +import { CallTx } from '../../proto/payload_pb'; +import { TxExecution } from '../../proto/exec_pb'; +import { Events } from './events'; +import { LogEvent } from '../../proto/exec_pb'; +import * as grpc from 'grpc'; + +export type TxCallback = grpc.requestCallback; + +export class Pipe { + burrow: TransactClient; + events: Events; + + constructor(burrow: TransactClient, events: Events) { + this.burrow = burrow; + this.events = events; + } + + transact(payload: CallTx, callback: TxCallback) { + return this.burrow.callTxSync(payload, callback) + } + + call(payload: CallTx, callback: TxCallback) { + this.burrow.callTxSim(payload, callback) + } + + eventSub(accountAddress: string, signature: string, callback: (err: Error, log: LogEvent) => void) { + return this.events.subContractEvents(accountAddress, signature, callback) + } +} + diff --git a/js/src/lib/utils/convert.ts b/js/src/lib/utils/convert.ts new file mode 100644 index 000000000..23d6bbb93 --- /dev/null +++ b/js/src/lib/utils/convert.ts @@ -0,0 +1,68 @@ +import BN from 'bn.js'; + +export const recApply = function (func: (input: A) => B, args: A | A[]): B | B[] { + if (Array.isArray(args)) { + let next: any = []; + for (let i = 0; i < args.length; i++) { + next.push(recApply(func, args[i])); + }; + return next; + } + return func(args); +} + +export const addressTB = function (arg: string) { + return arg.toUpperCase(); +} + +export const addressTA = function (arg: string) { + if (!/^0x/i.test(arg)) { + return '0x' + arg; + } + return arg; +} + +export const bytesTB = function (arg: Buffer) { + return arg.toString('hex').toUpperCase(); +} + +export const bytesTA = function (arg: string) { + if (typeof (arg) === 'string' && /^0x/i.test(arg)) { + arg = arg.slice(2); + } + return Buffer.from(arg, 'hex'); +} + +export const numberTB = function (arg: BN) { + return arg.toNumber(); +} + +export const abiToBurrow = function (puts: string[], args: Array) { + let out: any[] = []; + for (let i = 0; i < puts.length; i++) { + if (/address/i.test(puts[i])) { + out.push(recApply(addressTB, args[i])); + } else if (/bytes/i.test(puts[i])) { + out.push(recApply(bytesTB, args[i])); + } else if (/int/i.test(puts[i])) { + out.push(recApply(numberTB, args[i])); + } else { + out.push(args[i]); + } + } + return out +} + +export const burrowToAbi = function (puts: string[], args: Array) { + let out = []; + for (let i = 0; i < puts.length; i++) { + if (/address/i.test(puts[i])) { + out.push(recApply(addressTA, args[i])); + } else if (/bytes/i.test(puts[i])) { + out.push(recApply(bytesTA, args[i])); + } else { + out.push(args[i]); + } + }; + return out; +} \ No newline at end of file diff --git a/js/src/lib/utils/sha3.ts b/js/src/lib/utils/sha3.ts new file mode 100644 index 000000000..d6ba342ea --- /dev/null +++ b/js/src/lib/utils/sha3.ts @@ -0,0 +1,6 @@ +import { Keccak } from 'sha3'; + +export default function SHA3(str: string) { + const hash = (new Keccak(256)).update(str); + return hash.digest('hex').toUpperCase(); +} \ No newline at end of file diff --git a/js/src/lib/utils/utils.ts b/js/src/lib/utils/utils.ts new file mode 100644 index 000000000..e0d95c144 --- /dev/null +++ b/js/src/lib/utils/utils.ts @@ -0,0 +1,24 @@ +import { Function, FunctionInput, FunctionOutput, Event, EventInput } from 'solc'; + +type FunctionIO = FunctionInput & FunctionOutput; + +export function transformToFullName(abi: Function | Event): string { + if (abi.name.indexOf('(') !== -1) return abi.name; + const typeName = (abi.inputs as (EventInput | FunctionIO)[]).map(i => i.type).join(); + return abi.name + '(' + typeName + ')'; +} + +export function extractDisplayName(name: string): string { + let length = name.indexOf('(') + return length !== -1 ? name.substr(0, length) : name +} + +export function extractTypeName(name: string): string { + /// TODO: make it invulnerable + let length = name.indexOf('(') + return length !== -1 ? name.substr(length + 1, name.length - 1 - (length + 1)).replace(' ', '') : '' +} + +export function isFunction(object: object): boolean { + return typeof object === 'function' +} \ No newline at end of file diff --git a/js/src/test.ts b/js/src/test.ts new file mode 100644 index 000000000..246912bec --- /dev/null +++ b/js/src/test.ts @@ -0,0 +1,31 @@ +import { Burrow } from './index'; +import * as solc from 'solc'; + +// convenience function to compile solidity in tests +export const compile = (source: string, name: string) => { + let desc: solc.InputDescription = { language: 'Solidity', sources: {} }; + desc.sources[name] = { content: source }; + desc.settings = { outputSelection: { '*': { '*': ['*'] }}}; + + const compiled: solc.OutputDescription = JSON.parse(solc.compile(JSON.stringify(desc))); + if (compiled.errors) throw new Error(compiled.errors.map(err => err.formattedMessage).toString()); + const contract = compiled.contracts[name][name]; + return { abi: contract.abi, bytecode: contract.evm.bytecode.object }; +} + +// contract manager test harness +export const Test = () => { + let burrow: Burrow; + + return { + before: (callback?: (app: Burrow) => void) => () => { + const url = process.env.BURROW_URL || 'localhost:10997'; + const addr = process.env.SIGNING_ADDRESS; + if (!addr) throw new Error("SIGNING_ADDRESS not set."); + burrow = new Burrow(url, addr); + if (callback) return callback(burrow); + }, + it: (callback: (app: Burrow) => void) => () => callback(burrow), + after: () => () => {}, + } +} \ No newline at end of file diff --git a/js/src/test/17.test.ts b/js/src/test/17.test.ts new file mode 100644 index 000000000..84fa6fa39 --- /dev/null +++ b/js/src/test/17.test.ts @@ -0,0 +1,50 @@ +import * as assert from 'assert'; +import * as test from '../test'; + +const Test = test.Test(); + +describe('#17', function () { + // {handlers: {call: function (result) { return {super: result.values, man: result.raw} }}}) + before(Test.before()) + after(Test.after()) + this.timeout(10 * 1000) + + it('#17 Testing Per-contract handler overwriting', Test.it(async (burrow) => { + const source = ` + pragma solidity >=0.0.0; + contract Test { + + function getAddress() public view returns (address) { + return address(this); + } + + function getNumber() public pure returns (uint) { + return 100; + } + + function getCombination() public view returns (uint _number, address _address, string memory _saying, bytes32 _randomBytes) { + _number = 100; + _address = address(this); + _saying = "hello moto"; + _randomBytes = bytes32(uint256(0xDEADBEEFFEEDFACE)); + } + + } + ` + + const {abi, bytecode} = test.compile(source, 'Test') + const contract: any = await burrow.contracts.deploy(abi, bytecode, { call: function (result_1) { return { values: result_1.values, raw: result_1.raw }; } }); + let address = contract.address; + const returnObject = await contract.getCombination(); + const expected = { + values: { + _number: 100, + _address: address, + _saying: 'hello moto', + _randomBytes: '000000000000000000000000000000000000000000000000DEADBEEFFEEDFACE' + }, + raw: [100, address, 'hello moto', '000000000000000000000000000000000000000000000000DEADBEEFFEEDFACE'] + }; + assert.deepEqual(returnObject, expected); + })) +}) diff --git a/js/test/#175/index.js b/js/src/test/175.test.ts similarity index 67% rename from js/test/#175/index.js rename to js/src/test/175.test.ts index 3265a9f22..efb5fc274 100644 --- a/js/test/#175/index.js +++ b/js/src/test/175.test.ts @@ -1,9 +1,7 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const test = require('../../lib/test') -const assert = require('assert') - -const Test = test.Test() +const Test = test.Test(); describe('#175', function () { before(Test.before()) @@ -13,13 +11,13 @@ describe('#175', function () { it('#175', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract Contract { string thename; - constructor(string newName) public { + constructor(string memory newName) public { thename = newName; } - function getName() public view returns (string name) { + function getName() public view returns (string memory name) { return thename; } } @@ -27,8 +25,8 @@ describe('#175', function () { var contract let A2 - const {abi, bytecode} = test.compile(source, ':Contract') - return burrow.contracts.deploy(abi, bytecode, 'contract1').then((C) => { + const {abi, bytecode} = test.compile(source, 'Contract') + return burrow.contracts.deploy(abi, bytecode, null, 'contract1').then((C) => { contract = C return contract._constructor('contract2') }).then((address) => { diff --git a/js/test/#21/index.js b/js/src/test/21.test.ts similarity index 73% rename from js/test/#21/index.js rename to js/src/test/21.test.ts index 732a530ce..40e647cdb 100644 --- a/js/test/#21/index.js +++ b/js/src/test/21.test.ts @@ -1,19 +1,17 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('issue #21', function () { - this.timeout(10 * 1000) - let contract + this.timeout(10 * 1000); + let contract: any; before(Test.before(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract c { - function getBytes() public pure returns (byte[10]){ + function getBytes() public pure returns (byte[10] memory){ byte[10] memory b; string memory s = "hello"; bytes memory sb = bytes(s); @@ -24,14 +22,14 @@ describe('issue #21', function () { return b; } - function deeper() public pure returns (byte[12][100] s, uint count) { + function deeper() public pure returns (byte[12][100] memory s, uint count) { count = 42; return (s, count); } } ` - const {abi, bytecode} = test.compile(source, ':c') + const {abi, bytecode} = test.compile(source, 'c') return burrow.contracts.deploy(abi, bytecode).then((c) => { contract = c }) diff --git a/js/src/test/38.test.ts b/js/src/test/38.test.ts new file mode 100644 index 000000000..930895166 --- /dev/null +++ b/js/src/test/38.test.ts @@ -0,0 +1,42 @@ +import * as assert from 'assert'; +import * as test from '../test'; +import { Contract } from '..'; + +const Test = test.Test(); + +describe('#38', function () { + before(Test.before()) + after(Test.after()) + + this.timeout(10 * 1000) + + it('#38', Test.it((burrow) => { + const source = ` + pragma solidity >=0.0.0; + contract Contract { + event Event(); + + function announce() public { + emit Event(); + } + } + ` + const {abi, bytecode} = test.compile(source, 'Contract') + return burrow.contracts.deploy(abi, bytecode).then((contract) => { + const secondContract: any = new Contract(abi, null, contract.address, burrow) + + return new Promise((resolve, reject) => { + const stream = secondContract.Event.at(contract.address, function (error, event) { + if (error) { + reject(error) + } else { + stream.cancel() + resolve(event) + } + }) + + secondContract.announce() + }) + }) + })) +}) diff --git a/js/test/#17/index.js b/js/src/test/42.test.ts similarity index 63% rename from js/test/#17/index.js rename to js/src/test/42.test.ts index 1f4eeb34e..aae5971f8 100644 --- a/js/test/#17/index.js +++ b/js/src/test/42.test.ts @@ -1,41 +1,39 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const assert = require('assert') -const test = require('../../lib/test') +const Test = test.Test(); -const Test = test.Test() - -describe('#17', function () { - before(Test.before({handlers: {call: function (result) { return {super: result.values, man: result.raw} }}})) +describe('#42', function () { + before(Test.before()) after(Test.after()) this.timeout(10 * 1000) - it('#17 Testing Per-contract handler overwriting', Test.it(function (burrow) { + it('#42', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract Test { function getAddress() public view returns (address) { - return this; + return address(this); } function getNumber() public pure returns (uint) { return 100; } - function getCombination() public view returns (uint _number, address _address, string _saying, bytes32 _randomBytes) { + function getCombination() public view returns (uint _number, address _address, string memory _saying, bytes32 _randomBytes) { _number = 100; - _address = this; + _address = address(this); _saying = "hello moto"; - _randomBytes = 0xDEADBEEFFEEDFACE; + _randomBytes = bytes32(uint256(0xDEADBEEFFEEDFACE)); } } ` - let address - const {abi, bytecode} = test.compile(source, ':Test') - return burrow.contracts.deploy(abi, bytecode, {call: function (result) { return {values: result.values, raw: result.raw} }}).then((contract) => { + let address: string; + const {abi, bytecode} = test.compile(source, 'Test') + return burrow.contracts.deploy(abi, bytecode, {call: function (result) { return {values: result.values, raw: result.raw} }}).then((contract: any) => { address = contract.address return contract.getCombination() }).then((returnObject) => { diff --git a/js/src/test/44.test.ts b/js/src/test/44.test.ts new file mode 100644 index 000000000..3b6b0d0d5 --- /dev/null +++ b/js/src/test/44.test.ts @@ -0,0 +1,34 @@ +import * as assert from 'assert'; +import * as test from '../test'; + +const Test = test.Test(); + +describe('#44', function () { + before(Test.before()) + after(Test.after()) + + this.timeout(60 * 1000) + + it('#44', Test.it(async (burrow) => { + const source = ` + pragma solidity >=0.0.0; + contract SimpleStorage { + address storedData; + + function set(address x) public { + storedData = x; + } + + function get() public view returns (address retVal) { + return storedData; + } + } + ` + const {abi, bytecode} = test.compile(source, 'SimpleStorage'); + const contract: any = await burrow.contracts.deploy(abi, bytecode); + await contract.set('88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F'); + + const data = await contract.get(); + assert.equal(data, '88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F'); + })) +}) diff --git a/js/test/#45/index.js b/js/src/test/45.test.ts similarity index 72% rename from js/test/#45/index.js rename to js/src/test/45.test.ts index 0690b041c..236812cde 100644 --- a/js/test/#45/index.js +++ b/js/src/test/45.test.ts @@ -1,9 +1,7 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('#45', function () { before(Test.before()) @@ -13,7 +11,7 @@ describe('#45', function () { it('nottherealbatman', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract Test { string _name; @@ -21,17 +19,17 @@ describe('#45', function () { sum = a + b; } - function setName(string newname) public { + function setName(string memory newname) public { _name = newname; } - function getName() public view returns (string) { + function getName() public view returns (string memory) { return _name; } } ` - const {abi, bytecode} = test.compile(source, ':Test') - return burrow.contracts.deploy(abi, bytecode).then((contract) => + const {abi, bytecode} = test.compile(source, 'Test') + return burrow.contracts.deploy(abi, bytecode).then((contract: any) => contract.setName('Batman') .then(() => contract.getName()) ).then((value) => { @@ -41,11 +39,11 @@ describe('#45', function () { it('rguikers', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract Test { function getAddress() public view returns (address) { - return this; + return address(this); } function getNumber() public pure returns (uint) { @@ -55,8 +53,8 @@ describe('#45', function () { } ` - const {abi, bytecode} = test.compile(source, ':Test') - return burrow.contracts.deploy(abi, bytecode).then((contract) => + const {abi, bytecode} = test.compile(source, 'Test') + return burrow.contracts.deploy(abi, bytecode).then((contract: any) => Promise.all([contract.getAddress(), contract.getNumber()]) .then(([address, number]) => { assert.equal(address[0].length, 40) diff --git a/js/test/#46/index.js b/js/src/test/46.test.ts similarity index 57% rename from js/test/#46/index.js rename to js/src/test/46.test.ts index 1ccfa9ce5..115e0ec75 100644 --- a/js/test/#46/index.js +++ b/js/src/test/46.test.ts @@ -1,9 +1,7 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('#46', function () { before(Test.before()) @@ -13,28 +11,28 @@ describe('#46', function () { it('#46', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract Test{ string _name; - function setName(string newname) public { + function setName(string memory newname) public { _name = newname; } - function getNameConstant() public view returns (string) { + function getNameConstant() public view returns (string memory) { return _name; } - function getName() public view returns (string) { + function getName() public view returns (string memory) { return _name; } } ` - const {abi, bytecode} = test.compile(source, ':Test') + const {abi, bytecode} = test.compile(source, 'Test') return burrow.contracts.deploy(abi, bytecode) - .then((contract) => contract.setName('Batman') + .then((contract: any) => contract.setName('Batman') .then(() => Promise.all([contract.getNameConstant(), contract.getName()]))) .then(([constant, nonConstant]) => { assert.equal(constant[0], nonConstant[0]) diff --git a/js/test/#47/index.js b/js/src/test/47.test.ts similarity index 55% rename from js/test/#47/index.js rename to js/src/test/47.test.ts index 2247de3ce..eaaaba739 100644 --- a/js/test/#47/index.js +++ b/js/src/test/47.test.ts @@ -1,9 +1,7 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('#47', function () { before(Test.before()) @@ -13,23 +11,23 @@ describe('#47', function () { it('#47', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract Test{ string _withSpace = " Pieter"; string _withoutSpace = "Pieter"; - function getWithSpaceConstant() public constant returns (string) { + function getWithSpaceConstant() public view returns (string memory) { return _withSpace; } - function getWithoutSpaceConstant () public constant returns (string) { + function getWithoutSpaceConstant () public view returns (string memory) { return _withoutSpace; } } ` - const {abi, bytecode} = test.compile(source, ':Test') + const {abi, bytecode} = test.compile(source, 'Test') return burrow.contracts.deploy(abi, bytecode) - .then((contract) => Promise.all([contract.getWithSpaceConstant(), contract.getWithoutSpaceConstant()])) + .then((contract: any) => Promise.all([contract.getWithSpaceConstant(), contract.getWithoutSpaceConstant()])) .then(([withSpace, withoutSpace]) => { assert.equal(withSpace, ' Pieter') assert.equal(withoutSpace, 'Pieter') diff --git a/js/test/#48/index.js b/js/src/test/48.test.ts similarity index 68% rename from js/test/#48/index.js rename to js/src/test/48.test.ts index abd8741b2..10a1612d7 100644 --- a/js/test/#48/index.js +++ b/js/src/test/48.test.ts @@ -1,9 +1,7 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('#48', function () { before(Test.before()) @@ -13,11 +11,11 @@ describe('#48', function () { it('#48', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract Test { function getAddress() public view returns (address) { - return this; + return address(this); } function getNumber() public pure returns (uint) { @@ -26,14 +24,14 @@ describe('#48', function () { function getCombination() public view returns (uint _number, address _address) { _number = 100; - _address = this; + _address = address(this); } } ` - const {abi, bytecode} = test.compile(source, ':Test') + const {abi, bytecode} = test.compile(source, 'Test') return burrow.contracts.deploy(abi, bytecode) - .then((contract) => contract.getCombination()) + .then((contract: any) => contract.getCombination()) .then(([number, address]) => { assert.equal(number, 100) assert.equal(address.length, 40) diff --git a/js/test/#50/index.js b/js/src/test/50.test.ts similarity index 70% rename from js/test/#50/index.js rename to js/src/test/50.test.ts index 7a137f61b..f69113006 100644 --- a/js/test/#50/index.js +++ b/js/src/test/50.test.ts @@ -1,9 +1,7 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('#50', function () { before(Test.before()) @@ -13,7 +11,7 @@ describe('#50', function () { it('#50', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract SimpleStorage { uint storedData; @@ -26,9 +24,9 @@ describe('#50', function () { } } ` - const {abi, bytecode} = test.compile(source, ':SimpleStorage') + const {abi, bytecode} = test.compile(source, 'SimpleStorage') return burrow.contracts.deploy(abi, bytecode) - .then((contract) => contract.set(42) + .then((contract: any) => contract.set(42) .then(() => contract.get.call()) ).then((value) => { assert.equal(value, 42) diff --git a/js/test/#61/index.js b/js/src/test/61.test.ts similarity index 54% rename from js/test/#61/index.js rename to js/src/test/61.test.ts index 80a46315f..a0c759a25 100644 --- a/js/test/#61/index.js +++ b/js/src/test/61.test.ts @@ -1,9 +1,7 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('#61', function () { before(Test.before()) @@ -13,7 +11,7 @@ describe('#61', function () { it('#61', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract SimpleStorage { address storedData; @@ -21,14 +19,14 @@ describe('#61', function () { storedData = x; } - function get() public constant returns (address retVal) { + function get() public view returns (address retVal) { return storedData; } } ` - const {abi, bytecode} = test.compile(source, ':SimpleStorage') - return burrow.contracts.deploy(abi, bytecode, '88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F') - .then((contract) => contract.get()) + const {abi, bytecode} = test.compile(source, 'SimpleStorage') + return burrow.contracts.deploy(abi, bytecode, null, '88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F') + .then((contract: any) => contract.get()) .then((value) => { assert.equal(value, '88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F') }) diff --git a/js/test/#81/index.js b/js/src/test/81.test.ts similarity index 73% rename from js/test/#81/index.js rename to js/src/test/81.test.ts index 26b16e626..6afa8abf7 100644 --- a/js/test/#81/index.js +++ b/js/src/test/81.test.ts @@ -1,9 +1,7 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('#81', function () { before(Test.before()) @@ -13,19 +11,19 @@ describe('#81', function () { it('listens to an event from a contract', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract Contract { event Pay( address originator, address beneficiary, int amount, string servicename, - string alias, + string nickname, string providername, bytes32 randomBytes ); - function emit() public { + function announce() public { emit Pay( 0x88977a37D05a4FE86d09E88c88a49C2fCF7d6d8F, 0x721584fa4f1B9f51950018073A8E5ECF47f2d3b8, @@ -33,25 +31,25 @@ describe('#81', function () { "Energy", "wasmachine", "Eneco", - 0xDEADFEEDBEEFFACE + bytes32(uint256(0xDEADFEEDBEEFFACE)) ); } } ` - const {abi, bytecode} = test.compile(source, ':Contract') + const {abi, bytecode} = test.compile(source, 'Contract') return burrow.contracts.deploy(abi, bytecode) - .then((contract) => { + .then((contract: any) => { return new Promise((resolve, reject) => { - contract.Pay((error, {args}) => { + const stream = contract.Pay((error, result) => { if (error) { reject(error) } else { try { const actual = Object.assign( {}, - args, - {amount: Number(args.amount)} + result.args, + {amount: Number(result.args.amount)} ) assert.deepEqual( @@ -63,7 +61,7 @@ describe('#81', function () { servicename: 'Energy', - alias: 'wasmachine', + nickname: 'wasmachine', providername: 'Eneco', @@ -74,11 +72,12 @@ describe('#81', function () { reject(exception) } + stream.cancel() resolve() } }) - contract.emit() + contract.announce() }) }) })) diff --git a/js/test/README.md b/js/src/test/README.md similarity index 100% rename from js/test/README.md rename to js/src/test/README.md diff --git a/js/test/Abis/index.js b/js/src/test/abi/abis.test.ts similarity index 82% rename from js/test/Abis/index.js rename to js/src/test/abi/abis.test.ts index e76dca5ef..16e2b87e5 100644 --- a/js/test/Abis/index.js +++ b/js/src/test/abi/abis.test.ts @@ -1,9 +1,7 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../../test'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('Abi', function () { this.timeout(10 * 1000) diff --git a/tests/js/deploy.yaml b/js/src/test/abi/deploy.yaml similarity index 100% rename from tests/js/deploy.yaml rename to js/src/test/abi/deploy.yaml diff --git a/tests/js/random.sol b/js/src/test/abi/random.sol similarity index 98% rename from tests/js/random.sol rename to js/src/test/abi/random.sol index ed3cca635..1a2aee261 100644 --- a/tests/js/random.sol +++ b/js/src/test/abi/random.sol @@ -4,4 +4,4 @@ contract random { function getRandomNumber() public pure returns (uint) { return 55; } -} +} \ No newline at end of file diff --git a/js/test/event/index.js b/js/src/test/event.test.ts similarity index 66% rename from js/test/event/index.js rename to js/src/test/event.test.ts index 7723dd663..b0b067e32 100644 --- a/js/test/event/index.js +++ b/js/src/test/event.test.ts @@ -1,9 +1,7 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('event', function () { before(Test.before()) @@ -13,25 +11,24 @@ describe('event', function () { it('listens to an event from a contract', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract Contract { event Event( address from ); - function emit() public { + function announce() public { emit Event(msg.sender); } } ` - const {abi, bytecode} = test.compile(source, ':Contract') + const {abi, bytecode} = test.compile(source, 'Contract') return burrow.contracts.deploy(abi, bytecode) - .then((contract) => { - let count = 0 + .then((contract: any) => { + let count = 0; return new Promise((resolve, reject) => { - contract.Event( - (error, event) => { + const stream = contract.Event((error, event) => { if (error) { reject(error) } else { @@ -44,13 +41,14 @@ describe('event', function () { count++ if (count === 2) { + stream.cancel() resolve() } } }) - contract.emit() - contract.emit() + contract.announce() + contract.announce() }) }) })) diff --git a/js/test/Functional/index.js b/js/src/test/functional.test.ts similarity index 77% rename from js/test/Functional/index.js rename to js/src/test/functional.test.ts index 12df9f52e..8aed16271 100644 --- a/js/test/Functional/index.js +++ b/js/src/test/functional.test.ts @@ -1,9 +1,8 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; +import { Contract } from '..'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('Functional Contract Usage', function () { before(Test.before()) @@ -13,7 +12,7 @@ describe('Functional Contract Usage', function () { it('#Constructor usage', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract Test { address storedData; constructor(address x) public { @@ -21,25 +20,25 @@ describe('Functional Contract Usage', function () { } function getAddress() public view returns (address) { - return this; + return address(this); } function getNumber() public pure returns (uint) { return 100; } - function getCombination() public view returns (uint _number, address _address, string _saying, bytes32 _randomBytes, address _stored) { + function getCombination() public view returns (uint _number, address _address, string memory _saying, bytes32 _randomBytes, address _stored) { _number = 100; - _address = this; + _address = address(this); _saying = "hello moto"; - _randomBytes = 0xDEADBEEFFEEDFACE; + _randomBytes = bytes32(uint256(0xDEADBEEFFEEDFACE)); _stored = storedData; } } ` - const {abi, bytecode} = test.compile(source, ':Test') - const contract = burrow.contracts.new(abi, bytecode) + const {abi, bytecode} = test.compile(source, 'Test') + const contract: any = new Contract(abi, bytecode, null, burrow) let A1 let A2 diff --git a/js/test/get_set_smoke_test/GetSet.sol b/js/src/test/get_set_smoke_test/GetSet.sol similarity index 100% rename from js/test/get_set_smoke_test/GetSet.sol rename to js/src/test/get_set_smoke_test/GetSet.sol diff --git a/js/test/get_set_smoke_test/index.js b/js/src/test/get_set_smoke_test/index.ts similarity index 99% rename from js/test/get_set_smoke_test/index.js rename to js/src/test/get_set_smoke_test/index.ts index 43f7da329..c35d581bf 100644 --- a/js/test/get_set_smoke_test/index.js +++ b/js/src/test/get_set_smoke_test/index.ts @@ -1,3 +1,4 @@ +export {}; const path = require('path') const assert = require('assert') const fs = require('fs-extra') diff --git a/js/test/HTTP/index.js b/js/src/test/http.test.ts similarity index 64% rename from js/test/HTTP/index.js rename to js/src/test/http.test.ts index 719c71be5..e6e58b6f1 100644 --- a/js/test/HTTP/index.js +++ b/js/src/test/http.test.ts @@ -1,9 +1,7 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('HTTP', function () { before(Test.before()) @@ -13,7 +11,7 @@ describe('HTTP', function () { it('sets and gets a value from a contract', Test.it(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract SimpleStorage { uint storedData; @@ -21,14 +19,14 @@ describe('HTTP', function () { storedData = x; } - function get() constant public returns (uint retVal) { + function get() view public returns (uint retVal) { return storedData; } } ` - const {abi, bytecode} = test.compile(source, ':SimpleStorage') + const {abi, bytecode} = test.compile(source, 'SimpleStorage') return burrow.contracts.deploy(abi, bytecode) - .then((contract) => contract.set(42) + .then((contract: any) => contract.set(42) .then(() => contract.get()) ).then((value) => { assert.equal(value, 42) diff --git a/js/test/Inf-Loop/index.js b/js/src/test/infloop.test.ts similarity index 58% rename from js/test/Inf-Loop/index.js rename to js/src/test/infloop.test.ts index 450c60ae9..b71f6899b 100644 --- a/js/test/Inf-Loop/index.js +++ b/js/src/test/infloop.test.ts @@ -1,19 +1,17 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe.skip('Really Long Loop', function () { this.timeout(10 * 1000) let contract - before(Test.before(function (burrow) { + before(Test.before(async function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract main { - function test() public returns (string) { + function test() public returns (string memory) { c sub = new c(); return sub.getString(); } @@ -21,7 +19,7 @@ describe.skip('Really Long Loop', function () { contract c { string s = "secret"; uint n = 0; - function getString() public returns (string){ + function getString() public returns (string memory){ for (uint i = 0; i < 10000000000000; i++) { n += 1; } @@ -30,10 +28,9 @@ describe.skip('Really Long Loop', function () { } ` - const {abi, bytecode} = test.compile(source, ':main') - return burrow.contracts.deploy(abi, bytecode).then((c) => { - contract = c - }) + const {abi, bytecode} = test.compile(source, 'main') + const c = await burrow.contracts.deploy(abi, bytecode); + contract = c; })) after(Test.after()) @@ -44,7 +41,7 @@ describe.skip('Really Long Loop', function () { .then((str) => { throw new Error('Did not catch revert error') }).catch((err) => { - assert.equal(err.code, 'ERR_EXECUTION_REVERT') + assert.equal(err.message, 'ERR_EXECUTION_REVERT') }) }) ) diff --git a/js/src/test/namereg.test.ts b/js/src/test/namereg.test.ts new file mode 100644 index 000000000..b2bc56d73 --- /dev/null +++ b/js/src/test/namereg.test.ts @@ -0,0 +1,25 @@ +import * as assert from 'assert'; +import * as test from '../test'; +import { Burrow } from '..'; + +const Test = test.Test(); + +describe('Namereg', function () { + this.timeout(10 * 1000) + let burrow: Burrow; + + before(Test.before(function (_burrow) { + burrow = _burrow + })) + + after(Test.after()) + + it('Sets and gets a name correctly', Test.it(function () { + return burrow.namereg.set('DOUG', 'ABCDEF0123456789', 5000, 100, (err, exec) => { + + return burrow.namereg.get('DOUG', (err, exec) => { + assert.equal(exec.getData(), 'ABCDEF0123456789') + }) + }) + })); +}) diff --git a/js/test/REVERT/index.js b/js/src/test/revert.test.ts similarity index 69% rename from js/test/REVERT/index.js rename to js/src/test/revert.test.ts index 7b4c710fd..8a9bd4e74 100644 --- a/js/test/REVERT/index.js +++ b/js/src/test/revert.test.ts @@ -1,20 +1,19 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; +import * as grpc from 'grpc'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('REVERT constant', function () { this.timeout(10 * 1000) - let contract + let contract: any; before(Test.before(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract c { string s = "secret"; - function getString(uint key) public constant returns (string){ + function getString(uint key) public view returns (string memory){ if (key != 42){ revert("Did not pass correct key"); } else { @@ -24,7 +23,7 @@ describe('REVERT constant', function () { } ` - const {abi, bytecode} = test.compile(source, ':c') + const {abi, bytecode} = test.compile(source, 'c') return burrow.contracts.deploy(abi, bytecode).then((c) => { contract = c }) @@ -44,8 +43,8 @@ describe('REVERT constant', function () { return contract.getString(1) .then((str) => { throw new Error('Did not catch revert error') - }).catch((err) => { - assert.equal(err.code, 'ERR_EXECUTION_REVERT') + }).catch((err: grpc.ServiceError) => { + assert.equal(err.code, grpc.status.ABORTED) assert.equal(err.message, 'Did not pass correct key') }) }) diff --git a/js/test/REVERT2/index.js b/js/src/test/revert2.test.ts similarity index 70% rename from js/test/REVERT2/index.js rename to js/src/test/revert2.test.ts index d9578fafb..15d22d2d3 100644 --- a/js/test/REVERT2/index.js +++ b/js/src/test/revert2.test.ts @@ -1,21 +1,20 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; +import * as grpc from 'grpc'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('REVERT non-constant', function () { this.timeout(10 * 1000) - let contract + let contract: any; before(Test.before(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract c { string s = "secret"; uint n = 0; - function getString(uint key) public returns (string){ + function getString(uint key) public returns (string memory){ if (key != 42){ revert("Did not pass correct key"); } else { @@ -26,7 +25,7 @@ describe('REVERT non-constant', function () { } ` - const {abi, bytecode} = test.compile(source, ':c') + const {abi, bytecode} = test.compile(source, 'c') return burrow.contracts.deploy(abi, bytecode).then((c) => { contract = c }) @@ -46,8 +45,8 @@ describe('REVERT non-constant', function () { return contract.getString(1) .then((str) => { throw new Error('Did not catch revert error') - }).catch((err) => { - assert.equal(err.code, 'ERR_EXECUTION_REVERT') + }).catch((err: grpc.ServiceError) => { + assert.equal(err.code, grpc.status.ABORTED) assert.equal(err.message, 'Did not pass correct key') }) }) diff --git a/js/test/REVERT3/index.js b/js/src/test/revert3.test.ts similarity index 65% rename from js/test/REVERT3/index.js rename to js/src/test/revert3.test.ts index 764bc2311..e72b91db3 100644 --- a/js/test/REVERT3/index.js +++ b/js/src/test/revert3.test.ts @@ -1,9 +1,8 @@ -'use strict' +import * as assert from 'assert'; +import * as test from '../test'; +import * as grpc from 'grpc'; -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() +const Test = test.Test(); describe('REVERT non-constant', function () { this.timeout(100 * 1000) @@ -11,11 +10,11 @@ describe('REVERT non-constant', function () { before(Test.before(function (burrow) { const source = ` - pragma solidity ^0.4.21; + pragma solidity >=0.0.0; contract c { string s = "secret"; uint n = 0; - function getString(uint key) public returns (string){ + function getString(uint key) public returns (string memory){ if (key != 42){ revert(); } else { @@ -26,7 +25,7 @@ describe('REVERT non-constant', function () { } ` - const {abi, bytecode} = test.compile(source, ':c') + const {abi, bytecode} = test.compile(source, 'c') return burrow.contracts.deploy(abi, bytecode).then((c) => { contract = c }) @@ -39,8 +38,8 @@ describe('REVERT non-constant', function () { return contract.getString(1) .then((str) => { throw new Error('Did not catch revert error') - }).catch((err) => { - assert.equal(err.code, 'ERR_EXECUTION_REVERT') + }).catch((err: grpc.ServiceError) => { + assert.equal(err.code, grpc.status.ABORTED) }) }) ) diff --git a/js/test.sh b/js/test.sh new file mode 100755 index 000000000..c910b703b --- /dev/null +++ b/js/test.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +export this="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source "$this/../tests/test_runner.sh" + +test_setup +trap test_teardown EXIT + +cd $this +export SIGNING_ADDRESS="$key1_addr" +export BURROW_URL="$BURROW_HOST:$BURROW_GRPC_PORT" + +mocha -r ts-node/register "$1" \ No newline at end of file diff --git a/js/test/#38/index.js b/js/test/#38/index.js deleted file mode 100644 index d7ae1848c..000000000 --- a/js/test/#38/index.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict' - -const test = require('../../lib/test') - -const Test = test.Test() - -describe('#38', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('#38', Test.it(function (burrow) { - const source = ` - pragma solidity ^0.4.21; - contract Contract { - event Event(); - - function emit() public { - emit Event(); - } - } - ` - const {abi, bytecode} = test.compile(source, ':Contract') - return burrow.contracts.deploy(abi, bytecode).then((contract) => { - const secondContract = burrow.contracts.new(abi, null, contract.address) - - return new Promise((resolve, reject) => { - secondContract.Event.once(function (error, event) { - if (error) { - reject(error) - } else { - resolve(event) - } - }) - - secondContract.emit() - }) - }) - })) -}) diff --git a/js/test/#42/index.js b/js/test/#42/index.js deleted file mode 100644 index a5f1a0759..000000000 --- a/js/test/#42/index.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict' - -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() - -describe('#42', function () { - before(Test.before({handlers: {call: function (result) { return {values: result.values, raw: result.raw} }}})) - after(Test.after()) - - this.timeout(10 * 1000) - - it('#42', Test.it(function (burrow) { - const source = ` - pragma solidity ^0.4.21; - contract Test { - - function getAddress() public view returns (address) { - return this; - } - - function getNumber() public pure returns (uint) { - return 100; - } - - function getCombination() public view returns (uint _number, address _address, string _saying, bytes32 _randomBytes) { - _number = 100; - _address = this; - _saying = "hello moto"; - _randomBytes = 0xDEADBEEFFEEDFACE; - } - - } - ` - let address - const {abi, bytecode} = test.compile(source, ':Test') - return burrow.contracts.deploy(abi, bytecode).then((contract) => { - address = contract.address - return contract.getCombination() - }).then((returnObject) => { - const expected = { - values: { - _number: 100, - _address: address, - _saying: 'hello moto', - _randomBytes: '000000000000000000000000000000000000000000000000DEADBEEFFEEDFACE' - }, - raw: [100, address, 'hello moto', '000000000000000000000000000000000000000000000000DEADBEEFFEEDFACE'] - } - assert.deepEqual(returnObject, expected) - }) - })) -}) diff --git a/js/test/#44/index.js b/js/test/#44/index.js deleted file mode 100644 index 98a8cb2e0..000000000 --- a/js/test/#44/index.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict' - -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() - -describe('#44', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(60 * 1000) - - it('#44', Test.it(function (burrow) { - const source = ` - pragma solidity ^0.4.21; - contract SimpleStorage { - address storedData; - - function set(address x) public { - storedData = x; - } - - function get() public constant returns (address retVal) { - return storedData; - } - } - ` - const {abi, bytecode} = test.compile(source, ':SimpleStorage') - return burrow.contracts.deploy(abi, bytecode).then((contract) => - contract.set('88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F') - .then(() => contract.get()) - ).then((value) => { - assert.equal(value, '88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F') - }) - })) -}) diff --git a/js/test/Namereg/index.js b/js/test/Namereg/index.js deleted file mode 100644 index 67f4b6337..000000000 --- a/js/test/Namereg/index.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict' - -const assert = require('assert') -const test = require('../../lib/test') - -const Test = test.Test() - -describe('Namereg', function () { - this.timeout(10 * 1000) - let burrow - - before(Test.before(function (_burrow) { - burrow = _burrow - })) - - after(Test.after()) - - it('Sets and gets a name correctly', Test.it(function () { - return burrow.namereg.set('DOUG', 'ABCDEF0123456789', 20) - .then(() => { - return burrow.namereg.get('DOUG') - .then((data) => { - assert.equal(data.Data, 'ABCDEF0123456789') - }) - }) - })) -}) diff --git a/js/tsconfig.json b/js/tsconfig.json new file mode 100644 index 000000000..7caa6a384 --- /dev/null +++ b/js/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "preserveSymlinks": true, + "esModuleInterop": true, + "sourceMap": true, + "declaration": true, + "typeRoots": [ "./types", "./node_modules/@types"] + }, + "exclude": [ + "node_modules", + "dist", + "proto", + "types", + "src/test" + ] +} diff --git a/js/types/solc/index.d.ts b/js/types/solc/index.d.ts new file mode 100644 index 000000000..c657e0c2b --- /dev/null +++ b/js/types/solc/index.d.ts @@ -0,0 +1,83 @@ +declare module 'solc' { + export type Function = { + type: 'function' | 'constructor' | 'fallback' + name: string + inputs: Array + outputs?: Array + stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable' + payable?: boolean + constant?: boolean + }; + + export type Event = { + type: 'event' + name: string + inputs: Array + anonymous: boolean + }; + + export type FunctionInput = { + name: string + type: string + components?: FunctionInput[] + internalType?: string + }; + + export type FunctionOutput = FunctionInput; + export type EventInput = FunctionInput & {indexed?: boolean}; + + type Bytecode = { + linkReferences: any + object: string + opcodes: string + sourceMap: string + } + + type Contract = { + assembly: any + evm: { + bytecode: Bytecode + } + functionHashes: any + gasEstimates: any + abi: (Function | Event)[] + opcodes: string + runtimeBytecode: string + srcmap: string + srcmapRuntime: string + } + + type Source = { + AST: any + } + + export type InputDescription = { + language: string + sources?: Record + settings?: { + outputSelection: Record>> + } + } + + type Error = { + sourceLocation?: { + file: string, + start: number, + end: number + } + type: string + component: string, + severity: "error" | "warning" + message: string + formattedMessage?: string + } + + export type OutputDescription = { + contracts: Record> + errors: Array + sourceList: Array + sources: Record + } + + export function compile(input: string): string; +} \ No newline at end of file diff --git a/keys/keys.pb.go b/keys/keys.pb.go index e0ae261fb..1965b5b9c 100644 --- a/keys/keys.pb.go +++ b/keys/keys.pb.go @@ -7,12 +7,15 @@ import ( context "context" fmt "fmt" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" crypto "github.com/hyperledger/burrow/crypto" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,7 +28,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ListRequest struct { KeyName string `protobuf:"bytes,1,opt,name=KeyName,proto3" json:"KeyName,omitempty"` @@ -1343,6 +1346,44 @@ type KeysServer interface { AddName(context.Context, *AddNameRequest) (*AddNameResponse, error) } +// UnimplementedKeysServer can be embedded to have forward compatible implementations. +type UnimplementedKeysServer struct { +} + +func (*UnimplementedKeysServer) GenerateKey(ctx context.Context, req *GenRequest) (*GenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GenerateKey not implemented") +} +func (*UnimplementedKeysServer) PublicKey(ctx context.Context, req *PubRequest) (*PubResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PublicKey not implemented") +} +func (*UnimplementedKeysServer) Sign(ctx context.Context, req *SignRequest) (*SignResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented") +} +func (*UnimplementedKeysServer) Verify(ctx context.Context, req *VerifyRequest) (*VerifyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") +} +func (*UnimplementedKeysServer) Import(ctx context.Context, req *ImportRequest) (*ImportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Import not implemented") +} +func (*UnimplementedKeysServer) ImportJSON(ctx context.Context, req *ImportJSONRequest) (*ImportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportJSON not implemented") +} +func (*UnimplementedKeysServer) Export(ctx context.Context, req *ExportRequest) (*ExportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") +} +func (*UnimplementedKeysServer) Hash(ctx context.Context, req *HashRequest) (*HashResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Hash not implemented") +} +func (*UnimplementedKeysServer) RemoveName(ctx context.Context, req *RemoveNameRequest) (*RemoveNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveName not implemented") +} +func (*UnimplementedKeysServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedKeysServer) AddName(ctx context.Context, req *AddNameRequest) (*AddNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddName not implemented") +} + func RegisterKeysServer(s *grpc.Server, srv KeysServer) { s.RegisterService(&_Keys_serviceDesc, srv) } @@ -2027,14 +2068,7 @@ func (m *AddNameRequest) Size() (n int) { } func sovKeys(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozKeys(x uint64) (n int) { return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index c158a6ee9..000000000 --- a/package-lock.json +++ /dev/null @@ -1,3757 +0,0 @@ -{ - "name": "@hyperledger/burrow", - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "@grpc/proto-loader": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.4.0.tgz", - "integrity": "sha512-Jm6o+75uWT7E6+lt8edg4J1F/9+BedOjaMgwE14pxS/AO43/0ZqK+rCLVVrXLoExwSAZvgvOD2B0ivy3Spsspw==", - "requires": { - "lodash.camelcase": "^4.3.0", - "protobufjs": "^6.8.6" - } - }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" - }, - "@types/bytebuffer": { - "version": "5.0.40", - "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.40.tgz", - "integrity": "sha512-h48dyzZrPMz25K6Q4+NCwWaxwXany2FhQg/ErOcdZS1ZpsaDnDMZg8JYLMTGz7uvXKrcKGJUZJlZObyfgdaN9g==", - "requires": { - "@types/long": "*", - "@types/node": "*" - } - }, - "@types/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", - "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" - }, - "@types/node": { - "version": "12.7.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.6.tgz", - "integrity": "sha512-+lUz75GKlq6JKTigPUKd3Op8AZrnaoCut5S0jkjMZAw+i6eRTaM6vtytl/wfSxXyx+GPRTG2NUcbQWgiinnKng==" - }, - "acorn": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", - "dev": true - }, - "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", - "dev": true - }, - "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true - }, - "ansi-escapes": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.2.1.tgz", - "integrity": "sha512-Cg3ymMAdN10wOk/VYfLV7KCQyv7EDirJ64500sU7n9UlmioEtDuU5Gd+hj73hXSU/ex7tHJSssmyftDdkMLO8Q==", - "dev": true, - "requires": { - "type-fest": "^0.5.2" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-includes": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", - "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.7.0" - } - }, - "ascli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", - "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", - "requires": { - "colour": "~0.7.1", - "optjs": "~3.2.2" - } - }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bip66": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", - "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "bytebuffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", - "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", - "requires": { - "long": "~3" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colour": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", - "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", - "dev": true - }, - "create-hash": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypto-js": { - "version": "3.1.9-1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", - "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "debug-log": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", - "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "dev": true, - "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" - } - }, - "deglob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/deglob/-/deglob-3.1.0.tgz", - "integrity": "sha512-al10l5QAYaM/PeuXkAr1Y9AQz0LCtWsnJG23pIgh44hDxHFOj36l6qvhfjnIWBYwZOqM1fXUFV9tkjL7JPdGvw==", - "dev": true, - "requires": { - "find-root": "^1.0.0", - "glob": "^7.0.5", - "ignore": "^5.0.0", - "pkg-config": "^1.1.0", - "run-parallel": "^1.1.2", - "uniq": "^1.0.1" - }, - "dependencies": { - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", - "dev": true - } - } - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "drbg.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", - "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", - "requires": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" - } - }, - "elliptic": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz", - "integrity": "sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "dev": true, - "requires": { - "is-callable": "^1.1.1", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.1.0.tgz", - "integrity": "sha512-QhrbdRD7ofuV09IuE2ySWBz0FyXCq0rriLTZXZqaWSI79CVtHVRdkFuFTViiqzZhkCgfOh9USpriuGN2gIpZDQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^6.0.0", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^6.4.1", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", - "dev": true - } - } - }, - "eslint-config-standard": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-13.0.1.tgz", - "integrity": "sha512-zLKp4QOgq6JFgRm1dDCVv1Iu0P5uZ4v5Wa4DTOkg2RFMxdCX/9Qf7lz9ezRj2dBRa955cWQF/O/LWEiYWAHbTw==", - "dev": true - }, - "eslint-config-standard-jsx": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-7.0.0.tgz", - "integrity": "sha512-OiKOF3MFVmWOCVfsi8GHlVorOEiBsPzAnUhM3c6HML94O2krbdQ/eMABySHgHHOIBYRls9sR9I3lo6O0vXhVEg==", - "dev": true - }, - "eslint-import-resolver-node": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", - "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", - "dev": true, - "requires": { - "debug": "^2.6.9", - "resolve": "^1.5.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "eslint-module-utils": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", - "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", - "dev": true, - "requires": { - "debug": "^2.6.8", - "pkg-dir": "^2.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "eslint-plugin-es": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz", - "integrity": "sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw==", - "dev": true, - "requires": { - "eslint-utils": "^1.3.0", - "regexpp": "^2.0.1" - } - }, - "eslint-plugin-import": { - "version": "2.18.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", - "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", - "dev": true, - "requires": { - "array-includes": "^3.0.3", - "contains-path": "^0.1.0", - "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.4.0", - "has": "^1.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.0", - "read-pkg-up": "^2.0.0", - "resolve": "^1.11.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - } - } - }, - "eslint-plugin-node": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-9.1.0.tgz", - "integrity": "sha512-ZwQYGm6EoV2cfLpE1wxJWsfnKUIXfM/KM09/TlorkukgCAwmkgajEJnPCmyzoFPQQkmvo5DrW/nyKutNIw36Mw==", - "dev": true, - "requires": { - "eslint-plugin-es": "^1.4.0", - "eslint-utils": "^1.3.1", - "ignore": "^5.1.1", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" - }, - "dependencies": { - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "eslint-plugin-promise": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", - "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", - "dev": true - }, - "eslint-plugin-react": { - "version": "7.14.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz", - "integrity": "sha512-EzdyyBWC4Uz2hPYBiEJrKCUi2Fn+BJ9B/pJQcjw5X+x/H2Nm59S4MJIvL4O5NEE0+WbnQwEBxWY03oUk+Bc3FA==", - "dev": true, - "requires": { - "array-includes": "^3.0.3", - "doctrine": "^2.1.0", - "has": "^1.0.3", - "jsx-ast-utils": "^2.1.0", - "object.entries": "^1.1.0", - "object.fromentries": "^2.0.0", - "object.values": "^1.1.0", - "prop-types": "^15.7.2", - "resolve": "^1.10.1" - }, - "dependencies": { - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - } - } - }, - "eslint-plugin-standard": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.0.tgz", - "integrity": "sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA==", - "dev": true - }, - "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz", - "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.0.0" - } - }, - "eslint-visitor-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", - "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", - "dev": true - }, - "espree": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.0.0.tgz", - "integrity": "sha512-lJvCS6YbCn3ImT3yKkPe0+tJ+mH6ljhGNjHQH9mRtiO6gjhVAOhVXW1yjnwqGwTkK3bGbye+hb00nFNmu0l/1Q==", - "dev": true, - "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", - "dev": true, - "requires": { - "estraverse": "^4.0.0" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "ethereumjs-abi": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", - "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", - "requires": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - } - }, - "ethereumjs-util": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz", - "integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==", - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "0.1.6", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - } - }, - "ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", - "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "figures": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.0.0.tgz", - "integrity": "sha512-HKri+WoWoUgr83pehn/SIgLOMZ9nAWC6dcGj26RY2R4F50u4+RTUz0RCrUlOV3nKRAICW1UGzyb+kcX2qK1S/g==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", - "dev": true, - "requires": { - "flat-cache": "^2.0.1" - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "find-root": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "dev": true - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } - }, - "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", - "dev": true, - "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - }, - "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - } - } - }, - "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", - "dev": true - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-stdin": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", - "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz", - "integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "grpc": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.23.3.tgz", - "integrity": "sha512-7vdzxPw9s5UYch4aUn4hyM5tMaouaxUUkwkgJlwbR4AXMxiYZJOv19N2ps2eKiuUbJovo5fnGF9hg/X91gWYjw==", - "requires": { - "@types/bytebuffer": "^5.0.40", - "lodash.camelcase": "^4.3.0", - "lodash.clone": "^4.5.0", - "nan": "^2.13.2", - "node-pre-gyp": "^0.13.0", - "protobufjs": "^5.0.3" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.2", - "bundled": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true - }, - "fs-minipass": { - "version": "1.2.6", - "bundled": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.4", - "bundled": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true - }, - "ini": { - "version": "1.3.5", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "bundled": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "bundled": true - } - } - }, - "ms": { - "version": "2.1.2", - "bundled": true - }, - "needle": { - "version": "2.4.0", - "bundled": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.13.0", - "bundled": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true - }, - "npm-packlist": { - "version": "1.4.4", - "bundled": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true - }, - "protobufjs": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", - "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", - "requires": { - "ascli": "~1", - "bytebuffer": "~5", - "glob": "^7.0.5", - "yargs": "^3.10.0" - } - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true - }, - "sax": { - "version": "1.2.4", - "bundled": true - }, - "semver": { - "version": "5.7.1", - "bundled": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true - }, - "tar": { - "version": "4.4.10", - "bundled": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.5", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true - } - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "import-fresh": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", - "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "inquirer": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.1.tgz", - "integrity": "sha512-uxNHBeQhRXIoHWTSNYUFhQVrHYFThIt6IVo2fFmSe8aBwdR3/w6b58hJpiL/fMukFkvGzjg+hSxFtwvVmKZmXw==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^2.4.2", - "cli-cursor": "^3.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.15", - "mute-stream": "0.0.8", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^4.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.1.0.tgz", - "integrity": "sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^5.2.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-buffer": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", - "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsx-ast-utils": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.2.1.tgz", - "integrity": "sha512-v3FxCcAf20DayI+uxnCuw795+oOIkVu6EnJ1+kSzhqqTZHNkTZ7B66ZgLp4oLJ/gbA64cI0B7WRoHZMSRdyVRQ==", - "dev": true, - "requires": { - "array-includes": "^3.0.3", - "object.assign": "^4.1.0" - } - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "requires": { - "invert-kv": "^1.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true - }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" - }, - "lodash.clone": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", - "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=" - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", - "dev": true - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "mocha": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz", - "integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==", - "dev": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.2.2", - "yargs-parser": "13.0.0", - "yargs-unparser": "1.5.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - } - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yargs": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", - "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.0.0" - } - }, - "yargs-parser": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", - "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - } - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", - "dev": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.entries": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz", - "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", - "function-bind": "^1.1.1", - "has": "^1.0.3" - }, - "dependencies": { - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - } - } - }, - "object.fromentries": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.0.tgz", - "integrity": "sha512-9iLiI6H083uiqUuvzyY6qrlmc/Gz8hLQFOcb/Ri/0xXFkSNS3ctV+CbE6yM2+AnkYfOB3dGjdzC0wrMLIhQICA==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.11.0", - "function-bind": "^1.1.1", - "has": "^1.0.1" - } - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "object.values": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", - "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", - "function-bind": "^1.1.1", - "has": "^1.0.3" - }, - "dependencies": { - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - } - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - } - }, - "optjs": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", - "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=" - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-conf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", - "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "load-json-file": "^5.2.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "graceful-fs": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", - "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==", - "dev": true - }, - "load-json-file": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", - "dev": true - } - } - }, - "pkg-config": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", - "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", - "dev": true, - "requires": { - "debug-log": "^1.0.0", - "find-root": "^1.0.0", - "xtend": "^4.0.1" - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, - "protobufjs": { - "version": "6.8.8", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.8.tgz", - "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.0", - "@types/node": "^10.1.0", - "long": "^4.0.0" - }, - "dependencies": { - "@types/node": { - "version": "10.14.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.19.tgz", - "integrity": "sha512-j6Sqt38ssdMKutXBUuAcmWF8QtHW1Fwz/mz4Y+Wd9mzpBiVFirjpNQf363hG5itkG+yGaD+oiLyb50HxJ36l9Q==" - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - } - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "react-is": { - "version": "16.9.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.9.0.tgz", - "integrity": "sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw==", - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "dependencies": { - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - } - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - } - } - }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "resolve": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", - "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rlp": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.3.tgz", - "integrity": "sha512-l6YVrI7+d2vpW6D6rS05x2Xrmq8oW7v3pieZOJKBEdjuTF4Kz/iwk55Zyh1Zaz+KOB2kC8+2jZlp2u9L4tTzCQ==", - "requires": { - "bn.js": "^4.11.1", - "safe-buffer": "^5.1.1" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "run-parallel": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", - "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", - "dev": true - }, - "rxjs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", - "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "secp256k1": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", - "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", - "requires": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.4.1", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" - } - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - } - } - }, - "solc": { - "version": "0.4.26", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.26.tgz", - "integrity": "sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA==", - "dev": true, - "requires": { - "fs-extra": "^0.30.0", - "memorystream": "^0.3.1", - "require-from-string": "^1.1.0", - "semver": "^5.3.0", - "yargs": "^4.7.1" - }, - "dependencies": { - "fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "window-size": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", - "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", - "dev": true - }, - "yargs": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", - "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", - "dev": true, - "requires": { - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "lodash.assign": "^4.0.3", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.1", - "which-module": "^1.0.0", - "window-size": "^0.2.0", - "y18n": "^3.2.1", - "yargs-parser": "^2.4.1" - } - } - } - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "standard": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/standard/-/standard-13.1.0.tgz", - "integrity": "sha512-h3NaMzsa88+/xtjXCMvdn6EWWdlodsI/HvtsQF+EGwrF9kVNwNha9TkFABU6bSBoNfC79YDyIAq9ekxOMBFkuw==", - "dev": true, - "requires": { - "eslint": "~6.1.0", - "eslint-config-standard": "13.0.1", - "eslint-config-standard-jsx": "7.0.0", - "eslint-plugin-import": "~2.18.0", - "eslint-plugin-node": "~9.1.0", - "eslint-plugin-promise": "~4.2.1", - "eslint-plugin-react": "~7.14.2", - "eslint-plugin-standard": "~4.0.0", - "standard-engine": "~11.0.1" - } - }, - "standard-engine": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-11.0.1.tgz", - "integrity": "sha512-WZQ5PpEDfRzPFk+H9xvKVQPQIxKnAQB2cb2Au4NyTCtdw5R0pyMBUZLbPXyFjnlhe8Ae+zfNrWU4m6H5b7cEAg==", - "dev": true, - "requires": { - "deglob": "^3.0.0", - "get-stdin": "^7.0.0", - "minimist": "^1.1.0", - "pkg-conf": "^3.1.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-hex-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", - "requires": { - "is-hex-prefixed": "1.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-fest": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz", - "integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==", - "dev": true - }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "v8-compile-cache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", - "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" - }, - "yargs": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", - "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", - "requires": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" - } - }, - "yargs-parser": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", - "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "lodash.assign": "^4.0.6" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - } - } - }, - "yargs-unparser": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", - "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", - "dev": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.11", - "yargs": "^12.0.5" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - } - } -} diff --git a/permission/permission.pb.go b/permission/permission.pb.go index b91f0d764..73b8cb583 100644 --- a/permission/permission.pb.go +++ b/permission/permission.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -24,7 +25,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type AccountPermissions struct { Base BasePermissions `protobuf:"bytes,1,opt,name=Base" json:"Base"` @@ -46,7 +47,7 @@ func (m *AccountPermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_AccountPermissions.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -102,7 +103,7 @@ func (m *BasePermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_BasePermissions.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -165,7 +166,7 @@ func (m *PermArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PermArgs.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -257,7 +258,7 @@ var fileDescriptor_c837ef01cbda0ad8 = []byte{ func (m *AccountPermissions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -265,43 +266,45 @@ func (m *AccountPermissions) Marshal() (dAtA []byte, err error) { } func (m *AccountPermissions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountPermissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintPermission(dAtA, i, uint64(m.Base.Size())) - n1, err := m.Base.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n1 if len(m.Roles) > 0 { - for _, s := range m.Roles { + for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Roles[iNdEx]) + copy(dAtA[i:], m.Roles[iNdEx]) + i = encodeVarintPermission(dAtA, i, uint64(len(m.Roles[iNdEx]))) + i-- dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size, err := m.Base.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPermission(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *BasePermissions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -309,26 +312,32 @@ func (m *BasePermissions) Marshal() (dAtA []byte, err error) { } func (m *BasePermissions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BasePermissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0x8 - i++ - i = encodeVarintPermission(dAtA, i, uint64(m.Perms)) - dAtA[i] = 0x10 - i++ - i = encodeVarintPermission(dAtA, i, uint64(m.SetBit)) if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + i = encodeVarintPermission(dAtA, i, uint64(m.SetBit)) + i-- + dAtA[i] = 0x10 + i = encodeVarintPermission(dAtA, i, uint64(m.Perms)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil } func (m *PermArgs) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -336,55 +345,65 @@ func (m *PermArgs) Marshal() (dAtA []byte, err error) { } func (m *PermArgs) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PermArgs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0x8 - i++ - i = encodeVarintPermission(dAtA, i, uint64(m.Action)) - if m.Target != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPermission(dAtA, i, uint64(m.Target.Size())) - n2, err := m.Target.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.Permission != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintPermission(dAtA, i, uint64(*m.Permission)) - } - if m.Role != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintPermission(dAtA, i, uint64(len(*m.Role))) - i += copy(dAtA[i:], *m.Role) - } if m.Value != nil { - dAtA[i] = 0x28 - i++ + i-- if *m.Value { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x28 + } + if m.Role != nil { + i -= len(*m.Role) + copy(dAtA[i:], *m.Role) + i = encodeVarintPermission(dAtA, i, uint64(len(*m.Role))) + i-- + dAtA[i] = 0x22 + } + if m.Permission != nil { + i = encodeVarintPermission(dAtA, i, uint64(*m.Permission)) + i-- + dAtA[i] = 0x18 + } + if m.Target != nil { + { + size := m.Target.Size() + i -= size + if _, err := m.Target.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPermission(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - return i, nil + i = encodeVarintPermission(dAtA, i, uint64(m.Action)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil } func encodeVarintPermission(dAtA []byte, offset int, v uint64) int { + offset -= sovPermission(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *AccountPermissions) Size() (n int) { if m == nil { @@ -445,14 +464,7 @@ func (m *PermArgs) Size() (n int) { } func sovPermission(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPermission(x uint64) (n int) { return sovPermission(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -852,6 +864,7 @@ func (m *PermArgs) Unmarshal(dAtA []byte) error { func skipPermission(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -883,10 +896,8 @@ func skipPermission(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -907,55 +918,30 @@ func skipPermission(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthPermission } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthPermission - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPermission - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipPermission(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthPermission - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPermission + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthPermission + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthPermission = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPermission = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthPermission = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPermission = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPermission = fmt.Errorf("proto: unexpected end of group") ) diff --git a/rpc/rpc.pb.go b/rpc/rpc.pb.go index ab323d8ec..5e76a4c3f 100644 --- a/rpc/rpc.pb.go +++ b/rpc/rpc.pb.go @@ -6,6 +6,7 @@ package rpc import ( fmt "fmt" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -26,7 +27,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ResultStatus struct { ChainID string `protobuf:"bytes,1,opt,name=ChainID,proto3" json:"ChainID,omitempty"` @@ -196,14 +197,7 @@ func (m *ResultStatus) Size() (n int) { } func sovRpc(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRpc(x uint64) (n int) { return sovRpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/rpc/rpcdump/rpcdump.pb.go b/rpc/rpcdump/rpcdump.pb.go index 7173c173b..41dc6e561 100644 --- a/rpc/rpcdump/rpcdump.pb.go +++ b/rpc/rpcdump/rpcdump.pb.go @@ -7,12 +7,15 @@ import ( context "context" fmt "fmt" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" dump "github.com/hyperledger/burrow/dump" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,7 +28,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type GetDumpParam struct { Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` @@ -153,6 +156,14 @@ type DumpServer interface { GetDump(*GetDumpParam, Dump_GetDumpServer) error } +// UnimplementedDumpServer can be embedded to have forward compatible implementations. +type UnimplementedDumpServer struct { +} + +func (*UnimplementedDumpServer) GetDump(req *GetDumpParam, srv Dump_GetDumpServer) error { + return status.Errorf(codes.Unimplemented, "method GetDump not implemented") +} + func RegisterDumpServer(s *grpc.Server, srv DumpServer) { s.RegisterService(&_Dump_serviceDesc, srv) } @@ -208,14 +219,7 @@ func (m *GetDumpParam) Size() (n int) { } func sovRpcdump(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRpcdump(x uint64) (n int) { return sovRpcdump(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/rpc/rpcevents/rpcevents.pb.go b/rpc/rpcevents/rpcevents.pb.go index ea0229c54..1365d559a 100644 --- a/rpc/rpcevents/rpcevents.pb.go +++ b/rpc/rpcevents/rpcevents.pb.go @@ -8,6 +8,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -15,6 +16,8 @@ import ( github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" exec "github.com/hyperledger/burrow/execution/exec" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -27,7 +30,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Bound_BoundType int32 @@ -92,7 +95,7 @@ func (m *GetBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_GetBlockRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -153,7 +156,7 @@ func (m *TxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TxRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -240,7 +243,7 @@ func (m *BlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_BlocksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -299,7 +302,7 @@ func (m *EventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_EventsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -359,7 +362,7 @@ func (m *GetTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_GetTxsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -425,7 +428,7 @@ func (m *GetTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_GetTxsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -484,7 +487,7 @@ func (m *Bound) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Bound.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -549,7 +552,7 @@ func (m *BlockRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BlockRange.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -763,6 +766,20 @@ type ExecutionEventsServer interface { Events(*BlocksRequest, ExecutionEvents_EventsServer) error } +// UnimplementedExecutionEventsServer can be embedded to have forward compatible implementations. +type UnimplementedExecutionEventsServer struct { +} + +func (*UnimplementedExecutionEventsServer) Stream(req *BlocksRequest, srv ExecutionEvents_StreamServer) error { + return status.Errorf(codes.Unimplemented, "method Stream not implemented") +} +func (*UnimplementedExecutionEventsServer) Tx(ctx context.Context, req *TxRequest) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method Tx not implemented") +} +func (*UnimplementedExecutionEventsServer) Events(req *BlocksRequest, srv ExecutionEvents_EventsServer) error { + return status.Errorf(codes.Unimplemented, "method Events not implemented") +} + func RegisterExecutionEventsServer(s *grpc.Server, srv ExecutionEventsServer) { s.RegisterService(&_ExecutionEvents_serviceDesc, srv) } @@ -854,7 +871,7 @@ var _ExecutionEvents_serviceDesc = grpc.ServiceDesc{ func (m *GetBlockRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -862,35 +879,41 @@ func (m *GetBlockRequest) Marshal() (dAtA []byte, err error) { } func (m *GetBlockRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Wait { - dAtA[i] = 0x10 - i++ + i-- if m.Wait { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *TxRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -898,38 +921,46 @@ func (m *TxRequest) Marshal() (dAtA []byte, err error) { } func (m *TxRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.TxHash.Size())) - n1, err := m.TxHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n1 if m.Wait { - dAtA[i] = 0x10 - i++ + i-- if m.Wait { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.TxHash.Size() + i -= size + if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpcevents(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *BlocksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -937,36 +968,45 @@ func (m *BlocksRequest) Marshal() (dAtA []byte, err error) { } func (m *BlocksRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlocksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.BlockRange != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.BlockRange.Size())) - n2, err := m.BlockRange.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Query) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Query) + copy(dAtA[i:], m.Query) i = encodeVarintRpcevents(dAtA, i, uint64(len(m.Query))) - i += copy(dAtA[i:], m.Query) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.BlockRange != nil { + { + size, err := m.BlockRange.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcevents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *EventsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -974,37 +1014,45 @@ func (m *EventsResponse) Marshal() (dAtA []byte, err error) { } func (m *EventsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Events) > 0 { - for _, msg := range m.Events { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcevents(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *GetTxsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1012,36 +1060,43 @@ func (m *GetTxsRequest) Marshal() (dAtA []byte, err error) { } func (m *GetTxsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.StartHeight != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.StartHeight)) - } - if m.EndHeight != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.EndHeight)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Query) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Query) + copy(dAtA[i:], m.Query) i = encodeVarintRpcevents(dAtA, i, uint64(len(m.Query))) - i += copy(dAtA[i:], m.Query) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.EndHeight != 0 { + i = encodeVarintRpcevents(dAtA, i, uint64(m.EndHeight)) + i-- + dAtA[i] = 0x10 + } + if m.StartHeight != 0 { + i = encodeVarintRpcevents(dAtA, i, uint64(m.StartHeight)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *GetTxsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1049,37 +1104,45 @@ func (m *GetTxsResponse) Marshal() (dAtA []byte, err error) { } func (m *GetTxsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.TxExecutions) > 0 { - for _, msg := range m.TxExecutions { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.TxExecutions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TxExecutions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcevents(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Height != 0 { + i = encodeVarintRpcevents(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Bound) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1087,30 +1150,36 @@ func (m *Bound) Marshal() (dAtA []byte, err error) { } func (m *Bound) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Bound) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.Type)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Index != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintRpcevents(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Type != 0 { + i = encodeVarintRpcevents(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *BlockRange) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1118,44 +1187,56 @@ func (m *BlockRange) Marshal() (dAtA []byte, err error) { } func (m *BlockRange) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Start != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.Start.Size())) - n3, err := m.Start.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.End != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpcevents(dAtA, i, uint64(m.End.Size())) - n4, err := m.End.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.End.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcevents(dAtA, i, uint64(size)) } - i += n4 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Start != nil { + { + size, err := m.Start.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcevents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintRpcevents(dAtA []byte, offset int, v uint64) int { + offset -= sovRpcevents(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *GetBlockRequest) Size() (n int) { if m == nil { @@ -1315,14 +1396,7 @@ func (m *BlockRange) Size() (n int) { } func sovRpcevents(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRpcevents(x uint64) (n int) { return sovRpcevents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -2208,6 +2282,7 @@ func (m *BlockRange) Unmarshal(dAtA []byte) error { func skipRpcevents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2239,10 +2314,8 @@ func skipRpcevents(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2263,55 +2336,30 @@ func skipRpcevents(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthRpcevents } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthRpcevents - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRpcevents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipRpcevents(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthRpcevents - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRpcevents + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthRpcevents + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthRpcevents = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRpcevents = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthRpcevents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRpcevents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRpcevents = fmt.Errorf("proto: unexpected end of group") ) diff --git a/rpc/rpcquery/rpcquery.pb.go b/rpc/rpcquery/rpcquery.pb.go index 9fb19dcdb..a550beb51 100644 --- a/rpc/rpcquery/rpcquery.pb.go +++ b/rpc/rpcquery/rpcquery.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -21,6 +22,8 @@ import ( payload "github.com/hyperledger/burrow/txs/payload" types "github.com/tendermint/tendermint/abci/types" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -33,7 +36,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type StatusParam struct { BlockTimeWithin string `protobuf:"bytes,1,opt,name=BlockTimeWithin,proto3" json:"BlockTimeWithin,omitempty"` @@ -1313,6 +1316,53 @@ type QueryServer interface { GetBlockHeader(context.Context, *GetBlockParam) (*types.Header, error) } +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Status(ctx context.Context, req *StatusParam) (*rpc.ResultStatus, error) { + return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") +} +func (*UnimplementedQueryServer) GetAccount(ctx context.Context, req *GetAccountParam) (*acm.Account, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") +} +func (*UnimplementedQueryServer) GetMetadata(ctx context.Context, req *GetMetadataParam) (*MetadataResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented") +} +func (*UnimplementedQueryServer) GetStorage(ctx context.Context, req *GetStorageParam) (*StorageValue, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStorage not implemented") +} +func (*UnimplementedQueryServer) ListAccounts(req *ListAccountsParam, srv Query_ListAccountsServer) error { + return status.Errorf(codes.Unimplemented, "method ListAccounts not implemented") +} +func (*UnimplementedQueryServer) GetName(ctx context.Context, req *GetNameParam) (*names.Entry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetName not implemented") +} +func (*UnimplementedQueryServer) ListNames(req *ListNamesParam, srv Query_ListNamesServer) error { + return status.Errorf(codes.Unimplemented, "method ListNames not implemented") +} +func (*UnimplementedQueryServer) GetNetworkRegistry(ctx context.Context, req *GetNetworkRegistryParam) (*NetworkRegistry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNetworkRegistry not implemented") +} +func (*UnimplementedQueryServer) GetValidatorSet(ctx context.Context, req *GetValidatorSetParam) (*ValidatorSet, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSet not implemented") +} +func (*UnimplementedQueryServer) GetValidatorSetHistory(ctx context.Context, req *GetValidatorSetHistoryParam) (*ValidatorSetHistory, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSetHistory not implemented") +} +func (*UnimplementedQueryServer) GetProposal(ctx context.Context, req *GetProposalParam) (*payload.Ballot, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProposal not implemented") +} +func (*UnimplementedQueryServer) ListProposals(req *ListProposalsParam, srv Query_ListProposalsServer) error { + return status.Errorf(codes.Unimplemented, "method ListProposals not implemented") +} +func (*UnimplementedQueryServer) GetStats(ctx context.Context, req *GetStatsParam) (*Stats, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") +} +func (*UnimplementedQueryServer) GetBlockHeader(ctx context.Context, req *GetBlockParam) (*types.Header, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeader not implemented") +} + func RegisterQueryServer(s *grpc.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } @@ -2006,14 +2056,7 @@ func (m *GetBlockParam) Size() (n int) { } func sovRpcquery(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRpcquery(x uint64) (n int) { return sovRpcquery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) diff --git a/rpc/rpctransact/rpctransact.pb.go b/rpc/rpctransact/rpctransact.pb.go index 817bdf70a..996449417 100644 --- a/rpc/rpctransact/rpctransact.pb.go +++ b/rpc/rpctransact/rpctransact.pb.go @@ -8,6 +8,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" time "time" _ "github.com/gogo/protobuf/gogoproto" @@ -21,6 +22,8 @@ import ( txs "github.com/hyperledger/burrow/txs" payload "github.com/hyperledger/burrow/txs/payload" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -34,7 +37,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type CallCodeParam struct { FromAddress github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=FromAddress,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"FromAddress"` @@ -59,7 +62,7 @@ func (m *CallCodeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_CallCodeParam.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -117,7 +120,7 @@ func (m *TxEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TxEnvelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -168,7 +171,7 @@ func (m *TxEnvelopeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_TxEnvelopeParam.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -441,6 +444,47 @@ type TransactServer interface { NameTxAsync(context.Context, *payload.NameTx) (*txs.Receipt, error) } +// UnimplementedTransactServer can be embedded to have forward compatible implementations. +type UnimplementedTransactServer struct { +} + +func (*UnimplementedTransactServer) BroadcastTxSync(ctx context.Context, req *TxEnvelopeParam) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method BroadcastTxSync not implemented") +} +func (*UnimplementedTransactServer) BroadcastTxAsync(ctx context.Context, req *TxEnvelopeParam) (*txs.Receipt, error) { + return nil, status.Errorf(codes.Unimplemented, "method BroadcastTxAsync not implemented") +} +func (*UnimplementedTransactServer) SignTx(ctx context.Context, req *TxEnvelopeParam) (*TxEnvelope, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignTx not implemented") +} +func (*UnimplementedTransactServer) FormulateTx(ctx context.Context, req *payload.Any) (*TxEnvelope, error) { + return nil, status.Errorf(codes.Unimplemented, "method FormulateTx not implemented") +} +func (*UnimplementedTransactServer) CallTxSync(ctx context.Context, req *payload.CallTx) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallTxSync not implemented") +} +func (*UnimplementedTransactServer) CallTxAsync(ctx context.Context, req *payload.CallTx) (*txs.Receipt, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallTxAsync not implemented") +} +func (*UnimplementedTransactServer) CallTxSim(ctx context.Context, req *payload.CallTx) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallTxSim not implemented") +} +func (*UnimplementedTransactServer) CallCodeSim(ctx context.Context, req *CallCodeParam) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallCodeSim not implemented") +} +func (*UnimplementedTransactServer) SendTxSync(ctx context.Context, req *payload.SendTx) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendTxSync not implemented") +} +func (*UnimplementedTransactServer) SendTxAsync(ctx context.Context, req *payload.SendTx) (*txs.Receipt, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendTxAsync not implemented") +} +func (*UnimplementedTransactServer) NameTxSync(ctx context.Context, req *payload.NameTx) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method NameTxSync not implemented") +} +func (*UnimplementedTransactServer) NameTxAsync(ctx context.Context, req *payload.NameTx) (*txs.Receipt, error) { + return nil, status.Errorf(codes.Unimplemented, "method NameTxAsync not implemented") +} + func RegisterTransactServer(s *grpc.Server, srv TransactServer) { s.RegisterService(&_Transact_serviceDesc, srv) } @@ -721,7 +765,7 @@ var _Transact_serviceDesc = grpc.ServiceDesc{ func (m *CallCodeParam) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -729,40 +773,50 @@ func (m *CallCodeParam) Marshal() (dAtA []byte, err error) { } func (m *CallCodeParam) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CallCodeParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintRpctransact(dAtA, i, uint64(m.FromAddress.Size())) - n1, err := m.FromAddress.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - if len(m.Code) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpctransact(dAtA, i, uint64(len(m.Code))) - i += copy(dAtA[i:], m.Code) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Data) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Data) + copy(dAtA[i:], m.Data) i = encodeVarintRpctransact(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Code) > 0 { + i -= len(m.Code) + copy(dAtA[i:], m.Code) + i = encodeVarintRpctransact(dAtA, i, uint64(len(m.Code))) + i-- + dAtA[i] = 0x12 + } + { + size := m.FromAddress.Size() + i -= size + if _, err := m.FromAddress.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpctransact(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *TxEnvelope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -770,30 +824,38 @@ func (m *TxEnvelope) Marshal() (dAtA []byte, err error) { } func (m *TxEnvelope) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxEnvelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if m.Envelope != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpctransact(dAtA, i, uint64(m.Envelope.Size())) - n2, err := m.Envelope.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.Envelope.Size() + i -= size + if _, err := m.Envelope.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpctransact(dAtA, i, uint64(size)) } - i += n2 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *TxEnvelopeParam) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -801,52 +863,64 @@ func (m *TxEnvelopeParam) Marshal() (dAtA []byte, err error) { } func (m *TxEnvelopeParam) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxEnvelopeParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Envelope != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRpctransact(dAtA, i, uint64(m.Envelope.Size())) - n3, err := m.Envelope.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Payload != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRpctransact(dAtA, i, uint64(m.Payload.Size())) - n4, err := m.Payload.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 + n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Timeout, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout):]) + if err2 != nil { + return 0, err2 } + i -= n2 + i = encodeVarintRpctransact(dAtA, i, uint64(n2)) + i-- dAtA[i] = 0x1a - i++ - i = encodeVarintRpctransact(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout))) - n5, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Timeout, dAtA[i:]) - if err != nil { - return 0, err + if m.Payload != nil { + { + size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpctransact(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - i += n5 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Envelope != nil { + { + size := m.Envelope.Size() + i -= size + if _, err := m.Envelope.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpctransact(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintRpctransact(dAtA []byte, offset int, v uint64) int { + offset -= sovRpctransact(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *CallCodeParam) Size() (n int) { if m == nil { @@ -909,14 +983,7 @@ func (m *TxEnvelopeParam) Size() (n int) { } func sovRpctransact(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRpctransact(x uint64) (n int) { return sovRpctransact(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1328,6 +1395,7 @@ func (m *TxEnvelopeParam) Unmarshal(dAtA []byte) error { func skipRpctransact(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1359,10 +1427,8 @@ func skipRpctransact(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1383,55 +1449,30 @@ func skipRpctransact(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthRpctransact } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthRpctransact - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRpctransact - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipRpctransact(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthRpctransact - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRpctransact + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthRpctransact + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthRpctransact = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRpctransact = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthRpctransact = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRpctransact = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRpctransact = fmt.Errorf("proto: unexpected end of group") ) diff --git a/storage/storage.pb.go b/storage/storage.pb.go index 3bbe1d8a1..088d0c947 100644 --- a/storage/storage.pb.go +++ b/storage/storage.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -23,7 +24,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // This is the object that is stored in the leaves of the commitsTree - it captures the sub-tree hashes so that the // commitsTree's hash becomes a mixture of the hashes of all the sub-trees. @@ -45,7 +46,7 @@ func (m *CommitID) XXX_Unmarshal(b []byte) error { } func (m *CommitID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -107,7 +108,7 @@ var fileDescriptor_0d2c4ccf1453ffdb = []byte{ func (m *CommitID) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -115,35 +116,44 @@ func (m *CommitID) Marshal() (dAtA []byte, err error) { } func (m *CommitID) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Version != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintStorage(dAtA, i, uint64(m.Version)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Hash) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) i = encodeVarintStorage(dAtA, i, uint64(len(m.Hash))) - i += copy(dAtA[i:], m.Hash) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Version != 0 { + i = encodeVarintStorage(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintStorage(dAtA []byte, offset int, v uint64) int { + offset -= sovStorage(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *CommitID) Size() (n int) { if m == nil { @@ -165,14 +175,7 @@ func (m *CommitID) Size() (n int) { } func sovStorage(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozStorage(x uint64) (n int) { return sovStorage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -287,6 +290,7 @@ func (m *CommitID) Unmarshal(dAtA []byte) error { func skipStorage(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -318,10 +322,8 @@ func skipStorage(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -342,55 +344,30 @@ func skipStorage(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthStorage } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthStorage - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStorage - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipStorage(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthStorage - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupStorage + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthStorage + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthStorage = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStorage = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthStorage = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStorage = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupStorage = fmt.Errorf("proto: unexpected end of group") ) diff --git a/tests/js/js.sh b/tests/js/js.sh deleted file mode 100755 index 432bea388..000000000 --- a/tests/js/js.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash -# ---------------------------------------------------------- -# PURPOSE - -# This is the test manager for playbooks. It will run the testing -# sequence for playbooks referencing test fixtures in this tests directory. - -# ---------------------------------------------------------- -# REQUIREMENTS - -# m - -# ---------------------------------------------------------- -# USAGE - -# run_pkgs_tests.sh [appXX] - - -export jsscript_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -source "$jsscript_dir/../test_runner.sh" - -export js_dir="${script_dir}/../js" - - -perform_js_tests(){ - cd "$jsscript_dir" - # First deploy a solidity file using burrow deploy so it has metadata - $burrow_bin deploy --chain=$BURROW_HOST:$BURROW_GRPC_PORT -a $key1_addr deploy.yaml - cd "$js_dir" - test_account="{\"address\": \"$key1_addr\"}" - echo "Using test account:" - echo $test_account - account="$test_account" mocha --bail --exit --recursive ${1} - test_exit=$? -} - -burrowjs_tests() { - echo "Hello! I'm the marmot that tests burrow-js." - echo - - test_setup - trap test_teardown EXIT - - echo "Running js tests..." - perform_js_tests "$1" -} - -burrowjs_tests "$1" diff --git a/txs/payload/payload.pb.go b/txs/payload/payload.pb.go index 2f57f5883..a41c51aa6 100644 --- a/txs/payload/payload.pb.go +++ b/txs/payload/payload.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -28,7 +29,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Ballot_ProposalState int32 @@ -90,7 +91,7 @@ func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Any.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -210,7 +211,7 @@ func (m *TxInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TxInput.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -271,7 +272,7 @@ func (m *TxOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TxOutput.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -337,7 +338,7 @@ func (m *CallTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CallTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -417,7 +418,7 @@ func (m *ContractMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ContractMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -471,7 +472,7 @@ func (m *SendTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_SendTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -518,7 +519,7 @@ func (m *PermsTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_PermsTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -583,7 +584,7 @@ func (m *NameTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_NameTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -655,7 +656,7 @@ func (m *BondTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BondTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -700,7 +701,7 @@ func (m *UnbondTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UnbondTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -744,7 +745,7 @@ func (m *GovTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_GovTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -790,7 +791,7 @@ func (m *ProposalTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_ProposalTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -836,7 +837,7 @@ func (m *IdentifyTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_IdentifyTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -880,7 +881,7 @@ func (m *BatchTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BatchTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -924,7 +925,7 @@ func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Vote.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -969,7 +970,7 @@ func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1016,7 +1017,7 @@ func (m *Ballot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Ballot.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1177,7 +1178,7 @@ var fileDescriptor_678c914f1bee6d56 = []byte{ func (m *Any) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1185,120 +1186,146 @@ func (m *Any) Marshal() (dAtA []byte, err error) { } func (m *Any) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Any) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CallTx != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.CallTx.Size())) - n1, err := m.CallTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.SendTx != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.SendTx.Size())) - n2, err := m.SendTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.IdentifyTx != nil { + { + size, err := m.IdentifyTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0x52 } - if m.NameTx != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.NameTx.Size())) - n3, err := m.NameTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.ProposalTx != nil { + { + size, err := m.ProposalTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x4a } - if m.PermsTx != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.PermsTx.Size())) - n4, err := m.PermsTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.BatchTx != nil { + { + size, err := m.BatchTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n4 + i-- + dAtA[i] = 0x42 } - if m.GovTx != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.GovTx.Size())) - n5, err := m.GovTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.UnbondTx != nil { + { + size, err := m.UnbondTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0x3a } if m.BondTx != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.BondTx.Size())) - n6, err := m.BondTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.BondTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n6 + i-- + dAtA[i] = 0x32 } - if m.UnbondTx != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.UnbondTx.Size())) - n7, err := m.UnbondTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.GovTx != nil { + { + size, err := m.GovTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n7 + i-- + dAtA[i] = 0x2a } - if m.BatchTx != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.BatchTx.Size())) - n8, err := m.BatchTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.PermsTx != nil { + { + size, err := m.PermsTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n8 + i-- + dAtA[i] = 0x22 } - if m.ProposalTx != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.ProposalTx.Size())) - n9, err := m.ProposalTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.NameTx != nil { + { + size, err := m.NameTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n9 + i-- + dAtA[i] = 0x1a } - if m.IdentifyTx != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.IdentifyTx.Size())) - n10, err := m.IdentifyTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.SendTx != nil { + { + size, err := m.SendTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n10 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.CallTx != nil { + { + size, err := m.CallTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *TxInput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1306,38 +1333,46 @@ func (m *TxInput) Marshal() (dAtA []byte, err error) { } func (m *TxInput) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxInput) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) - n11, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - if m.Amount != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Amount)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Sequence != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintPayload(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Amount != 0 { + i = encodeVarintPayload(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x10 } - return i, nil + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *TxOutput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1345,33 +1380,41 @@ func (m *TxOutput) Marshal() (dAtA []byte, err error) { } func (m *TxOutput) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) - n12, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n12 if m.Amount != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintPayload(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *CallTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1379,83 +1422,99 @@ func (m *CallTx) Marshal() (dAtA []byte, err error) { } func (m *CallTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CallTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Input != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n13, err := m.Input.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.GasPrice != 0 { + i = encodeVarintPayload(dAtA, i, uint64(m.GasPrice)) + i-- + dAtA[i] = 0x40 + } + if len(m.ContractMeta) > 0 { + for iNdEx := len(m.ContractMeta) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ContractMeta[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a } - i += n13 } - if m.Address != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) - n14, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { + { + size := m.WASM.Size() + i -= size + if _, err := m.WASM.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n14 + i = encodeVarintPayload(dAtA, i, uint64(size)) } - if m.GasLimit != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x32 + { + size := m.Data.Size() + i -= size + if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a if m.Fee != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintPayload(dAtA, i, uint64(m.Fee)) + i-- + dAtA[i] = 0x20 } - dAtA[i] = 0x2a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Data.Size())) - n15, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.GasLimit != 0 { + i = encodeVarintPayload(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x18 } - i += n15 - dAtA[i] = 0x32 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.WASM.Size())) - n16, err := m.WASM.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Address != nil { + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - i += n16 - if len(m.ContractMeta) > 0 { - for _, msg := range m.ContractMeta { - dAtA[i] = 0x3a - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.Input != nil { + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - if m.GasPrice != 0 { - dAtA[i] = 0x40 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.GasPrice)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ContractMeta) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1463,34 +1522,43 @@ func (m *ContractMeta) Marshal() (dAtA []byte, err error) { } func (m *ContractMeta) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContractMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.CodeHash.Size())) - n17, err := m.CodeHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n17 if len(m.Meta) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Meta) + copy(dAtA[i:], m.Meta) i = encodeVarintPayload(dAtA, i, uint64(len(m.Meta))) - i += copy(dAtA[i:], m.Meta) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.CodeHash.Size() + i -= size + if _, err := m.CodeHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *SendTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1498,44 +1566,54 @@ func (m *SendTx) Marshal() (dAtA []byte, err error) { } func (m *SendTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SendTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Inputs) > 0 { - for _, msg := range m.Inputs { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Outputs) > 0 { - for _, msg := range m.Outputs { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Outputs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Outputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Inputs) > 0 { + for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *PermsTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1543,38 +1621,48 @@ func (m *PermsTx) Marshal() (dAtA []byte, err error) { } func (m *PermsTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PermsTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Input != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n18, err := m.Input.MarshalTo(dAtA[i:]) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.PermArgs.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n18 + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.PermArgs.Size())) - n19, err := m.PermArgs.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n19 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Input != nil { + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *NameTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1582,47 +1670,57 @@ func (m *NameTx) Marshal() (dAtA []byte, err error) { } func (m *NameTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NameTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Input != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n20, err := m.Input.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Name) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.Fee != 0 { + i = encodeVarintPayload(dAtA, i, uint64(m.Fee)) + i-- + dAtA[i] = 0x20 } if len(m.Data) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Data) + copy(dAtA[i:], m.Data) i = encodeVarintPayload(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) + i-- + dAtA[i] = 0x1a } - if m.Fee != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Fee)) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPayload(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Input != nil { + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *BondTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1630,30 +1728,38 @@ func (m *BondTx) Marshal() (dAtA []byte, err error) { } func (m *BondTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BondTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if m.Input != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n21, err := m.Input.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n21 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *UnbondTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1661,40 +1767,50 @@ func (m *UnbondTx) Marshal() (dAtA []byte, err error) { } func (m *UnbondTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnbondTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Input != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n22, err := m.Input.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n22 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Output != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Output.Size())) - n23, err := m.Output.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n23 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Input != nil { + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *GovTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1702,44 +1818,54 @@ func (m *GovTx) Marshal() (dAtA []byte, err error) { } func (m *GovTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GovTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Inputs) > 0 { - for _, msg := range m.Inputs { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.AccountUpdates) > 0 { - for _, msg := range m.AccountUpdates { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.AccountUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AccountUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Inputs) > 0 { + for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *ProposalTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1747,55 +1873,67 @@ func (m *ProposalTx) Marshal() (dAtA []byte, err error) { } func (m *ProposalTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProposalTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Input != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Input.Size())) - n24, err := m.Input.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n24 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.VotingWeight != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.VotingWeight)) + if m.Proposal != nil { + { + size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } if m.ProposalHash != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.ProposalHash.Size())) - n25, err := m.ProposalHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.ProposalHash.Size() + i -= size + if _, err := m.ProposalHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n25 + i-- + dAtA[i] = 0x1a } - if m.Proposal != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Proposal.Size())) - n26, err := m.Proposal.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n26 + if m.VotingWeight != 0 { + i = encodeVarintPayload(dAtA, i, uint64(m.VotingWeight)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Input != nil { + { + size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *IdentifyTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1803,42 +1941,52 @@ func (m *IdentifyTx) Marshal() (dAtA []byte, err error) { } func (m *IdentifyTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IdentifyTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Inputs) > 0 { - for _, msg := range m.Inputs { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Node != nil { + { + size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - } - if m.Node != nil { + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Node.Size())) - n27, err := m.Node.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n27 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Inputs) > 0 { + for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *BatchTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1846,44 +1994,54 @@ func (m *BatchTx) Marshal() (dAtA []byte, err error) { } func (m *BatchTx) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Inputs) > 0 { - for _, msg := range m.Inputs { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Txs) > 0 { - for _, msg := range m.Txs { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Txs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Inputs) > 0 { + for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *Vote) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1891,33 +2049,41 @@ func (m *Vote) Marshal() (dAtA []byte, err error) { } func (m *Vote) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Address.Size())) - n28, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n28 if m.VotingWeight != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintPayload(dAtA, i, uint64(m.VotingWeight)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPayload(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *Proposal) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1925,42 +2091,52 @@ func (m *Proposal) Marshal() (dAtA []byte, err error) { } func (m *Proposal) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.Description) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.BatchTx != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.BatchTx.Size())) - n29, err := m.BatchTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.BatchTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) } - i += n29 + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintPayload(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPayload(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Ballot) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1968,61 +2144,75 @@ func (m *Ballot) Marshal() (dAtA []byte, err error) { } func (m *Ballot) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Ballot) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Proposal != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.Proposal.Size())) - n30, err := m.Proposal.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n30 + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.FinalizingTx != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPayload(dAtA, i, uint64(m.FinalizingTx.Size())) - n31, err := m.FinalizingTx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Votes) > 0 { + for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } - i += n31 } if m.ProposalState != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintPayload(dAtA, i, uint64(m.ProposalState)) + i-- + dAtA[i] = 0x20 } - if len(m.Votes) > 0 { - for _, msg := range m.Votes { - dAtA[i] = 0x2a - i++ - i = encodeVarintPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { + if m.FinalizingTx != nil { + { + size := m.FinalizingTx.Size() + i -= size + if _, err := m.FinalizingTx.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n + i = encodeVarintPayload(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Proposal != nil { + { + size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintPayload(dAtA []byte, offset int, v uint64) int { + offset -= sovPayload(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Any) Size() (n int) { if m == nil { @@ -2443,14 +2633,7 @@ func (m *Ballot) Size() (n int) { } func sovPayload(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPayload(x uint64) (n int) { return sovPayload(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -5185,6 +5368,7 @@ func (m *Ballot) Unmarshal(dAtA []byte) error { func skipPayload(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -5216,10 +5400,8 @@ func skipPayload(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -5240,55 +5422,30 @@ func skipPayload(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthPayload } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthPayload - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPayload - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipPayload(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthPayload - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPayload + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthPayload + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthPayload = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPayload = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthPayload = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPayload = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPayload = fmt.Errorf("proto: unexpected end of group") ) diff --git a/txs/txs.pb.go b/txs/txs.pb.go index fa222a2ac..ae8cc1e9f 100644 --- a/txs/txs.pb.go +++ b/txs/txs.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" io "io" math "math" + math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -27,7 +28,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Envelope_Encoding int32 @@ -78,7 +79,7 @@ func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Envelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -139,7 +140,7 @@ func (m *Signatory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Signatory.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -205,7 +206,7 @@ func (m *Receipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Receipt.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -292,7 +293,7 @@ var fileDescriptor_372ebcf753025bdc = []byte{ func (m *Envelope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -300,47 +301,57 @@ func (m *Envelope) Marshal() (dAtA []byte, err error) { } func (m *Envelope) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Envelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Signatories) > 0 { - for _, msg := range m.Signatories { - dAtA[i] = 0xa - i++ - i = encodeVarintTxs(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Enc != 0 { + i = encodeVarintTxs(dAtA, i, uint64(m.Enc)) + i-- + dAtA[i] = 0x18 + } + if m.Tx != nil { + { + size := m.Tx.Size() + i -= size + if _, err := m.Tx.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n + i = encodeVarintTxs(dAtA, i, uint64(size)) } - } - if m.Tx != nil { + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.Tx.Size())) - n1, err := m.Tx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 } - if m.Enc != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.Enc)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Signatories) > 0 { + for iNdEx := len(m.Signatories) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Signatories[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTxs(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *Signatory) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -348,50 +359,62 @@ func (m *Signatory) Marshal() (dAtA []byte, err error) { } func (m *Signatory) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Signatory) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Address != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.Address.Size())) - n2, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Signature != nil { + { + size, err := m.Signature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTxs(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0x22 } if m.PublicKey != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.PublicKey.Size())) - n3, err := m.PublicKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTxs(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x12 } - if m.Signature != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.Signature.Size())) - n4, err := m.Signature.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Address != nil { + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTxs(dAtA, i, uint64(size)) } - i += n4 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Receipt) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -399,55 +422,67 @@ func (m *Receipt) Marshal() (dAtA []byte, err error) { } func (m *Receipt) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Receipt) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TxType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.TxType)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - dAtA[i] = 0x12 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.TxHash.Size())) - n5, err := m.TxHash.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.ContractAddress.Size() + i -= size + if _, err := m.ContractAddress.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTxs(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0x22 if m.CreatesContract { - dAtA[i] = 0x18 - i++ + i-- if m.CreatesContract { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 } - dAtA[i] = 0x22 - i++ - i = encodeVarintTxs(dAtA, i, uint64(m.ContractAddress.Size())) - n6, err := m.ContractAddress.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.TxHash.Size() + i -= size + if _, err := m.TxHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTxs(dAtA, i, uint64(size)) } - i += n6 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + if m.TxType != 0 { + i = encodeVarintTxs(dAtA, i, uint64(m.TxType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintTxs(dAtA []byte, offset int, v uint64) int { + offset -= sovTxs(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Envelope) Size() (n int) { if m == nil { @@ -521,14 +556,7 @@ func (m *Receipt) Size() (n int) { } func sovTxs(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTxs(x uint64) (n int) { return sovTxs(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -998,6 +1026,7 @@ func (m *Receipt) Unmarshal(dAtA []byte) error { func skipTxs(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1029,10 +1058,8 @@ func skipTxs(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1053,55 +1080,30 @@ func skipTxs(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthTxs } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthTxs - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTxs - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipTxs(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthTxs - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTxs + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthTxs + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthTxs = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTxs = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthTxs = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTxs = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTxs = fmt.Errorf("proto: unexpected end of group") ) From 9ed3496649e72dff76732686d075f211768331f7 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Thu, 5 Mar 2020 18:57:02 +0000 Subject: [PATCH 064/185] blockchain state should commit height 0 state hash Signed-off-by: Gregory Hill --- CHANGELOG.md | 9 +++++++++ NOTES.md | 5 ++++- core/kernel.go | 8 +++++++- go.sum | 41 ++++++----------------------------------- project/history.go | 7 +++++++ 5 files changed, 33 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ceb4e844..7af4fdae0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.30.0] - 2020-03-05 +### Changed +- [JS] Partial rewrite of client API in typescript + +### Fixed +- [State] Blockchain now commits initial AppHash to avoid IAVL panic + + ## [0.29.8] - 2020-02-11 ### Fixed - [ABI] Fix failure to convert crypto.Address to EVMAddress (https://github.com/hyperledger/burrow/issues/1326) @@ -628,6 +636,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.30.0]: https://github.com/hyperledger/burrow/compare/v0.29.8...v0.30.0 [0.29.8]: https://github.com/hyperledger/burrow/compare/v0.29.7...v0.29.8 [0.29.7]: https://github.com/hyperledger/burrow/compare/v0.29.6...v0.29.7 [0.29.6]: https://github.com/hyperledger/burrow/compare/v0.29.5...v0.29.6 diff --git a/NOTES.md b/NOTES.md index 6829c1922..dda538f38 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,6 @@ +### Changed +- [JS] Partial rewrite of client API in typescript + ### Fixed -- [ABI] Fix failure to convert crypto.Address to EVMAddress (https://github.com/hyperledger/burrow/issues/1326) +- [State] Blockchain now commits initial AppHash to avoid IAVL panic diff --git a/core/kernel.go b/core/kernel.go index c76dd0edc..e61e2b773 100644 --- a/core/kernel.go +++ b/core/kernel.go @@ -128,7 +128,13 @@ func (kern *Kernel) LoadState(genesisDoc *genesis.GenesisDoc) (err error) { return fmt.Errorf("could not build genesis state: %v", err) } - if err = kern.State.InitialCommit(); err != nil { + err = kern.State.InitialCommit() + if err != nil { + return err + } + + err = kern.Blockchain.CommitWithAppHash(kern.State.Hash()) + if err != nil { return err } } diff --git a/go.sum b/go.sum index bd85de8f9..c341c35c5 100644 --- a/go.sum +++ b/go.sum @@ -62,10 +62,8 @@ github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13 h1:/voSflvo4UvPT0XZy+YQM github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13/go.mod h1:rQELVIqRXpraeUryHOBadz99ePvEVQmTVpGr8M9QQ4Q= github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8 h1:bD2/rCXwgXJm2vgoSSSCM9IPjVFfEoQFFblzg7HHABI= github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8/go.mod h1:o4DgpccPNAQAlPSxo7I4L/LWNh2oyr/BBGSynrLTmZM= -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/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.2/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/etcd-io/bbolt v1.3.3 h1:gSJmxrs37LgTqR/oyJBWok6k6SvXEUerFTbltIhXkBM= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= @@ -76,7 +74,6 @@ github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQD github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= @@ -84,7 +81,6 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-interpreter/wagon v0.6.1-0.20190923081222-01d3d3376951 h1:2zNSjTofVE4/LGSaJpKB4oYGD5nZsEUdRXzFaFykJzI= github.com/go-interpreter/wagon v0.6.1-0.20190923081222-01d3d3376951/go.mod h1:5+b/MBYkclRZngKF5s6qrgWxSLgE9F5dFdO1hAueZLc= -github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 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= @@ -108,7 +104,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -117,11 +112,12 @@ github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaW github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -154,6 +150,7 @@ github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= 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/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= @@ -174,7 +171,6 @@ github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= @@ -216,7 +212,6 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -228,7 +223,6 @@ github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqn github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= 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/silasdavis/life v0.0.0-20191009191257-e9c2a5fdbc96 h1:h+9noX9J+uzeBNUUc0tQcEHyvt4SreDTyZMdBIHE5ac= @@ -236,7 +230,9 @@ github.com/silasdavis/life v0.0.0-20191009191257-e9c2a5fdbc96/go.mod h1:kRj+/Hyx github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -250,9 +246,6 @@ github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9 github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= -github.com/spf13/viper v1.5.0 h1:GpsTwfsQ27oS/Aha/6d1oD7tpKIqWnOA6tgOX9HHkt4= -github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4= github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= @@ -266,31 +259,20 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stumble/gorocksdb v0.0.3 h1:9UU+QA1pqFYJuf9+5p7z1IqdE5k0mma4UAeu2wmX8kA= -github.com/stumble/gorocksdb v0.0.3/go.mod h1:v6IHdFBXk5DJ1K4FZ0xi+eY737quiiBxYtSWXadLybY= 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.20190318030020-c3a204f8e965 h1:1oFLiOyVl+W7bnBzGhf7BbIv9loSFQcieWWYIjLqcAw= -github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/tecbot/gorocksdb v0.0.0-20191017175515-d217d93fd4c5 h1:gVwAW5OwaZlDB5/CfqcGFM9p9C+KxvQKyNOltQ8orj0= github.com/tecbot/gorocksdb v0.0.0-20191017175515-d217d93fd4c5/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6offJMk= github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= -github.com/tendermint/iavl v0.12.4 h1:hd1woxUGISKkfUWBA4mmmTwOua6PQZTJM/F0FDrmMV8= -github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= github.com/tendermint/iavl v0.13.0 h1:r2sINvNFlJsLlLhGoqlqPlREWYkuK26BvMfkBt+XQnA= github.com/tendermint/iavl v0.13.0/go.mod h1:7nSUPdrsHEZ2nNZa+9gaIrcJciWd1jCQZXtcyARU82k= -github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= -github.com/tendermint/tendermint v0.32.8 h1:eOaLJGRi5x/Rb23fiVsxq9c5fZ/6O5QplExlGjNPDVI= -github.com/tendermint/tendermint v0.32.8/go.mod h1:5/B1XZjNYtVBso8o1l/Eg4A0Mhu42lDcmftoQl95j/E= github.com/tendermint/tendermint v0.33.0 h1:TW1g9sQs3YSqKM8o1+opL3/VmBy4Ke/VKV9MxYpqNbI= github.com/tendermint/tendermint v0.33.0/go.mod h1:s5UoymnPIY+GcA3mMte4P9gpMP8vS7UH7HBXikT1pHI= github.com/tendermint/tendermint v0.33.1 h1:8f68LUBz8yhISZvaLFP4siXXrLWsWeoYfelbdNtmvm4= github.com/tendermint/tendermint v0.33.1/go.mod h1:fBOKyrlXOETqQ+heL8x/TZgSdmItON54csyabvktBp0= -github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= -github.com/tendermint/tm-db v0.2.0 h1:rJxgdqn6fIiVJZy4zLpY1qVlyD0TU6vhkT4kEf71TQQ= -github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= github.com/tendermint/tm-db v0.4.0 h1:iPbCcLbf4nwDFhS39Zo1lpdS1X/cT9CkTlUx17FHQgA= github.com/tendermint/tm-db v0.4.0/go.mod h1:+Cwhgowrf7NBGXmsqFMbwEtbo80XmyrlY5Jsk95JubQ= github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= @@ -321,11 +303,7 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= 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-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 h1:7KByu05hhLed2MO29w7p1XfZvZ13m8mub3shuVftRs0= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -381,18 +359,11 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/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-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2 h1:67iHsV9djwGdZpdZNbLuQj6FOzCaZe3w+vhLjn5AcFA= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= diff --git a/project/history.go b/project/history.go index 6876c7ee9..5ad0fce7f 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,13 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.30.0 - 2020-03-05", + `### Changed +- [JS] Partial rewrite of client API in typescript + +### Fixed +- [State] Blockchain now commits initial AppHash to avoid IAVL panic +`, "0.29.8 - 2020-02-11", `### Fixed - [ABI] Fix failure to convert crypto.Address to EVMAddress (https://github.com/hyperledger/burrow/issues/1326) From d40576a4e7ae9ec86730e28ef8d5c00ef04b795e Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 6 Mar 2020 17:29:27 +0000 Subject: [PATCH 065/185] unbond amount now propogated to formulation Signed-off-by: Gregory Hill --- CHANGELOG.md | 6 ++++++ NOTES.md | 5 +---- deploy/jobs/jobs_governance.go | 1 + project/history.go | 5 +++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7af4fdae0..73f471ade 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.30.1] - 2020-03-06 +### Fixed +- [CLI/Tx] Unbond formulation now specifies amount + + ## [0.30.0] - 2020-03-05 ### Changed - [JS] Partial rewrite of client API in typescript @@ -636,6 +641,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.30.1]: https://github.com/hyperledger/burrow/compare/v0.30.0...v0.30.1 [0.30.0]: https://github.com/hyperledger/burrow/compare/v0.29.8...v0.30.0 [0.29.8]: https://github.com/hyperledger/burrow/compare/v0.29.7...v0.29.8 [0.29.7]: https://github.com/hyperledger/burrow/compare/v0.29.6...v0.29.7 diff --git a/NOTES.md b/NOTES.md index dda538f38..cc48be21a 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,6 +1,3 @@ -### Changed -- [JS] Partial rewrite of client API in typescript - ### Fixed -- [State] Blockchain now commits initial AppHash to avoid IAVL panic +- [CLI/Tx] Unbond formulation now specifies amount diff --git a/deploy/jobs/jobs_governance.go b/deploy/jobs/jobs_governance.go index 75955677b..131d59f89 100644 --- a/deploy/jobs/jobs_governance.go +++ b/deploy/jobs/jobs_governance.go @@ -107,6 +107,7 @@ func FormulateUnbondJob(unbond *def.Unbond, account string, client *def.Client, arg := &def.UnbondArg{ Output: unbond.Source, + Amount: unbond.Amount, Sequence: unbond.Sequence, } diff --git a/project/history.go b/project/history.go index 5ad0fce7f..e73e98224 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,11 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.30.1 - 2020-03-06", + `### Fixed +- [CLI/Tx] Unbond formulation now specifies amount +`, + "0.30.0 - 2020-03-05", `### Changed - [JS] Partial rewrite of client API in typescript From 15ddd3e1cff2a6df756cbf4f94b5d13611ebedcf Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Sun, 8 Mar 2020 04:21:16 +0000 Subject: [PATCH 066/185] secp256k1 cannot validate therefore should not be able to bond Signed-off-by: Gregory Hill --- execution/contexts/bond_context.go | 6 ++++ execution/contexts/bond_context_test.go | 44 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 execution/contexts/bond_context_test.go diff --git a/execution/contexts/bond_context.go b/execution/contexts/bond_context.go index 315c2554e..c79c3e169 100644 --- a/execution/contexts/bond_context.go +++ b/execution/contexts/bond_context.go @@ -6,6 +6,7 @@ import ( "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/acm/validator" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/txs/payload" @@ -33,6 +34,11 @@ func (ctx *BondContext) Execute(txe *exec.TxExecution, p payload.Payload) error return err } + ct := account.PublicKey.GetCurveType() + if ct == crypto.CurveTypeSecp256k1 { + return fmt.Errorf("secp256k1 not supported") + } + // can the account bond? if !hasBondPermission(ctx.State, account, ctx.Logger) { return fmt.Errorf("account '%s' lacks bond permission", account.Address) diff --git a/execution/contexts/bond_context_test.go b/execution/contexts/bond_context_test.go new file mode 100644 index 000000000..d0d437e9f --- /dev/null +++ b/execution/contexts/bond_context_test.go @@ -0,0 +1,44 @@ +package contexts + +import ( + "testing" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/acm/validator" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/txs/payload" + "github.com/stretchr/testify/require" +) + +func TestBondContext(t *testing.T) { + t.Run("CurveType", func(t *testing.T) { + privKey, err := crypto.GeneratePrivateKey(nil, crypto.CurveTypeSecp256k1) + require.NoError(t, err) + pubKey := privKey.GetPublicKey() + address := pubKey.GetAddress() + + accountState := acmstate.NewMemoryState() + accountState.Accounts[address] = &acm.Account{ + Address: address, + PublicKey: pubKey, + Balance: 1337, + } + + bondContext := &BondContext{ + State: accountState, + ValidatorSet: validator.NewSet(), + Logger: logging.NewNoopLogger(), + } + + err = bondContext.Execute(&exec.TxExecution{}, &payload.BondTx{ + Input: &payload.TxInput{ + Address: address, + Amount: 1337, + }, + }) + require.Error(t, err) + }) +} From 21fb3746d3d86ec1f164d35a5dc110b404c66d2f Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 13 Mar 2020 11:01:48 +0000 Subject: [PATCH 067/185] hotfix for concurrency bug in callSim Signed-off-by: Gregory Hill --- CHANGELOG.md | 6 ++++++ NOTES.md | 2 +- project/history.go | 4 ++++ rpc/rpctransact/transact_server.go | 7 +++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73f471ade..fd26efe36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.30.2] - 2020-03-13 +### Fixed +- [RPC] add mutex to callSim and callCode + + ## [0.30.1] - 2020-03-06 ### Fixed - [CLI/Tx] Unbond formulation now specifies amount @@ -641,6 +646,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.30.2]: https://github.com/hyperledger/burrow/compare/v0.30.1...v0.30.2 [0.30.1]: https://github.com/hyperledger/burrow/compare/v0.30.0...v0.30.1 [0.30.0]: https://github.com/hyperledger/burrow/compare/v0.29.8...v0.30.0 [0.29.8]: https://github.com/hyperledger/burrow/compare/v0.29.7...v0.29.8 diff --git a/NOTES.md b/NOTES.md index cc48be21a..de68e0768 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,3 @@ ### Fixed -- [CLI/Tx] Unbond formulation now specifies amount +- [RPC] add mutex to callSim and callCode diff --git a/project/history.go b/project/history.go index e73e98224..88c4b6cd8 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,10 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.30.2 - 2020-03-13", + `### Fixed +- [RPC] add mutex to callSim and callCode +`, "0.30.1 - 2020-03-06", `### Fixed - [CLI/Tx] Unbond formulation now specifies amount diff --git a/rpc/rpctransact/transact_server.go b/rpc/rpctransact/transact_server.go index 644bbf907..711bd5250 100644 --- a/rpc/rpctransact/transact_server.go +++ b/rpc/rpctransact/transact_server.go @@ -2,6 +2,7 @@ package rpctransact import ( "fmt" + "sync" "time" "github.com/hyperledger/burrow/logging" @@ -25,6 +26,7 @@ type transactServer struct { transactor *execution.Transactor txCodec txs.Codec logger *logging.Logger + lock *sync.Mutex } func NewTransactServer(state acmstate.Reader, blockchain bcm.BlockchainInfo, transactor *execution.Transactor, @@ -35,6 +37,7 @@ func NewTransactServer(state acmstate.Reader, blockchain bcm.BlockchainInfo, tra transactor: transactor, txCodec: txCodec, logger: logger.WithScope("NewTransactServer()"), + lock: &sync.Mutex{}, } } @@ -100,10 +103,14 @@ func (ts *transactServer) CallTxSim(ctx context.Context, param *payload.CallTx) if param.Address == nil { return nil, fmt.Errorf("CallSim requires a non-nil address from which to retrieve code") } + ts.lock.Lock() + defer ts.lock.Unlock() return execution.CallSim(ts.state, ts.blockchain, param.Input.Address, *param.Address, param.Data, ts.logger) } func (ts *transactServer) CallCodeSim(ctx context.Context, param *CallCodeParam) (*exec.TxExecution, error) { + ts.lock.Lock() + defer ts.lock.Unlock() return execution.CallCodeSim(ts.state, ts.blockchain, param.FromAddress, param.FromAddress, param.Code, param.Data, ts.logger) } From 880790e17e0a46eafe36e596c53822c53faeca36 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Fri, 13 Mar 2020 15:58:50 +0000 Subject: [PATCH 068/185] add default burrow ts client Signed-off-by: Gregory Hill --- CHANGELOG.md | 6 +++ NOTES.md | 4 +- js/src/index.ts | 14 +++--- js/src/lib/{Burrow.ts => burrow.ts} | 0 js/src/lib/client.ts | 70 +++++++++++++++++++++++++++++ js/tsconfig.json | 2 +- project/history.go | 4 ++ 7 files changed, 88 insertions(+), 12 deletions(-) rename js/src/lib/{Burrow.ts => burrow.ts} (100%) create mode 100644 js/src/lib/client.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index fd26efe36..75f0a6bb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.30.3] - 2020-03-13 +### Added +- [TS] Default ts client interface implementation + + ## [0.30.2] - 2020-03-13 ### Fixed - [RPC] add mutex to callSim and callCode @@ -646,6 +651,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.30.3]: https://github.com/hyperledger/burrow/compare/v0.30.2...v0.30.3 [0.30.2]: https://github.com/hyperledger/burrow/compare/v0.30.1...v0.30.2 [0.30.1]: https://github.com/hyperledger/burrow/compare/v0.30.0...v0.30.1 [0.30.0]: https://github.com/hyperledger/burrow/compare/v0.29.8...v0.30.0 diff --git a/NOTES.md b/NOTES.md index de68e0768..9d2ae0111 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,3 @@ -### Fixed -- [RPC] add mutex to callSim and callCode +### Added +- [TS] Default ts client interface implementation diff --git a/js/src/index.ts b/js/src/index.ts index f09abc966..5e558d65b 100644 --- a/js/src/index.ts +++ b/js/src/index.ts @@ -1,9 +1,5 @@ -import { Burrow } from './lib/Burrow'; -import { Contract } from './lib/contracts/contract'; -import * as utils from './lib/utils/utils'; - -export { - Burrow, - Contract, - utils, -} \ No newline at end of file +export { Burrow } from './lib/burrow'; +export { Contract } from './lib/contracts/contract'; +export * from './lib/utils/utils'; +export { TxInput, CallTx } from '../proto/payload_pb' +export { TxExecution } from '../proto/exec_pb'; \ No newline at end of file diff --git a/js/src/lib/Burrow.ts b/js/src/lib/burrow.ts similarity index 100% rename from js/src/lib/Burrow.ts rename to js/src/lib/burrow.ts diff --git a/js/src/lib/client.ts b/js/src/lib/client.ts new file mode 100644 index 000000000..3ddf1841a --- /dev/null +++ b/js/src/lib/client.ts @@ -0,0 +1,70 @@ +import { Burrow } from './burrow' +import * as convert from './utils/convert'; +import * as coder from 'ethereumjs-abi'; +import { Readable } from 'stream'; +import { TxInput, CallTx } from '../../proto/payload_pb' +import { TxExecution } from '../../proto/exec_pb'; + +export type Interceptor = (result: TxExecution) => Promise; + +export class Client extends Burrow { + interceptor: Interceptor; + + constructor(url: string, account: string) { + super(url, account); + + this.interceptor = async (data) => data; + } + + deploy(msg: CallTx, callback: (err: Error, addr: Uint8Array) => void) { + this.pipe.transact(msg, (err, exec) => { + if (err) callback(err, null); + else if (exec.hasException()) callback(new Error(exec.getException().getException()), null); + else callback(null, exec.getReceipt().getContractaddress_asU8()); + }) + } + + call(msg: CallTx, callback: (err: Error, exec: Uint8Array) => void) { + this.pipe.transact(msg, (err, exec) => { + if (err) callback(err, null); + else if (exec.hasException()) callback(new Error(exec.getException().getException()), null); + else this.interceptor(exec).then(exec => callback(null, exec.getResult().getReturn_asU8())); + }) + } + + callSim(msg: CallTx, callback: (err: Error, exec: Uint8Array) => void) { + this.pipe.call(msg, (err, exec) => { + if (err) callback(err, null); + else if (exec.hasException()) callback(new Error(exec.getException().getException()), null); + else this.interceptor(exec).then(exec => callback(null, exec.getResult().getReturn_asU8())); + }) + } + + listen(signature: string, address: string, callback: (err: Error, event: any) => void): Readable { + return this.events.subContractEvents(address, signature, callback) + } + + payload(data: string, address?: string): CallTx { + const input = new TxInput(); + input.setAddress(Buffer.from(this.account, 'hex')); + input.setAmount(0); + + const payload = new CallTx(); + payload.setInput(input); + if (address) payload.setAddress(Buffer.from(address, 'hex')); + payload.setGaslimit(1000000); + payload.setFee(0); + payload.setData(Buffer.from(data, 'hex')); + + return payload + } + + encode(name: string, inputs: string[], ...args: any[]): string { + args = convert.burrowToAbi(inputs, args); + return name + convert.bytesTB(coder.rawEncode(inputs, args)); + } + + decode(data: Uint8Array, outputs: string[]): any { + return convert.abiToBurrow(outputs, coder.rawDecode(outputs, Buffer.from(data))); + } +} \ No newline at end of file diff --git a/js/tsconfig.json b/js/tsconfig.json index 7caa6a384..39c6681f0 100644 --- a/js/tsconfig.json +++ b/js/tsconfig.json @@ -13,6 +13,6 @@ "dist", "proto", "types", - "src/test" + "src/test/" ] } diff --git a/project/history.go b/project/history.go index 88c4b6cd8..6265a6352 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,10 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.30.3 - 2020-03-13", + `### Added +- [TS] Default ts client interface implementation +`, "0.30.2 - 2020-03-13", `### Fixed - [RPC] add mutex to callSim and callCode From de2816cc22d1e7a23b342e25720db6a5d56b8114 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Sun, 5 Apr 2020 09:32:59 +0100 Subject: [PATCH 069/185] Moved Solidity Go fixture 'solgo' functionality to `burrow compile` on CLI for external use Signed-off-by: Silas Davis --- Makefile | 8 ++-- cmd/burrow/commands/compile.go | 71 +++++++++++++++++++++++++++++++ cmd/burrow/main.go | 3 ++ deploy/compile/solgo/main.go | 69 ------------------------------ execution/exec/block_execution.go | 4 +- project/history.go | 5 ++- 6 files changed, 85 insertions(+), 75 deletions(-) create mode 100644 cmd/burrow/commands/compile.go delete mode 100644 deploy/compile/solgo/main.go diff --git a/Makefile b/Makefile index 1f86e75c3..4c578e7f5 100644 --- a/Makefile +++ b/Makefile @@ -170,17 +170,17 @@ docker_build: check commit_hash # Solidity fixtures .PHONY: solidity -solidity: $(patsubst %.sol, %.sol.go, $(wildcard ./execution/solidity/*.sol)) +solidity: $(patsubst %.sol, %.sol.go, $(wildcard ./execution/solidity/*.sol)) build_burrow %.sol.go: %.sol - @go run ./deploy/compile/solgo/main.go $^ + @burrow compile $^ # Solang fixtures .PHONY: solang -solang: $(patsubst %.solang, %.solang.go, $(wildcard ./execution/wasm/*.solang)) +solang: $(patsubst %.solang, %.solang.go, $(wildcard ./execution/wasm/*.solang)) build_burrow %.solang.go: %.solang - @go run ./deploy/compile/solgo/main.go -wasm $^ + @burrow compile --wasm $^ # node/js .PHONY: npm_install diff --git a/cmd/burrow/commands/compile.go b/cmd/burrow/commands/compile.go new file mode 100644 index 000000000..4fa2ab18d --- /dev/null +++ b/cmd/burrow/commands/compile.go @@ -0,0 +1,71 @@ +package commands + +import ( + "fmt" + "os" + "path" + + "github.com/hyperledger/burrow/deploy/compile" + "github.com/hyperledger/burrow/logging" + cli "github.com/jawher/mow.cli" +) + +// Currently this just compiles to Go fixtures - it might make sense to extend it to take a text template for output +// if it is convenient to expose our compiler wrappers outside of burrow deploy +func Compile(output Output) func(cmd *cli.Cmd) { + return func(cmd *cli.Cmd) { + wasmOpt := cmd.BoolOpt("w wasm", false, "Use solang rather than solc") + sourceArg := cmd.StringsArg("SOURCE", nil, "Solidity source files to compile") + cmd.Spec = "[--wasm] SOURCE..." + + cmd.Action = func() { + for _, solfile := range *sourceArg { + var resp *compile.Response + var err error + + if *wasmOpt { + resp, err = compile.WASM(solfile, "", logging.NewNoopLogger()) + if err != nil { + output.Fatalf("failed compile solidity to wasm: %v\n", err) + } + } else { + resp, err = compile.EVM(solfile, false, "", nil, logging.NewNoopLogger()) + if err != nil { + output.Fatalf("failed compile solidity: %v\n", err) + } + } + + if resp.Error != "" { + output.Fatalf(resp.Error) + } + + if resp.Warning != "" { + output.Fatalf(resp.Warning) + } + + f, err := os.Create(solfile + ".go") + if err != nil { + output.Fatalf("failed to create go file: %v\n", err) + } + + f.WriteString(fmt.Sprintf("package %s\n\n", path.Base(path.Dir(solfile)))) + f.WriteString("import hex \"github.com/tmthrgd/go-hex\"\n\n") + + for _, c := range resp.Objects { + code := c.Contract.Evm.Bytecode.Object + if code == "" { + code = c.Contract.EWasm.Wasm + } + f.WriteString(fmt.Sprintf("var Bytecode_%s = hex.MustDecodeString(\"%s\")\n", + c.Objectname, code)) + if c.Contract.Evm.DeployedBytecode.Object != "" { + f.WriteString(fmt.Sprintf("var DeployedBytecode_%s = hex.MustDecodeString(\"%s\")\n", + c.Objectname, c.Contract.Evm.DeployedBytecode.Object)) + } + f.WriteString(fmt.Sprintf("var Abi_%s = []byte(`%s`)\n", + c.Objectname, c.Contract.Abi)) + } + } + } + } +} diff --git a/cmd/burrow/main.go b/cmd/burrow/main.go index ad0132128..3185ec495 100644 --- a/cmd/burrow/main.go +++ b/cmd/burrow/main.go @@ -84,6 +84,9 @@ func burrow(output commands.Output) *cli.Cli { app.Command("abi", "List, decode and encode using ABI", commands.Abi(output)) + app.Command("compile", "Compile solidity files embedding the compilation results as a fixture in a Go file", + commands.Compile(output)) + return app } diff --git a/deploy/compile/solgo/main.go b/deploy/compile/solgo/main.go deleted file mode 100644 index d666763fa..000000000 --- a/deploy/compile/solgo/main.go +++ /dev/null @@ -1,69 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "os" - "path" - - "github.com/hyperledger/burrow/deploy/compile" - "github.com/hyperledger/burrow/logging" -) - -func main() { - wasmPtr := flag.Bool("wasm", false, "Use solang rather than solc") - flag.Parse() - - for _, solfile := range flag.Args() { - var resp *compile.Response - var err error - - if *wasmPtr { - resp, err = compile.WASM(solfile, "", logging.NewNoopLogger()) - if err != nil { - fmt.Printf("failed compile solidity to wasm: %v\n", err) - os.Exit(1) - } - } else { - resp, err = compile.EVM(solfile, false, "", nil, logging.NewNoopLogger()) - if err != nil { - fmt.Printf("failed compile solidity: %v\n", err) - os.Exit(1) - } - } - - if resp.Error != "" { - fmt.Print(resp.Error) - os.Exit(1) - } - - if resp.Warning != "" { - fmt.Print(resp.Warning) - os.Exit(1) - } - - f, err := os.Create(solfile + ".go") - if err != nil { - fmt.Printf("failed to create go file: %v\n", err) - os.Exit(1) - } - - f.WriteString(fmt.Sprintf("package %s\n\n", path.Base(path.Dir(solfile)))) - f.WriteString("import hex \"github.com/tmthrgd/go-hex\"\n\n") - - for _, c := range resp.Objects { - code := c.Contract.Evm.Bytecode.Object - if code == "" { - code = c.Contract.EWasm.Wasm - } - f.WriteString(fmt.Sprintf("var Bytecode_%s = hex.MustDecodeString(\"%s\")\n", - c.Objectname, code)) - if c.Contract.Evm.DeployedBytecode.Object != "" { - f.WriteString(fmt.Sprintf("var DeployedBytecode_%s = hex.MustDecodeString(\"%s\")\n", - c.Objectname, c.Contract.Evm.DeployedBytecode.Object)) - } - f.WriteString(fmt.Sprintf("var Abi_%s = []byte(`%s`)\n", - c.Objectname, c.Contract.Abi)) - } - } -} diff --git a/execution/exec/block_execution.go b/execution/exec/block_execution.go index ad664ba36..0a445f247 100644 --- a/execution/exec/block_execution.go +++ b/execution/exec/block_execution.go @@ -9,7 +9,9 @@ import ( "github.com/hyperledger/burrow/txs" ) -func EventStringBlockExecution(height uint64) string { return fmt.Sprintf("Execution/Block/%v", height) } +func EventStringBlockExecution(height uint64) string { + return fmt.Sprintf("Execution/Block/%v", height) +} // Write out TxExecutions parenthetically func (be *BlockExecution) StreamEvents() []*StreamEvent { diff --git a/project/history.go b/project/history.go index 6265a6352..15d7cdcb2 100644 --- a/project/history.go +++ b/project/history.go @@ -47,7 +47,10 @@ func FullVersion() string { // To cut a new release add a release to the front of this slice then run the // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). - MustDeclareReleases( + MustDeclareReleases("", + `### Added +- [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile' +`, "0.30.3 - 2020-03-13", `### Added - [TS] Default ts client interface implementation From 5a2ae89f1d5a1ea8527948b656eb4e68c1c99efd Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Sun, 5 Apr 2020 21:12:11 +0100 Subject: [PATCH 070/185] Build a burrow debug binary and include it in the docker image with the name 'burrow-debug' Signed-off-by: Silas Davis --- Dockerfile | 3 ++- Makefile | 23 ++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 42a00fc9a..df7324a17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM ethereum/solc:0.5.12 as solc-builder # We use a multistage build to avoid bloating our deployment image with build dependencies FROM golang:1.13-alpine3.11 as builder -RUN apk add --no-cache --update git bash make +RUN apk add --no-cache --update git bash make musl-dev gcc libc6-compat ARG REPO=/src/burrow COPY . $REPO @@ -34,6 +34,7 @@ WORKDIR $BURROW_PATH # Copy binaries built in previous stage COPY --from=builder /src/burrow/bin/burrow $INSTALL_BASE/ +COPY --from=builder /src/burrow/bin/burrow-debug $INSTALL_BASE/ COPY --from=solc-builder /usr/bin/solc $INSTALL_BASE/ # Expose ports for 26656:peer; 26658:info; 10997:grpc diff --git a/Makefile b/Makefile index 4c578e7f5..86467fa8f 100644 --- a/Makefile +++ b/Makefile @@ -126,7 +126,7 @@ commit_hash: # build all targets in github.com/hyperledger/burrow .PHONY: build -build: check build_burrow +build: check build_burrow build_burrow_debug # build all targets in github.com/hyperledger/burrow with checks for race conditions .PHONY: build_race @@ -135,19 +135,24 @@ build_race: check build_race_db # build burrow and vent .PHONY: build_burrow build_burrow: commit_hash - go build -ldflags "-extldflags '-static' \ + go build $(BURROW_BUILD_FLAGS) -ldflags "-extldflags '-static' \ -X github.com/hyperledger/burrow/project.commit=$(shell cat commit_hash.txt) \ -X github.com/hyperledger/burrow/project.date=$(shell date '+%Y-%m-%d')" \ - -o ${REPO}/bin/burrow ./cmd/burrow + -o ${REPO}/bin/burrow$(BURROW_BUILD_SUFFIX) ./cmd/burrow # With the sqlite tag - enabling Vent sqlite adapter support, but building a CGO binary .PHONY: build_burrow_sqlite -build_burrow_sqlite: commit_hash - go build -tags sqlite \ - -ldflags "-extldflags '-static' \ - -X github.com/hyperledger/burrow/project.commit=$(shell cat commit_hash.txt) \ - -X github.com/hyperledger/burrow/project.date=$(shell date -I)" \ - -o ${REPO}/bin/burrow-vent-sqlite ./cmd/burrow +build_burrow_sqlite: export BURROW_BUILD_SUFFIX=-vent-sqlite +build_burrow_sqlite: export BURROW_BUILD_FLAGS=-tags sqlite +build_burrow_sqlite: + $(MAKE) build_burrow + +# Builds a binary suitable for delve line-by-line debugging through CGO with optimisations (-N) and inling (-l) disabled +.PHONY: build_burrow_debug +build_burrow_debug: export BURROW_BUILD_SUFFIX=-debug +build_burrow_debug: export BURROW_BUILD_FLAGS=-gcflags "all=-N -l" +build_burrow_debug: + $(MAKE) build_burrow .PHONY: install install: build_burrow From 1fbf55a90ffda540f2e5ec1708cf7f1145c4db6c Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Sun, 5 Apr 2020 22:19:13 +0100 Subject: [PATCH 071/185] Release 0.30.3 Signed-off-by: Silas Davis --- CHANGELOG.md | 3 ++- NOTES.md | 1 + project/history.go | 5 +---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75f0a6bb0..e8fd71b0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog -## [0.30.3] - 2020-03-13 +## [0.30.3] - 2020-04-05 ### Added +- [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile' - [TS] Default ts client interface implementation diff --git a/NOTES.md b/NOTES.md index 9d2ae0111..5d8ce29fa 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,4 @@ ### Added +- [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile' - [TS] Default ts client interface implementation diff --git a/project/history.go b/project/history.go index 15d7cdcb2..fc5ff0c45 100644 --- a/project/history.go +++ b/project/history.go @@ -47,12 +47,9 @@ func FullVersion() string { // To cut a new release add a release to the front of this slice then run the // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). - MustDeclareReleases("", + MustDeclareReleases("0.30.3 - 2020-04-05", `### Added - [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile' -`, - "0.30.3 - 2020-03-13", - `### Added - [TS] Default ts client interface implementation `, "0.30.2 - 2020-03-13", From cdfd314fb876ae8d1082cfea26863b1d23bdb09e Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Sun, 12 Apr 2020 17:45:27 +0100 Subject: [PATCH 072/185] fix typescript import name Signed-off-by: Gregory Hill --- js/src/lib/contracts/contract.ts | 2 +- js/src/lib/contracts/event.ts | 2 +- js/src/lib/contracts/function.ts | 2 +- js/src/lib/contracts/manager.ts | 2 +- js/src/lib/events.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/src/lib/contracts/contract.ts b/js/src/lib/contracts/contract.ts index 215a7bcb3..1d1d522c8 100644 --- a/js/src/lib/contracts/contract.ts +++ b/js/src/lib/contracts/contract.ts @@ -1,6 +1,6 @@ import { SolidityEvent } from './event'; import { SolidityFunction, Handler } from './function'; -import { Burrow } from '../Burrow'; +import { Burrow } from '../burrow'; import { Function, Event } from 'solc'; type FunctionOrEvent = Function | Event; diff --git a/js/src/lib/contracts/event.ts b/js/src/lib/contracts/event.ts index b4d3f373b..ccd9d189b 100644 --- a/js/src/lib/contracts/event.ts +++ b/js/src/lib/contracts/event.ts @@ -2,7 +2,7 @@ import * as utils from '../utils/utils'; import * as coder from 'ethereumjs-abi'; import * as convert from '../utils/convert'; import sha3 from '../utils/sha3'; -import { Burrow, Error } from '../Burrow'; +import { Burrow, Error } from '../burrow'; import { LogEvent } from '../../../proto/exec_pb' import { Event, EventInput } from 'solc'; diff --git a/js/src/lib/contracts/function.ts b/js/src/lib/contracts/function.ts index 467f737e0..ece2c65c7 100644 --- a/js/src/lib/contracts/function.ts +++ b/js/src/lib/contracts/function.ts @@ -5,7 +5,7 @@ import * as grpc from 'grpc'; import sha3 from '../utils/sha3'; import { TxInput, CallTx } from '../../../proto/payload_pb'; import { TxExecution, Result } from '../../../proto/exec_pb'; -import { Burrow, Error } from '../Burrow'; +import { Burrow, Error } from '../burrow'; import { Envelope } from '../../../proto/txs_pb'; import { Function, FunctionInput, FunctionOutput } from 'solc'; diff --git a/js/src/lib/contracts/manager.ts b/js/src/lib/contracts/manager.ts index 9f5bd2858..39440808e 100644 --- a/js/src/lib/contracts/manager.ts +++ b/js/src/lib/contracts/manager.ts @@ -1,5 +1,5 @@ import { Contract, Handlers } from './contract'; -import { Burrow } from '../Burrow'; +import { Burrow } from '../burrow'; import { GetMetadataParam } from '../../../proto/rpcquery_pb'; import { Function, Event } from 'solc'; diff --git a/js/src/lib/events.ts b/js/src/lib/events.ts index 14b3513fa..1495ff8f5 100644 --- a/js/src/lib/events.ts +++ b/js/src/lib/events.ts @@ -1,7 +1,7 @@ import { ExecutionEventsClient } from '../../proto/rpcevents_grpc_pb'; import { BlocksRequest, BlockRange, Bound, EventsResponse } from '../../proto/rpcevents_pb'; import { LogEvent } from '../../proto/exec_pb'; -import { Error } from './Burrow'; +import { Error } from './burrow'; import * as grpc from 'grpc'; export type EventStream = grpc.ClientReadableStream; From a5c33596de3cd93750bc38441cc0834ef0b75130 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 13 Apr 2020 18:05:11 +0100 Subject: [PATCH 073/185] Add OpcodeBitset as ahead-of-time lookup for whether a code symbol is a code or data in order to test whether a JUMPDEST symbol is a valid jump destination or just push data Signed-off-by: Silas Davis --- execution/contexts/call_context.go | 2 +- execution/evm/evm_test.go | 8 +++--- execution/native/account.go | 24 +++++++++++++--- execution/native/account_test.go | 46 +++++++++++++++++++++++++++--- protobuf/acm.proto | 2 ++ 5 files changed, 69 insertions(+), 13 deletions(-) diff --git a/execution/contexts/call_context.go b/execution/contexts/call_context.go index 6a31fe565..92ab28228 100644 --- a/execution/contexts/call_context.go +++ b/execution/contexts/call_context.go @@ -231,7 +231,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error } else { ctx.Logger.TraceMsg("Successful execution") if createContract { - err := native.InitCode(txCache, callee, ret) + err := native.InitEVMCode(txCache, callee, ret) if err != nil { return err } diff --git a/execution/evm/evm_test.go b/execution/evm/evm_test.go index e643f6b4a..4279e21a1 100644 --- a/execution/evm/evm_test.go +++ b/execution/evm/evm_test.go @@ -925,7 +925,7 @@ func TestEVM(t *testing.T) { // Not needed for this test (since contract code is passed as argument to vm), but this is what an execution // framework must do - err = native.InitCode(st, account2, contractCode) + err = native.InitEVMCode(st, account2, contractCode) require.NoError(t, err) // Input is the function hash of `get()` @@ -1273,9 +1273,9 @@ func TestEVM(t *testing.T) { contractCode, err := vm.Execute(st, blockchain, eventSink, params, code) require.NoError(t, err) - err = native.InitCode(st, account1, contractCode) + err = native.InitEVMCode(st, account1, contractCode) require.NoError(t, err) - err = native.InitCode(st, account2, contractCode) + err = native.InitEVMCode(st, account2, contractCode) require.NoError(t, err) // keccak256 hash of 'callMeBack()' @@ -1480,7 +1480,7 @@ func makeAccountWithCode(t testing.TB, st acmstate.ReaderWriter, name string, co address := native.AddressFromName(name) err := native.CreateAccount(st, address) require.NoError(t, err) - err = native.InitCode(st, address, code) + err = native.InitEVMCode(st, address, code) require.NoError(t, err) addToBalance(t, st, address, 9999999) return address diff --git a/execution/native/account.go b/execution/native/account.go index fd073aae2..c56c89b7f 100644 --- a/execution/native/account.go +++ b/execution/native/account.go @@ -8,7 +8,9 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/deploy/compile" "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/evm/asm" "github.com/hyperledger/burrow/txs/payload" + bitset "github.com/tmthrgd/go-bitset" "golang.org/x/crypto/sha3" ) @@ -29,15 +31,15 @@ func CreateAccount(st acmstate.ReaderWriter, address crypto.Address) error { return st.UpdateAccount(&acm.Account{Address: address}) } -func InitCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) error { - return initCode(st, address, nil, code) +func InitEVMCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) error { + return initEVMCode(st, address, nil, code) } func InitChildCode(st acmstate.ReaderWriter, address crypto.Address, parent crypto.Address, code []byte) error { - return initCode(st, address, &parent, code) + return initEVMCode(st, address, &parent, code) } -func initCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.Address, code []byte) error { +func initEVMCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.Address, code []byte) error { acc, err := mustAccount(st, address) if err != nil { return err @@ -48,6 +50,7 @@ func initCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.A } acc.EVMCode = code + acc.OpcodeBitset = opcodeBitset(code) // keccak256 hash of a contract's code hash := sha3.NewLegacyKeccak256() @@ -115,6 +118,19 @@ func codehashPermitted(codehash []byte, metamap []*acm.ContractMeta) bool { return false } +// If code[i] is an opcode (rather than PUSH data) then bitset.IsSet(i) will be true +func opcodeBitset(code []byte) bitset.Bitset { + bs := bitset.New(uint(len(code))) + for i := 0; i < len(code); i++ { + bs.Set(uint(i)) + symbol := asm.OpCode(code[i]) + if symbol >= asm.PUSH1 && symbol <= asm.PUSH32 { + i += int(symbol - asm.PUSH1 + 1) + } + } + return bs +} + func InitWASMCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) error { acc, err := mustAccount(st, address) if err != nil { diff --git a/execution/native/account_test.go b/execution/native/account_test.go index afadba0c9..a800a5bcb 100644 --- a/execution/native/account_test.go +++ b/execution/native/account_test.go @@ -2,16 +2,19 @@ package native import ( "fmt" + "reflect" "testing" "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" - "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/evm/asm" + "github.com/hyperledger/burrow/execution/evm/asm/bc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tmthrgd/go-bitset" ) func TestState_CreateAccount(t *testing.T) { @@ -26,7 +29,7 @@ func TestState_CreateAccount(t *testing.T) { st = acmstate.NewMemoryState() err = CreateAccount(st, address) require.NoError(t, err) - err = InitCode(st, address, []byte{1, 2, 3}) + err = InitEVMCode(st, address, []byte{1, 2, 3}) require.NoError(t, err) } @@ -81,8 +84,43 @@ func TestState_NewCache(t *testing.T) { require.Equal(t, errors.Codes.IllegalWrite, errors.GetCode(err)) } -func blockHashGetter(height uint64) []byte { - return binary.LeftPadWord256([]byte(fmt.Sprintf("block_hash_%d", height))).Bytes() +func TestOpcodeBitset(t *testing.T) { + tests := []struct { + name string + code []byte + bitset bitset.Bitset + }{ + { + name: "Only one real JUMPDEST", + code: bc.MustSplice(asm.PUSH2, 1, asm.JUMPDEST, asm.ADD, asm.JUMPDEST), + bitset: mkBitset("10011"), + }, + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := opcodeBitset(tt.code); !reflect.DeepEqual(got, tt.bitset) { + t.Errorf("opcodeBitset() = %v, want %v", got, tt.bitset) + } + }) + } +} + +func mkBitset(binaryString string) bitset.Bitset { + length := uint(len(binaryString)) + bs := bitset.New(length) + for i := uint(0); i < length; i++ { + switch binaryString[i] { + case '1': + bs.Set(i) + case '0': + case ' ': + i++ + default: + panic(fmt.Errorf("mkBitset() expects a string containing only 1s, 0s, and spaces")) + } + } + return bs } func addToBalance(t testing.TB, st acmstate.ReaderWriter, address crypto.Address, amt uint64) { diff --git a/protobuf/acm.proto b/protobuf/acm.proto index cd3eac389..a32a98f4b 100644 --- a/protobuf/acm.proto +++ b/protobuf/acm.proto @@ -42,6 +42,8 @@ message Account { // (from Solidity/EVM), they point to the original deployed account where the metadata is stored. // This original account is called the forebear. bytes Forebear = 10 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"]; + // A bitset of all the symbols in Code that are opcodes (i.e. actual code not PUSH data) + bytes OpcodeBitset = 12 [(gogoproto.casttype) = "github.com/tmthrgd/go-bitset.Bitset"]; } message ContractMeta { From e66a904a9fc23be4edcfd3ee99a7c2b1215c3ca5 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 13 Apr 2020 18:05:39 +0100 Subject: [PATCH 074/185] Update Account model with OpcodeBitset. Also upgrade protobuf related dependencies and Perlin life go mod hack Signed-off-by: Silas Davis --- acm/acm.pb.go | 129 +- go.mod | 12 +- go.sum | 31 +- js/proto/acm_pb.d.ts | 6 + js/proto/acm_pb.js | 192 +- js/proto/balance_pb.js | 29 +- js/proto/bcm_pb.js | 111 +- js/proto/crypto_pb.js | 92 +- js/proto/dump_pb.js | 169 +- js/proto/encoding_pb.js | 29 +- js/proto/errors_pb.js | 29 +- js/proto/exec_pb.js | 862 +++++--- .../gogo/protobuf/gogoproto/gogo_pb.js | 1 + .../tendermint/abci/types/types_pb.js | 1552 ++++++++----- .../tendermint/libs/common/types_pb.js | 57 +- js/proto/google/protobuf/descriptor_pb.js | 1912 +++++++++++------ js/proto/google/protobuf/timestamp_pb.js | 29 +- js/proto/keys_pb.js | 606 ++++-- js/proto/names_pb.js | 43 +- js/proto/payload_pb.js | 717 ++++--- js/proto/permission_pb.js | 154 +- js/proto/registry_pb.js | 43 +- js/proto/rpc_pb.js | 86 +- js/proto/rpcdump_pb.js | 22 +- js/proto/rpcevents_pb.js | 259 ++- js/proto/rpcquery_pb.js | 512 +++-- js/proto/rpctransact_pb.js | 104 +- js/proto/spec_pb.js | 86 +- js/proto/storage_pb.js | 29 +- js/proto/tendermint_pb.js | 71 +- js/proto/txs_pb.js | 128 +- js/proto/validator_pb.js | 39 +- 32 files changed, 5314 insertions(+), 2827 deletions(-) diff --git a/acm/acm.pb.go b/acm/acm.pb.go index 327221c1e..d8029fe34 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -16,6 +16,7 @@ import ( crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" permission "github.com/hyperledger/burrow/permission" + github_com_tmthrgd_go_bitset "github.com/tmthrgd/go-bitset" ) // Reference imports to suppress errors if they are not otherwise used. @@ -54,10 +55,12 @@ type Account struct { // The metadata is stored in the deployed account. When the deployed account creates new account // (from Solidity/EVM), they point to the original deployed account where the metadata is stored. // This original account is called the forebear. - Forebear *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,10,opt,name=Forebear,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Forebear,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Forebear *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,10,opt,name=Forebear,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Forebear,omitempty"` + // A bitset of all the symbols in Code that are opcodes (i.e. actual code not PUSH data) + OpcodeBitset github_com_tmthrgd_go_bitset.Bitset `protobuf:"bytes,12,opt,name=OpcodeBitset,proto3,casttype=github.com/tmthrgd/go-bitset.Bitset" json:"OpcodeBitset,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Account) Reset() { *m = Account{} } @@ -130,6 +133,13 @@ func (m *Account) GetContractMeta() []*ContractMeta { return nil } +func (m *Account) GetOpcodeBitset() github_com_tmthrgd_go_bitset.Bitset { + if m != nil { + return m.OpcodeBitset + } + return nil +} + func (*Account) XXX_MessageName() string { return "acm.Account" } @@ -194,39 +204,41 @@ func init() { proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } func init() { golang_proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } var fileDescriptor_49ed775bc0a6adf6 = []byte{ - // 506 bytes of a gzipped FileDescriptorProto + // 544 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x31, 0x6f, 0xd3, 0x40, - 0x18, 0xed, 0x35, 0x69, 0xe3, 0x5c, 0x22, 0x54, 0x6e, 0x3a, 0x65, 0x70, 0x4c, 0xa7, 0x08, 0x35, - 0x0e, 0x02, 0xb2, 0x84, 0x29, 0xae, 0xa8, 0x2a, 0x41, 0xa3, 0xe2, 0x4a, 0x45, 0xb0, 0x9d, 0xcf, - 0x1f, 0x89, 0xa5, 0xd8, 0x67, 0xce, 0x67, 0xc0, 0x3f, 0x81, 0x7f, 0xc0, 0xc8, 0x4f, 0x61, 0xcc, - 0xc8, 0x58, 0x31, 0x44, 0x28, 0xdd, 0xfa, 0x2b, 0x90, 0x2f, 0x8e, 0x71, 0x3a, 0x54, 0x82, 0x6e, - 0x79, 0x79, 0xef, 0x7b, 0xef, 0xdd, 0xdd, 0x67, 0xdc, 0x64, 0x3c, 0xb4, 0x63, 0x29, 0x94, 0x20, - 0x35, 0xc6, 0xc3, 0x4e, 0x7f, 0x1a, 0xa8, 0x59, 0xea, 0xd9, 0x5c, 0x84, 0x83, 0xa9, 0x98, 0x8a, - 0x81, 0xe6, 0xbc, 0xf4, 0x83, 0x46, 0x1a, 0xe8, 0x5f, 0xeb, 0x99, 0xce, 0x41, 0x0c, 0x32, 0x0c, - 0x92, 0x24, 0x10, 0x51, 0xf1, 0x4f, 0x9b, 0xcb, 0x2c, 0x56, 0x05, 0x7f, 0xf8, 0x75, 0x0f, 0x37, - 0xc6, 0x9c, 0x8b, 0x34, 0x52, 0x64, 0x82, 0x1b, 0x63, 0xdf, 0x97, 0x90, 0x24, 0x14, 0x59, 0xa8, - 0xd7, 0x76, 0x9e, 0x2f, 0x96, 0xdd, 0x9d, 0x5f, 0xcb, 0xee, 0x51, 0x25, 0x73, 0x96, 0xc5, 0x20, - 0xe7, 0xe0, 0x4f, 0x41, 0x0e, 0xbc, 0x54, 0x4a, 0xf1, 0x79, 0x50, 0x18, 0x16, 0xb3, 0xee, 0xc6, - 0x84, 0x0c, 0x71, 0xf3, 0x3c, 0xf5, 0xe6, 0x01, 0x7f, 0x05, 0x19, 0xdd, 0xb5, 0x50, 0xaf, 0xf5, - 0xf4, 0xa1, 0x5d, 0x88, 0x4b, 0xc2, 0xa9, 0xe7, 0x21, 0xee, 0x5f, 0x25, 0xe9, 0x60, 0xe3, 0x02, - 0x3e, 0xa6, 0x10, 0x71, 0xa0, 0x35, 0x0b, 0xf5, 0xea, 0x6e, 0x89, 0x09, 0xc5, 0x0d, 0x87, 0xcd, - 0x59, 0x4e, 0xd5, 0x35, 0xb5, 0x81, 0xe4, 0x31, 0x6e, 0xbc, 0xbc, 0x3c, 0x3b, 0x16, 0x3e, 0xd0, - 0x3d, 0x5d, 0xfe, 0xa0, 0x28, 0x6f, 0x38, 0x99, 0x02, 0x2e, 0x7c, 0x70, 0x37, 0x02, 0x72, 0x82, - 0x5b, 0xe7, 0xe5, 0xb5, 0x24, 0x74, 0x5f, 0x57, 0x33, 0xed, 0xca, 0x55, 0x15, 0x57, 0x52, 0x51, - 0x15, 0x3d, 0xab, 0x83, 0x64, 0x84, 0x8d, 0xb7, 0xe3, 0x8b, 0x75, 0x68, 0x43, 0x87, 0x9a, 0xb7, - 0x43, 0x6f, 0x96, 0x5d, 0x7c, 0x24, 0xc2, 0x40, 0x41, 0x18, 0xab, 0xcc, 0x2d, 0xf5, 0xc4, 0xc6, - 0x78, 0xc2, 0x54, 0xf0, 0x09, 0x26, 0x2c, 0x04, 0xda, 0xb2, 0x50, 0xaf, 0xe9, 0x3c, 0xb8, 0xa5, - 0xae, 0x28, 0xc8, 0x25, 0x36, 0xf2, 0xb9, 0x53, 0x96, 0xcc, 0xa8, 0xa1, 0xb3, 0x46, 0x45, 0x56, - 0xff, 0xee, 0xd7, 0xf1, 0x82, 0x88, 0xc9, 0xcc, 0x3e, 0x85, 0x2f, 0x79, 0xa7, 0xe4, 0x66, 0xd9, - 0x45, 0x7d, 0xb7, 0xf4, 0x22, 0x43, 0xdc, 0x3e, 0x16, 0x91, 0x92, 0x8c, 0xab, 0x33, 0x50, 0x8c, - 0x36, 0xad, 0x9a, 0x7e, 0xa7, 0x7c, 0xed, 0xaa, 0x84, 0xbb, 0x25, 0x23, 0xaf, 0xb1, 0x71, 0x22, - 0x24, 0x78, 0xc0, 0x24, 0xc5, 0xba, 0xce, 0x93, 0x7f, 0x5e, 0x94, 0xd2, 0x61, 0x54, 0xff, 0xf6, - 0xbd, 0xbb, 0x73, 0x78, 0x85, 0xb6, 0xbb, 0x90, 0x37, 0x95, 0x33, 0xaf, 0x37, 0x72, 0xf8, 0x5f, - 0x67, 0xae, 0x1c, 0xf7, 0x1d, 0x6e, 0xe7, 0xd6, 0x3e, 0x53, 0x4c, 0xdb, 0xee, 0xde, 0xc7, 0x76, - 0xcb, 0x2a, 0xdf, 0xdb, 0x0d, 0xd6, 0x7b, 0xdb, 0x74, 0x4b, 0xec, 0xbc, 0x58, 0xac, 0x4c, 0xf4, - 0x73, 0x65, 0xa2, 0xab, 0x95, 0x89, 0x7e, 0xaf, 0x4c, 0xf4, 0xe3, 0xda, 0x44, 0x8b, 0x6b, 0x13, - 0xbd, 0x7f, 0x74, 0x77, 0x24, 0xe3, 0xa1, 0xb7, 0xaf, 0x3f, 0xd5, 0x67, 0x7f, 0x02, 0x00, 0x00, - 0xff, 0xff, 0xa2, 0x2c, 0x48, 0xa4, 0x0b, 0x04, 0x00, 0x00, + 0x18, 0xed, 0x35, 0x69, 0xe3, 0x5c, 0x2c, 0x54, 0x6e, 0x3a, 0x65, 0xb0, 0x43, 0x19, 0x88, 0x50, + 0xe3, 0x20, 0x20, 0x4b, 0x98, 0xe2, 0x8a, 0xaa, 0x52, 0x69, 0x28, 0xae, 0x54, 0x04, 0xdb, 0xf9, + 0x7c, 0x38, 0x96, 0x62, 0x9f, 0x39, 0x9f, 0x01, 0xff, 0x13, 0x46, 0x7e, 0x0a, 0x63, 0x46, 0x26, + 0x54, 0x31, 0x58, 0x28, 0xdd, 0xfa, 0x13, 0x98, 0x90, 0x2f, 0x8e, 0x71, 0x3a, 0x54, 0x02, 0xb6, + 0x7c, 0x79, 0xef, 0x7b, 0xef, 0xf9, 0xdd, 0x1d, 0x6c, 0x13, 0x1a, 0x5a, 0xb1, 0xe0, 0x92, 0xa3, + 0x06, 0xa1, 0x61, 0x77, 0xe0, 0x07, 0x72, 0x96, 0xba, 0x16, 0xe5, 0xe1, 0xd0, 0xe7, 0x3e, 0x1f, + 0x2a, 0xcc, 0x4d, 0xdf, 0xa9, 0x49, 0x0d, 0xea, 0xd7, 0x6a, 0xa7, 0xbb, 0x17, 0x33, 0x11, 0x06, + 0x49, 0x12, 0xf0, 0xa8, 0xfc, 0x47, 0xa7, 0x22, 0x8b, 0x65, 0x89, 0xef, 0x7f, 0xdf, 0x81, 0xad, + 0x09, 0xa5, 0x3c, 0x8d, 0x24, 0x9a, 0xc2, 0xd6, 0xc4, 0xf3, 0x04, 0x4b, 0x12, 0x0c, 0x7a, 0xa0, + 0xaf, 0xdb, 0x4f, 0x17, 0xb9, 0xb9, 0xf5, 0x23, 0x37, 0x0f, 0x6a, 0x9e, 0xb3, 0x2c, 0x66, 0x62, + 0xce, 0x3c, 0x9f, 0x89, 0xa1, 0x9b, 0x0a, 0xc1, 0x3f, 0x0e, 0x4b, 0xc1, 0x72, 0xd7, 0x59, 0x8b, + 0xa0, 0x11, 0x6c, 0x9f, 0xa5, 0xee, 0x3c, 0xa0, 0x27, 0x2c, 0xc3, 0xdb, 0x3d, 0xd0, 0xef, 0x3c, + 0xbe, 0x6b, 0x95, 0xe4, 0x0a, 0xb0, 0x9b, 0x85, 0x89, 0xf3, 0x87, 0x89, 0xba, 0x50, 0x3b, 0x67, + 0xef, 0x53, 0x16, 0x51, 0x86, 0x1b, 0x3d, 0xd0, 0x6f, 0x3a, 0xd5, 0x8c, 0x30, 0x6c, 0xd9, 0x64, + 0x4e, 0x0a, 0xa8, 0xa9, 0xa0, 0xf5, 0x88, 0x1e, 0xc2, 0xd6, 0xf3, 0x8b, 0xd3, 0x43, 0xee, 0x31, + 0xbc, 0xa3, 0xc2, 0xef, 0x95, 0xe1, 0x35, 0x3b, 0x93, 0x8c, 0x72, 0x8f, 0x39, 0x6b, 0x02, 0x3a, + 0x82, 0x9d, 0xb3, 0xaa, 0x96, 0x04, 0xef, 0xaa, 0x68, 0x86, 0x55, 0xab, 0xaa, 0xac, 0xa4, 0xc6, + 0x2a, 0x73, 0xd6, 0x17, 0xd1, 0x18, 0x6a, 0xaf, 0x27, 0xe7, 0x2b, 0xd3, 0x96, 0x32, 0x35, 0x6e, + 0x9a, 0x5e, 0xe7, 0x26, 0x3c, 0xe0, 0x61, 0x20, 0x59, 0x18, 0xcb, 0xcc, 0xa9, 0xf8, 0xc8, 0x82, + 0x70, 0x4a, 0x64, 0xf0, 0x81, 0x4d, 0x49, 0xc8, 0x70, 0xa7, 0x07, 0xfa, 0x6d, 0xfb, 0xce, 0x0d, + 0x76, 0x8d, 0x81, 0x2e, 0xa0, 0x56, 0xec, 0x1d, 0x93, 0x64, 0x86, 0x35, 0xe5, 0x35, 0x2e, 0xbd, + 0x06, 0xb7, 0x9f, 0x8e, 0x1b, 0x44, 0x44, 0x64, 0xd6, 0x31, 0xfb, 0x54, 0x64, 0x4a, 0xae, 0x73, + 0x13, 0x0c, 0x9c, 0x4a, 0x0b, 0x8d, 0xa0, 0x7e, 0xc8, 0x23, 0x29, 0x08, 0x95, 0xa7, 0x4c, 0x12, + 0xdc, 0xee, 0x35, 0xd4, 0x39, 0x15, 0xd7, 0xae, 0x0e, 0x38, 0x1b, 0x34, 0xf4, 0x02, 0x6a, 0x47, + 0x5c, 0x30, 0x97, 0x11, 0x81, 0xa1, 0x8a, 0xf3, 0xe8, 0xaf, 0x2f, 0x4a, 0xa5, 0x80, 0x4e, 0xa0, + 0xfe, 0x32, 0x2e, 0xea, 0xb2, 0x03, 0x99, 0x30, 0x89, 0x75, 0xa5, 0xf8, 0xe0, 0x57, 0x6e, 0xde, + 0xaf, 0x29, 0xca, 0x50, 0xce, 0x84, 0xef, 0x0d, 0x7d, 0x3e, 0x70, 0x15, 0xcf, 0x5a, 0xd1, 0x9d, + 0x8d, 0xe5, 0x71, 0xf3, 0xf3, 0x17, 0x73, 0x6b, 0xff, 0x12, 0x6c, 0x7e, 0x18, 0x7a, 0x55, 0x2b, + 0x70, 0x75, 0xbd, 0x47, 0xff, 0x54, 0x60, 0xad, 0xbb, 0x37, 0x50, 0x2f, 0xa4, 0x3d, 0x22, 0x89, + 0x92, 0xdd, 0xfe, 0x1f, 0xd9, 0x0d, 0xa9, 0xe2, 0x11, 0xac, 0x67, 0xf5, 0x08, 0xda, 0x4e, 0x35, + 0xdb, 0xcf, 0x16, 0x4b, 0x03, 0x7c, 0x5b, 0x1a, 0xe0, 0x72, 0x69, 0x80, 0x9f, 0x4b, 0x03, 0x7c, + 0xbd, 0x32, 0xc0, 0xe2, 0xca, 0x00, 0x6f, 0xef, 0xdd, 0x6e, 0x49, 0x68, 0xe8, 0xee, 0xaa, 0x77, + 0xff, 0xe4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x9e, 0x43, 0x9f, 0x58, 0x04, 0x00, 0x00, } func (m *Account) Marshal() (dAtA []byte, err error) { @@ -253,6 +265,13 @@ func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.OpcodeBitset) > 0 { + i -= len(m.OpcodeBitset) + copy(dAtA[i:], m.OpcodeBitset) + i = encodeVarintAcm(dAtA, i, uint64(len(m.OpcodeBitset))) + i-- + dAtA[i] = 0x62 + } if len(m.NativeName) > 0 { i -= len(m.NativeName) copy(dAtA[i:], m.NativeName) @@ -462,6 +481,10 @@ func (m *Account) Size() (n int) { if l > 0 { n += 1 + l + sovAcm(uint64(l)) } + l = len(m.OpcodeBitset) + if l > 0 { + n += 1 + l + sovAcm(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -860,6 +883,40 @@ func (m *Account) Unmarshal(dAtA []byte) error { } m.NativeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OpcodeBitset", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAcm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAcm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthAcm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OpcodeBitset = append(m.OpcodeBitset[:0], dAtA[iNdEx:postIndex]...) + if m.OpcodeBitset == nil { + m.OpcodeBitset = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAcm(dAtA[iNdEx:]) diff --git a/go.mod b/go.mod index 8a85db160..191f9814c 100644 --- a/go.mod +++ b/go.mod @@ -2,10 +2,6 @@ module github.com/hyperledger/burrow go 1.12 -// replace github.com/perlin-network/life => github.com/silasdavis/life master -// Avoid downstream pain due to unversioned go-wagon dep: -replace github.com/perlin-network/life => github.com/silasdavis/life v0.0.0-20191009191257-e9c2a5fdbc96 - require ( github.com/BurntSushi/toml v0.3.1 github.com/OneOfOne/xxhash v1.2.5 @@ -33,7 +29,7 @@ require ( github.com/mattn/go-colorable v0.1.2 // indirect github.com/mattn/go-sqlite3 v1.10.0 github.com/monax/relic v2.0.0+incompatible - github.com/perlin-network/life v0.0.0-20190803100833-89b850c02992 + github.com/perlin-network/life v0.0.0-20191203030451-05c0e0f7eaea github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v0.9.3 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 @@ -49,7 +45,13 @@ require ( github.com/tendermint/tendermint v0.33.1 github.com/tendermint/tm-db v0.4.0 github.com/test-go/testify v1.1.4 + github.com/tmthrgd/atomics v0.0.0-20190904060638-dc7a5fcc7e0d // indirect + github.com/tmthrgd/go-bitset v0.0.0-20190904054048-394d9a556c05 + github.com/tmthrgd/go-bitwise v0.0.0-20190904053232-1430ee983fca // indirect + github.com/tmthrgd/go-byte-test v0.0.0-20190904060354-2794345b9929 // indirect github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 + github.com/tmthrgd/go-memset v0.0.0-20190904060434-6fb7a21f88f1 // indirect + github.com/tmthrgd/go-popcount v0.0.0-20190904054823-afb1ace8b04f // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.1.0 diff --git a/go.sum b/go.sum index c341c35c5..5db305adf 100644 --- a/go.sum +++ b/go.sum @@ -79,8 +79,8 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-interpreter/wagon v0.6.1-0.20190923081222-01d3d3376951 h1:2zNSjTofVE4/LGSaJpKB4oYGD5nZsEUdRXzFaFykJzI= -github.com/go-interpreter/wagon v0.6.1-0.20190923081222-01d3d3376951/go.mod h1:5+b/MBYkclRZngKF5s6qrgWxSLgE9F5dFdO1hAueZLc= +github.com/go-interpreter/wagon v0.6.0 h1:BBxDxjiJiHgw9EdkYXAWs8NHhwnazZ5P2EWBW5hFNWw= +github.com/go-interpreter/wagon v0.6.0/go.mod h1:5+b/MBYkclRZngKF5s6qrgWxSLgE9F5dFdO1hAueZLc= 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= @@ -197,6 +197,8 @@ github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/perlin-network/life v0.0.0-20191203030451-05c0e0f7eaea h1:okKoivlkNRRLqXraEtatHfEhW+D71QTwkaj+4n4M2Xc= +github.com/perlin-network/life v0.0.0-20191203030451-05c0e0f7eaea/go.mod h1:3KEU5Dm8MAYWZqity880wOFJ9PhQjyKVZGwAEfc5Q4E= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -225,8 +227,6 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= 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/silasdavis/life v0.0.0-20191009191257-e9c2a5fdbc96 h1:h+9noX9J+uzeBNUUc0tQcEHyvt4SreDTyZMdBIHE5ac= -github.com/silasdavis/life v0.0.0-20191009191257-e9c2a5fdbc96/go.mod h1:kRj+/HyxhCbkocbIvcK9ikQR/OQzi43RdJ0zWv0hhE8= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -278,8 +278,20 @@ github.com/tendermint/tm-db v0.4.0/go.mod h1:+Cwhgowrf7NBGXmsqFMbwEtbo80XmyrlY5J github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmthrgd/atomics v0.0.0-20190904060638-dc7a5fcc7e0d h1:2QXSQjy/gDm0QeP9G9NaO9Hm2Cl1LAle4ZV0JeYK7XY= +github.com/tmthrgd/atomics v0.0.0-20190904060638-dc7a5fcc7e0d/go.mod h1:J2+dTgaX/1g3PkyL6sLBglBWfaLmAp5bQbRhSfKw9XI= +github.com/tmthrgd/go-bitset v0.0.0-20190904054048-394d9a556c05 h1:5jOF3BEex8XyBKMbaDUN1SiPQJRAKVuP24/sbwC2aWA= +github.com/tmthrgd/go-bitset v0.0.0-20190904054048-394d9a556c05/go.mod h1:SooM96OIpihI7iMZhVGbpiiO9Qevqv8vXxHlwNtefd4= +github.com/tmthrgd/go-bitwise v0.0.0-20190904053232-1430ee983fca h1:Ns4/7EvYZ7FxKiKnEMkMMAPtoR/ifUgRsvk7lzlOtPY= +github.com/tmthrgd/go-bitwise v0.0.0-20190904053232-1430ee983fca/go.mod h1:Ba4ek/h+sJUzTQ03ZGD1r0lazhxd7CBoEQzFk/icxxU= +github.com/tmthrgd/go-byte-test v0.0.0-20190904060354-2794345b9929 h1:EV5x10oS2/QrR1RwniFQW1i22d/iyX/emvvMjHT32CA= +github.com/tmthrgd/go-byte-test v0.0.0-20190904060354-2794345b9929/go.mod h1:MEz1Lt0fxSL/ZgE7VN3yUJV0sP5I5aYecYLd9y/viEs= github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 h1:IlK6taZBmMKDcGfMqIlD4la5BlekNrrLsdtCMSn6aJI= github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= +github.com/tmthrgd/go-memset v0.0.0-20190904060434-6fb7a21f88f1 h1:KfSLDmc6rrLHr//urKbNApu51nt2AzdrwBCxqq0gRlk= +github.com/tmthrgd/go-memset v0.0.0-20190904060434-6fb7a21f88f1/go.mod h1:xUkvcKF3VBDKFmmqCtW333lognWBHzSScj4fgjVB0Ek= +github.com/tmthrgd/go-popcount v0.0.0-20190904054823-afb1ace8b04f h1:Phf2p9+twoHct5ZjSTrI8K7iWeSxO4x1p5pShTl0J00= +github.com/tmthrgd/go-popcount v0.0.0-20190904054823-afb1ace8b04f/go.mod h1:FcUQfrsAsSSqM3n9xf4EtPzB8tWzt58/y0AV+wNNM8Q= github.com/twitchyliquid64/golang-asm v0.0.0-20190126203739-365674df15fc h1:RTUQlKzoZZVG3umWNzOYeFecQLIh+dbxXvJp1zPQJTI= github.com/twitchyliquid64/golang-asm v0.0.0-20190126203739-365674df15fc/go.mod h1:NoCfSFWosfqMqmmD7hApkirIK9ozpHjxRnRxs1l413A= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= @@ -319,7 +331,6 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/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-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -341,9 +352,8 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190825160603-fb81701db80f h1:LCxigP8q3fPRGNVYndYsyHnF0zRrvcoVwZMfb8iQZe4= golang.org/x/sys v0.0.0-20190825160603-fb81701db80f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -355,9 +365,10 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.0 h1:Tfd7cKwKbFRsI8RMAD3oqqw7JPFRrvFlOsfbgVkjOOw= +google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= @@ -373,8 +384,6 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= diff --git a/js/proto/acm_pb.d.ts b/js/proto/acm_pb.d.ts index c5dff84aa..d127e65be 100644 --- a/js/proto/acm_pb.d.ts +++ b/js/proto/acm_pb.d.ts @@ -56,6 +56,11 @@ export class Account extends jspb.Message { getForebear_asB64(): string; setForebear(value: Uint8Array | string): void; + getOpcodebitset(): Uint8Array | string; + getOpcodebitset_asU8(): Uint8Array; + getOpcodebitset_asB64(): string; + setOpcodebitset(value: Uint8Array | string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Account.AsObject; static toObject(includeInstance: boolean, msg: Account): Account.AsObject; @@ -79,6 +84,7 @@ export namespace Account { codehash: Uint8Array | string, contractmetaList: Array, forebear: Uint8Array | string, + opcodebitset: Uint8Array | string, } } diff --git a/js/proto/acm_pb.js b/js/proto/acm_pb.js index d68eb3976..828758869 100644 --- a/js/proto/acm_pb.js +++ b/js/proto/acm_pb.js @@ -1,3 +1,4 @@ +// source: acm.proto /** * @fileoverview * @enhanceable @@ -73,13 +74,15 @@ proto.acm.Account.repeatedFields_ = [9]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.acm.Account.prototype.toObject = function(opt_includeInstance) { @@ -89,8 +92,8 @@ proto.acm.Account.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.acm.Account} msg The msg instance to transform. * @return {!Object} @@ -109,7 +112,8 @@ proto.acm.Account.toObject = function(includeInstance, msg) { codehash: msg.getCodehash_asB64(), contractmetaList: jspb.Message.toObjectList(msg.getContractmetaList(), proto.acm.ContractMeta.toObject, includeInstance), - forebear: msg.getForebear_asB64() + forebear: msg.getForebear_asB64(), + opcodebitset: msg.getOpcodebitset_asB64() }; if (includeInstance) { @@ -193,6 +197,10 @@ proto.acm.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setForebear(value); break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpcodebitset(value); + break; default: reader.skipField(); break; @@ -302,6 +310,13 @@ proto.acm.Account.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getOpcodebitset_asU8(); + if (f.length > 0) { + writer.writeBytes( + 12, + f + ); + } }; @@ -338,9 +353,12 @@ proto.acm.Account.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -354,17 +372,21 @@ proto.acm.Account.prototype.getPublickey = function() { }; -/** @param {?proto.crypto.PublicKey|undefined} value */ +/** + * @param {?proto.crypto.PublicKey|undefined} value + * @return {!proto.acm.Account} returns this +*/ proto.acm.Account.prototype.setPublickey = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.acm.Account} returns this */ proto.acm.Account.prototype.clearPublickey = function() { - this.setPublickey(undefined); + return this.setPublickey(undefined); }; @@ -386,9 +408,12 @@ proto.acm.Account.prototype.getSequence = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setSequence = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -401,9 +426,12 @@ proto.acm.Account.prototype.getBalance = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setBalance = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -440,9 +468,12 @@ proto.acm.Account.prototype.getEvmcode_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setEvmcode = function(value) { - jspb.Message.setProto3BytesField(this, 5, value); + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -456,17 +487,21 @@ proto.acm.Account.prototype.getPermissions = function() { }; -/** @param {?proto.permission.AccountPermissions|undefined} value */ +/** + * @param {?proto.permission.AccountPermissions|undefined} value + * @return {!proto.acm.Account} returns this +*/ proto.acm.Account.prototype.setPermissions = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.acm.Account} returns this */ proto.acm.Account.prototype.clearPermissions = function() { - this.setPermissions(undefined); + return this.setPermissions(undefined); }; @@ -512,9 +547,12 @@ proto.acm.Account.prototype.getWasmcode_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setWasmcode = function(value) { - jspb.Message.setProto3BytesField(this, 7, value); + return jspb.Message.setProto3BytesField(this, 7, value); }; @@ -527,9 +565,12 @@ proto.acm.Account.prototype.getNativename = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setNativename = function(value) { - jspb.Message.setProto3StringField(this, 11, value); + return jspb.Message.setProto3StringField(this, 11, value); }; @@ -566,9 +607,12 @@ proto.acm.Account.prototype.getCodehash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setCodehash = function(value) { - jspb.Message.setProto3BytesField(this, 8, value); + return jspb.Message.setProto3BytesField(this, 8, value); }; @@ -582,9 +626,12 @@ proto.acm.Account.prototype.getContractmetaList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.acm.Account} returns this +*/ proto.acm.Account.prototype.setContractmetaList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 9, value); + return jspb.Message.setRepeatedWrapperField(this, 9, value); }; @@ -600,9 +647,10 @@ proto.acm.Account.prototype.addContractmeta = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.acm.Account} returns this */ proto.acm.Account.prototype.clearContractmetaList = function() { - this.setContractmetaList([]); + return this.setContractmetaList([]); }; @@ -639,9 +687,54 @@ proto.acm.Account.prototype.getForebear_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setForebear = function(value) { - jspb.Message.setProto3BytesField(this, 10, value); + return jspb.Message.setProto3BytesField(this, 10, value); +}; + + +/** + * optional bytes OpcodeBitset = 12; + * @return {!(string|Uint8Array)} + */ +proto.acm.Account.prototype.getOpcodebitset = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes OpcodeBitset = 12; + * This is a type-conversion wrapper around `getOpcodebitset()` + * @return {string} + */ +proto.acm.Account.prototype.getOpcodebitset_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpcodebitset())); +}; + + +/** + * optional bytes OpcodeBitset = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOpcodebitset()` + * @return {!Uint8Array} + */ +proto.acm.Account.prototype.getOpcodebitset_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpcodebitset())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ +proto.acm.Account.prototype.setOpcodebitset = function(value) { + return jspb.Message.setProto3BytesField(this, 12, value); }; @@ -650,13 +743,15 @@ proto.acm.Account.prototype.setForebear = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.acm.ContractMeta.prototype.toObject = function(opt_includeInstance) { @@ -666,8 +761,8 @@ proto.acm.ContractMeta.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.acm.ContractMeta} msg The msg instance to transform. * @return {!Object} @@ -812,9 +907,12 @@ proto.acm.ContractMeta.prototype.getCodehash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.ContractMeta} returns this + */ proto.acm.ContractMeta.prototype.setCodehash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -851,9 +949,12 @@ proto.acm.ContractMeta.prototype.getMetadatahash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.ContractMeta} returns this + */ proto.acm.ContractMeta.prototype.setMetadatahash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -866,9 +967,12 @@ proto.acm.ContractMeta.prototype.getMetadata = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.acm.ContractMeta} returns this + */ proto.acm.ContractMeta.prototype.setMetadata = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; diff --git a/js/proto/balance_pb.js b/js/proto/balance_pb.js index f2cefffe7..f481d2879 100644 --- a/js/proto/balance_pb.js +++ b/js/proto/balance_pb.js @@ -1,3 +1,4 @@ +// source: balance.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.balance.Balance.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.balance.Balance.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.balance.Balance} msg The msg instance to transform. * @return {!Object} @@ -166,9 +169,12 @@ proto.balance.Balance.prototype.getType = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.balance.Balance} returns this + */ proto.balance.Balance.prototype.setType = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -181,9 +187,12 @@ proto.balance.Balance.prototype.getAmount = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.balance.Balance} returns this + */ proto.balance.Balance.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/bcm_pb.js b/js/proto/bcm_pb.js index 277fc2cb7..72f289e01 100644 --- a/js/proto/bcm_pb.js +++ b/js/proto/bcm_pb.js @@ -1,3 +1,4 @@ +// source: bcm.proto /** * @fileoverview * @enhanceable @@ -66,13 +67,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.bcm.SyncInfo.prototype.toObject = function(opt_includeInstance) { @@ -82,8 +85,8 @@ proto.bcm.SyncInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.bcm.SyncInfo} msg The msg instance to transform. * @return {!Object} @@ -246,9 +249,12 @@ proto.bcm.SyncInfo.prototype.getLatestblockheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.bcm.SyncInfo} returns this + */ proto.bcm.SyncInfo.prototype.setLatestblockheight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -285,9 +291,12 @@ proto.bcm.SyncInfo.prototype.getLatestblockhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bcm.SyncInfo} returns this + */ proto.bcm.SyncInfo.prototype.setLatestblockhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -324,9 +333,12 @@ proto.bcm.SyncInfo.prototype.getLatestapphash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bcm.SyncInfo} returns this + */ proto.bcm.SyncInfo.prototype.setLatestapphash = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -340,17 +352,21 @@ proto.bcm.SyncInfo.prototype.getLatestblocktime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.bcm.SyncInfo} returns this +*/ proto.bcm.SyncInfo.prototype.setLatestblocktime = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.bcm.SyncInfo} returns this */ proto.bcm.SyncInfo.prototype.clearLatestblocktime = function() { - this.setLatestblocktime(undefined); + return this.setLatestblocktime(undefined); }; @@ -373,17 +389,21 @@ proto.bcm.SyncInfo.prototype.getLatestblockseentime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.bcm.SyncInfo} returns this +*/ proto.bcm.SyncInfo.prototype.setLatestblockseentime = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.bcm.SyncInfo} returns this */ proto.bcm.SyncInfo.prototype.clearLatestblockseentime = function() { - this.setLatestblockseentime(undefined); + return this.setLatestblockseentime(undefined); }; @@ -406,17 +426,21 @@ proto.bcm.SyncInfo.prototype.getLatestblockduration = function() { }; -/** @param {?proto.google.protobuf.Duration|undefined} value */ +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.bcm.SyncInfo} returns this +*/ proto.bcm.SyncInfo.prototype.setLatestblockduration = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.bcm.SyncInfo} returns this */ proto.bcm.SyncInfo.prototype.clearLatestblockduration = function() { - this.setLatestblockduration(undefined); + return this.setLatestblockduration(undefined); }; @@ -434,13 +458,15 @@ proto.bcm.SyncInfo.prototype.hasLatestblockduration = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.bcm.PersistedState.prototype.toObject = function(opt_includeInstance) { @@ -450,8 +476,8 @@ proto.bcm.PersistedState.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.bcm.PersistedState} msg The msg instance to transform. * @return {!Object} @@ -610,9 +636,12 @@ proto.bcm.PersistedState.prototype.getApphashafterlastblock_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bcm.PersistedState} returns this + */ proto.bcm.PersistedState.prototype.setApphashafterlastblock = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -626,17 +655,21 @@ proto.bcm.PersistedState.prototype.getLastblocktime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.bcm.PersistedState} returns this +*/ proto.bcm.PersistedState.prototype.setLastblocktime = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.bcm.PersistedState} returns this */ proto.bcm.PersistedState.prototype.clearLastblocktime = function() { - this.setLastblocktime(undefined); + return this.setLastblocktime(undefined); }; @@ -658,9 +691,12 @@ proto.bcm.PersistedState.prototype.getLastblockheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.bcm.PersistedState} returns this + */ proto.bcm.PersistedState.prototype.setLastblockheight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -697,9 +733,12 @@ proto.bcm.PersistedState.prototype.getGenesishash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bcm.PersistedState} returns this + */ proto.bcm.PersistedState.prototype.setGenesishash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; diff --git a/js/proto/crypto_pb.js b/js/proto/crypto_pb.js index 9aa32a492..155be7b62 100644 --- a/js/proto/crypto_pb.js +++ b/js/proto/crypto_pb.js @@ -1,3 +1,4 @@ +// source: crypto.proto /** * @fileoverview * @enhanceable @@ -84,13 +85,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.crypto.PublicKey.prototype.toObject = function(opt_includeInstance) { @@ -100,8 +103,8 @@ proto.crypto.PublicKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.crypto.PublicKey} msg The msg instance to transform. * @return {!Object} @@ -210,9 +213,12 @@ proto.crypto.PublicKey.prototype.getCurvetype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.crypto.PublicKey} returns this + */ proto.crypto.PublicKey.prototype.setCurvetype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -249,9 +255,12 @@ proto.crypto.PublicKey.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.crypto.PublicKey} returns this + */ proto.crypto.PublicKey.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -260,13 +269,15 @@ proto.crypto.PublicKey.prototype.setPublickey = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.crypto.PrivateKey.prototype.toObject = function(opt_includeInstance) { @@ -276,8 +287,8 @@ proto.crypto.PrivateKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.crypto.PrivateKey} msg The msg instance to transform. * @return {!Object} @@ -398,9 +409,12 @@ proto.crypto.PrivateKey.prototype.getCurvetype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.crypto.PrivateKey} returns this + */ proto.crypto.PrivateKey.prototype.setCurvetype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -437,9 +451,12 @@ proto.crypto.PrivateKey.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.crypto.PrivateKey} returns this + */ proto.crypto.PrivateKey.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -476,9 +493,12 @@ proto.crypto.PrivateKey.prototype.getPrivatekey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.crypto.PrivateKey} returns this + */ proto.crypto.PrivateKey.prototype.setPrivatekey = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -487,13 +507,15 @@ proto.crypto.PrivateKey.prototype.setPrivatekey = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.crypto.Signature.prototype.toObject = function(opt_includeInstance) { @@ -503,8 +525,8 @@ proto.crypto.Signature.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.crypto.Signature} msg The msg instance to transform. * @return {!Object} @@ -613,9 +635,12 @@ proto.crypto.Signature.prototype.getCurvetype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.crypto.Signature} returns this + */ proto.crypto.Signature.prototype.setCurvetype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -652,9 +677,12 @@ proto.crypto.Signature.prototype.getSignature_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.crypto.Signature} returns this + */ proto.crypto.Signature.prototype.setSignature = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; diff --git a/js/proto/dump_pb.js b/js/proto/dump_pb.js index 88a222784..d6e44578e 100644 --- a/js/proto/dump_pb.js +++ b/js/proto/dump_pb.js @@ -1,3 +1,4 @@ +// source: dump.proto /** * @fileoverview * @enhanceable @@ -114,13 +115,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.dump.Storage.prototype.toObject = function(opt_includeInstance) { @@ -130,8 +133,8 @@ proto.dump.Storage.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.Storage} msg The msg instance to transform. * @return {!Object} @@ -264,9 +267,12 @@ proto.dump.Storage.prototype.getKey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.dump.Storage} returns this + */ proto.dump.Storage.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -303,9 +309,12 @@ proto.dump.Storage.prototype.getValue_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.dump.Storage} returns this + */ proto.dump.Storage.prototype.setValue = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -321,13 +330,15 @@ proto.dump.AccountStorage.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.dump.AccountStorage.prototype.toObject = function(opt_includeInstance) { @@ -337,8 +348,8 @@ proto.dump.AccountStorage.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.AccountStorage} msg The msg instance to transform. * @return {!Object} @@ -474,9 +485,12 @@ proto.dump.AccountStorage.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.dump.AccountStorage} returns this + */ proto.dump.AccountStorage.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -490,9 +504,12 @@ proto.dump.AccountStorage.prototype.getStorageList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.dump.AccountStorage} returns this +*/ proto.dump.AccountStorage.prototype.setStorageList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -508,9 +525,10 @@ proto.dump.AccountStorage.prototype.addStorage = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.dump.AccountStorage} returns this */ proto.dump.AccountStorage.prototype.clearStorageList = function() { - this.setStorageList([]); + return this.setStorageList([]); }; @@ -519,13 +537,15 @@ proto.dump.AccountStorage.prototype.clearStorageList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.dump.EVMEvent.prototype.toObject = function(opt_includeInstance) { @@ -535,8 +555,8 @@ proto.dump.EVMEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.EVMEvent} msg The msg instance to transform. * @return {!Object} @@ -673,9 +693,12 @@ proto.dump.EVMEvent.prototype.getChainid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.dump.EVMEvent} returns this + */ proto.dump.EVMEvent.prototype.setChainid = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -688,9 +711,12 @@ proto.dump.EVMEvent.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.dump.EVMEvent} returns this + */ proto.dump.EVMEvent.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -704,17 +730,21 @@ proto.dump.EVMEvent.prototype.getTime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.dump.EVMEvent} returns this +*/ proto.dump.EVMEvent.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.dump.EVMEvent} returns this */ proto.dump.EVMEvent.prototype.clearTime = function() { - this.setTime(undefined); + return this.setTime(undefined); }; @@ -737,17 +767,21 @@ proto.dump.EVMEvent.prototype.getEvent = function() { }; -/** @param {?proto.exec.LogEvent|undefined} value */ +/** + * @param {?proto.exec.LogEvent|undefined} value + * @return {!proto.dump.EVMEvent} returns this +*/ proto.dump.EVMEvent.prototype.setEvent = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.dump.EVMEvent} returns this */ proto.dump.EVMEvent.prototype.clearEvent = function() { - this.setEvent(undefined); + return this.setEvent(undefined); }; @@ -765,13 +799,15 @@ proto.dump.EVMEvent.prototype.hasEvent = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.dump.Dump.prototype.toObject = function(opt_includeInstance) { @@ -781,8 +817,8 @@ proto.dump.Dump.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.Dump} msg The msg instance to transform. * @return {!Object} @@ -935,9 +971,12 @@ proto.dump.Dump.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.dump.Dump} returns this + */ proto.dump.Dump.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -951,17 +990,21 @@ proto.dump.Dump.prototype.getAccount = function() { }; -/** @param {?proto.acm.Account|undefined} value */ +/** + * @param {?proto.acm.Account|undefined} value + * @return {!proto.dump.Dump} returns this +*/ proto.dump.Dump.prototype.setAccount = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.dump.Dump} returns this */ proto.dump.Dump.prototype.clearAccount = function() { - this.setAccount(undefined); + return this.setAccount(undefined); }; @@ -984,17 +1027,21 @@ proto.dump.Dump.prototype.getAccountstorage = function() { }; -/** @param {?proto.dump.AccountStorage|undefined} value */ +/** + * @param {?proto.dump.AccountStorage|undefined} value + * @return {!proto.dump.Dump} returns this +*/ proto.dump.Dump.prototype.setAccountstorage = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.dump.Dump} returns this */ proto.dump.Dump.prototype.clearAccountstorage = function() { - this.setAccountstorage(undefined); + return this.setAccountstorage(undefined); }; @@ -1017,17 +1064,21 @@ proto.dump.Dump.prototype.getEvmevent = function() { }; -/** @param {?proto.dump.EVMEvent|undefined} value */ +/** + * @param {?proto.dump.EVMEvent|undefined} value + * @return {!proto.dump.Dump} returns this +*/ proto.dump.Dump.prototype.setEvmevent = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.dump.Dump} returns this */ proto.dump.Dump.prototype.clearEvmevent = function() { - this.setEvmevent(undefined); + return this.setEvmevent(undefined); }; @@ -1050,17 +1101,21 @@ proto.dump.Dump.prototype.getName = function() { }; -/** @param {?proto.names.Entry|undefined} value */ +/** + * @param {?proto.names.Entry|undefined} value + * @return {!proto.dump.Dump} returns this +*/ proto.dump.Dump.prototype.setName = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.dump.Dump} returns this */ proto.dump.Dump.prototype.clearName = function() { - this.setName(undefined); + return this.setName(undefined); }; diff --git a/js/proto/encoding_pb.js b/js/proto/encoding_pb.js index 17cbf7f21..67f663183 100644 --- a/js/proto/encoding_pb.js +++ b/js/proto/encoding_pb.js @@ -1,3 +1,4 @@ +// source: encoding.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.encoding.TestMessage.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.encoding.TestMessage.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.encoding.TestMessage} msg The msg instance to transform. * @return {!Object} @@ -166,9 +169,12 @@ proto.encoding.TestMessage.prototype.getType = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.encoding.TestMessage} returns this + */ proto.encoding.TestMessage.prototype.setType = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -181,9 +187,12 @@ proto.encoding.TestMessage.prototype.getAmount = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.encoding.TestMessage} returns this + */ proto.encoding.TestMessage.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/errors_pb.js b/js/proto/errors_pb.js index f2d51ba54..6a752960b 100644 --- a/js/proto/errors_pb.js +++ b/js/proto/errors_pb.js @@ -1,3 +1,4 @@ +// source: errors.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.errors.Exception.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.errors.Exception.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.errors.Exception} msg The msg instance to transform. * @return {!Object} @@ -166,9 +169,12 @@ proto.errors.Exception.prototype.getCode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.errors.Exception} returns this + */ proto.errors.Exception.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -181,9 +187,12 @@ proto.errors.Exception.prototype.getException = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.errors.Exception} returns this + */ proto.errors.Exception.prototype.setException = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; diff --git a/js/proto/exec_pb.js b/js/proto/exec_pb.js index 1240d06e7..213276abb 100644 --- a/js/proto/exec_pb.js +++ b/js/proto/exec_pb.js @@ -1,3 +1,4 @@ +// source: exec.proto /** * @fileoverview * @enhanceable @@ -479,13 +480,15 @@ proto.exec.StreamEvents.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.StreamEvents.prototype.toObject = function(opt_includeInstance) { @@ -495,8 +498,8 @@ proto.exec.StreamEvents.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.StreamEvents} msg The msg instance to transform. * @return {!Object} @@ -597,9 +600,12 @@ proto.exec.StreamEvents.prototype.getStreameventsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.exec.StreamEvents} returns this +*/ proto.exec.StreamEvents.prototype.setStreameventsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -615,9 +621,10 @@ proto.exec.StreamEvents.prototype.addStreamevents = function(opt_value, opt_inde /** * Clears the list making it empty but non-null. + * @return {!proto.exec.StreamEvents} returns this */ proto.exec.StreamEvents.prototype.clearStreameventsList = function() { - this.setStreameventsList([]); + return this.setStreameventsList([]); }; @@ -626,13 +633,15 @@ proto.exec.StreamEvents.prototype.clearStreameventsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.StreamEvent.prototype.toObject = function(opt_includeInstance) { @@ -642,8 +651,8 @@ proto.exec.StreamEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.StreamEvent} msg The msg instance to transform. * @return {!Object} @@ -813,17 +822,21 @@ proto.exec.StreamEvent.prototype.getBeginblock = function() { }; -/** @param {?proto.exec.BeginBlock|undefined} value */ +/** + * @param {?proto.exec.BeginBlock|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setBeginblock = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this */ proto.exec.StreamEvent.prototype.clearBeginblock = function() { - this.setBeginblock(undefined); + return this.setBeginblock(undefined); }; @@ -846,17 +859,21 @@ proto.exec.StreamEvent.prototype.getBegintx = function() { }; -/** @param {?proto.exec.BeginTx|undefined} value */ +/** + * @param {?proto.exec.BeginTx|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setBegintx = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this */ proto.exec.StreamEvent.prototype.clearBegintx = function() { - this.setBegintx(undefined); + return this.setBegintx(undefined); }; @@ -879,17 +896,21 @@ proto.exec.StreamEvent.prototype.getEnvelope = function() { }; -/** @param {?proto.txs.Envelope|undefined} value */ +/** + * @param {?proto.txs.Envelope|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setEnvelope = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this */ proto.exec.StreamEvent.prototype.clearEnvelope = function() { - this.setEnvelope(undefined); + return this.setEnvelope(undefined); }; @@ -912,17 +933,21 @@ proto.exec.StreamEvent.prototype.getEvent = function() { }; -/** @param {?proto.exec.Event|undefined} value */ +/** + * @param {?proto.exec.Event|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setEvent = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this */ proto.exec.StreamEvent.prototype.clearEvent = function() { - this.setEvent(undefined); + return this.setEvent(undefined); }; @@ -945,17 +970,21 @@ proto.exec.StreamEvent.prototype.getEndtx = function() { }; -/** @param {?proto.exec.EndTx|undefined} value */ +/** + * @param {?proto.exec.EndTx|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setEndtx = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this */ proto.exec.StreamEvent.prototype.clearEndtx = function() { - this.setEndtx(undefined); + return this.setEndtx(undefined); }; @@ -978,17 +1007,21 @@ proto.exec.StreamEvent.prototype.getEndblock = function() { }; -/** @param {?proto.exec.EndBlock|undefined} value */ +/** + * @param {?proto.exec.EndBlock|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setEndblock = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this */ proto.exec.StreamEvent.prototype.clearEndblock = function() { - this.setEndblock(undefined); + return this.setEndblock(undefined); }; @@ -1006,13 +1039,15 @@ proto.exec.StreamEvent.prototype.hasEndblock = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.BeginBlock.prototype.toObject = function(opt_includeInstance) { @@ -1022,8 +1057,8 @@ proto.exec.BeginBlock.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.BeginBlock} msg The msg instance to transform. * @return {!Object} @@ -1134,9 +1169,12 @@ proto.exec.BeginBlock.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.BeginBlock} returns this + */ proto.exec.BeginBlock.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1150,17 +1188,21 @@ proto.exec.BeginBlock.prototype.getHeader = function() { }; -/** @param {?proto.types.Header|undefined} value */ +/** + * @param {?proto.types.Header|undefined} value + * @return {!proto.exec.BeginBlock} returns this +*/ proto.exec.BeginBlock.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.BeginBlock} returns this */ proto.exec.BeginBlock.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -1178,13 +1220,15 @@ proto.exec.BeginBlock.prototype.hasHeader = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.EndBlock.prototype.toObject = function(opt_includeInstance) { @@ -1194,8 +1238,8 @@ proto.exec.EndBlock.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.EndBlock} msg The msg instance to transform. * @return {!Object} @@ -1292,9 +1336,12 @@ proto.exec.EndBlock.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.EndBlock} returns this + */ proto.exec.EndBlock.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1303,13 +1350,15 @@ proto.exec.EndBlock.prototype.setHeight = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.BeginTx.prototype.toObject = function(opt_includeInstance) { @@ -1319,8 +1368,8 @@ proto.exec.BeginTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.BeginTx} msg The msg instance to transform. * @return {!Object} @@ -1448,17 +1497,21 @@ proto.exec.BeginTx.prototype.getTxheader = function() { }; -/** @param {?proto.exec.TxHeader|undefined} value */ +/** + * @param {?proto.exec.TxHeader|undefined} value + * @return {!proto.exec.BeginTx} returns this +*/ proto.exec.BeginTx.prototype.setTxheader = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.BeginTx} returns this */ proto.exec.BeginTx.prototype.clearTxheader = function() { - this.setTxheader(undefined); + return this.setTxheader(undefined); }; @@ -1481,17 +1534,21 @@ proto.exec.BeginTx.prototype.getResult = function() { }; -/** @param {?proto.exec.Result|undefined} value */ +/** + * @param {?proto.exec.Result|undefined} value + * @return {!proto.exec.BeginTx} returns this +*/ proto.exec.BeginTx.prototype.setResult = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.BeginTx} returns this */ proto.exec.BeginTx.prototype.clearResult = function() { - this.setResult(undefined); + return this.setResult(undefined); }; @@ -1514,17 +1571,21 @@ proto.exec.BeginTx.prototype.getException = function() { }; -/** @param {?proto.errors.Exception|undefined} value */ +/** + * @param {?proto.errors.Exception|undefined} value + * @return {!proto.exec.BeginTx} returns this +*/ proto.exec.BeginTx.prototype.setException = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.BeginTx} returns this */ proto.exec.BeginTx.prototype.clearException = function() { - this.setException(undefined); + return this.setException(undefined); }; @@ -1542,13 +1603,15 @@ proto.exec.BeginTx.prototype.hasException = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.EndTx.prototype.toObject = function(opt_includeInstance) { @@ -1558,8 +1621,8 @@ proto.exec.EndTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.EndTx} msg The msg instance to transform. * @return {!Object} @@ -1680,9 +1743,12 @@ proto.exec.EndTx.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.EndTx} returns this + */ proto.exec.EndTx.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -1691,13 +1757,15 @@ proto.exec.EndTx.prototype.setTxhash = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.TxHeader.prototype.toObject = function(opt_includeInstance) { @@ -1707,8 +1775,8 @@ proto.exec.TxHeader.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.TxHeader} msg The msg instance to transform. * @return {!Object} @@ -1855,9 +1923,12 @@ proto.exec.TxHeader.prototype.getTxtype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.setTxtype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1894,9 +1965,12 @@ proto.exec.TxHeader.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -1909,9 +1983,12 @@ proto.exec.TxHeader.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1924,9 +2001,12 @@ proto.exec.TxHeader.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -1940,17 +2020,21 @@ proto.exec.TxHeader.prototype.getOrigin = function() { }; -/** @param {?proto.exec.Origin|undefined} value */ +/** + * @param {?proto.exec.Origin|undefined} value + * @return {!proto.exec.TxHeader} returns this +*/ proto.exec.TxHeader.prototype.setOrigin = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.TxHeader} returns this */ proto.exec.TxHeader.prototype.clearOrigin = function() { - this.setOrigin(undefined); + return this.setOrigin(undefined); }; @@ -1975,13 +2059,15 @@ proto.exec.BlockExecution.repeatedFields_ = [3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.BlockExecution.prototype.toObject = function(opt_includeInstance) { @@ -1991,8 +2077,8 @@ proto.exec.BlockExecution.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.BlockExecution} msg The msg instance to transform. * @return {!Object} @@ -2118,9 +2204,12 @@ proto.exec.BlockExecution.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.BlockExecution} returns this + */ proto.exec.BlockExecution.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2134,17 +2223,21 @@ proto.exec.BlockExecution.prototype.getHeader = function() { }; -/** @param {?proto.types.Header|undefined} value */ +/** + * @param {?proto.types.Header|undefined} value + * @return {!proto.exec.BlockExecution} returns this +*/ proto.exec.BlockExecution.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.BlockExecution} returns this */ proto.exec.BlockExecution.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -2167,9 +2260,12 @@ proto.exec.BlockExecution.prototype.getTxexecutionsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.exec.BlockExecution} returns this +*/ proto.exec.BlockExecution.prototype.setTxexecutionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; @@ -2185,9 +2281,10 @@ proto.exec.BlockExecution.prototype.addTxexecutions = function(opt_value, opt_in /** * Clears the list making it empty but non-null. + * @return {!proto.exec.BlockExecution} returns this */ proto.exec.BlockExecution.prototype.clearTxexecutionsList = function() { - this.setTxexecutionsList([]); + return this.setTxexecutionsList([]); }; @@ -2196,13 +2293,15 @@ proto.exec.BlockExecution.prototype.clearTxexecutionsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.TxExecutionKey.prototype.toObject = function(opt_includeInstance) { @@ -2212,8 +2311,8 @@ proto.exec.TxExecutionKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.TxExecutionKey} msg The msg instance to transform. * @return {!Object} @@ -2322,9 +2421,12 @@ proto.exec.TxExecutionKey.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxExecutionKey} returns this + */ proto.exec.TxExecutionKey.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2337,9 +2439,12 @@ proto.exec.TxExecutionKey.prototype.getOffset = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxExecutionKey} returns this + */ proto.exec.TxExecutionKey.prototype.setOffset = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -2355,13 +2460,15 @@ proto.exec.TxExecution.repeatedFields_ = [7,11]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.TxExecution.prototype.toObject = function(opt_includeInstance) { @@ -2371,8 +2478,8 @@ proto.exec.TxExecution.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.TxExecution} msg The msg instance to transform. * @return {!Object} @@ -2558,17 +2665,21 @@ proto.exec.TxExecution.prototype.getHeader = function() { }; -/** @param {?proto.exec.TxHeader|undefined} value */ +/** + * @param {?proto.exec.TxHeader|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -2591,17 +2702,21 @@ proto.exec.TxExecution.prototype.getEnvelope = function() { }; -/** @param {?proto.txs.Envelope|undefined} value */ +/** + * @param {?proto.txs.Envelope|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setEnvelope = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearEnvelope = function() { - this.setEnvelope(undefined); + return this.setEnvelope(undefined); }; @@ -2624,9 +2739,12 @@ proto.exec.TxExecution.prototype.getEventsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setEventsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -2642,9 +2760,10 @@ proto.exec.TxExecution.prototype.addEvents = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearEventsList = function() { - this.setEventsList([]); + return this.setEventsList([]); }; @@ -2658,17 +2777,21 @@ proto.exec.TxExecution.prototype.getResult = function() { }; -/** @param {?proto.exec.Result|undefined} value */ +/** + * @param {?proto.exec.Result|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setResult = function(value) { - jspb.Message.setWrapperField(this, 8, value); + return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearResult = function() { - this.setResult(undefined); + return this.setResult(undefined); }; @@ -2691,17 +2814,21 @@ proto.exec.TxExecution.prototype.getReceipt = function() { }; -/** @param {?proto.txs.Receipt|undefined} value */ +/** + * @param {?proto.txs.Receipt|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setReceipt = function(value) { - jspb.Message.setWrapperField(this, 9, value); + return jspb.Message.setWrapperField(this, 9, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearReceipt = function() { - this.setReceipt(undefined); + return this.setReceipt(undefined); }; @@ -2724,17 +2851,21 @@ proto.exec.TxExecution.prototype.getException = function() { }; -/** @param {?proto.errors.Exception|undefined} value */ +/** + * @param {?proto.errors.Exception|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setException = function(value) { - jspb.Message.setWrapperField(this, 10, value); + return jspb.Message.setWrapperField(this, 10, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearException = function() { - this.setException(undefined); + return this.setException(undefined); }; @@ -2757,9 +2888,12 @@ proto.exec.TxExecution.prototype.getTxexecutionsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setTxexecutionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 11, value); + return jspb.Message.setRepeatedWrapperField(this, 11, value); }; @@ -2775,9 +2909,10 @@ proto.exec.TxExecution.prototype.addTxexecutions = function(opt_value, opt_index /** * Clears the list making it empty but non-null. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearTxexecutionsList = function() { - this.setTxexecutionsList([]); + return this.setTxexecutionsList([]); }; @@ -2786,13 +2921,15 @@ proto.exec.TxExecution.prototype.clearTxexecutionsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.Origin.prototype.toObject = function(opt_includeInstance) { @@ -2802,8 +2939,8 @@ proto.exec.Origin.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Origin} msg The msg instance to transform. * @return {!Object} @@ -2938,9 +3075,12 @@ proto.exec.Origin.prototype.getChainid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.exec.Origin} returns this + */ proto.exec.Origin.prototype.setChainid = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2953,9 +3093,12 @@ proto.exec.Origin.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Origin} returns this + */ proto.exec.Origin.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -2968,9 +3111,12 @@ proto.exec.Origin.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Origin} returns this + */ proto.exec.Origin.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -2984,17 +3130,21 @@ proto.exec.Origin.prototype.getTime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.exec.Origin} returns this +*/ proto.exec.Origin.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Origin} returns this */ proto.exec.Origin.prototype.clearTime = function() { - this.setTime(undefined); + return this.setTime(undefined); }; @@ -3012,13 +3162,15 @@ proto.exec.Origin.prototype.hasTime = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.Header.prototype.toObject = function(opt_includeInstance) { @@ -3028,8 +3180,8 @@ proto.exec.Header.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Header} msg The msg instance to transform. * @return {!Object} @@ -3200,9 +3352,12 @@ proto.exec.Header.prototype.getTxtype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setTxtype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -3239,9 +3394,12 @@ proto.exec.Header.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -3254,9 +3412,12 @@ proto.exec.Header.prototype.getEventtype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setEventtype = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -3269,9 +3430,12 @@ proto.exec.Header.prototype.getEventid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setEventid = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -3284,9 +3448,12 @@ proto.exec.Header.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -3299,9 +3466,12 @@ proto.exec.Header.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 6, value); }; @@ -3315,17 +3485,21 @@ proto.exec.Header.prototype.getException = function() { }; -/** @param {?proto.errors.Exception|undefined} value */ +/** + * @param {?proto.errors.Exception|undefined} value + * @return {!proto.exec.Header} returns this +*/ proto.exec.Header.prototype.setException = function(value) { - jspb.Message.setWrapperField(this, 7, value); + return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Header} returns this */ proto.exec.Header.prototype.clearException = function() { - this.setException(undefined); + return this.setException(undefined); }; @@ -3343,13 +3517,15 @@ proto.exec.Header.prototype.hasException = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.Event.prototype.toObject = function(opt_includeInstance) { @@ -3359,8 +3535,8 @@ proto.exec.Event.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Event} msg The msg instance to transform. * @return {!Object} @@ -3530,17 +3706,21 @@ proto.exec.Event.prototype.getHeader = function() { }; -/** @param {?proto.exec.Header|undefined} value */ +/** + * @param {?proto.exec.Header|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this */ proto.exec.Event.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -3563,17 +3743,21 @@ proto.exec.Event.prototype.getInput = function() { }; -/** @param {?proto.exec.InputEvent|undefined} value */ +/** + * @param {?proto.exec.InputEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this */ proto.exec.Event.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -3596,17 +3780,21 @@ proto.exec.Event.prototype.getOutput = function() { }; -/** @param {?proto.exec.OutputEvent|undefined} value */ +/** + * @param {?proto.exec.OutputEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setOutput = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this */ proto.exec.Event.prototype.clearOutput = function() { - this.setOutput(undefined); + return this.setOutput(undefined); }; @@ -3629,17 +3817,21 @@ proto.exec.Event.prototype.getCall = function() { }; -/** @param {?proto.exec.CallEvent|undefined} value */ +/** + * @param {?proto.exec.CallEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setCall = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this */ proto.exec.Event.prototype.clearCall = function() { - this.setCall(undefined); + return this.setCall(undefined); }; @@ -3662,17 +3854,21 @@ proto.exec.Event.prototype.getLog = function() { }; -/** @param {?proto.exec.LogEvent|undefined} value */ +/** + * @param {?proto.exec.LogEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setLog = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this */ proto.exec.Event.prototype.clearLog = function() { - this.setLog(undefined); + return this.setLog(undefined); }; @@ -3695,17 +3891,21 @@ proto.exec.Event.prototype.getGovernaccount = function() { }; -/** @param {?proto.exec.GovernAccountEvent|undefined} value */ +/** + * @param {?proto.exec.GovernAccountEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setGovernaccount = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this */ proto.exec.Event.prototype.clearGovernaccount = function() { - this.setGovernaccount(undefined); + return this.setGovernaccount(undefined); }; @@ -3723,13 +3923,15 @@ proto.exec.Event.prototype.hasGovernaccount = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.Result.prototype.toObject = function(opt_includeInstance) { @@ -3739,8 +3941,8 @@ proto.exec.Result.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Result} msg The msg instance to transform. * @return {!Object} @@ -3901,9 +4103,12 @@ proto.exec.Result.prototype.getReturn_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.Result} returns this + */ proto.exec.Result.prototype.setReturn = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3916,9 +4121,12 @@ proto.exec.Result.prototype.getGasused = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Result} returns this + */ proto.exec.Result.prototype.setGasused = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -3932,17 +4140,21 @@ proto.exec.Result.prototype.getNameentry = function() { }; -/** @param {?proto.names.Entry|undefined} value */ +/** + * @param {?proto.names.Entry|undefined} value + * @return {!proto.exec.Result} returns this +*/ proto.exec.Result.prototype.setNameentry = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Result} returns this */ proto.exec.Result.prototype.clearNameentry = function() { - this.setNameentry(undefined); + return this.setNameentry(undefined); }; @@ -3965,17 +4177,21 @@ proto.exec.Result.prototype.getPermargs = function() { }; -/** @param {?proto.permission.PermArgs|undefined} value */ +/** + * @param {?proto.permission.PermArgs|undefined} value + * @return {!proto.exec.Result} returns this +*/ proto.exec.Result.prototype.setPermargs = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Result} returns this */ proto.exec.Result.prototype.clearPermargs = function() { - this.setPermargs(undefined); + return this.setPermargs(undefined); }; @@ -4000,13 +4216,15 @@ proto.exec.LogEvent.repeatedFields_ = [3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.LogEvent.prototype.toObject = function(opt_includeInstance) { @@ -4016,8 +4234,8 @@ proto.exec.LogEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.LogEvent} msg The msg instance to transform. * @return {!Object} @@ -4162,9 +4380,12 @@ proto.exec.LogEvent.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.LogEvent} returns this + */ proto.exec.LogEvent.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -4201,9 +4422,12 @@ proto.exec.LogEvent.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.LogEvent} returns this + */ proto.exec.LogEvent.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4240,26 +4464,31 @@ proto.exec.LogEvent.prototype.getTopicsList_asU8 = function() { }; -/** @param {!(Array|Array)} value */ +/** + * @param {!(Array|Array)} value + * @return {!proto.exec.LogEvent} returns this + */ proto.exec.LogEvent.prototype.setTopicsList = function(value) { - jspb.Message.setField(this, 3, value || []); + return jspb.Message.setField(this, 3, value || []); }; /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index + * @return {!proto.exec.LogEvent} returns this */ proto.exec.LogEvent.prototype.addTopics = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 3, value, opt_index); + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.exec.LogEvent} returns this */ proto.exec.LogEvent.prototype.clearTopicsList = function() { - this.setTopicsList([]); + return this.setTopicsList([]); }; @@ -4268,13 +4497,15 @@ proto.exec.LogEvent.prototype.clearTopicsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.CallEvent.prototype.toObject = function(opt_includeInstance) { @@ -4284,8 +4515,8 @@ proto.exec.CallEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.CallEvent} msg The msg instance to transform. * @return {!Object} @@ -4432,9 +4663,12 @@ proto.exec.CallEvent.prototype.getCalltype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.setCalltype = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -4448,17 +4682,21 @@ proto.exec.CallEvent.prototype.getCalldata = function() { }; -/** @param {?proto.exec.CallData|undefined} value */ +/** + * @param {?proto.exec.CallData|undefined} value + * @return {!proto.exec.CallEvent} returns this +*/ proto.exec.CallEvent.prototype.setCalldata = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.CallEvent} returns this */ proto.exec.CallEvent.prototype.clearCalldata = function() { - this.setCalldata(undefined); + return this.setCalldata(undefined); }; @@ -4504,9 +4742,12 @@ proto.exec.CallEvent.prototype.getOrigin_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.setOrigin = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4519,9 +4760,12 @@ proto.exec.CallEvent.prototype.getStackdepth = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.setStackdepth = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -4558,9 +4802,12 @@ proto.exec.CallEvent.prototype.getReturn_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.setReturn = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -4569,13 +4816,15 @@ proto.exec.CallEvent.prototype.setReturn = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.GovernAccountEvent.prototype.toObject = function(opt_includeInstance) { @@ -4585,8 +4834,8 @@ proto.exec.GovernAccountEvent.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.GovernAccountEvent} msg The msg instance to transform. * @return {!Object} @@ -4686,17 +4935,21 @@ proto.exec.GovernAccountEvent.prototype.getAccountupdate = function() { }; -/** @param {?proto.spec.TemplateAccount|undefined} value */ +/** + * @param {?proto.spec.TemplateAccount|undefined} value + * @return {!proto.exec.GovernAccountEvent} returns this +*/ proto.exec.GovernAccountEvent.prototype.setAccountupdate = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.GovernAccountEvent} returns this */ proto.exec.GovernAccountEvent.prototype.clearAccountupdate = function() { - this.setAccountupdate(undefined); + return this.setAccountupdate(undefined); }; @@ -4714,13 +4967,15 @@ proto.exec.GovernAccountEvent.prototype.hasAccountupdate = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.InputEvent.prototype.toObject = function(opt_includeInstance) { @@ -4730,8 +4985,8 @@ proto.exec.InputEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.InputEvent} msg The msg instance to transform. * @return {!Object} @@ -4852,9 +5107,12 @@ proto.exec.InputEvent.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.InputEvent} returns this + */ proto.exec.InputEvent.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -4863,13 +5121,15 @@ proto.exec.InputEvent.prototype.setAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.OutputEvent.prototype.toObject = function(opt_includeInstance) { @@ -4879,8 +5139,8 @@ proto.exec.OutputEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.OutputEvent} msg The msg instance to transform. * @return {!Object} @@ -5001,9 +5261,12 @@ proto.exec.OutputEvent.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.OutputEvent} returns this + */ proto.exec.OutputEvent.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -5012,13 +5275,15 @@ proto.exec.OutputEvent.prototype.setAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.CallData.prototype.toObject = function(opt_includeInstance) { @@ -5028,8 +5293,8 @@ proto.exec.CallData.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.CallData} msg The msg instance to transform. * @return {!Object} @@ -5198,9 +5463,12 @@ proto.exec.CallData.prototype.getCaller_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setCaller = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -5237,9 +5505,12 @@ proto.exec.CallData.prototype.getCallee_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setCallee = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -5276,9 +5547,12 @@ proto.exec.CallData.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -5291,9 +5565,12 @@ proto.exec.CallData.prototype.getValue = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -5306,9 +5583,12 @@ proto.exec.CallData.prototype.getGas = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setGas = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; diff --git a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js index 4d7ad97c0..d0f20945e 100644 --- a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js +++ b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js @@ -1,3 +1,4 @@ +// source: github.com/gogo/protobuf/gogoproto/gogo.proto /** * @fileoverview * @enhanceable diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js index 149058bd4..825f173a6 100644 --- a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js +++ b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js @@ -1,3 +1,4 @@ +// source: github.com/tendermint/tendermint/abci/types/types.proto /** * @fileoverview * @enhanceable @@ -27,6 +28,7 @@ goog.exportSymbol('proto.types.LastCommitInfo', null, global); goog.exportSymbol('proto.types.PartSetHeader', null, global); goog.exportSymbol('proto.types.PubKey', null, global); goog.exportSymbol('proto.types.Request', null, global); +goog.exportSymbol('proto.types.Request.ValueCase', null, global); goog.exportSymbol('proto.types.RequestBeginBlock', null, global); goog.exportSymbol('proto.types.RequestCheckTx', null, global); goog.exportSymbol('proto.types.RequestCommit', null, global); @@ -39,6 +41,7 @@ goog.exportSymbol('proto.types.RequestInitChain', null, global); goog.exportSymbol('proto.types.RequestQuery', null, global); goog.exportSymbol('proto.types.RequestSetOption', null, global); goog.exportSymbol('proto.types.Response', null, global); +goog.exportSymbol('proto.types.Response.ValueCase', null, global); goog.exportSymbol('proto.types.ResponseBeginBlock', null, global); goog.exportSymbol('proto.types.ResponseCheckTx', null, global); goog.exportSymbol('proto.types.ResponseCommit', null, global); @@ -893,13 +896,15 @@ proto.types.Request.prototype.getValueCase = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.Request.prototype.toObject = function(opt_includeInstance) { @@ -909,8 +914,8 @@ proto.types.Request.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Request} msg The msg instance to transform. * @return {!Object} @@ -1150,17 +1155,21 @@ proto.types.Request.prototype.getEcho = function() { }; -/** @param {?proto.types.RequestEcho|undefined} value */ +/** + * @param {?proto.types.RequestEcho|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setEcho = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 2, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearEcho = function() { - this.setEcho(undefined); + return this.setEcho(undefined); }; @@ -1183,17 +1192,21 @@ proto.types.Request.prototype.getFlush = function() { }; -/** @param {?proto.types.RequestFlush|undefined} value */ +/** + * @param {?proto.types.RequestFlush|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setFlush = function(value) { - jspb.Message.setOneofWrapperField(this, 3, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 3, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearFlush = function() { - this.setFlush(undefined); + return this.setFlush(undefined); }; @@ -1216,17 +1229,21 @@ proto.types.Request.prototype.getInfo = function() { }; -/** @param {?proto.types.RequestInfo|undefined} value */ +/** + * @param {?proto.types.RequestInfo|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setInfo = function(value) { - jspb.Message.setOneofWrapperField(this, 4, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 4, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearInfo = function() { - this.setInfo(undefined); + return this.setInfo(undefined); }; @@ -1249,17 +1266,21 @@ proto.types.Request.prototype.getSetOption = function() { }; -/** @param {?proto.types.RequestSetOption|undefined} value */ +/** + * @param {?proto.types.RequestSetOption|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setSetOption = function(value) { - jspb.Message.setOneofWrapperField(this, 5, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 5, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearSetOption = function() { - this.setSetOption(undefined); + return this.setSetOption(undefined); }; @@ -1282,17 +1303,21 @@ proto.types.Request.prototype.getInitChain = function() { }; -/** @param {?proto.types.RequestInitChain|undefined} value */ +/** + * @param {?proto.types.RequestInitChain|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setInitChain = function(value) { - jspb.Message.setOneofWrapperField(this, 6, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 6, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearInitChain = function() { - this.setInitChain(undefined); + return this.setInitChain(undefined); }; @@ -1315,17 +1340,21 @@ proto.types.Request.prototype.getQuery = function() { }; -/** @param {?proto.types.RequestQuery|undefined} value */ +/** + * @param {?proto.types.RequestQuery|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setQuery = function(value) { - jspb.Message.setOneofWrapperField(this, 7, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 7, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearQuery = function() { - this.setQuery(undefined); + return this.setQuery(undefined); }; @@ -1348,17 +1377,21 @@ proto.types.Request.prototype.getBeginBlock = function() { }; -/** @param {?proto.types.RequestBeginBlock|undefined} value */ +/** + * @param {?proto.types.RequestBeginBlock|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setBeginBlock = function(value) { - jspb.Message.setOneofWrapperField(this, 8, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 8, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearBeginBlock = function() { - this.setBeginBlock(undefined); + return this.setBeginBlock(undefined); }; @@ -1381,17 +1414,21 @@ proto.types.Request.prototype.getCheckTx = function() { }; -/** @param {?proto.types.RequestCheckTx|undefined} value */ +/** + * @param {?proto.types.RequestCheckTx|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setCheckTx = function(value) { - jspb.Message.setOneofWrapperField(this, 9, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 9, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearCheckTx = function() { - this.setCheckTx(undefined); + return this.setCheckTx(undefined); }; @@ -1414,17 +1451,21 @@ proto.types.Request.prototype.getDeliverTx = function() { }; -/** @param {?proto.types.RequestDeliverTx|undefined} value */ +/** + * @param {?proto.types.RequestDeliverTx|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setDeliverTx = function(value) { - jspb.Message.setOneofWrapperField(this, 19, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 19, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearDeliverTx = function() { - this.setDeliverTx(undefined); + return this.setDeliverTx(undefined); }; @@ -1447,17 +1488,21 @@ proto.types.Request.prototype.getEndBlock = function() { }; -/** @param {?proto.types.RequestEndBlock|undefined} value */ +/** + * @param {?proto.types.RequestEndBlock|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setEndBlock = function(value) { - jspb.Message.setOneofWrapperField(this, 11, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 11, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearEndBlock = function() { - this.setEndBlock(undefined); + return this.setEndBlock(undefined); }; @@ -1480,17 +1525,21 @@ proto.types.Request.prototype.getCommit = function() { }; -/** @param {?proto.types.RequestCommit|undefined} value */ +/** + * @param {?proto.types.RequestCommit|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setCommit = function(value) { - jspb.Message.setOneofWrapperField(this, 12, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 12, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearCommit = function() { - this.setCommit(undefined); + return this.setCommit(undefined); }; @@ -1508,13 +1557,15 @@ proto.types.Request.prototype.hasCommit = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestEcho.prototype.toObject = function(opt_includeInstance) { @@ -1524,8 +1575,8 @@ proto.types.RequestEcho.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestEcho} msg The msg instance to transform. * @return {!Object} @@ -1622,9 +1673,12 @@ proto.types.RequestEcho.prototype.getMessage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.RequestEcho} returns this + */ proto.types.RequestEcho.prototype.setMessage = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1633,13 +1687,15 @@ proto.types.RequestEcho.prototype.setMessage = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestFlush.prototype.toObject = function(opt_includeInstance) { @@ -1649,8 +1705,8 @@ proto.types.RequestFlush.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestFlush} msg The msg instance to transform. * @return {!Object} @@ -1732,13 +1788,15 @@ proto.types.RequestFlush.serializeBinaryToWriter = function(message, writer) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestInfo.prototype.toObject = function(opt_includeInstance) { @@ -1748,8 +1806,8 @@ proto.types.RequestInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestInfo} msg The msg instance to transform. * @return {!Object} @@ -1846,9 +1904,12 @@ proto.types.RequestInfo.prototype.getVersion = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.RequestInfo} returns this + */ proto.types.RequestInfo.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1857,13 +1918,15 @@ proto.types.RequestInfo.prototype.setVersion = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestSetOption.prototype.toObject = function(opt_includeInstance) { @@ -1873,8 +1936,8 @@ proto.types.RequestSetOption.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestSetOption} msg The msg instance to transform. * @return {!Object} @@ -1983,9 +2046,12 @@ proto.types.RequestSetOption.prototype.getKey = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.RequestSetOption} returns this + */ proto.types.RequestSetOption.prototype.setKey = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1998,9 +2064,12 @@ proto.types.RequestSetOption.prototype.getValue = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.RequestSetOption} returns this + */ proto.types.RequestSetOption.prototype.setValue = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2016,13 +2085,15 @@ proto.types.RequestInitChain.repeatedFields_ = [4]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestInitChain.prototype.toObject = function(opt_includeInstance) { @@ -2032,8 +2103,8 @@ proto.types.RequestInitChain.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestInitChain} msg The msg instance to transform. * @return {!Object} @@ -2186,17 +2257,21 @@ proto.types.RequestInitChain.prototype.getTime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.types.RequestInitChain} returns this +*/ proto.types.RequestInitChain.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.RequestInitChain} returns this */ proto.types.RequestInitChain.prototype.clearTime = function() { - this.setTime(undefined); + return this.setTime(undefined); }; @@ -2218,9 +2293,12 @@ proto.types.RequestInitChain.prototype.getChainId = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.RequestInitChain} returns this + */ proto.types.RequestInitChain.prototype.setChainId = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2234,17 +2312,21 @@ proto.types.RequestInitChain.prototype.getConsensusParams = function() { }; -/** @param {?proto.types.ConsensusParams|undefined} value */ +/** + * @param {?proto.types.ConsensusParams|undefined} value + * @return {!proto.types.RequestInitChain} returns this +*/ proto.types.RequestInitChain.prototype.setConsensusParams = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.RequestInitChain} returns this */ proto.types.RequestInitChain.prototype.clearConsensusParams = function() { - this.setConsensusParams(undefined); + return this.setConsensusParams(undefined); }; @@ -2267,9 +2349,12 @@ proto.types.RequestInitChain.prototype.getValidatorsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.RequestInitChain} returns this +*/ proto.types.RequestInitChain.prototype.setValidatorsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -2285,9 +2370,10 @@ proto.types.RequestInitChain.prototype.addValidators = function(opt_value, opt_i /** * Clears the list making it empty but non-null. + * @return {!proto.types.RequestInitChain} returns this */ proto.types.RequestInitChain.prototype.clearValidatorsList = function() { - this.setValidatorsList([]); + return this.setValidatorsList([]); }; @@ -2324,9 +2410,12 @@ proto.types.RequestInitChain.prototype.getAppStateBytes_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.RequestInitChain} returns this + */ proto.types.RequestInitChain.prototype.setAppStateBytes = function(value) { - jspb.Message.setProto3BytesField(this, 5, value); + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -2335,13 +2424,15 @@ proto.types.RequestInitChain.prototype.setAppStateBytes = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestQuery.prototype.toObject = function(opt_includeInstance) { @@ -2351,8 +2442,8 @@ proto.types.RequestQuery.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestQuery} msg The msg instance to transform. * @return {!Object} @@ -2363,7 +2454,7 @@ proto.types.RequestQuery.toObject = function(includeInstance, msg) { data: msg.getData_asB64(), path: jspb.Message.getFieldWithDefault(msg, 2, ""), height: jspb.Message.getFieldWithDefault(msg, 3, 0), - prove: jspb.Message.getFieldWithDefault(msg, 4, false) + prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) }; if (includeInstance) { @@ -2509,9 +2600,12 @@ proto.types.RequestQuery.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.RequestQuery} returns this + */ proto.types.RequestQuery.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2524,9 +2618,12 @@ proto.types.RequestQuery.prototype.getPath = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.RequestQuery} returns this + */ proto.types.RequestQuery.prototype.setPath = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2539,26 +2636,30 @@ proto.types.RequestQuery.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.RequestQuery} returns this + */ proto.types.RequestQuery.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional bool prove = 4; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.types.RequestQuery.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.types.RequestQuery} returns this + */ proto.types.RequestQuery.prototype.setProve = function(value) { - jspb.Message.setProto3BooleanField(this, 4, value); + return jspb.Message.setProto3BooleanField(this, 4, value); }; @@ -2574,13 +2675,15 @@ proto.types.RequestBeginBlock.repeatedFields_ = [4]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestBeginBlock.prototype.toObject = function(opt_includeInstance) { @@ -2590,8 +2693,8 @@ proto.types.RequestBeginBlock.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestBeginBlock} msg The msg instance to transform. * @return {!Object} @@ -2755,9 +2858,12 @@ proto.types.RequestBeginBlock.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.RequestBeginBlock} returns this + */ proto.types.RequestBeginBlock.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2771,17 +2877,21 @@ proto.types.RequestBeginBlock.prototype.getHeader = function() { }; -/** @param {?proto.types.Header|undefined} value */ +/** + * @param {?proto.types.Header|undefined} value + * @return {!proto.types.RequestBeginBlock} returns this +*/ proto.types.RequestBeginBlock.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.RequestBeginBlock} returns this */ proto.types.RequestBeginBlock.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -2804,17 +2914,21 @@ proto.types.RequestBeginBlock.prototype.getLastCommitInfo = function() { }; -/** @param {?proto.types.LastCommitInfo|undefined} value */ +/** + * @param {?proto.types.LastCommitInfo|undefined} value + * @return {!proto.types.RequestBeginBlock} returns this +*/ proto.types.RequestBeginBlock.prototype.setLastCommitInfo = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.RequestBeginBlock} returns this */ proto.types.RequestBeginBlock.prototype.clearLastCommitInfo = function() { - this.setLastCommitInfo(undefined); + return this.setLastCommitInfo(undefined); }; @@ -2837,9 +2951,12 @@ proto.types.RequestBeginBlock.prototype.getByzantineValidatorsList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.RequestBeginBlock} returns this +*/ proto.types.RequestBeginBlock.prototype.setByzantineValidatorsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -2855,9 +2972,10 @@ proto.types.RequestBeginBlock.prototype.addByzantineValidators = function(opt_va /** * Clears the list making it empty but non-null. + * @return {!proto.types.RequestBeginBlock} returns this */ proto.types.RequestBeginBlock.prototype.clearByzantineValidatorsList = function() { - this.setByzantineValidatorsList([]); + return this.setByzantineValidatorsList([]); }; @@ -2866,13 +2984,15 @@ proto.types.RequestBeginBlock.prototype.clearByzantineValidatorsList = function( if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { @@ -2882,8 +3002,8 @@ proto.types.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestCheckTx} msg The msg instance to transform. * @return {!Object} @@ -3004,9 +3124,12 @@ proto.types.RequestCheckTx.prototype.getTx_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.RequestCheckTx} returns this + */ proto.types.RequestCheckTx.prototype.setTx = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3015,13 +3138,15 @@ proto.types.RequestCheckTx.prototype.setTx = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestDeliverTx.prototype.toObject = function(opt_includeInstance) { @@ -3031,8 +3156,8 @@ proto.types.RequestDeliverTx.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestDeliverTx} msg The msg instance to transform. * @return {!Object} @@ -3153,9 +3278,12 @@ proto.types.RequestDeliverTx.prototype.getTx_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.RequestDeliverTx} returns this + */ proto.types.RequestDeliverTx.prototype.setTx = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3164,13 +3292,15 @@ proto.types.RequestDeliverTx.prototype.setTx = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestEndBlock.prototype.toObject = function(opt_includeInstance) { @@ -3180,8 +3310,8 @@ proto.types.RequestEndBlock.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestEndBlock} msg The msg instance to transform. * @return {!Object} @@ -3278,9 +3408,12 @@ proto.types.RequestEndBlock.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.RequestEndBlock} returns this + */ proto.types.RequestEndBlock.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -3289,13 +3422,15 @@ proto.types.RequestEndBlock.prototype.setHeight = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestCommit.prototype.toObject = function(opt_includeInstance) { @@ -3305,8 +3440,8 @@ proto.types.RequestCommit.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestCommit} msg The msg instance to transform. * @return {!Object} @@ -3424,13 +3559,15 @@ proto.types.Response.prototype.getValueCase = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.Response.prototype.toObject = function(opt_includeInstance) { @@ -3440,8 +3577,8 @@ proto.types.Response.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Response} msg The msg instance to transform. * @return {!Object} @@ -3695,17 +3832,21 @@ proto.types.Response.prototype.getException = function() { }; -/** @param {?proto.types.ResponseException|undefined} value */ +/** + * @param {?proto.types.ResponseException|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setException = function(value) { - jspb.Message.setOneofWrapperField(this, 1, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 1, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearException = function() { - this.setException(undefined); + return this.setException(undefined); }; @@ -3728,17 +3869,21 @@ proto.types.Response.prototype.getEcho = function() { }; -/** @param {?proto.types.ResponseEcho|undefined} value */ +/** + * @param {?proto.types.ResponseEcho|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setEcho = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 2, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearEcho = function() { - this.setEcho(undefined); + return this.setEcho(undefined); }; @@ -3761,17 +3906,21 @@ proto.types.Response.prototype.getFlush = function() { }; -/** @param {?proto.types.ResponseFlush|undefined} value */ +/** + * @param {?proto.types.ResponseFlush|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setFlush = function(value) { - jspb.Message.setOneofWrapperField(this, 3, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 3, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearFlush = function() { - this.setFlush(undefined); + return this.setFlush(undefined); }; @@ -3794,17 +3943,21 @@ proto.types.Response.prototype.getInfo = function() { }; -/** @param {?proto.types.ResponseInfo|undefined} value */ +/** + * @param {?proto.types.ResponseInfo|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setInfo = function(value) { - jspb.Message.setOneofWrapperField(this, 4, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 4, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearInfo = function() { - this.setInfo(undefined); + return this.setInfo(undefined); }; @@ -3827,17 +3980,21 @@ proto.types.Response.prototype.getSetOption = function() { }; -/** @param {?proto.types.ResponseSetOption|undefined} value */ +/** + * @param {?proto.types.ResponseSetOption|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setSetOption = function(value) { - jspb.Message.setOneofWrapperField(this, 5, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 5, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearSetOption = function() { - this.setSetOption(undefined); + return this.setSetOption(undefined); }; @@ -3860,17 +4017,21 @@ proto.types.Response.prototype.getInitChain = function() { }; -/** @param {?proto.types.ResponseInitChain|undefined} value */ +/** + * @param {?proto.types.ResponseInitChain|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setInitChain = function(value) { - jspb.Message.setOneofWrapperField(this, 6, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 6, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearInitChain = function() { - this.setInitChain(undefined); + return this.setInitChain(undefined); }; @@ -3893,17 +4054,21 @@ proto.types.Response.prototype.getQuery = function() { }; -/** @param {?proto.types.ResponseQuery|undefined} value */ +/** + * @param {?proto.types.ResponseQuery|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setQuery = function(value) { - jspb.Message.setOneofWrapperField(this, 7, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 7, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearQuery = function() { - this.setQuery(undefined); + return this.setQuery(undefined); }; @@ -3926,17 +4091,21 @@ proto.types.Response.prototype.getBeginBlock = function() { }; -/** @param {?proto.types.ResponseBeginBlock|undefined} value */ +/** + * @param {?proto.types.ResponseBeginBlock|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setBeginBlock = function(value) { - jspb.Message.setOneofWrapperField(this, 8, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 8, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearBeginBlock = function() { - this.setBeginBlock(undefined); + return this.setBeginBlock(undefined); }; @@ -3959,17 +4128,21 @@ proto.types.Response.prototype.getCheckTx = function() { }; -/** @param {?proto.types.ResponseCheckTx|undefined} value */ +/** + * @param {?proto.types.ResponseCheckTx|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setCheckTx = function(value) { - jspb.Message.setOneofWrapperField(this, 9, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 9, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearCheckTx = function() { - this.setCheckTx(undefined); + return this.setCheckTx(undefined); }; @@ -3992,17 +4165,21 @@ proto.types.Response.prototype.getDeliverTx = function() { }; -/** @param {?proto.types.ResponseDeliverTx|undefined} value */ +/** + * @param {?proto.types.ResponseDeliverTx|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setDeliverTx = function(value) { - jspb.Message.setOneofWrapperField(this, 10, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 10, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearDeliverTx = function() { - this.setDeliverTx(undefined); + return this.setDeliverTx(undefined); }; @@ -4025,17 +4202,21 @@ proto.types.Response.prototype.getEndBlock = function() { }; -/** @param {?proto.types.ResponseEndBlock|undefined} value */ +/** + * @param {?proto.types.ResponseEndBlock|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setEndBlock = function(value) { - jspb.Message.setOneofWrapperField(this, 11, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 11, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearEndBlock = function() { - this.setEndBlock(undefined); + return this.setEndBlock(undefined); }; @@ -4058,17 +4239,21 @@ proto.types.Response.prototype.getCommit = function() { }; -/** @param {?proto.types.ResponseCommit|undefined} value */ +/** + * @param {?proto.types.ResponseCommit|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setCommit = function(value) { - jspb.Message.setOneofWrapperField(this, 12, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 12, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearCommit = function() { - this.setCommit(undefined); + return this.setCommit(undefined); }; @@ -4086,13 +4271,15 @@ proto.types.Response.prototype.hasCommit = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseException.prototype.toObject = function(opt_includeInstance) { @@ -4102,8 +4289,8 @@ proto.types.ResponseException.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseException} msg The msg instance to transform. * @return {!Object} @@ -4200,9 +4387,12 @@ proto.types.ResponseException.prototype.getError = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseException} returns this + */ proto.types.ResponseException.prototype.setError = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -4211,13 +4401,15 @@ proto.types.ResponseException.prototype.setError = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseEcho.prototype.toObject = function(opt_includeInstance) { @@ -4227,8 +4419,8 @@ proto.types.ResponseEcho.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseEcho} msg The msg instance to transform. * @return {!Object} @@ -4325,9 +4517,12 @@ proto.types.ResponseEcho.prototype.getMessage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseEcho} returns this + */ proto.types.ResponseEcho.prototype.setMessage = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -4336,13 +4531,15 @@ proto.types.ResponseEcho.prototype.setMessage = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseFlush.prototype.toObject = function(opt_includeInstance) { @@ -4352,8 +4549,8 @@ proto.types.ResponseFlush.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseFlush} msg The msg instance to transform. * @return {!Object} @@ -4435,13 +4632,15 @@ proto.types.ResponseFlush.serializeBinaryToWriter = function(message, writer) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseInfo.prototype.toObject = function(opt_includeInstance) { @@ -4451,8 +4650,8 @@ proto.types.ResponseInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseInfo} msg The msg instance to transform. * @return {!Object} @@ -4585,9 +4784,12 @@ proto.types.ResponseInfo.prototype.getData = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseInfo} returns this + */ proto.types.ResponseInfo.prototype.setData = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -4600,9 +4802,12 @@ proto.types.ResponseInfo.prototype.getVersion = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseInfo} returns this + */ proto.types.ResponseInfo.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -4615,9 +4820,12 @@ proto.types.ResponseInfo.prototype.getLastBlockHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseInfo} returns this + */ proto.types.ResponseInfo.prototype.setLastBlockHeight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -4654,9 +4862,12 @@ proto.types.ResponseInfo.prototype.getLastBlockAppHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseInfo} returns this + */ proto.types.ResponseInfo.prototype.setLastBlockAppHash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -4665,13 +4876,15 @@ proto.types.ResponseInfo.prototype.setLastBlockAppHash = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseSetOption.prototype.toObject = function(opt_includeInstance) { @@ -4681,8 +4894,8 @@ proto.types.ResponseSetOption.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseSetOption} msg The msg instance to transform. * @return {!Object} @@ -4803,9 +5016,12 @@ proto.types.ResponseSetOption.prototype.getCode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseSetOption} returns this + */ proto.types.ResponseSetOption.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -4818,9 +5034,12 @@ proto.types.ResponseSetOption.prototype.getLog = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseSetOption} returns this + */ proto.types.ResponseSetOption.prototype.setLog = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -4833,9 +5052,12 @@ proto.types.ResponseSetOption.prototype.getInfo = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseSetOption} returns this + */ proto.types.ResponseSetOption.prototype.setInfo = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -4851,13 +5073,15 @@ proto.types.ResponseInitChain.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseInitChain.prototype.toObject = function(opt_includeInstance) { @@ -4867,8 +5091,8 @@ proto.types.ResponseInitChain.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseInitChain} msg The msg instance to transform. * @return {!Object} @@ -4983,17 +5207,21 @@ proto.types.ResponseInitChain.prototype.getConsensusParams = function() { }; -/** @param {?proto.types.ConsensusParams|undefined} value */ +/** + * @param {?proto.types.ConsensusParams|undefined} value + * @return {!proto.types.ResponseInitChain} returns this +*/ proto.types.ResponseInitChain.prototype.setConsensusParams = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.ResponseInitChain} returns this */ proto.types.ResponseInitChain.prototype.clearConsensusParams = function() { - this.setConsensusParams(undefined); + return this.setConsensusParams(undefined); }; @@ -5016,9 +5244,12 @@ proto.types.ResponseInitChain.prototype.getValidatorsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.ResponseInitChain} returns this +*/ proto.types.ResponseInitChain.prototype.setValidatorsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -5034,9 +5265,10 @@ proto.types.ResponseInitChain.prototype.addValidators = function(opt_value, opt_ /** * Clears the list making it empty but non-null. + * @return {!proto.types.ResponseInitChain} returns this */ proto.types.ResponseInitChain.prototype.clearValidatorsList = function() { - this.setValidatorsList([]); + return this.setValidatorsList([]); }; @@ -5045,13 +5277,15 @@ proto.types.ResponseInitChain.prototype.clearValidatorsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseQuery.prototype.toObject = function(opt_includeInstance) { @@ -5061,8 +5295,8 @@ proto.types.ResponseQuery.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseQuery} msg The msg instance to transform. * @return {!Object} @@ -5243,9 +5477,12 @@ proto.types.ResponseQuery.prototype.getCode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -5258,9 +5495,12 @@ proto.types.ResponseQuery.prototype.getLog = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setLog = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -5273,9 +5513,12 @@ proto.types.ResponseQuery.prototype.getInfo = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setInfo = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -5288,9 +5531,12 @@ proto.types.ResponseQuery.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -5327,9 +5573,12 @@ proto.types.ResponseQuery.prototype.getKey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 6, value); + return jspb.Message.setProto3BytesField(this, 6, value); }; @@ -5366,9 +5615,12 @@ proto.types.ResponseQuery.prototype.getValue_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setValue = function(value) { - jspb.Message.setProto3BytesField(this, 7, value); + return jspb.Message.setProto3BytesField(this, 7, value); }; @@ -5405,9 +5657,12 @@ proto.types.ResponseQuery.prototype.getProof_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setProof = function(value) { - jspb.Message.setProto3BytesField(this, 8, value); + return jspb.Message.setProto3BytesField(this, 8, value); }; @@ -5420,9 +5675,12 @@ proto.types.ResponseQuery.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + return jspb.Message.setProto3IntField(this, 9, value); }; @@ -5438,13 +5696,15 @@ proto.types.ResponseBeginBlock.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseBeginBlock.prototype.toObject = function(opt_includeInstance) { @@ -5454,8 +5714,8 @@ proto.types.ResponseBeginBlock.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseBeginBlock} msg The msg instance to transform. * @return {!Object} @@ -5556,9 +5816,12 @@ proto.types.ResponseBeginBlock.prototype.getTagsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.ResponseBeginBlock} returns this +*/ proto.types.ResponseBeginBlock.prototype.setTagsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -5574,9 +5837,10 @@ proto.types.ResponseBeginBlock.prototype.addTags = function(opt_value, opt_index /** * Clears the list making it empty but non-null. + * @return {!proto.types.ResponseBeginBlock} returns this */ proto.types.ResponseBeginBlock.prototype.clearTagsList = function() { - this.setTagsList([]); + return this.setTagsList([]); }; @@ -5592,13 +5856,15 @@ proto.types.ResponseCheckTx.repeatedFields_ = [7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { @@ -5608,8 +5874,8 @@ proto.types.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseCheckTx} msg The msg instance to transform. * @return {!Object} @@ -5781,9 +6047,12 @@ proto.types.ResponseCheckTx.prototype.getCode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseCheckTx} returns this + */ proto.types.ResponseCheckTx.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -5820,9 +6089,12 @@ proto.types.ResponseCheckTx.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseCheckTx} returns this + */ proto.types.ResponseCheckTx.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -5835,9 +6107,12 @@ proto.types.ResponseCheckTx.prototype.getLog = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseCheckTx} returns this + */ proto.types.ResponseCheckTx.prototype.setLog = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -5850,9 +6125,12 @@ proto.types.ResponseCheckTx.prototype.getInfo = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseCheckTx} returns this + */ proto.types.ResponseCheckTx.prototype.setInfo = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -5865,9 +6143,12 @@ proto.types.ResponseCheckTx.prototype.getGasWanted = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseCheckTx} returns this + */ proto.types.ResponseCheckTx.prototype.setGasWanted = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -5880,9 +6161,12 @@ proto.types.ResponseCheckTx.prototype.getGasUsed = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseCheckTx} returns this + */ proto.types.ResponseCheckTx.prototype.setGasUsed = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 6, value); }; @@ -5896,9 +6180,12 @@ proto.types.ResponseCheckTx.prototype.getTagsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.ResponseCheckTx} returns this +*/ proto.types.ResponseCheckTx.prototype.setTagsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -5914,9 +6201,10 @@ proto.types.ResponseCheckTx.prototype.addTags = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.types.ResponseCheckTx} returns this */ proto.types.ResponseCheckTx.prototype.clearTagsList = function() { - this.setTagsList([]); + return this.setTagsList([]); }; @@ -5932,13 +6220,15 @@ proto.types.ResponseDeliverTx.repeatedFields_ = [7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseDeliverTx.prototype.toObject = function(opt_includeInstance) { @@ -5948,8 +6238,8 @@ proto.types.ResponseDeliverTx.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseDeliverTx} msg The msg instance to transform. * @return {!Object} @@ -6121,9 +6411,12 @@ proto.types.ResponseDeliverTx.prototype.getCode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseDeliverTx} returns this + */ proto.types.ResponseDeliverTx.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -6160,9 +6453,12 @@ proto.types.ResponseDeliverTx.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseDeliverTx} returns this + */ proto.types.ResponseDeliverTx.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -6175,9 +6471,12 @@ proto.types.ResponseDeliverTx.prototype.getLog = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseDeliverTx} returns this + */ proto.types.ResponseDeliverTx.prototype.setLog = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -6190,9 +6489,12 @@ proto.types.ResponseDeliverTx.prototype.getInfo = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseDeliverTx} returns this + */ proto.types.ResponseDeliverTx.prototype.setInfo = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -6205,9 +6507,12 @@ proto.types.ResponseDeliverTx.prototype.getGasWanted = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseDeliverTx} returns this + */ proto.types.ResponseDeliverTx.prototype.setGasWanted = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -6220,9 +6525,12 @@ proto.types.ResponseDeliverTx.prototype.getGasUsed = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseDeliverTx} returns this + */ proto.types.ResponseDeliverTx.prototype.setGasUsed = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 6, value); }; @@ -6236,9 +6544,12 @@ proto.types.ResponseDeliverTx.prototype.getTagsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.ResponseDeliverTx} returns this +*/ proto.types.ResponseDeliverTx.prototype.setTagsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -6254,9 +6565,10 @@ proto.types.ResponseDeliverTx.prototype.addTags = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.types.ResponseDeliverTx} returns this */ proto.types.ResponseDeliverTx.prototype.clearTagsList = function() { - this.setTagsList([]); + return this.setTagsList([]); }; @@ -6272,13 +6584,15 @@ proto.types.ResponseEndBlock.repeatedFields_ = [1,3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseEndBlock.prototype.toObject = function(opt_includeInstance) { @@ -6288,8 +6602,8 @@ proto.types.ResponseEndBlock.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseEndBlock} msg The msg instance to transform. * @return {!Object} @@ -6419,9 +6733,12 @@ proto.types.ResponseEndBlock.prototype.getValidatorUpdatesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.ResponseEndBlock} returns this +*/ proto.types.ResponseEndBlock.prototype.setValidatorUpdatesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -6437,9 +6754,10 @@ proto.types.ResponseEndBlock.prototype.addValidatorUpdates = function(opt_value, /** * Clears the list making it empty but non-null. + * @return {!proto.types.ResponseEndBlock} returns this */ proto.types.ResponseEndBlock.prototype.clearValidatorUpdatesList = function() { - this.setValidatorUpdatesList([]); + return this.setValidatorUpdatesList([]); }; @@ -6453,17 +6771,21 @@ proto.types.ResponseEndBlock.prototype.getConsensusParamUpdates = function() { }; -/** @param {?proto.types.ConsensusParams|undefined} value */ +/** + * @param {?proto.types.ConsensusParams|undefined} value + * @return {!proto.types.ResponseEndBlock} returns this +*/ proto.types.ResponseEndBlock.prototype.setConsensusParamUpdates = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.ResponseEndBlock} returns this */ proto.types.ResponseEndBlock.prototype.clearConsensusParamUpdates = function() { - this.setConsensusParamUpdates(undefined); + return this.setConsensusParamUpdates(undefined); }; @@ -6486,9 +6808,12 @@ proto.types.ResponseEndBlock.prototype.getTagsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.ResponseEndBlock} returns this +*/ proto.types.ResponseEndBlock.prototype.setTagsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; @@ -6504,9 +6829,10 @@ proto.types.ResponseEndBlock.prototype.addTags = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.types.ResponseEndBlock} returns this */ proto.types.ResponseEndBlock.prototype.clearTagsList = function() { - this.setTagsList([]); + return this.setTagsList([]); }; @@ -6515,13 +6841,15 @@ proto.types.ResponseEndBlock.prototype.clearTagsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseCommit.prototype.toObject = function(opt_includeInstance) { @@ -6531,8 +6859,8 @@ proto.types.ResponseCommit.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseCommit} msg The msg instance to transform. * @return {!Object} @@ -6653,9 +6981,12 @@ proto.types.ResponseCommit.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseCommit} returns this + */ proto.types.ResponseCommit.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -6664,13 +6995,15 @@ proto.types.ResponseCommit.prototype.setData = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ConsensusParams.prototype.toObject = function(opt_includeInstance) { @@ -6680,8 +7013,8 @@ proto.types.ConsensusParams.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ConsensusParams} msg The msg instance to transform. * @return {!Object} @@ -6809,17 +7142,21 @@ proto.types.ConsensusParams.prototype.getBlockSize = function() { }; -/** @param {?proto.types.BlockSize|undefined} value */ +/** + * @param {?proto.types.BlockSize|undefined} value + * @return {!proto.types.ConsensusParams} returns this +*/ proto.types.ConsensusParams.prototype.setBlockSize = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.ConsensusParams} returns this */ proto.types.ConsensusParams.prototype.clearBlockSize = function() { - this.setBlockSize(undefined); + return this.setBlockSize(undefined); }; @@ -6842,17 +7179,21 @@ proto.types.ConsensusParams.prototype.getTxSize = function() { }; -/** @param {?proto.types.TxSize|undefined} value */ +/** + * @param {?proto.types.TxSize|undefined} value + * @return {!proto.types.ConsensusParams} returns this +*/ proto.types.ConsensusParams.prototype.setTxSize = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.ConsensusParams} returns this */ proto.types.ConsensusParams.prototype.clearTxSize = function() { - this.setTxSize(undefined); + return this.setTxSize(undefined); }; @@ -6875,17 +7216,21 @@ proto.types.ConsensusParams.prototype.getBlockGossip = function() { }; -/** @param {?proto.types.BlockGossip|undefined} value */ +/** + * @param {?proto.types.BlockGossip|undefined} value + * @return {!proto.types.ConsensusParams} returns this +*/ proto.types.ConsensusParams.prototype.setBlockGossip = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.ConsensusParams} returns this */ proto.types.ConsensusParams.prototype.clearBlockGossip = function() { - this.setBlockGossip(undefined); + return this.setBlockGossip(undefined); }; @@ -6903,13 +7248,15 @@ proto.types.ConsensusParams.prototype.hasBlockGossip = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.BlockSize.prototype.toObject = function(opt_includeInstance) { @@ -6919,8 +7266,8 @@ proto.types.BlockSize.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.BlockSize} msg The msg instance to transform. * @return {!Object} @@ -7029,9 +7376,12 @@ proto.types.BlockSize.prototype.getMaxBytes = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.BlockSize} returns this + */ proto.types.BlockSize.prototype.setMaxBytes = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -7044,9 +7394,12 @@ proto.types.BlockSize.prototype.getMaxGas = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.BlockSize} returns this + */ proto.types.BlockSize.prototype.setMaxGas = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -7055,13 +7408,15 @@ proto.types.BlockSize.prototype.setMaxGas = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.TxSize.prototype.toObject = function(opt_includeInstance) { @@ -7071,8 +7426,8 @@ proto.types.TxSize.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.TxSize} msg The msg instance to transform. * @return {!Object} @@ -7181,9 +7536,12 @@ proto.types.TxSize.prototype.getMaxBytes = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.TxSize} returns this + */ proto.types.TxSize.prototype.setMaxBytes = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -7196,9 +7554,12 @@ proto.types.TxSize.prototype.getMaxGas = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.TxSize} returns this + */ proto.types.TxSize.prototype.setMaxGas = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -7207,13 +7568,15 @@ proto.types.TxSize.prototype.setMaxGas = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.BlockGossip.prototype.toObject = function(opt_includeInstance) { @@ -7223,8 +7586,8 @@ proto.types.BlockGossip.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.BlockGossip} msg The msg instance to transform. * @return {!Object} @@ -7321,9 +7684,12 @@ proto.types.BlockGossip.prototype.getBlockPartSizeBytes = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.BlockGossip} returns this + */ proto.types.BlockGossip.prototype.setBlockPartSizeBytes = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -7339,13 +7705,15 @@ proto.types.LastCommitInfo.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.LastCommitInfo.prototype.toObject = function(opt_includeInstance) { @@ -7355,8 +7723,8 @@ proto.types.LastCommitInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.LastCommitInfo} msg The msg instance to transform. * @return {!Object} @@ -7468,9 +7836,12 @@ proto.types.LastCommitInfo.prototype.getRound = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.LastCommitInfo} returns this + */ proto.types.LastCommitInfo.prototype.setRound = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -7484,9 +7855,12 @@ proto.types.LastCommitInfo.prototype.getVotesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.LastCommitInfo} returns this +*/ proto.types.LastCommitInfo.prototype.setVotesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -7502,9 +7876,10 @@ proto.types.LastCommitInfo.prototype.addVotes = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.types.LastCommitInfo} returns this */ proto.types.LastCommitInfo.prototype.clearVotesList = function() { - this.setVotesList([]); + return this.setVotesList([]); }; @@ -7513,13 +7888,15 @@ proto.types.LastCommitInfo.prototype.clearVotesList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.Header.prototype.toObject = function(opt_includeInstance) { @@ -7529,8 +7906,8 @@ proto.types.Header.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Header} msg The msg instance to transform. * @return {!Object} @@ -7799,9 +8176,12 @@ proto.types.Header.prototype.getChainId = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setChainId = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -7814,9 +8194,12 @@ proto.types.Header.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -7830,17 +8213,21 @@ proto.types.Header.prototype.getTime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.types.Header} returns this +*/ proto.types.Header.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Header} returns this */ proto.types.Header.prototype.clearTime = function() { - this.setTime(undefined); + return this.setTime(undefined); }; @@ -7862,9 +8249,12 @@ proto.types.Header.prototype.getNumTxs = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setNumTxs = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -7877,9 +8267,12 @@ proto.types.Header.prototype.getTotalTxs = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setTotalTxs = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -7893,17 +8286,21 @@ proto.types.Header.prototype.getLastBlockId = function() { }; -/** @param {?proto.types.BlockID|undefined} value */ +/** + * @param {?proto.types.BlockID|undefined} value + * @return {!proto.types.Header} returns this +*/ proto.types.Header.prototype.setLastBlockId = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Header} returns this */ proto.types.Header.prototype.clearLastBlockId = function() { - this.setLastBlockId(undefined); + return this.setLastBlockId(undefined); }; @@ -7949,9 +8346,12 @@ proto.types.Header.prototype.getLastCommitHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setLastCommitHash = function(value) { - jspb.Message.setProto3BytesField(this, 7, value); + return jspb.Message.setProto3BytesField(this, 7, value); }; @@ -7988,9 +8388,12 @@ proto.types.Header.prototype.getDataHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setDataHash = function(value) { - jspb.Message.setProto3BytesField(this, 8, value); + return jspb.Message.setProto3BytesField(this, 8, value); }; @@ -8027,9 +8430,12 @@ proto.types.Header.prototype.getValidatorsHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setValidatorsHash = function(value) { - jspb.Message.setProto3BytesField(this, 9, value); + return jspb.Message.setProto3BytesField(this, 9, value); }; @@ -8066,9 +8472,12 @@ proto.types.Header.prototype.getNextValidatorsHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setNextValidatorsHash = function(value) { - jspb.Message.setProto3BytesField(this, 10, value); + return jspb.Message.setProto3BytesField(this, 10, value); }; @@ -8105,9 +8514,12 @@ proto.types.Header.prototype.getConsensusHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setConsensusHash = function(value) { - jspb.Message.setProto3BytesField(this, 11, value); + return jspb.Message.setProto3BytesField(this, 11, value); }; @@ -8144,9 +8556,12 @@ proto.types.Header.prototype.getAppHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setAppHash = function(value) { - jspb.Message.setProto3BytesField(this, 12, value); + return jspb.Message.setProto3BytesField(this, 12, value); }; @@ -8183,9 +8598,12 @@ proto.types.Header.prototype.getLastResultsHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setLastResultsHash = function(value) { - jspb.Message.setProto3BytesField(this, 13, value); + return jspb.Message.setProto3BytesField(this, 13, value); }; @@ -8222,9 +8640,12 @@ proto.types.Header.prototype.getEvidenceHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setEvidenceHash = function(value) { - jspb.Message.setProto3BytesField(this, 14, value); + return jspb.Message.setProto3BytesField(this, 14, value); }; @@ -8261,9 +8682,12 @@ proto.types.Header.prototype.getProposerAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setProposerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 15, value); + return jspb.Message.setProto3BytesField(this, 15, value); }; @@ -8272,13 +8696,15 @@ proto.types.Header.prototype.setProposerAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.BlockID.prototype.toObject = function(opt_includeInstance) { @@ -8288,8 +8714,8 @@ proto.types.BlockID.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.BlockID} msg The msg instance to transform. * @return {!Object} @@ -8424,9 +8850,12 @@ proto.types.BlockID.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.BlockID} returns this + */ proto.types.BlockID.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -8440,17 +8869,21 @@ proto.types.BlockID.prototype.getPartsHeader = function() { }; -/** @param {?proto.types.PartSetHeader|undefined} value */ +/** + * @param {?proto.types.PartSetHeader|undefined} value + * @return {!proto.types.BlockID} returns this +*/ proto.types.BlockID.prototype.setPartsHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.BlockID} returns this */ proto.types.BlockID.prototype.clearPartsHeader = function() { - this.setPartsHeader(undefined); + return this.setPartsHeader(undefined); }; @@ -8468,13 +8901,15 @@ proto.types.BlockID.prototype.hasPartsHeader = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.PartSetHeader.prototype.toObject = function(opt_includeInstance) { @@ -8484,8 +8919,8 @@ proto.types.PartSetHeader.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.PartSetHeader} msg The msg instance to transform. * @return {!Object} @@ -8594,9 +9029,12 @@ proto.types.PartSetHeader.prototype.getTotal = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.PartSetHeader} returns this + */ proto.types.PartSetHeader.prototype.setTotal = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -8633,9 +9071,12 @@ proto.types.PartSetHeader.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.PartSetHeader} returns this + */ proto.types.PartSetHeader.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -8644,13 +9085,15 @@ proto.types.PartSetHeader.prototype.setHash = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.Validator.prototype.toObject = function(opt_includeInstance) { @@ -8660,8 +9103,8 @@ proto.types.Validator.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Validator} msg The msg instance to transform. * @return {!Object} @@ -8794,9 +9237,12 @@ proto.types.Validator.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Validator} returns this + */ proto.types.Validator.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -8809,9 +9255,12 @@ proto.types.Validator.prototype.getPower = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.Validator} returns this + */ proto.types.Validator.prototype.setPower = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -8820,13 +9269,15 @@ proto.types.Validator.prototype.setPower = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ValidatorUpdate.prototype.toObject = function(opt_includeInstance) { @@ -8836,8 +9287,8 @@ proto.types.ValidatorUpdate.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ValidatorUpdate} msg The msg instance to transform. * @return {!Object} @@ -8949,17 +9400,21 @@ proto.types.ValidatorUpdate.prototype.getPubKey = function() { }; -/** @param {?proto.types.PubKey|undefined} value */ +/** + * @param {?proto.types.PubKey|undefined} value + * @return {!proto.types.ValidatorUpdate} returns this +*/ proto.types.ValidatorUpdate.prototype.setPubKey = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.ValidatorUpdate} returns this */ proto.types.ValidatorUpdate.prototype.clearPubKey = function() { - this.setPubKey(undefined); + return this.setPubKey(undefined); }; @@ -8981,9 +9436,12 @@ proto.types.ValidatorUpdate.prototype.getPower = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ValidatorUpdate} returns this + */ proto.types.ValidatorUpdate.prototype.setPower = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -8992,13 +9450,15 @@ proto.types.ValidatorUpdate.prototype.setPower = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.VoteInfo.prototype.toObject = function(opt_includeInstance) { @@ -9008,8 +9468,8 @@ proto.types.VoteInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.VoteInfo} msg The msg instance to transform. * @return {!Object} @@ -9018,7 +9478,7 @@ proto.types.VoteInfo.prototype.toObject = function(opt_includeInstance) { proto.types.VoteInfo.toObject = function(includeInstance, msg) { var f, obj = { validator: (f = msg.getValidator()) && proto.types.Validator.toObject(includeInstance, f), - signedLastBlock: jspb.Message.getFieldWithDefault(msg, 2, false) + signedLastBlock: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -9121,17 +9581,21 @@ proto.types.VoteInfo.prototype.getValidator = function() { }; -/** @param {?proto.types.Validator|undefined} value */ +/** + * @param {?proto.types.Validator|undefined} value + * @return {!proto.types.VoteInfo} returns this +*/ proto.types.VoteInfo.prototype.setValidator = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.VoteInfo} returns this */ proto.types.VoteInfo.prototype.clearValidator = function() { - this.setValidator(undefined); + return this.setValidator(undefined); }; @@ -9146,18 +9610,19 @@ proto.types.VoteInfo.prototype.hasValidator = function() { /** * optional bool signed_last_block = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.types.VoteInfo.prototype.getSignedLastBlock = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.types.VoteInfo} returns this + */ proto.types.VoteInfo.prototype.setSignedLastBlock = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -9166,13 +9631,15 @@ proto.types.VoteInfo.prototype.setSignedLastBlock = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.PubKey.prototype.toObject = function(opt_includeInstance) { @@ -9182,8 +9649,8 @@ proto.types.PubKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.PubKey} msg The msg instance to transform. * @return {!Object} @@ -9292,9 +9759,12 @@ proto.types.PubKey.prototype.getType = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.PubKey} returns this + */ proto.types.PubKey.prototype.setType = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -9331,9 +9801,12 @@ proto.types.PubKey.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.PubKey} returns this + */ proto.types.PubKey.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -9342,13 +9815,15 @@ proto.types.PubKey.prototype.setData = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.Evidence.prototype.toObject = function(opt_includeInstance) { @@ -9358,8 +9833,8 @@ proto.types.Evidence.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Evidence} msg The msg instance to transform. * @return {!Object} @@ -9508,9 +9983,12 @@ proto.types.Evidence.prototype.getType = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.Evidence} returns this + */ proto.types.Evidence.prototype.setType = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -9524,17 +10002,21 @@ proto.types.Evidence.prototype.getValidator = function() { }; -/** @param {?proto.types.Validator|undefined} value */ +/** + * @param {?proto.types.Validator|undefined} value + * @return {!proto.types.Evidence} returns this +*/ proto.types.Evidence.prototype.setValidator = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Evidence} returns this */ proto.types.Evidence.prototype.clearValidator = function() { - this.setValidator(undefined); + return this.setValidator(undefined); }; @@ -9556,9 +10038,12 @@ proto.types.Evidence.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.Evidence} returns this + */ proto.types.Evidence.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -9572,17 +10057,21 @@ proto.types.Evidence.prototype.getTime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.types.Evidence} returns this +*/ proto.types.Evidence.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Evidence} returns this */ proto.types.Evidence.prototype.clearTime = function() { - this.setTime(undefined); + return this.setTime(undefined); }; @@ -9604,9 +10093,12 @@ proto.types.Evidence.prototype.getTotalVotingPower = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.Evidence} returns this + */ proto.types.Evidence.prototype.setTotalVotingPower = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; diff --git a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js index 50a8dd5ff..0c37c73c4 100644 --- a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js +++ b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js @@ -1,3 +1,4 @@ +// source: github.com/tendermint/tendermint/libs/common/types.proto /** * @fileoverview * @enhanceable @@ -62,13 +63,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.common.KVPair.prototype.toObject = function(opt_includeInstance) { @@ -78,8 +81,8 @@ proto.common.KVPair.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.common.KVPair} msg The msg instance to transform. * @return {!Object} @@ -212,9 +215,12 @@ proto.common.KVPair.prototype.getKey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.common.KVPair} returns this + */ proto.common.KVPair.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -251,9 +257,12 @@ proto.common.KVPair.prototype.getValue_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.common.KVPair} returns this + */ proto.common.KVPair.prototype.setValue = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -262,13 +271,15 @@ proto.common.KVPair.prototype.setValue = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.common.KI64Pair.prototype.toObject = function(opt_includeInstance) { @@ -278,8 +289,8 @@ proto.common.KI64Pair.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.common.KI64Pair} msg The msg instance to transform. * @return {!Object} @@ -412,9 +423,12 @@ proto.common.KI64Pair.prototype.getKey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.common.KI64Pair} returns this + */ proto.common.KI64Pair.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -427,9 +441,12 @@ proto.common.KI64Pair.prototype.getValue = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.common.KI64Pair} returns this + */ proto.common.KI64Pair.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/google/protobuf/descriptor_pb.js b/js/proto/google/protobuf/descriptor_pb.js index ded89114d..b15f0941d 100644 --- a/js/proto/google/protobuf/descriptor_pb.js +++ b/js/proto/google/protobuf/descriptor_pb.js @@ -1,3 +1,4 @@ +// source: google/protobuf/descriptor.proto /** * @fileoverview * @enhanceable @@ -893,13 +894,15 @@ proto.google.protobuf.FileDescriptorSet.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FileDescriptorSet.prototype.toObject = function(opt_includeInstance) { @@ -909,8 +912,8 @@ proto.google.protobuf.FileDescriptorSet.prototype.toObject = function(opt_includ /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FileDescriptorSet} msg The msg instance to transform. * @return {!Object} @@ -1011,9 +1014,12 @@ proto.google.protobuf.FileDescriptorSet.prototype.getFileList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorSet} returns this +*/ proto.google.protobuf.FileDescriptorSet.prototype.setFileList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -1029,9 +1035,10 @@ proto.google.protobuf.FileDescriptorSet.prototype.addFile = function(opt_value, /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorSet} returns this */ proto.google.protobuf.FileDescriptorSet.prototype.clearFileList = function() { - this.setFileList([]); + return this.setFileList([]); }; @@ -1047,13 +1054,15 @@ proto.google.protobuf.FileDescriptorProto.repeatedFields_ = [3,10,11,4,5,6,7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -1063,8 +1072,8 @@ proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_incl /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FileDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -1072,11 +1081,11 @@ proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_incl */ proto.google.protobuf.FileDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), - pb_package: jspb.Message.getField(msg, 2), - dependencyList: jspb.Message.getRepeatedField(msg, 3), - publicDependencyList: jspb.Message.getRepeatedField(msg, 10), - weakDependencyList: jspb.Message.getRepeatedField(msg, 11), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + pb_package: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + dependencyList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + publicDependencyList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, + weakDependencyList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, messageTypeList: jspb.Message.toObjectList(msg.getMessageTypeList(), proto.google.protobuf.DescriptorProto.toObject, includeInstance), enumTypeList: jspb.Message.toObjectList(msg.getEnumTypeList(), @@ -1087,7 +1096,7 @@ proto.google.protobuf.FileDescriptorProto.toObject = function(includeInstance, m proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), options: (f = msg.getOptions()) && proto.google.protobuf.FileOptions.toObject(includeInstance, f), sourceCodeInfo: (f = msg.getSourceCodeInfo()) && proto.google.protobuf.SourceCodeInfo.toObject(includeInstance, f), - syntax: jspb.Message.getField(msg, 12) + syntax: (f = jspb.Message.getField(msg, 12)) == null ? undefined : f }; if (includeInstance) { @@ -1309,17 +1318,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -1341,17 +1354,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getPackage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setPackage = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearPackage = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -1373,26 +1390,31 @@ proto.google.protobuf.FileDescriptorProto.prototype.getDependencyList = function }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setDependencyList = function(value) { - jspb.Message.setField(this, 3, value || []); + return jspb.Message.setField(this, 3, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.addDependency = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 3, value, opt_index); + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearDependencyList = function() { - this.setDependencyList([]); + return this.setDependencyList([]); }; @@ -1405,26 +1427,31 @@ proto.google.protobuf.FileDescriptorProto.prototype.getPublicDependencyList = fu }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setPublicDependencyList = function(value) { - jspb.Message.setField(this, 10, value || []); + return jspb.Message.setField(this, 10, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.addPublicDependency = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 10, value, opt_index); + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearPublicDependencyList = function() { - this.setPublicDependencyList([]); + return this.setPublicDependencyList([]); }; @@ -1437,26 +1464,31 @@ proto.google.protobuf.FileDescriptorProto.prototype.getWeakDependencyList = func }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setWeakDependencyList = function(value) { - jspb.Message.setField(this, 11, value || []); + return jspb.Message.setField(this, 11, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.addWeakDependency = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 11, value, opt_index); + return jspb.Message.addToRepeatedField(this, 11, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearWeakDependencyList = function() { - this.setWeakDependencyList([]); + return this.setWeakDependencyList([]); }; @@ -1470,9 +1502,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.getMessageTypeList = functio }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setMessageTypeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -1488,9 +1523,10 @@ proto.google.protobuf.FileDescriptorProto.prototype.addMessageType = function(op /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearMessageTypeList = function() { - this.setMessageTypeList([]); + return this.setMessageTypeList([]); }; @@ -1504,9 +1540,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.getEnumTypeList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setEnumTypeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); + return jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -1522,9 +1561,10 @@ proto.google.protobuf.FileDescriptorProto.prototype.addEnumType = function(opt_v /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearEnumTypeList = function() { - this.setEnumTypeList([]); + return this.setEnumTypeList([]); }; @@ -1538,9 +1578,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.getServiceList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setServiceList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 6, value); + return jspb.Message.setRepeatedWrapperField(this, 6, value); }; @@ -1556,9 +1599,10 @@ proto.google.protobuf.FileDescriptorProto.prototype.addService = function(opt_va /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearServiceList = function() { - this.setServiceList([]); + return this.setServiceList([]); }; @@ -1572,9 +1616,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.getExtensionList = function( }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setExtensionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -1590,9 +1637,10 @@ proto.google.protobuf.FileDescriptorProto.prototype.addExtension$ = function(opt /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearExtensionList = function() { - this.setExtensionList([]); + return this.setExtensionList([]); }; @@ -1606,17 +1654,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.FileOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.FileOptions|undefined} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 8, value); + return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -1639,17 +1691,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getSourceCodeInfo = function }; -/** @param {?proto.google.protobuf.SourceCodeInfo|undefined} value */ +/** + * @param {?proto.google.protobuf.SourceCodeInfo|undefined} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setSourceCodeInfo = function(value) { - jspb.Message.setWrapperField(this, 9, value); + return jspb.Message.setWrapperField(this, 9, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearSourceCodeInfo = function() { - this.setSourceCodeInfo(undefined); + return this.setSourceCodeInfo(undefined); }; @@ -1671,17 +1727,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getSyntax = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setSyntax = function(value) { - jspb.Message.setField(this, 12, value); + return jspb.Message.setField(this, 12, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearSyntax = function() { - jspb.Message.setField(this, 12, undefined); + return jspb.Message.setField(this, 12, undefined); }; @@ -1706,13 +1766,15 @@ proto.google.protobuf.DescriptorProto.repeatedFields_ = [2,6,3,4,5,8,9,10]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -1722,8 +1784,8 @@ proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeI /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.DescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -1731,7 +1793,7 @@ proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeI */ proto.google.protobuf.DescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, fieldList: jspb.Message.toObjectList(msg.getFieldList(), proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), extensionList: jspb.Message.toObjectList(msg.getExtensionList(), @@ -1747,7 +1809,7 @@ proto.google.protobuf.DescriptorProto.toObject = function(includeInstance, msg) options: (f = msg.getOptions()) && proto.google.protobuf.MessageOptions.toObject(includeInstance, f), reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), proto.google.protobuf.DescriptorProto.ReservedRange.toObject, includeInstance), - reservedNameList: jspb.Message.getRepeatedField(msg, 10) + reservedNameList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f }; if (includeInstance) { @@ -1947,13 +2009,15 @@ proto.google.protobuf.DescriptorProto.serializeBinaryToWriter = function(message if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = function(opt_includeInstance) { @@ -1963,8 +2027,8 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = functi /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} msg The msg instance to transform. * @return {!Object} @@ -1972,8 +2036,8 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = functi */ proto.google.protobuf.DescriptorProto.ExtensionRange.toObject = function(includeInstance, msg) { var f, obj = { - start: jspb.Message.getField(msg, 1), - end: jspb.Message.getField(msg, 2), + start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.ExtensionRangeOptions.toObject(includeInstance, f) }; @@ -2087,17 +2151,21 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getStart = functi }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setStart = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearStart = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -2119,17 +2187,21 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getEnd = function }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setEnd = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearEnd = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -2152,17 +2224,21 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getOptions = func }; -/** @param {?proto.google.protobuf.ExtensionRangeOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.ExtensionRangeOptions|undefined} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this +*/ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -2180,13 +2256,15 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasOptions = func if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = function(opt_includeInstance) { @@ -2196,8 +2274,8 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = functio /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} msg The msg instance to transform. * @return {!Object} @@ -2205,8 +2283,8 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = functio */ proto.google.protobuf.DescriptorProto.ReservedRange.toObject = function(includeInstance, msg) { var f, obj = { - start: jspb.Message.getField(msg, 1), - end: jspb.Message.getField(msg, 2) + start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -2306,17 +2384,21 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getStart = functio }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setStart = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearStart = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -2338,17 +2420,21 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getEnd = function( }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setEnd = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearEnd = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -2370,17 +2456,21 @@ proto.google.protobuf.DescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -2403,9 +2493,12 @@ proto.google.protobuf.DescriptorProto.prototype.getFieldList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setFieldList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -2421,9 +2514,10 @@ proto.google.protobuf.DescriptorProto.prototype.addField = function(opt_value, o /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearFieldList = function() { - this.setFieldList([]); + return this.setFieldList([]); }; @@ -2437,9 +2531,12 @@ proto.google.protobuf.DescriptorProto.prototype.getExtensionList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setExtensionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 6, value); + return jspb.Message.setRepeatedWrapperField(this, 6, value); }; @@ -2455,9 +2552,10 @@ proto.google.protobuf.DescriptorProto.prototype.addExtension$ = function(opt_val /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearExtensionList = function() { - this.setExtensionList([]); + return this.setExtensionList([]); }; @@ -2471,9 +2569,12 @@ proto.google.protobuf.DescriptorProto.prototype.getNestedTypeList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setNestedTypeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; @@ -2489,9 +2590,10 @@ proto.google.protobuf.DescriptorProto.prototype.addNestedType = function(opt_val /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearNestedTypeList = function() { - this.setNestedTypeList([]); + return this.setNestedTypeList([]); }; @@ -2505,9 +2607,12 @@ proto.google.protobuf.DescriptorProto.prototype.getEnumTypeList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setEnumTypeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -2523,9 +2628,10 @@ proto.google.protobuf.DescriptorProto.prototype.addEnumType = function(opt_value /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearEnumTypeList = function() { - this.setEnumTypeList([]); + return this.setEnumTypeList([]); }; @@ -2539,9 +2645,12 @@ proto.google.protobuf.DescriptorProto.prototype.getExtensionRangeList = function }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setExtensionRangeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); + return jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -2557,9 +2666,10 @@ proto.google.protobuf.DescriptorProto.prototype.addExtensionRange = function(opt /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearExtensionRangeList = function() { - this.setExtensionRangeList([]); + return this.setExtensionRangeList([]); }; @@ -2573,9 +2683,12 @@ proto.google.protobuf.DescriptorProto.prototype.getOneofDeclList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setOneofDeclList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 8, value); + return jspb.Message.setRepeatedWrapperField(this, 8, value); }; @@ -2591,9 +2704,10 @@ proto.google.protobuf.DescriptorProto.prototype.addOneofDecl = function(opt_valu /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearOneofDeclList = function() { - this.setOneofDeclList([]); + return this.setOneofDeclList([]); }; @@ -2607,17 +2721,21 @@ proto.google.protobuf.DescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.MessageOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.MessageOptions|undefined} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 7, value); + return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -2640,9 +2758,12 @@ proto.google.protobuf.DescriptorProto.prototype.getReservedRangeList = function( }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setReservedRangeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 9, value); + return jspb.Message.setRepeatedWrapperField(this, 9, value); }; @@ -2658,9 +2779,10 @@ proto.google.protobuf.DescriptorProto.prototype.addReservedRange = function(opt_ /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearReservedRangeList = function() { - this.setReservedRangeList([]); + return this.setReservedRangeList([]); }; @@ -2673,26 +2795,31 @@ proto.google.protobuf.DescriptorProto.prototype.getReservedNameList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.setReservedNameList = function(value) { - jspb.Message.setField(this, 10, value || []); + return jspb.Message.setField(this, 10, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.addReservedName = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 10, value, opt_index); + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearReservedNameList = function() { - this.setReservedNameList([]); + return this.setReservedNameList([]); }; @@ -2708,13 +2835,15 @@ proto.google.protobuf.ExtensionRangeOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.ExtensionRangeOptions.prototype.toObject = function(opt_includeInstance) { @@ -2724,8 +2853,8 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.toObject = function(opt_in /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.ExtensionRangeOptions} msg The msg instance to transform. * @return {!Object} @@ -2834,9 +2963,12 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.getUninterpretedOptionList }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this +*/ proto.google.protobuf.ExtensionRangeOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -2852,9 +2984,10 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.addUninterpretedOption = f /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this */ proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -2863,13 +2996,15 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionLi if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -2879,8 +3014,8 @@ proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_inc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FieldDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -2888,15 +3023,15 @@ proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_inc */ proto.google.protobuf.FieldDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), - number: jspb.Message.getField(msg, 3), - label: jspb.Message.getField(msg, 4), - type: jspb.Message.getField(msg, 5), - typeName: jspb.Message.getField(msg, 6), - extendee: jspb.Message.getField(msg, 2), - defaultValue: jspb.Message.getField(msg, 7), - oneofIndex: jspb.Message.getField(msg, 9), - jsonName: jspb.Message.getField(msg, 10), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + number: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + label: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + type: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + typeName: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f, + extendee: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + defaultValue: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f, + oneofIndex: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f, + jsonName: (f = jspb.Message.getField(msg, 10)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.FieldOptions.toObject(includeInstance, f) }; @@ -3120,17 +3255,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -3152,17 +3291,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getNumber = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setNumber = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearNumber = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -3184,17 +3327,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getLabel = function() { }; -/** @param {!proto.google.protobuf.FieldDescriptorProto.Label} value */ +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Label} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setLabel = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearLabel = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -3216,17 +3363,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getType = function() { }; -/** @param {!proto.google.protobuf.FieldDescriptorProto.Type} value */ +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Type} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setType = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearType = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; @@ -3248,17 +3399,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getTypeName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setTypeName = function(value) { - jspb.Message.setField(this, 6, value); + return jspb.Message.setField(this, 6, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearTypeName = function() { - jspb.Message.setField(this, 6, undefined); + return jspb.Message.setField(this, 6, undefined); }; @@ -3280,17 +3435,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getExtendee = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setExtendee = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearExtendee = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -3312,17 +3471,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getDefaultValue = function( }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setDefaultValue = function(value) { - jspb.Message.setField(this, 7, value); + return jspb.Message.setField(this, 7, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearDefaultValue = function() { - jspb.Message.setField(this, 7, undefined); + return jspb.Message.setField(this, 7, undefined); }; @@ -3344,17 +3507,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getOneofIndex = function() }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setOneofIndex = function(value) { - jspb.Message.setField(this, 9, value); + return jspb.Message.setField(this, 9, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearOneofIndex = function() { - jspb.Message.setField(this, 9, undefined); + return jspb.Message.setField(this, 9, undefined); }; @@ -3376,17 +3543,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getJsonName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setJsonName = function(value) { - jspb.Message.setField(this, 10, value); + return jspb.Message.setField(this, 10, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearJsonName = function() { - jspb.Message.setField(this, 10, undefined); + return jspb.Message.setField(this, 10, undefined); }; @@ -3409,17 +3580,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.FieldOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.FieldOptions|undefined} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this +*/ proto.google.protobuf.FieldDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 8, value); + return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -3437,13 +3612,15 @@ proto.google.protobuf.FieldDescriptorProto.prototype.hasOptions = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -3453,8 +3630,8 @@ proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_inc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.OneofDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -3462,7 +3639,7 @@ proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_inc */ proto.google.protobuf.OneofDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.OneofOptions.toObject(includeInstance, f) }; @@ -3565,17 +3742,21 @@ proto.google.protobuf.OneofDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this + */ proto.google.protobuf.OneofDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this */ proto.google.protobuf.OneofDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -3598,17 +3779,21 @@ proto.google.protobuf.OneofDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.OneofOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.OneofOptions|undefined} value + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this +*/ proto.google.protobuf.OneofDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this */ proto.google.protobuf.OneofDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -3633,13 +3818,15 @@ proto.google.protobuf.EnumDescriptorProto.repeatedFields_ = [2,4,5]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -3649,8 +3836,8 @@ proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_incl /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -3658,13 +3845,13 @@ proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_incl */ proto.google.protobuf.EnumDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, valueList: jspb.Message.toObjectList(msg.getValueList(), proto.google.protobuf.EnumValueDescriptorProto.toObject, includeInstance), options: (f = msg.getOptions()) && proto.google.protobuf.EnumOptions.toObject(includeInstance, f), reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject, includeInstance), - reservedNameList: jspb.Message.getRepeatedField(msg, 5) + reservedNameList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f }; if (includeInstance) { @@ -3799,13 +3986,15 @@ proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter = function(mes if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = function(opt_includeInstance) { @@ -3815,8 +4004,8 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} msg The msg instance to transform. * @return {!Object} @@ -3824,8 +4013,8 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject = function(includeInstance, msg) { var f, obj = { - start: jspb.Message.getField(msg, 1), - end: jspb.Message.getField(msg, 2) + start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -3925,17 +4114,21 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getStart = }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setStart = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearStart = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -3957,17 +4150,21 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getEnd = f }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setEnd = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearEnd = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -3989,17 +4186,21 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ proto.google.protobuf.EnumDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -4022,9 +4223,12 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getValueList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ proto.google.protobuf.EnumDescriptorProto.prototype.setValueList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -4040,9 +4244,10 @@ proto.google.protobuf.EnumDescriptorProto.prototype.addValue = function(opt_valu /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.clearValueList = function() { - this.setValueList([]); + return this.setValueList([]); }; @@ -4056,17 +4261,21 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.EnumOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.EnumOptions|undefined} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ proto.google.protobuf.EnumDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -4089,9 +4298,12 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getReservedRangeList = funct }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ proto.google.protobuf.EnumDescriptorProto.prototype.setReservedRangeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -4107,9 +4319,10 @@ proto.google.protobuf.EnumDescriptorProto.prototype.addReservedRange = function( /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedRangeList = function() { - this.setReservedRangeList([]); + return this.setReservedRangeList([]); }; @@ -4122,26 +4335,31 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getReservedNameList = functi }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ proto.google.protobuf.EnumDescriptorProto.prototype.setReservedNameList = function(value) { - jspb.Message.setField(this, 5, value || []); + return jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.addReservedName = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 5, value, opt_index); + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedNameList = function() { - this.setReservedNameList([]); + return this.setReservedNameList([]); }; @@ -4150,13 +4368,15 @@ proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedNameList = func if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -4166,8 +4386,8 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumValueDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -4175,8 +4395,8 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt */ proto.google.protobuf.EnumValueDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), - number: jspb.Message.getField(msg, 2), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + number: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.EnumValueOptions.toObject(includeInstance, f) }; @@ -4290,17 +4510,21 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ proto.google.protobuf.EnumValueDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this */ proto.google.protobuf.EnumValueDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -4322,17 +4546,21 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.getNumber = function() }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ proto.google.protobuf.EnumValueDescriptorProto.prototype.setNumber = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this */ proto.google.protobuf.EnumValueDescriptorProto.prototype.clearNumber = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -4355,17 +4583,21 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.getOptions = function() }; -/** @param {?proto.google.protobuf.EnumValueOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.EnumValueOptions|undefined} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this +*/ proto.google.protobuf.EnumValueDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this */ proto.google.protobuf.EnumValueDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -4390,13 +4622,15 @@ proto.google.protobuf.ServiceDescriptorProto.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -4406,8 +4640,8 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_i /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.ServiceDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -4415,7 +4649,7 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_i */ proto.google.protobuf.ServiceDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, methodList: jspb.Message.toObjectList(msg.getMethodList(), proto.google.protobuf.MethodDescriptorProto.toObject, includeInstance), options: (f = msg.getOptions()) && proto.google.protobuf.ServiceOptions.toObject(includeInstance, f) @@ -4533,17 +4767,21 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ proto.google.protobuf.ServiceDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this */ proto.google.protobuf.ServiceDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -4566,9 +4804,12 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.getMethodList = function( }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this +*/ proto.google.protobuf.ServiceDescriptorProto.prototype.setMethodList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -4584,9 +4825,10 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.addMethod = function(opt_ /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this */ proto.google.protobuf.ServiceDescriptorProto.prototype.clearMethodList = function() { - this.setMethodList([]); + return this.setMethodList([]); }; @@ -4600,17 +4842,21 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.ServiceOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.ServiceOptions|undefined} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this +*/ proto.google.protobuf.ServiceDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this */ proto.google.protobuf.ServiceDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -4628,13 +4874,15 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.hasOptions = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -4644,8 +4892,8 @@ proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_in /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.MethodDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -4653,12 +4901,12 @@ proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_in */ proto.google.protobuf.MethodDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), - inputType: jspb.Message.getField(msg, 2), - outputType: jspb.Message.getField(msg, 3), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + inputType: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + outputType: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.MethodOptions.toObject(includeInstance, f), - clientStreaming: jspb.Message.getFieldWithDefault(msg, 5, false), - serverStreaming: jspb.Message.getFieldWithDefault(msg, 6, false) + clientStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + serverStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -4804,17 +5052,21 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this */ proto.google.protobuf.MethodDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -4836,17 +5088,21 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getInputType = function() }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setInputType = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this */ proto.google.protobuf.MethodDescriptorProto.prototype.clearInputType = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -4868,17 +5124,21 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getOutputType = function() }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setOutputType = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this */ proto.google.protobuf.MethodDescriptorProto.prototype.clearOutputType = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -4901,17 +5161,21 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.MethodOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.MethodOptions|undefined} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this +*/ proto.google.protobuf.MethodDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this */ proto.google.protobuf.MethodDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -4926,26 +5190,28 @@ proto.google.protobuf.MethodDescriptorProto.prototype.hasOptions = function() { /** * optional bool client_streaming = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MethodDescriptorProto.prototype.getClientStreaming = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setClientStreaming = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this */ proto.google.protobuf.MethodDescriptorProto.prototype.clearClientStreaming = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; @@ -4960,26 +5226,28 @@ proto.google.protobuf.MethodDescriptorProto.prototype.hasClientStreaming = funct /** * optional bool server_streaming = 6; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MethodDescriptorProto.prototype.getServerStreaming = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setServerStreaming = function(value) { - jspb.Message.setField(this, 6, value); + return jspb.Message.setField(this, 6, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this */ proto.google.protobuf.MethodDescriptorProto.prototype.clearServerStreaming = function() { - jspb.Message.setField(this, 6, undefined); + return jspb.Message.setField(this, 6, undefined); }; @@ -5004,13 +5272,15 @@ proto.google.protobuf.FileOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInstance) { @@ -5020,8 +5290,8 @@ proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FileOptions} msg The msg instance to transform. * @return {!Object} @@ -5029,26 +5299,26 @@ proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInsta */ proto.google.protobuf.FileOptions.toObject = function(includeInstance, msg) { var f, obj = { - javaPackage: jspb.Message.getField(msg, 1), - javaOuterClassname: jspb.Message.getField(msg, 8), - javaMultipleFiles: jspb.Message.getFieldWithDefault(msg, 10, false), - javaGenerateEqualsAndHash: jspb.Message.getField(msg, 20), - javaStringCheckUtf8: jspb.Message.getFieldWithDefault(msg, 27, false), + javaPackage: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + javaOuterClassname: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f, + javaMultipleFiles: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + javaGenerateEqualsAndHash: (f = jspb.Message.getBooleanField(msg, 20)) == null ? undefined : f, + javaStringCheckUtf8: jspb.Message.getBooleanFieldWithDefault(msg, 27, false), optimizeFor: jspb.Message.getFieldWithDefault(msg, 9, 1), - goPackage: jspb.Message.getField(msg, 11), - ccGenericServices: jspb.Message.getFieldWithDefault(msg, 16, false), - javaGenericServices: jspb.Message.getFieldWithDefault(msg, 17, false), - pyGenericServices: jspb.Message.getFieldWithDefault(msg, 18, false), - phpGenericServices: jspb.Message.getFieldWithDefault(msg, 42, false), - deprecated: jspb.Message.getFieldWithDefault(msg, 23, false), - ccEnableArenas: jspb.Message.getFieldWithDefault(msg, 31, false), - objcClassPrefix: jspb.Message.getField(msg, 36), - csharpNamespace: jspb.Message.getField(msg, 37), - swiftPrefix: jspb.Message.getField(msg, 39), - phpClassPrefix: jspb.Message.getField(msg, 40), - phpNamespace: jspb.Message.getField(msg, 41), - phpMetadataNamespace: jspb.Message.getField(msg, 44), - rubyPackage: jspb.Message.getField(msg, 45), + goPackage: (f = jspb.Message.getField(msg, 11)) == null ? undefined : f, + ccGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), + javaGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), + pyGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), + phpGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 42, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 23, false), + ccEnableArenas: jspb.Message.getBooleanFieldWithDefault(msg, 31, false), + objcClassPrefix: (f = jspb.Message.getField(msg, 36)) == null ? undefined : f, + csharpNamespace: (f = jspb.Message.getField(msg, 37)) == null ? undefined : f, + swiftPrefix: (f = jspb.Message.getField(msg, 39)) == null ? undefined : f, + phpClassPrefix: (f = jspb.Message.getField(msg, 40)) == null ? undefined : f, + phpNamespace: (f = jspb.Message.getField(msg, 41)) == null ? undefined : f, + phpMetadataNamespace: (f = jspb.Message.getField(msg, 44)) == null ? undefined : f, + rubyPackage: (f = jspb.Message.getField(msg, 45)) == null ? undefined : f, uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -5378,17 +5648,21 @@ proto.google.protobuf.FileOptions.prototype.getJavaPackage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaPackage = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearJavaPackage = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -5410,17 +5684,21 @@ proto.google.protobuf.FileOptions.prototype.getJavaOuterClassname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaOuterClassname = function(value) { - jspb.Message.setField(this, 8, value); + return jspb.Message.setField(this, 8, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearJavaOuterClassname = function() { - jspb.Message.setField(this, 8, undefined); + return jspb.Message.setField(this, 8, undefined); }; @@ -5435,26 +5713,28 @@ proto.google.protobuf.FileOptions.prototype.hasJavaOuterClassname = function() { /** * optional bool java_multiple_files = 10; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaMultipleFiles = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaMultipleFiles = function(value) { - jspb.Message.setField(this, 10, value); + return jspb.Message.setField(this, 10, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearJavaMultipleFiles = function() { - jspb.Message.setField(this, 10, undefined); + return jspb.Message.setField(this, 10, undefined); }; @@ -5469,26 +5749,28 @@ proto.google.protobuf.FileOptions.prototype.hasJavaMultipleFiles = function() { /** * optional bool java_generate_equals_and_hash = 20; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaGenerateEqualsAndHash = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 20, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 20, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaGenerateEqualsAndHash = function(value) { - jspb.Message.setField(this, 20, value); + return jspb.Message.setField(this, 20, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearJavaGenerateEqualsAndHash = function() { - jspb.Message.setField(this, 20, undefined); + return jspb.Message.setField(this, 20, undefined); }; @@ -5503,26 +5785,28 @@ proto.google.protobuf.FileOptions.prototype.hasJavaGenerateEqualsAndHash = funct /** * optional bool java_string_check_utf8 = 27; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaStringCheckUtf8 = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 27, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 27, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaStringCheckUtf8 = function(value) { - jspb.Message.setField(this, 27, value); + return jspb.Message.setField(this, 27, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearJavaStringCheckUtf8 = function() { - jspb.Message.setField(this, 27, undefined); + return jspb.Message.setField(this, 27, undefined); }; @@ -5544,17 +5828,21 @@ proto.google.protobuf.FileOptions.prototype.getOptimizeFor = function() { }; -/** @param {!proto.google.protobuf.FileOptions.OptimizeMode} value */ +/** + * @param {!proto.google.protobuf.FileOptions.OptimizeMode} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setOptimizeFor = function(value) { - jspb.Message.setField(this, 9, value); + return jspb.Message.setField(this, 9, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearOptimizeFor = function() { - jspb.Message.setField(this, 9, undefined); + return jspb.Message.setField(this, 9, undefined); }; @@ -5576,17 +5864,21 @@ proto.google.protobuf.FileOptions.prototype.getGoPackage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setGoPackage = function(value) { - jspb.Message.setField(this, 11, value); + return jspb.Message.setField(this, 11, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearGoPackage = function() { - jspb.Message.setField(this, 11, undefined); + return jspb.Message.setField(this, 11, undefined); }; @@ -5601,26 +5893,28 @@ proto.google.protobuf.FileOptions.prototype.hasGoPackage = function() { /** * optional bool cc_generic_services = 16; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getCcGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 16, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setCcGenericServices = function(value) { - jspb.Message.setField(this, 16, value); + return jspb.Message.setField(this, 16, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearCcGenericServices = function() { - jspb.Message.setField(this, 16, undefined); + return jspb.Message.setField(this, 16, undefined); }; @@ -5635,26 +5929,28 @@ proto.google.protobuf.FileOptions.prototype.hasCcGenericServices = function() { /** * optional bool java_generic_services = 17; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 17, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaGenericServices = function(value) { - jspb.Message.setField(this, 17, value); + return jspb.Message.setField(this, 17, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearJavaGenericServices = function() { - jspb.Message.setField(this, 17, undefined); + return jspb.Message.setField(this, 17, undefined); }; @@ -5669,26 +5965,28 @@ proto.google.protobuf.FileOptions.prototype.hasJavaGenericServices = function() /** * optional bool py_generic_services = 18; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getPyGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPyGenericServices = function(value) { - jspb.Message.setField(this, 18, value); + return jspb.Message.setField(this, 18, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearPyGenericServices = function() { - jspb.Message.setField(this, 18, undefined); + return jspb.Message.setField(this, 18, undefined); }; @@ -5703,26 +6001,28 @@ proto.google.protobuf.FileOptions.prototype.hasPyGenericServices = function() { /** * optional bool php_generic_services = 42; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getPhpGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 42, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 42, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPhpGenericServices = function(value) { - jspb.Message.setField(this, 42, value); + return jspb.Message.setField(this, 42, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearPhpGenericServices = function() { - jspb.Message.setField(this, 42, undefined); + return jspb.Message.setField(this, 42, undefined); }; @@ -5737,26 +6037,28 @@ proto.google.protobuf.FileOptions.prototype.hasPhpGenericServices = function() { /** * optional bool deprecated = 23; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 23, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 23, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 23, value); + return jspb.Message.setField(this, 23, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 23, undefined); + return jspb.Message.setField(this, 23, undefined); }; @@ -5771,26 +6073,28 @@ proto.google.protobuf.FileOptions.prototype.hasDeprecated = function() { /** * optional bool cc_enable_arenas = 31; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getCcEnableArenas = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 31, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 31, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setCcEnableArenas = function(value) { - jspb.Message.setField(this, 31, value); + return jspb.Message.setField(this, 31, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearCcEnableArenas = function() { - jspb.Message.setField(this, 31, undefined); + return jspb.Message.setField(this, 31, undefined); }; @@ -5812,17 +6116,21 @@ proto.google.protobuf.FileOptions.prototype.getObjcClassPrefix = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setObjcClassPrefix = function(value) { - jspb.Message.setField(this, 36, value); + return jspb.Message.setField(this, 36, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearObjcClassPrefix = function() { - jspb.Message.setField(this, 36, undefined); + return jspb.Message.setField(this, 36, undefined); }; @@ -5844,17 +6152,21 @@ proto.google.protobuf.FileOptions.prototype.getCsharpNamespace = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setCsharpNamespace = function(value) { - jspb.Message.setField(this, 37, value); + return jspb.Message.setField(this, 37, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearCsharpNamespace = function() { - jspb.Message.setField(this, 37, undefined); + return jspb.Message.setField(this, 37, undefined); }; @@ -5876,17 +6188,21 @@ proto.google.protobuf.FileOptions.prototype.getSwiftPrefix = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setSwiftPrefix = function(value) { - jspb.Message.setField(this, 39, value); + return jspb.Message.setField(this, 39, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearSwiftPrefix = function() { - jspb.Message.setField(this, 39, undefined); + return jspb.Message.setField(this, 39, undefined); }; @@ -5908,17 +6224,21 @@ proto.google.protobuf.FileOptions.prototype.getPhpClassPrefix = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPhpClassPrefix = function(value) { - jspb.Message.setField(this, 40, value); + return jspb.Message.setField(this, 40, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearPhpClassPrefix = function() { - jspb.Message.setField(this, 40, undefined); + return jspb.Message.setField(this, 40, undefined); }; @@ -5940,17 +6260,21 @@ proto.google.protobuf.FileOptions.prototype.getPhpNamespace = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPhpNamespace = function(value) { - jspb.Message.setField(this, 41, value); + return jspb.Message.setField(this, 41, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearPhpNamespace = function() { - jspb.Message.setField(this, 41, undefined); + return jspb.Message.setField(this, 41, undefined); }; @@ -5972,17 +6296,21 @@ proto.google.protobuf.FileOptions.prototype.getPhpMetadataNamespace = function() }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPhpMetadataNamespace = function(value) { - jspb.Message.setField(this, 44, value); + return jspb.Message.setField(this, 44, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearPhpMetadataNamespace = function() { - jspb.Message.setField(this, 44, undefined); + return jspb.Message.setField(this, 44, undefined); }; @@ -6004,17 +6332,21 @@ proto.google.protobuf.FileOptions.prototype.getRubyPackage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setRubyPackage = function(value) { - jspb.Message.setField(this, 45, value); + return jspb.Message.setField(this, 45, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearRubyPackage = function() { - jspb.Message.setField(this, 45, undefined); + return jspb.Message.setField(this, 45, undefined); }; @@ -6037,9 +6369,12 @@ proto.google.protobuf.FileOptions.prototype.getUninterpretedOptionList = functio }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileOptions} returns this +*/ proto.google.protobuf.FileOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -6055,9 +6390,10 @@ proto.google.protobuf.FileOptions.prototype.addUninterpretedOption = function(op /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -6073,13 +6409,15 @@ proto.google.protobuf.MessageOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeInstance) { @@ -6089,8 +6427,8 @@ proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeIn /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.MessageOptions} msg The msg instance to transform. * @return {!Object} @@ -6098,10 +6436,10 @@ proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeIn */ proto.google.protobuf.MessageOptions.toObject = function(includeInstance, msg) { var f, obj = { - messageSetWireFormat: jspb.Message.getFieldWithDefault(msg, 1, false), - noStandardDescriptorAccessor: jspb.Message.getFieldWithDefault(msg, 2, false), - deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), - mapEntry: jspb.Message.getField(msg, 7), + messageSetWireFormat: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + noStandardDescriptorAccessor: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + mapEntry: (f = jspb.Message.getBooleanField(msg, 7)) == null ? undefined : f, uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -6239,26 +6577,28 @@ proto.google.protobuf.MessageOptions.serializeBinaryToWriter = function(message, /** * optional bool message_set_wire_format = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getMessageSetWireFormat = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.setMessageSetWireFormat = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this */ proto.google.protobuf.MessageOptions.prototype.clearMessageSetWireFormat = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -6273,26 +6613,28 @@ proto.google.protobuf.MessageOptions.prototype.hasMessageSetWireFormat = functio /** * optional bool no_standard_descriptor_accessor = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getNoStandardDescriptorAccessor = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.setNoStandardDescriptorAccessor = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this */ proto.google.protobuf.MessageOptions.prototype.clearNoStandardDescriptorAccessor = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -6307,26 +6649,28 @@ proto.google.protobuf.MessageOptions.prototype.hasNoStandardDescriptorAccessor = /** * optional bool deprecated = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this */ proto.google.protobuf.MessageOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -6341,26 +6685,28 @@ proto.google.protobuf.MessageOptions.prototype.hasDeprecated = function() { /** * optional bool map_entry = 7; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getMapEntry = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 7, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.setMapEntry = function(value) { - jspb.Message.setField(this, 7, value); + return jspb.Message.setField(this, 7, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this */ proto.google.protobuf.MessageOptions.prototype.clearMapEntry = function() { - jspb.Message.setField(this, 7, undefined); + return jspb.Message.setField(this, 7, undefined); }; @@ -6383,9 +6729,12 @@ proto.google.protobuf.MessageOptions.prototype.getUninterpretedOptionList = func }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.MessageOptions} returns this +*/ proto.google.protobuf.MessageOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -6401,9 +6750,10 @@ proto.google.protobuf.MessageOptions.prototype.addUninterpretedOption = function /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.MessageOptions} returns this */ proto.google.protobuf.MessageOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -6419,13 +6769,15 @@ proto.google.protobuf.FieldOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInstance) { @@ -6435,8 +6787,8 @@ proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FieldOptions} msg The msg instance to transform. * @return {!Object} @@ -6445,11 +6797,11 @@ proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInst proto.google.protobuf.FieldOptions.toObject = function(includeInstance, msg) { var f, obj = { ctype: jspb.Message.getFieldWithDefault(msg, 1, 0), - packed: jspb.Message.getField(msg, 2), + packed: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, jstype: jspb.Message.getFieldWithDefault(msg, 6, 0), - lazy: jspb.Message.getFieldWithDefault(msg, 5, false), - deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), - weak: jspb.Message.getFieldWithDefault(msg, 10, false), + lazy: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + weak: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -6634,17 +6986,21 @@ proto.google.protobuf.FieldOptions.prototype.getCtype = function() { }; -/** @param {!proto.google.protobuf.FieldOptions.CType} value */ +/** + * @param {!proto.google.protobuf.FieldOptions.CType} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setCtype = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearCtype = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -6659,26 +7015,28 @@ proto.google.protobuf.FieldOptions.prototype.hasCtype = function() { /** * optional bool packed = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getPacked = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setPacked = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearPacked = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -6700,17 +7058,21 @@ proto.google.protobuf.FieldOptions.prototype.getJstype = function() { }; -/** @param {!proto.google.protobuf.FieldOptions.JSType} value */ +/** + * @param {!proto.google.protobuf.FieldOptions.JSType} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setJstype = function(value) { - jspb.Message.setField(this, 6, value); + return jspb.Message.setField(this, 6, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearJstype = function() { - jspb.Message.setField(this, 6, undefined); + return jspb.Message.setField(this, 6, undefined); }; @@ -6725,26 +7087,28 @@ proto.google.protobuf.FieldOptions.prototype.hasJstype = function() { /** * optional bool lazy = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getLazy = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setLazy = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearLazy = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; @@ -6759,26 +7123,28 @@ proto.google.protobuf.FieldOptions.prototype.hasLazy = function() { /** * optional bool deprecated = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -6793,26 +7159,28 @@ proto.google.protobuf.FieldOptions.prototype.hasDeprecated = function() { /** * optional bool weak = 10; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getWeak = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setWeak = function(value) { - jspb.Message.setField(this, 10, value); + return jspb.Message.setField(this, 10, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearWeak = function() { - jspb.Message.setField(this, 10, undefined); + return jspb.Message.setField(this, 10, undefined); }; @@ -6835,9 +7203,12 @@ proto.google.protobuf.FieldOptions.prototype.getUninterpretedOptionList = functi }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FieldOptions} returns this +*/ proto.google.protobuf.FieldOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -6853,9 +7224,10 @@ proto.google.protobuf.FieldOptions.prototype.addUninterpretedOption = function(o /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -6871,13 +7243,15 @@ proto.google.protobuf.OneofOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.OneofOptions.prototype.toObject = function(opt_includeInstance) { @@ -6887,8 +7261,8 @@ proto.google.protobuf.OneofOptions.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.OneofOptions} msg The msg instance to transform. * @return {!Object} @@ -6997,9 +7371,12 @@ proto.google.protobuf.OneofOptions.prototype.getUninterpretedOptionList = functi }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.OneofOptions} returns this +*/ proto.google.protobuf.OneofOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7015,9 +7392,10 @@ proto.google.protobuf.OneofOptions.prototype.addUninterpretedOption = function(o /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.OneofOptions} returns this */ proto.google.protobuf.OneofOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -7033,13 +7411,15 @@ proto.google.protobuf.EnumOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInstance) { @@ -7049,8 +7429,8 @@ proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumOptions} msg The msg instance to transform. * @return {!Object} @@ -7058,8 +7438,8 @@ proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInsta */ proto.google.protobuf.EnumOptions.toObject = function(includeInstance, msg) { var f, obj = { - allowAlias: jspb.Message.getField(msg, 2), - deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), + allowAlias: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -7175,26 +7555,28 @@ proto.google.protobuf.EnumOptions.serializeBinaryToWriter = function(message, wr /** * optional bool allow_alias = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.EnumOptions.prototype.getAllowAlias = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumOptions} returns this + */ proto.google.protobuf.EnumOptions.prototype.setAllowAlias = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumOptions} returns this */ proto.google.protobuf.EnumOptions.prototype.clearAllowAlias = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -7209,26 +7591,28 @@ proto.google.protobuf.EnumOptions.prototype.hasAllowAlias = function() { /** * optional bool deprecated = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.EnumOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumOptions} returns this + */ proto.google.protobuf.EnumOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumOptions} returns this */ proto.google.protobuf.EnumOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -7251,9 +7635,12 @@ proto.google.protobuf.EnumOptions.prototype.getUninterpretedOptionList = functio }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumOptions} returns this +*/ proto.google.protobuf.EnumOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7269,9 +7656,10 @@ proto.google.protobuf.EnumOptions.prototype.addUninterpretedOption = function(op /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumOptions} returns this */ proto.google.protobuf.EnumOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -7287,13 +7675,15 @@ proto.google.protobuf.EnumValueOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_includeInstance) { @@ -7303,8 +7693,8 @@ proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_include /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumValueOptions} msg The msg instance to transform. * @return {!Object} @@ -7312,7 +7702,7 @@ proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_include */ proto.google.protobuf.EnumValueOptions.toObject = function(includeInstance, msg) { var f, obj = { - deprecated: jspb.Message.getFieldWithDefault(msg, 1, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -7417,26 +7807,28 @@ proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter = function(messag /** * optional bool deprecated = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.EnumValueOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ proto.google.protobuf.EnumValueOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueOptions} returns this */ proto.google.protobuf.EnumValueOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -7459,9 +7851,12 @@ proto.google.protobuf.EnumValueOptions.prototype.getUninterpretedOptionList = fu }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumValueOptions} returns this +*/ proto.google.protobuf.EnumValueOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7477,9 +7872,10 @@ proto.google.protobuf.EnumValueOptions.prototype.addUninterpretedOption = functi /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumValueOptions} returns this */ proto.google.protobuf.EnumValueOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -7495,13 +7891,15 @@ proto.google.protobuf.ServiceOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeInstance) { @@ -7511,8 +7909,8 @@ proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeIn /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.ServiceOptions} msg The msg instance to transform. * @return {!Object} @@ -7520,7 +7918,7 @@ proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeIn */ proto.google.protobuf.ServiceOptions.toObject = function(includeInstance, msg) { var f, obj = { - deprecated: jspb.Message.getFieldWithDefault(msg, 33, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -7625,26 +8023,28 @@ proto.google.protobuf.ServiceOptions.serializeBinaryToWriter = function(message, /** * optional bool deprecated = 33; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.ServiceOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 33, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.ServiceOptions} returns this + */ proto.google.protobuf.ServiceOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 33, value); + return jspb.Message.setField(this, 33, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.ServiceOptions} returns this */ proto.google.protobuf.ServiceOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 33, undefined); + return jspb.Message.setField(this, 33, undefined); }; @@ -7667,9 +8067,12 @@ proto.google.protobuf.ServiceOptions.prototype.getUninterpretedOptionList = func }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ServiceOptions} returns this +*/ proto.google.protobuf.ServiceOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7685,9 +8088,10 @@ proto.google.protobuf.ServiceOptions.prototype.addUninterpretedOption = function /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ServiceOptions} returns this */ proto.google.protobuf.ServiceOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -7703,13 +8107,15 @@ proto.google.protobuf.MethodOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeInstance) { @@ -7719,8 +8125,8 @@ proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeIns /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.MethodOptions} msg The msg instance to transform. * @return {!Object} @@ -7728,7 +8134,7 @@ proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeIns */ proto.google.protobuf.MethodOptions.toObject = function(includeInstance, msg) { var f, obj = { - deprecated: jspb.Message.getFieldWithDefault(msg, 33, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false), idempotencyLevel: jspb.Message.getFieldWithDefault(msg, 34, 0), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) @@ -7854,26 +8260,28 @@ proto.google.protobuf.MethodOptions.IdempotencyLevel = { /** * optional bool deprecated = 33; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MethodOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 33, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodOptions} returns this + */ proto.google.protobuf.MethodOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 33, value); + return jspb.Message.setField(this, 33, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodOptions} returns this */ proto.google.protobuf.MethodOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 33, undefined); + return jspb.Message.setField(this, 33, undefined); }; @@ -7895,17 +8303,21 @@ proto.google.protobuf.MethodOptions.prototype.getIdempotencyLevel = function() { }; -/** @param {!proto.google.protobuf.MethodOptions.IdempotencyLevel} value */ +/** + * @param {!proto.google.protobuf.MethodOptions.IdempotencyLevel} value + * @return {!proto.google.protobuf.MethodOptions} returns this + */ proto.google.protobuf.MethodOptions.prototype.setIdempotencyLevel = function(value) { - jspb.Message.setField(this, 34, value); + return jspb.Message.setField(this, 34, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodOptions} returns this */ proto.google.protobuf.MethodOptions.prototype.clearIdempotencyLevel = function() { - jspb.Message.setField(this, 34, undefined); + return jspb.Message.setField(this, 34, undefined); }; @@ -7928,9 +8340,12 @@ proto.google.protobuf.MethodOptions.prototype.getUninterpretedOptionList = funct }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.MethodOptions} returns this +*/ proto.google.protobuf.MethodOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7946,9 +8361,10 @@ proto.google.protobuf.MethodOptions.prototype.addUninterpretedOption = function( /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.MethodOptions} returns this */ proto.google.protobuf.MethodOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -7964,13 +8380,15 @@ proto.google.protobuf.UninterpretedOption.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.UninterpretedOption.prototype.toObject = function(opt_includeInstance) { @@ -7980,8 +8398,8 @@ proto.google.protobuf.UninterpretedOption.prototype.toObject = function(opt_incl /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.UninterpretedOption} msg The msg instance to transform. * @return {!Object} @@ -7991,12 +8409,12 @@ proto.google.protobuf.UninterpretedOption.toObject = function(includeInstance, m var f, obj = { nameList: jspb.Message.toObjectList(msg.getNameList(), proto.google.protobuf.UninterpretedOption.NamePart.toObject, includeInstance), - identifierValue: jspb.Message.getField(msg, 3), - positiveIntValue: jspb.Message.getField(msg, 4), - negativeIntValue: jspb.Message.getField(msg, 5), - doubleValue: jspb.Message.getOptionalFloatingPointField(msg, 6), + identifierValue: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + positiveIntValue: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + negativeIntValue: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + doubleValue: (f = jspb.Message.getOptionalFloatingPointField(msg, 6)) == null ? undefined : f, stringValue: msg.getStringValue_asB64(), - aggregateValue: jspb.Message.getField(msg, 8) + aggregateValue: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f }; if (includeInstance) { @@ -8149,13 +8567,15 @@ proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter = function(mes if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function(opt_includeInstance) { @@ -8165,8 +8585,8 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.UninterpretedOption.NamePart} msg The msg instance to transform. * @return {!Object} @@ -8174,8 +8594,8 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function */ proto.google.protobuf.UninterpretedOption.NamePart.toObject = function(includeInstance, msg) { var f, obj = { - namePart: jspb.Message.getField(msg, 1), - isExtension: jspb.Message.getField(msg, 2) + namePart: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + isExtension: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -8275,17 +8695,21 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.getNamePart = funct }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.setNamePart = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearNamePart = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -8300,26 +8724,28 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasNamePart = funct /** * required bool is_extension = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.getIsExtension = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.setIsExtension = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearIsExtension = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -8342,9 +8768,12 @@ proto.google.protobuf.UninterpretedOption.prototype.getNameList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this +*/ proto.google.protobuf.UninterpretedOption.prototype.setNameList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -8360,9 +8789,10 @@ proto.google.protobuf.UninterpretedOption.prototype.addName = function(opt_value /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearNameList = function() { - this.setNameList([]); + return this.setNameList([]); }; @@ -8375,17 +8805,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getIdentifierValue = functio }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setIdentifierValue = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearIdentifierValue = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -8407,17 +8841,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getPositiveIntValue = functi }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setPositiveIntValue = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearPositiveIntValue = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -8439,17 +8877,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getNegativeIntValue = functi }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setNegativeIntValue = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearNegativeIntValue = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; @@ -8467,21 +8909,25 @@ proto.google.protobuf.UninterpretedOption.prototype.hasNegativeIntValue = functi * @return {number} */ proto.google.protobuf.UninterpretedOption.prototype.getDoubleValue = function() { - return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 6, 0.0)); + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setDoubleValue = function(value) { - jspb.Message.setField(this, 6, value); + return jspb.Message.setField(this, 6, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearDoubleValue = function() { - jspb.Message.setField(this, 6, undefined); + return jspb.Message.setField(this, 6, undefined); }; @@ -8527,17 +8973,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asU8 = functi }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setStringValue = function(value) { - jspb.Message.setField(this, 7, value); + return jspb.Message.setField(this, 7, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearStringValue = function() { - jspb.Message.setField(this, 7, undefined); + return jspb.Message.setField(this, 7, undefined); }; @@ -8559,17 +9009,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getAggregateValue = function }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setAggregateValue = function(value) { - jspb.Message.setField(this, 8, value); + return jspb.Message.setField(this, 8, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearAggregateValue = function() { - jspb.Message.setField(this, 8, undefined); + return jspb.Message.setField(this, 8, undefined); }; @@ -8594,13 +9048,15 @@ proto.google.protobuf.SourceCodeInfo.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.SourceCodeInfo.prototype.toObject = function(opt_includeInstance) { @@ -8610,8 +9066,8 @@ proto.google.protobuf.SourceCodeInfo.prototype.toObject = function(opt_includeIn /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.SourceCodeInfo} msg The msg instance to transform. * @return {!Object} @@ -8714,13 +9170,15 @@ proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_ = [1,2,6]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_includeInstance) { @@ -8730,8 +9188,8 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_ /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.SourceCodeInfo.Location} msg The msg instance to transform. * @return {!Object} @@ -8739,11 +9197,11 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_ */ proto.google.protobuf.SourceCodeInfo.Location.toObject = function(includeInstance, msg) { var f, obj = { - pathList: jspb.Message.getRepeatedField(msg, 1), - spanList: jspb.Message.getRepeatedField(msg, 2), - leadingComments: jspb.Message.getField(msg, 3), - trailingComments: jspb.Message.getField(msg, 4), - leadingDetachedCommentsList: jspb.Message.getRepeatedField(msg, 6) + pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + spanList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + leadingComments: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + trailingComments: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + leadingDetachedCommentsList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f }; if (includeInstance) { @@ -8876,26 +9334,31 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getPathList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setPathList = function(value) { - jspb.Message.setField(this, 1, value || []); + return jspb.Message.setField(this, 1, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.addPath = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 1, value, opt_index); + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearPathList = function() { - this.setPathList([]); + return this.setPathList([]); }; @@ -8908,26 +9371,31 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getSpanList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setSpanList = function(value) { - jspb.Message.setField(this, 2, value || []); + return jspb.Message.setField(this, 2, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.addSpan = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearSpanList = function() { - this.setSpanList([]); + return this.setSpanList([]); }; @@ -8940,17 +9408,21 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingComments = fun }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingComments = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingComments = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -8972,17 +9444,21 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getTrailingComments = fu }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setTrailingComments = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearTrailingComments = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -9004,26 +9480,31 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingDetachedCommen }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingDetachedCommentsList = function(value) { - jspb.Message.setField(this, 6, value || []); + return jspb.Message.setField(this, 6, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.addLeadingDetachedComments = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 6, value, opt_index); + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingDetachedCommentsList = function() { - this.setLeadingDetachedCommentsList([]); + return this.setLeadingDetachedCommentsList([]); }; @@ -9037,9 +9518,12 @@ proto.google.protobuf.SourceCodeInfo.prototype.getLocationList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo} returns this +*/ proto.google.protobuf.SourceCodeInfo.prototype.setLocationList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -9055,9 +9539,10 @@ proto.google.protobuf.SourceCodeInfo.prototype.addLocation = function(opt_value, /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo} returns this */ proto.google.protobuf.SourceCodeInfo.prototype.clearLocationList = function() { - this.setLocationList([]); + return this.setLocationList([]); }; @@ -9073,13 +9558,15 @@ proto.google.protobuf.GeneratedCodeInfo.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.GeneratedCodeInfo.prototype.toObject = function(opt_includeInstance) { @@ -9089,8 +9576,8 @@ proto.google.protobuf.GeneratedCodeInfo.prototype.toObject = function(opt_includ /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.GeneratedCodeInfo} msg The msg instance to transform. * @return {!Object} @@ -9193,13 +9680,15 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function(opt_includeInstance) { @@ -9209,8 +9698,8 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} msg The msg instance to transform. * @return {!Object} @@ -9218,10 +9707,10 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function */ proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject = function(includeInstance, msg) { var f, obj = { - pathList: jspb.Message.getRepeatedField(msg, 1), - sourceFile: jspb.Message.getField(msg, 2), - begin: jspb.Message.getField(msg, 3), - end: jspb.Message.getField(msg, 4) + pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + sourceFile: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + begin: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f }; if (includeInstance) { @@ -9343,26 +9832,31 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getPathList = funct }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setPathList = function(value) { - jspb.Message.setField(this, 1, value || []); + return jspb.Message.setField(this, 1, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.addPath = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 1, value, opt_index); + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearPathList = function() { - this.setPathList([]); + return this.setPathList([]); }; @@ -9375,17 +9869,21 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getSourceFile = fun }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setSourceFile = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearSourceFile = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -9407,17 +9905,21 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getBegin = function }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setBegin = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearBegin = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -9439,17 +9941,21 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getEnd = function() }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setEnd = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearEnd = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -9472,9 +9978,12 @@ proto.google.protobuf.GeneratedCodeInfo.prototype.getAnnotationList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this +*/ proto.google.protobuf.GeneratedCodeInfo.prototype.setAnnotationList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -9490,9 +9999,10 @@ proto.google.protobuf.GeneratedCodeInfo.prototype.addAnnotation = function(opt_v /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this */ proto.google.protobuf.GeneratedCodeInfo.prototype.clearAnnotationList = function() { - this.setAnnotationList([]); + return this.setAnnotationList([]); }; diff --git a/js/proto/google/protobuf/timestamp_pb.js b/js/proto/google/protobuf/timestamp_pb.js index 3c225b7bb..2f13b459f 100644 --- a/js/proto/google/protobuf/timestamp_pb.js +++ b/js/proto/google/protobuf/timestamp_pb.js @@ -1,3 +1,4 @@ +// source: google/protobuf/timestamp.proto /** * @fileoverview * @enhanceable @@ -38,13 +39,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.Timestamp.prototype.toObject = function(opt_includeInstance) { @@ -54,8 +57,8 @@ proto.google.protobuf.Timestamp.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.Timestamp} msg The msg instance to transform. * @return {!Object} @@ -164,9 +167,12 @@ proto.google.protobuf.Timestamp.prototype.getSeconds = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.Timestamp} returns this + */ proto.google.protobuf.Timestamp.prototype.setSeconds = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -179,9 +185,12 @@ proto.google.protobuf.Timestamp.prototype.getNanos = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.Timestamp} returns this + */ proto.google.protobuf.Timestamp.prototype.setNanos = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/keys_pb.js b/js/proto/keys_pb.js index 6c52fab78..2750b4b79 100644 --- a/js/proto/keys_pb.js +++ b/js/proto/keys_pb.js @@ -1,3 +1,4 @@ +// source: keys.proto /** * @fileoverview * @enhanceable @@ -504,13 +505,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ListRequest.prototype.toObject = function(opt_includeInstance) { @@ -520,8 +523,8 @@ proto.keys.ListRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ListRequest} msg The msg instance to transform. * @return {!Object} @@ -618,9 +621,12 @@ proto.keys.ListRequest.prototype.getKeyname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ListRequest} returns this + */ proto.keys.ListRequest.prototype.setKeyname = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -629,13 +635,15 @@ proto.keys.ListRequest.prototype.setKeyname = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.VerifyResponse.prototype.toObject = function(opt_includeInstance) { @@ -645,8 +653,8 @@ proto.keys.VerifyResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.VerifyResponse} msg The msg instance to transform. * @return {!Object} @@ -728,13 +736,15 @@ proto.keys.VerifyResponse.serializeBinaryToWriter = function(message, writer) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.RemoveNameResponse.prototype.toObject = function(opt_includeInstance) { @@ -744,8 +754,8 @@ proto.keys.RemoveNameResponse.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.RemoveNameResponse} msg The msg instance to transform. * @return {!Object} @@ -827,13 +837,15 @@ proto.keys.RemoveNameResponse.serializeBinaryToWriter = function(message, writer if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.AddNameResponse.prototype.toObject = function(opt_includeInstance) { @@ -843,8 +855,8 @@ proto.keys.AddNameResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.AddNameResponse} msg The msg instance to transform. * @return {!Object} @@ -926,13 +938,15 @@ proto.keys.AddNameResponse.serializeBinaryToWriter = function(message, writer) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.RemoveNameRequest.prototype.toObject = function(opt_includeInstance) { @@ -942,8 +956,8 @@ proto.keys.RemoveNameRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.RemoveNameRequest} msg The msg instance to transform. * @return {!Object} @@ -1040,9 +1054,12 @@ proto.keys.RemoveNameRequest.prototype.getKeyname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.RemoveNameRequest} returns this + */ proto.keys.RemoveNameRequest.prototype.setKeyname = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1051,13 +1068,15 @@ proto.keys.RemoveNameRequest.prototype.setKeyname = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.GenRequest.prototype.toObject = function(opt_includeInstance) { @@ -1067,8 +1086,8 @@ proto.keys.GenRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.GenRequest} msg The msg instance to transform. * @return {!Object} @@ -1189,9 +1208,12 @@ proto.keys.GenRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.GenRequest} returns this + */ proto.keys.GenRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1204,9 +1226,12 @@ proto.keys.GenRequest.prototype.getCurvetype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.GenRequest} returns this + */ proto.keys.GenRequest.prototype.setCurvetype = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1219,9 +1244,12 @@ proto.keys.GenRequest.prototype.getKeyname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.GenRequest} returns this + */ proto.keys.GenRequest.prototype.setKeyname = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -1230,13 +1258,15 @@ proto.keys.GenRequest.prototype.setKeyname = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.GenResponse.prototype.toObject = function(opt_includeInstance) { @@ -1246,8 +1276,8 @@ proto.keys.GenResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.GenResponse} msg The msg instance to transform. * @return {!Object} @@ -1344,9 +1374,12 @@ proto.keys.GenResponse.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.GenResponse} returns this + */ proto.keys.GenResponse.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1355,13 +1388,15 @@ proto.keys.GenResponse.prototype.setAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.PubRequest.prototype.toObject = function(opt_includeInstance) { @@ -1371,8 +1406,8 @@ proto.keys.PubRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.PubRequest} msg The msg instance to transform. * @return {!Object} @@ -1481,9 +1516,12 @@ proto.keys.PubRequest.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.PubRequest} returns this + */ proto.keys.PubRequest.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1496,9 +1534,12 @@ proto.keys.PubRequest.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.PubRequest} returns this + */ proto.keys.PubRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1507,13 +1548,15 @@ proto.keys.PubRequest.prototype.setName = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.PubResponse.prototype.toObject = function(opt_includeInstance) { @@ -1523,8 +1566,8 @@ proto.keys.PubResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.PubResponse} msg The msg instance to transform. * @return {!Object} @@ -1657,9 +1700,12 @@ proto.keys.PubResponse.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.PubResponse} returns this + */ proto.keys.PubResponse.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1672,9 +1718,12 @@ proto.keys.PubResponse.prototype.getCurvetype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.PubResponse} returns this + */ proto.keys.PubResponse.prototype.setCurvetype = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1683,13 +1732,15 @@ proto.keys.PubResponse.prototype.setCurvetype = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ImportJSONRequest.prototype.toObject = function(opt_includeInstance) { @@ -1699,8 +1750,8 @@ proto.keys.ImportJSONRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ImportJSONRequest} msg The msg instance to transform. * @return {!Object} @@ -1809,9 +1860,12 @@ proto.keys.ImportJSONRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportJSONRequest} returns this + */ proto.keys.ImportJSONRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1824,9 +1878,12 @@ proto.keys.ImportJSONRequest.prototype.getJson = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportJSONRequest} returns this + */ proto.keys.ImportJSONRequest.prototype.setJson = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1835,13 +1892,15 @@ proto.keys.ImportJSONRequest.prototype.setJson = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ImportResponse.prototype.toObject = function(opt_includeInstance) { @@ -1851,8 +1910,8 @@ proto.keys.ImportResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ImportResponse} msg The msg instance to transform. * @return {!Object} @@ -1949,9 +2008,12 @@ proto.keys.ImportResponse.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportResponse} returns this + */ proto.keys.ImportResponse.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1960,13 +2022,15 @@ proto.keys.ImportResponse.prototype.setAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ImportRequest.prototype.toObject = function(opt_includeInstance) { @@ -1976,8 +2040,8 @@ proto.keys.ImportRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ImportRequest} msg The msg instance to transform. * @return {!Object} @@ -2110,9 +2174,12 @@ proto.keys.ImportRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportRequest} returns this + */ proto.keys.ImportRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2125,9 +2192,12 @@ proto.keys.ImportRequest.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportRequest} returns this + */ proto.keys.ImportRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2140,9 +2210,12 @@ proto.keys.ImportRequest.prototype.getCurvetype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportRequest} returns this + */ proto.keys.ImportRequest.prototype.setCurvetype = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -2179,9 +2252,12 @@ proto.keys.ImportRequest.prototype.getKeybytes_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.ImportRequest} returns this + */ proto.keys.ImportRequest.prototype.setKeybytes = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -2190,13 +2266,15 @@ proto.keys.ImportRequest.prototype.setKeybytes = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ExportRequest.prototype.toObject = function(opt_includeInstance) { @@ -2206,8 +2284,8 @@ proto.keys.ExportRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ExportRequest} msg The msg instance to transform. * @return {!Object} @@ -2328,9 +2406,12 @@ proto.keys.ExportRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ExportRequest} returns this + */ proto.keys.ExportRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2343,9 +2424,12 @@ proto.keys.ExportRequest.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ExportRequest} returns this + */ proto.keys.ExportRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2358,9 +2442,12 @@ proto.keys.ExportRequest.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ExportRequest} returns this + */ proto.keys.ExportRequest.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -2369,13 +2456,15 @@ proto.keys.ExportRequest.prototype.setAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ExportResponse.prototype.toObject = function(opt_includeInstance) { @@ -2385,8 +2474,8 @@ proto.keys.ExportResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ExportResponse} msg The msg instance to transform. * @return {!Object} @@ -2543,9 +2632,12 @@ proto.keys.ExportResponse.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.ExportResponse} returns this + */ proto.keys.ExportResponse.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2582,9 +2674,12 @@ proto.keys.ExportResponse.prototype.getPrivatekey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.ExportResponse} returns this + */ proto.keys.ExportResponse.prototype.setPrivatekey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -2621,9 +2716,12 @@ proto.keys.ExportResponse.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.ExportResponse} returns this + */ proto.keys.ExportResponse.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -2636,9 +2734,12 @@ proto.keys.ExportResponse.prototype.getCurvetype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ExportResponse} returns this + */ proto.keys.ExportResponse.prototype.setCurvetype = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -2647,13 +2748,15 @@ proto.keys.ExportResponse.prototype.setCurvetype = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.SignRequest.prototype.toObject = function(opt_includeInstance) { @@ -2663,8 +2766,8 @@ proto.keys.SignRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.SignRequest} msg The msg instance to transform. * @return {!Object} @@ -2797,9 +2900,12 @@ proto.keys.SignRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.SignRequest} returns this + */ proto.keys.SignRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2812,9 +2918,12 @@ proto.keys.SignRequest.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.SignRequest} returns this + */ proto.keys.SignRequest.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2827,9 +2936,12 @@ proto.keys.SignRequest.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.SignRequest} returns this + */ proto.keys.SignRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -2866,9 +2978,12 @@ proto.keys.SignRequest.prototype.getMessage_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.SignRequest} returns this + */ proto.keys.SignRequest.prototype.setMessage = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -2877,13 +2992,15 @@ proto.keys.SignRequest.prototype.setMessage = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.SignResponse.prototype.toObject = function(opt_includeInstance) { @@ -2893,8 +3010,8 @@ proto.keys.SignResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.SignResponse} msg The msg instance to transform. * @return {!Object} @@ -2994,17 +3111,21 @@ proto.keys.SignResponse.prototype.getSignature = function() { }; -/** @param {?proto.crypto.Signature|undefined} value */ +/** + * @param {?proto.crypto.Signature|undefined} value + * @return {!proto.keys.SignResponse} returns this +*/ proto.keys.SignResponse.prototype.setSignature = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.keys.SignResponse} returns this */ proto.keys.SignResponse.prototype.clearSignature = function() { - this.setSignature(undefined); + return this.setSignature(undefined); }; @@ -3022,13 +3143,15 @@ proto.keys.SignResponse.prototype.hasSignature = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.VerifyRequest.prototype.toObject = function(opt_includeInstance) { @@ -3038,8 +3161,8 @@ proto.keys.VerifyRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.VerifyRequest} msg The msg instance to transform. * @return {!Object} @@ -3186,9 +3309,12 @@ proto.keys.VerifyRequest.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.VerifyRequest} returns this + */ proto.keys.VerifyRequest.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -3225,9 +3351,12 @@ proto.keys.VerifyRequest.prototype.getMessage_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.VerifyRequest} returns this + */ proto.keys.VerifyRequest.prototype.setMessage = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -3241,17 +3370,21 @@ proto.keys.VerifyRequest.prototype.getSignature = function() { }; -/** @param {?proto.crypto.Signature|undefined} value */ +/** + * @param {?proto.crypto.Signature|undefined} value + * @return {!proto.keys.VerifyRequest} returns this +*/ proto.keys.VerifyRequest.prototype.setSignature = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.keys.VerifyRequest} returns this */ proto.keys.VerifyRequest.prototype.clearSignature = function() { - this.setSignature(undefined); + return this.setSignature(undefined); }; @@ -3269,13 +3402,15 @@ proto.keys.VerifyRequest.prototype.hasSignature = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.HashRequest.prototype.toObject = function(opt_includeInstance) { @@ -3285,8 +3420,8 @@ proto.keys.HashRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.HashRequest} msg The msg instance to transform. * @return {!Object} @@ -3395,9 +3530,12 @@ proto.keys.HashRequest.prototype.getHashtype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.HashRequest} returns this + */ proto.keys.HashRequest.prototype.setHashtype = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3434,9 +3572,12 @@ proto.keys.HashRequest.prototype.getMessage_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.HashRequest} returns this + */ proto.keys.HashRequest.prototype.setMessage = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -3445,13 +3586,15 @@ proto.keys.HashRequest.prototype.setMessage = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.HashResponse.prototype.toObject = function(opt_includeInstance) { @@ -3461,8 +3604,8 @@ proto.keys.HashResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.HashResponse} msg The msg instance to transform. * @return {!Object} @@ -3559,9 +3702,12 @@ proto.keys.HashResponse.prototype.getHash = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.HashResponse} returns this + */ proto.keys.HashResponse.prototype.setHash = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3577,13 +3723,15 @@ proto.keys.KeyID.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { @@ -3593,8 +3741,8 @@ proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.KeyID} msg The msg instance to transform. * @return {!Object} @@ -3603,7 +3751,7 @@ proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { proto.keys.KeyID.toObject = function(includeInstance, msg) { var f, obj = { address: jspb.Message.getFieldWithDefault(msg, 1, ""), - keynameList: jspb.Message.getRepeatedField(msg, 2) + keynameList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -3703,9 +3851,12 @@ proto.keys.KeyID.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.KeyID} returns this + */ proto.keys.KeyID.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3718,26 +3869,31 @@ proto.keys.KeyID.prototype.getKeynameList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.keys.KeyID} returns this + */ proto.keys.KeyID.prototype.setKeynameList = function(value) { - jspb.Message.setField(this, 2, value || []); + return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.keys.KeyID} returns this */ proto.keys.KeyID.prototype.addKeyname = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.keys.KeyID} returns this */ proto.keys.KeyID.prototype.clearKeynameList = function() { - this.setKeynameList([]); + return this.setKeynameList([]); }; @@ -3753,13 +3909,15 @@ proto.keys.ListResponse.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ListResponse.prototype.toObject = function(opt_includeInstance) { @@ -3769,8 +3927,8 @@ proto.keys.ListResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ListResponse} msg The msg instance to transform. * @return {!Object} @@ -3871,9 +4029,12 @@ proto.keys.ListResponse.prototype.getKeyList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.keys.ListResponse} returns this +*/ proto.keys.ListResponse.prototype.setKeyList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3889,9 +4050,10 @@ proto.keys.ListResponse.prototype.addKey = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.keys.ListResponse} returns this */ proto.keys.ListResponse.prototype.clearKeyList = function() { - this.setKeyList([]); + return this.setKeyList([]); }; @@ -3900,13 +4062,15 @@ proto.keys.ListResponse.prototype.clearKeyList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.AddNameRequest.prototype.toObject = function(opt_includeInstance) { @@ -3916,8 +4080,8 @@ proto.keys.AddNameRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.AddNameRequest} msg The msg instance to transform. * @return {!Object} @@ -4026,9 +4190,12 @@ proto.keys.AddNameRequest.prototype.getKeyname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.AddNameRequest} returns this + */ proto.keys.AddNameRequest.prototype.setKeyname = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -4041,9 +4208,12 @@ proto.keys.AddNameRequest.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.AddNameRequest} returns this + */ proto.keys.AddNameRequest.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; diff --git a/js/proto/names_pb.js b/js/proto/names_pb.js index 2e6708c96..c338739fe 100644 --- a/js/proto/names_pb.js +++ b/js/proto/names_pb.js @@ -1,3 +1,4 @@ +// source: names.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.names.Entry.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.names.Entry.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.names.Entry} msg The msg instance to transform. * @return {!Object} @@ -190,9 +193,12 @@ proto.names.Entry.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.names.Entry} returns this + */ proto.names.Entry.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -229,9 +235,12 @@ proto.names.Entry.prototype.getOwner_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.names.Entry} returns this + */ proto.names.Entry.prototype.setOwner = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -244,9 +253,12 @@ proto.names.Entry.prototype.getData = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.names.Entry} returns this + */ proto.names.Entry.prototype.setData = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -259,9 +271,12 @@ proto.names.Entry.prototype.getExpires = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.names.Entry} returns this + */ proto.names.Entry.prototype.setExpires = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; diff --git a/js/proto/payload_pb.js b/js/proto/payload_pb.js index 0db942d9e..e04dd30d3 100644 --- a/js/proto/payload_pb.js +++ b/js/proto/payload_pb.js @@ -1,3 +1,4 @@ +// source: payload.proto /** * @fileoverview * @enhanceable @@ -399,13 +400,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.Any.prototype.toObject = function(opt_includeInstance) { @@ -415,8 +418,8 @@ proto.payload.Any.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Any} msg The msg instance to transform. * @return {!Object} @@ -642,17 +645,21 @@ proto.payload.Any.prototype.getCalltx = function() { }; -/** @param {?proto.payload.CallTx|undefined} value */ +/** + * @param {?proto.payload.CallTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setCalltx = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearCalltx = function() { - this.setCalltx(undefined); + return this.setCalltx(undefined); }; @@ -675,17 +682,21 @@ proto.payload.Any.prototype.getSendtx = function() { }; -/** @param {?proto.payload.SendTx|undefined} value */ +/** + * @param {?proto.payload.SendTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setSendtx = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearSendtx = function() { - this.setSendtx(undefined); + return this.setSendtx(undefined); }; @@ -708,17 +719,21 @@ proto.payload.Any.prototype.getNametx = function() { }; -/** @param {?proto.payload.NameTx|undefined} value */ +/** + * @param {?proto.payload.NameTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setNametx = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearNametx = function() { - this.setNametx(undefined); + return this.setNametx(undefined); }; @@ -741,17 +756,21 @@ proto.payload.Any.prototype.getPermstx = function() { }; -/** @param {?proto.payload.PermsTx|undefined} value */ +/** + * @param {?proto.payload.PermsTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setPermstx = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearPermstx = function() { - this.setPermstx(undefined); + return this.setPermstx(undefined); }; @@ -774,17 +793,21 @@ proto.payload.Any.prototype.getGovtx = function() { }; -/** @param {?proto.payload.GovTx|undefined} value */ +/** + * @param {?proto.payload.GovTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setGovtx = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearGovtx = function() { - this.setGovtx(undefined); + return this.setGovtx(undefined); }; @@ -807,17 +830,21 @@ proto.payload.Any.prototype.getBondtx = function() { }; -/** @param {?proto.payload.BondTx|undefined} value */ +/** + * @param {?proto.payload.BondTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setBondtx = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearBondtx = function() { - this.setBondtx(undefined); + return this.setBondtx(undefined); }; @@ -840,17 +867,21 @@ proto.payload.Any.prototype.getUnbondtx = function() { }; -/** @param {?proto.payload.UnbondTx|undefined} value */ +/** + * @param {?proto.payload.UnbondTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setUnbondtx = function(value) { - jspb.Message.setWrapperField(this, 7, value); + return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearUnbondtx = function() { - this.setUnbondtx(undefined); + return this.setUnbondtx(undefined); }; @@ -873,17 +904,21 @@ proto.payload.Any.prototype.getBatchtx = function() { }; -/** @param {?proto.payload.BatchTx|undefined} value */ +/** + * @param {?proto.payload.BatchTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setBatchtx = function(value) { - jspb.Message.setWrapperField(this, 8, value); + return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearBatchtx = function() { - this.setBatchtx(undefined); + return this.setBatchtx(undefined); }; @@ -906,17 +941,21 @@ proto.payload.Any.prototype.getProposaltx = function() { }; -/** @param {?proto.payload.ProposalTx|undefined} value */ +/** + * @param {?proto.payload.ProposalTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setProposaltx = function(value) { - jspb.Message.setWrapperField(this, 9, value); + return jspb.Message.setWrapperField(this, 9, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearProposaltx = function() { - this.setProposaltx(undefined); + return this.setProposaltx(undefined); }; @@ -939,17 +978,21 @@ proto.payload.Any.prototype.getIdentifytx = function() { }; -/** @param {?proto.payload.IdentifyTx|undefined} value */ +/** + * @param {?proto.payload.IdentifyTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setIdentifytx = function(value) { - jspb.Message.setWrapperField(this, 10, value); + return jspb.Message.setWrapperField(this, 10, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearIdentifytx = function() { - this.setIdentifytx(undefined); + return this.setIdentifytx(undefined); }; @@ -967,13 +1010,15 @@ proto.payload.Any.prototype.hasIdentifytx = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.TxInput.prototype.toObject = function(opt_includeInstance) { @@ -983,8 +1028,8 @@ proto.payload.TxInput.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.TxInput} msg The msg instance to transform. * @return {!Object} @@ -1129,9 +1174,12 @@ proto.payload.TxInput.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.TxInput} returns this + */ proto.payload.TxInput.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1144,9 +1192,12 @@ proto.payload.TxInput.prototype.getAmount = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.TxInput} returns this + */ proto.payload.TxInput.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -1159,9 +1210,12 @@ proto.payload.TxInput.prototype.getSequence = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.TxInput} returns this + */ proto.payload.TxInput.prototype.setSequence = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1170,13 +1224,15 @@ proto.payload.TxInput.prototype.setSequence = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.TxOutput.prototype.toObject = function(opt_includeInstance) { @@ -1186,8 +1242,8 @@ proto.payload.TxOutput.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.TxOutput} msg The msg instance to transform. * @return {!Object} @@ -1320,9 +1376,12 @@ proto.payload.TxOutput.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.TxOutput} returns this + */ proto.payload.TxOutput.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1335,9 +1394,12 @@ proto.payload.TxOutput.prototype.getAmount = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.TxOutput} returns this + */ proto.payload.TxOutput.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -1353,13 +1415,15 @@ proto.payload.CallTx.repeatedFields_ = [7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.CallTx.prototype.toObject = function(opt_includeInstance) { @@ -1369,8 +1433,8 @@ proto.payload.CallTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.CallTx} msg The msg instance to transform. * @return {!Object} @@ -1557,17 +1621,21 @@ proto.payload.CallTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.CallTx} returns this +*/ proto.payload.CallTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.CallTx} returns this */ proto.payload.CallTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -1613,9 +1681,12 @@ proto.payload.CallTx.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -1628,9 +1699,12 @@ proto.payload.CallTx.prototype.getGaslimit = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setGaslimit = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1643,9 +1717,12 @@ proto.payload.CallTx.prototype.getFee = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setFee = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -1682,9 +1759,12 @@ proto.payload.CallTx.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 5, value); + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -1721,9 +1801,12 @@ proto.payload.CallTx.prototype.getWasm_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setWasm = function(value) { - jspb.Message.setProto3BytesField(this, 6, value); + return jspb.Message.setProto3BytesField(this, 6, value); }; @@ -1737,9 +1820,12 @@ proto.payload.CallTx.prototype.getContractmetaList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.CallTx} returns this +*/ proto.payload.CallTx.prototype.setContractmetaList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -1755,9 +1841,10 @@ proto.payload.CallTx.prototype.addContractmeta = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.payload.CallTx} returns this */ proto.payload.CallTx.prototype.clearContractmetaList = function() { - this.setContractmetaList([]); + return this.setContractmetaList([]); }; @@ -1770,9 +1857,12 @@ proto.payload.CallTx.prototype.getGasprice = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setGasprice = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + return jspb.Message.setProto3IntField(this, 8, value); }; @@ -1781,13 +1871,15 @@ proto.payload.CallTx.prototype.setGasprice = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.ContractMeta.prototype.toObject = function(opt_includeInstance) { @@ -1797,8 +1889,8 @@ proto.payload.ContractMeta.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.ContractMeta} msg The msg instance to transform. * @return {!Object} @@ -1931,9 +2023,12 @@ proto.payload.ContractMeta.prototype.getCodehash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.ContractMeta} returns this + */ proto.payload.ContractMeta.prototype.setCodehash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1946,9 +2041,12 @@ proto.payload.ContractMeta.prototype.getMeta = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.ContractMeta} returns this + */ proto.payload.ContractMeta.prototype.setMeta = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1964,13 +2062,15 @@ proto.payload.SendTx.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.SendTx.prototype.toObject = function(opt_includeInstance) { @@ -1980,8 +2080,8 @@ proto.payload.SendTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.SendTx} msg The msg instance to transform. * @return {!Object} @@ -2097,9 +2197,12 @@ proto.payload.SendTx.prototype.getInputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.SendTx} returns this +*/ proto.payload.SendTx.prototype.setInputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -2115,9 +2218,10 @@ proto.payload.SendTx.prototype.addInputs = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.SendTx} returns this */ proto.payload.SendTx.prototype.clearInputsList = function() { - this.setInputsList([]); + return this.setInputsList([]); }; @@ -2131,9 +2235,12 @@ proto.payload.SendTx.prototype.getOutputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.SendTx} returns this +*/ proto.payload.SendTx.prototype.setOutputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -2149,9 +2256,10 @@ proto.payload.SendTx.prototype.addOutputs = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.SendTx} returns this */ proto.payload.SendTx.prototype.clearOutputsList = function() { - this.setOutputsList([]); + return this.setOutputsList([]); }; @@ -2160,13 +2268,15 @@ proto.payload.SendTx.prototype.clearOutputsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.PermsTx.prototype.toObject = function(opt_includeInstance) { @@ -2176,8 +2286,8 @@ proto.payload.PermsTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.PermsTx} msg The msg instance to transform. * @return {!Object} @@ -2291,17 +2401,21 @@ proto.payload.PermsTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.PermsTx} returns this +*/ proto.payload.PermsTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.PermsTx} returns this */ proto.payload.PermsTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -2324,17 +2438,21 @@ proto.payload.PermsTx.prototype.getPermargs = function() { }; -/** @param {?proto.permission.PermArgs|undefined} value */ +/** + * @param {?proto.permission.PermArgs|undefined} value + * @return {!proto.payload.PermsTx} returns this +*/ proto.payload.PermsTx.prototype.setPermargs = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.PermsTx} returns this */ proto.payload.PermsTx.prototype.clearPermargs = function() { - this.setPermargs(undefined); + return this.setPermargs(undefined); }; @@ -2352,13 +2470,15 @@ proto.payload.PermsTx.prototype.hasPermargs = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.NameTx.prototype.toObject = function(opt_includeInstance) { @@ -2368,8 +2488,8 @@ proto.payload.NameTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.NameTx} msg The msg instance to transform. * @return {!Object} @@ -2505,17 +2625,21 @@ proto.payload.NameTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.NameTx} returns this +*/ proto.payload.NameTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.NameTx} returns this */ proto.payload.NameTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -2537,9 +2661,12 @@ proto.payload.NameTx.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.NameTx} returns this + */ proto.payload.NameTx.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2552,9 +2679,12 @@ proto.payload.NameTx.prototype.getData = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.NameTx} returns this + */ proto.payload.NameTx.prototype.setData = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -2567,9 +2697,12 @@ proto.payload.NameTx.prototype.getFee = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.NameTx} returns this + */ proto.payload.NameTx.prototype.setFee = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -2578,13 +2711,15 @@ proto.payload.NameTx.prototype.setFee = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.BondTx.prototype.toObject = function(opt_includeInstance) { @@ -2594,8 +2729,8 @@ proto.payload.BondTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.BondTx} msg The msg instance to transform. * @return {!Object} @@ -2695,17 +2830,21 @@ proto.payload.BondTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.BondTx} returns this +*/ proto.payload.BondTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.BondTx} returns this */ proto.payload.BondTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -2723,13 +2862,15 @@ proto.payload.BondTx.prototype.hasInput = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.UnbondTx.prototype.toObject = function(opt_includeInstance) { @@ -2739,8 +2880,8 @@ proto.payload.UnbondTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.UnbondTx} msg The msg instance to transform. * @return {!Object} @@ -2854,17 +2995,21 @@ proto.payload.UnbondTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.UnbondTx} returns this +*/ proto.payload.UnbondTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.UnbondTx} returns this */ proto.payload.UnbondTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -2887,17 +3032,21 @@ proto.payload.UnbondTx.prototype.getOutput = function() { }; -/** @param {?proto.payload.TxOutput|undefined} value */ +/** + * @param {?proto.payload.TxOutput|undefined} value + * @return {!proto.payload.UnbondTx} returns this +*/ proto.payload.UnbondTx.prototype.setOutput = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.UnbondTx} returns this */ proto.payload.UnbondTx.prototype.clearOutput = function() { - this.setOutput(undefined); + return this.setOutput(undefined); }; @@ -2922,13 +3071,15 @@ proto.payload.GovTx.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.GovTx.prototype.toObject = function(opt_includeInstance) { @@ -2938,8 +3089,8 @@ proto.payload.GovTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.GovTx} msg The msg instance to transform. * @return {!Object} @@ -3055,9 +3206,12 @@ proto.payload.GovTx.prototype.getInputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.GovTx} returns this +*/ proto.payload.GovTx.prototype.setInputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3073,9 +3227,10 @@ proto.payload.GovTx.prototype.addInputs = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.GovTx} returns this */ proto.payload.GovTx.prototype.clearInputsList = function() { - this.setInputsList([]); + return this.setInputsList([]); }; @@ -3089,9 +3244,12 @@ proto.payload.GovTx.prototype.getAccountupdatesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.GovTx} returns this +*/ proto.payload.GovTx.prototype.setAccountupdatesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -3107,9 +3265,10 @@ proto.payload.GovTx.prototype.addAccountupdates = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.payload.GovTx} returns this */ proto.payload.GovTx.prototype.clearAccountupdatesList = function() { - this.setAccountupdatesList([]); + return this.setAccountupdatesList([]); }; @@ -3118,13 +3277,15 @@ proto.payload.GovTx.prototype.clearAccountupdatesList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.ProposalTx.prototype.toObject = function(opt_includeInstance) { @@ -3134,8 +3295,8 @@ proto.payload.ProposalTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.ProposalTx} msg The msg instance to transform. * @return {!Object} @@ -3273,17 +3434,21 @@ proto.payload.ProposalTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.ProposalTx} returns this +*/ proto.payload.ProposalTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.ProposalTx} returns this */ proto.payload.ProposalTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -3305,9 +3470,12 @@ proto.payload.ProposalTx.prototype.getVotingweight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.ProposalTx} returns this + */ proto.payload.ProposalTx.prototype.setVotingweight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -3344,9 +3512,12 @@ proto.payload.ProposalTx.prototype.getProposalhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.ProposalTx} returns this + */ proto.payload.ProposalTx.prototype.setProposalhash = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -3360,17 +3531,21 @@ proto.payload.ProposalTx.prototype.getProposal = function() { }; -/** @param {?proto.payload.Proposal|undefined} value */ +/** + * @param {?proto.payload.Proposal|undefined} value + * @return {!proto.payload.ProposalTx} returns this +*/ proto.payload.ProposalTx.prototype.setProposal = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.ProposalTx} returns this */ proto.payload.ProposalTx.prototype.clearProposal = function() { - this.setProposal(undefined); + return this.setProposal(undefined); }; @@ -3395,13 +3570,15 @@ proto.payload.IdentifyTx.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.IdentifyTx.prototype.toObject = function(opt_includeInstance) { @@ -3411,8 +3588,8 @@ proto.payload.IdentifyTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.IdentifyTx} msg The msg instance to transform. * @return {!Object} @@ -3527,9 +3704,12 @@ proto.payload.IdentifyTx.prototype.getInputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.IdentifyTx} returns this +*/ proto.payload.IdentifyTx.prototype.setInputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3545,9 +3725,10 @@ proto.payload.IdentifyTx.prototype.addInputs = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.IdentifyTx} returns this */ proto.payload.IdentifyTx.prototype.clearInputsList = function() { - this.setInputsList([]); + return this.setInputsList([]); }; @@ -3561,17 +3742,21 @@ proto.payload.IdentifyTx.prototype.getNode = function() { }; -/** @param {?proto.registry.NodeIdentity|undefined} value */ +/** + * @param {?proto.registry.NodeIdentity|undefined} value + * @return {!proto.payload.IdentifyTx} returns this +*/ proto.payload.IdentifyTx.prototype.setNode = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.IdentifyTx} returns this */ proto.payload.IdentifyTx.prototype.clearNode = function() { - this.setNode(undefined); + return this.setNode(undefined); }; @@ -3596,13 +3781,15 @@ proto.payload.BatchTx.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.BatchTx.prototype.toObject = function(opt_includeInstance) { @@ -3612,8 +3799,8 @@ proto.payload.BatchTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.BatchTx} msg The msg instance to transform. * @return {!Object} @@ -3729,9 +3916,12 @@ proto.payload.BatchTx.prototype.getInputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.BatchTx} returns this +*/ proto.payload.BatchTx.prototype.setInputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3747,9 +3937,10 @@ proto.payload.BatchTx.prototype.addInputs = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.BatchTx} returns this */ proto.payload.BatchTx.prototype.clearInputsList = function() { - this.setInputsList([]); + return this.setInputsList([]); }; @@ -3763,9 +3954,12 @@ proto.payload.BatchTx.prototype.getTxsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.BatchTx} returns this +*/ proto.payload.BatchTx.prototype.setTxsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -3781,9 +3975,10 @@ proto.payload.BatchTx.prototype.addTxs = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.BatchTx} returns this */ proto.payload.BatchTx.prototype.clearTxsList = function() { - this.setTxsList([]); + return this.setTxsList([]); }; @@ -3792,13 +3987,15 @@ proto.payload.BatchTx.prototype.clearTxsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.Vote.prototype.toObject = function(opt_includeInstance) { @@ -3808,8 +4005,8 @@ proto.payload.Vote.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Vote} msg The msg instance to transform. * @return {!Object} @@ -3942,9 +4139,12 @@ proto.payload.Vote.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.Vote} returns this + */ proto.payload.Vote.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3957,9 +4157,12 @@ proto.payload.Vote.prototype.getVotingweight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.Vote} returns this + */ proto.payload.Vote.prototype.setVotingweight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -3968,13 +4171,15 @@ proto.payload.Vote.prototype.setVotingweight = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.Proposal.prototype.toObject = function(opt_includeInstance) { @@ -3984,8 +4189,8 @@ proto.payload.Proposal.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Proposal} msg The msg instance to transform. * @return {!Object} @@ -4108,9 +4313,12 @@ proto.payload.Proposal.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.Proposal} returns this + */ proto.payload.Proposal.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -4123,9 +4331,12 @@ proto.payload.Proposal.prototype.getDescription = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.Proposal} returns this + */ proto.payload.Proposal.prototype.setDescription = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -4139,17 +4350,21 @@ proto.payload.Proposal.prototype.getBatchtx = function() { }; -/** @param {?proto.payload.BatchTx|undefined} value */ +/** + * @param {?proto.payload.BatchTx|undefined} value + * @return {!proto.payload.Proposal} returns this +*/ proto.payload.Proposal.prototype.setBatchtx = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Proposal} returns this */ proto.payload.Proposal.prototype.clearBatchtx = function() { - this.setBatchtx(undefined); + return this.setBatchtx(undefined); }; @@ -4174,13 +4389,15 @@ proto.payload.Ballot.repeatedFields_ = [5]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.Ballot.prototype.toObject = function(opt_includeInstance) { @@ -4190,8 +4407,8 @@ proto.payload.Ballot.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Ballot} msg The msg instance to transform. * @return {!Object} @@ -4339,17 +4556,21 @@ proto.payload.Ballot.prototype.getProposal = function() { }; -/** @param {?proto.payload.Proposal|undefined} value */ +/** + * @param {?proto.payload.Proposal|undefined} value + * @return {!proto.payload.Ballot} returns this +*/ proto.payload.Ballot.prototype.setProposal = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Ballot} returns this */ proto.payload.Ballot.prototype.clearProposal = function() { - this.setProposal(undefined); + return this.setProposal(undefined); }; @@ -4395,9 +4616,12 @@ proto.payload.Ballot.prototype.getFinalizingtx_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.Ballot} returns this + */ proto.payload.Ballot.prototype.setFinalizingtx = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4410,9 +4634,12 @@ proto.payload.Ballot.prototype.getProposalstate = function() { }; -/** @param {!proto.payload.Ballot.ProposalState} value */ +/** + * @param {!proto.payload.Ballot.ProposalState} value + * @return {!proto.payload.Ballot} returns this + */ proto.payload.Ballot.prototype.setProposalstate = function(value) { - jspb.Message.setProto3EnumField(this, 4, value); + return jspb.Message.setProto3EnumField(this, 4, value); }; @@ -4426,9 +4653,12 @@ proto.payload.Ballot.prototype.getVotesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.Ballot} returns this +*/ proto.payload.Ballot.prototype.setVotesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); + return jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -4444,9 +4674,10 @@ proto.payload.Ballot.prototype.addVotes = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.Ballot} returns this */ proto.payload.Ballot.prototype.clearVotesList = function() { - this.setVotesList([]); + return this.setVotesList([]); }; diff --git a/js/proto/permission_pb.js b/js/proto/permission_pb.js index f40b43223..19593fe24 100644 --- a/js/proto/permission_pb.js +++ b/js/proto/permission_pb.js @@ -1,3 +1,4 @@ +// source: permission.proto /** * @fileoverview * @enhanceable @@ -91,13 +92,15 @@ proto.permission.AccountPermissions.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.permission.AccountPermissions.prototype.toObject = function(opt_includeInstance) { @@ -107,8 +110,8 @@ proto.permission.AccountPermissions.prototype.toObject = function(opt_includeIns /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.permission.AccountPermissions} msg The msg instance to transform. * @return {!Object} @@ -117,7 +120,7 @@ proto.permission.AccountPermissions.prototype.toObject = function(opt_includeIns proto.permission.AccountPermissions.toObject = function(includeInstance, msg) { var f, obj = { base: (f = msg.getBase()) && proto.permission.BasePermissions.toObject(includeInstance, f), - rolesList: jspb.Message.getRepeatedField(msg, 2) + rolesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -220,17 +223,21 @@ proto.permission.AccountPermissions.prototype.getBase = function() { }; -/** @param {?proto.permission.BasePermissions|undefined} value */ +/** + * @param {?proto.permission.BasePermissions|undefined} value + * @return {!proto.permission.AccountPermissions} returns this +*/ proto.permission.AccountPermissions.prototype.setBase = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.permission.AccountPermissions} returns this */ proto.permission.AccountPermissions.prototype.clearBase = function() { - this.setBase(undefined); + return this.setBase(undefined); }; @@ -252,26 +259,31 @@ proto.permission.AccountPermissions.prototype.getRolesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.permission.AccountPermissions} returns this + */ proto.permission.AccountPermissions.prototype.setRolesList = function(value) { - jspb.Message.setField(this, 2, value || []); + return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.permission.AccountPermissions} returns this */ proto.permission.AccountPermissions.prototype.addRoles = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.permission.AccountPermissions} returns this */ proto.permission.AccountPermissions.prototype.clearRolesList = function() { - this.setRolesList([]); + return this.setRolesList([]); }; @@ -280,13 +292,15 @@ proto.permission.AccountPermissions.prototype.clearRolesList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstance) { @@ -296,8 +310,8 @@ proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstan /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.permission.BasePermissions} msg The msg instance to transform. * @return {!Object} @@ -305,8 +319,8 @@ proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstan */ proto.permission.BasePermissions.toObject = function(includeInstance, msg) { var f, obj = { - perms: jspb.Message.getField(msg, 1), - setbit: jspb.Message.getField(msg, 2) + perms: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + setbit: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -406,17 +420,21 @@ proto.permission.BasePermissions.prototype.getPerms = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.permission.BasePermissions} returns this + */ proto.permission.BasePermissions.prototype.setPerms = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.BasePermissions} returns this */ proto.permission.BasePermissions.prototype.clearPerms = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -438,17 +456,21 @@ proto.permission.BasePermissions.prototype.getSetbit = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.permission.BasePermissions} returns this + */ proto.permission.BasePermissions.prototype.setSetbit = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.BasePermissions} returns this */ proto.permission.BasePermissions.prototype.clearSetbit = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -466,13 +488,15 @@ proto.permission.BasePermissions.prototype.hasSetbit = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { @@ -482,8 +506,8 @@ proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.permission.PermArgs} msg The msg instance to transform. * @return {!Object} @@ -491,11 +515,11 @@ proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { */ proto.permission.PermArgs.toObject = function(includeInstance, msg) { var f, obj = { - action: jspb.Message.getField(msg, 1), + action: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, target: msg.getTarget_asB64(), - permission: jspb.Message.getField(msg, 3), - role: jspb.Message.getField(msg, 4), - value: jspb.Message.getField(msg, 5) + permission: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + role: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + value: (f = jspb.Message.getBooleanField(msg, 5)) == null ? undefined : f }; if (includeInstance) { @@ -628,17 +652,21 @@ proto.permission.PermArgs.prototype.getAction = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setAction = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this */ proto.permission.PermArgs.prototype.clearAction = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -684,17 +712,21 @@ proto.permission.PermArgs.prototype.getTarget_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setTarget = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this */ proto.permission.PermArgs.prototype.clearTarget = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -716,17 +748,21 @@ proto.permission.PermArgs.prototype.getPermission = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setPermission = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this */ proto.permission.PermArgs.prototype.clearPermission = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -748,17 +784,21 @@ proto.permission.PermArgs.prototype.getRole = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setRole = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this */ proto.permission.PermArgs.prototype.clearRole = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -773,26 +813,28 @@ proto.permission.PermArgs.prototype.hasRole = function() { /** * optional bool Value = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.permission.PermArgs.prototype.getValue = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setValue = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this */ proto.permission.PermArgs.prototype.clearValue = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; diff --git a/js/proto/registry_pb.js b/js/proto/registry_pb.js index c37ccb219..bd4d4f396 100644 --- a/js/proto/registry_pb.js +++ b/js/proto/registry_pb.js @@ -1,3 +1,4 @@ +// source: registry.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.registry.NodeIdentity.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.registry.NodeIdentity.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.registry.NodeIdentity} msg The msg instance to transform. * @return {!Object} @@ -190,9 +193,12 @@ proto.registry.NodeIdentity.prototype.getMoniker = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.registry.NodeIdentity} returns this + */ proto.registry.NodeIdentity.prototype.setMoniker = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -205,9 +211,12 @@ proto.registry.NodeIdentity.prototype.getNetworkaddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.registry.NodeIdentity} returns this + */ proto.registry.NodeIdentity.prototype.setNetworkaddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -244,9 +253,12 @@ proto.registry.NodeIdentity.prototype.getTendermintnodeid_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.registry.NodeIdentity} returns this + */ proto.registry.NodeIdentity.prototype.setTendermintnodeid = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -283,9 +295,12 @@ proto.registry.NodeIdentity.prototype.getValidatorpublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.registry.NodeIdentity} returns this + */ proto.registry.NodeIdentity.prototype.setValidatorpublickey = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; diff --git a/js/proto/rpc_pb.js b/js/proto/rpc_pb.js index 3b00a5cc1..c5b39bd08 100644 --- a/js/proto/rpc_pb.js +++ b/js/proto/rpc_pb.js @@ -1,3 +1,4 @@ +// source: rpc.proto /** * @fileoverview * @enhanceable @@ -46,13 +47,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpc.ResultStatus.prototype.toObject = function(opt_includeInstance) { @@ -62,8 +65,8 @@ proto.rpc.ResultStatus.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpc.ResultStatus} msg The msg instance to transform. * @return {!Object} @@ -77,7 +80,7 @@ proto.rpc.ResultStatus.toObject = function(includeInstance, msg) { genesishash: msg.getGenesishash_asB64(), nodeinfo: (f = msg.getNodeinfo()) && tendermint_pb.NodeInfo.toObject(includeInstance, f), syncinfo: (f = msg.getSyncinfo()) && bcm_pb.SyncInfo.toObject(includeInstance, f), - catchingup: jspb.Message.getFieldWithDefault(msg, 8, false), + catchingup: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), validatorinfo: (f = msg.getValidatorinfo()) && validator_pb.Validator.toObject(includeInstance, f) }; @@ -250,9 +253,12 @@ proto.rpc.ResultStatus.prototype.getChainid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setChainid = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -265,9 +271,12 @@ proto.rpc.ResultStatus.prototype.getRunid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setRunid = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -280,9 +289,12 @@ proto.rpc.ResultStatus.prototype.getBurrowversion = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setBurrowversion = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -319,9 +331,12 @@ proto.rpc.ResultStatus.prototype.getGenesishash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setGenesishash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -335,17 +350,21 @@ proto.rpc.ResultStatus.prototype.getNodeinfo = function() { }; -/** @param {?proto.tendermint.NodeInfo|undefined} value */ +/** + * @param {?proto.tendermint.NodeInfo|undefined} value + * @return {!proto.rpc.ResultStatus} returns this +*/ proto.rpc.ResultStatus.prototype.setNodeinfo = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpc.ResultStatus} returns this */ proto.rpc.ResultStatus.prototype.clearNodeinfo = function() { - this.setNodeinfo(undefined); + return this.setNodeinfo(undefined); }; @@ -368,17 +387,21 @@ proto.rpc.ResultStatus.prototype.getSyncinfo = function() { }; -/** @param {?proto.bcm.SyncInfo|undefined} value */ +/** + * @param {?proto.bcm.SyncInfo|undefined} value + * @return {!proto.rpc.ResultStatus} returns this +*/ proto.rpc.ResultStatus.prototype.setSyncinfo = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpc.ResultStatus} returns this */ proto.rpc.ResultStatus.prototype.clearSyncinfo = function() { - this.setSyncinfo(undefined); + return this.setSyncinfo(undefined); }; @@ -393,18 +416,19 @@ proto.rpc.ResultStatus.prototype.hasSyncinfo = function() { /** * optional bool CatchingUp = 8; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpc.ResultStatus.prototype.getCatchingup = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 8, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setCatchingup = function(value) { - jspb.Message.setProto3BooleanField(this, 8, value); + return jspb.Message.setProto3BooleanField(this, 8, value); }; @@ -418,17 +442,21 @@ proto.rpc.ResultStatus.prototype.getValidatorinfo = function() { }; -/** @param {?proto.validator.Validator|undefined} value */ +/** + * @param {?proto.validator.Validator|undefined} value + * @return {!proto.rpc.ResultStatus} returns this +*/ proto.rpc.ResultStatus.prototype.setValidatorinfo = function(value) { - jspb.Message.setWrapperField(this, 7, value); + return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpc.ResultStatus} returns this */ proto.rpc.ResultStatus.prototype.clearValidatorinfo = function() { - this.setValidatorinfo(undefined); + return this.setValidatorinfo(undefined); }; diff --git a/js/proto/rpcdump_pb.js b/js/proto/rpcdump_pb.js index 5efd0c4d9..f846a6cd5 100644 --- a/js/proto/rpcdump_pb.js +++ b/js/proto/rpcdump_pb.js @@ -1,3 +1,4 @@ +// source: rpcdump.proto /** * @fileoverview * @enhanceable @@ -42,13 +43,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcdump.GetDumpParam.prototype.toObject = function(opt_includeInstance) { @@ -58,8 +61,8 @@ proto.rpcdump.GetDumpParam.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcdump.GetDumpParam} msg The msg instance to transform. * @return {!Object} @@ -156,9 +159,12 @@ proto.rpcdump.GetDumpParam.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcdump.GetDumpParam} returns this + */ proto.rpcdump.GetDumpParam.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; diff --git a/js/proto/rpcevents_pb.js b/js/proto/rpcevents_pb.js index feed93236..25f593ae1 100644 --- a/js/proto/rpcevents_pb.js +++ b/js/proto/rpcevents_pb.js @@ -1,3 +1,4 @@ +// source: rpcevents.proto /** * @fileoverview * @enhanceable @@ -197,13 +198,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstance) { @@ -213,8 +216,8 @@ proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.GetBlockRequest} msg The msg instance to transform. * @return {!Object} @@ -223,7 +226,7 @@ proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstanc proto.rpcevents.GetBlockRequest.toObject = function(includeInstance, msg) { var f, obj = { height: jspb.Message.getFieldWithDefault(msg, 1, 0), - wait: jspb.Message.getFieldWithDefault(msg, 2, false) + wait: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -323,26 +326,30 @@ proto.rpcevents.GetBlockRequest.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.GetBlockRequest} returns this + */ proto.rpcevents.GetBlockRequest.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional bool Wait = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpcevents.GetBlockRequest.prototype.getWait = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.rpcevents.GetBlockRequest} returns this + */ proto.rpcevents.GetBlockRequest.prototype.setWait = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -351,13 +358,15 @@ proto.rpcevents.GetBlockRequest.prototype.setWait = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { @@ -367,8 +376,8 @@ proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.TxRequest} msg The msg instance to transform. * @return {!Object} @@ -377,7 +386,7 @@ proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { proto.rpcevents.TxRequest.toObject = function(includeInstance, msg) { var f, obj = { txhash: msg.getTxhash_asB64(), - wait: jspb.Message.getFieldWithDefault(msg, 2, false) + wait: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -501,26 +510,30 @@ proto.rpcevents.TxRequest.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcevents.TxRequest} returns this + */ proto.rpcevents.TxRequest.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; /** * optional bool Wait = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpcevents.TxRequest.prototype.getWait = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.rpcevents.TxRequest} returns this + */ proto.rpcevents.TxRequest.prototype.setWait = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -529,13 +542,15 @@ proto.rpcevents.TxRequest.prototype.setWait = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.BlocksRequest.prototype.toObject = function(opt_includeInstance) { @@ -545,8 +560,8 @@ proto.rpcevents.BlocksRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.BlocksRequest} msg The msg instance to transform. * @return {!Object} @@ -658,17 +673,21 @@ proto.rpcevents.BlocksRequest.prototype.getBlockrange = function() { }; -/** @param {?proto.rpcevents.BlockRange|undefined} value */ +/** + * @param {?proto.rpcevents.BlockRange|undefined} value + * @return {!proto.rpcevents.BlocksRequest} returns this +*/ proto.rpcevents.BlocksRequest.prototype.setBlockrange = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpcevents.BlocksRequest} returns this */ proto.rpcevents.BlocksRequest.prototype.clearBlockrange = function() { - this.setBlockrange(undefined); + return this.setBlockrange(undefined); }; @@ -690,9 +709,12 @@ proto.rpcevents.BlocksRequest.prototype.getQuery = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcevents.BlocksRequest} returns this + */ proto.rpcevents.BlocksRequest.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -708,13 +730,15 @@ proto.rpcevents.EventsResponse.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.EventsResponse.prototype.toObject = function(opt_includeInstance) { @@ -724,8 +748,8 @@ proto.rpcevents.EventsResponse.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.EventsResponse} msg The msg instance to transform. * @return {!Object} @@ -837,9 +861,12 @@ proto.rpcevents.EventsResponse.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.EventsResponse} returns this + */ proto.rpcevents.EventsResponse.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -853,9 +880,12 @@ proto.rpcevents.EventsResponse.prototype.getEventsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcevents.EventsResponse} returns this +*/ proto.rpcevents.EventsResponse.prototype.setEventsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -871,9 +901,10 @@ proto.rpcevents.EventsResponse.prototype.addEvents = function(opt_value, opt_ind /** * Clears the list making it empty but non-null. + * @return {!proto.rpcevents.EventsResponse} returns this */ proto.rpcevents.EventsResponse.prototype.clearEventsList = function() { - this.setEventsList([]); + return this.setEventsList([]); }; @@ -882,13 +913,15 @@ proto.rpcevents.EventsResponse.prototype.clearEventsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.GetTxsRequest.prototype.toObject = function(opt_includeInstance) { @@ -898,8 +931,8 @@ proto.rpcevents.GetTxsRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.GetTxsRequest} msg The msg instance to transform. * @return {!Object} @@ -1020,9 +1053,12 @@ proto.rpcevents.GetTxsRequest.prototype.getStartheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.GetTxsRequest} returns this + */ proto.rpcevents.GetTxsRequest.prototype.setStartheight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1035,9 +1071,12 @@ proto.rpcevents.GetTxsRequest.prototype.getEndheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.GetTxsRequest} returns this + */ proto.rpcevents.GetTxsRequest.prototype.setEndheight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -1050,9 +1089,12 @@ proto.rpcevents.GetTxsRequest.prototype.getQuery = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcevents.GetTxsRequest} returns this + */ proto.rpcevents.GetTxsRequest.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -1068,13 +1110,15 @@ proto.rpcevents.GetTxsResponse.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.GetTxsResponse.prototype.toObject = function(opt_includeInstance) { @@ -1084,8 +1128,8 @@ proto.rpcevents.GetTxsResponse.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.GetTxsResponse} msg The msg instance to transform. * @return {!Object} @@ -1197,9 +1241,12 @@ proto.rpcevents.GetTxsResponse.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.GetTxsResponse} returns this + */ proto.rpcevents.GetTxsResponse.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1213,9 +1260,12 @@ proto.rpcevents.GetTxsResponse.prototype.getTxexecutionsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcevents.GetTxsResponse} returns this +*/ proto.rpcevents.GetTxsResponse.prototype.setTxexecutionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -1231,9 +1281,10 @@ proto.rpcevents.GetTxsResponse.prototype.addTxexecutions = function(opt_value, o /** * Clears the list making it empty but non-null. + * @return {!proto.rpcevents.GetTxsResponse} returns this */ proto.rpcevents.GetTxsResponse.prototype.clearTxexecutionsList = function() { - this.setTxexecutionsList([]); + return this.setTxexecutionsList([]); }; @@ -1242,13 +1293,15 @@ proto.rpcevents.GetTxsResponse.prototype.clearTxexecutionsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.Bound.prototype.toObject = function(opt_includeInstance) { @@ -1258,8 +1311,8 @@ proto.rpcevents.Bound.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.Bound} msg The msg instance to transform. * @return {!Object} @@ -1379,9 +1432,12 @@ proto.rpcevents.Bound.prototype.getType = function() { }; -/** @param {!proto.rpcevents.Bound.BoundType} value */ +/** + * @param {!proto.rpcevents.Bound.BoundType} value + * @return {!proto.rpcevents.Bound} returns this + */ proto.rpcevents.Bound.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 1, value); + return jspb.Message.setProto3EnumField(this, 1, value); }; @@ -1394,9 +1450,12 @@ proto.rpcevents.Bound.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.Bound} returns this + */ proto.rpcevents.Bound.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -1405,13 +1464,15 @@ proto.rpcevents.Bound.prototype.setIndex = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.BlockRange.prototype.toObject = function(opt_includeInstance) { @@ -1421,8 +1482,8 @@ proto.rpcevents.BlockRange.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.BlockRange} msg The msg instance to transform. * @return {!Object} @@ -1536,17 +1597,21 @@ proto.rpcevents.BlockRange.prototype.getStart = function() { }; -/** @param {?proto.rpcevents.Bound|undefined} value */ +/** + * @param {?proto.rpcevents.Bound|undefined} value + * @return {!proto.rpcevents.BlockRange} returns this +*/ proto.rpcevents.BlockRange.prototype.setStart = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpcevents.BlockRange} returns this */ proto.rpcevents.BlockRange.prototype.clearStart = function() { - this.setStart(undefined); + return this.setStart(undefined); }; @@ -1569,17 +1634,21 @@ proto.rpcevents.BlockRange.prototype.getEnd = function() { }; -/** @param {?proto.rpcevents.Bound|undefined} value */ +/** + * @param {?proto.rpcevents.Bound|undefined} value + * @return {!proto.rpcevents.BlockRange} returns this +*/ proto.rpcevents.BlockRange.prototype.setEnd = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpcevents.BlockRange} returns this */ proto.rpcevents.BlockRange.prototype.clearEnd = function() { - this.setEnd(undefined); + return this.setEnd(undefined); }; diff --git a/js/proto/rpcquery_pb.js b/js/proto/rpcquery_pb.js index f013bb83f..9be4a8384 100644 --- a/js/proto/rpcquery_pb.js +++ b/js/proto/rpcquery_pb.js @@ -1,3 +1,4 @@ +// source: rpcquery.proto /** * @fileoverview * @enhanceable @@ -516,13 +517,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.StatusParam.prototype.toObject = function(opt_includeInstance) { @@ -532,8 +535,8 @@ proto.rpcquery.StatusParam.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.StatusParam} msg The msg instance to transform. * @return {!Object} @@ -642,9 +645,12 @@ proto.rpcquery.StatusParam.prototype.getBlocktimewithin = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.StatusParam} returns this + */ proto.rpcquery.StatusParam.prototype.setBlocktimewithin = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -657,9 +663,12 @@ proto.rpcquery.StatusParam.prototype.getBlockseentimewithin = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.StatusParam} returns this + */ proto.rpcquery.StatusParam.prototype.setBlockseentimewithin = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -668,13 +677,15 @@ proto.rpcquery.StatusParam.prototype.setBlockseentimewithin = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetAccountParam.prototype.toObject = function(opt_includeInstance) { @@ -684,8 +695,8 @@ proto.rpcquery.GetAccountParam.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetAccountParam} msg The msg instance to transform. * @return {!Object} @@ -806,9 +817,12 @@ proto.rpcquery.GetAccountParam.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetAccountParam} returns this + */ proto.rpcquery.GetAccountParam.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -817,13 +831,15 @@ proto.rpcquery.GetAccountParam.prototype.setAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetMetadataParam.prototype.toObject = function(opt_includeInstance) { @@ -833,8 +849,8 @@ proto.rpcquery.GetMetadataParam.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetMetadataParam} msg The msg instance to transform. * @return {!Object} @@ -967,9 +983,12 @@ proto.rpcquery.GetMetadataParam.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetMetadataParam} returns this + */ proto.rpcquery.GetMetadataParam.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1006,9 +1025,12 @@ proto.rpcquery.GetMetadataParam.prototype.getMetadatahash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetMetadataParam} returns this + */ proto.rpcquery.GetMetadataParam.prototype.setMetadatahash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -1017,13 +1039,15 @@ proto.rpcquery.GetMetadataParam.prototype.setMetadatahash = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.MetadataResult.prototype.toObject = function(opt_includeInstance) { @@ -1033,8 +1057,8 @@ proto.rpcquery.MetadataResult.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.MetadataResult} msg The msg instance to transform. * @return {!Object} @@ -1131,9 +1155,12 @@ proto.rpcquery.MetadataResult.prototype.getMetadata = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.MetadataResult} returns this + */ proto.rpcquery.MetadataResult.prototype.setMetadata = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1142,13 +1169,15 @@ proto.rpcquery.MetadataResult.prototype.setMetadata = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetStorageParam.prototype.toObject = function(opt_includeInstance) { @@ -1158,8 +1187,8 @@ proto.rpcquery.GetStorageParam.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetStorageParam} msg The msg instance to transform. * @return {!Object} @@ -1292,9 +1321,12 @@ proto.rpcquery.GetStorageParam.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetStorageParam} returns this + */ proto.rpcquery.GetStorageParam.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1331,9 +1363,12 @@ proto.rpcquery.GetStorageParam.prototype.getKey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetStorageParam} returns this + */ proto.rpcquery.GetStorageParam.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -1342,13 +1377,15 @@ proto.rpcquery.GetStorageParam.prototype.setKey = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.StorageValue.prototype.toObject = function(opt_includeInstance) { @@ -1358,8 +1395,8 @@ proto.rpcquery.StorageValue.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.StorageValue} msg The msg instance to transform. * @return {!Object} @@ -1480,9 +1517,12 @@ proto.rpcquery.StorageValue.prototype.getValue_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.StorageValue} returns this + */ proto.rpcquery.StorageValue.prototype.setValue = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1491,13 +1531,15 @@ proto.rpcquery.StorageValue.prototype.setValue = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ListAccountsParam.prototype.toObject = function(opt_includeInstance) { @@ -1507,8 +1549,8 @@ proto.rpcquery.ListAccountsParam.prototype.toObject = function(opt_includeInstan /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ListAccountsParam} msg The msg instance to transform. * @return {!Object} @@ -1605,9 +1647,12 @@ proto.rpcquery.ListAccountsParam.prototype.getQuery = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.ListAccountsParam} returns this + */ proto.rpcquery.ListAccountsParam.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1616,13 +1661,15 @@ proto.rpcquery.ListAccountsParam.prototype.setQuery = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetNameParam.prototype.toObject = function(opt_includeInstance) { @@ -1632,8 +1679,8 @@ proto.rpcquery.GetNameParam.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetNameParam} msg The msg instance to transform. * @return {!Object} @@ -1730,9 +1777,12 @@ proto.rpcquery.GetNameParam.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.GetNameParam} returns this + */ proto.rpcquery.GetNameParam.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1741,13 +1791,15 @@ proto.rpcquery.GetNameParam.prototype.setName = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ListNamesParam.prototype.toObject = function(opt_includeInstance) { @@ -1757,8 +1809,8 @@ proto.rpcquery.ListNamesParam.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ListNamesParam} msg The msg instance to transform. * @return {!Object} @@ -1855,9 +1907,12 @@ proto.rpcquery.ListNamesParam.prototype.getQuery = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.ListNamesParam} returns this + */ proto.rpcquery.ListNamesParam.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1866,13 +1921,15 @@ proto.rpcquery.ListNamesParam.prototype.setQuery = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetNetworkRegistryParam.prototype.toObject = function(opt_includeInstance) { @@ -1882,8 +1939,8 @@ proto.rpcquery.GetNetworkRegistryParam.prototype.toObject = function(opt_include /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetNetworkRegistryParam} msg The msg instance to transform. * @return {!Object} @@ -1965,13 +2022,15 @@ proto.rpcquery.GetNetworkRegistryParam.serializeBinaryToWriter = function(messag if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetValidatorSetParam.prototype.toObject = function(opt_includeInstance) { @@ -1981,8 +2040,8 @@ proto.rpcquery.GetValidatorSetParam.prototype.toObject = function(opt_includeIns /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetValidatorSetParam} msg The msg instance to transform. * @return {!Object} @@ -2064,13 +2123,15 @@ proto.rpcquery.GetValidatorSetParam.serializeBinaryToWriter = function(message, if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetValidatorSetHistoryParam.prototype.toObject = function(opt_includeInstance) { @@ -2080,8 +2141,8 @@ proto.rpcquery.GetValidatorSetHistoryParam.prototype.toObject = function(opt_inc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetValidatorSetHistoryParam} msg The msg instance to transform. * @return {!Object} @@ -2178,9 +2239,12 @@ proto.rpcquery.GetValidatorSetHistoryParam.prototype.getIncludeprevious = functi }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.GetValidatorSetHistoryParam} returns this + */ proto.rpcquery.GetValidatorSetHistoryParam.prototype.setIncludeprevious = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2196,13 +2260,15 @@ proto.rpcquery.NetworkRegistry.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.NetworkRegistry.prototype.toObject = function(opt_includeInstance) { @@ -2212,8 +2278,8 @@ proto.rpcquery.NetworkRegistry.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.NetworkRegistry} msg The msg instance to transform. * @return {!Object} @@ -2314,9 +2380,12 @@ proto.rpcquery.NetworkRegistry.prototype.getSetList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcquery.NetworkRegistry} returns this +*/ proto.rpcquery.NetworkRegistry.prototype.setSetList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -2332,9 +2401,10 @@ proto.rpcquery.NetworkRegistry.prototype.addSet = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.rpcquery.NetworkRegistry} returns this */ proto.rpcquery.NetworkRegistry.prototype.clearSetList = function() { - this.setSetList([]); + return this.setSetList([]); }; @@ -2343,13 +2413,15 @@ proto.rpcquery.NetworkRegistry.prototype.clearSetList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.RegisteredValidator.prototype.toObject = function(opt_includeInstance) { @@ -2359,8 +2431,8 @@ proto.rpcquery.RegisteredValidator.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.RegisteredValidator} msg The msg instance to transform. * @return {!Object} @@ -2495,9 +2567,12 @@ proto.rpcquery.RegisteredValidator.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.RegisteredValidator} returns this + */ proto.rpcquery.RegisteredValidator.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2511,17 +2586,21 @@ proto.rpcquery.RegisteredValidator.prototype.getNode = function() { }; -/** @param {?proto.registry.NodeIdentity|undefined} value */ +/** + * @param {?proto.registry.NodeIdentity|undefined} value + * @return {!proto.rpcquery.RegisteredValidator} returns this +*/ proto.rpcquery.RegisteredValidator.prototype.setNode = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpcquery.RegisteredValidator} returns this */ proto.rpcquery.RegisteredValidator.prototype.clearNode = function() { - this.setNode(undefined); + return this.setNode(undefined); }; @@ -2546,13 +2625,15 @@ proto.rpcquery.ValidatorSetHistory.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ValidatorSetHistory.prototype.toObject = function(opt_includeInstance) { @@ -2562,8 +2643,8 @@ proto.rpcquery.ValidatorSetHistory.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ValidatorSetHistory} msg The msg instance to transform. * @return {!Object} @@ -2664,9 +2745,12 @@ proto.rpcquery.ValidatorSetHistory.prototype.getHistoryList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcquery.ValidatorSetHistory} returns this +*/ proto.rpcquery.ValidatorSetHistory.prototype.setHistoryList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -2682,9 +2766,10 @@ proto.rpcquery.ValidatorSetHistory.prototype.addHistory = function(opt_value, op /** * Clears the list making it empty but non-null. + * @return {!proto.rpcquery.ValidatorSetHistory} returns this */ proto.rpcquery.ValidatorSetHistory.prototype.clearHistoryList = function() { - this.setHistoryList([]); + return this.setHistoryList([]); }; @@ -2700,13 +2785,15 @@ proto.rpcquery.ValidatorSet.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ValidatorSet.prototype.toObject = function(opt_includeInstance) { @@ -2716,8 +2803,8 @@ proto.rpcquery.ValidatorSet.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ValidatorSet} msg The msg instance to transform. * @return {!Object} @@ -2829,9 +2916,12 @@ proto.rpcquery.ValidatorSet.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.ValidatorSet} returns this + */ proto.rpcquery.ValidatorSet.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2845,9 +2935,12 @@ proto.rpcquery.ValidatorSet.prototype.getSetList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcquery.ValidatorSet} returns this +*/ proto.rpcquery.ValidatorSet.prototype.setSetList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -2863,9 +2956,10 @@ proto.rpcquery.ValidatorSet.prototype.addSet = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.rpcquery.ValidatorSet} returns this */ proto.rpcquery.ValidatorSet.prototype.clearSetList = function() { - this.setSetList([]); + return this.setSetList([]); }; @@ -2874,13 +2968,15 @@ proto.rpcquery.ValidatorSet.prototype.clearSetList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetProposalParam.prototype.toObject = function(opt_includeInstance) { @@ -2890,8 +2986,8 @@ proto.rpcquery.GetProposalParam.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetProposalParam} msg The msg instance to transform. * @return {!Object} @@ -3012,9 +3108,12 @@ proto.rpcquery.GetProposalParam.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetProposalParam} returns this + */ proto.rpcquery.GetProposalParam.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3023,13 +3122,15 @@ proto.rpcquery.GetProposalParam.prototype.setHash = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInstance) { @@ -3039,8 +3140,8 @@ proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ListProposalsParam} msg The msg instance to transform. * @return {!Object} @@ -3048,7 +3149,7 @@ proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInsta */ proto.rpcquery.ListProposalsParam.toObject = function(includeInstance, msg) { var f, obj = { - proposed: jspb.Message.getFieldWithDefault(msg, 1, false) + proposed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -3130,18 +3231,19 @@ proto.rpcquery.ListProposalsParam.serializeBinaryToWriter = function(message, wr /** * optional bool Proposed = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpcquery.ListProposalsParam.prototype.getProposed = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.rpcquery.ListProposalsParam} returns this + */ proto.rpcquery.ListProposalsParam.prototype.setProposed = function(value) { - jspb.Message.setProto3BooleanField(this, 1, value); + return jspb.Message.setProto3BooleanField(this, 1, value); }; @@ -3150,13 +3252,15 @@ proto.rpcquery.ListProposalsParam.prototype.setProposed = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ProposalResult.prototype.toObject = function(opt_includeInstance) { @@ -3166,8 +3270,8 @@ proto.rpcquery.ProposalResult.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ProposalResult} msg The msg instance to transform. * @return {!Object} @@ -3302,9 +3406,12 @@ proto.rpcquery.ProposalResult.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.ProposalResult} returns this + */ proto.rpcquery.ProposalResult.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3318,17 +3425,21 @@ proto.rpcquery.ProposalResult.prototype.getBallot = function() { }; -/** @param {?proto.payload.Ballot|undefined} value */ +/** + * @param {?proto.payload.Ballot|undefined} value + * @return {!proto.rpcquery.ProposalResult} returns this +*/ proto.rpcquery.ProposalResult.prototype.setBallot = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpcquery.ProposalResult} returns this */ proto.rpcquery.ProposalResult.prototype.clearBallot = function() { - this.setBallot(undefined); + return this.setBallot(undefined); }; @@ -3346,13 +3457,15 @@ proto.rpcquery.ProposalResult.prototype.hasBallot = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetStatsParam.prototype.toObject = function(opt_includeInstance) { @@ -3362,8 +3475,8 @@ proto.rpcquery.GetStatsParam.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetStatsParam} msg The msg instance to transform. * @return {!Object} @@ -3445,13 +3558,15 @@ proto.rpcquery.GetStatsParam.serializeBinaryToWriter = function(message, writer) if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.Stats.prototype.toObject = function(opt_includeInstance) { @@ -3461,8 +3576,8 @@ proto.rpcquery.Stats.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.Stats} msg The msg instance to transform. * @return {!Object} @@ -3571,9 +3686,12 @@ proto.rpcquery.Stats.prototype.getAccountswithcode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.Stats} returns this + */ proto.rpcquery.Stats.prototype.setAccountswithcode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -3586,9 +3704,12 @@ proto.rpcquery.Stats.prototype.getAccountswithoutcode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.Stats} returns this + */ proto.rpcquery.Stats.prototype.setAccountswithoutcode = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -3597,13 +3718,15 @@ proto.rpcquery.Stats.prototype.setAccountswithoutcode = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetBlockParam.prototype.toObject = function(opt_includeInstance) { @@ -3613,8 +3736,8 @@ proto.rpcquery.GetBlockParam.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetBlockParam} msg The msg instance to transform. * @return {!Object} @@ -3711,9 +3834,12 @@ proto.rpcquery.GetBlockParam.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.GetBlockParam} returns this + */ proto.rpcquery.GetBlockParam.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; diff --git a/js/proto/rpctransact_pb.js b/js/proto/rpctransact_pb.js index 06e8e9386..991ba55c8 100644 --- a/js/proto/rpctransact_pb.js +++ b/js/proto/rpctransact_pb.js @@ -1,3 +1,4 @@ +// source: rpctransact.proto /** * @fileoverview * @enhanceable @@ -92,13 +93,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpctransact.CallCodeParam.prototype.toObject = function(opt_includeInstance) { @@ -108,8 +111,8 @@ proto.rpctransact.CallCodeParam.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpctransact.CallCodeParam} msg The msg instance to transform. * @return {!Object} @@ -254,9 +257,12 @@ proto.rpctransact.CallCodeParam.prototype.getFromaddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpctransact.CallCodeParam} returns this + */ proto.rpctransact.CallCodeParam.prototype.setFromaddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -293,9 +299,12 @@ proto.rpctransact.CallCodeParam.prototype.getCode_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpctransact.CallCodeParam} returns this + */ proto.rpctransact.CallCodeParam.prototype.setCode = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -332,9 +341,12 @@ proto.rpctransact.CallCodeParam.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpctransact.CallCodeParam} returns this + */ proto.rpctransact.CallCodeParam.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -343,13 +355,15 @@ proto.rpctransact.CallCodeParam.prototype.setData = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpctransact.TxEnvelope.prototype.toObject = function(opt_includeInstance) { @@ -359,8 +373,8 @@ proto.rpctransact.TxEnvelope.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpctransact.TxEnvelope} msg The msg instance to transform. * @return {!Object} @@ -460,17 +474,21 @@ proto.rpctransact.TxEnvelope.prototype.getEnvelope = function() { }; -/** @param {?proto.txs.Envelope|undefined} value */ +/** + * @param {?proto.txs.Envelope|undefined} value + * @return {!proto.rpctransact.TxEnvelope} returns this +*/ proto.rpctransact.TxEnvelope.prototype.setEnvelope = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpctransact.TxEnvelope} returns this */ proto.rpctransact.TxEnvelope.prototype.clearEnvelope = function() { - this.setEnvelope(undefined); + return this.setEnvelope(undefined); }; @@ -488,13 +506,15 @@ proto.rpctransact.TxEnvelope.prototype.hasEnvelope = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpctransact.TxEnvelopeParam.prototype.toObject = function(opt_includeInstance) { @@ -504,8 +524,8 @@ proto.rpctransact.TxEnvelopeParam.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpctransact.TxEnvelopeParam} msg The msg instance to transform. * @return {!Object} @@ -633,17 +653,21 @@ proto.rpctransact.TxEnvelopeParam.prototype.getEnvelope = function() { }; -/** @param {?proto.txs.Envelope|undefined} value */ +/** + * @param {?proto.txs.Envelope|undefined} value + * @return {!proto.rpctransact.TxEnvelopeParam} returns this +*/ proto.rpctransact.TxEnvelopeParam.prototype.setEnvelope = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpctransact.TxEnvelopeParam} returns this */ proto.rpctransact.TxEnvelopeParam.prototype.clearEnvelope = function() { - this.setEnvelope(undefined); + return this.setEnvelope(undefined); }; @@ -666,17 +690,21 @@ proto.rpctransact.TxEnvelopeParam.prototype.getPayload = function() { }; -/** @param {?proto.payload.Any|undefined} value */ +/** + * @param {?proto.payload.Any|undefined} value + * @return {!proto.rpctransact.TxEnvelopeParam} returns this +*/ proto.rpctransact.TxEnvelopeParam.prototype.setPayload = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpctransact.TxEnvelopeParam} returns this */ proto.rpctransact.TxEnvelopeParam.prototype.clearPayload = function() { - this.setPayload(undefined); + return this.setPayload(undefined); }; @@ -699,17 +727,21 @@ proto.rpctransact.TxEnvelopeParam.prototype.getTimeout = function() { }; -/** @param {?proto.google.protobuf.Duration|undefined} value */ +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.rpctransact.TxEnvelopeParam} returns this +*/ proto.rpctransact.TxEnvelopeParam.prototype.setTimeout = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpctransact.TxEnvelopeParam} returns this */ proto.rpctransact.TxEnvelopeParam.prototype.clearTimeout = function() { - this.setTimeout(undefined); + return this.setTimeout(undefined); }; diff --git a/js/proto/spec_pb.js b/js/proto/spec_pb.js index cfe5df863..c0b9cd6d6 100644 --- a/js/proto/spec_pb.js +++ b/js/proto/spec_pb.js @@ -1,3 +1,4 @@ +// source: spec.proto /** * @fileoverview * @enhanceable @@ -51,13 +52,15 @@ proto.spec.TemplateAccount.repeatedFields_ = [4,5,6]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.spec.TemplateAccount.prototype.toObject = function(opt_includeInstance) { @@ -67,8 +70,8 @@ proto.spec.TemplateAccount.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.spec.TemplateAccount} msg The msg instance to transform. * @return {!Object} @@ -81,8 +84,8 @@ proto.spec.TemplateAccount.toObject = function(includeInstance, msg) { publickey: (f = msg.getPublickey()) && crypto_pb.PublicKey.toObject(includeInstance, f), amountsList: jspb.Message.toObjectList(msg.getAmountsList(), balance_pb.Balance.toObject, includeInstance), - permissionsList: jspb.Message.getRepeatedField(msg, 5), - rolesList: jspb.Message.getRepeatedField(msg, 6), + permissionsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + rolesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, code: msg.getCode_asB64() }; @@ -242,9 +245,12 @@ proto.spec.TemplateAccount.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -281,9 +287,12 @@ proto.spec.TemplateAccount.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -297,17 +306,21 @@ proto.spec.TemplateAccount.prototype.getPublickey = function() { }; -/** @param {?proto.crypto.PublicKey|undefined} value */ +/** + * @param {?proto.crypto.PublicKey|undefined} value + * @return {!proto.spec.TemplateAccount} returns this +*/ proto.spec.TemplateAccount.prototype.setPublickey = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.clearPublickey = function() { - this.setPublickey(undefined); + return this.setPublickey(undefined); }; @@ -330,9 +343,12 @@ proto.spec.TemplateAccount.prototype.getAmountsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.spec.TemplateAccount} returns this +*/ proto.spec.TemplateAccount.prototype.setAmountsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -348,9 +364,10 @@ proto.spec.TemplateAccount.prototype.addAmounts = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.clearAmountsList = function() { - this.setAmountsList([]); + return this.setAmountsList([]); }; @@ -363,26 +380,31 @@ proto.spec.TemplateAccount.prototype.getPermissionsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setPermissionsList = function(value) { - jspb.Message.setField(this, 5, value || []); + return jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.addPermissions = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 5, value, opt_index); + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.clearPermissionsList = function() { - this.setPermissionsList([]); + return this.setPermissionsList([]); }; @@ -395,26 +417,31 @@ proto.spec.TemplateAccount.prototype.getRolesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setRolesList = function(value) { - jspb.Message.setField(this, 6, value || []); + return jspb.Message.setField(this, 6, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.addRoles = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 6, value, opt_index); + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.clearRolesList = function() { - this.setRolesList([]); + return this.setRolesList([]); }; @@ -451,9 +478,12 @@ proto.spec.TemplateAccount.prototype.getCode_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setCode = function(value) { - jspb.Message.setProto3BytesField(this, 7, value); + return jspb.Message.setProto3BytesField(this, 7, value); }; diff --git a/js/proto/storage_pb.js b/js/proto/storage_pb.js index 467f53a7d..4a7d06688 100644 --- a/js/proto/storage_pb.js +++ b/js/proto/storage_pb.js @@ -1,3 +1,4 @@ +// source: storage.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.storage.CommitID.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.storage.CommitID.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.storage.CommitID} msg The msg instance to transform. * @return {!Object} @@ -166,9 +169,12 @@ proto.storage.CommitID.prototype.getVersion = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.storage.CommitID} returns this + */ proto.storage.CommitID.prototype.setVersion = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -205,9 +211,12 @@ proto.storage.CommitID.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.storage.CommitID} returns this + */ proto.storage.CommitID.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; diff --git a/js/proto/tendermint_pb.js b/js/proto/tendermint_pb.js index 67f898ff2..779e287f0 100644 --- a/js/proto/tendermint_pb.js +++ b/js/proto/tendermint_pb.js @@ -1,3 +1,4 @@ +// source: tendermint.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.tendermint.NodeInfo.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.tendermint.NodeInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.tendermint.NodeInfo} msg The msg instance to transform. * @return {!Object} @@ -262,9 +265,12 @@ proto.tendermint.NodeInfo.prototype.getId_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setId = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -277,9 +283,12 @@ proto.tendermint.NodeInfo.prototype.getListenaddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setListenaddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -292,9 +301,12 @@ proto.tendermint.NodeInfo.prototype.getNetwork = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setNetwork = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -307,9 +319,12 @@ proto.tendermint.NodeInfo.prototype.getVersion = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -346,9 +361,12 @@ proto.tendermint.NodeInfo.prototype.getChannels_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setChannels = function(value) { - jspb.Message.setProto3BytesField(this, 5, value); + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -361,9 +379,12 @@ proto.tendermint.NodeInfo.prototype.getMoniker = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setMoniker = function(value) { - jspb.Message.setProto3StringField(this, 6, value); + return jspb.Message.setProto3StringField(this, 6, value); }; @@ -376,9 +397,12 @@ proto.tendermint.NodeInfo.prototype.getRpcaddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setRpcaddress = function(value) { - jspb.Message.setProto3StringField(this, 7, value); + return jspb.Message.setProto3StringField(this, 7, value); }; @@ -391,9 +415,12 @@ proto.tendermint.NodeInfo.prototype.getTxindex = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setTxindex = function(value) { - jspb.Message.setProto3StringField(this, 8, value); + return jspb.Message.setProto3StringField(this, 8, value); }; diff --git a/js/proto/txs_pb.js b/js/proto/txs_pb.js index 4192f3148..bc6f6158c 100644 --- a/js/proto/txs_pb.js +++ b/js/proto/txs_pb.js @@ -1,3 +1,4 @@ +// source: txs.proto /** * @fileoverview * @enhanceable @@ -94,13 +95,15 @@ proto.txs.Envelope.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.txs.Envelope.prototype.toObject = function(opt_includeInstance) { @@ -110,8 +113,8 @@ proto.txs.Envelope.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.txs.Envelope} msg The msg instance to transform. * @return {!Object} @@ -244,9 +247,12 @@ proto.txs.Envelope.prototype.getSignatoriesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.txs.Envelope} returns this +*/ proto.txs.Envelope.prototype.setSignatoriesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -262,9 +268,10 @@ proto.txs.Envelope.prototype.addSignatories = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.txs.Envelope} returns this */ proto.txs.Envelope.prototype.clearSignatoriesList = function() { - this.setSignatoriesList([]); + return this.setSignatoriesList([]); }; @@ -301,9 +308,12 @@ proto.txs.Envelope.prototype.getTx_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.txs.Envelope} returns this + */ proto.txs.Envelope.prototype.setTx = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -316,9 +326,12 @@ proto.txs.Envelope.prototype.getEnc = function() { }; -/** @param {!proto.txs.Envelope.Encoding} value */ +/** + * @param {!proto.txs.Envelope.Encoding} value + * @return {!proto.txs.Envelope} returns this + */ proto.txs.Envelope.prototype.setEnc = function(value) { - jspb.Message.setProto3EnumField(this, 3, value); + return jspb.Message.setProto3EnumField(this, 3, value); }; @@ -327,13 +340,15 @@ proto.txs.Envelope.prototype.setEnc = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.txs.Signatory.prototype.toObject = function(opt_includeInstance) { @@ -343,8 +358,8 @@ proto.txs.Signatory.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.txs.Signatory} msg The msg instance to transform. * @return {!Object} @@ -493,9 +508,12 @@ proto.txs.Signatory.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.txs.Signatory} returns this + */ proto.txs.Signatory.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -509,17 +527,21 @@ proto.txs.Signatory.prototype.getPublickey = function() { }; -/** @param {?proto.crypto.PublicKey|undefined} value */ +/** + * @param {?proto.crypto.PublicKey|undefined} value + * @return {!proto.txs.Signatory} returns this +*/ proto.txs.Signatory.prototype.setPublickey = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.txs.Signatory} returns this */ proto.txs.Signatory.prototype.clearPublickey = function() { - this.setPublickey(undefined); + return this.setPublickey(undefined); }; @@ -542,17 +564,21 @@ proto.txs.Signatory.prototype.getSignature = function() { }; -/** @param {?proto.crypto.Signature|undefined} value */ +/** + * @param {?proto.crypto.Signature|undefined} value + * @return {!proto.txs.Signatory} returns this +*/ proto.txs.Signatory.prototype.setSignature = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.txs.Signatory} returns this */ proto.txs.Signatory.prototype.clearSignature = function() { - this.setSignature(undefined); + return this.setSignature(undefined); }; @@ -570,13 +596,15 @@ proto.txs.Signatory.prototype.hasSignature = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.txs.Receipt.prototype.toObject = function(opt_includeInstance) { @@ -586,8 +614,8 @@ proto.txs.Receipt.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.txs.Receipt} msg The msg instance to transform. * @return {!Object} @@ -597,7 +625,7 @@ proto.txs.Receipt.toObject = function(includeInstance, msg) { var f, obj = { txtype: jspb.Message.getFieldWithDefault(msg, 1, 0), txhash: msg.getTxhash_asB64(), - createscontract: jspb.Message.getFieldWithDefault(msg, 3, false), + createscontract: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), contractaddress: msg.getContractaddress_asB64() }; @@ -720,9 +748,12 @@ proto.txs.Receipt.prototype.getTxtype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.txs.Receipt} returns this + */ proto.txs.Receipt.prototype.setTxtype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -759,26 +790,30 @@ proto.txs.Receipt.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.txs.Receipt} returns this + */ proto.txs.Receipt.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional bool CreatesContract = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.txs.Receipt.prototype.getCreatescontract = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.txs.Receipt} returns this + */ proto.txs.Receipt.prototype.setCreatescontract = function(value) { - jspb.Message.setProto3BooleanField(this, 3, value); + return jspb.Message.setProto3BooleanField(this, 3, value); }; @@ -815,9 +850,12 @@ proto.txs.Receipt.prototype.getContractaddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.txs.Receipt} returns this + */ proto.txs.Receipt.prototype.setContractaddress = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; diff --git a/js/proto/validator_pb.js b/js/proto/validator_pb.js index 40622b57b..443a6da4c 100644 --- a/js/proto/validator_pb.js +++ b/js/proto/validator_pb.js @@ -1,3 +1,4 @@ +// source: validator.proto /** * @fileoverview * @enhanceable @@ -42,13 +43,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.validator.Validator.prototype.toObject = function(opt_includeInstance) { @@ -58,8 +61,8 @@ proto.validator.Validator.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.validator.Validator} msg The msg instance to transform. * @return {!Object} @@ -206,9 +209,12 @@ proto.validator.Validator.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.validator.Validator} returns this + */ proto.validator.Validator.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -222,17 +228,21 @@ proto.validator.Validator.prototype.getPublickey = function() { }; -/** @param {?proto.crypto.PublicKey|undefined} value */ +/** + * @param {?proto.crypto.PublicKey|undefined} value + * @return {!proto.validator.Validator} returns this +*/ proto.validator.Validator.prototype.setPublickey = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.validator.Validator} returns this */ proto.validator.Validator.prototype.clearPublickey = function() { - this.setPublickey(undefined); + return this.setPublickey(undefined); }; @@ -254,9 +264,12 @@ proto.validator.Validator.prototype.getPower = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.validator.Validator} returns this + */ proto.validator.Validator.prototype.setPower = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; From 0c30d0309f51d2317a5bb920ac6bfaff82c43031 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 13 Apr 2020 21:08:21 +0100 Subject: [PATCH 075/185] Add Helm charts and update documentation Signed-off-by: Silas Davis --- .github/workflows/release.yaml | 14 ++ .github/workflows/test.yaml | 13 ++ .gitignore | 2 + CHANGELOG.md | 10 ++ Makefile | 39 +++- NOTES.md | 7 +- README.md | 38 ++-- docs/README.md | 52 ------ docs/_sidebar.md | 1 + docs/deploy.md | 2 +- docs/reference/kubernetes.md | 9 + helm/burrow/.helmignore | 21 +++ helm/burrow/Chart.yaml | 21 +++ helm/burrow/README.md | 170 ++++++++++++++++++ helm/burrow/ci/test-values.yaml | 20 +++ helm/burrow/initialize.sh | 108 ++++++++++++ helm/burrow/templates/NOTES.txt | 22 +++ helm/burrow/templates/_helpers.tpl | 70 ++++++++ helm/burrow/templates/_settings.yaml | 13 ++ helm/burrow/templates/configmap.yaml | 14 ++ helm/burrow/templates/contracts.yaml | 41 +++++ helm/burrow/templates/deployments.yaml | 216 +++++++++++++++++++++++ helm/burrow/templates/ingress-grpc.yaml | 32 ++++ helm/burrow/templates/ingress-info.yaml | 43 +++++ helm/burrow/templates/pvc.yaml | 31 ++++ helm/burrow/templates/service-grpc.yaml | 28 +++ helm/burrow/templates/service-info.yaml | 25 +++ helm/burrow/templates/service-peers.yaml | 36 ++++ helm/burrow/templates/test-config.yaml | 14 ++ helm/burrow/templates/test-secret.yaml | 33 ++++ helm/burrow/values.yaml | 120 +++++++++++++ project/history.go | 10 +- scripts/version.sh | 9 + 33 files changed, 1215 insertions(+), 69 deletions(-) delete mode 100644 docs/README.md create mode 100644 docs/reference/kubernetes.md create mode 100644 helm/burrow/.helmignore create mode 100644 helm/burrow/Chart.yaml create mode 100644 helm/burrow/README.md create mode 100644 helm/burrow/ci/test-values.yaml create mode 100644 helm/burrow/initialize.sh create mode 100644 helm/burrow/templates/NOTES.txt create mode 100644 helm/burrow/templates/_helpers.tpl create mode 100644 helm/burrow/templates/_settings.yaml create mode 100644 helm/burrow/templates/configmap.yaml create mode 100644 helm/burrow/templates/contracts.yaml create mode 100644 helm/burrow/templates/deployments.yaml create mode 100644 helm/burrow/templates/ingress-grpc.yaml create mode 100644 helm/burrow/templates/ingress-info.yaml create mode 100644 helm/burrow/templates/pvc.yaml create mode 100644 helm/burrow/templates/service-grpc.yaml create mode 100644 helm/burrow/templates/service-info.yaml create mode 100644 helm/burrow/templates/service-peers.yaml create mode 100644 helm/burrow/templates/test-config.yaml create mode 100644 helm/burrow/templates/test-secret.yaml create mode 100644 helm/burrow/values.yaml create mode 100755 scripts/version.sh diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 56ac3293a..b62828a97 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,6 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: git fetch --unshallow --prune - uses: actions/setup-node@v1 with: node-version: '12.x' @@ -48,6 +49,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: git fetch --unshallow --prune - run: make docker_build - name: publish env: @@ -59,3 +61,15 @@ jobs: echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} --password-stdin docker tag ${DOCKER_REPO}:${tag#v} ${DOCKER_REPO}:latest docker push ${DOCKER_REPO} + + charts: + runs-on: ubuntu-latest + env: + CM_USERNAME: ${{ secrets.CM_USERNAME }} + CM_PASSWORD: ${{ secrets.CM_PASSWORD }} + CM_URL: ${{ secrets.CM_URL }} + steps: + - uses: actions/checkout@v2 + - run: git fetch --unshallow --prune + - run: make helm_deps + - run: make helm_push diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a80dbd6ff..86c4db26f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,6 +14,7 @@ jobs: go-version: 1.13 id: go - uses: actions/checkout@v2 + - run: git fetch --unshallow --prune - run: make test - run: make build - uses: actions/upload-artifact@master @@ -126,3 +127,15 @@ jobs: export PATH=${PATH}:$(pwd)/bin make npm_install make test_js + + charts: + runs-on: ubuntu-latest + env: + CM_USERNAME: ${{ secrets.CM_USERNAME }} + CM_PASSWORD: ${{ secrets.CM_PASSWORD }} + CM_URL: ${{ secrets.CM_URL }} + steps: + - uses: actions/checkout@v2 + - run: git fetch --unshallow --prune + - run: make helm_deps + - run: make helm_package diff --git a/.gitignore b/.gitignore index f25e30aa5..2dfd393e0 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ tests/keys/ vendor/ node_modules js/dist + +helm/package diff --git a/CHANGELOG.md b/CHANGELOG.md index e8fd71b0a..8c92a0f7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,13 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.30.4] - 2020-04-05 +### Added +- [Build] Added Helm chart +- [State] Account now has OpcodeBitset field to support upcoming EVM fixes + +### Fixed +- [JS] Github actions release of JS lib + + ## [0.30.3] - 2020-04-05 ### Added - [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile' @@ -652,6 +661,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.30.4]: https://github.com/hyperledger/burrow/compare/v0.30.3...v0.30.4 [0.30.3]: https://github.com/hyperledger/burrow/compare/v0.30.2...v0.30.3 [0.30.2]: https://github.com/hyperledger/burrow/compare/v0.30.1...v0.30.2 [0.30.1]: https://github.com/hyperledger/burrow/compare/v0.30.0...v0.30.1 diff --git a/Makefile b/Makefile index 86467fa8f..99ec93d00 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,13 @@ REPO := $(shell pwd) CI_IMAGE="hyperledger/burrow:ci" +VERSION := $(shell scripts/version.sh) # Gets implicit default GOPATH if not set GOPATH?=$(shell go env GOPATH) -BIN_PATH?=${GOPATH}/bin +BIN_PATH?=$(GOPATH)/bin +HELM_PATH?=helm/package +HELM_PACKAGE=$(HELM_PATH)/burrow-$(VERSION).tgz +ARCH?=linux-amd64 export GO111MODULE=on @@ -261,7 +265,7 @@ clean: # Print version .PHONY: version version: - @go run ./project/cmd/version/main.go + @echo $(VERSION) # Generate full changelog of all release notes CHANGELOG.md: project/history.go project/cmd/changelog/main.go @@ -295,3 +299,34 @@ ready_for_pull_request: docs fix staticcheck: go get honnef.co/go/tools/cmd/staticcheck staticcheck ./... + +# Note --set flag currently needs helm 3 version < 3.0.3 https://github.com/helm/helm/issues/3141 - but hopefully they will reintroduce support +bin/helm: + @echo Downloading helm... + mkdir -p bin + curl https://get.helm.sh/helm-v3.0.2-$(ARCH).tar.gz | tar xvzO $(ARCH)/helm > bin/helm && chmod +x bin/helm + +.PHONY: helm_deps +helm_deps: bin/helm + @bin/helm repo add --username "$(CM_USERNAME)" --password "$(CM_PASSWORD)" chartmuseum $(CM_URL) + +.PHONY: helm_test +helm_test: bin/helm + bin/helm dep up helm/burrow + bin/helm lint helm/burrow + +helm_package: $(HELM_PACKAGE) + +$(HELM_PACKAGE): helm_test bin/helm + bin/helm package helm/burrow \ + --version "$(VERSION)" \ + --app-version "$(VERSION)" \ + --set "image.tag=$(VERSION)" \ + --dependency-update \ + --destination helm/package + +.PHONY: helm_push +helm_push: helm_package + @echo pushing helm chart... + @curl -sS -u ${CM_USERNAME}:${CM_PASSWORD} \ + --data-binary "@burrow-${VERSION}.tgz" $(CM_URL)/api/charts diff --git a/NOTES.md b/NOTES.md index 5d8ce29fa..90ef71c8b 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,4 +1,7 @@ ### Added -- [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile' -- [TS] Default ts client interface implementation +- [Build] Added Helm chart +- [State] Account now has OpcodeBitset field to support upcoming EVM fixes + +### Fixed +- [JS] Github actions release of JS lib diff --git a/README.md b/README.md index 26ff14f1b..7490f9301 100644 --- a/README.md +++ b/README.md @@ -7,22 +7,39 @@ [![LoC](https://tokei.rs/b1/github/hyperledger/burrow?category=lines)](https://github.com/hyperledger/burrow) [![codecov](https://codecov.io/gh/hyperledger/burrow/branch/master/graph/badge.svg)](https://codecov.io/gh/hyperledger/burrow) -Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It executes Ethereum EVM smart contract code (usually written in [Solidity](https://solidity.readthedocs.io)) on a permissioned virtual machine. Burrow provides transaction finality and high transaction throughput on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. +Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It executes Ethereum EVM and WASM smart contract code (usually written in [Solidity](https://solidity.readthedocs.io)) on a permissioned virtual machine. Burrow provides transaction finality and high transaction throughput on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. ![burrow logo](docs/assets/burrow.png) ## What is Burrow -See [Burrow - the Boring Blockchain](https://wiki.hyperledger.org/display/burrow/Burrow+-+The+Boring+Blockchain) for an introduction to Burrow and its motivating vision. +Burrow is a fully fledged blockchain node and smart contract execution engine -- a distributed database that executes code. Burrow runs Ethereum Virtual Machine (EVM) and Web Assembly (WASM) smart contracts. Burrow networks are synchronised using the [Tendermint](https://github.com/tendermint/tendermint) consensus algorithm. + +Highlights include: + +- **Tamper-resistant merkle state** - a node can detect if its state is corrupted or if a validator is dishonestly executing the protocol. +- **Proof-of-stake support** - run a private or public permissioned network. +- **On-chain governance primitives** - stakeholders may vote for autonomous smart contract upgrades. +- **Ethereum account world-view** - state and code is organised into cryptographically-addressable accounts. +- **Low-level permissioning** - code execution permissions can be set on a per-account basis. +- **Event streaming** - application state is organised in an event stream and can drive external systems. +- **[SQL mapping layer](docs/reference/vent.md)** - map smart contract event emissions to SQL tables using a projection specification. +- **GRPC interfaces** - all RPC calls can be accessed from any language with GRPC support. Protobuf is used extensively for core objects. +- **Javascript client library** - client library uses code generation to provide access to contracts via statically Typescript objects. +- **Keys service** - provides optional delegating signing at the server or via a local proxy +- **Web3 RPC** - provides compatibility for mainnet Ethereum tooling such as Truffle and Metamask + +### What it is not -Hyperledger Burrow is a permissioned blockchain node that executes smart contract code following the Ethereum specification. Burrow is built for a multi-chain universe with application specific optimization in mind. Burrow as a node is constructed out of three main components: the consensus engine, the permissioned Ethereum virtual machine and the rpc gateway. More specifically Burrow consists of the following: +- An Ethereum mainnet client - we do not speak devp2p and various implementation details are different. We are Ethereum-derived but exploit greater freedom than mainnet compatibility would allow. +- Just a virtual machine +- A research project - we run it in production -- **Consensus Engine:** Transactions are ordered and finalised with the Byzantine fault-tolerant Tendermint protocol. The Tendermint protocol provides high transaction throughput over a set of known validators and prevents the blockchain from forking. -- **Application Blockchain Interface (ABCI):** The smart contract application interfaces with the consensus engine over the [ABCI](https://github.com/tendermint/tendermint/tree/master/abci). The ABCI allows for the consensus engine to remain agnostic from the smart contract application. -- **Smart Contract Application:** Transactions are validated and applied to the application state in the order that the consensus engine has finalised them. The application state consists of all accounts, the validator set and the name registry. Accounts in Burrow have permissions and either contain smart contract code or correspond to a public-private key pair. A transaction that calls on the smart contract code in a given account will activate the execution of that account’s code in a permissioned virtual machine. -- **Permissioned Ethereum Virtual Machine:** This virtual machine is built to observe the Ethereum operation code specification and additionally asserts the correct permissions have been granted. Permissioning is enforced through secure native functions and underlies all smart contract code. An arbitrary but finite amount of gas is handed out for every execution to ensure a finite execution duration - “You don’t need money to play, when you have permission to play”. -- **Application Binary Interface (ABI):** Transactions need to be formulated in a binary format that can be processed by the blockchain node. Current tooling provides functionality to compile, deploy and link solidity smart contracts and formulate transactions to call smart contracts on the chain. -- **API Gateway:** Burrow exposes REST and JSON-RPC endpoints to interact with the blockchain network and the application state through broadcasting transactions, or querying the current state of the application. Websockets allow subscribing to events, which is particularly valuable as the consensus engine and smart contract application can give unambiguously finalised results to transactions within one blocktime of about one second. +### Further introduction + +See [Burrow - the Boring Blockchain](https://wiki.hyperledger.org/display/burrow/Burrow+-+The+Boring+Blockchain) for an introduction to Burrow and its motivating vision. + +Watch the [Boring into Burrow](https://www.youtube.com/watch?v=OpbjYaGAP4k) talk from the Hyperledger Global Forum 2020 ## JavaScript Client @@ -33,8 +50,7 @@ There is a [JavaScript API](https://github.com/hyperledger/burrow/tree/master/js Project information generally updated on a quarterly basis can be found on the [Hyperledger Burrow Wiki](https://wiki.hyperledger.org/display/burrow). ## Documentation -Burrow getting started documentation is available in the [docs](https://hyperledger.github.io/burrow) directory and in [GoDocs](https://godoc.org/github.com/hyperledger/burrow). - +Burrow getting started documentation is available on the [documentation site](https://hyperledger.github.io/burrow) (source markdown files can be found in [docs](docs)) and programmatic API in [GoDocs](https://godoc.org/github.com/hyperledger/burrow). ## Contribute diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 18b7c0c68..000000000 --- a/docs/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# Introduction - -Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It executes Ethereum EVM smart contract code (usually written in [Solidity](https://solidity.readthedocs.io)) on a permissioned virtual machine. Burrow provides transaction finality and high transaction throughput on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. - -![burrow logo](assets/burrow.png) - -## What is Burrow? - -Hyperledger Burrow is a permissioned blockchain node that executes smart contract code following the Ethereum specification. Burrow is built for a multi-chain universe with application specific optimization in mind. Burrow as a node is constructed out of three main components: the consensus engine, the permissioned Ethereum virtual machine and the rpc gateway. More specifically Burrow consists of the following: - -- **Consensus Engine:** Transactions are ordered and finalised with the Byzantine fault-tolerant Tendermint protocol. The Tendermint protocol provides high transaction throughput over a set of known validators and prevents the blockchain from forking. -- **Application Blockchain Interface (ABCI):** The smart contract application interfaces with the consensus engine over the [ABCI](https://github.com/tendermint/tendermint/abci). The ABCI allows for the consensus engine to remain agnostic from the smart contract application. -- **Smart Contract Application:** Transactions are validated and applied to the application state in the order that the consensus engine has finalised them. The application state consists of all accounts, the validator set and the name registry. Accounts in Burrow have permissions and either contain smart contract code or correspond to a public-private key pair. A transaction that calls on the smart contract code in a given account will activate the execution of that account’s code in a permissioned virtual machine. -- **Permissioned Ethereum Virtual Machine:** This virtual machine is built to observe the Ethereum operation code specification and additionally asserts the correct permissions have been granted. Permissioning is enforced through secure native functions and underlies all smart contract code. An arbitrary but finite amount of gas is handed out for every execution to ensure a finite execution duration - “You don’t need money to play, when you have permission to play”. -- **Application Binary Interface (ABI):** Transactions need to be formulated in a binary format that can be processed by the blockchain node. Current tooling provides functionality to compile, deploy and link solidity smart contracts and formulate transactions to call smart contracts on the chain. -- **API Gateway:** Burrow exposes REST and JSON-RPC endpoints to interact with the blockchain network and the application state through broadcasting transactions, or querying the current state of the application. Websockets allow subscribing to events, which is particularly valuable as the consensus engine and smart contract application can give unambiguously finalised results to transactions within one blocktime of about one second. - -## Installation - -Release binaries for different architectures can be found at https://github.com/hyperledger/burrow/releases. - -### Source - -[Install Go](https://golang.org/doc/install) (Version >= 1.11) and set `$GOPATH`. - -``` -go get github.com/hyperledger/burrow -cd $GOPATH/src/github.com/hyperledger/burrow -make build -``` - -This will build the `burrow` binary and put it in the `bin/` directory. It can be executed from there or put wherever is convenient. - -You can also install `burrow` into `$BIN_PATH/bin` with `make install`, where `$BIN_PATH` defaults to `$HOME/go/bin` -if not set in the environment. - -### Docker - -Each release is also tagged and pushed to [DockerHub](https://hub.docker.com/r/hyperledger/burrow). -This can act as a direct replacement for the burrow binary, for example the following commands are equivalent: - -```bash -burrow spec -v4 -docker run hyperledger/burrow spec -v4 -``` - -> Ensure to mount local volumes for secrets / configurations when running a container to prevent data loss. - -### Kubernetes - -Use our official [helm charts](https://github.com/helm/charts/tree/master/stable/burrow) to configure and run -a burrow chain in your cluster. diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 9c39adcbb..d0477db89 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -31,3 +31,4 @@ - [Vent](reference/vent.md) - [WASM](reference/wasm.md) - [Web3](reference/web3.md) + - [Kubernetes](reference/kubernetes.md) diff --git a/docs/deploy.md b/docs/deploy.md index 235f4f333..34489590a 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -76,4 +76,4 @@ specified. This must be the path to the contract bin file or abi file. ## Proposal -This is described in the [proposal tutorial](../tutorials/8-proposals.md). +This is described in the [proposal tutorial](tutorials/8-proposals.md). diff --git a/docs/reference/kubernetes.md b/docs/reference/kubernetes.md new file mode 100644 index 000000000..6b606a3bb --- /dev/null +++ b/docs/reference/kubernetes.md @@ -0,0 +1,9 @@ +# Kubernetes + +Burrow ships a docker image suitable for use in Kubernetes on [Docker Hub](https://hub.docker.com/r/hyperledger/burrow). This image is use by the chart below. + +## Helm chart + +A helm chart for Burrow with can be found in the main repo [here](https://github.com/hyperledger/burrow/tree/master/helm) (with further documentation). + +The helm chart allows you to bootstrap and run your own pool of validators. diff --git a/helm/burrow/.helmignore b/helm/burrow/.helmignore new file mode 100644 index 000000000..c13e3c8fb --- /dev/null +++ b/helm/burrow/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj \ No newline at end of file diff --git a/helm/burrow/Chart.yaml b/helm/burrow/Chart.yaml new file mode 100644 index 000000000..8d7c9ca73 --- /dev/null +++ b/helm/burrow/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +appVersion: 0.30.2 +description: Burrow is a permissionable smart contract machine +home: https://github.com/hyperledger/burrow +icon: https://raw.githubusercontent.com/hyperledger/burrow/develop/docs/assets/images/burrow.png +keywords: +- blockchain +- smart contracts +- ethereum +- hyperledger +- evm +- web3 +maintainers: +- email: casey@monax.io + name: compleatang +- email: greg.hill@monax.io + name: gregdhill +name: burrow +sources: +- https://github.com/hyperledger/burrow +version: 0.30.2 diff --git a/helm/burrow/README.md b/helm/burrow/README.md new file mode 100644 index 000000000..ebec9989a --- /dev/null +++ b/helm/burrow/README.md @@ -0,0 +1,170 @@ +# Burrow + +[Burrow](https://github.com/hyperledger/burrow) is a permissioned Ethereum smart-contract blockchain node which provides transaction finality and high transaction throughput +on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. + +## Introduction + +This chart bootstraps a burrow network on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Installation + +### Prerequisites + +To deploy a new blockchain network, this chart requires that two objects be present in the same Kubernetes namespace: a configmap should house the genesis file and each node should +have a secret to hold any validator keys. The provided script, `addresses.sh` automatically provisions a number of files using the [burrow](https://github.com/hyperledger/burrow) toolkit, +so please first ensure that `burrow --version` matches the `image.tag` in the [configuration](#configuration). This sequence also requires that the [jq](https://stedolan.github.io/jq/) binary +is installed. Two files will be generated, the first of note is `setup.yaml` which contains the two necessary Kubernetes specifications to be added to the cluster: + +```bash +curl -LO https://raw.githubusercontent.com/helm/charts/master/stable/burrow/initialize.sh +CHAIN_NODES=4 CHAIN_NAME="my-release-burrow" ./initialize.sh +kubectl apply --filename setup.yaml +``` + +Please note that the variable `$CHAIN_NAME` should be the same as the helm release name specified below with the `-burrow` suffix. +Another file, `addresses.yaml` contains the the equivalent validator addresses to set in the charts. + +### Deployment + +To install the chart with the release name `my-release` with the set of custom validator addresses: + +```bash +helm install stable/burrow --name my-release --values addresses.yaml +``` + +The [configuration](#configuration) section below lists all possible parameters that can be configured during installation. Please also see the [runtime configuration](#runtime) +section for more information on how to setup your network properly. + +## Uninstall + +To uninstall/delete the `my-release` deployment: + +```console +$ helm delete my-release +``` + +This command removes all the Kubernetes components associated with the chart and deletes the release. To remove the configmap and secret created in the [prerequisites](#prerequisites), follow these steps: + +```bash +kubectl delete secret ${CHAIN_NAME}-keys +kubectl delete configmap ${CHAIN_NAME}-genesis +``` + +## Configuration + +The following table lists the configurable parameters of the Burrow chart and its default values. + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `affinity` | node/pod affinities | `{}` | +| `chain.nodes` | number of nodes for the blockchain network | `1` | +| `chain.logLevel` | log level for the nodes (`debug`, `info`, `warn`) | `"info"` | +| `chain.extraSeeds` | network seeds to dial in addition to the cluster booted by the chart; each entry in the array should be in the form `ip:port` (note: because P2P connects over tcp, the port is absolutely required) | `[]` | +| `restore.enabled` | toggle chain restore mechanism | `false` | +| `chain.testing` | toggle pre-generated keys & genesis for ci testing | `false` | +| `config` | the [burrow configuration file](https://github.com/hyperledger/burrow/blob/develop/tests/chain/burrow.toml) | `{}` | +| `config.Tendermint.ListenPort` | peer port | `26656` | +| `contracts.enabled` | toggle post-install contract deployment | `false` | +| `contracts.image` | contract deployer image | `""` | +| `contracts.tag` | contract deployer tag | `""` | +| `contracts.deploy` | command to run in post-install hook | `""` | +| `env` | environment variables to configure burrow | `{}` | +| `extraArgs` | extra arguments to give to the build in `burrow start` command | `{}` | +| `image.repository` | image repository | `"hyperledger/burrow"` | +| `image.tag` | image tag | `"0.29.4"` | +| `image.pullPolicy` | image pull policy | `"IfNotPresent"` | +| `livenessProbe.enabled` | enable liveness checks | `true` | +| `livenessProbe.path` | http endpoint | `"/status?block_seen_time_within=3m"` | +| `livenessProbe.initialDelaySeconds` | start after | `240` | +| `livenessProbe.timeoutSeconds` | retry after | `1` | +| `livenessProbe.periodSeconds` | check every | `30` | +| `nodeSelector` | node labels for pod assignment | `{}` | +| `organization` | name of the organization running these nodes (used in the peer's moniker) | `""` | +| `persistence.enabled` | enable pvc for the chain data | `true` | +| `persistence.size` | size of the chain data pvc | `"80Gi"` | +| `persistence.storageClass` | storage class for the chain data pvc | `"standard"` | +| `persistence.accessMode` | access mode for the chain data pvc | `"ReadWriteOnce"` | +| `persistence.persistentVolumeReclaimPolicy` | does not delete on node restart | `"Retain"` | +| `podAnnotations` | annotations to add to each pod | `{}` | +| `podLabels` | labels to add to each pod | `{}` | +| `readinessProbe.enabled` | enable readiness checks | `true` | +| `readinessProbe.path` | http endpoint | `"/status"` | +| `readinessProbe.initialDelaySeconds` | start after | `5` | +| `resources.limits.cpu` | - | `"500m"` | +| `resources.limits.memory` | - | `"1Gi"` | +| `resources.requests.cpu` | - | `"100m"` | +| `resources.requests.memory` | - | `"256Mi"` | +| `grpc.service.type` | service type | `"ClusterIP"` | +| `grpc.service.loadBalance` | enable load balancing across nodes | `true` | +| `grpc.ingress.enabled` | expose port | `false` | +| `grpc.ingress.hosts` | - | `[]` | +| `grpc.ingress.annotations` | extra annotations | `` | +| `grpc.ingress.tls` | - | `` | +| `info.service.type` | service type | `"ClusterIP"` | +| `info.service.loadBalance` | enable load balancing across nodes | `true` | +| `info.ingress.enabled` | expose port | `false` | +| `info.ingress.partial` | exposes the `/accounts` and `/blocks` paths externally | `false` | +| `info.ingress.pathLeader` | - | `"/"` | +| `info.ingress.annotations` | extra annotations | `` | +| `info.ingress.hosts` | - | `[]` | +| `info.ingress.tls` | - | `` | +| `peer.service.type` | service type | `"ClusterIP"` | +| `peer.ingress.enabled` | expose port | `false` | +| `peer.ingress.hosts` | - | `[]` | +| `tolerations` | list of node taints to tolerate | `[]` | +| `validatorAddresses` | list of validators to deploy | `[]` | + + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +helm install stable/burrow --name my-release \ + --set=image.tag=0.23.2,resources.limits.cpu=200m -f addresses.yaml +``` + +Alternatively, append additional values to the YAML file generated in the [prerequisites](#prerequisites). For example, + +```bash +helm install stable/burrow --name my-release -f addresses.yaml +``` + +## Runtime + +It is unlikely that you will want to deploy this chart with the default runtime configuration. When booting permissioned blockchains in a cloud environment there are three predominant considerations in addition to the normal configuration of any cloud application. + +1. What access rights to place on the ports? +2. What is the set of initial accounts and validators for the chain? +3. What keys should the validating nodes have? + +Each of these considerations will be dealt with in more detail below. + +### Port Configuration + +Burrow utilizes three different ports by default: + +* `Peer`: Burrow's peer port is used for P2P communication within the blockchain network as part of the consensus engine ([Tendermint](https://github.com/tendermint/tendermint)) to perform bilateral gossiping communication. +* `Info`: Burrow's info port is used for conducting remote procedures. +* `GRPC`: Burrow's grpc port can be used by JavaScript libraries to interact with the chain over websockets. + +The default configuration for the chart sets up the port access rights in the following manner: + +* `Peer`: Peer ports are **only** opened within the cluster. By default, there is no P2P communication exposed to the general internet. Each node within the cluster has its own distinct peer service built by the chart which utilizes a `ClusterIP` service type. +* `Info`: The info port is **only** opened within the cluster. By default, there is no info communication exposed to the general internet. There is **one** info service built by the chart which utilizes a `ClusterIP` service type. The default info service used by the chart is strongly linked to node number `000` and is not load balanced across the nodes by default so as to reduce any challenges with tooling that conduct long-polling after sending transactions. The chart offers an ingress which is connected to the info service, but this is `disabled` by default. +* `GRPC`: The grpc port is **only** opened within the cluster. By default, there is no grpc communication exposed to the general internet. There is **one** grpc service built by the chart which utilizes a `ClusterIP` service type. The default grpc service used by the chart is load balanced across the nodes within the cluster by default because libraries which utilize this port typical do so on websockets and the service is able to utilize a sessionAffinity setting. + +In order to expose the peers to the general internet change the `peer.service.type` to `NodePort`. It is not advised to run P2P traffic through an ingress or other load balancing service as there is uncertainty with respect to the IP address which the blockchain node advertises and gossips. As such, the best way to expose P2P traffic to the internet is to utilize a `NodePort` service type. While such service types can be a challenge to work with in many instances, the P2P libraries that these blockchains utilize are very resilient to movement between machine nodes. The biggest gotcha with `NodePort` service types is to ensure that the machine nodes have proper egress within the cloud or data center provider. As long as the machine nodes do not have egress restrictions disabling the utilization of `NodePort` service types, the P2P traffic will be exposed fluidly. + +To expose the info service to the general internet change the default `rpcInfo.ingress.enabled` to `true` and add the appropriate fields to the ingress for your Kubernetes cluster. This will allow developers to connect to the info service from their local machines. + +To disable load balancing on the grpc service, change the `rpcGRPC.service.loadBalance` to `false`. + +### Genesis + +Burrow initializes any single blockchain via use of a `genesis.json` which defines what validators and accounts are given access to the permissioned blockchain when it is booted. The chart imports the `genesis.json` file as a Kubernetes configmap and then mounts it in each node deployment. + +### Validator Keys + +**NOTE: The chart has not been security audited and as such one should use the validator keys functionality of the chart at one's own risk.** + +Burrow blockchain nodes need to have a key available to them which has been properly registered within the `genesis.json` initial state. The registered key is what enables a blockchain node to participate in the P2P validation of the network. The chart imports the validator key files as Kubernetes secrets, so the security of the blockchain is only as strong as the cluster's integrity. diff --git a/helm/burrow/ci/test-values.yaml b/helm/burrow/ci/test-values.yaml new file mode 100644 index 000000000..95dcbc5db --- /dev/null +++ b/helm/burrow/ci/test-values.yaml @@ -0,0 +1,20 @@ +# CI Testing Values + +chain: + testing: true + +organization: "hyperledger" + +validators: + - name: Validator_0 + address: 744630EA9A7CBD310AE7B8EDAFCBF94E54D23F37 + nodeAddress: 9367CCE15205DC38DA61F5B348AF2AFEED2FE77A + - name: Validator_1 + address: 2C1B7046183387E63C17898235D3C0FDE4943BC7 + nodeAddress: 5B624373E8EE692ACDAF408F5B8E0831E78FEC50 + - name: Validator_2 + address: C5291CE95749A2DE1D992946B683280D75EDBE8C + nodeAddress: C13AEAC6523429A1ED244255D2BBAA7CB4AB7CB4 + - name: Validator_3 + address: A5BCAF761B774A61FADA691AB40C4E9A20D82B7B + nodeAddress: A85AE5C27FEDEFA57F425B7762A1BB5CCA095E64 diff --git a/helm/burrow/initialize.sh b/helm/burrow/initialize.sh new file mode 100644 index 000000000..92c2d93ee --- /dev/null +++ b/helm/burrow/initialize.sh @@ -0,0 +1,108 @@ +#!/usr/bin/env bash + +# Preflight checks +if [[ "$(which mktemp)" == "" ]] +then + echo "Please install mktemp and then rerun me. Exiting." + exit 1 +fi +if [[ "$(which burrow)" == "" ]] +then + echo "Please install Hyperledger Burrow and then rerun me. Exiting." + exit 1 +fi + +export CHAIN_NODES=${CHAIN_NODES:-4} +export CHAIN_NAME=${CHAIN_NAME:-"my-release-burrow"} +if [ -z $CHAIN_OUTPUT_DIRECTORY ]; then + export CHAIN_OUTPUT_DIRECTORY=`pwd` +fi + +set -e + +title="Initializing $((CHAIN_NODES)) Validator Nodes" +echo -e "\n${title}\n${title//?/-}\n" + +echo "Writing kubernetes template files for validators secrets, and configmaps." +keysTemplate=$(mktemp) +valsTemplate=$(mktemp) +genSpec=$(mktemp) +genesis=$(mktemp) +keys=$(mktemp -d) + +function finish { + rm $keysTemplate + rm $valsTemplate + rm $genSpec + rm $genesis + rm -r $keys +} +trap finish EXIT + +setup="setup.yaml" +values="addresses.yaml" + +cat >$keysTemplate <$valsTemplate < $genSpec + +echo "Creating keys and necessary deploy files..." +burrow configure \ + --chain-name=$CHAIN_NAME \ + --keys-dir=$keys \ + --genesis-spec=$genSpec \ + --config-template-in=$keysTemplate \ + --config-out=$CHAIN_OUTPUT_DIRECTORY/$setup \ + --config-template-in=$valsTemplate \ + --config-out=$CHAIN_OUTPUT_DIRECTORY/$values \ + --separate-genesis-doc=$genesis >/dev/null + +echo "Saved keys and genesis as $CHAIN_OUTPUT_DIRECTORY/$setup" +echo "Saved example 'values.yaml' as $CHAIN_OUTPUT_DIRECTORY/$values" + +cat >>$CHAIN_OUTPUT_DIRECTORY/$setup < Date: Mon, 13 Apr 2020 23:40:32 +0100 Subject: [PATCH 076/185] Don't connect to private chartmuseum on test Signed-off-by: Silas Davis --- .github/workflows/test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 86c4db26f..18539a48c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -137,5 +137,4 @@ jobs: steps: - uses: actions/checkout@v2 - run: git fetch --unshallow --prune - - run: make helm_deps - run: make helm_package From fe51cefae16b957043b33ea6cc306c25e803aaca Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Tue, 14 Apr 2020 00:02:16 +0100 Subject: [PATCH 077/185] Fix chart push and fail when it doesn't work Signed-off-by: Silas Davis --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 99ec93d00..51d6df32b 100644 --- a/Makefile +++ b/Makefile @@ -328,5 +328,5 @@ $(HELM_PACKAGE): helm_test bin/helm .PHONY: helm_push helm_push: helm_package @echo pushing helm chart... - @curl -sS -u ${CM_USERNAME}:${CM_PASSWORD} \ - --data-binary "@burrow-${VERSION}.tgz" $(CM_URL)/api/charts + @curl -u ${CM_USERNAME}:${CM_PASSWORD} \ + --data-binary "@$(HELM_PACKAGE)" $(CM_URL)/api/charts From 3842b5fd91190b6fd4635bfa2834f08485099275 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Tue, 14 Apr 2020 08:23:10 +0100 Subject: [PATCH 078/185] Hide implementation details of OpcodeBitset in IsOpcodeAt Add tests and make fail safe Also initialise on dump/restore load Signed-off-by: Silas Davis --- acm/account.go | 7 +++ acm/account_test.go | 7 +++ acm/acm.pb.go | 95 ++++++++++++++--------------- dump/load.go | 4 ++ dump/mock.go | 2 + dump/mock_test.go | 1 - execution/native/account.go | 4 +- execution/native/account_test.go | 57 +++++++++++++++++- js/proto/acm_pb.d.ts | 10 ++-- js/proto/acm_pb.js | 28 ++++----- project/history.go | 2 +- protobuf/acm.proto | 4 +- util/architecture/constants.go | 12 ---- util/architecture/constants_arm.go | 10 ---- util/fs.go | 96 ------------------------------ util/logging/cmd/main.go | 28 --------- util/os.go | 15 ----- 17 files changed, 146 insertions(+), 236 deletions(-) delete mode 100644 util/architecture/constants.go delete mode 100644 util/architecture/constants_arm.go delete mode 100644 util/fs.go delete mode 100644 util/logging/cmd/main.go delete mode 100644 util/os.go diff --git a/acm/account.go b/acm/account.go index bde1c375a..4620689d7 100644 --- a/acm/account.go +++ b/acm/account.go @@ -64,6 +64,13 @@ func (acc *Account) Code() []byte { return nil } +func (acc *Account) IsOpcodeAt(indexOfSymbolInCode uint) bool { + if indexOfSymbolInCode >= acc.EVMOpcodeBitset.Len() { + return false + } + return acc.EVMOpcodeBitset.IsSet(indexOfSymbolInCode) +} + // Conversions // // Using the naming convention is this package of 'As' being diff --git a/acm/account_test.go b/acm/account_test.go index 14a8f0e33..fb10dadaf 100644 --- a/acm/account_test.go +++ b/acm/account_test.go @@ -75,3 +75,10 @@ func TestAccountTags(t *testing.T) { require.NoError(t, err) assert.True(t, qry.Matches(acc)) } + +func TestAccount_IsOpcodeAt(t *testing.T) { + acc := Account{} + // Fail safe before initialised by initEVMCode + assert.False(t, acc.IsOpcodeAt(0)) + assert.False(t, acc.IsOpcodeAt(100)) +} diff --git a/acm/acm.pb.go b/acm/acm.pb.go index d8029fe34..01aab21ff 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -56,8 +56,8 @@ type Account struct { // (from Solidity/EVM), they point to the original deployed account where the metadata is stored. // This original account is called the forebear. Forebear *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,10,opt,name=Forebear,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Forebear,omitempty"` - // A bitset of all the symbols in Code that are opcodes (i.e. actual code not PUSH data) - OpcodeBitset github_com_tmthrgd_go_bitset.Bitset `protobuf:"bytes,12,opt,name=OpcodeBitset,proto3,casttype=github.com/tmthrgd/go-bitset.Bitset" json:"OpcodeBitset,omitempty"` + // A bitset of all the symbols in EVMCode that are opcodes (i.e. actual code not PUSH data) + EVMOpcodeBitset github_com_tmthrgd_go_bitset.Bitset `protobuf:"bytes,12,opt,name=EVMOpcodeBitset,proto3,casttype=github.com/tmthrgd/go-bitset.Bitset" json:"EVMOpcodeBitset,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -133,9 +133,9 @@ func (m *Account) GetContractMeta() []*ContractMeta { return nil } -func (m *Account) GetOpcodeBitset() github_com_tmthrgd_go_bitset.Bitset { +func (m *Account) GetEVMOpcodeBitset() github_com_tmthrgd_go_bitset.Bitset { if m != nil { - return m.OpcodeBitset + return m.EVMOpcodeBitset } return nil } @@ -204,41 +204,42 @@ func init() { proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } func init() { golang_proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } var fileDescriptor_49ed775bc0a6adf6 = []byte{ - // 544 bytes of a gzipped FileDescriptorProto + // 547 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x31, 0x6f, 0xd3, 0x40, - 0x18, 0xed, 0x35, 0x69, 0xe3, 0x5c, 0x2c, 0x54, 0x6e, 0x3a, 0x65, 0xb0, 0x43, 0x19, 0x88, 0x50, - 0xe3, 0x20, 0x20, 0x4b, 0x98, 0xe2, 0x8a, 0xaa, 0x52, 0x69, 0x28, 0xae, 0x54, 0x04, 0xdb, 0xf9, - 0x7c, 0x38, 0x96, 0x62, 0x9f, 0x39, 0x9f, 0x01, 0xff, 0x13, 0x46, 0x7e, 0x0a, 0x63, 0x46, 0x26, - 0x54, 0x31, 0x58, 0x28, 0xdd, 0xfa, 0x13, 0x98, 0x90, 0x2f, 0x8e, 0x71, 0x3a, 0x54, 0x02, 0xb6, - 0x7c, 0x79, 0xef, 0x7b, 0xef, 0xf9, 0xdd, 0x1d, 0x6c, 0x13, 0x1a, 0x5a, 0xb1, 0xe0, 0x92, 0xa3, - 0x06, 0xa1, 0x61, 0x77, 0xe0, 0x07, 0x72, 0x96, 0xba, 0x16, 0xe5, 0xe1, 0xd0, 0xe7, 0x3e, 0x1f, - 0x2a, 0xcc, 0x4d, 0xdf, 0xa9, 0x49, 0x0d, 0xea, 0xd7, 0x6a, 0xa7, 0xbb, 0x17, 0x33, 0x11, 0x06, - 0x49, 0x12, 0xf0, 0xa8, 0xfc, 0x47, 0xa7, 0x22, 0x8b, 0x65, 0x89, 0xef, 0x7f, 0xdf, 0x81, 0xad, - 0x09, 0xa5, 0x3c, 0x8d, 0x24, 0x9a, 0xc2, 0xd6, 0xc4, 0xf3, 0x04, 0x4b, 0x12, 0x0c, 0x7a, 0xa0, - 0xaf, 0xdb, 0x4f, 0x17, 0xb9, 0xb9, 0xf5, 0x23, 0x37, 0x0f, 0x6a, 0x9e, 0xb3, 0x2c, 0x66, 0x62, - 0xce, 0x3c, 0x9f, 0x89, 0xa1, 0x9b, 0x0a, 0xc1, 0x3f, 0x0e, 0x4b, 0xc1, 0x72, 0xd7, 0x59, 0x8b, - 0xa0, 0x11, 0x6c, 0x9f, 0xa5, 0xee, 0x3c, 0xa0, 0x27, 0x2c, 0xc3, 0xdb, 0x3d, 0xd0, 0xef, 0x3c, - 0xbe, 0x6b, 0x95, 0xe4, 0x0a, 0xb0, 0x9b, 0x85, 0x89, 0xf3, 0x87, 0x89, 0xba, 0x50, 0x3b, 0x67, - 0xef, 0x53, 0x16, 0x51, 0x86, 0x1b, 0x3d, 0xd0, 0x6f, 0x3a, 0xd5, 0x8c, 0x30, 0x6c, 0xd9, 0x64, - 0x4e, 0x0a, 0xa8, 0xa9, 0xa0, 0xf5, 0x88, 0x1e, 0xc2, 0xd6, 0xf3, 0x8b, 0xd3, 0x43, 0xee, 0x31, - 0xbc, 0xa3, 0xc2, 0xef, 0x95, 0xe1, 0x35, 0x3b, 0x93, 0x8c, 0x72, 0x8f, 0x39, 0x6b, 0x02, 0x3a, - 0x82, 0x9d, 0xb3, 0xaa, 0x96, 0x04, 0xef, 0xaa, 0x68, 0x86, 0x55, 0xab, 0xaa, 0xac, 0xa4, 0xc6, - 0x2a, 0x73, 0xd6, 0x17, 0xd1, 0x18, 0x6a, 0xaf, 0x27, 0xe7, 0x2b, 0xd3, 0x96, 0x32, 0x35, 0x6e, - 0x9a, 0x5e, 0xe7, 0x26, 0x3c, 0xe0, 0x61, 0x20, 0x59, 0x18, 0xcb, 0xcc, 0xa9, 0xf8, 0xc8, 0x82, - 0x70, 0x4a, 0x64, 0xf0, 0x81, 0x4d, 0x49, 0xc8, 0x70, 0xa7, 0x07, 0xfa, 0x6d, 0xfb, 0xce, 0x0d, - 0x76, 0x8d, 0x81, 0x2e, 0xa0, 0x56, 0xec, 0x1d, 0x93, 0x64, 0x86, 0x35, 0xe5, 0x35, 0x2e, 0xbd, - 0x06, 0xb7, 0x9f, 0x8e, 0x1b, 0x44, 0x44, 0x64, 0xd6, 0x31, 0xfb, 0x54, 0x64, 0x4a, 0xae, 0x73, - 0x13, 0x0c, 0x9c, 0x4a, 0x0b, 0x8d, 0xa0, 0x7e, 0xc8, 0x23, 0x29, 0x08, 0x95, 0xa7, 0x4c, 0x12, - 0xdc, 0xee, 0x35, 0xd4, 0x39, 0x15, 0xd7, 0xae, 0x0e, 0x38, 0x1b, 0x34, 0xf4, 0x02, 0x6a, 0x47, - 0x5c, 0x30, 0x97, 0x11, 0x81, 0xa1, 0x8a, 0xf3, 0xe8, 0xaf, 0x2f, 0x4a, 0xa5, 0x80, 0x4e, 0xa0, - 0xfe, 0x32, 0x2e, 0xea, 0xb2, 0x03, 0x99, 0x30, 0x89, 0x75, 0xa5, 0xf8, 0xe0, 0x57, 0x6e, 0xde, - 0xaf, 0x29, 0xca, 0x50, 0xce, 0x84, 0xef, 0x0d, 0x7d, 0x3e, 0x70, 0x15, 0xcf, 0x5a, 0xd1, 0x9d, - 0x8d, 0xe5, 0x71, 0xf3, 0xf3, 0x17, 0x73, 0x6b, 0xff, 0x12, 0x6c, 0x7e, 0x18, 0x7a, 0x55, 0x2b, - 0x70, 0x75, 0xbd, 0x47, 0xff, 0x54, 0x60, 0xad, 0xbb, 0x37, 0x50, 0x2f, 0xa4, 0x3d, 0x22, 0x89, - 0x92, 0xdd, 0xfe, 0x1f, 0xd9, 0x0d, 0xa9, 0xe2, 0x11, 0xac, 0x67, 0xf5, 0x08, 0xda, 0x4e, 0x35, - 0xdb, 0xcf, 0x16, 0x4b, 0x03, 0x7c, 0x5b, 0x1a, 0xe0, 0x72, 0x69, 0x80, 0x9f, 0x4b, 0x03, 0x7c, - 0xbd, 0x32, 0xc0, 0xe2, 0xca, 0x00, 0x6f, 0xef, 0xdd, 0x6e, 0x49, 0x68, 0xe8, 0xee, 0xaa, 0x77, - 0xff, 0xe4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x9e, 0x43, 0x9f, 0x58, 0x04, 0x00, 0x00, + 0x18, 0xed, 0x35, 0x69, 0xe3, 0x5c, 0x22, 0x28, 0x37, 0x9d, 0x32, 0xd8, 0xa1, 0x0c, 0x44, 0xa8, + 0x71, 0x10, 0x90, 0x25, 0x4c, 0x71, 0xd5, 0xaa, 0x12, 0x24, 0xb4, 0xae, 0x14, 0x04, 0xdb, 0xf9, + 0x7c, 0x38, 0x96, 0xe2, 0x9c, 0x39, 0x9f, 0x01, 0xff, 0x13, 0x46, 0x7e, 0x0a, 0x63, 0x46, 0xc6, + 0x0a, 0x21, 0x0b, 0xa5, 0x5b, 0x7f, 0x02, 0x13, 0xf2, 0xc5, 0x31, 0x4e, 0x86, 0x4a, 0xc0, 0x96, + 0x2f, 0xef, 0x7d, 0xef, 0x3d, 0xbf, 0xbb, 0x83, 0x75, 0x42, 0x03, 0x33, 0x14, 0x5c, 0x72, 0x54, + 0x21, 0x34, 0x68, 0x75, 0x3d, 0x5f, 0x4e, 0x63, 0xc7, 0xa4, 0x3c, 0xe8, 0x79, 0xdc, 0xe3, 0x3d, + 0x85, 0x39, 0xf1, 0x3b, 0x35, 0xa9, 0x41, 0xfd, 0x5a, 0xed, 0xb4, 0x0e, 0x42, 0x26, 0x02, 0x3f, + 0x8a, 0x7c, 0x3e, 0xcf, 0xff, 0x69, 0x52, 0x91, 0x84, 0x32, 0xc7, 0x0f, 0x7f, 0xec, 0xc1, 0xda, + 0x90, 0x52, 0x1e, 0xcf, 0x25, 0x1a, 0xc3, 0xda, 0xd0, 0x75, 0x05, 0x8b, 0x22, 0x0c, 0xda, 0xa0, + 0xd3, 0xb4, 0x9e, 0x2d, 0x52, 0x63, 0xe7, 0x7b, 0x6a, 0x1c, 0x95, 0x3c, 0xa7, 0x49, 0xc8, 0xc4, + 0x8c, 0xb9, 0x1e, 0x13, 0x3d, 0x27, 0x16, 0x82, 0x7f, 0xec, 0xe5, 0x82, 0xf9, 0xae, 0xbd, 0x16, + 0x41, 0x7d, 0x58, 0x3f, 0x8f, 0x9d, 0x99, 0x4f, 0x5f, 0xb0, 0x04, 0xef, 0xb6, 0x41, 0xa7, 0xf1, + 0xe4, 0x9e, 0x99, 0x93, 0x0b, 0xc0, 0xaa, 0x66, 0x26, 0xf6, 0x1f, 0x26, 0x6a, 0x41, 0xed, 0x92, + 0xbd, 0x8f, 0xd9, 0x9c, 0x32, 0x5c, 0x69, 0x83, 0x4e, 0xd5, 0x2e, 0x66, 0x84, 0x61, 0xcd, 0x22, + 0x33, 0x92, 0x41, 0x55, 0x05, 0xad, 0x47, 0xf4, 0x08, 0xd6, 0x4e, 0x26, 0xa3, 0x63, 0xee, 0x32, + 0xbc, 0xa7, 0xc2, 0x1f, 0xe4, 0xe1, 0x35, 0x2b, 0x91, 0x8c, 0x72, 0x97, 0xd9, 0x6b, 0x02, 0x3a, + 0x85, 0x8d, 0xf3, 0xa2, 0x96, 0x08, 0xef, 0xab, 0x68, 0xba, 0x59, 0xaa, 0x2a, 0xaf, 0xa4, 0xc4, + 0xca, 0x73, 0x96, 0x17, 0xd1, 0x00, 0x6a, 0xaf, 0x87, 0x97, 0x2b, 0xd3, 0x9a, 0x32, 0xd5, 0xb7, + 0x4d, 0x6f, 0x52, 0x03, 0x1e, 0xf1, 0xc0, 0x97, 0x2c, 0x08, 0x65, 0x62, 0x17, 0x7c, 0x64, 0x42, + 0x38, 0x26, 0xd2, 0xff, 0xc0, 0xc6, 0x24, 0x60, 0xb8, 0xd1, 0x06, 0x9d, 0xba, 0x75, 0x67, 0x8b, + 0x5d, 0x62, 0xa0, 0x09, 0xd4, 0xb2, 0xbd, 0x33, 0x12, 0x4d, 0xb1, 0xa6, 0xbc, 0x06, 0xb9, 0x57, + 0xf7, 0xf6, 0xd3, 0x71, 0xfc, 0x39, 0x11, 0x89, 0x79, 0xc6, 0x3e, 0x65, 0x99, 0xa2, 0x9b, 0xd4, + 0x00, 0x5d, 0xbb, 0xd0, 0x42, 0x7d, 0xd8, 0x3c, 0xe6, 0x73, 0x29, 0x08, 0x95, 0x23, 0x26, 0x09, + 0xae, 0xb7, 0x2b, 0xea, 0x9c, 0xb2, 0x6b, 0x57, 0x06, 0xec, 0x0d, 0x1a, 0x7a, 0x09, 0xb5, 0x53, + 0x2e, 0x98, 0xc3, 0x88, 0xc0, 0x50, 0xc5, 0x79, 0xfc, 0xd7, 0x17, 0xa5, 0x50, 0x40, 0x17, 0xf0, + 0xee, 0xc9, 0x64, 0xf4, 0x2a, 0xcc, 0x1a, 0xb3, 0x7c, 0x19, 0x31, 0x89, 0x9b, 0x4a, 0xf4, 0xe1, + 0xaf, 0xd4, 0x78, 0x50, 0x12, 0x95, 0x81, 0x9c, 0x0a, 0xcf, 0xed, 0x79, 0xbc, 0xeb, 0x28, 0x9e, + 0xb9, 0xa2, 0xdb, 0xdb, 0xfb, 0x83, 0xea, 0xe7, 0x2f, 0xc6, 0xce, 0xe1, 0x15, 0xd8, 0xfc, 0x3c, + 0x74, 0x51, 0xaa, 0x71, 0x75, 0xc9, 0xfb, 0xff, 0x54, 0x63, 0xa9, 0xc1, 0x37, 0xb0, 0x99, 0x49, + 0xbb, 0x44, 0x12, 0x25, 0xbb, 0xfb, 0x3f, 0xb2, 0x1b, 0x52, 0xd9, 0x53, 0x58, 0xcf, 0xea, 0x29, + 0xd4, 0xed, 0x62, 0xb6, 0x9e, 0x2f, 0x96, 0x3a, 0xf8, 0xb6, 0xd4, 0xc1, 0xd5, 0x52, 0x07, 0x3f, + 0x97, 0x3a, 0xf8, 0x7a, 0xad, 0x83, 0xc5, 0xb5, 0x0e, 0xde, 0xde, 0xbf, 0xdd, 0x92, 0xd0, 0xc0, + 0xd9, 0x57, 0xaf, 0xff, 0xe9, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x85, 0x4b, 0x79, 0x5e, + 0x04, 0x00, 0x00, } func (m *Account) Marshal() (dAtA []byte, err error) { @@ -265,10 +266,10 @@ func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.OpcodeBitset) > 0 { - i -= len(m.OpcodeBitset) - copy(dAtA[i:], m.OpcodeBitset) - i = encodeVarintAcm(dAtA, i, uint64(len(m.OpcodeBitset))) + if len(m.EVMOpcodeBitset) > 0 { + i -= len(m.EVMOpcodeBitset) + copy(dAtA[i:], m.EVMOpcodeBitset) + i = encodeVarintAcm(dAtA, i, uint64(len(m.EVMOpcodeBitset))) i-- dAtA[i] = 0x62 } @@ -481,7 +482,7 @@ func (m *Account) Size() (n int) { if l > 0 { n += 1 + l + sovAcm(uint64(l)) } - l = len(m.OpcodeBitset) + l = len(m.EVMOpcodeBitset) if l > 0 { n += 1 + l + sovAcm(uint64(l)) } @@ -885,7 +886,7 @@ func (m *Account) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OpcodeBitset", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EVMOpcodeBitset", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -912,9 +913,9 @@ func (m *Account) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OpcodeBitset = append(m.OpcodeBitset[:0], dAtA[iNdEx:postIndex]...) - if m.OpcodeBitset == nil { - m.OpcodeBitset = []byte{} + m.EVMOpcodeBitset = append(m.EVMOpcodeBitset[:0], dAtA[iNdEx:postIndex]...) + if m.EVMOpcodeBitset == nil { + m.EVMOpcodeBitset = []byte{} } iNdEx = postIndex default: diff --git a/dump/load.go b/dump/load.go index 531e01849..3df990d0f 100644 --- a/dump/load.go +++ b/dump/load.go @@ -9,6 +9,7 @@ import ( "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/execution/native" "github.com/hyperledger/burrow/execution/state" "github.com/hyperledger/burrow/txs/payload" ) @@ -40,6 +41,9 @@ func Load(source Source, st *state.State) error { m.MetadataHash = metahash.Bytes() m.Metadata = "" } + if row.Account.EVMOpcodeBitset.Len() != uint(len(row.Account.EVMCode)) { + row.Account.EVMOpcodeBitset = native.EVMOpcodeBitset(row.Account.EVMCode) + } err := s.UpdateAccount(row.Account) if err != nil { return err diff --git a/dump/mock.go b/dump/mock.go index 06547bbc5..c3bf6888b 100644 --- a/dump/mock.go +++ b/dump/mock.go @@ -11,6 +11,7 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/names" + "github.com/hyperledger/burrow/execution/native" "github.com/hyperledger/burrow/genesis" ) @@ -53,6 +54,7 @@ func (m *MockSource) Recv() (*Dump, error) { if m.Accounts%2 > 0 { row.Account.EVMCode = make([]byte, m.rand.Intn(10000)) m.rand.Read(row.Account.EVMCode) + row.Account.EVMOpcodeBitset = native.EVMOpcodeBitset(row.Account.EVMCode) } else { row.Account.PublicKey = crypto.PublicKey{} } diff --git a/dump/mock_test.go b/dump/mock_test.go index 6df2a7614..041b5ad51 100644 --- a/dump/mock_test.go +++ b/dump/mock_test.go @@ -23,6 +23,5 @@ func TestMockReader(t *testing.T) { loadDumpFromJSONString(t, st, dump) dumpOut := normaliseDump(dumpToJSONString(t, st, mock)) - require.True(t, dump == dumpOut) require.Equal(t, dump, dumpOut) } diff --git a/execution/native/account.go b/execution/native/account.go index c56c89b7f..c9d369f4a 100644 --- a/execution/native/account.go +++ b/execution/native/account.go @@ -50,7 +50,7 @@ func initEVMCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypt } acc.EVMCode = code - acc.OpcodeBitset = opcodeBitset(code) + acc.EVMOpcodeBitset = EVMOpcodeBitset(code) // keccak256 hash of a contract's code hash := sha3.NewLegacyKeccak256() @@ -119,7 +119,7 @@ func codehashPermitted(codehash []byte, metamap []*acm.ContractMeta) bool { } // If code[i] is an opcode (rather than PUSH data) then bitset.IsSet(i) will be true -func opcodeBitset(code []byte) bitset.Bitset { +func EVMOpcodeBitset(code []byte) bitset.Bitset { bs := bitset.New(uint(len(code))) for i := 0; i < len(code); i++ { bs.Set(uint(i)) diff --git a/execution/native/account_test.go b/execution/native/account_test.go index a800a5bcb..243334a82 100644 --- a/execution/native/account_test.go +++ b/execution/native/account_test.go @@ -95,17 +95,68 @@ func TestOpcodeBitset(t *testing.T) { code: bc.MustSplice(asm.PUSH2, 1, asm.JUMPDEST, asm.ADD, asm.JUMPDEST), bitset: mkBitset("10011"), }, - // TODO: Add test cases. + { + name: "Two JUMPDESTs", + code: bc.MustSplice(asm.PUSH1, 1, asm.JUMPDEST, asm.ADD, asm.JUMPDEST), + bitset: mkBitset("10111"), + }, + { + name: "One PUSH", + code: bc.MustSplice(asm.PUSH4, asm.JUMPDEST, asm.ADD, asm.JUMPDEST, asm.PUSH32, asm.BALANCE), + bitset: mkBitset("100001"), + }, + { + name: "Two PUSHes", + code: bc.MustSplice(asm.PUSH3, asm.JUMPDEST, asm.ADD, asm.JUMPDEST, asm.PUSH32, asm.BALANCE), + bitset: mkBitset("100010"), + }, + { + name: "Three PUSHes", + code: bc.MustSplice(asm.PUSH3, asm.JUMPDEST, asm.ADD, asm.PUSH2, asm.PUSH32, asm.BALANCE), + bitset: mkBitset("100010"), + }, + { + name: "No PUSH", + code: bc.MustSplice(asm.JUMPDEST, asm.ADD, asm.BALANCE), + bitset: mkBitset("111"), + }, + { + name: "End PUSH", + code: bc.MustSplice(asm.JUMPDEST, asm.ADD, asm.PUSH6), + bitset: mkBitset("111"), + }, + { + name: "Middle PUSH", + code: bc.MustSplice(asm.JUMPDEST, asm.PUSH2, asm.PUSH1, asm.PUSH2, asm.BLOCKHASH), + bitset: mkBitset("11001"), + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := opcodeBitset(tt.code); !reflect.DeepEqual(got, tt.bitset) { - t.Errorf("opcodeBitset() = %v, want %v", got, tt.bitset) + if got := EVMOpcodeBitset(tt.code); !reflect.DeepEqual(got, tt.bitset) { + t.Errorf("EVMOpcodeBitset() = %v, want %v", got, tt.bitset) } }) } } +func TestAccount_IsOpcodeAt(t *testing.T) { + st := acmstate.NewMemoryState() + address := AddressFromName("scrambled snake") + err := CreateAccount(st, address) + require.NoError(t, err) + code := bc.MustSplice(asm.PUSH2, 2, 3) + err = InitEVMCode(st, address, code) + require.NoError(t, err) + + acc, err := st.GetAccount(address) + require.NoError(t, err) + assert.True(t, acc.IsOpcodeAt(0)) + assert.False(t, acc.IsOpcodeAt(1)) + assert.False(t, acc.IsOpcodeAt(2)) + assert.False(t, acc.IsOpcodeAt(3)) +} + func mkBitset(binaryString string) bitset.Bitset { length := uint(len(binaryString)) bs := bitset.New(length) diff --git a/js/proto/acm_pb.d.ts b/js/proto/acm_pb.d.ts index d127e65be..7560162f1 100644 --- a/js/proto/acm_pb.d.ts +++ b/js/proto/acm_pb.d.ts @@ -56,10 +56,10 @@ export class Account extends jspb.Message { getForebear_asB64(): string; setForebear(value: Uint8Array | string): void; - getOpcodebitset(): Uint8Array | string; - getOpcodebitset_asU8(): Uint8Array; - getOpcodebitset_asB64(): string; - setOpcodebitset(value: Uint8Array | string): void; + getEvmopcodebitset(): Uint8Array | string; + getEvmopcodebitset_asU8(): Uint8Array; + getEvmopcodebitset_asB64(): string; + setEvmopcodebitset(value: Uint8Array | string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Account.AsObject; @@ -84,7 +84,7 @@ export namespace Account { codehash: Uint8Array | string, contractmetaList: Array, forebear: Uint8Array | string, - opcodebitset: Uint8Array | string, + evmopcodebitset: Uint8Array | string, } } diff --git a/js/proto/acm_pb.js b/js/proto/acm_pb.js index 828758869..97aad48fb 100644 --- a/js/proto/acm_pb.js +++ b/js/proto/acm_pb.js @@ -113,7 +113,7 @@ proto.acm.Account.toObject = function(includeInstance, msg) { contractmetaList: jspb.Message.toObjectList(msg.getContractmetaList(), proto.acm.ContractMeta.toObject, includeInstance), forebear: msg.getForebear_asB64(), - opcodebitset: msg.getOpcodebitset_asB64() + evmopcodebitset: msg.getEvmopcodebitset_asB64() }; if (includeInstance) { @@ -199,7 +199,7 @@ proto.acm.Account.deserializeBinaryFromReader = function(msg, reader) { break; case 12: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOpcodebitset(value); + msg.setEvmopcodebitset(value); break; default: reader.skipField(); @@ -310,7 +310,7 @@ proto.acm.Account.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getOpcodebitset_asU8(); + f = message.getEvmopcodebitset_asU8(); if (f.length > 0) { writer.writeBytes( 12, @@ -697,35 +697,35 @@ proto.acm.Account.prototype.setForebear = function(value) { /** - * optional bytes OpcodeBitset = 12; + * optional bytes EVMOpcodeBitset = 12; * @return {!(string|Uint8Array)} */ -proto.acm.Account.prototype.getOpcodebitset = function() { +proto.acm.Account.prototype.getEvmopcodebitset = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); }; /** - * optional bytes OpcodeBitset = 12; - * This is a type-conversion wrapper around `getOpcodebitset()` + * optional bytes EVMOpcodeBitset = 12; + * This is a type-conversion wrapper around `getEvmopcodebitset()` * @return {string} */ -proto.acm.Account.prototype.getOpcodebitset_asB64 = function() { +proto.acm.Account.prototype.getEvmopcodebitset_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOpcodebitset())); + this.getEvmopcodebitset())); }; /** - * optional bytes OpcodeBitset = 12; + * optional bytes EVMOpcodeBitset = 12; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOpcodebitset()` + * This is a type-conversion wrapper around `getEvmopcodebitset()` * @return {!Uint8Array} */ -proto.acm.Account.prototype.getOpcodebitset_asU8 = function() { +proto.acm.Account.prototype.getEvmopcodebitset_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOpcodebitset())); + this.getEvmopcodebitset())); }; @@ -733,7 +733,7 @@ proto.acm.Account.prototype.getOpcodebitset_asU8 = function() { * @param {!(string|Uint8Array)} value * @return {!proto.acm.Account} returns this */ -proto.acm.Account.prototype.setOpcodebitset = function(value) { +proto.acm.Account.prototype.setEvmopcodebitset = function(value) { return jspb.Message.setProto3BytesField(this, 12, value); }; diff --git a/project/history.go b/project/history.go index 7a962d38f..2d02e4bab 100644 --- a/project/history.go +++ b/project/history.go @@ -50,7 +50,7 @@ var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "htt MustDeclareReleases("0.30.4 - 2020-04-05", `### Added - [Build] Added Helm chart -- [State] Account now has OpcodeBitset field to support upcoming EVM fixes +- [State] Account now has EVMOpcodeBitset field to support upcoming EVM fixes ### Fixed - [JS] Github actions release of JS lib diff --git a/protobuf/acm.proto b/protobuf/acm.proto index a32a98f4b..872b4c310 100644 --- a/protobuf/acm.proto +++ b/protobuf/acm.proto @@ -42,8 +42,8 @@ message Account { // (from Solidity/EVM), they point to the original deployed account where the metadata is stored. // This original account is called the forebear. bytes Forebear = 10 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"]; - // A bitset of all the symbols in Code that are opcodes (i.e. actual code not PUSH data) - bytes OpcodeBitset = 12 [(gogoproto.casttype) = "github.com/tmthrgd/go-bitset.Bitset"]; + // A bitset of all the symbols in EVMCode that are opcodes (i.e. actual code not PUSH data) + bytes EVMOpcodeBitset = 12 [(gogoproto.casttype) = "github.com/tmthrgd/go-bitset.Bitset"]; } message ContractMeta { diff --git a/util/architecture/constants.go b/util/architecture/constants.go deleted file mode 100644 index 278605978..000000000 --- a/util/architecture/constants.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build !arm - -// Copyright Monax Industries Limited -// SPDX-License-Identifier: Apache-2.0 - -package architecture - -import "math" - -const ( - MaxInt32 = math.MaxUint32 -) diff --git a/util/architecture/constants_arm.go b/util/architecture/constants_arm.go deleted file mode 100644 index 3bb48f377..000000000 --- a/util/architecture/constants_arm.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright Monax Industries Limited -// SPDX-License-Identifier: Apache-2.0 - -package architecture - -import "math" - -const ( - MaxInt32 = math.MaxInt32 -) diff --git a/util/fs.go b/util/fs.go deleted file mode 100644 index 698f640ba..000000000 --- a/util/fs.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright Monax Industries Limited -// SPDX-License-Identifier: Apache-2.0 - -package util - -import ( - "fmt" - "io" - "os" -) - -// Ensure the directory exists or create it if needed. -func EnsureDir(dir string, mode os.FileMode) error { - if fileOptions, err := os.Stat(dir); os.IsNotExist(err) { - if errMake := os.MkdirAll(dir, mode); errMake != nil { - return fmt.Errorf("could not create directory %s. %v", dir, err) - } - } else if err != nil { - return fmt.Errorf("error asserting directory %s: %v", dir, err) - } else if !fileOptions.IsDir() { - return fmt.Errorf("path already exists as a file: %s", dir) - } - return nil -} - -// Check whether the provided directory exists -func IsDir(directory string) bool { - fileInfo, err := os.Stat(directory) - if err != nil { - return false - } - return fileInfo.IsDir() -} - -// copied from http://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file-in-golang -// CopyFile copies a file from src to dst. If src and dst files exist, and are -// the same, then return success. Otherwise, attempt to create a hard link -// between the two files. If that fail, copy the file contents from src to dst. -func CopyFile(src, dst string) (err error) { - sfi, err := os.Stat(src) - if err != nil { - return - } - if !sfi.Mode().IsRegular() { - // cannot copy non-regular files (e.g., directories, - // symlinks, devices, etc.) - return fmt.Errorf("CopyFile: non-regular source file %s (%q)", sfi.Name(), sfi.Mode().String()) - } - dfi, err := os.Stat(dst) - if err != nil { - if !os.IsNotExist(err) { - return - } - } else { - if !(dfi.Mode().IsRegular()) { - return fmt.Errorf("CopyFile: non-regular destination file %s (%q)", dfi.Name(), dfi.Mode().String()) - } - if os.SameFile(sfi, dfi) { - return - } - } - // NOTE: [ben] we do not want to create a hard link currently - // if err = os.Link(src, dst); err == nil { - // return - // } - err = copyFileContents(src, dst) - return -} - -// copyFileContents copies the contents of the file named src to the file named -// by dst. The file will be created if it does not already exist. If the -// destination file exists, all its contents will be replaced by the contents -// of the source file. -func copyFileContents(src, dst string) (err error) { - in, err := os.Open(src) - if err != nil { - return - } - defer in.Close() - out, err := os.Create(dst) - if err != nil { - return - } - defer func() { - cerr := out.Close() - if err == nil { - err = cerr - } - }() - if _, err = io.Copy(out, in); err != nil { - return - } - // TODO: [ben] this blocks, so copy should be put in go-routine - err = out.Sync() - return -} diff --git a/util/logging/cmd/main.go b/util/logging/cmd/main.go deleted file mode 100644 index 267ae7fab..000000000 --- a/util/logging/cmd/main.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright Monax Industries Limited -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "fmt" - - . "github.com/hyperledger/burrow/logging/logconfig" -) - -// Dump an example logging configuration -func main() { - loggingConfig := &LoggingConfig{ - RootSink: Sink(). - AddSinks( - // Log everything to Stderr - Sink().SetOutput(StderrOutput()), - Sink().SetTransform(FilterTransform(ExcludeWhenAllMatch, - "module", "p2p", - "captured_logging_source", "tendermint_log15")). - AddSinks( - Sink().SetOutput(StdoutOutput()), - ), - ), - } - fmt.Println(loggingConfig.RootTOMLString()) -} diff --git a/util/os.go b/util/os.go deleted file mode 100644 index 77bb4ac79..000000000 --- a/util/os.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright Monax Industries Limited -// SPDX-License-Identifier: Apache-2.0 - -package util - -import ( - "fmt" - "os" -) - -// Prints an error message to stderr and exits with status code 1 -func Fatalf(format string, args ...interface{}) { - fmt.Fprintf(os.Stderr, format, args...) - os.Exit(1) -} From cef202ebf93eea6ab20707bf0cc18fcceb519e57 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Sun, 5 Apr 2020 21:12:11 +0100 Subject: [PATCH 079/185] Build a burrow debug binary and include it in the docker image with the name 'burrow-debug' Signed-off-by: Silas Davis Signed-off-by: Dan --- Dockerfile | 3 ++- Makefile | 23 ++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 42a00fc9a..df7324a17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM ethereum/solc:0.5.12 as solc-builder # We use a multistage build to avoid bloating our deployment image with build dependencies FROM golang:1.13-alpine3.11 as builder -RUN apk add --no-cache --update git bash make +RUN apk add --no-cache --update git bash make musl-dev gcc libc6-compat ARG REPO=/src/burrow COPY . $REPO @@ -34,6 +34,7 @@ WORKDIR $BURROW_PATH # Copy binaries built in previous stage COPY --from=builder /src/burrow/bin/burrow $INSTALL_BASE/ +COPY --from=builder /src/burrow/bin/burrow-debug $INSTALL_BASE/ COPY --from=solc-builder /usr/bin/solc $INSTALL_BASE/ # Expose ports for 26656:peer; 26658:info; 10997:grpc diff --git a/Makefile b/Makefile index 4c578e7f5..86467fa8f 100644 --- a/Makefile +++ b/Makefile @@ -126,7 +126,7 @@ commit_hash: # build all targets in github.com/hyperledger/burrow .PHONY: build -build: check build_burrow +build: check build_burrow build_burrow_debug # build all targets in github.com/hyperledger/burrow with checks for race conditions .PHONY: build_race @@ -135,19 +135,24 @@ build_race: check build_race_db # build burrow and vent .PHONY: build_burrow build_burrow: commit_hash - go build -ldflags "-extldflags '-static' \ + go build $(BURROW_BUILD_FLAGS) -ldflags "-extldflags '-static' \ -X github.com/hyperledger/burrow/project.commit=$(shell cat commit_hash.txt) \ -X github.com/hyperledger/burrow/project.date=$(shell date '+%Y-%m-%d')" \ - -o ${REPO}/bin/burrow ./cmd/burrow + -o ${REPO}/bin/burrow$(BURROW_BUILD_SUFFIX) ./cmd/burrow # With the sqlite tag - enabling Vent sqlite adapter support, but building a CGO binary .PHONY: build_burrow_sqlite -build_burrow_sqlite: commit_hash - go build -tags sqlite \ - -ldflags "-extldflags '-static' \ - -X github.com/hyperledger/burrow/project.commit=$(shell cat commit_hash.txt) \ - -X github.com/hyperledger/burrow/project.date=$(shell date -I)" \ - -o ${REPO}/bin/burrow-vent-sqlite ./cmd/burrow +build_burrow_sqlite: export BURROW_BUILD_SUFFIX=-vent-sqlite +build_burrow_sqlite: export BURROW_BUILD_FLAGS=-tags sqlite +build_burrow_sqlite: + $(MAKE) build_burrow + +# Builds a binary suitable for delve line-by-line debugging through CGO with optimisations (-N) and inling (-l) disabled +.PHONY: build_burrow_debug +build_burrow_debug: export BURROW_BUILD_SUFFIX=-debug +build_burrow_debug: export BURROW_BUILD_FLAGS=-gcflags "all=-N -l" +build_burrow_debug: + $(MAKE) build_burrow .PHONY: install install: build_burrow From dca53a94cb3cba3f0e41959671e6758f82118ade Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Sun, 5 Apr 2020 22:19:13 +0100 Subject: [PATCH 080/185] Release 0.30.3 Signed-off-by: Silas Davis Signed-off-by: Dan --- CHANGELOG.md | 3 ++- NOTES.md | 1 + project/history.go | 5 +---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75f0a6bb0..e8fd71b0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog -## [0.30.3] - 2020-03-13 +## [0.30.3] - 2020-04-05 ### Added +- [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile' - [TS] Default ts client interface implementation diff --git a/NOTES.md b/NOTES.md index 9d2ae0111..5d8ce29fa 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,4 @@ ### Added +- [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile' - [TS] Default ts client interface implementation diff --git a/project/history.go b/project/history.go index 15d7cdcb2..fc5ff0c45 100644 --- a/project/history.go +++ b/project/history.go @@ -47,12 +47,9 @@ func FullVersion() string { // To cut a new release add a release to the front of this slice then run the // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). - MustDeclareReleases("", + MustDeclareReleases("0.30.3 - 2020-04-05", `### Added - [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile' -`, - "0.30.3 - 2020-03-13", - `### Added - [TS] Default ts client interface implementation `, "0.30.2 - 2020-03-13", From cbf4d4b1c1f7cb7f26d999bc158f8e82f85730fa Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 6 Apr 2020 17:22:21 -0400 Subject: [PATCH 081/185] Fixed bugs in operators and added unit tests. Signed-off-by: Dan --- execution/evm/contract.go | 28 ++++- execution/evm/evm_test.go | 239 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 261 insertions(+), 6 deletions(-) diff --git a/execution/evm/contract.go b/execution/evm/contract.go index 5a2026fa8..ca324c505 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -106,7 +106,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e stack.Push(Zero256) c.debugf(" %v / %v = %v\n", x, y, 0) } else { - div := new(big.Int).Div(x, y) + div := new(big.Int).Quo(x, y) res := stack.PushBigInt(div) c.debugf(" %v / %v = %v (%v)\n", x, y, div, res) } @@ -128,7 +128,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e stack.Push(Zero256) c.debugf(" %v %% %v = %v\n", x, y, 0) } else { - mod := new(big.Int).Mod(x, y) + mod := new(big.Int).Rem(x, y) res := stack.PushBigInt(mod) c.debugf(" %v %% %v = %v (%v)\n", x, y, mod, res) } @@ -164,9 +164,9 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e c.debugf(" %v ** %v = %v (%v)\n", x, y, pow, res) case SIGNEXTEND: // 0x0B - back := stack.Pop64() + back := stack.PopBigInt().Uint64() if back < Word256Bytes-1 { - bits := uint(back*8 + 7) + bits := uint(back*8 + 8) stack.PushBigInt(SignExtend(stack.PopBigInt(), bits)) } // Continue leaving the sign extension argument on the stack. This makes sign-extending a no-op if embedded @@ -502,7 +502,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case MSTORE8: // 0x53 offset := stack.PopBigInt() - val64 := stack.Pop64() + val64 := stack.PopBigInt().Uint64() val := byte(val64 & 0xFF) memory.Write(offset, []byte{val}) c.debugf(" => [%v] 0x%X\n", offset, val) @@ -853,7 +853,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e func (c *Contract) jump(code []byte, to uint64, pc *uint64) error { dest := codeGetOp(code, to) - if dest != JUMPDEST { + if dest != JUMPDEST || isInsidePushData(code, to) { c.debugf(" ~> %v invalid jump dest %v\n", to, dest) return errors.Codes.InvalidJumpDest } @@ -862,6 +862,22 @@ func (c *Contract) jump(code []byte, to uint64, pc *uint64) error { return nil } +// isInsidePushData checks if the operator code(n) is inside push data +func isInsidePushData(code []byte, n uint64) bool { + if uint64(len(code)) <= n { + return false + } + i := uint64(0) + for i < n { + if op := OpCode(code[i]); op >= PUSH1 && op <= PUSH32 { + i += uint64(op - PUSH1 + 2) + } else { + i++ + } + } + return i > n +} + func createAccount(callFrame *engine.CallFrame, creator, address crypto.Address) error { err := ensurePermission(callFrame, creator, permission.CreateAccount) if err != nil { diff --git a/execution/evm/evm_test.go b/execution/evm/evm_test.go index e643f6b4a..b99173e6c 100644 --- a/execution/evm/evm_test.go +++ b/execution/evm/evm_test.go @@ -1443,6 +1443,245 @@ func TestEVM(t *testing.T) { } } }) + + t.Run("SDIV", func(t *testing.T) { + st := acmstate.NewMemoryState() + blockchain := new(blockchain) + eventSink := exec.NewNoopEventSink() + + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "101") + var gas uint64 = 100000 + + tests := []struct { + name string + bytecode []byte + expected []byte + }{ + { + // (SDIV 7 3 ) + name: "sdiv0", + bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x07, SDIV, return1()), + expected: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}, + }, + { + // (SDIV 7 (- 0 3) ) + name: "sdiv1", + bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x00, SUB, PUSH1, 0x07, SDIV, return1()), + expected: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE}, + }, + { + // (SDIV (- 0 7) 3 ) + name: "sdiv2", + bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x07, PUSH1, 0x00, SUB, SDIV, return1()), + expected: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE}, + }, + { + // (SDIV (- 0 7) (- 0 3) ) + name: "sdiv3", + bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x00, SUB, PUSH1, 0x07, PUSH1, 0x00, SUB, SDIV, return1()), + expected: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}, + }, + } + for _, tt := range tests { + params := engine.CallParams{ + Caller: account1, + Callee: account2, + Gas: &gas, + } + if output, err := vm.Execute(st, blockchain, eventSink, params, tt.bytecode); err != nil || !bytes.Equal(output, tt.expected) { + t.Errorf("Reported error in %v.", tt.name) + assert.NoError(t, err) + assert.Equal(t, tt.expected, output) + } + } + }) + + t.Run("SMOD", func(t *testing.T) { + st := acmstate.NewMemoryState() + blockchain := new(blockchain) + eventSink := exec.NewNoopEventSink() + + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "101") + var gas uint64 = 100000 + + tests := []struct { + name string + bytecode []byte + expected []byte + }{ + { + // (SMOD 7 3) + name: "smod0", + bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x07, SMOD, return1()), + expected: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}, + }, + { + // (SMOD 7 (- 0 3)) + name: "smod1", + bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x00, SUB, PUSH1, 0x07, SMOD, return1()), + expected: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}, + }, + { + // (SMOD (- 0 7) 3) + name: "smod2", + bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x07, PUSH1, 0x00, SUB, SMOD, return1()), + expected: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, + }, + { + // (SMOD (- 0 7) (- 0 3)) + name: "smod3", + bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x00, SUB, PUSH1, 0x07, PUSH1, 0x00, SUB, SMOD, return1()), + expected: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, + }, + } + for _, tt := range tests { + params := engine.CallParams{ + Caller: account1, + Callee: account2, + Gas: &gas, + } + if output, err := vm.Execute(st, blockchain, eventSink, params, tt.bytecode); err != nil || !bytes.Equal(output, tt.expected) { + t.Errorf("Reported error in %v.", tt.name) + assert.NoError(t, err) + assert.Equal(t, tt.expected, output) + } + } + }) + + t.Run("SIGNEXTEND and MSTORE8", func(t *testing.T) { + st := acmstate.NewMemoryState() + blockchain := new(blockchain) + eventSink := exec.NewNoopEventSink() + + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "101") + var gas uint64 = 100000 + + tests := []struct { + name string + bytecode []byte + expected []byte + }{ + { + // 0x6A == 0b01101010 + name: "signextend0", + bytecode: MustSplice(PUSH3, 0x12, 0x2F, 0x6A, PUSH1, 0x00, SIGNEXTEND, return1()), + expected: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A}, + }, + { + name: "signextend1", + bytecode: MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, SIGNEXTEND, return1()), + expected: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, + }, + { + name: "mstore8", + bytecode: MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + PUSH1, 0x01, MSTORE8, PUSH1, 0x01, MLOAD, return1()), + expected: []byte{0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + }, + } + for _, tt := range tests { + params := engine.CallParams{ + Caller: account1, + Callee: account2, + Gas: &gas, + } + if output, err := vm.Execute(st, blockchain, eventSink, params, tt.bytecode); err != nil || !bytes.Equal(output, tt.expected) { + t.Errorf("Reported error in %v.", tt.name) + assert.NoError(t, err) + assert.Equal(t, tt.expected, output) + } + } + }) + + t.Run("JUMPDEST", func(t *testing.T) { + st := acmstate.NewMemoryState() + blockchain := new(blockchain) + eventSink := exec.NewNoopEventSink() + + account1 := newAccount(t, st, "1") + account2 := newAccount(t, st, "101") + var gas uint64 = 100000 + + tests := []struct { + name string + bytecode []byte + expected_out []byte + expected_err *errors.Code + }{ + { + name: "Jump_InsidePushWithJumpDest", + bytecode: MustSplice(PUSH1, 0x04, PUSH1, 0x03, ADD, JUMP, + PUSH6, JUMPDEST, 0x60, 0x01, 0x60, 0x01, 0x55, return1()), + expected_err: errors.Codes.InvalidJumpDest, + }, + { + name: "Jumpi_InsidePushWithJumpDest", + bytecode: MustSplice(PUSH1, 0x01, PUSH1, 0x06, PUSH1, 0x03, ADD, JUMPI, + PUSH6, JUMPDEST, 0x60, 0x01, 0x60, 0x01, 0x55, return1()), + expected_err: errors.Codes.InvalidJumpDest, + }, + } + for _, tt := range tests { + params := engine.CallParams{ + Caller: account1, + Callee: account2, + Gas: &gas, + } + if output, err := vm.Execute(st, blockchain, eventSink, params, tt.bytecode); errors.GetCode(err) != tt.expected_err { + t.Errorf("FAIL: %v.", tt.name) + assert.Equal(t, tt.expected_err, errors.GetCode(err)) + } else if tt.expected_err == errors.Codes.None && !bytes.Equal(output, tt.expected_out) { + t.Errorf("FAIL: %v.", tt.name) + assert.Equal(t, tt.expected_out, output) + } + } + }) } type blockchain struct { From 6ccc3ab7faeeba2153a1f3830e4051614fb28e10 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 6 Apr 2020 17:40:07 -0400 Subject: [PATCH 082/185] Corrected formatting errors. Signed-off-by: Dan --- execution/evm/evm_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/execution/evm/evm_test.go b/execution/evm/evm_test.go index b99173e6c..d550abe7d 100644 --- a/execution/evm/evm_test.go +++ b/execution/evm/evm_test.go @@ -1460,7 +1460,7 @@ func TestEVM(t *testing.T) { }{ { // (SDIV 7 3 ) - name: "sdiv0", + name: "sdiv0", bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x07, SDIV, return1()), expected: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1469,7 +1469,7 @@ func TestEVM(t *testing.T) { }, { // (SDIV 7 (- 0 3) ) - name: "sdiv1", + name: "sdiv1", bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x00, SUB, PUSH1, 0x07, SDIV, return1()), expected: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, @@ -1478,7 +1478,7 @@ func TestEVM(t *testing.T) { }, { // (SDIV (- 0 7) 3 ) - name: "sdiv2", + name: "sdiv2", bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x07, PUSH1, 0x00, SUB, SDIV, return1()), expected: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, @@ -1487,7 +1487,7 @@ func TestEVM(t *testing.T) { }, { // (SDIV (- 0 7) (- 0 3) ) - name: "sdiv3", + name: "sdiv3", bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x00, SUB, PUSH1, 0x07, PUSH1, 0x00, SUB, SDIV, return1()), expected: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1525,7 +1525,7 @@ func TestEVM(t *testing.T) { }{ { // (SMOD 7 3) - name: "smod0", + name: "smod0", bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x07, SMOD, return1()), expected: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1534,7 +1534,7 @@ func TestEVM(t *testing.T) { }, { // (SMOD 7 (- 0 3)) - name: "smod1", + name: "smod1", bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x00, SUB, PUSH1, 0x07, SMOD, return1()), expected: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1543,7 +1543,7 @@ func TestEVM(t *testing.T) { }, { // (SMOD (- 0 7) 3) - name: "smod2", + name: "smod2", bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x07, PUSH1, 0x00, SUB, SMOD, return1()), expected: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, @@ -1552,7 +1552,7 @@ func TestEVM(t *testing.T) { }, { // (SMOD (- 0 7) (- 0 3)) - name: "smod3", + name: "smod3", bytecode: MustSplice(PUSH1, 0x03, PUSH1, 0x00, SUB, PUSH1, 0x07, PUSH1, 0x00, SUB, SMOD, return1()), expected: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, @@ -1590,7 +1590,7 @@ func TestEVM(t *testing.T) { }{ { // 0x6A == 0b01101010 - name: "signextend0", + name: "signextend0", bytecode: MustSplice(PUSH3, 0x12, 0x2F, 0x6A, PUSH1, 0x00, SIGNEXTEND, return1()), expected: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1649,8 +1649,8 @@ func TestEVM(t *testing.T) { var gas uint64 = 100000 tests := []struct { - name string - bytecode []byte + name string + bytecode []byte expected_out []byte expected_err *errors.Code }{ From 651e20bd13db2604df8d17a8755b333cf0844735 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 10 Apr 2020 21:03:03 -0400 Subject: [PATCH 083/185] Init tests in Solidity. Signed-off-by: Dan --- tests/jobs_fixtures/app58-operator-sdiv/OperatorSdiv.sol | 0 tests/jobs_fixtures/app58-operator-sdiv/deploy.yaml | 0 tests/jobs_fixtures/app58-operator-sdiv/readme.md | 0 tests/jobs_fixtures/app59-operator-smod/OperatorSmod.sol | 0 tests/jobs_fixtures/app59-operator-smod/deploy.yaml | 0 tests/jobs_fixtures/app59-operator-smod/readme.md | 0 .../app60-operator-signextend/OperatorSignextend.sol | 0 tests/jobs_fixtures/app60-operator-signextend/deploy.yaml | 0 tests/jobs_fixtures/app60-operator-signextend/readme.md | 0 9 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/jobs_fixtures/app58-operator-sdiv/OperatorSdiv.sol create mode 100644 tests/jobs_fixtures/app58-operator-sdiv/deploy.yaml create mode 100644 tests/jobs_fixtures/app58-operator-sdiv/readme.md create mode 100644 tests/jobs_fixtures/app59-operator-smod/OperatorSmod.sol create mode 100644 tests/jobs_fixtures/app59-operator-smod/deploy.yaml create mode 100644 tests/jobs_fixtures/app59-operator-smod/readme.md create mode 100644 tests/jobs_fixtures/app60-operator-signextend/OperatorSignextend.sol create mode 100644 tests/jobs_fixtures/app60-operator-signextend/deploy.yaml create mode 100644 tests/jobs_fixtures/app60-operator-signextend/readme.md diff --git a/tests/jobs_fixtures/app58-operator-sdiv/OperatorSdiv.sol b/tests/jobs_fixtures/app58-operator-sdiv/OperatorSdiv.sol new file mode 100644 index 000000000..e69de29bb diff --git a/tests/jobs_fixtures/app58-operator-sdiv/deploy.yaml b/tests/jobs_fixtures/app58-operator-sdiv/deploy.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/tests/jobs_fixtures/app58-operator-sdiv/readme.md b/tests/jobs_fixtures/app58-operator-sdiv/readme.md new file mode 100644 index 000000000..e69de29bb diff --git a/tests/jobs_fixtures/app59-operator-smod/OperatorSmod.sol b/tests/jobs_fixtures/app59-operator-smod/OperatorSmod.sol new file mode 100644 index 000000000..e69de29bb diff --git a/tests/jobs_fixtures/app59-operator-smod/deploy.yaml b/tests/jobs_fixtures/app59-operator-smod/deploy.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/tests/jobs_fixtures/app59-operator-smod/readme.md b/tests/jobs_fixtures/app59-operator-smod/readme.md new file mode 100644 index 000000000..e69de29bb diff --git a/tests/jobs_fixtures/app60-operator-signextend/OperatorSignextend.sol b/tests/jobs_fixtures/app60-operator-signextend/OperatorSignextend.sol new file mode 100644 index 000000000..e69de29bb diff --git a/tests/jobs_fixtures/app60-operator-signextend/deploy.yaml b/tests/jobs_fixtures/app60-operator-signextend/deploy.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/tests/jobs_fixtures/app60-operator-signextend/readme.md b/tests/jobs_fixtures/app60-operator-signextend/readme.md new file mode 100644 index 000000000..e69de29bb From 8a7882034ce2273b4b53c424474933da27b9a290 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 10 Apr 2020 21:12:39 -0400 Subject: [PATCH 084/185] Added tests for operator SDIV. Signed-off-by: Dan --- .../app58-operator-sdiv/OperatorSdiv.sol | 7 ++ .../app58-operator-sdiv/deploy.yaml | 65 +++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/tests/jobs_fixtures/app58-operator-sdiv/OperatorSdiv.sol b/tests/jobs_fixtures/app58-operator-sdiv/OperatorSdiv.sol index e69de29bb..a93f53f0e 100644 --- a/tests/jobs_fixtures/app58-operator-sdiv/OperatorSdiv.sol +++ b/tests/jobs_fixtures/app58-operator-sdiv/OperatorSdiv.sol @@ -0,0 +1,7 @@ +pragma solidity >=0.0.0; + +contract OperatorSdiv { + function sdiv(int a, int b) public returns(int) { + return a / b; + } +} diff --git a/tests/jobs_fixtures/app58-operator-sdiv/deploy.yaml b/tests/jobs_fixtures/app58-operator-sdiv/deploy.yaml index e69de29bb..bbb08f659 100644 --- a/tests/jobs_fixtures/app58-operator-sdiv/deploy.yaml +++ b/tests/jobs_fixtures/app58-operator-sdiv/deploy.yaml @@ -0,0 +1,65 @@ +jobs: + +- name: deployOperatorSdiv + deploy: + contract: OperatorSdiv.sol + +# first test: 7 / 3 == 2 +- name: test1 + call: + destination: $deployOperatorSdiv + function: sdiv + data: + - 7 + - 3 + +- name: assertTest1 + assert: + key: $test1 + relation: eq + val: 2 + +# second test: 7 / (-3) == -2 +- name: test2 + call: + destination: $deployOperatorSdiv + function: sdiv + data: + - 7 + - -3 + +- name: assertTest2 + assert: + key: $test2 + relation: eq + val: -2 + +# third test: (-7) / 3 == -2 +- name: test3 + call: + destination: $deployOperatorSdiv + function: sdiv + data: + - -7 + - 3 + +- name: assertTest3 + assert: + key: $test3 + relation: eq + val: -2 + +# third test: (-7) / (-3) == 2 +- name: test4 + call: + destination: $deployOperatorSdiv + function: sdiv + data: + - -7 + - -3 + +- name: assertTest4 + assert: + key: $test4 + relation: eq + val: 2 \ No newline at end of file From 027b85b65d65141fa6db77e719df94114be892dc Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 10 Apr 2020 21:23:36 -0400 Subject: [PATCH 085/185] Added readme for SDIV tests. Signed-off-by: Dan --- tests/jobs_fixtures/app58-operator-sdiv/readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/jobs_fixtures/app58-operator-sdiv/readme.md b/tests/jobs_fixtures/app58-operator-sdiv/readme.md index e69de29bb..2c03f61f3 100644 --- a/tests/jobs_fixtures/app58-operator-sdiv/readme.md +++ b/tests/jobs_fixtures/app58-operator-sdiv/readme.md @@ -0,0 +1,3 @@ +* According to [Ethereum Yellow Paper](https://ethereum.github.io/yellowpaper/paper.pdf), +$a/b=sign(a/b)\lfloor |a/b|\rfloor$. +Therefore, `7 / 3`, `7 / (-3)`, `(-7) / 3` and `(-7) / (-3)` should give `2`, `-2`, `-2` and `2` respectively. \ No newline at end of file From 6e57b9907d4ad4cf61a35f41ed188f95e5c48f92 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 10 Apr 2020 21:28:53 -0400 Subject: [PATCH 086/185] Updated readme for SDIV tests. Signed-off-by: Dan --- tests/jobs_fixtures/app58-operator-sdiv/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/jobs_fixtures/app58-operator-sdiv/readme.md b/tests/jobs_fixtures/app58-operator-sdiv/readme.md index 2c03f61f3..e3031a04c 100644 --- a/tests/jobs_fixtures/app58-operator-sdiv/readme.md +++ b/tests/jobs_fixtures/app58-operator-sdiv/readme.md @@ -1,3 +1,3 @@ * According to [Ethereum Yellow Paper](https://ethereum.github.io/yellowpaper/paper.pdf), -$a/b=sign(a/b)\lfloor |a/b|\rfloor$. +for signed division `a / b == sign(a/b) * floor(abs(a/b))`. Therefore, `7 / 3`, `7 / (-3)`, `(-7) / 3` and `(-7) / (-3)` should give `2`, `-2`, `-2` and `2` respectively. \ No newline at end of file From 114b2a8b78650b0f191f5967b3c9b1934bcfdd30 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 10 Apr 2020 21:36:11 -0400 Subject: [PATCH 087/185] Added tests for operator SMOD. Signed-off-by: Dan --- .../app58-operator-sdiv/deploy.yaml | 2 +- .../app59-operator-smod/OperatorSmod.sol | 7 ++ .../app59-operator-smod/deploy.yaml | 65 +++++++++++++++++++ .../app59-operator-smod/readme.md | 3 + 4 files changed, 76 insertions(+), 1 deletion(-) diff --git a/tests/jobs_fixtures/app58-operator-sdiv/deploy.yaml b/tests/jobs_fixtures/app58-operator-sdiv/deploy.yaml index bbb08f659..a92767886 100644 --- a/tests/jobs_fixtures/app58-operator-sdiv/deploy.yaml +++ b/tests/jobs_fixtures/app58-operator-sdiv/deploy.yaml @@ -49,7 +49,7 @@ jobs: relation: eq val: -2 -# third test: (-7) / (-3) == 2 +# fourth test: (-7) / (-3) == 2 - name: test4 call: destination: $deployOperatorSdiv diff --git a/tests/jobs_fixtures/app59-operator-smod/OperatorSmod.sol b/tests/jobs_fixtures/app59-operator-smod/OperatorSmod.sol index e69de29bb..15879a3fc 100644 --- a/tests/jobs_fixtures/app59-operator-smod/OperatorSmod.sol +++ b/tests/jobs_fixtures/app59-operator-smod/OperatorSmod.sol @@ -0,0 +1,7 @@ +pragma solidity >=0.0.0; + +contract OperatorSmod { + function smod(int a, int b) public returns(int) { + return a % b; + } +} diff --git a/tests/jobs_fixtures/app59-operator-smod/deploy.yaml b/tests/jobs_fixtures/app59-operator-smod/deploy.yaml index e69de29bb..7b7e76219 100644 --- a/tests/jobs_fixtures/app59-operator-smod/deploy.yaml +++ b/tests/jobs_fixtures/app59-operator-smod/deploy.yaml @@ -0,0 +1,65 @@ +jobs: + + - name: deployOperatorSmod + deploy: + contract: OperatorSmod.sol + + # first test: 7 % 3 == 1 + - name: test1 + call: + destination: $deployOperatorSmod + function: smod + data: + - 7 + - 3 + + - name: assertTest1 + assert: + key: $test1 + relation: eq + val: 1 + + # second test: 7 % (-3) == 1 + - name: test2 + call: + destination: $deployOperatorSmod + function: smod + data: + - 7 + - -3 + + - name: assertTest2 + assert: + key: $test2 + relation: eq + val: 1 + + # third test: (-7) % 3 == -1 + - name: test3 + call: + destination: $deployOperatorSmod + function: smod + data: + - -7 + - 3 + + - name: assertTest3 + assert: + key: $test3 + relation: eq + val: -1 + + # fourth test: (-7) % (-3) == -1 + - name: test4 + call: + destination: $deployOperatorSmod + function: smod + data: + - -7 + - -3 + + - name: assertTest4 + assert: + key: $test4 + relation: eq + val: -1 \ No newline at end of file diff --git a/tests/jobs_fixtures/app59-operator-smod/readme.md b/tests/jobs_fixtures/app59-operator-smod/readme.md index e69de29bb..2fe2a53d1 100644 --- a/tests/jobs_fixtures/app59-operator-smod/readme.md +++ b/tests/jobs_fixtures/app59-operator-smod/readme.md @@ -0,0 +1,3 @@ +* According to [Ethereum Yellow Paper](https://ethereum.github.io/yellowpaper/paper.pdf), +for signed modulo `a % b == sign(a) * (abs(a) % abs(b))`. +Therefore, `7 % 3`, `7 % (-3)`, `(-7) % 3` and `(-7) % (-3)` should give `1`, `1`, `-1` and `-1` respectively. \ No newline at end of file From f0183ace8df70c10c59784ebc5d842ff6c0aeedf Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 10 Apr 2020 22:03:15 -0400 Subject: [PATCH 088/185] Cleaned unnecessary tests. Signed-off-by: Dan --- .../app60-operator-signextend/OperatorSignextend.sol | 0 tests/jobs_fixtures/app60-operator-signextend/deploy.yaml | 0 tests/jobs_fixtures/app60-operator-signextend/readme.md | 0 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tests/jobs_fixtures/app60-operator-signextend/OperatorSignextend.sol delete mode 100644 tests/jobs_fixtures/app60-operator-signextend/deploy.yaml delete mode 100644 tests/jobs_fixtures/app60-operator-signextend/readme.md diff --git a/tests/jobs_fixtures/app60-operator-signextend/OperatorSignextend.sol b/tests/jobs_fixtures/app60-operator-signextend/OperatorSignextend.sol deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/jobs_fixtures/app60-operator-signextend/deploy.yaml b/tests/jobs_fixtures/app60-operator-signextend/deploy.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/jobs_fixtures/app60-operator-signextend/readme.md b/tests/jobs_fixtures/app60-operator-signextend/readme.md deleted file mode 100644 index e69de29bb..000000000 From 87ba1392d8ae06b35509e8b10ec9b93cc9cb92a2 Mon Sep 17 00:00:00 2001 From: Dan Date: Sun, 12 Apr 2020 16:53:04 -0400 Subject: [PATCH 089/185] Fixes based on reviewer comments. Signed-off-by: Dan --- execution/evm/contract.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/execution/evm/contract.go b/execution/evm/contract.go index ca324c505..133e2e642 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -166,7 +166,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case SIGNEXTEND: // 0x0B back := stack.PopBigInt().Uint64() if back < Word256Bytes-1 { - bits := uint(back*8 + 8) + bits := uint((back + 1) * 8) stack.PushBigInt(SignExtend(stack.PopBigInt(), bits)) } // Continue leaving the sign extension argument on the stack. This makes sign-extending a no-op if embedded @@ -862,17 +862,15 @@ func (c *Contract) jump(code []byte, to uint64, pc *uint64) error { return nil } -// isInsidePushData checks if the operator code(n) is inside push data +// isInsidePushData checks if the symbol at code(n) is inside push data i.e. is data for the stack and not an opcode. func isInsidePushData(code []byte, n uint64) bool { if uint64(len(code)) <= n { return false } i := uint64(0) - for i < n { + for ; i < n; i++ { if op := OpCode(code[i]); op >= PUSH1 && op <= PUSH32 { - i += uint64(op - PUSH1 + 2) - } else { - i++ + i += uint64(op - PUSH1 + 1) } } return i > n From ffd3761c2d7c32ea8fe343ca3f33eccd513e5563 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Sun, 12 Apr 2020 17:45:27 +0100 Subject: [PATCH 090/185] fix typescript import name Signed-off-by: Gregory Hill Signed-off-by: Dan --- js/src/lib/contracts/contract.ts | 2 +- js/src/lib/contracts/event.ts | 2 +- js/src/lib/contracts/function.ts | 2 +- js/src/lib/contracts/manager.ts | 2 +- js/src/lib/events.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/src/lib/contracts/contract.ts b/js/src/lib/contracts/contract.ts index 215a7bcb3..1d1d522c8 100644 --- a/js/src/lib/contracts/contract.ts +++ b/js/src/lib/contracts/contract.ts @@ -1,6 +1,6 @@ import { SolidityEvent } from './event'; import { SolidityFunction, Handler } from './function'; -import { Burrow } from '../Burrow'; +import { Burrow } from '../burrow'; import { Function, Event } from 'solc'; type FunctionOrEvent = Function | Event; diff --git a/js/src/lib/contracts/event.ts b/js/src/lib/contracts/event.ts index b4d3f373b..ccd9d189b 100644 --- a/js/src/lib/contracts/event.ts +++ b/js/src/lib/contracts/event.ts @@ -2,7 +2,7 @@ import * as utils from '../utils/utils'; import * as coder from 'ethereumjs-abi'; import * as convert from '../utils/convert'; import sha3 from '../utils/sha3'; -import { Burrow, Error } from '../Burrow'; +import { Burrow, Error } from '../burrow'; import { LogEvent } from '../../../proto/exec_pb' import { Event, EventInput } from 'solc'; diff --git a/js/src/lib/contracts/function.ts b/js/src/lib/contracts/function.ts index 467f737e0..ece2c65c7 100644 --- a/js/src/lib/contracts/function.ts +++ b/js/src/lib/contracts/function.ts @@ -5,7 +5,7 @@ import * as grpc from 'grpc'; import sha3 from '../utils/sha3'; import { TxInput, CallTx } from '../../../proto/payload_pb'; import { TxExecution, Result } from '../../../proto/exec_pb'; -import { Burrow, Error } from '../Burrow'; +import { Burrow, Error } from '../burrow'; import { Envelope } from '../../../proto/txs_pb'; import { Function, FunctionInput, FunctionOutput } from 'solc'; diff --git a/js/src/lib/contracts/manager.ts b/js/src/lib/contracts/manager.ts index 9f5bd2858..39440808e 100644 --- a/js/src/lib/contracts/manager.ts +++ b/js/src/lib/contracts/manager.ts @@ -1,5 +1,5 @@ import { Contract, Handlers } from './contract'; -import { Burrow } from '../Burrow'; +import { Burrow } from '../burrow'; import { GetMetadataParam } from '../../../proto/rpcquery_pb'; import { Function, Event } from 'solc'; diff --git a/js/src/lib/events.ts b/js/src/lib/events.ts index 14b3513fa..1495ff8f5 100644 --- a/js/src/lib/events.ts +++ b/js/src/lib/events.ts @@ -1,7 +1,7 @@ import { ExecutionEventsClient } from '../../proto/rpcevents_grpc_pb'; import { BlocksRequest, BlockRange, Bound, EventsResponse } from '../../proto/rpcevents_pb'; import { LogEvent } from '../../proto/exec_pb'; -import { Error } from './Burrow'; +import { Error } from './burrow'; import * as grpc from 'grpc'; export type EventStream = grpc.ClientReadableStream; From b17601e97264c059d4e65440f63e7d707bc8bdba Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 13 Apr 2020 18:05:11 +0100 Subject: [PATCH 091/185] Add OpcodeBitset as ahead-of-time lookup for whether a code symbol is a code or data in order to test whether a JUMPDEST symbol is a valid jump destination or just push data Signed-off-by: Silas Davis Signed-off-by: Dan --- execution/contexts/call_context.go | 2 +- execution/evm/evm_test.go | 8 +++--- execution/native/account.go | 24 +++++++++++++--- execution/native/account_test.go | 46 +++++++++++++++++++++++++++--- protobuf/acm.proto | 2 ++ 5 files changed, 69 insertions(+), 13 deletions(-) diff --git a/execution/contexts/call_context.go b/execution/contexts/call_context.go index 6a31fe565..92ab28228 100644 --- a/execution/contexts/call_context.go +++ b/execution/contexts/call_context.go @@ -231,7 +231,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error } else { ctx.Logger.TraceMsg("Successful execution") if createContract { - err := native.InitCode(txCache, callee, ret) + err := native.InitEVMCode(txCache, callee, ret) if err != nil { return err } diff --git a/execution/evm/evm_test.go b/execution/evm/evm_test.go index d550abe7d..aba3643c7 100644 --- a/execution/evm/evm_test.go +++ b/execution/evm/evm_test.go @@ -925,7 +925,7 @@ func TestEVM(t *testing.T) { // Not needed for this test (since contract code is passed as argument to vm), but this is what an execution // framework must do - err = native.InitCode(st, account2, contractCode) + err = native.InitEVMCode(st, account2, contractCode) require.NoError(t, err) // Input is the function hash of `get()` @@ -1273,9 +1273,9 @@ func TestEVM(t *testing.T) { contractCode, err := vm.Execute(st, blockchain, eventSink, params, code) require.NoError(t, err) - err = native.InitCode(st, account1, contractCode) + err = native.InitEVMCode(st, account1, contractCode) require.NoError(t, err) - err = native.InitCode(st, account2, contractCode) + err = native.InitEVMCode(st, account2, contractCode) require.NoError(t, err) // keccak256 hash of 'callMeBack()' @@ -1719,7 +1719,7 @@ func makeAccountWithCode(t testing.TB, st acmstate.ReaderWriter, name string, co address := native.AddressFromName(name) err := native.CreateAccount(st, address) require.NoError(t, err) - err = native.InitCode(st, address, code) + err = native.InitEVMCode(st, address, code) require.NoError(t, err) addToBalance(t, st, address, 9999999) return address diff --git a/execution/native/account.go b/execution/native/account.go index fd073aae2..c56c89b7f 100644 --- a/execution/native/account.go +++ b/execution/native/account.go @@ -8,7 +8,9 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/deploy/compile" "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/evm/asm" "github.com/hyperledger/burrow/txs/payload" + bitset "github.com/tmthrgd/go-bitset" "golang.org/x/crypto/sha3" ) @@ -29,15 +31,15 @@ func CreateAccount(st acmstate.ReaderWriter, address crypto.Address) error { return st.UpdateAccount(&acm.Account{Address: address}) } -func InitCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) error { - return initCode(st, address, nil, code) +func InitEVMCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) error { + return initEVMCode(st, address, nil, code) } func InitChildCode(st acmstate.ReaderWriter, address crypto.Address, parent crypto.Address, code []byte) error { - return initCode(st, address, &parent, code) + return initEVMCode(st, address, &parent, code) } -func initCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.Address, code []byte) error { +func initEVMCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.Address, code []byte) error { acc, err := mustAccount(st, address) if err != nil { return err @@ -48,6 +50,7 @@ func initCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.A } acc.EVMCode = code + acc.OpcodeBitset = opcodeBitset(code) // keccak256 hash of a contract's code hash := sha3.NewLegacyKeccak256() @@ -115,6 +118,19 @@ func codehashPermitted(codehash []byte, metamap []*acm.ContractMeta) bool { return false } +// If code[i] is an opcode (rather than PUSH data) then bitset.IsSet(i) will be true +func opcodeBitset(code []byte) bitset.Bitset { + bs := bitset.New(uint(len(code))) + for i := 0; i < len(code); i++ { + bs.Set(uint(i)) + symbol := asm.OpCode(code[i]) + if symbol >= asm.PUSH1 && symbol <= asm.PUSH32 { + i += int(symbol - asm.PUSH1 + 1) + } + } + return bs +} + func InitWASMCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) error { acc, err := mustAccount(st, address) if err != nil { diff --git a/execution/native/account_test.go b/execution/native/account_test.go index afadba0c9..a800a5bcb 100644 --- a/execution/native/account_test.go +++ b/execution/native/account_test.go @@ -2,16 +2,19 @@ package native import ( "fmt" + "reflect" "testing" "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" - "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/evm/asm" + "github.com/hyperledger/burrow/execution/evm/asm/bc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tmthrgd/go-bitset" ) func TestState_CreateAccount(t *testing.T) { @@ -26,7 +29,7 @@ func TestState_CreateAccount(t *testing.T) { st = acmstate.NewMemoryState() err = CreateAccount(st, address) require.NoError(t, err) - err = InitCode(st, address, []byte{1, 2, 3}) + err = InitEVMCode(st, address, []byte{1, 2, 3}) require.NoError(t, err) } @@ -81,8 +84,43 @@ func TestState_NewCache(t *testing.T) { require.Equal(t, errors.Codes.IllegalWrite, errors.GetCode(err)) } -func blockHashGetter(height uint64) []byte { - return binary.LeftPadWord256([]byte(fmt.Sprintf("block_hash_%d", height))).Bytes() +func TestOpcodeBitset(t *testing.T) { + tests := []struct { + name string + code []byte + bitset bitset.Bitset + }{ + { + name: "Only one real JUMPDEST", + code: bc.MustSplice(asm.PUSH2, 1, asm.JUMPDEST, asm.ADD, asm.JUMPDEST), + bitset: mkBitset("10011"), + }, + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := opcodeBitset(tt.code); !reflect.DeepEqual(got, tt.bitset) { + t.Errorf("opcodeBitset() = %v, want %v", got, tt.bitset) + } + }) + } +} + +func mkBitset(binaryString string) bitset.Bitset { + length := uint(len(binaryString)) + bs := bitset.New(length) + for i := uint(0); i < length; i++ { + switch binaryString[i] { + case '1': + bs.Set(i) + case '0': + case ' ': + i++ + default: + panic(fmt.Errorf("mkBitset() expects a string containing only 1s, 0s, and spaces")) + } + } + return bs } func addToBalance(t testing.TB, st acmstate.ReaderWriter, address crypto.Address, amt uint64) { diff --git a/protobuf/acm.proto b/protobuf/acm.proto index cd3eac389..a32a98f4b 100644 --- a/protobuf/acm.proto +++ b/protobuf/acm.proto @@ -42,6 +42,8 @@ message Account { // (from Solidity/EVM), they point to the original deployed account where the metadata is stored. // This original account is called the forebear. bytes Forebear = 10 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"]; + // A bitset of all the symbols in Code that are opcodes (i.e. actual code not PUSH data) + bytes OpcodeBitset = 12 [(gogoproto.casttype) = "github.com/tmthrgd/go-bitset.Bitset"]; } message ContractMeta { From 97988c5629c3f4d8d35b80e57e7171e13a23c8c2 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 13 Apr 2020 18:05:39 +0100 Subject: [PATCH 092/185] Update Account model with OpcodeBitset. Also upgrade protobuf related dependencies and Perlin life go mod hack Signed-off-by: Silas Davis Signed-off-by: Dan --- acm/acm.pb.go | 129 +- go.mod | 12 +- go.sum | 31 +- js/proto/acm_pb.d.ts | 6 + js/proto/acm_pb.js | 192 +- js/proto/balance_pb.js | 29 +- js/proto/bcm_pb.js | 111 +- js/proto/crypto_pb.js | 92 +- js/proto/dump_pb.js | 169 +- js/proto/encoding_pb.js | 29 +- js/proto/errors_pb.js | 29 +- js/proto/exec_pb.js | 862 +++++--- .../gogo/protobuf/gogoproto/gogo_pb.js | 1 + .../tendermint/abci/types/types_pb.js | 1552 ++++++++----- .../tendermint/libs/common/types_pb.js | 57 +- js/proto/google/protobuf/descriptor_pb.js | 1912 +++++++++++------ js/proto/google/protobuf/timestamp_pb.js | 29 +- js/proto/keys_pb.js | 606 ++++-- js/proto/names_pb.js | 43 +- js/proto/payload_pb.js | 717 ++++--- js/proto/permission_pb.js | 154 +- js/proto/registry_pb.js | 43 +- js/proto/rpc_pb.js | 86 +- js/proto/rpcdump_pb.js | 22 +- js/proto/rpcevents_pb.js | 259 ++- js/proto/rpcquery_pb.js | 512 +++-- js/proto/rpctransact_pb.js | 104 +- js/proto/spec_pb.js | 86 +- js/proto/storage_pb.js | 29 +- js/proto/tendermint_pb.js | 71 +- js/proto/txs_pb.js | 128 +- js/proto/validator_pb.js | 39 +- 32 files changed, 5314 insertions(+), 2827 deletions(-) diff --git a/acm/acm.pb.go b/acm/acm.pb.go index 327221c1e..d8029fe34 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -16,6 +16,7 @@ import ( crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" permission "github.com/hyperledger/burrow/permission" + github_com_tmthrgd_go_bitset "github.com/tmthrgd/go-bitset" ) // Reference imports to suppress errors if they are not otherwise used. @@ -54,10 +55,12 @@ type Account struct { // The metadata is stored in the deployed account. When the deployed account creates new account // (from Solidity/EVM), they point to the original deployed account where the metadata is stored. // This original account is called the forebear. - Forebear *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,10,opt,name=Forebear,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Forebear,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Forebear *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,10,opt,name=Forebear,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Forebear,omitempty"` + // A bitset of all the symbols in Code that are opcodes (i.e. actual code not PUSH data) + OpcodeBitset github_com_tmthrgd_go_bitset.Bitset `protobuf:"bytes,12,opt,name=OpcodeBitset,proto3,casttype=github.com/tmthrgd/go-bitset.Bitset" json:"OpcodeBitset,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Account) Reset() { *m = Account{} } @@ -130,6 +133,13 @@ func (m *Account) GetContractMeta() []*ContractMeta { return nil } +func (m *Account) GetOpcodeBitset() github_com_tmthrgd_go_bitset.Bitset { + if m != nil { + return m.OpcodeBitset + } + return nil +} + func (*Account) XXX_MessageName() string { return "acm.Account" } @@ -194,39 +204,41 @@ func init() { proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } func init() { golang_proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } var fileDescriptor_49ed775bc0a6adf6 = []byte{ - // 506 bytes of a gzipped FileDescriptorProto + // 544 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x31, 0x6f, 0xd3, 0x40, - 0x18, 0xed, 0x35, 0x69, 0xe3, 0x5c, 0x22, 0x54, 0x6e, 0x3a, 0x65, 0x70, 0x4c, 0xa7, 0x08, 0x35, - 0x0e, 0x02, 0xb2, 0x84, 0x29, 0xae, 0xa8, 0x2a, 0x41, 0xa3, 0xe2, 0x4a, 0x45, 0xb0, 0x9d, 0xcf, - 0x1f, 0x89, 0xa5, 0xd8, 0x67, 0xce, 0x67, 0xc0, 0x3f, 0x81, 0x7f, 0xc0, 0xc8, 0x4f, 0x61, 0xcc, - 0xc8, 0x58, 0x31, 0x44, 0x28, 0xdd, 0xfa, 0x2b, 0x90, 0x2f, 0x8e, 0x71, 0x3a, 0x54, 0x82, 0x6e, - 0x79, 0x79, 0xef, 0x7b, 0xef, 0xdd, 0xdd, 0x67, 0xdc, 0x64, 0x3c, 0xb4, 0x63, 0x29, 0x94, 0x20, - 0x35, 0xc6, 0xc3, 0x4e, 0x7f, 0x1a, 0xa8, 0x59, 0xea, 0xd9, 0x5c, 0x84, 0x83, 0xa9, 0x98, 0x8a, - 0x81, 0xe6, 0xbc, 0xf4, 0x83, 0x46, 0x1a, 0xe8, 0x5f, 0xeb, 0x99, 0xce, 0x41, 0x0c, 0x32, 0x0c, - 0x92, 0x24, 0x10, 0x51, 0xf1, 0x4f, 0x9b, 0xcb, 0x2c, 0x56, 0x05, 0x7f, 0xf8, 0x75, 0x0f, 0x37, - 0xc6, 0x9c, 0x8b, 0x34, 0x52, 0x64, 0x82, 0x1b, 0x63, 0xdf, 0x97, 0x90, 0x24, 0x14, 0x59, 0xa8, - 0xd7, 0x76, 0x9e, 0x2f, 0x96, 0xdd, 0x9d, 0x5f, 0xcb, 0xee, 0x51, 0x25, 0x73, 0x96, 0xc5, 0x20, - 0xe7, 0xe0, 0x4f, 0x41, 0x0e, 0xbc, 0x54, 0x4a, 0xf1, 0x79, 0x50, 0x18, 0x16, 0xb3, 0xee, 0xc6, - 0x84, 0x0c, 0x71, 0xf3, 0x3c, 0xf5, 0xe6, 0x01, 0x7f, 0x05, 0x19, 0xdd, 0xb5, 0x50, 0xaf, 0xf5, - 0xf4, 0xa1, 0x5d, 0x88, 0x4b, 0xc2, 0xa9, 0xe7, 0x21, 0xee, 0x5f, 0x25, 0xe9, 0x60, 0xe3, 0x02, - 0x3e, 0xa6, 0x10, 0x71, 0xa0, 0x35, 0x0b, 0xf5, 0xea, 0x6e, 0x89, 0x09, 0xc5, 0x0d, 0x87, 0xcd, - 0x59, 0x4e, 0xd5, 0x35, 0xb5, 0x81, 0xe4, 0x31, 0x6e, 0xbc, 0xbc, 0x3c, 0x3b, 0x16, 0x3e, 0xd0, - 0x3d, 0x5d, 0xfe, 0xa0, 0x28, 0x6f, 0x38, 0x99, 0x02, 0x2e, 0x7c, 0x70, 0x37, 0x02, 0x72, 0x82, - 0x5b, 0xe7, 0xe5, 0xb5, 0x24, 0x74, 0x5f, 0x57, 0x33, 0xed, 0xca, 0x55, 0x15, 0x57, 0x52, 0x51, - 0x15, 0x3d, 0xab, 0x83, 0x64, 0x84, 0x8d, 0xb7, 0xe3, 0x8b, 0x75, 0x68, 0x43, 0x87, 0x9a, 0xb7, - 0x43, 0x6f, 0x96, 0x5d, 0x7c, 0x24, 0xc2, 0x40, 0x41, 0x18, 0xab, 0xcc, 0x2d, 0xf5, 0xc4, 0xc6, - 0x78, 0xc2, 0x54, 0xf0, 0x09, 0x26, 0x2c, 0x04, 0xda, 0xb2, 0x50, 0xaf, 0xe9, 0x3c, 0xb8, 0xa5, - 0xae, 0x28, 0xc8, 0x25, 0x36, 0xf2, 0xb9, 0x53, 0x96, 0xcc, 0xa8, 0xa1, 0xb3, 0x46, 0x45, 0x56, - 0xff, 0xee, 0xd7, 0xf1, 0x82, 0x88, 0xc9, 0xcc, 0x3e, 0x85, 0x2f, 0x79, 0xa7, 0xe4, 0x66, 0xd9, - 0x45, 0x7d, 0xb7, 0xf4, 0x22, 0x43, 0xdc, 0x3e, 0x16, 0x91, 0x92, 0x8c, 0xab, 0x33, 0x50, 0x8c, - 0x36, 0xad, 0x9a, 0x7e, 0xa7, 0x7c, 0xed, 0xaa, 0x84, 0xbb, 0x25, 0x23, 0xaf, 0xb1, 0x71, 0x22, - 0x24, 0x78, 0xc0, 0x24, 0xc5, 0xba, 0xce, 0x93, 0x7f, 0x5e, 0x94, 0xd2, 0x61, 0x54, 0xff, 0xf6, - 0xbd, 0xbb, 0x73, 0x78, 0x85, 0xb6, 0xbb, 0x90, 0x37, 0x95, 0x33, 0xaf, 0x37, 0x72, 0xf8, 0x5f, - 0x67, 0xae, 0x1c, 0xf7, 0x1d, 0x6e, 0xe7, 0xd6, 0x3e, 0x53, 0x4c, 0xdb, 0xee, 0xde, 0xc7, 0x76, - 0xcb, 0x2a, 0xdf, 0xdb, 0x0d, 0xd6, 0x7b, 0xdb, 0x74, 0x4b, 0xec, 0xbc, 0x58, 0xac, 0x4c, 0xf4, - 0x73, 0x65, 0xa2, 0xab, 0x95, 0x89, 0x7e, 0xaf, 0x4c, 0xf4, 0xe3, 0xda, 0x44, 0x8b, 0x6b, 0x13, - 0xbd, 0x7f, 0x74, 0x77, 0x24, 0xe3, 0xa1, 0xb7, 0xaf, 0x3f, 0xd5, 0x67, 0x7f, 0x02, 0x00, 0x00, - 0xff, 0xff, 0xa2, 0x2c, 0x48, 0xa4, 0x0b, 0x04, 0x00, 0x00, + 0x18, 0xed, 0x35, 0x69, 0xe3, 0x5c, 0x2c, 0x54, 0x6e, 0x3a, 0x65, 0xb0, 0x43, 0x19, 0x88, 0x50, + 0xe3, 0x20, 0x20, 0x4b, 0x98, 0xe2, 0x8a, 0xaa, 0x52, 0x69, 0x28, 0xae, 0x54, 0x04, 0xdb, 0xf9, + 0x7c, 0x38, 0x96, 0x62, 0x9f, 0x39, 0x9f, 0x01, 0xff, 0x13, 0x46, 0x7e, 0x0a, 0x63, 0x46, 0x26, + 0x54, 0x31, 0x58, 0x28, 0xdd, 0xfa, 0x13, 0x98, 0x90, 0x2f, 0x8e, 0x71, 0x3a, 0x54, 0x02, 0xb6, + 0x7c, 0x79, 0xef, 0x7b, 0xef, 0xf9, 0xdd, 0x1d, 0x6c, 0x13, 0x1a, 0x5a, 0xb1, 0xe0, 0x92, 0xa3, + 0x06, 0xa1, 0x61, 0x77, 0xe0, 0x07, 0x72, 0x96, 0xba, 0x16, 0xe5, 0xe1, 0xd0, 0xe7, 0x3e, 0x1f, + 0x2a, 0xcc, 0x4d, 0xdf, 0xa9, 0x49, 0x0d, 0xea, 0xd7, 0x6a, 0xa7, 0xbb, 0x17, 0x33, 0x11, 0x06, + 0x49, 0x12, 0xf0, 0xa8, 0xfc, 0x47, 0xa7, 0x22, 0x8b, 0x65, 0x89, 0xef, 0x7f, 0xdf, 0x81, 0xad, + 0x09, 0xa5, 0x3c, 0x8d, 0x24, 0x9a, 0xc2, 0xd6, 0xc4, 0xf3, 0x04, 0x4b, 0x12, 0x0c, 0x7a, 0xa0, + 0xaf, 0xdb, 0x4f, 0x17, 0xb9, 0xb9, 0xf5, 0x23, 0x37, 0x0f, 0x6a, 0x9e, 0xb3, 0x2c, 0x66, 0x62, + 0xce, 0x3c, 0x9f, 0x89, 0xa1, 0x9b, 0x0a, 0xc1, 0x3f, 0x0e, 0x4b, 0xc1, 0x72, 0xd7, 0x59, 0x8b, + 0xa0, 0x11, 0x6c, 0x9f, 0xa5, 0xee, 0x3c, 0xa0, 0x27, 0x2c, 0xc3, 0xdb, 0x3d, 0xd0, 0xef, 0x3c, + 0xbe, 0x6b, 0x95, 0xe4, 0x0a, 0xb0, 0x9b, 0x85, 0x89, 0xf3, 0x87, 0x89, 0xba, 0x50, 0x3b, 0x67, + 0xef, 0x53, 0x16, 0x51, 0x86, 0x1b, 0x3d, 0xd0, 0x6f, 0x3a, 0xd5, 0x8c, 0x30, 0x6c, 0xd9, 0x64, + 0x4e, 0x0a, 0xa8, 0xa9, 0xa0, 0xf5, 0x88, 0x1e, 0xc2, 0xd6, 0xf3, 0x8b, 0xd3, 0x43, 0xee, 0x31, + 0xbc, 0xa3, 0xc2, 0xef, 0x95, 0xe1, 0x35, 0x3b, 0x93, 0x8c, 0x72, 0x8f, 0x39, 0x6b, 0x02, 0x3a, + 0x82, 0x9d, 0xb3, 0xaa, 0x96, 0x04, 0xef, 0xaa, 0x68, 0x86, 0x55, 0xab, 0xaa, 0xac, 0xa4, 0xc6, + 0x2a, 0x73, 0xd6, 0x17, 0xd1, 0x18, 0x6a, 0xaf, 0x27, 0xe7, 0x2b, 0xd3, 0x96, 0x32, 0x35, 0x6e, + 0x9a, 0x5e, 0xe7, 0x26, 0x3c, 0xe0, 0x61, 0x20, 0x59, 0x18, 0xcb, 0xcc, 0xa9, 0xf8, 0xc8, 0x82, + 0x70, 0x4a, 0x64, 0xf0, 0x81, 0x4d, 0x49, 0xc8, 0x70, 0xa7, 0x07, 0xfa, 0x6d, 0xfb, 0xce, 0x0d, + 0x76, 0x8d, 0x81, 0x2e, 0xa0, 0x56, 0xec, 0x1d, 0x93, 0x64, 0x86, 0x35, 0xe5, 0x35, 0x2e, 0xbd, + 0x06, 0xb7, 0x9f, 0x8e, 0x1b, 0x44, 0x44, 0x64, 0xd6, 0x31, 0xfb, 0x54, 0x64, 0x4a, 0xae, 0x73, + 0x13, 0x0c, 0x9c, 0x4a, 0x0b, 0x8d, 0xa0, 0x7e, 0xc8, 0x23, 0x29, 0x08, 0x95, 0xa7, 0x4c, 0x12, + 0xdc, 0xee, 0x35, 0xd4, 0x39, 0x15, 0xd7, 0xae, 0x0e, 0x38, 0x1b, 0x34, 0xf4, 0x02, 0x6a, 0x47, + 0x5c, 0x30, 0x97, 0x11, 0x81, 0xa1, 0x8a, 0xf3, 0xe8, 0xaf, 0x2f, 0x4a, 0xa5, 0x80, 0x4e, 0xa0, + 0xfe, 0x32, 0x2e, 0xea, 0xb2, 0x03, 0x99, 0x30, 0x89, 0x75, 0xa5, 0xf8, 0xe0, 0x57, 0x6e, 0xde, + 0xaf, 0x29, 0xca, 0x50, 0xce, 0x84, 0xef, 0x0d, 0x7d, 0x3e, 0x70, 0x15, 0xcf, 0x5a, 0xd1, 0x9d, + 0x8d, 0xe5, 0x71, 0xf3, 0xf3, 0x17, 0x73, 0x6b, 0xff, 0x12, 0x6c, 0x7e, 0x18, 0x7a, 0x55, 0x2b, + 0x70, 0x75, 0xbd, 0x47, 0xff, 0x54, 0x60, 0xad, 0xbb, 0x37, 0x50, 0x2f, 0xa4, 0x3d, 0x22, 0x89, + 0x92, 0xdd, 0xfe, 0x1f, 0xd9, 0x0d, 0xa9, 0xe2, 0x11, 0xac, 0x67, 0xf5, 0x08, 0xda, 0x4e, 0x35, + 0xdb, 0xcf, 0x16, 0x4b, 0x03, 0x7c, 0x5b, 0x1a, 0xe0, 0x72, 0x69, 0x80, 0x9f, 0x4b, 0x03, 0x7c, + 0xbd, 0x32, 0xc0, 0xe2, 0xca, 0x00, 0x6f, 0xef, 0xdd, 0x6e, 0x49, 0x68, 0xe8, 0xee, 0xaa, 0x77, + 0xff, 0xe4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x9e, 0x43, 0x9f, 0x58, 0x04, 0x00, 0x00, } func (m *Account) Marshal() (dAtA []byte, err error) { @@ -253,6 +265,13 @@ func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.OpcodeBitset) > 0 { + i -= len(m.OpcodeBitset) + copy(dAtA[i:], m.OpcodeBitset) + i = encodeVarintAcm(dAtA, i, uint64(len(m.OpcodeBitset))) + i-- + dAtA[i] = 0x62 + } if len(m.NativeName) > 0 { i -= len(m.NativeName) copy(dAtA[i:], m.NativeName) @@ -462,6 +481,10 @@ func (m *Account) Size() (n int) { if l > 0 { n += 1 + l + sovAcm(uint64(l)) } + l = len(m.OpcodeBitset) + if l > 0 { + n += 1 + l + sovAcm(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -860,6 +883,40 @@ func (m *Account) Unmarshal(dAtA []byte) error { } m.NativeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OpcodeBitset", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAcm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAcm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthAcm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OpcodeBitset = append(m.OpcodeBitset[:0], dAtA[iNdEx:postIndex]...) + if m.OpcodeBitset == nil { + m.OpcodeBitset = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAcm(dAtA[iNdEx:]) diff --git a/go.mod b/go.mod index 8a85db160..191f9814c 100644 --- a/go.mod +++ b/go.mod @@ -2,10 +2,6 @@ module github.com/hyperledger/burrow go 1.12 -// replace github.com/perlin-network/life => github.com/silasdavis/life master -// Avoid downstream pain due to unversioned go-wagon dep: -replace github.com/perlin-network/life => github.com/silasdavis/life v0.0.0-20191009191257-e9c2a5fdbc96 - require ( github.com/BurntSushi/toml v0.3.1 github.com/OneOfOne/xxhash v1.2.5 @@ -33,7 +29,7 @@ require ( github.com/mattn/go-colorable v0.1.2 // indirect github.com/mattn/go-sqlite3 v1.10.0 github.com/monax/relic v2.0.0+incompatible - github.com/perlin-network/life v0.0.0-20190803100833-89b850c02992 + github.com/perlin-network/life v0.0.0-20191203030451-05c0e0f7eaea github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v0.9.3 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 @@ -49,7 +45,13 @@ require ( github.com/tendermint/tendermint v0.33.1 github.com/tendermint/tm-db v0.4.0 github.com/test-go/testify v1.1.4 + github.com/tmthrgd/atomics v0.0.0-20190904060638-dc7a5fcc7e0d // indirect + github.com/tmthrgd/go-bitset v0.0.0-20190904054048-394d9a556c05 + github.com/tmthrgd/go-bitwise v0.0.0-20190904053232-1430ee983fca // indirect + github.com/tmthrgd/go-byte-test v0.0.0-20190904060354-2794345b9929 // indirect github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 + github.com/tmthrgd/go-memset v0.0.0-20190904060434-6fb7a21f88f1 // indirect + github.com/tmthrgd/go-popcount v0.0.0-20190904054823-afb1ace8b04f // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.1.0 diff --git a/go.sum b/go.sum index c341c35c5..5db305adf 100644 --- a/go.sum +++ b/go.sum @@ -79,8 +79,8 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-interpreter/wagon v0.6.1-0.20190923081222-01d3d3376951 h1:2zNSjTofVE4/LGSaJpKB4oYGD5nZsEUdRXzFaFykJzI= -github.com/go-interpreter/wagon v0.6.1-0.20190923081222-01d3d3376951/go.mod h1:5+b/MBYkclRZngKF5s6qrgWxSLgE9F5dFdO1hAueZLc= +github.com/go-interpreter/wagon v0.6.0 h1:BBxDxjiJiHgw9EdkYXAWs8NHhwnazZ5P2EWBW5hFNWw= +github.com/go-interpreter/wagon v0.6.0/go.mod h1:5+b/MBYkclRZngKF5s6qrgWxSLgE9F5dFdO1hAueZLc= 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= @@ -197,6 +197,8 @@ github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/perlin-network/life v0.0.0-20191203030451-05c0e0f7eaea h1:okKoivlkNRRLqXraEtatHfEhW+D71QTwkaj+4n4M2Xc= +github.com/perlin-network/life v0.0.0-20191203030451-05c0e0f7eaea/go.mod h1:3KEU5Dm8MAYWZqity880wOFJ9PhQjyKVZGwAEfc5Q4E= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -225,8 +227,6 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= 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/silasdavis/life v0.0.0-20191009191257-e9c2a5fdbc96 h1:h+9noX9J+uzeBNUUc0tQcEHyvt4SreDTyZMdBIHE5ac= -github.com/silasdavis/life v0.0.0-20191009191257-e9c2a5fdbc96/go.mod h1:kRj+/HyxhCbkocbIvcK9ikQR/OQzi43RdJ0zWv0hhE8= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -278,8 +278,20 @@ github.com/tendermint/tm-db v0.4.0/go.mod h1:+Cwhgowrf7NBGXmsqFMbwEtbo80XmyrlY5J github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmthrgd/atomics v0.0.0-20190904060638-dc7a5fcc7e0d h1:2QXSQjy/gDm0QeP9G9NaO9Hm2Cl1LAle4ZV0JeYK7XY= +github.com/tmthrgd/atomics v0.0.0-20190904060638-dc7a5fcc7e0d/go.mod h1:J2+dTgaX/1g3PkyL6sLBglBWfaLmAp5bQbRhSfKw9XI= +github.com/tmthrgd/go-bitset v0.0.0-20190904054048-394d9a556c05 h1:5jOF3BEex8XyBKMbaDUN1SiPQJRAKVuP24/sbwC2aWA= +github.com/tmthrgd/go-bitset v0.0.0-20190904054048-394d9a556c05/go.mod h1:SooM96OIpihI7iMZhVGbpiiO9Qevqv8vXxHlwNtefd4= +github.com/tmthrgd/go-bitwise v0.0.0-20190904053232-1430ee983fca h1:Ns4/7EvYZ7FxKiKnEMkMMAPtoR/ifUgRsvk7lzlOtPY= +github.com/tmthrgd/go-bitwise v0.0.0-20190904053232-1430ee983fca/go.mod h1:Ba4ek/h+sJUzTQ03ZGD1r0lazhxd7CBoEQzFk/icxxU= +github.com/tmthrgd/go-byte-test v0.0.0-20190904060354-2794345b9929 h1:EV5x10oS2/QrR1RwniFQW1i22d/iyX/emvvMjHT32CA= +github.com/tmthrgd/go-byte-test v0.0.0-20190904060354-2794345b9929/go.mod h1:MEz1Lt0fxSL/ZgE7VN3yUJV0sP5I5aYecYLd9y/viEs= github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 h1:IlK6taZBmMKDcGfMqIlD4la5BlekNrrLsdtCMSn6aJI= github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= +github.com/tmthrgd/go-memset v0.0.0-20190904060434-6fb7a21f88f1 h1:KfSLDmc6rrLHr//urKbNApu51nt2AzdrwBCxqq0gRlk= +github.com/tmthrgd/go-memset v0.0.0-20190904060434-6fb7a21f88f1/go.mod h1:xUkvcKF3VBDKFmmqCtW333lognWBHzSScj4fgjVB0Ek= +github.com/tmthrgd/go-popcount v0.0.0-20190904054823-afb1ace8b04f h1:Phf2p9+twoHct5ZjSTrI8K7iWeSxO4x1p5pShTl0J00= +github.com/tmthrgd/go-popcount v0.0.0-20190904054823-afb1ace8b04f/go.mod h1:FcUQfrsAsSSqM3n9xf4EtPzB8tWzt58/y0AV+wNNM8Q= github.com/twitchyliquid64/golang-asm v0.0.0-20190126203739-365674df15fc h1:RTUQlKzoZZVG3umWNzOYeFecQLIh+dbxXvJp1zPQJTI= github.com/twitchyliquid64/golang-asm v0.0.0-20190126203739-365674df15fc/go.mod h1:NoCfSFWosfqMqmmD7hApkirIK9ozpHjxRnRxs1l413A= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= @@ -319,7 +331,6 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/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-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -341,9 +352,8 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190825160603-fb81701db80f h1:LCxigP8q3fPRGNVYndYsyHnF0zRrvcoVwZMfb8iQZe4= golang.org/x/sys v0.0.0-20190825160603-fb81701db80f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -355,9 +365,10 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.0 h1:Tfd7cKwKbFRsI8RMAD3oqqw7JPFRrvFlOsfbgVkjOOw= +google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= @@ -373,8 +384,6 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= diff --git a/js/proto/acm_pb.d.ts b/js/proto/acm_pb.d.ts index c5dff84aa..d127e65be 100644 --- a/js/proto/acm_pb.d.ts +++ b/js/proto/acm_pb.d.ts @@ -56,6 +56,11 @@ export class Account extends jspb.Message { getForebear_asB64(): string; setForebear(value: Uint8Array | string): void; + getOpcodebitset(): Uint8Array | string; + getOpcodebitset_asU8(): Uint8Array; + getOpcodebitset_asB64(): string; + setOpcodebitset(value: Uint8Array | string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Account.AsObject; static toObject(includeInstance: boolean, msg: Account): Account.AsObject; @@ -79,6 +84,7 @@ export namespace Account { codehash: Uint8Array | string, contractmetaList: Array, forebear: Uint8Array | string, + opcodebitset: Uint8Array | string, } } diff --git a/js/proto/acm_pb.js b/js/proto/acm_pb.js index d68eb3976..828758869 100644 --- a/js/proto/acm_pb.js +++ b/js/proto/acm_pb.js @@ -1,3 +1,4 @@ +// source: acm.proto /** * @fileoverview * @enhanceable @@ -73,13 +74,15 @@ proto.acm.Account.repeatedFields_ = [9]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.acm.Account.prototype.toObject = function(opt_includeInstance) { @@ -89,8 +92,8 @@ proto.acm.Account.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.acm.Account} msg The msg instance to transform. * @return {!Object} @@ -109,7 +112,8 @@ proto.acm.Account.toObject = function(includeInstance, msg) { codehash: msg.getCodehash_asB64(), contractmetaList: jspb.Message.toObjectList(msg.getContractmetaList(), proto.acm.ContractMeta.toObject, includeInstance), - forebear: msg.getForebear_asB64() + forebear: msg.getForebear_asB64(), + opcodebitset: msg.getOpcodebitset_asB64() }; if (includeInstance) { @@ -193,6 +197,10 @@ proto.acm.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setForebear(value); break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpcodebitset(value); + break; default: reader.skipField(); break; @@ -302,6 +310,13 @@ proto.acm.Account.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getOpcodebitset_asU8(); + if (f.length > 0) { + writer.writeBytes( + 12, + f + ); + } }; @@ -338,9 +353,12 @@ proto.acm.Account.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -354,17 +372,21 @@ proto.acm.Account.prototype.getPublickey = function() { }; -/** @param {?proto.crypto.PublicKey|undefined} value */ +/** + * @param {?proto.crypto.PublicKey|undefined} value + * @return {!proto.acm.Account} returns this +*/ proto.acm.Account.prototype.setPublickey = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.acm.Account} returns this */ proto.acm.Account.prototype.clearPublickey = function() { - this.setPublickey(undefined); + return this.setPublickey(undefined); }; @@ -386,9 +408,12 @@ proto.acm.Account.prototype.getSequence = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setSequence = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -401,9 +426,12 @@ proto.acm.Account.prototype.getBalance = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setBalance = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -440,9 +468,12 @@ proto.acm.Account.prototype.getEvmcode_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setEvmcode = function(value) { - jspb.Message.setProto3BytesField(this, 5, value); + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -456,17 +487,21 @@ proto.acm.Account.prototype.getPermissions = function() { }; -/** @param {?proto.permission.AccountPermissions|undefined} value */ +/** + * @param {?proto.permission.AccountPermissions|undefined} value + * @return {!proto.acm.Account} returns this +*/ proto.acm.Account.prototype.setPermissions = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.acm.Account} returns this */ proto.acm.Account.prototype.clearPermissions = function() { - this.setPermissions(undefined); + return this.setPermissions(undefined); }; @@ -512,9 +547,12 @@ proto.acm.Account.prototype.getWasmcode_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setWasmcode = function(value) { - jspb.Message.setProto3BytesField(this, 7, value); + return jspb.Message.setProto3BytesField(this, 7, value); }; @@ -527,9 +565,12 @@ proto.acm.Account.prototype.getNativename = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setNativename = function(value) { - jspb.Message.setProto3StringField(this, 11, value); + return jspb.Message.setProto3StringField(this, 11, value); }; @@ -566,9 +607,12 @@ proto.acm.Account.prototype.getCodehash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setCodehash = function(value) { - jspb.Message.setProto3BytesField(this, 8, value); + return jspb.Message.setProto3BytesField(this, 8, value); }; @@ -582,9 +626,12 @@ proto.acm.Account.prototype.getContractmetaList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.acm.Account} returns this +*/ proto.acm.Account.prototype.setContractmetaList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 9, value); + return jspb.Message.setRepeatedWrapperField(this, 9, value); }; @@ -600,9 +647,10 @@ proto.acm.Account.prototype.addContractmeta = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.acm.Account} returns this */ proto.acm.Account.prototype.clearContractmetaList = function() { - this.setContractmetaList([]); + return this.setContractmetaList([]); }; @@ -639,9 +687,54 @@ proto.acm.Account.prototype.getForebear_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setForebear = function(value) { - jspb.Message.setProto3BytesField(this, 10, value); + return jspb.Message.setProto3BytesField(this, 10, value); +}; + + +/** + * optional bytes OpcodeBitset = 12; + * @return {!(string|Uint8Array)} + */ +proto.acm.Account.prototype.getOpcodebitset = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes OpcodeBitset = 12; + * This is a type-conversion wrapper around `getOpcodebitset()` + * @return {string} + */ +proto.acm.Account.prototype.getOpcodebitset_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpcodebitset())); +}; + + +/** + * optional bytes OpcodeBitset = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOpcodebitset()` + * @return {!Uint8Array} + */ +proto.acm.Account.prototype.getOpcodebitset_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpcodebitset())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ +proto.acm.Account.prototype.setOpcodebitset = function(value) { + return jspb.Message.setProto3BytesField(this, 12, value); }; @@ -650,13 +743,15 @@ proto.acm.Account.prototype.setForebear = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.acm.ContractMeta.prototype.toObject = function(opt_includeInstance) { @@ -666,8 +761,8 @@ proto.acm.ContractMeta.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.acm.ContractMeta} msg The msg instance to transform. * @return {!Object} @@ -812,9 +907,12 @@ proto.acm.ContractMeta.prototype.getCodehash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.ContractMeta} returns this + */ proto.acm.ContractMeta.prototype.setCodehash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -851,9 +949,12 @@ proto.acm.ContractMeta.prototype.getMetadatahash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.ContractMeta} returns this + */ proto.acm.ContractMeta.prototype.setMetadatahash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -866,9 +967,12 @@ proto.acm.ContractMeta.prototype.getMetadata = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.acm.ContractMeta} returns this + */ proto.acm.ContractMeta.prototype.setMetadata = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; diff --git a/js/proto/balance_pb.js b/js/proto/balance_pb.js index f2cefffe7..f481d2879 100644 --- a/js/proto/balance_pb.js +++ b/js/proto/balance_pb.js @@ -1,3 +1,4 @@ +// source: balance.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.balance.Balance.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.balance.Balance.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.balance.Balance} msg The msg instance to transform. * @return {!Object} @@ -166,9 +169,12 @@ proto.balance.Balance.prototype.getType = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.balance.Balance} returns this + */ proto.balance.Balance.prototype.setType = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -181,9 +187,12 @@ proto.balance.Balance.prototype.getAmount = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.balance.Balance} returns this + */ proto.balance.Balance.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/bcm_pb.js b/js/proto/bcm_pb.js index 277fc2cb7..72f289e01 100644 --- a/js/proto/bcm_pb.js +++ b/js/proto/bcm_pb.js @@ -1,3 +1,4 @@ +// source: bcm.proto /** * @fileoverview * @enhanceable @@ -66,13 +67,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.bcm.SyncInfo.prototype.toObject = function(opt_includeInstance) { @@ -82,8 +85,8 @@ proto.bcm.SyncInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.bcm.SyncInfo} msg The msg instance to transform. * @return {!Object} @@ -246,9 +249,12 @@ proto.bcm.SyncInfo.prototype.getLatestblockheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.bcm.SyncInfo} returns this + */ proto.bcm.SyncInfo.prototype.setLatestblockheight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -285,9 +291,12 @@ proto.bcm.SyncInfo.prototype.getLatestblockhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bcm.SyncInfo} returns this + */ proto.bcm.SyncInfo.prototype.setLatestblockhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -324,9 +333,12 @@ proto.bcm.SyncInfo.prototype.getLatestapphash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bcm.SyncInfo} returns this + */ proto.bcm.SyncInfo.prototype.setLatestapphash = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -340,17 +352,21 @@ proto.bcm.SyncInfo.prototype.getLatestblocktime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.bcm.SyncInfo} returns this +*/ proto.bcm.SyncInfo.prototype.setLatestblocktime = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.bcm.SyncInfo} returns this */ proto.bcm.SyncInfo.prototype.clearLatestblocktime = function() { - this.setLatestblocktime(undefined); + return this.setLatestblocktime(undefined); }; @@ -373,17 +389,21 @@ proto.bcm.SyncInfo.prototype.getLatestblockseentime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.bcm.SyncInfo} returns this +*/ proto.bcm.SyncInfo.prototype.setLatestblockseentime = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.bcm.SyncInfo} returns this */ proto.bcm.SyncInfo.prototype.clearLatestblockseentime = function() { - this.setLatestblockseentime(undefined); + return this.setLatestblockseentime(undefined); }; @@ -406,17 +426,21 @@ proto.bcm.SyncInfo.prototype.getLatestblockduration = function() { }; -/** @param {?proto.google.protobuf.Duration|undefined} value */ +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.bcm.SyncInfo} returns this +*/ proto.bcm.SyncInfo.prototype.setLatestblockduration = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.bcm.SyncInfo} returns this */ proto.bcm.SyncInfo.prototype.clearLatestblockduration = function() { - this.setLatestblockduration(undefined); + return this.setLatestblockduration(undefined); }; @@ -434,13 +458,15 @@ proto.bcm.SyncInfo.prototype.hasLatestblockduration = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.bcm.PersistedState.prototype.toObject = function(opt_includeInstance) { @@ -450,8 +476,8 @@ proto.bcm.PersistedState.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.bcm.PersistedState} msg The msg instance to transform. * @return {!Object} @@ -610,9 +636,12 @@ proto.bcm.PersistedState.prototype.getApphashafterlastblock_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bcm.PersistedState} returns this + */ proto.bcm.PersistedState.prototype.setApphashafterlastblock = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -626,17 +655,21 @@ proto.bcm.PersistedState.prototype.getLastblocktime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.bcm.PersistedState} returns this +*/ proto.bcm.PersistedState.prototype.setLastblocktime = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.bcm.PersistedState} returns this */ proto.bcm.PersistedState.prototype.clearLastblocktime = function() { - this.setLastblocktime(undefined); + return this.setLastblocktime(undefined); }; @@ -658,9 +691,12 @@ proto.bcm.PersistedState.prototype.getLastblockheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.bcm.PersistedState} returns this + */ proto.bcm.PersistedState.prototype.setLastblockheight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -697,9 +733,12 @@ proto.bcm.PersistedState.prototype.getGenesishash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bcm.PersistedState} returns this + */ proto.bcm.PersistedState.prototype.setGenesishash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; diff --git a/js/proto/crypto_pb.js b/js/proto/crypto_pb.js index 9aa32a492..155be7b62 100644 --- a/js/proto/crypto_pb.js +++ b/js/proto/crypto_pb.js @@ -1,3 +1,4 @@ +// source: crypto.proto /** * @fileoverview * @enhanceable @@ -84,13 +85,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.crypto.PublicKey.prototype.toObject = function(opt_includeInstance) { @@ -100,8 +103,8 @@ proto.crypto.PublicKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.crypto.PublicKey} msg The msg instance to transform. * @return {!Object} @@ -210,9 +213,12 @@ proto.crypto.PublicKey.prototype.getCurvetype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.crypto.PublicKey} returns this + */ proto.crypto.PublicKey.prototype.setCurvetype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -249,9 +255,12 @@ proto.crypto.PublicKey.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.crypto.PublicKey} returns this + */ proto.crypto.PublicKey.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -260,13 +269,15 @@ proto.crypto.PublicKey.prototype.setPublickey = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.crypto.PrivateKey.prototype.toObject = function(opt_includeInstance) { @@ -276,8 +287,8 @@ proto.crypto.PrivateKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.crypto.PrivateKey} msg The msg instance to transform. * @return {!Object} @@ -398,9 +409,12 @@ proto.crypto.PrivateKey.prototype.getCurvetype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.crypto.PrivateKey} returns this + */ proto.crypto.PrivateKey.prototype.setCurvetype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -437,9 +451,12 @@ proto.crypto.PrivateKey.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.crypto.PrivateKey} returns this + */ proto.crypto.PrivateKey.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -476,9 +493,12 @@ proto.crypto.PrivateKey.prototype.getPrivatekey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.crypto.PrivateKey} returns this + */ proto.crypto.PrivateKey.prototype.setPrivatekey = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -487,13 +507,15 @@ proto.crypto.PrivateKey.prototype.setPrivatekey = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.crypto.Signature.prototype.toObject = function(opt_includeInstance) { @@ -503,8 +525,8 @@ proto.crypto.Signature.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.crypto.Signature} msg The msg instance to transform. * @return {!Object} @@ -613,9 +635,12 @@ proto.crypto.Signature.prototype.getCurvetype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.crypto.Signature} returns this + */ proto.crypto.Signature.prototype.setCurvetype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -652,9 +677,12 @@ proto.crypto.Signature.prototype.getSignature_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.crypto.Signature} returns this + */ proto.crypto.Signature.prototype.setSignature = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; diff --git a/js/proto/dump_pb.js b/js/proto/dump_pb.js index 88a222784..d6e44578e 100644 --- a/js/proto/dump_pb.js +++ b/js/proto/dump_pb.js @@ -1,3 +1,4 @@ +// source: dump.proto /** * @fileoverview * @enhanceable @@ -114,13 +115,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.dump.Storage.prototype.toObject = function(opt_includeInstance) { @@ -130,8 +133,8 @@ proto.dump.Storage.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.Storage} msg The msg instance to transform. * @return {!Object} @@ -264,9 +267,12 @@ proto.dump.Storage.prototype.getKey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.dump.Storage} returns this + */ proto.dump.Storage.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -303,9 +309,12 @@ proto.dump.Storage.prototype.getValue_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.dump.Storage} returns this + */ proto.dump.Storage.prototype.setValue = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -321,13 +330,15 @@ proto.dump.AccountStorage.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.dump.AccountStorage.prototype.toObject = function(opt_includeInstance) { @@ -337,8 +348,8 @@ proto.dump.AccountStorage.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.AccountStorage} msg The msg instance to transform. * @return {!Object} @@ -474,9 +485,12 @@ proto.dump.AccountStorage.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.dump.AccountStorage} returns this + */ proto.dump.AccountStorage.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -490,9 +504,12 @@ proto.dump.AccountStorage.prototype.getStorageList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.dump.AccountStorage} returns this +*/ proto.dump.AccountStorage.prototype.setStorageList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -508,9 +525,10 @@ proto.dump.AccountStorage.prototype.addStorage = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.dump.AccountStorage} returns this */ proto.dump.AccountStorage.prototype.clearStorageList = function() { - this.setStorageList([]); + return this.setStorageList([]); }; @@ -519,13 +537,15 @@ proto.dump.AccountStorage.prototype.clearStorageList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.dump.EVMEvent.prototype.toObject = function(opt_includeInstance) { @@ -535,8 +555,8 @@ proto.dump.EVMEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.EVMEvent} msg The msg instance to transform. * @return {!Object} @@ -673,9 +693,12 @@ proto.dump.EVMEvent.prototype.getChainid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.dump.EVMEvent} returns this + */ proto.dump.EVMEvent.prototype.setChainid = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -688,9 +711,12 @@ proto.dump.EVMEvent.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.dump.EVMEvent} returns this + */ proto.dump.EVMEvent.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -704,17 +730,21 @@ proto.dump.EVMEvent.prototype.getTime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.dump.EVMEvent} returns this +*/ proto.dump.EVMEvent.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.dump.EVMEvent} returns this */ proto.dump.EVMEvent.prototype.clearTime = function() { - this.setTime(undefined); + return this.setTime(undefined); }; @@ -737,17 +767,21 @@ proto.dump.EVMEvent.prototype.getEvent = function() { }; -/** @param {?proto.exec.LogEvent|undefined} value */ +/** + * @param {?proto.exec.LogEvent|undefined} value + * @return {!proto.dump.EVMEvent} returns this +*/ proto.dump.EVMEvent.prototype.setEvent = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.dump.EVMEvent} returns this */ proto.dump.EVMEvent.prototype.clearEvent = function() { - this.setEvent(undefined); + return this.setEvent(undefined); }; @@ -765,13 +799,15 @@ proto.dump.EVMEvent.prototype.hasEvent = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.dump.Dump.prototype.toObject = function(opt_includeInstance) { @@ -781,8 +817,8 @@ proto.dump.Dump.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.Dump} msg The msg instance to transform. * @return {!Object} @@ -935,9 +971,12 @@ proto.dump.Dump.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.dump.Dump} returns this + */ proto.dump.Dump.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -951,17 +990,21 @@ proto.dump.Dump.prototype.getAccount = function() { }; -/** @param {?proto.acm.Account|undefined} value */ +/** + * @param {?proto.acm.Account|undefined} value + * @return {!proto.dump.Dump} returns this +*/ proto.dump.Dump.prototype.setAccount = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.dump.Dump} returns this */ proto.dump.Dump.prototype.clearAccount = function() { - this.setAccount(undefined); + return this.setAccount(undefined); }; @@ -984,17 +1027,21 @@ proto.dump.Dump.prototype.getAccountstorage = function() { }; -/** @param {?proto.dump.AccountStorage|undefined} value */ +/** + * @param {?proto.dump.AccountStorage|undefined} value + * @return {!proto.dump.Dump} returns this +*/ proto.dump.Dump.prototype.setAccountstorage = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.dump.Dump} returns this */ proto.dump.Dump.prototype.clearAccountstorage = function() { - this.setAccountstorage(undefined); + return this.setAccountstorage(undefined); }; @@ -1017,17 +1064,21 @@ proto.dump.Dump.prototype.getEvmevent = function() { }; -/** @param {?proto.dump.EVMEvent|undefined} value */ +/** + * @param {?proto.dump.EVMEvent|undefined} value + * @return {!proto.dump.Dump} returns this +*/ proto.dump.Dump.prototype.setEvmevent = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.dump.Dump} returns this */ proto.dump.Dump.prototype.clearEvmevent = function() { - this.setEvmevent(undefined); + return this.setEvmevent(undefined); }; @@ -1050,17 +1101,21 @@ proto.dump.Dump.prototype.getName = function() { }; -/** @param {?proto.names.Entry|undefined} value */ +/** + * @param {?proto.names.Entry|undefined} value + * @return {!proto.dump.Dump} returns this +*/ proto.dump.Dump.prototype.setName = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.dump.Dump} returns this */ proto.dump.Dump.prototype.clearName = function() { - this.setName(undefined); + return this.setName(undefined); }; diff --git a/js/proto/encoding_pb.js b/js/proto/encoding_pb.js index 17cbf7f21..67f663183 100644 --- a/js/proto/encoding_pb.js +++ b/js/proto/encoding_pb.js @@ -1,3 +1,4 @@ +// source: encoding.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.encoding.TestMessage.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.encoding.TestMessage.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.encoding.TestMessage} msg The msg instance to transform. * @return {!Object} @@ -166,9 +169,12 @@ proto.encoding.TestMessage.prototype.getType = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.encoding.TestMessage} returns this + */ proto.encoding.TestMessage.prototype.setType = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -181,9 +187,12 @@ proto.encoding.TestMessage.prototype.getAmount = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.encoding.TestMessage} returns this + */ proto.encoding.TestMessage.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/errors_pb.js b/js/proto/errors_pb.js index f2d51ba54..6a752960b 100644 --- a/js/proto/errors_pb.js +++ b/js/proto/errors_pb.js @@ -1,3 +1,4 @@ +// source: errors.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.errors.Exception.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.errors.Exception.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.errors.Exception} msg The msg instance to transform. * @return {!Object} @@ -166,9 +169,12 @@ proto.errors.Exception.prototype.getCode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.errors.Exception} returns this + */ proto.errors.Exception.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -181,9 +187,12 @@ proto.errors.Exception.prototype.getException = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.errors.Exception} returns this + */ proto.errors.Exception.prototype.setException = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; diff --git a/js/proto/exec_pb.js b/js/proto/exec_pb.js index 1240d06e7..213276abb 100644 --- a/js/proto/exec_pb.js +++ b/js/proto/exec_pb.js @@ -1,3 +1,4 @@ +// source: exec.proto /** * @fileoverview * @enhanceable @@ -479,13 +480,15 @@ proto.exec.StreamEvents.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.StreamEvents.prototype.toObject = function(opt_includeInstance) { @@ -495,8 +498,8 @@ proto.exec.StreamEvents.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.StreamEvents} msg The msg instance to transform. * @return {!Object} @@ -597,9 +600,12 @@ proto.exec.StreamEvents.prototype.getStreameventsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.exec.StreamEvents} returns this +*/ proto.exec.StreamEvents.prototype.setStreameventsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -615,9 +621,10 @@ proto.exec.StreamEvents.prototype.addStreamevents = function(opt_value, opt_inde /** * Clears the list making it empty but non-null. + * @return {!proto.exec.StreamEvents} returns this */ proto.exec.StreamEvents.prototype.clearStreameventsList = function() { - this.setStreameventsList([]); + return this.setStreameventsList([]); }; @@ -626,13 +633,15 @@ proto.exec.StreamEvents.prototype.clearStreameventsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.StreamEvent.prototype.toObject = function(opt_includeInstance) { @@ -642,8 +651,8 @@ proto.exec.StreamEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.StreamEvent} msg The msg instance to transform. * @return {!Object} @@ -813,17 +822,21 @@ proto.exec.StreamEvent.prototype.getBeginblock = function() { }; -/** @param {?proto.exec.BeginBlock|undefined} value */ +/** + * @param {?proto.exec.BeginBlock|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setBeginblock = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this */ proto.exec.StreamEvent.prototype.clearBeginblock = function() { - this.setBeginblock(undefined); + return this.setBeginblock(undefined); }; @@ -846,17 +859,21 @@ proto.exec.StreamEvent.prototype.getBegintx = function() { }; -/** @param {?proto.exec.BeginTx|undefined} value */ +/** + * @param {?proto.exec.BeginTx|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setBegintx = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this */ proto.exec.StreamEvent.prototype.clearBegintx = function() { - this.setBegintx(undefined); + return this.setBegintx(undefined); }; @@ -879,17 +896,21 @@ proto.exec.StreamEvent.prototype.getEnvelope = function() { }; -/** @param {?proto.txs.Envelope|undefined} value */ +/** + * @param {?proto.txs.Envelope|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setEnvelope = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this */ proto.exec.StreamEvent.prototype.clearEnvelope = function() { - this.setEnvelope(undefined); + return this.setEnvelope(undefined); }; @@ -912,17 +933,21 @@ proto.exec.StreamEvent.prototype.getEvent = function() { }; -/** @param {?proto.exec.Event|undefined} value */ +/** + * @param {?proto.exec.Event|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setEvent = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this */ proto.exec.StreamEvent.prototype.clearEvent = function() { - this.setEvent(undefined); + return this.setEvent(undefined); }; @@ -945,17 +970,21 @@ proto.exec.StreamEvent.prototype.getEndtx = function() { }; -/** @param {?proto.exec.EndTx|undefined} value */ +/** + * @param {?proto.exec.EndTx|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setEndtx = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this */ proto.exec.StreamEvent.prototype.clearEndtx = function() { - this.setEndtx(undefined); + return this.setEndtx(undefined); }; @@ -978,17 +1007,21 @@ proto.exec.StreamEvent.prototype.getEndblock = function() { }; -/** @param {?proto.exec.EndBlock|undefined} value */ +/** + * @param {?proto.exec.EndBlock|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setEndblock = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this */ proto.exec.StreamEvent.prototype.clearEndblock = function() { - this.setEndblock(undefined); + return this.setEndblock(undefined); }; @@ -1006,13 +1039,15 @@ proto.exec.StreamEvent.prototype.hasEndblock = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.BeginBlock.prototype.toObject = function(opt_includeInstance) { @@ -1022,8 +1057,8 @@ proto.exec.BeginBlock.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.BeginBlock} msg The msg instance to transform. * @return {!Object} @@ -1134,9 +1169,12 @@ proto.exec.BeginBlock.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.BeginBlock} returns this + */ proto.exec.BeginBlock.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1150,17 +1188,21 @@ proto.exec.BeginBlock.prototype.getHeader = function() { }; -/** @param {?proto.types.Header|undefined} value */ +/** + * @param {?proto.types.Header|undefined} value + * @return {!proto.exec.BeginBlock} returns this +*/ proto.exec.BeginBlock.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.BeginBlock} returns this */ proto.exec.BeginBlock.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -1178,13 +1220,15 @@ proto.exec.BeginBlock.prototype.hasHeader = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.EndBlock.prototype.toObject = function(opt_includeInstance) { @@ -1194,8 +1238,8 @@ proto.exec.EndBlock.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.EndBlock} msg The msg instance to transform. * @return {!Object} @@ -1292,9 +1336,12 @@ proto.exec.EndBlock.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.EndBlock} returns this + */ proto.exec.EndBlock.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1303,13 +1350,15 @@ proto.exec.EndBlock.prototype.setHeight = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.BeginTx.prototype.toObject = function(opt_includeInstance) { @@ -1319,8 +1368,8 @@ proto.exec.BeginTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.BeginTx} msg The msg instance to transform. * @return {!Object} @@ -1448,17 +1497,21 @@ proto.exec.BeginTx.prototype.getTxheader = function() { }; -/** @param {?proto.exec.TxHeader|undefined} value */ +/** + * @param {?proto.exec.TxHeader|undefined} value + * @return {!proto.exec.BeginTx} returns this +*/ proto.exec.BeginTx.prototype.setTxheader = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.BeginTx} returns this */ proto.exec.BeginTx.prototype.clearTxheader = function() { - this.setTxheader(undefined); + return this.setTxheader(undefined); }; @@ -1481,17 +1534,21 @@ proto.exec.BeginTx.prototype.getResult = function() { }; -/** @param {?proto.exec.Result|undefined} value */ +/** + * @param {?proto.exec.Result|undefined} value + * @return {!proto.exec.BeginTx} returns this +*/ proto.exec.BeginTx.prototype.setResult = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.BeginTx} returns this */ proto.exec.BeginTx.prototype.clearResult = function() { - this.setResult(undefined); + return this.setResult(undefined); }; @@ -1514,17 +1571,21 @@ proto.exec.BeginTx.prototype.getException = function() { }; -/** @param {?proto.errors.Exception|undefined} value */ +/** + * @param {?proto.errors.Exception|undefined} value + * @return {!proto.exec.BeginTx} returns this +*/ proto.exec.BeginTx.prototype.setException = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.BeginTx} returns this */ proto.exec.BeginTx.prototype.clearException = function() { - this.setException(undefined); + return this.setException(undefined); }; @@ -1542,13 +1603,15 @@ proto.exec.BeginTx.prototype.hasException = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.EndTx.prototype.toObject = function(opt_includeInstance) { @@ -1558,8 +1621,8 @@ proto.exec.EndTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.EndTx} msg The msg instance to transform. * @return {!Object} @@ -1680,9 +1743,12 @@ proto.exec.EndTx.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.EndTx} returns this + */ proto.exec.EndTx.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -1691,13 +1757,15 @@ proto.exec.EndTx.prototype.setTxhash = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.TxHeader.prototype.toObject = function(opt_includeInstance) { @@ -1707,8 +1775,8 @@ proto.exec.TxHeader.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.TxHeader} msg The msg instance to transform. * @return {!Object} @@ -1855,9 +1923,12 @@ proto.exec.TxHeader.prototype.getTxtype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.setTxtype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1894,9 +1965,12 @@ proto.exec.TxHeader.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -1909,9 +1983,12 @@ proto.exec.TxHeader.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1924,9 +2001,12 @@ proto.exec.TxHeader.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -1940,17 +2020,21 @@ proto.exec.TxHeader.prototype.getOrigin = function() { }; -/** @param {?proto.exec.Origin|undefined} value */ +/** + * @param {?proto.exec.Origin|undefined} value + * @return {!proto.exec.TxHeader} returns this +*/ proto.exec.TxHeader.prototype.setOrigin = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.TxHeader} returns this */ proto.exec.TxHeader.prototype.clearOrigin = function() { - this.setOrigin(undefined); + return this.setOrigin(undefined); }; @@ -1975,13 +2059,15 @@ proto.exec.BlockExecution.repeatedFields_ = [3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.BlockExecution.prototype.toObject = function(opt_includeInstance) { @@ -1991,8 +2077,8 @@ proto.exec.BlockExecution.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.BlockExecution} msg The msg instance to transform. * @return {!Object} @@ -2118,9 +2204,12 @@ proto.exec.BlockExecution.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.BlockExecution} returns this + */ proto.exec.BlockExecution.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2134,17 +2223,21 @@ proto.exec.BlockExecution.prototype.getHeader = function() { }; -/** @param {?proto.types.Header|undefined} value */ +/** + * @param {?proto.types.Header|undefined} value + * @return {!proto.exec.BlockExecution} returns this +*/ proto.exec.BlockExecution.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.BlockExecution} returns this */ proto.exec.BlockExecution.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -2167,9 +2260,12 @@ proto.exec.BlockExecution.prototype.getTxexecutionsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.exec.BlockExecution} returns this +*/ proto.exec.BlockExecution.prototype.setTxexecutionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; @@ -2185,9 +2281,10 @@ proto.exec.BlockExecution.prototype.addTxexecutions = function(opt_value, opt_in /** * Clears the list making it empty but non-null. + * @return {!proto.exec.BlockExecution} returns this */ proto.exec.BlockExecution.prototype.clearTxexecutionsList = function() { - this.setTxexecutionsList([]); + return this.setTxexecutionsList([]); }; @@ -2196,13 +2293,15 @@ proto.exec.BlockExecution.prototype.clearTxexecutionsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.TxExecutionKey.prototype.toObject = function(opt_includeInstance) { @@ -2212,8 +2311,8 @@ proto.exec.TxExecutionKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.TxExecutionKey} msg The msg instance to transform. * @return {!Object} @@ -2322,9 +2421,12 @@ proto.exec.TxExecutionKey.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxExecutionKey} returns this + */ proto.exec.TxExecutionKey.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2337,9 +2439,12 @@ proto.exec.TxExecutionKey.prototype.getOffset = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxExecutionKey} returns this + */ proto.exec.TxExecutionKey.prototype.setOffset = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -2355,13 +2460,15 @@ proto.exec.TxExecution.repeatedFields_ = [7,11]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.TxExecution.prototype.toObject = function(opt_includeInstance) { @@ -2371,8 +2478,8 @@ proto.exec.TxExecution.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.TxExecution} msg The msg instance to transform. * @return {!Object} @@ -2558,17 +2665,21 @@ proto.exec.TxExecution.prototype.getHeader = function() { }; -/** @param {?proto.exec.TxHeader|undefined} value */ +/** + * @param {?proto.exec.TxHeader|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -2591,17 +2702,21 @@ proto.exec.TxExecution.prototype.getEnvelope = function() { }; -/** @param {?proto.txs.Envelope|undefined} value */ +/** + * @param {?proto.txs.Envelope|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setEnvelope = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearEnvelope = function() { - this.setEnvelope(undefined); + return this.setEnvelope(undefined); }; @@ -2624,9 +2739,12 @@ proto.exec.TxExecution.prototype.getEventsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setEventsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -2642,9 +2760,10 @@ proto.exec.TxExecution.prototype.addEvents = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearEventsList = function() { - this.setEventsList([]); + return this.setEventsList([]); }; @@ -2658,17 +2777,21 @@ proto.exec.TxExecution.prototype.getResult = function() { }; -/** @param {?proto.exec.Result|undefined} value */ +/** + * @param {?proto.exec.Result|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setResult = function(value) { - jspb.Message.setWrapperField(this, 8, value); + return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearResult = function() { - this.setResult(undefined); + return this.setResult(undefined); }; @@ -2691,17 +2814,21 @@ proto.exec.TxExecution.prototype.getReceipt = function() { }; -/** @param {?proto.txs.Receipt|undefined} value */ +/** + * @param {?proto.txs.Receipt|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setReceipt = function(value) { - jspb.Message.setWrapperField(this, 9, value); + return jspb.Message.setWrapperField(this, 9, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearReceipt = function() { - this.setReceipt(undefined); + return this.setReceipt(undefined); }; @@ -2724,17 +2851,21 @@ proto.exec.TxExecution.prototype.getException = function() { }; -/** @param {?proto.errors.Exception|undefined} value */ +/** + * @param {?proto.errors.Exception|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setException = function(value) { - jspb.Message.setWrapperField(this, 10, value); + return jspb.Message.setWrapperField(this, 10, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearException = function() { - this.setException(undefined); + return this.setException(undefined); }; @@ -2757,9 +2888,12 @@ proto.exec.TxExecution.prototype.getTxexecutionsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setTxexecutionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 11, value); + return jspb.Message.setRepeatedWrapperField(this, 11, value); }; @@ -2775,9 +2909,10 @@ proto.exec.TxExecution.prototype.addTxexecutions = function(opt_value, opt_index /** * Clears the list making it empty but non-null. + * @return {!proto.exec.TxExecution} returns this */ proto.exec.TxExecution.prototype.clearTxexecutionsList = function() { - this.setTxexecutionsList([]); + return this.setTxexecutionsList([]); }; @@ -2786,13 +2921,15 @@ proto.exec.TxExecution.prototype.clearTxexecutionsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.Origin.prototype.toObject = function(opt_includeInstance) { @@ -2802,8 +2939,8 @@ proto.exec.Origin.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Origin} msg The msg instance to transform. * @return {!Object} @@ -2938,9 +3075,12 @@ proto.exec.Origin.prototype.getChainid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.exec.Origin} returns this + */ proto.exec.Origin.prototype.setChainid = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2953,9 +3093,12 @@ proto.exec.Origin.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Origin} returns this + */ proto.exec.Origin.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -2968,9 +3111,12 @@ proto.exec.Origin.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Origin} returns this + */ proto.exec.Origin.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -2984,17 +3130,21 @@ proto.exec.Origin.prototype.getTime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.exec.Origin} returns this +*/ proto.exec.Origin.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Origin} returns this */ proto.exec.Origin.prototype.clearTime = function() { - this.setTime(undefined); + return this.setTime(undefined); }; @@ -3012,13 +3162,15 @@ proto.exec.Origin.prototype.hasTime = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.Header.prototype.toObject = function(opt_includeInstance) { @@ -3028,8 +3180,8 @@ proto.exec.Header.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Header} msg The msg instance to transform. * @return {!Object} @@ -3200,9 +3352,12 @@ proto.exec.Header.prototype.getTxtype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setTxtype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -3239,9 +3394,12 @@ proto.exec.Header.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -3254,9 +3412,12 @@ proto.exec.Header.prototype.getEventtype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setEventtype = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -3269,9 +3430,12 @@ proto.exec.Header.prototype.getEventid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setEventid = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -3284,9 +3448,12 @@ proto.exec.Header.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -3299,9 +3466,12 @@ proto.exec.Header.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 6, value); }; @@ -3315,17 +3485,21 @@ proto.exec.Header.prototype.getException = function() { }; -/** @param {?proto.errors.Exception|undefined} value */ +/** + * @param {?proto.errors.Exception|undefined} value + * @return {!proto.exec.Header} returns this +*/ proto.exec.Header.prototype.setException = function(value) { - jspb.Message.setWrapperField(this, 7, value); + return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Header} returns this */ proto.exec.Header.prototype.clearException = function() { - this.setException(undefined); + return this.setException(undefined); }; @@ -3343,13 +3517,15 @@ proto.exec.Header.prototype.hasException = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.Event.prototype.toObject = function(opt_includeInstance) { @@ -3359,8 +3535,8 @@ proto.exec.Event.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Event} msg The msg instance to transform. * @return {!Object} @@ -3530,17 +3706,21 @@ proto.exec.Event.prototype.getHeader = function() { }; -/** @param {?proto.exec.Header|undefined} value */ +/** + * @param {?proto.exec.Header|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this */ proto.exec.Event.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -3563,17 +3743,21 @@ proto.exec.Event.prototype.getInput = function() { }; -/** @param {?proto.exec.InputEvent|undefined} value */ +/** + * @param {?proto.exec.InputEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this */ proto.exec.Event.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -3596,17 +3780,21 @@ proto.exec.Event.prototype.getOutput = function() { }; -/** @param {?proto.exec.OutputEvent|undefined} value */ +/** + * @param {?proto.exec.OutputEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setOutput = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this */ proto.exec.Event.prototype.clearOutput = function() { - this.setOutput(undefined); + return this.setOutput(undefined); }; @@ -3629,17 +3817,21 @@ proto.exec.Event.prototype.getCall = function() { }; -/** @param {?proto.exec.CallEvent|undefined} value */ +/** + * @param {?proto.exec.CallEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setCall = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this */ proto.exec.Event.prototype.clearCall = function() { - this.setCall(undefined); + return this.setCall(undefined); }; @@ -3662,17 +3854,21 @@ proto.exec.Event.prototype.getLog = function() { }; -/** @param {?proto.exec.LogEvent|undefined} value */ +/** + * @param {?proto.exec.LogEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setLog = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this */ proto.exec.Event.prototype.clearLog = function() { - this.setLog(undefined); + return this.setLog(undefined); }; @@ -3695,17 +3891,21 @@ proto.exec.Event.prototype.getGovernaccount = function() { }; -/** @param {?proto.exec.GovernAccountEvent|undefined} value */ +/** + * @param {?proto.exec.GovernAccountEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setGovernaccount = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this */ proto.exec.Event.prototype.clearGovernaccount = function() { - this.setGovernaccount(undefined); + return this.setGovernaccount(undefined); }; @@ -3723,13 +3923,15 @@ proto.exec.Event.prototype.hasGovernaccount = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.Result.prototype.toObject = function(opt_includeInstance) { @@ -3739,8 +3941,8 @@ proto.exec.Result.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Result} msg The msg instance to transform. * @return {!Object} @@ -3901,9 +4103,12 @@ proto.exec.Result.prototype.getReturn_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.Result} returns this + */ proto.exec.Result.prototype.setReturn = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3916,9 +4121,12 @@ proto.exec.Result.prototype.getGasused = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Result} returns this + */ proto.exec.Result.prototype.setGasused = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -3932,17 +4140,21 @@ proto.exec.Result.prototype.getNameentry = function() { }; -/** @param {?proto.names.Entry|undefined} value */ +/** + * @param {?proto.names.Entry|undefined} value + * @return {!proto.exec.Result} returns this +*/ proto.exec.Result.prototype.setNameentry = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Result} returns this */ proto.exec.Result.prototype.clearNameentry = function() { - this.setNameentry(undefined); + return this.setNameentry(undefined); }; @@ -3965,17 +4177,21 @@ proto.exec.Result.prototype.getPermargs = function() { }; -/** @param {?proto.permission.PermArgs|undefined} value */ +/** + * @param {?proto.permission.PermArgs|undefined} value + * @return {!proto.exec.Result} returns this +*/ proto.exec.Result.prototype.setPermargs = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.Result} returns this */ proto.exec.Result.prototype.clearPermargs = function() { - this.setPermargs(undefined); + return this.setPermargs(undefined); }; @@ -4000,13 +4216,15 @@ proto.exec.LogEvent.repeatedFields_ = [3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.LogEvent.prototype.toObject = function(opt_includeInstance) { @@ -4016,8 +4234,8 @@ proto.exec.LogEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.LogEvent} msg The msg instance to transform. * @return {!Object} @@ -4162,9 +4380,12 @@ proto.exec.LogEvent.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.LogEvent} returns this + */ proto.exec.LogEvent.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -4201,9 +4422,12 @@ proto.exec.LogEvent.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.LogEvent} returns this + */ proto.exec.LogEvent.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4240,26 +4464,31 @@ proto.exec.LogEvent.prototype.getTopicsList_asU8 = function() { }; -/** @param {!(Array|Array)} value */ +/** + * @param {!(Array|Array)} value + * @return {!proto.exec.LogEvent} returns this + */ proto.exec.LogEvent.prototype.setTopicsList = function(value) { - jspb.Message.setField(this, 3, value || []); + return jspb.Message.setField(this, 3, value || []); }; /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index + * @return {!proto.exec.LogEvent} returns this */ proto.exec.LogEvent.prototype.addTopics = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 3, value, opt_index); + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.exec.LogEvent} returns this */ proto.exec.LogEvent.prototype.clearTopicsList = function() { - this.setTopicsList([]); + return this.setTopicsList([]); }; @@ -4268,13 +4497,15 @@ proto.exec.LogEvent.prototype.clearTopicsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.CallEvent.prototype.toObject = function(opt_includeInstance) { @@ -4284,8 +4515,8 @@ proto.exec.CallEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.CallEvent} msg The msg instance to transform. * @return {!Object} @@ -4432,9 +4663,12 @@ proto.exec.CallEvent.prototype.getCalltype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.setCalltype = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -4448,17 +4682,21 @@ proto.exec.CallEvent.prototype.getCalldata = function() { }; -/** @param {?proto.exec.CallData|undefined} value */ +/** + * @param {?proto.exec.CallData|undefined} value + * @return {!proto.exec.CallEvent} returns this +*/ proto.exec.CallEvent.prototype.setCalldata = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.CallEvent} returns this */ proto.exec.CallEvent.prototype.clearCalldata = function() { - this.setCalldata(undefined); + return this.setCalldata(undefined); }; @@ -4504,9 +4742,12 @@ proto.exec.CallEvent.prototype.getOrigin_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.setOrigin = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4519,9 +4760,12 @@ proto.exec.CallEvent.prototype.getStackdepth = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.setStackdepth = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -4558,9 +4802,12 @@ proto.exec.CallEvent.prototype.getReturn_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.setReturn = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -4569,13 +4816,15 @@ proto.exec.CallEvent.prototype.setReturn = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.GovernAccountEvent.prototype.toObject = function(opt_includeInstance) { @@ -4585,8 +4834,8 @@ proto.exec.GovernAccountEvent.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.GovernAccountEvent} msg The msg instance to transform. * @return {!Object} @@ -4686,17 +4935,21 @@ proto.exec.GovernAccountEvent.prototype.getAccountupdate = function() { }; -/** @param {?proto.spec.TemplateAccount|undefined} value */ +/** + * @param {?proto.spec.TemplateAccount|undefined} value + * @return {!proto.exec.GovernAccountEvent} returns this +*/ proto.exec.GovernAccountEvent.prototype.setAccountupdate = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.exec.GovernAccountEvent} returns this */ proto.exec.GovernAccountEvent.prototype.clearAccountupdate = function() { - this.setAccountupdate(undefined); + return this.setAccountupdate(undefined); }; @@ -4714,13 +4967,15 @@ proto.exec.GovernAccountEvent.prototype.hasAccountupdate = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.InputEvent.prototype.toObject = function(opt_includeInstance) { @@ -4730,8 +4985,8 @@ proto.exec.InputEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.InputEvent} msg The msg instance to transform. * @return {!Object} @@ -4852,9 +5107,12 @@ proto.exec.InputEvent.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.InputEvent} returns this + */ proto.exec.InputEvent.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -4863,13 +5121,15 @@ proto.exec.InputEvent.prototype.setAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.OutputEvent.prototype.toObject = function(opt_includeInstance) { @@ -4879,8 +5139,8 @@ proto.exec.OutputEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.OutputEvent} msg The msg instance to transform. * @return {!Object} @@ -5001,9 +5261,12 @@ proto.exec.OutputEvent.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.OutputEvent} returns this + */ proto.exec.OutputEvent.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -5012,13 +5275,15 @@ proto.exec.OutputEvent.prototype.setAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.CallData.prototype.toObject = function(opt_includeInstance) { @@ -5028,8 +5293,8 @@ proto.exec.CallData.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.CallData} msg The msg instance to transform. * @return {!Object} @@ -5198,9 +5463,12 @@ proto.exec.CallData.prototype.getCaller_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setCaller = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -5237,9 +5505,12 @@ proto.exec.CallData.prototype.getCallee_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setCallee = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -5276,9 +5547,12 @@ proto.exec.CallData.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -5291,9 +5565,12 @@ proto.exec.CallData.prototype.getValue = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -5306,9 +5583,12 @@ proto.exec.CallData.prototype.getGas = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setGas = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; diff --git a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js index 4d7ad97c0..d0f20945e 100644 --- a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js +++ b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js @@ -1,3 +1,4 @@ +// source: github.com/gogo/protobuf/gogoproto/gogo.proto /** * @fileoverview * @enhanceable diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js index 149058bd4..825f173a6 100644 --- a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js +++ b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js @@ -1,3 +1,4 @@ +// source: github.com/tendermint/tendermint/abci/types/types.proto /** * @fileoverview * @enhanceable @@ -27,6 +28,7 @@ goog.exportSymbol('proto.types.LastCommitInfo', null, global); goog.exportSymbol('proto.types.PartSetHeader', null, global); goog.exportSymbol('proto.types.PubKey', null, global); goog.exportSymbol('proto.types.Request', null, global); +goog.exportSymbol('proto.types.Request.ValueCase', null, global); goog.exportSymbol('proto.types.RequestBeginBlock', null, global); goog.exportSymbol('proto.types.RequestCheckTx', null, global); goog.exportSymbol('proto.types.RequestCommit', null, global); @@ -39,6 +41,7 @@ goog.exportSymbol('proto.types.RequestInitChain', null, global); goog.exportSymbol('proto.types.RequestQuery', null, global); goog.exportSymbol('proto.types.RequestSetOption', null, global); goog.exportSymbol('proto.types.Response', null, global); +goog.exportSymbol('proto.types.Response.ValueCase', null, global); goog.exportSymbol('proto.types.ResponseBeginBlock', null, global); goog.exportSymbol('proto.types.ResponseCheckTx', null, global); goog.exportSymbol('proto.types.ResponseCommit', null, global); @@ -893,13 +896,15 @@ proto.types.Request.prototype.getValueCase = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.Request.prototype.toObject = function(opt_includeInstance) { @@ -909,8 +914,8 @@ proto.types.Request.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Request} msg The msg instance to transform. * @return {!Object} @@ -1150,17 +1155,21 @@ proto.types.Request.prototype.getEcho = function() { }; -/** @param {?proto.types.RequestEcho|undefined} value */ +/** + * @param {?proto.types.RequestEcho|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setEcho = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 2, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearEcho = function() { - this.setEcho(undefined); + return this.setEcho(undefined); }; @@ -1183,17 +1192,21 @@ proto.types.Request.prototype.getFlush = function() { }; -/** @param {?proto.types.RequestFlush|undefined} value */ +/** + * @param {?proto.types.RequestFlush|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setFlush = function(value) { - jspb.Message.setOneofWrapperField(this, 3, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 3, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearFlush = function() { - this.setFlush(undefined); + return this.setFlush(undefined); }; @@ -1216,17 +1229,21 @@ proto.types.Request.prototype.getInfo = function() { }; -/** @param {?proto.types.RequestInfo|undefined} value */ +/** + * @param {?proto.types.RequestInfo|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setInfo = function(value) { - jspb.Message.setOneofWrapperField(this, 4, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 4, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearInfo = function() { - this.setInfo(undefined); + return this.setInfo(undefined); }; @@ -1249,17 +1266,21 @@ proto.types.Request.prototype.getSetOption = function() { }; -/** @param {?proto.types.RequestSetOption|undefined} value */ +/** + * @param {?proto.types.RequestSetOption|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setSetOption = function(value) { - jspb.Message.setOneofWrapperField(this, 5, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 5, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearSetOption = function() { - this.setSetOption(undefined); + return this.setSetOption(undefined); }; @@ -1282,17 +1303,21 @@ proto.types.Request.prototype.getInitChain = function() { }; -/** @param {?proto.types.RequestInitChain|undefined} value */ +/** + * @param {?proto.types.RequestInitChain|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setInitChain = function(value) { - jspb.Message.setOneofWrapperField(this, 6, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 6, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearInitChain = function() { - this.setInitChain(undefined); + return this.setInitChain(undefined); }; @@ -1315,17 +1340,21 @@ proto.types.Request.prototype.getQuery = function() { }; -/** @param {?proto.types.RequestQuery|undefined} value */ +/** + * @param {?proto.types.RequestQuery|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setQuery = function(value) { - jspb.Message.setOneofWrapperField(this, 7, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 7, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearQuery = function() { - this.setQuery(undefined); + return this.setQuery(undefined); }; @@ -1348,17 +1377,21 @@ proto.types.Request.prototype.getBeginBlock = function() { }; -/** @param {?proto.types.RequestBeginBlock|undefined} value */ +/** + * @param {?proto.types.RequestBeginBlock|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setBeginBlock = function(value) { - jspb.Message.setOneofWrapperField(this, 8, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 8, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearBeginBlock = function() { - this.setBeginBlock(undefined); + return this.setBeginBlock(undefined); }; @@ -1381,17 +1414,21 @@ proto.types.Request.prototype.getCheckTx = function() { }; -/** @param {?proto.types.RequestCheckTx|undefined} value */ +/** + * @param {?proto.types.RequestCheckTx|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setCheckTx = function(value) { - jspb.Message.setOneofWrapperField(this, 9, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 9, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearCheckTx = function() { - this.setCheckTx(undefined); + return this.setCheckTx(undefined); }; @@ -1414,17 +1451,21 @@ proto.types.Request.prototype.getDeliverTx = function() { }; -/** @param {?proto.types.RequestDeliverTx|undefined} value */ +/** + * @param {?proto.types.RequestDeliverTx|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setDeliverTx = function(value) { - jspb.Message.setOneofWrapperField(this, 19, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 19, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearDeliverTx = function() { - this.setDeliverTx(undefined); + return this.setDeliverTx(undefined); }; @@ -1447,17 +1488,21 @@ proto.types.Request.prototype.getEndBlock = function() { }; -/** @param {?proto.types.RequestEndBlock|undefined} value */ +/** + * @param {?proto.types.RequestEndBlock|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setEndBlock = function(value) { - jspb.Message.setOneofWrapperField(this, 11, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 11, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearEndBlock = function() { - this.setEndBlock(undefined); + return this.setEndBlock(undefined); }; @@ -1480,17 +1525,21 @@ proto.types.Request.prototype.getCommit = function() { }; -/** @param {?proto.types.RequestCommit|undefined} value */ +/** + * @param {?proto.types.RequestCommit|undefined} value + * @return {!proto.types.Request} returns this +*/ proto.types.Request.prototype.setCommit = function(value) { - jspb.Message.setOneofWrapperField(this, 12, proto.types.Request.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 12, proto.types.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Request} returns this */ proto.types.Request.prototype.clearCommit = function() { - this.setCommit(undefined); + return this.setCommit(undefined); }; @@ -1508,13 +1557,15 @@ proto.types.Request.prototype.hasCommit = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestEcho.prototype.toObject = function(opt_includeInstance) { @@ -1524,8 +1575,8 @@ proto.types.RequestEcho.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestEcho} msg The msg instance to transform. * @return {!Object} @@ -1622,9 +1673,12 @@ proto.types.RequestEcho.prototype.getMessage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.RequestEcho} returns this + */ proto.types.RequestEcho.prototype.setMessage = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1633,13 +1687,15 @@ proto.types.RequestEcho.prototype.setMessage = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestFlush.prototype.toObject = function(opt_includeInstance) { @@ -1649,8 +1705,8 @@ proto.types.RequestFlush.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestFlush} msg The msg instance to transform. * @return {!Object} @@ -1732,13 +1788,15 @@ proto.types.RequestFlush.serializeBinaryToWriter = function(message, writer) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestInfo.prototype.toObject = function(opt_includeInstance) { @@ -1748,8 +1806,8 @@ proto.types.RequestInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestInfo} msg The msg instance to transform. * @return {!Object} @@ -1846,9 +1904,12 @@ proto.types.RequestInfo.prototype.getVersion = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.RequestInfo} returns this + */ proto.types.RequestInfo.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1857,13 +1918,15 @@ proto.types.RequestInfo.prototype.setVersion = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestSetOption.prototype.toObject = function(opt_includeInstance) { @@ -1873,8 +1936,8 @@ proto.types.RequestSetOption.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestSetOption} msg The msg instance to transform. * @return {!Object} @@ -1983,9 +2046,12 @@ proto.types.RequestSetOption.prototype.getKey = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.RequestSetOption} returns this + */ proto.types.RequestSetOption.prototype.setKey = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1998,9 +2064,12 @@ proto.types.RequestSetOption.prototype.getValue = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.RequestSetOption} returns this + */ proto.types.RequestSetOption.prototype.setValue = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2016,13 +2085,15 @@ proto.types.RequestInitChain.repeatedFields_ = [4]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestInitChain.prototype.toObject = function(opt_includeInstance) { @@ -2032,8 +2103,8 @@ proto.types.RequestInitChain.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestInitChain} msg The msg instance to transform. * @return {!Object} @@ -2186,17 +2257,21 @@ proto.types.RequestInitChain.prototype.getTime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.types.RequestInitChain} returns this +*/ proto.types.RequestInitChain.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.RequestInitChain} returns this */ proto.types.RequestInitChain.prototype.clearTime = function() { - this.setTime(undefined); + return this.setTime(undefined); }; @@ -2218,9 +2293,12 @@ proto.types.RequestInitChain.prototype.getChainId = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.RequestInitChain} returns this + */ proto.types.RequestInitChain.prototype.setChainId = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2234,17 +2312,21 @@ proto.types.RequestInitChain.prototype.getConsensusParams = function() { }; -/** @param {?proto.types.ConsensusParams|undefined} value */ +/** + * @param {?proto.types.ConsensusParams|undefined} value + * @return {!proto.types.RequestInitChain} returns this +*/ proto.types.RequestInitChain.prototype.setConsensusParams = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.RequestInitChain} returns this */ proto.types.RequestInitChain.prototype.clearConsensusParams = function() { - this.setConsensusParams(undefined); + return this.setConsensusParams(undefined); }; @@ -2267,9 +2349,12 @@ proto.types.RequestInitChain.prototype.getValidatorsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.RequestInitChain} returns this +*/ proto.types.RequestInitChain.prototype.setValidatorsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -2285,9 +2370,10 @@ proto.types.RequestInitChain.prototype.addValidators = function(opt_value, opt_i /** * Clears the list making it empty but non-null. + * @return {!proto.types.RequestInitChain} returns this */ proto.types.RequestInitChain.prototype.clearValidatorsList = function() { - this.setValidatorsList([]); + return this.setValidatorsList([]); }; @@ -2324,9 +2410,12 @@ proto.types.RequestInitChain.prototype.getAppStateBytes_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.RequestInitChain} returns this + */ proto.types.RequestInitChain.prototype.setAppStateBytes = function(value) { - jspb.Message.setProto3BytesField(this, 5, value); + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -2335,13 +2424,15 @@ proto.types.RequestInitChain.prototype.setAppStateBytes = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestQuery.prototype.toObject = function(opt_includeInstance) { @@ -2351,8 +2442,8 @@ proto.types.RequestQuery.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestQuery} msg The msg instance to transform. * @return {!Object} @@ -2363,7 +2454,7 @@ proto.types.RequestQuery.toObject = function(includeInstance, msg) { data: msg.getData_asB64(), path: jspb.Message.getFieldWithDefault(msg, 2, ""), height: jspb.Message.getFieldWithDefault(msg, 3, 0), - prove: jspb.Message.getFieldWithDefault(msg, 4, false) + prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) }; if (includeInstance) { @@ -2509,9 +2600,12 @@ proto.types.RequestQuery.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.RequestQuery} returns this + */ proto.types.RequestQuery.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2524,9 +2618,12 @@ proto.types.RequestQuery.prototype.getPath = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.RequestQuery} returns this + */ proto.types.RequestQuery.prototype.setPath = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2539,26 +2636,30 @@ proto.types.RequestQuery.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.RequestQuery} returns this + */ proto.types.RequestQuery.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional bool prove = 4; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.types.RequestQuery.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.types.RequestQuery} returns this + */ proto.types.RequestQuery.prototype.setProve = function(value) { - jspb.Message.setProto3BooleanField(this, 4, value); + return jspb.Message.setProto3BooleanField(this, 4, value); }; @@ -2574,13 +2675,15 @@ proto.types.RequestBeginBlock.repeatedFields_ = [4]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestBeginBlock.prototype.toObject = function(opt_includeInstance) { @@ -2590,8 +2693,8 @@ proto.types.RequestBeginBlock.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestBeginBlock} msg The msg instance to transform. * @return {!Object} @@ -2755,9 +2858,12 @@ proto.types.RequestBeginBlock.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.RequestBeginBlock} returns this + */ proto.types.RequestBeginBlock.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2771,17 +2877,21 @@ proto.types.RequestBeginBlock.prototype.getHeader = function() { }; -/** @param {?proto.types.Header|undefined} value */ +/** + * @param {?proto.types.Header|undefined} value + * @return {!proto.types.RequestBeginBlock} returns this +*/ proto.types.RequestBeginBlock.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.RequestBeginBlock} returns this */ proto.types.RequestBeginBlock.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -2804,17 +2914,21 @@ proto.types.RequestBeginBlock.prototype.getLastCommitInfo = function() { }; -/** @param {?proto.types.LastCommitInfo|undefined} value */ +/** + * @param {?proto.types.LastCommitInfo|undefined} value + * @return {!proto.types.RequestBeginBlock} returns this +*/ proto.types.RequestBeginBlock.prototype.setLastCommitInfo = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.RequestBeginBlock} returns this */ proto.types.RequestBeginBlock.prototype.clearLastCommitInfo = function() { - this.setLastCommitInfo(undefined); + return this.setLastCommitInfo(undefined); }; @@ -2837,9 +2951,12 @@ proto.types.RequestBeginBlock.prototype.getByzantineValidatorsList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.RequestBeginBlock} returns this +*/ proto.types.RequestBeginBlock.prototype.setByzantineValidatorsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -2855,9 +2972,10 @@ proto.types.RequestBeginBlock.prototype.addByzantineValidators = function(opt_va /** * Clears the list making it empty but non-null. + * @return {!proto.types.RequestBeginBlock} returns this */ proto.types.RequestBeginBlock.prototype.clearByzantineValidatorsList = function() { - this.setByzantineValidatorsList([]); + return this.setByzantineValidatorsList([]); }; @@ -2866,13 +2984,15 @@ proto.types.RequestBeginBlock.prototype.clearByzantineValidatorsList = function( if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { @@ -2882,8 +3002,8 @@ proto.types.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestCheckTx} msg The msg instance to transform. * @return {!Object} @@ -3004,9 +3124,12 @@ proto.types.RequestCheckTx.prototype.getTx_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.RequestCheckTx} returns this + */ proto.types.RequestCheckTx.prototype.setTx = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3015,13 +3138,15 @@ proto.types.RequestCheckTx.prototype.setTx = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestDeliverTx.prototype.toObject = function(opt_includeInstance) { @@ -3031,8 +3156,8 @@ proto.types.RequestDeliverTx.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestDeliverTx} msg The msg instance to transform. * @return {!Object} @@ -3153,9 +3278,12 @@ proto.types.RequestDeliverTx.prototype.getTx_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.RequestDeliverTx} returns this + */ proto.types.RequestDeliverTx.prototype.setTx = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3164,13 +3292,15 @@ proto.types.RequestDeliverTx.prototype.setTx = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestEndBlock.prototype.toObject = function(opt_includeInstance) { @@ -3180,8 +3310,8 @@ proto.types.RequestEndBlock.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestEndBlock} msg The msg instance to transform. * @return {!Object} @@ -3278,9 +3408,12 @@ proto.types.RequestEndBlock.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.RequestEndBlock} returns this + */ proto.types.RequestEndBlock.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -3289,13 +3422,15 @@ proto.types.RequestEndBlock.prototype.setHeight = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestCommit.prototype.toObject = function(opt_includeInstance) { @@ -3305,8 +3440,8 @@ proto.types.RequestCommit.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestCommit} msg The msg instance to transform. * @return {!Object} @@ -3424,13 +3559,15 @@ proto.types.Response.prototype.getValueCase = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.Response.prototype.toObject = function(opt_includeInstance) { @@ -3440,8 +3577,8 @@ proto.types.Response.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Response} msg The msg instance to transform. * @return {!Object} @@ -3695,17 +3832,21 @@ proto.types.Response.prototype.getException = function() { }; -/** @param {?proto.types.ResponseException|undefined} value */ +/** + * @param {?proto.types.ResponseException|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setException = function(value) { - jspb.Message.setOneofWrapperField(this, 1, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 1, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearException = function() { - this.setException(undefined); + return this.setException(undefined); }; @@ -3728,17 +3869,21 @@ proto.types.Response.prototype.getEcho = function() { }; -/** @param {?proto.types.ResponseEcho|undefined} value */ +/** + * @param {?proto.types.ResponseEcho|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setEcho = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 2, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearEcho = function() { - this.setEcho(undefined); + return this.setEcho(undefined); }; @@ -3761,17 +3906,21 @@ proto.types.Response.prototype.getFlush = function() { }; -/** @param {?proto.types.ResponseFlush|undefined} value */ +/** + * @param {?proto.types.ResponseFlush|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setFlush = function(value) { - jspb.Message.setOneofWrapperField(this, 3, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 3, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearFlush = function() { - this.setFlush(undefined); + return this.setFlush(undefined); }; @@ -3794,17 +3943,21 @@ proto.types.Response.prototype.getInfo = function() { }; -/** @param {?proto.types.ResponseInfo|undefined} value */ +/** + * @param {?proto.types.ResponseInfo|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setInfo = function(value) { - jspb.Message.setOneofWrapperField(this, 4, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 4, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearInfo = function() { - this.setInfo(undefined); + return this.setInfo(undefined); }; @@ -3827,17 +3980,21 @@ proto.types.Response.prototype.getSetOption = function() { }; -/** @param {?proto.types.ResponseSetOption|undefined} value */ +/** + * @param {?proto.types.ResponseSetOption|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setSetOption = function(value) { - jspb.Message.setOneofWrapperField(this, 5, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 5, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearSetOption = function() { - this.setSetOption(undefined); + return this.setSetOption(undefined); }; @@ -3860,17 +4017,21 @@ proto.types.Response.prototype.getInitChain = function() { }; -/** @param {?proto.types.ResponseInitChain|undefined} value */ +/** + * @param {?proto.types.ResponseInitChain|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setInitChain = function(value) { - jspb.Message.setOneofWrapperField(this, 6, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 6, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearInitChain = function() { - this.setInitChain(undefined); + return this.setInitChain(undefined); }; @@ -3893,17 +4054,21 @@ proto.types.Response.prototype.getQuery = function() { }; -/** @param {?proto.types.ResponseQuery|undefined} value */ +/** + * @param {?proto.types.ResponseQuery|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setQuery = function(value) { - jspb.Message.setOneofWrapperField(this, 7, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 7, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearQuery = function() { - this.setQuery(undefined); + return this.setQuery(undefined); }; @@ -3926,17 +4091,21 @@ proto.types.Response.prototype.getBeginBlock = function() { }; -/** @param {?proto.types.ResponseBeginBlock|undefined} value */ +/** + * @param {?proto.types.ResponseBeginBlock|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setBeginBlock = function(value) { - jspb.Message.setOneofWrapperField(this, 8, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 8, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearBeginBlock = function() { - this.setBeginBlock(undefined); + return this.setBeginBlock(undefined); }; @@ -3959,17 +4128,21 @@ proto.types.Response.prototype.getCheckTx = function() { }; -/** @param {?proto.types.ResponseCheckTx|undefined} value */ +/** + * @param {?proto.types.ResponseCheckTx|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setCheckTx = function(value) { - jspb.Message.setOneofWrapperField(this, 9, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 9, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearCheckTx = function() { - this.setCheckTx(undefined); + return this.setCheckTx(undefined); }; @@ -3992,17 +4165,21 @@ proto.types.Response.prototype.getDeliverTx = function() { }; -/** @param {?proto.types.ResponseDeliverTx|undefined} value */ +/** + * @param {?proto.types.ResponseDeliverTx|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setDeliverTx = function(value) { - jspb.Message.setOneofWrapperField(this, 10, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 10, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearDeliverTx = function() { - this.setDeliverTx(undefined); + return this.setDeliverTx(undefined); }; @@ -4025,17 +4202,21 @@ proto.types.Response.prototype.getEndBlock = function() { }; -/** @param {?proto.types.ResponseEndBlock|undefined} value */ +/** + * @param {?proto.types.ResponseEndBlock|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setEndBlock = function(value) { - jspb.Message.setOneofWrapperField(this, 11, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 11, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearEndBlock = function() { - this.setEndBlock(undefined); + return this.setEndBlock(undefined); }; @@ -4058,17 +4239,21 @@ proto.types.Response.prototype.getCommit = function() { }; -/** @param {?proto.types.ResponseCommit|undefined} value */ +/** + * @param {?proto.types.ResponseCommit|undefined} value + * @return {!proto.types.Response} returns this +*/ proto.types.Response.prototype.setCommit = function(value) { - jspb.Message.setOneofWrapperField(this, 12, proto.types.Response.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 12, proto.types.Response.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Response} returns this */ proto.types.Response.prototype.clearCommit = function() { - this.setCommit(undefined); + return this.setCommit(undefined); }; @@ -4086,13 +4271,15 @@ proto.types.Response.prototype.hasCommit = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseException.prototype.toObject = function(opt_includeInstance) { @@ -4102,8 +4289,8 @@ proto.types.ResponseException.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseException} msg The msg instance to transform. * @return {!Object} @@ -4200,9 +4387,12 @@ proto.types.ResponseException.prototype.getError = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseException} returns this + */ proto.types.ResponseException.prototype.setError = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -4211,13 +4401,15 @@ proto.types.ResponseException.prototype.setError = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseEcho.prototype.toObject = function(opt_includeInstance) { @@ -4227,8 +4419,8 @@ proto.types.ResponseEcho.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseEcho} msg The msg instance to transform. * @return {!Object} @@ -4325,9 +4517,12 @@ proto.types.ResponseEcho.prototype.getMessage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseEcho} returns this + */ proto.types.ResponseEcho.prototype.setMessage = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -4336,13 +4531,15 @@ proto.types.ResponseEcho.prototype.setMessage = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseFlush.prototype.toObject = function(opt_includeInstance) { @@ -4352,8 +4549,8 @@ proto.types.ResponseFlush.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseFlush} msg The msg instance to transform. * @return {!Object} @@ -4435,13 +4632,15 @@ proto.types.ResponseFlush.serializeBinaryToWriter = function(message, writer) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseInfo.prototype.toObject = function(opt_includeInstance) { @@ -4451,8 +4650,8 @@ proto.types.ResponseInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseInfo} msg The msg instance to transform. * @return {!Object} @@ -4585,9 +4784,12 @@ proto.types.ResponseInfo.prototype.getData = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseInfo} returns this + */ proto.types.ResponseInfo.prototype.setData = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -4600,9 +4802,12 @@ proto.types.ResponseInfo.prototype.getVersion = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseInfo} returns this + */ proto.types.ResponseInfo.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -4615,9 +4820,12 @@ proto.types.ResponseInfo.prototype.getLastBlockHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseInfo} returns this + */ proto.types.ResponseInfo.prototype.setLastBlockHeight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -4654,9 +4862,12 @@ proto.types.ResponseInfo.prototype.getLastBlockAppHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseInfo} returns this + */ proto.types.ResponseInfo.prototype.setLastBlockAppHash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -4665,13 +4876,15 @@ proto.types.ResponseInfo.prototype.setLastBlockAppHash = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseSetOption.prototype.toObject = function(opt_includeInstance) { @@ -4681,8 +4894,8 @@ proto.types.ResponseSetOption.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseSetOption} msg The msg instance to transform. * @return {!Object} @@ -4803,9 +5016,12 @@ proto.types.ResponseSetOption.prototype.getCode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseSetOption} returns this + */ proto.types.ResponseSetOption.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -4818,9 +5034,12 @@ proto.types.ResponseSetOption.prototype.getLog = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseSetOption} returns this + */ proto.types.ResponseSetOption.prototype.setLog = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -4833,9 +5052,12 @@ proto.types.ResponseSetOption.prototype.getInfo = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseSetOption} returns this + */ proto.types.ResponseSetOption.prototype.setInfo = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -4851,13 +5073,15 @@ proto.types.ResponseInitChain.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseInitChain.prototype.toObject = function(opt_includeInstance) { @@ -4867,8 +5091,8 @@ proto.types.ResponseInitChain.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseInitChain} msg The msg instance to transform. * @return {!Object} @@ -4983,17 +5207,21 @@ proto.types.ResponseInitChain.prototype.getConsensusParams = function() { }; -/** @param {?proto.types.ConsensusParams|undefined} value */ +/** + * @param {?proto.types.ConsensusParams|undefined} value + * @return {!proto.types.ResponseInitChain} returns this +*/ proto.types.ResponseInitChain.prototype.setConsensusParams = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.ResponseInitChain} returns this */ proto.types.ResponseInitChain.prototype.clearConsensusParams = function() { - this.setConsensusParams(undefined); + return this.setConsensusParams(undefined); }; @@ -5016,9 +5244,12 @@ proto.types.ResponseInitChain.prototype.getValidatorsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.ResponseInitChain} returns this +*/ proto.types.ResponseInitChain.prototype.setValidatorsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -5034,9 +5265,10 @@ proto.types.ResponseInitChain.prototype.addValidators = function(opt_value, opt_ /** * Clears the list making it empty but non-null. + * @return {!proto.types.ResponseInitChain} returns this */ proto.types.ResponseInitChain.prototype.clearValidatorsList = function() { - this.setValidatorsList([]); + return this.setValidatorsList([]); }; @@ -5045,13 +5277,15 @@ proto.types.ResponseInitChain.prototype.clearValidatorsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseQuery.prototype.toObject = function(opt_includeInstance) { @@ -5061,8 +5295,8 @@ proto.types.ResponseQuery.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseQuery} msg The msg instance to transform. * @return {!Object} @@ -5243,9 +5477,12 @@ proto.types.ResponseQuery.prototype.getCode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -5258,9 +5495,12 @@ proto.types.ResponseQuery.prototype.getLog = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setLog = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -5273,9 +5513,12 @@ proto.types.ResponseQuery.prototype.getInfo = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setInfo = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -5288,9 +5531,12 @@ proto.types.ResponseQuery.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -5327,9 +5573,12 @@ proto.types.ResponseQuery.prototype.getKey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 6, value); + return jspb.Message.setProto3BytesField(this, 6, value); }; @@ -5366,9 +5615,12 @@ proto.types.ResponseQuery.prototype.getValue_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setValue = function(value) { - jspb.Message.setProto3BytesField(this, 7, value); + return jspb.Message.setProto3BytesField(this, 7, value); }; @@ -5405,9 +5657,12 @@ proto.types.ResponseQuery.prototype.getProof_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setProof = function(value) { - jspb.Message.setProto3BytesField(this, 8, value); + return jspb.Message.setProto3BytesField(this, 8, value); }; @@ -5420,9 +5675,12 @@ proto.types.ResponseQuery.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseQuery} returns this + */ proto.types.ResponseQuery.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + return jspb.Message.setProto3IntField(this, 9, value); }; @@ -5438,13 +5696,15 @@ proto.types.ResponseBeginBlock.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseBeginBlock.prototype.toObject = function(opt_includeInstance) { @@ -5454,8 +5714,8 @@ proto.types.ResponseBeginBlock.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseBeginBlock} msg The msg instance to transform. * @return {!Object} @@ -5556,9 +5816,12 @@ proto.types.ResponseBeginBlock.prototype.getTagsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.ResponseBeginBlock} returns this +*/ proto.types.ResponseBeginBlock.prototype.setTagsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -5574,9 +5837,10 @@ proto.types.ResponseBeginBlock.prototype.addTags = function(opt_value, opt_index /** * Clears the list making it empty but non-null. + * @return {!proto.types.ResponseBeginBlock} returns this */ proto.types.ResponseBeginBlock.prototype.clearTagsList = function() { - this.setTagsList([]); + return this.setTagsList([]); }; @@ -5592,13 +5856,15 @@ proto.types.ResponseCheckTx.repeatedFields_ = [7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { @@ -5608,8 +5874,8 @@ proto.types.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseCheckTx} msg The msg instance to transform. * @return {!Object} @@ -5781,9 +6047,12 @@ proto.types.ResponseCheckTx.prototype.getCode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseCheckTx} returns this + */ proto.types.ResponseCheckTx.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -5820,9 +6089,12 @@ proto.types.ResponseCheckTx.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseCheckTx} returns this + */ proto.types.ResponseCheckTx.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -5835,9 +6107,12 @@ proto.types.ResponseCheckTx.prototype.getLog = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseCheckTx} returns this + */ proto.types.ResponseCheckTx.prototype.setLog = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -5850,9 +6125,12 @@ proto.types.ResponseCheckTx.prototype.getInfo = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseCheckTx} returns this + */ proto.types.ResponseCheckTx.prototype.setInfo = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -5865,9 +6143,12 @@ proto.types.ResponseCheckTx.prototype.getGasWanted = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseCheckTx} returns this + */ proto.types.ResponseCheckTx.prototype.setGasWanted = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -5880,9 +6161,12 @@ proto.types.ResponseCheckTx.prototype.getGasUsed = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseCheckTx} returns this + */ proto.types.ResponseCheckTx.prototype.setGasUsed = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 6, value); }; @@ -5896,9 +6180,12 @@ proto.types.ResponseCheckTx.prototype.getTagsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.ResponseCheckTx} returns this +*/ proto.types.ResponseCheckTx.prototype.setTagsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -5914,9 +6201,10 @@ proto.types.ResponseCheckTx.prototype.addTags = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.types.ResponseCheckTx} returns this */ proto.types.ResponseCheckTx.prototype.clearTagsList = function() { - this.setTagsList([]); + return this.setTagsList([]); }; @@ -5932,13 +6220,15 @@ proto.types.ResponseDeliverTx.repeatedFields_ = [7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseDeliverTx.prototype.toObject = function(opt_includeInstance) { @@ -5948,8 +6238,8 @@ proto.types.ResponseDeliverTx.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseDeliverTx} msg The msg instance to transform. * @return {!Object} @@ -6121,9 +6411,12 @@ proto.types.ResponseDeliverTx.prototype.getCode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseDeliverTx} returns this + */ proto.types.ResponseDeliverTx.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -6160,9 +6453,12 @@ proto.types.ResponseDeliverTx.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseDeliverTx} returns this + */ proto.types.ResponseDeliverTx.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -6175,9 +6471,12 @@ proto.types.ResponseDeliverTx.prototype.getLog = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseDeliverTx} returns this + */ proto.types.ResponseDeliverTx.prototype.setLog = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -6190,9 +6489,12 @@ proto.types.ResponseDeliverTx.prototype.getInfo = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.ResponseDeliverTx} returns this + */ proto.types.ResponseDeliverTx.prototype.setInfo = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -6205,9 +6507,12 @@ proto.types.ResponseDeliverTx.prototype.getGasWanted = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseDeliverTx} returns this + */ proto.types.ResponseDeliverTx.prototype.setGasWanted = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -6220,9 +6525,12 @@ proto.types.ResponseDeliverTx.prototype.getGasUsed = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ResponseDeliverTx} returns this + */ proto.types.ResponseDeliverTx.prototype.setGasUsed = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 6, value); }; @@ -6236,9 +6544,12 @@ proto.types.ResponseDeliverTx.prototype.getTagsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.ResponseDeliverTx} returns this +*/ proto.types.ResponseDeliverTx.prototype.setTagsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -6254,9 +6565,10 @@ proto.types.ResponseDeliverTx.prototype.addTags = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.types.ResponseDeliverTx} returns this */ proto.types.ResponseDeliverTx.prototype.clearTagsList = function() { - this.setTagsList([]); + return this.setTagsList([]); }; @@ -6272,13 +6584,15 @@ proto.types.ResponseEndBlock.repeatedFields_ = [1,3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseEndBlock.prototype.toObject = function(opt_includeInstance) { @@ -6288,8 +6602,8 @@ proto.types.ResponseEndBlock.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseEndBlock} msg The msg instance to transform. * @return {!Object} @@ -6419,9 +6733,12 @@ proto.types.ResponseEndBlock.prototype.getValidatorUpdatesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.ResponseEndBlock} returns this +*/ proto.types.ResponseEndBlock.prototype.setValidatorUpdatesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -6437,9 +6754,10 @@ proto.types.ResponseEndBlock.prototype.addValidatorUpdates = function(opt_value, /** * Clears the list making it empty but non-null. + * @return {!proto.types.ResponseEndBlock} returns this */ proto.types.ResponseEndBlock.prototype.clearValidatorUpdatesList = function() { - this.setValidatorUpdatesList([]); + return this.setValidatorUpdatesList([]); }; @@ -6453,17 +6771,21 @@ proto.types.ResponseEndBlock.prototype.getConsensusParamUpdates = function() { }; -/** @param {?proto.types.ConsensusParams|undefined} value */ +/** + * @param {?proto.types.ConsensusParams|undefined} value + * @return {!proto.types.ResponseEndBlock} returns this +*/ proto.types.ResponseEndBlock.prototype.setConsensusParamUpdates = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.ResponseEndBlock} returns this */ proto.types.ResponseEndBlock.prototype.clearConsensusParamUpdates = function() { - this.setConsensusParamUpdates(undefined); + return this.setConsensusParamUpdates(undefined); }; @@ -6486,9 +6808,12 @@ proto.types.ResponseEndBlock.prototype.getTagsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.ResponseEndBlock} returns this +*/ proto.types.ResponseEndBlock.prototype.setTagsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; @@ -6504,9 +6829,10 @@ proto.types.ResponseEndBlock.prototype.addTags = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.types.ResponseEndBlock} returns this */ proto.types.ResponseEndBlock.prototype.clearTagsList = function() { - this.setTagsList([]); + return this.setTagsList([]); }; @@ -6515,13 +6841,15 @@ proto.types.ResponseEndBlock.prototype.clearTagsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseCommit.prototype.toObject = function(opt_includeInstance) { @@ -6531,8 +6859,8 @@ proto.types.ResponseCommit.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseCommit} msg The msg instance to transform. * @return {!Object} @@ -6653,9 +6981,12 @@ proto.types.ResponseCommit.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.ResponseCommit} returns this + */ proto.types.ResponseCommit.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -6664,13 +6995,15 @@ proto.types.ResponseCommit.prototype.setData = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ConsensusParams.prototype.toObject = function(opt_includeInstance) { @@ -6680,8 +7013,8 @@ proto.types.ConsensusParams.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ConsensusParams} msg The msg instance to transform. * @return {!Object} @@ -6809,17 +7142,21 @@ proto.types.ConsensusParams.prototype.getBlockSize = function() { }; -/** @param {?proto.types.BlockSize|undefined} value */ +/** + * @param {?proto.types.BlockSize|undefined} value + * @return {!proto.types.ConsensusParams} returns this +*/ proto.types.ConsensusParams.prototype.setBlockSize = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.ConsensusParams} returns this */ proto.types.ConsensusParams.prototype.clearBlockSize = function() { - this.setBlockSize(undefined); + return this.setBlockSize(undefined); }; @@ -6842,17 +7179,21 @@ proto.types.ConsensusParams.prototype.getTxSize = function() { }; -/** @param {?proto.types.TxSize|undefined} value */ +/** + * @param {?proto.types.TxSize|undefined} value + * @return {!proto.types.ConsensusParams} returns this +*/ proto.types.ConsensusParams.prototype.setTxSize = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.ConsensusParams} returns this */ proto.types.ConsensusParams.prototype.clearTxSize = function() { - this.setTxSize(undefined); + return this.setTxSize(undefined); }; @@ -6875,17 +7216,21 @@ proto.types.ConsensusParams.prototype.getBlockGossip = function() { }; -/** @param {?proto.types.BlockGossip|undefined} value */ +/** + * @param {?proto.types.BlockGossip|undefined} value + * @return {!proto.types.ConsensusParams} returns this +*/ proto.types.ConsensusParams.prototype.setBlockGossip = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.ConsensusParams} returns this */ proto.types.ConsensusParams.prototype.clearBlockGossip = function() { - this.setBlockGossip(undefined); + return this.setBlockGossip(undefined); }; @@ -6903,13 +7248,15 @@ proto.types.ConsensusParams.prototype.hasBlockGossip = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.BlockSize.prototype.toObject = function(opt_includeInstance) { @@ -6919,8 +7266,8 @@ proto.types.BlockSize.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.BlockSize} msg The msg instance to transform. * @return {!Object} @@ -7029,9 +7376,12 @@ proto.types.BlockSize.prototype.getMaxBytes = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.BlockSize} returns this + */ proto.types.BlockSize.prototype.setMaxBytes = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -7044,9 +7394,12 @@ proto.types.BlockSize.prototype.getMaxGas = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.BlockSize} returns this + */ proto.types.BlockSize.prototype.setMaxGas = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -7055,13 +7408,15 @@ proto.types.BlockSize.prototype.setMaxGas = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.TxSize.prototype.toObject = function(opt_includeInstance) { @@ -7071,8 +7426,8 @@ proto.types.TxSize.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.TxSize} msg The msg instance to transform. * @return {!Object} @@ -7181,9 +7536,12 @@ proto.types.TxSize.prototype.getMaxBytes = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.TxSize} returns this + */ proto.types.TxSize.prototype.setMaxBytes = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -7196,9 +7554,12 @@ proto.types.TxSize.prototype.getMaxGas = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.TxSize} returns this + */ proto.types.TxSize.prototype.setMaxGas = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -7207,13 +7568,15 @@ proto.types.TxSize.prototype.setMaxGas = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.BlockGossip.prototype.toObject = function(opt_includeInstance) { @@ -7223,8 +7586,8 @@ proto.types.BlockGossip.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.BlockGossip} msg The msg instance to transform. * @return {!Object} @@ -7321,9 +7684,12 @@ proto.types.BlockGossip.prototype.getBlockPartSizeBytes = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.BlockGossip} returns this + */ proto.types.BlockGossip.prototype.setBlockPartSizeBytes = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -7339,13 +7705,15 @@ proto.types.LastCommitInfo.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.LastCommitInfo.prototype.toObject = function(opt_includeInstance) { @@ -7355,8 +7723,8 @@ proto.types.LastCommitInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.LastCommitInfo} msg The msg instance to transform. * @return {!Object} @@ -7468,9 +7836,12 @@ proto.types.LastCommitInfo.prototype.getRound = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.LastCommitInfo} returns this + */ proto.types.LastCommitInfo.prototype.setRound = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -7484,9 +7855,12 @@ proto.types.LastCommitInfo.prototype.getVotesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.types.LastCommitInfo} returns this +*/ proto.types.LastCommitInfo.prototype.setVotesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -7502,9 +7876,10 @@ proto.types.LastCommitInfo.prototype.addVotes = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.types.LastCommitInfo} returns this */ proto.types.LastCommitInfo.prototype.clearVotesList = function() { - this.setVotesList([]); + return this.setVotesList([]); }; @@ -7513,13 +7888,15 @@ proto.types.LastCommitInfo.prototype.clearVotesList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.Header.prototype.toObject = function(opt_includeInstance) { @@ -7529,8 +7906,8 @@ proto.types.Header.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Header} msg The msg instance to transform. * @return {!Object} @@ -7799,9 +8176,12 @@ proto.types.Header.prototype.getChainId = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setChainId = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -7814,9 +8194,12 @@ proto.types.Header.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -7830,17 +8213,21 @@ proto.types.Header.prototype.getTime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.types.Header} returns this +*/ proto.types.Header.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Header} returns this */ proto.types.Header.prototype.clearTime = function() { - this.setTime(undefined); + return this.setTime(undefined); }; @@ -7862,9 +8249,12 @@ proto.types.Header.prototype.getNumTxs = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setNumTxs = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -7877,9 +8267,12 @@ proto.types.Header.prototype.getTotalTxs = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setTotalTxs = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -7893,17 +8286,21 @@ proto.types.Header.prototype.getLastBlockId = function() { }; -/** @param {?proto.types.BlockID|undefined} value */ +/** + * @param {?proto.types.BlockID|undefined} value + * @return {!proto.types.Header} returns this +*/ proto.types.Header.prototype.setLastBlockId = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Header} returns this */ proto.types.Header.prototype.clearLastBlockId = function() { - this.setLastBlockId(undefined); + return this.setLastBlockId(undefined); }; @@ -7949,9 +8346,12 @@ proto.types.Header.prototype.getLastCommitHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setLastCommitHash = function(value) { - jspb.Message.setProto3BytesField(this, 7, value); + return jspb.Message.setProto3BytesField(this, 7, value); }; @@ -7988,9 +8388,12 @@ proto.types.Header.prototype.getDataHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setDataHash = function(value) { - jspb.Message.setProto3BytesField(this, 8, value); + return jspb.Message.setProto3BytesField(this, 8, value); }; @@ -8027,9 +8430,12 @@ proto.types.Header.prototype.getValidatorsHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setValidatorsHash = function(value) { - jspb.Message.setProto3BytesField(this, 9, value); + return jspb.Message.setProto3BytesField(this, 9, value); }; @@ -8066,9 +8472,12 @@ proto.types.Header.prototype.getNextValidatorsHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setNextValidatorsHash = function(value) { - jspb.Message.setProto3BytesField(this, 10, value); + return jspb.Message.setProto3BytesField(this, 10, value); }; @@ -8105,9 +8514,12 @@ proto.types.Header.prototype.getConsensusHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setConsensusHash = function(value) { - jspb.Message.setProto3BytesField(this, 11, value); + return jspb.Message.setProto3BytesField(this, 11, value); }; @@ -8144,9 +8556,12 @@ proto.types.Header.prototype.getAppHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setAppHash = function(value) { - jspb.Message.setProto3BytesField(this, 12, value); + return jspb.Message.setProto3BytesField(this, 12, value); }; @@ -8183,9 +8598,12 @@ proto.types.Header.prototype.getLastResultsHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setLastResultsHash = function(value) { - jspb.Message.setProto3BytesField(this, 13, value); + return jspb.Message.setProto3BytesField(this, 13, value); }; @@ -8222,9 +8640,12 @@ proto.types.Header.prototype.getEvidenceHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setEvidenceHash = function(value) { - jspb.Message.setProto3BytesField(this, 14, value); + return jspb.Message.setProto3BytesField(this, 14, value); }; @@ -8261,9 +8682,12 @@ proto.types.Header.prototype.getProposerAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Header} returns this + */ proto.types.Header.prototype.setProposerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 15, value); + return jspb.Message.setProto3BytesField(this, 15, value); }; @@ -8272,13 +8696,15 @@ proto.types.Header.prototype.setProposerAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.BlockID.prototype.toObject = function(opt_includeInstance) { @@ -8288,8 +8714,8 @@ proto.types.BlockID.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.BlockID} msg The msg instance to transform. * @return {!Object} @@ -8424,9 +8850,12 @@ proto.types.BlockID.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.BlockID} returns this + */ proto.types.BlockID.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -8440,17 +8869,21 @@ proto.types.BlockID.prototype.getPartsHeader = function() { }; -/** @param {?proto.types.PartSetHeader|undefined} value */ +/** + * @param {?proto.types.PartSetHeader|undefined} value + * @return {!proto.types.BlockID} returns this +*/ proto.types.BlockID.prototype.setPartsHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.BlockID} returns this */ proto.types.BlockID.prototype.clearPartsHeader = function() { - this.setPartsHeader(undefined); + return this.setPartsHeader(undefined); }; @@ -8468,13 +8901,15 @@ proto.types.BlockID.prototype.hasPartsHeader = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.PartSetHeader.prototype.toObject = function(opt_includeInstance) { @@ -8484,8 +8919,8 @@ proto.types.PartSetHeader.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.PartSetHeader} msg The msg instance to transform. * @return {!Object} @@ -8594,9 +9029,12 @@ proto.types.PartSetHeader.prototype.getTotal = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.PartSetHeader} returns this + */ proto.types.PartSetHeader.prototype.setTotal = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -8633,9 +9071,12 @@ proto.types.PartSetHeader.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.PartSetHeader} returns this + */ proto.types.PartSetHeader.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -8644,13 +9085,15 @@ proto.types.PartSetHeader.prototype.setHash = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.Validator.prototype.toObject = function(opt_includeInstance) { @@ -8660,8 +9103,8 @@ proto.types.Validator.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Validator} msg The msg instance to transform. * @return {!Object} @@ -8794,9 +9237,12 @@ proto.types.Validator.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.Validator} returns this + */ proto.types.Validator.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -8809,9 +9255,12 @@ proto.types.Validator.prototype.getPower = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.Validator} returns this + */ proto.types.Validator.prototype.setPower = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -8820,13 +9269,15 @@ proto.types.Validator.prototype.setPower = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.ValidatorUpdate.prototype.toObject = function(opt_includeInstance) { @@ -8836,8 +9287,8 @@ proto.types.ValidatorUpdate.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ValidatorUpdate} msg The msg instance to transform. * @return {!Object} @@ -8949,17 +9400,21 @@ proto.types.ValidatorUpdate.prototype.getPubKey = function() { }; -/** @param {?proto.types.PubKey|undefined} value */ +/** + * @param {?proto.types.PubKey|undefined} value + * @return {!proto.types.ValidatorUpdate} returns this +*/ proto.types.ValidatorUpdate.prototype.setPubKey = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.ValidatorUpdate} returns this */ proto.types.ValidatorUpdate.prototype.clearPubKey = function() { - this.setPubKey(undefined); + return this.setPubKey(undefined); }; @@ -8981,9 +9436,12 @@ proto.types.ValidatorUpdate.prototype.getPower = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.ValidatorUpdate} returns this + */ proto.types.ValidatorUpdate.prototype.setPower = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -8992,13 +9450,15 @@ proto.types.ValidatorUpdate.prototype.setPower = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.VoteInfo.prototype.toObject = function(opt_includeInstance) { @@ -9008,8 +9468,8 @@ proto.types.VoteInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.VoteInfo} msg The msg instance to transform. * @return {!Object} @@ -9018,7 +9478,7 @@ proto.types.VoteInfo.prototype.toObject = function(opt_includeInstance) { proto.types.VoteInfo.toObject = function(includeInstance, msg) { var f, obj = { validator: (f = msg.getValidator()) && proto.types.Validator.toObject(includeInstance, f), - signedLastBlock: jspb.Message.getFieldWithDefault(msg, 2, false) + signedLastBlock: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -9121,17 +9581,21 @@ proto.types.VoteInfo.prototype.getValidator = function() { }; -/** @param {?proto.types.Validator|undefined} value */ +/** + * @param {?proto.types.Validator|undefined} value + * @return {!proto.types.VoteInfo} returns this +*/ proto.types.VoteInfo.prototype.setValidator = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.VoteInfo} returns this */ proto.types.VoteInfo.prototype.clearValidator = function() { - this.setValidator(undefined); + return this.setValidator(undefined); }; @@ -9146,18 +9610,19 @@ proto.types.VoteInfo.prototype.hasValidator = function() { /** * optional bool signed_last_block = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.types.VoteInfo.prototype.getSignedLastBlock = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.types.VoteInfo} returns this + */ proto.types.VoteInfo.prototype.setSignedLastBlock = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -9166,13 +9631,15 @@ proto.types.VoteInfo.prototype.setSignedLastBlock = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.PubKey.prototype.toObject = function(opt_includeInstance) { @@ -9182,8 +9649,8 @@ proto.types.PubKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.PubKey} msg The msg instance to transform. * @return {!Object} @@ -9292,9 +9759,12 @@ proto.types.PubKey.prototype.getType = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.PubKey} returns this + */ proto.types.PubKey.prototype.setType = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -9331,9 +9801,12 @@ proto.types.PubKey.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.types.PubKey} returns this + */ proto.types.PubKey.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -9342,13 +9815,15 @@ proto.types.PubKey.prototype.setData = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.types.Evidence.prototype.toObject = function(opt_includeInstance) { @@ -9358,8 +9833,8 @@ proto.types.Evidence.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Evidence} msg The msg instance to transform. * @return {!Object} @@ -9508,9 +9983,12 @@ proto.types.Evidence.prototype.getType = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.types.Evidence} returns this + */ proto.types.Evidence.prototype.setType = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -9524,17 +10002,21 @@ proto.types.Evidence.prototype.getValidator = function() { }; -/** @param {?proto.types.Validator|undefined} value */ +/** + * @param {?proto.types.Validator|undefined} value + * @return {!proto.types.Evidence} returns this +*/ proto.types.Evidence.prototype.setValidator = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Evidence} returns this */ proto.types.Evidence.prototype.clearValidator = function() { - this.setValidator(undefined); + return this.setValidator(undefined); }; @@ -9556,9 +10038,12 @@ proto.types.Evidence.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.Evidence} returns this + */ proto.types.Evidence.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -9572,17 +10057,21 @@ proto.types.Evidence.prototype.getTime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.types.Evidence} returns this +*/ proto.types.Evidence.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.types.Evidence} returns this */ proto.types.Evidence.prototype.clearTime = function() { - this.setTime(undefined); + return this.setTime(undefined); }; @@ -9604,9 +10093,12 @@ proto.types.Evidence.prototype.getTotalVotingPower = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.types.Evidence} returns this + */ proto.types.Evidence.prototype.setTotalVotingPower = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; diff --git a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js index 50a8dd5ff..0c37c73c4 100644 --- a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js +++ b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js @@ -1,3 +1,4 @@ +// source: github.com/tendermint/tendermint/libs/common/types.proto /** * @fileoverview * @enhanceable @@ -62,13 +63,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.common.KVPair.prototype.toObject = function(opt_includeInstance) { @@ -78,8 +81,8 @@ proto.common.KVPair.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.common.KVPair} msg The msg instance to transform. * @return {!Object} @@ -212,9 +215,12 @@ proto.common.KVPair.prototype.getKey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.common.KVPair} returns this + */ proto.common.KVPair.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -251,9 +257,12 @@ proto.common.KVPair.prototype.getValue_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.common.KVPair} returns this + */ proto.common.KVPair.prototype.setValue = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -262,13 +271,15 @@ proto.common.KVPair.prototype.setValue = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.common.KI64Pair.prototype.toObject = function(opt_includeInstance) { @@ -278,8 +289,8 @@ proto.common.KI64Pair.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.common.KI64Pair} msg The msg instance to transform. * @return {!Object} @@ -412,9 +423,12 @@ proto.common.KI64Pair.prototype.getKey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.common.KI64Pair} returns this + */ proto.common.KI64Pair.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -427,9 +441,12 @@ proto.common.KI64Pair.prototype.getValue = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.common.KI64Pair} returns this + */ proto.common.KI64Pair.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/google/protobuf/descriptor_pb.js b/js/proto/google/protobuf/descriptor_pb.js index ded89114d..b15f0941d 100644 --- a/js/proto/google/protobuf/descriptor_pb.js +++ b/js/proto/google/protobuf/descriptor_pb.js @@ -1,3 +1,4 @@ +// source: google/protobuf/descriptor.proto /** * @fileoverview * @enhanceable @@ -893,13 +894,15 @@ proto.google.protobuf.FileDescriptorSet.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FileDescriptorSet.prototype.toObject = function(opt_includeInstance) { @@ -909,8 +912,8 @@ proto.google.protobuf.FileDescriptorSet.prototype.toObject = function(opt_includ /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FileDescriptorSet} msg The msg instance to transform. * @return {!Object} @@ -1011,9 +1014,12 @@ proto.google.protobuf.FileDescriptorSet.prototype.getFileList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorSet} returns this +*/ proto.google.protobuf.FileDescriptorSet.prototype.setFileList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -1029,9 +1035,10 @@ proto.google.protobuf.FileDescriptorSet.prototype.addFile = function(opt_value, /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorSet} returns this */ proto.google.protobuf.FileDescriptorSet.prototype.clearFileList = function() { - this.setFileList([]); + return this.setFileList([]); }; @@ -1047,13 +1054,15 @@ proto.google.protobuf.FileDescriptorProto.repeatedFields_ = [3,10,11,4,5,6,7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -1063,8 +1072,8 @@ proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_incl /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FileDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -1072,11 +1081,11 @@ proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_incl */ proto.google.protobuf.FileDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), - pb_package: jspb.Message.getField(msg, 2), - dependencyList: jspb.Message.getRepeatedField(msg, 3), - publicDependencyList: jspb.Message.getRepeatedField(msg, 10), - weakDependencyList: jspb.Message.getRepeatedField(msg, 11), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + pb_package: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + dependencyList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + publicDependencyList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, + weakDependencyList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, messageTypeList: jspb.Message.toObjectList(msg.getMessageTypeList(), proto.google.protobuf.DescriptorProto.toObject, includeInstance), enumTypeList: jspb.Message.toObjectList(msg.getEnumTypeList(), @@ -1087,7 +1096,7 @@ proto.google.protobuf.FileDescriptorProto.toObject = function(includeInstance, m proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), options: (f = msg.getOptions()) && proto.google.protobuf.FileOptions.toObject(includeInstance, f), sourceCodeInfo: (f = msg.getSourceCodeInfo()) && proto.google.protobuf.SourceCodeInfo.toObject(includeInstance, f), - syntax: jspb.Message.getField(msg, 12) + syntax: (f = jspb.Message.getField(msg, 12)) == null ? undefined : f }; if (includeInstance) { @@ -1309,17 +1318,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -1341,17 +1354,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getPackage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setPackage = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearPackage = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -1373,26 +1390,31 @@ proto.google.protobuf.FileDescriptorProto.prototype.getDependencyList = function }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setDependencyList = function(value) { - jspb.Message.setField(this, 3, value || []); + return jspb.Message.setField(this, 3, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.addDependency = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 3, value, opt_index); + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearDependencyList = function() { - this.setDependencyList([]); + return this.setDependencyList([]); }; @@ -1405,26 +1427,31 @@ proto.google.protobuf.FileDescriptorProto.prototype.getPublicDependencyList = fu }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setPublicDependencyList = function(value) { - jspb.Message.setField(this, 10, value || []); + return jspb.Message.setField(this, 10, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.addPublicDependency = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 10, value, opt_index); + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearPublicDependencyList = function() { - this.setPublicDependencyList([]); + return this.setPublicDependencyList([]); }; @@ -1437,26 +1464,31 @@ proto.google.protobuf.FileDescriptorProto.prototype.getWeakDependencyList = func }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setWeakDependencyList = function(value) { - jspb.Message.setField(this, 11, value || []); + return jspb.Message.setField(this, 11, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.addWeakDependency = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 11, value, opt_index); + return jspb.Message.addToRepeatedField(this, 11, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearWeakDependencyList = function() { - this.setWeakDependencyList([]); + return this.setWeakDependencyList([]); }; @@ -1470,9 +1502,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.getMessageTypeList = functio }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setMessageTypeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -1488,9 +1523,10 @@ proto.google.protobuf.FileDescriptorProto.prototype.addMessageType = function(op /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearMessageTypeList = function() { - this.setMessageTypeList([]); + return this.setMessageTypeList([]); }; @@ -1504,9 +1540,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.getEnumTypeList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setEnumTypeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); + return jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -1522,9 +1561,10 @@ proto.google.protobuf.FileDescriptorProto.prototype.addEnumType = function(opt_v /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearEnumTypeList = function() { - this.setEnumTypeList([]); + return this.setEnumTypeList([]); }; @@ -1538,9 +1578,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.getServiceList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setServiceList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 6, value); + return jspb.Message.setRepeatedWrapperField(this, 6, value); }; @@ -1556,9 +1599,10 @@ proto.google.protobuf.FileDescriptorProto.prototype.addService = function(opt_va /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearServiceList = function() { - this.setServiceList([]); + return this.setServiceList([]); }; @@ -1572,9 +1616,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.getExtensionList = function( }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setExtensionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -1590,9 +1637,10 @@ proto.google.protobuf.FileDescriptorProto.prototype.addExtension$ = function(opt /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearExtensionList = function() { - this.setExtensionList([]); + return this.setExtensionList([]); }; @@ -1606,17 +1654,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.FileOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.FileOptions|undefined} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 8, value); + return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -1639,17 +1691,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getSourceCodeInfo = function }; -/** @param {?proto.google.protobuf.SourceCodeInfo|undefined} value */ +/** + * @param {?proto.google.protobuf.SourceCodeInfo|undefined} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setSourceCodeInfo = function(value) { - jspb.Message.setWrapperField(this, 9, value); + return jspb.Message.setWrapperField(this, 9, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearSourceCodeInfo = function() { - this.setSourceCodeInfo(undefined); + return this.setSourceCodeInfo(undefined); }; @@ -1671,17 +1727,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getSyntax = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setSyntax = function(value) { - jspb.Message.setField(this, 12, value); + return jspb.Message.setField(this, 12, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.clearSyntax = function() { - jspb.Message.setField(this, 12, undefined); + return jspb.Message.setField(this, 12, undefined); }; @@ -1706,13 +1766,15 @@ proto.google.protobuf.DescriptorProto.repeatedFields_ = [2,6,3,4,5,8,9,10]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -1722,8 +1784,8 @@ proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeI /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.DescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -1731,7 +1793,7 @@ proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeI */ proto.google.protobuf.DescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, fieldList: jspb.Message.toObjectList(msg.getFieldList(), proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), extensionList: jspb.Message.toObjectList(msg.getExtensionList(), @@ -1747,7 +1809,7 @@ proto.google.protobuf.DescriptorProto.toObject = function(includeInstance, msg) options: (f = msg.getOptions()) && proto.google.protobuf.MessageOptions.toObject(includeInstance, f), reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), proto.google.protobuf.DescriptorProto.ReservedRange.toObject, includeInstance), - reservedNameList: jspb.Message.getRepeatedField(msg, 10) + reservedNameList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f }; if (includeInstance) { @@ -1947,13 +2009,15 @@ proto.google.protobuf.DescriptorProto.serializeBinaryToWriter = function(message if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = function(opt_includeInstance) { @@ -1963,8 +2027,8 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = functi /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} msg The msg instance to transform. * @return {!Object} @@ -1972,8 +2036,8 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = functi */ proto.google.protobuf.DescriptorProto.ExtensionRange.toObject = function(includeInstance, msg) { var f, obj = { - start: jspb.Message.getField(msg, 1), - end: jspb.Message.getField(msg, 2), + start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.ExtensionRangeOptions.toObject(includeInstance, f) }; @@ -2087,17 +2151,21 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getStart = functi }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setStart = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearStart = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -2119,17 +2187,21 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getEnd = function }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setEnd = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearEnd = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -2152,17 +2224,21 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getOptions = func }; -/** @param {?proto.google.protobuf.ExtensionRangeOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.ExtensionRangeOptions|undefined} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this +*/ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -2180,13 +2256,15 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasOptions = func if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = function(opt_includeInstance) { @@ -2196,8 +2274,8 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = functio /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} msg The msg instance to transform. * @return {!Object} @@ -2205,8 +2283,8 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = functio */ proto.google.protobuf.DescriptorProto.ReservedRange.toObject = function(includeInstance, msg) { var f, obj = { - start: jspb.Message.getField(msg, 1), - end: jspb.Message.getField(msg, 2) + start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -2306,17 +2384,21 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getStart = functio }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setStart = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearStart = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -2338,17 +2420,21 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getEnd = function( }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setEnd = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearEnd = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -2370,17 +2456,21 @@ proto.google.protobuf.DescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -2403,9 +2493,12 @@ proto.google.protobuf.DescriptorProto.prototype.getFieldList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setFieldList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -2421,9 +2514,10 @@ proto.google.protobuf.DescriptorProto.prototype.addField = function(opt_value, o /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearFieldList = function() { - this.setFieldList([]); + return this.setFieldList([]); }; @@ -2437,9 +2531,12 @@ proto.google.protobuf.DescriptorProto.prototype.getExtensionList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setExtensionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 6, value); + return jspb.Message.setRepeatedWrapperField(this, 6, value); }; @@ -2455,9 +2552,10 @@ proto.google.protobuf.DescriptorProto.prototype.addExtension$ = function(opt_val /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearExtensionList = function() { - this.setExtensionList([]); + return this.setExtensionList([]); }; @@ -2471,9 +2569,12 @@ proto.google.protobuf.DescriptorProto.prototype.getNestedTypeList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setNestedTypeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; @@ -2489,9 +2590,10 @@ proto.google.protobuf.DescriptorProto.prototype.addNestedType = function(opt_val /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearNestedTypeList = function() { - this.setNestedTypeList([]); + return this.setNestedTypeList([]); }; @@ -2505,9 +2607,12 @@ proto.google.protobuf.DescriptorProto.prototype.getEnumTypeList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setEnumTypeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -2523,9 +2628,10 @@ proto.google.protobuf.DescriptorProto.prototype.addEnumType = function(opt_value /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearEnumTypeList = function() { - this.setEnumTypeList([]); + return this.setEnumTypeList([]); }; @@ -2539,9 +2645,12 @@ proto.google.protobuf.DescriptorProto.prototype.getExtensionRangeList = function }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setExtensionRangeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); + return jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -2557,9 +2666,10 @@ proto.google.protobuf.DescriptorProto.prototype.addExtensionRange = function(opt /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearExtensionRangeList = function() { - this.setExtensionRangeList([]); + return this.setExtensionRangeList([]); }; @@ -2573,9 +2683,12 @@ proto.google.protobuf.DescriptorProto.prototype.getOneofDeclList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setOneofDeclList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 8, value); + return jspb.Message.setRepeatedWrapperField(this, 8, value); }; @@ -2591,9 +2704,10 @@ proto.google.protobuf.DescriptorProto.prototype.addOneofDecl = function(opt_valu /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearOneofDeclList = function() { - this.setOneofDeclList([]); + return this.setOneofDeclList([]); }; @@ -2607,17 +2721,21 @@ proto.google.protobuf.DescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.MessageOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.MessageOptions|undefined} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 7, value); + return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -2640,9 +2758,12 @@ proto.google.protobuf.DescriptorProto.prototype.getReservedRangeList = function( }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setReservedRangeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 9, value); + return jspb.Message.setRepeatedWrapperField(this, 9, value); }; @@ -2658,9 +2779,10 @@ proto.google.protobuf.DescriptorProto.prototype.addReservedRange = function(opt_ /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearReservedRangeList = function() { - this.setReservedRangeList([]); + return this.setReservedRangeList([]); }; @@ -2673,26 +2795,31 @@ proto.google.protobuf.DescriptorProto.prototype.getReservedNameList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.setReservedNameList = function(value) { - jspb.Message.setField(this, 10, value || []); + return jspb.Message.setField(this, 10, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.addReservedName = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 10, value, opt_index); + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.clearReservedNameList = function() { - this.setReservedNameList([]); + return this.setReservedNameList([]); }; @@ -2708,13 +2835,15 @@ proto.google.protobuf.ExtensionRangeOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.ExtensionRangeOptions.prototype.toObject = function(opt_includeInstance) { @@ -2724,8 +2853,8 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.toObject = function(opt_in /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.ExtensionRangeOptions} msg The msg instance to transform. * @return {!Object} @@ -2834,9 +2963,12 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.getUninterpretedOptionList }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this +*/ proto.google.protobuf.ExtensionRangeOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -2852,9 +2984,10 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.addUninterpretedOption = f /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this */ proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -2863,13 +2996,15 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionLi if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -2879,8 +3014,8 @@ proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_inc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FieldDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -2888,15 +3023,15 @@ proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_inc */ proto.google.protobuf.FieldDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), - number: jspb.Message.getField(msg, 3), - label: jspb.Message.getField(msg, 4), - type: jspb.Message.getField(msg, 5), - typeName: jspb.Message.getField(msg, 6), - extendee: jspb.Message.getField(msg, 2), - defaultValue: jspb.Message.getField(msg, 7), - oneofIndex: jspb.Message.getField(msg, 9), - jsonName: jspb.Message.getField(msg, 10), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + number: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + label: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + type: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + typeName: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f, + extendee: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + defaultValue: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f, + oneofIndex: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f, + jsonName: (f = jspb.Message.getField(msg, 10)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.FieldOptions.toObject(includeInstance, f) }; @@ -3120,17 +3255,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -3152,17 +3291,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getNumber = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setNumber = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearNumber = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -3184,17 +3327,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getLabel = function() { }; -/** @param {!proto.google.protobuf.FieldDescriptorProto.Label} value */ +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Label} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setLabel = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearLabel = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -3216,17 +3363,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getType = function() { }; -/** @param {!proto.google.protobuf.FieldDescriptorProto.Type} value */ +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Type} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setType = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearType = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; @@ -3248,17 +3399,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getTypeName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setTypeName = function(value) { - jspb.Message.setField(this, 6, value); + return jspb.Message.setField(this, 6, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearTypeName = function() { - jspb.Message.setField(this, 6, undefined); + return jspb.Message.setField(this, 6, undefined); }; @@ -3280,17 +3435,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getExtendee = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setExtendee = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearExtendee = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -3312,17 +3471,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getDefaultValue = function( }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setDefaultValue = function(value) { - jspb.Message.setField(this, 7, value); + return jspb.Message.setField(this, 7, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearDefaultValue = function() { - jspb.Message.setField(this, 7, undefined); + return jspb.Message.setField(this, 7, undefined); }; @@ -3344,17 +3507,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getOneofIndex = function() }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setOneofIndex = function(value) { - jspb.Message.setField(this, 9, value); + return jspb.Message.setField(this, 9, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearOneofIndex = function() { - jspb.Message.setField(this, 9, undefined); + return jspb.Message.setField(this, 9, undefined); }; @@ -3376,17 +3543,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getJsonName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setJsonName = function(value) { - jspb.Message.setField(this, 10, value); + return jspb.Message.setField(this, 10, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearJsonName = function() { - jspb.Message.setField(this, 10, undefined); + return jspb.Message.setField(this, 10, undefined); }; @@ -3409,17 +3580,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.FieldOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.FieldOptions|undefined} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this +*/ proto.google.protobuf.FieldDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 8, value); + return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this */ proto.google.protobuf.FieldDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -3437,13 +3612,15 @@ proto.google.protobuf.FieldDescriptorProto.prototype.hasOptions = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -3453,8 +3630,8 @@ proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_inc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.OneofDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -3462,7 +3639,7 @@ proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_inc */ proto.google.protobuf.OneofDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.OneofOptions.toObject(includeInstance, f) }; @@ -3565,17 +3742,21 @@ proto.google.protobuf.OneofDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this + */ proto.google.protobuf.OneofDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this */ proto.google.protobuf.OneofDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -3598,17 +3779,21 @@ proto.google.protobuf.OneofDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.OneofOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.OneofOptions|undefined} value + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this +*/ proto.google.protobuf.OneofDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this */ proto.google.protobuf.OneofDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -3633,13 +3818,15 @@ proto.google.protobuf.EnumDescriptorProto.repeatedFields_ = [2,4,5]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -3649,8 +3836,8 @@ proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_incl /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -3658,13 +3845,13 @@ proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_incl */ proto.google.protobuf.EnumDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, valueList: jspb.Message.toObjectList(msg.getValueList(), proto.google.protobuf.EnumValueDescriptorProto.toObject, includeInstance), options: (f = msg.getOptions()) && proto.google.protobuf.EnumOptions.toObject(includeInstance, f), reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject, includeInstance), - reservedNameList: jspb.Message.getRepeatedField(msg, 5) + reservedNameList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f }; if (includeInstance) { @@ -3799,13 +3986,15 @@ proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter = function(mes if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = function(opt_includeInstance) { @@ -3815,8 +4004,8 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} msg The msg instance to transform. * @return {!Object} @@ -3824,8 +4013,8 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject = function(includeInstance, msg) { var f, obj = { - start: jspb.Message.getField(msg, 1), - end: jspb.Message.getField(msg, 2) + start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -3925,17 +4114,21 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getStart = }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setStart = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearStart = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -3957,17 +4150,21 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getEnd = f }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setEnd = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearEnd = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -3989,17 +4186,21 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ proto.google.protobuf.EnumDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -4022,9 +4223,12 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getValueList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ proto.google.protobuf.EnumDescriptorProto.prototype.setValueList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -4040,9 +4244,10 @@ proto.google.protobuf.EnumDescriptorProto.prototype.addValue = function(opt_valu /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.clearValueList = function() { - this.setValueList([]); + return this.setValueList([]); }; @@ -4056,17 +4261,21 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.EnumOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.EnumOptions|undefined} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ proto.google.protobuf.EnumDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -4089,9 +4298,12 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getReservedRangeList = funct }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ proto.google.protobuf.EnumDescriptorProto.prototype.setReservedRangeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -4107,9 +4319,10 @@ proto.google.protobuf.EnumDescriptorProto.prototype.addReservedRange = function( /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedRangeList = function() { - this.setReservedRangeList([]); + return this.setReservedRangeList([]); }; @@ -4122,26 +4335,31 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getReservedNameList = functi }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ proto.google.protobuf.EnumDescriptorProto.prototype.setReservedNameList = function(value) { - jspb.Message.setField(this, 5, value || []); + return jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.addReservedName = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 5, value, opt_index); + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedNameList = function() { - this.setReservedNameList([]); + return this.setReservedNameList([]); }; @@ -4150,13 +4368,15 @@ proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedNameList = func if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -4166,8 +4386,8 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumValueDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -4175,8 +4395,8 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt */ proto.google.protobuf.EnumValueDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), - number: jspb.Message.getField(msg, 2), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + number: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.EnumValueOptions.toObject(includeInstance, f) }; @@ -4290,17 +4510,21 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ proto.google.protobuf.EnumValueDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this */ proto.google.protobuf.EnumValueDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -4322,17 +4546,21 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.getNumber = function() }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ proto.google.protobuf.EnumValueDescriptorProto.prototype.setNumber = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this */ proto.google.protobuf.EnumValueDescriptorProto.prototype.clearNumber = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -4355,17 +4583,21 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.getOptions = function() }; -/** @param {?proto.google.protobuf.EnumValueOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.EnumValueOptions|undefined} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this +*/ proto.google.protobuf.EnumValueDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this */ proto.google.protobuf.EnumValueDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -4390,13 +4622,15 @@ proto.google.protobuf.ServiceDescriptorProto.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -4406,8 +4640,8 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_i /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.ServiceDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -4415,7 +4649,7 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_i */ proto.google.protobuf.ServiceDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, methodList: jspb.Message.toObjectList(msg.getMethodList(), proto.google.protobuf.MethodDescriptorProto.toObject, includeInstance), options: (f = msg.getOptions()) && proto.google.protobuf.ServiceOptions.toObject(includeInstance, f) @@ -4533,17 +4767,21 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ proto.google.protobuf.ServiceDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this */ proto.google.protobuf.ServiceDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -4566,9 +4804,12 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.getMethodList = function( }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this +*/ proto.google.protobuf.ServiceDescriptorProto.prototype.setMethodList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -4584,9 +4825,10 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.addMethod = function(opt_ /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this */ proto.google.protobuf.ServiceDescriptorProto.prototype.clearMethodList = function() { - this.setMethodList([]); + return this.setMethodList([]); }; @@ -4600,17 +4842,21 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.ServiceOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.ServiceOptions|undefined} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this +*/ proto.google.protobuf.ServiceDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this */ proto.google.protobuf.ServiceDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -4628,13 +4874,15 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.hasOptions = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -4644,8 +4892,8 @@ proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_in /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.MethodDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -4653,12 +4901,12 @@ proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_in */ proto.google.protobuf.MethodDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), - inputType: jspb.Message.getField(msg, 2), - outputType: jspb.Message.getField(msg, 3), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + inputType: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + outputType: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.MethodOptions.toObject(includeInstance, f), - clientStreaming: jspb.Message.getFieldWithDefault(msg, 5, false), - serverStreaming: jspb.Message.getFieldWithDefault(msg, 6, false) + clientStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + serverStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -4804,17 +5052,21 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this */ proto.google.protobuf.MethodDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -4836,17 +5088,21 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getInputType = function() }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setInputType = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this */ proto.google.protobuf.MethodDescriptorProto.prototype.clearInputType = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -4868,17 +5124,21 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getOutputType = function() }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setOutputType = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this */ proto.google.protobuf.MethodDescriptorProto.prototype.clearOutputType = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -4901,17 +5161,21 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.MethodOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.MethodOptions|undefined} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this +*/ proto.google.protobuf.MethodDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this */ proto.google.protobuf.MethodDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -4926,26 +5190,28 @@ proto.google.protobuf.MethodDescriptorProto.prototype.hasOptions = function() { /** * optional bool client_streaming = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MethodDescriptorProto.prototype.getClientStreaming = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setClientStreaming = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this */ proto.google.protobuf.MethodDescriptorProto.prototype.clearClientStreaming = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; @@ -4960,26 +5226,28 @@ proto.google.protobuf.MethodDescriptorProto.prototype.hasClientStreaming = funct /** * optional bool server_streaming = 6; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MethodDescriptorProto.prototype.getServerStreaming = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setServerStreaming = function(value) { - jspb.Message.setField(this, 6, value); + return jspb.Message.setField(this, 6, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this */ proto.google.protobuf.MethodDescriptorProto.prototype.clearServerStreaming = function() { - jspb.Message.setField(this, 6, undefined); + return jspb.Message.setField(this, 6, undefined); }; @@ -5004,13 +5272,15 @@ proto.google.protobuf.FileOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInstance) { @@ -5020,8 +5290,8 @@ proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FileOptions} msg The msg instance to transform. * @return {!Object} @@ -5029,26 +5299,26 @@ proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInsta */ proto.google.protobuf.FileOptions.toObject = function(includeInstance, msg) { var f, obj = { - javaPackage: jspb.Message.getField(msg, 1), - javaOuterClassname: jspb.Message.getField(msg, 8), - javaMultipleFiles: jspb.Message.getFieldWithDefault(msg, 10, false), - javaGenerateEqualsAndHash: jspb.Message.getField(msg, 20), - javaStringCheckUtf8: jspb.Message.getFieldWithDefault(msg, 27, false), + javaPackage: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + javaOuterClassname: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f, + javaMultipleFiles: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + javaGenerateEqualsAndHash: (f = jspb.Message.getBooleanField(msg, 20)) == null ? undefined : f, + javaStringCheckUtf8: jspb.Message.getBooleanFieldWithDefault(msg, 27, false), optimizeFor: jspb.Message.getFieldWithDefault(msg, 9, 1), - goPackage: jspb.Message.getField(msg, 11), - ccGenericServices: jspb.Message.getFieldWithDefault(msg, 16, false), - javaGenericServices: jspb.Message.getFieldWithDefault(msg, 17, false), - pyGenericServices: jspb.Message.getFieldWithDefault(msg, 18, false), - phpGenericServices: jspb.Message.getFieldWithDefault(msg, 42, false), - deprecated: jspb.Message.getFieldWithDefault(msg, 23, false), - ccEnableArenas: jspb.Message.getFieldWithDefault(msg, 31, false), - objcClassPrefix: jspb.Message.getField(msg, 36), - csharpNamespace: jspb.Message.getField(msg, 37), - swiftPrefix: jspb.Message.getField(msg, 39), - phpClassPrefix: jspb.Message.getField(msg, 40), - phpNamespace: jspb.Message.getField(msg, 41), - phpMetadataNamespace: jspb.Message.getField(msg, 44), - rubyPackage: jspb.Message.getField(msg, 45), + goPackage: (f = jspb.Message.getField(msg, 11)) == null ? undefined : f, + ccGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), + javaGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), + pyGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), + phpGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 42, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 23, false), + ccEnableArenas: jspb.Message.getBooleanFieldWithDefault(msg, 31, false), + objcClassPrefix: (f = jspb.Message.getField(msg, 36)) == null ? undefined : f, + csharpNamespace: (f = jspb.Message.getField(msg, 37)) == null ? undefined : f, + swiftPrefix: (f = jspb.Message.getField(msg, 39)) == null ? undefined : f, + phpClassPrefix: (f = jspb.Message.getField(msg, 40)) == null ? undefined : f, + phpNamespace: (f = jspb.Message.getField(msg, 41)) == null ? undefined : f, + phpMetadataNamespace: (f = jspb.Message.getField(msg, 44)) == null ? undefined : f, + rubyPackage: (f = jspb.Message.getField(msg, 45)) == null ? undefined : f, uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -5378,17 +5648,21 @@ proto.google.protobuf.FileOptions.prototype.getJavaPackage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaPackage = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearJavaPackage = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -5410,17 +5684,21 @@ proto.google.protobuf.FileOptions.prototype.getJavaOuterClassname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaOuterClassname = function(value) { - jspb.Message.setField(this, 8, value); + return jspb.Message.setField(this, 8, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearJavaOuterClassname = function() { - jspb.Message.setField(this, 8, undefined); + return jspb.Message.setField(this, 8, undefined); }; @@ -5435,26 +5713,28 @@ proto.google.protobuf.FileOptions.prototype.hasJavaOuterClassname = function() { /** * optional bool java_multiple_files = 10; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaMultipleFiles = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaMultipleFiles = function(value) { - jspb.Message.setField(this, 10, value); + return jspb.Message.setField(this, 10, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearJavaMultipleFiles = function() { - jspb.Message.setField(this, 10, undefined); + return jspb.Message.setField(this, 10, undefined); }; @@ -5469,26 +5749,28 @@ proto.google.protobuf.FileOptions.prototype.hasJavaMultipleFiles = function() { /** * optional bool java_generate_equals_and_hash = 20; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaGenerateEqualsAndHash = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 20, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 20, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaGenerateEqualsAndHash = function(value) { - jspb.Message.setField(this, 20, value); + return jspb.Message.setField(this, 20, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearJavaGenerateEqualsAndHash = function() { - jspb.Message.setField(this, 20, undefined); + return jspb.Message.setField(this, 20, undefined); }; @@ -5503,26 +5785,28 @@ proto.google.protobuf.FileOptions.prototype.hasJavaGenerateEqualsAndHash = funct /** * optional bool java_string_check_utf8 = 27; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaStringCheckUtf8 = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 27, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 27, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaStringCheckUtf8 = function(value) { - jspb.Message.setField(this, 27, value); + return jspb.Message.setField(this, 27, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearJavaStringCheckUtf8 = function() { - jspb.Message.setField(this, 27, undefined); + return jspb.Message.setField(this, 27, undefined); }; @@ -5544,17 +5828,21 @@ proto.google.protobuf.FileOptions.prototype.getOptimizeFor = function() { }; -/** @param {!proto.google.protobuf.FileOptions.OptimizeMode} value */ +/** + * @param {!proto.google.protobuf.FileOptions.OptimizeMode} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setOptimizeFor = function(value) { - jspb.Message.setField(this, 9, value); + return jspb.Message.setField(this, 9, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearOptimizeFor = function() { - jspb.Message.setField(this, 9, undefined); + return jspb.Message.setField(this, 9, undefined); }; @@ -5576,17 +5864,21 @@ proto.google.protobuf.FileOptions.prototype.getGoPackage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setGoPackage = function(value) { - jspb.Message.setField(this, 11, value); + return jspb.Message.setField(this, 11, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearGoPackage = function() { - jspb.Message.setField(this, 11, undefined); + return jspb.Message.setField(this, 11, undefined); }; @@ -5601,26 +5893,28 @@ proto.google.protobuf.FileOptions.prototype.hasGoPackage = function() { /** * optional bool cc_generic_services = 16; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getCcGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 16, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setCcGenericServices = function(value) { - jspb.Message.setField(this, 16, value); + return jspb.Message.setField(this, 16, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearCcGenericServices = function() { - jspb.Message.setField(this, 16, undefined); + return jspb.Message.setField(this, 16, undefined); }; @@ -5635,26 +5929,28 @@ proto.google.protobuf.FileOptions.prototype.hasCcGenericServices = function() { /** * optional bool java_generic_services = 17; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 17, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaGenericServices = function(value) { - jspb.Message.setField(this, 17, value); + return jspb.Message.setField(this, 17, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearJavaGenericServices = function() { - jspb.Message.setField(this, 17, undefined); + return jspb.Message.setField(this, 17, undefined); }; @@ -5669,26 +5965,28 @@ proto.google.protobuf.FileOptions.prototype.hasJavaGenericServices = function() /** * optional bool py_generic_services = 18; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getPyGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPyGenericServices = function(value) { - jspb.Message.setField(this, 18, value); + return jspb.Message.setField(this, 18, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearPyGenericServices = function() { - jspb.Message.setField(this, 18, undefined); + return jspb.Message.setField(this, 18, undefined); }; @@ -5703,26 +6001,28 @@ proto.google.protobuf.FileOptions.prototype.hasPyGenericServices = function() { /** * optional bool php_generic_services = 42; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getPhpGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 42, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 42, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPhpGenericServices = function(value) { - jspb.Message.setField(this, 42, value); + return jspb.Message.setField(this, 42, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearPhpGenericServices = function() { - jspb.Message.setField(this, 42, undefined); + return jspb.Message.setField(this, 42, undefined); }; @@ -5737,26 +6037,28 @@ proto.google.protobuf.FileOptions.prototype.hasPhpGenericServices = function() { /** * optional bool deprecated = 23; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 23, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 23, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 23, value); + return jspb.Message.setField(this, 23, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 23, undefined); + return jspb.Message.setField(this, 23, undefined); }; @@ -5771,26 +6073,28 @@ proto.google.protobuf.FileOptions.prototype.hasDeprecated = function() { /** * optional bool cc_enable_arenas = 31; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getCcEnableArenas = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 31, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 31, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setCcEnableArenas = function(value) { - jspb.Message.setField(this, 31, value); + return jspb.Message.setField(this, 31, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearCcEnableArenas = function() { - jspb.Message.setField(this, 31, undefined); + return jspb.Message.setField(this, 31, undefined); }; @@ -5812,17 +6116,21 @@ proto.google.protobuf.FileOptions.prototype.getObjcClassPrefix = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setObjcClassPrefix = function(value) { - jspb.Message.setField(this, 36, value); + return jspb.Message.setField(this, 36, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearObjcClassPrefix = function() { - jspb.Message.setField(this, 36, undefined); + return jspb.Message.setField(this, 36, undefined); }; @@ -5844,17 +6152,21 @@ proto.google.protobuf.FileOptions.prototype.getCsharpNamespace = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setCsharpNamespace = function(value) { - jspb.Message.setField(this, 37, value); + return jspb.Message.setField(this, 37, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearCsharpNamespace = function() { - jspb.Message.setField(this, 37, undefined); + return jspb.Message.setField(this, 37, undefined); }; @@ -5876,17 +6188,21 @@ proto.google.protobuf.FileOptions.prototype.getSwiftPrefix = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setSwiftPrefix = function(value) { - jspb.Message.setField(this, 39, value); + return jspb.Message.setField(this, 39, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearSwiftPrefix = function() { - jspb.Message.setField(this, 39, undefined); + return jspb.Message.setField(this, 39, undefined); }; @@ -5908,17 +6224,21 @@ proto.google.protobuf.FileOptions.prototype.getPhpClassPrefix = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPhpClassPrefix = function(value) { - jspb.Message.setField(this, 40, value); + return jspb.Message.setField(this, 40, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearPhpClassPrefix = function() { - jspb.Message.setField(this, 40, undefined); + return jspb.Message.setField(this, 40, undefined); }; @@ -5940,17 +6260,21 @@ proto.google.protobuf.FileOptions.prototype.getPhpNamespace = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPhpNamespace = function(value) { - jspb.Message.setField(this, 41, value); + return jspb.Message.setField(this, 41, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearPhpNamespace = function() { - jspb.Message.setField(this, 41, undefined); + return jspb.Message.setField(this, 41, undefined); }; @@ -5972,17 +6296,21 @@ proto.google.protobuf.FileOptions.prototype.getPhpMetadataNamespace = function() }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPhpMetadataNamespace = function(value) { - jspb.Message.setField(this, 44, value); + return jspb.Message.setField(this, 44, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearPhpMetadataNamespace = function() { - jspb.Message.setField(this, 44, undefined); + return jspb.Message.setField(this, 44, undefined); }; @@ -6004,17 +6332,21 @@ proto.google.protobuf.FileOptions.prototype.getRubyPackage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setRubyPackage = function(value) { - jspb.Message.setField(this, 45, value); + return jspb.Message.setField(this, 45, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearRubyPackage = function() { - jspb.Message.setField(this, 45, undefined); + return jspb.Message.setField(this, 45, undefined); }; @@ -6037,9 +6369,12 @@ proto.google.protobuf.FileOptions.prototype.getUninterpretedOptionList = functio }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileOptions} returns this +*/ proto.google.protobuf.FileOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -6055,9 +6390,10 @@ proto.google.protobuf.FileOptions.prototype.addUninterpretedOption = function(op /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileOptions} returns this */ proto.google.protobuf.FileOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -6073,13 +6409,15 @@ proto.google.protobuf.MessageOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeInstance) { @@ -6089,8 +6427,8 @@ proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeIn /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.MessageOptions} msg The msg instance to transform. * @return {!Object} @@ -6098,10 +6436,10 @@ proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeIn */ proto.google.protobuf.MessageOptions.toObject = function(includeInstance, msg) { var f, obj = { - messageSetWireFormat: jspb.Message.getFieldWithDefault(msg, 1, false), - noStandardDescriptorAccessor: jspb.Message.getFieldWithDefault(msg, 2, false), - deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), - mapEntry: jspb.Message.getField(msg, 7), + messageSetWireFormat: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + noStandardDescriptorAccessor: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + mapEntry: (f = jspb.Message.getBooleanField(msg, 7)) == null ? undefined : f, uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -6239,26 +6577,28 @@ proto.google.protobuf.MessageOptions.serializeBinaryToWriter = function(message, /** * optional bool message_set_wire_format = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getMessageSetWireFormat = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.setMessageSetWireFormat = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this */ proto.google.protobuf.MessageOptions.prototype.clearMessageSetWireFormat = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -6273,26 +6613,28 @@ proto.google.protobuf.MessageOptions.prototype.hasMessageSetWireFormat = functio /** * optional bool no_standard_descriptor_accessor = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getNoStandardDescriptorAccessor = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.setNoStandardDescriptorAccessor = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this */ proto.google.protobuf.MessageOptions.prototype.clearNoStandardDescriptorAccessor = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -6307,26 +6649,28 @@ proto.google.protobuf.MessageOptions.prototype.hasNoStandardDescriptorAccessor = /** * optional bool deprecated = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this */ proto.google.protobuf.MessageOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -6341,26 +6685,28 @@ proto.google.protobuf.MessageOptions.prototype.hasDeprecated = function() { /** * optional bool map_entry = 7; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getMapEntry = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 7, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.setMapEntry = function(value) { - jspb.Message.setField(this, 7, value); + return jspb.Message.setField(this, 7, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this */ proto.google.protobuf.MessageOptions.prototype.clearMapEntry = function() { - jspb.Message.setField(this, 7, undefined); + return jspb.Message.setField(this, 7, undefined); }; @@ -6383,9 +6729,12 @@ proto.google.protobuf.MessageOptions.prototype.getUninterpretedOptionList = func }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.MessageOptions} returns this +*/ proto.google.protobuf.MessageOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -6401,9 +6750,10 @@ proto.google.protobuf.MessageOptions.prototype.addUninterpretedOption = function /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.MessageOptions} returns this */ proto.google.protobuf.MessageOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -6419,13 +6769,15 @@ proto.google.protobuf.FieldOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInstance) { @@ -6435,8 +6787,8 @@ proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FieldOptions} msg The msg instance to transform. * @return {!Object} @@ -6445,11 +6797,11 @@ proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInst proto.google.protobuf.FieldOptions.toObject = function(includeInstance, msg) { var f, obj = { ctype: jspb.Message.getFieldWithDefault(msg, 1, 0), - packed: jspb.Message.getField(msg, 2), + packed: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, jstype: jspb.Message.getFieldWithDefault(msg, 6, 0), - lazy: jspb.Message.getFieldWithDefault(msg, 5, false), - deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), - weak: jspb.Message.getFieldWithDefault(msg, 10, false), + lazy: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + weak: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -6634,17 +6986,21 @@ proto.google.protobuf.FieldOptions.prototype.getCtype = function() { }; -/** @param {!proto.google.protobuf.FieldOptions.CType} value */ +/** + * @param {!proto.google.protobuf.FieldOptions.CType} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setCtype = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearCtype = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -6659,26 +7015,28 @@ proto.google.protobuf.FieldOptions.prototype.hasCtype = function() { /** * optional bool packed = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getPacked = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setPacked = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearPacked = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -6700,17 +7058,21 @@ proto.google.protobuf.FieldOptions.prototype.getJstype = function() { }; -/** @param {!proto.google.protobuf.FieldOptions.JSType} value */ +/** + * @param {!proto.google.protobuf.FieldOptions.JSType} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setJstype = function(value) { - jspb.Message.setField(this, 6, value); + return jspb.Message.setField(this, 6, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearJstype = function() { - jspb.Message.setField(this, 6, undefined); + return jspb.Message.setField(this, 6, undefined); }; @@ -6725,26 +7087,28 @@ proto.google.protobuf.FieldOptions.prototype.hasJstype = function() { /** * optional bool lazy = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getLazy = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setLazy = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearLazy = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; @@ -6759,26 +7123,28 @@ proto.google.protobuf.FieldOptions.prototype.hasLazy = function() { /** * optional bool deprecated = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -6793,26 +7159,28 @@ proto.google.protobuf.FieldOptions.prototype.hasDeprecated = function() { /** * optional bool weak = 10; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getWeak = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setWeak = function(value) { - jspb.Message.setField(this, 10, value); + return jspb.Message.setField(this, 10, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearWeak = function() { - jspb.Message.setField(this, 10, undefined); + return jspb.Message.setField(this, 10, undefined); }; @@ -6835,9 +7203,12 @@ proto.google.protobuf.FieldOptions.prototype.getUninterpretedOptionList = functi }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FieldOptions} returns this +*/ proto.google.protobuf.FieldOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -6853,9 +7224,10 @@ proto.google.protobuf.FieldOptions.prototype.addUninterpretedOption = function(o /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FieldOptions} returns this */ proto.google.protobuf.FieldOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -6871,13 +7243,15 @@ proto.google.protobuf.OneofOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.OneofOptions.prototype.toObject = function(opt_includeInstance) { @@ -6887,8 +7261,8 @@ proto.google.protobuf.OneofOptions.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.OneofOptions} msg The msg instance to transform. * @return {!Object} @@ -6997,9 +7371,12 @@ proto.google.protobuf.OneofOptions.prototype.getUninterpretedOptionList = functi }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.OneofOptions} returns this +*/ proto.google.protobuf.OneofOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7015,9 +7392,10 @@ proto.google.protobuf.OneofOptions.prototype.addUninterpretedOption = function(o /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.OneofOptions} returns this */ proto.google.protobuf.OneofOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -7033,13 +7411,15 @@ proto.google.protobuf.EnumOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInstance) { @@ -7049,8 +7429,8 @@ proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumOptions} msg The msg instance to transform. * @return {!Object} @@ -7058,8 +7438,8 @@ proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInsta */ proto.google.protobuf.EnumOptions.toObject = function(includeInstance, msg) { var f, obj = { - allowAlias: jspb.Message.getField(msg, 2), - deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), + allowAlias: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -7175,26 +7555,28 @@ proto.google.protobuf.EnumOptions.serializeBinaryToWriter = function(message, wr /** * optional bool allow_alias = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.EnumOptions.prototype.getAllowAlias = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumOptions} returns this + */ proto.google.protobuf.EnumOptions.prototype.setAllowAlias = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumOptions} returns this */ proto.google.protobuf.EnumOptions.prototype.clearAllowAlias = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -7209,26 +7591,28 @@ proto.google.protobuf.EnumOptions.prototype.hasAllowAlias = function() { /** * optional bool deprecated = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.EnumOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumOptions} returns this + */ proto.google.protobuf.EnumOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumOptions} returns this */ proto.google.protobuf.EnumOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -7251,9 +7635,12 @@ proto.google.protobuf.EnumOptions.prototype.getUninterpretedOptionList = functio }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumOptions} returns this +*/ proto.google.protobuf.EnumOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7269,9 +7656,10 @@ proto.google.protobuf.EnumOptions.prototype.addUninterpretedOption = function(op /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumOptions} returns this */ proto.google.protobuf.EnumOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -7287,13 +7675,15 @@ proto.google.protobuf.EnumValueOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_includeInstance) { @@ -7303,8 +7693,8 @@ proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_include /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumValueOptions} msg The msg instance to transform. * @return {!Object} @@ -7312,7 +7702,7 @@ proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_include */ proto.google.protobuf.EnumValueOptions.toObject = function(includeInstance, msg) { var f, obj = { - deprecated: jspb.Message.getFieldWithDefault(msg, 1, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -7417,26 +7807,28 @@ proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter = function(messag /** * optional bool deprecated = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.EnumValueOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ proto.google.protobuf.EnumValueOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueOptions} returns this */ proto.google.protobuf.EnumValueOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -7459,9 +7851,12 @@ proto.google.protobuf.EnumValueOptions.prototype.getUninterpretedOptionList = fu }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumValueOptions} returns this +*/ proto.google.protobuf.EnumValueOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7477,9 +7872,10 @@ proto.google.protobuf.EnumValueOptions.prototype.addUninterpretedOption = functi /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumValueOptions} returns this */ proto.google.protobuf.EnumValueOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -7495,13 +7891,15 @@ proto.google.protobuf.ServiceOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeInstance) { @@ -7511,8 +7909,8 @@ proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeIn /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.ServiceOptions} msg The msg instance to transform. * @return {!Object} @@ -7520,7 +7918,7 @@ proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeIn */ proto.google.protobuf.ServiceOptions.toObject = function(includeInstance, msg) { var f, obj = { - deprecated: jspb.Message.getFieldWithDefault(msg, 33, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -7625,26 +8023,28 @@ proto.google.protobuf.ServiceOptions.serializeBinaryToWriter = function(message, /** * optional bool deprecated = 33; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.ServiceOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 33, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.ServiceOptions} returns this + */ proto.google.protobuf.ServiceOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 33, value); + return jspb.Message.setField(this, 33, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.ServiceOptions} returns this */ proto.google.protobuf.ServiceOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 33, undefined); + return jspb.Message.setField(this, 33, undefined); }; @@ -7667,9 +8067,12 @@ proto.google.protobuf.ServiceOptions.prototype.getUninterpretedOptionList = func }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ServiceOptions} returns this +*/ proto.google.protobuf.ServiceOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7685,9 +8088,10 @@ proto.google.protobuf.ServiceOptions.prototype.addUninterpretedOption = function /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ServiceOptions} returns this */ proto.google.protobuf.ServiceOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -7703,13 +8107,15 @@ proto.google.protobuf.MethodOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeInstance) { @@ -7719,8 +8125,8 @@ proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeIns /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.MethodOptions} msg The msg instance to transform. * @return {!Object} @@ -7728,7 +8134,7 @@ proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeIns */ proto.google.protobuf.MethodOptions.toObject = function(includeInstance, msg) { var f, obj = { - deprecated: jspb.Message.getFieldWithDefault(msg, 33, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false), idempotencyLevel: jspb.Message.getFieldWithDefault(msg, 34, 0), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) @@ -7854,26 +8260,28 @@ proto.google.protobuf.MethodOptions.IdempotencyLevel = { /** * optional bool deprecated = 33; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MethodOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 33, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodOptions} returns this + */ proto.google.protobuf.MethodOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 33, value); + return jspb.Message.setField(this, 33, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodOptions} returns this */ proto.google.protobuf.MethodOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 33, undefined); + return jspb.Message.setField(this, 33, undefined); }; @@ -7895,17 +8303,21 @@ proto.google.protobuf.MethodOptions.prototype.getIdempotencyLevel = function() { }; -/** @param {!proto.google.protobuf.MethodOptions.IdempotencyLevel} value */ +/** + * @param {!proto.google.protobuf.MethodOptions.IdempotencyLevel} value + * @return {!proto.google.protobuf.MethodOptions} returns this + */ proto.google.protobuf.MethodOptions.prototype.setIdempotencyLevel = function(value) { - jspb.Message.setField(this, 34, value); + return jspb.Message.setField(this, 34, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodOptions} returns this */ proto.google.protobuf.MethodOptions.prototype.clearIdempotencyLevel = function() { - jspb.Message.setField(this, 34, undefined); + return jspb.Message.setField(this, 34, undefined); }; @@ -7928,9 +8340,12 @@ proto.google.protobuf.MethodOptions.prototype.getUninterpretedOptionList = funct }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.MethodOptions} returns this +*/ proto.google.protobuf.MethodOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7946,9 +8361,10 @@ proto.google.protobuf.MethodOptions.prototype.addUninterpretedOption = function( /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.MethodOptions} returns this */ proto.google.protobuf.MethodOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); + return this.setUninterpretedOptionList([]); }; @@ -7964,13 +8380,15 @@ proto.google.protobuf.UninterpretedOption.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.UninterpretedOption.prototype.toObject = function(opt_includeInstance) { @@ -7980,8 +8398,8 @@ proto.google.protobuf.UninterpretedOption.prototype.toObject = function(opt_incl /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.UninterpretedOption} msg The msg instance to transform. * @return {!Object} @@ -7991,12 +8409,12 @@ proto.google.protobuf.UninterpretedOption.toObject = function(includeInstance, m var f, obj = { nameList: jspb.Message.toObjectList(msg.getNameList(), proto.google.protobuf.UninterpretedOption.NamePart.toObject, includeInstance), - identifierValue: jspb.Message.getField(msg, 3), - positiveIntValue: jspb.Message.getField(msg, 4), - negativeIntValue: jspb.Message.getField(msg, 5), - doubleValue: jspb.Message.getOptionalFloatingPointField(msg, 6), + identifierValue: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + positiveIntValue: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + negativeIntValue: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + doubleValue: (f = jspb.Message.getOptionalFloatingPointField(msg, 6)) == null ? undefined : f, stringValue: msg.getStringValue_asB64(), - aggregateValue: jspb.Message.getField(msg, 8) + aggregateValue: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f }; if (includeInstance) { @@ -8149,13 +8567,15 @@ proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter = function(mes if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function(opt_includeInstance) { @@ -8165,8 +8585,8 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.UninterpretedOption.NamePart} msg The msg instance to transform. * @return {!Object} @@ -8174,8 +8594,8 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function */ proto.google.protobuf.UninterpretedOption.NamePart.toObject = function(includeInstance, msg) { var f, obj = { - namePart: jspb.Message.getField(msg, 1), - isExtension: jspb.Message.getField(msg, 2) + namePart: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + isExtension: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -8275,17 +8695,21 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.getNamePart = funct }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.setNamePart = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearNamePart = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -8300,26 +8724,28 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasNamePart = funct /** * required bool is_extension = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.getIsExtension = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.setIsExtension = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearIsExtension = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -8342,9 +8768,12 @@ proto.google.protobuf.UninterpretedOption.prototype.getNameList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this +*/ proto.google.protobuf.UninterpretedOption.prototype.setNameList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -8360,9 +8789,10 @@ proto.google.protobuf.UninterpretedOption.prototype.addName = function(opt_value /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearNameList = function() { - this.setNameList([]); + return this.setNameList([]); }; @@ -8375,17 +8805,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getIdentifierValue = functio }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setIdentifierValue = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearIdentifierValue = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -8407,17 +8841,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getPositiveIntValue = functi }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setPositiveIntValue = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearPositiveIntValue = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -8439,17 +8877,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getNegativeIntValue = functi }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setNegativeIntValue = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearNegativeIntValue = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; @@ -8467,21 +8909,25 @@ proto.google.protobuf.UninterpretedOption.prototype.hasNegativeIntValue = functi * @return {number} */ proto.google.protobuf.UninterpretedOption.prototype.getDoubleValue = function() { - return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 6, 0.0)); + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setDoubleValue = function(value) { - jspb.Message.setField(this, 6, value); + return jspb.Message.setField(this, 6, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearDoubleValue = function() { - jspb.Message.setField(this, 6, undefined); + return jspb.Message.setField(this, 6, undefined); }; @@ -8527,17 +8973,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asU8 = functi }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setStringValue = function(value) { - jspb.Message.setField(this, 7, value); + return jspb.Message.setField(this, 7, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearStringValue = function() { - jspb.Message.setField(this, 7, undefined); + return jspb.Message.setField(this, 7, undefined); }; @@ -8559,17 +9009,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getAggregateValue = function }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setAggregateValue = function(value) { - jspb.Message.setField(this, 8, value); + return jspb.Message.setField(this, 8, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this */ proto.google.protobuf.UninterpretedOption.prototype.clearAggregateValue = function() { - jspb.Message.setField(this, 8, undefined); + return jspb.Message.setField(this, 8, undefined); }; @@ -8594,13 +9048,15 @@ proto.google.protobuf.SourceCodeInfo.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.SourceCodeInfo.prototype.toObject = function(opt_includeInstance) { @@ -8610,8 +9066,8 @@ proto.google.protobuf.SourceCodeInfo.prototype.toObject = function(opt_includeIn /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.SourceCodeInfo} msg The msg instance to transform. * @return {!Object} @@ -8714,13 +9170,15 @@ proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_ = [1,2,6]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_includeInstance) { @@ -8730,8 +9188,8 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_ /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.SourceCodeInfo.Location} msg The msg instance to transform. * @return {!Object} @@ -8739,11 +9197,11 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_ */ proto.google.protobuf.SourceCodeInfo.Location.toObject = function(includeInstance, msg) { var f, obj = { - pathList: jspb.Message.getRepeatedField(msg, 1), - spanList: jspb.Message.getRepeatedField(msg, 2), - leadingComments: jspb.Message.getField(msg, 3), - trailingComments: jspb.Message.getField(msg, 4), - leadingDetachedCommentsList: jspb.Message.getRepeatedField(msg, 6) + pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + spanList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + leadingComments: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + trailingComments: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + leadingDetachedCommentsList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f }; if (includeInstance) { @@ -8876,26 +9334,31 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getPathList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setPathList = function(value) { - jspb.Message.setField(this, 1, value || []); + return jspb.Message.setField(this, 1, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.addPath = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 1, value, opt_index); + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearPathList = function() { - this.setPathList([]); + return this.setPathList([]); }; @@ -8908,26 +9371,31 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getSpanList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setSpanList = function(value) { - jspb.Message.setField(this, 2, value || []); + return jspb.Message.setField(this, 2, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.addSpan = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearSpanList = function() { - this.setSpanList([]); + return this.setSpanList([]); }; @@ -8940,17 +9408,21 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingComments = fun }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingComments = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingComments = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -8972,17 +9444,21 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getTrailingComments = fu }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setTrailingComments = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearTrailingComments = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -9004,26 +9480,31 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingDetachedCommen }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingDetachedCommentsList = function(value) { - jspb.Message.setField(this, 6, value || []); + return jspb.Message.setField(this, 6, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.addLeadingDetachedComments = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 6, value, opt_index); + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingDetachedCommentsList = function() { - this.setLeadingDetachedCommentsList([]); + return this.setLeadingDetachedCommentsList([]); }; @@ -9037,9 +9518,12 @@ proto.google.protobuf.SourceCodeInfo.prototype.getLocationList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo} returns this +*/ proto.google.protobuf.SourceCodeInfo.prototype.setLocationList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -9055,9 +9539,10 @@ proto.google.protobuf.SourceCodeInfo.prototype.addLocation = function(opt_value, /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo} returns this */ proto.google.protobuf.SourceCodeInfo.prototype.clearLocationList = function() { - this.setLocationList([]); + return this.setLocationList([]); }; @@ -9073,13 +9558,15 @@ proto.google.protobuf.GeneratedCodeInfo.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.GeneratedCodeInfo.prototype.toObject = function(opt_includeInstance) { @@ -9089,8 +9576,8 @@ proto.google.protobuf.GeneratedCodeInfo.prototype.toObject = function(opt_includ /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.GeneratedCodeInfo} msg The msg instance to transform. * @return {!Object} @@ -9193,13 +9680,15 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function(opt_includeInstance) { @@ -9209,8 +9698,8 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} msg The msg instance to transform. * @return {!Object} @@ -9218,10 +9707,10 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function */ proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject = function(includeInstance, msg) { var f, obj = { - pathList: jspb.Message.getRepeatedField(msg, 1), - sourceFile: jspb.Message.getField(msg, 2), - begin: jspb.Message.getField(msg, 3), - end: jspb.Message.getField(msg, 4) + pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + sourceFile: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + begin: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f }; if (includeInstance) { @@ -9343,26 +9832,31 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getPathList = funct }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setPathList = function(value) { - jspb.Message.setField(this, 1, value || []); + return jspb.Message.setField(this, 1, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.addPath = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 1, value, opt_index); + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearPathList = function() { - this.setPathList([]); + return this.setPathList([]); }; @@ -9375,17 +9869,21 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getSourceFile = fun }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setSourceFile = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearSourceFile = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -9407,17 +9905,21 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getBegin = function }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setBegin = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearBegin = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -9439,17 +9941,21 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getEnd = function() }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setEnd = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearEnd = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -9472,9 +9978,12 @@ proto.google.protobuf.GeneratedCodeInfo.prototype.getAnnotationList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this +*/ proto.google.protobuf.GeneratedCodeInfo.prototype.setAnnotationList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -9490,9 +9999,10 @@ proto.google.protobuf.GeneratedCodeInfo.prototype.addAnnotation = function(opt_v /** * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this */ proto.google.protobuf.GeneratedCodeInfo.prototype.clearAnnotationList = function() { - this.setAnnotationList([]); + return this.setAnnotationList([]); }; diff --git a/js/proto/google/protobuf/timestamp_pb.js b/js/proto/google/protobuf/timestamp_pb.js index 3c225b7bb..2f13b459f 100644 --- a/js/proto/google/protobuf/timestamp_pb.js +++ b/js/proto/google/protobuf/timestamp_pb.js @@ -1,3 +1,4 @@ +// source: google/protobuf/timestamp.proto /** * @fileoverview * @enhanceable @@ -38,13 +39,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.Timestamp.prototype.toObject = function(opt_includeInstance) { @@ -54,8 +57,8 @@ proto.google.protobuf.Timestamp.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.Timestamp} msg The msg instance to transform. * @return {!Object} @@ -164,9 +167,12 @@ proto.google.protobuf.Timestamp.prototype.getSeconds = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.Timestamp} returns this + */ proto.google.protobuf.Timestamp.prototype.setSeconds = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -179,9 +185,12 @@ proto.google.protobuf.Timestamp.prototype.getNanos = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.Timestamp} returns this + */ proto.google.protobuf.Timestamp.prototype.setNanos = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/keys_pb.js b/js/proto/keys_pb.js index 6c52fab78..2750b4b79 100644 --- a/js/proto/keys_pb.js +++ b/js/proto/keys_pb.js @@ -1,3 +1,4 @@ +// source: keys.proto /** * @fileoverview * @enhanceable @@ -504,13 +505,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ListRequest.prototype.toObject = function(opt_includeInstance) { @@ -520,8 +523,8 @@ proto.keys.ListRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ListRequest} msg The msg instance to transform. * @return {!Object} @@ -618,9 +621,12 @@ proto.keys.ListRequest.prototype.getKeyname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ListRequest} returns this + */ proto.keys.ListRequest.prototype.setKeyname = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -629,13 +635,15 @@ proto.keys.ListRequest.prototype.setKeyname = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.VerifyResponse.prototype.toObject = function(opt_includeInstance) { @@ -645,8 +653,8 @@ proto.keys.VerifyResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.VerifyResponse} msg The msg instance to transform. * @return {!Object} @@ -728,13 +736,15 @@ proto.keys.VerifyResponse.serializeBinaryToWriter = function(message, writer) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.RemoveNameResponse.prototype.toObject = function(opt_includeInstance) { @@ -744,8 +754,8 @@ proto.keys.RemoveNameResponse.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.RemoveNameResponse} msg The msg instance to transform. * @return {!Object} @@ -827,13 +837,15 @@ proto.keys.RemoveNameResponse.serializeBinaryToWriter = function(message, writer if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.AddNameResponse.prototype.toObject = function(opt_includeInstance) { @@ -843,8 +855,8 @@ proto.keys.AddNameResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.AddNameResponse} msg The msg instance to transform. * @return {!Object} @@ -926,13 +938,15 @@ proto.keys.AddNameResponse.serializeBinaryToWriter = function(message, writer) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.RemoveNameRequest.prototype.toObject = function(opt_includeInstance) { @@ -942,8 +956,8 @@ proto.keys.RemoveNameRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.RemoveNameRequest} msg The msg instance to transform. * @return {!Object} @@ -1040,9 +1054,12 @@ proto.keys.RemoveNameRequest.prototype.getKeyname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.RemoveNameRequest} returns this + */ proto.keys.RemoveNameRequest.prototype.setKeyname = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1051,13 +1068,15 @@ proto.keys.RemoveNameRequest.prototype.setKeyname = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.GenRequest.prototype.toObject = function(opt_includeInstance) { @@ -1067,8 +1086,8 @@ proto.keys.GenRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.GenRequest} msg The msg instance to transform. * @return {!Object} @@ -1189,9 +1208,12 @@ proto.keys.GenRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.GenRequest} returns this + */ proto.keys.GenRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1204,9 +1226,12 @@ proto.keys.GenRequest.prototype.getCurvetype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.GenRequest} returns this + */ proto.keys.GenRequest.prototype.setCurvetype = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1219,9 +1244,12 @@ proto.keys.GenRequest.prototype.getKeyname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.GenRequest} returns this + */ proto.keys.GenRequest.prototype.setKeyname = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -1230,13 +1258,15 @@ proto.keys.GenRequest.prototype.setKeyname = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.GenResponse.prototype.toObject = function(opt_includeInstance) { @@ -1246,8 +1276,8 @@ proto.keys.GenResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.GenResponse} msg The msg instance to transform. * @return {!Object} @@ -1344,9 +1374,12 @@ proto.keys.GenResponse.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.GenResponse} returns this + */ proto.keys.GenResponse.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1355,13 +1388,15 @@ proto.keys.GenResponse.prototype.setAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.PubRequest.prototype.toObject = function(opt_includeInstance) { @@ -1371,8 +1406,8 @@ proto.keys.PubRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.PubRequest} msg The msg instance to transform. * @return {!Object} @@ -1481,9 +1516,12 @@ proto.keys.PubRequest.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.PubRequest} returns this + */ proto.keys.PubRequest.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1496,9 +1534,12 @@ proto.keys.PubRequest.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.PubRequest} returns this + */ proto.keys.PubRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1507,13 +1548,15 @@ proto.keys.PubRequest.prototype.setName = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.PubResponse.prototype.toObject = function(opt_includeInstance) { @@ -1523,8 +1566,8 @@ proto.keys.PubResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.PubResponse} msg The msg instance to transform. * @return {!Object} @@ -1657,9 +1700,12 @@ proto.keys.PubResponse.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.PubResponse} returns this + */ proto.keys.PubResponse.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1672,9 +1718,12 @@ proto.keys.PubResponse.prototype.getCurvetype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.PubResponse} returns this + */ proto.keys.PubResponse.prototype.setCurvetype = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1683,13 +1732,15 @@ proto.keys.PubResponse.prototype.setCurvetype = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ImportJSONRequest.prototype.toObject = function(opt_includeInstance) { @@ -1699,8 +1750,8 @@ proto.keys.ImportJSONRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ImportJSONRequest} msg The msg instance to transform. * @return {!Object} @@ -1809,9 +1860,12 @@ proto.keys.ImportJSONRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportJSONRequest} returns this + */ proto.keys.ImportJSONRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1824,9 +1878,12 @@ proto.keys.ImportJSONRequest.prototype.getJson = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportJSONRequest} returns this + */ proto.keys.ImportJSONRequest.prototype.setJson = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1835,13 +1892,15 @@ proto.keys.ImportJSONRequest.prototype.setJson = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ImportResponse.prototype.toObject = function(opt_includeInstance) { @@ -1851,8 +1910,8 @@ proto.keys.ImportResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ImportResponse} msg The msg instance to transform. * @return {!Object} @@ -1949,9 +2008,12 @@ proto.keys.ImportResponse.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportResponse} returns this + */ proto.keys.ImportResponse.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1960,13 +2022,15 @@ proto.keys.ImportResponse.prototype.setAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ImportRequest.prototype.toObject = function(opt_includeInstance) { @@ -1976,8 +2040,8 @@ proto.keys.ImportRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ImportRequest} msg The msg instance to transform. * @return {!Object} @@ -2110,9 +2174,12 @@ proto.keys.ImportRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportRequest} returns this + */ proto.keys.ImportRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2125,9 +2192,12 @@ proto.keys.ImportRequest.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportRequest} returns this + */ proto.keys.ImportRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2140,9 +2210,12 @@ proto.keys.ImportRequest.prototype.getCurvetype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportRequest} returns this + */ proto.keys.ImportRequest.prototype.setCurvetype = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -2179,9 +2252,12 @@ proto.keys.ImportRequest.prototype.getKeybytes_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.ImportRequest} returns this + */ proto.keys.ImportRequest.prototype.setKeybytes = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -2190,13 +2266,15 @@ proto.keys.ImportRequest.prototype.setKeybytes = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ExportRequest.prototype.toObject = function(opt_includeInstance) { @@ -2206,8 +2284,8 @@ proto.keys.ExportRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ExportRequest} msg The msg instance to transform. * @return {!Object} @@ -2328,9 +2406,12 @@ proto.keys.ExportRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ExportRequest} returns this + */ proto.keys.ExportRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2343,9 +2424,12 @@ proto.keys.ExportRequest.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ExportRequest} returns this + */ proto.keys.ExportRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2358,9 +2442,12 @@ proto.keys.ExportRequest.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ExportRequest} returns this + */ proto.keys.ExportRequest.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -2369,13 +2456,15 @@ proto.keys.ExportRequest.prototype.setAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ExportResponse.prototype.toObject = function(opt_includeInstance) { @@ -2385,8 +2474,8 @@ proto.keys.ExportResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ExportResponse} msg The msg instance to transform. * @return {!Object} @@ -2543,9 +2632,12 @@ proto.keys.ExportResponse.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.ExportResponse} returns this + */ proto.keys.ExportResponse.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2582,9 +2674,12 @@ proto.keys.ExportResponse.prototype.getPrivatekey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.ExportResponse} returns this + */ proto.keys.ExportResponse.prototype.setPrivatekey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -2621,9 +2716,12 @@ proto.keys.ExportResponse.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.ExportResponse} returns this + */ proto.keys.ExportResponse.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -2636,9 +2734,12 @@ proto.keys.ExportResponse.prototype.getCurvetype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ExportResponse} returns this + */ proto.keys.ExportResponse.prototype.setCurvetype = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -2647,13 +2748,15 @@ proto.keys.ExportResponse.prototype.setCurvetype = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.SignRequest.prototype.toObject = function(opt_includeInstance) { @@ -2663,8 +2766,8 @@ proto.keys.SignRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.SignRequest} msg The msg instance to transform. * @return {!Object} @@ -2797,9 +2900,12 @@ proto.keys.SignRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.SignRequest} returns this + */ proto.keys.SignRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2812,9 +2918,12 @@ proto.keys.SignRequest.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.SignRequest} returns this + */ proto.keys.SignRequest.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2827,9 +2936,12 @@ proto.keys.SignRequest.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.SignRequest} returns this + */ proto.keys.SignRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -2866,9 +2978,12 @@ proto.keys.SignRequest.prototype.getMessage_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.SignRequest} returns this + */ proto.keys.SignRequest.prototype.setMessage = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -2877,13 +2992,15 @@ proto.keys.SignRequest.prototype.setMessage = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.SignResponse.prototype.toObject = function(opt_includeInstance) { @@ -2893,8 +3010,8 @@ proto.keys.SignResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.SignResponse} msg The msg instance to transform. * @return {!Object} @@ -2994,17 +3111,21 @@ proto.keys.SignResponse.prototype.getSignature = function() { }; -/** @param {?proto.crypto.Signature|undefined} value */ +/** + * @param {?proto.crypto.Signature|undefined} value + * @return {!proto.keys.SignResponse} returns this +*/ proto.keys.SignResponse.prototype.setSignature = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.keys.SignResponse} returns this */ proto.keys.SignResponse.prototype.clearSignature = function() { - this.setSignature(undefined); + return this.setSignature(undefined); }; @@ -3022,13 +3143,15 @@ proto.keys.SignResponse.prototype.hasSignature = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.VerifyRequest.prototype.toObject = function(opt_includeInstance) { @@ -3038,8 +3161,8 @@ proto.keys.VerifyRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.VerifyRequest} msg The msg instance to transform. * @return {!Object} @@ -3186,9 +3309,12 @@ proto.keys.VerifyRequest.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.VerifyRequest} returns this + */ proto.keys.VerifyRequest.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -3225,9 +3351,12 @@ proto.keys.VerifyRequest.prototype.getMessage_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.VerifyRequest} returns this + */ proto.keys.VerifyRequest.prototype.setMessage = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -3241,17 +3370,21 @@ proto.keys.VerifyRequest.prototype.getSignature = function() { }; -/** @param {?proto.crypto.Signature|undefined} value */ +/** + * @param {?proto.crypto.Signature|undefined} value + * @return {!proto.keys.VerifyRequest} returns this +*/ proto.keys.VerifyRequest.prototype.setSignature = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.keys.VerifyRequest} returns this */ proto.keys.VerifyRequest.prototype.clearSignature = function() { - this.setSignature(undefined); + return this.setSignature(undefined); }; @@ -3269,13 +3402,15 @@ proto.keys.VerifyRequest.prototype.hasSignature = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.HashRequest.prototype.toObject = function(opt_includeInstance) { @@ -3285,8 +3420,8 @@ proto.keys.HashRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.HashRequest} msg The msg instance to transform. * @return {!Object} @@ -3395,9 +3530,12 @@ proto.keys.HashRequest.prototype.getHashtype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.HashRequest} returns this + */ proto.keys.HashRequest.prototype.setHashtype = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3434,9 +3572,12 @@ proto.keys.HashRequest.prototype.getMessage_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.HashRequest} returns this + */ proto.keys.HashRequest.prototype.setMessage = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -3445,13 +3586,15 @@ proto.keys.HashRequest.prototype.setMessage = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.HashResponse.prototype.toObject = function(opt_includeInstance) { @@ -3461,8 +3604,8 @@ proto.keys.HashResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.HashResponse} msg The msg instance to transform. * @return {!Object} @@ -3559,9 +3702,12 @@ proto.keys.HashResponse.prototype.getHash = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.HashResponse} returns this + */ proto.keys.HashResponse.prototype.setHash = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3577,13 +3723,15 @@ proto.keys.KeyID.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { @@ -3593,8 +3741,8 @@ proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.KeyID} msg The msg instance to transform. * @return {!Object} @@ -3603,7 +3751,7 @@ proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { proto.keys.KeyID.toObject = function(includeInstance, msg) { var f, obj = { address: jspb.Message.getFieldWithDefault(msg, 1, ""), - keynameList: jspb.Message.getRepeatedField(msg, 2) + keynameList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -3703,9 +3851,12 @@ proto.keys.KeyID.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.KeyID} returns this + */ proto.keys.KeyID.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3718,26 +3869,31 @@ proto.keys.KeyID.prototype.getKeynameList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.keys.KeyID} returns this + */ proto.keys.KeyID.prototype.setKeynameList = function(value) { - jspb.Message.setField(this, 2, value || []); + return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.keys.KeyID} returns this */ proto.keys.KeyID.prototype.addKeyname = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.keys.KeyID} returns this */ proto.keys.KeyID.prototype.clearKeynameList = function() { - this.setKeynameList([]); + return this.setKeynameList([]); }; @@ -3753,13 +3909,15 @@ proto.keys.ListResponse.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ListResponse.prototype.toObject = function(opt_includeInstance) { @@ -3769,8 +3927,8 @@ proto.keys.ListResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ListResponse} msg The msg instance to transform. * @return {!Object} @@ -3871,9 +4029,12 @@ proto.keys.ListResponse.prototype.getKeyList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.keys.ListResponse} returns this +*/ proto.keys.ListResponse.prototype.setKeyList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3889,9 +4050,10 @@ proto.keys.ListResponse.prototype.addKey = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.keys.ListResponse} returns this */ proto.keys.ListResponse.prototype.clearKeyList = function() { - this.setKeyList([]); + return this.setKeyList([]); }; @@ -3900,13 +4062,15 @@ proto.keys.ListResponse.prototype.clearKeyList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.AddNameRequest.prototype.toObject = function(opt_includeInstance) { @@ -3916,8 +4080,8 @@ proto.keys.AddNameRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.AddNameRequest} msg The msg instance to transform. * @return {!Object} @@ -4026,9 +4190,12 @@ proto.keys.AddNameRequest.prototype.getKeyname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.AddNameRequest} returns this + */ proto.keys.AddNameRequest.prototype.setKeyname = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -4041,9 +4208,12 @@ proto.keys.AddNameRequest.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.AddNameRequest} returns this + */ proto.keys.AddNameRequest.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; diff --git a/js/proto/names_pb.js b/js/proto/names_pb.js index 2e6708c96..c338739fe 100644 --- a/js/proto/names_pb.js +++ b/js/proto/names_pb.js @@ -1,3 +1,4 @@ +// source: names.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.names.Entry.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.names.Entry.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.names.Entry} msg The msg instance to transform. * @return {!Object} @@ -190,9 +193,12 @@ proto.names.Entry.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.names.Entry} returns this + */ proto.names.Entry.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -229,9 +235,12 @@ proto.names.Entry.prototype.getOwner_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.names.Entry} returns this + */ proto.names.Entry.prototype.setOwner = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -244,9 +253,12 @@ proto.names.Entry.prototype.getData = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.names.Entry} returns this + */ proto.names.Entry.prototype.setData = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -259,9 +271,12 @@ proto.names.Entry.prototype.getExpires = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.names.Entry} returns this + */ proto.names.Entry.prototype.setExpires = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; diff --git a/js/proto/payload_pb.js b/js/proto/payload_pb.js index 0db942d9e..e04dd30d3 100644 --- a/js/proto/payload_pb.js +++ b/js/proto/payload_pb.js @@ -1,3 +1,4 @@ +// source: payload.proto /** * @fileoverview * @enhanceable @@ -399,13 +400,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.Any.prototype.toObject = function(opt_includeInstance) { @@ -415,8 +418,8 @@ proto.payload.Any.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Any} msg The msg instance to transform. * @return {!Object} @@ -642,17 +645,21 @@ proto.payload.Any.prototype.getCalltx = function() { }; -/** @param {?proto.payload.CallTx|undefined} value */ +/** + * @param {?proto.payload.CallTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setCalltx = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearCalltx = function() { - this.setCalltx(undefined); + return this.setCalltx(undefined); }; @@ -675,17 +682,21 @@ proto.payload.Any.prototype.getSendtx = function() { }; -/** @param {?proto.payload.SendTx|undefined} value */ +/** + * @param {?proto.payload.SendTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setSendtx = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearSendtx = function() { - this.setSendtx(undefined); + return this.setSendtx(undefined); }; @@ -708,17 +719,21 @@ proto.payload.Any.prototype.getNametx = function() { }; -/** @param {?proto.payload.NameTx|undefined} value */ +/** + * @param {?proto.payload.NameTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setNametx = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearNametx = function() { - this.setNametx(undefined); + return this.setNametx(undefined); }; @@ -741,17 +756,21 @@ proto.payload.Any.prototype.getPermstx = function() { }; -/** @param {?proto.payload.PermsTx|undefined} value */ +/** + * @param {?proto.payload.PermsTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setPermstx = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearPermstx = function() { - this.setPermstx(undefined); + return this.setPermstx(undefined); }; @@ -774,17 +793,21 @@ proto.payload.Any.prototype.getGovtx = function() { }; -/** @param {?proto.payload.GovTx|undefined} value */ +/** + * @param {?proto.payload.GovTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setGovtx = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearGovtx = function() { - this.setGovtx(undefined); + return this.setGovtx(undefined); }; @@ -807,17 +830,21 @@ proto.payload.Any.prototype.getBondtx = function() { }; -/** @param {?proto.payload.BondTx|undefined} value */ +/** + * @param {?proto.payload.BondTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setBondtx = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearBondtx = function() { - this.setBondtx(undefined); + return this.setBondtx(undefined); }; @@ -840,17 +867,21 @@ proto.payload.Any.prototype.getUnbondtx = function() { }; -/** @param {?proto.payload.UnbondTx|undefined} value */ +/** + * @param {?proto.payload.UnbondTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setUnbondtx = function(value) { - jspb.Message.setWrapperField(this, 7, value); + return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearUnbondtx = function() { - this.setUnbondtx(undefined); + return this.setUnbondtx(undefined); }; @@ -873,17 +904,21 @@ proto.payload.Any.prototype.getBatchtx = function() { }; -/** @param {?proto.payload.BatchTx|undefined} value */ +/** + * @param {?proto.payload.BatchTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setBatchtx = function(value) { - jspb.Message.setWrapperField(this, 8, value); + return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearBatchtx = function() { - this.setBatchtx(undefined); + return this.setBatchtx(undefined); }; @@ -906,17 +941,21 @@ proto.payload.Any.prototype.getProposaltx = function() { }; -/** @param {?proto.payload.ProposalTx|undefined} value */ +/** + * @param {?proto.payload.ProposalTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setProposaltx = function(value) { - jspb.Message.setWrapperField(this, 9, value); + return jspb.Message.setWrapperField(this, 9, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearProposaltx = function() { - this.setProposaltx(undefined); + return this.setProposaltx(undefined); }; @@ -939,17 +978,21 @@ proto.payload.Any.prototype.getIdentifytx = function() { }; -/** @param {?proto.payload.IdentifyTx|undefined} value */ +/** + * @param {?proto.payload.IdentifyTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setIdentifytx = function(value) { - jspb.Message.setWrapperField(this, 10, value); + return jspb.Message.setWrapperField(this, 10, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this */ proto.payload.Any.prototype.clearIdentifytx = function() { - this.setIdentifytx(undefined); + return this.setIdentifytx(undefined); }; @@ -967,13 +1010,15 @@ proto.payload.Any.prototype.hasIdentifytx = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.TxInput.prototype.toObject = function(opt_includeInstance) { @@ -983,8 +1028,8 @@ proto.payload.TxInput.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.TxInput} msg The msg instance to transform. * @return {!Object} @@ -1129,9 +1174,12 @@ proto.payload.TxInput.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.TxInput} returns this + */ proto.payload.TxInput.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1144,9 +1192,12 @@ proto.payload.TxInput.prototype.getAmount = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.TxInput} returns this + */ proto.payload.TxInput.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -1159,9 +1210,12 @@ proto.payload.TxInput.prototype.getSequence = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.TxInput} returns this + */ proto.payload.TxInput.prototype.setSequence = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1170,13 +1224,15 @@ proto.payload.TxInput.prototype.setSequence = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.TxOutput.prototype.toObject = function(opt_includeInstance) { @@ -1186,8 +1242,8 @@ proto.payload.TxOutput.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.TxOutput} msg The msg instance to transform. * @return {!Object} @@ -1320,9 +1376,12 @@ proto.payload.TxOutput.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.TxOutput} returns this + */ proto.payload.TxOutput.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1335,9 +1394,12 @@ proto.payload.TxOutput.prototype.getAmount = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.TxOutput} returns this + */ proto.payload.TxOutput.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -1353,13 +1415,15 @@ proto.payload.CallTx.repeatedFields_ = [7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.CallTx.prototype.toObject = function(opt_includeInstance) { @@ -1369,8 +1433,8 @@ proto.payload.CallTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.CallTx} msg The msg instance to transform. * @return {!Object} @@ -1557,17 +1621,21 @@ proto.payload.CallTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.CallTx} returns this +*/ proto.payload.CallTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.CallTx} returns this */ proto.payload.CallTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -1613,9 +1681,12 @@ proto.payload.CallTx.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -1628,9 +1699,12 @@ proto.payload.CallTx.prototype.getGaslimit = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setGaslimit = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1643,9 +1717,12 @@ proto.payload.CallTx.prototype.getFee = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setFee = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -1682,9 +1759,12 @@ proto.payload.CallTx.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 5, value); + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -1721,9 +1801,12 @@ proto.payload.CallTx.prototype.getWasm_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setWasm = function(value) { - jspb.Message.setProto3BytesField(this, 6, value); + return jspb.Message.setProto3BytesField(this, 6, value); }; @@ -1737,9 +1820,12 @@ proto.payload.CallTx.prototype.getContractmetaList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.CallTx} returns this +*/ proto.payload.CallTx.prototype.setContractmetaList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -1755,9 +1841,10 @@ proto.payload.CallTx.prototype.addContractmeta = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.payload.CallTx} returns this */ proto.payload.CallTx.prototype.clearContractmetaList = function() { - this.setContractmetaList([]); + return this.setContractmetaList([]); }; @@ -1770,9 +1857,12 @@ proto.payload.CallTx.prototype.getGasprice = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setGasprice = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + return jspb.Message.setProto3IntField(this, 8, value); }; @@ -1781,13 +1871,15 @@ proto.payload.CallTx.prototype.setGasprice = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.ContractMeta.prototype.toObject = function(opt_includeInstance) { @@ -1797,8 +1889,8 @@ proto.payload.ContractMeta.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.ContractMeta} msg The msg instance to transform. * @return {!Object} @@ -1931,9 +2023,12 @@ proto.payload.ContractMeta.prototype.getCodehash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.ContractMeta} returns this + */ proto.payload.ContractMeta.prototype.setCodehash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1946,9 +2041,12 @@ proto.payload.ContractMeta.prototype.getMeta = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.ContractMeta} returns this + */ proto.payload.ContractMeta.prototype.setMeta = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1964,13 +2062,15 @@ proto.payload.SendTx.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.SendTx.prototype.toObject = function(opt_includeInstance) { @@ -1980,8 +2080,8 @@ proto.payload.SendTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.SendTx} msg The msg instance to transform. * @return {!Object} @@ -2097,9 +2197,12 @@ proto.payload.SendTx.prototype.getInputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.SendTx} returns this +*/ proto.payload.SendTx.prototype.setInputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -2115,9 +2218,10 @@ proto.payload.SendTx.prototype.addInputs = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.SendTx} returns this */ proto.payload.SendTx.prototype.clearInputsList = function() { - this.setInputsList([]); + return this.setInputsList([]); }; @@ -2131,9 +2235,12 @@ proto.payload.SendTx.prototype.getOutputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.SendTx} returns this +*/ proto.payload.SendTx.prototype.setOutputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -2149,9 +2256,10 @@ proto.payload.SendTx.prototype.addOutputs = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.SendTx} returns this */ proto.payload.SendTx.prototype.clearOutputsList = function() { - this.setOutputsList([]); + return this.setOutputsList([]); }; @@ -2160,13 +2268,15 @@ proto.payload.SendTx.prototype.clearOutputsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.PermsTx.prototype.toObject = function(opt_includeInstance) { @@ -2176,8 +2286,8 @@ proto.payload.PermsTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.PermsTx} msg The msg instance to transform. * @return {!Object} @@ -2291,17 +2401,21 @@ proto.payload.PermsTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.PermsTx} returns this +*/ proto.payload.PermsTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.PermsTx} returns this */ proto.payload.PermsTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -2324,17 +2438,21 @@ proto.payload.PermsTx.prototype.getPermargs = function() { }; -/** @param {?proto.permission.PermArgs|undefined} value */ +/** + * @param {?proto.permission.PermArgs|undefined} value + * @return {!proto.payload.PermsTx} returns this +*/ proto.payload.PermsTx.prototype.setPermargs = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.PermsTx} returns this */ proto.payload.PermsTx.prototype.clearPermargs = function() { - this.setPermargs(undefined); + return this.setPermargs(undefined); }; @@ -2352,13 +2470,15 @@ proto.payload.PermsTx.prototype.hasPermargs = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.NameTx.prototype.toObject = function(opt_includeInstance) { @@ -2368,8 +2488,8 @@ proto.payload.NameTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.NameTx} msg The msg instance to transform. * @return {!Object} @@ -2505,17 +2625,21 @@ proto.payload.NameTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.NameTx} returns this +*/ proto.payload.NameTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.NameTx} returns this */ proto.payload.NameTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -2537,9 +2661,12 @@ proto.payload.NameTx.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.NameTx} returns this + */ proto.payload.NameTx.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2552,9 +2679,12 @@ proto.payload.NameTx.prototype.getData = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.NameTx} returns this + */ proto.payload.NameTx.prototype.setData = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -2567,9 +2697,12 @@ proto.payload.NameTx.prototype.getFee = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.NameTx} returns this + */ proto.payload.NameTx.prototype.setFee = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -2578,13 +2711,15 @@ proto.payload.NameTx.prototype.setFee = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.BondTx.prototype.toObject = function(opt_includeInstance) { @@ -2594,8 +2729,8 @@ proto.payload.BondTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.BondTx} msg The msg instance to transform. * @return {!Object} @@ -2695,17 +2830,21 @@ proto.payload.BondTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.BondTx} returns this +*/ proto.payload.BondTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.BondTx} returns this */ proto.payload.BondTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -2723,13 +2862,15 @@ proto.payload.BondTx.prototype.hasInput = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.UnbondTx.prototype.toObject = function(opt_includeInstance) { @@ -2739,8 +2880,8 @@ proto.payload.UnbondTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.UnbondTx} msg The msg instance to transform. * @return {!Object} @@ -2854,17 +2995,21 @@ proto.payload.UnbondTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.UnbondTx} returns this +*/ proto.payload.UnbondTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.UnbondTx} returns this */ proto.payload.UnbondTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -2887,17 +3032,21 @@ proto.payload.UnbondTx.prototype.getOutput = function() { }; -/** @param {?proto.payload.TxOutput|undefined} value */ +/** + * @param {?proto.payload.TxOutput|undefined} value + * @return {!proto.payload.UnbondTx} returns this +*/ proto.payload.UnbondTx.prototype.setOutput = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.UnbondTx} returns this */ proto.payload.UnbondTx.prototype.clearOutput = function() { - this.setOutput(undefined); + return this.setOutput(undefined); }; @@ -2922,13 +3071,15 @@ proto.payload.GovTx.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.GovTx.prototype.toObject = function(opt_includeInstance) { @@ -2938,8 +3089,8 @@ proto.payload.GovTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.GovTx} msg The msg instance to transform. * @return {!Object} @@ -3055,9 +3206,12 @@ proto.payload.GovTx.prototype.getInputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.GovTx} returns this +*/ proto.payload.GovTx.prototype.setInputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3073,9 +3227,10 @@ proto.payload.GovTx.prototype.addInputs = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.GovTx} returns this */ proto.payload.GovTx.prototype.clearInputsList = function() { - this.setInputsList([]); + return this.setInputsList([]); }; @@ -3089,9 +3244,12 @@ proto.payload.GovTx.prototype.getAccountupdatesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.GovTx} returns this +*/ proto.payload.GovTx.prototype.setAccountupdatesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -3107,9 +3265,10 @@ proto.payload.GovTx.prototype.addAccountupdates = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.payload.GovTx} returns this */ proto.payload.GovTx.prototype.clearAccountupdatesList = function() { - this.setAccountupdatesList([]); + return this.setAccountupdatesList([]); }; @@ -3118,13 +3277,15 @@ proto.payload.GovTx.prototype.clearAccountupdatesList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.ProposalTx.prototype.toObject = function(opt_includeInstance) { @@ -3134,8 +3295,8 @@ proto.payload.ProposalTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.ProposalTx} msg The msg instance to transform. * @return {!Object} @@ -3273,17 +3434,21 @@ proto.payload.ProposalTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.ProposalTx} returns this +*/ proto.payload.ProposalTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.ProposalTx} returns this */ proto.payload.ProposalTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -3305,9 +3470,12 @@ proto.payload.ProposalTx.prototype.getVotingweight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.ProposalTx} returns this + */ proto.payload.ProposalTx.prototype.setVotingweight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -3344,9 +3512,12 @@ proto.payload.ProposalTx.prototype.getProposalhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.ProposalTx} returns this + */ proto.payload.ProposalTx.prototype.setProposalhash = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -3360,17 +3531,21 @@ proto.payload.ProposalTx.prototype.getProposal = function() { }; -/** @param {?proto.payload.Proposal|undefined} value */ +/** + * @param {?proto.payload.Proposal|undefined} value + * @return {!proto.payload.ProposalTx} returns this +*/ proto.payload.ProposalTx.prototype.setProposal = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.ProposalTx} returns this */ proto.payload.ProposalTx.prototype.clearProposal = function() { - this.setProposal(undefined); + return this.setProposal(undefined); }; @@ -3395,13 +3570,15 @@ proto.payload.IdentifyTx.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.IdentifyTx.prototype.toObject = function(opt_includeInstance) { @@ -3411,8 +3588,8 @@ proto.payload.IdentifyTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.IdentifyTx} msg The msg instance to transform. * @return {!Object} @@ -3527,9 +3704,12 @@ proto.payload.IdentifyTx.prototype.getInputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.IdentifyTx} returns this +*/ proto.payload.IdentifyTx.prototype.setInputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3545,9 +3725,10 @@ proto.payload.IdentifyTx.prototype.addInputs = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.IdentifyTx} returns this */ proto.payload.IdentifyTx.prototype.clearInputsList = function() { - this.setInputsList([]); + return this.setInputsList([]); }; @@ -3561,17 +3742,21 @@ proto.payload.IdentifyTx.prototype.getNode = function() { }; -/** @param {?proto.registry.NodeIdentity|undefined} value */ +/** + * @param {?proto.registry.NodeIdentity|undefined} value + * @return {!proto.payload.IdentifyTx} returns this +*/ proto.payload.IdentifyTx.prototype.setNode = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.IdentifyTx} returns this */ proto.payload.IdentifyTx.prototype.clearNode = function() { - this.setNode(undefined); + return this.setNode(undefined); }; @@ -3596,13 +3781,15 @@ proto.payload.BatchTx.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.BatchTx.prototype.toObject = function(opt_includeInstance) { @@ -3612,8 +3799,8 @@ proto.payload.BatchTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.BatchTx} msg The msg instance to transform. * @return {!Object} @@ -3729,9 +3916,12 @@ proto.payload.BatchTx.prototype.getInputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.BatchTx} returns this +*/ proto.payload.BatchTx.prototype.setInputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3747,9 +3937,10 @@ proto.payload.BatchTx.prototype.addInputs = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.BatchTx} returns this */ proto.payload.BatchTx.prototype.clearInputsList = function() { - this.setInputsList([]); + return this.setInputsList([]); }; @@ -3763,9 +3954,12 @@ proto.payload.BatchTx.prototype.getTxsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.BatchTx} returns this +*/ proto.payload.BatchTx.prototype.setTxsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -3781,9 +3975,10 @@ proto.payload.BatchTx.prototype.addTxs = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.BatchTx} returns this */ proto.payload.BatchTx.prototype.clearTxsList = function() { - this.setTxsList([]); + return this.setTxsList([]); }; @@ -3792,13 +3987,15 @@ proto.payload.BatchTx.prototype.clearTxsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.Vote.prototype.toObject = function(opt_includeInstance) { @@ -3808,8 +4005,8 @@ proto.payload.Vote.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Vote} msg The msg instance to transform. * @return {!Object} @@ -3942,9 +4139,12 @@ proto.payload.Vote.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.Vote} returns this + */ proto.payload.Vote.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3957,9 +4157,12 @@ proto.payload.Vote.prototype.getVotingweight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.Vote} returns this + */ proto.payload.Vote.prototype.setVotingweight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -3968,13 +4171,15 @@ proto.payload.Vote.prototype.setVotingweight = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.Proposal.prototype.toObject = function(opt_includeInstance) { @@ -3984,8 +4189,8 @@ proto.payload.Proposal.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Proposal} msg The msg instance to transform. * @return {!Object} @@ -4108,9 +4313,12 @@ proto.payload.Proposal.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.Proposal} returns this + */ proto.payload.Proposal.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -4123,9 +4331,12 @@ proto.payload.Proposal.prototype.getDescription = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.Proposal} returns this + */ proto.payload.Proposal.prototype.setDescription = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -4139,17 +4350,21 @@ proto.payload.Proposal.prototype.getBatchtx = function() { }; -/** @param {?proto.payload.BatchTx|undefined} value */ +/** + * @param {?proto.payload.BatchTx|undefined} value + * @return {!proto.payload.Proposal} returns this +*/ proto.payload.Proposal.prototype.setBatchtx = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Proposal} returns this */ proto.payload.Proposal.prototype.clearBatchtx = function() { - this.setBatchtx(undefined); + return this.setBatchtx(undefined); }; @@ -4174,13 +4389,15 @@ proto.payload.Ballot.repeatedFields_ = [5]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.Ballot.prototype.toObject = function(opt_includeInstance) { @@ -4190,8 +4407,8 @@ proto.payload.Ballot.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Ballot} msg The msg instance to transform. * @return {!Object} @@ -4339,17 +4556,21 @@ proto.payload.Ballot.prototype.getProposal = function() { }; -/** @param {?proto.payload.Proposal|undefined} value */ +/** + * @param {?proto.payload.Proposal|undefined} value + * @return {!proto.payload.Ballot} returns this +*/ proto.payload.Ballot.prototype.setProposal = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.payload.Ballot} returns this */ proto.payload.Ballot.prototype.clearProposal = function() { - this.setProposal(undefined); + return this.setProposal(undefined); }; @@ -4395,9 +4616,12 @@ proto.payload.Ballot.prototype.getFinalizingtx_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.Ballot} returns this + */ proto.payload.Ballot.prototype.setFinalizingtx = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4410,9 +4634,12 @@ proto.payload.Ballot.prototype.getProposalstate = function() { }; -/** @param {!proto.payload.Ballot.ProposalState} value */ +/** + * @param {!proto.payload.Ballot.ProposalState} value + * @return {!proto.payload.Ballot} returns this + */ proto.payload.Ballot.prototype.setProposalstate = function(value) { - jspb.Message.setProto3EnumField(this, 4, value); + return jspb.Message.setProto3EnumField(this, 4, value); }; @@ -4426,9 +4653,12 @@ proto.payload.Ballot.prototype.getVotesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.Ballot} returns this +*/ proto.payload.Ballot.prototype.setVotesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); + return jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -4444,9 +4674,10 @@ proto.payload.Ballot.prototype.addVotes = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.payload.Ballot} returns this */ proto.payload.Ballot.prototype.clearVotesList = function() { - this.setVotesList([]); + return this.setVotesList([]); }; diff --git a/js/proto/permission_pb.js b/js/proto/permission_pb.js index f40b43223..19593fe24 100644 --- a/js/proto/permission_pb.js +++ b/js/proto/permission_pb.js @@ -1,3 +1,4 @@ +// source: permission.proto /** * @fileoverview * @enhanceable @@ -91,13 +92,15 @@ proto.permission.AccountPermissions.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.permission.AccountPermissions.prototype.toObject = function(opt_includeInstance) { @@ -107,8 +110,8 @@ proto.permission.AccountPermissions.prototype.toObject = function(opt_includeIns /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.permission.AccountPermissions} msg The msg instance to transform. * @return {!Object} @@ -117,7 +120,7 @@ proto.permission.AccountPermissions.prototype.toObject = function(opt_includeIns proto.permission.AccountPermissions.toObject = function(includeInstance, msg) { var f, obj = { base: (f = msg.getBase()) && proto.permission.BasePermissions.toObject(includeInstance, f), - rolesList: jspb.Message.getRepeatedField(msg, 2) + rolesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -220,17 +223,21 @@ proto.permission.AccountPermissions.prototype.getBase = function() { }; -/** @param {?proto.permission.BasePermissions|undefined} value */ +/** + * @param {?proto.permission.BasePermissions|undefined} value + * @return {!proto.permission.AccountPermissions} returns this +*/ proto.permission.AccountPermissions.prototype.setBase = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.permission.AccountPermissions} returns this */ proto.permission.AccountPermissions.prototype.clearBase = function() { - this.setBase(undefined); + return this.setBase(undefined); }; @@ -252,26 +259,31 @@ proto.permission.AccountPermissions.prototype.getRolesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.permission.AccountPermissions} returns this + */ proto.permission.AccountPermissions.prototype.setRolesList = function(value) { - jspb.Message.setField(this, 2, value || []); + return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.permission.AccountPermissions} returns this */ proto.permission.AccountPermissions.prototype.addRoles = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.permission.AccountPermissions} returns this */ proto.permission.AccountPermissions.prototype.clearRolesList = function() { - this.setRolesList([]); + return this.setRolesList([]); }; @@ -280,13 +292,15 @@ proto.permission.AccountPermissions.prototype.clearRolesList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstance) { @@ -296,8 +310,8 @@ proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstan /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.permission.BasePermissions} msg The msg instance to transform. * @return {!Object} @@ -305,8 +319,8 @@ proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstan */ proto.permission.BasePermissions.toObject = function(includeInstance, msg) { var f, obj = { - perms: jspb.Message.getField(msg, 1), - setbit: jspb.Message.getField(msg, 2) + perms: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + setbit: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -406,17 +420,21 @@ proto.permission.BasePermissions.prototype.getPerms = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.permission.BasePermissions} returns this + */ proto.permission.BasePermissions.prototype.setPerms = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.BasePermissions} returns this */ proto.permission.BasePermissions.prototype.clearPerms = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -438,17 +456,21 @@ proto.permission.BasePermissions.prototype.getSetbit = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.permission.BasePermissions} returns this + */ proto.permission.BasePermissions.prototype.setSetbit = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.BasePermissions} returns this */ proto.permission.BasePermissions.prototype.clearSetbit = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -466,13 +488,15 @@ proto.permission.BasePermissions.prototype.hasSetbit = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { @@ -482,8 +506,8 @@ proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.permission.PermArgs} msg The msg instance to transform. * @return {!Object} @@ -491,11 +515,11 @@ proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { */ proto.permission.PermArgs.toObject = function(includeInstance, msg) { var f, obj = { - action: jspb.Message.getField(msg, 1), + action: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, target: msg.getTarget_asB64(), - permission: jspb.Message.getField(msg, 3), - role: jspb.Message.getField(msg, 4), - value: jspb.Message.getField(msg, 5) + permission: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + role: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + value: (f = jspb.Message.getBooleanField(msg, 5)) == null ? undefined : f }; if (includeInstance) { @@ -628,17 +652,21 @@ proto.permission.PermArgs.prototype.getAction = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setAction = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this */ proto.permission.PermArgs.prototype.clearAction = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -684,17 +712,21 @@ proto.permission.PermArgs.prototype.getTarget_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setTarget = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this */ proto.permission.PermArgs.prototype.clearTarget = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -716,17 +748,21 @@ proto.permission.PermArgs.prototype.getPermission = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setPermission = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this */ proto.permission.PermArgs.prototype.clearPermission = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -748,17 +784,21 @@ proto.permission.PermArgs.prototype.getRole = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setRole = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this */ proto.permission.PermArgs.prototype.clearRole = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -773,26 +813,28 @@ proto.permission.PermArgs.prototype.hasRole = function() { /** * optional bool Value = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.permission.PermArgs.prototype.getValue = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setValue = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this */ proto.permission.PermArgs.prototype.clearValue = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; diff --git a/js/proto/registry_pb.js b/js/proto/registry_pb.js index c37ccb219..bd4d4f396 100644 --- a/js/proto/registry_pb.js +++ b/js/proto/registry_pb.js @@ -1,3 +1,4 @@ +// source: registry.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.registry.NodeIdentity.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.registry.NodeIdentity.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.registry.NodeIdentity} msg The msg instance to transform. * @return {!Object} @@ -190,9 +193,12 @@ proto.registry.NodeIdentity.prototype.getMoniker = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.registry.NodeIdentity} returns this + */ proto.registry.NodeIdentity.prototype.setMoniker = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -205,9 +211,12 @@ proto.registry.NodeIdentity.prototype.getNetworkaddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.registry.NodeIdentity} returns this + */ proto.registry.NodeIdentity.prototype.setNetworkaddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -244,9 +253,12 @@ proto.registry.NodeIdentity.prototype.getTendermintnodeid_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.registry.NodeIdentity} returns this + */ proto.registry.NodeIdentity.prototype.setTendermintnodeid = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -283,9 +295,12 @@ proto.registry.NodeIdentity.prototype.getValidatorpublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.registry.NodeIdentity} returns this + */ proto.registry.NodeIdentity.prototype.setValidatorpublickey = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; diff --git a/js/proto/rpc_pb.js b/js/proto/rpc_pb.js index 3b00a5cc1..c5b39bd08 100644 --- a/js/proto/rpc_pb.js +++ b/js/proto/rpc_pb.js @@ -1,3 +1,4 @@ +// source: rpc.proto /** * @fileoverview * @enhanceable @@ -46,13 +47,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpc.ResultStatus.prototype.toObject = function(opt_includeInstance) { @@ -62,8 +65,8 @@ proto.rpc.ResultStatus.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpc.ResultStatus} msg The msg instance to transform. * @return {!Object} @@ -77,7 +80,7 @@ proto.rpc.ResultStatus.toObject = function(includeInstance, msg) { genesishash: msg.getGenesishash_asB64(), nodeinfo: (f = msg.getNodeinfo()) && tendermint_pb.NodeInfo.toObject(includeInstance, f), syncinfo: (f = msg.getSyncinfo()) && bcm_pb.SyncInfo.toObject(includeInstance, f), - catchingup: jspb.Message.getFieldWithDefault(msg, 8, false), + catchingup: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), validatorinfo: (f = msg.getValidatorinfo()) && validator_pb.Validator.toObject(includeInstance, f) }; @@ -250,9 +253,12 @@ proto.rpc.ResultStatus.prototype.getChainid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setChainid = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -265,9 +271,12 @@ proto.rpc.ResultStatus.prototype.getRunid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setRunid = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -280,9 +289,12 @@ proto.rpc.ResultStatus.prototype.getBurrowversion = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setBurrowversion = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -319,9 +331,12 @@ proto.rpc.ResultStatus.prototype.getGenesishash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setGenesishash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -335,17 +350,21 @@ proto.rpc.ResultStatus.prototype.getNodeinfo = function() { }; -/** @param {?proto.tendermint.NodeInfo|undefined} value */ +/** + * @param {?proto.tendermint.NodeInfo|undefined} value + * @return {!proto.rpc.ResultStatus} returns this +*/ proto.rpc.ResultStatus.prototype.setNodeinfo = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpc.ResultStatus} returns this */ proto.rpc.ResultStatus.prototype.clearNodeinfo = function() { - this.setNodeinfo(undefined); + return this.setNodeinfo(undefined); }; @@ -368,17 +387,21 @@ proto.rpc.ResultStatus.prototype.getSyncinfo = function() { }; -/** @param {?proto.bcm.SyncInfo|undefined} value */ +/** + * @param {?proto.bcm.SyncInfo|undefined} value + * @return {!proto.rpc.ResultStatus} returns this +*/ proto.rpc.ResultStatus.prototype.setSyncinfo = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpc.ResultStatus} returns this */ proto.rpc.ResultStatus.prototype.clearSyncinfo = function() { - this.setSyncinfo(undefined); + return this.setSyncinfo(undefined); }; @@ -393,18 +416,19 @@ proto.rpc.ResultStatus.prototype.hasSyncinfo = function() { /** * optional bool CatchingUp = 8; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpc.ResultStatus.prototype.getCatchingup = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 8, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setCatchingup = function(value) { - jspb.Message.setProto3BooleanField(this, 8, value); + return jspb.Message.setProto3BooleanField(this, 8, value); }; @@ -418,17 +442,21 @@ proto.rpc.ResultStatus.prototype.getValidatorinfo = function() { }; -/** @param {?proto.validator.Validator|undefined} value */ +/** + * @param {?proto.validator.Validator|undefined} value + * @return {!proto.rpc.ResultStatus} returns this +*/ proto.rpc.ResultStatus.prototype.setValidatorinfo = function(value) { - jspb.Message.setWrapperField(this, 7, value); + return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpc.ResultStatus} returns this */ proto.rpc.ResultStatus.prototype.clearValidatorinfo = function() { - this.setValidatorinfo(undefined); + return this.setValidatorinfo(undefined); }; diff --git a/js/proto/rpcdump_pb.js b/js/proto/rpcdump_pb.js index 5efd0c4d9..f846a6cd5 100644 --- a/js/proto/rpcdump_pb.js +++ b/js/proto/rpcdump_pb.js @@ -1,3 +1,4 @@ +// source: rpcdump.proto /** * @fileoverview * @enhanceable @@ -42,13 +43,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcdump.GetDumpParam.prototype.toObject = function(opt_includeInstance) { @@ -58,8 +61,8 @@ proto.rpcdump.GetDumpParam.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcdump.GetDumpParam} msg The msg instance to transform. * @return {!Object} @@ -156,9 +159,12 @@ proto.rpcdump.GetDumpParam.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcdump.GetDumpParam} returns this + */ proto.rpcdump.GetDumpParam.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; diff --git a/js/proto/rpcevents_pb.js b/js/proto/rpcevents_pb.js index feed93236..25f593ae1 100644 --- a/js/proto/rpcevents_pb.js +++ b/js/proto/rpcevents_pb.js @@ -1,3 +1,4 @@ +// source: rpcevents.proto /** * @fileoverview * @enhanceable @@ -197,13 +198,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstance) { @@ -213,8 +216,8 @@ proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.GetBlockRequest} msg The msg instance to transform. * @return {!Object} @@ -223,7 +226,7 @@ proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstanc proto.rpcevents.GetBlockRequest.toObject = function(includeInstance, msg) { var f, obj = { height: jspb.Message.getFieldWithDefault(msg, 1, 0), - wait: jspb.Message.getFieldWithDefault(msg, 2, false) + wait: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -323,26 +326,30 @@ proto.rpcevents.GetBlockRequest.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.GetBlockRequest} returns this + */ proto.rpcevents.GetBlockRequest.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional bool Wait = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpcevents.GetBlockRequest.prototype.getWait = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.rpcevents.GetBlockRequest} returns this + */ proto.rpcevents.GetBlockRequest.prototype.setWait = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -351,13 +358,15 @@ proto.rpcevents.GetBlockRequest.prototype.setWait = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { @@ -367,8 +376,8 @@ proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.TxRequest} msg The msg instance to transform. * @return {!Object} @@ -377,7 +386,7 @@ proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { proto.rpcevents.TxRequest.toObject = function(includeInstance, msg) { var f, obj = { txhash: msg.getTxhash_asB64(), - wait: jspb.Message.getFieldWithDefault(msg, 2, false) + wait: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -501,26 +510,30 @@ proto.rpcevents.TxRequest.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcevents.TxRequest} returns this + */ proto.rpcevents.TxRequest.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; /** * optional bool Wait = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpcevents.TxRequest.prototype.getWait = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.rpcevents.TxRequest} returns this + */ proto.rpcevents.TxRequest.prototype.setWait = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -529,13 +542,15 @@ proto.rpcevents.TxRequest.prototype.setWait = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.BlocksRequest.prototype.toObject = function(opt_includeInstance) { @@ -545,8 +560,8 @@ proto.rpcevents.BlocksRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.BlocksRequest} msg The msg instance to transform. * @return {!Object} @@ -658,17 +673,21 @@ proto.rpcevents.BlocksRequest.prototype.getBlockrange = function() { }; -/** @param {?proto.rpcevents.BlockRange|undefined} value */ +/** + * @param {?proto.rpcevents.BlockRange|undefined} value + * @return {!proto.rpcevents.BlocksRequest} returns this +*/ proto.rpcevents.BlocksRequest.prototype.setBlockrange = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpcevents.BlocksRequest} returns this */ proto.rpcevents.BlocksRequest.prototype.clearBlockrange = function() { - this.setBlockrange(undefined); + return this.setBlockrange(undefined); }; @@ -690,9 +709,12 @@ proto.rpcevents.BlocksRequest.prototype.getQuery = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcevents.BlocksRequest} returns this + */ proto.rpcevents.BlocksRequest.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -708,13 +730,15 @@ proto.rpcevents.EventsResponse.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.EventsResponse.prototype.toObject = function(opt_includeInstance) { @@ -724,8 +748,8 @@ proto.rpcevents.EventsResponse.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.EventsResponse} msg The msg instance to transform. * @return {!Object} @@ -837,9 +861,12 @@ proto.rpcevents.EventsResponse.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.EventsResponse} returns this + */ proto.rpcevents.EventsResponse.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -853,9 +880,12 @@ proto.rpcevents.EventsResponse.prototype.getEventsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcevents.EventsResponse} returns this +*/ proto.rpcevents.EventsResponse.prototype.setEventsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -871,9 +901,10 @@ proto.rpcevents.EventsResponse.prototype.addEvents = function(opt_value, opt_ind /** * Clears the list making it empty but non-null. + * @return {!proto.rpcevents.EventsResponse} returns this */ proto.rpcevents.EventsResponse.prototype.clearEventsList = function() { - this.setEventsList([]); + return this.setEventsList([]); }; @@ -882,13 +913,15 @@ proto.rpcevents.EventsResponse.prototype.clearEventsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.GetTxsRequest.prototype.toObject = function(opt_includeInstance) { @@ -898,8 +931,8 @@ proto.rpcevents.GetTxsRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.GetTxsRequest} msg The msg instance to transform. * @return {!Object} @@ -1020,9 +1053,12 @@ proto.rpcevents.GetTxsRequest.prototype.getStartheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.GetTxsRequest} returns this + */ proto.rpcevents.GetTxsRequest.prototype.setStartheight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1035,9 +1071,12 @@ proto.rpcevents.GetTxsRequest.prototype.getEndheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.GetTxsRequest} returns this + */ proto.rpcevents.GetTxsRequest.prototype.setEndheight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -1050,9 +1089,12 @@ proto.rpcevents.GetTxsRequest.prototype.getQuery = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcevents.GetTxsRequest} returns this + */ proto.rpcevents.GetTxsRequest.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -1068,13 +1110,15 @@ proto.rpcevents.GetTxsResponse.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.GetTxsResponse.prototype.toObject = function(opt_includeInstance) { @@ -1084,8 +1128,8 @@ proto.rpcevents.GetTxsResponse.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.GetTxsResponse} msg The msg instance to transform. * @return {!Object} @@ -1197,9 +1241,12 @@ proto.rpcevents.GetTxsResponse.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.GetTxsResponse} returns this + */ proto.rpcevents.GetTxsResponse.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1213,9 +1260,12 @@ proto.rpcevents.GetTxsResponse.prototype.getTxexecutionsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcevents.GetTxsResponse} returns this +*/ proto.rpcevents.GetTxsResponse.prototype.setTxexecutionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -1231,9 +1281,10 @@ proto.rpcevents.GetTxsResponse.prototype.addTxexecutions = function(opt_value, o /** * Clears the list making it empty but non-null. + * @return {!proto.rpcevents.GetTxsResponse} returns this */ proto.rpcevents.GetTxsResponse.prototype.clearTxexecutionsList = function() { - this.setTxexecutionsList([]); + return this.setTxexecutionsList([]); }; @@ -1242,13 +1293,15 @@ proto.rpcevents.GetTxsResponse.prototype.clearTxexecutionsList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.Bound.prototype.toObject = function(opt_includeInstance) { @@ -1258,8 +1311,8 @@ proto.rpcevents.Bound.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.Bound} msg The msg instance to transform. * @return {!Object} @@ -1379,9 +1432,12 @@ proto.rpcevents.Bound.prototype.getType = function() { }; -/** @param {!proto.rpcevents.Bound.BoundType} value */ +/** + * @param {!proto.rpcevents.Bound.BoundType} value + * @return {!proto.rpcevents.Bound} returns this + */ proto.rpcevents.Bound.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 1, value); + return jspb.Message.setProto3EnumField(this, 1, value); }; @@ -1394,9 +1450,12 @@ proto.rpcevents.Bound.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.Bound} returns this + */ proto.rpcevents.Bound.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -1405,13 +1464,15 @@ proto.rpcevents.Bound.prototype.setIndex = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.BlockRange.prototype.toObject = function(opt_includeInstance) { @@ -1421,8 +1482,8 @@ proto.rpcevents.BlockRange.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.BlockRange} msg The msg instance to transform. * @return {!Object} @@ -1536,17 +1597,21 @@ proto.rpcevents.BlockRange.prototype.getStart = function() { }; -/** @param {?proto.rpcevents.Bound|undefined} value */ +/** + * @param {?proto.rpcevents.Bound|undefined} value + * @return {!proto.rpcevents.BlockRange} returns this +*/ proto.rpcevents.BlockRange.prototype.setStart = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpcevents.BlockRange} returns this */ proto.rpcevents.BlockRange.prototype.clearStart = function() { - this.setStart(undefined); + return this.setStart(undefined); }; @@ -1569,17 +1634,21 @@ proto.rpcevents.BlockRange.prototype.getEnd = function() { }; -/** @param {?proto.rpcevents.Bound|undefined} value */ +/** + * @param {?proto.rpcevents.Bound|undefined} value + * @return {!proto.rpcevents.BlockRange} returns this +*/ proto.rpcevents.BlockRange.prototype.setEnd = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpcevents.BlockRange} returns this */ proto.rpcevents.BlockRange.prototype.clearEnd = function() { - this.setEnd(undefined); + return this.setEnd(undefined); }; diff --git a/js/proto/rpcquery_pb.js b/js/proto/rpcquery_pb.js index f013bb83f..9be4a8384 100644 --- a/js/proto/rpcquery_pb.js +++ b/js/proto/rpcquery_pb.js @@ -1,3 +1,4 @@ +// source: rpcquery.proto /** * @fileoverview * @enhanceable @@ -516,13 +517,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.StatusParam.prototype.toObject = function(opt_includeInstance) { @@ -532,8 +535,8 @@ proto.rpcquery.StatusParam.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.StatusParam} msg The msg instance to transform. * @return {!Object} @@ -642,9 +645,12 @@ proto.rpcquery.StatusParam.prototype.getBlocktimewithin = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.StatusParam} returns this + */ proto.rpcquery.StatusParam.prototype.setBlocktimewithin = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -657,9 +663,12 @@ proto.rpcquery.StatusParam.prototype.getBlockseentimewithin = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.StatusParam} returns this + */ proto.rpcquery.StatusParam.prototype.setBlockseentimewithin = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -668,13 +677,15 @@ proto.rpcquery.StatusParam.prototype.setBlockseentimewithin = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetAccountParam.prototype.toObject = function(opt_includeInstance) { @@ -684,8 +695,8 @@ proto.rpcquery.GetAccountParam.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetAccountParam} msg The msg instance to transform. * @return {!Object} @@ -806,9 +817,12 @@ proto.rpcquery.GetAccountParam.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetAccountParam} returns this + */ proto.rpcquery.GetAccountParam.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -817,13 +831,15 @@ proto.rpcquery.GetAccountParam.prototype.setAddress = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetMetadataParam.prototype.toObject = function(opt_includeInstance) { @@ -833,8 +849,8 @@ proto.rpcquery.GetMetadataParam.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetMetadataParam} msg The msg instance to transform. * @return {!Object} @@ -967,9 +983,12 @@ proto.rpcquery.GetMetadataParam.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetMetadataParam} returns this + */ proto.rpcquery.GetMetadataParam.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1006,9 +1025,12 @@ proto.rpcquery.GetMetadataParam.prototype.getMetadatahash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetMetadataParam} returns this + */ proto.rpcquery.GetMetadataParam.prototype.setMetadatahash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -1017,13 +1039,15 @@ proto.rpcquery.GetMetadataParam.prototype.setMetadatahash = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.MetadataResult.prototype.toObject = function(opt_includeInstance) { @@ -1033,8 +1057,8 @@ proto.rpcquery.MetadataResult.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.MetadataResult} msg The msg instance to transform. * @return {!Object} @@ -1131,9 +1155,12 @@ proto.rpcquery.MetadataResult.prototype.getMetadata = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.MetadataResult} returns this + */ proto.rpcquery.MetadataResult.prototype.setMetadata = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1142,13 +1169,15 @@ proto.rpcquery.MetadataResult.prototype.setMetadata = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetStorageParam.prototype.toObject = function(opt_includeInstance) { @@ -1158,8 +1187,8 @@ proto.rpcquery.GetStorageParam.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetStorageParam} msg The msg instance to transform. * @return {!Object} @@ -1292,9 +1321,12 @@ proto.rpcquery.GetStorageParam.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetStorageParam} returns this + */ proto.rpcquery.GetStorageParam.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1331,9 +1363,12 @@ proto.rpcquery.GetStorageParam.prototype.getKey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetStorageParam} returns this + */ proto.rpcquery.GetStorageParam.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -1342,13 +1377,15 @@ proto.rpcquery.GetStorageParam.prototype.setKey = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.StorageValue.prototype.toObject = function(opt_includeInstance) { @@ -1358,8 +1395,8 @@ proto.rpcquery.StorageValue.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.StorageValue} msg The msg instance to transform. * @return {!Object} @@ -1480,9 +1517,12 @@ proto.rpcquery.StorageValue.prototype.getValue_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.StorageValue} returns this + */ proto.rpcquery.StorageValue.prototype.setValue = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1491,13 +1531,15 @@ proto.rpcquery.StorageValue.prototype.setValue = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ListAccountsParam.prototype.toObject = function(opt_includeInstance) { @@ -1507,8 +1549,8 @@ proto.rpcquery.ListAccountsParam.prototype.toObject = function(opt_includeInstan /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ListAccountsParam} msg The msg instance to transform. * @return {!Object} @@ -1605,9 +1647,12 @@ proto.rpcquery.ListAccountsParam.prototype.getQuery = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.ListAccountsParam} returns this + */ proto.rpcquery.ListAccountsParam.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1616,13 +1661,15 @@ proto.rpcquery.ListAccountsParam.prototype.setQuery = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetNameParam.prototype.toObject = function(opt_includeInstance) { @@ -1632,8 +1679,8 @@ proto.rpcquery.GetNameParam.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetNameParam} msg The msg instance to transform. * @return {!Object} @@ -1730,9 +1777,12 @@ proto.rpcquery.GetNameParam.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.GetNameParam} returns this + */ proto.rpcquery.GetNameParam.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1741,13 +1791,15 @@ proto.rpcquery.GetNameParam.prototype.setName = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ListNamesParam.prototype.toObject = function(opt_includeInstance) { @@ -1757,8 +1809,8 @@ proto.rpcquery.ListNamesParam.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ListNamesParam} msg The msg instance to transform. * @return {!Object} @@ -1855,9 +1907,12 @@ proto.rpcquery.ListNamesParam.prototype.getQuery = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.ListNamesParam} returns this + */ proto.rpcquery.ListNamesParam.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1866,13 +1921,15 @@ proto.rpcquery.ListNamesParam.prototype.setQuery = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetNetworkRegistryParam.prototype.toObject = function(opt_includeInstance) { @@ -1882,8 +1939,8 @@ proto.rpcquery.GetNetworkRegistryParam.prototype.toObject = function(opt_include /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetNetworkRegistryParam} msg The msg instance to transform. * @return {!Object} @@ -1965,13 +2022,15 @@ proto.rpcquery.GetNetworkRegistryParam.serializeBinaryToWriter = function(messag if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetValidatorSetParam.prototype.toObject = function(opt_includeInstance) { @@ -1981,8 +2040,8 @@ proto.rpcquery.GetValidatorSetParam.prototype.toObject = function(opt_includeIns /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetValidatorSetParam} msg The msg instance to transform. * @return {!Object} @@ -2064,13 +2123,15 @@ proto.rpcquery.GetValidatorSetParam.serializeBinaryToWriter = function(message, if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetValidatorSetHistoryParam.prototype.toObject = function(opt_includeInstance) { @@ -2080,8 +2141,8 @@ proto.rpcquery.GetValidatorSetHistoryParam.prototype.toObject = function(opt_inc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetValidatorSetHistoryParam} msg The msg instance to transform. * @return {!Object} @@ -2178,9 +2239,12 @@ proto.rpcquery.GetValidatorSetHistoryParam.prototype.getIncludeprevious = functi }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.GetValidatorSetHistoryParam} returns this + */ proto.rpcquery.GetValidatorSetHistoryParam.prototype.setIncludeprevious = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2196,13 +2260,15 @@ proto.rpcquery.NetworkRegistry.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.NetworkRegistry.prototype.toObject = function(opt_includeInstance) { @@ -2212,8 +2278,8 @@ proto.rpcquery.NetworkRegistry.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.NetworkRegistry} msg The msg instance to transform. * @return {!Object} @@ -2314,9 +2380,12 @@ proto.rpcquery.NetworkRegistry.prototype.getSetList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcquery.NetworkRegistry} returns this +*/ proto.rpcquery.NetworkRegistry.prototype.setSetList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -2332,9 +2401,10 @@ proto.rpcquery.NetworkRegistry.prototype.addSet = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.rpcquery.NetworkRegistry} returns this */ proto.rpcquery.NetworkRegistry.prototype.clearSetList = function() { - this.setSetList([]); + return this.setSetList([]); }; @@ -2343,13 +2413,15 @@ proto.rpcquery.NetworkRegistry.prototype.clearSetList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.RegisteredValidator.prototype.toObject = function(opt_includeInstance) { @@ -2359,8 +2431,8 @@ proto.rpcquery.RegisteredValidator.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.RegisteredValidator} msg The msg instance to transform. * @return {!Object} @@ -2495,9 +2567,12 @@ proto.rpcquery.RegisteredValidator.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.RegisteredValidator} returns this + */ proto.rpcquery.RegisteredValidator.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2511,17 +2586,21 @@ proto.rpcquery.RegisteredValidator.prototype.getNode = function() { }; -/** @param {?proto.registry.NodeIdentity|undefined} value */ +/** + * @param {?proto.registry.NodeIdentity|undefined} value + * @return {!proto.rpcquery.RegisteredValidator} returns this +*/ proto.rpcquery.RegisteredValidator.prototype.setNode = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpcquery.RegisteredValidator} returns this */ proto.rpcquery.RegisteredValidator.prototype.clearNode = function() { - this.setNode(undefined); + return this.setNode(undefined); }; @@ -2546,13 +2625,15 @@ proto.rpcquery.ValidatorSetHistory.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ValidatorSetHistory.prototype.toObject = function(opt_includeInstance) { @@ -2562,8 +2643,8 @@ proto.rpcquery.ValidatorSetHistory.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ValidatorSetHistory} msg The msg instance to transform. * @return {!Object} @@ -2664,9 +2745,12 @@ proto.rpcquery.ValidatorSetHistory.prototype.getHistoryList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcquery.ValidatorSetHistory} returns this +*/ proto.rpcquery.ValidatorSetHistory.prototype.setHistoryList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -2682,9 +2766,10 @@ proto.rpcquery.ValidatorSetHistory.prototype.addHistory = function(opt_value, op /** * Clears the list making it empty but non-null. + * @return {!proto.rpcquery.ValidatorSetHistory} returns this */ proto.rpcquery.ValidatorSetHistory.prototype.clearHistoryList = function() { - this.setHistoryList([]); + return this.setHistoryList([]); }; @@ -2700,13 +2785,15 @@ proto.rpcquery.ValidatorSet.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ValidatorSet.prototype.toObject = function(opt_includeInstance) { @@ -2716,8 +2803,8 @@ proto.rpcquery.ValidatorSet.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ValidatorSet} msg The msg instance to transform. * @return {!Object} @@ -2829,9 +2916,12 @@ proto.rpcquery.ValidatorSet.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.ValidatorSet} returns this + */ proto.rpcquery.ValidatorSet.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2845,9 +2935,12 @@ proto.rpcquery.ValidatorSet.prototype.getSetList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcquery.ValidatorSet} returns this +*/ proto.rpcquery.ValidatorSet.prototype.setSetList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -2863,9 +2956,10 @@ proto.rpcquery.ValidatorSet.prototype.addSet = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.rpcquery.ValidatorSet} returns this */ proto.rpcquery.ValidatorSet.prototype.clearSetList = function() { - this.setSetList([]); + return this.setSetList([]); }; @@ -2874,13 +2968,15 @@ proto.rpcquery.ValidatorSet.prototype.clearSetList = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetProposalParam.prototype.toObject = function(opt_includeInstance) { @@ -2890,8 +2986,8 @@ proto.rpcquery.GetProposalParam.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetProposalParam} msg The msg instance to transform. * @return {!Object} @@ -3012,9 +3108,12 @@ proto.rpcquery.GetProposalParam.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetProposalParam} returns this + */ proto.rpcquery.GetProposalParam.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3023,13 +3122,15 @@ proto.rpcquery.GetProposalParam.prototype.setHash = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInstance) { @@ -3039,8 +3140,8 @@ proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ListProposalsParam} msg The msg instance to transform. * @return {!Object} @@ -3048,7 +3149,7 @@ proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInsta */ proto.rpcquery.ListProposalsParam.toObject = function(includeInstance, msg) { var f, obj = { - proposed: jspb.Message.getFieldWithDefault(msg, 1, false) + proposed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -3130,18 +3231,19 @@ proto.rpcquery.ListProposalsParam.serializeBinaryToWriter = function(message, wr /** * optional bool Proposed = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpcquery.ListProposalsParam.prototype.getProposed = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.rpcquery.ListProposalsParam} returns this + */ proto.rpcquery.ListProposalsParam.prototype.setProposed = function(value) { - jspb.Message.setProto3BooleanField(this, 1, value); + return jspb.Message.setProto3BooleanField(this, 1, value); }; @@ -3150,13 +3252,15 @@ proto.rpcquery.ListProposalsParam.prototype.setProposed = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ProposalResult.prototype.toObject = function(opt_includeInstance) { @@ -3166,8 +3270,8 @@ proto.rpcquery.ProposalResult.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ProposalResult} msg The msg instance to transform. * @return {!Object} @@ -3302,9 +3406,12 @@ proto.rpcquery.ProposalResult.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.ProposalResult} returns this + */ proto.rpcquery.ProposalResult.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3318,17 +3425,21 @@ proto.rpcquery.ProposalResult.prototype.getBallot = function() { }; -/** @param {?proto.payload.Ballot|undefined} value */ +/** + * @param {?proto.payload.Ballot|undefined} value + * @return {!proto.rpcquery.ProposalResult} returns this +*/ proto.rpcquery.ProposalResult.prototype.setBallot = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpcquery.ProposalResult} returns this */ proto.rpcquery.ProposalResult.prototype.clearBallot = function() { - this.setBallot(undefined); + return this.setBallot(undefined); }; @@ -3346,13 +3457,15 @@ proto.rpcquery.ProposalResult.prototype.hasBallot = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetStatsParam.prototype.toObject = function(opt_includeInstance) { @@ -3362,8 +3475,8 @@ proto.rpcquery.GetStatsParam.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetStatsParam} msg The msg instance to transform. * @return {!Object} @@ -3445,13 +3558,15 @@ proto.rpcquery.GetStatsParam.serializeBinaryToWriter = function(message, writer) if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.Stats.prototype.toObject = function(opt_includeInstance) { @@ -3461,8 +3576,8 @@ proto.rpcquery.Stats.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.Stats} msg The msg instance to transform. * @return {!Object} @@ -3571,9 +3686,12 @@ proto.rpcquery.Stats.prototype.getAccountswithcode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.Stats} returns this + */ proto.rpcquery.Stats.prototype.setAccountswithcode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -3586,9 +3704,12 @@ proto.rpcquery.Stats.prototype.getAccountswithoutcode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.Stats} returns this + */ proto.rpcquery.Stats.prototype.setAccountswithoutcode = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -3597,13 +3718,15 @@ proto.rpcquery.Stats.prototype.setAccountswithoutcode = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetBlockParam.prototype.toObject = function(opt_includeInstance) { @@ -3613,8 +3736,8 @@ proto.rpcquery.GetBlockParam.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetBlockParam} msg The msg instance to transform. * @return {!Object} @@ -3711,9 +3834,12 @@ proto.rpcquery.GetBlockParam.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.GetBlockParam} returns this + */ proto.rpcquery.GetBlockParam.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; diff --git a/js/proto/rpctransact_pb.js b/js/proto/rpctransact_pb.js index 06e8e9386..991ba55c8 100644 --- a/js/proto/rpctransact_pb.js +++ b/js/proto/rpctransact_pb.js @@ -1,3 +1,4 @@ +// source: rpctransact.proto /** * @fileoverview * @enhanceable @@ -92,13 +93,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpctransact.CallCodeParam.prototype.toObject = function(opt_includeInstance) { @@ -108,8 +111,8 @@ proto.rpctransact.CallCodeParam.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpctransact.CallCodeParam} msg The msg instance to transform. * @return {!Object} @@ -254,9 +257,12 @@ proto.rpctransact.CallCodeParam.prototype.getFromaddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpctransact.CallCodeParam} returns this + */ proto.rpctransact.CallCodeParam.prototype.setFromaddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -293,9 +299,12 @@ proto.rpctransact.CallCodeParam.prototype.getCode_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpctransact.CallCodeParam} returns this + */ proto.rpctransact.CallCodeParam.prototype.setCode = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -332,9 +341,12 @@ proto.rpctransact.CallCodeParam.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpctransact.CallCodeParam} returns this + */ proto.rpctransact.CallCodeParam.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -343,13 +355,15 @@ proto.rpctransact.CallCodeParam.prototype.setData = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpctransact.TxEnvelope.prototype.toObject = function(opt_includeInstance) { @@ -359,8 +373,8 @@ proto.rpctransact.TxEnvelope.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpctransact.TxEnvelope} msg The msg instance to transform. * @return {!Object} @@ -460,17 +474,21 @@ proto.rpctransact.TxEnvelope.prototype.getEnvelope = function() { }; -/** @param {?proto.txs.Envelope|undefined} value */ +/** + * @param {?proto.txs.Envelope|undefined} value + * @return {!proto.rpctransact.TxEnvelope} returns this +*/ proto.rpctransact.TxEnvelope.prototype.setEnvelope = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpctransact.TxEnvelope} returns this */ proto.rpctransact.TxEnvelope.prototype.clearEnvelope = function() { - this.setEnvelope(undefined); + return this.setEnvelope(undefined); }; @@ -488,13 +506,15 @@ proto.rpctransact.TxEnvelope.prototype.hasEnvelope = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpctransact.TxEnvelopeParam.prototype.toObject = function(opt_includeInstance) { @@ -504,8 +524,8 @@ proto.rpctransact.TxEnvelopeParam.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpctransact.TxEnvelopeParam} msg The msg instance to transform. * @return {!Object} @@ -633,17 +653,21 @@ proto.rpctransact.TxEnvelopeParam.prototype.getEnvelope = function() { }; -/** @param {?proto.txs.Envelope|undefined} value */ +/** + * @param {?proto.txs.Envelope|undefined} value + * @return {!proto.rpctransact.TxEnvelopeParam} returns this +*/ proto.rpctransact.TxEnvelopeParam.prototype.setEnvelope = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpctransact.TxEnvelopeParam} returns this */ proto.rpctransact.TxEnvelopeParam.prototype.clearEnvelope = function() { - this.setEnvelope(undefined); + return this.setEnvelope(undefined); }; @@ -666,17 +690,21 @@ proto.rpctransact.TxEnvelopeParam.prototype.getPayload = function() { }; -/** @param {?proto.payload.Any|undefined} value */ +/** + * @param {?proto.payload.Any|undefined} value + * @return {!proto.rpctransact.TxEnvelopeParam} returns this +*/ proto.rpctransact.TxEnvelopeParam.prototype.setPayload = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpctransact.TxEnvelopeParam} returns this */ proto.rpctransact.TxEnvelopeParam.prototype.clearPayload = function() { - this.setPayload(undefined); + return this.setPayload(undefined); }; @@ -699,17 +727,21 @@ proto.rpctransact.TxEnvelopeParam.prototype.getTimeout = function() { }; -/** @param {?proto.google.protobuf.Duration|undefined} value */ +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.rpctransact.TxEnvelopeParam} returns this +*/ proto.rpctransact.TxEnvelopeParam.prototype.setTimeout = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.rpctransact.TxEnvelopeParam} returns this */ proto.rpctransact.TxEnvelopeParam.prototype.clearTimeout = function() { - this.setTimeout(undefined); + return this.setTimeout(undefined); }; diff --git a/js/proto/spec_pb.js b/js/proto/spec_pb.js index cfe5df863..c0b9cd6d6 100644 --- a/js/proto/spec_pb.js +++ b/js/proto/spec_pb.js @@ -1,3 +1,4 @@ +// source: spec.proto /** * @fileoverview * @enhanceable @@ -51,13 +52,15 @@ proto.spec.TemplateAccount.repeatedFields_ = [4,5,6]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.spec.TemplateAccount.prototype.toObject = function(opt_includeInstance) { @@ -67,8 +70,8 @@ proto.spec.TemplateAccount.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.spec.TemplateAccount} msg The msg instance to transform. * @return {!Object} @@ -81,8 +84,8 @@ proto.spec.TemplateAccount.toObject = function(includeInstance, msg) { publickey: (f = msg.getPublickey()) && crypto_pb.PublicKey.toObject(includeInstance, f), amountsList: jspb.Message.toObjectList(msg.getAmountsList(), balance_pb.Balance.toObject, includeInstance), - permissionsList: jspb.Message.getRepeatedField(msg, 5), - rolesList: jspb.Message.getRepeatedField(msg, 6), + permissionsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + rolesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, code: msg.getCode_asB64() }; @@ -242,9 +245,12 @@ proto.spec.TemplateAccount.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -281,9 +287,12 @@ proto.spec.TemplateAccount.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -297,17 +306,21 @@ proto.spec.TemplateAccount.prototype.getPublickey = function() { }; -/** @param {?proto.crypto.PublicKey|undefined} value */ +/** + * @param {?proto.crypto.PublicKey|undefined} value + * @return {!proto.spec.TemplateAccount} returns this +*/ proto.spec.TemplateAccount.prototype.setPublickey = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.clearPublickey = function() { - this.setPublickey(undefined); + return this.setPublickey(undefined); }; @@ -330,9 +343,12 @@ proto.spec.TemplateAccount.prototype.getAmountsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.spec.TemplateAccount} returns this +*/ proto.spec.TemplateAccount.prototype.setAmountsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -348,9 +364,10 @@ proto.spec.TemplateAccount.prototype.addAmounts = function(opt_value, opt_index) /** * Clears the list making it empty but non-null. + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.clearAmountsList = function() { - this.setAmountsList([]); + return this.setAmountsList([]); }; @@ -363,26 +380,31 @@ proto.spec.TemplateAccount.prototype.getPermissionsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setPermissionsList = function(value) { - jspb.Message.setField(this, 5, value || []); + return jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.addPermissions = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 5, value, opt_index); + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.clearPermissionsList = function() { - this.setPermissionsList([]); + return this.setPermissionsList([]); }; @@ -395,26 +417,31 @@ proto.spec.TemplateAccount.prototype.getRolesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setRolesList = function(value) { - jspb.Message.setField(this, 6, value || []); + return jspb.Message.setField(this, 6, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.addRoles = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 6, value, opt_index); + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; /** * Clears the list making it empty but non-null. + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.clearRolesList = function() { - this.setRolesList([]); + return this.setRolesList([]); }; @@ -451,9 +478,12 @@ proto.spec.TemplateAccount.prototype.getCode_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setCode = function(value) { - jspb.Message.setProto3BytesField(this, 7, value); + return jspb.Message.setProto3BytesField(this, 7, value); }; diff --git a/js/proto/storage_pb.js b/js/proto/storage_pb.js index 467f53a7d..4a7d06688 100644 --- a/js/proto/storage_pb.js +++ b/js/proto/storage_pb.js @@ -1,3 +1,4 @@ +// source: storage.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.storage.CommitID.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.storage.CommitID.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.storage.CommitID} msg The msg instance to transform. * @return {!Object} @@ -166,9 +169,12 @@ proto.storage.CommitID.prototype.getVersion = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.storage.CommitID} returns this + */ proto.storage.CommitID.prototype.setVersion = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -205,9 +211,12 @@ proto.storage.CommitID.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.storage.CommitID} returns this + */ proto.storage.CommitID.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; diff --git a/js/proto/tendermint_pb.js b/js/proto/tendermint_pb.js index 67f898ff2..779e287f0 100644 --- a/js/proto/tendermint_pb.js +++ b/js/proto/tendermint_pb.js @@ -1,3 +1,4 @@ +// source: tendermint.proto /** * @fileoverview * @enhanceable @@ -40,13 +41,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.tendermint.NodeInfo.prototype.toObject = function(opt_includeInstance) { @@ -56,8 +59,8 @@ proto.tendermint.NodeInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.tendermint.NodeInfo} msg The msg instance to transform. * @return {!Object} @@ -262,9 +265,12 @@ proto.tendermint.NodeInfo.prototype.getId_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setId = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -277,9 +283,12 @@ proto.tendermint.NodeInfo.prototype.getListenaddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setListenaddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -292,9 +301,12 @@ proto.tendermint.NodeInfo.prototype.getNetwork = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setNetwork = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -307,9 +319,12 @@ proto.tendermint.NodeInfo.prototype.getVersion = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -346,9 +361,12 @@ proto.tendermint.NodeInfo.prototype.getChannels_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setChannels = function(value) { - jspb.Message.setProto3BytesField(this, 5, value); + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -361,9 +379,12 @@ proto.tendermint.NodeInfo.prototype.getMoniker = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setMoniker = function(value) { - jspb.Message.setProto3StringField(this, 6, value); + return jspb.Message.setProto3StringField(this, 6, value); }; @@ -376,9 +397,12 @@ proto.tendermint.NodeInfo.prototype.getRpcaddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setRpcaddress = function(value) { - jspb.Message.setProto3StringField(this, 7, value); + return jspb.Message.setProto3StringField(this, 7, value); }; @@ -391,9 +415,12 @@ proto.tendermint.NodeInfo.prototype.getTxindex = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setTxindex = function(value) { - jspb.Message.setProto3StringField(this, 8, value); + return jspb.Message.setProto3StringField(this, 8, value); }; diff --git a/js/proto/txs_pb.js b/js/proto/txs_pb.js index 4192f3148..bc6f6158c 100644 --- a/js/proto/txs_pb.js +++ b/js/proto/txs_pb.js @@ -1,3 +1,4 @@ +// source: txs.proto /** * @fileoverview * @enhanceable @@ -94,13 +95,15 @@ proto.txs.Envelope.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.txs.Envelope.prototype.toObject = function(opt_includeInstance) { @@ -110,8 +113,8 @@ proto.txs.Envelope.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.txs.Envelope} msg The msg instance to transform. * @return {!Object} @@ -244,9 +247,12 @@ proto.txs.Envelope.prototype.getSignatoriesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.txs.Envelope} returns this +*/ proto.txs.Envelope.prototype.setSignatoriesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -262,9 +268,10 @@ proto.txs.Envelope.prototype.addSignatories = function(opt_value, opt_index) { /** * Clears the list making it empty but non-null. + * @return {!proto.txs.Envelope} returns this */ proto.txs.Envelope.prototype.clearSignatoriesList = function() { - this.setSignatoriesList([]); + return this.setSignatoriesList([]); }; @@ -301,9 +308,12 @@ proto.txs.Envelope.prototype.getTx_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.txs.Envelope} returns this + */ proto.txs.Envelope.prototype.setTx = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -316,9 +326,12 @@ proto.txs.Envelope.prototype.getEnc = function() { }; -/** @param {!proto.txs.Envelope.Encoding} value */ +/** + * @param {!proto.txs.Envelope.Encoding} value + * @return {!proto.txs.Envelope} returns this + */ proto.txs.Envelope.prototype.setEnc = function(value) { - jspb.Message.setProto3EnumField(this, 3, value); + return jspb.Message.setProto3EnumField(this, 3, value); }; @@ -327,13 +340,15 @@ proto.txs.Envelope.prototype.setEnc = function(value) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.txs.Signatory.prototype.toObject = function(opt_includeInstance) { @@ -343,8 +358,8 @@ proto.txs.Signatory.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.txs.Signatory} msg The msg instance to transform. * @return {!Object} @@ -493,9 +508,12 @@ proto.txs.Signatory.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.txs.Signatory} returns this + */ proto.txs.Signatory.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -509,17 +527,21 @@ proto.txs.Signatory.prototype.getPublickey = function() { }; -/** @param {?proto.crypto.PublicKey|undefined} value */ +/** + * @param {?proto.crypto.PublicKey|undefined} value + * @return {!proto.txs.Signatory} returns this +*/ proto.txs.Signatory.prototype.setPublickey = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.txs.Signatory} returns this */ proto.txs.Signatory.prototype.clearPublickey = function() { - this.setPublickey(undefined); + return this.setPublickey(undefined); }; @@ -542,17 +564,21 @@ proto.txs.Signatory.prototype.getSignature = function() { }; -/** @param {?proto.crypto.Signature|undefined} value */ +/** + * @param {?proto.crypto.Signature|undefined} value + * @return {!proto.txs.Signatory} returns this +*/ proto.txs.Signatory.prototype.setSignature = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. + * @return {!proto.txs.Signatory} returns this */ proto.txs.Signatory.prototype.clearSignature = function() { - this.setSignature(undefined); + return this.setSignature(undefined); }; @@ -570,13 +596,15 @@ proto.txs.Signatory.prototype.hasSignature = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.txs.Receipt.prototype.toObject = function(opt_includeInstance) { @@ -586,8 +614,8 @@ proto.txs.Receipt.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.txs.Receipt} msg The msg instance to transform. * @return {!Object} @@ -597,7 +625,7 @@ proto.txs.Receipt.toObject = function(includeInstance, msg) { var f, obj = { txtype: jspb.Message.getFieldWithDefault(msg, 1, 0), txhash: msg.getTxhash_asB64(), - createscontract: jspb.Message.getFieldWithDefault(msg, 3, false), + createscontract: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), contractaddress: msg.getContractaddress_asB64() }; @@ -720,9 +748,12 @@ proto.txs.Receipt.prototype.getTxtype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.txs.Receipt} returns this + */ proto.txs.Receipt.prototype.setTxtype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -759,26 +790,30 @@ proto.txs.Receipt.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.txs.Receipt} returns this + */ proto.txs.Receipt.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional bool CreatesContract = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.txs.Receipt.prototype.getCreatescontract = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.txs.Receipt} returns this + */ proto.txs.Receipt.prototype.setCreatescontract = function(value) { - jspb.Message.setProto3BooleanField(this, 3, value); + return jspb.Message.setProto3BooleanField(this, 3, value); }; @@ -815,9 +850,12 @@ proto.txs.Receipt.prototype.getContractaddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.txs.Receipt} returns this + */ proto.txs.Receipt.prototype.setContractaddress = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; diff --git a/js/proto/validator_pb.js b/js/proto/validator_pb.js index 40622b57b..443a6da4c 100644 --- a/js/proto/validator_pb.js +++ b/js/proto/validator_pb.js @@ -1,3 +1,4 @@ +// source: validator.proto /** * @fileoverview * @enhanceable @@ -42,13 +43,15 @@ if (goog.DEBUG && !COMPILED) { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.validator.Validator.prototype.toObject = function(opt_includeInstance) { @@ -58,8 +61,8 @@ proto.validator.Validator.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.validator.Validator} msg The msg instance to transform. * @return {!Object} @@ -206,9 +209,12 @@ proto.validator.Validator.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.validator.Validator} returns this + */ proto.validator.Validator.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -222,17 +228,21 @@ proto.validator.Validator.prototype.getPublickey = function() { }; -/** @param {?proto.crypto.PublicKey|undefined} value */ +/** + * @param {?proto.crypto.PublicKey|undefined} value + * @return {!proto.validator.Validator} returns this +*/ proto.validator.Validator.prototype.setPublickey = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. + * @return {!proto.validator.Validator} returns this */ proto.validator.Validator.prototype.clearPublickey = function() { - this.setPublickey(undefined); + return this.setPublickey(undefined); }; @@ -254,9 +264,12 @@ proto.validator.Validator.prototype.getPower = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.validator.Validator} returns this + */ proto.validator.Validator.prototype.setPower = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; From 4365ede402bd1a39ecfa727c861eb73b638584a6 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 13 Apr 2020 20:17:17 -0400 Subject: [PATCH 093/185] Used opcode bitmap to locate valid JUMPDEST. Signed-off-by: Dan --- execution/evm/contract.go | 25 +++++++------------------ execution/evm/evm_test.go | 8 +++++--- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/execution/evm/contract.go b/execution/evm/contract.go index 133e2e642..ebf33e61a 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/binary" "fmt" + "github.com/tmthrgd/go-bitset" "io/ioutil" "math/big" "strings" @@ -521,14 +522,16 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case JUMP: // 0x56 to := stack.Pop64() - maybe.PushError(c.jump(c.code, to, &pc)) + opcodeBitset := mustGetAccount(st.CallFrame, maybe, params.Callee).OpcodeBitset + maybe.PushError(c.jump(c.code, to, &pc, opcodeBitset)) continue case JUMPI: // 0x57 pos := stack.Pop64() cond := stack.Pop() if !cond.IsZero() { - maybe.PushError(c.jump(c.code, pos, &pc)) + opcodeBitset := mustGetAccount(st.CallFrame, maybe, params.Callee).OpcodeBitset + maybe.PushError(c.jump(c.code, pos, &pc, opcodeBitset)) continue } else { c.debugf(" ~> false\n") @@ -851,9 +854,9 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e return nil, maybe.Error() } -func (c *Contract) jump(code []byte, to uint64, pc *uint64) error { +func (c *Contract) jump(code []byte, to uint64, pc *uint64, opcodeBitset bitset.Bitset) error { dest := codeGetOp(code, to) - if dest != JUMPDEST || isInsidePushData(code, to) { + if dest != JUMPDEST || !opcodeBitset.IsSet(uint(to)) { c.debugf(" ~> %v invalid jump dest %v\n", to, dest) return errors.Codes.InvalidJumpDest } @@ -862,20 +865,6 @@ func (c *Contract) jump(code []byte, to uint64, pc *uint64) error { return nil } -// isInsidePushData checks if the symbol at code(n) is inside push data i.e. is data for the stack and not an opcode. -func isInsidePushData(code []byte, n uint64) bool { - if uint64(len(code)) <= n { - return false - } - i := uint64(0) - for ; i < n; i++ { - if op := OpCode(code[i]); op >= PUSH1 && op <= PUSH32 { - i += uint64(op - PUSH1 + 1) - } - } - return i > n -} - func createAccount(callFrame *engine.CallFrame, creator, address crypto.Address) error { err := ensurePermission(callFrame, creator, permission.CreateAccount) if err != nil { diff --git a/execution/evm/evm_test.go b/execution/evm/evm_test.go index aba3643c7..e2eb1509a 100644 --- a/execution/evm/evm_test.go +++ b/execution/evm/evm_test.go @@ -6,6 +6,7 @@ package evm import ( "bytes" "encoding/binary" + "fmt" "math/big" "reflect" "testing" @@ -1645,7 +1646,6 @@ func TestEVM(t *testing.T) { eventSink := exec.NewNoopEventSink() account1 := newAccount(t, st, "1") - account2 := newAccount(t, st, "101") var gas uint64 = 100000 tests := []struct { @@ -1667,10 +1667,12 @@ func TestEVM(t *testing.T) { expected_err: errors.Codes.InvalidJumpDest, }, } - for _, tt := range tests { + for i, tt := range tests { + calleeName := fmt.Sprintf("callee%v", i); + callee := makeAccountWithCode(t, st, calleeName, tt.bytecode) params := engine.CallParams{ Caller: account1, - Callee: account2, + Callee: callee, Gas: &gas, } if output, err := vm.Execute(st, blockchain, eventSink, params, tt.bytecode); errors.GetCode(err) != tt.expected_err { From 2db9ba1bff6fedd6716dc7fda7551166836a321f Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 13 Apr 2020 21:08:21 +0100 Subject: [PATCH 094/185] Add Helm charts and update documentation Signed-off-by: Silas Davis Signed-off-by: Dan --- .github/workflows/release.yaml | 14 ++ .github/workflows/test.yaml | 13 ++ .gitignore | 2 + CHANGELOG.md | 10 ++ Makefile | 39 +++- NOTES.md | 7 +- README.md | 38 ++-- docs/README.md | 52 ------ docs/_sidebar.md | 1 + docs/deploy.md | 2 +- docs/reference/kubernetes.md | 9 + helm/burrow/.helmignore | 21 +++ helm/burrow/Chart.yaml | 21 +++ helm/burrow/README.md | 170 ++++++++++++++++++ helm/burrow/ci/test-values.yaml | 20 +++ helm/burrow/initialize.sh | 108 ++++++++++++ helm/burrow/templates/NOTES.txt | 22 +++ helm/burrow/templates/_helpers.tpl | 70 ++++++++ helm/burrow/templates/_settings.yaml | 13 ++ helm/burrow/templates/configmap.yaml | 14 ++ helm/burrow/templates/contracts.yaml | 41 +++++ helm/burrow/templates/deployments.yaml | 216 +++++++++++++++++++++++ helm/burrow/templates/ingress-grpc.yaml | 32 ++++ helm/burrow/templates/ingress-info.yaml | 43 +++++ helm/burrow/templates/pvc.yaml | 31 ++++ helm/burrow/templates/service-grpc.yaml | 28 +++ helm/burrow/templates/service-info.yaml | 25 +++ helm/burrow/templates/service-peers.yaml | 36 ++++ helm/burrow/templates/test-config.yaml | 14 ++ helm/burrow/templates/test-secret.yaml | 33 ++++ helm/burrow/values.yaml | 120 +++++++++++++ project/history.go | 10 +- scripts/version.sh | 9 + 33 files changed, 1215 insertions(+), 69 deletions(-) delete mode 100644 docs/README.md create mode 100644 docs/reference/kubernetes.md create mode 100644 helm/burrow/.helmignore create mode 100644 helm/burrow/Chart.yaml create mode 100644 helm/burrow/README.md create mode 100644 helm/burrow/ci/test-values.yaml create mode 100644 helm/burrow/initialize.sh create mode 100644 helm/burrow/templates/NOTES.txt create mode 100644 helm/burrow/templates/_helpers.tpl create mode 100644 helm/burrow/templates/_settings.yaml create mode 100644 helm/burrow/templates/configmap.yaml create mode 100644 helm/burrow/templates/contracts.yaml create mode 100644 helm/burrow/templates/deployments.yaml create mode 100644 helm/burrow/templates/ingress-grpc.yaml create mode 100644 helm/burrow/templates/ingress-info.yaml create mode 100644 helm/burrow/templates/pvc.yaml create mode 100644 helm/burrow/templates/service-grpc.yaml create mode 100644 helm/burrow/templates/service-info.yaml create mode 100644 helm/burrow/templates/service-peers.yaml create mode 100644 helm/burrow/templates/test-config.yaml create mode 100644 helm/burrow/templates/test-secret.yaml create mode 100644 helm/burrow/values.yaml create mode 100755 scripts/version.sh diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 56ac3293a..b62828a97 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,6 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: git fetch --unshallow --prune - uses: actions/setup-node@v1 with: node-version: '12.x' @@ -48,6 +49,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: git fetch --unshallow --prune - run: make docker_build - name: publish env: @@ -59,3 +61,15 @@ jobs: echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} --password-stdin docker tag ${DOCKER_REPO}:${tag#v} ${DOCKER_REPO}:latest docker push ${DOCKER_REPO} + + charts: + runs-on: ubuntu-latest + env: + CM_USERNAME: ${{ secrets.CM_USERNAME }} + CM_PASSWORD: ${{ secrets.CM_PASSWORD }} + CM_URL: ${{ secrets.CM_URL }} + steps: + - uses: actions/checkout@v2 + - run: git fetch --unshallow --prune + - run: make helm_deps + - run: make helm_push diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a80dbd6ff..86c4db26f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,6 +14,7 @@ jobs: go-version: 1.13 id: go - uses: actions/checkout@v2 + - run: git fetch --unshallow --prune - run: make test - run: make build - uses: actions/upload-artifact@master @@ -126,3 +127,15 @@ jobs: export PATH=${PATH}:$(pwd)/bin make npm_install make test_js + + charts: + runs-on: ubuntu-latest + env: + CM_USERNAME: ${{ secrets.CM_USERNAME }} + CM_PASSWORD: ${{ secrets.CM_PASSWORD }} + CM_URL: ${{ secrets.CM_URL }} + steps: + - uses: actions/checkout@v2 + - run: git fetch --unshallow --prune + - run: make helm_deps + - run: make helm_package diff --git a/.gitignore b/.gitignore index f25e30aa5..2dfd393e0 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ tests/keys/ vendor/ node_modules js/dist + +helm/package diff --git a/CHANGELOG.md b/CHANGELOG.md index e8fd71b0a..8c92a0f7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,13 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.30.4] - 2020-04-05 +### Added +- [Build] Added Helm chart +- [State] Account now has OpcodeBitset field to support upcoming EVM fixes + +### Fixed +- [JS] Github actions release of JS lib + + ## [0.30.3] - 2020-04-05 ### Added - [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile' @@ -652,6 +661,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.30.4]: https://github.com/hyperledger/burrow/compare/v0.30.3...v0.30.4 [0.30.3]: https://github.com/hyperledger/burrow/compare/v0.30.2...v0.30.3 [0.30.2]: https://github.com/hyperledger/burrow/compare/v0.30.1...v0.30.2 [0.30.1]: https://github.com/hyperledger/burrow/compare/v0.30.0...v0.30.1 diff --git a/Makefile b/Makefile index 86467fa8f..99ec93d00 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,13 @@ REPO := $(shell pwd) CI_IMAGE="hyperledger/burrow:ci" +VERSION := $(shell scripts/version.sh) # Gets implicit default GOPATH if not set GOPATH?=$(shell go env GOPATH) -BIN_PATH?=${GOPATH}/bin +BIN_PATH?=$(GOPATH)/bin +HELM_PATH?=helm/package +HELM_PACKAGE=$(HELM_PATH)/burrow-$(VERSION).tgz +ARCH?=linux-amd64 export GO111MODULE=on @@ -261,7 +265,7 @@ clean: # Print version .PHONY: version version: - @go run ./project/cmd/version/main.go + @echo $(VERSION) # Generate full changelog of all release notes CHANGELOG.md: project/history.go project/cmd/changelog/main.go @@ -295,3 +299,34 @@ ready_for_pull_request: docs fix staticcheck: go get honnef.co/go/tools/cmd/staticcheck staticcheck ./... + +# Note --set flag currently needs helm 3 version < 3.0.3 https://github.com/helm/helm/issues/3141 - but hopefully they will reintroduce support +bin/helm: + @echo Downloading helm... + mkdir -p bin + curl https://get.helm.sh/helm-v3.0.2-$(ARCH).tar.gz | tar xvzO $(ARCH)/helm > bin/helm && chmod +x bin/helm + +.PHONY: helm_deps +helm_deps: bin/helm + @bin/helm repo add --username "$(CM_USERNAME)" --password "$(CM_PASSWORD)" chartmuseum $(CM_URL) + +.PHONY: helm_test +helm_test: bin/helm + bin/helm dep up helm/burrow + bin/helm lint helm/burrow + +helm_package: $(HELM_PACKAGE) + +$(HELM_PACKAGE): helm_test bin/helm + bin/helm package helm/burrow \ + --version "$(VERSION)" \ + --app-version "$(VERSION)" \ + --set "image.tag=$(VERSION)" \ + --dependency-update \ + --destination helm/package + +.PHONY: helm_push +helm_push: helm_package + @echo pushing helm chart... + @curl -sS -u ${CM_USERNAME}:${CM_PASSWORD} \ + --data-binary "@burrow-${VERSION}.tgz" $(CM_URL)/api/charts diff --git a/NOTES.md b/NOTES.md index 5d8ce29fa..90ef71c8b 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,4 +1,7 @@ ### Added -- [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile' -- [TS] Default ts client interface implementation +- [Build] Added Helm chart +- [State] Account now has OpcodeBitset field to support upcoming EVM fixes + +### Fixed +- [JS] Github actions release of JS lib diff --git a/README.md b/README.md index 26ff14f1b..7490f9301 100644 --- a/README.md +++ b/README.md @@ -7,22 +7,39 @@ [![LoC](https://tokei.rs/b1/github/hyperledger/burrow?category=lines)](https://github.com/hyperledger/burrow) [![codecov](https://codecov.io/gh/hyperledger/burrow/branch/master/graph/badge.svg)](https://codecov.io/gh/hyperledger/burrow) -Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It executes Ethereum EVM smart contract code (usually written in [Solidity](https://solidity.readthedocs.io)) on a permissioned virtual machine. Burrow provides transaction finality and high transaction throughput on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. +Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It executes Ethereum EVM and WASM smart contract code (usually written in [Solidity](https://solidity.readthedocs.io)) on a permissioned virtual machine. Burrow provides transaction finality and high transaction throughput on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. ![burrow logo](docs/assets/burrow.png) ## What is Burrow -See [Burrow - the Boring Blockchain](https://wiki.hyperledger.org/display/burrow/Burrow+-+The+Boring+Blockchain) for an introduction to Burrow and its motivating vision. +Burrow is a fully fledged blockchain node and smart contract execution engine -- a distributed database that executes code. Burrow runs Ethereum Virtual Machine (EVM) and Web Assembly (WASM) smart contracts. Burrow networks are synchronised using the [Tendermint](https://github.com/tendermint/tendermint) consensus algorithm. + +Highlights include: + +- **Tamper-resistant merkle state** - a node can detect if its state is corrupted or if a validator is dishonestly executing the protocol. +- **Proof-of-stake support** - run a private or public permissioned network. +- **On-chain governance primitives** - stakeholders may vote for autonomous smart contract upgrades. +- **Ethereum account world-view** - state and code is organised into cryptographically-addressable accounts. +- **Low-level permissioning** - code execution permissions can be set on a per-account basis. +- **Event streaming** - application state is organised in an event stream and can drive external systems. +- **[SQL mapping layer](docs/reference/vent.md)** - map smart contract event emissions to SQL tables using a projection specification. +- **GRPC interfaces** - all RPC calls can be accessed from any language with GRPC support. Protobuf is used extensively for core objects. +- **Javascript client library** - client library uses code generation to provide access to contracts via statically Typescript objects. +- **Keys service** - provides optional delegating signing at the server or via a local proxy +- **Web3 RPC** - provides compatibility for mainnet Ethereum tooling such as Truffle and Metamask + +### What it is not -Hyperledger Burrow is a permissioned blockchain node that executes smart contract code following the Ethereum specification. Burrow is built for a multi-chain universe with application specific optimization in mind. Burrow as a node is constructed out of three main components: the consensus engine, the permissioned Ethereum virtual machine and the rpc gateway. More specifically Burrow consists of the following: +- An Ethereum mainnet client - we do not speak devp2p and various implementation details are different. We are Ethereum-derived but exploit greater freedom than mainnet compatibility would allow. +- Just a virtual machine +- A research project - we run it in production -- **Consensus Engine:** Transactions are ordered and finalised with the Byzantine fault-tolerant Tendermint protocol. The Tendermint protocol provides high transaction throughput over a set of known validators and prevents the blockchain from forking. -- **Application Blockchain Interface (ABCI):** The smart contract application interfaces with the consensus engine over the [ABCI](https://github.com/tendermint/tendermint/tree/master/abci). The ABCI allows for the consensus engine to remain agnostic from the smart contract application. -- **Smart Contract Application:** Transactions are validated and applied to the application state in the order that the consensus engine has finalised them. The application state consists of all accounts, the validator set and the name registry. Accounts in Burrow have permissions and either contain smart contract code or correspond to a public-private key pair. A transaction that calls on the smart contract code in a given account will activate the execution of that account’s code in a permissioned virtual machine. -- **Permissioned Ethereum Virtual Machine:** This virtual machine is built to observe the Ethereum operation code specification and additionally asserts the correct permissions have been granted. Permissioning is enforced through secure native functions and underlies all smart contract code. An arbitrary but finite amount of gas is handed out for every execution to ensure a finite execution duration - “You don’t need money to play, when you have permission to play”. -- **Application Binary Interface (ABI):** Transactions need to be formulated in a binary format that can be processed by the blockchain node. Current tooling provides functionality to compile, deploy and link solidity smart contracts and formulate transactions to call smart contracts on the chain. -- **API Gateway:** Burrow exposes REST and JSON-RPC endpoints to interact with the blockchain network and the application state through broadcasting transactions, or querying the current state of the application. Websockets allow subscribing to events, which is particularly valuable as the consensus engine and smart contract application can give unambiguously finalised results to transactions within one blocktime of about one second. +### Further introduction + +See [Burrow - the Boring Blockchain](https://wiki.hyperledger.org/display/burrow/Burrow+-+The+Boring+Blockchain) for an introduction to Burrow and its motivating vision. + +Watch the [Boring into Burrow](https://www.youtube.com/watch?v=OpbjYaGAP4k) talk from the Hyperledger Global Forum 2020 ## JavaScript Client @@ -33,8 +50,7 @@ There is a [JavaScript API](https://github.com/hyperledger/burrow/tree/master/js Project information generally updated on a quarterly basis can be found on the [Hyperledger Burrow Wiki](https://wiki.hyperledger.org/display/burrow). ## Documentation -Burrow getting started documentation is available in the [docs](https://hyperledger.github.io/burrow) directory and in [GoDocs](https://godoc.org/github.com/hyperledger/burrow). - +Burrow getting started documentation is available on the [documentation site](https://hyperledger.github.io/burrow) (source markdown files can be found in [docs](docs)) and programmatic API in [GoDocs](https://godoc.org/github.com/hyperledger/burrow). ## Contribute diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 18b7c0c68..000000000 --- a/docs/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# Introduction - -Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It executes Ethereum EVM smart contract code (usually written in [Solidity](https://solidity.readthedocs.io)) on a permissioned virtual machine. Burrow provides transaction finality and high transaction throughput on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. - -![burrow logo](assets/burrow.png) - -## What is Burrow? - -Hyperledger Burrow is a permissioned blockchain node that executes smart contract code following the Ethereum specification. Burrow is built for a multi-chain universe with application specific optimization in mind. Burrow as a node is constructed out of three main components: the consensus engine, the permissioned Ethereum virtual machine and the rpc gateway. More specifically Burrow consists of the following: - -- **Consensus Engine:** Transactions are ordered and finalised with the Byzantine fault-tolerant Tendermint protocol. The Tendermint protocol provides high transaction throughput over a set of known validators and prevents the blockchain from forking. -- **Application Blockchain Interface (ABCI):** The smart contract application interfaces with the consensus engine over the [ABCI](https://github.com/tendermint/tendermint/abci). The ABCI allows for the consensus engine to remain agnostic from the smart contract application. -- **Smart Contract Application:** Transactions are validated and applied to the application state in the order that the consensus engine has finalised them. The application state consists of all accounts, the validator set and the name registry. Accounts in Burrow have permissions and either contain smart contract code or correspond to a public-private key pair. A transaction that calls on the smart contract code in a given account will activate the execution of that account’s code in a permissioned virtual machine. -- **Permissioned Ethereum Virtual Machine:** This virtual machine is built to observe the Ethereum operation code specification and additionally asserts the correct permissions have been granted. Permissioning is enforced through secure native functions and underlies all smart contract code. An arbitrary but finite amount of gas is handed out for every execution to ensure a finite execution duration - “You don’t need money to play, when you have permission to play”. -- **Application Binary Interface (ABI):** Transactions need to be formulated in a binary format that can be processed by the blockchain node. Current tooling provides functionality to compile, deploy and link solidity smart contracts and formulate transactions to call smart contracts on the chain. -- **API Gateway:** Burrow exposes REST and JSON-RPC endpoints to interact with the blockchain network and the application state through broadcasting transactions, or querying the current state of the application. Websockets allow subscribing to events, which is particularly valuable as the consensus engine and smart contract application can give unambiguously finalised results to transactions within one blocktime of about one second. - -## Installation - -Release binaries for different architectures can be found at https://github.com/hyperledger/burrow/releases. - -### Source - -[Install Go](https://golang.org/doc/install) (Version >= 1.11) and set `$GOPATH`. - -``` -go get github.com/hyperledger/burrow -cd $GOPATH/src/github.com/hyperledger/burrow -make build -``` - -This will build the `burrow` binary and put it in the `bin/` directory. It can be executed from there or put wherever is convenient. - -You can also install `burrow` into `$BIN_PATH/bin` with `make install`, where `$BIN_PATH` defaults to `$HOME/go/bin` -if not set in the environment. - -### Docker - -Each release is also tagged and pushed to [DockerHub](https://hub.docker.com/r/hyperledger/burrow). -This can act as a direct replacement for the burrow binary, for example the following commands are equivalent: - -```bash -burrow spec -v4 -docker run hyperledger/burrow spec -v4 -``` - -> Ensure to mount local volumes for secrets / configurations when running a container to prevent data loss. - -### Kubernetes - -Use our official [helm charts](https://github.com/helm/charts/tree/master/stable/burrow) to configure and run -a burrow chain in your cluster. diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 9c39adcbb..d0477db89 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -31,3 +31,4 @@ - [Vent](reference/vent.md) - [WASM](reference/wasm.md) - [Web3](reference/web3.md) + - [Kubernetes](reference/kubernetes.md) diff --git a/docs/deploy.md b/docs/deploy.md index 235f4f333..34489590a 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -76,4 +76,4 @@ specified. This must be the path to the contract bin file or abi file. ## Proposal -This is described in the [proposal tutorial](../tutorials/8-proposals.md). +This is described in the [proposal tutorial](tutorials/8-proposals.md). diff --git a/docs/reference/kubernetes.md b/docs/reference/kubernetes.md new file mode 100644 index 000000000..6b606a3bb --- /dev/null +++ b/docs/reference/kubernetes.md @@ -0,0 +1,9 @@ +# Kubernetes + +Burrow ships a docker image suitable for use in Kubernetes on [Docker Hub](https://hub.docker.com/r/hyperledger/burrow). This image is use by the chart below. + +## Helm chart + +A helm chart for Burrow with can be found in the main repo [here](https://github.com/hyperledger/burrow/tree/master/helm) (with further documentation). + +The helm chart allows you to bootstrap and run your own pool of validators. diff --git a/helm/burrow/.helmignore b/helm/burrow/.helmignore new file mode 100644 index 000000000..c13e3c8fb --- /dev/null +++ b/helm/burrow/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj \ No newline at end of file diff --git a/helm/burrow/Chart.yaml b/helm/burrow/Chart.yaml new file mode 100644 index 000000000..8d7c9ca73 --- /dev/null +++ b/helm/burrow/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +appVersion: 0.30.2 +description: Burrow is a permissionable smart contract machine +home: https://github.com/hyperledger/burrow +icon: https://raw.githubusercontent.com/hyperledger/burrow/develop/docs/assets/images/burrow.png +keywords: +- blockchain +- smart contracts +- ethereum +- hyperledger +- evm +- web3 +maintainers: +- email: casey@monax.io + name: compleatang +- email: greg.hill@monax.io + name: gregdhill +name: burrow +sources: +- https://github.com/hyperledger/burrow +version: 0.30.2 diff --git a/helm/burrow/README.md b/helm/burrow/README.md new file mode 100644 index 000000000..ebec9989a --- /dev/null +++ b/helm/burrow/README.md @@ -0,0 +1,170 @@ +# Burrow + +[Burrow](https://github.com/hyperledger/burrow) is a permissioned Ethereum smart-contract blockchain node which provides transaction finality and high transaction throughput +on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. + +## Introduction + +This chart bootstraps a burrow network on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Installation + +### Prerequisites + +To deploy a new blockchain network, this chart requires that two objects be present in the same Kubernetes namespace: a configmap should house the genesis file and each node should +have a secret to hold any validator keys. The provided script, `addresses.sh` automatically provisions a number of files using the [burrow](https://github.com/hyperledger/burrow) toolkit, +so please first ensure that `burrow --version` matches the `image.tag` in the [configuration](#configuration). This sequence also requires that the [jq](https://stedolan.github.io/jq/) binary +is installed. Two files will be generated, the first of note is `setup.yaml` which contains the two necessary Kubernetes specifications to be added to the cluster: + +```bash +curl -LO https://raw.githubusercontent.com/helm/charts/master/stable/burrow/initialize.sh +CHAIN_NODES=4 CHAIN_NAME="my-release-burrow" ./initialize.sh +kubectl apply --filename setup.yaml +``` + +Please note that the variable `$CHAIN_NAME` should be the same as the helm release name specified below with the `-burrow` suffix. +Another file, `addresses.yaml` contains the the equivalent validator addresses to set in the charts. + +### Deployment + +To install the chart with the release name `my-release` with the set of custom validator addresses: + +```bash +helm install stable/burrow --name my-release --values addresses.yaml +``` + +The [configuration](#configuration) section below lists all possible parameters that can be configured during installation. Please also see the [runtime configuration](#runtime) +section for more information on how to setup your network properly. + +## Uninstall + +To uninstall/delete the `my-release` deployment: + +```console +$ helm delete my-release +``` + +This command removes all the Kubernetes components associated with the chart and deletes the release. To remove the configmap and secret created in the [prerequisites](#prerequisites), follow these steps: + +```bash +kubectl delete secret ${CHAIN_NAME}-keys +kubectl delete configmap ${CHAIN_NAME}-genesis +``` + +## Configuration + +The following table lists the configurable parameters of the Burrow chart and its default values. + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `affinity` | node/pod affinities | `{}` | +| `chain.nodes` | number of nodes for the blockchain network | `1` | +| `chain.logLevel` | log level for the nodes (`debug`, `info`, `warn`) | `"info"` | +| `chain.extraSeeds` | network seeds to dial in addition to the cluster booted by the chart; each entry in the array should be in the form `ip:port` (note: because P2P connects over tcp, the port is absolutely required) | `[]` | +| `restore.enabled` | toggle chain restore mechanism | `false` | +| `chain.testing` | toggle pre-generated keys & genesis for ci testing | `false` | +| `config` | the [burrow configuration file](https://github.com/hyperledger/burrow/blob/develop/tests/chain/burrow.toml) | `{}` | +| `config.Tendermint.ListenPort` | peer port | `26656` | +| `contracts.enabled` | toggle post-install contract deployment | `false` | +| `contracts.image` | contract deployer image | `""` | +| `contracts.tag` | contract deployer tag | `""` | +| `contracts.deploy` | command to run in post-install hook | `""` | +| `env` | environment variables to configure burrow | `{}` | +| `extraArgs` | extra arguments to give to the build in `burrow start` command | `{}` | +| `image.repository` | image repository | `"hyperledger/burrow"` | +| `image.tag` | image tag | `"0.29.4"` | +| `image.pullPolicy` | image pull policy | `"IfNotPresent"` | +| `livenessProbe.enabled` | enable liveness checks | `true` | +| `livenessProbe.path` | http endpoint | `"/status?block_seen_time_within=3m"` | +| `livenessProbe.initialDelaySeconds` | start after | `240` | +| `livenessProbe.timeoutSeconds` | retry after | `1` | +| `livenessProbe.periodSeconds` | check every | `30` | +| `nodeSelector` | node labels for pod assignment | `{}` | +| `organization` | name of the organization running these nodes (used in the peer's moniker) | `""` | +| `persistence.enabled` | enable pvc for the chain data | `true` | +| `persistence.size` | size of the chain data pvc | `"80Gi"` | +| `persistence.storageClass` | storage class for the chain data pvc | `"standard"` | +| `persistence.accessMode` | access mode for the chain data pvc | `"ReadWriteOnce"` | +| `persistence.persistentVolumeReclaimPolicy` | does not delete on node restart | `"Retain"` | +| `podAnnotations` | annotations to add to each pod | `{}` | +| `podLabels` | labels to add to each pod | `{}` | +| `readinessProbe.enabled` | enable readiness checks | `true` | +| `readinessProbe.path` | http endpoint | `"/status"` | +| `readinessProbe.initialDelaySeconds` | start after | `5` | +| `resources.limits.cpu` | - | `"500m"` | +| `resources.limits.memory` | - | `"1Gi"` | +| `resources.requests.cpu` | - | `"100m"` | +| `resources.requests.memory` | - | `"256Mi"` | +| `grpc.service.type` | service type | `"ClusterIP"` | +| `grpc.service.loadBalance` | enable load balancing across nodes | `true` | +| `grpc.ingress.enabled` | expose port | `false` | +| `grpc.ingress.hosts` | - | `[]` | +| `grpc.ingress.annotations` | extra annotations | `` | +| `grpc.ingress.tls` | - | `` | +| `info.service.type` | service type | `"ClusterIP"` | +| `info.service.loadBalance` | enable load balancing across nodes | `true` | +| `info.ingress.enabled` | expose port | `false` | +| `info.ingress.partial` | exposes the `/accounts` and `/blocks` paths externally | `false` | +| `info.ingress.pathLeader` | - | `"/"` | +| `info.ingress.annotations` | extra annotations | `` | +| `info.ingress.hosts` | - | `[]` | +| `info.ingress.tls` | - | `` | +| `peer.service.type` | service type | `"ClusterIP"` | +| `peer.ingress.enabled` | expose port | `false` | +| `peer.ingress.hosts` | - | `[]` | +| `tolerations` | list of node taints to tolerate | `[]` | +| `validatorAddresses` | list of validators to deploy | `[]` | + + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +helm install stable/burrow --name my-release \ + --set=image.tag=0.23.2,resources.limits.cpu=200m -f addresses.yaml +``` + +Alternatively, append additional values to the YAML file generated in the [prerequisites](#prerequisites). For example, + +```bash +helm install stable/burrow --name my-release -f addresses.yaml +``` + +## Runtime + +It is unlikely that you will want to deploy this chart with the default runtime configuration. When booting permissioned blockchains in a cloud environment there are three predominant considerations in addition to the normal configuration of any cloud application. + +1. What access rights to place on the ports? +2. What is the set of initial accounts and validators for the chain? +3. What keys should the validating nodes have? + +Each of these considerations will be dealt with in more detail below. + +### Port Configuration + +Burrow utilizes three different ports by default: + +* `Peer`: Burrow's peer port is used for P2P communication within the blockchain network as part of the consensus engine ([Tendermint](https://github.com/tendermint/tendermint)) to perform bilateral gossiping communication. +* `Info`: Burrow's info port is used for conducting remote procedures. +* `GRPC`: Burrow's grpc port can be used by JavaScript libraries to interact with the chain over websockets. + +The default configuration for the chart sets up the port access rights in the following manner: + +* `Peer`: Peer ports are **only** opened within the cluster. By default, there is no P2P communication exposed to the general internet. Each node within the cluster has its own distinct peer service built by the chart which utilizes a `ClusterIP` service type. +* `Info`: The info port is **only** opened within the cluster. By default, there is no info communication exposed to the general internet. There is **one** info service built by the chart which utilizes a `ClusterIP` service type. The default info service used by the chart is strongly linked to node number `000` and is not load balanced across the nodes by default so as to reduce any challenges with tooling that conduct long-polling after sending transactions. The chart offers an ingress which is connected to the info service, but this is `disabled` by default. +* `GRPC`: The grpc port is **only** opened within the cluster. By default, there is no grpc communication exposed to the general internet. There is **one** grpc service built by the chart which utilizes a `ClusterIP` service type. The default grpc service used by the chart is load balanced across the nodes within the cluster by default because libraries which utilize this port typical do so on websockets and the service is able to utilize a sessionAffinity setting. + +In order to expose the peers to the general internet change the `peer.service.type` to `NodePort`. It is not advised to run P2P traffic through an ingress or other load balancing service as there is uncertainty with respect to the IP address which the blockchain node advertises and gossips. As such, the best way to expose P2P traffic to the internet is to utilize a `NodePort` service type. While such service types can be a challenge to work with in many instances, the P2P libraries that these blockchains utilize are very resilient to movement between machine nodes. The biggest gotcha with `NodePort` service types is to ensure that the machine nodes have proper egress within the cloud or data center provider. As long as the machine nodes do not have egress restrictions disabling the utilization of `NodePort` service types, the P2P traffic will be exposed fluidly. + +To expose the info service to the general internet change the default `rpcInfo.ingress.enabled` to `true` and add the appropriate fields to the ingress for your Kubernetes cluster. This will allow developers to connect to the info service from their local machines. + +To disable load balancing on the grpc service, change the `rpcGRPC.service.loadBalance` to `false`. + +### Genesis + +Burrow initializes any single blockchain via use of a `genesis.json` which defines what validators and accounts are given access to the permissioned blockchain when it is booted. The chart imports the `genesis.json` file as a Kubernetes configmap and then mounts it in each node deployment. + +### Validator Keys + +**NOTE: The chart has not been security audited and as such one should use the validator keys functionality of the chart at one's own risk.** + +Burrow blockchain nodes need to have a key available to them which has been properly registered within the `genesis.json` initial state. The registered key is what enables a blockchain node to participate in the P2P validation of the network. The chart imports the validator key files as Kubernetes secrets, so the security of the blockchain is only as strong as the cluster's integrity. diff --git a/helm/burrow/ci/test-values.yaml b/helm/burrow/ci/test-values.yaml new file mode 100644 index 000000000..95dcbc5db --- /dev/null +++ b/helm/burrow/ci/test-values.yaml @@ -0,0 +1,20 @@ +# CI Testing Values + +chain: + testing: true + +organization: "hyperledger" + +validators: + - name: Validator_0 + address: 744630EA9A7CBD310AE7B8EDAFCBF94E54D23F37 + nodeAddress: 9367CCE15205DC38DA61F5B348AF2AFEED2FE77A + - name: Validator_1 + address: 2C1B7046183387E63C17898235D3C0FDE4943BC7 + nodeAddress: 5B624373E8EE692ACDAF408F5B8E0831E78FEC50 + - name: Validator_2 + address: C5291CE95749A2DE1D992946B683280D75EDBE8C + nodeAddress: C13AEAC6523429A1ED244255D2BBAA7CB4AB7CB4 + - name: Validator_3 + address: A5BCAF761B774A61FADA691AB40C4E9A20D82B7B + nodeAddress: A85AE5C27FEDEFA57F425B7762A1BB5CCA095E64 diff --git a/helm/burrow/initialize.sh b/helm/burrow/initialize.sh new file mode 100644 index 000000000..92c2d93ee --- /dev/null +++ b/helm/burrow/initialize.sh @@ -0,0 +1,108 @@ +#!/usr/bin/env bash + +# Preflight checks +if [[ "$(which mktemp)" == "" ]] +then + echo "Please install mktemp and then rerun me. Exiting." + exit 1 +fi +if [[ "$(which burrow)" == "" ]] +then + echo "Please install Hyperledger Burrow and then rerun me. Exiting." + exit 1 +fi + +export CHAIN_NODES=${CHAIN_NODES:-4} +export CHAIN_NAME=${CHAIN_NAME:-"my-release-burrow"} +if [ -z $CHAIN_OUTPUT_DIRECTORY ]; then + export CHAIN_OUTPUT_DIRECTORY=`pwd` +fi + +set -e + +title="Initializing $((CHAIN_NODES)) Validator Nodes" +echo -e "\n${title}\n${title//?/-}\n" + +echo "Writing kubernetes template files for validators secrets, and configmaps." +keysTemplate=$(mktemp) +valsTemplate=$(mktemp) +genSpec=$(mktemp) +genesis=$(mktemp) +keys=$(mktemp -d) + +function finish { + rm $keysTemplate + rm $valsTemplate + rm $genSpec + rm $genesis + rm -r $keys +} +trap finish EXIT + +setup="setup.yaml" +values="addresses.yaml" + +cat >$keysTemplate <$valsTemplate < $genSpec + +echo "Creating keys and necessary deploy files..." +burrow configure \ + --chain-name=$CHAIN_NAME \ + --keys-dir=$keys \ + --genesis-spec=$genSpec \ + --config-template-in=$keysTemplate \ + --config-out=$CHAIN_OUTPUT_DIRECTORY/$setup \ + --config-template-in=$valsTemplate \ + --config-out=$CHAIN_OUTPUT_DIRECTORY/$values \ + --separate-genesis-doc=$genesis >/dev/null + +echo "Saved keys and genesis as $CHAIN_OUTPUT_DIRECTORY/$setup" +echo "Saved example 'values.yaml' as $CHAIN_OUTPUT_DIRECTORY/$values" + +cat >>$CHAIN_OUTPUT_DIRECTORY/$setup < Date: Mon, 13 Apr 2020 23:40:32 +0100 Subject: [PATCH 095/185] Don't connect to private chartmuseum on test Signed-off-by: Silas Davis Signed-off-by: Dan --- .github/workflows/test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 86c4db26f..18539a48c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -137,5 +137,4 @@ jobs: steps: - uses: actions/checkout@v2 - run: git fetch --unshallow --prune - - run: make helm_deps - run: make helm_package From 46f40a3edd828e2ddaba0cf4a2a765f8ea787ac8 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Tue, 14 Apr 2020 00:02:16 +0100 Subject: [PATCH 096/185] Fix chart push and fail when it doesn't work Signed-off-by: Silas Davis Signed-off-by: Dan --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 99ec93d00..51d6df32b 100644 --- a/Makefile +++ b/Makefile @@ -328,5 +328,5 @@ $(HELM_PACKAGE): helm_test bin/helm .PHONY: helm_push helm_push: helm_package @echo pushing helm chart... - @curl -sS -u ${CM_USERNAME}:${CM_PASSWORD} \ - --data-binary "@burrow-${VERSION}.tgz" $(CM_URL)/api/charts + @curl -u ${CM_USERNAME}:${CM_PASSWORD} \ + --data-binary "@$(HELM_PACKAGE)" $(CM_URL)/api/charts From 51893ffc348a7cd50f13cf3a8b88d6d00e051ee6 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Tue, 14 Apr 2020 08:23:10 +0100 Subject: [PATCH 097/185] Hide implementation details of OpcodeBitset in IsOpcodeAt Add tests and make fail safe Also initialise on dump/restore load Signed-off-by: Silas Davis Signed-off-by: Dan --- acm/account.go | 7 +++ acm/account_test.go | 7 +++ acm/acm.pb.go | 95 ++++++++++++++--------------- dump/load.go | 4 ++ dump/mock.go | 2 + dump/mock_test.go | 1 - execution/native/account.go | 4 +- execution/native/account_test.go | 57 +++++++++++++++++- js/proto/acm_pb.d.ts | 10 ++-- js/proto/acm_pb.js | 28 ++++----- project/history.go | 2 +- protobuf/acm.proto | 4 +- util/architecture/constants.go | 12 ---- util/architecture/constants_arm.go | 10 ---- util/fs.go | 96 ------------------------------ util/logging/cmd/main.go | 28 --------- util/os.go | 15 ----- 17 files changed, 146 insertions(+), 236 deletions(-) delete mode 100644 util/architecture/constants.go delete mode 100644 util/architecture/constants_arm.go delete mode 100644 util/fs.go delete mode 100644 util/logging/cmd/main.go delete mode 100644 util/os.go diff --git a/acm/account.go b/acm/account.go index bde1c375a..4620689d7 100644 --- a/acm/account.go +++ b/acm/account.go @@ -64,6 +64,13 @@ func (acc *Account) Code() []byte { return nil } +func (acc *Account) IsOpcodeAt(indexOfSymbolInCode uint) bool { + if indexOfSymbolInCode >= acc.EVMOpcodeBitset.Len() { + return false + } + return acc.EVMOpcodeBitset.IsSet(indexOfSymbolInCode) +} + // Conversions // // Using the naming convention is this package of 'As' being diff --git a/acm/account_test.go b/acm/account_test.go index 14a8f0e33..fb10dadaf 100644 --- a/acm/account_test.go +++ b/acm/account_test.go @@ -75,3 +75,10 @@ func TestAccountTags(t *testing.T) { require.NoError(t, err) assert.True(t, qry.Matches(acc)) } + +func TestAccount_IsOpcodeAt(t *testing.T) { + acc := Account{} + // Fail safe before initialised by initEVMCode + assert.False(t, acc.IsOpcodeAt(0)) + assert.False(t, acc.IsOpcodeAt(100)) +} diff --git a/acm/acm.pb.go b/acm/acm.pb.go index d8029fe34..01aab21ff 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -56,8 +56,8 @@ type Account struct { // (from Solidity/EVM), they point to the original deployed account where the metadata is stored. // This original account is called the forebear. Forebear *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,10,opt,name=Forebear,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Forebear,omitempty"` - // A bitset of all the symbols in Code that are opcodes (i.e. actual code not PUSH data) - OpcodeBitset github_com_tmthrgd_go_bitset.Bitset `protobuf:"bytes,12,opt,name=OpcodeBitset,proto3,casttype=github.com/tmthrgd/go-bitset.Bitset" json:"OpcodeBitset,omitempty"` + // A bitset of all the symbols in EVMCode that are opcodes (i.e. actual code not PUSH data) + EVMOpcodeBitset github_com_tmthrgd_go_bitset.Bitset `protobuf:"bytes,12,opt,name=EVMOpcodeBitset,proto3,casttype=github.com/tmthrgd/go-bitset.Bitset" json:"EVMOpcodeBitset,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -133,9 +133,9 @@ func (m *Account) GetContractMeta() []*ContractMeta { return nil } -func (m *Account) GetOpcodeBitset() github_com_tmthrgd_go_bitset.Bitset { +func (m *Account) GetEVMOpcodeBitset() github_com_tmthrgd_go_bitset.Bitset { if m != nil { - return m.OpcodeBitset + return m.EVMOpcodeBitset } return nil } @@ -204,41 +204,42 @@ func init() { proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } func init() { golang_proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } var fileDescriptor_49ed775bc0a6adf6 = []byte{ - // 544 bytes of a gzipped FileDescriptorProto + // 547 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x31, 0x6f, 0xd3, 0x40, - 0x18, 0xed, 0x35, 0x69, 0xe3, 0x5c, 0x2c, 0x54, 0x6e, 0x3a, 0x65, 0xb0, 0x43, 0x19, 0x88, 0x50, - 0xe3, 0x20, 0x20, 0x4b, 0x98, 0xe2, 0x8a, 0xaa, 0x52, 0x69, 0x28, 0xae, 0x54, 0x04, 0xdb, 0xf9, - 0x7c, 0x38, 0x96, 0x62, 0x9f, 0x39, 0x9f, 0x01, 0xff, 0x13, 0x46, 0x7e, 0x0a, 0x63, 0x46, 0x26, - 0x54, 0x31, 0x58, 0x28, 0xdd, 0xfa, 0x13, 0x98, 0x90, 0x2f, 0x8e, 0x71, 0x3a, 0x54, 0x02, 0xb6, - 0x7c, 0x79, 0xef, 0x7b, 0xef, 0xf9, 0xdd, 0x1d, 0x6c, 0x13, 0x1a, 0x5a, 0xb1, 0xe0, 0x92, 0xa3, - 0x06, 0xa1, 0x61, 0x77, 0xe0, 0x07, 0x72, 0x96, 0xba, 0x16, 0xe5, 0xe1, 0xd0, 0xe7, 0x3e, 0x1f, - 0x2a, 0xcc, 0x4d, 0xdf, 0xa9, 0x49, 0x0d, 0xea, 0xd7, 0x6a, 0xa7, 0xbb, 0x17, 0x33, 0x11, 0x06, - 0x49, 0x12, 0xf0, 0xa8, 0xfc, 0x47, 0xa7, 0x22, 0x8b, 0x65, 0x89, 0xef, 0x7f, 0xdf, 0x81, 0xad, - 0x09, 0xa5, 0x3c, 0x8d, 0x24, 0x9a, 0xc2, 0xd6, 0xc4, 0xf3, 0x04, 0x4b, 0x12, 0x0c, 0x7a, 0xa0, - 0xaf, 0xdb, 0x4f, 0x17, 0xb9, 0xb9, 0xf5, 0x23, 0x37, 0x0f, 0x6a, 0x9e, 0xb3, 0x2c, 0x66, 0x62, - 0xce, 0x3c, 0x9f, 0x89, 0xa1, 0x9b, 0x0a, 0xc1, 0x3f, 0x0e, 0x4b, 0xc1, 0x72, 0xd7, 0x59, 0x8b, - 0xa0, 0x11, 0x6c, 0x9f, 0xa5, 0xee, 0x3c, 0xa0, 0x27, 0x2c, 0xc3, 0xdb, 0x3d, 0xd0, 0xef, 0x3c, - 0xbe, 0x6b, 0x95, 0xe4, 0x0a, 0xb0, 0x9b, 0x85, 0x89, 0xf3, 0x87, 0x89, 0xba, 0x50, 0x3b, 0x67, - 0xef, 0x53, 0x16, 0x51, 0x86, 0x1b, 0x3d, 0xd0, 0x6f, 0x3a, 0xd5, 0x8c, 0x30, 0x6c, 0xd9, 0x64, - 0x4e, 0x0a, 0xa8, 0xa9, 0xa0, 0xf5, 0x88, 0x1e, 0xc2, 0xd6, 0xf3, 0x8b, 0xd3, 0x43, 0xee, 0x31, - 0xbc, 0xa3, 0xc2, 0xef, 0x95, 0xe1, 0x35, 0x3b, 0x93, 0x8c, 0x72, 0x8f, 0x39, 0x6b, 0x02, 0x3a, - 0x82, 0x9d, 0xb3, 0xaa, 0x96, 0x04, 0xef, 0xaa, 0x68, 0x86, 0x55, 0xab, 0xaa, 0xac, 0xa4, 0xc6, - 0x2a, 0x73, 0xd6, 0x17, 0xd1, 0x18, 0x6a, 0xaf, 0x27, 0xe7, 0x2b, 0xd3, 0x96, 0x32, 0x35, 0x6e, - 0x9a, 0x5e, 0xe7, 0x26, 0x3c, 0xe0, 0x61, 0x20, 0x59, 0x18, 0xcb, 0xcc, 0xa9, 0xf8, 0xc8, 0x82, - 0x70, 0x4a, 0x64, 0xf0, 0x81, 0x4d, 0x49, 0xc8, 0x70, 0xa7, 0x07, 0xfa, 0x6d, 0xfb, 0xce, 0x0d, - 0x76, 0x8d, 0x81, 0x2e, 0xa0, 0x56, 0xec, 0x1d, 0x93, 0x64, 0x86, 0x35, 0xe5, 0x35, 0x2e, 0xbd, - 0x06, 0xb7, 0x9f, 0x8e, 0x1b, 0x44, 0x44, 0x64, 0xd6, 0x31, 0xfb, 0x54, 0x64, 0x4a, 0xae, 0x73, - 0x13, 0x0c, 0x9c, 0x4a, 0x0b, 0x8d, 0xa0, 0x7e, 0xc8, 0x23, 0x29, 0x08, 0x95, 0xa7, 0x4c, 0x12, - 0xdc, 0xee, 0x35, 0xd4, 0x39, 0x15, 0xd7, 0xae, 0x0e, 0x38, 0x1b, 0x34, 0xf4, 0x02, 0x6a, 0x47, - 0x5c, 0x30, 0x97, 0x11, 0x81, 0xa1, 0x8a, 0xf3, 0xe8, 0xaf, 0x2f, 0x4a, 0xa5, 0x80, 0x4e, 0xa0, - 0xfe, 0x32, 0x2e, 0xea, 0xb2, 0x03, 0x99, 0x30, 0x89, 0x75, 0xa5, 0xf8, 0xe0, 0x57, 0x6e, 0xde, - 0xaf, 0x29, 0xca, 0x50, 0xce, 0x84, 0xef, 0x0d, 0x7d, 0x3e, 0x70, 0x15, 0xcf, 0x5a, 0xd1, 0x9d, - 0x8d, 0xe5, 0x71, 0xf3, 0xf3, 0x17, 0x73, 0x6b, 0xff, 0x12, 0x6c, 0x7e, 0x18, 0x7a, 0x55, 0x2b, - 0x70, 0x75, 0xbd, 0x47, 0xff, 0x54, 0x60, 0xad, 0xbb, 0x37, 0x50, 0x2f, 0xa4, 0x3d, 0x22, 0x89, - 0x92, 0xdd, 0xfe, 0x1f, 0xd9, 0x0d, 0xa9, 0xe2, 0x11, 0xac, 0x67, 0xf5, 0x08, 0xda, 0x4e, 0x35, - 0xdb, 0xcf, 0x16, 0x4b, 0x03, 0x7c, 0x5b, 0x1a, 0xe0, 0x72, 0x69, 0x80, 0x9f, 0x4b, 0x03, 0x7c, - 0xbd, 0x32, 0xc0, 0xe2, 0xca, 0x00, 0x6f, 0xef, 0xdd, 0x6e, 0x49, 0x68, 0xe8, 0xee, 0xaa, 0x77, - 0xff, 0xe4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x9e, 0x43, 0x9f, 0x58, 0x04, 0x00, 0x00, + 0x18, 0xed, 0x35, 0x69, 0xe3, 0x5c, 0x22, 0x28, 0x37, 0x9d, 0x32, 0xd8, 0xa1, 0x0c, 0x44, 0xa8, + 0x71, 0x10, 0x90, 0x25, 0x4c, 0x71, 0xd5, 0xaa, 0x12, 0x24, 0xb4, 0xae, 0x14, 0x04, 0xdb, 0xf9, + 0x7c, 0x38, 0x96, 0xe2, 0x9c, 0x39, 0x9f, 0x01, 0xff, 0x13, 0x46, 0x7e, 0x0a, 0x63, 0x46, 0xc6, + 0x0a, 0x21, 0x0b, 0xa5, 0x5b, 0x7f, 0x02, 0x13, 0xf2, 0xc5, 0x31, 0x4e, 0x86, 0x4a, 0xc0, 0x96, + 0x2f, 0xef, 0x7d, 0xef, 0x3d, 0xbf, 0xbb, 0x83, 0x75, 0x42, 0x03, 0x33, 0x14, 0x5c, 0x72, 0x54, + 0x21, 0x34, 0x68, 0x75, 0x3d, 0x5f, 0x4e, 0x63, 0xc7, 0xa4, 0x3c, 0xe8, 0x79, 0xdc, 0xe3, 0x3d, + 0x85, 0x39, 0xf1, 0x3b, 0x35, 0xa9, 0x41, 0xfd, 0x5a, 0xed, 0xb4, 0x0e, 0x42, 0x26, 0x02, 0x3f, + 0x8a, 0x7c, 0x3e, 0xcf, 0xff, 0x69, 0x52, 0x91, 0x84, 0x32, 0xc7, 0x0f, 0x7f, 0xec, 0xc1, 0xda, + 0x90, 0x52, 0x1e, 0xcf, 0x25, 0x1a, 0xc3, 0xda, 0xd0, 0x75, 0x05, 0x8b, 0x22, 0x0c, 0xda, 0xa0, + 0xd3, 0xb4, 0x9e, 0x2d, 0x52, 0x63, 0xe7, 0x7b, 0x6a, 0x1c, 0x95, 0x3c, 0xa7, 0x49, 0xc8, 0xc4, + 0x8c, 0xb9, 0x1e, 0x13, 0x3d, 0x27, 0x16, 0x82, 0x7f, 0xec, 0xe5, 0x82, 0xf9, 0xae, 0xbd, 0x16, + 0x41, 0x7d, 0x58, 0x3f, 0x8f, 0x9d, 0x99, 0x4f, 0x5f, 0xb0, 0x04, 0xef, 0xb6, 0x41, 0xa7, 0xf1, + 0xe4, 0x9e, 0x99, 0x93, 0x0b, 0xc0, 0xaa, 0x66, 0x26, 0xf6, 0x1f, 0x26, 0x6a, 0x41, 0xed, 0x92, + 0xbd, 0x8f, 0xd9, 0x9c, 0x32, 0x5c, 0x69, 0x83, 0x4e, 0xd5, 0x2e, 0x66, 0x84, 0x61, 0xcd, 0x22, + 0x33, 0x92, 0x41, 0x55, 0x05, 0xad, 0x47, 0xf4, 0x08, 0xd6, 0x4e, 0x26, 0xa3, 0x63, 0xee, 0x32, + 0xbc, 0xa7, 0xc2, 0x1f, 0xe4, 0xe1, 0x35, 0x2b, 0x91, 0x8c, 0x72, 0x97, 0xd9, 0x6b, 0x02, 0x3a, + 0x85, 0x8d, 0xf3, 0xa2, 0x96, 0x08, 0xef, 0xab, 0x68, 0xba, 0x59, 0xaa, 0x2a, 0xaf, 0xa4, 0xc4, + 0xca, 0x73, 0x96, 0x17, 0xd1, 0x00, 0x6a, 0xaf, 0x87, 0x97, 0x2b, 0xd3, 0x9a, 0x32, 0xd5, 0xb7, + 0x4d, 0x6f, 0x52, 0x03, 0x1e, 0xf1, 0xc0, 0x97, 0x2c, 0x08, 0x65, 0x62, 0x17, 0x7c, 0x64, 0x42, + 0x38, 0x26, 0xd2, 0xff, 0xc0, 0xc6, 0x24, 0x60, 0xb8, 0xd1, 0x06, 0x9d, 0xba, 0x75, 0x67, 0x8b, + 0x5d, 0x62, 0xa0, 0x09, 0xd4, 0xb2, 0xbd, 0x33, 0x12, 0x4d, 0xb1, 0xa6, 0xbc, 0x06, 0xb9, 0x57, + 0xf7, 0xf6, 0xd3, 0x71, 0xfc, 0x39, 0x11, 0x89, 0x79, 0xc6, 0x3e, 0x65, 0x99, 0xa2, 0x9b, 0xd4, + 0x00, 0x5d, 0xbb, 0xd0, 0x42, 0x7d, 0xd8, 0x3c, 0xe6, 0x73, 0x29, 0x08, 0x95, 0x23, 0x26, 0x09, + 0xae, 0xb7, 0x2b, 0xea, 0x9c, 0xb2, 0x6b, 0x57, 0x06, 0xec, 0x0d, 0x1a, 0x7a, 0x09, 0xb5, 0x53, + 0x2e, 0x98, 0xc3, 0x88, 0xc0, 0x50, 0xc5, 0x79, 0xfc, 0xd7, 0x17, 0xa5, 0x50, 0x40, 0x17, 0xf0, + 0xee, 0xc9, 0x64, 0xf4, 0x2a, 0xcc, 0x1a, 0xb3, 0x7c, 0x19, 0x31, 0x89, 0x9b, 0x4a, 0xf4, 0xe1, + 0xaf, 0xd4, 0x78, 0x50, 0x12, 0x95, 0x81, 0x9c, 0x0a, 0xcf, 0xed, 0x79, 0xbc, 0xeb, 0x28, 0x9e, + 0xb9, 0xa2, 0xdb, 0xdb, 0xfb, 0x83, 0xea, 0xe7, 0x2f, 0xc6, 0xce, 0xe1, 0x15, 0xd8, 0xfc, 0x3c, + 0x74, 0x51, 0xaa, 0x71, 0x75, 0xc9, 0xfb, 0xff, 0x54, 0x63, 0xa9, 0xc1, 0x37, 0xb0, 0x99, 0x49, + 0xbb, 0x44, 0x12, 0x25, 0xbb, 0xfb, 0x3f, 0xb2, 0x1b, 0x52, 0xd9, 0x53, 0x58, 0xcf, 0xea, 0x29, + 0xd4, 0xed, 0x62, 0xb6, 0x9e, 0x2f, 0x96, 0x3a, 0xf8, 0xb6, 0xd4, 0xc1, 0xd5, 0x52, 0x07, 0x3f, + 0x97, 0x3a, 0xf8, 0x7a, 0xad, 0x83, 0xc5, 0xb5, 0x0e, 0xde, 0xde, 0xbf, 0xdd, 0x92, 0xd0, 0xc0, + 0xd9, 0x57, 0xaf, 0xff, 0xe9, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x85, 0x4b, 0x79, 0x5e, + 0x04, 0x00, 0x00, } func (m *Account) Marshal() (dAtA []byte, err error) { @@ -265,10 +266,10 @@ func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.OpcodeBitset) > 0 { - i -= len(m.OpcodeBitset) - copy(dAtA[i:], m.OpcodeBitset) - i = encodeVarintAcm(dAtA, i, uint64(len(m.OpcodeBitset))) + if len(m.EVMOpcodeBitset) > 0 { + i -= len(m.EVMOpcodeBitset) + copy(dAtA[i:], m.EVMOpcodeBitset) + i = encodeVarintAcm(dAtA, i, uint64(len(m.EVMOpcodeBitset))) i-- dAtA[i] = 0x62 } @@ -481,7 +482,7 @@ func (m *Account) Size() (n int) { if l > 0 { n += 1 + l + sovAcm(uint64(l)) } - l = len(m.OpcodeBitset) + l = len(m.EVMOpcodeBitset) if l > 0 { n += 1 + l + sovAcm(uint64(l)) } @@ -885,7 +886,7 @@ func (m *Account) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OpcodeBitset", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EVMOpcodeBitset", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -912,9 +913,9 @@ func (m *Account) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OpcodeBitset = append(m.OpcodeBitset[:0], dAtA[iNdEx:postIndex]...) - if m.OpcodeBitset == nil { - m.OpcodeBitset = []byte{} + m.EVMOpcodeBitset = append(m.EVMOpcodeBitset[:0], dAtA[iNdEx:postIndex]...) + if m.EVMOpcodeBitset == nil { + m.EVMOpcodeBitset = []byte{} } iNdEx = postIndex default: diff --git a/dump/load.go b/dump/load.go index 531e01849..3df990d0f 100644 --- a/dump/load.go +++ b/dump/load.go @@ -9,6 +9,7 @@ import ( "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/execution/native" "github.com/hyperledger/burrow/execution/state" "github.com/hyperledger/burrow/txs/payload" ) @@ -40,6 +41,9 @@ func Load(source Source, st *state.State) error { m.MetadataHash = metahash.Bytes() m.Metadata = "" } + if row.Account.EVMOpcodeBitset.Len() != uint(len(row.Account.EVMCode)) { + row.Account.EVMOpcodeBitset = native.EVMOpcodeBitset(row.Account.EVMCode) + } err := s.UpdateAccount(row.Account) if err != nil { return err diff --git a/dump/mock.go b/dump/mock.go index 06547bbc5..c3bf6888b 100644 --- a/dump/mock.go +++ b/dump/mock.go @@ -11,6 +11,7 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/names" + "github.com/hyperledger/burrow/execution/native" "github.com/hyperledger/burrow/genesis" ) @@ -53,6 +54,7 @@ func (m *MockSource) Recv() (*Dump, error) { if m.Accounts%2 > 0 { row.Account.EVMCode = make([]byte, m.rand.Intn(10000)) m.rand.Read(row.Account.EVMCode) + row.Account.EVMOpcodeBitset = native.EVMOpcodeBitset(row.Account.EVMCode) } else { row.Account.PublicKey = crypto.PublicKey{} } diff --git a/dump/mock_test.go b/dump/mock_test.go index 6df2a7614..041b5ad51 100644 --- a/dump/mock_test.go +++ b/dump/mock_test.go @@ -23,6 +23,5 @@ func TestMockReader(t *testing.T) { loadDumpFromJSONString(t, st, dump) dumpOut := normaliseDump(dumpToJSONString(t, st, mock)) - require.True(t, dump == dumpOut) require.Equal(t, dump, dumpOut) } diff --git a/execution/native/account.go b/execution/native/account.go index c56c89b7f..c9d369f4a 100644 --- a/execution/native/account.go +++ b/execution/native/account.go @@ -50,7 +50,7 @@ func initEVMCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypt } acc.EVMCode = code - acc.OpcodeBitset = opcodeBitset(code) + acc.EVMOpcodeBitset = EVMOpcodeBitset(code) // keccak256 hash of a contract's code hash := sha3.NewLegacyKeccak256() @@ -119,7 +119,7 @@ func codehashPermitted(codehash []byte, metamap []*acm.ContractMeta) bool { } // If code[i] is an opcode (rather than PUSH data) then bitset.IsSet(i) will be true -func opcodeBitset(code []byte) bitset.Bitset { +func EVMOpcodeBitset(code []byte) bitset.Bitset { bs := bitset.New(uint(len(code))) for i := 0; i < len(code); i++ { bs.Set(uint(i)) diff --git a/execution/native/account_test.go b/execution/native/account_test.go index a800a5bcb..243334a82 100644 --- a/execution/native/account_test.go +++ b/execution/native/account_test.go @@ -95,17 +95,68 @@ func TestOpcodeBitset(t *testing.T) { code: bc.MustSplice(asm.PUSH2, 1, asm.JUMPDEST, asm.ADD, asm.JUMPDEST), bitset: mkBitset("10011"), }, - // TODO: Add test cases. + { + name: "Two JUMPDESTs", + code: bc.MustSplice(asm.PUSH1, 1, asm.JUMPDEST, asm.ADD, asm.JUMPDEST), + bitset: mkBitset("10111"), + }, + { + name: "One PUSH", + code: bc.MustSplice(asm.PUSH4, asm.JUMPDEST, asm.ADD, asm.JUMPDEST, asm.PUSH32, asm.BALANCE), + bitset: mkBitset("100001"), + }, + { + name: "Two PUSHes", + code: bc.MustSplice(asm.PUSH3, asm.JUMPDEST, asm.ADD, asm.JUMPDEST, asm.PUSH32, asm.BALANCE), + bitset: mkBitset("100010"), + }, + { + name: "Three PUSHes", + code: bc.MustSplice(asm.PUSH3, asm.JUMPDEST, asm.ADD, asm.PUSH2, asm.PUSH32, asm.BALANCE), + bitset: mkBitset("100010"), + }, + { + name: "No PUSH", + code: bc.MustSplice(asm.JUMPDEST, asm.ADD, asm.BALANCE), + bitset: mkBitset("111"), + }, + { + name: "End PUSH", + code: bc.MustSplice(asm.JUMPDEST, asm.ADD, asm.PUSH6), + bitset: mkBitset("111"), + }, + { + name: "Middle PUSH", + code: bc.MustSplice(asm.JUMPDEST, asm.PUSH2, asm.PUSH1, asm.PUSH2, asm.BLOCKHASH), + bitset: mkBitset("11001"), + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := opcodeBitset(tt.code); !reflect.DeepEqual(got, tt.bitset) { - t.Errorf("opcodeBitset() = %v, want %v", got, tt.bitset) + if got := EVMOpcodeBitset(tt.code); !reflect.DeepEqual(got, tt.bitset) { + t.Errorf("EVMOpcodeBitset() = %v, want %v", got, tt.bitset) } }) } } +func TestAccount_IsOpcodeAt(t *testing.T) { + st := acmstate.NewMemoryState() + address := AddressFromName("scrambled snake") + err := CreateAccount(st, address) + require.NoError(t, err) + code := bc.MustSplice(asm.PUSH2, 2, 3) + err = InitEVMCode(st, address, code) + require.NoError(t, err) + + acc, err := st.GetAccount(address) + require.NoError(t, err) + assert.True(t, acc.IsOpcodeAt(0)) + assert.False(t, acc.IsOpcodeAt(1)) + assert.False(t, acc.IsOpcodeAt(2)) + assert.False(t, acc.IsOpcodeAt(3)) +} + func mkBitset(binaryString string) bitset.Bitset { length := uint(len(binaryString)) bs := bitset.New(length) diff --git a/js/proto/acm_pb.d.ts b/js/proto/acm_pb.d.ts index d127e65be..7560162f1 100644 --- a/js/proto/acm_pb.d.ts +++ b/js/proto/acm_pb.d.ts @@ -56,10 +56,10 @@ export class Account extends jspb.Message { getForebear_asB64(): string; setForebear(value: Uint8Array | string): void; - getOpcodebitset(): Uint8Array | string; - getOpcodebitset_asU8(): Uint8Array; - getOpcodebitset_asB64(): string; - setOpcodebitset(value: Uint8Array | string): void; + getEvmopcodebitset(): Uint8Array | string; + getEvmopcodebitset_asU8(): Uint8Array; + getEvmopcodebitset_asB64(): string; + setEvmopcodebitset(value: Uint8Array | string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Account.AsObject; @@ -84,7 +84,7 @@ export namespace Account { codehash: Uint8Array | string, contractmetaList: Array, forebear: Uint8Array | string, - opcodebitset: Uint8Array | string, + evmopcodebitset: Uint8Array | string, } } diff --git a/js/proto/acm_pb.js b/js/proto/acm_pb.js index 828758869..97aad48fb 100644 --- a/js/proto/acm_pb.js +++ b/js/proto/acm_pb.js @@ -113,7 +113,7 @@ proto.acm.Account.toObject = function(includeInstance, msg) { contractmetaList: jspb.Message.toObjectList(msg.getContractmetaList(), proto.acm.ContractMeta.toObject, includeInstance), forebear: msg.getForebear_asB64(), - opcodebitset: msg.getOpcodebitset_asB64() + evmopcodebitset: msg.getEvmopcodebitset_asB64() }; if (includeInstance) { @@ -199,7 +199,7 @@ proto.acm.Account.deserializeBinaryFromReader = function(msg, reader) { break; case 12: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOpcodebitset(value); + msg.setEvmopcodebitset(value); break; default: reader.skipField(); @@ -310,7 +310,7 @@ proto.acm.Account.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getOpcodebitset_asU8(); + f = message.getEvmopcodebitset_asU8(); if (f.length > 0) { writer.writeBytes( 12, @@ -697,35 +697,35 @@ proto.acm.Account.prototype.setForebear = function(value) { /** - * optional bytes OpcodeBitset = 12; + * optional bytes EVMOpcodeBitset = 12; * @return {!(string|Uint8Array)} */ -proto.acm.Account.prototype.getOpcodebitset = function() { +proto.acm.Account.prototype.getEvmopcodebitset = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); }; /** - * optional bytes OpcodeBitset = 12; - * This is a type-conversion wrapper around `getOpcodebitset()` + * optional bytes EVMOpcodeBitset = 12; + * This is a type-conversion wrapper around `getEvmopcodebitset()` * @return {string} */ -proto.acm.Account.prototype.getOpcodebitset_asB64 = function() { +proto.acm.Account.prototype.getEvmopcodebitset_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOpcodebitset())); + this.getEvmopcodebitset())); }; /** - * optional bytes OpcodeBitset = 12; + * optional bytes EVMOpcodeBitset = 12; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOpcodebitset()` + * This is a type-conversion wrapper around `getEvmopcodebitset()` * @return {!Uint8Array} */ -proto.acm.Account.prototype.getOpcodebitset_asU8 = function() { +proto.acm.Account.prototype.getEvmopcodebitset_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOpcodebitset())); + this.getEvmopcodebitset())); }; @@ -733,7 +733,7 @@ proto.acm.Account.prototype.getOpcodebitset_asU8 = function() { * @param {!(string|Uint8Array)} value * @return {!proto.acm.Account} returns this */ -proto.acm.Account.prototype.setOpcodebitset = function(value) { +proto.acm.Account.prototype.setEvmopcodebitset = function(value) { return jspb.Message.setProto3BytesField(this, 12, value); }; diff --git a/project/history.go b/project/history.go index 7a962d38f..2d02e4bab 100644 --- a/project/history.go +++ b/project/history.go @@ -50,7 +50,7 @@ var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "htt MustDeclareReleases("0.30.4 - 2020-04-05", `### Added - [Build] Added Helm chart -- [State] Account now has OpcodeBitset field to support upcoming EVM fixes +- [State] Account now has EVMOpcodeBitset field to support upcoming EVM fixes ### Fixed - [JS] Github actions release of JS lib diff --git a/protobuf/acm.proto b/protobuf/acm.proto index a32a98f4b..872b4c310 100644 --- a/protobuf/acm.proto +++ b/protobuf/acm.proto @@ -42,8 +42,8 @@ message Account { // (from Solidity/EVM), they point to the original deployed account where the metadata is stored. // This original account is called the forebear. bytes Forebear = 10 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"]; - // A bitset of all the symbols in Code that are opcodes (i.e. actual code not PUSH data) - bytes OpcodeBitset = 12 [(gogoproto.casttype) = "github.com/tmthrgd/go-bitset.Bitset"]; + // A bitset of all the symbols in EVMCode that are opcodes (i.e. actual code not PUSH data) + bytes EVMOpcodeBitset = 12 [(gogoproto.casttype) = "github.com/tmthrgd/go-bitset.Bitset"]; } message ContractMeta { diff --git a/util/architecture/constants.go b/util/architecture/constants.go deleted file mode 100644 index 278605978..000000000 --- a/util/architecture/constants.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build !arm - -// Copyright Monax Industries Limited -// SPDX-License-Identifier: Apache-2.0 - -package architecture - -import "math" - -const ( - MaxInt32 = math.MaxUint32 -) diff --git a/util/architecture/constants_arm.go b/util/architecture/constants_arm.go deleted file mode 100644 index 3bb48f377..000000000 --- a/util/architecture/constants_arm.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright Monax Industries Limited -// SPDX-License-Identifier: Apache-2.0 - -package architecture - -import "math" - -const ( - MaxInt32 = math.MaxInt32 -) diff --git a/util/fs.go b/util/fs.go deleted file mode 100644 index 698f640ba..000000000 --- a/util/fs.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright Monax Industries Limited -// SPDX-License-Identifier: Apache-2.0 - -package util - -import ( - "fmt" - "io" - "os" -) - -// Ensure the directory exists or create it if needed. -func EnsureDir(dir string, mode os.FileMode) error { - if fileOptions, err := os.Stat(dir); os.IsNotExist(err) { - if errMake := os.MkdirAll(dir, mode); errMake != nil { - return fmt.Errorf("could not create directory %s. %v", dir, err) - } - } else if err != nil { - return fmt.Errorf("error asserting directory %s: %v", dir, err) - } else if !fileOptions.IsDir() { - return fmt.Errorf("path already exists as a file: %s", dir) - } - return nil -} - -// Check whether the provided directory exists -func IsDir(directory string) bool { - fileInfo, err := os.Stat(directory) - if err != nil { - return false - } - return fileInfo.IsDir() -} - -// copied from http://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file-in-golang -// CopyFile copies a file from src to dst. If src and dst files exist, and are -// the same, then return success. Otherwise, attempt to create a hard link -// between the two files. If that fail, copy the file contents from src to dst. -func CopyFile(src, dst string) (err error) { - sfi, err := os.Stat(src) - if err != nil { - return - } - if !sfi.Mode().IsRegular() { - // cannot copy non-regular files (e.g., directories, - // symlinks, devices, etc.) - return fmt.Errorf("CopyFile: non-regular source file %s (%q)", sfi.Name(), sfi.Mode().String()) - } - dfi, err := os.Stat(dst) - if err != nil { - if !os.IsNotExist(err) { - return - } - } else { - if !(dfi.Mode().IsRegular()) { - return fmt.Errorf("CopyFile: non-regular destination file %s (%q)", dfi.Name(), dfi.Mode().String()) - } - if os.SameFile(sfi, dfi) { - return - } - } - // NOTE: [ben] we do not want to create a hard link currently - // if err = os.Link(src, dst); err == nil { - // return - // } - err = copyFileContents(src, dst) - return -} - -// copyFileContents copies the contents of the file named src to the file named -// by dst. The file will be created if it does not already exist. If the -// destination file exists, all its contents will be replaced by the contents -// of the source file. -func copyFileContents(src, dst string) (err error) { - in, err := os.Open(src) - if err != nil { - return - } - defer in.Close() - out, err := os.Create(dst) - if err != nil { - return - } - defer func() { - cerr := out.Close() - if err == nil { - err = cerr - } - }() - if _, err = io.Copy(out, in); err != nil { - return - } - // TODO: [ben] this blocks, so copy should be put in go-routine - err = out.Sync() - return -} diff --git a/util/logging/cmd/main.go b/util/logging/cmd/main.go deleted file mode 100644 index 267ae7fab..000000000 --- a/util/logging/cmd/main.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright Monax Industries Limited -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "fmt" - - . "github.com/hyperledger/burrow/logging/logconfig" -) - -// Dump an example logging configuration -func main() { - loggingConfig := &LoggingConfig{ - RootSink: Sink(). - AddSinks( - // Log everything to Stderr - Sink().SetOutput(StderrOutput()), - Sink().SetTransform(FilterTransform(ExcludeWhenAllMatch, - "module", "p2p", - "captured_logging_source", "tendermint_log15")). - AddSinks( - Sink().SetOutput(StdoutOutput()), - ), - ), - } - fmt.Println(loggingConfig.RootTOMLString()) -} diff --git a/util/os.go b/util/os.go deleted file mode 100644 index 77bb4ac79..000000000 --- a/util/os.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright Monax Industries Limited -// SPDX-License-Identifier: Apache-2.0 - -package util - -import ( - "fmt" - "os" -) - -// Prints an error message to stderr and exits with status code 1 -func Fatalf(format string, args ...interface{}) { - fmt.Fprintf(os.Stderr, format, args...) - os.Exit(1) -} From 799f14c141e49774b72e6fae3d35f3f1e7f20d38 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 14 Apr 2020 17:21:41 -0400 Subject: [PATCH 098/185] Updated the way to use bitmap. Signed-off-by: Dan --- execution/evm/contract.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/execution/evm/contract.go b/execution/evm/contract.go index ebf33e61a..c17f4204f 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -4,7 +4,6 @@ import ( "bytes" "encoding/binary" "fmt" - "github.com/tmthrgd/go-bitset" "io/ioutil" "math/big" "strings" @@ -522,16 +521,16 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case JUMP: // 0x56 to := stack.Pop64() - opcodeBitset := mustGetAccount(st.CallFrame, maybe, params.Callee).OpcodeBitset - maybe.PushError(c.jump(c.code, to, &pc, opcodeBitset)) + account := mustGetAccount(st.CallFrame, maybe, params.Callee) + maybe.PushError(c.jump(c.code, to, &pc, account)) continue case JUMPI: // 0x57 pos := stack.Pop64() cond := stack.Pop() if !cond.IsZero() { - opcodeBitset := mustGetAccount(st.CallFrame, maybe, params.Callee).OpcodeBitset - maybe.PushError(c.jump(c.code, pos, &pc, opcodeBitset)) + account := mustGetAccount(st.CallFrame, maybe, params.Callee) + maybe.PushError(c.jump(c.code, pos, &pc, account)) continue } else { c.debugf(" ~> false\n") @@ -854,9 +853,9 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e return nil, maybe.Error() } -func (c *Contract) jump(code []byte, to uint64, pc *uint64, opcodeBitset bitset.Bitset) error { +func (c *Contract) jump(code []byte, to uint64, pc *uint64, account *acm.Account) error { dest := codeGetOp(code, to) - if dest != JUMPDEST || !opcodeBitset.IsSet(uint(to)) { + if dest != JUMPDEST || !account.IsOpcodeAt(uint(to)) { c.debugf(" ~> %v invalid jump dest %v\n", to, dest) return errors.Codes.InvalidJumpDest } From b0b60f0b04b5413b9f6d6c0b5c3dcf0438fc3a7b Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 16 Apr 2020 00:38:33 +0100 Subject: [PATCH 099/185] Augment EVM Contract bytecode with Code object including OpcodeBitset for JUMPDEST analysis The previous implmentation stored the bitset on the account, this had the advantage of not having to recompute it for the same account, but also complicated and made a breaking change to state. It also did not consider the case when we are account creation initiailisation code before the account has initialised. By using the Code type in evm.Contract the type system helps us ensure the necessary OpcodeBitset is initialised. Signed-off-by: Silas Davis --- acm/account.go | 7 -- acm/account_test.go | 7 -- acm/acm.pb.go | 130 +++++++++---------------------- dump/load.go | 4 - dump/mock.go | 2 - execution/evm/code.go | 66 ++++++++++++++++ execution/evm/code_test.go | 94 ++++++++++++++++++++++ execution/evm/contract.go | 26 +++---- execution/evm/evm.go | 2 +- execution/native/account.go | 16 ---- execution/native/account_test.go | 95 ---------------------- js/proto/acm_pb.d.ts | 6 -- js/proto/acm_pb.js | 56 +------------ protobuf/acm.proto | 2 - 14 files changed, 211 insertions(+), 302 deletions(-) create mode 100644 execution/evm/code.go create mode 100644 execution/evm/code_test.go diff --git a/acm/account.go b/acm/account.go index 4620689d7..bde1c375a 100644 --- a/acm/account.go +++ b/acm/account.go @@ -64,13 +64,6 @@ func (acc *Account) Code() []byte { return nil } -func (acc *Account) IsOpcodeAt(indexOfSymbolInCode uint) bool { - if indexOfSymbolInCode >= acc.EVMOpcodeBitset.Len() { - return false - } - return acc.EVMOpcodeBitset.IsSet(indexOfSymbolInCode) -} - // Conversions // // Using the naming convention is this package of 'As' being diff --git a/acm/account_test.go b/acm/account_test.go index fb10dadaf..14a8f0e33 100644 --- a/acm/account_test.go +++ b/acm/account_test.go @@ -75,10 +75,3 @@ func TestAccountTags(t *testing.T) { require.NoError(t, err) assert.True(t, qry.Matches(acc)) } - -func TestAccount_IsOpcodeAt(t *testing.T) { - acc := Account{} - // Fail safe before initialised by initEVMCode - assert.False(t, acc.IsOpcodeAt(0)) - assert.False(t, acc.IsOpcodeAt(100)) -} diff --git a/acm/acm.pb.go b/acm/acm.pb.go index 01aab21ff..327221c1e 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -16,7 +16,6 @@ import ( crypto "github.com/hyperledger/burrow/crypto" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" permission "github.com/hyperledger/burrow/permission" - github_com_tmthrgd_go_bitset "github.com/tmthrgd/go-bitset" ) // Reference imports to suppress errors if they are not otherwise used. @@ -55,12 +54,10 @@ type Account struct { // The metadata is stored in the deployed account. When the deployed account creates new account // (from Solidity/EVM), they point to the original deployed account where the metadata is stored. // This original account is called the forebear. - Forebear *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,10,opt,name=Forebear,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Forebear,omitempty"` - // A bitset of all the symbols in EVMCode that are opcodes (i.e. actual code not PUSH data) - EVMOpcodeBitset github_com_tmthrgd_go_bitset.Bitset `protobuf:"bytes,12,opt,name=EVMOpcodeBitset,proto3,casttype=github.com/tmthrgd/go-bitset.Bitset" json:"EVMOpcodeBitset,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Forebear *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,10,opt,name=Forebear,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Forebear,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Account) Reset() { *m = Account{} } @@ -133,13 +130,6 @@ func (m *Account) GetContractMeta() []*ContractMeta { return nil } -func (m *Account) GetEVMOpcodeBitset() github_com_tmthrgd_go_bitset.Bitset { - if m != nil { - return m.EVMOpcodeBitset - } - return nil -} - func (*Account) XXX_MessageName() string { return "acm.Account" } @@ -204,42 +194,39 @@ func init() { proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } func init() { golang_proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } var fileDescriptor_49ed775bc0a6adf6 = []byte{ - // 547 bytes of a gzipped FileDescriptorProto + // 506 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x31, 0x6f, 0xd3, 0x40, - 0x18, 0xed, 0x35, 0x69, 0xe3, 0x5c, 0x22, 0x28, 0x37, 0x9d, 0x32, 0xd8, 0xa1, 0x0c, 0x44, 0xa8, - 0x71, 0x10, 0x90, 0x25, 0x4c, 0x71, 0xd5, 0xaa, 0x12, 0x24, 0xb4, 0xae, 0x14, 0x04, 0xdb, 0xf9, - 0x7c, 0x38, 0x96, 0xe2, 0x9c, 0x39, 0x9f, 0x01, 0xff, 0x13, 0x46, 0x7e, 0x0a, 0x63, 0x46, 0xc6, - 0x0a, 0x21, 0x0b, 0xa5, 0x5b, 0x7f, 0x02, 0x13, 0xf2, 0xc5, 0x31, 0x4e, 0x86, 0x4a, 0xc0, 0x96, - 0x2f, 0xef, 0x7d, 0xef, 0x3d, 0xbf, 0xbb, 0x83, 0x75, 0x42, 0x03, 0x33, 0x14, 0x5c, 0x72, 0x54, - 0x21, 0x34, 0x68, 0x75, 0x3d, 0x5f, 0x4e, 0x63, 0xc7, 0xa4, 0x3c, 0xe8, 0x79, 0xdc, 0xe3, 0x3d, - 0x85, 0x39, 0xf1, 0x3b, 0x35, 0xa9, 0x41, 0xfd, 0x5a, 0xed, 0xb4, 0x0e, 0x42, 0x26, 0x02, 0x3f, - 0x8a, 0x7c, 0x3e, 0xcf, 0xff, 0x69, 0x52, 0x91, 0x84, 0x32, 0xc7, 0x0f, 0x7f, 0xec, 0xc1, 0xda, - 0x90, 0x52, 0x1e, 0xcf, 0x25, 0x1a, 0xc3, 0xda, 0xd0, 0x75, 0x05, 0x8b, 0x22, 0x0c, 0xda, 0xa0, - 0xd3, 0xb4, 0x9e, 0x2d, 0x52, 0x63, 0xe7, 0x7b, 0x6a, 0x1c, 0x95, 0x3c, 0xa7, 0x49, 0xc8, 0xc4, - 0x8c, 0xb9, 0x1e, 0x13, 0x3d, 0x27, 0x16, 0x82, 0x7f, 0xec, 0xe5, 0x82, 0xf9, 0xae, 0xbd, 0x16, - 0x41, 0x7d, 0x58, 0x3f, 0x8f, 0x9d, 0x99, 0x4f, 0x5f, 0xb0, 0x04, 0xef, 0xb6, 0x41, 0xa7, 0xf1, - 0xe4, 0x9e, 0x99, 0x93, 0x0b, 0xc0, 0xaa, 0x66, 0x26, 0xf6, 0x1f, 0x26, 0x6a, 0x41, 0xed, 0x92, - 0xbd, 0x8f, 0xd9, 0x9c, 0x32, 0x5c, 0x69, 0x83, 0x4e, 0xd5, 0x2e, 0x66, 0x84, 0x61, 0xcd, 0x22, - 0x33, 0x92, 0x41, 0x55, 0x05, 0xad, 0x47, 0xf4, 0x08, 0xd6, 0x4e, 0x26, 0xa3, 0x63, 0xee, 0x32, - 0xbc, 0xa7, 0xc2, 0x1f, 0xe4, 0xe1, 0x35, 0x2b, 0x91, 0x8c, 0x72, 0x97, 0xd9, 0x6b, 0x02, 0x3a, - 0x85, 0x8d, 0xf3, 0xa2, 0x96, 0x08, 0xef, 0xab, 0x68, 0xba, 0x59, 0xaa, 0x2a, 0xaf, 0xa4, 0xc4, - 0xca, 0x73, 0x96, 0x17, 0xd1, 0x00, 0x6a, 0xaf, 0x87, 0x97, 0x2b, 0xd3, 0x9a, 0x32, 0xd5, 0xb7, - 0x4d, 0x6f, 0x52, 0x03, 0x1e, 0xf1, 0xc0, 0x97, 0x2c, 0x08, 0x65, 0x62, 0x17, 0x7c, 0x64, 0x42, - 0x38, 0x26, 0xd2, 0xff, 0xc0, 0xc6, 0x24, 0x60, 0xb8, 0xd1, 0x06, 0x9d, 0xba, 0x75, 0x67, 0x8b, - 0x5d, 0x62, 0xa0, 0x09, 0xd4, 0xb2, 0xbd, 0x33, 0x12, 0x4d, 0xb1, 0xa6, 0xbc, 0x06, 0xb9, 0x57, - 0xf7, 0xf6, 0xd3, 0x71, 0xfc, 0x39, 0x11, 0x89, 0x79, 0xc6, 0x3e, 0x65, 0x99, 0xa2, 0x9b, 0xd4, - 0x00, 0x5d, 0xbb, 0xd0, 0x42, 0x7d, 0xd8, 0x3c, 0xe6, 0x73, 0x29, 0x08, 0x95, 0x23, 0x26, 0x09, - 0xae, 0xb7, 0x2b, 0xea, 0x9c, 0xb2, 0x6b, 0x57, 0x06, 0xec, 0x0d, 0x1a, 0x7a, 0x09, 0xb5, 0x53, - 0x2e, 0x98, 0xc3, 0x88, 0xc0, 0x50, 0xc5, 0x79, 0xfc, 0xd7, 0x17, 0xa5, 0x50, 0x40, 0x17, 0xf0, - 0xee, 0xc9, 0x64, 0xf4, 0x2a, 0xcc, 0x1a, 0xb3, 0x7c, 0x19, 0x31, 0x89, 0x9b, 0x4a, 0xf4, 0xe1, - 0xaf, 0xd4, 0x78, 0x50, 0x12, 0x95, 0x81, 0x9c, 0x0a, 0xcf, 0xed, 0x79, 0xbc, 0xeb, 0x28, 0x9e, - 0xb9, 0xa2, 0xdb, 0xdb, 0xfb, 0x83, 0xea, 0xe7, 0x2f, 0xc6, 0xce, 0xe1, 0x15, 0xd8, 0xfc, 0x3c, - 0x74, 0x51, 0xaa, 0x71, 0x75, 0xc9, 0xfb, 0xff, 0x54, 0x63, 0xa9, 0xc1, 0x37, 0xb0, 0x99, 0x49, - 0xbb, 0x44, 0x12, 0x25, 0xbb, 0xfb, 0x3f, 0xb2, 0x1b, 0x52, 0xd9, 0x53, 0x58, 0xcf, 0xea, 0x29, - 0xd4, 0xed, 0x62, 0xb6, 0x9e, 0x2f, 0x96, 0x3a, 0xf8, 0xb6, 0xd4, 0xc1, 0xd5, 0x52, 0x07, 0x3f, - 0x97, 0x3a, 0xf8, 0x7a, 0xad, 0x83, 0xc5, 0xb5, 0x0e, 0xde, 0xde, 0xbf, 0xdd, 0x92, 0xd0, 0xc0, - 0xd9, 0x57, 0xaf, 0xff, 0xe9, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x85, 0x4b, 0x79, 0x5e, - 0x04, 0x00, 0x00, + 0x18, 0xed, 0x35, 0x69, 0xe3, 0x5c, 0x22, 0x54, 0x6e, 0x3a, 0x65, 0x70, 0x4c, 0xa7, 0x08, 0x35, + 0x0e, 0x02, 0xb2, 0x84, 0x29, 0xae, 0xa8, 0x2a, 0x41, 0xa3, 0xe2, 0x4a, 0x45, 0xb0, 0x9d, 0xcf, + 0x1f, 0x89, 0xa5, 0xd8, 0x67, 0xce, 0x67, 0xc0, 0x3f, 0x81, 0x7f, 0xc0, 0xc8, 0x4f, 0x61, 0xcc, + 0xc8, 0x58, 0x31, 0x44, 0x28, 0xdd, 0xfa, 0x2b, 0x90, 0x2f, 0x8e, 0x71, 0x3a, 0x54, 0x82, 0x6e, + 0x79, 0x79, 0xef, 0x7b, 0xef, 0xdd, 0xdd, 0x67, 0xdc, 0x64, 0x3c, 0xb4, 0x63, 0x29, 0x94, 0x20, + 0x35, 0xc6, 0xc3, 0x4e, 0x7f, 0x1a, 0xa8, 0x59, 0xea, 0xd9, 0x5c, 0x84, 0x83, 0xa9, 0x98, 0x8a, + 0x81, 0xe6, 0xbc, 0xf4, 0x83, 0x46, 0x1a, 0xe8, 0x5f, 0xeb, 0x99, 0xce, 0x41, 0x0c, 0x32, 0x0c, + 0x92, 0x24, 0x10, 0x51, 0xf1, 0x4f, 0x9b, 0xcb, 0x2c, 0x56, 0x05, 0x7f, 0xf8, 0x75, 0x0f, 0x37, + 0xc6, 0x9c, 0x8b, 0x34, 0x52, 0x64, 0x82, 0x1b, 0x63, 0xdf, 0x97, 0x90, 0x24, 0x14, 0x59, 0xa8, + 0xd7, 0x76, 0x9e, 0x2f, 0x96, 0xdd, 0x9d, 0x5f, 0xcb, 0xee, 0x51, 0x25, 0x73, 0x96, 0xc5, 0x20, + 0xe7, 0xe0, 0x4f, 0x41, 0x0e, 0xbc, 0x54, 0x4a, 0xf1, 0x79, 0x50, 0x18, 0x16, 0xb3, 0xee, 0xc6, + 0x84, 0x0c, 0x71, 0xf3, 0x3c, 0xf5, 0xe6, 0x01, 0x7f, 0x05, 0x19, 0xdd, 0xb5, 0x50, 0xaf, 0xf5, + 0xf4, 0xa1, 0x5d, 0x88, 0x4b, 0xc2, 0xa9, 0xe7, 0x21, 0xee, 0x5f, 0x25, 0xe9, 0x60, 0xe3, 0x02, + 0x3e, 0xa6, 0x10, 0x71, 0xa0, 0x35, 0x0b, 0xf5, 0xea, 0x6e, 0x89, 0x09, 0xc5, 0x0d, 0x87, 0xcd, + 0x59, 0x4e, 0xd5, 0x35, 0xb5, 0x81, 0xe4, 0x31, 0x6e, 0xbc, 0xbc, 0x3c, 0x3b, 0x16, 0x3e, 0xd0, + 0x3d, 0x5d, 0xfe, 0xa0, 0x28, 0x6f, 0x38, 0x99, 0x02, 0x2e, 0x7c, 0x70, 0x37, 0x02, 0x72, 0x82, + 0x5b, 0xe7, 0xe5, 0xb5, 0x24, 0x74, 0x5f, 0x57, 0x33, 0xed, 0xca, 0x55, 0x15, 0x57, 0x52, 0x51, + 0x15, 0x3d, 0xab, 0x83, 0x64, 0x84, 0x8d, 0xb7, 0xe3, 0x8b, 0x75, 0x68, 0x43, 0x87, 0x9a, 0xb7, + 0x43, 0x6f, 0x96, 0x5d, 0x7c, 0x24, 0xc2, 0x40, 0x41, 0x18, 0xab, 0xcc, 0x2d, 0xf5, 0xc4, 0xc6, + 0x78, 0xc2, 0x54, 0xf0, 0x09, 0x26, 0x2c, 0x04, 0xda, 0xb2, 0x50, 0xaf, 0xe9, 0x3c, 0xb8, 0xa5, + 0xae, 0x28, 0xc8, 0x25, 0x36, 0xf2, 0xb9, 0x53, 0x96, 0xcc, 0xa8, 0xa1, 0xb3, 0x46, 0x45, 0x56, + 0xff, 0xee, 0xd7, 0xf1, 0x82, 0x88, 0xc9, 0xcc, 0x3e, 0x85, 0x2f, 0x79, 0xa7, 0xe4, 0x66, 0xd9, + 0x45, 0x7d, 0xb7, 0xf4, 0x22, 0x43, 0xdc, 0x3e, 0x16, 0x91, 0x92, 0x8c, 0xab, 0x33, 0x50, 0x8c, + 0x36, 0xad, 0x9a, 0x7e, 0xa7, 0x7c, 0xed, 0xaa, 0x84, 0xbb, 0x25, 0x23, 0xaf, 0xb1, 0x71, 0x22, + 0x24, 0x78, 0xc0, 0x24, 0xc5, 0xba, 0xce, 0x93, 0x7f, 0x5e, 0x94, 0xd2, 0x61, 0x54, 0xff, 0xf6, + 0xbd, 0xbb, 0x73, 0x78, 0x85, 0xb6, 0xbb, 0x90, 0x37, 0x95, 0x33, 0xaf, 0x37, 0x72, 0xf8, 0x5f, + 0x67, 0xae, 0x1c, 0xf7, 0x1d, 0x6e, 0xe7, 0xd6, 0x3e, 0x53, 0x4c, 0xdb, 0xee, 0xde, 0xc7, 0x76, + 0xcb, 0x2a, 0xdf, 0xdb, 0x0d, 0xd6, 0x7b, 0xdb, 0x74, 0x4b, 0xec, 0xbc, 0x58, 0xac, 0x4c, 0xf4, + 0x73, 0x65, 0xa2, 0xab, 0x95, 0x89, 0x7e, 0xaf, 0x4c, 0xf4, 0xe3, 0xda, 0x44, 0x8b, 0x6b, 0x13, + 0xbd, 0x7f, 0x74, 0x77, 0x24, 0xe3, 0xa1, 0xb7, 0xaf, 0x3f, 0xd5, 0x67, 0x7f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xa2, 0x2c, 0x48, 0xa4, 0x0b, 0x04, 0x00, 0x00, } func (m *Account) Marshal() (dAtA []byte, err error) { @@ -266,13 +253,6 @@ func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.EVMOpcodeBitset) > 0 { - i -= len(m.EVMOpcodeBitset) - copy(dAtA[i:], m.EVMOpcodeBitset) - i = encodeVarintAcm(dAtA, i, uint64(len(m.EVMOpcodeBitset))) - i-- - dAtA[i] = 0x62 - } if len(m.NativeName) > 0 { i -= len(m.NativeName) copy(dAtA[i:], m.NativeName) @@ -482,10 +462,6 @@ func (m *Account) Size() (n int) { if l > 0 { n += 1 + l + sovAcm(uint64(l)) } - l = len(m.EVMOpcodeBitset) - if l > 0 { - n += 1 + l + sovAcm(uint64(l)) - } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -884,40 +860,6 @@ func (m *Account) Unmarshal(dAtA []byte) error { } m.NativeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EVMOpcodeBitset", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAcm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAcm - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAcm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EVMOpcodeBitset = append(m.EVMOpcodeBitset[:0], dAtA[iNdEx:postIndex]...) - if m.EVMOpcodeBitset == nil { - m.EVMOpcodeBitset = []byte{} - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAcm(dAtA[iNdEx:]) diff --git a/dump/load.go b/dump/load.go index 3df990d0f..531e01849 100644 --- a/dump/load.go +++ b/dump/load.go @@ -9,7 +9,6 @@ import ( "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/execution/native" "github.com/hyperledger/burrow/execution/state" "github.com/hyperledger/burrow/txs/payload" ) @@ -41,9 +40,6 @@ func Load(source Source, st *state.State) error { m.MetadataHash = metahash.Bytes() m.Metadata = "" } - if row.Account.EVMOpcodeBitset.Len() != uint(len(row.Account.EVMCode)) { - row.Account.EVMOpcodeBitset = native.EVMOpcodeBitset(row.Account.EVMCode) - } err := s.UpdateAccount(row.Account) if err != nil { return err diff --git a/dump/mock.go b/dump/mock.go index c3bf6888b..06547bbc5 100644 --- a/dump/mock.go +++ b/dump/mock.go @@ -11,7 +11,6 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/names" - "github.com/hyperledger/burrow/execution/native" "github.com/hyperledger/burrow/genesis" ) @@ -54,7 +53,6 @@ func (m *MockSource) Recv() (*Dump, error) { if m.Accounts%2 > 0 { row.Account.EVMCode = make([]byte, m.rand.Intn(10000)) m.rand.Read(row.Account.EVMCode) - row.Account.EVMOpcodeBitset = native.EVMOpcodeBitset(row.Account.EVMCode) } else { row.Account.PublicKey = crypto.PublicKey{} } diff --git a/execution/evm/code.go b/execution/evm/code.go new file mode 100644 index 000000000..3fa95f834 --- /dev/null +++ b/execution/evm/code.go @@ -0,0 +1,66 @@ +package evm + +import ( + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/execution/evm/asm" + "github.com/tmthrgd/go-bitset" +) + +type Code struct { + Bytecode acm.Bytecode + OpcodeBitset bitset.Bitset +} + +// Build a Code object that includes analysis of which symbols are opcodes versus push data +func NewCode(code []byte) *Code { + return &Code{ + Bytecode: code, + OpcodeBitset: opcodeBitset(code), + } +} + +func (code *Code) Length() uint64 { + if code == nil { + return 0 + } + return uint64(len(code.Bytecode)) +} + +func (code *Code) GetBytecode() acm.Bytecode { + if code == nil { + return nil + } + return code.Bytecode +} + +func (code *Code) IsOpcode(indexOfSymbolInCode uint64) bool { + if code == nil || indexOfSymbolInCode >= uint64(code.OpcodeBitset.Len()) { + return false + } + return code.OpcodeBitset.IsSet(uint(indexOfSymbolInCode)) +} + +func (code *Code) IsPushData(indexOfSymbolInCode uint64) bool { + return !code.IsOpcode(indexOfSymbolInCode) +} + +func (code *Code) GetSymbol(n uint64) asm.OpCode { + if uint64(code.Length()) <= n { + return asm.OpCode(0) // stop + } else { + return asm.OpCode(code.Bytecode[n]) + } +} + +// If code[i] is an opcode (rather than PUSH data) then bitset.IsSet(i) will be true +func opcodeBitset(code []byte) bitset.Bitset { + bs := bitset.New(uint(len(code))) + for i := 0; i < len(code); i++ { + bs.Set(uint(i)) + symbol := asm.OpCode(code[i]) + if symbol >= asm.PUSH1 && symbol <= asm.PUSH32 { + i += int(symbol - asm.PUSH1 + 1) + } + } + return bs +} diff --git a/execution/evm/code_test.go b/execution/evm/code_test.go new file mode 100644 index 000000000..69f9ce3c5 --- /dev/null +++ b/execution/evm/code_test.go @@ -0,0 +1,94 @@ +package evm + +import ( + "fmt" + "reflect" + "testing" + + "github.com/hyperledger/burrow/execution/evm/asm" + "github.com/hyperledger/burrow/execution/evm/asm/bc" + "github.com/stretchr/testify/assert" + "github.com/tmthrgd/go-bitset" +) + +func TestOpcodeBitset(t *testing.T) { + tests := []struct { + name string + code []byte + bitset bitset.Bitset + }{ + { + name: "Only one real JUMPDEST", + code: bc.MustSplice(asm.PUSH2, 1, asm.JUMPDEST, asm.ADD, asm.JUMPDEST), + bitset: mkBitset("10011"), + }, + { + name: "Two JUMPDESTs", + code: bc.MustSplice(asm.PUSH1, 1, asm.JUMPDEST, asm.ADD, asm.JUMPDEST), + bitset: mkBitset("10111"), + }, + { + name: "One PUSH", + code: bc.MustSplice(asm.PUSH4, asm.JUMPDEST, asm.ADD, asm.JUMPDEST, asm.PUSH32, asm.BALANCE), + bitset: mkBitset("100001"), + }, + { + name: "Two PUSHes", + code: bc.MustSplice(asm.PUSH3, asm.JUMPDEST, asm.ADD, asm.JUMPDEST, asm.PUSH32, asm.BALANCE), + bitset: mkBitset("100010"), + }, + { + name: "Three PUSHes", + code: bc.MustSplice(asm.PUSH3, asm.JUMPDEST, asm.ADD, asm.PUSH2, asm.PUSH32, asm.BALANCE), + bitset: mkBitset("100010"), + }, + { + name: "No PUSH", + code: bc.MustSplice(asm.JUMPDEST, asm.ADD, asm.BALANCE), + bitset: mkBitset("111"), + }, + { + name: "End PUSH", + code: bc.MustSplice(asm.JUMPDEST, asm.ADD, asm.PUSH6), + bitset: mkBitset("111"), + }, + { + name: "Middle PUSH", + code: bc.MustSplice(asm.JUMPDEST, asm.PUSH2, asm.PUSH1, asm.PUSH2, asm.BLOCKHASH), + bitset: mkBitset("11001"), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := opcodeBitset(tt.code); !reflect.DeepEqual(got, tt.bitset) { + t.Errorf("opcodeBitset() = %v, want %v", got, tt.bitset) + } + }) + } +} + +func TestCode_IsOpcodeAt(t *testing.T) { + code := NewCode(bc.MustSplice(asm.PUSH2, 2, 3)) + + assert.True(t, code.IsOpcode(0)) + assert.False(t, code.IsOpcode(1)) + assert.False(t, code.IsOpcode(2)) + assert.False(t, code.IsOpcode(3)) +} + +func mkBitset(binaryString string) bitset.Bitset { + length := uint(len(binaryString)) + bs := bitset.New(length) + for i := uint(0); i < length; i++ { + switch binaryString[i] { + case '1': + bs.Set(i) + case '0': + case ' ': + i++ + default: + panic(fmt.Errorf("mkBitset() expects a string containing only 1s, 0s, and spaces")) + } + } + return bs +} diff --git a/execution/evm/contract.go b/execution/evm/contract.go index 5a2026fa8..914b93dd5 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -25,7 +25,7 @@ import ( type Contract struct { *EVM - code acm.Bytecode + *Code } func (c *Contract) Call(state engine.State, params engine.CallParams) ([]byte, error) { @@ -35,14 +35,14 @@ func (c *Contract) Call(state engine.State, params engine.CallParams) ([]byte, e // Executes the EVM code passed in the appropriate context func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, error) { c.debugf("(%d) (%s) %s (code=%d) gas: %v (d) %X\n", - st.CallFrame.CallStackDepth(), params.Caller, params.Callee, len(c.code), *params.Gas, params.Input) + st.CallFrame.CallStackDepth(), params.Caller, params.Callee, c.Length(), *params.Gas, params.Input) - if len(c.code) == 0 { + if c.Length() == 0 { return nil, nil } if c.options.DumpTokens { - dumpTokens(c.options.Nonce, params.Caller, params.Callee, c.code) + dumpTokens(c.options.Nonce, params.Caller, params.Callee, c.GetBytecode()) } // Program counter - the index into code that tracks current instruction @@ -64,7 +64,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e return nil, maybe.Error() } - var op = codeGetOp(c.code, pc) + var op = c.GetSymbol(pc) c.debugf("(pc) %-3d (op) %-14s (st) %-4d (gas) %d", pc, op.String(), stack.Len(), *params.Gas) // Use BaseOp gas. maybe.PushError(useGasNegative(params.Gas, native.GasBaseOp)) @@ -371,7 +371,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e c.debugf(" => [%v, %v, %v] %X\n", memOff, inputOff, length, data) case CODESIZE: // 0x38 - l := uint64(len(c.code)) + l := uint64(c.Length()) stack.Push64(l) c.debugf(" => %d\n", l) @@ -379,7 +379,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e memOff := stack.PopBigInt() codeOff := stack.Pop64() length := stack.Pop64() - data := maybe.Bytes(subslice(c.code, codeOff, length)) + data := maybe.Bytes(subslice(c.GetBytecode(), codeOff, length)) memory.Write(memOff, data) c.debugf(" => [%v, %v, %v] %X\n", memOff, codeOff, length, data) @@ -521,14 +521,14 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case JUMP: // 0x56 to := stack.Pop64() - maybe.PushError(c.jump(c.code, to, &pc)) + maybe.PushError(c.jump(to, &pc)) continue case JUMPI: // 0x57 pos := stack.Pop64() cond := stack.Pop() if !cond.IsZero() { - maybe.PushError(c.jump(c.code, pos, &pc)) + maybe.PushError(c.jump(pos, &pc)) continue } else { c.debugf(" ~> false\n") @@ -555,7 +555,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: a := uint64(op - PUSH1 + 1) - codeSegment := maybe.Bytes(subslice(c.code, pc+1, a)) + codeSegment := maybe.Bytes(subslice(c.GetBytecode(), pc+1, a)) res := LeftPadWord256(codeSegment) stack.Push(res) pc += a @@ -851,9 +851,9 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e return nil, maybe.Error() } -func (c *Contract) jump(code []byte, to uint64, pc *uint64) error { - dest := codeGetOp(code, to) - if dest != JUMPDEST { +func (c *Contract) jump(to uint64, pc *uint64) error { + dest := c.GetSymbol(to) + if dest != JUMPDEST || c.IsPushData(to) { c.debugf(" ~> %v invalid jump dest %v\n", to, dest) return errors.Codes.InvalidJumpDest } diff --git a/execution/evm/evm.go b/execution/evm/evm.go index 17a2afd72..c8b28d4b9 100644 --- a/execution/evm/evm.go +++ b/execution/evm/evm.go @@ -121,7 +121,7 @@ func (vm *EVM) SetExternals(externals engine.Dispatcher) { func (vm *EVM) Contract(code []byte) *Contract { return &Contract{ EVM: vm, - code: code, + Code: NewCode(code), } } diff --git a/execution/native/account.go b/execution/native/account.go index c9d369f4a..ac57f4b6a 100644 --- a/execution/native/account.go +++ b/execution/native/account.go @@ -8,9 +8,7 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/deploy/compile" "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/execution/evm/asm" "github.com/hyperledger/burrow/txs/payload" - bitset "github.com/tmthrgd/go-bitset" "golang.org/x/crypto/sha3" ) @@ -50,7 +48,6 @@ func initEVMCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypt } acc.EVMCode = code - acc.EVMOpcodeBitset = EVMOpcodeBitset(code) // keccak256 hash of a contract's code hash := sha3.NewLegacyKeccak256() @@ -118,19 +115,6 @@ func codehashPermitted(codehash []byte, metamap []*acm.ContractMeta) bool { return false } -// If code[i] is an opcode (rather than PUSH data) then bitset.IsSet(i) will be true -func EVMOpcodeBitset(code []byte) bitset.Bitset { - bs := bitset.New(uint(len(code))) - for i := 0; i < len(code); i++ { - bs.Set(uint(i)) - symbol := asm.OpCode(code[i]) - if symbol >= asm.PUSH1 && symbol <= asm.PUSH32 { - i += int(symbol - asm.PUSH1 + 1) - } - } - return bs -} - func InitWASMCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) error { acc, err := mustAccount(st, address) if err != nil { diff --git a/execution/native/account_test.go b/execution/native/account_test.go index 243334a82..1510e4519 100644 --- a/execution/native/account_test.go +++ b/execution/native/account_test.go @@ -1,8 +1,6 @@ package native import ( - "fmt" - "reflect" "testing" "github.com/hyperledger/burrow/acm" @@ -10,11 +8,8 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/execution/evm/asm" - "github.com/hyperledger/burrow/execution/evm/asm/bc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tmthrgd/go-bitset" ) func TestState_CreateAccount(t *testing.T) { @@ -84,96 +79,6 @@ func TestState_NewCache(t *testing.T) { require.Equal(t, errors.Codes.IllegalWrite, errors.GetCode(err)) } -func TestOpcodeBitset(t *testing.T) { - tests := []struct { - name string - code []byte - bitset bitset.Bitset - }{ - { - name: "Only one real JUMPDEST", - code: bc.MustSplice(asm.PUSH2, 1, asm.JUMPDEST, asm.ADD, asm.JUMPDEST), - bitset: mkBitset("10011"), - }, - { - name: "Two JUMPDESTs", - code: bc.MustSplice(asm.PUSH1, 1, asm.JUMPDEST, asm.ADD, asm.JUMPDEST), - bitset: mkBitset("10111"), - }, - { - name: "One PUSH", - code: bc.MustSplice(asm.PUSH4, asm.JUMPDEST, asm.ADD, asm.JUMPDEST, asm.PUSH32, asm.BALANCE), - bitset: mkBitset("100001"), - }, - { - name: "Two PUSHes", - code: bc.MustSplice(asm.PUSH3, asm.JUMPDEST, asm.ADD, asm.JUMPDEST, asm.PUSH32, asm.BALANCE), - bitset: mkBitset("100010"), - }, - { - name: "Three PUSHes", - code: bc.MustSplice(asm.PUSH3, asm.JUMPDEST, asm.ADD, asm.PUSH2, asm.PUSH32, asm.BALANCE), - bitset: mkBitset("100010"), - }, - { - name: "No PUSH", - code: bc.MustSplice(asm.JUMPDEST, asm.ADD, asm.BALANCE), - bitset: mkBitset("111"), - }, - { - name: "End PUSH", - code: bc.MustSplice(asm.JUMPDEST, asm.ADD, asm.PUSH6), - bitset: mkBitset("111"), - }, - { - name: "Middle PUSH", - code: bc.MustSplice(asm.JUMPDEST, asm.PUSH2, asm.PUSH1, asm.PUSH2, asm.BLOCKHASH), - bitset: mkBitset("11001"), - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := EVMOpcodeBitset(tt.code); !reflect.DeepEqual(got, tt.bitset) { - t.Errorf("EVMOpcodeBitset() = %v, want %v", got, tt.bitset) - } - }) - } -} - -func TestAccount_IsOpcodeAt(t *testing.T) { - st := acmstate.NewMemoryState() - address := AddressFromName("scrambled snake") - err := CreateAccount(st, address) - require.NoError(t, err) - code := bc.MustSplice(asm.PUSH2, 2, 3) - err = InitEVMCode(st, address, code) - require.NoError(t, err) - - acc, err := st.GetAccount(address) - require.NoError(t, err) - assert.True(t, acc.IsOpcodeAt(0)) - assert.False(t, acc.IsOpcodeAt(1)) - assert.False(t, acc.IsOpcodeAt(2)) - assert.False(t, acc.IsOpcodeAt(3)) -} - -func mkBitset(binaryString string) bitset.Bitset { - length := uint(len(binaryString)) - bs := bitset.New(length) - for i := uint(0); i < length; i++ { - switch binaryString[i] { - case '1': - bs.Set(i) - case '0': - case ' ': - i++ - default: - panic(fmt.Errorf("mkBitset() expects a string containing only 1s, 0s, and spaces")) - } - } - return bs -} - func addToBalance(t testing.TB, st acmstate.ReaderWriter, address crypto.Address, amt uint64) { err := UpdateAccount(st, address, func(account *acm.Account) error { return account.AddToBalance(amt) diff --git a/js/proto/acm_pb.d.ts b/js/proto/acm_pb.d.ts index 7560162f1..c5dff84aa 100644 --- a/js/proto/acm_pb.d.ts +++ b/js/proto/acm_pb.d.ts @@ -56,11 +56,6 @@ export class Account extends jspb.Message { getForebear_asB64(): string; setForebear(value: Uint8Array | string): void; - getEvmopcodebitset(): Uint8Array | string; - getEvmopcodebitset_asU8(): Uint8Array; - getEvmopcodebitset_asB64(): string; - setEvmopcodebitset(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Account.AsObject; static toObject(includeInstance: boolean, msg: Account): Account.AsObject; @@ -84,7 +79,6 @@ export namespace Account { codehash: Uint8Array | string, contractmetaList: Array, forebear: Uint8Array | string, - evmopcodebitset: Uint8Array | string, } } diff --git a/js/proto/acm_pb.js b/js/proto/acm_pb.js index 97aad48fb..ce4b1d83f 100644 --- a/js/proto/acm_pb.js +++ b/js/proto/acm_pb.js @@ -112,8 +112,7 @@ proto.acm.Account.toObject = function(includeInstance, msg) { codehash: msg.getCodehash_asB64(), contractmetaList: jspb.Message.toObjectList(msg.getContractmetaList(), proto.acm.ContractMeta.toObject, includeInstance), - forebear: msg.getForebear_asB64(), - evmopcodebitset: msg.getEvmopcodebitset_asB64() + forebear: msg.getForebear_asB64() }; if (includeInstance) { @@ -197,10 +196,6 @@ proto.acm.Account.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setForebear(value); break; - case 12: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEvmopcodebitset(value); - break; default: reader.skipField(); break; @@ -310,13 +305,6 @@ proto.acm.Account.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getEvmopcodebitset_asU8(); - if (f.length > 0) { - writer.writeBytes( - 12, - f - ); - } }; @@ -696,48 +684,6 @@ proto.acm.Account.prototype.setForebear = function(value) { }; -/** - * optional bytes EVMOpcodeBitset = 12; - * @return {!(string|Uint8Array)} - */ -proto.acm.Account.prototype.getEvmopcodebitset = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * optional bytes EVMOpcodeBitset = 12; - * This is a type-conversion wrapper around `getEvmopcodebitset()` - * @return {string} - */ -proto.acm.Account.prototype.getEvmopcodebitset_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEvmopcodebitset())); -}; - - -/** - * optional bytes EVMOpcodeBitset = 12; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEvmopcodebitset()` - * @return {!Uint8Array} - */ -proto.acm.Account.prototype.getEvmopcodebitset_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEvmopcodebitset())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.acm.Account} returns this - */ -proto.acm.Account.prototype.setEvmopcodebitset = function(value) { - return jspb.Message.setProto3BytesField(this, 12, value); -}; - - diff --git a/protobuf/acm.proto b/protobuf/acm.proto index 872b4c310..cd3eac389 100644 --- a/protobuf/acm.proto +++ b/protobuf/acm.proto @@ -42,8 +42,6 @@ message Account { // (from Solidity/EVM), they point to the original deployed account where the metadata is stored. // This original account is called the forebear. bytes Forebear = 10 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"]; - // A bitset of all the symbols in EVMCode that are opcodes (i.e. actual code not PUSH data) - bytes EVMOpcodeBitset = 12 [(gogoproto.casttype) = "github.com/tmthrgd/go-bitset.Bitset"]; } message ContractMeta { From 71a2464933e60a79bf6172bfd1b5073b49220855 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 16 Apr 2020 10:28:53 +0100 Subject: [PATCH 100/185] Use STOP constant in GetSymbol Signed-off-by: Silas Davis --- execution/evm/code.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/execution/evm/code.go b/execution/evm/code.go index 3fa95f834..90ab6d8c6 100644 --- a/execution/evm/code.go +++ b/execution/evm/code.go @@ -45,8 +45,8 @@ func (code *Code) IsPushData(indexOfSymbolInCode uint64) bool { } func (code *Code) GetSymbol(n uint64) asm.OpCode { - if uint64(code.Length()) <= n { - return asm.OpCode(0) // stop + if code.Length() <= n { + return asm.STOP } else { return asm.OpCode(code.Bytecode[n]) } From 702caef1c1a3bf52d939a1ab6121da44715009c2 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Mon, 9 Mar 2020 10:54:14 +0000 Subject: [PATCH 101/185] execution context tests Signed-off-by: Gregory Hill --- execution/contexts/name_context_test.go | 111 ++++++++++++++ .../contexts/permissions_context_test.go | 139 ++++++++++++++++++ execution/contexts/send_context_test.go | 125 ++++++++++++++++ 3 files changed, 375 insertions(+) create mode 100644 execution/contexts/name_context_test.go create mode 100644 execution/contexts/permissions_context_test.go create mode 100644 execution/contexts/send_context_test.go diff --git a/execution/contexts/name_context_test.go b/execution/contexts/name_context_test.go new file mode 100644 index 000000000..88d84f143 --- /dev/null +++ b/execution/contexts/name_context_test.go @@ -0,0 +1,111 @@ +package contexts + +import ( + "strings" + "testing" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/bcm" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/execution/names" + "github.com/hyperledger/burrow/execution/state" + "github.com/hyperledger/burrow/genesis" + "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/txs" + "github.com/hyperledger/burrow/txs/payload" + "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" +) + +func TestNameContext(t *testing.T) { + accountState := acmstate.NewMemoryState() + + privKey := newPrivKey(t) + account := newAccountFromPrivKey(privKey) + + db := dbm.NewMemDB() + genesisDoc, _, _ := genesis.NewDeterministicGenesis(3450976).GenesisDoc(23, 10) + blockchain := bcm.NewBlockchain(db, genesisDoc) + state := state.NewState(db) + + ctx := &NameContext{ + State: accountState, + Logger: logging.NewNoopLogger(), + Blockchain: blockchain, + NameReg: names.NewCache(state), + } + + callTx := &payload.CallTx{} + err := ctx.Execute(execFromTx(callTx), callTx) + require.Error(t, err, "should not continue with incorrect payload") + + nameTx := &payload.NameTx{ + Input: &payload.TxInput{ + Address: account.Address, + }, + } + + err = ctx.Execute(execFromTx(nameTx), nameTx) + require.Error(t, err, "account should not exist") + + accountState.Accounts[account.Address] = account + nameTx.Name = "foobar" + + err = ctx.Execute(execFromTx(nameTx), nameTx) + require.Error(t, err, "insufficient amount") + + costPerBlock := names.NameCostPerBlock(names.NameBaseCost(ctx.tx.Name, ctx.tx.Data)) + nameTx.Input.Amount = names.MinNameRegistrationPeriod * costPerBlock + + err = ctx.Execute(execFromTx(nameTx), nameTx) + require.NoError(t, err, "should successfully set namereg") +} + +func TestValidateStrings(t *testing.T) { + nameTx := &payload.NameTx{} + err := validateStrings(nameTx) + require.Error(t, err, "should fail on empty name") + + nameTx.Name = strings.Repeat("A", names.MaxNameLength+1) + err = validateStrings(nameTx) + require.Error(t, err, "should fail because name is too long") + + nameTx.Name = "foo" + + nameTx.Data = strings.Repeat("A", names.MaxDataLength+1) + err = validateStrings(nameTx) + require.Error(t, err, "should fail because data is too long") + + nameTx.Data = "bar" + err = validateStrings(nameTx) + require.NoError(t, err, "name reg entry should be valid") +} + +func newPrivKey(t *testing.T) crypto.PrivateKey { + privKey, err := crypto.GeneratePrivateKey(nil, crypto.CurveTypeEd25519) + require.NoError(t, err) + return privKey +} + +func newAccountFromPrivKey(privKey crypto.PrivateKey) *acm.Account { + pubKey := privKey.GetPublicKey() + address := pubKey.GetAddress() + + return &acm.Account{ + Address: address, + PublicKey: pubKey, + Balance: 1337, + } +} + +func execFromTx(payl payload.Payload) *exec.TxExecution { + return &exec.TxExecution{ + Envelope: &txs.Envelope{ + Tx: &txs.Tx{ + Payload: payl, + }, + }, + } +} diff --git a/execution/contexts/permissions_context_test.go b/execution/contexts/permissions_context_test.go new file mode 100644 index 000000000..b6f128fdc --- /dev/null +++ b/execution/contexts/permissions_context_test.go @@ -0,0 +1,139 @@ +package contexts + +import ( + "testing" + + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/permission" + "github.com/hyperledger/burrow/txs/payload" + "github.com/stretchr/testify/require" +) + +func TestPermissionsContext(t *testing.T) { + accountState := acmstate.NewMemoryState() + + originPrivKey := newPrivKey(t) + originAccount := newAccountFromPrivKey(originPrivKey) + originAccount.Permissions.Base = permission.AllAccountPermissions.GetBase() + + targetPrivKey := newPrivKey(t) + targetAccount := newAccountFromPrivKey(targetPrivKey) + + ctx := &PermissionsContext{ + State: accountState, + Logger: logging.NewNoopLogger(), + } + + callTx := &payload.CallTx{} + err := ctx.Execute(execFromTx(callTx), callTx) + require.Error(t, err, "should not continue with incorrect payload") + + permsTx := &payload.PermsTx{ + Input: &payload.TxInput{ + Address: originAccount.Address, + }, + } + + err = ctx.Execute(execFromTx(permsTx), permsTx) + require.Error(t, err, "account should not exist") + + accountState.Accounts[originAccount.Address] = originAccount + accountState.Accounts[targetAccount.Address] = targetAccount + + value := true + tests := []struct { + args permission.PermArgs + exp func(t *testing.T, err error) + }{ + { + args: permission.PermArgs{ + Action: 1337, + Target: &targetAccount.Address, + Permission: ptrPermFlag(permission.SetBase), + Value: &value, + }, + exp: errCallback(func(t *testing.T, err error) { + require.Error(t, err, "should error with unknown action") + }), + }, + { + args: permission.PermArgs{ + Action: permission.SetBase, + Target: &targetAccount.Address, + Permission: ptrPermFlag(permission.SetBase), + Value: &value, + }, + exp: errCallback(func(t *testing.T, err error) { + require.NoError(t, err) + }), + }, + { + args: permission.PermArgs{ + Action: permission.UnsetBase, + Target: &targetAccount.Address, + Permission: ptrPermFlag(permission.UnsetBase), + Value: &value, + }, + exp: errCallback(func(t *testing.T, err error) { + require.NoError(t, err) + }), + }, + { + args: permission.PermArgs{ + Action: permission.AddRole, + Target: &targetAccount.Address, + Permission: ptrPermFlag(permission.AddRole), + Value: &value, + Role: ptrRoleString(permission.BondString), + }, + exp: errCallback(func(t *testing.T, err error) { + require.NoError(t, err) + }), + }, + { + args: permission.PermArgs{ + Action: permission.RemoveRole, + Target: &targetAccount.Address, + Permission: ptrPermFlag(permission.RemoveRole), + Value: &value, + Role: ptrRoleString(permission.BondString), + }, + exp: errCallback(func(t *testing.T, err error) { + require.NoError(t, err) + }), + }, + { + args: permission.PermArgs{ + Action: permission.RemoveRole, + Target: &targetAccount.Address, + Permission: ptrPermFlag(permission.RemoveRole), + Value: &value, + Role: ptrRoleString(permission.BondString), + }, + exp: errCallback(func(t *testing.T, err error) { + require.Error(t, err, "can't remove role that isn't set") + }), + }, + } + + for _, tt := range tests { + permsTx.PermArgs = tt.args + err = ctx.Execute(execFromTx(permsTx), permsTx) + tt.exp(t, err) + } +} + +func ptrPermFlag(flag permission.PermFlag) *permission.PermFlag { + return &flag +} + +func ptrRoleString(role string) *string { + return &role +} + +func errCallback(condition func(t *testing.T, err error)) func(t *testing.T, err error) { + return func(t *testing.T, err error) { + condition(t, err) + } +} diff --git a/execution/contexts/send_context_test.go b/execution/contexts/send_context_test.go new file mode 100644 index 000000000..9cfa12636 --- /dev/null +++ b/execution/contexts/send_context_test.go @@ -0,0 +1,125 @@ +package contexts + +import ( + "testing" + + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/txs/payload" + "github.com/stretchr/testify/require" +) + +func TestSendContext(t *testing.T) { + accountState := acmstate.NewMemoryState() + + originPrivKey := newPrivKey(t) + originAccount := newAccountFromPrivKey(originPrivKey) + + targetPrivKey := newPrivKey(t) + targetAccount := newAccountFromPrivKey(targetPrivKey) + + ctx := &SendContext{ + State: accountState, + Logger: logging.NewNoopLogger(), + } + + callTx := &payload.CallTx{} + err := ctx.Execute(execFromTx(callTx), callTx) + require.Error(t, err, "should not continue with incorrect payload") + + accountState.Accounts[originAccount.Address] = originAccount + accountState.Accounts[targetAccount.Address] = targetAccount + + tests := []struct { + tx *payload.SendTx + exp func(t *testing.T, err error) + }{ + { + tx: &payload.SendTx{ + Inputs: []*payload.TxInput{ + &payload.TxInput{ + Address: originAccount.Address, + }, + }, + }, + exp: errCallback(func(t *testing.T, err error) { + require.Error(t, err, "should not allow zero payment") + }), + }, + { + tx: &payload.SendTx{ + Inputs: []*payload.TxInput{ + &payload.TxInput{ + Address: originAccount.Address, + Amount: 100, + }, + }, + }, + exp: errCallback(func(t *testing.T, err error) { + require.Error(t, err, "should not allow overpayment (i.e. inputs > outputs)") + }), + }, + { + tx: &payload.SendTx{ + Inputs: []*payload.TxInput{ + &payload.TxInput{ + Address: originAccount.Address, + Amount: 100, + }, + }, + Outputs: []*payload.TxOutput{ + &payload.TxOutput{ + Address: originAccount.Address, + Amount: 100, + }, + }, + }, + exp: errCallback(func(t *testing.T, err error) { + require.Error(t, err, "should not allow self payment") + }), + }, + { + tx: &payload.SendTx{ + Inputs: []*payload.TxInput{ + &payload.TxInput{ + Address: originAccount.Address, + Amount: 100, + }, + }, + Outputs: []*payload.TxOutput{ + &payload.TxOutput{ + Address: targetAccount.Address, + Amount: 100, + }, + }, + }, + exp: errCallback(func(t *testing.T, err error) { + require.NoError(t, err, "should allow payment") + }), + }, + { + tx: &payload.SendTx{ + Inputs: []*payload.TxInput{ + &payload.TxInput{ + Address: originAccount.Address, + Amount: 10000, + }, + }, + Outputs: []*payload.TxOutput{ + &payload.TxOutput{ + Address: targetAccount.Address, + Amount: 10000, + }, + }, + }, + exp: errCallback(func(t *testing.T, err error) { + require.Error(t, err, "should not allow send with insufficient funds") + }), + }, + } + + for _, tt := range tests { + err = ctx.Execute(execFromTx(tt.tx), tt.tx) + tt.exp(t, err) + } +} From f8aa2d54aa156dc46f034c3115dd0fceb911e5fa Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Sat, 15 Feb 2020 13:43:26 +0000 Subject: [PATCH 102/185] Fix ABI Address packing issue and error swallowing - Burrow deploy was swallowing errors in multiple playbook runs - 0.29.8 ABI fix accidentally removed support for hex string addresses - corrected! - Make console logging look more reasonable - Fix ability to call fallback function Signed-off-by: Silas Davis --- cmd/burrow/commands/deploy.go | 16 ++-- deploy/def/jobs.go | 6 ++ deploy/jobs/jobs_contracts.go | 8 +- deploy/run_deploy.go | 8 +- deploy/util/variables.go | 10 +-- docker-compose.yml | 2 + execution/evm/abi/abi_test.go | 7 ++ execution/evm/abi/primitives.go | 8 +- execution/evm/abi/spec.go | 13 +++- logging/loggers/stream_logger.go | 74 +++++++++++-------- .../app37-fallback_function/deploy.yaml | 4 +- tests/test_runner.sh | 7 -- 12 files changed, 100 insertions(+), 63 deletions(-) diff --git a/cmd/burrow/commands/deploy.go b/cmd/burrow/commands/deploy.go index fa34a6269..84ef74303 100644 --- a/cmd/burrow/commands/deploy.go +++ b/cmd/burrow/commands/deploy.go @@ -11,6 +11,7 @@ import ( "github.com/hyperledger/burrow/deploy/def" "github.com/hyperledger/burrow/deploy/proposals" "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/logging/loggers" cli "github.com/jawher/mow.cli" ) @@ -34,9 +35,6 @@ func Deploy(output Output) func(cmd *cli.Cmd) { defaultOutputOpt := cmd.StringOpt("o output", def.DefaultOutputFile, "filename for playbook output file. by default, this name will reflect the playbook passed") - playbooksOpt := cmd.StringsArg("FILE", []string{}, - "path to playbook file which deploy should run. if also using the --dir flag, give the relative path to playbooks file, which should be in the same directory") - defaultSetsOpt := cmd.StringsOpt("e set", []string{}, "default sets to use; operates the same way as the [set] jobs, only before the jobs file is ran (and after default address") @@ -75,6 +73,9 @@ func Deploy(output Output) func(cmd *cli.Cmd) { proposalList := cmd.StringOpt("list-proposals state", "", "List proposals, either all, executed, expired, or current") + playbooksArg := cmd.StringsArg("FILE", []string{}, + "path to playbook file which deploy should run. if also using the --dir flag, give the relative path to playbooks file, which should be in the same directory") + cmd.Spec = "[--chain=] [--keys=] [--mempool-signing] [--dir=] " + "[--output=] [--wasm] [--set=]... [--bin-path=] [--gas=] " + "[--jobs=] [--address=
] [--fee=] [--amount=] [--local-abi] " + @@ -115,7 +116,10 @@ func Deploy(output Output) func(cmd *cli.Cmd) { args.ProposeVerify = *proposalVerify args.ProposeVote = *proposalVote args.ProposeCreate = *proposalCreate - stderrLogger := log.NewLogfmtLogger(os.Stderr) + stderrLogger, err := loggers.NewStreamLogger(os.Stderr, loggers.TerminalFormat) + if err != nil { + output.Fatalf("Could not make logger: %v", err) + } logger := logging.NewLogger(stderrLogger) handleTerm() @@ -133,10 +137,10 @@ func Deploy(output Output) func(cmd *cli.Cmd) { output.Fatalf(err.Error()) } } else { - if len(*playbooksOpt) == 0 { + if len(*playbooksArg) == 0 { output.Fatalf("incorrect usage: missing deployment yaml file(s)") } - failures, err := pkgs.RunPlaybooks(args, *playbooksOpt, logger) + failures, err := pkgs.RunPlaybooks(args, *playbooksArg, logger) if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) diff --git a/deploy/def/jobs.go b/deploy/def/jobs.go index 6eab23576..82794ec34 100644 --- a/deploy/def/jobs.go +++ b/deploy/def/jobs.go @@ -1,6 +1,7 @@ package def import ( + "fmt" "regexp" validation "github.com/go-ozzo/ozzo-validation" @@ -405,6 +406,11 @@ type Call struct { Variables []*abi.Variable } +// TODO: maybe do for others... +func (job *Call) String() string { + return fmt.Sprintf("%#v", job) +} + func (job *Call) Validate() error { return validation.ValidateStruct(job, validation.Field(&job.Destination, validation.Required), diff --git a/deploy/jobs/jobs_contracts.go b/deploy/jobs/jobs_contracts.go index 7a57bf107..2332b8cc1 100644 --- a/deploy/jobs/jobs_contracts.go +++ b/deploy/jobs/jobs_contracts.go @@ -7,15 +7,14 @@ import ( "strings" "github.com/hyperledger/burrow/acm/acmstate" - "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/logging" - "github.com/hyperledger/burrow/crypto" compilers "github.com/hyperledger/burrow/deploy/compile" "github.com/hyperledger/burrow/deploy/def" "github.com/hyperledger/burrow/deploy/util" + "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm/abi" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/txs/payload" hex "github.com/tmthrgd/go-hex" ) @@ -431,6 +430,7 @@ func FormulateCallJob(call *def.Call, do *def.DeployArgs, deployScript *def.Play if err != nil { return nil, err } + // Use default call.Source = FirstOf(call.Source, deployScript.Account) call.Amount = FirstOf(call.Amount, do.DefaultAmount) diff --git a/deploy/run_deploy.go b/deploy/run_deploy.go index 7c9796112..82fde0ca3 100644 --- a/deploy/run_deploy.go +++ b/deploy/run_deploy.go @@ -112,16 +112,18 @@ func RunPlaybooks(args *def.DeployArgs, playbooks []string, logger *logging.Logg successes := 0 for range playbooks { + // Receive results as they come jobResult := <-resultQ results[jobResult.jobNo] = &jobResult + // Print them in order for results[printed] != nil { res := results[printed] os.Stderr.Write(res.log.Bytes()) if res.err != nil { - fmt.Fprintf(os.Stderr, "ERROR: %v", res.err) + fmt.Fprintf(os.Stderr, "Error in RunPlaybooks: %v\n", res.err) } res.log.Truncate(0) - if jobResult.err != nil { + if res.err != nil { failures++ } else { successes++ @@ -135,7 +137,7 @@ func RunPlaybooks(args *def.DeployArgs, playbooks []string, logger *logging.Logg close(resultQ) if successes > 0 { - logger.InfoMsg("JOBS THAT SUCCEEEDED", "count", successes) + logger.InfoMsg("JOBS THAT SUCCEEDED", "count", successes) for i, playbook := range playbooks { res := results[i] if res.err != nil { diff --git a/deploy/util/variables.go b/deploy/util/variables.go index dd0f3f100..b81f32a36 100644 --- a/deploy/util/variables.go +++ b/deploy/util/variables.go @@ -195,12 +195,10 @@ func replaceBlockVariable(toReplace string, client *def.Client, logger *logging. func PreProcessInputData(function string, data interface{}, do *def.DeployArgs, script *def.Playbook, client *def.Client, constructor bool, logger *logging.Logger) (string, []interface{}, error) { var callDataArray []interface{} var callArray []string - if function == "" && !constructor { - if reflect.TypeOf(data).Kind() == reflect.Slice { - return "", []interface{}{""}, fmt.Errorf("Incorrect formatting of deploy.yaml. Please update it to include a function field.") - } - function = strings.Split(data.(string), " ")[0] - callArray = strings.Split(data.(string), " ")[1:] + if _, ok := data.(string); function == "" && !constructor && ok { + callArray = strings.Split(data.(string), " ") + function = callArray[0] + callArray = callArray[1:] for _, val := range callArray { output, _ := PreProcess(val, do, script, client, logger) callDataArray = append(callDataArray, output) diff --git a/docker-compose.yml b/docker-compose.yml index ae5bab13b..28cfdd675 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,8 @@ version: "3" services: db: image: postgres:11-alpine + environment: + - POSTGRES_HOST_AUTH_METHOD=trust ports: - 5432 environment: diff --git a/execution/evm/abi/abi_test.go b/execution/evm/abi/abi_test.go index cf61b6478..b25071c54 100644 --- a/execution/evm/abi/abi_test.go +++ b/execution/evm/abi/abi_test.go @@ -26,6 +26,13 @@ func TestPacker(t *testing.T) { name string expectedOutput []byte }{ + // Test string address + { + `[{"constant":false,"inputs":[{"internalType":"address payable","name":"friend","type":"address"}],"name":"sendToAFriend","outputs":[],"payable":true,"stateMutability":"payable","type":"function"}]`, + []interface{}{"C42DEED84BDF2CA695F2E91F4E6395D191CF35FC"}, + "sendToAFriend", + pad([]byte{196, 45, 238, 216, 75, 223, 44, 166, 149, 242, 233, 31, 78, 99, 149, 209, 145, 207, 53, 252}, 32, true), + }, // From: https://github.com/hyperledger/burrow/issues/1326 { `[{"constant":false,"inputs":[{"internalType":"address payable","name":"friend","type":"address"}],"name":"sendToAFriend","outputs":[],"payable":true,"stateMutability":"payable","type":"function"}]`, diff --git a/execution/evm/abi/primitives.go b/execution/evm/abi/primitives.go index 2b386ceaa..025f15d0b 100644 --- a/execution/evm/abi/primitives.go +++ b/execution/evm/abi/primitives.go @@ -520,10 +520,16 @@ func (e EVMAddress) pack(v interface{}) ([]byte, error) { bs = a[:] case *crypto.Address: bs = (*a)[:] + case string: + address, err := crypto.AddressFromHexString(a) + if err != nil { + return nil, fmt.Errorf("could not convert '%s' to address: %v", a, err) + } + bs = address[:] case []byte: address, err := crypto.AddressFromBytes(a) if err != nil { - return nil, err + return nil, fmt.Errorf("could not convert byte 0x%X to address: %v", a, err) } bs = address[:] default: diff --git a/execution/evm/abi/spec.go b/execution/evm/abi/spec.go index 4be16346c..5b4d79a66 100644 --- a/execution/evm/abi/spec.go +++ b/execution/evm/abi/spec.go @@ -10,6 +10,9 @@ import ( "github.com/hyperledger/burrow/crypto" ) +// Token to use in deploy yaml in order to indicate call to the fallback function. +const FallbackFunctionName = "()" + // Spec is the ABI for contract decoded. type Spec struct { Constructor *FunctionSpec @@ -69,6 +72,8 @@ func ReadSpec(specBytes []byte) (*Spec, error) { case "fallback": abiSpec.Fallback.Inputs = make([]Argument, 0) abiSpec.Fallback.Outputs = make([]Argument, 0) + abiSpec.Fallback.SetConstant() + abiSpec.Functions[FallbackFunctionName] = abiSpec.Fallback case "event": ev := new(EventSpec) err = ev.unmarshalSpec(&s) @@ -136,13 +141,13 @@ func (spec *Spec) Pack(fname string, args ...interface{}) ([]byte, *FunctionSpec if _, ok := spec.Functions[fname]; ok { funcSpec = spec.Functions[fname] } else { - return nil, nil, fmt.Errorf("Unknown function %s", fname) + return nil, nil, fmt.Errorf("unknown function in Pack: %s", fname) } } else { if spec.Constructor.Inputs != nil { funcSpec = spec.Constructor } else { - return nil, nil, fmt.Errorf("Contract does not have a constructor") + return nil, nil, fmt.Errorf("contract does not have a constructor") } } @@ -179,7 +184,7 @@ func (spec *Spec) Unpack(data []byte, fname string, args ...interface{}) error { argSpec = funcSpec.Outputs if argSpec == nil { - return fmt.Errorf("Unknown function %s", fname) + return fmt.Errorf("unknown function in Unpack: %s", fname) } return unpack(argSpec, data, func(i int) interface{} { @@ -199,7 +204,7 @@ func (spec *Spec) UnpackWithID(data []byte, args ...interface{}) error { } if argSpec == nil { - return fmt.Errorf("Unknown function %x", id) + return fmt.Errorf("unknown function in UnpackWithID: %x", id) } return unpack(argSpec, data[4:], func(i int) interface{} { diff --git a/logging/loggers/stream_logger.go b/logging/loggers/stream_logger.go index 7e3c3fad7..ee5ef2252 100644 --- a/logging/loggers/stream_logger.go +++ b/logging/loggers/stream_logger.go @@ -15,56 +15,70 @@ type Syncable interface { } func NewStreamLogger(writer io.Writer, format string) (log.Logger, error) { - var logger log.Logger - var err error switch format { case "": return NewStreamLogger(writer, DefaultFormat) case JSONFormat: - logger = log.NewJSONLogger(writer) + return NewJSONLogger(writer), nil case LogfmtFormat: - logger = log.NewLogfmtLogger(writer) + return NewLogfmtLogger(writer), nil case TerminalFormat: - logger = term.NewLogger(writer, log.NewLogfmtLogger, func(keyvals ...interface{}) term.FgBgColor { - switch structure.Value(keyvals, structure.ChannelKey) { - case structure.TraceChannelName: - return term.FgBgColor{Fg: term.DarkGreen} - default: - return term.FgBgColor{Fg: term.Yellow} - } - }) + return NewTerminalLogger(writer), nil default: - logger, err = NewTemplateLogger(writer, format, []byte{}) - if err != nil { - return nil, fmt.Errorf("did not recognise format '%s' as named format and could not parse as "+ - "template: %v", format, err) - } + return NewTemplateLogger(writer, format, []byte{}) } - return log.LoggerFunc(func(keyvals ...interface{}) error { - switch structure.Signal(keyvals) { - case structure.SyncSignal: - if s, ok := writer.(Syncable); ok { - return s.Sync() - } - // Don't log signals - return nil +} + +func NewJSONLogger(writer io.Writer) log.Logger { + return interceptSync(writer, log.NewJSONLogger(writer)) +} + +func NewLogfmtLogger(writer io.Writer) log.Logger { + return interceptSync(writer, log.NewLogfmtLogger(writer)) +} + +func NewTerminalLogger(writer io.Writer) log.Logger { + logger := term.NewLogger(writer, log.NewLogfmtLogger, func(keyvals ...interface{}) term.FgBgColor { + kvm := structure.KeyValuesMap(keyvals) + delete(kvm, structure.TraceChannelName) + delete(kvm, structure.MessageKey) + delete(kvm, structure.TimeKey) + switch structure.Value(keyvals, structure.ChannelKey) { + case structure.TraceChannelName: + return term.FgBgColor{Fg: term.DarkGreen} default: - return logger.Log(keyvals...) + return term.FgBgColor{Fg: term.Yellow} } - }), nil + }) + return interceptSync(writer, logger) } func NewTemplateLogger(writer io.Writer, textTemplate string, recordSeparator []byte) (log.Logger, error) { tmpl, err := template.New("template-logger").Parse(textTemplate) if err != nil { - return nil, err + return nil, fmt.Errorf("could not parse '%s' as a text template: %v", textTemplate, err) } - return log.LoggerFunc(func(keyvals ...interface{}) error { + logger := log.LoggerFunc(func(keyvals ...interface{}) error { err := tmpl.Execute(writer, structure.KeyValuesMap(keyvals)) if err == nil { _, err = writer.Write(recordSeparator) } return err - }), nil + }) + return interceptSync(writer, logger), nil +} +func interceptSync(writer io.Writer, logger log.Logger) log.Logger { + return log.LoggerFunc(func(keyvals ...interface{}) error { + switch structure.Signal(keyvals) { + case structure.SyncSignal: + if s, ok := writer.(Syncable); ok { + return s.Sync() + } + // Don't log signals + return nil + default: + return logger.Log(keyvals...) + } + }) } diff --git a/tests/jobs_fixtures/app37-fallback_function/deploy.yaml b/tests/jobs_fixtures/app37-fallback_function/deploy.yaml index 17d6b3c27..9a0554b70 100644 --- a/tests/jobs_fixtures/app37-fallback_function/deploy.yaml +++ b/tests/jobs_fixtures/app37-fallback_function/deploy.yaml @@ -11,10 +11,10 @@ jobs: - name: getX query-contract: destination: $deployC - function: x + function: x - name: assertLevelUp assert: key: $getX relation: eq - val: 1 \ No newline at end of file + val: 1 diff --git a/tests/test_runner.sh b/tests/test_runner.sh index 638ac5d9f..bb998128c 100755 --- a/tests/test_runner.sh +++ b/tests/test_runner.sh @@ -25,8 +25,6 @@ export boot=${boot:-true} export debug=${debug:-false} export clean=${clean:-true} -export failures="not supplied by test" - export test_exit=0 if [[ "$debug" = true ]]; then @@ -114,11 +112,6 @@ test_teardown(){ echo "Tests complete! Tests are Green. :)" else echo "Tests complete. Tests are Red. :(" - echo "Failures in:" - for failure in "${failures[@]}" - do - echo "$failure" - done fi exit ${test_exit} } From d610247eed2a377cee33eb04fe495209cb7de4de Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 9 Mar 2020 17:50:23 -0600 Subject: [PATCH 103/185] Fix various issues with burrow deploy and Deploy tests Allow Deploy jobs to mark themselves as not suitable for parallel execution Signed-off-by: Silas Davis --- Makefile | 2 +- acm/validator/cache.go | 2 + cmd/burrow/commands/tx.go | 3 +- deploy/def/client.go | 6 +- deploy/def/deploy.go | 15 -- deploy/def/playbook.go | 21 +++ deploy/jobs/job_manager.go | 20 +-- deploy/jobs/jobs_contracts.go | 38 ++---- deploy/jobs/jobs_governance.go | 23 ++-- deploy/jobs/jobs_proposal.go | 3 +- deploy/jobs/jobs_test_jobs.go | 4 +- deploy/jobs/jobs_transact.go | 54 ++++++-- deploy/jobs/jobs_util.go | 2 +- deploy/loader/load_package.go | 6 +- deploy/run_deploy.go | 19 ++- deploy/util/errors.go | 67 --------- deploy/util/readers.go | 99 -------------- event/query/builder_test.go | 2 +- execution/contexts/bond_context.go | 3 + execution/contexts/unbond_context.go | 4 + execution/evm/contract.go | 2 +- execution/execution.go | 4 +- execution/native/function.go | 2 + execution/native/permissions.go | 49 +++---- logging/logconfig/config.go | 2 +- logging/loggers/burrow_format_logger.go | 31 ++++- logging/loggers/stream_logger.go | 8 +- logging/structure/structure.go | 12 +- permission/perm_flag_test.go | 9 ++ tests/chain/burrow.toml | 40 ++++-- .../deploy.yaml | 5 +- .../deploy.yaml | 25 ++-- .../permissions.sol | 129 +++++++++--------- .../app48-govern-account/deploy.yaml | 5 +- .../app52-proposal-execute/deploy.yaml | 4 +- .../app57-bond-unbond/deploy.yaml | 7 +- util/debug.go | 4 +- util/natives/templates/solidity_templates.go | 4 +- 38 files changed, 333 insertions(+), 402 deletions(-) create mode 100644 deploy/def/playbook.go delete mode 100644 deploy/util/errors.go delete mode 100644 deploy/util/readers.go diff --git a/Makefile b/Makefile index 51d6df32b..76df4e7df 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ PROTO_GO_FILES_REAL = $(shell find . -type f -name '*.pb.go' -print) PROTO_TS_FILES = $(patsubst %.proto, %.pb.ts, $(PROTO_FILES)) .PHONY: protobuf -protobuf: $(PROTO_GO_FILES) ${PROTO_TS_FILES} fix +protobuf: $(PROTO_GO_FILES) $(PROTO_TS_FILES) fix # Implicit compile rule for GRPC/proto files (note since pb.go files no longer generated # in same directory as proto file this just regenerates everything diff --git a/acm/validator/cache.go b/acm/validator/cache.go index c81189950..698a42adb 100644 --- a/acm/validator/cache.go +++ b/acm/validator/cache.go @@ -4,6 +4,7 @@ import ( "math/big" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/util" ) // Cache is just a Ring with no memory @@ -22,6 +23,7 @@ func (vc *Cache) Reset(backend Iterable) { } func (vc *Cache) Flush(output Writer, backend Iterable) error { + util.Debugf("Flushing validators...") err := vc.Delta.IterateValidators(func(id crypto.Addressable, power *big.Int) error { _, err := output.SetPower(id.GetPublicKey(), power) return err diff --git a/cmd/burrow/commands/tx.go b/cmd/burrow/commands/tx.go index aa9cd6154..0695d1afe 100644 --- a/cmd/burrow/commands/tx.go +++ b/cmd/burrow/commands/tx.go @@ -10,7 +10,6 @@ import ( "github.com/hyperledger/burrow/config/source" "github.com/hyperledger/burrow/deploy/def" "github.com/hyperledger/burrow/deploy/jobs" - "github.com/hyperledger/burrow/deploy/util" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/txs/payload" cli "github.com/jawher/mow.cli" @@ -217,7 +216,7 @@ func makeTx(client *def.Client, tx payload.Payload) (string, error) { return "", err } - util.ReadTxSignAndBroadcast(txe, err, logger) + jobs.LogTxExecution(txe, logger) if err != nil { return "", err } diff --git a/deploy/def/client.go b/deploy/def/client.go index 8767c7bb3..03114133c 100644 --- a/deploy/def/client.go +++ b/deploy/def/client.go @@ -359,7 +359,7 @@ func (c *Client) UpdateAccount(arg *GovArg, logger *logging.Logger) (*payload.Go } update := &spec.TemplateAccount{ Permissions: arg.Permissions, - Roles: arg.Permissions, + Roles: arg.Roles, } if arg.Address != "" { addr, err := c.ParseAddress(arg.Address, logger) @@ -369,7 +369,7 @@ func (c *Client) UpdateAccount(arg *GovArg, logger *logging.Logger) (*payload.Go update.Address = &addr } if arg.PublicKey != "" { - pubKey, err := publicKeyFromString(arg.PublicKey) + pubKey, err := PublicKeyFromString(arg.PublicKey) if err != nil { return nil, fmt.Errorf("could not parse publicKey: %v", err) } @@ -427,7 +427,7 @@ func (c *Client) PublicKeyFromAddress(address *crypto.Address) (*crypto.PublicKe return &pubKey, nil } -func publicKeyFromString(publicKey string) (crypto.PublicKey, error) { +func PublicKeyFromString(publicKey string) (crypto.PublicKey, error) { bs, err := hex.DecodeString(publicKey) if err != nil { return crypto.PublicKey{}, fmt.Errorf("could not parse public key string %s as hex: %v", publicKey, err) diff --git a/deploy/def/deploy.go b/deploy/def/deploy.go index f43eeadad..e9d2118ed 100644 --- a/deploy/def/deploy.go +++ b/deploy/def/deploy.go @@ -39,18 +39,3 @@ func (args *DeployArgs) Validate() error { ) } -type Playbook struct { - Filename string - Account string - Jobs []*Job - Path string `mapstructure:"-" json:"-" yaml:"-" toml:"-"` - BinPath string `mapstructure:"-" json:"-" yaml:"-" toml:"-"` - // If we're in a proposal or meta job, reference our parent script - Parent *Playbook `mapstructure:"-" json:"-" yaml:"-" toml:"-"` -} - -func (pkg *Playbook) Validate() error { - return validation.ValidateStruct(pkg, - validation.Field(&pkg.Jobs), - ) -} diff --git a/deploy/def/playbook.go b/deploy/def/playbook.go new file mode 100644 index 000000000..b16ee15fa --- /dev/null +++ b/deploy/def/playbook.go @@ -0,0 +1,21 @@ +package def + +import "github.com/go-ozzo/ozzo-validation" + +type Playbook struct { + Filename string + Account string + // Prevent this playbook from running at the same time as other playbooks + NoParallel bool `mapstructure:"no-parallel,omitempty" json:"no-parallel,omitempty" yaml:"no-parallel,omitempty" toml:"no-parallel,omitempty"` + Jobs []*Job + Path string `mapstructure:"-" json:"-" yaml:"-" toml:"-"` + BinPath string `mapstructure:"-" json:"-" yaml:"-" toml:"-"` + // If we're in a proposal or meta job, reference our parent script + Parent *Playbook `mapstructure:"-" json:"-" yaml:"-" toml:"-"` +} + +func (pkg *Playbook) Validate() error { + return validation.ValidateStruct(pkg, + validation.Field(&pkg.Jobs), + ) +} diff --git a/deploy/jobs/job_manager.go b/deploy/jobs/job_manager.go index 3770f41f9..791bd5e22 100644 --- a/deploy/jobs/job_manager.go +++ b/deploy/jobs/job_manager.go @@ -155,12 +155,12 @@ func doJobs(playbook *def.Playbook, args *def.DeployArgs, client *def.Client, lo if err != nil { return err } - err = UpdateAccountJob(job.UpdateAccount, playbook.Account, tx, client, logger) + err = UpdateAccountJob(tx, client, logger) // Util jobs case *def.Account: announce(job.Name, "Account", logger) - job.Result, err = SetAccountJob(job.Account, args, playbook, logger) + job.Result, err = SetAccountJob(job.Account, playbook, logger) case *def.Set: announce(job.Name, "Set", logger) job.Result, err = SetValJob(job.Set, args, logger) @@ -172,7 +172,7 @@ func doJobs(playbook *def.Playbook, args *def.DeployArgs, client *def.Client, lo if err != nil { return err } - job.Result, err = SendJob(job.Send, tx, playbook.Account, client, logger) + job.Result, err = SendJob(tx, client, logger) if err != nil { return err } @@ -182,7 +182,7 @@ func doJobs(playbook *def.Playbook, args *def.DeployArgs, client *def.Client, lo if err != nil { return err } - job.Result, err = BondJob(job.Bond, tx, playbook.Account, client, logger) + job.Result, err = BondJob(tx, client, logger) if err != nil { return err } @@ -192,7 +192,7 @@ func doJobs(playbook *def.Playbook, args *def.DeployArgs, client *def.Client, lo if err != nil { return err } - job.Result, err = UnbondJob(job.Unbond, tx, playbook.Account, client, logger) + job.Result, err = UnbondJob(tx, client, logger) if err != nil { return err } @@ -202,7 +202,7 @@ func doJobs(playbook *def.Playbook, args *def.DeployArgs, client *def.Client, lo if err != nil { return err } - job.Result, err = RegisterNameJob(job.RegisterName, args, playbook, txs, client, logger) + job.Result, err = RegisterNameJob(txs, client, logger) if err != nil { return err } @@ -212,7 +212,7 @@ func doJobs(playbook *def.Playbook, args *def.DeployArgs, client *def.Client, lo if err != nil { return err } - job.Result, err = PermissionJob(job.Permission, playbook.Account, tx, client, logger) + job.Result, err = PermissionJob(tx, client, logger) if err != nil { return err } @@ -222,7 +222,7 @@ func doJobs(playbook *def.Playbook, args *def.DeployArgs, client *def.Client, lo if err != nil { return err } - job.Result, err = IdentifyJob(job.Identify, tx, playbook.Account, client, logger) + job.Result, err = IdentifyJob(tx, client, logger) if err != nil { return err } @@ -234,7 +234,7 @@ func doJobs(playbook *def.Playbook, args *def.DeployArgs, client *def.Client, lo if ferr != nil { return ferr } - job.Result, err = DeployJob(job.Deploy, args, playbook, client, txs, contracts, logger) + job.Result, err = DeployJob(job.Deploy, playbook, client, txs, contracts, logger) case *def.Call: announce(job.Name, "Call", logger) @@ -242,7 +242,7 @@ func doJobs(playbook *def.Playbook, args *def.DeployArgs, client *def.Client, lo if ferr != nil { return ferr } - job.Result, job.Variables, err = CallJob(job.Call, CallTx, args, playbook, client, logger) + job.Result, job.Variables, err = CallJob(job.Call, CallTx, playbook, client, logger) case *def.Build: announce(job.Name, "Build", logger) var resp *compilers.Response diff --git a/deploy/jobs/jobs_contracts.go b/deploy/jobs/jobs_contracts.go index 2332b8cc1..2916f7818 100644 --- a/deploy/jobs/jobs_contracts.go +++ b/deploy/jobs/jobs_contracts.go @@ -19,7 +19,7 @@ import ( hex "github.com/tmthrgd/go-hex" ) -var errCodeMissing = fmt.Errorf("error: no binary code found in contract. Contract may be abstract due to missing function body or inherited function signatures not matching.") +var errCodeMissing = fmt.Errorf("error: no binary code found in contract. Contract may be abstract due to missing function body or inherited function signatures not matching") func BuildJob(build *def.Build, deployScript *def.Playbook, resp *compilers.Response, logger *logging.Logger) (result string, err error) { // assemble contract @@ -46,10 +46,8 @@ func BuildJob(build *def.Build, deployScript *def.Playbook, resp *compilers.Resp if binP == "" { binP = deployScript.BinPath } else { - if _, err := os.Stat(binP); os.IsNotExist(err) { - if err := os.Mkdir(binP, 0775); err != nil { - return "", err - } + if err := os.MkdirAll(binP, 0775); err != nil { + return "", err } } @@ -79,10 +77,8 @@ func BuildJob(build *def.Build, deployScript *def.Playbook, resp *compilers.Resp dir := filepath.Dir(build.Store) file := filepath.Base(build.Store) - if _, err := os.Stat(dir); os.IsNotExist(err) { - if err := os.Mkdir(dir, 0775); err != nil { - return "", err - } + if err := os.MkdirAll(dir, 0775); err != nil { + return "", err } err = res.Contract.Save(dir, file) @@ -275,7 +271,7 @@ func FormulateDeployJob(deploy *def.Deploy, do *def.DeployArgs, deployScript *de return } -func DeployJob(deploy *def.Deploy, do *def.DeployArgs, script *def.Playbook, client *def.Client, txs []*payload.CallTx, contracts []*compilers.ResponseItem, logger *logging.Logger) (result string, err error) { +func DeployJob(deploy *def.Deploy, script *def.Playbook, client *def.Client, txs []*payload.CallTx, contracts []*compilers.ResponseItem, logger *logging.Logger) (result string, err error) { // saving contract // additional data may be sent along with the contract // these are naively added to the end of the contract code using standard @@ -283,9 +279,9 @@ func DeployJob(deploy *def.Deploy, do *def.DeployArgs, script *def.Playbook, cli for i, tx := range txs { // Sign, broadcast, display - contractAddress, err := deployFinalize(do, client, tx, logger) + contractAddress, err := deployFinalize(client, tx, logger) if err != nil { - return "", fmt.Errorf("Error finalizing contract deploy %s: %v", deploy.Contract, err) + return "", fmt.Errorf("error finalizing contract deploy %s: %w", deploy.Contract, err) } // saving contract/library abi at abi/address @@ -467,8 +463,8 @@ func FormulateCallJob(call *def.Call, do *def.DeployArgs, deployScript *def.Play packedBytes, funcSpec, err = abi.EncodeFunctionCallFromFile(call.Destination, deployScript.BinPath, call.Function, logger, callDataArray...) } if err != nil { - err = util.ABIErrorHandler(err, call, nil, logger) - return + return nil, fmt.Errorf("error in FormulateCallJob with %v: %w", + call, err) } } @@ -494,14 +490,12 @@ func FormulateCallJob(call *def.Call, do *def.DeployArgs, deployScript *def.Play }, logger) } -func CallJob(call *def.Call, tx *payload.CallTx, do *def.DeployArgs, playbook *def.Playbook, client *def.Client, logger *logging.Logger) (string, []*abi.Variable, error) { - var err error +func CallJob(call *def.Call, tx *payload.CallTx, playbook *def.Playbook, client *def.Client, logger *logging.Logger) (string, []*abi.Variable, error) { // Sign, broadcast, display txe, err := client.SignAndBroadcast(tx, logger) if err != nil { - var err = util.ChainErrorHandler(payload.InputsString(tx.GetInputs()), err, logger) - return "", nil, err + return "", nil, fmt.Errorf("error in CallJob with %v: %w", call, err) } if txe.Exception != nil { @@ -561,16 +555,14 @@ func CallJob(call *def.Call, tx *payload.CallTx, do *def.DeployArgs, playbook *d return result, call.Variables, nil } -func deployFinalize(do *def.DeployArgs, client *def.Client, tx payload.Payload, logger *logging.Logger) (*crypto.Address, error) { +func deployFinalize(client *def.Client, tx payload.Payload, logger *logging.Logger) (*crypto.Address, error) { txe, err := client.SignAndBroadcast(tx, logger) if err != nil { - return nil, util.ChainErrorHandler(payload.InputsString(tx.GetInputs()), err, logger) - } - - if err := util.ReadTxSignAndBroadcast(txe, err, logger); err != nil { return nil, err } + LogTxExecution(txe, logger) + // The contructor can generate events logEvents(txe, client, logger) diff --git a/deploy/jobs/jobs_governance.go b/deploy/jobs/jobs_governance.go index 131d59f89..7cad8f003 100644 --- a/deploy/jobs/jobs_governance.go +++ b/deploy/jobs/jobs_governance.go @@ -40,6 +40,11 @@ func FormulateUpdateAccountJob(gov *def.UpdateAccount, account string, client *d arg.Address = gov.Target } else { arg.PublicKey = gov.Target + pk, err := def.PublicKeyFromString(gov.Target) + if err != nil { + panic(err) + } + arg.Address = pk.GetAddress().String() } tx, err := client.UpdateAccount(arg, logger) @@ -50,13 +55,13 @@ func FormulateUpdateAccountJob(gov *def.UpdateAccount, account string, client *d return tx, util.Variables(arg), nil } -func UpdateAccountJob(gov *def.UpdateAccount, account string, tx *payload.GovTx, client *def.Client, logger *logging.Logger) error { +func UpdateAccountJob(tx *payload.GovTx, client *def.Client, logger *logging.Logger) error { txe, err := client.SignAndBroadcast(tx, logger) if err != nil { - return util.ChainErrorHandler(account, err, logger) + return fmt.Errorf("error in UpdateAccountJob with payload %v: %w", tx, err) } - util.ReadTxSignAndBroadcast(txe, err, logger) + LogTxExecution(txe, logger) if err != nil { return err } @@ -82,14 +87,14 @@ func FormulateBondJob(bond *def.Bond, account string, client *def.Client, logger return client.Bond(arg, logger) } -func BondJob(bond *def.Bond, tx *payload.BondTx, account string, client *def.Client, logger *logging.Logger) (string, error) { +func BondJob(tx *payload.BondTx, client *def.Client, logger *logging.Logger) (string, error) { // Sign, broadcast, display txe, err := client.SignAndBroadcast(tx, logger) if err != nil { - return "", util.ChainErrorHandler(account, err, logger) + return "", fmt.Errorf("error in BondJob with payload %v: %w", tx, err) } - util.ReadTxSignAndBroadcast(txe, err, logger) + LogTxExecution(txe, logger) if err != nil { return "", err } @@ -114,14 +119,14 @@ func FormulateUnbondJob(unbond *def.Unbond, account string, client *def.Client, return client.Unbond(arg, logger) } -func UnbondJob(bond *def.Unbond, tx *payload.UnbondTx, account string, client *def.Client, logger *logging.Logger) (string, error) { +func UnbondJob(tx *payload.UnbondTx, client *def.Client, logger *logging.Logger) (string, error) { // Sign, broadcast, display txe, err := client.SignAndBroadcast(tx, logger) if err != nil { - return "", util.ChainErrorHandler(account, err, logger) + return "", fmt.Errorf("error in UnbondJob with payload %v: %w", tx, err) } - util.ReadTxSignAndBroadcast(txe, err, logger) + LogTxExecution(txe, logger) if err != nil { return "", err } diff --git a/deploy/jobs/jobs_proposal.go b/deploy/jobs/jobs_proposal.go index 35401173b..a04566d6d 100644 --- a/deploy/jobs/jobs_proposal.go +++ b/deploy/jobs/jobs_proposal.go @@ -242,8 +242,7 @@ func ProposalJob(prop *def.Proposal, do *def.DeployArgs, parentScript *def.Playb txe, err := client.SignAndBroadcast(proposalTx, logger) if err != nil { - var err = util.ChainErrorHandler(proposalTx.Input.Address.String(), err, logger) - return "", err + return "", fmt.Errorf("error in ProposalJob with proposal %v: %w", prop, err) } result := fmt.Sprintf("%X", txe.Receipt.TxHash) diff --git a/deploy/jobs/jobs_test_jobs.go b/deploy/jobs/jobs_test_jobs.go index 0d028fa8c..6f44c3656 100644 --- a/deploy/jobs/jobs_test_jobs.go +++ b/deploy/jobs/jobs_test_jobs.go @@ -34,8 +34,8 @@ func QueryContractJob(query *def.QueryContract, do *def.DeployArgs, script *def. data = hex.EncodeToString(packedBytes) } if err != nil { - var err = util.ABIErrorHandler(err, nil, query, logger) - return "", nil, err + return "", nil, fmt.Errorf("error in QueryContractJob with %v: %w", + query, err) } logger.InfoMsg("Query contract", diff --git a/deploy/jobs/jobs_transact.go b/deploy/jobs/jobs_transact.go index f1e5f4d56..1ebe23e30 100644 --- a/deploy/jobs/jobs_transact.go +++ b/deploy/jobs/jobs_transact.go @@ -7,11 +7,12 @@ import ( "os" "path/filepath" + "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/txs/payload" + "github.com/tmthrgd/go-hex" "github.com/hyperledger/burrow/deploy/def" - "github.com/hyperledger/burrow/deploy/util" ) func FormulateSendJob(send *def.Send, account string, client *def.Client, logger *logging.Logger) (*payload.SendTx, error) { @@ -32,14 +33,14 @@ func FormulateSendJob(send *def.Send, account string, client *def.Client, logger }, logger) } -func SendJob(send *def.Send, tx *payload.SendTx, account string, client *def.Client, logger *logging.Logger) (string, error) { +func SendJob(tx *payload.SendTx, client *def.Client, logger *logging.Logger) (string, error) { // Sign, broadcast, display txe, err := client.SignAndBroadcast(tx, logger) if err != nil { - return "", util.ChainErrorHandler(account, err, logger) + return "", fmt.Errorf("error in SendJob with payload %v: %w", tx, err) } - util.ReadTxSignAndBroadcast(txe, err, logger) + LogTxExecution(txe, logger) if err != nil { return "", err } @@ -155,17 +156,17 @@ func registerNameTx(name *def.RegisterName, do *def.DeployArgs, account string, }, logger) } -func RegisterNameJob(name *def.RegisterName, do *def.DeployArgs, script *def.Playbook, txs []*payload.NameTx, client *def.Client, logger *logging.Logger) (string, error) { +func RegisterNameJob(txs []*payload.NameTx, client *def.Client, logger *logging.Logger) (string, error) { var result string for _, tx := range txs { // Sign, broadcast, display txe, err := client.SignAndBroadcast(tx, logger) if err != nil { - return "", util.ChainErrorHandler(script.Account, err, logger) + return "", fmt.Errorf("error in RegisterNameJob with payload %v: %w", tx, err) } - util.ReadTxSignAndBroadcast(txe, err, logger) + LogTxExecution(txe, logger) if err != nil { return "", err } @@ -197,16 +198,16 @@ func FormulatePermissionJob(perm *def.Permission, account string, client *def.Cl }, logger) } -func PermissionJob(perm *def.Permission, account string, tx *payload.PermsTx, client *def.Client, logger *logging.Logger) (string, error) { +func PermissionJob(tx *payload.PermsTx, client *def.Client, logger *logging.Logger) (string, error) { logger.TraceMsg("Permissions returned in transaction: ", "args", tx.PermArgs) // Sign, broadcast, display txe, err := client.SignAndBroadcast(tx, logger) if err != nil { - return "", util.ChainErrorHandler(account, err, logger) + return "", fmt.Errorf("error in PermissionJob with payload %v: %w", tx, err) } - util.ReadTxSignAndBroadcast(txe, err, logger) + LogTxExecution(txe, logger) if err != nil { return "", err } @@ -233,14 +234,14 @@ func FormulateIdentifyJob(id *def.Identify, account string, client *def.Client, }, logger) } -func IdentifyJob(id *def.Identify, tx *payload.IdentifyTx, account string, client *def.Client, logger *logging.Logger) (string, error) { +func IdentifyJob(tx *payload.IdentifyTx, client *def.Client, logger *logging.Logger) (string, error) { // Sign, broadcast, display txe, err := client.SignAndBroadcast(tx, logger) if err != nil { - return "", util.ChainErrorHandler(account, err, logger) + return "", fmt.Errorf("error in IdentifyJob with payload %v: %w", tx, err) } - util.ReadTxSignAndBroadcast(txe, err, logger) + LogTxExecution(txe, logger) if err != nil { return "", err } @@ -256,3 +257,30 @@ func FirstOf(inputs ...string) string { } return "" } + +func LogTxExecution(txe *exec.TxExecution, logger *logging.Logger) { + // if there is nothing to unpack then just return. + if txe == nil { + return + } + + // Unpack and display for the user. + height := fmt.Sprintf("%d", txe.Height) + + if txe.Receipt.CreatesContract { + logger.InfoMsg("Tx Return", + "addr", txe.Receipt.ContractAddress.String(), + "Transaction Hash", hex.EncodeToString(txe.TxHash)) + } else { + logger.InfoMsg("Tx Return", + "Transaction Hash", hex.EncodeToString(txe.TxHash), + "Block Height", height) + + ret := txe.GetResult().GetReturn() + if len(ret) != 0 { + logger.InfoMsg("Return", + "Return Value", hex.EncodeUpperToString(ret), + "Exception", txe.Exception) + } + } +} diff --git a/deploy/jobs/jobs_util.go b/deploy/jobs/jobs_util.go index 0bae3f549..8bcd40818 100644 --- a/deploy/jobs/jobs_util.go +++ b/deploy/jobs/jobs_util.go @@ -5,7 +5,7 @@ import ( "github.com/hyperledger/burrow/logging" ) -func SetAccountJob(account *def.Account, do *def.DeployArgs, script *def.Playbook, logger *logging.Logger) (string, error) { +func SetAccountJob(account *def.Account, script *def.Playbook, logger *logging.Logger) (string, error) { var result string // Set the Account in the Package & Announce diff --git a/deploy/loader/load_package.go b/deploy/loader/load_package.go index 0636eacad..ccdc487ee 100644 --- a/deploy/loader/load_package.go +++ b/deploy/loader/load_package.go @@ -36,10 +36,8 @@ func loadPlaybook(fileName string, args *def.DeployArgs, parent *def.Playbook, l playbook.BinPath = args.BinPath } - if _, err := os.Stat(playbook.BinPath); os.IsNotExist(err) { - if err := os.Mkdir(playbook.BinPath, 0775); err != nil { - return nil, err - } + if err := os.MkdirAll(playbook.BinPath, 0775); err != nil { + return nil, err } // setup file diff --git a/deploy/run_deploy.go b/deploy/run_deploy.go index 82fde0ca3..911e23d70 100644 --- a/deploy/run_deploy.go +++ b/deploy/run_deploy.go @@ -5,6 +5,7 @@ import ( "fmt" "os" "path/filepath" + "sync" "time" "github.com/go-kit/kit/log" @@ -27,7 +28,8 @@ type playbookResult struct { duration time.Duration } -func worker(playbooks <-chan playbookWork, results chan<- playbookResult, args *def.DeployArgs, logger *logging.Logger) { +func worker(mtx *sync.RWMutex, playbooks <-chan playbookWork, results chan<- playbookResult, args *def.DeployArgs, + logger *logging.Logger) { client := def.NewClient(args.Chain, args.KeysService, args.MempoolSign, time.Duration(args.Timeout)*time.Second) @@ -59,10 +61,15 @@ func worker(playbooks <-chan playbookWork, results chan<- playbookResult, args * // Load existing bin files to decode events var abiError error client.AllSpecs, abiError = abi.LoadPath(script.BinPath) - if err != nil { + if abiError != nil { logger.InfoMsg("failed to load ABIs for Event parsing", "path", script.BinPath, "error", abiError) } - + locker := mtx.RLocker() + if script.NoParallel { + locker = mtx + } + locker.Lock() + defer locker.Unlock() err = jobs.ExecutePlaybook(args, script, client, logger) return } @@ -96,8 +103,9 @@ func RunPlaybooks(args *def.DeployArgs, playbooks []string, logger *logging.Logg workQ := make(chan playbookWork, 100) resultQ := make(chan playbookResult, 100) + mtx := new(sync.RWMutex) for i := 1; i <= args.Jobs; i++ { - go worker(workQ, resultQ, args, logger) + go worker(mtx, workQ, resultQ, args, logger) } for i, playbook := range playbooks { @@ -118,7 +126,8 @@ func RunPlaybooks(args *def.DeployArgs, playbooks []string, logger *logging.Logg // Print them in order for results[printed] != nil { res := results[printed] - os.Stderr.Write(res.log.Bytes()) + bs := res.log.Bytes() + os.Stderr.Write(bs) if res.err != nil { fmt.Fprintf(os.Stderr, "Error in RunPlaybooks: %v\n", res.err) } diff --git a/deploy/util/errors.go b/deploy/util/errors.go deleted file mode 100644 index fbc71c5e9..000000000 --- a/deploy/util/errors.go +++ /dev/null @@ -1,67 +0,0 @@ -package util - -import ( - "fmt" - "os" - - "github.com/hyperledger/burrow/deploy/def" - "github.com/hyperledger/burrow/logging" -) - -func Exit(err error) { - status := 0 - if err != nil { - fmt.Fprintln(os.Stderr, err) - status = 1 - } - os.Exit(status) -} - -func ChainErrorHandler(account string, err error, logger *logging.Logger) error { - logger.InfoMsg("There has been an error talking to your Burrow chain", - "defAddr", account, - "rawErr", err) - - return fmt.Errorf(` -There has been an error talking to your Burrow chain using account %s. - -%v - -`, account, err) -} - -func ABIErrorHandler(err error, call *def.Call, query *def.QueryContract, logger *logging.Logger) error { - switch { - case call != nil: - logger.InfoMsg("ABI Error", - "data", call.Data, - "bin", call.Bin, - "dest", call.Destination, - "rawErr", err) - case query != nil: - logger.InfoMsg("ABI Error", - "data", query.Data, - "bin", query.Bin, - "dest", query.Destination, - "rawErr", err) - } - - return fmt.Errorf(` -There has been an error in finding or in using your ABI. ABI's are "Application Binary -Interface" and they are what let us know how to talk to smart contracts. - -These little json files can be read by a variety of things which need to talk to smart -contracts so they are quite necessary to be able to find and use properly. - -The ABIs are saved after the deploy events. So if there was a glitch in the matrix, -we apologize in advance. - -The marmot recovery checklist is... - * ensure your chain is running and you have enough validators online - * ensure that your contracts successfully deployed - * if you used imports or have multiple contracts in one file check the instance - variable in the deploy and the abi variable in the call/query-contract - * make sure you're calling or querying the right function - * make sure you're using the correct variables for job results -`) -} diff --git a/deploy/util/readers.go b/deploy/util/readers.go deleted file mode 100644 index 0e9802936..000000000 --- a/deploy/util/readers.go +++ /dev/null @@ -1,99 +0,0 @@ -package util - -import ( - "bufio" - "fmt" - "os" - "strconv" - "strings" - - "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/logging" - hex "github.com/tmthrgd/go-hex" -) - -// This is a closer function which is called by most of the tx_run functions -func ReadTxSignAndBroadcast(txe *exec.TxExecution, err error, logger *logging.Logger) error { - // if there's an error just return. - if err != nil { - return err - } - - // if there is nothing to unpack then just return. - if txe == nil { - return nil - } - - // Unpack and display for the user. - height := fmt.Sprintf("%d", txe.Height) - - if txe.Receipt.CreatesContract { - logger.InfoMsg("Tx Return", - "addr", txe.Receipt.ContractAddress.String(), - "Transaction Hash", hex.EncodeToString(txe.TxHash)) - } else { - logger.InfoMsg("Tx Return", - "Transaction Hash", hex.EncodeToString(txe.TxHash), - "Block Height", height) - - ret := txe.GetResult().GetReturn() - if len(ret) != 0 { - logger.InfoMsg("Return", - "Return Value", hex.EncodeUpperToString(ret), - "Exception", txe.Exception) - } - } - - return nil -} - -func GetStringResponse(question string, defaultAnswer string, reader *os.File, logger *logging.Logger) (string, error) { - readr := bufio.NewReader(reader) - logger.InfoMsg(question) - - text, _ := readr.ReadString('\n') - text = strings.Replace(text, "\n", "", 1) - if text == "" { - return defaultAnswer, nil - } - return text, nil -} - -func GetIntResponse(question string, defaultAnswer int64, reader *os.File, logger *logging.Logger) (int64, error) { - readr := bufio.NewReader(reader) - - text, _ := readr.ReadString('\n') - text = strings.Replace(text, "\n", "", 1) - if text == "" { - return defaultAnswer, nil - } - - result, err := strconv.ParseInt(text, 10, 64) - if err != nil { - return 0, nil - } - - return result, nil -} - -// displays the question, scans for the response, if the response is an empty -// string will return default, otherwise will parseBool and return the result. -func GetBoolResponse(question string, defaultAnswer bool, reader *os.File, logger *logging.Logger) (bool, error) { - var result bool - readr := bufio.NewReader(reader) - logger.InfoMsg(question) - - text, _ := readr.ReadString('\n') - text = strings.Replace(text, "\n", "", 1) - if text == "" { - return defaultAnswer, nil - } - - if text == "Yes" || text == "YES" || text == "Y" || text == "y" { - result = true - } else { - result = false - } - - return result, nil -} diff --git a/event/query/builder_test.go b/event/query/builder_test.go index 15da502d0..6acbbd3b9 100644 --- a/event/query/builder_test.go +++ b/event/query/builder_test.go @@ -46,7 +46,7 @@ func TestQueryBuilder(t *testing.T) { func makeTagMap(keyvals ...interface{}) TagMap { tmap := make(TagMap) for i := 0; i < len(keyvals); i += 2 { - tmap[keyvals[i].(string)] = structure.StringifyKey(keyvals[i+1]) + tmap[keyvals[i].(string)] = structure.Stringify(keyvals[i+1]) } return tmap } diff --git a/execution/contexts/bond_context.go b/execution/contexts/bond_context.go index c79c3e169..54dd22275 100644 --- a/execution/contexts/bond_context.go +++ b/execution/contexts/bond_context.go @@ -10,6 +10,7 @@ import ( "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/txs/payload" + "github.com/hyperledger/burrow/util" ) type BondContext struct { @@ -59,6 +60,8 @@ func (ctx *BondContext) Execute(txe *exec.TxExecution, p payload.Payload) error return err } + cache := ctx.ValidatorSet.(*validator.Cache) + util.Debugf("%v", cache.Bucket) // assume public key is know as we update account from signatures err = validator.AddPower(ctx.ValidatorSet, account.PublicKey, power) if err != nil { diff --git a/execution/contexts/unbond_context.go b/execution/contexts/unbond_context.go index 31d551903..c2c6fed7c 100644 --- a/execution/contexts/unbond_context.go +++ b/execution/contexts/unbond_context.go @@ -9,6 +9,7 @@ import ( "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/txs/payload" + "github.com/hyperledger/burrow/util" ) type UnbondContext struct { @@ -41,6 +42,9 @@ func (ctx *UnbondContext) Execute(txe *exec.TxExecution, p payload.Payload) erro return err } + util.Debugf("unbonding %v", power) + cache := ctx.ValidatorSet.(*validator.Cache) + util.Debugf("%v", cache.Bucket) err = validator.SubtractPower(ctx.ValidatorSet, account.PublicKey, power) if err != nil { return err diff --git a/execution/evm/contract.go b/execution/evm/contract.go index c46b67447..b5d1b3f98 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -395,7 +395,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e stack.Push(Zero256) c.debugf(" => 0\n") } else { - length := uint64(len(acc.EVMCode)) + length := uint64(len(acc.Code())) stack.Push64(length) c.debugf(" => %d\n", length) } diff --git a/execution/execution.go b/execution/execution.go index a9c03fa50..a9cbd0665 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -291,12 +291,12 @@ func (exe *executor) validateInputsAndStorePublicKeys(txEnv *txs.Envelope) error acc.GetAddress()) } // Check sequences - if acc.Sequence+1 != uint64(in.Sequence) { + if acc.Sequence+1 != in.Sequence { return errors.Errorf(errors.Codes.InvalidSequence, "Error invalid sequence in input %v: input has sequence %d, but account has sequence %d, "+ "so expected input to have sequence %d", in, in.Sequence, acc.Sequence, acc.Sequence+1) } // Check amount - if acc.Balance < uint64(in.Amount) { + if txEnv.Tx.Type() != payload.TypeUnbond && acc.Balance < in.Amount { return errors.Codes.InsufficientFunds } // Check for Input permission diff --git a/execution/native/function.go b/execution/native/function.go index 0cbb39687..c9108323c 100644 --- a/execution/native/function.go +++ b/execution/native/function.go @@ -23,6 +23,8 @@ type Function struct { Comment string // Permissions required to call function PermFlag permission.PermFlag + // Whether this function writes to state + Pure bool // Native function to which calls will be dispatched when a containing F interface{} // Following fields are for only for memoization diff --git a/execution/native/permissions.go b/execution/native/permissions.go index d12f0a038..cfb87d04b 100644 --- a/execution/native/permissions.go +++ b/execution/native/permissions.go @@ -10,15 +10,15 @@ import ( ) var Permissions = New().MustContract("Permissions", - `* acmstate.ReaderWriter for managing Secure Native authorizations. + `* Interface for managing Secure Native authorizations. * @dev This interface describes the functions exposed by the native permissions layer in burrow. `, Function{ Comment: ` * @notice Adds a role to an account - * @param Account account address - * @param Role role name - * @return result whether role was added + * @param _account account address + * @param _role role name + * @return _result whether role was added `, PermFlag: permission.AddRole, F: addRole, @@ -26,9 +26,9 @@ var Permissions = New().MustContract("Permissions", Function{ Comment: ` * @notice Removes a role from an account - * @param Account account address - * @param Role role name - * @return result whether role was removed + * @param _account account address + * @param _role role name + * @return _result whether role was removed `, PermFlag: permission.RemoveRole, F: removeRole, @@ -36,9 +36,9 @@ var Permissions = New().MustContract("Permissions", Function{ Comment: ` * @notice Indicates whether an account has a role - * @param Account account address - * @param Role role name - * @return result whether account has role + * @param _account account address + * @param _role role name + * @return _result whether account has role `, PermFlag: permission.HasRole, F: hasRole, @@ -46,10 +46,10 @@ var Permissions = New().MustContract("Permissions", Function{ Comment: ` * @notice Sets the permission flags for an account. Makes them explicitly set (on or off). - * @param Account account address - * @param Permission the base permissions flags to set for the account - * @param Set whether to set or unset the permissions flags at the account level - * @return The permission flag that was set as uint64 + * @param _account account address + * @param _permission the base permissions flags to set for the account + * @param _set whether to set or unset the permissions flags at the account level + * @return _result is the permission flag that was set as uint64 `, PermFlag: permission.SetBase, F: setBase, @@ -57,9 +57,9 @@ var Permissions = New().MustContract("Permissions", Function{ Comment: ` * @notice Unsets the permissions flags for an account. Causes permissions being unset to fall through to global permissions. - * @param Account account address - * @param Permission the permissions flags to unset for the account - * @return The permission flag that was unset as uint64 + * @param _account account address + * @param _permission the permissions flags to unset for the account + * @return _result is the permission flag that was unset as uint64 `, PermFlag: permission.UnsetBase, F: unsetBase, @@ -67,18 +67,18 @@ var Permissions = New().MustContract("Permissions", Function{ Comment: ` * @notice Indicates whether an account has a subset of permissions set - * @param Account account address - * @param Permission the permissions flags (mask) to check whether enabled against base permissions for the account - * @return result whether account has the passed permissions flags set + * @param _account account address + * @param _permission the permissions flags (mask) to check whether enabled against base permissions for the account + * @return _result is whether account has the passed permissions flags set `, PermFlag: permission.HasBase, F: hasBase, }, Function{Comment: ` * @notice Sets the global (default) permissions flags for the entire chain - * @param Permission the permissions flags to set - * @param Set whether to set (or unset) the permissions flags - * @return The permission flag that was set as uint64 + * @param _permission the permissions flags to set + * @param _set whether to set (or unset) the permissions flags + * @return _result is the permission flag that was set as uint64 `, PermFlag: permission.SetGlobal, F: setGlobal, @@ -152,7 +152,8 @@ func setBase(ctx Context, args setBaseArgs) (setBaseRets, error) { return setBaseRets{}, permission.ErrInvalidPermission(permFlag) } err := UpdateAccount(ctx.State, args.Account, func(acc *acm.Account) error { - return acc.Permissions.Base.Set(permFlag, args.Set) + err := acc.Permissions.Base.Set(permFlag, args.Set) + return err }) if err != nil { return setBaseRets{}, err diff --git a/logging/logconfig/config.go b/logging/logconfig/config.go index 49341b6ef..0b913de90 100644 --- a/logging/logconfig/config.go +++ b/logging/logconfig/config.go @@ -101,7 +101,7 @@ func newLogger(loggingConfig *LoggingConfig) (log.Logger, channels.Channel, erro return nil, nil, err } var errCh channels.Channel = channels.NewDeadChannel() - var logger log.Logger = loggers.BurrowFormatLogger(outputLogger) + var logger log.Logger = loggers.NewBurrowFormatLogger(outputLogger) if loggingConfig.NonBlocking { logger, errCh = loggers.NonBlockingLogger(logger) return logger, errCh, nil diff --git a/logging/loggers/burrow_format_logger.go b/logging/loggers/burrow_format_logger.go index 2ee567edb..d89b304e5 100644 --- a/logging/loggers/burrow_format_logger.go +++ b/logging/loggers/burrow_format_logger.go @@ -22,7 +22,27 @@ import ( // we control and generic output loggers are unlikely to know about. type burrowFormatLogger struct { sync.Mutex - logger log.Logger + logger log.Logger + options opt +} + +type opt byte + +func (o opt) enabled(q opt) bool { + return o&q > 0 +} + +const ( + DefaultOptions opt = iota + StringifyValues +) + +func NewBurrowFormatLogger(logger log.Logger, options ...opt) *burrowFormatLogger { + bfl := &burrowFormatLogger{logger: logger} + for _, option := range options { + bfl.options |= option + } + return bfl } var _ log.Logger = &burrowFormatLogger{} @@ -42,7 +62,10 @@ func (bfl *burrowFormatLogger) Log(keyvals ...interface{}) error { case []byte: value = hex.EncodeUpperToString(v) } - return structure.StringifyKey(key), value + if bfl.options.enabled(StringifyValues) { + value = structure.Stringify(value) + } + return structure.Stringify(key), value }) if err != nil { return err @@ -51,7 +74,3 @@ func (bfl *burrowFormatLogger) Log(keyvals ...interface{}) error { defer bfl.Unlock() return bfl.logger.Log(keyvals...) } - -func BurrowFormatLogger(logger log.Logger) *burrowFormatLogger { - return &burrowFormatLogger{logger: logger} -} diff --git a/logging/loggers/stream_logger.go b/logging/loggers/stream_logger.go index ee5ef2252..4794a6a60 100644 --- a/logging/loggers/stream_logger.go +++ b/logging/loggers/stream_logger.go @@ -38,11 +38,7 @@ func NewLogfmtLogger(writer io.Writer) log.Logger { } func NewTerminalLogger(writer io.Writer) log.Logger { - logger := term.NewLogger(writer, log.NewLogfmtLogger, func(keyvals ...interface{}) term.FgBgColor { - kvm := structure.KeyValuesMap(keyvals) - delete(kvm, structure.TraceChannelName) - delete(kvm, structure.MessageKey) - delete(kvm, structure.TimeKey) + logger := term.NewLogger(writer, log.NewLogfmtLogger, func(keyvals ...interface{}) term.FgBgColor { switch structure.Value(keyvals, structure.ChannelKey) { case structure.TraceChannelName: return term.FgBgColor{Fg: term.DarkGreen} @@ -50,7 +46,7 @@ func NewTerminalLogger(writer io.Writer) log.Logger { return term.FgBgColor{Fg: term.Yellow} } }) - return interceptSync(writer, logger) + return interceptSync(writer,NewBurrowFormatLogger(logger, StringifyValues)) } func NewTemplateLogger(writer io.Writer, textTemplate string, recordSeparator []byte) (log.Logger, error) { diff --git a/logging/structure/structure.go b/logging/structure/structure.go index 841b51afc..6a1e3d02e 100644 --- a/logging/structure/structure.go +++ b/logging/structure/structure.go @@ -65,7 +65,7 @@ func ValuesAndContext(keyvals []interface{}, for k := 0; k < len(keys); k++ { if keyvals[i] == keys[k] { // Pull the matching key-value pair into vals to return - vals[StringifyKey(keys[k])] = keyvals[i+1] + vals[Stringify(keys[k])] = keyvals[i+1] // Delete the key once it's found keys = DeleteAt(keys, k) // And remove the key-value pair from context @@ -85,7 +85,7 @@ func KeyValuesMap(keyvals []interface{}) map[string]interface{} { length := len(keyvals) / 2 vals := make(map[string]interface{}, length) for i := 0; i < 2*length; i += 2 { - vals[StringifyKey(keyvals[i])] = keyvals[i+1] + vals[Stringify(keyvals[i])] = keyvals[i+1] } return vals } @@ -240,19 +240,19 @@ func DeleteAt(slice []interface{}, i int) []interface{} { } // Provides a canonical way to stringify keys -func StringifyKey(key interface{}) string { - switch key { +func Stringify(v interface{}) string { + switch v { // For named keys we want to handle explicitly default: // Stringify keys - switch k := key.(type) { + switch k := v.(type) { case string: return k case fmt.Stringer: return k.String() default: - return fmt.Sprint(key) + return fmt.Sprint(v) } } } diff --git a/permission/perm_flag_test.go b/permission/perm_flag_test.go index 75fe20504..8314dca9e 100644 --- a/permission/perm_flag_test.go +++ b/permission/perm_flag_test.go @@ -1,6 +1,7 @@ package permission import ( + "fmt" "testing" "github.com/stretchr/testify/assert" @@ -9,3 +10,11 @@ import ( func TestAllPermissions(t *testing.T) { assert.Equal(t, AllPermFlags, DefaultPermFlags|AddRole|RemoveRole|SetBase|UnsetBase|Root|SetGlobal|Proposal|Identify) } + +func TestName(t *testing.T) { + fmt.Println(PermFlagToStringList(PermFlag(59007))) + fmt.Println(PermFlagToStringList(PermFlag(8262))) + fmt.Println(PermFlagToStringList(PermFlag(8263))) + fmt.Println(PermFlagToStringList(DefaultPermFlags)) + fmt.Printf("%d\n", DefaultPermFlags) +} diff --git a/tests/chain/burrow.toml b/tests/chain/burrow.toml index 49d2dd8b2..0d3415065 100644 --- a/tests/chain/burrow.toml +++ b/tests/chain/burrow.toml @@ -1,16 +1,26 @@ BurrowDir = ".burrow" [Tendermint] + Enabled = true Seeds = "" + SeedMode = false PersistentPeers = "" - ListenHost = "0.0.0.0" - ListenPort = "36656" + ListenHost = "127.0.0.1" + ListenPort = "26656" ExternalAddress = "" - Moniker = "BurrowIntegrationTestNode" - CreateEmptyBlocks = "always" + AddrBookStrict = false + Moniker = "" + IdentifyPeers = false + AuthorizedPeers = "" + CreateEmptyBlocks = "5m" [Execution] - TimeoutFactor = 0.33 + TimeoutFactor = 0.2 + CallStackMaxDepth = 0 + DataStackInitialCapacity = 1024 + DataStackMaxDepth = 0 + # Uncomment for opcode splurge + # VMOptions = ["DebugOpcodes"] [Keys] GRPCServiceEnabled = true @@ -19,30 +29,34 @@ BurrowDir = ".burrow" KeysDirectory = "../keys" [RPC] - [RPC.TM] + [RPC.Info] Enabled = true ListenHost = "127.0.0.1" ListenPort = "36658" [RPC.Profiler] Enabled = false ListenHost = "127.0.0.1" - ListenPort = "7060" + ListenPort = "6060" [RPC.GRPC] Enabled = true ListenHost = "127.0.0.1" ListenPort = "20997" [RPC.Metrics] Enabled = false - ListenAddress = "127.0.0.1" - ListenPort = "10102" + ListenHost = "127.0.0.1" + ListenPort = "9102" MetricsPath = "/metrics" BlockSampleSize = 100 + [RPC.Web3] + Enabled = false + ListenHost = "127.0.0.1" + ListenPort = "26660" [Logging] - ExcludeTrace = false + Trace = false NonBlocking = false [Logging.RootSink] - [Logging.RootSink.Output] - OutputType = "stderr" - Format = "json" +# [Logging.RootSink.Output] +# OutputType = "stderr" +# Format = "json" diff --git a/tests/jobs_fixtures/app03-basic_and_advanced_permission_txs_and_queries/deploy.yaml b/tests/jobs_fixtures/app03-basic_and_advanced_permission_txs_and_queries/deploy.yaml index 4d6968337..06a167b45 100644 --- a/tests/jobs_fixtures/app03-basic_and_advanced_permission_txs_and_queries/deploy.yaml +++ b/tests/jobs_fixtures/app03-basic_and_advanced_permission_txs_and_queries/deploy.yaml @@ -1,3 +1,6 @@ +# Exclusive with app33 +no-parallel: true + jobs: - name: perm @@ -59,4 +62,4 @@ jobs: assert: key: $queryPerm2 relation: eq - val: 16454 + val: 32838 diff --git a/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/deploy.yaml b/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/deploy.yaml index a31967c25..0f0448252 100644 --- a/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/deploy.yaml +++ b/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/deploy.yaml @@ -1,3 +1,6 @@ +# Exclusive with app03 +no-parallel: true + jobs: - name: role @@ -69,8 +72,8 @@ jobs: - name: setRole call: destination: $deployPermK - function: addRole - data: + function: addRole + data: - $key2_addr - $role @@ -129,9 +132,9 @@ jobs: call: destination: $deployPermK function: hasBase - data: + data: - $key2_addr - - 59007 + - 35838 - name: assertBase2 assert: @@ -142,11 +145,11 @@ jobs: - name: setBase call: destination: $deployPermK - function: setBase + function: setBase data: - $key2_addr - - 8263 - - true + - 1 + - false - name: checkBase3 call: @@ -154,13 +157,13 @@ jobs: function: hasBase data: - $key2_addr - - 8263 + - 1 - name: assertBase3 assert: key: $checkBase3 relation: eq - val: "true" + val: "false" - name: unsetBase call: @@ -168,7 +171,7 @@ jobs: function: unsetBase data: - $key2_addr - - 8263 + - 1 - name: checkBase4 call: @@ -176,7 +179,7 @@ jobs: function: hasBase data: - $key2_addr - - 8263 + - 1 - name: assertBase4 assert: diff --git a/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/permissions.sol b/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/permissions.sol index 89fe90bb5..99a08e280 100644 --- a/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/permissions.sol +++ b/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/permissions.sol @@ -1,5 +1,37 @@ +pragma solidity >=0.4.24; -pragma solidity >=0.4.0; +contract permSNative { + Permissions perm = Permissions(address(uint256(keccak256("Permissions")))); + + function hasBase(address addr, uint64 permFlag) public returns (bool) { + return perm.hasBase(addr, permFlag); + } + + function setBase(address addr, uint64 permFlag, bool value) public returns (uint64) { + return perm.setBase(addr, permFlag, value); + } + + function unsetBase(address addr, uint64 permFlag) public returns (uint64) { + return perm.unsetBase(addr, permFlag); + } + + // not currently tested + function setGlobal(uint64 permFlag, bool value) public returns (int pf) { + return perm.setGlobal(permFlag, value); + } + + function hasRole(address addr, string memory role) public returns (bool val) { + return perm.hasRole(addr, role); + } + + function addRole(address addr, string memory role) public returns (bool added) { + return perm.addRole(addr, role); + } + + function removeRole(address addr, string memory role) public returns (bool removed) { + return perm.removeRole(addr, role); + } +} /** * Interface for managing Secure Native authorizations. @@ -7,96 +39,63 @@ pragma solidity >=0.4.0; * @dev These functions can be accessed as if this contract were deployed at a special address (0x0A758FEB535243577C1A79AE55BED8CA03E226EC). * @dev This special address is defined as the last 20 bytes of the sha3 hash of the the contract name. * @dev To instantiate the contract use: -* @dev Permissions permissions = Permissions(address(keccak256("Permissions"))); +* @dev Permissions permissions = Permissions(address(uint256(keccak256("Permissions")))); */ -contract Permissions { +interface Permissions { /** * @notice Adds a role to an account - * @param Account account address - * @param Role role name - * @return result whether role was added + * @param _account account address + * @param _role role name + * @return _result whether role was added */ - function addRole(address Account, string memory Role) public view returns (bool Result); + function addRole(address _account, string calldata _role) external returns (bool _result); /** * @notice Removes a role from an account - * @param Account account address - * @param Role role name - * @return result whether role was removed + * @param _account account address + * @param _role role name + * @return _result whether role was removed */ - function removeRole(address Account, string memory Role) public view returns (bool Result); + function removeRole(address _account, string calldata _role) external returns (bool _result); /** * @notice Indicates whether an account has a role - * @param Account account address - * @param Role role name - * @return result whether account has role + * @param _account account address + * @param _role role name + * @return _result whether account has role */ - function hasRole(address Account, string memory Role) public view returns (bool Result); + function hasRole(address _account, string calldata _role) external returns (bool _result); /** * @notice Sets the permission flags for an account. Makes them explicitly set (on or off). - * @param Account account address - * @param Permission the base permissions flags to set for the account - * @param Set whether to set or unset the permissions flags at the account level - * @return result the effective permissions flags on the account after the call + * @param _account account address + * @param _permission the base permissions flags to set for the account + * @param _set whether to set or unset the permissions flags at the account level + * @return _result is the permission flag that was set as uint64 */ - function setBase(address Account, uint64 Permission, bool Set) public view returns (uint64 Result); + function setBase(address _account, uint64 _permission, bool _set) external returns (uint64 _result); /** * @notice Unsets the permissions flags for an account. Causes permissions being unset to fall through to global permissions. - * @param Account account address - * @param Permission the permissions flags to unset for the account - * @return result the effective permissions flags on the account after the call + * @param _account account address + * @param _permission the permissions flags to unset for the account + * @return _result is the permission flag that was unset as uint64 */ - function unsetBase(address Account, uint64 Permission) public view returns (uint64 Result); + function unsetBase(address _account, uint64 _permission) external returns (uint64 _result); /** * @notice Indicates whether an account has a subset of permissions set - * @param Account account address - * @param Permission the permissions flags (mask) to check whether enabled against base permissions for the account - * @return result whether account has the passed permissions flags set + * @param _account account address + * @param _permission the permissions flags (mask) to check whether enabled against base permissions for the account + * @return _result is whether account has the passed permissions flags set */ - function hasBase(address Account, uint64 Permission) public view returns (bool Result); + function hasBase(address _account, uint64 _permission) external returns (bool _result); /** * @notice Sets the global (default) permissions flags for the entire chain - * @param Permission the permissions flags to set - * @param Set whether to set (or unset) the permissions flags - * @return result the global permissions flags after the call + * @param _permission the permissions flags to set + * @param _set whether to set (or unset) the permissions flags + * @return _result is the permission flag that was set as uint64 */ - function setGlobal(uint64 Permission, bool Set) public view returns (uint64 Result); -} - -contract permSNative { - Permissions perm = Permissions(address(uint256(keccak256("Permissions")))); - - function hasBase(address addr, uint64 permFlag) public view returns (bool) { - return perm.hasBase(addr, permFlag); - } - - function setBase(address addr, uint64 permFlag, bool value) public view returns (uint64) { - return perm.setBase(addr, permFlag, value); - } - - function unsetBase(address addr, uint64 permFlag) public view returns (uint64) { - return perm.unsetBase(addr, permFlag); - } - - // not currently tested - function setGlobal(uint64 permFlag, bool value) public view returns (int pf) { - return perm.setGlobal(permFlag, value); - } - - function hasRole(address addr, string memory role) public view returns (bool val) { - return perm.hasRole(addr, role); - } - - function addRole(address addr, string memory role) public view returns (bool added) { - return perm.addRole(addr, role); - } - - function removeRole(address addr, string memory role) public view returns (bool removed) { - return perm.removeRole(addr, role); - } + function setGlobal(uint64 _permission, bool _set) external returns (uint64 _result); } diff --git a/tests/jobs_fixtures/app48-govern-account/deploy.yaml b/tests/jobs_fixtures/app48-govern-account/deploy.yaml index 6bf5a2723..91c949762 100644 --- a/tests/jobs_fixtures/app48-govern-account/deploy.yaml +++ b/tests/jobs_fixtures/app48-govern-account/deploy.yaml @@ -1,3 +1,6 @@ +# Exclusive with app57 +no-parallel: true + jobs: # # Add validator @@ -43,7 +46,7 @@ jobs: query-vals: field: "Set.TotalPower" -- name: AssertPowerNonZero +- name: AssertPowerConserved assert: key: $PowerAfterRemoved relation: eq diff --git a/tests/jobs_fixtures/app52-proposal-execute/deploy.yaml b/tests/jobs_fixtures/app52-proposal-execute/deploy.yaml index 49d79d945..24b190300 100644 --- a/tests/jobs_fixtures/app52-proposal-execute/deploy.yaml +++ b/tests/jobs_fixtures/app52-proposal-execute/deploy.yaml @@ -10,7 +10,7 @@ jobs: - name: SystemAccount update-account: target: new() - native: 300 + native: 3001234 permissions: ["all"] - name: AssertSystemAccountCreated @@ -22,7 +22,7 @@ jobs: - name: DeployerAccount update-account: target: new() - native: 300 + native: 3001234 permissions: ["all"] - name: AssertDeployerAccountCreated diff --git a/tests/jobs_fixtures/app57-bond-unbond/deploy.yaml b/tests/jobs_fixtures/app57-bond-unbond/deploy.yaml index a33a1e7b7..da2cbbfe3 100644 --- a/tests/jobs_fixtures/app57-bond-unbond/deploy.yaml +++ b/tests/jobs_fixtures/app57-bond-unbond/deploy.yaml @@ -1,8 +1,11 @@ +# Exclusive with app48 +no-parallel: true + jobs: - name: power set: - val: 12345 + val: 1234 - name: Validator update-account: @@ -42,4 +45,4 @@ jobs: assert: key: $PowerAfterRemoved relation: eq - val: $InitialTotalPower \ No newline at end of file + val: $InitialTotalPower diff --git a/util/debug.go b/util/debug.go index 5e9e70cfa..1129df1c7 100644 --- a/util/debug.go +++ b/util/debug.go @@ -4,8 +4,8 @@ import "fmt" // If we ever want to ship some specific debug we could make this a string var and set it through -ldflags "-X ..." -//const debug = true -const debug = false +const debug = true +//const debug = false // Using this in place of Printf statements makes it easier to find any errant debug statements and the switch means // we can turn them off at minimal runtime cost. diff --git a/util/natives/templates/solidity_templates.go b/util/natives/templates/solidity_templates.go index 0aedc2401..a70870eea 100644 --- a/util/natives/templates/solidity_templates.go +++ b/util/natives/templates/solidity_templates.go @@ -29,7 +29,7 @@ interface [[.Name]] {[[range .Functions]] const functionTemplateText = `/** [[.Comment]] */ -function [[.Name]]([[.ArgList]]) public view returns ([[.RetList]]);` +function [[.Name]]([[.ArgList]]) external returns ([[.RetList]]);` // Solidity style guide recommends 4 spaces per indentation level // (see: http://solidity.readthedocs.io/en/develop/style-guide.html) @@ -129,7 +129,7 @@ func (function *solidityFunction) ArgList() string { for i, arg := range abi.Inputs { storage := "" if arg.EVM.Dynamic() { - storage = " memory" + storage = " calldata" } argList[i] = fmt.Sprintf("%s%s %s", arg.EVM.GetSignature(), storage, param(arg.Name)) } From c80f7bebe8664702cc52efd0426b1bb4a6ddb993 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Tue, 24 Mar 2020 20:06:20 +0000 Subject: [PATCH 104/185] Ensure execution caches are reset after state is updated Remove the Flush call that did not provide the appropriate behaviour. Also add resets to all caches not just some. This was a logical error but only actually caused an issues with the vaildatorCache which unlike other caches performs a copy on `Reset(backend)`. Getting the causality right here for the other caches should help avoid future bugs. Signed-off-by: Silas Davis --- acm/acmstate/metadata_cache.go | 8 ++------ acm/acmstate/state_cache.go | 10 ---------- acm/validator/cache.go | 5 +---- cmd/burrow/commands/deploy.go | 8 ++++---- deploy/def/deploy.go | 1 - deploy/def/playbook.go | 2 +- execution/contexts/bond_context.go | 3 --- execution/contexts/call_context.go | 3 ++- execution/contexts/unbond_context.go | 4 ---- execution/execution.go | 20 ++++++++++++++------ execution/names/cache.go | 10 ---------- execution/proposal/cache.go | 10 ---------- execution/registry/cache.go | 10 ---------- logging/loggers/stream_logger.go | 4 ++-- util/debug.go | 4 ++-- 15 files changed, 28 insertions(+), 74 deletions(-) diff --git a/acm/acmstate/metadata_cache.go b/acm/acmstate/metadata_cache.go index acbe60a05..34fdb8308 100644 --- a/acm/acmstate/metadata_cache.go +++ b/acm/acmstate/metadata_cache.go @@ -55,13 +55,9 @@ func (cache *MetadataCache) Sync(st MetadataWriter) error { return nil } -func (cache *MetadataCache) Flush(output MetadataWriter, backend MetadataReader) error { - err := cache.Sync(output) - if err != nil { - return err - } +func (cache *MetadataCache) Reset(backend MetadataReader) { + cache.backend = backend cache.m = sync.Map{} - return nil } // Get the cache accountInfo item creating it if necessary diff --git a/acm/acmstate/state_cache.go b/acm/acmstate/state_cache.go index e6fac7fdb..59e364c64 100644 --- a/acm/acmstate/state_cache.go +++ b/acm/acmstate/state_cache.go @@ -250,16 +250,6 @@ func (cache *Cache) Reset(backend Reader) { cache.accounts = make(map[crypto.Address]*accountInfo, len(cache.accounts)) } -// Syncs the Cache to output and Resets it to use backend as Reader -func (cache *Cache) Flush(output Writer, backend Reader) error { - err := cache.Sync(output) - if err != nil { - return err - } - cache.Reset(backend) - return nil -} - func (cache *Cache) String() string { if cache.name == "" { return fmt.Sprintf("StateCache{Length: %v}", len(cache.accounts)) diff --git a/acm/validator/cache.go b/acm/validator/cache.go index 698a42adb..972d9b3a5 100644 --- a/acm/validator/cache.go +++ b/acm/validator/cache.go @@ -4,7 +4,6 @@ import ( "math/big" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/util" ) // Cache is just a Ring with no memory @@ -22,8 +21,7 @@ func (vc *Cache) Reset(backend Iterable) { vc.Bucket = NewBucket(backend) } -func (vc *Cache) Flush(output Writer, backend Iterable) error { - util.Debugf("Flushing validators...") +func (vc *Cache) Sync(output Writer) error { err := vc.Delta.IterateValidators(func(id crypto.Addressable, power *big.Int) error { _, err := output.SetPower(id.GetPublicKey(), power) return err @@ -31,6 +29,5 @@ func (vc *Cache) Flush(output Writer, backend Iterable) error { if err != nil { return err } - vc.Reset(backend) return nil } diff --git a/cmd/burrow/commands/deploy.go b/cmd/burrow/commands/deploy.go index 84ef74303..309c74db7 100644 --- a/cmd/burrow/commands/deploy.go +++ b/cmd/burrow/commands/deploy.go @@ -50,9 +50,9 @@ func Deploy(output Output) func(cmd *cli.Cmd) { addressOpt := cmd.StringOpt("a address", "", "default address (or account name) to use; operates the same way as the [account] job, only before the deploy file is ran") - defaultFeeOpt := cmd.StringOpt("n fee", "9999", "default fee to use") + defaultFeeOpt := cmd.StringOpt("n fee", "99", "default fee to use") - defaultAmountOpt := cmd.StringOpt("m amount", "9999", + defaultAmountOpt := cmd.StringOpt("m amount", "99", "default amount to use") verboseOpt := cmd.BoolOpt("v verbose", false, "verbose output") @@ -116,11 +116,11 @@ func Deploy(output Output) func(cmd *cli.Cmd) { args.ProposeVerify = *proposalVerify args.ProposeVote = *proposalVote args.ProposeCreate = *proposalCreate - stderrLogger, err := loggers.NewStreamLogger(os.Stderr, loggers.TerminalFormat) + stdoutLogger, err := loggers.NewStreamLogger(os.Stdout, loggers.TerminalFormat) if err != nil { output.Fatalf("Could not make logger: %v", err) } - logger := logging.NewLogger(stderrLogger) + logger := logging.NewLogger(stdoutLogger) handleTerm() if !*debugOpt { diff --git a/deploy/def/deploy.go b/deploy/def/deploy.go index e9d2118ed..7495b2e43 100644 --- a/deploy/def/deploy.go +++ b/deploy/def/deploy.go @@ -38,4 +38,3 @@ func (args *DeployArgs) Validate() error { validation.Field(&args.DefaultGas, rule.Uint64), ) } - diff --git a/deploy/def/playbook.go b/deploy/def/playbook.go index b16ee15fa..99a79bac2 100644 --- a/deploy/def/playbook.go +++ b/deploy/def/playbook.go @@ -1,6 +1,6 @@ package def -import "github.com/go-ozzo/ozzo-validation" +import validation "github.com/go-ozzo/ozzo-validation" type Playbook struct { Filename string diff --git a/execution/contexts/bond_context.go b/execution/contexts/bond_context.go index 54dd22275..c79c3e169 100644 --- a/execution/contexts/bond_context.go +++ b/execution/contexts/bond_context.go @@ -10,7 +10,6 @@ import ( "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/txs/payload" - "github.com/hyperledger/burrow/util" ) type BondContext struct { @@ -60,8 +59,6 @@ func (ctx *BondContext) Execute(txe *exec.TxExecution, p payload.Payload) error return err } - cache := ctx.ValidatorSet.(*validator.Cache) - util.Debugf("%v", cache.Bucket) // assume public key is know as we update account from signatures err = validator.AddPower(ctx.ValidatorSet, account.PublicKey, power) if err != nil { diff --git a/execution/contexts/call_context.go b/execution/contexts/call_context.go index 92ab28228..693653ffa 100644 --- a/execution/contexts/call_context.go +++ b/execution/contexts/call_context.go @@ -72,7 +72,8 @@ func (ctx *CallContext) Precheck() (*acm.Account, *acm.Account, error) { err = inAcc.SubtractFromBalance(ctx.tx.Fee) if err != nil { return nil, nil, errors.Errorf(errors.Codes.InsufficientFunds, - "Input account does not have sufficient balance to cover input amount: %v", ctx.tx.Input) + "Input account %v (balance: %d) does not have sufficient balance to cover input amount: %v", + inAcc.Address, inAcc.Balance, ctx.tx.Input) } // Calling a nil destination is defined as requesting contract creation diff --git a/execution/contexts/unbond_context.go b/execution/contexts/unbond_context.go index c2c6fed7c..31d551903 100644 --- a/execution/contexts/unbond_context.go +++ b/execution/contexts/unbond_context.go @@ -9,7 +9,6 @@ import ( "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/txs/payload" - "github.com/hyperledger/burrow/util" ) type UnbondContext struct { @@ -42,9 +41,6 @@ func (ctx *UnbondContext) Execute(txe *exec.TxExecution, p payload.Payload) erro return err } - util.Debugf("unbonding %v", power) - cache := ctx.ValidatorSet.(*validator.Cache) - util.Debugf("%v", cache.Bucket) err = validator.SubtractPower(ctx.ValidatorSet, account.PublicKey, power) if err != nil { return err diff --git a/execution/execution.go b/execution/execution.go index a9cbd0665..8ad6ebe52 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -355,27 +355,27 @@ func (exe *executor) Commit(header *abciTypes.Header) (stateHash []byte, err err // that nothing in the downstream commit process could have failed. At worst we go back one block. hash, version, err := exe.state.Update(func(ws state.Updatable) error { // flush the caches - err := exe.stateCache.Flush(ws, exe.state) + err := exe.stateCache.Sync(ws) if err != nil { return err } - err = exe.metadataCache.Flush(ws, exe.state) + err = exe.metadataCache.Sync(ws) if err != nil { return err } - err = exe.nameRegCache.Flush(ws, exe.state) + err = exe.nameRegCache.Sync(ws) if err != nil { return err } - err = exe.nodeRegCache.Flush(ws, exe.state) + err = exe.nodeRegCache.Sync(ws) if err != nil { return err } - err = exe.proposalRegCache.Flush(ws, exe.state) + err = exe.proposalRegCache.Sync(ws) if err != nil { return err } - err = exe.validatorCache.Flush(ws, exe.state) + err = exe.validatorCache.Sync(ws) if err != nil { return err } @@ -388,6 +388,12 @@ func (exe *executor) Commit(header *abciTypes.Header) (stateHash []byte, err err if err != nil { return nil, err } + // Complete flushing of caches by resetting them to the state we have just committed + err = exe.Reset() + if err != nil { + return nil, err + } + expectedHeight := HeightAtVersion(version) if expectedHeight != height { return nil, fmt.Errorf("expected height at state tree version %d is %d but actual height is %d", @@ -401,7 +407,9 @@ func (exe *executor) Commit(header *abciTypes.Header) (stateHash []byte, err err func (exe *executor) Reset() error { // As with Commit() we do not take the write lock here exe.stateCache.Reset(exe.state) + exe.metadataCache.Reset(exe.state) exe.nameRegCache.Reset(exe.state) + exe.nodeRegCache.Reset(exe.state) exe.proposalRegCache.Reset(exe.state) exe.validatorCache.Reset(exe.state) return nil diff --git a/execution/names/cache.go b/execution/names/cache.go index a2602038b..81dc72517 100644 --- a/execution/names/cache.go +++ b/execution/names/cache.go @@ -120,16 +120,6 @@ func (cache *Cache) Reset(backend Reader) { cache.names = make(map[string]*nameInfo) } -// Syncs the Cache and Resets it to use Writer as the backend Reader -func (cache *Cache) Flush(output Writer, backend Reader) error { - err := cache.Sync(output) - if err != nil { - return err - } - cache.Reset(backend) - return nil -} - func (cache *Cache) Backend() Reader { return cache.backend } diff --git a/execution/proposal/cache.go b/execution/proposal/cache.go index 61fedb968..7784582a9 100644 --- a/execution/proposal/cache.go +++ b/execution/proposal/cache.go @@ -145,16 +145,6 @@ func (cache *Cache) Reset(backend Reader) { cache.proposals = make(map[[sha256.Size]byte]*proposalInfo) } -// Syncs the Cache and Resets it to use Writer as the backend Reader -func (cache *Cache) Flush(output Writer, backend Reader) error { - err := cache.Sync(output) - if err != nil { - return err - } - cache.Reset(backend) - return nil -} - func (cache *Cache) Backend() Reader { return cache.backend } diff --git a/execution/registry/cache.go b/execution/registry/cache.go index 46cac74d0..8dbb1099e 100644 --- a/execution/registry/cache.go +++ b/execution/registry/cache.go @@ -125,16 +125,6 @@ func (cache *Cache) Reset(backend Reader) { cache.registry = make(map[crypto.Address]*nodeInfo) } -// Syncs the Cache and Resets it to use Writer as the backend Reader -func (cache *Cache) Flush(output Writer, backend Reader) error { - err := cache.Sync(output) - if err != nil { - return err - } - cache.Reset(backend) - return nil -} - func (cache *Cache) Backend() Reader { return cache.backend } diff --git a/logging/loggers/stream_logger.go b/logging/loggers/stream_logger.go index 4794a6a60..98a485b1c 100644 --- a/logging/loggers/stream_logger.go +++ b/logging/loggers/stream_logger.go @@ -38,7 +38,7 @@ func NewLogfmtLogger(writer io.Writer) log.Logger { } func NewTerminalLogger(writer io.Writer) log.Logger { - logger := term.NewLogger(writer, log.NewLogfmtLogger, func(keyvals ...interface{}) term.FgBgColor { + logger := term.NewLogger(writer, log.NewLogfmtLogger, func(keyvals ...interface{}) term.FgBgColor { switch structure.Value(keyvals, structure.ChannelKey) { case structure.TraceChannelName: return term.FgBgColor{Fg: term.DarkGreen} @@ -46,7 +46,7 @@ func NewTerminalLogger(writer io.Writer) log.Logger { return term.FgBgColor{Fg: term.Yellow} } }) - return interceptSync(writer,NewBurrowFormatLogger(logger, StringifyValues)) + return interceptSync(writer, NewBurrowFormatLogger(logger, StringifyValues)) } func NewTemplateLogger(writer io.Writer, textTemplate string, recordSeparator []byte) (log.Logger, error) { diff --git a/util/debug.go b/util/debug.go index 1129df1c7..5e9e70cfa 100644 --- a/util/debug.go +++ b/util/debug.go @@ -4,8 +4,8 @@ import "fmt" // If we ever want to ship some specific debug we could make this a string var and set it through -ldflags "-X ..." -const debug = true -//const debug = false +//const debug = true +const debug = false // Using this in place of Printf statements makes it easier to find any errant debug statements and the switch means // we can turn them off at minimal runtime cost. From 6a330892056c325b65bacd80d757d4a68e096828 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 9 Mar 2020 17:50:23 -0600 Subject: [PATCH 105/185] Assert continuity when reassmbling blocks, transactions, and events from StreamEvents. When serialising BlockExecutions into StreamEvents it is possible that we do not detect dropped SteamEvents when deserialising (consuming) the SteamEvents later. This PR makes the StreamEvent consumers, namely: ConsumeBlockExecutions, BlockAccumulator, and TxStack throw errors if there is an incorrect number of events streamed within each container (BlockExecution or TxExecution). To do this a checksum NumTxs and NumEvents is added to BeginBlock and BeginTx respectively. This allows Vent to crash if it sees an invalid stream (for example due to messages being dropped due to load on Burrow's event emitter) or a transport issue. Vent can then restart from its previous good offset. Annoyance: I had to add in Predecessor to the BlockExecution and BeginBlock messages in order to track the previous _expected_ block since we do not store empty blocks in state to avoid changing the AppHash (which itself is just a workaround for an outstanding issue in tendermint https://github.com/tendermint/tendermint/issues/1909) This PR was in response to suspected event drops in Vent in production. Signed-off-by: Silas Davis --- core/kernel.go | 11 +- dump/dump.go | 3 +- dump/load_test.go | 3 +- execution/exec/block_execution.go | 6 +- execution/exec/event_test.go | 2 - execution/exec/exec.pb.go | 315 +++++++++++++----- execution/exec/stream_event.go | 145 ++++++-- execution/exec/stream_event_test.go | 23 +- execution/exec/tx_execution.go | 1 + execution/execution.go | 29 +- execution/execution_test.go | 49 ++- execution/state/events.go | 62 +++- execution/state/events_test.go | 129 ++++--- forensics/replay.go | 9 +- forensics/replay_test.go | 3 +- forensics/revert_test.go | 2 +- .../rpcevents/execution_events_server_test.go | 2 +- js/proto/exec_pb.d.ts | 16 + js/proto/exec_pb.js | 120 +++++++ js/proto/txs_pb.d.ts | 10 +- js/proto/txs_pb.js | 24 +- protobuf/exec.proto | 10 +- protobuf/txs.proto | 4 +- rpc/eth.go | 2 +- rpc/rpcevents/blocks.go | 6 +- rpc/rpcevents/execution_events_server.go | 20 +- storage/kvstore.go | 2 +- storage/sort_order.go | 8 + .../app57-bond-unbond/deploy.yaml | 7 +- .../app57-bond-unbond/storage.sol | 14 + txs/envelope.go | 4 +- txs/tx.go | 2 +- txs/tx_test.go | 1 - txs/txs.pb.go | 110 +++--- vent/service/block_consumer.go | 18 +- vent/service/consumer_integration_test.go | 7 +- 36 files changed, 856 insertions(+), 323 deletions(-) create mode 100644 storage/sort_order.go create mode 100644 tests/jobs_fixtures/app57-bond-unbond/storage.sol diff --git a/core/kernel.go b/core/kernel.go index e61e2b773..cb4f60371 100644 --- a/core/kernel.go +++ b/core/kernel.go @@ -142,8 +142,15 @@ func (kern *Kernel) LoadState(genesisDoc *genesis.GenesisDoc) (err error) { kern.Logger.InfoMsg("State loading successful") params := execution.ParamsFromGenesis(genesisDoc) - kern.checker = execution.NewBatchChecker(kern.State, params, kern.Blockchain, kern.Logger) - kern.committer = execution.NewBatchCommitter(kern.State, params, kern.Blockchain, kern.Emitter, kern.Logger, kern.exeOptions...) + kern.checker, err = execution.NewBatchChecker(kern.State, params, kern.Blockchain, kern.Logger) + if err != nil { + return fmt.Errorf("could not create BatchChecker: %w", err) + } + kern.committer, err = execution.NewBatchCommitter(kern.State, params, kern.Blockchain, kern.Emitter, kern.Logger, + kern.exeOptions...) + if err != nil { + return fmt.Errorf("could not create BatchCommitter: %w", err) + } return nil } diff --git a/dump/dump.go b/dump/dump.go index b80082884..3dc403428 100644 --- a/dump/dump.go +++ b/dump/dump.go @@ -14,6 +14,7 @@ import ( "github.com/hyperledger/burrow/execution/names" "github.com/hyperledger/burrow/execution/state" "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/storage" ) const ( @@ -164,7 +165,7 @@ func (ds *Dumper) Transmit(sink Sink, startHeight, endHeight uint64, options Opt var origin *exec.Origin // Only return events from specified start height - allows for resume - err = ds.state.IterateStreamEvents(&startHeight, &endHeight, + err = ds.state.IterateStreamEvents(&startHeight, &endHeight, storage.AscendingSort, func(ev *exec.StreamEvent) error { switch { case ev.BeginBlock != nil: diff --git a/dump/load_test.go b/dump/load_test.go index dfbd20a9d..e50f800a7 100644 --- a/dump/load_test.go +++ b/dump/load_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/hyperledger/burrow/bcm" + "github.com/hyperledger/burrow/storage" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/state" @@ -64,7 +65,7 @@ func TestLoadAndDump(t *testing.T) { require.NoError(t, err) } - err = st.IterateStreamEvents(nil, nil, func(se *exec.StreamEvent) error { + err = st.IterateStreamEvents(nil, nil, storage.AscendingSort, func(se *exec.StreamEvent) error { if se.BeginTx != nil { require.Equal(t, se.BeginTx.TxHeader.Origin.Height, uint64(5)) require.Equal(t, se.BeginTx.TxHeader.Origin.Index, uint64(2)) diff --git a/execution/exec/block_execution.go b/execution/exec/block_execution.go index 0a445f247..6f05c81cf 100644 --- a/execution/exec/block_execution.go +++ b/execution/exec/block_execution.go @@ -18,8 +18,10 @@ func (be *BlockExecution) StreamEvents() []*StreamEvent { var ses []*StreamEvent ses = append(ses, &StreamEvent{ BeginBlock: &BeginBlock{ - Height: be.Height, - Header: be.Header, + Height: be.Height, + PredecessorHeight: be.PredecessorHeight, + NumTxs: uint64(len(be.TxExecutions)), + Header: be.Header, }, }) for _, txe := range be.TxExecutions { diff --git a/execution/exec/event_test.go b/execution/exec/event_test.go index f57b2ed88..775410347 100644 --- a/execution/exec/event_test.go +++ b/execution/exec/event_test.go @@ -56,8 +56,6 @@ func TestEventTagQueries(t *testing.T) { require.NoError(t, err) assert.True(t, qry.Matches(ev)) require.NoError(t, qry.MatchError()) - - t.Logf("Query: %v", qry) } func BenchmarkMatching(b *testing.B) { diff --git a/execution/exec/exec.pb.go b/execution/exec/exec.pb.go index f54e15d6a..c78eb865f 100644 --- a/execution/exec/exec.pb.go +++ b/execution/exec/exec.pb.go @@ -170,7 +170,11 @@ func (*StreamEvent) XXX_MessageName() string { type BeginBlock struct { // The height of this block - Height uint64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"` + Height uint64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"` + // The number of transactions in the block (used as a checksum when consuming StreamEvents) + NumTxs uint64 `protobuf:"varint,3,opt,name=NumTxs,proto3" json:"NumTxs,omitempty"` + // The height of the most recent block we stored in state (which is the last non-empty block in current implementation) + PredecessorHeight uint64 `protobuf:"varint,4,opt,name=PredecessorHeight,proto3" json:"PredecessorHeight,omitempty"` Header *types.Header `protobuf:"bytes,2,opt,name=Header,proto3" json:"Header,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -213,6 +217,20 @@ func (m *BeginBlock) GetHeight() uint64 { return 0 } +func (m *BeginBlock) GetNumTxs() uint64 { + if m != nil { + return m.NumTxs + } + return 0 +} + +func (m *BeginBlock) GetPredecessorHeight() uint64 { + if m != nil { + return m.PredecessorHeight + } + return 0 +} + func (m *BeginBlock) GetHeader() *types.Header { if m != nil { return m.Header @@ -273,6 +291,8 @@ func (*EndBlock) XXX_MessageName() string { type BeginTx struct { TxHeader *TxHeader `protobuf:"bytes,1,opt,name=TxHeader,proto3" json:"TxHeader,omitempty"` + // The number of events generated by this transaction execution (used as a checksum when consuming StreamEvents) + NumEvents uint64 `protobuf:"varint,5,opt,name=NumEvents,proto3" json:"NumEvents,omitempty"` // Result of tx execution Result *Result `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"` // If tx execution was an exception @@ -318,6 +338,13 @@ func (m *BeginTx) GetTxHeader() *TxHeader { return nil } +func (m *BeginTx) GetNumEvents() uint64 { + if m != nil { + return m.NumEvents + } + return 0 +} + func (m *BeginTx) GetResult() *Result { if m != nil { return m.Result @@ -382,7 +409,7 @@ type TxHeader struct { TxType github_com_hyperledger_burrow_txs_payload.Type `protobuf:"varint,1,opt,name=TxType,proto3,casttype=github.com/hyperledger/burrow/txs/payload.Type" json:"TxType,omitempty"` // The hash of the transaction that caused this event to be generated TxHash github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,2,opt,name=TxHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"TxHash"` - // The block height at which this Tx was included + // The block height at which this transaction was included Height uint64 `protobuf:"varint,3,opt,name=Height,proto3" json:"Height,omitempty"` // The index of this transaction within the block Index uint64 `protobuf:"varint,4,opt,name=Index,proto3" json:"Index,omitempty"` @@ -456,7 +483,9 @@ func (*TxHeader) XXX_MessageName() string { type BlockExecution struct { // The height of this block - Height uint64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"` + Height uint64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"` + // The height of the most recent block we stored in state (which is the last non-empty block in current implementation) + PredecessorHeight uint64 `protobuf:"varint,4,opt,name=PredecessorHeight,proto3" json:"PredecessorHeight,omitempty"` Header *types.Header `protobuf:"bytes,2,opt,name=Header,proto3" json:"Header,omitempty"` TxExecutions []*TxExecution `protobuf:"bytes,3,rep,name=TxExecutions,proto3" json:"TxExecutions,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -500,6 +529,13 @@ func (m *BlockExecution) GetHeight() uint64 { return 0 } +func (m *BlockExecution) GetPredecessorHeight() uint64 { + if m != nil { + return m.PredecessorHeight + } + return 0 +} + func (m *BlockExecution) GetHeader() *types.Header { if m != nil { return m.Header @@ -1331,87 +1367,90 @@ func init() { proto.RegisterFile("exec.proto", fileDescriptor_4d737c7315c25422) func init() { golang_proto.RegisterFile("exec.proto", fileDescriptor_4d737c7315c25422) } var fileDescriptor_4d737c7315c25422 = []byte{ - // 1275 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x93, 0x13, 0xc5, - 0x17, 0x67, 0x92, 0xc9, 0xaf, 0x4e, 0x96, 0x2f, 0x74, 0xf1, 0xa5, 0x52, 0x1c, 0x12, 0x1c, 0x14, - 0x11, 0x61, 0x42, 0xad, 0xa2, 0x16, 0x56, 0x59, 0x12, 0x36, 0xc2, 0x0a, 0x82, 0x36, 0x01, 0x4b, - 0x4b, 0x0f, 0x93, 0x99, 0x66, 0x32, 0x45, 0x32, 0x33, 0x35, 0xd3, 0xc1, 0xc9, 0x3f, 0xe0, 0xc1, - 0xf2, 0xa0, 0x37, 0xbc, 0x58, 0xfc, 0x1f, 0x5e, 0x3c, 0xee, 0x4d, 0x8e, 0x16, 0x87, 0x68, 0x2d, - 0x7f, 0x81, 0xe5, 0xc9, 0x3d, 0x59, 0xdd, 0xfd, 0x7a, 0xd2, 0x23, 0xcb, 0x2e, 0x65, 0xf6, 0xe0, - 0x25, 0xd5, 0xef, 0xbd, 0x4f, 0xbf, 0xbc, 0x7e, 0xef, 0xf3, 0xde, 0x1b, 0x84, 0x68, 0x46, 0x5d, - 0x3b, 0x4e, 0x22, 0x16, 0x61, 0x93, 0x9f, 0x4f, 0x9c, 0xf7, 0x03, 0x36, 0x9e, 0x8d, 0x6c, 0x37, - 0x9a, 0xf6, 0xfc, 0xc8, 0x8f, 0x7a, 0xc2, 0x38, 0x9a, 0xdd, 0x13, 0x92, 0x10, 0xc4, 0x49, 0x5e, - 0x3a, 0xf1, 0xb6, 0x06, 0x67, 0x34, 0xf4, 0x68, 0x32, 0x0d, 0x42, 0xa6, 0x1f, 0x9d, 0x91, 0x1b, - 0xf4, 0xd8, 0x3c, 0xa6, 0xa9, 0xfc, 0x85, 0x8b, 0x5d, 0x3f, 0x8a, 0xfc, 0x09, 0x5d, 0xba, 0x67, - 0xc1, 0x94, 0xa6, 0xcc, 0x99, 0xc6, 0x00, 0x68, 0xd1, 0x24, 0x89, 0x12, 0x05, 0x6f, 0x86, 0xce, - 0x34, 0xbf, 0xdb, 0x60, 0x99, 0x3a, 0x1e, 0x89, 0xf9, 0xdf, 0xa4, 0x69, 0x10, 0x85, 0xa0, 0x41, - 0x69, 0xac, 0x9e, 0x64, 0x0d, 0x50, 0xeb, 0x36, 0x4b, 0xa8, 0x33, 0x1d, 0x3c, 0xa0, 0x21, 0x4b, - 0xf1, 0xc5, 0xa2, 0xdc, 0x36, 0x4e, 0x96, 0xcf, 0x34, 0xd7, 0x8f, 0xda, 0x22, 0x0b, 0x9a, 0x85, - 0x14, 0x60, 0xd6, 0x4f, 0x25, 0xd4, 0xd4, 0x14, 0xf8, 0x02, 0x42, 0x7d, 0xea, 0x07, 0x61, 0x7f, - 0x12, 0xb9, 0xf7, 0xdb, 0xc6, 0x49, 0xe3, 0x4c, 0x73, 0xfd, 0x88, 0x74, 0xb2, 0xd4, 0x13, 0x0d, - 0x83, 0x5f, 0x45, 0x35, 0x21, 0x0d, 0xb3, 0x76, 0x49, 0xc0, 0xd7, 0x34, 0xf8, 0x30, 0x23, 0xca, - 0x8a, 0x3f, 0x43, 0xf5, 0x41, 0xf8, 0x80, 0x4e, 0xa2, 0x98, 0xb6, 0xcb, 0x80, 0xe4, 0xaf, 0x55, - 0xca, 0xbe, 0xfd, 0x64, 0xd1, 0x3d, 0xab, 0x25, 0x7d, 0x3c, 0x8f, 0x69, 0x32, 0xa1, 0x9e, 0x4f, - 0x93, 0xde, 0x68, 0x96, 0x24, 0xd1, 0x57, 0x3d, 0x1d, 0x4f, 0x72, 0x77, 0xf8, 0x25, 0x54, 0x11, - 0xe1, 0xb7, 0x4d, 0xe1, 0xb7, 0x29, 0x23, 0x90, 0xef, 0x95, 0x16, 0x01, 0x09, 0xbd, 0x61, 0xd6, - 0xae, 0x14, 0x20, 0x5c, 0x45, 0xa4, 0x05, 0x9f, 0xe5, 0x01, 0x7a, 0xf2, 0xe5, 0x55, 0x81, 0x3a, - 0x9c, 0xa3, 0xe4, 0xbb, 0x73, 0xfb, 0x25, 0x73, 0xeb, 0x51, 0xd7, 0xb0, 0xae, 0xeb, 0xd9, 0xc2, - 0xc7, 0x51, 0xf5, 0x1a, 0x0d, 0xfc, 0x31, 0x13, 0x79, 0x33, 0x09, 0x48, 0xf8, 0x15, 0xae, 0x77, - 0x3c, 0x9a, 0xe4, 0x09, 0x92, 0x6c, 0x91, 0x4a, 0x02, 0x46, 0xcb, 0x5a, 0xfe, 0xfd, 0xf3, 0x5c, - 0x59, 0xdf, 0x1a, 0x79, 0xb6, 0x79, 0xb8, 0xc3, 0x0c, 0x1c, 0x1b, 0x7a, 0xb8, 0x4a, 0x4b, 0x72, - 0x3b, 0x7e, 0x19, 0x55, 0x09, 0x4d, 0x67, 0x13, 0x06, 0x21, 0xb4, 0x24, 0x52, 0xea, 0x08, 0xd8, - 0x70, 0x0f, 0x35, 0x06, 0x99, 0x4b, 0x63, 0x16, 0x44, 0x21, 0xa4, 0xf2, 0xa8, 0x0d, 0x5c, 0xcd, - 0x0d, 0x64, 0x89, 0xb1, 0xee, 0x42, 0x52, 0xf1, 0x47, 0xa8, 0x3a, 0xcc, 0xae, 0x39, 0xe9, 0x58, - 0x54, 0xb6, 0xd5, 0xbf, 0xb8, 0xb5, 0xe8, 0x1e, 0x7a, 0xb2, 0xe8, 0x9e, 0xdf, 0xbb, 0x9c, 0xa3, - 0x20, 0x74, 0x92, 0xb9, 0x7d, 0x8d, 0x66, 0xfd, 0x39, 0xa3, 0x29, 0x01, 0x27, 0xd6, 0x5f, 0xc6, - 0xf2, 0x6d, 0xf8, 0x43, 0xee, 0x7b, 0x38, 0x8f, 0xa9, 0x78, 0xe5, 0x5a, 0x7f, 0x7d, 0x67, 0xd1, - 0xb5, 0xf7, 0xa5, 0x49, 0x2f, 0x76, 0xe6, 0x93, 0xc8, 0xf1, 0x6c, 0x7e, 0x93, 0x80, 0x07, 0x2d, - 0xce, 0xd2, 0x01, 0xc4, 0xa9, 0x95, 0xa9, 0x5c, 0xa8, 0xf8, 0x31, 0x54, 0xd9, 0x0c, 0x3d, 0x9a, - 0x89, 0x24, 0x9a, 0x44, 0x0a, 0xbc, 0x08, 0xb7, 0x92, 0xc0, 0x0f, 0x42, 0xe0, 0x20, 0x14, 0x41, - 0xea, 0x08, 0xd8, 0xac, 0xaf, 0x0d, 0x74, 0x58, 0x90, 0x60, 0x90, 0x51, 0x77, 0xc6, 0xd3, 0xbc, - 0x22, 0xb1, 0xf8, 0x68, 0x18, 0x66, 0xb9, 0xb7, 0xb4, 0x5d, 0xd6, 0x47, 0x83, 0x66, 0x21, 0x05, - 0x98, 0xf5, 0x3e, 0x3a, 0xac, 0xc9, 0xd7, 0xe9, 0xfc, 0xb9, 0x71, 0x1c, 0x47, 0xd5, 0x5b, 0xf7, - 0xee, 0xa5, 0x54, 0xb2, 0xcb, 0x24, 0x20, 0x59, 0x7f, 0x94, 0x50, 0x53, 0x73, 0x81, 0xcf, 0xe5, - 0xf1, 0xee, 0xca, 0xd7, 0xbe, 0xf9, 0x78, 0xd1, 0x35, 0xf2, 0xb0, 0xf5, 0x79, 0x51, 0x3d, 0xd8, - 0x79, 0x71, 0x0a, 0x55, 0x61, 0x4c, 0xd6, 0x44, 0x2e, 0x0a, 0x03, 0x03, 0x4c, 0x5a, 0xcf, 0xd4, - 0xf7, 0xe8, 0x99, 0xd3, 0xa8, 0x46, 0xa8, 0x4b, 0x83, 0x98, 0xb5, 0x1b, 0x00, 0xe3, 0x7f, 0x0a, - 0x3a, 0xa2, 0x8c, 0xc5, 0xde, 0x42, 0xfb, 0xf7, 0xd6, 0x33, 0x55, 0x6b, 0xbe, 0x58, 0xd5, 0xbe, - 0x31, 0x14, 0xcb, 0x70, 0x1b, 0xd5, 0xae, 0x8c, 0x9d, 0x20, 0xdc, 0xdc, 0x10, 0xf9, 0x6e, 0x10, - 0x25, 0x6a, 0x85, 0x2c, 0xed, 0xce, 0xdb, 0xb2, 0xce, 0xdb, 0x77, 0x90, 0x39, 0x0c, 0xa6, 0x14, - 0x26, 0xc2, 0x09, 0x5b, 0xae, 0x37, 0x5b, 0xad, 0x37, 0x7b, 0xa8, 0xd6, 0x5b, 0xbf, 0xce, 0xdb, - 0xe9, 0xbb, 0xdf, 0xba, 0x06, 0x11, 0x37, 0xac, 0x5f, 0x4a, 0xaa, 0xe2, 0xff, 0xe5, 0x2e, 0x7e, - 0x1d, 0x35, 0x44, 0xc9, 0x45, 0x74, 0x65, 0x11, 0xdd, 0xda, 0xce, 0xa2, 0xbb, 0x54, 0x92, 0xe5, - 0x91, 0x27, 0x55, 0x08, 0x9b, 0x1b, 0x22, 0x1f, 0x0d, 0xa2, 0x44, 0x2d, 0xa9, 0x95, 0xdd, 0x93, - 0x5a, 0xd5, 0x93, 0x5a, 0xe0, 0x43, 0x6d, 0x7f, 0x3e, 0x5c, 0x32, 0x1f, 0x3e, 0xea, 0x1e, 0xb2, - 0xbe, 0x2f, 0xc1, 0xaa, 0xe3, 0xf4, 0x2c, 0x34, 0x13, 0xd0, 0xf3, 0x1f, 0xbd, 0x7f, 0x9a, 0xff, - 0x79, 0x3c, 0x53, 0x73, 0x1f, 0x56, 0xb9, 0x50, 0xc1, 0x7a, 0x14, 0x67, 0xfc, 0x1a, 0xaa, 0xde, - 0x9a, 0x31, 0x0e, 0x2c, 0xab, 0x58, 0xc4, 0x6c, 0x12, 0x3a, 0xe8, 0x0b, 0x29, 0xe0, 0x53, 0xc8, - 0xbc, 0xe2, 0x4c, 0x26, 0x40, 0x87, 0xff, 0x49, 0x20, 0xd7, 0x48, 0x98, 0x30, 0xe2, 0x93, 0xa8, - 0x7c, 0x23, 0xf2, 0x61, 0xd0, 0x41, 0x9f, 0xdf, 0x88, 0x7c, 0x09, 0xe1, 0x26, 0xfc, 0x1e, 0x5a, - 0xbb, 0x1a, 0x3d, 0xa0, 0x49, 0x78, 0xd9, 0x75, 0xa3, 0x59, 0xc8, 0xa0, 0xc7, 0xdb, 0x12, 0x5b, - 0x30, 0xc9, 0x5b, 0x45, 0xf8, 0xa5, 0x3a, 0xcf, 0x87, 0xd8, 0xc2, 0x0f, 0x0d, 0xd5, 0xa9, 0xbc, - 0x06, 0x84, 0xb2, 0x59, 0x12, 0x8a, 0xa4, 0xb4, 0x08, 0x48, 0xbc, 0x6a, 0x57, 0x9d, 0xf4, 0x4e, - 0x4a, 0x3d, 0x60, 0xbc, 0x12, 0xf1, 0x59, 0xd4, 0xb8, 0xe9, 0x4c, 0xe9, 0x20, 0x64, 0xc9, 0x1c, - 0xde, 0xde, 0xb2, 0xe5, 0x17, 0x99, 0xd0, 0x91, 0xa5, 0x19, 0x5f, 0x40, 0xf5, 0x8f, 0x69, 0x32, - 0xbd, 0x9c, 0xf8, 0x29, 0xbc, 0xfe, 0x98, 0xad, 0x7d, 0xa4, 0x29, 0x1b, 0xc9, 0x51, 0xd6, 0x9f, - 0x06, 0xaa, 0xab, 0x67, 0xe3, 0x9b, 0xa8, 0x76, 0xd9, 0xf3, 0x12, 0x9a, 0xa6, 0x32, 0xba, 0xfe, - 0x9b, 0xc0, 0xdb, 0x73, 0x7b, 0xf3, 0xd6, 0x4d, 0xe6, 0x31, 0x8b, 0x6c, 0xb8, 0x4b, 0x94, 0x13, - 0xbc, 0x89, 0xcc, 0x0d, 0x87, 0x39, 0xab, 0x35, 0x81, 0x70, 0x81, 0x6f, 0xa0, 0xea, 0x30, 0x8a, - 0x03, 0x57, 0x2e, 0x87, 0x17, 0x8e, 0x0c, 0x9c, 0x7d, 0x1a, 0x25, 0xde, 0xfa, 0xc5, 0xb7, 0x08, - 0xf8, 0xb0, 0x7e, 0x2c, 0xa1, 0x46, 0x4e, 0x08, 0x7c, 0x06, 0xd5, 0xb9, 0x20, 0xba, 0xab, 0x22, - 0xba, 0xab, 0xb5, 0xb3, 0xe8, 0xe6, 0x3a, 0x92, 0x9f, 0xf8, 0x17, 0x0d, 0x3f, 0x8b, 0x47, 0x15, - 0x36, 0x84, 0xd2, 0x92, 0xdc, 0xce, 0x23, 0x86, 0x65, 0x5a, 0x5a, 0x21, 0x97, 0x6a, 0x54, 0x76, - 0x10, 0xba, 0xcd, 0x1c, 0xf7, 0xfe, 0x06, 0x8d, 0xd9, 0x18, 0xa6, 0x9f, 0xa6, 0xe1, 0x13, 0x07, - 0x78, 0x65, 0xae, 0x34, 0x71, 0xa4, 0x13, 0xeb, 0x13, 0x84, 0x9f, 0x25, 0x38, 0x7e, 0x17, 0xad, - 0x81, 0x7c, 0x27, 0xf6, 0x1c, 0x46, 0x21, 0x07, 0xff, 0xb7, 0xc5, 0x67, 0xff, 0x90, 0x4e, 0xe3, - 0x89, 0xc3, 0x28, 0x40, 0x48, 0x11, 0x6b, 0x7d, 0x81, 0xd0, 0xb2, 0xab, 0x0f, 0x9a, 0x6a, 0xd6, - 0x97, 0xa8, 0xa9, 0x8d, 0x82, 0x03, 0x77, 0xff, 0x43, 0x09, 0x15, 0x2a, 0xcb, 0xcf, 0x30, 0xd8, - 0xfe, 0x75, 0x65, 0xa5, 0x8f, 0xdc, 0x1b, 0x5d, 0x8d, 0x27, 0xd2, 0x47, 0xde, 0x72, 0xe5, 0xd5, - 0x5b, 0xee, 0x18, 0xaa, 0xdc, 0x75, 0x26, 0x33, 0xaa, 0xbe, 0x11, 0x85, 0x80, 0x8f, 0xa0, 0xf2, - 0x55, 0x27, 0x85, 0x0d, 0xc2, 0x8f, 0xfd, 0x0f, 0xb6, 0xb6, 0x3b, 0xc6, 0xe3, 0xed, 0x8e, 0xf1, - 0xeb, 0x76, 0xc7, 0xf8, 0x7d, 0xbb, 0x63, 0xfc, 0xfc, 0xb4, 0x63, 0x6c, 0x3d, 0xed, 0x18, 0x9f, - 0xef, 0xf3, 0x04, 0xaa, 0x3e, 0x0a, 0xc4, 0x69, 0x54, 0x15, 0xfb, 0xfa, 0x8d, 0xbf, 0x03, 0x00, - 0x00, 0xff, 0xff, 0xf5, 0x7c, 0x70, 0x97, 0x18, 0x0f, 0x00, 0x00, + // 1318 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xef, 0xda, 0x6b, 0xc7, 0x7e, 0x76, 0xfa, 0x6d, 0x47, 0xfd, 0x22, 0xab, 0x42, 0x76, 0xd9, + 0x42, 0x29, 0xa5, 0x5d, 0x57, 0x81, 0x02, 0x2a, 0x12, 0xa2, 0x6e, 0x42, 0x1b, 0x28, 0x69, 0x99, + 0xba, 0x45, 0x20, 0x38, 0x6c, 0x76, 0xa7, 0xce, 0xaa, 0xf6, 0xee, 0x6a, 0x77, 0xb6, 0xac, 0xff, + 0x05, 0x4e, 0xf4, 0x56, 0x2e, 0xa8, 0x67, 0xce, 0xdc, 0xb8, 0x70, 0xcc, 0x8d, 0x1e, 0x51, 0x0f, + 0x06, 0xa5, 0x7f, 0x01, 0xe2, 0x44, 0x4f, 0x68, 0x66, 0xde, 0xac, 0x77, 0x49, 0x9a, 0x54, 0x24, + 0x48, 0x5c, 0xa2, 0x79, 0xef, 0x7d, 0xf6, 0xf9, 0xfd, 0xf8, 0xbc, 0x37, 0x13, 0x00, 0x96, 0x31, + 0xd7, 0x8e, 0xe2, 0x90, 0x87, 0xc4, 0x14, 0xe7, 0xe3, 0xe7, 0x46, 0x3e, 0xdf, 0x48, 0xd7, 0x6d, + 0x37, 0x9c, 0xf4, 0x47, 0xe1, 0x28, 0xec, 0x4b, 0xe3, 0x7a, 0x7a, 0x47, 0x4a, 0x52, 0x90, 0x27, + 0xf5, 0xd1, 0xf1, 0xb7, 0x0b, 0x70, 0xce, 0x02, 0x8f, 0xc5, 0x13, 0x3f, 0xe0, 0xc5, 0xa3, 0xb3, + 0xee, 0xfa, 0x7d, 0x3e, 0x8d, 0x58, 0xa2, 0xfe, 0xe2, 0x87, 0xbd, 0x51, 0x18, 0x8e, 0xc6, 0x6c, + 0xee, 0x9e, 0xfb, 0x13, 0x96, 0x70, 0x67, 0x12, 0x21, 0xa0, 0xcd, 0xe2, 0x38, 0x8c, 0x35, 0xbc, + 0x15, 0x38, 0x93, 0xfc, 0xdb, 0x26, 0xcf, 0xf4, 0xf1, 0x48, 0x24, 0x7e, 0x26, 0x49, 0xfc, 0x30, + 0x40, 0x0d, 0x24, 0x91, 0x4e, 0xc9, 0x5a, 0x81, 0xf6, 0x4d, 0x1e, 0x33, 0x67, 0xb2, 0x72, 0x8f, + 0x05, 0x3c, 0x21, 0x17, 0xca, 0x72, 0xc7, 0x38, 0x51, 0x3d, 0xdd, 0x5a, 0x3a, 0x6a, 0xcb, 0x2a, + 0x14, 0x2c, 0xb4, 0x04, 0xb3, 0x7e, 0xac, 0x40, 0xab, 0xa0, 0x20, 0xe7, 0x01, 0x06, 0x6c, 0xe4, + 0x07, 0x83, 0x71, 0xe8, 0xde, 0xed, 0x18, 0x27, 0x8c, 0xd3, 0xad, 0xa5, 0x23, 0xca, 0xc9, 0x5c, + 0x4f, 0x0b, 0x18, 0xf2, 0x2a, 0x2c, 0x48, 0x69, 0x98, 0x75, 0x2a, 0x12, 0xbe, 0x58, 0x80, 0x0f, + 0x33, 0xaa, 0xad, 0xe4, 0x33, 0x68, 0xac, 0x04, 0xf7, 0xd8, 0x38, 0x8c, 0x58, 0xa7, 0x8a, 0x48, + 0x91, 0xad, 0x56, 0x0e, 0xec, 0xc7, 0xb3, 0xde, 0x99, 0x42, 0xd1, 0x37, 0xa6, 0x11, 0x8b, 0xc7, + 0xcc, 0x1b, 0xb1, 0xb8, 0xbf, 0x9e, 0xc6, 0x71, 0xf8, 0x55, 0xbf, 0x88, 0xa7, 0xb9, 0x3b, 0xf2, + 0x12, 0xd4, 0x64, 0xf8, 0x1d, 0x53, 0xfa, 0x6d, 0xa9, 0x08, 0x54, 0xbe, 0xca, 0x22, 0x21, 0x81, + 0x37, 0xcc, 0x3a, 0xb5, 0x12, 0x44, 0xa8, 0xa8, 0xb2, 0x90, 0x33, 0x22, 0x40, 0x4f, 0x65, 0x5e, + 0x97, 0xa8, 0xc3, 0x39, 0x4a, 0xe5, 0x9d, 0xdb, 0x2f, 0x9a, 0x9b, 0x0f, 0x7b, 0x86, 0x75, 0xdf, + 0x28, 0x96, 0x8b, 0xbc, 0x00, 0xf5, 0xab, 0xcc, 0x1f, 0x6d, 0x70, 0x59, 0x38, 0x93, 0xa2, 0x24, + 0xf4, 0x6b, 0xe9, 0x64, 0x98, 0x25, 0x32, 0x6f, 0x93, 0xa2, 0x44, 0xce, 0xc2, 0xd1, 0x1b, 0x31, + 0xf3, 0x98, 0xcb, 0x92, 0x24, 0x8c, 0xf1, 0x53, 0x53, 0x42, 0xb6, 0x1b, 0xc8, 0x2b, 0xc2, 0xbb, + 0xe3, 0xb1, 0x38, 0xaf, 0xb3, 0x22, 0x9d, 0x52, 0x52, 0x34, 0x5a, 0xd6, 0x3c, 0x8b, 0x67, 0x05, + 0x64, 0x7d, 0x6f, 0xe4, 0x4d, 0x13, 0x59, 0x0f, 0x33, 0x74, 0x6c, 0x14, 0xb3, 0xd6, 0x5a, 0x9a, + 0xdb, 0xc9, 0x8b, 0xd0, 0x5c, 0x4b, 0x35, 0xc3, 0x6a, 0xd2, 0xe5, 0x5c, 0x41, 0x5e, 0x86, 0x3a, + 0x65, 0x49, 0x3a, 0xe6, 0x18, 0x60, 0x5b, 0xf9, 0x51, 0x3a, 0x8a, 0x36, 0xd2, 0x87, 0xe6, 0x4a, + 0xe6, 0xb2, 0x88, 0xfb, 0x61, 0x80, 0xfd, 0x3a, 0x6a, 0xe3, 0x40, 0xe4, 0x06, 0x3a, 0xc7, 0x58, + 0xb7, 0xb1, 0x73, 0xe4, 0x63, 0xa8, 0x0f, 0xb3, 0xab, 0x4e, 0xb2, 0x21, 0xcb, 0xd8, 0x1e, 0x5c, + 0xd8, 0x9c, 0xf5, 0x0e, 0x3d, 0x9e, 0xf5, 0xce, 0xed, 0xce, 0x99, 0x75, 0x3f, 0x70, 0xe2, 0xa9, + 0x7d, 0x95, 0x65, 0x83, 0x29, 0x67, 0x09, 0x45, 0x27, 0xd6, 0x9f, 0xc6, 0x3c, 0x73, 0xf2, 0xa1, + 0xf0, 0x3d, 0x9c, 0x46, 0x4c, 0xd6, 0x60, 0x71, 0xb0, 0xf4, 0x74, 0xd6, 0xb3, 0xf7, 0xe4, 0x62, + 0x3f, 0x72, 0xa6, 0xe3, 0xd0, 0xf1, 0x6c, 0xf1, 0x25, 0x45, 0x0f, 0x85, 0x38, 0x2b, 0x07, 0x10, + 0x67, 0xa1, 0x89, 0xd5, 0x12, 0xab, 0x8e, 0x41, 0x6d, 0x35, 0xf0, 0x58, 0x86, 0x8c, 0x51, 0x82, + 0x68, 0xc2, 0xf5, 0xd8, 0x1f, 0xf9, 0x01, 0x12, 0x1d, 0x9b, 0xa0, 0x74, 0x14, 0x6d, 0xd6, 0x0f, + 0x06, 0x1c, 0x96, 0x14, 0x59, 0xc9, 0x98, 0x9b, 0x8a, 0x32, 0x3f, 0x93, 0xbc, 0xff, 0x06, 0x49, + 0xc5, 0xb6, 0x1a, 0x66, 0xf9, 0x6f, 0x8b, 0xb9, 0x28, 0x6c, 0xab, 0x82, 0x85, 0x96, 0x60, 0xd6, + 0xfb, 0x70, 0xb8, 0x20, 0x7f, 0xc4, 0xa6, 0xbb, 0x8d, 0xdc, 0xf5, 0x3b, 0x77, 0x12, 0xa6, 0xb8, + 0x68, 0x52, 0x94, 0xac, 0xdf, 0x2b, 0xd0, 0x2a, 0xb8, 0x20, 0x67, 0xf3, 0x78, 0x77, 0xe4, 0xfe, + 0xc0, 0x7c, 0x34, 0xeb, 0x19, 0x79, 0xd8, 0xc5, 0x15, 0x56, 0x3f, 0xd8, 0x15, 0x76, 0x12, 0xea, + 0x38, 0x57, 0x0b, 0xb2, 0x16, 0xa5, 0x1d, 0x56, 0xdf, 0x36, 0x61, 0x8d, 0x5d, 0x26, 0xec, 0x14, + 0x2c, 0x50, 0xe6, 0x32, 0x3f, 0xe2, 0x9d, 0x26, 0xc2, 0xc4, 0x8f, 0xa2, 0x8e, 0x6a, 0x63, 0x79, + 0x12, 0x61, 0xef, 0x49, 0xdc, 0xd6, 0xb5, 0xd6, 0xf3, 0x75, 0xed, 0x6b, 0x43, 0x73, 0x92, 0x74, + 0x60, 0xe1, 0xf2, 0x86, 0xe3, 0x07, 0xab, 0xcb, 0xb2, 0xde, 0x4d, 0xaa, 0xc5, 0x42, 0x23, 0x2b, + 0x3b, 0xb3, 0xbc, 0x5a, 0x64, 0xf9, 0x3b, 0x60, 0x0e, 0xfd, 0x09, 0xc3, 0xfd, 0x71, 0xdc, 0x56, + 0x37, 0xae, 0xad, 0x6f, 0x5c, 0x7b, 0xa8, 0x6f, 0xdc, 0x41, 0x43, 0x0c, 0xdf, 0x37, 0xbf, 0xf6, + 0x0c, 0x2a, 0xbf, 0xb0, 0x7e, 0xae, 0xe8, 0x8e, 0xff, 0x97, 0x67, 0xfe, 0x75, 0x68, 0xca, 0x96, + 0xcb, 0xe8, 0xaa, 0x32, 0xba, 0xc5, 0xa7, 0xb3, 0xde, 0x5c, 0x49, 0xe7, 0x47, 0x51, 0x54, 0x29, + 0xac, 0x2e, 0xcb, 0x7a, 0x34, 0xa9, 0x16, 0x0b, 0x45, 0xad, 0xed, 0x5c, 0xd4, 0x7a, 0xb1, 0xa8, + 0x25, 0x3e, 0x2c, 0xec, 0xcd, 0x87, 0x8b, 0xe6, 0x83, 0x87, 0xbd, 0x43, 0xd6, 0xfd, 0x0a, 0xde, + 0xbe, 0x82, 0x9e, 0xa5, 0x61, 0x42, 0x7a, 0xfe, 0x6d, 0xf6, 0x4f, 0x89, 0x1f, 0x8f, 0x52, 0x7d, + 0x4b, 0xe0, 0xeb, 0x42, 0xaa, 0xf0, 0xc6, 0x96, 0x67, 0xf2, 0x1a, 0xd4, 0xaf, 0xa7, 0x5c, 0x00, + 0xab, 0x3a, 0x16, 0xb9, 0xc9, 0xa4, 0x0e, 0xe7, 0x42, 0x09, 0xe4, 0x24, 0x98, 0x97, 0x9d, 0xf1, + 0x18, 0xe9, 0xf0, 0x3f, 0x05, 0x14, 0x1a, 0x05, 0x93, 0x46, 0x72, 0x02, 0xaa, 0xd7, 0xc2, 0x11, + 0xae, 0x45, 0x9c, 0xf3, 0x6b, 0xe1, 0x48, 0x41, 0x84, 0x89, 0xbc, 0x07, 0x8b, 0x57, 0xc2, 0x7b, + 0x2c, 0x0e, 0x2e, 0xb9, 0x6e, 0x98, 0x06, 0x1c, 0x67, 0xbc, 0xa3, 0xb0, 0x25, 0x93, 0xfa, 0xaa, + 0x0c, 0xbf, 0xd8, 0x10, 0xf5, 0x90, 0x0f, 0x83, 0x07, 0x86, 0x9e, 0x54, 0xd1, 0x03, 0xca, 0x78, + 0x1a, 0x07, 0xb2, 0x28, 0x6d, 0x8a, 0x92, 0xe8, 0xda, 0x15, 0x27, 0xb9, 0x95, 0x30, 0x0f, 0x19, + 0xaf, 0x45, 0x72, 0x06, 0x9a, 0x6b, 0xce, 0x84, 0xad, 0x04, 0x3c, 0x9e, 0x62, 0xee, 0x6d, 0x5b, + 0x3d, 0x12, 0xa5, 0x8e, 0xce, 0xcd, 0xe4, 0x3c, 0x34, 0x6e, 0xb0, 0x78, 0x72, 0x29, 0x1e, 0x25, + 0x98, 0xfd, 0x31, 0xbb, 0xf0, 0x6e, 0xd4, 0x36, 0x9a, 0xa3, 0xac, 0x3f, 0x0c, 0x68, 0xe8, 0xb4, + 0xc9, 0x1a, 0x2c, 0x5c, 0xf2, 0xbc, 0x98, 0x25, 0x89, 0x8a, 0x6e, 0xf0, 0x26, 0xf2, 0xf6, 0xec, + 0xee, 0xbc, 0x75, 0xe3, 0x69, 0xc4, 0x43, 0x1b, 0xbf, 0xa5, 0xda, 0x09, 0x59, 0x05, 0x73, 0xd9, + 0xe1, 0xce, 0xfe, 0x86, 0x40, 0xba, 0x20, 0xd7, 0xa0, 0x3e, 0x0c, 0x23, 0xdf, 0x55, 0x97, 0xc3, + 0x73, 0x47, 0x86, 0xce, 0x3e, 0x0d, 0x63, 0x6f, 0xe9, 0xc2, 0x5b, 0x14, 0x7d, 0x58, 0xdf, 0x55, + 0xa0, 0x99, 0x13, 0x82, 0x9c, 0x86, 0x86, 0x10, 0xe4, 0x74, 0xd5, 0xe4, 0x74, 0xb5, 0x9f, 0xce, + 0x7a, 0xb9, 0x8e, 0xe6, 0x27, 0xf1, 0x3a, 0x12, 0x67, 0x99, 0x54, 0xe9, 0x86, 0xd0, 0x5a, 0x9a, + 0xdb, 0x45, 0xc4, 0x78, 0xf5, 0x56, 0xf6, 0x51, 0x4b, 0xbd, 0x2a, 0xbb, 0x00, 0x37, 0xb9, 0xe3, + 0xde, 0x5d, 0x66, 0x11, 0xdf, 0xc0, 0xed, 0x57, 0xd0, 0x88, 0x8d, 0x83, 0xbc, 0x32, 0xf7, 0xb5, + 0x71, 0x94, 0x13, 0xeb, 0x13, 0x20, 0xdb, 0x09, 0x4e, 0xde, 0x85, 0x45, 0x94, 0x6f, 0x45, 0x9e, + 0xc3, 0x19, 0xd6, 0xe0, 0xff, 0xb6, 0xfc, 0x4f, 0x64, 0xc8, 0x26, 0xd1, 0xd8, 0xe1, 0x0c, 0x21, + 0xb4, 0x8c, 0xb5, 0xbe, 0x00, 0x98, 0x4f, 0xf5, 0x41, 0x53, 0xcd, 0xfa, 0x12, 0x5a, 0x85, 0x55, + 0x70, 0xe0, 0xee, 0xbf, 0xad, 0x40, 0xa9, 0xb3, 0xe2, 0x8c, 0x8b, 0xed, 0x1f, 0x77, 0x56, 0xf9, + 0xc8, 0xbd, 0xb1, 0xfd, 0xf1, 0x44, 0xf9, 0xc8, 0x47, 0xae, 0xba, 0xff, 0x91, 0x3b, 0x06, 0xb5, + 0xdb, 0xce, 0x38, 0x65, 0xfa, 0x45, 0x29, 0x05, 0x72, 0x04, 0xaa, 0x57, 0x1c, 0xfd, 0xdc, 0x17, + 0xc7, 0xc1, 0x07, 0x9b, 0x5b, 0x5d, 0xe3, 0xd1, 0x56, 0xd7, 0xf8, 0x65, 0xab, 0x6b, 0xfc, 0xb6, + 0xd5, 0x35, 0x7e, 0x7a, 0xd2, 0x35, 0x36, 0x9f, 0x74, 0x8d, 0xcf, 0xf7, 0x48, 0x81, 0xe9, 0x47, + 0x81, 0x3c, 0xad, 0xd7, 0xe5, 0x7d, 0xfd, 0xc6, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xf0, + 0x3b, 0xe7, 0xab, 0x0f, 0x00, 0x00, } func (m *StreamEvents) Marshal() (dAtA []byte, err error) { @@ -1578,6 +1617,16 @@ func (m *BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.PredecessorHeight != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.PredecessorHeight)) + i-- + dAtA[i] = 0x20 + } + if m.NumTxs != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.NumTxs)) + i-- + dAtA[i] = 0x18 + } if m.Header != nil { { size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) @@ -1654,6 +1703,11 @@ func (m *BeginTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.NumEvents != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.NumEvents)) + i-- + dAtA[i] = 0x28 + } if m.Exception != nil { { size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i]) @@ -1818,6 +1872,11 @@ func (m *BlockExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.PredecessorHeight != 0 { + i = encodeVarintExec(dAtA, i, uint64(m.PredecessorHeight)) + i-- + dAtA[i] = 0x20 + } if len(m.TxExecutions) > 0 { for iNdEx := len(m.TxExecutions) - 1; iNdEx >= 0; iNdEx-- { { @@ -2682,6 +2741,12 @@ func (m *BeginBlock) Size() (n int) { l = m.Header.Size() n += 1 + l + sovExec(uint64(l)) } + if m.NumTxs != 0 { + n += 1 + sovExec(uint64(m.NumTxs)) + } + if m.PredecessorHeight != 0 { + n += 1 + sovExec(uint64(m.PredecessorHeight)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -2721,6 +2786,9 @@ func (m *BeginTx) Size() (n int) { l = m.Exception.Size() n += 1 + l + sovExec(uint64(l)) } + if m.NumEvents != 0 { + n += 1 + sovExec(uint64(m.NumEvents)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -2787,6 +2855,9 @@ func (m *BlockExecution) Size() (n int) { n += 1 + l + sovExec(uint64(l)) } } + if m.PredecessorHeight != 0 { + n += 1 + sovExec(uint64(m.PredecessorHeight)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -3627,6 +3698,44 @@ func (m *BeginBlock) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumTxs", wireType) + } + m.NumTxs = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExec + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumTxs |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PredecessorHeight", wireType) + } + m.PredecessorHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExec + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PredecessorHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipExec(dAtA[iNdEx:]) @@ -3862,6 +3971,25 @@ func (m *BeginTx) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumEvents", wireType) + } + m.NumEvents = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExec + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumEvents |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipExec(dAtA[iNdEx:]) @@ -4272,6 +4400,25 @@ func (m *BlockExecution) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PredecessorHeight", wireType) + } + m.PredecessorHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExec + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PredecessorHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipExec(dAtA[iNdEx:]) diff --git a/execution/exec/stream_event.go b/execution/exec/stream_event.go index 4db6b04b2..79d0f8eb4 100644 --- a/execution/exec/stream_event.go +++ b/execution/exec/stream_event.go @@ -56,11 +56,55 @@ func (ev *StreamEvent) Get(key string) (interface{}, bool) { ev.EndBlock).Get(key) } -func ConsumeBlockExecution(stream EventStream) (block *BlockExecution, err error) { +type ContinuityOpt byte + +func (so ContinuityOpt) Allows(opt ContinuityOpt) bool { + return so&opt > 0 +} + +// ContinuityOpt encodes the following possible relaxations in continuity +const ( + // Default - continuous blocks, txs, and events are always permitted + Continuous ContinuityOpt = iota + // Allows consumption of blocks where the next block has a different predecessor block to that which was last consumed + NonConsecutiveBlocks + // Allows consumption of transactions with non-monotonic index (within block) or a different number of transactions + // to that which is expected + NonConsecutiveTxs + // Allows consumption of events with non-monotonic index (within transaction) or a different number of events + // to that which is expected + NonConsecutiveEvents +) + +type BlockAccumulator struct { + block *BlockExecution + // Number of txs expected in current block + numTxs uint64 + // Height of last block consumed that contained transactions + previousNonEmptyBlockHeight uint64 + // Accumulator for Txs + stack TxStack + // Continuity requirements for the stream + continuity ContinuityOpt +} + +func NewBlockAccumulator(continuityOptions ...ContinuityOpt) *BlockAccumulator { + continuity := Continuous + for _, opt := range continuityOptions { + continuity |= opt + } + return &BlockAccumulator{ + continuity: continuity, + stack: TxStack{ + continuity: continuity, + }, + } +} + +func (ba *BlockAccumulator) ConsumeBlockExecution(stream EventStream) (block *BlockExecution, err error) { var ev *StreamEvent - accum := new(BlockAccumulator) for ev, err = stream.Recv(); err == nil; ev, err = stream.Recv() { - block, err = accum.Consume(ev) + block, err = ba.Consume(ev) if err != nil { return nil, err } @@ -72,19 +116,28 @@ func ConsumeBlockExecution(stream EventStream) (block *BlockExecution, err error return nil, err } -type BlockAccumulator struct { - block *BlockExecution - stack TxStack -} - // Consume will add the StreamEvent passed to the block accumulator and if the block complete is complete return the // BlockExecution, otherwise will return nil func (ba *BlockAccumulator) Consume(ev *StreamEvent) (*BlockExecution, error) { switch { case ev.BeginBlock != nil: + if !ba.continuity.Allows(NonConsecutiveBlocks) && + (ba.previousNonEmptyBlockHeight > 0 && ba.previousNonEmptyBlockHeight != ev.BeginBlock.PredecessorHeight) { + return nil, fmt.Errorf("BlockAccumulator.Consume: received non-consecutive block at height %d: "+ + "predecessor height %d, but previous (non-empty) block height was %d", + ev.BeginBlock.Height, ev.BeginBlock.PredecessorHeight, ba.previousNonEmptyBlockHeight) + } + // If we are consuming blocks over the event stream (rather than from state) we may see empty blocks + // by definition empty blocks will not be a predecessor + if ev.BeginBlock.NumTxs > 0 { + ba.previousNonEmptyBlockHeight = ev.BeginBlock.Height + } + ba.numTxs = ev.BeginBlock.NumTxs ba.block = &BlockExecution{ - Height: ev.BeginBlock.Height, - Header: ev.BeginBlock.Header, + Height: ev.BeginBlock.Height, + PredecessorHeight: ev.BeginBlock.PredecessorHeight, + Header: ev.BeginBlock.Header, + TxExecutions: make([]*TxExecution, 0, ba.numTxs), } case ev.BeginTx != nil, ev.Envelope != nil, ev.Event != nil, ev.EndTx != nil: txe, err := ba.stack.Consume(ev) @@ -92,37 +145,69 @@ func (ba *BlockAccumulator) Consume(ev *StreamEvent) (*BlockExecution, error) { return nil, err } if txe != nil { + if !ba.continuity.Allows(NonConsecutiveTxs) && uint64(len(ba.block.TxExecutions)) != txe.Index { + return nil, fmt.Errorf("BlockAccumulator.Consume recieved transaction with index %d at "+ + "position %d in the event stream", txe.Index, len(ba.block.TxExecutions)) + } ba.block.TxExecutions = append(ba.block.TxExecutions, txe) } case ev.EndBlock != nil: + if !ba.continuity.Allows(NonConsecutiveTxs) && uint64(len(ba.block.TxExecutions)) != ba.numTxs { + return nil, fmt.Errorf("BlockAccumulator.Consume did not receive the expected number of "+ + "transactions for block %d, expected: %d, received: %d", + ba.block.Height, ba.numTxs, len(ba.block.TxExecutions)) + } return ba.block, nil } return nil, nil } // TxStack is able to consume potentially nested txs -type TxStack []*TxExecution +type TxStack struct { + // Stack of TxExecutions, top of stack is TxExecution receiving innermost events + txes []*TxExecution + // Track the expected number events from the BeginTx event (also a stack) + numEvents []uint64 + // Relaxations of transaction/event continuity + continuity ContinuityOpt +} -func (stack *TxStack) Push(txe *TxExecution) { +func (stack *TxStack) Push(beginTx *BeginTx) { // Put this txe in the parent position - *stack = append(*stack, txe) + stack.txes = append(stack.txes, &TxExecution{ + TxHeader: beginTx.TxHeader, + Result: beginTx.Result, + Events: make([]*Event, 0, beginTx.NumEvents), + Exception: beginTx.Exception, + }) + stack.numEvents = append(stack.numEvents, beginTx.NumEvents) } -func (stack TxStack) Peek() (*TxExecution, error) { - if len(stack) < 1 { +func (stack *TxStack) Peek() (*TxExecution, error) { + if len(stack.txes) < 1 { return nil, fmt.Errorf("tried to peek from an empty TxStack - might be missing essential StreamEvents") } - return stack[len(stack)-1], nil + return stack.txes[len(stack.txes)-1], nil } func (stack *TxStack) Pop() (*TxExecution, error) { - s := *stack - txc, err := s.Peek() + txe, err := stack.Peek() if err != nil { return nil, err } - *stack = s[:len(s)-1] - return txc, nil + newLength := len(stack.txes) - 1 + stack.txes = stack.txes[:newLength] + numEvents := stack.numEvents[newLength] + if !stack.continuity.Allows(NonConsecutiveEvents) && uint64(len(txe.Events)) != numEvents { + return nil, fmt.Errorf("TxStack.Pop emitted transaction %s with wrong number of events, "+ + "expected: %d, received: %d", txe.TxHash, numEvents, len(txe.Events)) + } + stack.numEvents = stack.numEvents[:newLength] + return txe, nil +} + +func (stack *TxStack) Length() int { + return len(stack.txes) } // Consume will add the StreamEvent to the transaction stack and if that completes a single outermost transaction @@ -130,7 +215,7 @@ func (stack *TxStack) Pop() (*TxExecution, error) { func (stack *TxStack) Consume(ev *StreamEvent) (*TxExecution, error) { switch { case ev.BeginTx != nil: - stack.Push(initTx(ev.BeginTx)) + stack.Push(ev.BeginTx) case ev.Envelope != nil: txe, err := stack.Peek() if err != nil { @@ -143,13 +228,21 @@ func (stack *TxStack) Consume(ev *StreamEvent) (*TxExecution, error) { if err != nil { return nil, err } + if !stack.continuity.Allows(NonConsecutiveEvents) && uint64(len(txe.Events)) != ev.Event.Header.Index { + return nil, fmt.Errorf("TxStack.Consume recieved event with index %d at "+ + "position %d in the event stream", ev.Event.GetHeader().GetIndex(), len(txe.Events)) + } txe.Events = append(txe.Events, ev.Event) case ev.EndTx != nil: txe, err := stack.Pop() if err != nil { return nil, err } - if len(*stack) == 0 { + if txe.Envelope == nil || txe.Receipt == nil { + return nil, fmt.Errorf("TxStack.Consume did not receive transaction envelope for transaction %s", + txe.TxHash) + } + if stack.Length() == 0 { // This terminates the outermost transaction return txe, nil } @@ -162,11 +255,3 @@ func (stack *TxStack) Consume(ev *StreamEvent) (*TxExecution, error) { } return nil, nil } - -func initTx(beginTx *BeginTx) *TxExecution { - return &TxExecution{ - TxHeader: beginTx.TxHeader, - Result: beginTx.Result, - Exception: beginTx.Exception, - } -} diff --git a/execution/exec/stream_event_test.go b/execution/exec/stream_event_test.go index 5eed16eed..fe8061dfe 100644 --- a/execution/exec/stream_event_test.go +++ b/execution/exec/stream_event_test.go @@ -1,6 +1,7 @@ package exec import ( + "encoding/json" "testing" "time" @@ -26,7 +27,7 @@ func TestTxExecution(t *testing.T) { txeOut, err = stack.Consume(ev) require.NoError(t, err) if txeOut != nil { - require.Equal(t, txe, txeOut) + require.Equal(t, jsonString(t, txe), jsonString(t, txeOut)) } } @@ -43,21 +44,21 @@ func TestConsumeBlockExecution(t *testing.T) { Height: height, }, Height: uint64(height), - TxExecutions: []*TxExecution{ - NewTxExecution(txs.Enclose(genesisDoc.ChainID(), newCallTx(0, 3))), - NewTxExecution(txs.Enclose(genesisDoc.ChainID(), newCallTx(0, 2))), - NewTxExecution(txs.Enclose(genesisDoc.ChainID(), newCallTx(2, 1))), - }, } + be.AppendTxs( + NewTxExecution(txs.Enclose(genesisDoc.ChainID(), newCallTx(0, 3))), + NewTxExecution(txs.Enclose(genesisDoc.ChainID(), newCallTx(0, 2))), + NewTxExecution(txs.Enclose(genesisDoc.ChainID(), newCallTx(2, 1))), + ) - stack := new(BlockAccumulator) + stack := NewBlockAccumulator() var beOut *BlockExecution var err error for _, ev := range be.StreamEvents() { beOut, err = stack.Consume(ev) require.NoError(t, err) if beOut != nil { - require.Equal(t, be, beOut) + require.Equal(t, jsonString(t, be), jsonString(t, beOut)) } } assert.NotNil(t, beOut, "should have consumed input BlockExecution") @@ -68,3 +69,9 @@ func newCallTx(fromIndex, toIndex int) *payload.CallTx { to := accounts[toIndex].GetAddress() return payload.NewCallTxWithSequence(from.GetPublicKey(), &to, []byte{1, 2, 3}, 324, 34534534, 23, 1) } + +func jsonString(t testing.TB, conf interface{}) string { + bs, err := json.MarshalIndent(conf, "", " ") + require.NoError(t, err, "must be able to convert interface to string for comparison") + return string(bs) +} diff --git a/execution/exec/tx_execution.go b/execution/exec/tx_execution.go index cc1d30a5e..b5da6ec35 100644 --- a/execution/exec/tx_execution.go +++ b/execution/exec/tx_execution.go @@ -40,6 +40,7 @@ func (txe *TxExecution) StreamEvents() []*StreamEvent { &StreamEvent{ BeginTx: &BeginTx{ TxHeader: txe.TxHeader, + NumEvents: uint64(len(txe.Events)), Exception: txe.Exception, Result: txe.Result, }, diff --git a/execution/execution.go b/execution/execution.go index 8ad6ebe52..c42e31cad 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -45,6 +45,7 @@ func (f ExecutorFunc) Execute(txEnv *txs.Envelope) (*exec.TxExecution, error) { type ExecutorState interface { Update(updater func(ws state.Updatable) error) (hash []byte, version int64, err error) + LastStoredHeight() (uint64, error) acmstate.IterableReader acmstate.MetadataReader names.Reader @@ -52,7 +53,6 @@ type ExecutorState interface { proposal.Reader validator.IterableReader } - type BatchExecutor interface { // Provides access to write lock for a BatchExecutor so reads can be prevented for the duration of a commit sync.Locker @@ -105,14 +105,14 @@ var _ BatchExecutor = (*executor)(nil) // Wraps a cache of what is variously known as the 'check cache' and 'mempool' func NewBatchChecker(backend ExecutorState, params Params, blockchain engine.Blockchain, logger *logging.Logger, - options ...Option) BatchExecutor { + options ...Option) (BatchExecutor, error) { return newExecutor("CheckCache", false, params, backend, blockchain, nil, logger.WithScope("NewBatchExecutor"), options...) } func NewBatchCommitter(backend ExecutorState, params Params, blockchain engine.Blockchain, emitter *event.Emitter, - logger *logging.Logger, options ...Option) BatchCommitter { + logger *logging.Logger, options ...Option) (BatchCommitter, error) { return newExecutor("CommitCache", true, params, backend, blockchain, emitter, logger.WithScope("NewBatchCommitter"), options...) @@ -120,7 +120,12 @@ func NewBatchCommitter(backend ExecutorState, params Params, blockchain engine.B } func newExecutor(name string, runCall bool, params Params, backend ExecutorState, blockchain engine.Blockchain, - emitter *event.Emitter, logger *logging.Logger, options ...Option) *executor { + emitter *event.Emitter, logger *logging.Logger, options ...Option) (*executor, error) { + // We need to track the last block stored in state + predecessor, err := backend.LastStoredHeight() + if err != nil { + return nil, err + } exe := &executor{ runCall: runCall, params: params, @@ -133,7 +138,8 @@ func newExecutor(name string, runCall bool, params Params, backend ExecutorState validatorCache: validator.NewCache(backend), emitter: emitter, block: &exec.BlockExecution{ - Height: blockchain.LastBlockHeight() + 1, + Height: blockchain.LastBlockHeight() + 1, + PredecessorHeight: predecessor, }, logger: logger.With(structure.ComponentKey, "Executor"), } @@ -202,7 +208,7 @@ func newExecutor(name string, runCall bool, params Params, backend ExecutorState exe.contexts[k] = v } - return exe + return exe, nil } func (exe *executor) AddContext(ty payload.Type, ctx contexts.Context) *executor { @@ -447,9 +453,18 @@ func (exe *executor) finaliseBlockExecution(header *abciTypes.Header) (*exec.Blo be := exe.block // Set the header when provided be.Header = header + // My default the predecessor of the next block is the is the predecessor of the current block + // (in case the current block has no transactions - since we do not currently store empty blocks in state, see + // /execution/state/events.go) + predecessor := be.PredecessorHeight + if len(be.TxExecutions) > 0 { + // If the current block has transactions then it will be the predecessor of the next block + predecessor = be.Height + } // Start new execution for the next height exe.block = &exec.BlockExecution{ - Height: exe.block.Height + 1, + Height: exe.block.Height + 1, + PredecessorHeight: predecessor, } return be, nil } diff --git a/execution/execution_test.go b/execution/execution_test.go index 53bf26229..b5b4466f8 100644 --- a/execution/execution_test.go +++ b/execution/execution_test.go @@ -1455,8 +1455,45 @@ func TestSelfDestruct(t *testing.T) { require.Nil(t, accRemoved, "Expected account to be removed") } -//------------------------------------------------------------------------------------- -// helpers +func TestPredecessorTracking(t *testing.T) { + st, signers := makeGenesisState(3, 1) + exe := makeExecutor(st) + + mkTx := func() *payload.SendTx { + tx := payload.NewSendTx() + err := tx.AddInput(st, signers[0].GetPublicKey(), 100) + require.NoError(t, err) + tx.AddOutput(signers[1].GetAddress(), 100) + require.NoError(t, err) + return tx + } + + // Empty block - predecessor does not advance + _, err := exe.Commit(nil) + require.NoError(t, err) + require.Equal(t, uint64(0), exe.block.PredecessorHeight) + require.Equal(t, uint64(2), exe.block.Height) + + // Tx in block - predecessor becomes this block + err = exe.signExecuteCommit(mkTx(), signers[0]) + require.NoError(t, err) + require.Equal(t, uint64(2), exe.block.PredecessorHeight) + require.Equal(t, uint64(3), exe.block.Height) + + // Empty again + _, err = exe.Commit(nil) + require.NoError(t, err) + require.Equal(t, uint64(2), exe.block.PredecessorHeight) + require.Equal(t, uint64(4), exe.block.Height) + + // Non-empty - back to consecutive predecessor + err = exe.signExecuteCommit(mkTx(), signers[0]) + require.NoError(t, err) + require.Equal(t, uint64(4), exe.block.PredecessorHeight) + require.Equal(t, uint64(5), exe.block.Height) +} + +// Helpers func makeUsers(n int) []acm.AddressableSigner { users := make([]acm.AddressableSigner, n) @@ -1544,10 +1581,14 @@ func makeExecutor(state *state.State) *testExecutor { if err != nil { panic(err) } + executor, err := newExecutor("makeExecutorCache", true, ParamsFromGenesis(testGenesisDoc), state, + blockchain, nil, logger) + if err != nil { + panic(err) + } return &testExecutor{ Blockchain: blockchain, - executor: newExecutor("makeExecutorCache", true, ParamsFromGenesis(testGenesisDoc), state, - blockchain, nil, logger), + executor: executor, } } diff --git a/execution/state/events.go b/execution/state/events.go index 3685e6b2b..b547006d0 100644 --- a/execution/state/events.go +++ b/execution/state/events.go @@ -7,26 +7,35 @@ import ( "github.com/hyperledger/burrow/encoding" "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/storage" ) func (ws *writeState) AddBlock(be *exec.BlockExecution) error { // If there are no transactions, do not store anything. This reduces the amount of data we store and - // prevents the iavl tree from changing, which means the AppHash does not change. + // prevents the iavl tree from changing, which means the AppHash does not change. If the AppHash changes then + // Tendermint will always produce another block. If we change the AppHash on empty blocks then we will continue + // creating empty blocks even if we have been configure to not do so. + // TODO: we would prefer not to do this and instead store sequential monotonic blocks, once this: + // https://github.com/tendermint/tendermint/issues/1909 is resolved we should be able to suppress empty blocks + // even when the AppHash changes if len(be.TxExecutions) == 0 { return nil } - buf := new(bytes.Buffer) var offset int for _, ev := range be.StreamEvents() { - if ev.BeginTx != nil { + switch { + case ev.BeginTx != nil: val := &exec.TxExecutionKey{Height: be.Height, Offset: uint64(offset)} bs, err := encoding.Encode(val) if err != nil { return err } // Set reference to TxExecution - ws.plain.Set(keys.TxHash.Key(ev.BeginTx.TxHeader.TxHash), bs) + err = ws.plain.Set(keys.TxHash.Key(ev.BeginTx.TxHeader.TxHash), bs) + if err != nil { + return err + } } n, err := encoding.WriteMessage(buf, ev) @@ -47,7 +56,8 @@ func (ws *writeState) AddBlock(be *exec.BlockExecution) error { } // Iterate SteamEvents over the closed interval [startHeight, endHeight] - i.e. startHeight and endHeight inclusive -func (s *ReadState) IterateStreamEvents(startHeight, endHeight *uint64, consumer func(*exec.StreamEvent) error) error { +func (s *ReadState) IterateStreamEvents(startHeight, endHeight *uint64, sortOrder storage.SortOrder, + consumer func(*exec.StreamEvent) error) error { tree, err := s.Forest.Reader(keys.Event.Prefix()) if err != nil { return err @@ -60,7 +70,7 @@ func (s *ReadState) IterateStreamEvents(startHeight, endHeight *uint64, consumer // Convert to inclusive end bounds since this generally makes more sense for block height endKey = keys.Event.KeyNoPrefix(*endHeight + 1) } - return tree.Iterate(startKey, endKey, true, func(_, value []byte) error { + return tree.Iterate(startKey, endKey, sortOrder == storage.AscendingSort, func(_, value []byte) error { buf := bytes.NewBuffer(value) for { @@ -85,18 +95,17 @@ func (s *ReadState) TxsAtHeight(height uint64) ([]*exec.TxExecution, error) { const errHeader = "TxAtHeight():" var stack exec.TxStack var txExecutions []*exec.TxExecution - err := s.IterateStreamEvents(&height, &height, - func(ev *exec.StreamEvent) error { - // Keep trying to consume TxExecutions at from events at this height - txe, err := stack.Consume(ev) - if err != nil { - return fmt.Errorf("%s %v", errHeader, err) - } - if txe != nil { - txExecutions = append(txExecutions, txe) - } - return nil - }) + err := s.IterateStreamEvents(&height, &height, storage.AscendingSort, func(ev *exec.StreamEvent) error { + // Keep trying to consume TxExecutions at from events at this height + txe, err := stack.Consume(ev) + if err != nil { + return err + } + if txe != nil { + txExecutions = append(txExecutions, txe) + } + return nil + }) if err != nil && err != io.EOF { return nil, fmt.Errorf("%s %v", errHeader, err) } @@ -151,3 +160,20 @@ func (s *ReadState) TxByHash(txHash []byte) (*exec.TxExecution, error) { } } } + +// Get the last block height we stored in state +func (s *ReadState) LastStoredHeight() (uint64, error) { + var height uint64 + err := s.IterateStreamEvents(nil, nil, storage.DescendingSort, + func(event *exec.StreamEvent) error { + if event.EndBlock != nil { + height = event.EndBlock.Height + return io.EOF + } + return nil + }) + if err != nil && err != io.EOF { + return 0, fmt.Errorf("LastStoredHeight: %w", err) + } + return height, nil +} diff --git a/execution/state/events_test.go b/execution/state/events_test.go index ccc47ab9f..1fc0de70e 100644 --- a/execution/state/events_test.go +++ b/execution/state/events_test.go @@ -8,8 +8,10 @@ import ( "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/config/source" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/storage" + "github.com/hyperledger/burrow/txs" + "github.com/hyperledger/burrow/txs/payload" "github.com/stretchr/testify/require" dbm "github.com/tendermint/tm-db" ) @@ -19,29 +21,24 @@ func TestWriteState_AddBlock(t *testing.T) { height := uint64(100) numTxs := uint64(5) events := uint64(10) - block := mkBlock(height, numTxs, events) - _, _, err := s.Update(func(ws Updatable) error { - return ws.AddBlock(block) - }) - require.NoError(t, err) + addBlock(t, s, height, numTxs, events) txIndex := uint64(0) eventIndex := uint64(0) - err = s.IterateStreamEvents(&height, &height, - func(ev *exec.StreamEvent) error { - switch { - case ev.BeginTx != nil: - eventIndex = 0 - case ev.Event != nil: - require.Equal(t, mkEvent(height, txIndex, eventIndex).Header.TxHash.String(), - ev.Event.Header.TxHash.String(), "event TxHash mismatch at tx #%d event #%d", - txIndex, eventIndex) - eventIndex++ - case ev.EndTx != nil: - txIndex++ - } - return nil - }) + err := s.IterateStreamEvents(&height, &height, storage.AscendingSort, func(ev *exec.StreamEvent) error { + switch { + case ev.BeginTx != nil: + eventIndex = 0 + case ev.Event != nil: + require.Equal(t, mkEvent(height, txIndex, eventIndex).Header.TxHash.String(), + ev.Event.Header.TxHash.String(), "event TxHash mismatch at tx #%d event #%d", + txIndex, eventIndex) + eventIndex++ + case ev.EndTx != nil: + txIndex++ + } + return nil + }) require.NoError(t, err) require.Equal(t, numTxs, txIndex, "should have observed all txs") // non-increasing events @@ -101,7 +98,7 @@ func TestReadState_TxByHash(t *testing.T) { for height := uint64(0); height < maxHeight; height++ { for txIndex := uint64(0); txIndex < numTxs; txIndex++ { // Find this tx - tx := mkTx(height, txIndex, events) + tx := mkTxExecution(height, txIndex, events) txHash := tx.TxHash.String() // Check we have no duplicates (indicates problem with how we are generating hashes for these tests require.False(t, hashSet[txHash], "should be no duplicate tx hashes") @@ -117,6 +114,54 @@ func TestReadState_TxByHash(t *testing.T) { } } +func TestLastBlockStored(t *testing.T) { + s := NewState(dbm.NewMemDB()) + // Add first block + addBlock(t, s, uint64(1), 2, 3) + lastStoredHeight, err := s.LastStoredHeight() + require.NoError(t, err) + require.Equal(t, lastStoredHeight, uint64(1)) + + // Add empty block + addBlock(t, s, uint64(2), 0, 0) + lastStoredHeight, err = s.LastStoredHeight() + require.NoError(t, err) + // Same last stored height + require.Equal(t, lastStoredHeight, uint64(1)) + + // Add non-empty block + addBlock(t, s, uint64(3), 1, 0) + lastStoredHeight, err = s.LastStoredHeight() + require.NoError(t, err) + // Same last stored height + require.Equal(t, lastStoredHeight, uint64(3)) +} + +func BenchmarkAddBlockAndIterator(b *testing.B) { + s := NewState(dbm.NewMemDB()) + numTxs := uint64(5) + events := uint64(10) + for height := uint64(0); height < 2000; height++ { + block := mkBlock(height, numTxs, events) + _, _, err := s.Update(func(ws Updatable) error { + return ws.AddBlock(block) + }) + require.NoError(b, err) + } + err := s.IterateStreamEvents(nil, nil, storage.AscendingSort, func(ev *exec.StreamEvent) error { + return nil + }) + require.NoError(b, err) +} + +func addBlock(t testing.TB, s *State, height, numTxs, events uint64) { + block := mkBlock(height, numTxs, events) + _, _, err := s.Update(func(ws Updatable) error { + return ws.AddBlock(block) + }) + require.NoError(t, err) +} + func deepCountTxs(txes []*exec.TxExecution) int { sum := len(txes) for _, txe := range txes { @@ -128,7 +173,7 @@ func deepCountTxs(txes []*exec.TxExecution) int { func nestTxs(txe *exec.TxExecution, height, events, numTxs uint64) []*exec.TxExecution { txes := make([]*exec.TxExecution, numTxs) for i := uint64(0); i < numTxs; i++ { - txes[i] = mkTx(height, i, events) + txes[i] = mkTxExecution(height, i, events) txe.TxExecutions = append(txe.TxExecutions, txes[i]) } return txes @@ -139,23 +184,26 @@ func mkBlock(height, numTxs, events uint64) *exec.BlockExecution { Height: height, } for ti := uint64(0); ti < numTxs; ti++ { - txe := mkTx(height, ti, events) + txe := mkTxExecution(height, ti, events) be.TxExecutions = append(be.TxExecutions, txe) } return be } -func mkTx(height, txIndex, events uint64) *exec.TxExecution { +func mkTxExecution(height, txIndex, events uint64) *exec.TxExecution { hash := make([]byte, 32) bin.BigEndian.PutUint64(hash[:8], height) bin.BigEndian.PutUint64(hash[8:16], txIndex) bin.BigEndian.PutUint64(hash[16:24], events) + txEnv := txs.Enclose("ChainTheFirst", mkTx()) txe := &exec.TxExecution{ TxHeader: &exec.TxHeader{ TxHash: hash, Height: height, Index: txIndex, }, + Envelope: txEnv, + Receipt: txEnv.Tx.GenerateReceipt(), } for e := uint64(0); e < events; e++ { txe.Events = append(txe.Events, mkEvent(height, txIndex, e)) @@ -163,6 +211,19 @@ func mkTx(height, txIndex, events uint64) *exec.TxExecution { return txe } +func mkTx() payload.Payload { + return &payload.CallTx{ + Input: &payload.TxInput{ + Address: crypto.Address{1, 2, 3}, + Amount: 12345, + Sequence: 67890, + }, + GasLimit: 111, + Fee: 222, + Data: []byte("data1"), + } +} + func mkEvent(height, tx, index uint64) *exec.Event { return &exec.Event{ Header: &exec.Header{ @@ -177,21 +238,3 @@ func mkEvent(height, tx, index uint64) *exec.Event { }, } } - -func BenchmarkAddBlockAndIterator(b *testing.B) { - s := NewState(dbm.NewMemDB()) - numTxs := uint64(5) - events := uint64(10) - for height := uint64(0); height < 2000; height++ { - block := mkBlock(height, numTxs, events) - _, _, err := s.Update(func(ws Updatable) error { - return ws.AddBlock(block) - }) - require.NoError(b, err) - } - err := s.IterateStreamEvents(nil, nil, - func(ev *exec.StreamEvent) error { - return nil - }) - require.NoError(b, err) -} diff --git a/forensics/replay.go b/forensics/replay.go index 152bdbb88..a00299a01 100644 --- a/forensics/replay.go +++ b/forensics/replay.go @@ -80,8 +80,11 @@ func NewSourceFromGenesis(genesisDoc *genesis.GenesisDoc) *Source { } src := NewSource(burrowDB, tmDB, genesisDoc) src.State = burrowState - src.committer = execution.NewBatchCommitter(burrowState, execution.ParamsFromGenesis(genesisDoc), + src.committer, err = execution.NewBatchCommitter(burrowState, execution.ParamsFromGenesis(genesisDoc), burrowChain, event.NewEmitter(), logging.NewNoopLogger()) + if err != nil { + panic(err) + } return src } @@ -118,9 +121,9 @@ func (src *Source) LoadAt(height uint64) (err error) { } // Get our commit machinery - src.committer = execution.NewBatchCommitter(src.State, execution.ParamsFromGenesis(src.genesisDoc), src.blockchain, + src.committer, err = execution.NewBatchCommitter(src.State, execution.ParamsFromGenesis(src.genesisDoc), src.blockchain, event.NewEmitter(), src.logger) - return nil + return err } func (src *Source) LatestHeight() (uint64, error) { diff --git a/forensics/replay_test.go b/forensics/replay_test.go index 0b12aa486..67bf716df 100644 --- a/forensics/replay_test.go +++ b/forensics/replay_test.go @@ -83,8 +83,9 @@ func makeChain(t *testing.T, max uint64) (*genesis.GenesisDoc, dbm.DB, dbm.DB) { burrowDB, burrowState, burrowChain, err := initBurrow(genesisDoc) require.NoError(t, err) - committer := execution.NewBatchCommitter(burrowState, execution.ParamsFromGenesis(genesisDoc), + committer, err := execution.NewBatchCommitter(burrowState, execution.ParamsFromGenesis(genesisDoc), burrowChain, event.NewEmitter(), logging.NewNoopLogger()) + require.NoError(t, err) var stateHash []byte for i := uint64(1); i < max; i++ { diff --git a/forensics/revert_test.go b/forensics/revert_test.go index 478be23b9..42fc92913 100644 --- a/forensics/revert_test.go +++ b/forensics/revert_test.go @@ -27,7 +27,7 @@ func testLoadStudio(t *testing.T, i int) { fmt.Printf("Validator %d hash: %X\n", i, st.Hash()) //txHash := hex.MustDecodeString("DEF358F2CD8746CC2CEADE6EDF6518699FA91C512C45A3894FBB0E746E57B749") - accum := new(exec.BlockAccumulator) + accum := exec.NewBlockAccumulator() buf := new(bytes.Buffer) err = st.IterateStreamEvents(nil, nil, func(ev *exec.StreamEvent) error { be, err := accum.Consume(ev) diff --git a/integration/rpcevents/execution_events_server_test.go b/integration/rpcevents/execution_events_server_test.go index bb9521008..76e089957 100644 --- a/integration/rpcevents/execution_events_server_test.go +++ b/integration/rpcevents/execution_events_server_test.go @@ -119,7 +119,7 @@ func TestExecutionEventsTest(t *testing.T) { blocks = append(blocks, be) assert.Contains(t, strconv.FormatUint(be.Height, 10), "2") return nil - }) + }, exec.NonConsecutiveBlocks|exec.NonConsecutiveTxs) require.Equal(t, io.EOF, err) require.Len(t, blocks, 2, "should record blocks 2 and 12") assert.Equal(t, uint64(2), blocks[0].Height) diff --git a/js/proto/exec_pb.d.ts b/js/proto/exec_pb.d.ts index 13611dd94..93a33f7dc 100644 --- a/js/proto/exec_pb.d.ts +++ b/js/proto/exec_pb.d.ts @@ -89,6 +89,12 @@ export class BeginBlock extends jspb.Message { getHeight(): number; setHeight(value: number): void; + getNumtxs(): number; + setNumtxs(value: number): void; + + getPredecessorheight(): number; + setPredecessorheight(value: number): void; + hasHeader(): boolean; clearHeader(): void; getHeader(): github_com_tendermint_tendermint_abci_types_types_pb.Header | undefined; @@ -107,6 +113,8 @@ export class BeginBlock extends jspb.Message { export namespace BeginBlock { export type AsObject = { height: number, + numtxs: number, + predecessorheight: number, header?: github_com_tendermint_tendermint_abci_types_types_pb.Header.AsObject, } } @@ -137,6 +145,9 @@ export class BeginTx extends jspb.Message { getTxheader(): TxHeader | undefined; setTxheader(value?: TxHeader): void; + getNumevents(): number; + setNumevents(value: number): void; + hasResult(): boolean; clearResult(): void; getResult(): Result | undefined; @@ -160,6 +171,7 @@ export class BeginTx extends jspb.Message { export namespace BeginTx { export type AsObject = { txheader?: TxHeader.AsObject, + numevents: number, result?: Result.AsObject, exception?: errors_pb.Exception.AsObject, } @@ -231,6 +243,9 @@ export class BlockExecution extends jspb.Message { getHeight(): number; setHeight(value: number): void; + getPredecessorheight(): number; + setPredecessorheight(value: number): void; + hasHeader(): boolean; clearHeader(): void; getHeader(): github_com_tendermint_tendermint_abci_types_types_pb.Header | undefined; @@ -254,6 +269,7 @@ export class BlockExecution extends jspb.Message { export namespace BlockExecution { export type AsObject = { height: number, + predecessorheight: number, header?: github_com_tendermint_tendermint_abci_types_types_pb.Header.AsObject, txexecutionsList: Array, } diff --git a/js/proto/exec_pb.js b/js/proto/exec_pb.js index 213276abb..3278b1fec 100644 --- a/js/proto/exec_pb.js +++ b/js/proto/exec_pb.js @@ -1067,6 +1067,8 @@ proto.exec.BeginBlock.prototype.toObject = function(opt_includeInstance) { proto.exec.BeginBlock.toObject = function(includeInstance, msg) { var f, obj = { height: jspb.Message.getFieldWithDefault(msg, 1, 0), + numtxs: jspb.Message.getFieldWithDefault(msg, 3, 0), + predecessorheight: jspb.Message.getFieldWithDefault(msg, 4, 0), header: (f = msg.getHeader()) && github_com_tendermint_tendermint_abci_types_types_pb.Header.toObject(includeInstance, f) }; @@ -1108,6 +1110,14 @@ proto.exec.BeginBlock.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {number} */ (reader.readUint64()); msg.setHeight(value); break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNumtxs(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPredecessorheight(value); + break; case 2: var value = new github_com_tendermint_tendermint_abci_types_types_pb.Header; reader.readMessage(value,github_com_tendermint_tendermint_abci_types_types_pb.Header.deserializeBinaryFromReader); @@ -1149,6 +1159,20 @@ proto.exec.BeginBlock.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getNumtxs(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getPredecessorheight(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } f = message.getHeader(); if (f != null) { writer.writeMessage( @@ -1178,6 +1202,42 @@ proto.exec.BeginBlock.prototype.setHeight = function(value) { }; +/** + * optional uint64 NumTxs = 3; + * @return {number} + */ +proto.exec.BeginBlock.prototype.getNumtxs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.exec.BeginBlock} returns this + */ +proto.exec.BeginBlock.prototype.setNumtxs = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 PredecessorHeight = 4; + * @return {number} + */ +proto.exec.BeginBlock.prototype.getPredecessorheight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.exec.BeginBlock} returns this + */ +proto.exec.BeginBlock.prototype.setPredecessorheight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + /** * optional types.Header Header = 2; * @return {?proto.types.Header} @@ -1378,6 +1438,7 @@ proto.exec.BeginTx.prototype.toObject = function(opt_includeInstance) { proto.exec.BeginTx.toObject = function(includeInstance, msg) { var f, obj = { txheader: (f = msg.getTxheader()) && proto.exec.TxHeader.toObject(includeInstance, f), + numevents: jspb.Message.getFieldWithDefault(msg, 5, 0), result: (f = msg.getResult()) && proto.exec.Result.toObject(includeInstance, f), exception: (f = msg.getException()) && errors_pb.Exception.toObject(includeInstance, f) }; @@ -1421,6 +1482,10 @@ proto.exec.BeginTx.deserializeBinaryFromReader = function(msg, reader) { reader.readMessage(value,proto.exec.TxHeader.deserializeBinaryFromReader); msg.setTxheader(value); break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNumevents(value); + break; case 2: var value = new proto.exec.Result; reader.readMessage(value,proto.exec.Result.deserializeBinaryFromReader); @@ -1468,6 +1533,13 @@ proto.exec.BeginTx.serializeBinaryToWriter = function(message, writer) { proto.exec.TxHeader.serializeBinaryToWriter ); } + f = message.getNumevents(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } f = message.getResult(); if (f != null) { writer.writeMessage( @@ -1524,6 +1596,24 @@ proto.exec.BeginTx.prototype.hasTxheader = function() { }; +/** + * optional uint64 NumEvents = 5; + * @return {number} + */ +proto.exec.BeginTx.prototype.getNumevents = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.exec.BeginTx} returns this + */ +proto.exec.BeginTx.prototype.setNumevents = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + /** * optional Result Result = 2; * @return {?proto.exec.Result} @@ -2087,6 +2177,7 @@ proto.exec.BlockExecution.prototype.toObject = function(opt_includeInstance) { proto.exec.BlockExecution.toObject = function(includeInstance, msg) { var f, obj = { height: jspb.Message.getFieldWithDefault(msg, 1, 0), + predecessorheight: jspb.Message.getFieldWithDefault(msg, 4, 0), header: (f = msg.getHeader()) && github_com_tendermint_tendermint_abci_types_types_pb.Header.toObject(includeInstance, f), txexecutionsList: jspb.Message.toObjectList(msg.getTxexecutionsList(), proto.exec.TxExecution.toObject, includeInstance) @@ -2130,6 +2221,10 @@ proto.exec.BlockExecution.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {number} */ (reader.readUint64()); msg.setHeight(value); break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPredecessorheight(value); + break; case 2: var value = new github_com_tendermint_tendermint_abci_types_types_pb.Header; reader.readMessage(value,github_com_tendermint_tendermint_abci_types_types_pb.Header.deserializeBinaryFromReader); @@ -2176,6 +2271,13 @@ proto.exec.BlockExecution.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getPredecessorheight(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } f = message.getHeader(); if (f != null) { writer.writeMessage( @@ -2213,6 +2315,24 @@ proto.exec.BlockExecution.prototype.setHeight = function(value) { }; +/** + * optional uint64 PredecessorHeight = 4; + * @return {number} + */ +proto.exec.BlockExecution.prototype.getPredecessorheight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.exec.BlockExecution} returns this + */ +proto.exec.BlockExecution.prototype.setPredecessorheight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + /** * optional types.Header Header = 2; * @return {?proto.types.Header} diff --git a/js/proto/txs_pb.d.ts b/js/proto/txs_pb.d.ts index 25b0567ac..4879ca13e 100644 --- a/js/proto/txs_pb.d.ts +++ b/js/proto/txs_pb.d.ts @@ -16,8 +16,8 @@ export class Envelope extends jspb.Message { getTx_asB64(): string; setTx(value: Uint8Array | string): void; - getEnc(): Envelope.EncodingMap[keyof Envelope.EncodingMap]; - setEnc(value: Envelope.EncodingMap[keyof Envelope.EncodingMap]): void; + getEncoding(): Envelope.EncodingTypeMap[keyof Envelope.EncodingTypeMap]; + setEncoding(value: Envelope.EncodingTypeMap[keyof Envelope.EncodingTypeMap]): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Envelope.AsObject; @@ -33,15 +33,15 @@ export namespace Envelope { export type AsObject = { signatoriesList: Array, tx: Uint8Array | string, - enc: Envelope.EncodingMap[keyof Envelope.EncodingMap], + encoding: Envelope.EncodingTypeMap[keyof Envelope.EncodingTypeMap], } - export interface EncodingMap { + export interface EncodingTypeMap { JSON: 0; RLP: 1; } - export const Encoding: EncodingMap; + export const EncodingType: EncodingTypeMap; } export class Signatory extends jspb.Message { diff --git a/js/proto/txs_pb.js b/js/proto/txs_pb.js index bc6f6158c..56ef46833 100644 --- a/js/proto/txs_pb.js +++ b/js/proto/txs_pb.js @@ -17,7 +17,7 @@ goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); var crypto_pb = require('./crypto_pb.js'); goog.object.extend(proto, crypto_pb); goog.exportSymbol('proto.txs.Envelope', null, global); -goog.exportSymbol('proto.txs.Envelope.Encoding', null, global); +goog.exportSymbol('proto.txs.Envelope.EncodingType', null, global); goog.exportSymbol('proto.txs.Receipt', null, global); goog.exportSymbol('proto.txs.Signatory', null, global); /** @@ -125,7 +125,7 @@ proto.txs.Envelope.toObject = function(includeInstance, msg) { signatoriesList: jspb.Message.toObjectList(msg.getSignatoriesList(), proto.txs.Signatory.toObject, includeInstance), tx: msg.getTx_asB64(), - enc: jspb.Message.getFieldWithDefault(msg, 3, 0) + encoding: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -172,8 +172,8 @@ proto.txs.Envelope.deserializeBinaryFromReader = function(msg, reader) { msg.setTx(value); break; case 3: - var value = /** @type {!proto.txs.Envelope.Encoding} */ (reader.readEnum()); - msg.setEnc(value); + var value = /** @type {!proto.txs.Envelope.EncodingType} */ (reader.readEnum()); + msg.setEncoding(value); break; default: reader.skipField(); @@ -219,7 +219,7 @@ proto.txs.Envelope.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getEnc(); + f = message.getEncoding(); if (f !== 0.0) { writer.writeEnum( 3, @@ -232,7 +232,7 @@ proto.txs.Envelope.serializeBinaryToWriter = function(message, writer) { /** * @enum {number} */ -proto.txs.Envelope.Encoding = { +proto.txs.Envelope.EncodingType = { JSON: 0, RLP: 1 }; @@ -318,19 +318,19 @@ proto.txs.Envelope.prototype.setTx = function(value) { /** - * optional Encoding Enc = 3; - * @return {!proto.txs.Envelope.Encoding} + * optional EncodingType Encoding = 3; + * @return {!proto.txs.Envelope.EncodingType} */ -proto.txs.Envelope.prototype.getEnc = function() { - return /** @type {!proto.txs.Envelope.Encoding} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.txs.Envelope.prototype.getEncoding = function() { + return /** @type {!proto.txs.Envelope.EncodingType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {!proto.txs.Envelope.Encoding} value + * @param {!proto.txs.Envelope.EncodingType} value * @return {!proto.txs.Envelope} returns this */ -proto.txs.Envelope.prototype.setEnc = function(value) { +proto.txs.Envelope.prototype.setEncoding = function(value) { return jspb.Message.setProto3EnumField(this, 3, value); }; diff --git a/protobuf/exec.proto b/protobuf/exec.proto index 53180130e..fb74d4a50 100644 --- a/protobuf/exec.proto +++ b/protobuf/exec.proto @@ -39,6 +39,10 @@ message StreamEvent { message BeginBlock { // The height of this block uint64 Height = 1; + // The number of transactions in the block (used as a checksum when consuming StreamEvents) + uint64 NumTxs = 3; + // The height of the most recent block we stored in state (which is the last non-empty block in current implementation) + uint64 PredecessorHeight = 4; types.Header Header = 2; } @@ -48,6 +52,8 @@ message EndBlock { message BeginTx { TxHeader TxHeader = 1; + // The number of events generated by this transaction execution (used as a checksum when consuming StreamEvents) + uint64 NumEvents = 5; // Result of tx execution Result Result = 2; // If tx execution was an exception @@ -64,7 +70,7 @@ message TxHeader { uint32 TxType = 1 [(gogoproto.casttype) = "github.com/hyperledger/burrow/txs/payload.Type"]; // The hash of the transaction that caused this event to be generated bytes TxHash = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; - // The block height at which this Tx was included + // The block height at which this transaction was included uint64 Height = 3; // The index of this transaction within the block uint64 Index = 4; @@ -75,6 +81,8 @@ message TxHeader { message BlockExecution { // The height of this block uint64 Height = 1; + // The height of the most recent block we stored in state (which is the last non-empty block in current implementation) + uint64 PredecessorHeight = 4; types.Header Header = 2; repeated TxExecution TxExecutions = 3; } diff --git a/protobuf/txs.proto b/protobuf/txs.proto index 1f52711b6..da8638834 100644 --- a/protobuf/txs.proto +++ b/protobuf/txs.proto @@ -25,11 +25,11 @@ message Envelope { repeated Signatory Signatories = 1 [(gogoproto.nullable) = false]; // Canonical bytes of the Tx ready to be signed bytes Tx = 2 [(gogoproto.customtype) = "Tx"]; - enum Encoding { + enum EncodingType { JSON = 0; RLP = 1; } - Encoding Enc = 3; + EncodingType Encoding = 3; } diff --git a/rpc/eth.go b/rpc/eth.go index 918e8c917..f5c75ef1f 100644 --- a/rpc/eth.go +++ b/rpc/eth.go @@ -622,7 +622,7 @@ func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionPara Signature: signature, }, }, - Enc: txs.Envelope_RLP, + Encoding: txs.Envelope_RLP, Tx: &txs.Tx{ ChainID: srv.blockchain.ChainID(), Payload: &payload.CallTx{ diff --git a/rpc/rpcevents/blocks.go b/rpc/rpcevents/blocks.go index 761a63711..310e3d05e 100644 --- a/rpc/rpcevents/blocks.go +++ b/rpc/rpcevents/blocks.go @@ -72,10 +72,12 @@ func SingleBlock(height uint64) *BlockRange { return AbsoluteRange(height, height+1) } -func ConsumeBlockExecutions(stream ExecutionEvents_StreamClient, consumer func(*exec.BlockExecution) error) error { +func ConsumeBlockExecutions(stream ExecutionEvents_StreamClient, consumer func(*exec.BlockExecution) error, + continuityOptions ...exec.ContinuityOpt) error { var be *exec.BlockExecution var err error - for be, err = exec.ConsumeBlockExecution(stream); err == nil; be, err = exec.ConsumeBlockExecution(stream) { + ba := exec.NewBlockAccumulator(continuityOptions...) + for be, err = ba.ConsumeBlockExecution(stream); err == nil; be, err = ba.ConsumeBlockExecution(stream) { err = consumer(be) if err != nil { return err diff --git a/rpc/rpcevents/execution_events_server.go b/rpc/rpcevents/execution_events_server.go index e25ce8273..e4577544d 100644 --- a/rpc/rpcevents/execution_events_server.go +++ b/rpc/rpcevents/execution_events_server.go @@ -10,13 +10,15 @@ import ( "github.com/hyperledger/burrow/event/query" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/storage" ) const SubscribeBufferSize = 100 type Provider interface { // Get transactions - IterateStreamEvents(start, end *uint64, consumer func(*exec.StreamEvent) error) (err error) + IterateStreamEvents(startHeight, endHeight *uint64, sortOrder storage.SortOrder, + consumer func(*exec.StreamEvent) error) (err error) // Get a particular TxExecution by hash TxByHash(txHash []byte) (*exec.TxExecution, error) } @@ -140,8 +142,10 @@ func (ees *executionEventsServer) streamEvents(ctx context.Context, blockRange * // Check if we have missed blocks we need to catch up on if start < block.Height { // We expect start == block.Height when processing consecutive blocks but we may have missed a block by - // dropping an event - if so we can fill in here - catchupEnd := block.Height + // pubsub dropping an event (e.g. under heavy load) - if so we can fill in here. Since we have just + // received block at block.Height it should be guaranteed that we have stored all blocks <= block.Height + // in state (we only publish after successful state update). + catchupEnd := block.Height - 1 if catchupEnd > end { catchupEnd = end } @@ -202,12 +206,12 @@ func (ees *executionEventsServer) iterateStreamEvents(startHeight, endHeight uin // NOTE: this will underflow when start is 0 (as it often will be - and needs to be for restored chains) // however we at most underflow by 1 and we always add 1 back on when returning so we get away with this. lastHeightSeen := startHeight - 1 - err := ees.eventsProvider.IterateStreamEvents(&startHeight, &endHeight, - func(blockEvent *exec.StreamEvent) error { - if blockEvent.EndBlock != nil { - lastHeightSeen = blockEvent.EndBlock.GetHeight() + err := ees.eventsProvider.IterateStreamEvents(&startHeight, &endHeight, storage.AscendingSort, + func(ev *exec.StreamEvent) error { + if ev.EndBlock != nil { + lastHeightSeen = ev.EndBlock.GetHeight() } - return consumer(blockEvent) + return consumer(ev) }) // Returns the appropriate _next_ starting block - the one after the one we have seen - from which to stream next return lastHeightSeen + 1, err diff --git a/storage/kvstore.go b/storage/kvstore.go index 8ee036a96..1dd788ee2 100644 --- a/storage/kvstore.go +++ b/storage/kvstore.go @@ -8,7 +8,7 @@ import ( type KVIterator = dbm.Iterator -// This is partially extrated from Cosmos SDK for alignment but is more minimal, we should suggest this becomes an +// This is partially extracted from Cosmos SDK for alignment but is more minimal, we should suggest this becomes an // embedded interface type KVIterable interface { // Iterator over a domain of keys in ascending order. high is exclusive. diff --git a/storage/sort_order.go b/storage/sort_order.go new file mode 100644 index 000000000..3f4ce11fb --- /dev/null +++ b/storage/sort_order.go @@ -0,0 +1,8 @@ +package storage + +type SortOrder byte + +const ( + AscendingSort SortOrder = iota + DescendingSort +) diff --git a/tests/jobs_fixtures/app57-bond-unbond/deploy.yaml b/tests/jobs_fixtures/app57-bond-unbond/deploy.yaml index da2cbbfe3..a33a1e7b7 100644 --- a/tests/jobs_fixtures/app57-bond-unbond/deploy.yaml +++ b/tests/jobs_fixtures/app57-bond-unbond/deploy.yaml @@ -1,11 +1,8 @@ -# Exclusive with app48 -no-parallel: true - jobs: - name: power set: - val: 1234 + val: 12345 - name: Validator update-account: @@ -45,4 +42,4 @@ jobs: assert: key: $PowerAfterRemoved relation: eq - val: $InitialTotalPower + val: $InitialTotalPower \ No newline at end of file diff --git a/tests/jobs_fixtures/app57-bond-unbond/storage.sol b/tests/jobs_fixtures/app57-bond-unbond/storage.sol new file mode 100644 index 000000000..337fdcce9 --- /dev/null +++ b/tests/jobs_fixtures/app57-bond-unbond/storage.sol @@ -0,0 +1,14 @@ +pragma solidity >=0.0.0; + +contract Storage { + int storedData; + + function set(int x) public { + storedData = x; + } + + function get() view public returns (int retVal) { + return storedData; + } +} + diff --git a/txs/envelope.go b/txs/envelope.go index d2147a1c0..be89d5049 100644 --- a/txs/envelope.go +++ b/txs/envelope.go @@ -109,7 +109,7 @@ func (txEnv *Envelope) Verify(chainID string) error { return fmt.Errorf("%s: number of inputs (= %v) should equal number of signatories (= %v)", errPrefix, len(inputs), len(txEnv.Signatories)) } - signBytes, err := txEnv.Tx.SignBytes(txEnv.GetEnc()) + signBytes, err := txEnv.Tx.SignBytes(txEnv.GetEncoding()) if err != nil { return fmt.Errorf("%s: could not generate SignBytes: %v", errPrefix, err) } @@ -132,7 +132,7 @@ func (txEnv *Envelope) Verify(chainID string) error { func (txEnv *Envelope) Sign(signingAccounts ...acm.AddressableSigner) error { // Clear any existing txEnv.Signatories = nil - signBytes, err := txEnv.Tx.SignBytes(txEnv.GetEnc()) + signBytes, err := txEnv.Tx.SignBytes(txEnv.GetEncoding()) if err != nil { return err } diff --git a/txs/tx.go b/txs/tx.go index 68c9935f0..00d6573a2 100644 --- a/txs/tx.go +++ b/txs/tx.go @@ -66,7 +66,7 @@ func (tx *Tx) MustSignBytes() []byte { } // Produces the canonical SignBytes (the Tx message that will be signed) for a Tx -func (tx *Tx) SignBytes(enc Envelope_Encoding) ([]byte, error) { +func (tx *Tx) SignBytes(enc Envelope_EncodingType) ([]byte, error) { switch enc { case Envelope_JSON: bs, err := json.Marshal(tx) diff --git a/txs/tx_test.go b/txs/tx_test.go index 645c1d99e..267768cdb 100644 --- a/txs/tx_test.go +++ b/txs/tx_test.go @@ -65,7 +65,6 @@ func TestSendTx(t *testing.T) { } func TestCallTx(t *testing.T) { - toAddress := makePrivateAccount("contract1").GetAddress() callTx := &payload.CallTx{ Input: &payload.TxInput{ diff --git a/txs/txs.pb.go b/txs/txs.pb.go index ae8cc1e9f..1e51017fc 100644 --- a/txs/txs.pb.go +++ b/txs/txs.pb.go @@ -30,28 +30,28 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type Envelope_Encoding int32 +type Envelope_EncodingType int32 const ( - Envelope_JSON Envelope_Encoding = 0 - Envelope_RLP Envelope_Encoding = 1 + Envelope_JSON Envelope_EncodingType = 0 + Envelope_RLP Envelope_EncodingType = 1 ) -var Envelope_Encoding_name = map[int32]string{ +var Envelope_EncodingType_name = map[int32]string{ 0: "JSON", 1: "RLP", } -var Envelope_Encoding_value = map[string]int32{ +var Envelope_EncodingType_value = map[string]int32{ "JSON": 0, "RLP": 1, } -func (x Envelope_Encoding) String() string { - return proto.EnumName(Envelope_Encoding_name, int32(x)) +func (x Envelope_EncodingType) String() string { + return proto.EnumName(Envelope_EncodingType_name, int32(x)) } -func (Envelope_Encoding) EnumDescriptor() ([]byte, []int) { +func (Envelope_EncodingType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_372ebcf753025bdc, []int{0, 0} } @@ -59,11 +59,11 @@ func (Envelope_Encoding) EnumDescriptor() ([]byte, []int) { type Envelope struct { Signatories []Signatory `protobuf:"bytes,1,rep,name=Signatories,proto3" json:"Signatories"` // Canonical bytes of the Tx ready to be signed - Tx *Tx `protobuf:"bytes,2,opt,name=Tx,proto3,customtype=Tx" json:"Tx,omitempty"` - Enc Envelope_Encoding `protobuf:"varint,3,opt,name=Enc,proto3,enum=txs.Envelope_Encoding" json:"Enc,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Tx *Tx `protobuf:"bytes,2,opt,name=Tx,proto3,customtype=Tx" json:"Tx,omitempty"` + Encoding Envelope_EncodingType `protobuf:"varint,3,opt,name=Encoding,proto3,enum=txs.Envelope_EncodingType" json:"Encoding,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Envelope) Reset() { *m = Envelope{} } @@ -105,9 +105,9 @@ func (m *Envelope) GetSignatories() []Signatory { return nil } -func (m *Envelope) GetEnc() Envelope_Encoding { +func (m *Envelope) GetEncoding() Envelope_EncodingType { if m != nil { - return m.Enc + return m.Encoding } return Envelope_JSON } @@ -243,8 +243,8 @@ func (*Receipt) XXX_MessageName() string { return "txs.Receipt" } func init() { - proto.RegisterEnum("txs.Envelope_Encoding", Envelope_Encoding_name, Envelope_Encoding_value) - golang_proto.RegisterEnum("txs.Envelope_Encoding", Envelope_Encoding_name, Envelope_Encoding_value) + proto.RegisterEnum("txs.Envelope_EncodingType", Envelope_EncodingType_name, Envelope_EncodingType_value) + golang_proto.RegisterEnum("txs.Envelope_EncodingType", Envelope_EncodingType_name, Envelope_EncodingType_value) proto.RegisterType((*Envelope)(nil), "txs.Envelope") golang_proto.RegisterType((*Envelope)(nil), "txs.Envelope") proto.RegisterType((*Signatory)(nil), "txs.Signatory") @@ -257,37 +257,37 @@ func init() { proto.RegisterFile("txs.proto", fileDescriptor_372ebcf753025bdc) } func init() { golang_proto.RegisterFile("txs.proto", fileDescriptor_372ebcf753025bdc) } var fileDescriptor_372ebcf753025bdc = []byte{ - // 469 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x3b, 0x6f, 0xd4, 0x40, - 0x10, 0xbe, 0xb5, 0xad, 0x7b, 0xec, 0x85, 0x24, 0x6c, 0x11, 0x9d, 0x22, 0x61, 0x1f, 0x57, 0xb9, - 0x20, 0x36, 0x3a, 0x5e, 0x12, 0x1d, 0x8e, 0x4e, 0x8a, 0x8e, 0x57, 0xb4, 0x71, 0x45, 0x81, 0xe4, - 0xc7, 0xe2, 0xb3, 0x64, 0xbc, 0xd6, 0x7a, 0x0d, 0xf6, 0x3f, 0xa1, 0xa4, 0xa5, 0xa1, 0xa7, 0xa3, - 0xbc, 0x92, 0xfa, 0x0a, 0x0b, 0x5d, 0xfe, 0x05, 0x15, 0xda, 0x3d, 0xfb, 0x12, 0x52, 0x1c, 0x4a, - 0xb7, 0x33, 0xf3, 0x7d, 0xdf, 0x7c, 0x33, 0xb3, 0x70, 0xc0, 0xcb, 0xdc, 0xca, 0x18, 0xe5, 0x14, - 0xa9, 0xbc, 0xcc, 0x8f, 0x4f, 0xa2, 0x98, 0x2f, 0x0a, 0xdf, 0x0a, 0xe8, 0x47, 0x3b, 0xa2, 0x11, - 0xb5, 0x65, 0xcd, 0x2f, 0x3e, 0xc8, 0x48, 0x06, 0xf2, 0xb5, 0xe1, 0x1c, 0xef, 0x05, 0xac, 0xca, - 0x78, 0x13, 0x4d, 0xbe, 0x01, 0xd8, 0x9f, 0xa5, 0x9f, 0x48, 0x42, 0x33, 0x82, 0x9e, 0xc2, 0xe1, - 0x45, 0x1c, 0xa5, 0x1e, 0xa7, 0x2c, 0x26, 0xf9, 0x08, 0x8c, 0x55, 0x73, 0x38, 0xdd, 0xb7, 0x44, - 0xbf, 0x36, 0x5f, 0x39, 0xda, 0xb2, 0x36, 0x3a, 0xf8, 0x3a, 0x10, 0x1d, 0x41, 0xc5, 0x2d, 0x47, - 0xca, 0x18, 0x98, 0x7b, 0x4e, 0x77, 0x55, 0x1b, 0x8a, 0x5b, 0x62, 0xc5, 0x2d, 0x91, 0x09, 0xd5, - 0x59, 0x1a, 0x8c, 0xd4, 0x31, 0x30, 0xf7, 0xa7, 0x47, 0x52, 0xa7, 0xed, 0x65, 0xcd, 0xd2, 0x80, - 0x86, 0x71, 0x1a, 0x61, 0x01, 0x99, 0xdc, 0x13, 0x2e, 0x36, 0x09, 0xd4, 0x87, 0xda, 0xfc, 0xe2, - 0xed, 0x9b, 0xc3, 0x0e, 0xea, 0x41, 0x15, 0xbf, 0x3a, 0x3f, 0x04, 0xcf, 0xb5, 0x2f, 0x5f, 0x8d, - 0xce, 0xe4, 0x07, 0x80, 0x83, 0xad, 0x0f, 0x34, 0x87, 0xbd, 0x17, 0x61, 0xc8, 0x48, 0x2e, 0x8c, - 0x8a, 0xce, 0x0f, 0x57, 0xb5, 0xf1, 0xe0, 0xda, 0x2e, 0x16, 0x55, 0x46, 0x58, 0x42, 0xc2, 0x88, - 0x30, 0xdb, 0x2f, 0x18, 0xa3, 0x9f, 0xed, 0x66, 0xf4, 0x86, 0x87, 0x5b, 0x01, 0x64, 0xc3, 0xc1, - 0x79, 0xe1, 0x27, 0x71, 0xf0, 0x92, 0x54, 0x72, 0x8e, 0xe1, 0xf4, 0xae, 0xd5, 0x80, 0xb7, 0x05, - 0x7c, 0x85, 0x11, 0x84, 0x8d, 0x93, 0x82, 0x91, 0x91, 0xf6, 0x2f, 0x61, 0x5b, 0xc0, 0x57, 0x98, - 0xc9, 0x77, 0x05, 0xf6, 0x30, 0x09, 0x48, 0x9c, 0x71, 0x34, 0x87, 0x5d, 0xb7, 0x74, 0xab, 0x8c, - 0x48, 0xe3, 0x77, 0x9c, 0xe9, 0x9f, 0xda, 0xb0, 0x76, 0x1b, 0xe7, 0x65, 0x6e, 0x67, 0x5e, 0x95, - 0x50, 0x2f, 0xb4, 0x04, 0x13, 0x37, 0x0a, 0xe8, 0xb5, 0xd0, 0x3a, 0xf3, 0xf2, 0x45, 0xb3, 0xfe, - 0x27, 0xe2, 0x3a, 0xab, 0xda, 0x38, 0xd9, 0xad, 0xe7, 0xc7, 0xa9, 0xc7, 0x2a, 0xeb, 0x8c, 0x94, - 0x4e, 0xc5, 0x49, 0x8e, 0x1b, 0x11, 0x64, 0xc2, 0x83, 0x53, 0x46, 0x3c, 0x4e, 0xf2, 0x53, 0x9a, - 0x72, 0xe6, 0x05, 0x5c, 0x5e, 0xaf, 0x8f, 0x6f, 0xa6, 0xd1, 0x7b, 0x78, 0xd0, 0xbe, 0xdb, 0x33, - 0x68, 0xd2, 0xc1, 0xe3, 0xc6, 0xc1, 0xed, 0x4e, 0x71, 0x53, 0xcc, 0x79, 0xb6, 0x5c, 0xeb, 0xe0, - 0xd7, 0x5a, 0x07, 0xbf, 0xd7, 0x3a, 0xf8, 0x79, 0xa9, 0x83, 0xe5, 0xa5, 0x0e, 0xde, 0xdd, 0xff, - 0xef, 0x9a, 0xfc, 0xae, 0xfc, 0xd8, 0x8f, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x7c, 0xcd, - 0xa7, 0x27, 0x03, 0x00, 0x00, + // 468 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0xbb, 0x8e, 0xd3, 0x40, + 0x14, 0xcd, 0x38, 0x56, 0x1e, 0x93, 0xb0, 0xbb, 0x4c, 0x81, 0xa2, 0x14, 0x76, 0x36, 0x55, 0x0a, + 0xd6, 0x46, 0x01, 0x16, 0x89, 0x0e, 0xaf, 0x90, 0x56, 0xe1, 0xb5, 0x9a, 0x75, 0x45, 0x81, 0xe4, + 0xc7, 0xc5, 0xb1, 0x14, 0x3c, 0xd6, 0x78, 0x0c, 0xf6, 0x9f, 0x50, 0xf2, 0x05, 0xf4, 0x88, 0x86, + 0x32, 0x25, 0x75, 0x0a, 0x0b, 0x65, 0xff, 0x82, 0x0a, 0x79, 0xd6, 0xf6, 0x86, 0x2d, 0x82, 0xe8, + 0xe6, 0xce, 0x39, 0xf7, 0xcc, 0xb9, 0xf7, 0x0c, 0xee, 0x8b, 0x2c, 0x31, 0x62, 0xce, 0x04, 0x23, + 0x6d, 0x91, 0x25, 0xe3, 0x93, 0x20, 0x14, 0xcb, 0xd4, 0x35, 0x3c, 0xf6, 0xc1, 0x0c, 0x58, 0xc0, + 0x4c, 0x89, 0xb9, 0xe9, 0x7b, 0x59, 0xc9, 0x42, 0x9e, 0xae, 0x7b, 0xc6, 0x43, 0x8f, 0xe7, 0xb1, + 0xa8, 0xaa, 0xe9, 0x77, 0x84, 0x7b, 0xcf, 0xa3, 0x8f, 0xb0, 0x62, 0x31, 0x90, 0x53, 0x3c, 0xb8, + 0x0c, 0x83, 0xc8, 0x11, 0x8c, 0x87, 0x90, 0x8c, 0xd0, 0xa4, 0x3d, 0x1b, 0xcc, 0x0f, 0x8c, 0xf2, + 0xbd, 0xfa, 0x3e, 0xb7, 0xd4, 0x75, 0xa1, 0xb7, 0xe8, 0x2e, 0x91, 0xdc, 0xc3, 0x8a, 0x9d, 0x8d, + 0x94, 0x09, 0x9a, 0x0d, 0xad, 0xce, 0xa6, 0xd0, 0x15, 0x3b, 0xa3, 0x8a, 0x9d, 0x91, 0xd3, 0x52, + 0xdb, 0x63, 0x7e, 0x18, 0x05, 0xa3, 0xf6, 0x04, 0xcd, 0x0e, 0xe6, 0x63, 0x29, 0x56, 0x3f, 0x68, + 0xd4, 0xa8, 0x9d, 0xc7, 0x40, 0x1b, 0xee, 0xf4, 0x18, 0x0f, 0x77, 0x11, 0xd2, 0xc3, 0xea, 0xe2, + 0xf2, 0xcd, 0xeb, 0xa3, 0x16, 0xe9, 0xe2, 0x36, 0x7d, 0x79, 0x71, 0x84, 0x9e, 0xaa, 0x9f, 0xbf, + 0xe8, 0xad, 0xe9, 0x37, 0x84, 0xfb, 0x8d, 0x33, 0xb2, 0xc0, 0xdd, 0x67, 0xbe, 0xcf, 0x21, 0x29, + 0xad, 0x97, 0x5e, 0x1e, 0x6c, 0x0a, 0xfd, 0xfe, 0xce, 0x76, 0x96, 0x79, 0x0c, 0x7c, 0x05, 0x7e, + 0x00, 0xdc, 0x74, 0x53, 0xce, 0xd9, 0x27, 0xb3, 0x5a, 0x46, 0xd5, 0x47, 0x6b, 0x01, 0x62, 0xe2, + 0xfe, 0x45, 0xea, 0xae, 0x42, 0xef, 0x05, 0xe4, 0x72, 0xb2, 0xc1, 0xfc, 0xae, 0x51, 0x91, 0x1b, + 0x80, 0xde, 0x70, 0xca, 0x86, 0x6b, 0x27, 0x29, 0x87, 0x91, 0xfa, 0x77, 0x43, 0x03, 0xd0, 0x1b, + 0xce, 0xf4, 0xab, 0x82, 0xbb, 0x14, 0x3c, 0x08, 0x63, 0x41, 0x16, 0xb8, 0x63, 0x67, 0xe5, 0xa8, + 0xd2, 0xf8, 0x1d, 0x6b, 0xfe, 0xbb, 0xd0, 0x8d, 0xfd, 0xc6, 0x45, 0x96, 0x98, 0xb1, 0x93, 0xaf, + 0x98, 0xe3, 0x1b, 0x72, 0x7d, 0x95, 0x02, 0x79, 0x55, 0x6a, 0x9d, 0x3b, 0xc9, 0xb2, 0x0a, 0xe4, + 0x71, 0x99, 0xd7, 0xa6, 0xd0, 0x4f, 0xf6, 0xeb, 0xb9, 0x61, 0xe4, 0xf0, 0xdc, 0x38, 0x87, 0xcc, + 0xca, 0x05, 0x24, 0xb4, 0x12, 0x21, 0x33, 0x7c, 0x78, 0xc6, 0xc1, 0x11, 0x90, 0x9c, 0xb1, 0x48, + 0x70, 0xc7, 0x13, 0x32, 0xca, 0x1e, 0xbd, 0x7d, 0x4d, 0xde, 0xe1, 0xc3, 0xfa, 0x5c, 0xc7, 0xa0, + 0x4a, 0x07, 0x8f, 0x2a, 0x07, 0xff, 0x17, 0xc5, 0x6d, 0x31, 0xeb, 0xc9, 0x7a, 0xab, 0xa1, 0x9f, + 0x5b, 0x0d, 0xfd, 0xda, 0x6a, 0xe8, 0xc7, 0x95, 0x86, 0xd6, 0x57, 0x1a, 0x7a, 0x7b, 0xfc, 0xcf, + 0x35, 0xb9, 0x1d, 0xf9, 0xd5, 0x1f, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x03, 0x82, 0x5c, 0xd8, + 0x39, 0x03, 0x00, 0x00, } func (m *Envelope) Marshal() (dAtA []byte, err error) { @@ -314,8 +314,8 @@ func (m *Envelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.Enc != 0 { - i = encodeVarintTxs(dAtA, i, uint64(m.Enc)) + if m.Encoding != 0 { + i = encodeVarintTxs(dAtA, i, uint64(m.Encoding)) i-- dAtA[i] = 0x18 } @@ -500,8 +500,8 @@ func (m *Envelope) Size() (n int) { l = m.Tx.Size() n += 1 + l + sovTxs(uint64(l)) } - if m.Enc != 0 { - n += 1 + sovTxs(uint64(m.Enc)) + if m.Encoding != 0 { + n += 1 + sovTxs(uint64(m.Encoding)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -661,9 +661,9 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Enc", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) } - m.Enc = 0 + m.Encoding = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTxs @@ -673,7 +673,7 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Enc |= Envelope_Encoding(b&0x7F) << shift + m.Encoding |= Envelope_EncodingType(b&0x7F) << shift if b < 0x80 { break } diff --git a/vent/service/block_consumer.go b/vent/service/block_consumer.go index ff2d288d2..7003784e7 100644 --- a/vent/service/block_consumer.go +++ b/vent/service/block_consumer.go @@ -2,10 +2,8 @@ package service import ( "io" - "reflect" "github.com/hyperledger/burrow/event/query" - "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/structure" @@ -20,20 +18,22 @@ func NewBlockConsumer(projection *sqlsol.Projection, opt sqlsol.SpecOpt, getEven logger = logger.WithScope("makeBlockConsumer") + var blockHeight uint64 + return func(blockExecution *exec.BlockExecution) error { if finished(doneCh) { return io.EOF } // set new block number - fromBlock := blockExecution.Height + blockHeight = blockExecution.Height logger.TraceMsg("Block received", "height", blockExecution.Height, "num_txs", len(blockExecution.TxExecutions)) // create a fresh new structure to store block data at this height - blockData := sqlsol.NewBlockData(fromBlock) + blockData := sqlsol.NewBlockData(blockHeight) if opt.Enabled(sqlsol.Block) { blkRawData, err := buildBlkData(projection.Tables, blockExecution) @@ -127,18 +127,10 @@ func NewBlockConsumer(projection *sqlsol.Projection, opt sqlsol.SpecOpt, getEven // upsert rows in specific SQL event tables and update block number // store block data in SQL tables (if any) for name, rows := range blockData.Data.Tables { - logger.InfoMsg("Upserting rows in SQL table", "height", fromBlock, "table", name, "action", "UPSERT", "rows", rows) + logger.InfoMsg("Upserting rows in SQL table", "height", blockHeight, "table", name, "action", "UPSERT", "rows", rows) } eventCh <- blockData.Data return nil } } - -type eventSpecTagged struct { - Event abi.EventSpec -} - -func (e *eventSpecTagged) Get(key string) (value interface{}, ok bool) { - return query.GetReflect(reflect.ValueOf(e), key) -} diff --git a/vent/service/consumer_integration_test.go b/vent/service/consumer_integration_test.go index 80437cf01..d426deb97 100644 --- a/vent/service/consumer_integration_test.go +++ b/vent/service/consumer_integration_test.go @@ -159,16 +159,11 @@ func testResume(t *testing.T, cfg *config.VentConfig) { // Add some pseudo-random timings rnd := rand.New(rand.NewSource(4634653)) time.Sleep(time.Second) - var expectedHeight uint64 for i := 0; i < numRestarts; i++ { // wait up to a second time.Sleep(time.Millisecond * time.Duration(rnd.Int63n(1000))) for ed := range runConsumer(t, cfg) { - t.Logf("expecting block: %d, got block: %d", expectedHeight, ed.BlockHeight) - if expectedHeight > ed.BlockHeight { - require.Fail(t, "should get monotonic sequential sequence") - } - expectedHeight = ed.BlockHeight + t.Logf("testResume, got block: %d", ed.BlockHeight) } } } From caa010361dbdb431476f60db6305216ad5d006ae Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 22 Apr 2020 13:06:30 +0100 Subject: [PATCH 106/185] Fix docs site Signed-off-by: Silas Davis --- README.md | 2 +- docs/README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 120000 docs/README.md diff --git a/README.md b/README.md index 7490f9301..3920c3263 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Highlights include: - Just a virtual machine - A research project - we run it in production -### Further introduction +### Further introductory material See [Burrow - the Boring Blockchain](https://wiki.hyperledger.org/display/burrow/Burrow+-+The+Boring+Blockchain) for an introduction to Burrow and its motivating vision. diff --git a/docs/README.md b/docs/README.md new file mode 120000 index 000000000..32d46ee88 --- /dev/null +++ b/docs/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file From a562de88edad5a8ae7bc8805599ad802837f2b6e Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 22 Apr 2020 13:20:56 +0100 Subject: [PATCH 107/185] Swapsies on the README symlink to make docsify happy Signed-off-by: Silas Davis --- README.md | 66 ------------------------------------------------- docs/README.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 66 insertions(+), 67 deletions(-) delete mode 100644 README.md mode change 120000 => 100644 docs/README.md diff --git a/README.md b/README.md deleted file mode 100644 index 3920c3263..000000000 --- a/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# [Hyperledger Burrow](https://hyperledger.github.io/burrow) - -[![CI](https://github.com/hyperledger/burrow/workflows/master/badge.svg)](https://launch-editor.github.com/actions?workflowID=master&event=push&nwo=hyperledger%2Fburrow) -[![version](https://img.shields.io/github/tag/hyperledger/burrow.svg)](https://github.com/hyperledger/burrow/releases/latest) -[![GoDoc](https://godoc.org/github.com/burrow?status.png)](https://godoc.org/github.com/hyperledger/burrow) -[![license](https://img.shields.io/github/license/hyperledger/burrow.svg)](LICENSE.md) -[![LoC](https://tokei.rs/b1/github/hyperledger/burrow?category=lines)](https://github.com/hyperledger/burrow) -[![codecov](https://codecov.io/gh/hyperledger/burrow/branch/master/graph/badge.svg)](https://codecov.io/gh/hyperledger/burrow) - -Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It executes Ethereum EVM and WASM smart contract code (usually written in [Solidity](https://solidity.readthedocs.io)) on a permissioned virtual machine. Burrow provides transaction finality and high transaction throughput on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. - -![burrow logo](docs/assets/burrow.png) - -## What is Burrow - -Burrow is a fully fledged blockchain node and smart contract execution engine -- a distributed database that executes code. Burrow runs Ethereum Virtual Machine (EVM) and Web Assembly (WASM) smart contracts. Burrow networks are synchronised using the [Tendermint](https://github.com/tendermint/tendermint) consensus algorithm. - -Highlights include: - -- **Tamper-resistant merkle state** - a node can detect if its state is corrupted or if a validator is dishonestly executing the protocol. -- **Proof-of-stake support** - run a private or public permissioned network. -- **On-chain governance primitives** - stakeholders may vote for autonomous smart contract upgrades. -- **Ethereum account world-view** - state and code is organised into cryptographically-addressable accounts. -- **Low-level permissioning** - code execution permissions can be set on a per-account basis. -- **Event streaming** - application state is organised in an event stream and can drive external systems. -- **[SQL mapping layer](docs/reference/vent.md)** - map smart contract event emissions to SQL tables using a projection specification. -- **GRPC interfaces** - all RPC calls can be accessed from any language with GRPC support. Protobuf is used extensively for core objects. -- **Javascript client library** - client library uses code generation to provide access to contracts via statically Typescript objects. -- **Keys service** - provides optional delegating signing at the server or via a local proxy -- **Web3 RPC** - provides compatibility for mainnet Ethereum tooling such as Truffle and Metamask - -### What it is not - -- An Ethereum mainnet client - we do not speak devp2p and various implementation details are different. We are Ethereum-derived but exploit greater freedom than mainnet compatibility would allow. -- Just a virtual machine -- A research project - we run it in production - -### Further introductory material - -See [Burrow - the Boring Blockchain](https://wiki.hyperledger.org/display/burrow/Burrow+-+The+Boring+Blockchain) for an introduction to Burrow and its motivating vision. - -Watch the [Boring into Burrow](https://www.youtube.com/watch?v=OpbjYaGAP4k) talk from the Hyperledger Global Forum 2020 - -## JavaScript Client - -There is a [JavaScript API](https://github.com/hyperledger/burrow/tree/master/js) - -## Project Roadmap - -Project information generally updated on a quarterly basis can be found on the [Hyperledger Burrow Wiki](https://wiki.hyperledger.org/display/burrow). - -## Documentation -Burrow getting started documentation is available on the [documentation site](https://hyperledger.github.io/burrow) (source markdown files can be found in [docs](docs)) and programmatic API in [GoDocs](https://godoc.org/github.com/hyperledger/burrow). - -## Contribute - -We welcome any and all contributions. Read the [contributing file](.github/CONTRIBUTING.md) for more information on making your first Pull Request to Burrow! - -You can find us on: -- [Hyperledger Chat](https://chat.hyperledger.org) -- [Hyperledger Mailing List](https://lists.hyperledger.org/mailman/listinfo) -- [here on Github](https://github.com/hyperledger/burrow/issues) - -## License - -[Apache 2.0](LICENSE.md) diff --git a/docs/README.md b/docs/README.md deleted file mode 120000 index 32d46ee88..000000000 --- a/docs/README.md +++ /dev/null @@ -1 +0,0 @@ -../README.md \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..ea46fcbcc --- /dev/null +++ b/docs/README.md @@ -0,0 +1,66 @@ +# [Hyperledger Burrow](https://hyperledger.github.io/burrow) + +[![CI](https://github.com/hyperledger/burrow/workflows/master/badge.svg)](https://launch-editor.github.com/actions?workflowID=master&event=push&nwo=hyperledger%2Fburrow) +[![version](https://img.shields.io/github/tag/hyperledger/burrow.svg)](https://github.com/hyperledger/burrow/releases/latest) +[![GoDoc](https://godoc.org/github.com/burrow?status.png)](https://godoc.org/github.com/hyperledger/burrow) +[![license](https://img.shields.io/github/license/hyperledger/burrow.svg)](../LICENSE.md) +[![LoC](https://tokei.rs/b1/github/hyperledger/burrow?category=lines)](https://github.com/hyperledger/burrow) +[![codecov](https://codecov.io/gh/hyperledger/burrow/branch/master/graph/badge.svg)](https://codecov.io/gh/hyperledger/burrow) + +Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It executes Ethereum EVM and WASM smart contract code (usually written in [Solidity](https://solidity.readthedocs.io)) on a permissioned virtual machine. Burrow provides transaction finality and high transaction throughput on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. + +![burrow logo](assets/burrow.png) + +## What is Burrow + +Burrow is a fully fledged blockchain node and smart contract execution engine -- a distributed database that executes code. Burrow runs Ethereum Virtual Machine (EVM) and Web Assembly (WASM) smart contracts. Burrow networks are synchronised using the [Tendermint](https://github.com/tendermint/tendermint) consensus algorithm. + +Highlights include: + +- **Tamper-resistant merkle state** - a node can detect if its state is corrupted or if a validator is dishonestly executing the protocol. +- **Proof-of-stake support** - run a private or public permissioned network. +- **On-chain governance primitives** - stakeholders may vote for autonomous smart contract upgrades. +- **Ethereum account world-view** - state and code is organised into cryptographically-addressable accounts. +- **Low-level permissioning** - code execution permissions can be set on a per-account basis. +- **Event streaming** - application state is organised in an event stream and can drive external systems. +- **[SQL mapping layer](reference/vent.md)** - map smart contract event emissions to SQL tables using a projection specification. +- **GRPC interfaces** - all RPC calls can be accessed from any language with GRPC support. Protobuf is used extensively for core objects. +- **Javascript client library** - client library uses code generation to provide access to contracts via statically Typescript objects. +- **Keys service** - provides optional delegating signing at the server or via a local proxy +- **Web3 RPC** - provides compatibility for mainnet Ethereum tooling such as Truffle and Metamask + +### What it is not + +- An Ethereum mainnet client - we do not speak devp2p and various implementation details are different. We are Ethereum-derived but exploit greater freedom than mainnet compatibility would allow. +- Just a virtual machine +- A research project - we run it in production + +### Further introductory material + +See [Burrow - the Boring Blockchain](https://wiki.hyperledger.org/display/burrow/Burrow+-+The+Boring+Blockchain) for an introduction to Burrow and its motivating vision. + +Watch the [Boring into Burrow](https://www.youtube.com/watch?v=OpbjYaGAP4k) talk from the Hyperledger Global Forum 2020 + +## JavaScript Client + +There is a [JavaScript API](https://github.com/hyperledger/burrow/tree/master/js) + +## Project Roadmap + +Project information generally updated on a quarterly basis can be found on the [Hyperledger Burrow Wiki](https://wiki.hyperledger.org/display/burrow). + +## Documentation +Burrow getting started documentation is available on the [documentation site](https://hyperledger.github.io/burrow) (source markdown files can be found in [docs]()) and programmatic API in [GoDocs](https://godoc.org/github.com/hyperledger/burrow). + +## Contribute + +We welcome any and all contributions. Read the [contributing file](../.github/CONTRIBUTING.md) for more information on making your first Pull Request to Burrow! + +You can find us on: +- [Hyperledger Chat](https://chat.hyperledger.org) +- [Hyperledger Mailing List](https://lists.hyperledger.org/mailman/listinfo) +- [here on Github](https://github.com/hyperledger/burrow/issues) + +## License + +[Apache 2.0](../LICENSE.md) From 14a358326ac92a3a7a4c9fc8af6653642c79f770 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 9 Mar 2020 17:50:23 -0600 Subject: [PATCH 108/185] Fix sequence number assignment for EthSendTransaction The sequence number setting used by web3 is a data race. To do this requires the mechanism present in the mempool signing accounts package. You should just send the transaction unsigned and Transactor will take care of serialising sequence numbers. It looks like the only real issue with this currently is mock key client only supports ed25519. I have some vague memory of Sean improving this, should be easy to do. Support ed25519 and secp256k1 in tests Refactor away mock keys client replacing with MemoryKeyStore and localKeyclient wrapper Signed-off-by: Silas Davis --- cmd/burrow/commands/configure.go | 2 +- core/config.go | 2 +- core/kernel.go | 4 +- core/processes.go | 4 +- encoding/hex/hex.go | 4 +- execution/transactor_test.go | 5 +- genesis/spec/genesis_spec_test.go | 5 +- genesis/spec/presets_test.go | 5 +- integration/core/kernel_test.go | 5 +- integration/integration.go | 8 +- keys/filesystem_key_store.go | 306 ++++++++++++++++++++++ keys/key.go | 134 ++++++++++ keys/key_client.go | 16 +- keys/key_store.go | 411 +----------------------------- keys/memory_key_store.go | 96 +++++++ keys/mock/key.go | 94 ------- keys/mock/key_client.go | 84 ------ keys/mock/key_client_test.go | 25 -- keys/server.go | 28 +- rpc/eth.go | 25 +- rpc/eth_test.go | 47 +++- 21 files changed, 624 insertions(+), 686 deletions(-) create mode 100644 keys/filesystem_key_store.go create mode 100644 keys/key.go create mode 100644 keys/memory_key_store.go delete mode 100644 keys/mock/key.go delete mode 100644 keys/mock/key_client.go delete mode 100644 keys/mock/key_client_test.go diff --git a/cmd/burrow/commands/configure.go b/cmd/burrow/commands/configure.go index 95dcb728b..64aba0f4e 100644 --- a/cmd/burrow/commands/configure.go +++ b/cmd/burrow/commands/configure.go @@ -126,7 +126,7 @@ func Configure(output Output) func(cmd *cli.Cmd) { if *keysDir != "" { dir = *keysDir } - keyStore := keys.NewKeyStore(dir, conf.Keys.AllowBadFilePermissions) + keyStore := keys.NewFilesystemKeyStore(dir, conf.Keys.AllowBadFilePermissions) keyClient := keys.NewLocalKeyClient(keyStore, logging.NewNoopLogger()) conf.GenesisDoc, err = genesisSpec.GenesisDoc(keyClient, ct) diff --git a/core/config.go b/core/config.go index c6ff40752..d3e2216b5 100644 --- a/core/config.go +++ b/core/config.go @@ -20,7 +20,7 @@ import ( // LoadKeysFromConfig sets the keyClient & keyStore based on the given config func (kern *Kernel) LoadKeysFromConfig(conf *keys.KeysConfig) (err error) { - kern.keyStore = keys.NewKeyStore(conf.KeysDirectory, conf.AllowBadFilePermissions) + kern.keyStore = keys.NewFilesystemKeyStore(conf.KeysDirectory, conf.AllowBadFilePermissions) if conf.RemoteAddress != "" { kern.keyClient, err = keys.NewRemoteKeyClient(conf.RemoteAddress, kern.Logger) if err != nil { diff --git a/core/kernel.go b/core/kernel.go index cb4f60371..f0ebbc4a1 100644 --- a/core/kernel.go +++ b/core/kernel.go @@ -64,7 +64,7 @@ type Kernel struct { checker execution.BatchExecutor committer execution.BatchCommitter keyClient keys.KeyClient - keyStore *keys.KeyStore + keyStore *keys.FilesystemKeyStore info string processes map[string]process.Process listeners map[string]net.Listener @@ -227,7 +227,7 @@ func (kern *Kernel) SetKeyClient(client keys.KeyClient) { } // SetKeyStore explicitly sets the key store -func (kern *Kernel) SetKeyStore(store *keys.KeyStore) { +func (kern *Kernel) SetKeyStore(store *keys.FilesystemKeyStore) { kern.keyStore = store } diff --git a/core/processes.go b/core/processes.go index 7639759b2..1a10c372e 100644 --- a/core/processes.go +++ b/core/processes.go @@ -303,7 +303,7 @@ func GRPCLauncher(kern *Kernel, conf *rpc.ServerConfig, keyConfig *keys.KeysConf } grpcServer := rpc.NewGRPCServer(kern.Logger) - var ks *keys.KeyStore + var ks *keys.FilesystemKeyStore if kern.keyStore != nil { ks = kern.keyStore } @@ -311,7 +311,7 @@ func GRPCLauncher(kern *Kernel, conf *rpc.ServerConfig, keyConfig *keys.KeysConf if keyConfig.GRPCServiceEnabled { if kern.keyStore == nil { - ks = keys.NewKeyStore(keyConfig.KeysDirectory, keyConfig.AllowBadFilePermissions) + ks = keys.NewFilesystemKeyStore(keyConfig.KeysDirectory, keyConfig.AllowBadFilePermissions) } keys.RegisterKeysServer(grpcServer, ks) } diff --git a/encoding/hex/hex.go b/encoding/hex/hex.go index d914d8954..ace72752e 100644 --- a/encoding/hex/hex.go +++ b/encoding/hex/hex.go @@ -1,13 +1,13 @@ package encoding import ( - "encoding/hex" - fmt "fmt" + "fmt" "math/big" "strconv" "strings" "github.com/hyperledger/burrow/crypto" + "github.com/tmthrgd/go-hex" ) const ( diff --git a/execution/transactor_test.go b/execution/transactor_test.go index 083c630ba..9f1832cf0 100644 --- a/execution/transactor_test.go +++ b/execution/transactor_test.go @@ -14,7 +14,7 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/event" "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/keys/mock" + "github.com/hyperledger/burrow/keys" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" @@ -42,7 +42,8 @@ func TestTransactor_BroadcastTxSync(t *testing.T) { err := txEnv.Sign(privAccount) require.NoError(t, err) height := uint64(35) - trans := NewTransactor(bc, evc, NewAccounts(acmstate.NewMemoryState(), mock.NewKeyClient(privAccount), 100), + trans := NewTransactor(bc, evc, NewAccounts(acmstate.NewMemoryState(), + keys.NewLocalKeyClient(keys.NewMemoryKeyStore(privAccount), logger), 100), func(tx tmTypes.Tx, cb func(*abciTypes.Response), txInfo mempool.TxInfo) error { txe := exec.NewTxExecution(txEnv) txe.Height = height diff --git a/genesis/spec/genesis_spec_test.go b/genesis/spec/genesis_spec_test.go index 286d1a7b2..4d6fe8d3c 100644 --- a/genesis/spec/genesis_spec_test.go +++ b/genesis/spec/genesis_spec_test.go @@ -5,14 +5,15 @@ import ( "github.com/hyperledger/burrow/acm/balance" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/keys/mock" + "github.com/hyperledger/burrow/keys" + "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/permission" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestGenesisSpec_GenesisDoc(t *testing.T) { - keyClient := mock.NewKeyClient() + keyClient := keys.NewLocalKeyClient(keys.NewMemoryKeyStore(), logging.NewNoopLogger()) // Try a spec with a single account/validator amtBonded := uint64(100) diff --git a/genesis/spec/presets_test.go b/genesis/spec/presets_test.go index a51b1e3dd..5fbb72698 100644 --- a/genesis/spec/presets_test.go +++ b/genesis/spec/presets_test.go @@ -5,14 +5,15 @@ import ( "github.com/hyperledger/burrow/acm/balance" crypto "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/keys/mock" + "github.com/hyperledger/burrow/keys" + "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/permission" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestMergeGenesisSpecAccounts(t *testing.T) { - keyClient := mock.NewKeyClient() + keyClient := keys.NewLocalKeyClient(keys.NewMemoryKeyStore(), logging.NewNoopLogger()) gs := MergeGenesisSpecs(FullAccount("0"), ParticipantAccount("1"), ParticipantAccount("2")) gd, err := gs.GenesisDoc(keyClient, crypto.CurveTypeEd25519) require.NoError(t, err) diff --git a/integration/core/kernel_test.go b/integration/core/kernel_test.go index 75a999bd0..a5d745c6e 100644 --- a/integration/core/kernel_test.go +++ b/integration/core/kernel_test.go @@ -21,7 +21,6 @@ import ( "github.com/hyperledger/burrow/integration" "github.com/hyperledger/burrow/integration/rpctest" "github.com/hyperledger/burrow/keys" - "github.com/hyperledger/burrow/keys/mock" "github.com/hyperledger/burrow/logging/logconfig" "github.com/hyperledger/burrow/logging/loggers" "github.com/hyperledger/burrow/rpc/rpctransact" @@ -136,8 +135,8 @@ func bootWaitBlocksShutdown(t testing.TB, validator *acm.PrivateAccount, private return err } - kern.SetKeyClient(mock.NewKeyClient(privateAccounts...)) - kern.SetKeyStore(keys.NewKeyStore(keys.DefaultKeysDir, false)) + kern.SetKeyClient(keys.NewLocalKeyClient(keys.NewMemoryKeyStore(privateAccounts...), kern.Logger)) + kern.SetKeyStore(keys.NewFilesystemKeyStore(keys.DefaultKeysDir, false)) ctx := context.Background() if err = kern.Boot(); err != nil { return err diff --git a/integration/integration.go b/integration/integration.go index 0ddd21f38..1b502b7ee 100644 --- a/integration/integration.go +++ b/integration/integration.go @@ -21,7 +21,7 @@ import ( "github.com/hyperledger/burrow/core" "github.com/hyperledger/burrow/execution" "github.com/hyperledger/burrow/genesis" - "github.com/hyperledger/burrow/keys/mock" + "github.com/hyperledger/burrow/keys" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/logconfig" "github.com/hyperledger/burrow/permission" @@ -76,6 +76,7 @@ func NewTestConfig(genesisDoc *genesis.GenesisDoc, nodeNumber := atomic.AddUint64(&node, 1) name := fmt.Sprintf("node_%03d", nodeNumber) conf = config.DefaultBurrowConfig() + conf.Logging = nil testDir, cleanup := EnterTestDirectory() conf.BurrowDir = path.Join(testDir, fmt.Sprintf(".burrow_%s", name)) conf.GenesisDoc = genesisDoc @@ -116,7 +117,8 @@ func TestKernel(validatorAccount *acm.PrivateAccount, keysAccounts []*acm.Privat return nil, err } - kern.SetLogger(logging.NewNoopLogger()) + logger := logging.NewNoopLogger() + kern.SetLogger(logger) if testConfig.Logging != nil { err := kern.LoadLoggerFromConfig(testConfig.Logging) if err != nil { @@ -124,7 +126,7 @@ func TestKernel(validatorAccount *acm.PrivateAccount, keysAccounts []*acm.Privat } } - kern.SetKeyClient(mock.NewKeyClient(keysAccounts...)) + kern.SetKeyClient(keys.NewLocalKeyClient(keys.NewMemoryKeyStore(keysAccounts...), logger)) err = kern.LoadExecutionOptionsFromConfig(testConfig.Execution) if err != nil { diff --git a/keys/filesystem_key_store.go b/keys/filesystem_key_store.go new file mode 100644 index 000000000..f097ac5ef --- /dev/null +++ b/keys/filesystem_key_store.go @@ -0,0 +1,306 @@ +package keys + +import ( + "crypto/aes" + "crypto/cipher" + "crypto/rand" + "encoding/json" + "fmt" + "io/ioutil" + "os" + "path" + "strings" + "sync" + + "github.com/hyperledger/burrow/crypto" + "github.com/tmthrgd/go-hex" + "golang.org/x/crypto/scrypt" +) + +type FilesystemKeyStore struct { + sync.Mutex + AllowBadFilePermissions bool + keysDirPath string +} + +var _ KeyStore = &FilesystemKeyStore{} +var _ KeysServer = &FilesystemKeyStore{} + +func NewFilesystemKeyStore(dir string, AllowBadFilePermissions bool) *FilesystemKeyStore { + return &FilesystemKeyStore{ + keysDirPath: dir, + AllowBadFilePermissions: AllowBadFilePermissions, + } +} + +func (ks *FilesystemKeyStore) Gen(passphrase string, curveType crypto.CurveType) (key *Key, err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("GenerateNewKey error: %v", r) + } + }() + key, err = NewKey(curveType) + if err != nil { + return nil, err + } + err = ks.StoreKey(passphrase, key) + return key, err +} + +func (ks *FilesystemKeyStore) GetKey(passphrase string, keyAddr []byte) (*Key, error) { + ks.Lock() + defer ks.Unlock() + dataDirPath, err := returnDataDir(ks.keysDirPath) + if err != nil { + return nil, err + } + fileContent, err := ks.GetKeyFile(dataDirPath, keyAddr) + if err != nil { + return nil, err + } + key := new(keyJSON) + if err = json.Unmarshal(fileContent, key); err != nil { + return nil, err + } + + if len(key.PrivateKey.CipherText) > 0 { + return DecryptKey(passphrase, key) + } else { + key := new(Key) + err = key.UnmarshalJSON(fileContent) + return key, err + } +} + +func (ks *FilesystemKeyStore) AllKeys() ([]*Key, error) { + dataDirPath, err := returnDataDir(ks.keysDirPath) + if err != nil { + return nil, err + } + addrs, err := getAllAddresses(dataDirPath) + if err != nil { + return nil, err + } + + var list []*Key + + for _, addr := range addrs { + addrB, err := crypto.AddressFromHexString(addr) + if err != nil { + return nil, err + } + k, err := ks.GetKey("", addrB[:]) + if err != nil { + return nil, err + } + list = append(list, k) + } + + return list, nil +} + +func DecryptKey(passphrase string, keyProtected *keyJSON) (*Key, error) { + salt := keyProtected.PrivateKey.Salt + nonce := keyProtected.PrivateKey.Nonce + cipherText := keyProtected.PrivateKey.CipherText + + curveType, err := crypto.CurveTypeFromString(keyProtected.CurveType) + if err != nil { + return nil, err + } + authArray := []byte(passphrase) + derivedKey, err := scrypt.Key(authArray, salt, scryptN, scryptr, scryptp, scryptdkLen) + if err != nil { + return nil, err + } + aesBlock, err := aes.NewCipher(derivedKey) + if err != nil { + return nil, err + } + gcm, err := cipher.NewGCM(aesBlock) + if err != nil { + return nil, err + } + pubKey, err := hex.DecodeString(keyProtected.PublicKey) + if err != nil { + return nil, err + } + plainText, err := gcm.Open(nil, nonce, cipherText, nil) + if err != nil { + pkey, _ := NewKeyFromPub(curveType, pubKey) + return pkey, err + } + address, err := crypto.AddressFromHexString(keyProtected.Address) + if err != nil { + return nil, err + } + k, err := NewKeyFromPriv(curveType, plainText) + if err != nil { + return nil, err + } + if address != k.Address { + return nil, fmt.Errorf("address does not match") + } + return k, nil +} + +func (ks *FilesystemKeyStore) GetAllAddresses() (addresses []string, err error) { + ks.Lock() + defer ks.Unlock() + + dir, err := returnDataDir(ks.keysDirPath) + if err != nil { + return nil, err + } + return getAllAddresses(dir) +} + +func (ks *FilesystemKeyStore) StoreKey(passphrase string, key *Key) error { + ks.Lock() + defer ks.Unlock() + if passphrase != "" { + return ks.StoreKeyEncrypted(passphrase, key) + } else { + return ks.StoreKeyPlain(key) + } +} + +func (ks *FilesystemKeyStore) StoreKeyPlain(key *Key) (err error) { + keyJSON, err := json.Marshal(key) + if err != nil { + return err + } + dataDirPath, err := returnDataDir(ks.keysDirPath) + if err != nil { + return err + } + err = WriteKeyFile(key.Address[:], dataDirPath, keyJSON) + return err +} + +func (ks *FilesystemKeyStore) StoreKeyEncrypted(passphrase string, key *Key) error { + authArray := []byte(passphrase) + salt := make([]byte, 32) + _, err := rand.Read(salt) + if err != nil { + return err + } + + derivedKey, err := scrypt.Key(authArray, salt, scryptN, scryptr, scryptp, scryptdkLen) + if err != nil { + return err + } + + toEncrypt := key.PrivateKey.RawBytes() + + AES256Block, err := aes.NewCipher(derivedKey) + if err != nil { + return err + } + + gcm, err := cipher.NewGCM(AES256Block) + if err != nil { + return err + } + + // XXX: a GCM nonce may only be used once per key ever! + nonce := make([]byte, gcm.NonceSize()) + _, err = rand.Read(nonce) + if err != nil { + return err + } + + // (dst, nonce, plaintext, extradata) + cipherText := gcm.Seal(nil, nonce, toEncrypt, nil) + + cipherStruct := privateKeyJSON{ + Crypto: CryptoAESGCM, Salt: salt, Nonce: nonce, CipherText: cipherText, + } + keyStruct := keyJSON{ + CurveType: key.CurveType.String(), + Address: hex.EncodeUpperToString(key.Address[:]), + PublicKey: hex.EncodeUpperToString(key.Pubkey()), + AddressHash: key.PublicKey.AddressHashType(), + PrivateKey: cipherStruct, + } + keyJSON, err := json.Marshal(keyStruct) + if err != nil { + return err + } + dataDirPath, err := returnDataDir(ks.keysDirPath) + if err != nil { + return err + } + + return WriteKeyFile(key.Address[:], dataDirPath, keyJSON) +} + +func (ks *FilesystemKeyStore) DeleteKey(passphrase string, keyAddr []byte) (err error) { + dataDirPath, err := returnDataDir(ks.keysDirPath) + if err != nil { + return err + } + keyDirPath := path.Join(dataDirPath, strings.ToUpper(hex.EncodeToString(keyAddr))+".json") + return os.Remove(keyDirPath) +} + +func (ks *FilesystemKeyStore) GetKeyFile(dataDirPath string, keyAddr []byte) (fileContent []byte, err error) { + filename := path.Join(dataDirPath, strings.ToUpper(hex.EncodeToString(keyAddr))+".json") + fileInfo, err := os.Stat(filename) + if err != nil { + return nil, err + } + if (uint32(fileInfo.Mode()) & 0077) != 0 { + if !ks.AllowBadFilePermissions { + return nil, fmt.Errorf("file %s should be accessible by user only", filename) + } + } + return ioutil.ReadFile(filename) +} + +func WriteKeyFile(addr []byte, dataDirPath string, content []byte) (err error) { + addrHex := strings.ToUpper(hex.EncodeToString(addr)) + keyFilePath := path.Join(dataDirPath, addrHex+".json") + err = os.MkdirAll(dataDirPath, 0700) // read, write and dir search for user + if err != nil { + return err + } + return ioutil.WriteFile(keyFilePath, content, 0600) // read, write for user +} + +func (ks *FilesystemKeyStore) GetAddressForKeyName(name string) (crypto.Address, error) { + const errHeader = "GetAddressForKeyName" + nameAddressLookup, err := coreNameList(ks.keysDirPath) + if err != nil { + return crypto.Address{}, fmt.Errorf("%s: could not get names list from filesysetm: %w", + errHeader, err) + } + + addressHex, ok := nameAddressLookup[name] + if !ok { + return crypto.Address{}, fmt.Errorf("%s: could not find key named '%s'", errHeader, name) + } + + address, err := crypto.AddressFromHexString(addressHex) + if err != nil { + return crypto.Address{}, fmt.Errorf("%s: could not parse key address: %v", errHeader, err) + } + return address, nil +} + +func (ks *FilesystemKeyStore) GetAllNames() (map[string]string, error) { + return coreNameList(ks.keysDirPath) +} + +func getAllAddresses(dataDirPath string) (addresses []string, err error) { + fileInfos, err := ioutil.ReadDir(dataDirPath) + if err != nil { + return nil, err + } + addresses = make([]string, len(fileInfos)) + for i, fileInfo := range fileInfos { + addr := strings.TrimSuffix(fileInfo.Name(), ".json") + addresses[i] = addr + } + return addresses, err +} diff --git a/keys/key.go b/keys/key.go new file mode 100644 index 000000000..415ed9e3f --- /dev/null +++ b/keys/key.go @@ -0,0 +1,134 @@ +package keys + +import ( + "encoding/json" + "fmt" + + "github.com/hyperledger/burrow/crypto" + "github.com/tmthrgd/go-hex" +) + +type Key struct { + CurveType crypto.CurveType + Address crypto.Address + PublicKey crypto.PublicKey + PrivateKey crypto.PrivateKey +} + +// json encodings - addresses should be hex encoded +type keyJSON struct { + CurveType string + Address string + PublicKey string + AddressHash string + PrivateKey privateKeyJSON +} + +type privateKeyJSON struct { + Crypto string + Plain string `json:",omitempty"` + Salt []byte `json:",omitempty"` + Nonce []byte `json:",omitempty"` + CipherText []byte `json:",omitempty"` +} + +func NewKey(typ crypto.CurveType) (*Key, error) { + privKey, err := crypto.GeneratePrivateKey(nil, typ) + if err != nil { + return nil, err + } + pubKey := privKey.GetPublicKey() + return &Key{ + CurveType: typ, + PublicKey: pubKey, + Address: pubKey.GetAddress(), + PrivateKey: privKey, + }, nil +} + +func NewKeyFromPub(curveType crypto.CurveType, PubKeyBytes []byte) (*Key, error) { + pubKey, err := crypto.PublicKeyFromBytes(PubKeyBytes, curveType) + if err != nil { + return nil, err + } + + return &Key{ + CurveType: curveType, + PublicKey: pubKey, + Address: pubKey.GetAddress(), + }, nil +} + +func NewKeyFromPriv(curveType crypto.CurveType, PrivKeyBytes []byte) (*Key, error) { + privKey, err := crypto.PrivateKeyFromRawBytes(PrivKeyBytes, curveType) + + if err != nil { + return nil, err + } + + pubKey := privKey.GetPublicKey() + + return &Key{ + CurveType: curveType, + Address: pubKey.GetAddress(), + PublicKey: pubKey, + PrivateKey: privKey, + }, nil +} + +func (k *Key) Pubkey() []byte { + return k.PublicKey.PublicKey +} + +func (k *Key) MarshalJSON() (j []byte, err error) { + jStruct := keyJSON{ + CurveType: k.CurveType.String(), + Address: hex.EncodeUpperToString(k.Address[:]), + PublicKey: hex.EncodeUpperToString(k.Pubkey()), + AddressHash: k.PublicKey.AddressHashType(), + PrivateKey: privateKeyJSON{Crypto: CryptoNone, Plain: hex.EncodeUpperToString(k.PrivateKey.RawBytes())}, + } + j, err = json.Marshal(jStruct) + return j, err +} + +func (k *Key) UnmarshalJSON(j []byte) (err error) { + keyJ := new(keyJSON) + err = json.Unmarshal(j, &keyJ) + if err != nil { + return err + } + if len(keyJ.PrivateKey.Plain) == 0 { + return fmt.Errorf("no private key") + } + curveType, err := crypto.CurveTypeFromString(keyJ.CurveType) + if err != nil { + curveType = crypto.CurveTypeEd25519 + } + privKey, err := hex.DecodeString(keyJ.PrivateKey.Plain) + if err != nil { + return err + } + k2, err := NewKeyFromPriv(curveType, privKey) + if err != nil { + return err + } + + k.Address = k2.Address + k.CurveType = curveType + k.PublicKey = k2.PrivateKey.GetPublicKey() + k.PrivateKey = k2.PrivateKey + + return nil +} + +// returns the address if valid, nil otherwise +func isValidKeyJson(j []byte) []byte { + j1 := new(keyJSON) + e1 := json.Unmarshal(j, &j1) + if e1 == nil { + addr, _ := hex.DecodeString(j1.Address) + return addr + } + return nil +} diff --git a/keys/key_client.go b/keys/key_client.go index 4720a8e74..d4a3583f1 100644 --- a/keys/key_client.go +++ b/keys/key_client.go @@ -34,7 +34,7 @@ var _ KeyClient = (*localKeyClient)(nil) var _ KeyClient = (*remoteKeyClient)(nil) type localKeyClient struct { - ks *KeyStore + ks KeyStore logger *logging.Logger } @@ -79,17 +79,7 @@ func (l *localKeyClient) GetAddressForKeyName(keyName string) (keyAddress crypto return } - all, err := l.ks.GetAllNames() - - if err != nil { - return crypto.Address{}, err - } - - if addr, ok := all[keyName]; ok { - return crypto.AddressFromHexString(addr) - } - - return crypto.Address{}, fmt.Errorf("`%s` is neither an address or a known key name", keyName) + return l.ks.GetAddressForKeyName(keyName) } // Returns nil if the keys instance is healthy, error otherwise @@ -185,7 +175,7 @@ func NewRemoteKeyClient(rpcAddress string, logger *logging.Logger) (KeyClient, e } // NewLocalKeyClient returns a new keys client, backed by the local filesystem -func NewLocalKeyClient(ks *KeyStore, logger *logging.Logger) KeyClient { +func NewLocalKeyClient(ks KeyStore, logger *logging.Logger) KeyClient { logger = logger.WithScope("LocalKeyClient") return &localKeyClient{ks: ks, logger: logger} } diff --git a/keys/key_store.go b/keys/key_store.go index 797928854..4dd6a16f5 100644 --- a/keys/key_store.go +++ b/keys/key_store.go @@ -1,20 +1,9 @@ package keys import ( - "crypto/aes" - "crypto/cipher" - "crypto/rand" - "encoding/json" - "fmt" - "io/ioutil" - "os" - "path" - "strings" - "sync" + "context" "github.com/hyperledger/burrow/crypto" - "github.com/tmthrgd/go-hex" - "golang.org/x/crypto/scrypt" ) const ( @@ -28,397 +17,9 @@ const ( HashSecp256k1 = "btc" ) -//----------------------------------------------------------------------------- -// json encodings - -// addresses should be hex encoded - -type keyJSON struct { - CurveType string - Address string - PublicKey string - AddressHash string - PrivateKey privateKeyJSON -} - -type privateKeyJSON struct { - Crypto string - Plain string `json:",omitempty"` - Salt []byte `json:",omitempty"` - Nonce []byte `json:",omitempty"` - CipherText []byte `json:",omitempty"` -} - -func (k *Key) MarshalJSON() (j []byte, err error) { - jStruct := keyJSON{ - CurveType: k.CurveType.String(), - Address: hex.EncodeUpperToString(k.Address[:]), - PublicKey: hex.EncodeUpperToString(k.Pubkey()), - AddressHash: k.PublicKey.AddressHashType(), - PrivateKey: privateKeyJSON{Crypto: CryptoNone, Plain: hex.EncodeUpperToString(k.PrivateKey.RawBytes())}, - } - j, err = json.Marshal(jStruct) - return j, err -} - -func (k *Key) UnmarshalJSON(j []byte) (err error) { - keyJ := new(keyJSON) - err = json.Unmarshal(j, &keyJ) - if err != nil { - return err - } - if len(keyJ.PrivateKey.Plain) == 0 { - return fmt.Errorf("no private key") - } - curveType, err := crypto.CurveTypeFromString(keyJ.CurveType) - if err != nil { - curveType = crypto.CurveTypeEd25519 - } - privKey, err := hex.DecodeString(keyJ.PrivateKey.Plain) - if err != nil { - return err - } - k2, err := NewKeyFromPriv(curveType, privKey) - if err != nil { - return err - } - - k.Address = k2.Address - k.CurveType = curveType - k.PublicKey = k2.PrivateKey.GetPublicKey() - k.PrivateKey = k2.PrivateKey - - return nil -} - -// returns the address if valid, nil otherwise -func IsValidKeyJson(j []byte) []byte { - j1 := new(keyJSON) - e1 := json.Unmarshal(j, &j1) - if e1 == nil { - addr, _ := hex.DecodeString(j1.Address) - return addr - } - return nil -} - -func NewKeyStore(dir string, AllowBadFilePermissions bool) *KeyStore { - return &KeyStore{ - keysDirPath: dir, - AllowBadFilePermissions: AllowBadFilePermissions, - } -} - -type KeyStore struct { - sync.Mutex - AllowBadFilePermissions bool - keysDirPath string -} - -func (ks *KeyStore) Gen(passphrase string, curveType crypto.CurveType) (key *Key, err error) { - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("GenerateNewKey error: %v", r) - } - }() - key, err = NewKey(curveType) - if err != nil { - return nil, err - } - err = ks.StoreKey(passphrase, key) - return key, err -} - -func (ks *KeyStore) GetKey(passphrase string, keyAddr []byte) (*Key, error) { - ks.Lock() - defer ks.Unlock() - dataDirPath, err := returnDataDir(ks.keysDirPath) - if err != nil { - return nil, err - } - fileContent, err := ks.GetKeyFile(dataDirPath, keyAddr) - if err != nil { - return nil, err - } - key := new(keyJSON) - if err = json.Unmarshal(fileContent, key); err != nil { - return nil, err - } - - if len(key.PrivateKey.CipherText) > 0 { - return DecryptKey(passphrase, key) - } else { - key := new(Key) - err = key.UnmarshalJSON(fileContent) - return key, err - } -} - -func (ks *KeyStore) AllKeys() ([]*Key, error) { - - dataDirPath, err := returnDataDir(ks.keysDirPath) - if err != nil { - return nil, err - } - addrs, err := GetAllAddresses(dataDirPath) - if err != nil { - return nil, err - } - - var list []*Key - - for _, addr := range addrs { - addrB, err := crypto.AddressFromHexString(addr) - if err != nil { - return nil, err - } - k, err := ks.GetKey("", addrB[:]) - if err != nil { - return nil, err - } - list = append(list, k) - } - - return list, nil -} - -func DecryptKey(passphrase string, keyProtected *keyJSON) (*Key, error) { - salt := keyProtected.PrivateKey.Salt - nonce := keyProtected.PrivateKey.Nonce - cipherText := keyProtected.PrivateKey.CipherText - - curveType, err := crypto.CurveTypeFromString(keyProtected.CurveType) - if err != nil { - return nil, err - } - authArray := []byte(passphrase) - derivedKey, err := scrypt.Key(authArray, salt, scryptN, scryptr, scryptp, scryptdkLen) - if err != nil { - return nil, err - } - aesBlock, err := aes.NewCipher(derivedKey) - if err != nil { - return nil, err - } - gcm, err := cipher.NewGCM(aesBlock) - if err != nil { - return nil, err - } - pubKey, err := hex.DecodeString(keyProtected.PublicKey) - if err != nil { - return nil, err - } - plainText, err := gcm.Open(nil, nonce, cipherText, nil) - if err != nil { - pkey, _ := NewKeyFromPub(curveType, pubKey) - return pkey, err - } - address, err := crypto.AddressFromHexString(keyProtected.Address) - if err != nil { - return nil, err - } - k, err := NewKeyFromPriv(curveType, plainText) - if err != nil { - return nil, err - } - if address != k.Address { - return nil, fmt.Errorf("address does not match") - } - return k, nil -} - -func (ks *KeyStore) GetAllAddresses() (addresses []string, err error) { - ks.Lock() - defer ks.Unlock() - - dir, err := returnDataDir(ks.keysDirPath) - if err != nil { - return nil, err - } - return GetAllAddresses(dir) -} - -func (ks *KeyStore) StoreKey(passphrase string, key *Key) error { - ks.Lock() - defer ks.Unlock() - if passphrase != "" { - return ks.StoreKeyEncrypted(passphrase, key) - } else { - return ks.StoreKeyPlain(key) - } -} - -func (ks *KeyStore) StoreKeyPlain(key *Key) (err error) { - keyJSON, err := json.Marshal(key) - if err != nil { - return err - } - dataDirPath, err := returnDataDir(ks.keysDirPath) - if err != nil { - return err - } - err = WriteKeyFile(key.Address[:], dataDirPath, keyJSON) - return err -} - -func (ks *KeyStore) StoreKeyEncrypted(passphrase string, key *Key) error { - authArray := []byte(passphrase) - salt := make([]byte, 32) - _, err := rand.Read(salt) - if err != nil { - return err - } - - derivedKey, err := scrypt.Key(authArray, salt, scryptN, scryptr, scryptp, scryptdkLen) - if err != nil { - return err - } - - toEncrypt := key.PrivateKey.RawBytes() - - AES256Block, err := aes.NewCipher(derivedKey) - if err != nil { - return err - } - - gcm, err := cipher.NewGCM(AES256Block) - if err != nil { - return err - } - - // XXX: a GCM nonce may only be used once per key ever! - nonce := make([]byte, gcm.NonceSize()) - _, err = rand.Read(nonce) - if err != nil { - return err - } - - // (dst, nonce, plaintext, extradata) - cipherText := gcm.Seal(nil, nonce, toEncrypt, nil) - - cipherStruct := privateKeyJSON{ - Crypto: CryptoAESGCM, Salt: salt, Nonce: nonce, CipherText: cipherText, - } - keyStruct := keyJSON{ - CurveType: key.CurveType.String(), - Address: hex.EncodeUpperToString(key.Address[:]), - PublicKey: hex.EncodeUpperToString(key.Pubkey()), - AddressHash: key.PublicKey.AddressHashType(), - PrivateKey: cipherStruct, - } - keyJSON, err := json.Marshal(keyStruct) - if err != nil { - return err - } - dataDirPath, err := returnDataDir(ks.keysDirPath) - if err != nil { - return err - } - - return WriteKeyFile(key.Address[:], dataDirPath, keyJSON) -} - -func (ks *KeyStore) DeleteKey(passphrase string, keyAddr []byte) (err error) { - dataDirPath, err := returnDataDir(ks.keysDirPath) - if err != nil { - return err - } - keyDirPath := path.Join(dataDirPath, strings.ToUpper(hex.EncodeToString(keyAddr))+".json") - return os.Remove(keyDirPath) -} - -func (ks *KeyStore) GetKeyFile(dataDirPath string, keyAddr []byte) (fileContent []byte, err error) { - filename := path.Join(dataDirPath, strings.ToUpper(hex.EncodeToString(keyAddr))+".json") - fileInfo, err := os.Stat(filename) - if err != nil { - return nil, err - } - if (uint32(fileInfo.Mode()) & 0077) != 0 { - if !ks.AllowBadFilePermissions { - return nil, fmt.Errorf("file %s should be accessible by user only", filename) - } - } - return ioutil.ReadFile(filename) -} - -func WriteKeyFile(addr []byte, dataDirPath string, content []byte) (err error) { - addrHex := strings.ToUpper(hex.EncodeToString(addr)) - keyFilePath := path.Join(dataDirPath, addrHex+".json") - err = os.MkdirAll(dataDirPath, 0700) // read, write and dir search for user - if err != nil { - return err - } - return ioutil.WriteFile(keyFilePath, content, 0600) // read, write for user -} - -func (ks *KeyStore) GetAllNames() (map[string]string, error) { - return coreNameList(ks.keysDirPath) -} - -func GetAllAddresses(dataDirPath string) (addresses []string, err error) { - fileInfos, err := ioutil.ReadDir(dataDirPath) - if err != nil { - return nil, err - } - addresses = make([]string, len(fileInfos)) - for i, fileInfo := range fileInfos { - addr := strings.TrimSuffix(fileInfo.Name(), ".json") - addresses[i] = addr - } - return addresses, err -} - -type Key struct { - CurveType crypto.CurveType - Address crypto.Address - PublicKey crypto.PublicKey - PrivateKey crypto.PrivateKey -} - -func NewKey(typ crypto.CurveType) (*Key, error) { - privKey, err := crypto.GeneratePrivateKey(nil, typ) - if err != nil { - return nil, err - } - pubKey := privKey.GetPublicKey() - return &Key{ - CurveType: typ, - PublicKey: pubKey, - Address: pubKey.GetAddress(), - PrivateKey: privKey, - }, nil -} - -func (k *Key) Pubkey() []byte { - return k.PublicKey.PublicKey -} - -func NewKeyFromPub(curveType crypto.CurveType, PubKeyBytes []byte) (*Key, error) { - pubKey, err := crypto.PublicKeyFromBytes(PubKeyBytes, curveType) - if err != nil { - return nil, err - } - - return &Key{ - CurveType: curveType, - PublicKey: pubKey, - Address: pubKey.GetAddress(), - }, nil -} - -func NewKeyFromPriv(curveType crypto.CurveType, PrivKeyBytes []byte) (*Key, error) { - privKey, err := crypto.PrivateKeyFromRawBytes(PrivKeyBytes, curveType) - - if err != nil { - return nil, err - } - - pubKey := privKey.GetPublicKey() - - return &Key{ - CurveType: curveType, - Address: pubKey.GetAddress(), - PublicKey: pubKey, - PrivateKey: privKey, - }, nil +type KeyStore interface { + GetAddressForKeyName(keyName string) (keyAddress crypto.Address, err error) + GenerateKey(ctx context.Context, in *GenRequest) (*GenResponse, error) + PublicKey(ctx context.Context, in *PubRequest) (*PubResponse, error) + Sign(ctx context.Context, in *SignRequest) (*SignResponse, error) } diff --git a/keys/memory_key_store.go b/keys/memory_key_store.go new file mode 100644 index 000000000..e2861204e --- /dev/null +++ b/keys/memory_key_store.go @@ -0,0 +1,96 @@ +package keys + +import ( + "context" + "crypto/rand" + "fmt" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/crypto" +) + +type MemoryKeyStore struct { + keyByAddress map[crypto.Address]crypto.PrivateKey + keyByName map[string]crypto.PrivateKey +} + +func NewMemoryKeyStore(privateAccounts ...*acm.PrivateAccount) *MemoryKeyStore { + mks := &MemoryKeyStore{ + keyByAddress: make(map[crypto.Address]crypto.PrivateKey), + keyByName: make(map[string]crypto.PrivateKey), + } + for _, pa := range privateAccounts { + mks.keyByAddress[pa.GetAddress()] = pa.PrivateKey() + } + return mks +} + +func (mks *MemoryKeyStore) GetAddressForKeyName(keyName string) (crypto.Address, error) { + key, ok := mks.keyByName[keyName] + if !ok { + return crypto.Address{}, fmt.Errorf("could not find key with name %s", keyName) + } + return key.GetPublicKey().GetAddress(), nil +} + +func (mks *MemoryKeyStore) GenerateKey(ctx context.Context, in *GenRequest) (*GenResponse, error) { + curveType, err := crypto.CurveTypeFromString(in.CurveType) + if err != nil { + return nil, fmt.Errorf("unknown curve type '%s'", in.CurveType) + } + key, err := crypto.GeneratePrivateKey(rand.Reader, curveType) + if err != nil { + return nil, fmt.Errorf("could not generate key: %w", err) + } + + address := key.GetPublicKey().GetAddress() + mks.keyByAddress[address] = key + if in.KeyName != "" { + mks.keyByName[in.KeyName] = key + } + + return &GenResponse{ + Address: address.String(), + }, nil +} + +func (mks *MemoryKeyStore) PublicKey(ctx context.Context, in *PubRequest) (*PubResponse, error) { + key, err := mks.getKey(in.Name, in.Address) + if err != nil { + return nil, err + } + return &PubResponse{ + CurveType: key.CurveType.String(), + PublicKey: key.PublicKey, + }, nil +} + +func (mks *MemoryKeyStore) Sign(ctx context.Context, in *SignRequest) (*SignResponse, error) { + key, err := mks.getKey(in.Name, in.Address) + if err != nil { + return nil, err + } + signature, err := key.Sign(in.Message) + if err != nil { + return nil, fmt.Errorf("could not sign message: %w", err) + } + return &SignResponse{ + Signature: signature, + }, nil +} + +// Get a stringly referenced key first by name, then by address +func (mks *MemoryKeyStore) getKey(name string, addressHex string) (*crypto.PrivateKey, error) { + key, ok := mks.keyByName[name] + if !ok { + address, err := crypto.AddressFromHexString(addressHex) + if err != nil { + return nil, fmt.Errorf("could not get PublicKey: %w", err) + } + key, ok = mks.keyByAddress[address] + if !ok { + return nil, fmt.Errorf("could not find key with address %v: %w", address, err) + } + } + return &key, nil +} diff --git a/keys/mock/key.go b/keys/mock/key.go deleted file mode 100644 index ae5cb969b..000000000 --- a/keys/mock/key.go +++ /dev/null @@ -1,94 +0,0 @@ -package mock - -import ( - "crypto/rand" - "encoding/json" - - "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/crypto" - - "github.com/pkg/errors" - "golang.org/x/crypto/ed25519" -) - -// Mock ed25510 key for mock keys client -// Simple ed25519 key structure for mock purposes with ripemd160 address -type Key struct { - Name string - Address crypto.Address - PublicKey []byte - PrivateKey []byte -} - -func newKey(name string) (*Key, error) { - key := &Key{ - Name: name, - PublicKey: make([]byte, ed25519.PublicKeySize), - PrivateKey: make([]byte, ed25519.PrivateKeySize), - } - // this is a mock key, so the entropy of the source is purely - // for testing - publicKey, privateKey, err := ed25519.GenerateKey(rand.Reader) - if err != nil { - return nil, err - } - copy(key.PrivateKey[:], privateKey[:]) - copy(key.PublicKey[:], publicKey[:]) - - pk, err := crypto.PublicKeyFromBytes(publicKey, crypto.CurveTypeEd25519) - if err != nil { - return nil, err - } - - key.Address, err = crypto.AddressFromBytes(pk.GetAddress().Bytes()) - if err != nil { - return nil, err - } - - if err != nil { - return nil, err - } - if key.Name == "" { - key.Name = key.Address.String() - } - return key, nil -} - -func mockKeyFromPrivateAccount(privateAccount *acm.PrivateAccount) *Key { - key := &Key{ - Name: privateAccount.GetAddress().String(), - Address: privateAccount.GetAddress(), - PublicKey: privateAccount.GetPublicKey().PublicKey, - PrivateKey: privateAccount.PrivateKey().PrivateKey, - } - return key -} - -func (key *Key) Sign(message []byte) (*crypto.Signature, error) { - return crypto.SignatureFromBytes(ed25519.Sign(key.PrivateKey, message), crypto.CurveTypeEd25519) -} - -type PrivateKeyplainKeyJSON struct { - Plain []byte -} - -// TODO: remove after merging keys taken from there to match serialisation -type plainKeyJSON struct { - Type string - Address string - PrivateKey PrivateKeyplainKeyJSON -} - -// Returns JSON string compatible with that stored by monax-keys -func (key *Key) MonaxKeysJSON() string { - jsonKey := plainKeyJSON{ - Address: key.Address.String(), - Type: "ed25519", - PrivateKey: PrivateKeyplainKeyJSON{Plain: key.PrivateKey}, - } - bs, err := json.Marshal(jsonKey) - if err != nil { - return errors.Wrap(err, "could not create monax key json").Error() - } - return string(bs) -} diff --git a/keys/mock/key_client.go b/keys/mock/key_client.go deleted file mode 100644 index 13580d7bf..000000000 --- a/keys/mock/key_client.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright Monax Industries Limited -// SPDX-License-Identifier: Apache-2.0 - -package mock - -import ( - "fmt" - - "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/keys" -) - -//--------------------------------------------------------------------- -// Mock client for replacing signing done by monax-keys - -// Implementation assertion -var _ keys.KeyClient = (*KeyClient)(nil) - -type KeyClient struct { - knownKeys map[crypto.Address]*Key -} - -func NewKeyClient(privateAccounts ...*acm.PrivateAccount) *KeyClient { - client := &KeyClient{ - knownKeys: make(map[crypto.Address]*Key), - } - for _, pa := range privateAccounts { - client.knownKeys[pa.GetAddress()] = mockKeyFromPrivateAccount(pa) - } - return client -} - -func (mkc *KeyClient) NewKey(name string) crypto.Address { - // Only tests ED25519 curve and ripemd160. - key, err := newKey(name) - if err != nil { - panic(fmt.Sprintf("Mocked key client failed on key generation: %s", err)) - } - mkc.knownKeys[key.Address] = key - return key.Address -} - -func (mkc *KeyClient) Sign(signAddress crypto.Address, message []byte) (*crypto.Signature, error) { - key := mkc.knownKeys[signAddress] - if key == nil { - return nil, fmt.Errorf("unknown address (%s)", signAddress) - } - return key.Sign(message) -} - -func (mkc *KeyClient) PublicKey(address crypto.Address) (crypto.PublicKey, error) { - key := mkc.knownKeys[address] - if key == nil { - return crypto.PublicKey{}, fmt.Errorf("unknown address (%s)", address) - } - return crypto.PublicKeyFromBytes(key.PublicKey, crypto.CurveTypeEd25519) -} - -func (mkc *KeyClient) Generate(keyName string, curve crypto.CurveType) (crypto.Address, error) { - return mkc.NewKey(keyName), nil -} - -func (mkc *KeyClient) GetAddressForKeyName(keyName string) (crypto.Address, error) { - for _, m := range mkc.knownKeys { - if m.Name == keyName { - return m.Address, nil - } - } - - return crypto.Address{}, nil -} - -func (mkc *KeyClient) HealthCheck() error { - return nil -} - -func (mkc *KeyClient) Keys() []*Key { - var knownKeys []*Key - for _, key := range mkc.knownKeys { - knownKeys = append(knownKeys, key) - } - return knownKeys -} diff --git a/keys/mock/key_client_test.go b/keys/mock/key_client_test.go deleted file mode 100644 index 72dc557e7..000000000 --- a/keys/mock/key_client_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package mock - -import ( - "testing" - - "encoding/json" - - "github.com/hyperledger/burrow/crypto" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestMockKey_MonaxKeyJSON(t *testing.T) { - key, err := newKey("monax-key-test") - require.NoError(t, err) - monaxKey := key.MonaxKeysJSON() - t.Logf("key is: %v", monaxKey) - keyJSON := &plainKeyJSON{} - err = json.Unmarshal([]byte(monaxKey), keyJSON) - require.NoError(t, err) - // byte length of UUID string = 16 * 2 + 4 = 36 - assert.Equal(t, key.Address.String(), keyJSON.Address) - assert.Equal(t, key.PrivateKey, keyJSON.PrivateKey.Plain) - assert.Equal(t, string(crypto.CurveTypeEd25519.String()), keyJSON.Type) -} diff --git a/keys/server.go b/keys/server.go index 975d58244..a731b51c9 100644 --- a/keys/server.go +++ b/keys/server.go @@ -20,14 +20,14 @@ import ( func StandAloneServer(keysDir string, AllowBadFilePermissions bool) *grpc.Server { grpcServer := grpc.NewServer() - RegisterKeysServer(grpcServer, NewKeyStore(keysDir, AllowBadFilePermissions)) + RegisterKeysServer(grpcServer, NewFilesystemKeyStore(keysDir, AllowBadFilePermissions)) return grpcServer } //------------------------------------------------------------------------ // handlers -func (k *KeyStore) GenerateKey(ctx context.Context, in *GenRequest) (*GenResponse, error) { +func (k *FilesystemKeyStore) GenerateKey(ctx context.Context, in *GenRequest) (*GenResponse, error) { curveT, err := crypto.CurveTypeFromString(in.CurveType) if err != nil { return nil, err @@ -49,7 +49,7 @@ func (k *KeyStore) GenerateKey(ctx context.Context, in *GenRequest) (*GenRespons return &GenResponse{Address: addrH}, nil } -func (k *KeyStore) Export(ctx context.Context, in *ExportRequest) (*ExportResponse, error) { +func (k *FilesystemKeyStore) Export(ctx context.Context, in *ExportRequest) (*ExportResponse, error) { addr, err := getNameAddr(k.keysDirPath, in.GetName(), in.GetAddress()) if err != nil { @@ -75,7 +75,7 @@ func (k *KeyStore) Export(ctx context.Context, in *ExportRequest) (*ExportRespon }, nil } -func (k *KeyStore) PublicKey(ctx context.Context, in *PubRequest) (*PubResponse, error) { +func (k *FilesystemKeyStore) PublicKey(ctx context.Context, in *PubRequest) (*PubResponse, error) { addr, err := getNameAddr(k.keysDirPath, in.GetName(), in.GetAddress()) if err != nil { return nil, err @@ -95,7 +95,7 @@ func (k *KeyStore) PublicKey(ctx context.Context, in *PubRequest) (*PubResponse, return &PubResponse{CurveType: key.CurveType.String(), PublicKey: key.Pubkey()}, nil } -func (k *KeyStore) Sign(ctx context.Context, in *SignRequest) (*SignResponse, error) { +func (k *FilesystemKeyStore) Sign(ctx context.Context, in *SignRequest) (*SignResponse, error) { addr, err := getNameAddr(k.keysDirPath, in.GetName(), in.GetAddress()) if err != nil { return nil, err @@ -118,7 +118,7 @@ func (k *KeyStore) Sign(ctx context.Context, in *SignRequest) (*SignResponse, er return &SignResponse{Signature: sig}, err } -func (k *KeyStore) Verify(ctx context.Context, in *VerifyRequest) (*VerifyResponse, error) { +func (k *FilesystemKeyStore) Verify(ctx context.Context, in *VerifyRequest) (*VerifyResponse, error) { if in.GetPublicKey() == nil { return nil, fmt.Errorf("must provide a pubkey") } @@ -142,7 +142,7 @@ func (k *KeyStore) Verify(ctx context.Context, in *VerifyRequest) (*VerifyRespon return &VerifyResponse{}, nil } -func (k *KeyStore) Hash(ctx context.Context, in *HashRequest) (*HashResponse, error) { +func (k *FilesystemKeyStore) Hash(ctx context.Context, in *HashRequest) (*HashResponse, error) { var hasher hash.Hash switch in.GetHashtype() { case "ripemd160": @@ -159,9 +159,9 @@ func (k *KeyStore) Hash(ctx context.Context, in *HashRequest) (*HashResponse, er return &HashResponse{Hash: hex.EncodeUpperToString(hasher.Sum(nil))}, nil } -func (k *KeyStore) ImportJSON(ctx context.Context, in *ImportJSONRequest) (*ImportResponse, error) { +func (k *FilesystemKeyStore) ImportJSON(ctx context.Context, in *ImportJSONRequest) (*ImportResponse, error) { keyJSON := []byte(in.GetJSON()) - addr := IsValidKeyJson(keyJSON) + addr := isValidKeyJson(keyJSON) if addr != nil { _, err := writeKey(k.keysDirPath, addr, keyJSON) if err != nil { @@ -209,7 +209,7 @@ func (k *KeyStore) ImportJSON(ctx context.Context, in *ImportJSONRequest) (*Impo return &ImportResponse{Address: hex.EncodeUpperToString(addr)}, nil } -func (k *KeyStore) Import(ctx context.Context, in *ImportRequest) (*ImportResponse, error) { +func (k *FilesystemKeyStore) Import(ctx context.Context, in *ImportRequest) (*ImportResponse, error) { curveT, err := crypto.CurveTypeFromString(in.GetCurveType()) if err != nil { return nil, err @@ -232,7 +232,7 @@ func (k *KeyStore) Import(ctx context.Context, in *ImportRequest) (*ImportRespon return &ImportResponse{Address: hex.EncodeUpperToString(key.Address[:])}, nil } -func (k *KeyStore) List(ctx context.Context, in *ListRequest) (*ListResponse, error) { +func (k *FilesystemKeyStore) List(ctx context.Context, in *ListRequest) (*ListResponse, error) { byname, err := coreNameList(k.keysDirPath) if err != nil { return nil, err @@ -259,7 +259,7 @@ func (k *KeyStore) List(ctx context.Context, in *ListRequest) (*ListResponse, er if err != nil { return nil, err } - addrs, err := GetAllAddresses(datadir) + addrs, err := getAllAddresses(datadir) if err != nil { return nil, err } @@ -284,7 +284,7 @@ func getAddressNames(address string, byname map[string]string) []string { return names } -func (k *KeyStore) RemoveName(ctx context.Context, in *RemoveNameRequest) (*RemoveNameResponse, error) { +func (k *FilesystemKeyStore) RemoveName(ctx context.Context, in *RemoveNameRequest) (*RemoveNameResponse, error) { if in.GetKeyName() == "" { return nil, fmt.Errorf("please specify a name") } @@ -292,7 +292,7 @@ func (k *KeyStore) RemoveName(ctx context.Context, in *RemoveNameRequest) (*Remo return &RemoveNameResponse{}, coreNameRm(k.keysDirPath, in.GetKeyName()) } -func (k *KeyStore) AddName(ctx context.Context, in *AddNameRequest) (*AddNameResponse, error) { +func (k *FilesystemKeyStore) AddName(ctx context.Context, in *AddNameRequest) (*AddNameResponse, error) { if in.GetKeyname() == "" { return nil, fmt.Errorf("please specify a name") } diff --git a/rpc/eth.go b/rpc/eth.go index f5c75ef1f..f907c92c2 100644 --- a/rpc/eth.go +++ b/rpc/eth.go @@ -11,7 +11,6 @@ import ( "github.com/hyperledger/burrow/acm/balance" "github.com/hyperledger/burrow/acm/validator" bcm "github.com/hyperledger/burrow/bcm" - bin "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/crypto" x "github.com/hyperledger/burrow/encoding/hex" @@ -46,7 +45,7 @@ type EthService struct { nodeView *tendermint.NodeView trans *execution.Transactor keyClient keys.KeyClient - keyStore *keys.KeyStore + keyStore *keys.FilesystemKeyStore config *tmConfig.Config logger *logging.Logger } @@ -55,7 +54,7 @@ type EthService struct { func NewEthService(accounts acmstate.IterableStatsReader, events EventsReader, blockchain bcm.BlockchainInfo, validators validator.History, nodeView *tendermint.NodeView, - trans *execution.Transactor, keyStore *keys.KeyStore, + trans *execution.Transactor, keyStore *keys.FilesystemKeyStore, logger *logging.Logger) *EthService { keyClient := keys.NewLocalKeyClient(keyStore, logger) @@ -847,15 +846,6 @@ func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (* } } - acc, err := srv.accounts.GetAccount(tx.Input.Address) - if err != nil { - return nil, err - } else if acc == nil { - return nil, fmt.Errorf("account %s does not exist", tx.Input.Address.String()) - } - - tx.Input.Sequence = acc.Sequence + 1 - if to := req.Transaction.To; to != "" { addr, err := x.DecodeToAddress(to) if err != nil { @@ -884,20 +874,11 @@ func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (* if err != nil { return nil, fmt.Errorf("failed to parse data: %v", err) } - tx.Data = bin.HexBytes(bs) + tx.Data = bs } txEnv := txs.Enclose(srv.blockchain.ChainID(), tx) - signer, err := keys.AddressableSigner(srv.keyClient, tx.Input.Address) - if err != nil { - return nil, err - } - err = txEnv.Sign(signer) - if err != nil { - return nil, err - } - ctx := context.Background() txe, err := srv.trans.BroadcastTxSync(ctx, txEnv) if err != nil { diff --git a/rpc/eth_test.go b/rpc/eth_test.go index 283eac256..c4fdb2411 100644 --- a/rpc/eth_test.go +++ b/rpc/eth_test.go @@ -6,6 +6,7 @@ import ( "os" "strings" "testing" + "time" "github.com/hyperledger/burrow/acm/balance" "github.com/hyperledger/burrow/crypto" @@ -37,7 +38,7 @@ func TestWeb3Service(t *testing.T) { require.NoError(t, err) defer os.RemoveAll(dir) - store := keys.NewKeyStore(dir, true) + store := keys.NewFilesystemKeyStore(dir, true) for _, acc := range genesisAccounts { err = store.StoreKeyPlain(&keys.Key{ CurveType: acc.PrivateKey().CurveType, @@ -142,7 +143,39 @@ func TestWeb3Service(t *testing.T) { // create contract on chain t.Run("EthSendTransaction", func(t *testing.T) { - result, err := eth.EthSendTransaction(&web3.EthSendTransactionParams{ + type ret struct { + *web3.EthSendTransactionResult + error + } + ch := make(chan ret) + numSends := 5 + for i := 0; i < numSends; i++ { + idx := i + go func() { + tx := &web3.EthSendTransactionParams{ + Transaction: web3.Transaction{ + From: x.EncodeBytes(genesisAccounts[3].GetAddress().Bytes()), + Gas: x.EncodeNumber(uint64(40 + idx)), // make tx unique in mempool + Data: x.EncodeBytes(rpc.Bytecode_HelloWorld), + }, + } + result, err := eth.EthSendTransaction(tx) + ch <- ret{result, err} + }() + } + for i := 0; i < numSends; i++ { + select { + case r := <-ch: + require.NoError(t, r.error) + require.NotEmpty(t, r.TransactionHash) + case <-time.After(2 * time.Second): + t.Fatalf("timed out waiting for EthSendTransaction result") + } + } + }) + + t.Run("EthGetTransactionReceipt", func(t *testing.T) { + sendResult, err := eth.EthSendTransaction(&web3.EthSendTransactionParams{ Transaction: web3.Transaction{ From: x.EncodeBytes(genesisAccounts[3].GetAddress().Bytes()), Gas: x.EncodeNumber(40), @@ -150,17 +183,13 @@ func TestWeb3Service(t *testing.T) { }, }) require.NoError(t, err) - txHash = result.TransactionHash - require.NotEmpty(t, txHash) - }) - - t.Run("EthGetTransactionReceipt", func(t *testing.T) { + txHash = sendResult.TransactionHash require.NotEmpty(t, txHash, "need tx hash to get tx receipt") - result, err := eth.EthGetTransactionReceipt(&web3.EthGetTransactionReceiptParams{ + receiptResult, err := eth.EthGetTransactionReceipt(&web3.EthGetTransactionReceiptParams{ TransactionHash: txHash, }) require.NoError(t, err) - contractAddress = result.Receipt.ContractAddress + contractAddress = receiptResult.Receipt.ContractAddress require.NotEmpty(t, contractAddress) }) From c4e3754e724dd770b117da0c0ddc5e3e648b422e Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Sat, 25 Apr 2020 02:14:20 +0100 Subject: [PATCH 109/185] Switch to @grpc/grpc-js to avoid native code. The C++ grpc module has issues with new Node concurrency and causes other problems from time-to-time. The pure JS @grpc/grpc-js has just come out of beta and looks easier to deal with. Also: - Switch to yarn - Tidy up tests (a bit) - Promisify NameReg - Improve typing - Make `compile` helper save ABI metadata - Rename `ContractManager.address` to `fromAddress` - Handle `fromAddress` case when no metadata found by throwing exception Signed-off-by: Silas Davis --- .github/Dockerfile | 4 +- .github/workflows/release.yaml | 1 + .github/workflows/test.yaml | 2 +- Makefile | 24 +- docs/example/basic-app-website/Makefile | 8 +- docs/example/basic-app/Makefile | 8 +- docs/js-api.md | 10 +- integration/rpctest/helpers.go | 2 +- js/README.md | 4 +- js/package-lock.json | 2622 --------------- js/package.json | 19 +- js/src/lib/burrow.ts | 52 +- js/src/lib/contracts/contract.ts | 35 +- js/src/lib/contracts/event.ts | 3 +- js/src/lib/contracts/function.ts | 72 +- js/src/lib/contracts/manager.ts | 43 +- js/src/lib/events.ts | 17 +- js/src/lib/namereg.ts | 44 +- js/src/lib/pipe.ts | 11 +- js/src/test.ts | 31 +- js/src/test/175.test.ts | 22 +- js/src/test/38.test.ts | 42 - js/src/test/42.test.ts | 52 - js/src/test/44.test.ts | 19 +- js/src/test/45.test.ts | 30 +- js/src/test/46.test.ts | 20 +- js/src/test/47.test.ts | 22 +- js/src/test/48.test.ts | 22 +- js/src/test/50.test.ts | 20 +- js/src/test/61.test.ts | 20 +- js/src/test/81.test.ts | 82 +- js/src/test/README.md | 22 +- js/src/test/abi/abis.test.ts | 29 - js/src/test/abi/deploy.yaml | 12 - js/src/test/abi/random.sol | 7 - js/src/test/abis.test.ts | 27 + js/src/test/contract-event.test.ts | 29 + js/src/test/event.test.ts | 54 +- js/src/test/functional.test.ts | 22 +- js/src/test/get-set.test.ts | 96 + js/src/test/get_set_smoke_test/GetSet.sol | 54 - js/src/test/get_set_smoke_test/index.ts | 93 - ...17.test.ts => handler-overwriting.test.ts} | 22 +- js/src/test/infloop.test.ts | 34 +- .../test/{21.test.ts => memory-bytes.test.ts} | 36 +- js/src/test/namereg.test.ts | 24 +- js/src/test/return-types.test.ts | 45 + js/src/test/revert.test.ts | 31 +- js/src/test/revert2.test.ts | 30 +- js/src/test/revert3.test.ts | 22 +- .../{http.test.ts => simple-storage.test.ts} | 21 +- js/test.sh | 3 +- js/tsconfig.json | 1 - js/types/solc/index.d.ts | 11 +- js/yarn.lock | 2904 +++++++++++++++++ 55 files changed, 3533 insertions(+), 3459 deletions(-) delete mode 100644 js/package-lock.json delete mode 100644 js/src/test/38.test.ts delete mode 100644 js/src/test/42.test.ts delete mode 100644 js/src/test/abi/abis.test.ts delete mode 100644 js/src/test/abi/deploy.yaml delete mode 100644 js/src/test/abi/random.sol create mode 100644 js/src/test/abis.test.ts create mode 100644 js/src/test/contract-event.test.ts create mode 100644 js/src/test/get-set.test.ts delete mode 100644 js/src/test/get_set_smoke_test/GetSet.sol delete mode 100644 js/src/test/get_set_smoke_test/index.ts rename js/src/test/{17.test.ts => handler-overwriting.test.ts} (69%) rename js/src/test/{21.test.ts => memory-bytes.test.ts} (58%) create mode 100644 js/src/test/return-types.test.ts rename js/src/test/{http.test.ts => simple-storage.test.ts} (54%) create mode 100644 js/yarn.lock diff --git a/.github/Dockerfile b/.github/Dockerfile index 1ca431307..16f57df67 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -7,7 +7,7 @@ ENV GORELEASER_VERSION "v0.104.1" # Update remote with 'make push_ci_image' RUN apk add --update --no-cache \ nodejs \ - npm \ + yarn \ netcat-openbsd \ git \ openssh-client \ @@ -28,8 +28,6 @@ RUN pip install docker-compose WORKDIR /usr/bin RUN curl -sS -L https://download.docker.com/linux/static/stable/x86_64/docker-$DOCKER_VERSION.tgz | tar xz --strip-components 1 docker/docker RUN curl -sS -L https://github.com/goreleaser/goreleaser/releases/download/$GORELEASER_VERSION/goreleaser_Linux_x86_64.tar.gz | tar xz goreleaser -RUN npm install -g mocha -RUN npm install -g mocha-circleci-reporter ENV CI=true # Protobuf builds require being in GOPATH (more or less) but this disables module support by default ENV GO111MODULE=on diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b62828a97..909ab799d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,6 +21,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# TODO: convert this to yarn equivalent publish js: name: npm runs-on: ubuntu-latest diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 18539a48c..acc43fc35 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -125,7 +125,7 @@ jobs: - name: test run: | export PATH=${PATH}:$(pwd)/bin - make npm_install + make yarn_install make test_js charts: diff --git a/Makefile b/Makefile index 76df4e7df..f12e0a288 100644 --- a/Makefile +++ b/Makefile @@ -75,8 +75,7 @@ megacheck: BURROW_TS_PATH = ./js PROTO_GEN_TS_PATH = ${BURROW_TS_PATH}/proto -PROTOC_GEN_TS_PATH = ${BURROW_TS_PATH}/node_modules/.bin/protoc-gen-ts -PROTOC_GEN_GRPC_PATH= ${BURROW_TS_PATH}/node_modules/.bin/grpc_tools_node_protoc_plugin +NODE_BIN = ${BURROW_TS_PATH}/node_modules/.bin PROTO_FILES = $(shell find . -path $(BURROW_TS_PATH) -prune -o -path ./node_modules -prune -o -type f -name '*.proto' -print) PROTO_GO_FILES = $(patsubst %.proto, %.pb.go, $(PROTO_FILES)) @@ -91,18 +90,19 @@ protobuf: $(PROTO_GO_FILES) $(PROTO_TS_FILES) fix %.pb.go: %.proto protoc -I ./protobuf $< --gogo_out=plugins=grpc:${GOPATH}/src +# Using this: https://github.com/agreatfool/grpc_tools_node_protoc_ts %.pb.ts: %.proto - @protoc -I protobuf \ - --plugin="protoc-gen-ts=${PROTOC_GEN_TS_PATH}" \ - --plugin=protoc-gen-grpc=${PROTOC_GEN_GRPC_PATH} \ + $(NODE_BIN)/grpc_tools_node_protoc -I protobuf \ + --plugin="protoc-gen-ts=$(NODE_BIN)/protoc-gen-ts" \ --js_out="import_style=commonjs,binary:${PROTO_GEN_TS_PATH}" \ - --ts_out="service=grpc-node:${PROTO_GEN_TS_PATH}" \ - --grpc_out="${PROTO_GEN_TS_PATH}" $< + --ts_out="generate_package_definition:${PROTO_GEN_TS_PATH}" \ + --grpc_out="generate_package_definition:${PROTO_GEN_TS_PATH}" \ + $< .PHONY: protobuf_deps protobuf_deps: @go get -u github.com/gogo/protobuf/protoc-gen-gogo - @cd ${BURROW_TS_PATH} && npm install --only=dev + @cd ${BURROW_TS_PATH} && yarn install --only=dev .PHONY: clean_protobuf clean_protobuf: @@ -192,15 +192,15 @@ solang: $(patsubst %.solang, %.solang.go, $(wildcard ./execution/wasm/*.solang)) @burrow compile --wasm $^ # node/js -.PHONY: npm_install -npm_install: - @cd ${BURROW_TS_PATH} && npm install +.PHONY: yarn_install +yarn_install: + @cd ${BURROW_TS_PATH} && yarn install # Test .PHONY: test_js test_js: - @cd ${BURROW_TS_PATH} && npm test + @cd ${BURROW_TS_PATH} && yarn test .PHONY: test test: check bin/solc diff --git a/docs/example/basic-app-website/Makefile b/docs/example/basic-app-website/Makefile index f7b94a749..2ee9dfaf0 100644 --- a/docs/example/basic-app-website/Makefile +++ b/docs/example/basic-app-website/Makefile @@ -71,10 +71,10 @@ redeploy: | delete_deploy deploy.output.json # Running the app # -.PHONY: npm_install -npm_install: - npm install +.PHONY: yarn_install +yarn_install: + yarn install .PHONY: start_app -start_app: npm_install deploy +start_app: yarn_install deploy node app.js diff --git a/docs/example/basic-app/Makefile b/docs/example/basic-app/Makefile index f7b94a749..2ee9dfaf0 100644 --- a/docs/example/basic-app/Makefile +++ b/docs/example/basic-app/Makefile @@ -71,10 +71,10 @@ redeploy: | delete_deploy deploy.output.json # Running the app # -.PHONY: npm_install -npm_install: - npm install +.PHONY: yarn_install +yarn_install: + yarn install .PHONY: start_app -start_app: npm_install deploy +start_app: yarn_install deploy node app.js diff --git a/docs/js-api.md b/docs/js-api.md index 2bbfa95c8..678a94c33 100644 --- a/docs/js-api.md +++ b/docs/js-api.md @@ -18,7 +18,7 @@ If your distribution of Linux has a version older than 6 then you can update it. ## Install ``` bash -$ npm install @hyperledger/burrow +$ yarn install @hyperledger/burrow ``` ## Usage @@ -495,26 +495,26 @@ return Promise.all( // Deployment of two contracts ## Documentation -Generate documentation using the command `npm run doc`. +Generate documentation using the command `yarn run doc`. ## Testing To test the library against pre-recorded vectors: ``` -npm test +yarn test ``` To test the library against Burrow while recording vectors: ``` -TEST=record npm test +TEST=record yarn test ``` To test Burrow against pre-recorded vectors without exercising the library: ``` -TEST=server npm test +TEST=server yarn test ``` ## Debugging diff --git a/integration/rpctest/helpers.go b/integration/rpctest/helpers.go index 9e51df43e..5f544cb37 100644 --- a/integration/rpctest/helpers.go +++ b/integration/rpctest/helpers.go @@ -60,7 +60,7 @@ func CreateContract(cli rpctransact.TransactClient, inputAddress crypto.Address, meta = make([]*payload.ContractMeta, len(metamap)) for i, m := range metamap { hash := sha3.NewLegacyKeccak256() - hash.Write([]byte(m.DeployedCode)) + hash.Write(m.DeployedCode) meta[i] = &payload.ContractMeta{ CodeHash: hash.Sum(nil), Meta: string(m.Abi), diff --git a/js/README.md b/js/README.md index 99db26c3c..0a21a44b4 100644 --- a/js/README.md +++ b/js/README.md @@ -2,8 +2,6 @@ This is a TypeScript API for communicating with a [Hyperledger Burrow](https://github.com/hyperledger/burrow) server, which implements the GRPC spec. -[![npm version][npm-image]][npm-url] - ## Version compatibility -This lib's version is pegged to burrow's version on the minor. So @hyperledger/burrow at version X.Y.^ will work with burrow version X.Y.^ where ^ means latest patch version. The patch version numbering will not always correspond. If you are having difficulties getting this lib to work with a burrow release please first make sure you have the latest patch version of each. \ No newline at end of file +This lib's version is pegged to burrow's version on the minor. So @hyperledger/burrow at version X.Y.^ will work with burrow version X.Y.^ where ^ means latest patch version. The patch version numbering will not always correspond. If you are having difficulties getting this lib to work with a burrow release please first make sure you have the latest patch version of each. diff --git a/js/package-lock.json b/js/package-lock.json deleted file mode 100644 index 0cf85fcf5..000000000 --- a/js/package-lock.json +++ /dev/null @@ -1,2622 +0,0 @@ -{ - "name": "@hyperledger/burrow", - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "requires": { - "@types/node": "*" - } - }, - "@types/bytebuffer": { - "version": "5.0.40", - "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.40.tgz", - "integrity": "sha512-h48dyzZrPMz25K6Q4+NCwWaxwXany2FhQg/ErOcdZS1ZpsaDnDMZg8JYLMTGz7uvXKrcKGJUZJlZObyfgdaN9g==", - "requires": { - "@types/long": "*", - "@types/node": "*" - } - }, - "@types/ethereumjs-abi": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@types/ethereumjs-abi/-/ethereumjs-abi-0.6.3.tgz", - "integrity": "sha512-DnHvqPkrJS5w4yZexTa5bdPNb8IyKPYciou0+zZCIg5fpzvGtyptTvshy0uZKzti2/k/markwjlxWRBWt7Mjuw==", - "requires": { - "@types/node": "*" - } - }, - "@types/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", - "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" - }, - "@types/mocha": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", - "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", - "dev": true - }, - "@types/node": { - "version": "13.1.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.8.tgz", - "integrity": "sha512-6XzyyNM9EKQW4HKuzbo/CkOIjn/evtCmsU+MUM1xDfJ+3/rNjBttM1NgN7AOQvN6tP1Sl1D1PIKMreTArnxM9A==" - }, - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "arg": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.2.tgz", - "integrity": "sha512-+ytCkGcBtHZ3V2r2Z06AncYO8jz46UEamcspGoU8lHcEbpn6J77QK0vdWvChsclg/tM5XIJC5tnjmPp7Eq6Obg==" - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "ascli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", - "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", - "requires": { - "colour": "~0.7.1", - "optjs": "~3.2.2" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bip66": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", - "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "bn.js": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.1.tgz", - "integrity": "sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "buffer": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", - "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" - }, - "bytebuffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", - "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", - "requires": { - "long": "~3" - } - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colour": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", - "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" - }, - "command-exists": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.8.tgz", - "integrity": "sha512-PM54PkseWbiiD/mMsbvW351/u+dafwTJ0ye2qB60G1aGQP9j3xK2gmMDc+R34L3nDtx4qMCitXT75mkbkGJDLw==" - }, - "commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" - }, - "drbg.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", - "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", - "requires": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" - } - }, - "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - } - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "es-abstract": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.3.tgz", - "integrity": "sha512-AwiVPKf3sKGMoWtFw0J7Y4MTZ4Iek67k4COWOwHqS8B9TOZ71DCfcoBmdamy8Y6mj4MDz0+VNUpC2HKHFHA3pg==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "ethereumjs-abi": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", - "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", - "requires": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - } - } - }, - "ethereumjs-util": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", - "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "0.1.6", - "keccak": "^2.0.0", - "rlp": "^2.2.3", - "secp256k1": "^3.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - } - } - }, - "ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", - "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } - }, - "fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "google-protobuf": { - "version": "3.11.2", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.11.2.tgz", - "integrity": "sha512-T4fin7lcYLUPj2ChUZ4DvfuuHtg3xi1621qeRZt2J7SvOQusOzq+sDT4vbotWTCjUXJoR36CA016LlhtPy80uQ==", - "dev": true - }, - "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "grpc": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.24.2.tgz", - "integrity": "sha512-EG3WH6AWMVvAiV15d+lr+K77HJ/KV/3FvMpjKjulXHbTwgDZkhkcWbwhxFAoTdxTkQvy0WFcO3Nog50QBbHZWw==", - "requires": { - "@types/bytebuffer": "^5.0.40", - "lodash.camelcase": "^4.3.0", - "lodash.clone": "^4.5.0", - "nan": "^2.13.2", - "node-pre-gyp": "^0.14.0", - "protobufjs": "^5.0.3" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.3", - "bundled": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true - }, - "fs-minipass": { - "version": "1.2.7", - "bundled": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.4", - "bundled": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.3", - "bundled": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true - }, - "ini": { - "version": "1.3.5", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "bundled": true - }, - "minipass": { - "version": "2.9.0", - "bundled": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "bundled": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "bundled": true - } - } - }, - "ms": { - "version": "2.1.2", - "bundled": true - }, - "needle": { - "version": "2.4.0", - "bundled": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.14.0", - "bundled": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true - }, - "npm-packlist": { - "version": "1.4.6", - "bundled": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true - }, - "sax": { - "version": "1.2.4", - "bundled": true - }, - "semver": { - "version": "5.7.1", - "bundled": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true - }, - "tar": { - "version": "4.4.13", - "bundled": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - }, - "yallist": { - "version": "3.1.1", - "bundled": true - } - } - }, - "grpc-tools": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.8.1.tgz", - "integrity": "sha512-CvZLshEDbum8ZtB8r3bn6JsrHs3L7S1jf7PTa02nZSLmcLTKbiXH5UYrte06Kh7SdzFmkxPMaOsys2rCs+HRjA==", - "dev": true, - "requires": { - "node-pre-gyp": "^0.12.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "needle": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true, - "dev": true - }, - "npm-packlist": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true - }, - "semver": { - "version": "5.6.0", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true - } - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" - }, - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", - "dev": true - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" - }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "keccak": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", - "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", - "requires": { - "bindings": "^1.5.0", - "inherits": "^2.0.4", - "nan": "^2.14.0", - "safe-buffer": "^5.2.0" - } - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "requires": { - "invert-kv": "^1.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" - }, - "lodash.clone": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", - "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=" - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" - }, - "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==" - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "mocha": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz", - "integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==", - "dev": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.2.2", - "yargs-parser": "13.0.0", - "yargs-unparser": "1.5.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - } - } - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yargs": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", - "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.0.0" - } - } - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "optjs": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", - "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=" - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "protobufjs": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", - "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", - "requires": { - "ascli": "~1", - "bytebuffer": "~5", - "glob": "^7.0.5", - "yargs": "^3.10.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rlp": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.4.tgz", - "integrity": "sha512-fdq2yYCWpAQBhwkZv+Z8o/Z4sPmYm1CUq6P7n6lVTOdb949CnqA0sndXal5C1NleSVSZm6q5F3iEbauyVln/iw==", - "requires": { - "bn.js": "^4.11.1" - }, - "dependencies": { - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - } - } - }, - "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" - }, - "secp256k1": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", - "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", - "requires": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.5.2", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" - }, - "dependencies": { - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - } - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "sha3": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.1.tgz", - "integrity": "sha512-hj6dCLbWByenZarg2gb2VFD9zoY5kr/FMriDcbtVDLJ5geOWGOJCI0jQUjAzoY/ZHlkt8BSEbh9KJEDT8AGuJQ==", - "requires": { - "buffer": "5.4.3" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "solc": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.6.1.tgz", - "integrity": "sha512-iKqNYps2p++x8L9sBg7JeAJb7EmW8VJ/2asAzwlLYcUhj86AzuWLe94UTSQHv1SSCCj/x6lya8twvXkZtlTbIQ==", - "requires": { - "command-exists": "^1.2.8", - "commander": "3.0.2", - "fs-extra": "^0.30.0", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", - "semver": "^5.5.0", - "tmp": "0.0.33" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "source-map-support": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", - "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string.prototype.trimleft": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", - "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - } - }, - "string.prototype.trimright": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", - "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-hex-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", - "requires": { - "is-hex-prefixed": "1.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "ts-node": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.6.2.tgz", - "integrity": "sha512-4mZEbofxGqLL2RImpe3zMJukvEvcO1XP8bj8ozBPySdCUXEcU5cIRwR0aM3R+VoZq7iXc8N86NC0FspGRqP4gg==", - "requires": { - "arg": "^4.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.6", - "yn": "3.1.1" - } - }, - "ts-protoc-gen": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/ts-protoc-gen/-/ts-protoc-gen-0.12.0.tgz", - "integrity": "sha512-V7jnICJxKqalBrnJSMTW5tB9sGi48gOC325bfcM7TDNUItVOlaMM//rQmuo49ybipk/SyJTnWXgtJnhHCevNJw==", - "dev": true, - "requires": { - "google-protobuf": "^3.6.1" - } - }, - "typescript": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", - "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==" - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" - }, - "yargs": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", - "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", - "requires": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" - } - }, - "yargs-parser": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", - "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - } - } - }, - "yargs-unparser": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", - "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", - "dev": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.11", - "yargs": "^12.0.5" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" - } - } -} diff --git a/js/package.json b/js/package.json index 1e066c029..71a0e0824 100644 --- a/js/package.json +++ b/js/package.json @@ -13,21 +13,26 @@ "bugs": { "url": "https://github.com/hyperledger/burrow/issues" }, + "scripts": { + "build": "tsc --build", + "test": "./test.sh 'src/test/**/*.test.ts'" + }, "dependencies": { + "@grpc/grpc-js": "^1.0.2", "@types/ethereumjs-abi": "^0.6.3", - "ethereumjs-abi": "^0.6.8", "bn.js": "^5.1.1", - "grpc": "^1.24.2", + "ethereumjs-abi": "^0.6.8", + "google-protobuf": "^3.11.4", "sha3": "^2.1.1", "solc": "^0.6.1", "ts-node": "^8.6.2", "typescript": "^3.7.4" }, "devDependencies": { - "@types/mocha": "^5.2.7", - "mocha": "6.2.0", + "@types/mocha": "^7.0.2", "grpc-tools": "^1.8.1", - "ts-protoc-gen": "^0.12.0" + "grpc_tools_node_protoc_ts": "^3.0.0", + "mocha": "^7.1.1" }, "homepage": "https://github.com/hyperledger/burrow/", "keywords": [ @@ -53,9 +58,5 @@ "repository": { "type": "git", "url": "git+https://github.com/hyperledger/burrow.git" - }, - "scripts": { - "build": "tsc --build", - "test": "./test.sh 'src/test/*.test.ts'" } } diff --git a/js/src/lib/burrow.ts b/js/src/lib/burrow.ts index e73ee7929..3731a689b 100644 --- a/js/src/lib/burrow.ts +++ b/js/src/lib/burrow.ts @@ -1,11 +1,12 @@ -import { Events } from './events'; -import { Pipe } from './pipe'; -import { ContractManager } from './contracts/manager'; -import { Namereg } from './namereg'; -import { TransactClient } from '../../proto/rpctransact_grpc_pb'; -import { QueryClient } from '../../proto/rpcquery_grpc_pb'; -import { ExecutionEventsClient } from '../../proto/rpcevents_grpc_pb'; -import * as grpc from 'grpc'; +import * as grpc from "@grpc/grpc-js"; +import {makeClientConstructor} from "@grpc/grpc-js"; +import {IExecutionEventsClient} from "../../proto/rpcevents_grpc_pb"; +import {IQueryClient} from '../../proto/rpcquery_grpc_pb'; +import {ITransactClient} from '../../proto/rpctransact_grpc_pb'; +import {ContractManager} from './contracts/manager'; +import {Events} from './events'; +import {Namereg} from './namereg'; +import {Pipe} from './pipe'; export type Error = grpc.ServiceError; @@ -18,35 +19,34 @@ export class Burrow { contracts: ContractManager; namereg: Namereg; - ec: ExecutionEventsClient; - tc: TransactClient; - qc: QueryClient; + ec: IExecutionEventsClient; + tc: ITransactClient; + qc: IQueryClient; constructor(URL: string, account: string) { this.URL = URL; this.account = account; - this.ec = new ExecutionEventsClient(URL, grpc.credentials.createInsecure()); - this.tc = new TransactClient(URL, grpc.credentials.createInsecure()); - this.qc = new QueryClient(URL, grpc.credentials.createInsecure()); - + + this.ec = newClient('rpcevents', 'ExecutionEvents', URL); + this.tc = newClient('rpctransact', 'Transact', URL); + this.qc = newClient('rpcquery', 'Query', URL); + // This is the execution events streaming service running on top of the raw streaming function. this.events = new Events(this.ec); - + // Contracts stuff running on top of grpc this.pipe = new Pipe(this.tc, this.events); this.contracts = new ContractManager(this); - this.namereg = new Namereg(merge(this.tc, this.qc), this.account); + this.namereg = new Namereg(this.tc, this.qc, this.account); } } -function merge(...args: any[]): any { - const next = {}; - for (const obj of args) { - for (const key in obj) { - next[key] = obj[key]; - } - } - return next; -}; +function newClient(pkg: string, service: string, URL: string): T { + const imp = require(`../../proto/${pkg}_grpc_pb`); + // As per https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/master/examples/src/grpcjs/client.ts + const cons = makeClientConstructor(imp[`${pkg}.${service}`], service); + // ugh + return new cons(URL, grpc.credentials.createInsecure()) as unknown as T +} diff --git a/js/src/lib/contracts/contract.ts b/js/src/lib/contracts/contract.ts index 1d1d522c8..34a8a3ebd 100644 --- a/js/src/lib/contracts/contract.ts +++ b/js/src/lib/contracts/contract.ts @@ -1,9 +1,15 @@ -import { SolidityEvent } from './event'; -import { SolidityFunction, Handler } from './function'; -import { Burrow } from '../burrow'; -import { Function, Event } from 'solc'; +import {SolidityEvent} from './event'; +import {SolidityFunction, Handler} from './function'; +import {Burrow} from '../burrow'; +import {Function, Event} from 'solc'; + + +export type FunctionOrEvent = Function | Event; + +export type ABI = Array + +export type Bytecode = { bytecode: string, deployedBytecode?: string } -type FunctionOrEvent = Function | Event; export interface Handlers { call?: Handler @@ -11,30 +17,35 @@ export interface Handlers { } const defaultHandlers: Handlers = { - call: function (result) { return result.raw }, - deploy: function (result) { return result.contractAddress } + call: function (result) { + return result.raw + }, + deploy: function (result) { + return result.contractAddress + } } export class Contract { - abi: Array; + abi: ABI; address: string; - code: string; + code: Bytecode; burrow: Burrow; handlers: Handlers; _constructor: any; - constructor(abi: Array, code: string, address: string, burrow: Burrow, handlers?: Handlers) { + constructor(abi: Array, code: string | Bytecode, address: string, burrow: Burrow, handlers?: Handlers) { handlers = Object.assign({}, defaultHandlers, handlers); this.address = address; this.abi = abi; - this.code = code; + this.code = typeof (code) === 'string' ? {bytecode: code} : code; this.burrow = burrow; this.handlers = handlers; addFunctionsToContract(this); addEventsToContract(this); } + } const addFunctionsToContract = function (contract: Contract) { @@ -86,4 +97,4 @@ const addEventsToContract = function (contract: Contract) { } contract[displayName][typeName] = call.bind(contract); }) -} \ No newline at end of file +} diff --git a/js/src/lib/contracts/event.ts b/js/src/lib/contracts/event.ts index ccd9d189b..9e061aa50 100644 --- a/js/src/lib/contracts/event.ts +++ b/js/src/lib/contracts/event.ts @@ -1,3 +1,4 @@ +import {ServiceError} from "@grpc/grpc-js"; import * as utils from '../utils/utils'; import * as coder from 'ethereumjs-abi'; import * as convert from '../utils/convert'; @@ -58,4 +59,4 @@ export const SolidityEvent = function (abi: Event, burrow: Burrow) { } return {displayName, typeName, call}; -} \ No newline at end of file +} diff --git a/js/src/lib/contracts/function.ts b/js/src/lib/contracts/function.ts index ece2c65c7..cf9df415c 100644 --- a/js/src/lib/contracts/function.ts +++ b/js/src/lib/contracts/function.ts @@ -1,13 +1,17 @@ +import {Metadata} from "@grpc/grpc-js"; +import {callErrorFromStatus} from "@grpc/grpc-js/build/src/call"; +import {Keccak} from "sha3"; import * as utils from '../utils/utils'; import * as coder from 'ethereumjs-abi'; import * as convert from '../utils/convert'; -import * as grpc from 'grpc'; +import * as grpc from '@grpc/grpc-js'; import sha3 from '../utils/sha3'; -import { TxInput, CallTx } from '../../../proto/payload_pb'; -import { TxExecution, Result } from '../../../proto/exec_pb'; -import { Burrow, Error } from '../burrow'; -import { Envelope } from '../../../proto/txs_pb'; -import { Function, FunctionInput, FunctionOutput } from 'solc'; +import {TxInput, CallTx, ContractMeta} from '../../../proto/payload_pb'; +import {TxExecution, Result} from '../../../proto/exec_pb'; +import {Burrow, Error} from '../burrow'; +import {Envelope} from '../../../proto/txs_pb'; +import {Function, FunctionInput, FunctionOutput} from 'solc'; +import {ABI, Contract} from "./contract"; type FunctionIO = FunctionInput & FunctionOutput; @@ -38,7 +42,7 @@ function fnSignature(abi: Function) { const types = (args: Array) => args.map(arg => arg.type); -function txPayload(data: string, account: string, address: string): CallTx { +function txPayload(data: string, account: string, address: string, contract?: Contract): CallTx { const input = new TxInput(); input.setAddress(Buffer.from(account, 'hex')); input.setAmount(0); @@ -49,6 +53,15 @@ function txPayload(data: string, account: string, address: string): CallTx { payload.setGaslimit(DEFAULT_GAS); payload.setFee(0); payload.setData(Buffer.from(data, 'hex')); + // If address is null then we are creating a new contract, if we have the deployedBytecode then send it with the ABI + if (!address && contract.code.deployedBytecode) { + const meta = new ContractMeta() + // TODO: document/formalise the expected structure of the contract metadata + meta.setMeta(JSON.stringify({Abi: contract.abi})) + const codeHash = (new Keccak(256)).update(contract.code.deployedBytecode, "hex").digest() + meta.setCodehash(codeHash) + payload.setContractmetaList([meta]) + } return payload } @@ -75,7 +88,7 @@ const decodeF = function (abi: Function, output: Uint8Array): DecodedResult { let outputs = abi.outputs; let outputTypes = types(outputs); - + // Decode raw bytes to arguments let raw = convert.abiToBurrow(outputTypes, coder.rawDecode(outputTypes, Buffer.from(output))); let result: DecodedResult = {raw: raw.slice()} @@ -87,7 +100,7 @@ const decodeF = function (abi: Function, output: Uint8Array): DecodedResult { } return acc; }, {}); - + return result; } @@ -108,19 +121,30 @@ export const SolidityFunction = function (abi: Function, burrow: Burrow) { // I want to keep them separate in the case that we want to move all the functional // components together and maybe even... write tests for them (gasp!) const encode = function () { + // Call should always be bound to a Contract + const contract: Contract = this; let args = Array.prototype.slice.call(arguments) - return encodeF(abi, args, isConstructor ? this.code : null) + return encodeF(abi, args, isConstructor ? contract.code.bytecode : null) } const decode = function (data) { + // Call should always be bound to a Contract + const contract: Contract = this; return decodeF(abi, data) } const call = async function (isSim: boolean, handler: Handler, address: string, ...args: any[]) { - handler = handler || function (result) { return result }; - address = address || this.address; - if (isConstructor) { address = null }; - const self = this; + // Call should always be bound to a Contract + const contract: Contract = this; + + handler = handler || function (result) { + return result + }; + address = address || contract.address; + if (isConstructor) { + address = null + } + let P = new Promise(function (resolve, reject) { if (address == null && !isConstructor) reject(new Error('Address not provided to call')) @@ -133,13 +157,19 @@ export const SolidityFunction = function (abi: Function, burrow: Burrow) { if (result.hasException()) { // Decode error message if there is one otherwise default if (result.getResult().getReturn().length === 0) { - error = new Error('Execution Reverted') + return reject(callErrorFromStatus({ + code: grpc.status.ABORTED, + metadata: new Metadata(), + details: 'Execution Reverted', + })) } else { // Strip first 4 bytes(function signature) the decode as a string - error = new Error(coder.rawDecode(['string'], Buffer.from(result.getResult().getReturn_asU8().slice(4)))[0]) + return reject(callErrorFromStatus({ + code: grpc.status.ABORTED, + metadata: new Metadata(), + details: coder.rawDecode(['string'], Buffer.from(result.getResult().getReturn_asU8().slice(4)))[0], + })) } - error.code = grpc.status.ABORTED; - return reject(error) } // Meta Data (address, caller, height, etc) @@ -173,8 +203,8 @@ export const SolidityFunction = function (abi: Function, burrow: Burrow) { // otherwise the coder will give an error with bignumber not a number // TODO investigate if other libs or an updated lib will fix this // let data = encodeF(abi, utils.burrowToWeb3(args), isCon ? self.code : null) - let data = encodeF(abi, args, isConstructor ? self.code : null) - let payload = txPayload(data, burrow.account, address) + let data = encodeF(abi, args, isConstructor ? contract.code.bytecode : null) + let payload = txPayload(data, burrow.account, address, contract) if (isSim) { burrow.pipe.call(payload, post) @@ -188,4 +218,4 @@ export const SolidityFunction = function (abi: Function, burrow: Burrow) { } return {displayName, typeName, call, encode, decode} -} \ No newline at end of file +} diff --git a/js/src/lib/contracts/manager.ts b/js/src/lib/contracts/manager.ts index 39440808e..78fd73a8c 100644 --- a/js/src/lib/contracts/manager.ts +++ b/js/src/lib/contracts/manager.ts @@ -1,45 +1,46 @@ -import { Contract, Handlers } from './contract'; -import { Burrow } from '../burrow'; -import { GetMetadataParam } from '../../../proto/rpcquery_pb'; -import { Function, Event } from 'solc'; +import {Event, Function} from 'solc'; +import {GetMetadataParam} from '../../../proto/rpcquery_pb'; +import {Burrow} from '../burrow'; +import {Contract, Handlers} from './contract'; type FunctionOrEvent = Function | Event; export class ContractManager { burrow: Burrow; - + constructor(burrow: Burrow) { this.burrow = burrow; } - deploy(abi: Array, byteCode: string, handlers?: Handlers, ...args: any[]): Promise { - return new Promise((resolve, reject) => { - let contract = new Contract(abi, byteCode, null, this.burrow, handlers) - contract._constructor.apply(contract, args).then((address: string) => { - contract.address = address; - resolve(contract); - }); - }); + async deploy(abi: Array, byteCode: string | { bytecode: string, deployedBytecode: string }, + handlers?: Handlers, ...args: any[]): Promise { + const contract = new Contract(abi, byteCode, null, this.burrow, handlers) + contract.address = await contract._constructor.apply(contract, args); + return contract; } /** - * Creates a contract object interface from an address without ABI. - * The contract must be deployed using a recent burrow deploy which registers - * metadata. + * Looks up the ABI for a deployed contract from Burrow's contract metadata store. + * Contract metadata is only stored when provided by the contract deployer so is not guaranteed to exist. * * @method address - * @param {string} address - default contract address [can be null] - * @returns {Contract} returns contract interface object + * @param {string} address + * @throws an error if no metadata found and contract could not be instantiated + * @returns {Contract} interface object */ - address(address: string, handlers?: Handlers): Promise { + fromAddress(address: string, handlers?: Handlers): Promise { const msg = new GetMetadataParam(); msg.setAddress(Buffer.from(address, 'hex')); return new Promise((resolve, reject) => this.burrow.qc.getMetadata(msg, (err, res) => { if (err) reject(err); - const abi = JSON.parse(res.getMetadata()).Abi; + const metadata = res.getMetadata(); + if (!metadata) { + throw new Error(`could not find any metadata for account ${address}`) + } + const abi = JSON.parse(metadata).Abi; resolve(new Contract(abi, null, address, this.burrow, handlers)); })) } -} \ No newline at end of file +} diff --git a/js/src/lib/events.ts b/js/src/lib/events.ts index 1495ff8f5..d11ef5253 100644 --- a/js/src/lib/events.ts +++ b/js/src/lib/events.ts @@ -1,17 +1,14 @@ -import { ExecutionEventsClient } from '../../proto/rpcevents_grpc_pb'; +import { IExecutionEventsClient } from '../../proto/rpcevents_grpc_pb'; import { BlocksRequest, BlockRange, Bound, EventsResponse } from '../../proto/rpcevents_pb'; import { LogEvent } from '../../proto/exec_pb'; import { Error } from './burrow'; -import * as grpc from 'grpc'; +import * as grpc from '@grpc/grpc-js'; export type EventStream = grpc.ClientReadableStream; export class Events { - burrow: ExecutionEventsClient; - - constructor(burrow: ExecutionEventsClient) { - this.burrow = burrow; - } + + constructor(private burrow: IExecutionEventsClient) {} listen(query: string, callback: (err: Error, log: LogEvent) => void): EventStream { const start = new Bound(); @@ -35,10 +32,8 @@ export class Events { callback(null, event.getLog()); }); }); - stream.on('error', (err: Error) => + stream.on('error', (err: Error) => err.code === grpc.status.CANCELLED ? callback(null, null) : callback(err, null)); - stream.on('close', () => callback(null, null)); - stream.on('end', () => callback(null, null)); return stream; } @@ -46,4 +41,4 @@ export class Events { const filter = "EventType = 'LogEvent' AND Address = '" + address.toUpperCase() + "'" + " AND Log0 = '" + signature.toUpperCase() + "'"; return this.listen(filter, callback); } -} \ No newline at end of file +} diff --git a/js/src/lib/namereg.ts b/js/src/lib/namereg.ts index e5e375f53..4bb92f543 100644 --- a/js/src/lib/namereg.ts +++ b/js/src/lib/namereg.ts @@ -1,21 +1,17 @@ -import { QueryClient } from '../../proto/rpcquery_grpc_pb'; -import { GetNameParam } from '../../proto/rpcquery_pb'; -import { Entry } from '../../proto/names_pb'; -import { TransactClient } from '../../proto/rpctransact_grpc_pb'; -import { TxInput, NameTx } from '../../proto/payload_pb'; -import { TxExecution } from '../../proto/exec_pb'; -import * as grpc from 'grpc'; +import {IQueryClient} from '../../proto/rpcquery_grpc_pb'; +import {GetNameParam} from '../../proto/rpcquery_pb'; +import {Entry} from '../../proto/names_pb'; +import {ITransactClient} from '../../proto/rpctransact_grpc_pb'; +import {TxInput, NameTx} from '../../proto/payload_pb'; +import {TxExecution} from '../../proto/exec_pb'; +import * as grpc from '@grpc/grpc-js'; export class Namereg { - burrow: TransactClient & QueryClient; - account: string; - constructor(burrow: TransactClient & QueryClient, account: string) { - this.burrow = burrow; - this.account = account; + constructor(private transact: ITransactClient, private query: IQueryClient, private account: string) { } - set(name: string, data: string, lease = 50000, fee = 5000, callback: grpc.requestCallback) { + set(name: string, data: string, lease = 50000, fee = 5000): Promise { const input = new TxInput(); input.setAddress(Buffer.from(this.account, 'hex')); input.setAmount(lease); @@ -26,12 +22,26 @@ export class Namereg { payload.setData(data); payload.setFee(fee); - return this.burrow.nameTxSync(payload, callback); + return new Promise((resolve, reject) => { + this.transact.nameTxSync(payload, (err, txe) => { + if (err) { + reject(err) + } + resolve(txe) + }); + }) } - get(name: string, callback: grpc.requestCallback) { + get(name: string): Promise { const payload = new GetNameParam(); payload.setName(name); - return this.burrow.getName(payload, callback) + return new Promise((resolve, reject) => { + this.query.getName(payload, (err, entry) => { + if (err) { + reject(err) + } + resolve(entry) + }) + }) } -} \ No newline at end of file +} diff --git a/js/src/lib/pipe.ts b/js/src/lib/pipe.ts index acc3aaedf..83a751fdf 100644 --- a/js/src/lib/pipe.ts +++ b/js/src/lib/pipe.ts @@ -1,17 +1,18 @@ -import { TransactClient } from '../../proto/rpctransact_grpc_pb'; +import {ServiceError} from "@grpc/grpc-js"; +import { ITransactClient } from '../../proto/rpctransact_grpc_pb'; import { CallTx } from '../../proto/payload_pb'; import { TxExecution } from '../../proto/exec_pb'; import { Events } from './events'; import { LogEvent } from '../../proto/exec_pb'; -import * as grpc from 'grpc'; +import * as grpc from '@grpc/grpc-js'; export type TxCallback = grpc.requestCallback; export class Pipe { - burrow: TransactClient; + burrow: ITransactClient; events: Events; - constructor(burrow: TransactClient, events: Events) { + constructor(burrow: ITransactClient, events: Events) { this.burrow = burrow; this.events = events; } @@ -24,7 +25,7 @@ export class Pipe { this.burrow.callTxSim(payload, callback) } - eventSub(accountAddress: string, signature: string, callback: (err: Error, log: LogEvent) => void) { + eventSub(accountAddress: string, signature: string, callback: (err: ServiceError, log: LogEvent) => void) { return this.events.subContractEvents(accountAddress, signature, callback) } } diff --git a/js/src/test.ts b/js/src/test.ts index 246912bec..0b70415f7 100644 --- a/js/src/test.ts +++ b/js/src/test.ts @@ -1,31 +1,20 @@ -import { Burrow } from './index'; +import {Burrow} from './index'; import * as solc from 'solc'; // convenience function to compile solidity in tests export const compile = (source: string, name: string) => { - let desc: solc.InputDescription = { language: 'Solidity', sources: {} }; - desc.sources[name] = { content: source }; - desc.settings = { outputSelection: { '*': { '*': ['*'] }}}; + let desc: solc.InputDescription = {language: 'Solidity', sources: {}}; + desc.sources[name] = {content: source}; + desc.settings = {outputSelection: {'*': {'*': ['*']}}}; - const compiled: solc.OutputDescription = JSON.parse(solc.compile(JSON.stringify(desc))); + const json = solc.compile(JSON.stringify(desc)); + const compiled: solc.OutputDescription = JSON.parse(json); if (compiled.errors) throw new Error(compiled.errors.map(err => err.formattedMessage).toString()); const contract = compiled.contracts[name][name]; - return { abi: contract.abi, bytecode: contract.evm.bytecode.object }; + return {abi: contract.abi, code: {bytecode: contract.evm.bytecode.object, deployedBytecode: contract.evm.deployedBytecode.object} }; } -// contract manager test harness -export const Test = () => { - let burrow: Burrow; +const url = process.env.BURROW_URL || 'localhost:20997'; +const addr = process.env.SIGNING_ADDRESS || 'C9F239591C593CB8EE192B0009C6A0F2C9F8D768'; +export const burrow = new Burrow(url, addr); - return { - before: (callback?: (app: Burrow) => void) => () => { - const url = process.env.BURROW_URL || 'localhost:10997'; - const addr = process.env.SIGNING_ADDRESS; - if (!addr) throw new Error("SIGNING_ADDRESS not set."); - burrow = new Burrow(url, addr); - if (callback) return callback(burrow); - }, - it: (callback: (app: Burrow) => void) => () => callback(burrow), - after: () => () => {}, - } -} \ No newline at end of file diff --git a/js/src/test/175.test.ts b/js/src/test/175.test.ts index efb5fc274..c2ed9314c 100644 --- a/js/src/test/175.test.ts +++ b/js/src/test/175.test.ts @@ -1,15 +1,7 @@ import * as assert from 'assert'; -import * as test from '../test'; +import {burrow, compile} from '../test'; -const Test = test.Test(); - -describe('#175', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('#175', Test.it(function (burrow) { +describe('#175', function () {it('#175', async () => { const source = ` pragma solidity >=0.0.0; contract Contract { @@ -25,8 +17,8 @@ describe('#175', function () { var contract let A2 - const {abi, bytecode} = test.compile(source, 'Contract') - return burrow.contracts.deploy(abi, bytecode, null, 'contract1').then((C) => { + const {abi, code} = compile(source, 'Contract') + return burrow.contracts.deploy(abi, code, null, 'contract1').then((C) => { contract = C return contract._constructor('contract2') }).then((address) => { @@ -35,8 +27,8 @@ describe('#175', function () { [contract.getName(), // Note using the default address from the deploy contract.getName.at(A2)]) // Using the .at() to specify the second deployed contract }).then(([result1, result2]) => { - assert.equal(result1[0], 'contract1') - assert.equal(result2[0], 'contract2') + assert.strictEqual(result1[0], 'contract1') + assert.strictEqual(result2[0], 'contract2') }) - })) + }) }) diff --git a/js/src/test/38.test.ts b/js/src/test/38.test.ts deleted file mode 100644 index 930895166..000000000 --- a/js/src/test/38.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import * as assert from 'assert'; -import * as test from '../test'; -import { Contract } from '..'; - -const Test = test.Test(); - -describe('#38', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('#38', Test.it((burrow) => { - const source = ` - pragma solidity >=0.0.0; - contract Contract { - event Event(); - - function announce() public { - emit Event(); - } - } - ` - const {abi, bytecode} = test.compile(source, 'Contract') - return burrow.contracts.deploy(abi, bytecode).then((contract) => { - const secondContract: any = new Contract(abi, null, contract.address, burrow) - - return new Promise((resolve, reject) => { - const stream = secondContract.Event.at(contract.address, function (error, event) { - if (error) { - reject(error) - } else { - stream.cancel() - resolve(event) - } - }) - - secondContract.announce() - }) - }) - })) -}) diff --git a/js/src/test/42.test.ts b/js/src/test/42.test.ts deleted file mode 100644 index aae5971f8..000000000 --- a/js/src/test/42.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import * as assert from 'assert'; -import * as test from '../test'; - -const Test = test.Test(); - -describe('#42', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('#42', Test.it(function (burrow) { - const source = ` - pragma solidity >=0.0.0; - contract Test { - - function getAddress() public view returns (address) { - return address(this); - } - - function getNumber() public pure returns (uint) { - return 100; - } - - function getCombination() public view returns (uint _number, address _address, string memory _saying, bytes32 _randomBytes) { - _number = 100; - _address = address(this); - _saying = "hello moto"; - _randomBytes = bytes32(uint256(0xDEADBEEFFEEDFACE)); - } - - } - ` - let address: string; - const {abi, bytecode} = test.compile(source, 'Test') - return burrow.contracts.deploy(abi, bytecode, {call: function (result) { return {values: result.values, raw: result.raw} }}).then((contract: any) => { - address = contract.address - return contract.getCombination() - }).then((returnObject) => { - const expected = { - values: { - _number: 100, - _address: address, - _saying: 'hello moto', - _randomBytes: '000000000000000000000000000000000000000000000000DEADBEEFFEEDFACE' - }, - raw: [100, address, 'hello moto', '000000000000000000000000000000000000000000000000DEADBEEFFEEDFACE'] - } - assert.deepEqual(returnObject, expected) - }) - })) -}) diff --git a/js/src/test/44.test.ts b/js/src/test/44.test.ts index 3b6b0d0d5..b22fd9679 100644 --- a/js/src/test/44.test.ts +++ b/js/src/test/44.test.ts @@ -1,15 +1,8 @@ import * as assert from 'assert'; -import * as test from '../test'; - -const Test = test.Test(); +import {burrow, compile} from "../test"; describe('#44', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(60 * 1000) - - it('#44', Test.it(async (burrow) => { + it('#44', async () => { const source = ` pragma solidity >=0.0.0; contract SimpleStorage { @@ -24,11 +17,11 @@ describe('#44', function () { } } ` - const {abi, bytecode} = test.compile(source, 'SimpleStorage'); - const contract: any = await burrow.contracts.deploy(abi, bytecode); + const {abi, code} = compile(source, 'SimpleStorage'); + const contract: any = await burrow.contracts.deploy(abi, code); await contract.set('88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F'); const data = await contract.get(); - assert.equal(data, '88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F'); - })) + assert.deepStrictEqual(data,[ '88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F']); + }) }) diff --git a/js/src/test/45.test.ts b/js/src/test/45.test.ts index 236812cde..c06f274e4 100644 --- a/js/src/test/45.test.ts +++ b/js/src/test/45.test.ts @@ -1,15 +1,9 @@ import * as assert from 'assert'; -import * as test from '../test'; - -const Test = test.Test(); +import {burrow, compile} from '../test'; describe('#45', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - it('nottherealbatman', Test.it(function (burrow) { + it('nottherealbatman', async () => { const source = ` pragma solidity >=0.0.0; contract Test { @@ -28,16 +22,16 @@ describe('#45', function () { } } ` - const {abi, bytecode} = test.compile(source, 'Test') - return burrow.contracts.deploy(abi, bytecode).then((contract: any) => + const {abi, code} = compile(source, 'Test') + return burrow.contracts.deploy(abi, code).then((contract: any) => contract.setName('Batman') .then(() => contract.getName()) ).then((value) => { - assert.equal(value, 'Batman') + assert.deepStrictEqual(value, ['Batman']) }) - })) + }) - it('rguikers', Test.it(function (burrow) { + it('rguikers', async () => { const source = ` pragma solidity >=0.0.0; contract Test { @@ -53,13 +47,13 @@ describe('#45', function () { } ` - const {abi, bytecode} = test.compile(source, 'Test') - return burrow.contracts.deploy(abi, bytecode).then((contract: any) => + const {abi, code} = compile(source, 'Test') + return burrow.contracts.deploy(abi, code).then((contract: any) => Promise.all([contract.getAddress(), contract.getNumber()]) .then(([address, number]) => { - assert.equal(address[0].length, 40) - assert.equal(number[0], 100) + assert.strictEqual(address[0].length, 40) + assert.strictEqual(number[0], 100) }) ) - })) + }) }) diff --git a/js/src/test/46.test.ts b/js/src/test/46.test.ts index 115e0ec75..0154fdc84 100644 --- a/js/src/test/46.test.ts +++ b/js/src/test/46.test.ts @@ -1,15 +1,7 @@ import * as assert from 'assert'; -import * as test from '../test'; +import {burrow, compile} from '../test'; -const Test = test.Test(); - -describe('#46', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('#46', Test.it(function (burrow) { +describe('#46', function () {it('#46', async () => { const source = ` pragma solidity >=0.0.0; contract Test{ @@ -30,12 +22,12 @@ describe('#46', function () { } ` - const {abi, bytecode} = test.compile(source, 'Test') - return burrow.contracts.deploy(abi, bytecode) + const {abi, code} = compile(source, 'Test') + return burrow.contracts.deploy(abi, code) .then((contract: any) => contract.setName('Batman') .then(() => Promise.all([contract.getNameConstant(), contract.getName()]))) .then(([constant, nonConstant]) => { - assert.equal(constant[0], nonConstant[0]) + assert.strictEqual(constant[0], nonConstant[0]) }) - })) + }) }) diff --git a/js/src/test/47.test.ts b/js/src/test/47.test.ts index eaaaba739..cf38fbae9 100644 --- a/js/src/test/47.test.ts +++ b/js/src/test/47.test.ts @@ -1,15 +1,7 @@ import * as assert from 'assert'; -import * as test from '../test'; +import {burrow, compile} from '../test'; -const Test = test.Test(); - -describe('#47', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('#47', Test.it(function (burrow) { +describe('#47', function () {it('#47', async () => { const source = ` pragma solidity >=0.0.0; contract Test{ @@ -25,12 +17,12 @@ describe('#47', function () { } } ` - const {abi, bytecode} = test.compile(source, 'Test') - return burrow.contracts.deploy(abi, bytecode) + const {abi, code} = compile(source, 'Test') + return burrow.contracts.deploy(abi, code) .then((contract: any) => Promise.all([contract.getWithSpaceConstant(), contract.getWithoutSpaceConstant()])) .then(([withSpace, withoutSpace]) => { - assert.equal(withSpace, ' Pieter') - assert.equal(withoutSpace, 'Pieter') + assert.deepStrictEqual(withSpace, [' Pieter']) + assert.deepStrictEqual(withoutSpace, ['Pieter']) }) - })) + }) }) diff --git a/js/src/test/48.test.ts b/js/src/test/48.test.ts index 10a1612d7..06f974c25 100644 --- a/js/src/test/48.test.ts +++ b/js/src/test/48.test.ts @@ -1,15 +1,7 @@ import * as assert from 'assert'; -import * as test from '../test'; +import {burrow, compile} from '../test'; -const Test = test.Test(); - -describe('#48', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('#48', Test.it(function (burrow) { +describe('#48', function () {it('#48', async () => { const source = ` pragma solidity >=0.0.0; contract Test { @@ -29,12 +21,12 @@ describe('#48', function () { } ` - const {abi, bytecode} = test.compile(source, 'Test') - return burrow.contracts.deploy(abi, bytecode) + const {abi, code} = compile(source, 'Test') + return burrow.contracts.deploy(abi, code) .then((contract: any) => contract.getCombination()) .then(([number, address]) => { - assert.equal(number, 100) - assert.equal(address.length, 40) + assert.strictEqual(number, 100) + assert.strictEqual(address.length, 40) }) - })) + }) }) diff --git a/js/src/test/50.test.ts b/js/src/test/50.test.ts index f69113006..d7d692545 100644 --- a/js/src/test/50.test.ts +++ b/js/src/test/50.test.ts @@ -1,15 +1,7 @@ import * as assert from 'assert'; -import * as test from '../test'; +import {burrow, compile} from '../test'; -const Test = test.Test(); - -describe('#50', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('#50', Test.it(function (burrow) { +describe('#50', function () {it('#50', async () => { const source = ` pragma solidity >=0.0.0; contract SimpleStorage { @@ -24,12 +16,12 @@ describe('#50', function () { } } ` - const {abi, bytecode} = test.compile(source, 'SimpleStorage') - return burrow.contracts.deploy(abi, bytecode) + const {abi, code} = compile(source, 'SimpleStorage') + return burrow.contracts.deploy(abi, code) .then((contract: any) => contract.set(42) .then(() => contract.get.call()) ).then((value) => { - assert.equal(value, 42) + assert.deepStrictEqual(value, [42]) }) - })) + }) }) diff --git a/js/src/test/61.test.ts b/js/src/test/61.test.ts index a0c759a25..6cfa28c39 100644 --- a/js/src/test/61.test.ts +++ b/js/src/test/61.test.ts @@ -1,15 +1,7 @@ import * as assert from 'assert'; -import * as test from '../test'; +import {burrow, compile} from '../test'; -const Test = test.Test(); - -describe('#61', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('#61', Test.it(function (burrow) { +describe('#61', function () {it('#61', async () => { const source = ` pragma solidity >=0.0.0; contract SimpleStorage { @@ -24,11 +16,11 @@ describe('#61', function () { } } ` - const {abi, bytecode} = test.compile(source, 'SimpleStorage') - return burrow.contracts.deploy(abi, bytecode, null, '88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F') + const {abi, code} = compile(source, 'SimpleStorage') + return burrow.contracts.deploy(abi, code, null, '88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F') .then((contract: any) => contract.get()) .then((value) => { - assert.equal(value, '88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F') + assert.deepStrictEqual(value, ['88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F']) }) - })) + }) }) diff --git a/js/src/test/81.test.ts b/js/src/test/81.test.ts index 6afa8abf7..41f59941b 100644 --- a/js/src/test/81.test.ts +++ b/js/src/test/81.test.ts @@ -1,16 +1,10 @@ import * as assert from 'assert'; -import * as test from '../test'; +import {burrow, compile} from '../test'; -const Test = test.Test(); +describe('Event listening', function () { -describe('#81', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('listens to an event from a contract', Test.it(function (burrow) { - const source = ` + it('listens to an event from a contract', async () => { + const source = ` pragma solidity >=0.0.0; contract Contract { event Pay( @@ -37,48 +31,40 @@ describe('#81', function () { } ` - const {abi, bytecode} = test.compile(source, 'Contract') - return burrow.contracts.deploy(abi, bytecode) - .then((contract: any) => { - return new Promise((resolve, reject) => { - const stream = contract.Pay((error, result) => { - if (error) { - reject(error) - } else { - try { - const actual = Object.assign( - {}, - result.args, - {amount: Number(result.args.amount)} - ) - - assert.deepEqual( - actual, - { - originator: '88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F', - beneficiary: '721584FA4F1B9F51950018073A8E5ECF47F2D3B8', - amount: 1, + const {abi, code} = compile(source, 'Contract') + const contract: any = await burrow.contracts.deploy(abi, code) + const stream = contract.Pay((error, result) => { + if (error) { + throw error; + } else { + const actual = Object.assign( + {}, + result.args, + {amount: Number(result.args.amount)} + ) - servicename: 'Energy', + assert.deepStrictEqual( + actual, + { + originator: '88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F', + beneficiary: '721584FA4F1B9F51950018073A8E5ECF47F2D3B8', + amount: 1, - nickname: 'wasmachine', + servicename: 'Energy', - providername: 'Eneco', + nickname: 'wasmachine', - randomBytes: '000000000000000000000000000000000000000000000000DEADFEEDBEEFFACE' - } - ) - } catch (exception) { - reject(exception) - } + providername: 'Eneco', - stream.cancel() - resolve() + randomBytes: '000000000000000000000000000000000000000000000000DEADFEEDBEEFFACE' } - }) + ) + + stream.cancel() + } + }); + + contract.announce() + }) +}); - contract.announce() - }) - }) - })) -}) diff --git a/js/src/test/README.md b/js/src/test/README.md index c5a73b703..1dc989cd6 100644 --- a/js/src/test/README.md +++ b/js/src/test/README.md @@ -51,7 +51,7 @@ after(function () { it(`description of the test`, function () { // Compute results. - assert.equal(results, expectations) + assert.strictEqual(results, expectations) }) ``` @@ -67,12 +67,8 @@ const test = require('../../lib/test') const vector = test.Vector() describe('HTTP', function () { - before(vector.before(__dirname, {protocol: 'http:'})) - after(vector.after()) - - this.timeout(10 * 1000) - - it('sets and gets a value from a contract', vector.it(function (manager) { + before(vector.before(__dirname, {protocol: 'http:'}) + after(vector.after())it('sets and gets a value from a contract', vector.it(function (manager) { const source = ` contract SimpleStorage { uint storedData; @@ -87,7 +83,7 @@ describe('HTTP', function () { } ` - return test.compile(manager, source, 'SimpleStorage').then((contract) => + return compile(manager, source, 'SimpleStorage').then((contract) => Promise.fromCallback((callback) => contract.set(42, callback) ).then(() => @@ -96,9 +92,9 @@ describe('HTTP', function () { ) ) ).then((value) => { - assert.equal(value, 42) + assert.strictEqual(value, 42) }) - })) + }) }) ``` @@ -111,17 +107,17 @@ Tests written like this can then be used by the following commands: To test the library against pre-recorded vectors: ``` -npm test +yarn test ``` To test the library against Burrow while automatically recording vectors: ``` -TEST=record npm test +TEST=record yarn test ``` To test Burrow against pre-recorded vectors without exercising the client: ``` -TEST=server npm test +TEST=server yarn test ``` diff --git a/js/src/test/abi/abis.test.ts b/js/src/test/abi/abis.test.ts deleted file mode 100644 index 16e2b87e5..000000000 --- a/js/src/test/abi/abis.test.ts +++ /dev/null @@ -1,29 +0,0 @@ -import * as assert from 'assert'; -import * as test from '../../test'; - -const Test = test.Test(); - -describe('Abi', function () { - this.timeout(10 * 1000) - let burrow - - before(Test.before(function (_burrow) { - burrow = _burrow - })) - - after(Test.after()) - - it('Call contract via burrow side Abi', Test.it(function () { - return burrow.namereg.get('random') - .then((data) => { - let address = data.Data - return burrow.contracts.address(address) - }) - .then((contract) => { - return contract.getRandomNumber() - }) - .then((data) => { - assert.equal(data[0], 55) - }) - })) -}) diff --git a/js/src/test/abi/deploy.yaml b/js/src/test/abi/deploy.yaml deleted file mode 100644 index 840ac0100..000000000 --- a/js/src/test/abi/deploy.yaml +++ /dev/null @@ -1,12 +0,0 @@ -jobs: - -- name: randomDeploy - deploy: - contract: random.sol - -- name: randomRegister - register: - name: random - data: $randomDeploy - amount: 5000 - fee: 2000 diff --git a/js/src/test/abi/random.sol b/js/src/test/abi/random.sol deleted file mode 100644 index 1a2aee261..000000000 --- a/js/src/test/abi/random.sol +++ /dev/null @@ -1,7 +0,0 @@ -pragma solidity >=0.0.0; - -contract random { - function getRandomNumber() public pure returns (uint) { - return 55; - } -} \ No newline at end of file diff --git a/js/src/test/abis.test.ts b/js/src/test/abis.test.ts new file mode 100644 index 000000000..72d066df9 --- /dev/null +++ b/js/src/test/abis.test.ts @@ -0,0 +1,27 @@ +import * as assert from 'assert'; +import {burrow, compile} from "../test"; + +describe('Abi', function () { + + const source = ` +pragma solidity >=0.0.0; + +contract random { + function getRandomNumber() public pure returns (uint) { + return 55; + } +} + ` + // TODO: understand why abi storage isn't working + it('Call contract via burrow side Abi', async () => { + const {abi, code} = compile(source, 'random') + const contractIn: any = await burrow.contracts.deploy(abi, code) + await burrow.namereg.set('random', contractIn.address) + const entry = await burrow.namereg.get('random') + const address = entry.getData(); + console.log(address) + const contractOut: any = await burrow.contracts.fromAddress(address) + const number = await contractOut.getRandomNumber() + assert.strictEqual(number[0], 55) + }) +}) diff --git a/js/src/test/contract-event.test.ts b/js/src/test/contract-event.test.ts new file mode 100644 index 000000000..622d68f4a --- /dev/null +++ b/js/src/test/contract-event.test.ts @@ -0,0 +1,29 @@ +import {Contract} from '..'; +import {burrow, compile} from "../test"; + +describe('Nested contract event emission', function () { + + it('#38', async () => { + const source = ` + pragma solidity >=0.0.0; + contract Contract { + event Event(); + + function announce() public { + emit Event(); + } + } + ` + const {abi, code} = compile(source, 'Contract') + const contract: any = await burrow.contracts.deploy(abi, code) + const secondContract: any = new Contract(abi, null, contract.address, burrow) + const stream = secondContract.Event.at(contract.address, function (error, event) { + if (error) { + throw error + } else { + stream.cancel() + } + secondContract.announce() + }) + }) +}) diff --git a/js/src/test/event.test.ts b/js/src/test/event.test.ts index b0b067e32..df2ff5734 100644 --- a/js/src/test/event.test.ts +++ b/js/src/test/event.test.ts @@ -1,15 +1,8 @@ import * as assert from 'assert'; -import * as test from '../test'; - -const Test = test.Test(); +import {burrow, compile} from '../test'; describe('event', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('listens to an event from a contract', Test.it(function (burrow) { + it('listens to an event from a contract', async () => { const source = ` pragma solidity >=0.0.0; contract Contract { @@ -22,34 +15,25 @@ describe('event', function () { } } ` - const {abi, bytecode} = test.compile(source, 'Contract') - return burrow.contracts.deploy(abi, bytecode) - .then((contract: any) => { - let count = 0; + const {abi, code} = compile(source, 'Contract') + const contract: any = await burrow.contracts.deploy(abi, code) + let count = 0; - return new Promise((resolve, reject) => { - const stream = contract.Event((error, event) => { - if (error) { - reject(error) - } else { - try { - assert.equal(event.args.from.length, 40) - } catch (exception) { - reject(exception) - } + const stream = contract.Event((error, event) => { + if (error) { + throw(error) + } else { + assert.strictEqual(event.args.from.length, 40) - count++ + count++ - if (count === 2) { - stream.cancel() - resolve() - } - } - }) + if (count === 2) { + stream.cancel() + } + } + }) - contract.announce() - contract.announce() - }) - }) - })) + contract.announce() + contract.announce() + }) }) diff --git a/js/src/test/functional.test.ts b/js/src/test/functional.test.ts index 8aed16271..12167619f 100644 --- a/js/src/test/functional.test.ts +++ b/js/src/test/functional.test.ts @@ -1,16 +1,8 @@ import * as assert from 'assert'; -import * as test from '../test'; +import {burrow, compile} from '../test'; import { Contract } from '..'; -const Test = test.Test(); - -describe('Functional Contract Usage', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('#Constructor usage', Test.it(function (burrow) { +describe('Functional Contract Usage', function () {it('#Constructor usage', async () => { const source = ` pragma solidity >=0.0.0; contract Test { @@ -37,20 +29,20 @@ describe('Functional Contract Usage', function () { } ` - const {abi, bytecode} = test.compile(source, 'Test') - const contract: any = new Contract(abi, bytecode, null, burrow) + const {abi, code} = compile(source, 'Test') + const contract: any = new Contract(abi, code, null, burrow) let A1 let A2 - assert.equal(contract.address, null) + assert.strictEqual(contract.address, null) // Use the _contructor method to creat two contracts return Promise.all( [contract._constructor('88977A37D05A4FE86D09E88C88A49C2FCF7D6D8F'), contract._constructor('ABCDEFABCDEFABCDEFABCDEFABCDEFABCDEF0123')]) .then(([address1, address2]) => { - assert.equal(contract.address, null) + assert.strictEqual(contract.address, null) A1 = address1 A2 = address2 @@ -64,5 +56,5 @@ describe('Functional Contract Usage', function () { assert.deepEqual(object1, expected1) assert.deepEqual(object2, expected2) }) - })) + }) }) diff --git a/js/src/test/get-set.test.ts b/js/src/test/get-set.test.ts new file mode 100644 index 000000000..439f4b2f9 --- /dev/null +++ b/js/src/test/get-set.test.ts @@ -0,0 +1,96 @@ +import * as assert from "assert"; +import {burrow, compile} from "../test"; + +describe('Setting and Getting Values:', function () { + const source = ` +pragma solidity >=0.0.0; + +contract GetSet { + + uint uintfield; + bytes32 bytesfield; + string stringfield; + bool boolfield; + + function testExist() public pure returns (uint output){ + return 1; + } + + function setUint(uint input) public { + uintfield = input; + return; + } + + function getUint() public view returns (uint output){ + output = uintfield; + return output; + } + + function setBytes(bytes32 input) public { + bytesfield = input; + return; + } + + function getBytes() public view returns (bytes32 output){ + output = bytesfield; + return output; + } + + function setString(string memory input) public { + stringfield = input; + return; + } + + function getString() public view returns (string memory output){ + output = stringfield; + return output; + } + + function setBool(bool input) public { + boolfield = input; + return; + } + + function getBool() public view returns (bool output){ + output = boolfield; + return output; + } +} +` + + const testUint = 42 + const testBytes = 'DEADBEEF00000000000000000000000000000000000000000000000000000000' + const testString = 'Hello World!' + const testBool = true + + let TestContract + + before(async () => { + const {abi, code} = compile(source, 'GetSet') + TestContract = await burrow.contracts.deploy(abi, code) + }) + + it('Uint', async () => { + await TestContract.setUint(testUint) + const output = await TestContract.getUint() + assert.strictEqual(output[0], testUint) + }) + + it('Bool', async () => { + await TestContract.setBool(testBool) + const output = await TestContract.getBool() + assert.strictEqual(output[0], testBool) + }) + + it('Bytes', async () => { + await TestContract.setBytes(testBytes) + const output = await TestContract.getBytes() + assert.strictEqual(output[0], testBytes) + }) + + it('String', async () => { + await TestContract.setString(testString) + const output = await TestContract.getString() + assert.strictEqual(output[0], testString) + }) +}) diff --git a/js/src/test/get_set_smoke_test/GetSet.sol b/js/src/test/get_set_smoke_test/GetSet.sol deleted file mode 100644 index a6d2e12d6..000000000 --- a/js/src/test/get_set_smoke_test/GetSet.sol +++ /dev/null @@ -1,54 +0,0 @@ -pragma solidity ^0.4.21; - -contract GetSet { - - uint uintfield; - bytes32 bytesfield; - string stringfield; - bool boolfield; - - function testExist() public pure returns (uint output){ - return 1; - } - - function setUint(uint input) public { - uintfield = input; - return; - } - - function getUint() public constant returns (uint output){ - output = uintfield; - return; - } - - function setBytes(bytes32 input) public { - bytesfield = input; - return; - } - - function getBytes() public constant returns (bytes32 output){ - output = bytesfield; - return; - } - - function setString(string input) public { - stringfield = input; - return; - } - - function getString() public constant returns (string output){ - output = stringfield; - return; - } - - function setBool(bool input) public { - boolfield = input; - return; - } - - function getBool() public constant returns (bool output){ - output = boolfield; - return; - } - -} \ No newline at end of file diff --git a/js/src/test/get_set_smoke_test/index.ts b/js/src/test/get_set_smoke_test/index.ts deleted file mode 100644 index c35d581bf..000000000 --- a/js/src/test/get_set_smoke_test/index.ts +++ /dev/null @@ -1,93 +0,0 @@ -export {}; -const path = require('path') -const assert = require('assert') -const fs = require('fs-extra') - -const test = require('../../lib/test') - -const Test = test.Test() - -const sourcePath = './GetSet.sol' - -const source = fs.readFileSync(path.join(__dirname, sourcePath)).toString() -const {abi, bytecode} = test.compile(source, ':GetSet') - -const testUint = 42 -const testBytes = 'DEADBEEF00000000000000000000000000000000000000000000000000000000' -const testString = 'Hello World!' -const testBool = true - -let TestContract - -// Create a factory for the contract with the JSON interface 'myAbi'. - -describe('Setting and Getting Values:', function () { - this.timeout(10 * 1000) - - before(Test.before((burrow) => { - return burrow.contracts.deploy(abi, bytecode).then((contract) => { - TestContract = contract - }) - })) - after(Test.after()) - - it('Uint', Test.it(function (burrow) { - return new Promise((resolve, reject) => { - TestContract.setUint(testUint, function (err) { - if (err) { reject(err) } - - TestContract.getUint(function (err, output) { - if (err) { reject(err) } - - assert.equal(output[0], testUint) - resolve() - }) - }) - }) - })) - - it('Bool', Test.it(function (burrow) { - return new Promise((resolve, reject) => { - TestContract.setBool(testBool, function (err) { - if (err) { reject(err) } - - TestContract.getBool(function (err, output) { - if (err) { reject(err) } - - assert.equal(output[0], testBool) - resolve() - }) - }) - }) - })) - - it('Bytes', Test.it(function (burrow) { - return new Promise((resolve, reject) => { - TestContract.setBytes(testBytes, function (err) { - if (err) { reject(err) } - - TestContract.getBytes(function (err, output) { - if (err) { reject(err) } - - assert.equal(output[0], testBytes) - resolve() - }) - }) - }) - })) - - it('String', Test.it(function (burrow) { - return new Promise((resolve, reject) => { - TestContract.setString(testString, function (err) { - if (err) { reject(err) } - - TestContract.getString(function (err, output) { - if (err) { reject(err) } - - assert.equal(output[0], testString) - resolve() - }) - }) - }) - })) -}) diff --git a/js/src/test/17.test.ts b/js/src/test/handler-overwriting.test.ts similarity index 69% rename from js/src/test/17.test.ts rename to js/src/test/handler-overwriting.test.ts index 84fa6fa39..a608a3c78 100644 --- a/js/src/test/17.test.ts +++ b/js/src/test/handler-overwriting.test.ts @@ -1,15 +1,11 @@ import * as assert from 'assert'; -import * as test from '../test'; +import {burrow, compile} from "../test"; -const Test = test.Test(); -describe('#17', function () { +describe('Testing Per-contract handler overwriting', function () { // {handlers: {call: function (result) { return {super: result.values, man: result.raw} }}}) - before(Test.before()) - after(Test.after()) - this.timeout(10 * 1000) - it('#17 Testing Per-contract handler overwriting', Test.it(async (burrow) => { + it('#17 Testing Per-contract handler overwriting', async () => { const source = ` pragma solidity >=0.0.0; contract Test { @@ -32,8 +28,12 @@ describe('#17', function () { } ` - const {abi, bytecode} = test.compile(source, 'Test') - const contract: any = await burrow.contracts.deploy(abi, bytecode, { call: function (result_1) { return { values: result_1.values, raw: result_1.raw }; } }); + const {abi, code} = compile(source, 'Test') + const contract: any = await burrow.contracts.deploy(abi, code, { + call: function (result_1) { + return {values: result_1.values, raw: result_1.raw}; + } + }); let address = contract.address; const returnObject = await contract.getCombination(); const expected = { @@ -45,6 +45,6 @@ describe('#17', function () { }, raw: [100, address, 'hello moto', '000000000000000000000000000000000000000000000000DEADBEEFFEEDFACE'] }; - assert.deepEqual(returnObject, expected); - })) + assert.deepStrictEqual(returnObject, expected); + }) }) diff --git a/js/src/test/infloop.test.ts b/js/src/test/infloop.test.ts index b71f6899b..a134b2f24 100644 --- a/js/src/test/infloop.test.ts +++ b/js/src/test/infloop.test.ts @@ -1,13 +1,11 @@ import * as assert from 'assert'; -import * as test from '../test'; - -const Test = test.Test(); +import {burrow, compile} from '../test'; describe.skip('Really Long Loop', function () { - this.timeout(10 * 1000) let contract + this.timeout(1000000) - before(Test.before(async function (burrow) { + before(async () => { const source = ` pragma solidity >=0.0.0; contract main { @@ -28,21 +26,17 @@ describe.skip('Really Long Loop', function () { } ` - const {abi, bytecode} = test.compile(source, 'main') - const c = await burrow.contracts.deploy(abi, bytecode); + const {abi, code} = compile(source, 'main') + const c = await burrow.contracts.deploy(abi, code.bytecode); contract = c; - })) - - after(Test.after()) + }) - it('It catches a revert when gas runs out', - Test.it(function () { - return contract.test() - .then((str) => { - throw new Error('Did not catch revert error') - }).catch((err) => { - assert.equal(err.message, 'ERR_EXECUTION_REVERT') - }) - }) - ) + it('It catches a revert when gas runs out', async () => { + return contract.test() + .then((str) => { + throw new Error('Did not catch revert error') + }).catch((err) => { + assert.strictEqual(err.message, 'ERR_EXECUTION_REVERT') + }) + }) }) diff --git a/js/src/test/21.test.ts b/js/src/test/memory-bytes.test.ts similarity index 58% rename from js/src/test/21.test.ts rename to js/src/test/memory-bytes.test.ts index 40e647cdb..658fb55b1 100644 --- a/js/src/test/21.test.ts +++ b/js/src/test/memory-bytes.test.ts @@ -1,13 +1,11 @@ import * as assert from 'assert'; -import * as test from '../test'; +import {burrow, compile} from "../test"; -const Test = test.Test(); describe('issue #21', function () { - this.timeout(10 * 1000); let contract: any; - before(Test.before(function (burrow) { + before(async () => { const source = ` pragma solidity >=0.0.0; contract c { @@ -29,30 +27,26 @@ describe('issue #21', function () { } ` - const {abi, bytecode} = test.compile(source, 'c') - return burrow.contracts.deploy(abi, bytecode).then((c) => { + const {abi, code} = compile(source, 'c') + return burrow.contracts.deploy(abi, code).then((c) => { contract = c }) - })) + }) - after(Test.after()) - - it('gets the static byte array decoded properly', Test.it(function () { + it('gets the static byte array decoded properly', async () => { return contract.getBytes() .then((bytes) => { - assert.deepEqual( + assert.deepStrictEqual( bytes, [['68', '65', '6C', '6C', '6F', '00', '00', '00', '00', 'FF']] ) }) - })) - - it('returns multiple values correctly from a function', - Test.it(function () { - return contract.deeper() - .then((values) => { - assert.equal(Number(values[1]), 42) - }) - }) - ) + }) + + it('returns multiple values correctly from a function', function () { + return contract.deeper() + .then((values) => { + assert.strictEqual(Number(values[1]), 42) + }) + }) }) diff --git a/js/src/test/namereg.test.ts b/js/src/test/namereg.test.ts index b2bc56d73..8f75d9a96 100644 --- a/js/src/test/namereg.test.ts +++ b/js/src/test/namereg.test.ts @@ -1,25 +1,13 @@ import * as assert from 'assert'; -import * as test from '../test'; -import { Burrow } from '..'; +import {burrow} from "../test"; -const Test = test.Test(); describe('Namereg', function () { this.timeout(10 * 1000) - let burrow: Burrow; - before(Test.before(function (_burrow) { - burrow = _burrow - })) - - after(Test.after()) - - it('Sets and gets a name correctly', Test.it(function () { - return burrow.namereg.set('DOUG', 'ABCDEF0123456789', 5000, 100, (err, exec) => { - - return burrow.namereg.get('DOUG', (err, exec) => { - assert.equal(exec.getData(), 'ABCDEF0123456789') - }) - }) - })); + it('Sets and gets a name correctly', async () => { + await burrow.namereg.set('DOUG', 'ABCDEF0123456789', 5000, 100) + const entry = await burrow.namereg.get('DOUG') + assert.strictEqual(entry.getData(), 'ABCDEF0123456789') + }); }) diff --git a/js/src/test/return-types.test.ts b/js/src/test/return-types.test.ts new file mode 100644 index 000000000..0fdc7c4d3 --- /dev/null +++ b/js/src/test/return-types.test.ts @@ -0,0 +1,45 @@ +import * as assert from 'assert'; +import {burrow, compile} from "../test"; + +describe('Multiple return types', function () { + it('#42', async () => { + const source = ` + pragma solidity >=0.0.0; + contract Test { + + function getAddress() public view returns (address) { + return address(this); + } + + function getNumber() public pure returns (uint) { + return 100; + } + + function getCombination() public view returns (uint _number, address _address, string memory _saying, bytes32 _randomBytes) { + _number = 100; + _address = address(this); + _saying = "hello moto"; + _randomBytes = bytes32(uint256(0xDEADBEEFFEEDFACE)); + } + + } + ` + const {abi, code} = compile(source, 'Test') + const contract: any = await burrow.contracts.deploy(abi, code, { + call: function (result) { + return {values: result.values, raw: result.raw} + } + }) + const expected = { + values: { + _number: 100, + _address: contract.address, + _saying: 'hello moto', + _randomBytes: '000000000000000000000000000000000000000000000000DEADBEEFFEEDFACE' + }, + raw: [100, contract.address, 'hello moto', '000000000000000000000000000000000000000000000000DEADBEEFFEEDFACE'] + } + const result = await contract.getCombination(); + assert.deepStrictEqual(result, expected) + }) +}) diff --git a/js/src/test/revert.test.ts b/js/src/test/revert.test.ts index 8a9bd4e74..c8a9e7412 100644 --- a/js/src/test/revert.test.ts +++ b/js/src/test/revert.test.ts @@ -1,14 +1,11 @@ import * as assert from 'assert'; -import * as test from '../test'; -import * as grpc from 'grpc'; - -const Test = test.Test(); +import {burrow, compile} from '../test'; +import * as grpc from '@grpc/grpc-js'; describe('REVERT constant', function () { - this.timeout(10 * 1000) let contract: any; - before(Test.before(function (burrow) { + before(async () => { const source = ` pragma solidity >=0.0.0; contract c { @@ -23,30 +20,26 @@ describe('REVERT constant', function () { } ` - const {abi, bytecode} = test.compile(source, 'c') - return burrow.contracts.deploy(abi, bytecode).then((c) => { - contract = c - }) - })) + const {abi, code} = compile(source, 'c') + contract = await burrow.contracts.deploy(abi, code) + }) - after(Test.after()) - it('gets the string when revert not called', Test.it(function () { + it('gets the string when revert not called', async () => { return contract.getString(42) .then((str) => { - assert.equal(str, 'secret') + assert.deepStrictEqual(str, ['secret']) }) - })) + }) it('It catches a revert with the revert string', - Test.it(function () { + async () => { return contract.getString(1) .then((str) => { throw new Error('Did not catch revert error') }).catch((err: grpc.ServiceError) => { - assert.equal(err.code, grpc.status.ABORTED) - assert.equal(err.message, 'Did not pass correct key') + assert.strictEqual(err.code, grpc.status.ABORTED) + assert.strictEqual(err.message, '10 ABORTED: Did not pass correct key') }) }) - ) }) diff --git a/js/src/test/revert2.test.ts b/js/src/test/revert2.test.ts index 15d22d2d3..f5ba86a81 100644 --- a/js/src/test/revert2.test.ts +++ b/js/src/test/revert2.test.ts @@ -1,14 +1,11 @@ import * as assert from 'assert'; -import * as test from '../test'; -import * as grpc from 'grpc'; - -const Test = test.Test(); +import {burrow, compile} from '../test'; +import * as grpc from '@grpc/grpc-js'; describe('REVERT non-constant', function () { - this.timeout(10 * 1000) let contract: any; - before(Test.before(function (burrow) { + before(async () => { const source = ` pragma solidity >=0.0.0; contract c { @@ -25,30 +22,27 @@ describe('REVERT non-constant', function () { } ` - const {abi, bytecode} = test.compile(source, 'c') - return burrow.contracts.deploy(abi, bytecode).then((c) => { + const {abi, code} = compile(source, 'c') + return burrow.contracts.deploy(abi, code).then((c) => { contract = c }) - })) - - after(Test.after()) + }) - it('gets the string when revert not called', Test.it(function () { + it('gets the string when revert not called', async () => { return contract.getString(42) .then((str) => { - assert.equal(str, 'secret') + assert.deepStrictEqual(str, ['secret']) }) - })) + }) it('It catches a revert with the revert string', - Test.it(function () { + async () => { return contract.getString(1) .then((str) => { throw new Error('Did not catch revert error') }).catch((err: grpc.ServiceError) => { - assert.equal(err.code, grpc.status.ABORTED) - assert.equal(err.message, 'Did not pass correct key') + assert.strictEqual(err.code, grpc.status.ABORTED) + assert.strictEqual(err.message, '10 ABORTED: Did not pass correct key') }) }) - ) }) diff --git a/js/src/test/revert3.test.ts b/js/src/test/revert3.test.ts index e72b91db3..1e5cc6752 100644 --- a/js/src/test/revert3.test.ts +++ b/js/src/test/revert3.test.ts @@ -1,14 +1,11 @@ import * as assert from 'assert'; -import * as test from '../test'; -import * as grpc from 'grpc'; - -const Test = test.Test(); +import {burrow, compile} from '../test'; +import * as grpc from '@grpc/grpc-js'; describe('REVERT non-constant', function () { - this.timeout(100 * 1000) let contract - before(Test.before(function (burrow) { + before(async () => { const source = ` pragma solidity >=0.0.0; contract c { @@ -25,22 +22,19 @@ describe('REVERT non-constant', function () { } ` - const {abi, bytecode} = test.compile(source, 'c') - return burrow.contracts.deploy(abi, bytecode).then((c) => { + const {abi, code} = compile(source, 'c') + return burrow.contracts.deploy(abi, code).then((c) => { contract = c }) - })) - - after(Test.after()) + }) it('It catches a revert with the revert string', - Test.it(function () { + async () => { return contract.getString(1) .then((str) => { throw new Error('Did not catch revert error') }).catch((err: grpc.ServiceError) => { - assert.equal(err.code, grpc.status.ABORTED) + assert.strictEqual(err.code, grpc.status.ABORTED) }) }) - ) }) diff --git a/js/src/test/http.test.ts b/js/src/test/simple-storage.test.ts similarity index 54% rename from js/src/test/http.test.ts rename to js/src/test/simple-storage.test.ts index e6e58b6f1..4e9bc9705 100644 --- a/js/src/test/http.test.ts +++ b/js/src/test/simple-storage.test.ts @@ -1,15 +1,8 @@ import * as assert from 'assert'; -import * as test from '../test'; +import {burrow, compile} from '../test'; -const Test = test.Test(); - -describe('HTTP', function () { - before(Test.before()) - after(Test.after()) - - this.timeout(10 * 1000) - - it('sets and gets a value from a contract', Test.it(function (burrow) { +describe('Simple storage', function () { + it('sets and gets a value from a contract', async () => { const source = ` pragma solidity >=0.0.0; contract SimpleStorage { @@ -24,12 +17,12 @@ describe('HTTP', function () { } } ` - const {abi, bytecode} = test.compile(source, 'SimpleStorage') - return burrow.contracts.deploy(abi, bytecode) + const {abi, code} = compile(source, 'SimpleStorage') + return burrow.contracts.deploy(abi, code) .then((contract: any) => contract.set(42) .then(() => contract.get()) ).then((value) => { - assert.equal(value, 42) + assert.deepStrictEqual(value, [42]) }) - })) + }) }) diff --git a/js/test.sh b/js/test.sh index c910b703b..3f91140f6 100755 --- a/js/test.sh +++ b/js/test.sh @@ -10,4 +10,5 @@ cd $this export SIGNING_ADDRESS="$key1_addr" export BURROW_URL="$BURROW_HOST:$BURROW_GRPC_PORT" -mocha -r ts-node/register "$1" \ No newline at end of file +mocha --bail --exit -r ts-node/register "$1" +test_exit=$? diff --git a/js/tsconfig.json b/js/tsconfig.json index 39c6681f0..a62723570 100644 --- a/js/tsconfig.json +++ b/js/tsconfig.json @@ -11,7 +11,6 @@ "exclude": [ "node_modules", "dist", - "proto", "types", "src/test/" ] diff --git a/js/types/solc/index.d.ts b/js/types/solc/index.d.ts index c657e0c2b..516d05c37 100644 --- a/js/types/solc/index.d.ts +++ b/js/types/solc/index.d.ts @@ -15,7 +15,7 @@ declare module 'solc' { inputs: Array anonymous: boolean }; - + export type FunctionInput = { name: string type: string @@ -32,11 +32,12 @@ declare module 'solc' { opcodes: string sourceMap: string } - + type Contract = { assembly: any evm: { bytecode: Bytecode + deployedBytecode: Bytecode } functionHashes: any gasEstimates: any @@ -46,7 +47,7 @@ declare module 'solc' { srcmap: string srcmapRuntime: string } - + type Source = { AST: any } @@ -71,7 +72,7 @@ declare module 'solc' { message: string formattedMessage?: string } - + export type OutputDescription = { contracts: Record> errors: Array @@ -80,4 +81,4 @@ declare module 'solc' { } export function compile(input: string): string; -} \ No newline at end of file +} diff --git a/js/yarn.lock b/js/yarn.lock new file mode 100644 index 000000000..a50cac908 --- /dev/null +++ b/js/yarn.lock @@ -0,0 +1,2904 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@grpc/grpc-js@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.0.2.tgz#31d0b1dd0d34ee55ad973384a59c73ac58fb5421" + integrity sha512-rcMwqOV7JWp+mzTO9eM8FEIFsxMs3PFABegsTioMkTVpBbhmuTNpgBzb5xlzhUGuNb45pgVF7j7OlUnJ4S7vfw== + dependencies: + semver "^6.2.0" + +"@types/bn.js@^4.11.3": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + +"@types/ethereumjs-abi@^0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@types/ethereumjs-abi/-/ethereumjs-abi-0.6.3.tgz#eb5ed09fd86b9e2b1c0eb75d1e9bc29c50715c86" + integrity sha512-DnHvqPkrJS5w4yZexTa5bdPNb8IyKPYciou0+zZCIg5fpzvGtyptTvshy0uZKzti2/k/markwjlxWRBWt7Mjuw== + dependencies: + "@types/node" "*" + +"@types/mocha@^7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-7.0.2.tgz#b17f16cf933597e10d6d78eae3251e692ce8b0ce" + integrity sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w== + +"@types/node@*": + version "13.13.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.2.tgz#160d82623610db590a64e8ca81784e11117e5a54" + integrity sha512-LB2R1Oyhpg8gu4SON/mfforE525+Hi/M1ineICEDftqNVTyFg1aRIeGuTvXAoWHc4nbrFncWtJgMmoyRvuGh7A== + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +ansi-bgblack@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-bgblack/-/ansi-bgblack-0.1.1.tgz#a68ba5007887701b6aafbe3fa0dadfdfa8ee3ca2" + integrity sha1-poulAHiHcBtqr74/oNrf36juPKI= + dependencies: + ansi-wrap "0.1.0" + +ansi-bgblue@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-bgblue/-/ansi-bgblue-0.1.1.tgz#67bdc04edc9b9b5278969da196dea3d75c8c3613" + integrity sha1-Z73ATtybm1J4lp2hlt6j11yMNhM= + dependencies: + ansi-wrap "0.1.0" + +ansi-bgcyan@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-bgcyan/-/ansi-bgcyan-0.1.1.tgz#58489425600bde9f5507068dd969ebfdb50fe768" + integrity sha1-WEiUJWAL3p9VBwaN2Wnr/bUP52g= + dependencies: + ansi-wrap "0.1.0" + +ansi-bggreen@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-bggreen/-/ansi-bggreen-0.1.1.tgz#4e3191248529943f4321e96bf131d1c13816af49" + integrity sha1-TjGRJIUplD9DIelr8THRwTgWr0k= + dependencies: + ansi-wrap "0.1.0" + +ansi-bgmagenta@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-bgmagenta/-/ansi-bgmagenta-0.1.1.tgz#9b28432c076eaa999418672a3efbe19391c2c7a1" + integrity sha1-myhDLAduqpmUGGcqPvvhk5HCx6E= + dependencies: + ansi-wrap "0.1.0" + +ansi-bgred@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-bgred/-/ansi-bgred-0.1.1.tgz#a76f92838382ba43290a6c1778424f984d6f1041" + integrity sha1-p2+Sg4OCukMpCmwXeEJPmE1vEEE= + dependencies: + ansi-wrap "0.1.0" + +ansi-bgwhite@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-bgwhite/-/ansi-bgwhite-0.1.1.tgz#6504651377a58a6ececd0331994e480258e11ba8" + integrity sha1-ZQRlE3elim7OzQMxmU5IAljhG6g= + dependencies: + ansi-wrap "0.1.0" + +ansi-bgyellow@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-bgyellow/-/ansi-bgyellow-0.1.1.tgz#c3fe2eb08cd476648029e6874d15a0b38f61d44f" + integrity sha1-w/4usIzUdmSAKeaHTRWgs49h1E8= + dependencies: + ansi-wrap "0.1.0" + +ansi-black@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-black/-/ansi-black-0.1.1.tgz#f6185e889360b2545a1ec50c0bf063fc43032453" + integrity sha1-9hheiJNgslRaHsUMC/Bj/EMDJFM= + dependencies: + ansi-wrap "0.1.0" + +ansi-blue@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-blue/-/ansi-blue-0.1.1.tgz#15b804990e92fc9ca8c5476ce8f699777c21edbf" + integrity sha1-FbgEmQ6S/JyoxUds6PaZd3wh7b8= + dependencies: + ansi-wrap "0.1.0" + +ansi-bold@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-bold/-/ansi-bold-0.1.1.tgz#3e63950af5acc2ae2e670e6f67deb115d1a5f505" + integrity sha1-PmOVCvWswq4uZw5vZ96xFdGl9QU= + dependencies: + ansi-wrap "0.1.0" + +ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== + +ansi-colors@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-0.2.0.tgz#72c31de2a0d9a2ccd0cac30cc9823eeb2f6434b5" + integrity sha1-csMd4qDZoszQysMMyYI+6y9kNLU= + dependencies: + ansi-bgblack "^0.1.1" + ansi-bgblue "^0.1.1" + ansi-bgcyan "^0.1.1" + ansi-bggreen "^0.1.1" + ansi-bgmagenta "^0.1.1" + ansi-bgred "^0.1.1" + ansi-bgwhite "^0.1.1" + ansi-bgyellow "^0.1.1" + ansi-black "^0.1.1" + ansi-blue "^0.1.1" + ansi-bold "^0.1.1" + ansi-cyan "^0.1.1" + ansi-dim "^0.1.1" + ansi-gray "^0.1.1" + ansi-green "^0.1.1" + ansi-grey "^0.1.1" + ansi-hidden "^0.1.1" + ansi-inverse "^0.1.1" + ansi-italic "^0.1.1" + ansi-magenta "^0.1.1" + ansi-red "^0.1.1" + ansi-reset "^0.1.1" + ansi-strikethrough "^0.1.1" + ansi-underline "^0.1.1" + ansi-white "^0.1.1" + ansi-yellow "^0.1.1" + lazy-cache "^2.0.1" + +ansi-cyan@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873" + integrity sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM= + dependencies: + ansi-wrap "0.1.0" + +ansi-dim@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-dim/-/ansi-dim-0.1.1.tgz#40de4c603aa8086d8e7a86b8ff998d5c36eefd6c" + integrity sha1-QN5MYDqoCG2Oeoa4/5mNXDbu/Ww= + dependencies: + ansi-wrap "0.1.0" + +ansi-gray@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" + integrity sha1-KWLPVOyXksSFEKPetSRDaGHvclE= + dependencies: + ansi-wrap "0.1.0" + +ansi-green@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-green/-/ansi-green-0.1.1.tgz#8a5d9a979e458d57c40e33580b37390b8e10d0f7" + integrity sha1-il2al55FjVfEDjNYCzc5C44Q0Pc= + dependencies: + ansi-wrap "0.1.0" + +ansi-grey@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-grey/-/ansi-grey-0.1.1.tgz#59d98b6ac2ba19f8a51798e9853fba78339a33c1" + integrity sha1-WdmLasK6GfilF5jphT+6eDOaM8E= + dependencies: + ansi-wrap "0.1.0" + +ansi-hidden@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-hidden/-/ansi-hidden-0.1.1.tgz#ed6a4c498d2bb7cbb289dbf2a8d1dcc8567fae0f" + integrity sha1-7WpMSY0rt8uyidvyqNHcyFZ/rg8= + dependencies: + ansi-wrap "0.1.0" + +ansi-inverse@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-inverse/-/ansi-inverse-0.1.1.tgz#b6af45826fe826bfb528a6c79885794355ccd269" + integrity sha1-tq9Fgm/oJr+1KKbHmIV5Q1XM0mk= + dependencies: + ansi-wrap "0.1.0" + +ansi-italic@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-italic/-/ansi-italic-0.1.1.tgz#104743463f625c142a036739cf85eda688986f23" + integrity sha1-EEdDRj9iXBQqA2c5z4XtpoiYbyM= + dependencies: + ansi-wrap "0.1.0" + +ansi-magenta@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-magenta/-/ansi-magenta-0.1.1.tgz#063b5ba16fb3f23e1cfda2b07c0a89de11e430ae" + integrity sha1-BjtboW+z8j4c/aKwfAqJ3hHkMK4= + dependencies: + ansi-wrap "0.1.0" + +ansi-red@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c" + integrity sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw= + dependencies: + ansi-wrap "0.1.0" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-reset@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-reset/-/ansi-reset-0.1.1.tgz#e7e71292c3c7ddcd4d62ef4a6c7c05980911c3b7" + integrity sha1-5+cSksPH3c1NYu9KbHwFmAkRw7c= + dependencies: + ansi-wrap "0.1.0" + +ansi-strikethrough@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-strikethrough/-/ansi-strikethrough-0.1.1.tgz#d84877140b2cff07d1c93ebce69904f68885e568" + integrity sha1-2Eh3FAss/wfRyT685pkE9oiF5Wg= + dependencies: + ansi-wrap "0.1.0" + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + +ansi-underline@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-underline/-/ansi-underline-0.1.1.tgz#dfc920f4c97b5977ea162df8ffb988308aaa71a4" + integrity sha1-38kg9Ml7WXfqFi34/7mIMIqqcaQ= + dependencies: + ansi-wrap "0.1.0" + +ansi-white@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-white/-/ansi-white-0.1.1.tgz#9c77b7c193c5ee992e6011d36ec4c921b4578944" + integrity sha1-nHe3wZPF7pkuYBHTbsTJIbRXiUQ= + dependencies: + ansi-wrap "0.1.0" + +ansi-wrap@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" + integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= + +ansi-yellow@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-yellow/-/ansi-yellow-0.1.1.tgz#cb9356f2f46c732f0e3199e6102955a77da83c1d" + integrity sha1-y5NW8vRscy8OMZnmEClVp32oPB0= + dependencies: + ansi-wrap "0.1.0" + +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^1.0.10, argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-sort@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-0.1.4.tgz#662855eaeb671b4188df4451b2f24a0753992b23" + integrity sha512-BNcM+RXxndPxiZ2rd76k6nyQLRZr2/B/sdi8pQ+Joafr5AH279L40dfokSUTp8O+AaqYjXWhblBWa2st2nc4fQ== + dependencies: + default-compare "^1.0.0" + get-value "^2.0.6" + kind-of "^5.0.2" + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +autolinker@~0.28.0: + version "0.28.1" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" + integrity sha1-BlK0kYgYefB3XazgzcoyM5QqTkc= + dependencies: + gulp-header "^1.7.1" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base64-js@^1.0.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +binary-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" + integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== + +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bip66@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" + integrity sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI= + dependencies: + safe-buffer "^5.0.1" + +bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.8, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + +bn.js@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.1.tgz#48efc4031a9c4041b9c99c6941d903463ab62eb5" + integrity sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserify-aes@^1.0.6: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + +buffer@5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.5.0.tgz#9c3caa3d623c33dd1c7ef584b89b88bf9c9bc1ce" + integrity sha512-9FTEDjLjwoAkEwyMGDjYJQN2gfRgOKBKRfiglhvibGbpeeU/pQn1bJxQqm32OD/AIeEuHxU9roxXxg34Byp/Ww== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chokidar@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +command-exists@^1.2.8: + version "1.2.9" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" + integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== + +commander@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== + +commander@~2.20.3: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-with-sourcemaps@*: + version "1.1.0" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" + integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== + dependencies: + source-map "^0.6.1" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +create-frame@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/create-frame/-/create-frame-1.0.0.tgz#8b95f2691e3249b6080443e33d0bad9f8f6975aa" + integrity sha1-i5XyaR4ySbYIBEPjPQutn49pdao= + dependencies: + define-property "^0.2.5" + extend-shallow "^2.0.1" + isobject "^3.0.0" + lazy-cache "^2.0.2" + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.4: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +date.js@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/date.js/-/date.js-0.3.3.tgz#ef1e92332f507a638795dbb985e951882e50bbda" + integrity sha512-HgigOS3h3k6HnW011nAb43c5xx5rBXk8P2v/WIT9Zv4koIaVXiH2BURguI78VVp+5Qc076T7OR378JViCnZtBw== + dependencies: + debug "~3.1.0" + +debug@3.2.6, debug@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +default-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" + integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== + dependencies: + kind-of "^5.0.2" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +drbg.js@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" + integrity sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs= + dependencies: + browserify-aes "^1.0.6" + create-hash "^1.1.2" + create-hmac "^1.1.4" + +elliptic@^6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" + integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +ent@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= + +error-symbol@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/error-symbol/-/error-symbol-0.1.0.tgz#0a4dae37d600d15a29ba453d8ef920f1844333f6" + integrity sha1-Ck2uN9YA0VopukU9jvkg8YRDM/Y= + +es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: + version "1.17.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" + integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.1.5" + is-regex "^1.0.5" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimleft "^2.1.1" + string.prototype.trimright "^2.1.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-util@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz#23ec79b2488a7d041242f01e25f24e5ad0357960" + integrity sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + ethjs-util "0.1.6" + keccak "^2.0.0" + rlp "^2.2.3" + secp256k1 "^3.0.1" + +ethjs-util@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + +evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +"falsey@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/falsey/-/falsey-0.3.2.tgz#b21c90c5c34660fc192bf909575db95b6880d597" + integrity sha512-lxEuefF5MBIVDmE6XeqCdM4BWk1+vYmGZtkbKZ/VFcg6uBBw6fXNEbWmxCjDdQlFc9hy450nkiWwM3VAW6G1qg== + dependencies: + kind-of "^5.0.2" + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +flat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" + integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== + dependencies: + is-buffer "~2.0.3" + +for-in@^1.0.1, for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +for-own@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" + integrity sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs= + dependencies: + for-in "^1.0.1" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + integrity sha1-mC1ok6+RjnLQjeyehnP/K1qNat0= + +fs-extra@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-object@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/get-object/-/get-object-0.2.0.tgz#d92ff7d5190c64530cda0543dac63a3d47fe8c0c" + integrity sha1-2S/31RkMZFMM2gVD2sY6PUf+jAw= + dependencies: + is-number "^2.0.2" + isobject "^0.2.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +glob-parent@~5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" + +glob@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.3: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +google-protobuf@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.5.0.tgz#b8cc63c74d83457bd8a9a904503c8efb26bca339" + integrity sha1-uMxjx02DRXvYqakEUDyO+ya8ozk= + +google-protobuf@^3.11.4: + version "3.11.4" + resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.11.4.tgz#598ca405a3cfa917a2132994d008b5932ef42014" + integrity sha512-lL6b04rDirurUBOgsY2+LalI6Evq8eH5TcNzi7TYQ3BsIWelT0KSOQSBsXuavEkNf+odQU6c0lgz3UsZXeNX9Q== + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +grpc-tools@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/grpc-tools/-/grpc-tools-1.8.1.tgz#8b2e8bf42028d94c85817d954685c46a7bfbc31a" + integrity sha512-CvZLshEDbum8ZtB8r3bn6JsrHs3L7S1jf7PTa02nZSLmcLTKbiXH5UYrte06Kh7SdzFmkxPMaOsys2rCs+HRjA== + dependencies: + node-pre-gyp "^0.12.0" + +grpc_tools_node_protoc_ts@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-3.0.0.tgz#02cf4bb7945b9c120f038447a2e2fa2164f2bef5" + integrity sha512-a4A3tadLwh5QGPlc31TSKAf40+HxFXh/nnW2driDBqAgVcMKkcZEVQpEnJJOU4lNqs2QwLFgPm9pUr/Hd+uv9g== + dependencies: + google-protobuf "3.5.0" + handlebars "4.7.4" + handlebars-helpers "0.10.0" + +gulp-header@^1.7.1: + version "1.8.12" + resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" + integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== + dependencies: + concat-with-sourcemaps "*" + lodash.template "^4.4.0" + through2 "^2.0.0" + +handlebars-helper-create-frame@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/handlebars-helper-create-frame/-/handlebars-helper-create-frame-0.1.0.tgz#8aa51d10aeb6408fcc6605d40d77356288487a03" + integrity sha1-iqUdEK62QI/MZgXUDXc1YohIegM= + dependencies: + create-frame "^1.0.0" + isobject "^3.0.0" + +handlebars-helpers@0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/handlebars-helpers/-/handlebars-helpers-0.10.0.tgz#663d49e718928eafbead1473419ed7bc24bcd45a" + integrity sha512-QiyhQz58u/DbuV41VnfpE0nhy6YCH4vB514ajysV8SoKmP+DxU+pR+fahVyNECHj+jiwEN2VrvxD/34/yHaLUg== + dependencies: + arr-flatten "^1.1.0" + array-sort "^0.1.4" + create-frame "^1.0.0" + define-property "^1.0.0" + "falsey" "^0.3.2" + for-in "^1.0.2" + for-own "^1.0.0" + get-object "^0.2.0" + get-value "^2.0.6" + handlebars "^4.0.11" + handlebars-helper-create-frame "^0.1.0" + handlebars-utils "^1.0.6" + has-value "^1.0.0" + helper-date "^1.0.1" + helper-markdown "^1.0.0" + helper-md "^0.2.2" + html-tag "^2.0.0" + is-even "^1.0.0" + is-glob "^4.0.0" + is-number "^4.0.0" + kind-of "^6.0.0" + lazy-cache "^2.0.2" + logging-helpers "^1.0.0" + micromatch "^3.1.4" + relative "^3.0.2" + striptags "^3.1.0" + to-gfm-code-block "^0.1.1" + year "^0.2.1" + +handlebars-utils@^1.0.2, handlebars-utils@^1.0.4, handlebars-utils@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/handlebars-utils/-/handlebars-utils-1.0.6.tgz#cb9db43362479054782d86ffe10f47abc76357f9" + integrity sha512-d5mmoQXdeEqSKMtQQZ9WkiUcO1E3tPbWxluCK9hVgIDPzQa9WsKo3Lbe/sGflTe7TomHEeZaOgwIkyIr1kfzkw== + dependencies: + kind-of "^6.0.0" + typeof-article "^0.1.1" + +handlebars@4.7.4: + version "4.7.4" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.4.tgz#902c579cc97b350bb4bc12e6cabd85b57dcd9975" + integrity sha512-Is8+SzHv8K9STNadlBVpVhxXrSXxVgTyIvhdg2Qjak1SfSZ7iEozLHdwiX1jJ9lLFkcFJxqGK5s/cI7ZX+qGkQ== + dependencies: + neo-async "^2.6.0" + source-map "^0.6.1" + yargs "^15.3.1" + optionalDependencies: + uglify-js "^3.1.4" + +handlebars@^4.0.11: + version "4.7.6" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" + integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-symbols@^1.0.0, has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +helper-date@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/helper-date/-/helper-date-1.0.1.tgz#12fedea3ad8e44a7ca4c4efb0ff4104a5120cffb" + integrity sha512-wU3VOwwTJvGr/w5rZr3cprPHO+hIhlblTJHD6aFBrKLuNbf4lAmkawd2iK3c6NbJEvY7HAmDpqjOFSI5/+Ey2w== + dependencies: + date.js "^0.3.1" + handlebars-utils "^1.0.4" + moment "^2.18.1" + +helper-markdown@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/helper-markdown/-/helper-markdown-1.0.0.tgz#ee7e9fc554675007d37eb90f7853b13ce74f3e10" + integrity sha512-AnDqMS4ejkQK0MXze7pA9TM3pu01ZY+XXsES6gEE0RmCGk5/NIfvTn0NmItfyDOjRAzyo9z6X7YHbHX4PzIvOA== + dependencies: + handlebars-utils "^1.0.2" + highlight.js "^9.12.0" + remarkable "^1.7.1" + +helper-md@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/helper-md/-/helper-md-0.2.2.tgz#c1f59d7e55bbae23362fd8a0e971607aec69d41f" + integrity sha1-wfWdflW7riM2L9ig6XFgeuxp1B8= + dependencies: + ent "^2.2.0" + extend-shallow "^2.0.1" + fs-exists-sync "^0.1.0" + remarkable "^1.6.2" + +highlight.js@^9.12.0: + version "9.18.1" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.1.tgz#ed21aa001fe6252bb10a3d76d47573c6539fe13c" + integrity sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg== + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +html-tag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/html-tag/-/html-tag-2.0.0.tgz#36c3bc8d816fd30b570d5764a497a641640c2fed" + integrity sha512-XxzooSo6oBoxBEUazgjdXj7VwTn/iSTSZzTYKzYY6I916tkaYzypHxy+pbVU1h+0UQ9JlVf5XkNQyxOAiiQO1g== + dependencies: + is-self-closing "^1.0.1" + kind-of "^6.0.0" + +iconv-lite@^0.4.4: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + +ignore-walk@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" + integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== + dependencies: + minimatch "^3.0.4" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +info-symbol@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/info-symbol/-/info-symbol-0.1.0.tgz#27841d72867ddb4242cd612d79c10633881c6a78" + integrity sha1-J4QdcoZ920JCzWEtecEGM4gcang= + +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-buffer@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" + integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== + +is-callable@^1.1.4, is-callable@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-even@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-even/-/is-even-1.0.0.tgz#76b5055fbad8d294a86b6a949015e1c97b717c06" + integrity sha1-drUFX7rY0pSoa2qUkBXhyXtxfAY= + dependencies: + is-odd "^0.1.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= + +is-number@^2.0.2: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-odd@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-0.1.2.tgz#bc573b5ce371ef2aad6e6f49799b72bef13978a7" + integrity sha1-vFc7XONx7yqtbm9JeZtyvvE5eKc= + dependencies: + is-number "^3.0.0" + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-regex@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== + dependencies: + has "^1.0.3" + +is-self-closing@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-self-closing/-/is-self-closing-1.0.1.tgz#5f406b527c7b12610176320338af0fa3896416e4" + integrity sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg== + dependencies: + self-closing-tags "^1.0.1" + +is-symbol@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-0.2.0.tgz#a3432192f39b910b5f02cc989487836ec70aa85e" + integrity sha1-o0MhkvObkQtfAsyYlIeDbscKqF4= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +js-sha3@0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +js-yaml@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= + optionalDependencies: + graceful-fs "^4.1.6" + +keccak@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-2.1.0.tgz#734ea53f2edcfd0f42cdb8d5f4c358fef052752b" + integrity sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q== + dependencies: + bindings "^1.5.0" + inherits "^2.0.4" + nan "^2.14.0" + safe-buffer "^5.2.0" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0, kind-of@^5.0.2: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= + optionalDependencies: + graceful-fs "^4.1.9" + +lazy-cache@^2.0.1, lazy-cache@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" + integrity sha1-uRkKT5EzVGlIQIWfio9whNiCImQ= + dependencies: + set-getter "^0.1.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= + +lodash.template@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + +lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + +log-ok@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/log-ok/-/log-ok-0.1.1.tgz#bea3dd36acd0b8a7240d78736b5b97c65444a334" + integrity sha1-vqPdNqzQuKckDXhza1uXxlREozQ= + dependencies: + ansi-green "^0.1.1" + success-symbol "^0.1.0" + +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +log-utils@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/log-utils/-/log-utils-0.2.1.tgz#a4c217a0dd9a50515d9b920206091ab3d4e031cf" + integrity sha1-pMIXoN2aUFFdm5ICBgkas9TgMc8= + dependencies: + ansi-colors "^0.2.0" + error-symbol "^0.1.0" + info-symbol "^0.1.0" + log-ok "^0.1.1" + success-symbol "^0.1.0" + time-stamp "^1.0.1" + warning-symbol "^0.1.0" + +logging-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/logging-helpers/-/logging-helpers-1.0.0.tgz#b5a37b32ad53eb0137c58c7898a47b175ddb7c36" + integrity sha512-qyIh2goLt1sOgQQrrIWuwkRjUx4NUcEqEGAcYqD8VOnOC6ItwkrVE8/tA4smGpjzyp4Svhc6RodDp9IO5ghpyA== + dependencies: + isobject "^3.0.0" + log-utils "^0.2.1" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= + +micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +minimatch@3.0.4, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.3.tgz#5a514b7179259287952881e94410ec5465659f8c" + integrity sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg== + dependencies: + minimist "^1.2.5" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mocha@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.1.tgz#89fbb30d09429845b1bb893a830bf5771049a441" + integrity sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + mkdirp "0.5.3" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + +moment@^2.18.1: + version "2.24.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" + integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +nan@^2.14.0: + version "2.14.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" + integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +needle@^2.2.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.1.tgz#14af48732463d7475696f937626b1b993247a56a" + integrity sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g== + dependencies: + debug "^3.2.6" + iconv-lite "^0.4.4" + sax "^1.2.4" + +neo-async@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + +node-environment-flags@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + +node-pre-gyp@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" + integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +nopt@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" + integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-bundled@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" + integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== + dependencies: + npm-normalize-package-bin "^1.0.1" + +npm-normalize-package-bin@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" + integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== + +npm-packlist@^1.1.6: + version "1.4.8" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" + integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-normalize-package-bin "^1.0.1" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-inspect@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.assign@4.1.0, object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.getownpropertydescriptors@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" + integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +picomatch@^2.0.4: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +readable-stream@^2.0.6, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== + dependencies: + picomatch "^2.0.4" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +relative@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/relative/-/relative-3.0.2.tgz#0dcd8ec54a5d35a3c15e104503d65375b5a5367f" + integrity sha1-Dc2OxUpdNaPBXhBFA9ZTdbWlNn8= + dependencies: + isobject "^2.0.0" + +remarkable@^1.6.2, remarkable@^1.7.1: + version "1.7.4" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" + integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== + dependencies: + argparse "^1.0.10" + autolinker "~0.28.0" + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-from-string@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +rimraf@^2.2.8, rimraf@^2.6.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.2.3: + version "2.2.4" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.4.tgz#d6b0e1659e9285fc509a5d169a9bd06f704951c1" + integrity sha512-fdq2yYCWpAQBhwkZv+Z8o/Z4sPmYm1CUq6P7n6lVTOdb949CnqA0sndXal5C1NleSVSZm6q5F3iEbauyVln/iw== + dependencies: + bn.js "^4.11.1" + +safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +secp256k1@^3.0.1: + version "3.8.0" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.8.0.tgz#28f59f4b01dbee9575f56a47034b7d2e3b3b352d" + integrity sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw== + dependencies: + bindings "^1.5.0" + bip66 "^1.1.5" + bn.js "^4.11.8" + create-hash "^1.2.0" + drbg.js "^1.0.1" + elliptic "^6.5.2" + nan "^2.14.0" + safe-buffer "^5.1.2" + +self-closing-tags@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/self-closing-tags/-/self-closing-tags-1.0.1.tgz#6c5fa497994bb826b484216916371accee490a5d" + integrity sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA== + +semver@^5.3.0, semver@^5.5.0, semver@^5.7.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.2.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-getter@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" + integrity sha1-12nBgsnVpR9AkUXy+6guXoboA3Y= + dependencies: + to-object-path "^0.3.0" + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +sha3@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/sha3/-/sha3-2.1.2.tgz#76f404e401d17ca1d23d8458a3790d57f0671bac" + integrity sha512-agYUtkzMsdFTQkM3ECyt6YW0552fyEb0tYZkl7olurS1Vg2Ms5+2SdF4VFPC1jnwtiXMb8b0fSyuAGZh+q2mAw== + dependencies: + buffer "5.5.0" + +signal-exit@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +solc@^0.6.1: + version "0.6.6" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.6.6.tgz#0d4b9c2e7105dd6015583f5e1c5ba6a35861ea71" + integrity sha512-p0IO/1fRaHWKN+qR+mUivpwnBpFYD8EoFAzT8VL4lmllNwsyEO7TJJAc2QK0XUeWOYOT92NWKhDNNNLTVbHShA== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.5.17: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trimend@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" + integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trimleft@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc" + integrity sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trimstart "^1.0.0" + +string.prototype.trimright@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz#c76f1cef30f21bbad8afeb8db1511496cfb0f2a3" + integrity sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trimend "^1.0.0" + +string.prototype.trimstart@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" + integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= + dependencies: + is-hex-prefixed "1.0.0" + +strip-json-comments@2.0.1, strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +striptags@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.1.1.tgz#c8c3e7fdd6fb4bb3a32a3b752e5b5e3e38093ebd" + integrity sha1-yMPn/db7S7OjKjt1LltePjgJPr0= + +success-symbol@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/success-symbol/-/success-symbol-0.1.0.tgz#24022e486f3bf1cdca094283b769c472d3b72897" + integrity sha1-JAIuSG878c3KCUKDt2nEctO3KJc= + +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== + dependencies: + has-flag "^3.0.0" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +tar@^4: + version "4.4.13" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.8.6" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" + +through2@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +time-stamp@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" + integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= + +tmp@0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-gfm-code-block@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/to-gfm-code-block/-/to-gfm-code-block-0.1.1.tgz#25d045a5fae553189e9637b590900da732d8aa82" + integrity sha1-JdBFpfrlUxielje1kJANpzLYqoI= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +ts-node@^8.6.2: + version "8.9.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.9.0.tgz#d7bf7272dcbecd3a2aa18bd0b96c7d2f270c15d4" + integrity sha512-rwkXfOs9zmoHrV8xE++dmNd6ZIS+nmHHCxcV53ekGJrxFLMbp+pizpPS07ARvhwneCIECPppOwbZHvw9sQtU4w== + dependencies: + arg "^4.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + +typeof-article@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/typeof-article/-/typeof-article-0.1.1.tgz#9f07e733c3fbb646ffa9e61c08debacd460e06af" + integrity sha1-nwfnM8P7tkb/qeYcCN66zUYOBq8= + dependencies: + kind-of "^3.1.0" + +typescript@^3.7.4: + version "3.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" + integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== + +uglify-js@^3.1.4: + version "3.9.1" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.1.tgz#a56a71c8caa2d36b5556cc1fd57df01ae3491539" + integrity sha512-JUPoL1jHsc9fOjVFHdQIhqEEJsQvfKDjlubcCilu8U26uZ73qOg8VsN8O1jbuei44ZPlwL7kmbAdM4tzaUvqnA== + dependencies: + commander "~2.20.3" + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +warning-symbol@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/warning-symbol/-/warning-symbol-0.1.0.tgz#bb31dd11b7a0f9d67ab2ed95f457b65825bbad21" + integrity sha1-uzHdEbeg+dZ6su2V9Fe2WCW7rSE= + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3, wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + +yallist@^3.0.0, yallist@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yargs-parser@13.1.2, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^18.1.1: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + dependencies: + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" + +yargs@13.3.2, yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yargs@^15.3.1: + version "15.3.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" + integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.1" + +year@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/year/-/year-0.2.1.tgz#4083ae520a318b23ec86037f3000cb892bdf9bb0" + integrity sha1-QIOuUgoxiyPshgN/MADLiSvfm7A= + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== From 80848d07383917ddda5f877f48e955e46e5d3fbc Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Sat, 25 Apr 2020 02:14:38 +0100 Subject: [PATCH 110/185] Regenerate protobuf files Signed-off-by: Silas Davis --- js/proto/acm_grpc_pb.d.ts | 1 - js/proto/acm_pb.d.ts | 204 +- js/proto/acm_pb.js | 189 +- js/proto/balance_grpc_pb.d.ts | 1 - js/proto/balance_pb.d.ts | 39 +- js/proto/balance_pb.js | 35 +- js/proto/bcm_grpc_pb.d.ts | 1 - js/proto/bcm_pb.d.ts | 166 +- js/proto/bcm_pb.js | 167 +- js/proto/crypto_grpc_pb.d.ts | 1 - js/proto/crypto_pb.d.ts | 145 +- js/proto/crypto_pb.js | 174 +- js/proto/dump_grpc_pb.d.ts | 1 - js/proto/dump_pb.d.ts | 246 +- js/proto/dump_pb.js | 310 +- js/proto/encoding_grpc_pb.d.ts | 1 - js/proto/encoding_pb.d.ts | 39 +- js/proto/encoding_pb.js | 35 +- js/proto/errors_grpc_pb.d.ts | 1 - js/proto/errors_pb.d.ts | 39 +- js/proto/errors_pb.js | 35 +- js/proto/exec_grpc_pb.d.ts | 1 - js/proto/exec_pb.d.ts | 1225 +++--- js/proto/exec_pb.js | 1722 +++----- .../gogo/protobuf/gogoproto/gogo_grpc_pb.d.ts | 1 - .../gogo/protobuf/gogoproto/gogo_pb.d.ts | 156 +- .../gogo/protobuf/gogoproto/gogo_pb.js | 1 - .../tendermint/abci/types/types_grpc_pb.d.ts | 253 +- .../tendermint/abci/types/types_grpc_pb.js | 4 +- .../tendermint/abci/types/types_pb.d.ts | 2144 ++++----- .../tendermint/abci/types/types_pb.js | 3120 +++++-------- .../tendermint/libs/common/types_grpc_pb.d.ts | 1 - .../tendermint/libs/common/types_pb.d.ts | 94 +- .../tendermint/libs/common/types_pb.js | 101 +- .../google/protobuf/descriptor_grpc_pb.d.ts | 1 - js/proto/google/protobuf/descriptor_pb.d.ts | 2325 +++++----- js/proto/google/protobuf/descriptor_pb.js | 3861 ++++++----------- .../google/protobuf/timestamp_grpc_pb.d.ts | 1 - js/proto/google/protobuf/timestamp_pb.d.ts | 39 +- js/proto/google/protobuf/timestamp_pb.js | 48 +- js/proto/keys_grpc_pb.d.ts | 252 +- js/proto/keys_grpc_pb.js | 4 +- js/proto/keys_pb.d.ts | 822 ++-- js/proto/keys_pb.js | 1428 +++--- js/proto/names_grpc_pb.d.ts | 1 - js/proto/names_pb.d.ts | 63 +- js/proto/names_pb.js | 49 +- js/proto/payload_grpc_pb.d.ts | 1 - js/proto/payload_pb.d.ts | 982 +++-- js/proto/payload_pb.js | 1424 +++--- js/proto/permission_grpc_pb.d.ts | 1 - js/proto/permission_pb.d.ts | 193 +- js/proto/permission_pb.js | 263 +- js/proto/registry_grpc_pb.d.ts | 1 - js/proto/registry_pb.d.ts | 67 +- js/proto/registry_pb.js | 49 +- js/proto/rpc_grpc_pb.d.ts | 1 - js/proto/rpc_pb.d.ts | 110 +- js/proto/rpc_pb.js | 101 +- js/proto/rpcdump_grpc_pb.d.ts | 38 +- js/proto/rpcdump_grpc_pb.js | 4 +- js/proto/rpcdump_pb.d.ts | 33 +- js/proto/rpcdump_pb.js | 28 +- js/proto/rpcevents_grpc_pb.d.ts | 77 +- js/proto/rpcevents_grpc_pb.js | 4 +- js/proto/rpcevents_pb.d.ts | 344 +- js/proto/rpcevents_pb.js | 546 +-- js/proto/rpcquery_grpc_pb.d.ts | 307 +- js/proto/rpcquery_grpc_pb.js | 4 +- js/proto/rpcquery_pb.d.ts | 724 ++-- js/proto/rpcquery_pb.js | 1337 +++--- js/proto/rpctransact_grpc_pb.d.ts | 273 +- js/proto/rpctransact_grpc_pb.js | 4 +- js/proto/rpctransact_pb.d.ts | 161 +- js/proto/rpctransact_pb.js | 198 +- js/proto/spec_grpc_pb.d.ts | 1 - js/proto/spec_pb.d.ts | 94 +- js/proto/spec_pb.js | 104 +- js/proto/storage_grpc_pb.d.ts | 1 - js/proto/storage_pb.d.ts | 43 +- js/proto/storage_pb.js | 35 +- js/proto/tendermint_grpc_pb.d.ts | 1 - js/proto/tendermint_pb.d.ts | 83 +- js/proto/tendermint_pb.js | 77 +- js/proto/txs_grpc_pb.d.ts | 1 - js/proto/txs_pb.d.ts | 196 +- js/proto/txs_pb.js | 219 +- js/proto/validator_grpc_pb.d.ts | 1 - js/proto/validator_pb.d.ts | 60 +- js/proto/validator_pb.js | 48 +- 90 files changed, 12482 insertions(+), 15304 deletions(-) delete mode 100644 js/proto/acm_grpc_pb.d.ts delete mode 100644 js/proto/balance_grpc_pb.d.ts delete mode 100644 js/proto/bcm_grpc_pb.d.ts delete mode 100644 js/proto/crypto_grpc_pb.d.ts delete mode 100644 js/proto/dump_grpc_pb.d.ts delete mode 100644 js/proto/encoding_grpc_pb.d.ts delete mode 100644 js/proto/errors_grpc_pb.d.ts delete mode 100644 js/proto/exec_grpc_pb.d.ts delete mode 100644 js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.d.ts delete mode 100644 js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.d.ts delete mode 100644 js/proto/google/protobuf/descriptor_grpc_pb.d.ts delete mode 100644 js/proto/google/protobuf/timestamp_grpc_pb.d.ts delete mode 100644 js/proto/names_grpc_pb.d.ts delete mode 100644 js/proto/payload_grpc_pb.d.ts delete mode 100644 js/proto/permission_grpc_pb.d.ts delete mode 100644 js/proto/registry_grpc_pb.d.ts delete mode 100644 js/proto/rpc_grpc_pb.d.ts delete mode 100644 js/proto/spec_grpc_pb.d.ts delete mode 100644 js/proto/storage_grpc_pb.d.ts delete mode 100644 js/proto/tendermint_grpc_pb.d.ts delete mode 100644 js/proto/txs_grpc_pb.d.ts delete mode 100644 js/proto/validator_grpc_pb.d.ts diff --git a/js/proto/acm_grpc_pb.d.ts b/js/proto/acm_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/acm_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/acm_pb.d.ts b/js/proto/acm_pb.d.ts index c5dff84aa..b4df0ca29 100644 --- a/js/proto/acm_pb.d.ts +++ b/js/proto/acm_pb.d.ts @@ -1,116 +1,122 @@ // package: acm // file: acm.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as permission_pb from "./permission_pb"; import * as crypto_pb from "./crypto_pb"; -export class Account extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; - - hasPublickey(): boolean; - clearPublickey(): void; - getPublickey(): crypto_pb.PublicKey | undefined; - setPublickey(value?: crypto_pb.PublicKey): void; - - getSequence(): number; - setSequence(value: number): void; - - getBalance(): number; - setBalance(value: number): void; - - getEvmcode(): Uint8Array | string; - getEvmcode_asU8(): Uint8Array; - getEvmcode_asB64(): string; - setEvmcode(value: Uint8Array | string): void; - - hasPermissions(): boolean; - clearPermissions(): void; - getPermissions(): permission_pb.AccountPermissions | undefined; - setPermissions(value?: permission_pb.AccountPermissions): void; - - getWasmcode(): Uint8Array | string; - getWasmcode_asU8(): Uint8Array; - getWasmcode_asB64(): string; - setWasmcode(value: Uint8Array | string): void; - - getNativename(): string; - setNativename(value: string): void; - - getCodehash(): Uint8Array | string; - getCodehash_asU8(): Uint8Array; - getCodehash_asB64(): string; - setCodehash(value: Uint8Array | string): void; - - clearContractmetaList(): void; - getContractmetaList(): Array; - setContractmetaList(value: Array): void; - addContractmeta(value?: ContractMeta, index?: number): ContractMeta; - - getForebear(): Uint8Array | string; - getForebear_asU8(): Uint8Array; - getForebear_asB64(): string; - setForebear(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Account.AsObject; - static toObject(includeInstance: boolean, msg: Account): Account.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Account, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Account; - static deserializeBinaryFromReader(message: Account, reader: jspb.BinaryReader): Account; +export class Account extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + + hasPublickey(): boolean; + clearPublickey(): void; + getPublickey(): crypto_pb.PublicKey | undefined; + setPublickey(value?: crypto_pb.PublicKey): void; + + getSequence(): number; + setSequence(value: number): void; + + getBalance(): number; + setBalance(value: number): void; + + getEvmcode(): Uint8Array | string; + getEvmcode_asU8(): Uint8Array; + getEvmcode_asB64(): string; + setEvmcode(value: Uint8Array | string): void; + + + hasPermissions(): boolean; + clearPermissions(): void; + getPermissions(): permission_pb.AccountPermissions | undefined; + setPermissions(value?: permission_pb.AccountPermissions): void; + + getWasmcode(): Uint8Array | string; + getWasmcode_asU8(): Uint8Array; + getWasmcode_asB64(): string; + setWasmcode(value: Uint8Array | string): void; + + getNativename(): string; + setNativename(value: string): void; + + getCodehash(): Uint8Array | string; + getCodehash_asU8(): Uint8Array; + getCodehash_asB64(): string; + setCodehash(value: Uint8Array | string): void; + + clearContractmetaList(): void; + getContractmetaList(): Array; + setContractmetaList(value: Array): void; + addContractmeta(value?: ContractMeta, index?: number): ContractMeta; + + getForebear(): Uint8Array | string; + getForebear_asU8(): Uint8Array; + getForebear_asB64(): string; + setForebear(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Account.AsObject; + static toObject(includeInstance: boolean, msg: Account): Account.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Account, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Account; + static deserializeBinaryFromReader(message: Account, reader: jspb.BinaryReader): Account; } export namespace Account { - export type AsObject = { - address: Uint8Array | string, - publickey?: crypto_pb.PublicKey.AsObject, - sequence: number, - balance: number, - evmcode: Uint8Array | string, - permissions?: permission_pb.AccountPermissions.AsObject, - wasmcode: Uint8Array | string, - nativename: string, - codehash: Uint8Array | string, - contractmetaList: Array, - forebear: Uint8Array | string, - } + export type AsObject = { + address: Uint8Array | string, + publickey?: crypto_pb.PublicKey.AsObject, + sequence: number, + balance: number, + evmcode: Uint8Array | string, + permissions?: permission_pb.AccountPermissions.AsObject, + wasmcode: Uint8Array | string, + nativename: string, + codehash: Uint8Array | string, + contractmetaList: Array, + forebear: Uint8Array | string, + } } -export class ContractMeta extends jspb.Message { - getCodehash(): Uint8Array | string; - getCodehash_asU8(): Uint8Array; - getCodehash_asB64(): string; - setCodehash(value: Uint8Array | string): void; - - getMetadatahash(): Uint8Array | string; - getMetadatahash_asU8(): Uint8Array; - getMetadatahash_asB64(): string; - setMetadatahash(value: Uint8Array | string): void; - - getMetadata(): string; - setMetadata(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractMeta.AsObject; - static toObject(includeInstance: boolean, msg: ContractMeta): ContractMeta.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractMeta, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractMeta; - static deserializeBinaryFromReader(message: ContractMeta, reader: jspb.BinaryReader): ContractMeta; +export class ContractMeta extends jspb.Message { + getCodehash(): Uint8Array | string; + getCodehash_asU8(): Uint8Array; + getCodehash_asB64(): string; + setCodehash(value: Uint8Array | string): void; + + getMetadatahash(): Uint8Array | string; + getMetadatahash_asU8(): Uint8Array; + getMetadatahash_asB64(): string; + setMetadatahash(value: Uint8Array | string): void; + + getMetadata(): string; + setMetadata(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractMeta.AsObject; + static toObject(includeInstance: boolean, msg: ContractMeta): ContractMeta.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractMeta, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractMeta; + static deserializeBinaryFromReader(message: ContractMeta, reader: jspb.BinaryReader): ContractMeta; } export namespace ContractMeta { - export type AsObject = { - codehash: Uint8Array | string, - metadatahash: Uint8Array | string, - metadata: string, - } + export type AsObject = { + codehash: Uint8Array | string, + metadatahash: Uint8Array | string, + metadata: string, + } } - diff --git a/js/proto/acm_pb.js b/js/proto/acm_pb.js index ce4b1d83f..3c2bb5f2f 100644 --- a/js/proto/acm_pb.js +++ b/js/proto/acm_pb.js @@ -1,4 +1,3 @@ -// source: acm.proto /** * @fileoverview * @enhanceable @@ -20,6 +19,7 @@ var crypto_pb = require('./crypto_pb.js'); goog.object.extend(proto, crypto_pb); goog.exportSymbol('proto.acm.Account', null, global); goog.exportSymbol('proto.acm.ContractMeta', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -35,34 +35,8 @@ proto.acm.Account = function(opt_data) { }; goog.inherits(proto.acm.Account, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.acm.Account.displayName = 'proto.acm.Account'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.acm.ContractMeta = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.acm.ContractMeta, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.acm.ContractMeta.displayName = 'proto.acm.ContractMeta'; -} - /** * List of repeated fields within this message type. * @private {!Array} @@ -74,15 +48,13 @@ proto.acm.Account.repeatedFields_ = [9]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.acm.Account.prototype.toObject = function(opt_includeInstance) { @@ -92,8 +64,8 @@ proto.acm.Account.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.acm.Account} msg The msg instance to transform. * @return {!Object} @@ -341,12 +313,9 @@ proto.acm.Account.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.acm.Account} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.acm.Account.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -360,21 +329,14 @@ proto.acm.Account.prototype.getPublickey = function() { }; -/** - * @param {?proto.crypto.PublicKey|undefined} value - * @return {!proto.acm.Account} returns this -*/ +/** @param {?proto.crypto.PublicKey|undefined} value */ proto.acm.Account.prototype.setPublickey = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.acm.Account} returns this - */ proto.acm.Account.prototype.clearPublickey = function() { - return this.setPublickey(undefined); + this.setPublickey(undefined); }; @@ -396,12 +358,9 @@ proto.acm.Account.prototype.getSequence = function() { }; -/** - * @param {number} value - * @return {!proto.acm.Account} returns this - */ +/** @param {number} value */ proto.acm.Account.prototype.setSequence = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; @@ -414,12 +373,9 @@ proto.acm.Account.prototype.getBalance = function() { }; -/** - * @param {number} value - * @return {!proto.acm.Account} returns this - */ +/** @param {number} value */ proto.acm.Account.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3IntField(this, 4, value); }; @@ -456,12 +412,9 @@ proto.acm.Account.prototype.getEvmcode_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.acm.Account} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.acm.Account.prototype.setEvmcode = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); + jspb.Message.setProto3BytesField(this, 5, value); }; @@ -475,21 +428,14 @@ proto.acm.Account.prototype.getPermissions = function() { }; -/** - * @param {?proto.permission.AccountPermissions|undefined} value - * @return {!proto.acm.Account} returns this -*/ +/** @param {?proto.permission.AccountPermissions|undefined} value */ proto.acm.Account.prototype.setPermissions = function(value) { - return jspb.Message.setWrapperField(this, 6, value); + jspb.Message.setWrapperField(this, 6, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.acm.Account} returns this - */ proto.acm.Account.prototype.clearPermissions = function() { - return this.setPermissions(undefined); + this.setPermissions(undefined); }; @@ -535,12 +481,9 @@ proto.acm.Account.prototype.getWasmcode_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.acm.Account} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.acm.Account.prototype.setWasmcode = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); + jspb.Message.setProto3BytesField(this, 7, value); }; @@ -553,12 +496,9 @@ proto.acm.Account.prototype.getNativename = function() { }; -/** - * @param {string} value - * @return {!proto.acm.Account} returns this - */ +/** @param {string} value */ proto.acm.Account.prototype.setNativename = function(value) { - return jspb.Message.setProto3StringField(this, 11, value); + jspb.Message.setProto3StringField(this, 11, value); }; @@ -595,12 +535,9 @@ proto.acm.Account.prototype.getCodehash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.acm.Account} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.acm.Account.prototype.setCodehash = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); + jspb.Message.setProto3BytesField(this, 8, value); }; @@ -614,12 +551,9 @@ proto.acm.Account.prototype.getContractmetaList = function() { }; -/** - * @param {!Array} value - * @return {!proto.acm.Account} returns this -*/ +/** @param {!Array} value */ proto.acm.Account.prototype.setContractmetaList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 9, value); + jspb.Message.setRepeatedWrapperField(this, 9, value); }; @@ -633,12 +567,8 @@ proto.acm.Account.prototype.addContractmeta = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.acm.Account} returns this - */ proto.acm.Account.prototype.clearContractmetaList = function() { - return this.setContractmetaList([]); + this.setContractmetaList([]); }; @@ -675,29 +605,41 @@ proto.acm.Account.prototype.getForebear_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.acm.Account} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.acm.Account.prototype.setForebear = function(value) { - return jspb.Message.setProto3BytesField(this, 10, value); + jspb.Message.setProto3BytesField(this, 10, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.acm.ContractMeta = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.acm.ContractMeta, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.acm.ContractMeta.displayName = 'proto.acm.ContractMeta'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.acm.ContractMeta.prototype.toObject = function(opt_includeInstance) { @@ -707,8 +649,8 @@ proto.acm.ContractMeta.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.acm.ContractMeta} msg The msg instance to transform. * @return {!Object} @@ -853,12 +795,9 @@ proto.acm.ContractMeta.prototype.getCodehash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.acm.ContractMeta} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.acm.ContractMeta.prototype.setCodehash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -895,12 +834,9 @@ proto.acm.ContractMeta.prototype.getMetadatahash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.acm.ContractMeta} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.acm.ContractMeta.prototype.setMetadatahash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -913,12 +849,9 @@ proto.acm.ContractMeta.prototype.getMetadata = function() { }; -/** - * @param {string} value - * @return {!proto.acm.ContractMeta} returns this - */ +/** @param {string} value */ proto.acm.ContractMeta.prototype.setMetadata = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; diff --git a/js/proto/balance_grpc_pb.d.ts b/js/proto/balance_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/balance_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/balance_pb.d.ts b/js/proto/balance_pb.d.ts index 1cb67d81c..60e37b6ac 100644 --- a/js/proto/balance_pb.d.ts +++ b/js/proto/balance_pb.d.ts @@ -1,30 +1,33 @@ // package: balance // file: balance.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; -export class Balance extends jspb.Message { - getType(): number; - setType(value: number): void; +export class Balance extends jspb.Message { + getType(): number; + setType(value: number): void; + + getAmount(): number; + setAmount(value: number): void; - getAmount(): number; - setAmount(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Balance.AsObject; - static toObject(includeInstance: boolean, msg: Balance): Balance.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Balance, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Balance; - static deserializeBinaryFromReader(message: Balance, reader: jspb.BinaryReader): Balance; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Balance.AsObject; + static toObject(includeInstance: boolean, msg: Balance): Balance.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Balance, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Balance; + static deserializeBinaryFromReader(message: Balance, reader: jspb.BinaryReader): Balance; } export namespace Balance { - export type AsObject = { - type: number, - amount: number, - } + export type AsObject = { + type: number, + amount: number, + } } - diff --git a/js/proto/balance_pb.js b/js/proto/balance_pb.js index f481d2879..1b67a8273 100644 --- a/js/proto/balance_pb.js +++ b/js/proto/balance_pb.js @@ -1,4 +1,3 @@ -// source: balance.proto /** * @fileoverview * @enhanceable @@ -15,6 +14,7 @@ var global = Function('return this')(); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.balance.Balance', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,26 +30,19 @@ proto.balance.Balance = function(opt_data) { }; goog.inherits(proto.balance.Balance, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.balance.Balance.displayName = 'proto.balance.Balance'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.balance.Balance.prototype.toObject = function(opt_includeInstance) { @@ -59,8 +52,8 @@ proto.balance.Balance.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.balance.Balance} msg The msg instance to transform. * @return {!Object} @@ -169,12 +162,9 @@ proto.balance.Balance.prototype.getType = function() { }; -/** - * @param {number} value - * @return {!proto.balance.Balance} returns this - */ +/** @param {number} value */ proto.balance.Balance.prototype.setType = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -187,12 +177,9 @@ proto.balance.Balance.prototype.getAmount = function() { }; -/** - * @param {number} value - * @return {!proto.balance.Balance} returns this - */ +/** @param {number} value */ proto.balance.Balance.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/bcm_grpc_pb.d.ts b/js/proto/bcm_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/bcm_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/bcm_pb.d.ts b/js/proto/bcm_pb.d.ts index b7cad5727..dea7c3b3c 100644 --- a/js/proto/bcm_pb.d.ts +++ b/js/proto/bcm_pb.d.ts @@ -1,96 +1,104 @@ // package: bcm // file: bcm.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; -export class SyncInfo extends jspb.Message { - getLatestblockheight(): number; - setLatestblockheight(value: number): void; - - getLatestblockhash(): Uint8Array | string; - getLatestblockhash_asU8(): Uint8Array; - getLatestblockhash_asB64(): string; - setLatestblockhash(value: Uint8Array | string): void; - - getLatestapphash(): Uint8Array | string; - getLatestapphash_asU8(): Uint8Array; - getLatestapphash_asB64(): string; - setLatestapphash(value: Uint8Array | string): void; - - hasLatestblocktime(): boolean; - clearLatestblocktime(): void; - getLatestblocktime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLatestblocktime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasLatestblockseentime(): boolean; - clearLatestblockseentime(): void; - getLatestblockseentime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLatestblockseentime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasLatestblockduration(): boolean; - clearLatestblockduration(): void; - getLatestblockduration(): google_protobuf_duration_pb.Duration | undefined; - setLatestblockduration(value?: google_protobuf_duration_pb.Duration): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncInfo.AsObject; - static toObject(includeInstance: boolean, msg: SyncInfo): SyncInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncInfo; - static deserializeBinaryFromReader(message: SyncInfo, reader: jspb.BinaryReader): SyncInfo; +export class SyncInfo extends jspb.Message { + getLatestblockheight(): number; + setLatestblockheight(value: number): void; + + getLatestblockhash(): Uint8Array | string; + getLatestblockhash_asU8(): Uint8Array; + getLatestblockhash_asB64(): string; + setLatestblockhash(value: Uint8Array | string): void; + + getLatestapphash(): Uint8Array | string; + getLatestapphash_asU8(): Uint8Array; + getLatestapphash_asB64(): string; + setLatestapphash(value: Uint8Array | string): void; + + + hasLatestblocktime(): boolean; + clearLatestblocktime(): void; + getLatestblocktime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLatestblocktime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + + hasLatestblockseentime(): boolean; + clearLatestblockseentime(): void; + getLatestblockseentime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLatestblockseentime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + + hasLatestblockduration(): boolean; + clearLatestblockduration(): void; + getLatestblockduration(): google_protobuf_duration_pb.Duration | undefined; + setLatestblockduration(value?: google_protobuf_duration_pb.Duration): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncInfo.AsObject; + static toObject(includeInstance: boolean, msg: SyncInfo): SyncInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncInfo; + static deserializeBinaryFromReader(message: SyncInfo, reader: jspb.BinaryReader): SyncInfo; } export namespace SyncInfo { - export type AsObject = { - latestblockheight: number, - latestblockhash: Uint8Array | string, - latestapphash: Uint8Array | string, - latestblocktime?: google_protobuf_timestamp_pb.Timestamp.AsObject, - latestblockseentime?: google_protobuf_timestamp_pb.Timestamp.AsObject, - latestblockduration?: google_protobuf_duration_pb.Duration.AsObject, - } + export type AsObject = { + latestblockheight: number, + latestblockhash: Uint8Array | string, + latestapphash: Uint8Array | string, + latestblocktime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + latestblockseentime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + latestblockduration?: google_protobuf_duration_pb.Duration.AsObject, + } } -export class PersistedState extends jspb.Message { - getApphashafterlastblock(): Uint8Array | string; - getApphashafterlastblock_asU8(): Uint8Array; - getApphashafterlastblock_asB64(): string; - setApphashafterlastblock(value: Uint8Array | string): void; - - hasLastblocktime(): boolean; - clearLastblocktime(): void; - getLastblocktime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLastblocktime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getLastblockheight(): number; - setLastblockheight(value: number): void; - - getGenesishash(): Uint8Array | string; - getGenesishash_asU8(): Uint8Array; - getGenesishash_asB64(): string; - setGenesishash(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PersistedState.AsObject; - static toObject(includeInstance: boolean, msg: PersistedState): PersistedState.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PersistedState, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PersistedState; - static deserializeBinaryFromReader(message: PersistedState, reader: jspb.BinaryReader): PersistedState; +export class PersistedState extends jspb.Message { + getApphashafterlastblock(): Uint8Array | string; + getApphashafterlastblock_asU8(): Uint8Array; + getApphashafterlastblock_asB64(): string; + setApphashafterlastblock(value: Uint8Array | string): void; + + + hasLastblocktime(): boolean; + clearLastblocktime(): void; + getLastblocktime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastblocktime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getLastblockheight(): number; + setLastblockheight(value: number): void; + + getGenesishash(): Uint8Array | string; + getGenesishash_asU8(): Uint8Array; + getGenesishash_asB64(): string; + setGenesishash(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PersistedState.AsObject; + static toObject(includeInstance: boolean, msg: PersistedState): PersistedState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PersistedState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PersistedState; + static deserializeBinaryFromReader(message: PersistedState, reader: jspb.BinaryReader): PersistedState; } export namespace PersistedState { - export type AsObject = { - apphashafterlastblock: Uint8Array | string, - lastblocktime?: google_protobuf_timestamp_pb.Timestamp.AsObject, - lastblockheight: number, - genesishash: Uint8Array | string, - } + export type AsObject = { + apphashafterlastblock: Uint8Array | string, + lastblocktime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + lastblockheight: number, + genesishash: Uint8Array | string, + } } - diff --git a/js/proto/bcm_pb.js b/js/proto/bcm_pb.js index 72f289e01..f0af86033 100644 --- a/js/proto/bcm_pb.js +++ b/js/proto/bcm_pb.js @@ -1,4 +1,3 @@ -// source: bcm.proto /** * @fileoverview * @enhanceable @@ -20,6 +19,7 @@ var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/durat goog.object.extend(proto, google_protobuf_duration_pb); goog.exportSymbol('proto.bcm.PersistedState', null, global); goog.exportSymbol('proto.bcm.SyncInfo', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -35,47 +35,19 @@ proto.bcm.SyncInfo = function(opt_data) { }; goog.inherits(proto.bcm.SyncInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.bcm.SyncInfo.displayName = 'proto.bcm.SyncInfo'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bcm.PersistedState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.bcm.PersistedState, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.bcm.PersistedState.displayName = 'proto.bcm.PersistedState'; -} - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bcm.SyncInfo.prototype.toObject = function(opt_includeInstance) { @@ -85,8 +57,8 @@ proto.bcm.SyncInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.bcm.SyncInfo} msg The msg instance to transform. * @return {!Object} @@ -249,12 +221,9 @@ proto.bcm.SyncInfo.prototype.getLatestblockheight = function() { }; -/** - * @param {number} value - * @return {!proto.bcm.SyncInfo} returns this - */ +/** @param {number} value */ proto.bcm.SyncInfo.prototype.setLatestblockheight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -291,12 +260,9 @@ proto.bcm.SyncInfo.prototype.getLatestblockhash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bcm.SyncInfo} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.bcm.SyncInfo.prototype.setLatestblockhash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -333,12 +299,9 @@ proto.bcm.SyncInfo.prototype.getLatestapphash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bcm.SyncInfo} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.bcm.SyncInfo.prototype.setLatestapphash = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setProto3BytesField(this, 3, value); }; @@ -352,21 +315,14 @@ proto.bcm.SyncInfo.prototype.getLatestblocktime = function() { }; -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.bcm.SyncInfo} returns this -*/ +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ proto.bcm.SyncInfo.prototype.setLatestblocktime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + jspb.Message.setWrapperField(this, 4, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.bcm.SyncInfo} returns this - */ proto.bcm.SyncInfo.prototype.clearLatestblocktime = function() { - return this.setLatestblocktime(undefined); + this.setLatestblocktime(undefined); }; @@ -389,21 +345,14 @@ proto.bcm.SyncInfo.prototype.getLatestblockseentime = function() { }; -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.bcm.SyncInfo} returns this -*/ +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ proto.bcm.SyncInfo.prototype.setLatestblockseentime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); + jspb.Message.setWrapperField(this, 5, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.bcm.SyncInfo} returns this - */ proto.bcm.SyncInfo.prototype.clearLatestblockseentime = function() { - return this.setLatestblockseentime(undefined); + this.setLatestblockseentime(undefined); }; @@ -426,21 +375,14 @@ proto.bcm.SyncInfo.prototype.getLatestblockduration = function() { }; -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.bcm.SyncInfo} returns this -*/ +/** @param {?proto.google.protobuf.Duration|undefined} value */ proto.bcm.SyncInfo.prototype.setLatestblockduration = function(value) { - return jspb.Message.setWrapperField(this, 6, value); + jspb.Message.setWrapperField(this, 6, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.bcm.SyncInfo} returns this - */ proto.bcm.SyncInfo.prototype.clearLatestblockduration = function() { - return this.setLatestblockduration(undefined); + this.setLatestblockduration(undefined); }; @@ -454,19 +396,34 @@ proto.bcm.SyncInfo.prototype.hasLatestblockduration = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.bcm.PersistedState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bcm.PersistedState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.bcm.PersistedState.displayName = 'proto.bcm.PersistedState'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bcm.PersistedState.prototype.toObject = function(opt_includeInstance) { @@ -476,8 +433,8 @@ proto.bcm.PersistedState.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.bcm.PersistedState} msg The msg instance to transform. * @return {!Object} @@ -636,12 +593,9 @@ proto.bcm.PersistedState.prototype.getApphashafterlastblock_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bcm.PersistedState} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.bcm.PersistedState.prototype.setApphashafterlastblock = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -655,21 +609,14 @@ proto.bcm.PersistedState.prototype.getLastblocktime = function() { }; -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.bcm.PersistedState} returns this -*/ +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ proto.bcm.PersistedState.prototype.setLastblocktime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.bcm.PersistedState} returns this - */ proto.bcm.PersistedState.prototype.clearLastblocktime = function() { - return this.setLastblocktime(undefined); + this.setLastblocktime(undefined); }; @@ -691,12 +638,9 @@ proto.bcm.PersistedState.prototype.getLastblockheight = function() { }; -/** - * @param {number} value - * @return {!proto.bcm.PersistedState} returns this - */ +/** @param {number} value */ proto.bcm.PersistedState.prototype.setLastblockheight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; @@ -733,12 +677,9 @@ proto.bcm.PersistedState.prototype.getGenesishash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.bcm.PersistedState} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.bcm.PersistedState.prototype.setGenesishash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); + jspb.Message.setProto3BytesField(this, 4, value); }; diff --git a/js/proto/crypto_grpc_pb.d.ts b/js/proto/crypto_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/crypto_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/crypto_pb.d.ts b/js/proto/crypto_pb.d.ts index d0c868ff3..3041edf67 100644 --- a/js/proto/crypto_pb.d.ts +++ b/js/proto/crypto_pb.d.ts @@ -1,90 +1,95 @@ // package: crypto // file: crypto.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; -export class PublicKey extends jspb.Message { - getCurvetype(): number; - setCurvetype(value: number): void; - - getPublickey(): Uint8Array | string; - getPublickey_asU8(): Uint8Array; - getPublickey_asB64(): string; - setPublickey(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PublicKey.AsObject; - static toObject(includeInstance: boolean, msg: PublicKey): PublicKey.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PublicKey, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PublicKey; - static deserializeBinaryFromReader(message: PublicKey, reader: jspb.BinaryReader): PublicKey; +export class PublicKey extends jspb.Message { + getCurvetype(): number; + setCurvetype(value: number): void; + + getPublickey(): Uint8Array | string; + getPublickey_asU8(): Uint8Array; + getPublickey_asB64(): string; + setPublickey(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PublicKey.AsObject; + static toObject(includeInstance: boolean, msg: PublicKey): PublicKey.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PublicKey, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PublicKey; + static deserializeBinaryFromReader(message: PublicKey, reader: jspb.BinaryReader): PublicKey; } export namespace PublicKey { - export type AsObject = { - curvetype: number, - publickey: Uint8Array | string, - } + export type AsObject = { + curvetype: number, + publickey: Uint8Array | string, + } } -export class PrivateKey extends jspb.Message { - getCurvetype(): number; - setCurvetype(value: number): void; - - getPublickey(): Uint8Array | string; - getPublickey_asU8(): Uint8Array; - getPublickey_asB64(): string; - setPublickey(value: Uint8Array | string): void; - - getPrivatekey(): Uint8Array | string; - getPrivatekey_asU8(): Uint8Array; - getPrivatekey_asB64(): string; - setPrivatekey(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PrivateKey.AsObject; - static toObject(includeInstance: boolean, msg: PrivateKey): PrivateKey.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PrivateKey, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PrivateKey; - static deserializeBinaryFromReader(message: PrivateKey, reader: jspb.BinaryReader): PrivateKey; +export class PrivateKey extends jspb.Message { + getCurvetype(): number; + setCurvetype(value: number): void; + + getPublickey(): Uint8Array | string; + getPublickey_asU8(): Uint8Array; + getPublickey_asB64(): string; + setPublickey(value: Uint8Array | string): void; + + getPrivatekey(): Uint8Array | string; + getPrivatekey_asU8(): Uint8Array; + getPrivatekey_asB64(): string; + setPrivatekey(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PrivateKey.AsObject; + static toObject(includeInstance: boolean, msg: PrivateKey): PrivateKey.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PrivateKey, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PrivateKey; + static deserializeBinaryFromReader(message: PrivateKey, reader: jspb.BinaryReader): PrivateKey; } export namespace PrivateKey { - export type AsObject = { - curvetype: number, - publickey: Uint8Array | string, - privatekey: Uint8Array | string, - } + export type AsObject = { + curvetype: number, + publickey: Uint8Array | string, + privatekey: Uint8Array | string, + } } -export class Signature extends jspb.Message { - getCurvetype(): number; - setCurvetype(value: number): void; - - getSignature(): Uint8Array | string; - getSignature_asU8(): Uint8Array; - getSignature_asB64(): string; - setSignature(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Signature.AsObject; - static toObject(includeInstance: boolean, msg: Signature): Signature.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Signature, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Signature; - static deserializeBinaryFromReader(message: Signature, reader: jspb.BinaryReader): Signature; +export class Signature extends jspb.Message { + getCurvetype(): number; + setCurvetype(value: number): void; + + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Signature.AsObject; + static toObject(includeInstance: boolean, msg: Signature): Signature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Signature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Signature; + static deserializeBinaryFromReader(message: Signature, reader: jspb.BinaryReader): Signature; } export namespace Signature { - export type AsObject = { - curvetype: number, - signature: Uint8Array | string, - } + export type AsObject = { + curvetype: number, + signature: Uint8Array | string, + } } - diff --git a/js/proto/crypto_pb.js b/js/proto/crypto_pb.js index 155be7b62..696a5cbcb 100644 --- a/js/proto/crypto_pb.js +++ b/js/proto/crypto_pb.js @@ -1,4 +1,3 @@ -// source: crypto.proto /** * @fileoverview * @enhanceable @@ -17,6 +16,7 @@ goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.crypto.PrivateKey', null, global); goog.exportSymbol('proto.crypto.PublicKey', null, global); goog.exportSymbol('proto.crypto.Signature', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -32,68 +32,19 @@ proto.crypto.PublicKey = function(opt_data) { }; goog.inherits(proto.crypto.PublicKey, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.crypto.PublicKey.displayName = 'proto.crypto.PublicKey'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.crypto.PrivateKey = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.crypto.PrivateKey, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.crypto.PrivateKey.displayName = 'proto.crypto.PrivateKey'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.crypto.Signature = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.crypto.Signature, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.crypto.Signature.displayName = 'proto.crypto.Signature'; -} - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.crypto.PublicKey.prototype.toObject = function(opt_includeInstance) { @@ -103,8 +54,8 @@ proto.crypto.PublicKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.crypto.PublicKey} msg The msg instance to transform. * @return {!Object} @@ -213,12 +164,9 @@ proto.crypto.PublicKey.prototype.getCurvetype = function() { }; -/** - * @param {number} value - * @return {!proto.crypto.PublicKey} returns this - */ +/** @param {number} value */ proto.crypto.PublicKey.prototype.setCurvetype = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -255,29 +203,41 @@ proto.crypto.PublicKey.prototype.getPublickey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.crypto.PublicKey} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.crypto.PublicKey.prototype.setPublickey = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.crypto.PrivateKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.crypto.PrivateKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.crypto.PrivateKey.displayName = 'proto.crypto.PrivateKey'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.crypto.PrivateKey.prototype.toObject = function(opt_includeInstance) { @@ -287,8 +247,8 @@ proto.crypto.PrivateKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.crypto.PrivateKey} msg The msg instance to transform. * @return {!Object} @@ -409,12 +369,9 @@ proto.crypto.PrivateKey.prototype.getCurvetype = function() { }; -/** - * @param {number} value - * @return {!proto.crypto.PrivateKey} returns this - */ +/** @param {number} value */ proto.crypto.PrivateKey.prototype.setCurvetype = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -451,12 +408,9 @@ proto.crypto.PrivateKey.prototype.getPublickey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.crypto.PrivateKey} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.crypto.PrivateKey.prototype.setPublickey = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -493,29 +447,41 @@ proto.crypto.PrivateKey.prototype.getPrivatekey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.crypto.PrivateKey} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.crypto.PrivateKey.prototype.setPrivatekey = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setProto3BytesField(this, 3, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.crypto.Signature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.crypto.Signature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.crypto.Signature.displayName = 'proto.crypto.Signature'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.crypto.Signature.prototype.toObject = function(opt_includeInstance) { @@ -525,8 +491,8 @@ proto.crypto.Signature.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.crypto.Signature} msg The msg instance to transform. * @return {!Object} @@ -635,12 +601,9 @@ proto.crypto.Signature.prototype.getCurvetype = function() { }; -/** - * @param {number} value - * @return {!proto.crypto.Signature} returns this - */ +/** @param {number} value */ proto.crypto.Signature.prototype.setCurvetype = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -677,12 +640,9 @@ proto.crypto.Signature.prototype.getSignature_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.crypto.Signature} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.crypto.Signature.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; diff --git a/js/proto/dump_grpc_pb.d.ts b/js/proto/dump_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/dump_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/dump_pb.d.ts b/js/proto/dump_pb.d.ts index 965eb5975..8ba2ff7de 100644 --- a/js/proto/dump_pb.d.ts +++ b/js/proto/dump_pb.d.ts @@ -1,6 +1,9 @@ // package: dump // file: dump.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; @@ -8,139 +11,148 @@ import * as acm_pb from "./acm_pb"; import * as exec_pb from "./exec_pb"; import * as names_pb from "./names_pb"; -export class Storage extends jspb.Message { - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; - - getValue(): Uint8Array | string; - getValue_asU8(): Uint8Array; - getValue_asB64(): string; - setValue(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Storage.AsObject; - static toObject(includeInstance: boolean, msg: Storage): Storage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Storage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Storage; - static deserializeBinaryFromReader(message: Storage, reader: jspb.BinaryReader): Storage; +export class Storage extends jspb.Message { + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): void; + + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Storage.AsObject; + static toObject(includeInstance: boolean, msg: Storage): Storage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Storage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Storage; + static deserializeBinaryFromReader(message: Storage, reader: jspb.BinaryReader): Storage; } export namespace Storage { - export type AsObject = { - key: Uint8Array | string, - value: Uint8Array | string, - } + export type AsObject = { + key: Uint8Array | string, + value: Uint8Array | string, + } } -export class AccountStorage extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; - - clearStorageList(): void; - getStorageList(): Array; - setStorageList(value: Array): void; - addStorage(value?: Storage, index?: number): Storage; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AccountStorage.AsObject; - static toObject(includeInstance: boolean, msg: AccountStorage): AccountStorage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AccountStorage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AccountStorage; - static deserializeBinaryFromReader(message: AccountStorage, reader: jspb.BinaryReader): AccountStorage; +export class AccountStorage extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + clearStorageList(): void; + getStorageList(): Array; + setStorageList(value: Array): void; + addStorage(value?: Storage, index?: number): Storage; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AccountStorage.AsObject; + static toObject(includeInstance: boolean, msg: AccountStorage): AccountStorage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AccountStorage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AccountStorage; + static deserializeBinaryFromReader(message: AccountStorage, reader: jspb.BinaryReader): AccountStorage; } export namespace AccountStorage { - export type AsObject = { - address: Uint8Array | string, - storageList: Array, - } + export type AsObject = { + address: Uint8Array | string, + storageList: Array, + } } -export class EVMEvent extends jspb.Message { - getChainid(): string; - setChainid(value: string): void; - - getIndex(): number; - setIndex(value: number): void; - - hasTime(): boolean; - clearTime(): void; - getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - hasEvent(): boolean; - clearEvent(): void; - getEvent(): exec_pb.LogEvent | undefined; - setEvent(value?: exec_pb.LogEvent): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EVMEvent.AsObject; - static toObject(includeInstance: boolean, msg: EVMEvent): EVMEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EVMEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EVMEvent; - static deserializeBinaryFromReader(message: EVMEvent, reader: jspb.BinaryReader): EVMEvent; +export class EVMEvent extends jspb.Message { + getChainid(): string; + setChainid(value: string): void; + + getIndex(): number; + setIndex(value: number): void; + + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): exec_pb.LogEvent | undefined; + setEvent(value?: exec_pb.LogEvent): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EVMEvent.AsObject; + static toObject(includeInstance: boolean, msg: EVMEvent): EVMEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EVMEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EVMEvent; + static deserializeBinaryFromReader(message: EVMEvent, reader: jspb.BinaryReader): EVMEvent; } export namespace EVMEvent { - export type AsObject = { - chainid: string, - index: number, - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - event?: exec_pb.LogEvent.AsObject, - } + export type AsObject = { + chainid: string, + index: number, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + event?: exec_pb.LogEvent.AsObject, + } } -export class Dump extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; - - hasAccount(): boolean; - clearAccount(): void; - getAccount(): acm_pb.Account | undefined; - setAccount(value?: acm_pb.Account): void; - - hasAccountstorage(): boolean; - clearAccountstorage(): void; - getAccountstorage(): AccountStorage | undefined; - setAccountstorage(value?: AccountStorage): void; - - hasEvmevent(): boolean; - clearEvmevent(): void; - getEvmevent(): EVMEvent | undefined; - setEvmevent(value?: EVMEvent): void; - - hasName(): boolean; - clearName(): void; - getName(): names_pb.Entry | undefined; - setName(value?: names_pb.Entry): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Dump.AsObject; - static toObject(includeInstance: boolean, msg: Dump): Dump.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Dump, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Dump; - static deserializeBinaryFromReader(message: Dump, reader: jspb.BinaryReader): Dump; +export class Dump extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + + hasAccount(): boolean; + clearAccount(): void; + getAccount(): acm_pb.Account | undefined; + setAccount(value?: acm_pb.Account): void; + + + hasAccountstorage(): boolean; + clearAccountstorage(): void; + getAccountstorage(): AccountStorage | undefined; + setAccountstorage(value?: AccountStorage): void; + + + hasEvmevent(): boolean; + clearEvmevent(): void; + getEvmevent(): EVMEvent | undefined; + setEvmevent(value?: EVMEvent): void; + + + hasName(): boolean; + clearName(): void; + getName(): names_pb.Entry | undefined; + setName(value?: names_pb.Entry): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Dump.AsObject; + static toObject(includeInstance: boolean, msg: Dump): Dump.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Dump, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Dump; + static deserializeBinaryFromReader(message: Dump, reader: jspb.BinaryReader): Dump; } export namespace Dump { - export type AsObject = { - height: number, - account?: acm_pb.Account.AsObject, - accountstorage?: AccountStorage.AsObject, - evmevent?: EVMEvent.AsObject, - name?: names_pb.Entry.AsObject, - } + export type AsObject = { + height: number, + account?: acm_pb.Account.AsObject, + accountstorage?: AccountStorage.AsObject, + evmevent?: EVMEvent.AsObject, + name?: names_pb.Entry.AsObject, + } } - diff --git a/js/proto/dump_pb.js b/js/proto/dump_pb.js index d6e44578e..0bded5f28 100644 --- a/js/proto/dump_pb.js +++ b/js/proto/dump_pb.js @@ -1,4 +1,3 @@ -// source: dump.proto /** * @fileoverview * @enhanceable @@ -26,6 +25,7 @@ goog.exportSymbol('proto.dump.AccountStorage', null, global); goog.exportSymbol('proto.dump.Dump', null, global); goog.exportSymbol('proto.dump.EVMEvent', null, global); goog.exportSymbol('proto.dump.Storage', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -41,89 +41,19 @@ proto.dump.Storage = function(opt_data) { }; goog.inherits(proto.dump.Storage, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.dump.Storage.displayName = 'proto.dump.Storage'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.dump.AccountStorage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.dump.AccountStorage.repeatedFields_, null); -}; -goog.inherits(proto.dump.AccountStorage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.dump.AccountStorage.displayName = 'proto.dump.AccountStorage'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.dump.EVMEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.dump.EVMEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.dump.EVMEvent.displayName = 'proto.dump.EVMEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.dump.Dump = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.dump.Dump, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.dump.Dump.displayName = 'proto.dump.Dump'; -} - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.dump.Storage.prototype.toObject = function(opt_includeInstance) { @@ -133,8 +63,8 @@ proto.dump.Storage.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.Storage} msg The msg instance to transform. * @return {!Object} @@ -267,12 +197,9 @@ proto.dump.Storage.prototype.getKey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.dump.Storage} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.dump.Storage.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -309,16 +236,30 @@ proto.dump.Storage.prototype.getValue_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.dump.Storage} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.dump.Storage.prototype.setValue = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.dump.AccountStorage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.dump.AccountStorage.repeatedFields_, null); +}; +goog.inherits(proto.dump.AccountStorage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.dump.AccountStorage.displayName = 'proto.dump.AccountStorage'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -330,15 +271,13 @@ proto.dump.AccountStorage.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.dump.AccountStorage.prototype.toObject = function(opt_includeInstance) { @@ -348,8 +287,8 @@ proto.dump.AccountStorage.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.AccountStorage} msg The msg instance to transform. * @return {!Object} @@ -485,12 +424,9 @@ proto.dump.AccountStorage.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.dump.AccountStorage} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.dump.AccountStorage.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -504,12 +440,9 @@ proto.dump.AccountStorage.prototype.getStorageList = function() { }; -/** - * @param {!Array} value - * @return {!proto.dump.AccountStorage} returns this -*/ +/** @param {!Array} value */ proto.dump.AccountStorage.prototype.setStorageList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -523,29 +456,40 @@ proto.dump.AccountStorage.prototype.addStorage = function(opt_value, opt_index) }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.dump.AccountStorage} returns this - */ proto.dump.AccountStorage.prototype.clearStorageList = function() { - return this.setStorageList([]); + this.setStorageList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.dump.EVMEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.dump.EVMEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.dump.EVMEvent.displayName = 'proto.dump.EVMEvent'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.dump.EVMEvent.prototype.toObject = function(opt_includeInstance) { @@ -555,8 +499,8 @@ proto.dump.EVMEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.EVMEvent} msg The msg instance to transform. * @return {!Object} @@ -693,12 +637,9 @@ proto.dump.EVMEvent.prototype.getChainid = function() { }; -/** - * @param {string} value - * @return {!proto.dump.EVMEvent} returns this - */ +/** @param {string} value */ proto.dump.EVMEvent.prototype.setChainid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -711,12 +652,9 @@ proto.dump.EVMEvent.prototype.getIndex = function() { }; -/** - * @param {number} value - * @return {!proto.dump.EVMEvent} returns this - */ +/** @param {number} value */ proto.dump.EVMEvent.prototype.setIndex = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3IntField(this, 4, value); }; @@ -730,21 +668,14 @@ proto.dump.EVMEvent.prototype.getTime = function() { }; -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.dump.EVMEvent} returns this -*/ +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ proto.dump.EVMEvent.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.dump.EVMEvent} returns this - */ proto.dump.EVMEvent.prototype.clearTime = function() { - return this.setTime(undefined); + this.setTime(undefined); }; @@ -767,21 +698,14 @@ proto.dump.EVMEvent.prototype.getEvent = function() { }; -/** - * @param {?proto.exec.LogEvent|undefined} value - * @return {!proto.dump.EVMEvent} returns this -*/ +/** @param {?proto.exec.LogEvent|undefined} value */ proto.dump.EVMEvent.prototype.setEvent = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.dump.EVMEvent} returns this - */ proto.dump.EVMEvent.prototype.clearEvent = function() { - return this.setEvent(undefined); + this.setEvent(undefined); }; @@ -795,19 +719,34 @@ proto.dump.EVMEvent.prototype.hasEvent = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.dump.Dump = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.dump.Dump, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.dump.Dump.displayName = 'proto.dump.Dump'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.dump.Dump.prototype.toObject = function(opt_includeInstance) { @@ -817,8 +756,8 @@ proto.dump.Dump.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.Dump} msg The msg instance to transform. * @return {!Object} @@ -971,12 +910,9 @@ proto.dump.Dump.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.dump.Dump} returns this - */ +/** @param {number} value */ proto.dump.Dump.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -990,21 +926,14 @@ proto.dump.Dump.prototype.getAccount = function() { }; -/** - * @param {?proto.acm.Account|undefined} value - * @return {!proto.dump.Dump} returns this -*/ +/** @param {?proto.acm.Account|undefined} value */ proto.dump.Dump.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.dump.Dump} returns this - */ proto.dump.Dump.prototype.clearAccount = function() { - return this.setAccount(undefined); + this.setAccount(undefined); }; @@ -1027,21 +956,14 @@ proto.dump.Dump.prototype.getAccountstorage = function() { }; -/** - * @param {?proto.dump.AccountStorage|undefined} value - * @return {!proto.dump.Dump} returns this -*/ +/** @param {?proto.dump.AccountStorage|undefined} value */ proto.dump.Dump.prototype.setAccountstorage = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.dump.Dump} returns this - */ proto.dump.Dump.prototype.clearAccountstorage = function() { - return this.setAccountstorage(undefined); + this.setAccountstorage(undefined); }; @@ -1064,21 +986,14 @@ proto.dump.Dump.prototype.getEvmevent = function() { }; -/** - * @param {?proto.dump.EVMEvent|undefined} value - * @return {!proto.dump.Dump} returns this -*/ +/** @param {?proto.dump.EVMEvent|undefined} value */ proto.dump.Dump.prototype.setEvmevent = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + jspb.Message.setWrapperField(this, 4, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.dump.Dump} returns this - */ proto.dump.Dump.prototype.clearEvmevent = function() { - return this.setEvmevent(undefined); + this.setEvmevent(undefined); }; @@ -1101,21 +1016,14 @@ proto.dump.Dump.prototype.getName = function() { }; -/** - * @param {?proto.names.Entry|undefined} value - * @return {!proto.dump.Dump} returns this -*/ +/** @param {?proto.names.Entry|undefined} value */ proto.dump.Dump.prototype.setName = function(value) { - return jspb.Message.setWrapperField(this, 5, value); + jspb.Message.setWrapperField(this, 5, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.dump.Dump} returns this - */ proto.dump.Dump.prototype.clearName = function() { - return this.setName(undefined); + this.setName(undefined); }; diff --git a/js/proto/encoding_grpc_pb.d.ts b/js/proto/encoding_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/encoding_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/encoding_pb.d.ts b/js/proto/encoding_pb.d.ts index 1f900c155..d9cdffe6b 100644 --- a/js/proto/encoding_pb.d.ts +++ b/js/proto/encoding_pb.d.ts @@ -1,30 +1,33 @@ // package: encoding // file: encoding.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; -export class TestMessage extends jspb.Message { - getType(): number; - setType(value: number): void; +export class TestMessage extends jspb.Message { + getType(): number; + setType(value: number): void; + + getAmount(): number; + setAmount(value: number): void; - getAmount(): number; - setAmount(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TestMessage.AsObject; - static toObject(includeInstance: boolean, msg: TestMessage): TestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TestMessage; - static deserializeBinaryFromReader(message: TestMessage, reader: jspb.BinaryReader): TestMessage; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TestMessage.AsObject; + static toObject(includeInstance: boolean, msg: TestMessage): TestMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TestMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TestMessage; + static deserializeBinaryFromReader(message: TestMessage, reader: jspb.BinaryReader): TestMessage; } export namespace TestMessage { - export type AsObject = { - type: number, - amount: number, - } + export type AsObject = { + type: number, + amount: number, + } } - diff --git a/js/proto/encoding_pb.js b/js/proto/encoding_pb.js index 67f663183..79fce7b1b 100644 --- a/js/proto/encoding_pb.js +++ b/js/proto/encoding_pb.js @@ -1,4 +1,3 @@ -// source: encoding.proto /** * @fileoverview * @enhanceable @@ -15,6 +14,7 @@ var global = Function('return this')(); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.encoding.TestMessage', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,26 +30,19 @@ proto.encoding.TestMessage = function(opt_data) { }; goog.inherits(proto.encoding.TestMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.encoding.TestMessage.displayName = 'proto.encoding.TestMessage'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.encoding.TestMessage.prototype.toObject = function(opt_includeInstance) { @@ -59,8 +52,8 @@ proto.encoding.TestMessage.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.encoding.TestMessage} msg The msg instance to transform. * @return {!Object} @@ -169,12 +162,9 @@ proto.encoding.TestMessage.prototype.getType = function() { }; -/** - * @param {number} value - * @return {!proto.encoding.TestMessage} returns this - */ +/** @param {number} value */ proto.encoding.TestMessage.prototype.setType = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -187,12 +177,9 @@ proto.encoding.TestMessage.prototype.getAmount = function() { }; -/** - * @param {number} value - * @return {!proto.encoding.TestMessage} returns this - */ +/** @param {number} value */ proto.encoding.TestMessage.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/errors_grpc_pb.d.ts b/js/proto/errors_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/errors_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/errors_pb.d.ts b/js/proto/errors_pb.d.ts index daac39ee7..a3ee086e1 100644 --- a/js/proto/errors_pb.d.ts +++ b/js/proto/errors_pb.d.ts @@ -1,30 +1,33 @@ // package: errors // file: errors.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; -export class Exception extends jspb.Message { - getCode(): number; - setCode(value: number): void; +export class Exception extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + getException(): string; + setException(value: string): void; - getException(): string; - setException(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Exception.AsObject; - static toObject(includeInstance: boolean, msg: Exception): Exception.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Exception, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Exception; - static deserializeBinaryFromReader(message: Exception, reader: jspb.BinaryReader): Exception; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Exception.AsObject; + static toObject(includeInstance: boolean, msg: Exception): Exception.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Exception, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Exception; + static deserializeBinaryFromReader(message: Exception, reader: jspb.BinaryReader): Exception; } export namespace Exception { - export type AsObject = { - code: number, - exception: string, - } + export type AsObject = { + code: number, + exception: string, + } } - diff --git a/js/proto/errors_pb.js b/js/proto/errors_pb.js index 6a752960b..fe2c98e30 100644 --- a/js/proto/errors_pb.js +++ b/js/proto/errors_pb.js @@ -1,4 +1,3 @@ -// source: errors.proto /** * @fileoverview * @enhanceable @@ -15,6 +14,7 @@ var global = Function('return this')(); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.errors.Exception', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,26 +30,19 @@ proto.errors.Exception = function(opt_data) { }; goog.inherits(proto.errors.Exception, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.errors.Exception.displayName = 'proto.errors.Exception'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.errors.Exception.prototype.toObject = function(opt_includeInstance) { @@ -59,8 +52,8 @@ proto.errors.Exception.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.errors.Exception} msg The msg instance to transform. * @return {!Object} @@ -169,12 +162,9 @@ proto.errors.Exception.prototype.getCode = function() { }; -/** - * @param {number} value - * @return {!proto.errors.Exception} returns this - */ +/** @param {number} value */ proto.errors.Exception.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -187,12 +177,9 @@ proto.errors.Exception.prototype.getException = function() { }; -/** - * @param {string} value - * @return {!proto.errors.Exception} returns this - */ +/** @param {string} value */ proto.errors.Exception.prototype.setException = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; diff --git a/js/proto/exec_grpc_pb.d.ts b/js/proto/exec_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/exec_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/exec_pb.d.ts b/js/proto/exec_pb.d.ts index 93a33f7dc..301f4b770 100644 --- a/js/proto/exec_pb.d.ts +++ b/js/proto/exec_pb.d.ts @@ -1,6 +1,9 @@ // package: exec // file: exec.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as github_com_tendermint_tendermint_abci_types_types_pb from "./github.com/tendermint/tendermint/abci/types/types_pb"; @@ -11,707 +14,755 @@ import * as txs_pb from "./txs_pb"; import * as permission_pb from "./permission_pb"; import * as spec_pb from "./spec_pb"; -export class StreamEvents extends jspb.Message { - clearStreameventsList(): void; - getStreameventsList(): Array; - setStreameventsList(value: Array): void; - addStreamevents(value?: StreamEvent, index?: number): StreamEvent; +export class StreamEvents extends jspb.Message { + clearStreameventsList(): void; + getStreameventsList(): Array; + setStreameventsList(value: Array): void; + addStreamevents(value?: StreamEvent, index?: number): StreamEvent; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StreamEvents.AsObject; - static toObject(includeInstance: boolean, msg: StreamEvents): StreamEvents.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StreamEvents, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StreamEvents; - static deserializeBinaryFromReader(message: StreamEvents, reader: jspb.BinaryReader): StreamEvents; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamEvents.AsObject; + static toObject(includeInstance: boolean, msg: StreamEvents): StreamEvents.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamEvents, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamEvents; + static deserializeBinaryFromReader(message: StreamEvents, reader: jspb.BinaryReader): StreamEvents; } export namespace StreamEvents { - export type AsObject = { - streameventsList: Array, - } -} - -export class StreamEvent extends jspb.Message { - hasBeginblock(): boolean; - clearBeginblock(): void; - getBeginblock(): BeginBlock | undefined; - setBeginblock(value?: BeginBlock): void; - - hasBegintx(): boolean; - clearBegintx(): void; - getBegintx(): BeginTx | undefined; - setBegintx(value?: BeginTx): void; - - hasEnvelope(): boolean; - clearEnvelope(): void; - getEnvelope(): txs_pb.Envelope | undefined; - setEnvelope(value?: txs_pb.Envelope): void; - - hasEvent(): boolean; - clearEvent(): void; - getEvent(): Event | undefined; - setEvent(value?: Event): void; - - hasEndtx(): boolean; - clearEndtx(): void; - getEndtx(): EndTx | undefined; - setEndtx(value?: EndTx): void; - - hasEndblock(): boolean; - clearEndblock(): void; - getEndblock(): EndBlock | undefined; - setEndblock(value?: EndBlock): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StreamEvent.AsObject; - static toObject(includeInstance: boolean, msg: StreamEvent): StreamEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StreamEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StreamEvent; - static deserializeBinaryFromReader(message: StreamEvent, reader: jspb.BinaryReader): StreamEvent; + export type AsObject = { + streameventsList: Array, + } +} + +export class StreamEvent extends jspb.Message { + + hasBeginblock(): boolean; + clearBeginblock(): void; + getBeginblock(): BeginBlock | undefined; + setBeginblock(value?: BeginBlock): void; + + + hasBegintx(): boolean; + clearBegintx(): void; + getBegintx(): BeginTx | undefined; + setBegintx(value?: BeginTx): void; + + + hasEnvelope(): boolean; + clearEnvelope(): void; + getEnvelope(): txs_pb.Envelope | undefined; + setEnvelope(value?: txs_pb.Envelope): void; + + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): Event | undefined; + setEvent(value?: Event): void; + + + hasEndtx(): boolean; + clearEndtx(): void; + getEndtx(): EndTx | undefined; + setEndtx(value?: EndTx): void; + + + hasEndblock(): boolean; + clearEndblock(): void; + getEndblock(): EndBlock | undefined; + setEndblock(value?: EndBlock): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamEvent.AsObject; + static toObject(includeInstance: boolean, msg: StreamEvent): StreamEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamEvent; + static deserializeBinaryFromReader(message: StreamEvent, reader: jspb.BinaryReader): StreamEvent; } export namespace StreamEvent { - export type AsObject = { - beginblock?: BeginBlock.AsObject, - begintx?: BeginTx.AsObject, - envelope?: txs_pb.Envelope.AsObject, - event?: Event.AsObject, - endtx?: EndTx.AsObject, - endblock?: EndBlock.AsObject, - } + export type AsObject = { + beginblock?: BeginBlock.AsObject, + begintx?: BeginTx.AsObject, + envelope?: txs_pb.Envelope.AsObject, + event?: Event.AsObject, + endtx?: EndTx.AsObject, + endblock?: EndBlock.AsObject, + } } -export class BeginBlock extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; +export class BeginBlock extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + getNumtxs(): number; + setNumtxs(value: number): void; + + getPredecessorheight(): number; + setPredecessorheight(value: number): void; - getNumtxs(): number; - setNumtxs(value: number): void; - getPredecessorheight(): number; - setPredecessorheight(value: number): void; + hasHeader(): boolean; + clearHeader(): void; + getHeader(): github_com_tendermint_tendermint_abci_types_types_pb.Header | undefined; + setHeader(value?: github_com_tendermint_tendermint_abci_types_types_pb.Header): void; - hasHeader(): boolean; - clearHeader(): void; - getHeader(): github_com_tendermint_tendermint_abci_types_types_pb.Header | undefined; - setHeader(value?: github_com_tendermint_tendermint_abci_types_types_pb.Header): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BeginBlock.AsObject; - static toObject(includeInstance: boolean, msg: BeginBlock): BeginBlock.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BeginBlock, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BeginBlock; - static deserializeBinaryFromReader(message: BeginBlock, reader: jspb.BinaryReader): BeginBlock; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BeginBlock.AsObject; + static toObject(includeInstance: boolean, msg: BeginBlock): BeginBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BeginBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BeginBlock; + static deserializeBinaryFromReader(message: BeginBlock, reader: jspb.BinaryReader): BeginBlock; } export namespace BeginBlock { - export type AsObject = { - height: number, - numtxs: number, - predecessorheight: number, - header?: github_com_tendermint_tendermint_abci_types_types_pb.Header.AsObject, - } + export type AsObject = { + height: number, + numtxs: number, + predecessorheight: number, + header?: github_com_tendermint_tendermint_abci_types_types_pb.Header.AsObject, + } } -export class EndBlock extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; +export class EndBlock extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EndBlock.AsObject; - static toObject(includeInstance: boolean, msg: EndBlock): EndBlock.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EndBlock, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EndBlock; - static deserializeBinaryFromReader(message: EndBlock, reader: jspb.BinaryReader): EndBlock; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EndBlock.AsObject; + static toObject(includeInstance: boolean, msg: EndBlock): EndBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EndBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EndBlock; + static deserializeBinaryFromReader(message: EndBlock, reader: jspb.BinaryReader): EndBlock; } export namespace EndBlock { - export type AsObject = { - height: number, - } + export type AsObject = { + height: number, + } } -export class BeginTx extends jspb.Message { - hasTxheader(): boolean; - clearTxheader(): void; - getTxheader(): TxHeader | undefined; - setTxheader(value?: TxHeader): void; +export class BeginTx extends jspb.Message { + + hasTxheader(): boolean; + clearTxheader(): void; + getTxheader(): TxHeader | undefined; + setTxheader(value?: TxHeader): void; + + getNumevents(): number; + setNumevents(value: number): void; - getNumevents(): number; - setNumevents(value: number): void; - hasResult(): boolean; - clearResult(): void; - getResult(): Result | undefined; - setResult(value?: Result): void; + hasResult(): boolean; + clearResult(): void; + getResult(): Result | undefined; + setResult(value?: Result): void; - hasException(): boolean; - clearException(): void; - getException(): errors_pb.Exception | undefined; - setException(value?: errors_pb.Exception): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BeginTx.AsObject; - static toObject(includeInstance: boolean, msg: BeginTx): BeginTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BeginTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BeginTx; - static deserializeBinaryFromReader(message: BeginTx, reader: jspb.BinaryReader): BeginTx; + hasException(): boolean; + clearException(): void; + getException(): errors_pb.Exception | undefined; + setException(value?: errors_pb.Exception): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BeginTx.AsObject; + static toObject(includeInstance: boolean, msg: BeginTx): BeginTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BeginTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BeginTx; + static deserializeBinaryFromReader(message: BeginTx, reader: jspb.BinaryReader): BeginTx; } export namespace BeginTx { - export type AsObject = { - txheader?: TxHeader.AsObject, - numevents: number, - result?: Result.AsObject, - exception?: errors_pb.Exception.AsObject, - } -} - -export class EndTx extends jspb.Message { - getTxhash(): Uint8Array | string; - getTxhash_asU8(): Uint8Array; - getTxhash_asB64(): string; - setTxhash(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EndTx.AsObject; - static toObject(includeInstance: boolean, msg: EndTx): EndTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EndTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EndTx; - static deserializeBinaryFromReader(message: EndTx, reader: jspb.BinaryReader): EndTx; + export type AsObject = { + txheader?: TxHeader.AsObject, + numevents: number, + result?: Result.AsObject, + exception?: errors_pb.Exception.AsObject, + } +} + +export class EndTx extends jspb.Message { + getTxhash(): Uint8Array | string; + getTxhash_asU8(): Uint8Array; + getTxhash_asB64(): string; + setTxhash(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EndTx.AsObject; + static toObject(includeInstance: boolean, msg: EndTx): EndTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EndTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EndTx; + static deserializeBinaryFromReader(message: EndTx, reader: jspb.BinaryReader): EndTx; } export namespace EndTx { - export type AsObject = { - txhash: Uint8Array | string, - } + export type AsObject = { + txhash: Uint8Array | string, + } } -export class TxHeader extends jspb.Message { - getTxtype(): number; - setTxtype(value: number): void; +export class TxHeader extends jspb.Message { + getTxtype(): number; + setTxtype(value: number): void; + + getTxhash(): Uint8Array | string; + getTxhash_asU8(): Uint8Array; + getTxhash_asB64(): string; + setTxhash(value: Uint8Array | string): void; - getTxhash(): Uint8Array | string; - getTxhash_asU8(): Uint8Array; - getTxhash_asB64(): string; - setTxhash(value: Uint8Array | string): void; + getHeight(): number; + setHeight(value: number): void; - getHeight(): number; - setHeight(value: number): void; + getIndex(): number; + setIndex(value: number): void; - getIndex(): number; - setIndex(value: number): void; - hasOrigin(): boolean; - clearOrigin(): void; - getOrigin(): Origin | undefined; - setOrigin(value?: Origin): void; + hasOrigin(): boolean; + clearOrigin(): void; + getOrigin(): Origin | undefined; + setOrigin(value?: Origin): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TxHeader.AsObject; - static toObject(includeInstance: boolean, msg: TxHeader): TxHeader.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TxHeader, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TxHeader; - static deserializeBinaryFromReader(message: TxHeader, reader: jspb.BinaryReader): TxHeader; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxHeader.AsObject; + static toObject(includeInstance: boolean, msg: TxHeader): TxHeader.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxHeader, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxHeader; + static deserializeBinaryFromReader(message: TxHeader, reader: jspb.BinaryReader): TxHeader; } export namespace TxHeader { - export type AsObject = { - txtype: number, - txhash: Uint8Array | string, - height: number, - index: number, - origin?: Origin.AsObject, - } -} - -export class BlockExecution extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; - - getPredecessorheight(): number; - setPredecessorheight(value: number): void; - - hasHeader(): boolean; - clearHeader(): void; - getHeader(): github_com_tendermint_tendermint_abci_types_types_pb.Header | undefined; - setHeader(value?: github_com_tendermint_tendermint_abci_types_types_pb.Header): void; - - clearTxexecutionsList(): void; - getTxexecutionsList(): Array; - setTxexecutionsList(value: Array): void; - addTxexecutions(value?: TxExecution, index?: number): TxExecution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockExecution.AsObject; - static toObject(includeInstance: boolean, msg: BlockExecution): BlockExecution.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockExecution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockExecution; - static deserializeBinaryFromReader(message: BlockExecution, reader: jspb.BinaryReader): BlockExecution; + export type AsObject = { + txtype: number, + txhash: Uint8Array | string, + height: number, + index: number, + origin?: Origin.AsObject, + } +} + +export class BlockExecution extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + getPredecessorheight(): number; + setPredecessorheight(value: number): void; + + + hasHeader(): boolean; + clearHeader(): void; + getHeader(): github_com_tendermint_tendermint_abci_types_types_pb.Header | undefined; + setHeader(value?: github_com_tendermint_tendermint_abci_types_types_pb.Header): void; + + clearTxexecutionsList(): void; + getTxexecutionsList(): Array; + setTxexecutionsList(value: Array): void; + addTxexecutions(value?: TxExecution, index?: number): TxExecution; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockExecution.AsObject; + static toObject(includeInstance: boolean, msg: BlockExecution): BlockExecution.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockExecution, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockExecution; + static deserializeBinaryFromReader(message: BlockExecution, reader: jspb.BinaryReader): BlockExecution; } export namespace BlockExecution { - export type AsObject = { - height: number, - predecessorheight: number, - header?: github_com_tendermint_tendermint_abci_types_types_pb.Header.AsObject, - txexecutionsList: Array, - } + export type AsObject = { + height: number, + predecessorheight: number, + header?: github_com_tendermint_tendermint_abci_types_types_pb.Header.AsObject, + txexecutionsList: Array, + } } -export class TxExecutionKey extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; +export class TxExecutionKey extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; - getOffset(): number; - setOffset(value: number): void; + getOffset(): number; + setOffset(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TxExecutionKey.AsObject; - static toObject(includeInstance: boolean, msg: TxExecutionKey): TxExecutionKey.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TxExecutionKey, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TxExecutionKey; - static deserializeBinaryFromReader(message: TxExecutionKey, reader: jspb.BinaryReader): TxExecutionKey; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxExecutionKey.AsObject; + static toObject(includeInstance: boolean, msg: TxExecutionKey): TxExecutionKey.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxExecutionKey, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxExecutionKey; + static deserializeBinaryFromReader(message: TxExecutionKey, reader: jspb.BinaryReader): TxExecutionKey; } export namespace TxExecutionKey { - export type AsObject = { - height: number, - offset: number, - } -} - -export class TxExecution extends jspb.Message { - hasHeader(): boolean; - clearHeader(): void; - getHeader(): TxHeader | undefined; - setHeader(value?: TxHeader): void; - - hasEnvelope(): boolean; - clearEnvelope(): void; - getEnvelope(): txs_pb.Envelope | undefined; - setEnvelope(value?: txs_pb.Envelope): void; - - clearEventsList(): void; - getEventsList(): Array; - setEventsList(value: Array): void; - addEvents(value?: Event, index?: number): Event; - - hasResult(): boolean; - clearResult(): void; - getResult(): Result | undefined; - setResult(value?: Result): void; - - hasReceipt(): boolean; - clearReceipt(): void; - getReceipt(): txs_pb.Receipt | undefined; - setReceipt(value?: txs_pb.Receipt): void; - - hasException(): boolean; - clearException(): void; - getException(): errors_pb.Exception | undefined; - setException(value?: errors_pb.Exception): void; - - clearTxexecutionsList(): void; - getTxexecutionsList(): Array; - setTxexecutionsList(value: Array): void; - addTxexecutions(value?: TxExecution, index?: number): TxExecution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TxExecution.AsObject; - static toObject(includeInstance: boolean, msg: TxExecution): TxExecution.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TxExecution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TxExecution; - static deserializeBinaryFromReader(message: TxExecution, reader: jspb.BinaryReader): TxExecution; + export type AsObject = { + height: number, + offset: number, + } +} + +export class TxExecution extends jspb.Message { + + hasHeader(): boolean; + clearHeader(): void; + getHeader(): TxHeader | undefined; + setHeader(value?: TxHeader): void; + + + hasEnvelope(): boolean; + clearEnvelope(): void; + getEnvelope(): txs_pb.Envelope | undefined; + setEnvelope(value?: txs_pb.Envelope): void; + + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): void; + addEvents(value?: Event, index?: number): Event; + + + hasResult(): boolean; + clearResult(): void; + getResult(): Result | undefined; + setResult(value?: Result): void; + + + hasReceipt(): boolean; + clearReceipt(): void; + getReceipt(): txs_pb.Receipt | undefined; + setReceipt(value?: txs_pb.Receipt): void; + + + hasException(): boolean; + clearException(): void; + getException(): errors_pb.Exception | undefined; + setException(value?: errors_pb.Exception): void; + + clearTxexecutionsList(): void; + getTxexecutionsList(): Array; + setTxexecutionsList(value: Array): void; + addTxexecutions(value?: TxExecution, index?: number): TxExecution; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxExecution.AsObject; + static toObject(includeInstance: boolean, msg: TxExecution): TxExecution.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxExecution, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxExecution; + static deserializeBinaryFromReader(message: TxExecution, reader: jspb.BinaryReader): TxExecution; } export namespace TxExecution { - export type AsObject = { - header?: TxHeader.AsObject, - envelope?: txs_pb.Envelope.AsObject, - eventsList: Array, - result?: Result.AsObject, - receipt?: txs_pb.Receipt.AsObject, - exception?: errors_pb.Exception.AsObject, - txexecutionsList: Array, - } -} - -export class Origin extends jspb.Message { - getChainid(): string; - setChainid(value: string): void; - - getHeight(): number; - setHeight(value: number): void; - - getIndex(): number; - setIndex(value: number): void; - - hasTime(): boolean; - clearTime(): void; - getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Origin.AsObject; - static toObject(includeInstance: boolean, msg: Origin): Origin.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Origin, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Origin; - static deserializeBinaryFromReader(message: Origin, reader: jspb.BinaryReader): Origin; + export type AsObject = { + header?: TxHeader.AsObject, + envelope?: txs_pb.Envelope.AsObject, + eventsList: Array, + result?: Result.AsObject, + receipt?: txs_pb.Receipt.AsObject, + exception?: errors_pb.Exception.AsObject, + txexecutionsList: Array, + } +} + +export class Origin extends jspb.Message { + getChainid(): string; + setChainid(value: string): void; + + getHeight(): number; + setHeight(value: number): void; + + getIndex(): number; + setIndex(value: number): void; + + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Origin.AsObject; + static toObject(includeInstance: boolean, msg: Origin): Origin.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Origin, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Origin; + static deserializeBinaryFromReader(message: Origin, reader: jspb.BinaryReader): Origin; } export namespace Origin { - export type AsObject = { - chainid: string, - height: number, - index: number, - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } + export type AsObject = { + chainid: string, + height: number, + index: number, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } } -export class Header extends jspb.Message { - getTxtype(): number; - setTxtype(value: number): void; +export class Header extends jspb.Message { + getTxtype(): number; + setTxtype(value: number): void; + + getTxhash(): Uint8Array | string; + getTxhash_asU8(): Uint8Array; + getTxhash_asB64(): string; + setTxhash(value: Uint8Array | string): void; - getTxhash(): Uint8Array | string; - getTxhash_asU8(): Uint8Array; - getTxhash_asB64(): string; - setTxhash(value: Uint8Array | string): void; + getEventtype(): number; + setEventtype(value: number): void; - getEventtype(): number; - setEventtype(value: number): void; + getEventid(): string; + setEventid(value: string): void; - getEventid(): string; - setEventid(value: string): void; + getHeight(): number; + setHeight(value: number): void; - getHeight(): number; - setHeight(value: number): void; + getIndex(): number; + setIndex(value: number): void; - getIndex(): number; - setIndex(value: number): void; - hasException(): boolean; - clearException(): void; - getException(): errors_pb.Exception | undefined; - setException(value?: errors_pb.Exception): void; + hasException(): boolean; + clearException(): void; + getException(): errors_pb.Exception | undefined; + setException(value?: errors_pb.Exception): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Header.AsObject; - static toObject(includeInstance: boolean, msg: Header): Header.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Header; - static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Header.AsObject; + static toObject(includeInstance: boolean, msg: Header): Header.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Header; + static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; } export namespace Header { - export type AsObject = { - txtype: number, - txhash: Uint8Array | string, - eventtype: number, - eventid: string, - height: number, - index: number, - exception?: errors_pb.Exception.AsObject, - } -} - -export class Event extends jspb.Message { - hasHeader(): boolean; - clearHeader(): void; - getHeader(): Header | undefined; - setHeader(value?: Header): void; - - hasInput(): boolean; - clearInput(): void; - getInput(): InputEvent | undefined; - setInput(value?: InputEvent): void; - - hasOutput(): boolean; - clearOutput(): void; - getOutput(): OutputEvent | undefined; - setOutput(value?: OutputEvent): void; - - hasCall(): boolean; - clearCall(): void; - getCall(): CallEvent | undefined; - setCall(value?: CallEvent): void; - - hasLog(): boolean; - clearLog(): void; - getLog(): LogEvent | undefined; - setLog(value?: LogEvent): void; - - hasGovernaccount(): boolean; - clearGovernaccount(): void; - getGovernaccount(): GovernAccountEvent | undefined; - setGovernaccount(value?: GovernAccountEvent): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Event.AsObject; - static toObject(includeInstance: boolean, msg: Event): Event.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Event, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Event; - static deserializeBinaryFromReader(message: Event, reader: jspb.BinaryReader): Event; + export type AsObject = { + txtype: number, + txhash: Uint8Array | string, + eventtype: number, + eventid: string, + height: number, + index: number, + exception?: errors_pb.Exception.AsObject, + } +} + +export class Event extends jspb.Message { + + hasHeader(): boolean; + clearHeader(): void; + getHeader(): Header | undefined; + setHeader(value?: Header): void; + + + hasInput(): boolean; + clearInput(): void; + getInput(): InputEvent | undefined; + setInput(value?: InputEvent): void; + + + hasOutput(): boolean; + clearOutput(): void; + getOutput(): OutputEvent | undefined; + setOutput(value?: OutputEvent): void; + + + hasCall(): boolean; + clearCall(): void; + getCall(): CallEvent | undefined; + setCall(value?: CallEvent): void; + + + hasLog(): boolean; + clearLog(): void; + getLog(): LogEvent | undefined; + setLog(value?: LogEvent): void; + + + hasGovernaccount(): boolean; + clearGovernaccount(): void; + getGovernaccount(): GovernAccountEvent | undefined; + setGovernaccount(value?: GovernAccountEvent): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Event.AsObject; + static toObject(includeInstance: boolean, msg: Event): Event.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Event, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Event; + static deserializeBinaryFromReader(message: Event, reader: jspb.BinaryReader): Event; } export namespace Event { - export type AsObject = { - header?: Header.AsObject, - input?: InputEvent.AsObject, - output?: OutputEvent.AsObject, - call?: CallEvent.AsObject, - log?: LogEvent.AsObject, - governaccount?: GovernAccountEvent.AsObject, - } -} - -export class Result extends jspb.Message { - getReturn(): Uint8Array | string; - getReturn_asU8(): Uint8Array; - getReturn_asB64(): string; - setReturn(value: Uint8Array | string): void; - - getGasused(): number; - setGasused(value: number): void; - - hasNameentry(): boolean; - clearNameentry(): void; - getNameentry(): names_pb.Entry | undefined; - setNameentry(value?: names_pb.Entry): void; - - hasPermargs(): boolean; - clearPermargs(): void; - getPermargs(): permission_pb.PermArgs | undefined; - setPermargs(value?: permission_pb.PermArgs): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Result.AsObject; - static toObject(includeInstance: boolean, msg: Result): Result.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Result; - static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result; + export type AsObject = { + header?: Header.AsObject, + input?: InputEvent.AsObject, + output?: OutputEvent.AsObject, + call?: CallEvent.AsObject, + log?: LogEvent.AsObject, + governaccount?: GovernAccountEvent.AsObject, + } +} + +export class Result extends jspb.Message { + getReturn(): Uint8Array | string; + getReturn_asU8(): Uint8Array; + getReturn_asB64(): string; + setReturn(value: Uint8Array | string): void; + + getGasused(): number; + setGasused(value: number): void; + + + hasNameentry(): boolean; + clearNameentry(): void; + getNameentry(): names_pb.Entry | undefined; + setNameentry(value?: names_pb.Entry): void; + + + hasPermargs(): boolean; + clearPermargs(): void; + getPermargs(): permission_pb.PermArgs | undefined; + setPermargs(value?: permission_pb.PermArgs): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result; } export namespace Result { - export type AsObject = { - return: Uint8Array | string, - gasused: number, - nameentry?: names_pb.Entry.AsObject, - permargs?: permission_pb.PermArgs.AsObject, - } -} - -export class LogEvent extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; - - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - clearTopicsList(): void; - getTopicsList(): Array; - getTopicsList_asU8(): Array; - getTopicsList_asB64(): Array; - setTopicsList(value: Array): void; - addTopics(value: Uint8Array | string, index?: number): Uint8Array | string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LogEvent.AsObject; - static toObject(includeInstance: boolean, msg: LogEvent): LogEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LogEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LogEvent; - static deserializeBinaryFromReader(message: LogEvent, reader: jspb.BinaryReader): LogEvent; + export type AsObject = { + pb_return: Uint8Array | string, + gasused: number, + nameentry?: names_pb.Entry.AsObject, + permargs?: permission_pb.PermArgs.AsObject, + } +} + +export class LogEvent extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + clearTopicsList(): void; + getTopicsList(): Array; + getTopicsList_asU8(): Array; + getTopicsList_asB64(): Array; + setTopicsList(value: Array): void; + addTopics(value: Uint8Array | string, index?: number): Uint8Array | string; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LogEvent.AsObject; + static toObject(includeInstance: boolean, msg: LogEvent): LogEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LogEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LogEvent; + static deserializeBinaryFromReader(message: LogEvent, reader: jspb.BinaryReader): LogEvent; } export namespace LogEvent { - export type AsObject = { - address: Uint8Array | string, - data: Uint8Array | string, - topicsList: Array, - } + export type AsObject = { + address: Uint8Array | string, + data: Uint8Array | string, + topicsList: Array, + } } -export class CallEvent extends jspb.Message { - getCalltype(): number; - setCalltype(value: number): void; +export class CallEvent extends jspb.Message { + getCalltype(): number; + setCalltype(value: number): void; + + + hasCalldata(): boolean; + clearCalldata(): void; + getCalldata(): CallData | undefined; + setCalldata(value?: CallData): void; - hasCalldata(): boolean; - clearCalldata(): void; - getCalldata(): CallData | undefined; - setCalldata(value?: CallData): void; + getOrigin(): Uint8Array | string; + getOrigin_asU8(): Uint8Array; + getOrigin_asB64(): string; + setOrigin(value: Uint8Array | string): void; - getOrigin(): Uint8Array | string; - getOrigin_asU8(): Uint8Array; - getOrigin_asB64(): string; - setOrigin(value: Uint8Array | string): void; + getStackdepth(): number; + setStackdepth(value: number): void; - getStackdepth(): number; - setStackdepth(value: number): void; + getReturn(): Uint8Array | string; + getReturn_asU8(): Uint8Array; + getReturn_asB64(): string; + setReturn(value: Uint8Array | string): void; - getReturn(): Uint8Array | string; - getReturn_asU8(): Uint8Array; - getReturn_asB64(): string; - setReturn(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CallEvent.AsObject; - static toObject(includeInstance: boolean, msg: CallEvent): CallEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CallEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CallEvent; - static deserializeBinaryFromReader(message: CallEvent, reader: jspb.BinaryReader): CallEvent; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CallEvent.AsObject; + static toObject(includeInstance: boolean, msg: CallEvent): CallEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CallEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CallEvent; + static deserializeBinaryFromReader(message: CallEvent, reader: jspb.BinaryReader): CallEvent; } export namespace CallEvent { - export type AsObject = { - calltype: number, - calldata?: CallData.AsObject, - origin: Uint8Array | string, - stackdepth: number, - return: Uint8Array | string, - } -} - -export class GovernAccountEvent extends jspb.Message { - hasAccountupdate(): boolean; - clearAccountupdate(): void; - getAccountupdate(): spec_pb.TemplateAccount | undefined; - setAccountupdate(value?: spec_pb.TemplateAccount): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GovernAccountEvent.AsObject; - static toObject(includeInstance: boolean, msg: GovernAccountEvent): GovernAccountEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GovernAccountEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GovernAccountEvent; - static deserializeBinaryFromReader(message: GovernAccountEvent, reader: jspb.BinaryReader): GovernAccountEvent; + export type AsObject = { + calltype: number, + calldata?: CallData.AsObject, + origin: Uint8Array | string, + stackdepth: number, + pb_return: Uint8Array | string, + } +} + +export class GovernAccountEvent extends jspb.Message { + + hasAccountupdate(): boolean; + clearAccountupdate(): void; + getAccountupdate(): spec_pb.TemplateAccount | undefined; + setAccountupdate(value?: spec_pb.TemplateAccount): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GovernAccountEvent.AsObject; + static toObject(includeInstance: boolean, msg: GovernAccountEvent): GovernAccountEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GovernAccountEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GovernAccountEvent; + static deserializeBinaryFromReader(message: GovernAccountEvent, reader: jspb.BinaryReader): GovernAccountEvent; } export namespace GovernAccountEvent { - export type AsObject = { - accountupdate?: spec_pb.TemplateAccount.AsObject, - } + export type AsObject = { + accountupdate?: spec_pb.TemplateAccount.AsObject, + } } -export class InputEvent extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; +export class InputEvent extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InputEvent.AsObject; - static toObject(includeInstance: boolean, msg: InputEvent): InputEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InputEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InputEvent; - static deserializeBinaryFromReader(message: InputEvent, reader: jspb.BinaryReader): InputEvent; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InputEvent.AsObject; + static toObject(includeInstance: boolean, msg: InputEvent): InputEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InputEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InputEvent; + static deserializeBinaryFromReader(message: InputEvent, reader: jspb.BinaryReader): InputEvent; } export namespace InputEvent { - export type AsObject = { - address: Uint8Array | string, - } + export type AsObject = { + address: Uint8Array | string, + } } -export class OutputEvent extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; +export class OutputEvent extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OutputEvent.AsObject; - static toObject(includeInstance: boolean, msg: OutputEvent): OutputEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OutputEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OutputEvent; - static deserializeBinaryFromReader(message: OutputEvent, reader: jspb.BinaryReader): OutputEvent; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OutputEvent.AsObject; + static toObject(includeInstance: boolean, msg: OutputEvent): OutputEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OutputEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OutputEvent; + static deserializeBinaryFromReader(message: OutputEvent, reader: jspb.BinaryReader): OutputEvent; } export namespace OutputEvent { - export type AsObject = { - address: Uint8Array | string, - } + export type AsObject = { + address: Uint8Array | string, + } } -export class CallData extends jspb.Message { - getCaller(): Uint8Array | string; - getCaller_asU8(): Uint8Array; - getCaller_asB64(): string; - setCaller(value: Uint8Array | string): void; +export class CallData extends jspb.Message { + getCaller(): Uint8Array | string; + getCaller_asU8(): Uint8Array; + getCaller_asB64(): string; + setCaller(value: Uint8Array | string): void; + + getCallee(): Uint8Array | string; + getCallee_asU8(): Uint8Array; + getCallee_asB64(): string; + setCallee(value: Uint8Array | string): void; - getCallee(): Uint8Array | string; - getCallee_asU8(): Uint8Array; - getCallee_asB64(): string; - setCallee(value: Uint8Array | string): void; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; + getValue(): number; + setValue(value: number): void; - getValue(): number; - setValue(value: number): void; + getGas(): number; + setGas(value: number): void; - getGas(): number; - setGas(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CallData.AsObject; - static toObject(includeInstance: boolean, msg: CallData): CallData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CallData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CallData; - static deserializeBinaryFromReader(message: CallData, reader: jspb.BinaryReader): CallData; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CallData.AsObject; + static toObject(includeInstance: boolean, msg: CallData): CallData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CallData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CallData; + static deserializeBinaryFromReader(message: CallData, reader: jspb.BinaryReader): CallData; } export namespace CallData { - export type AsObject = { - caller: Uint8Array | string, - callee: Uint8Array | string, - data: Uint8Array | string, - value: number, - gas: number, - } + export type AsObject = { + caller: Uint8Array | string, + callee: Uint8Array | string, + data: Uint8Array | string, + value: number, + gas: number, + } } - diff --git a/js/proto/exec_pb.js b/js/proto/exec_pb.js index 3278b1fec..a91541bb9 100644 --- a/js/proto/exec_pb.js +++ b/js/proto/exec_pb.js @@ -1,4 +1,3 @@ -// source: exec.proto /** * @fileoverview * @enhanceable @@ -48,6 +47,7 @@ goog.exportSymbol('proto.exec.StreamEvents', null, global); goog.exportSymbol('proto.exec.TxExecution', null, global); goog.exportSymbol('proto.exec.TxExecutionKey', null, global); goog.exportSymbol('proto.exec.TxHeader', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -63,412 +63,8 @@ proto.exec.StreamEvents = function(opt_data) { }; goog.inherits(proto.exec.StreamEvents, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.exec.StreamEvents.displayName = 'proto.exec.StreamEvents'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.StreamEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.StreamEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.StreamEvent.displayName = 'proto.exec.StreamEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.BeginBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.BeginBlock, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.BeginBlock.displayName = 'proto.exec.BeginBlock'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.EndBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.EndBlock, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.EndBlock.displayName = 'proto.exec.EndBlock'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.BeginTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.BeginTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.BeginTx.displayName = 'proto.exec.BeginTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.EndTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.EndTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.EndTx.displayName = 'proto.exec.EndTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.TxHeader = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.TxHeader, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.TxHeader.displayName = 'proto.exec.TxHeader'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.BlockExecution = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.BlockExecution.repeatedFields_, null); -}; -goog.inherits(proto.exec.BlockExecution, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.BlockExecution.displayName = 'proto.exec.BlockExecution'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.TxExecutionKey = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.TxExecutionKey, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.TxExecutionKey.displayName = 'proto.exec.TxExecutionKey'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.TxExecution = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.TxExecution.repeatedFields_, null); -}; -goog.inherits(proto.exec.TxExecution, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.TxExecution.displayName = 'proto.exec.TxExecution'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.Origin = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.Origin, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.Origin.displayName = 'proto.exec.Origin'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.Header = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.Header, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.Header.displayName = 'proto.exec.Header'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.Event = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.Event, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.Event.displayName = 'proto.exec.Event'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.Result = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.Result, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.Result.displayName = 'proto.exec.Result'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.LogEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.LogEvent.repeatedFields_, null); -}; -goog.inherits(proto.exec.LogEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.LogEvent.displayName = 'proto.exec.LogEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.CallEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.CallEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.CallEvent.displayName = 'proto.exec.CallEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.GovernAccountEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.GovernAccountEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.GovernAccountEvent.displayName = 'proto.exec.GovernAccountEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.InputEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.InputEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.InputEvent.displayName = 'proto.exec.InputEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.OutputEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.OutputEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.OutputEvent.displayName = 'proto.exec.OutputEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.CallData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.CallData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.exec.CallData.displayName = 'proto.exec.CallData'; -} - /** * List of repeated fields within this message type. * @private {!Array} @@ -480,15 +76,13 @@ proto.exec.StreamEvents.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.StreamEvents.prototype.toObject = function(opt_includeInstance) { @@ -498,8 +92,8 @@ proto.exec.StreamEvents.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.StreamEvents} msg The msg instance to transform. * @return {!Object} @@ -600,12 +194,9 @@ proto.exec.StreamEvents.prototype.getStreameventsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.exec.StreamEvents} returns this -*/ +/** @param {!Array} value */ proto.exec.StreamEvents.prototype.setStreameventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -619,29 +210,40 @@ proto.exec.StreamEvents.prototype.addStreamevents = function(opt_value, opt_inde }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.exec.StreamEvents} returns this - */ proto.exec.StreamEvents.prototype.clearStreameventsList = function() { - return this.setStreameventsList([]); + this.setStreameventsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.StreamEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.StreamEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.StreamEvent.displayName = 'proto.exec.StreamEvent'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.StreamEvent.prototype.toObject = function(opt_includeInstance) { @@ -651,8 +253,8 @@ proto.exec.StreamEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.StreamEvent} msg The msg instance to transform. * @return {!Object} @@ -822,21 +424,14 @@ proto.exec.StreamEvent.prototype.getBeginblock = function() { }; -/** - * @param {?proto.exec.BeginBlock|undefined} value - * @return {!proto.exec.StreamEvent} returns this -*/ +/** @param {?proto.exec.BeginBlock|undefined} value */ proto.exec.StreamEvent.prototype.setBeginblock = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.StreamEvent} returns this - */ proto.exec.StreamEvent.prototype.clearBeginblock = function() { - return this.setBeginblock(undefined); + this.setBeginblock(undefined); }; @@ -859,21 +454,14 @@ proto.exec.StreamEvent.prototype.getBegintx = function() { }; -/** - * @param {?proto.exec.BeginTx|undefined} value - * @return {!proto.exec.StreamEvent} returns this -*/ +/** @param {?proto.exec.BeginTx|undefined} value */ proto.exec.StreamEvent.prototype.setBegintx = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.StreamEvent} returns this - */ proto.exec.StreamEvent.prototype.clearBegintx = function() { - return this.setBegintx(undefined); + this.setBegintx(undefined); }; @@ -896,21 +484,14 @@ proto.exec.StreamEvent.prototype.getEnvelope = function() { }; -/** - * @param {?proto.txs.Envelope|undefined} value - * @return {!proto.exec.StreamEvent} returns this -*/ +/** @param {?proto.txs.Envelope|undefined} value */ proto.exec.StreamEvent.prototype.setEnvelope = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.StreamEvent} returns this - */ proto.exec.StreamEvent.prototype.clearEnvelope = function() { - return this.setEnvelope(undefined); + this.setEnvelope(undefined); }; @@ -933,21 +514,14 @@ proto.exec.StreamEvent.prototype.getEvent = function() { }; -/** - * @param {?proto.exec.Event|undefined} value - * @return {!proto.exec.StreamEvent} returns this -*/ +/** @param {?proto.exec.Event|undefined} value */ proto.exec.StreamEvent.prototype.setEvent = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + jspb.Message.setWrapperField(this, 4, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.StreamEvent} returns this - */ proto.exec.StreamEvent.prototype.clearEvent = function() { - return this.setEvent(undefined); + this.setEvent(undefined); }; @@ -970,21 +544,14 @@ proto.exec.StreamEvent.prototype.getEndtx = function() { }; -/** - * @param {?proto.exec.EndTx|undefined} value - * @return {!proto.exec.StreamEvent} returns this -*/ +/** @param {?proto.exec.EndTx|undefined} value */ proto.exec.StreamEvent.prototype.setEndtx = function(value) { - return jspb.Message.setWrapperField(this, 5, value); + jspb.Message.setWrapperField(this, 5, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.StreamEvent} returns this - */ proto.exec.StreamEvent.prototype.clearEndtx = function() { - return this.setEndtx(undefined); + this.setEndtx(undefined); }; @@ -1007,21 +574,14 @@ proto.exec.StreamEvent.prototype.getEndblock = function() { }; -/** - * @param {?proto.exec.EndBlock|undefined} value - * @return {!proto.exec.StreamEvent} returns this -*/ +/** @param {?proto.exec.EndBlock|undefined} value */ proto.exec.StreamEvent.prototype.setEndblock = function(value) { - return jspb.Message.setWrapperField(this, 6, value); + jspb.Message.setWrapperField(this, 6, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.StreamEvent} returns this - */ proto.exec.StreamEvent.prototype.clearEndblock = function() { - return this.setEndblock(undefined); + this.setEndblock(undefined); }; @@ -1035,19 +595,34 @@ proto.exec.StreamEvent.prototype.hasEndblock = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.BeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.BeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.BeginBlock.displayName = 'proto.exec.BeginBlock'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.BeginBlock.prototype.toObject = function(opt_includeInstance) { @@ -1057,8 +632,8 @@ proto.exec.BeginBlock.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.BeginBlock} msg The msg instance to transform. * @return {!Object} @@ -1193,12 +768,9 @@ proto.exec.BeginBlock.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.exec.BeginBlock} returns this - */ +/** @param {number} value */ proto.exec.BeginBlock.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -1211,12 +783,9 @@ proto.exec.BeginBlock.prototype.getNumtxs = function() { }; -/** - * @param {number} value - * @return {!proto.exec.BeginBlock} returns this - */ +/** @param {number} value */ proto.exec.BeginBlock.prototype.setNumtxs = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; @@ -1229,12 +798,9 @@ proto.exec.BeginBlock.prototype.getPredecessorheight = function() { }; -/** - * @param {number} value - * @return {!proto.exec.BeginBlock} returns this - */ +/** @param {number} value */ proto.exec.BeginBlock.prototype.setPredecessorheight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3IntField(this, 4, value); }; @@ -1248,21 +814,14 @@ proto.exec.BeginBlock.prototype.getHeader = function() { }; -/** - * @param {?proto.types.Header|undefined} value - * @return {!proto.exec.BeginBlock} returns this -*/ +/** @param {?proto.types.Header|undefined} value */ proto.exec.BeginBlock.prototype.setHeader = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.BeginBlock} returns this - */ proto.exec.BeginBlock.prototype.clearHeader = function() { - return this.setHeader(undefined); + this.setHeader(undefined); }; @@ -1276,19 +835,34 @@ proto.exec.BeginBlock.prototype.hasHeader = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.EndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.EndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.EndBlock.displayName = 'proto.exec.EndBlock'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.EndBlock.prototype.toObject = function(opt_includeInstance) { @@ -1298,8 +872,8 @@ proto.exec.EndBlock.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.EndBlock} msg The msg instance to transform. * @return {!Object} @@ -1396,29 +970,41 @@ proto.exec.EndBlock.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.exec.EndBlock} returns this - */ +/** @param {number} value */ proto.exec.EndBlock.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.BeginTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.BeginTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.BeginTx.displayName = 'proto.exec.BeginTx'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.BeginTx.prototype.toObject = function(opt_includeInstance) { @@ -1428,8 +1014,8 @@ proto.exec.BeginTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.BeginTx} msg The msg instance to transform. * @return {!Object} @@ -1569,21 +1155,14 @@ proto.exec.BeginTx.prototype.getTxheader = function() { }; -/** - * @param {?proto.exec.TxHeader|undefined} value - * @return {!proto.exec.BeginTx} returns this -*/ +/** @param {?proto.exec.TxHeader|undefined} value */ proto.exec.BeginTx.prototype.setTxheader = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.BeginTx} returns this - */ proto.exec.BeginTx.prototype.clearTxheader = function() { - return this.setTxheader(undefined); + this.setTxheader(undefined); }; @@ -1605,12 +1184,9 @@ proto.exec.BeginTx.prototype.getNumevents = function() { }; -/** - * @param {number} value - * @return {!proto.exec.BeginTx} returns this - */ +/** @param {number} value */ proto.exec.BeginTx.prototype.setNumevents = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3IntField(this, 5, value); }; @@ -1624,21 +1200,14 @@ proto.exec.BeginTx.prototype.getResult = function() { }; -/** - * @param {?proto.exec.Result|undefined} value - * @return {!proto.exec.BeginTx} returns this -*/ +/** @param {?proto.exec.Result|undefined} value */ proto.exec.BeginTx.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.BeginTx} returns this - */ proto.exec.BeginTx.prototype.clearResult = function() { - return this.setResult(undefined); + this.setResult(undefined); }; @@ -1661,21 +1230,14 @@ proto.exec.BeginTx.prototype.getException = function() { }; -/** - * @param {?proto.errors.Exception|undefined} value - * @return {!proto.exec.BeginTx} returns this -*/ +/** @param {?proto.errors.Exception|undefined} value */ proto.exec.BeginTx.prototype.setException = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + jspb.Message.setWrapperField(this, 4, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.BeginTx} returns this - */ proto.exec.BeginTx.prototype.clearException = function() { - return this.setException(undefined); + this.setException(undefined); }; @@ -1689,19 +1251,34 @@ proto.exec.BeginTx.prototype.hasException = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.EndTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.EndTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.EndTx.displayName = 'proto.exec.EndTx'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.EndTx.prototype.toObject = function(opt_includeInstance) { @@ -1711,8 +1288,8 @@ proto.exec.EndTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.EndTx} msg The msg instance to transform. * @return {!Object} @@ -1833,29 +1410,41 @@ proto.exec.EndTx.prototype.getTxhash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.EndTx} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.EndTx.prototype.setTxhash = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setProto3BytesField(this, 3, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.TxHeader = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.TxHeader, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.TxHeader.displayName = 'proto.exec.TxHeader'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.TxHeader.prototype.toObject = function(opt_includeInstance) { @@ -1865,8 +1454,8 @@ proto.exec.TxHeader.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.TxHeader} msg The msg instance to transform. * @return {!Object} @@ -2013,12 +1602,9 @@ proto.exec.TxHeader.prototype.getTxtype = function() { }; -/** - * @param {number} value - * @return {!proto.exec.TxHeader} returns this - */ +/** @param {number} value */ proto.exec.TxHeader.prototype.setTxtype = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -2055,12 +1641,9 @@ proto.exec.TxHeader.prototype.getTxhash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.TxHeader} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.TxHeader.prototype.setTxhash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -2073,12 +1656,9 @@ proto.exec.TxHeader.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.exec.TxHeader} returns this - */ +/** @param {number} value */ proto.exec.TxHeader.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; @@ -2091,12 +1671,9 @@ proto.exec.TxHeader.prototype.getIndex = function() { }; -/** - * @param {number} value - * @return {!proto.exec.TxHeader} returns this - */ +/** @param {number} value */ proto.exec.TxHeader.prototype.setIndex = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3IntField(this, 4, value); }; @@ -2110,21 +1687,14 @@ proto.exec.TxHeader.prototype.getOrigin = function() { }; -/** - * @param {?proto.exec.Origin|undefined} value - * @return {!proto.exec.TxHeader} returns this -*/ +/** @param {?proto.exec.Origin|undefined} value */ proto.exec.TxHeader.prototype.setOrigin = function(value) { - return jspb.Message.setWrapperField(this, 5, value); + jspb.Message.setWrapperField(this, 5, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.TxHeader} returns this - */ proto.exec.TxHeader.prototype.clearOrigin = function() { - return this.setOrigin(undefined); + this.setOrigin(undefined); }; @@ -2138,6 +1708,23 @@ proto.exec.TxHeader.prototype.hasOrigin = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.BlockExecution = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.BlockExecution.repeatedFields_, null); +}; +goog.inherits(proto.exec.BlockExecution, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.BlockExecution.displayName = 'proto.exec.BlockExecution'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -2149,15 +1736,13 @@ proto.exec.BlockExecution.repeatedFields_ = [3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.BlockExecution.prototype.toObject = function(opt_includeInstance) { @@ -2167,8 +1752,8 @@ proto.exec.BlockExecution.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.BlockExecution} msg The msg instance to transform. * @return {!Object} @@ -2306,12 +1891,9 @@ proto.exec.BlockExecution.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.exec.BlockExecution} returns this - */ +/** @param {number} value */ proto.exec.BlockExecution.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -2324,12 +1906,9 @@ proto.exec.BlockExecution.prototype.getPredecessorheight = function() { }; -/** - * @param {number} value - * @return {!proto.exec.BlockExecution} returns this - */ +/** @param {number} value */ proto.exec.BlockExecution.prototype.setPredecessorheight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3IntField(this, 4, value); }; @@ -2343,21 +1922,14 @@ proto.exec.BlockExecution.prototype.getHeader = function() { }; -/** - * @param {?proto.types.Header|undefined} value - * @return {!proto.exec.BlockExecution} returns this -*/ +/** @param {?proto.types.Header|undefined} value */ proto.exec.BlockExecution.prototype.setHeader = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.BlockExecution} returns this - */ proto.exec.BlockExecution.prototype.clearHeader = function() { - return this.setHeader(undefined); + this.setHeader(undefined); }; @@ -2380,12 +1952,9 @@ proto.exec.BlockExecution.prototype.getTxexecutionsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.exec.BlockExecution} returns this -*/ +/** @param {!Array} value */ proto.exec.BlockExecution.prototype.setTxexecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); + jspb.Message.setRepeatedWrapperField(this, 3, value); }; @@ -2399,29 +1968,40 @@ proto.exec.BlockExecution.prototype.addTxexecutions = function(opt_value, opt_in }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.exec.BlockExecution} returns this - */ proto.exec.BlockExecution.prototype.clearTxexecutionsList = function() { - return this.setTxexecutionsList([]); + this.setTxexecutionsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.TxExecutionKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.TxExecutionKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.TxExecutionKey.displayName = 'proto.exec.TxExecutionKey'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.TxExecutionKey.prototype.toObject = function(opt_includeInstance) { @@ -2431,8 +2011,8 @@ proto.exec.TxExecutionKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.TxExecutionKey} msg The msg instance to transform. * @return {!Object} @@ -2541,12 +2121,9 @@ proto.exec.TxExecutionKey.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.exec.TxExecutionKey} returns this - */ +/** @param {number} value */ proto.exec.TxExecutionKey.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -2559,16 +2136,30 @@ proto.exec.TxExecutionKey.prototype.getOffset = function() { }; -/** - * @param {number} value - * @return {!proto.exec.TxExecutionKey} returns this - */ +/** @param {number} value */ proto.exec.TxExecutionKey.prototype.setOffset = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.TxExecution = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.TxExecution.repeatedFields_, null); +}; +goog.inherits(proto.exec.TxExecution, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.TxExecution.displayName = 'proto.exec.TxExecution'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -2580,15 +2171,13 @@ proto.exec.TxExecution.repeatedFields_ = [7,11]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.TxExecution.prototype.toObject = function(opt_includeInstance) { @@ -2598,8 +2187,8 @@ proto.exec.TxExecution.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.TxExecution} msg The msg instance to transform. * @return {!Object} @@ -2785,21 +2374,14 @@ proto.exec.TxExecution.prototype.getHeader = function() { }; -/** - * @param {?proto.exec.TxHeader|undefined} value - * @return {!proto.exec.TxExecution} returns this -*/ +/** @param {?proto.exec.TxHeader|undefined} value */ proto.exec.TxExecution.prototype.setHeader = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.TxExecution} returns this - */ proto.exec.TxExecution.prototype.clearHeader = function() { - return this.setHeader(undefined); + this.setHeader(undefined); }; @@ -2822,21 +2404,14 @@ proto.exec.TxExecution.prototype.getEnvelope = function() { }; -/** - * @param {?proto.txs.Envelope|undefined} value - * @return {!proto.exec.TxExecution} returns this -*/ +/** @param {?proto.txs.Envelope|undefined} value */ proto.exec.TxExecution.prototype.setEnvelope = function(value) { - return jspb.Message.setWrapperField(this, 6, value); + jspb.Message.setWrapperField(this, 6, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.TxExecution} returns this - */ proto.exec.TxExecution.prototype.clearEnvelope = function() { - return this.setEnvelope(undefined); + this.setEnvelope(undefined); }; @@ -2859,12 +2434,9 @@ proto.exec.TxExecution.prototype.getEventsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.exec.TxExecution} returns this -*/ +/** @param {!Array} value */ proto.exec.TxExecution.prototype.setEventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); + jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -2878,12 +2450,8 @@ proto.exec.TxExecution.prototype.addEvents = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.exec.TxExecution} returns this - */ proto.exec.TxExecution.prototype.clearEventsList = function() { - return this.setEventsList([]); + this.setEventsList([]); }; @@ -2897,21 +2465,14 @@ proto.exec.TxExecution.prototype.getResult = function() { }; -/** - * @param {?proto.exec.Result|undefined} value - * @return {!proto.exec.TxExecution} returns this -*/ +/** @param {?proto.exec.Result|undefined} value */ proto.exec.TxExecution.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 8, value); + jspb.Message.setWrapperField(this, 8, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.TxExecution} returns this - */ proto.exec.TxExecution.prototype.clearResult = function() { - return this.setResult(undefined); + this.setResult(undefined); }; @@ -2934,21 +2495,14 @@ proto.exec.TxExecution.prototype.getReceipt = function() { }; -/** - * @param {?proto.txs.Receipt|undefined} value - * @return {!proto.exec.TxExecution} returns this -*/ +/** @param {?proto.txs.Receipt|undefined} value */ proto.exec.TxExecution.prototype.setReceipt = function(value) { - return jspb.Message.setWrapperField(this, 9, value); + jspb.Message.setWrapperField(this, 9, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.TxExecution} returns this - */ proto.exec.TxExecution.prototype.clearReceipt = function() { - return this.setReceipt(undefined); + this.setReceipt(undefined); }; @@ -2971,21 +2525,14 @@ proto.exec.TxExecution.prototype.getException = function() { }; -/** - * @param {?proto.errors.Exception|undefined} value - * @return {!proto.exec.TxExecution} returns this -*/ +/** @param {?proto.errors.Exception|undefined} value */ proto.exec.TxExecution.prototype.setException = function(value) { - return jspb.Message.setWrapperField(this, 10, value); + jspb.Message.setWrapperField(this, 10, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.TxExecution} returns this - */ proto.exec.TxExecution.prototype.clearException = function() { - return this.setException(undefined); + this.setException(undefined); }; @@ -3008,12 +2555,9 @@ proto.exec.TxExecution.prototype.getTxexecutionsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.exec.TxExecution} returns this -*/ +/** @param {!Array} value */ proto.exec.TxExecution.prototype.setTxexecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 11, value); + jspb.Message.setRepeatedWrapperField(this, 11, value); }; @@ -3027,29 +2571,40 @@ proto.exec.TxExecution.prototype.addTxexecutions = function(opt_value, opt_index }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.exec.TxExecution} returns this - */ proto.exec.TxExecution.prototype.clearTxexecutionsList = function() { - return this.setTxexecutionsList([]); + this.setTxexecutionsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.Origin = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.Origin, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.Origin.displayName = 'proto.exec.Origin'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.Origin.prototype.toObject = function(opt_includeInstance) { @@ -3059,8 +2614,8 @@ proto.exec.Origin.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Origin} msg The msg instance to transform. * @return {!Object} @@ -3195,12 +2750,9 @@ proto.exec.Origin.prototype.getChainid = function() { }; -/** - * @param {string} value - * @return {!proto.exec.Origin} returns this - */ +/** @param {string} value */ proto.exec.Origin.prototype.setChainid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -3213,12 +2765,9 @@ proto.exec.Origin.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.exec.Origin} returns this - */ +/** @param {number} value */ proto.exec.Origin.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; @@ -3230,13 +2779,10 @@ proto.exec.Origin.prototype.getIndex = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; - -/** - * @param {number} value - * @return {!proto.exec.Origin} returns this - */ + +/** @param {number} value */ proto.exec.Origin.prototype.setIndex = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; @@ -3250,21 +2796,14 @@ proto.exec.Origin.prototype.getTime = function() { }; -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.exec.Origin} returns this -*/ +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ proto.exec.Origin.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + jspb.Message.setWrapperField(this, 4, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.Origin} returns this - */ proto.exec.Origin.prototype.clearTime = function() { - return this.setTime(undefined); + this.setTime(undefined); }; @@ -3278,19 +2817,34 @@ proto.exec.Origin.prototype.hasTime = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.Header.displayName = 'proto.exec.Header'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.Header.prototype.toObject = function(opt_includeInstance) { @@ -3300,8 +2854,8 @@ proto.exec.Header.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Header} msg The msg instance to transform. * @return {!Object} @@ -3472,12 +3026,9 @@ proto.exec.Header.prototype.getTxtype = function() { }; -/** - * @param {number} value - * @return {!proto.exec.Header} returns this - */ +/** @param {number} value */ proto.exec.Header.prototype.setTxtype = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -3514,12 +3065,9 @@ proto.exec.Header.prototype.getTxhash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.Header} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.Header.prototype.setTxhash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -3532,12 +3080,9 @@ proto.exec.Header.prototype.getEventtype = function() { }; -/** - * @param {number} value - * @return {!proto.exec.Header} returns this - */ +/** @param {number} value */ proto.exec.Header.prototype.setEventtype = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; @@ -3550,12 +3095,9 @@ proto.exec.Header.prototype.getEventid = function() { }; -/** - * @param {string} value - * @return {!proto.exec.Header} returns this - */ +/** @param {string} value */ proto.exec.Header.prototype.setEventid = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); + jspb.Message.setProto3StringField(this, 4, value); }; @@ -3568,12 +3110,9 @@ proto.exec.Header.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.exec.Header} returns this - */ +/** @param {number} value */ proto.exec.Header.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3IntField(this, 5, value); }; @@ -3586,12 +3125,9 @@ proto.exec.Header.prototype.getIndex = function() { }; -/** - * @param {number} value - * @return {!proto.exec.Header} returns this - */ +/** @param {number} value */ proto.exec.Header.prototype.setIndex = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3IntField(this, 6, value); }; @@ -3605,21 +3141,14 @@ proto.exec.Header.prototype.getException = function() { }; -/** - * @param {?proto.errors.Exception|undefined} value - * @return {!proto.exec.Header} returns this -*/ +/** @param {?proto.errors.Exception|undefined} value */ proto.exec.Header.prototype.setException = function(value) { - return jspb.Message.setWrapperField(this, 7, value); + jspb.Message.setWrapperField(this, 7, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.Header} returns this - */ proto.exec.Header.prototype.clearException = function() { - return this.setException(undefined); + this.setException(undefined); }; @@ -3633,19 +3162,34 @@ proto.exec.Header.prototype.hasException = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.Event = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.Event, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.Event.displayName = 'proto.exec.Event'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.Event.prototype.toObject = function(opt_includeInstance) { @@ -3655,8 +3199,8 @@ proto.exec.Event.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Event} msg The msg instance to transform. * @return {!Object} @@ -3826,21 +3370,14 @@ proto.exec.Event.prototype.getHeader = function() { }; -/** - * @param {?proto.exec.Header|undefined} value - * @return {!proto.exec.Event} returns this -*/ +/** @param {?proto.exec.Header|undefined} value */ proto.exec.Event.prototype.setHeader = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.Event} returns this - */ proto.exec.Event.prototype.clearHeader = function() { - return this.setHeader(undefined); + this.setHeader(undefined); }; @@ -3863,21 +3400,14 @@ proto.exec.Event.prototype.getInput = function() { }; -/** - * @param {?proto.exec.InputEvent|undefined} value - * @return {!proto.exec.Event} returns this -*/ +/** @param {?proto.exec.InputEvent|undefined} value */ proto.exec.Event.prototype.setInput = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.Event} returns this - */ proto.exec.Event.prototype.clearInput = function() { - return this.setInput(undefined); + this.setInput(undefined); }; @@ -3900,21 +3430,14 @@ proto.exec.Event.prototype.getOutput = function() { }; -/** - * @param {?proto.exec.OutputEvent|undefined} value - * @return {!proto.exec.Event} returns this -*/ +/** @param {?proto.exec.OutputEvent|undefined} value */ proto.exec.Event.prototype.setOutput = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.Event} returns this - */ proto.exec.Event.prototype.clearOutput = function() { - return this.setOutput(undefined); + this.setOutput(undefined); }; @@ -3937,21 +3460,14 @@ proto.exec.Event.prototype.getCall = function() { }; -/** - * @param {?proto.exec.CallEvent|undefined} value - * @return {!proto.exec.Event} returns this -*/ +/** @param {?proto.exec.CallEvent|undefined} value */ proto.exec.Event.prototype.setCall = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + jspb.Message.setWrapperField(this, 4, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.Event} returns this - */ proto.exec.Event.prototype.clearCall = function() { - return this.setCall(undefined); + this.setCall(undefined); }; @@ -3974,21 +3490,14 @@ proto.exec.Event.prototype.getLog = function() { }; -/** - * @param {?proto.exec.LogEvent|undefined} value - * @return {!proto.exec.Event} returns this -*/ +/** @param {?proto.exec.LogEvent|undefined} value */ proto.exec.Event.prototype.setLog = function(value) { - return jspb.Message.setWrapperField(this, 5, value); + jspb.Message.setWrapperField(this, 5, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.Event} returns this - */ proto.exec.Event.prototype.clearLog = function() { - return this.setLog(undefined); + this.setLog(undefined); }; @@ -4011,21 +3520,14 @@ proto.exec.Event.prototype.getGovernaccount = function() { }; -/** - * @param {?proto.exec.GovernAccountEvent|undefined} value - * @return {!proto.exec.Event} returns this -*/ +/** @param {?proto.exec.GovernAccountEvent|undefined} value */ proto.exec.Event.prototype.setGovernaccount = function(value) { - return jspb.Message.setWrapperField(this, 6, value); + jspb.Message.setWrapperField(this, 6, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.Event} returns this - */ proto.exec.Event.prototype.clearGovernaccount = function() { - return this.setGovernaccount(undefined); + this.setGovernaccount(undefined); }; @@ -4039,19 +3541,34 @@ proto.exec.Event.prototype.hasGovernaccount = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.Result = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.Result, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.Result.displayName = 'proto.exec.Result'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.Result.prototype.toObject = function(opt_includeInstance) { @@ -4061,8 +3578,8 @@ proto.exec.Result.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Result} msg The msg instance to transform. * @return {!Object} @@ -4223,12 +3740,9 @@ proto.exec.Result.prototype.getReturn_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.Result} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.Result.prototype.setReturn = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -4241,12 +3755,9 @@ proto.exec.Result.prototype.getGasused = function() { }; -/** - * @param {number} value - * @return {!proto.exec.Result} returns this - */ +/** @param {number} value */ proto.exec.Result.prototype.setGasused = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; @@ -4260,21 +3771,14 @@ proto.exec.Result.prototype.getNameentry = function() { }; -/** - * @param {?proto.names.Entry|undefined} value - * @return {!proto.exec.Result} returns this -*/ +/** @param {?proto.names.Entry|undefined} value */ proto.exec.Result.prototype.setNameentry = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.Result} returns this - */ proto.exec.Result.prototype.clearNameentry = function() { - return this.setNameentry(undefined); + this.setNameentry(undefined); }; @@ -4297,21 +3801,14 @@ proto.exec.Result.prototype.getPermargs = function() { }; -/** - * @param {?proto.permission.PermArgs|undefined} value - * @return {!proto.exec.Result} returns this -*/ +/** @param {?proto.permission.PermArgs|undefined} value */ proto.exec.Result.prototype.setPermargs = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + jspb.Message.setWrapperField(this, 4, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.Result} returns this - */ proto.exec.Result.prototype.clearPermargs = function() { - return this.setPermargs(undefined); + this.setPermargs(undefined); }; @@ -4325,6 +3822,23 @@ proto.exec.Result.prototype.hasPermargs = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.LogEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.LogEvent.repeatedFields_, null); +}; +goog.inherits(proto.exec.LogEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.LogEvent.displayName = 'proto.exec.LogEvent'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -4336,15 +3850,13 @@ proto.exec.LogEvent.repeatedFields_ = [3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.LogEvent.prototype.toObject = function(opt_includeInstance) { @@ -4354,8 +3866,8 @@ proto.exec.LogEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.LogEvent} msg The msg instance to transform. * @return {!Object} @@ -4500,12 +4012,9 @@ proto.exec.LogEvent.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.LogEvent} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.LogEvent.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -4542,12 +4051,9 @@ proto.exec.LogEvent.prototype.getData_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.LogEvent} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.LogEvent.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4584,48 +4090,55 @@ proto.exec.LogEvent.prototype.getTopicsList_asU8 = function() { }; -/** - * @param {!(Array|Array)} value - * @return {!proto.exec.LogEvent} returns this - */ +/** @param {!(Array|Array)} value */ proto.exec.LogEvent.prototype.setTopicsList = function(value) { - return jspb.Message.setField(this, 3, value || []); + jspb.Message.setField(this, 3, value || []); }; /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index - * @return {!proto.exec.LogEvent} returns this */ proto.exec.LogEvent.prototype.addTopics = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); + jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.exec.LogEvent} returns this - */ proto.exec.LogEvent.prototype.clearTopicsList = function() { - return this.setTopicsList([]); + this.setTopicsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.CallEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.CallEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.CallEvent.displayName = 'proto.exec.CallEvent'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.CallEvent.prototype.toObject = function(opt_includeInstance) { @@ -4635,8 +4148,8 @@ proto.exec.CallEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.CallEvent} msg The msg instance to transform. * @return {!Object} @@ -4783,12 +4296,9 @@ proto.exec.CallEvent.prototype.getCalltype = function() { }; -/** - * @param {number} value - * @return {!proto.exec.CallEvent} returns this - */ +/** @param {number} value */ proto.exec.CallEvent.prototype.setCalltype = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3IntField(this, 5, value); }; @@ -4802,21 +4312,14 @@ proto.exec.CallEvent.prototype.getCalldata = function() { }; -/** - * @param {?proto.exec.CallData|undefined} value - * @return {!proto.exec.CallEvent} returns this -*/ +/** @param {?proto.exec.CallData|undefined} value */ proto.exec.CallEvent.prototype.setCalldata = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.CallEvent} returns this - */ proto.exec.CallEvent.prototype.clearCalldata = function() { - return this.setCalldata(undefined); + this.setCalldata(undefined); }; @@ -4862,12 +4365,9 @@ proto.exec.CallEvent.prototype.getOrigin_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.CallEvent} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.CallEvent.prototype.setOrigin = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4880,12 +4380,9 @@ proto.exec.CallEvent.prototype.getStackdepth = function() { }; -/** - * @param {number} value - * @return {!proto.exec.CallEvent} returns this - */ +/** @param {number} value */ proto.exec.CallEvent.prototype.setStackdepth = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; @@ -4922,29 +4419,41 @@ proto.exec.CallEvent.prototype.getReturn_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.CallEvent} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.CallEvent.prototype.setReturn = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); + jspb.Message.setProto3BytesField(this, 4, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.GovernAccountEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.GovernAccountEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.GovernAccountEvent.displayName = 'proto.exec.GovernAccountEvent'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.GovernAccountEvent.prototype.toObject = function(opt_includeInstance) { @@ -4954,8 +4463,8 @@ proto.exec.GovernAccountEvent.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.GovernAccountEvent} msg The msg instance to transform. * @return {!Object} @@ -5055,21 +4564,14 @@ proto.exec.GovernAccountEvent.prototype.getAccountupdate = function() { }; -/** - * @param {?proto.spec.TemplateAccount|undefined} value - * @return {!proto.exec.GovernAccountEvent} returns this -*/ +/** @param {?proto.spec.TemplateAccount|undefined} value */ proto.exec.GovernAccountEvent.prototype.setAccountupdate = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.exec.GovernAccountEvent} returns this - */ proto.exec.GovernAccountEvent.prototype.clearAccountupdate = function() { - return this.setAccountupdate(undefined); + this.setAccountupdate(undefined); }; @@ -5083,19 +4585,34 @@ proto.exec.GovernAccountEvent.prototype.hasAccountupdate = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.InputEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.InputEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.InputEvent.displayName = 'proto.exec.InputEvent'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.InputEvent.prototype.toObject = function(opt_includeInstance) { @@ -5105,8 +4622,8 @@ proto.exec.InputEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.InputEvent} msg The msg instance to transform. * @return {!Object} @@ -5227,29 +4744,41 @@ proto.exec.InputEvent.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.InputEvent} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.InputEvent.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.OutputEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.OutputEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.OutputEvent.displayName = 'proto.exec.OutputEvent'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.OutputEvent.prototype.toObject = function(opt_includeInstance) { @@ -5259,8 +4788,8 @@ proto.exec.OutputEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.OutputEvent} msg The msg instance to transform. * @return {!Object} @@ -5381,29 +4910,41 @@ proto.exec.OutputEvent.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.OutputEvent} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.OutputEvent.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.CallData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.CallData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.exec.CallData.displayName = 'proto.exec.CallData'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.exec.CallData.prototype.toObject = function(opt_includeInstance) { @@ -5413,8 +4954,8 @@ proto.exec.CallData.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.CallData} msg The msg instance to transform. * @return {!Object} @@ -5583,12 +5124,9 @@ proto.exec.CallData.prototype.getCaller_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.CallData} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.CallData.prototype.setCaller = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -5625,12 +5163,9 @@ proto.exec.CallData.prototype.getCallee_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.CallData} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.CallData.prototype.setCallee = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -5667,12 +5202,9 @@ proto.exec.CallData.prototype.getData_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.exec.CallData} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.exec.CallData.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setProto3BytesField(this, 3, value); }; @@ -5685,12 +5217,9 @@ proto.exec.CallData.prototype.getValue = function() { }; -/** - * @param {number} value - * @return {!proto.exec.CallData} returns this - */ +/** @param {number} value */ proto.exec.CallData.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3IntField(this, 4, value); }; @@ -5703,12 +5232,9 @@ proto.exec.CallData.prototype.getGas = function() { }; -/** - * @param {number} value - * @return {!proto.exec.CallData} returns this - */ +/** @param {number} value */ proto.exec.CallData.prototype.setGas = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3IntField(this, 5, value); }; diff --git a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.d.ts b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.d.ts b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.d.ts index e1c3a368a..0c29d5510 100644 --- a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.d.ts +++ b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.d.ts @@ -1,158 +1,160 @@ // package: gogoproto // file: github.com/gogo/protobuf/gogoproto/gogo.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; - export const goprotoEnumPrefix: jspb.ExtensionFieldInfo; - - export const goprotoEnumStringer: jspb.ExtensionFieldInfo; +export const goprotoEnumPrefix: jspb.ExtensionFieldInfo; - export const enumStringer: jspb.ExtensionFieldInfo; +export const goprotoEnumStringer: jspb.ExtensionFieldInfo; - export const enumCustomname: jspb.ExtensionFieldInfo; +export const enumStringer: jspb.ExtensionFieldInfo; - export const enumdecl: jspb.ExtensionFieldInfo; +export const enumCustomname: jspb.ExtensionFieldInfo; - export const enumvalueCustomname: jspb.ExtensionFieldInfo; +export const enumdecl: jspb.ExtensionFieldInfo; - export const goprotoGettersAll: jspb.ExtensionFieldInfo; +export const enumvalueCustomname: jspb.ExtensionFieldInfo; - export const goprotoEnumPrefixAll: jspb.ExtensionFieldInfo; +export const goprotoGettersAll: jspb.ExtensionFieldInfo; - export const goprotoStringerAll: jspb.ExtensionFieldInfo; +export const goprotoEnumPrefixAll: jspb.ExtensionFieldInfo; - export const verboseEqualAll: jspb.ExtensionFieldInfo; +export const goprotoStringerAll: jspb.ExtensionFieldInfo; - export const faceAll: jspb.ExtensionFieldInfo; +export const verboseEqualAll: jspb.ExtensionFieldInfo; - export const gostringAll: jspb.ExtensionFieldInfo; +export const faceAll: jspb.ExtensionFieldInfo; - export const populateAll: jspb.ExtensionFieldInfo; +export const gostringAll: jspb.ExtensionFieldInfo; - export const stringerAll: jspb.ExtensionFieldInfo; +export const populateAll: jspb.ExtensionFieldInfo; - export const onlyoneAll: jspb.ExtensionFieldInfo; +export const stringerAll: jspb.ExtensionFieldInfo; - export const equalAll: jspb.ExtensionFieldInfo; +export const onlyoneAll: jspb.ExtensionFieldInfo; - export const descriptionAll: jspb.ExtensionFieldInfo; +export const equalAll: jspb.ExtensionFieldInfo; - export const testgenAll: jspb.ExtensionFieldInfo; +export const descriptionAll: jspb.ExtensionFieldInfo; - export const benchgenAll: jspb.ExtensionFieldInfo; +export const testgenAll: jspb.ExtensionFieldInfo; - export const marshalerAll: jspb.ExtensionFieldInfo; +export const benchgenAll: jspb.ExtensionFieldInfo; - export const unmarshalerAll: jspb.ExtensionFieldInfo; +export const marshalerAll: jspb.ExtensionFieldInfo; - export const stableMarshalerAll: jspb.ExtensionFieldInfo; +export const unmarshalerAll: jspb.ExtensionFieldInfo; - export const sizerAll: jspb.ExtensionFieldInfo; +export const stableMarshalerAll: jspb.ExtensionFieldInfo; - export const goprotoEnumStringerAll: jspb.ExtensionFieldInfo; +export const sizerAll: jspb.ExtensionFieldInfo; - export const enumStringerAll: jspb.ExtensionFieldInfo; +export const goprotoEnumStringerAll: jspb.ExtensionFieldInfo; - export const unsafeMarshalerAll: jspb.ExtensionFieldInfo; +export const enumStringerAll: jspb.ExtensionFieldInfo; - export const unsafeUnmarshalerAll: jspb.ExtensionFieldInfo; +export const unsafeMarshalerAll: jspb.ExtensionFieldInfo; - export const goprotoExtensionsMapAll: jspb.ExtensionFieldInfo; +export const unsafeUnmarshalerAll: jspb.ExtensionFieldInfo; - export const goprotoUnrecognizedAll: jspb.ExtensionFieldInfo; +export const goprotoExtensionsMapAll: jspb.ExtensionFieldInfo; - export const gogoprotoImport: jspb.ExtensionFieldInfo; +export const goprotoUnrecognizedAll: jspb.ExtensionFieldInfo; - export const protosizerAll: jspb.ExtensionFieldInfo; +export const gogoprotoImport: jspb.ExtensionFieldInfo; - export const compareAll: jspb.ExtensionFieldInfo; +export const protosizerAll: jspb.ExtensionFieldInfo; - export const typedeclAll: jspb.ExtensionFieldInfo; +export const compareAll: jspb.ExtensionFieldInfo; - export const enumdeclAll: jspb.ExtensionFieldInfo; +export const typedeclAll: jspb.ExtensionFieldInfo; - export const goprotoRegistration: jspb.ExtensionFieldInfo; +export const enumdeclAll: jspb.ExtensionFieldInfo; - export const messagenameAll: jspb.ExtensionFieldInfo; +export const goprotoRegistration: jspb.ExtensionFieldInfo; - export const goprotoSizecacheAll: jspb.ExtensionFieldInfo; +export const messagenameAll: jspb.ExtensionFieldInfo; - export const goprotoUnkeyedAll: jspb.ExtensionFieldInfo; +export const goprotoSizecacheAll: jspb.ExtensionFieldInfo; - export const goprotoGetters: jspb.ExtensionFieldInfo; +export const goprotoUnkeyedAll: jspb.ExtensionFieldInfo; - export const goprotoStringer: jspb.ExtensionFieldInfo; +export const goprotoGetters: jspb.ExtensionFieldInfo; - export const verboseEqual: jspb.ExtensionFieldInfo; +export const goprotoStringer: jspb.ExtensionFieldInfo; - export const face: jspb.ExtensionFieldInfo; +export const verboseEqual: jspb.ExtensionFieldInfo; - export const gostring: jspb.ExtensionFieldInfo; +export const face: jspb.ExtensionFieldInfo; - export const populate: jspb.ExtensionFieldInfo; +export const gostring: jspb.ExtensionFieldInfo; - export const stringer: jspb.ExtensionFieldInfo; +export const populate: jspb.ExtensionFieldInfo; - export const onlyone: jspb.ExtensionFieldInfo; +export const stringer: jspb.ExtensionFieldInfo; - export const equal: jspb.ExtensionFieldInfo; +export const onlyone: jspb.ExtensionFieldInfo; - export const description: jspb.ExtensionFieldInfo; +export const equal: jspb.ExtensionFieldInfo; - export const testgen: jspb.ExtensionFieldInfo; +export const description: jspb.ExtensionFieldInfo; - export const benchgen: jspb.ExtensionFieldInfo; +export const testgen: jspb.ExtensionFieldInfo; - export const marshaler: jspb.ExtensionFieldInfo; +export const benchgen: jspb.ExtensionFieldInfo; - export const unmarshaler: jspb.ExtensionFieldInfo; +export const marshaler: jspb.ExtensionFieldInfo; - export const stableMarshaler: jspb.ExtensionFieldInfo; +export const unmarshaler: jspb.ExtensionFieldInfo; - export const sizer: jspb.ExtensionFieldInfo; +export const stableMarshaler: jspb.ExtensionFieldInfo; - export const unsafeMarshaler: jspb.ExtensionFieldInfo; +export const sizer: jspb.ExtensionFieldInfo; - export const unsafeUnmarshaler: jspb.ExtensionFieldInfo; +export const unsafeMarshaler: jspb.ExtensionFieldInfo; - export const goprotoExtensionsMap: jspb.ExtensionFieldInfo; +export const unsafeUnmarshaler: jspb.ExtensionFieldInfo; - export const goprotoUnrecognized: jspb.ExtensionFieldInfo; +export const goprotoExtensionsMap: jspb.ExtensionFieldInfo; - export const protosizer: jspb.ExtensionFieldInfo; +export const goprotoUnrecognized: jspb.ExtensionFieldInfo; - export const compare: jspb.ExtensionFieldInfo; +export const protosizer: jspb.ExtensionFieldInfo; - export const typedecl: jspb.ExtensionFieldInfo; +export const compare: jspb.ExtensionFieldInfo; - export const messagename: jspb.ExtensionFieldInfo; +export const typedecl: jspb.ExtensionFieldInfo; - export const goprotoSizecache: jspb.ExtensionFieldInfo; +export const messagename: jspb.ExtensionFieldInfo; - export const goprotoUnkeyed: jspb.ExtensionFieldInfo; +export const goprotoSizecache: jspb.ExtensionFieldInfo; - export const nullable: jspb.ExtensionFieldInfo; +export const goprotoUnkeyed: jspb.ExtensionFieldInfo; - export const embed: jspb.ExtensionFieldInfo; +export const nullable: jspb.ExtensionFieldInfo; - export const customtype: jspb.ExtensionFieldInfo; +export const embed: jspb.ExtensionFieldInfo; - export const customname: jspb.ExtensionFieldInfo; +export const customtype: jspb.ExtensionFieldInfo; - export const jsontag: jspb.ExtensionFieldInfo; +export const customname: jspb.ExtensionFieldInfo; - export const moretags: jspb.ExtensionFieldInfo; +export const jsontag: jspb.ExtensionFieldInfo; - export const casttype: jspb.ExtensionFieldInfo; +export const moretags: jspb.ExtensionFieldInfo; - export const castkey: jspb.ExtensionFieldInfo; +export const casttype: jspb.ExtensionFieldInfo; - export const castvalue: jspb.ExtensionFieldInfo; +export const castkey: jspb.ExtensionFieldInfo; - export const stdtime: jspb.ExtensionFieldInfo; +export const castvalue: jspb.ExtensionFieldInfo; - export const stdduration: jspb.ExtensionFieldInfo; +export const stdtime: jspb.ExtensionFieldInfo; - export const wktpointer: jspb.ExtensionFieldInfo; +export const stdduration: jspb.ExtensionFieldInfo; +export const wktpointer: jspb.ExtensionFieldInfo; diff --git a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js index d0f20945e..4d7ad97c0 100644 --- a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js +++ b/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js @@ -1,4 +1,3 @@ -// source: github.com/gogo/protobuf/gogoproto/gogo.proto /** * @fileoverview * @enhanceable diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.d.ts b/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.d.ts index 91a114321..547066dfe 100644 --- a/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.d.ts +++ b/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.d.ts @@ -1,60 +1,215 @@ -// GENERATED CODE -- DO NOT EDIT! - // package: types // file: github.com/tendermint/tendermint/abci/types/types.proto +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; import * as github_com_tendermint_tendermint_abci_types_types_pb from "../../../../../github.com/tendermint/tendermint/abci/types/types_pb"; -import * as grpc from "grpc"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as github_com_tendermint_tendermint_libs_common_types_pb from "../../../../../github.com/tendermint/tendermint/libs/common/types_pb"; interface IABCIApplicationService extends grpc.ServiceDefinition { - echo: grpc.MethodDefinition; - flush: grpc.MethodDefinition; - info: grpc.MethodDefinition; - setOption: grpc.MethodDefinition; - deliverTx: grpc.MethodDefinition; - checkTx: grpc.MethodDefinition; - query: grpc.MethodDefinition; - commit: grpc.MethodDefinition; - initChain: grpc.MethodDefinition; - beginBlock: grpc.MethodDefinition; - endBlock: grpc.MethodDefinition; + echo: IABCIApplicationService_IEcho; + flush: IABCIApplicationService_IFlush; + info: IABCIApplicationService_IInfo; + setOption: IABCIApplicationService_ISetOption; + deliverTx: IABCIApplicationService_IDeliverTx; + checkTx: IABCIApplicationService_ICheckTx; + query: IABCIApplicationService_IQuery; + commit: IABCIApplicationService_ICommit; + initChain: IABCIApplicationService_IInitChain; + beginBlock: IABCIApplicationService_IBeginBlock; + endBlock: IABCIApplicationService_IEndBlock; +} + +interface IABCIApplicationService_IEcho extends grpc.MethodDefinition { + path: string; // "/types.ABCIApplication/Echo" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IFlush extends grpc.MethodDefinition { + path: string; // "/types.ABCIApplication/Flush" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IInfo extends grpc.MethodDefinition { + path: string; // "/types.ABCIApplication/Info" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_ISetOption extends grpc.MethodDefinition { + path: string; // "/types.ABCIApplication/SetOption" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IDeliverTx extends grpc.MethodDefinition { + path: string; // "/types.ABCIApplication/DeliverTx" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_ICheckTx extends grpc.MethodDefinition { + path: string; // "/types.ABCIApplication/CheckTx" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IQuery extends grpc.MethodDefinition { + path: string; // "/types.ABCIApplication/Query" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_ICommit extends grpc.MethodDefinition { + path: string; // "/types.ABCIApplication/Commit" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IInitChain extends grpc.MethodDefinition { + path: string; // "/types.ABCIApplication/InitChain" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IBeginBlock extends grpc.MethodDefinition { + path: string; // "/types.ABCIApplication/BeginBlock" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IEndBlock extends grpc.MethodDefinition { + path: string; // "/types.ABCIApplication/EndBlock" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } export const ABCIApplicationService: IABCIApplicationService; -export class ABCIApplicationClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - echo(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, callback: grpc.requestCallback): grpc.ClientUnaryCall; - echo(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - echo(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - flush(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, callback: grpc.requestCallback): grpc.ClientUnaryCall; - flush(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - flush(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - info(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, callback: grpc.requestCallback): grpc.ClientUnaryCall; - info(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - info(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - setOption(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, callback: grpc.requestCallback): grpc.ClientUnaryCall; - setOption(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - setOption(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deliverTx(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deliverTx(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - deliverTx(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - checkTx(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; - checkTx(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - checkTx(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - query(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, callback: grpc.requestCallback): grpc.ClientUnaryCall; - query(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - query(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - commit(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, callback: grpc.requestCallback): grpc.ClientUnaryCall; - commit(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - commit(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - initChain(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, callback: grpc.requestCallback): grpc.ClientUnaryCall; - initChain(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - initChain(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - beginBlock(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, callback: grpc.requestCallback): grpc.ClientUnaryCall; - beginBlock(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - beginBlock(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - endBlock(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, callback: grpc.requestCallback): grpc.ClientUnaryCall; - endBlock(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - endBlock(argument: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; +export interface IABCIApplicationServer { + echo: grpc.handleUnaryCall; + flush: grpc.handleUnaryCall; + info: grpc.handleUnaryCall; + setOption: grpc.handleUnaryCall; + deliverTx: grpc.handleUnaryCall; + checkTx: grpc.handleUnaryCall; + query: grpc.handleUnaryCall; + commit: grpc.handleUnaryCall; + initChain: grpc.handleUnaryCall; + beginBlock: grpc.handleUnaryCall; + endBlock: grpc.handleUnaryCall; +} + +export interface IABCIApplicationClient { + echo(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; + echo(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; + echo(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; + flush(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; + flush(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; + flush(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; + info(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; + info(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; + info(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; + setOption(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; + setOption(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; + setOption(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; + deliverTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; + deliverTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; + deliverTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; + checkTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; + checkTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; + checkTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; + query(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; + query(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; + query(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; + commit(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; + commit(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; + commit(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; + initChain(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; + initChain(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; + initChain(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; + beginBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; + beginBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; + beginBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; + endBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; + endBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; + endBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; +} + +export class ABCIApplicationClient extends grpc.Client implements IABCIApplicationClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public echo(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; + public echo(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; + public echo(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; + public flush(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; + public flush(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; + public flush(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; + public info(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; + public info(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; + public info(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; + public setOption(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; + public setOption(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; + public setOption(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; + public deliverTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; + public deliverTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; + public deliverTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; + public checkTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; + public checkTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; + public checkTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; + public query(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; + public query(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; + public query(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; + public commit(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; + public commit(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; + public commit(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; + public initChain(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; + public initChain(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; + public initChain(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; + public beginBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; + public beginBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; + public beginBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; + public endBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; + public endBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; + public endBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; } diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.js b/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.js index de65dee46..1a10cefb4 100644 --- a/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.js +++ b/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.js @@ -1,7 +1,6 @@ // GENERATED CODE -- DO NOT EDIT! 'use strict'; -var grpc = require('grpc'); var github_com_tendermint_tendermint_abci_types_types_pb = require('../../../../../github.com/tendermint/tendermint/abci/types/types_pb.js'); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb.js'); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); @@ -253,7 +252,7 @@ function deserialize_types_ResponseSetOption(buffer_arg) { // ---------------------------------------- // Service Definition // -var ABCIApplicationService = exports.ABCIApplicationService = { +var ABCIApplicationService = exports['types.ABCIApplication'] = { echo: { path: '/types.ABCIApplication/Echo', requestStream: false, @@ -377,4 +376,3 @@ var ABCIApplicationService = exports.ABCIApplicationService = { }, }; -exports.ABCIApplicationClient = grpc.makeGenericClientConstructor(ABCIApplicationService); diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.d.ts b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.d.ts index 8501ca556..97ca0d0b2 100644 --- a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.d.ts +++ b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.d.ts @@ -1,1287 +1,1395 @@ // package: types // file: github.com/tendermint/tendermint/abci/types/types.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as github_com_tendermint_tendermint_libs_common_types_pb from "../../../../../github.com/tendermint/tendermint/libs/common/types_pb"; -export class Request extends jspb.Message { - hasEcho(): boolean; - clearEcho(): void; - getEcho(): RequestEcho | undefined; - setEcho(value?: RequestEcho): void; - - hasFlush(): boolean; - clearFlush(): void; - getFlush(): RequestFlush | undefined; - setFlush(value?: RequestFlush): void; - - hasInfo(): boolean; - clearInfo(): void; - getInfo(): RequestInfo | undefined; - setInfo(value?: RequestInfo): void; - - hasSetOption(): boolean; - clearSetOption(): void; - getSetOption(): RequestSetOption | undefined; - setSetOption(value?: RequestSetOption): void; - - hasInitChain(): boolean; - clearInitChain(): void; - getInitChain(): RequestInitChain | undefined; - setInitChain(value?: RequestInitChain): void; - - hasQuery(): boolean; - clearQuery(): void; - getQuery(): RequestQuery | undefined; - setQuery(value?: RequestQuery): void; - - hasBeginBlock(): boolean; - clearBeginBlock(): void; - getBeginBlock(): RequestBeginBlock | undefined; - setBeginBlock(value?: RequestBeginBlock): void; - - hasCheckTx(): boolean; - clearCheckTx(): void; - getCheckTx(): RequestCheckTx | undefined; - setCheckTx(value?: RequestCheckTx): void; - - hasDeliverTx(): boolean; - clearDeliverTx(): void; - getDeliverTx(): RequestDeliverTx | undefined; - setDeliverTx(value?: RequestDeliverTx): void; - - hasEndBlock(): boolean; - clearEndBlock(): void; - getEndBlock(): RequestEndBlock | undefined; - setEndBlock(value?: RequestEndBlock): void; - - hasCommit(): boolean; - clearCommit(): void; - getCommit(): RequestCommit | undefined; - setCommit(value?: RequestCommit): void; - - getValueCase(): Request.ValueCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Request.AsObject; - static toObject(includeInstance: boolean, msg: Request): Request.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Request, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Request; - static deserializeBinaryFromReader(message: Request, reader: jspb.BinaryReader): Request; +export class Request extends jspb.Message { + + hasEcho(): boolean; + clearEcho(): void; + getEcho(): RequestEcho | undefined; + setEcho(value?: RequestEcho): void; + + + hasFlush(): boolean; + clearFlush(): void; + getFlush(): RequestFlush | undefined; + setFlush(value?: RequestFlush): void; + + + hasInfo(): boolean; + clearInfo(): void; + getInfo(): RequestInfo | undefined; + setInfo(value?: RequestInfo): void; + + + hasSetOption(): boolean; + clearSetOption(): void; + getSetOption(): RequestSetOption | undefined; + setSetOption(value?: RequestSetOption): void; + + + hasInitChain(): boolean; + clearInitChain(): void; + getInitChain(): RequestInitChain | undefined; + setInitChain(value?: RequestInitChain): void; + + + hasQuery(): boolean; + clearQuery(): void; + getQuery(): RequestQuery | undefined; + setQuery(value?: RequestQuery): void; + + + hasBeginBlock(): boolean; + clearBeginBlock(): void; + getBeginBlock(): RequestBeginBlock | undefined; + setBeginBlock(value?: RequestBeginBlock): void; + + + hasCheckTx(): boolean; + clearCheckTx(): void; + getCheckTx(): RequestCheckTx | undefined; + setCheckTx(value?: RequestCheckTx): void; + + + hasDeliverTx(): boolean; + clearDeliverTx(): void; + getDeliverTx(): RequestDeliverTx | undefined; + setDeliverTx(value?: RequestDeliverTx): void; + + + hasEndBlock(): boolean; + clearEndBlock(): void; + getEndBlock(): RequestEndBlock | undefined; + setEndBlock(value?: RequestEndBlock): void; + + + hasCommit(): boolean; + clearCommit(): void; + getCommit(): RequestCommit | undefined; + setCommit(value?: RequestCommit): void; + + + getValueCase(): Request.ValueCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Request.AsObject; + static toObject(includeInstance: boolean, msg: Request): Request.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Request, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Request; + static deserializeBinaryFromReader(message: Request, reader: jspb.BinaryReader): Request; } export namespace Request { - export type AsObject = { - echo?: RequestEcho.AsObject, - flush?: RequestFlush.AsObject, - info?: RequestInfo.AsObject, - setOption?: RequestSetOption.AsObject, - initChain?: RequestInitChain.AsObject, - query?: RequestQuery.AsObject, - beginBlock?: RequestBeginBlock.AsObject, - checkTx?: RequestCheckTx.AsObject, - deliverTx?: RequestDeliverTx.AsObject, - endBlock?: RequestEndBlock.AsObject, - commit?: RequestCommit.AsObject, - } - - export enum ValueCase { - VALUE_NOT_SET = 0, + export type AsObject = { + echo?: RequestEcho.AsObject, + flush?: RequestFlush.AsObject, + info?: RequestInfo.AsObject, + setOption?: RequestSetOption.AsObject, + initChain?: RequestInitChain.AsObject, + query?: RequestQuery.AsObject, + beginBlock?: RequestBeginBlock.AsObject, + checkTx?: RequestCheckTx.AsObject, + deliverTx?: RequestDeliverTx.AsObject, + endBlock?: RequestEndBlock.AsObject, + commit?: RequestCommit.AsObject, + } + + export enum ValueCase { + VALUE_NOT_SET = 0, + ECHO = 2, + FLUSH = 3, + INFO = 4, + SET_OPTION = 5, + INIT_CHAIN = 6, + QUERY = 7, + BEGIN_BLOCK = 8, + CHECK_TX = 9, + DELIVER_TX = 19, + END_BLOCK = 11, + COMMIT = 12, - } + + } + } -export class RequestEcho extends jspb.Message { - getMessage(): string; - setMessage(value: string): void; +export class RequestEcho extends jspb.Message { + getMessage(): string; + setMessage(value: string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestEcho.AsObject; - static toObject(includeInstance: boolean, msg: RequestEcho): RequestEcho.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestEcho, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestEcho; - static deserializeBinaryFromReader(message: RequestEcho, reader: jspb.BinaryReader): RequestEcho; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestEcho.AsObject; + static toObject(includeInstance: boolean, msg: RequestEcho): RequestEcho.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestEcho, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestEcho; + static deserializeBinaryFromReader(message: RequestEcho, reader: jspb.BinaryReader): RequestEcho; } export namespace RequestEcho { - export type AsObject = { - message: string, - } + export type AsObject = { + message: string, + } } -export class RequestFlush extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestFlush.AsObject; - static toObject(includeInstance: boolean, msg: RequestFlush): RequestFlush.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestFlush, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestFlush; - static deserializeBinaryFromReader(message: RequestFlush, reader: jspb.BinaryReader): RequestFlush; +export class RequestFlush extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestFlush.AsObject; + static toObject(includeInstance: boolean, msg: RequestFlush): RequestFlush.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestFlush, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestFlush; + static deserializeBinaryFromReader(message: RequestFlush, reader: jspb.BinaryReader): RequestFlush; } export namespace RequestFlush { - export type AsObject = { - } + export type AsObject = { + } } -export class RequestInfo extends jspb.Message { - getVersion(): string; - setVersion(value: string): void; +export class RequestInfo extends jspb.Message { + getVersion(): string; + setVersion(value: string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestInfo.AsObject; - static toObject(includeInstance: boolean, msg: RequestInfo): RequestInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestInfo; - static deserializeBinaryFromReader(message: RequestInfo, reader: jspb.BinaryReader): RequestInfo; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestInfo.AsObject; + static toObject(includeInstance: boolean, msg: RequestInfo): RequestInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestInfo; + static deserializeBinaryFromReader(message: RequestInfo, reader: jspb.BinaryReader): RequestInfo; } export namespace RequestInfo { - export type AsObject = { - version: string, - } + export type AsObject = { + version: string, + } } -export class RequestSetOption extends jspb.Message { - getKey(): string; - setKey(value: string): void; +export class RequestSetOption extends jspb.Message { + getKey(): string; + setKey(value: string): void; + + getValue(): string; + setValue(value: string): void; - getValue(): string; - setValue(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestSetOption.AsObject; - static toObject(includeInstance: boolean, msg: RequestSetOption): RequestSetOption.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestSetOption, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestSetOption; - static deserializeBinaryFromReader(message: RequestSetOption, reader: jspb.BinaryReader): RequestSetOption; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestSetOption.AsObject; + static toObject(includeInstance: boolean, msg: RequestSetOption): RequestSetOption.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestSetOption, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestSetOption; + static deserializeBinaryFromReader(message: RequestSetOption, reader: jspb.BinaryReader): RequestSetOption; } export namespace RequestSetOption { - export type AsObject = { - key: string, - value: string, - } -} - -export class RequestInitChain extends jspb.Message { - hasTime(): boolean; - clearTime(): void; - getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getChainId(): string; - setChainId(value: string): void; - - hasConsensusParams(): boolean; - clearConsensusParams(): void; - getConsensusParams(): ConsensusParams | undefined; - setConsensusParams(value?: ConsensusParams): void; - - clearValidatorsList(): void; - getValidatorsList(): Array; - setValidatorsList(value: Array): void; - addValidators(value?: ValidatorUpdate, index?: number): ValidatorUpdate; - - getAppStateBytes(): Uint8Array | string; - getAppStateBytes_asU8(): Uint8Array; - getAppStateBytes_asB64(): string; - setAppStateBytes(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestInitChain.AsObject; - static toObject(includeInstance: boolean, msg: RequestInitChain): RequestInitChain.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestInitChain, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestInitChain; - static deserializeBinaryFromReader(message: RequestInitChain, reader: jspb.BinaryReader): RequestInitChain; + export type AsObject = { + key: string, + value: string, + } +} + +export class RequestInitChain extends jspb.Message { + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getChainId(): string; + setChainId(value: string): void; + + + hasConsensusParams(): boolean; + clearConsensusParams(): void; + getConsensusParams(): ConsensusParams | undefined; + setConsensusParams(value?: ConsensusParams): void; + + clearValidatorsList(): void; + getValidatorsList(): Array; + setValidatorsList(value: Array): void; + addValidators(value?: ValidatorUpdate, index?: number): ValidatorUpdate; + + getAppStateBytes(): Uint8Array | string; + getAppStateBytes_asU8(): Uint8Array; + getAppStateBytes_asB64(): string; + setAppStateBytes(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestInitChain.AsObject; + static toObject(includeInstance: boolean, msg: RequestInitChain): RequestInitChain.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestInitChain, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestInitChain; + static deserializeBinaryFromReader(message: RequestInitChain, reader: jspb.BinaryReader): RequestInitChain; } export namespace RequestInitChain { - export type AsObject = { - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - chainId: string, - consensusParams?: ConsensusParams.AsObject, - validatorsList: Array, - appStateBytes: Uint8Array | string, - } + export type AsObject = { + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + chainId: string, + consensusParams?: ConsensusParams.AsObject, + validatorsList: Array, + appStateBytes: Uint8Array | string, + } } -export class RequestQuery extends jspb.Message { - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; +export class RequestQuery extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + getPath(): string; + setPath(value: string): void; - getPath(): string; - setPath(value: string): void; + getHeight(): number; + setHeight(value: number): void; - getHeight(): number; - setHeight(value: number): void; + getProve(): boolean; + setProve(value: boolean): void; - getProve(): boolean; - setProve(value: boolean): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestQuery.AsObject; - static toObject(includeInstance: boolean, msg: RequestQuery): RequestQuery.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestQuery, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestQuery; - static deserializeBinaryFromReader(message: RequestQuery, reader: jspb.BinaryReader): RequestQuery; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestQuery.AsObject; + static toObject(includeInstance: boolean, msg: RequestQuery): RequestQuery.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestQuery, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestQuery; + static deserializeBinaryFromReader(message: RequestQuery, reader: jspb.BinaryReader): RequestQuery; } export namespace RequestQuery { - export type AsObject = { - data: Uint8Array | string, - path: string, - height: number, - prove: boolean, - } -} - -export class RequestBeginBlock extends jspb.Message { - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; - - hasHeader(): boolean; - clearHeader(): void; - getHeader(): Header | undefined; - setHeader(value?: Header): void; - - hasLastCommitInfo(): boolean; - clearLastCommitInfo(): void; - getLastCommitInfo(): LastCommitInfo | undefined; - setLastCommitInfo(value?: LastCommitInfo): void; - - clearByzantineValidatorsList(): void; - getByzantineValidatorsList(): Array; - setByzantineValidatorsList(value: Array): void; - addByzantineValidators(value?: Evidence, index?: number): Evidence; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestBeginBlock.AsObject; - static toObject(includeInstance: boolean, msg: RequestBeginBlock): RequestBeginBlock.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestBeginBlock, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestBeginBlock; - static deserializeBinaryFromReader(message: RequestBeginBlock, reader: jspb.BinaryReader): RequestBeginBlock; + export type AsObject = { + data: Uint8Array | string, + path: string, + height: number, + prove: boolean, + } +} + +export class RequestBeginBlock extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + + + hasHeader(): boolean; + clearHeader(): void; + getHeader(): Header | undefined; + setHeader(value?: Header): void; + + + hasLastCommitInfo(): boolean; + clearLastCommitInfo(): void; + getLastCommitInfo(): LastCommitInfo | undefined; + setLastCommitInfo(value?: LastCommitInfo): void; + + clearByzantineValidatorsList(): void; + getByzantineValidatorsList(): Array; + setByzantineValidatorsList(value: Array): void; + addByzantineValidators(value?: Evidence, index?: number): Evidence; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestBeginBlock.AsObject; + static toObject(includeInstance: boolean, msg: RequestBeginBlock): RequestBeginBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestBeginBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestBeginBlock; + static deserializeBinaryFromReader(message: RequestBeginBlock, reader: jspb.BinaryReader): RequestBeginBlock; } export namespace RequestBeginBlock { - export type AsObject = { - hash: Uint8Array | string, - header?: Header.AsObject, - lastCommitInfo?: LastCommitInfo.AsObject, - byzantineValidatorsList: Array, - } -} - -export class RequestCheckTx extends jspb.Message { - getTx(): Uint8Array | string; - getTx_asU8(): Uint8Array; - getTx_asB64(): string; - setTx(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestCheckTx.AsObject; - static toObject(includeInstance: boolean, msg: RequestCheckTx): RequestCheckTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestCheckTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestCheckTx; - static deserializeBinaryFromReader(message: RequestCheckTx, reader: jspb.BinaryReader): RequestCheckTx; + export type AsObject = { + hash: Uint8Array | string, + header?: Header.AsObject, + lastCommitInfo?: LastCommitInfo.AsObject, + byzantineValidatorsList: Array, + } +} + +export class RequestCheckTx extends jspb.Message { + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestCheckTx.AsObject; + static toObject(includeInstance: boolean, msg: RequestCheckTx): RequestCheckTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestCheckTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestCheckTx; + static deserializeBinaryFromReader(message: RequestCheckTx, reader: jspb.BinaryReader): RequestCheckTx; } export namespace RequestCheckTx { - export type AsObject = { - tx: Uint8Array | string, - } + export type AsObject = { + tx: Uint8Array | string, + } } -export class RequestDeliverTx extends jspb.Message { - getTx(): Uint8Array | string; - getTx_asU8(): Uint8Array; - getTx_asB64(): string; - setTx(value: Uint8Array | string): void; +export class RequestDeliverTx extends jspb.Message { + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestDeliverTx.AsObject; - static toObject(includeInstance: boolean, msg: RequestDeliverTx): RequestDeliverTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestDeliverTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestDeliverTx; - static deserializeBinaryFromReader(message: RequestDeliverTx, reader: jspb.BinaryReader): RequestDeliverTx; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestDeliverTx.AsObject; + static toObject(includeInstance: boolean, msg: RequestDeliverTx): RequestDeliverTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestDeliverTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestDeliverTx; + static deserializeBinaryFromReader(message: RequestDeliverTx, reader: jspb.BinaryReader): RequestDeliverTx; } export namespace RequestDeliverTx { - export type AsObject = { - tx: Uint8Array | string, - } + export type AsObject = { + tx: Uint8Array | string, + } } -export class RequestEndBlock extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; +export class RequestEndBlock extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestEndBlock.AsObject; - static toObject(includeInstance: boolean, msg: RequestEndBlock): RequestEndBlock.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestEndBlock, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestEndBlock; - static deserializeBinaryFromReader(message: RequestEndBlock, reader: jspb.BinaryReader): RequestEndBlock; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestEndBlock.AsObject; + static toObject(includeInstance: boolean, msg: RequestEndBlock): RequestEndBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestEndBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestEndBlock; + static deserializeBinaryFromReader(message: RequestEndBlock, reader: jspb.BinaryReader): RequestEndBlock; } export namespace RequestEndBlock { - export type AsObject = { - height: number, - } + export type AsObject = { + height: number, + } } -export class RequestCommit extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequestCommit.AsObject; - static toObject(includeInstance: boolean, msg: RequestCommit): RequestCommit.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequestCommit, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequestCommit; - static deserializeBinaryFromReader(message: RequestCommit, reader: jspb.BinaryReader): RequestCommit; +export class RequestCommit extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestCommit.AsObject; + static toObject(includeInstance: boolean, msg: RequestCommit): RequestCommit.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestCommit, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestCommit; + static deserializeBinaryFromReader(message: RequestCommit, reader: jspb.BinaryReader): RequestCommit; } export namespace RequestCommit { - export type AsObject = { - } -} - -export class Response extends jspb.Message { - hasException(): boolean; - clearException(): void; - getException(): ResponseException | undefined; - setException(value?: ResponseException): void; - - hasEcho(): boolean; - clearEcho(): void; - getEcho(): ResponseEcho | undefined; - setEcho(value?: ResponseEcho): void; - - hasFlush(): boolean; - clearFlush(): void; - getFlush(): ResponseFlush | undefined; - setFlush(value?: ResponseFlush): void; - - hasInfo(): boolean; - clearInfo(): void; - getInfo(): ResponseInfo | undefined; - setInfo(value?: ResponseInfo): void; - - hasSetOption(): boolean; - clearSetOption(): void; - getSetOption(): ResponseSetOption | undefined; - setSetOption(value?: ResponseSetOption): void; - - hasInitChain(): boolean; - clearInitChain(): void; - getInitChain(): ResponseInitChain | undefined; - setInitChain(value?: ResponseInitChain): void; - - hasQuery(): boolean; - clearQuery(): void; - getQuery(): ResponseQuery | undefined; - setQuery(value?: ResponseQuery): void; - - hasBeginBlock(): boolean; - clearBeginBlock(): void; - getBeginBlock(): ResponseBeginBlock | undefined; - setBeginBlock(value?: ResponseBeginBlock): void; - - hasCheckTx(): boolean; - clearCheckTx(): void; - getCheckTx(): ResponseCheckTx | undefined; - setCheckTx(value?: ResponseCheckTx): void; - - hasDeliverTx(): boolean; - clearDeliverTx(): void; - getDeliverTx(): ResponseDeliverTx | undefined; - setDeliverTx(value?: ResponseDeliverTx): void; - - hasEndBlock(): boolean; - clearEndBlock(): void; - getEndBlock(): ResponseEndBlock | undefined; - setEndBlock(value?: ResponseEndBlock): void; - - hasCommit(): boolean; - clearCommit(): void; - getCommit(): ResponseCommit | undefined; - setCommit(value?: ResponseCommit): void; - - getValueCase(): Response.ValueCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Response.AsObject; - static toObject(includeInstance: boolean, msg: Response): Response.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Response, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Response; - static deserializeBinaryFromReader(message: Response, reader: jspb.BinaryReader): Response; + export type AsObject = { + } +} + +export class Response extends jspb.Message { + + hasException(): boolean; + clearException(): void; + getException(): ResponseException | undefined; + setException(value?: ResponseException): void; + + + hasEcho(): boolean; + clearEcho(): void; + getEcho(): ResponseEcho | undefined; + setEcho(value?: ResponseEcho): void; + + + hasFlush(): boolean; + clearFlush(): void; + getFlush(): ResponseFlush | undefined; + setFlush(value?: ResponseFlush): void; + + + hasInfo(): boolean; + clearInfo(): void; + getInfo(): ResponseInfo | undefined; + setInfo(value?: ResponseInfo): void; + + + hasSetOption(): boolean; + clearSetOption(): void; + getSetOption(): ResponseSetOption | undefined; + setSetOption(value?: ResponseSetOption): void; + + + hasInitChain(): boolean; + clearInitChain(): void; + getInitChain(): ResponseInitChain | undefined; + setInitChain(value?: ResponseInitChain): void; + + + hasQuery(): boolean; + clearQuery(): void; + getQuery(): ResponseQuery | undefined; + setQuery(value?: ResponseQuery): void; + + + hasBeginBlock(): boolean; + clearBeginBlock(): void; + getBeginBlock(): ResponseBeginBlock | undefined; + setBeginBlock(value?: ResponseBeginBlock): void; + + + hasCheckTx(): boolean; + clearCheckTx(): void; + getCheckTx(): ResponseCheckTx | undefined; + setCheckTx(value?: ResponseCheckTx): void; + + + hasDeliverTx(): boolean; + clearDeliverTx(): void; + getDeliverTx(): ResponseDeliverTx | undefined; + setDeliverTx(value?: ResponseDeliverTx): void; + + + hasEndBlock(): boolean; + clearEndBlock(): void; + getEndBlock(): ResponseEndBlock | undefined; + setEndBlock(value?: ResponseEndBlock): void; + + + hasCommit(): boolean; + clearCommit(): void; + getCommit(): ResponseCommit | undefined; + setCommit(value?: ResponseCommit): void; + + + getValueCase(): Response.ValueCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Response.AsObject; + static toObject(includeInstance: boolean, msg: Response): Response.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Response, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Response; + static deserializeBinaryFromReader(message: Response, reader: jspb.BinaryReader): Response; } export namespace Response { - export type AsObject = { - exception?: ResponseException.AsObject, - echo?: ResponseEcho.AsObject, - flush?: ResponseFlush.AsObject, - info?: ResponseInfo.AsObject, - setOption?: ResponseSetOption.AsObject, - initChain?: ResponseInitChain.AsObject, - query?: ResponseQuery.AsObject, - beginBlock?: ResponseBeginBlock.AsObject, - checkTx?: ResponseCheckTx.AsObject, - deliverTx?: ResponseDeliverTx.AsObject, - endBlock?: ResponseEndBlock.AsObject, - commit?: ResponseCommit.AsObject, - } - - export enum ValueCase { - VALUE_NOT_SET = 0, + export type AsObject = { + exception?: ResponseException.AsObject, + echo?: ResponseEcho.AsObject, + flush?: ResponseFlush.AsObject, + info?: ResponseInfo.AsObject, + setOption?: ResponseSetOption.AsObject, + initChain?: ResponseInitChain.AsObject, + query?: ResponseQuery.AsObject, + beginBlock?: ResponseBeginBlock.AsObject, + checkTx?: ResponseCheckTx.AsObject, + deliverTx?: ResponseDeliverTx.AsObject, + endBlock?: ResponseEndBlock.AsObject, + commit?: ResponseCommit.AsObject, + } + + export enum ValueCase { + VALUE_NOT_SET = 0, + EXCEPTION = 1, + ECHO = 2, + FLUSH = 3, + INFO = 4, + SET_OPTION = 5, + INIT_CHAIN = 6, + QUERY = 7, + BEGIN_BLOCK = 8, + CHECK_TX = 9, + DELIVER_TX = 10, + END_BLOCK = 11, + COMMIT = 12, - } + + } + } -export class ResponseException extends jspb.Message { - getError(): string; - setError(value: string): void; +export class ResponseException extends jspb.Message { + getError(): string; + setError(value: string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseException.AsObject; - static toObject(includeInstance: boolean, msg: ResponseException): ResponseException.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseException, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseException; - static deserializeBinaryFromReader(message: ResponseException, reader: jspb.BinaryReader): ResponseException; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseException.AsObject; + static toObject(includeInstance: boolean, msg: ResponseException): ResponseException.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseException, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseException; + static deserializeBinaryFromReader(message: ResponseException, reader: jspb.BinaryReader): ResponseException; } export namespace ResponseException { - export type AsObject = { - error: string, - } + export type AsObject = { + error: string, + } } -export class ResponseEcho extends jspb.Message { - getMessage(): string; - setMessage(value: string): void; +export class ResponseEcho extends jspb.Message { + getMessage(): string; + setMessage(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseEcho.AsObject; - static toObject(includeInstance: boolean, msg: ResponseEcho): ResponseEcho.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseEcho, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseEcho; - static deserializeBinaryFromReader(message: ResponseEcho, reader: jspb.BinaryReader): ResponseEcho; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseEcho.AsObject; + static toObject(includeInstance: boolean, msg: ResponseEcho): ResponseEcho.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseEcho, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseEcho; + static deserializeBinaryFromReader(message: ResponseEcho, reader: jspb.BinaryReader): ResponseEcho; } export namespace ResponseEcho { - export type AsObject = { - message: string, - } + export type AsObject = { + message: string, + } } -export class ResponseFlush extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseFlush.AsObject; - static toObject(includeInstance: boolean, msg: ResponseFlush): ResponseFlush.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseFlush, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseFlush; - static deserializeBinaryFromReader(message: ResponseFlush, reader: jspb.BinaryReader): ResponseFlush; +export class ResponseFlush extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseFlush.AsObject; + static toObject(includeInstance: boolean, msg: ResponseFlush): ResponseFlush.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseFlush, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseFlush; + static deserializeBinaryFromReader(message: ResponseFlush, reader: jspb.BinaryReader): ResponseFlush; } export namespace ResponseFlush { - export type AsObject = { - } + export type AsObject = { + } } -export class ResponseInfo extends jspb.Message { - getData(): string; - setData(value: string): void; +export class ResponseInfo extends jspb.Message { + getData(): string; + setData(value: string): void; + + getVersion(): string; + setVersion(value: string): void; - getVersion(): string; - setVersion(value: string): void; + getLastBlockHeight(): number; + setLastBlockHeight(value: number): void; - getLastBlockHeight(): number; - setLastBlockHeight(value: number): void; + getLastBlockAppHash(): Uint8Array | string; + getLastBlockAppHash_asU8(): Uint8Array; + getLastBlockAppHash_asB64(): string; + setLastBlockAppHash(value: Uint8Array | string): void; - getLastBlockAppHash(): Uint8Array | string; - getLastBlockAppHash_asU8(): Uint8Array; - getLastBlockAppHash_asB64(): string; - setLastBlockAppHash(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseInfo.AsObject; - static toObject(includeInstance: boolean, msg: ResponseInfo): ResponseInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseInfo; - static deserializeBinaryFromReader(message: ResponseInfo, reader: jspb.BinaryReader): ResponseInfo; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseInfo.AsObject; + static toObject(includeInstance: boolean, msg: ResponseInfo): ResponseInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseInfo; + static deserializeBinaryFromReader(message: ResponseInfo, reader: jspb.BinaryReader): ResponseInfo; } export namespace ResponseInfo { - export type AsObject = { - data: string, - version: string, - lastBlockHeight: number, - lastBlockAppHash: Uint8Array | string, - } + export type AsObject = { + data: string, + version: string, + lastBlockHeight: number, + lastBlockAppHash: Uint8Array | string, + } } -export class ResponseSetOption extends jspb.Message { - getCode(): number; - setCode(value: number): void; +export class ResponseSetOption extends jspb.Message { + getCode(): number; + setCode(value: number): void; - getLog(): string; - setLog(value: string): void; + getLog(): string; + setLog(value: string): void; - getInfo(): string; - setInfo(value: string): void; + getInfo(): string; + setInfo(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseSetOption.AsObject; - static toObject(includeInstance: boolean, msg: ResponseSetOption): ResponseSetOption.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseSetOption, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseSetOption; - static deserializeBinaryFromReader(message: ResponseSetOption, reader: jspb.BinaryReader): ResponseSetOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseSetOption.AsObject; + static toObject(includeInstance: boolean, msg: ResponseSetOption): ResponseSetOption.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseSetOption, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseSetOption; + static deserializeBinaryFromReader(message: ResponseSetOption, reader: jspb.BinaryReader): ResponseSetOption; } export namespace ResponseSetOption { - export type AsObject = { - code: number, - log: string, - info: string, - } -} - -export class ResponseInitChain extends jspb.Message { - hasConsensusParams(): boolean; - clearConsensusParams(): void; - getConsensusParams(): ConsensusParams | undefined; - setConsensusParams(value?: ConsensusParams): void; - - clearValidatorsList(): void; - getValidatorsList(): Array; - setValidatorsList(value: Array): void; - addValidators(value?: ValidatorUpdate, index?: number): ValidatorUpdate; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseInitChain.AsObject; - static toObject(includeInstance: boolean, msg: ResponseInitChain): ResponseInitChain.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseInitChain, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseInitChain; - static deserializeBinaryFromReader(message: ResponseInitChain, reader: jspb.BinaryReader): ResponseInitChain; + export type AsObject = { + code: number, + log: string, + info: string, + } +} + +export class ResponseInitChain extends jspb.Message { + + hasConsensusParams(): boolean; + clearConsensusParams(): void; + getConsensusParams(): ConsensusParams | undefined; + setConsensusParams(value?: ConsensusParams): void; + + clearValidatorsList(): void; + getValidatorsList(): Array; + setValidatorsList(value: Array): void; + addValidators(value?: ValidatorUpdate, index?: number): ValidatorUpdate; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseInitChain.AsObject; + static toObject(includeInstance: boolean, msg: ResponseInitChain): ResponseInitChain.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseInitChain, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseInitChain; + static deserializeBinaryFromReader(message: ResponseInitChain, reader: jspb.BinaryReader): ResponseInitChain; } export namespace ResponseInitChain { - export type AsObject = { - consensusParams?: ConsensusParams.AsObject, - validatorsList: Array, - } + export type AsObject = { + consensusParams?: ConsensusParams.AsObject, + validatorsList: Array, + } } -export class ResponseQuery extends jspb.Message { - getCode(): number; - setCode(value: number): void; +export class ResponseQuery extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + getLog(): string; + setLog(value: string): void; - getLog(): string; - setLog(value: string): void; + getInfo(): string; + setInfo(value: string): void; - getInfo(): string; - setInfo(value: string): void; + getIndex(): number; + setIndex(value: number): void; - getIndex(): number; - setIndex(value: number): void; + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): void; - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; - getValue(): Uint8Array | string; - getValue_asU8(): Uint8Array; - getValue_asB64(): string; - setValue(value: Uint8Array | string): void; + getProof(): Uint8Array | string; + getProof_asU8(): Uint8Array; + getProof_asB64(): string; + setProof(value: Uint8Array | string): void; - getProof(): Uint8Array | string; - getProof_asU8(): Uint8Array; - getProof_asB64(): string; - setProof(value: Uint8Array | string): void; + getHeight(): number; + setHeight(value: number): void; - getHeight(): number; - setHeight(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseQuery.AsObject; - static toObject(includeInstance: boolean, msg: ResponseQuery): ResponseQuery.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseQuery, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseQuery; - static deserializeBinaryFromReader(message: ResponseQuery, reader: jspb.BinaryReader): ResponseQuery; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseQuery.AsObject; + static toObject(includeInstance: boolean, msg: ResponseQuery): ResponseQuery.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseQuery, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseQuery; + static deserializeBinaryFromReader(message: ResponseQuery, reader: jspb.BinaryReader): ResponseQuery; } export namespace ResponseQuery { - export type AsObject = { - code: number, - log: string, - info: string, - index: number, - key: Uint8Array | string, - value: Uint8Array | string, - proof: Uint8Array | string, - height: number, - } -} - -export class ResponseBeginBlock extends jspb.Message { - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseBeginBlock.AsObject; - static toObject(includeInstance: boolean, msg: ResponseBeginBlock): ResponseBeginBlock.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseBeginBlock, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseBeginBlock; - static deserializeBinaryFromReader(message: ResponseBeginBlock, reader: jspb.BinaryReader): ResponseBeginBlock; + export type AsObject = { + code: number, + log: string, + info: string, + index: number, + key: Uint8Array | string, + value: Uint8Array | string, + proof: Uint8Array | string, + height: number, + } +} + +export class ResponseBeginBlock extends jspb.Message { + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseBeginBlock.AsObject; + static toObject(includeInstance: boolean, msg: ResponseBeginBlock): ResponseBeginBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseBeginBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseBeginBlock; + static deserializeBinaryFromReader(message: ResponseBeginBlock, reader: jspb.BinaryReader): ResponseBeginBlock; } export namespace ResponseBeginBlock { - export type AsObject = { - tagsList: Array, - } + export type AsObject = { + tagsList: Array, + } } -export class ResponseCheckTx extends jspb.Message { - getCode(): number; - setCode(value: number): void; +export class ResponseCheckTx extends jspb.Message { + getCode(): number; + setCode(value: number): void; - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; - getLog(): string; - setLog(value: string): void; + getLog(): string; + setLog(value: string): void; - getInfo(): string; - setInfo(value: string): void; + getInfo(): string; + setInfo(value: string): void; - getGasWanted(): number; - setGasWanted(value: number): void; + getGasWanted(): number; + setGasWanted(value: number): void; - getGasUsed(): number; - setGasUsed(value: number): void; + getGasUsed(): number; + setGasUsed(value: number): void; - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseCheckTx.AsObject; - static toObject(includeInstance: boolean, msg: ResponseCheckTx): ResponseCheckTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseCheckTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseCheckTx; - static deserializeBinaryFromReader(message: ResponseCheckTx, reader: jspb.BinaryReader): ResponseCheckTx; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseCheckTx.AsObject; + static toObject(includeInstance: boolean, msg: ResponseCheckTx): ResponseCheckTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseCheckTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseCheckTx; + static deserializeBinaryFromReader(message: ResponseCheckTx, reader: jspb.BinaryReader): ResponseCheckTx; } export namespace ResponseCheckTx { - export type AsObject = { - code: number, - data: Uint8Array | string, - log: string, - info: string, - gasWanted: number, - gasUsed: number, - tagsList: Array, - } + export type AsObject = { + code: number, + data: Uint8Array | string, + log: string, + info: string, + gasWanted: number, + gasUsed: number, + tagsList: Array, + } } -export class ResponseDeliverTx extends jspb.Message { - getCode(): number; - setCode(value: number): void; +export class ResponseDeliverTx extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; + getLog(): string; + setLog(value: string): void; - getLog(): string; - setLog(value: string): void; + getInfo(): string; + setInfo(value: string): void; - getInfo(): string; - setInfo(value: string): void; + getGasWanted(): number; + setGasWanted(value: number): void; - getGasWanted(): number; - setGasWanted(value: number): void; + getGasUsed(): number; + setGasUsed(value: number): void; - getGasUsed(): number; - setGasUsed(value: number): void; + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseDeliverTx.AsObject; - static toObject(includeInstance: boolean, msg: ResponseDeliverTx): ResponseDeliverTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseDeliverTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseDeliverTx; - static deserializeBinaryFromReader(message: ResponseDeliverTx, reader: jspb.BinaryReader): ResponseDeliverTx; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseDeliverTx.AsObject; + static toObject(includeInstance: boolean, msg: ResponseDeliverTx): ResponseDeliverTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseDeliverTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseDeliverTx; + static deserializeBinaryFromReader(message: ResponseDeliverTx, reader: jspb.BinaryReader): ResponseDeliverTx; } export namespace ResponseDeliverTx { - export type AsObject = { - code: number, - data: Uint8Array | string, - log: string, - info: string, - gasWanted: number, - gasUsed: number, - tagsList: Array, - } -} - -export class ResponseEndBlock extends jspb.Message { - clearValidatorUpdatesList(): void; - getValidatorUpdatesList(): Array; - setValidatorUpdatesList(value: Array): void; - addValidatorUpdates(value?: ValidatorUpdate, index?: number): ValidatorUpdate; - - hasConsensusParamUpdates(): boolean; - clearConsensusParamUpdates(): void; - getConsensusParamUpdates(): ConsensusParams | undefined; - setConsensusParamUpdates(value?: ConsensusParams): void; - - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseEndBlock.AsObject; - static toObject(includeInstance: boolean, msg: ResponseEndBlock): ResponseEndBlock.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseEndBlock, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseEndBlock; - static deserializeBinaryFromReader(message: ResponseEndBlock, reader: jspb.BinaryReader): ResponseEndBlock; + export type AsObject = { + code: number, + data: Uint8Array | string, + log: string, + info: string, + gasWanted: number, + gasUsed: number, + tagsList: Array, + } +} + +export class ResponseEndBlock extends jspb.Message { + clearValidatorUpdatesList(): void; + getValidatorUpdatesList(): Array; + setValidatorUpdatesList(value: Array): void; + addValidatorUpdates(value?: ValidatorUpdate, index?: number): ValidatorUpdate; + + + hasConsensusParamUpdates(): boolean; + clearConsensusParamUpdates(): void; + getConsensusParamUpdates(): ConsensusParams | undefined; + setConsensusParamUpdates(value?: ConsensusParams): void; + + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseEndBlock.AsObject; + static toObject(includeInstance: boolean, msg: ResponseEndBlock): ResponseEndBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseEndBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseEndBlock; + static deserializeBinaryFromReader(message: ResponseEndBlock, reader: jspb.BinaryReader): ResponseEndBlock; } export namespace ResponseEndBlock { - export type AsObject = { - validatorUpdatesList: Array, - consensusParamUpdates?: ConsensusParams.AsObject, - tagsList: Array, - } + export type AsObject = { + validatorUpdatesList: Array, + consensusParamUpdates?: ConsensusParams.AsObject, + tagsList: Array, + } } -export class ResponseCommit extends jspb.Message { - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; +export class ResponseCommit extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResponseCommit.AsObject; - static toObject(includeInstance: boolean, msg: ResponseCommit): ResponseCommit.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResponseCommit, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResponseCommit; - static deserializeBinaryFromReader(message: ResponseCommit, reader: jspb.BinaryReader): ResponseCommit; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseCommit.AsObject; + static toObject(includeInstance: boolean, msg: ResponseCommit): ResponseCommit.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseCommit, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseCommit; + static deserializeBinaryFromReader(message: ResponseCommit, reader: jspb.BinaryReader): ResponseCommit; } export namespace ResponseCommit { - export type AsObject = { - data: Uint8Array | string, - } + export type AsObject = { + data: Uint8Array | string, + } } -export class ConsensusParams extends jspb.Message { - hasBlockSize(): boolean; - clearBlockSize(): void; - getBlockSize(): BlockSize | undefined; - setBlockSize(value?: BlockSize): void; +export class ConsensusParams extends jspb.Message { + + hasBlockSize(): boolean; + clearBlockSize(): void; + getBlockSize(): BlockSize | undefined; + setBlockSize(value?: BlockSize): void; + + + hasTxSize(): boolean; + clearTxSize(): void; + getTxSize(): TxSize | undefined; + setTxSize(value?: TxSize): void; - hasTxSize(): boolean; - clearTxSize(): void; - getTxSize(): TxSize | undefined; - setTxSize(value?: TxSize): void; - hasBlockGossip(): boolean; - clearBlockGossip(): void; - getBlockGossip(): BlockGossip | undefined; - setBlockGossip(value?: BlockGossip): void; + hasBlockGossip(): boolean; + clearBlockGossip(): void; + getBlockGossip(): BlockGossip | undefined; + setBlockGossip(value?: BlockGossip): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConsensusParams.AsObject; - static toObject(includeInstance: boolean, msg: ConsensusParams): ConsensusParams.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConsensusParams, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConsensusParams; - static deserializeBinaryFromReader(message: ConsensusParams, reader: jspb.BinaryReader): ConsensusParams; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConsensusParams.AsObject; + static toObject(includeInstance: boolean, msg: ConsensusParams): ConsensusParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConsensusParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConsensusParams; + static deserializeBinaryFromReader(message: ConsensusParams, reader: jspb.BinaryReader): ConsensusParams; } export namespace ConsensusParams { - export type AsObject = { - blockSize?: BlockSize.AsObject, - txSize?: TxSize.AsObject, - blockGossip?: BlockGossip.AsObject, - } + export type AsObject = { + blockSize?: BlockSize.AsObject, + txSize?: TxSize.AsObject, + blockGossip?: BlockGossip.AsObject, + } } -export class BlockSize extends jspb.Message { - getMaxBytes(): number; - setMaxBytes(value: number): void; +export class BlockSize extends jspb.Message { + getMaxBytes(): number; + setMaxBytes(value: number): void; + + getMaxGas(): number; + setMaxGas(value: number): void; - getMaxGas(): number; - setMaxGas(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockSize.AsObject; - static toObject(includeInstance: boolean, msg: BlockSize): BlockSize.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockSize, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockSize; - static deserializeBinaryFromReader(message: BlockSize, reader: jspb.BinaryReader): BlockSize; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockSize.AsObject; + static toObject(includeInstance: boolean, msg: BlockSize): BlockSize.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockSize, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockSize; + static deserializeBinaryFromReader(message: BlockSize, reader: jspb.BinaryReader): BlockSize; } export namespace BlockSize { - export type AsObject = { - maxBytes: number, - maxGas: number, - } + export type AsObject = { + maxBytes: number, + maxGas: number, + } } -export class TxSize extends jspb.Message { - getMaxBytes(): number; - setMaxBytes(value: number): void; +export class TxSize extends jspb.Message { + getMaxBytes(): number; + setMaxBytes(value: number): void; + + getMaxGas(): number; + setMaxGas(value: number): void; - getMaxGas(): number; - setMaxGas(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TxSize.AsObject; - static toObject(includeInstance: boolean, msg: TxSize): TxSize.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TxSize, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TxSize; - static deserializeBinaryFromReader(message: TxSize, reader: jspb.BinaryReader): TxSize; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxSize.AsObject; + static toObject(includeInstance: boolean, msg: TxSize): TxSize.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxSize, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxSize; + static deserializeBinaryFromReader(message: TxSize, reader: jspb.BinaryReader): TxSize; } export namespace TxSize { - export type AsObject = { - maxBytes: number, - maxGas: number, - } + export type AsObject = { + maxBytes: number, + maxGas: number, + } } -export class BlockGossip extends jspb.Message { - getBlockPartSizeBytes(): number; - setBlockPartSizeBytes(value: number): void; +export class BlockGossip extends jspb.Message { + getBlockPartSizeBytes(): number; + setBlockPartSizeBytes(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockGossip.AsObject; - static toObject(includeInstance: boolean, msg: BlockGossip): BlockGossip.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockGossip, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockGossip; - static deserializeBinaryFromReader(message: BlockGossip, reader: jspb.BinaryReader): BlockGossip; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockGossip.AsObject; + static toObject(includeInstance: boolean, msg: BlockGossip): BlockGossip.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockGossip, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockGossip; + static deserializeBinaryFromReader(message: BlockGossip, reader: jspb.BinaryReader): BlockGossip; } export namespace BlockGossip { - export type AsObject = { - blockPartSizeBytes: number, - } + export type AsObject = { + blockPartSizeBytes: number, + } } -export class LastCommitInfo extends jspb.Message { - getRound(): number; - setRound(value: number): void; +export class LastCommitInfo extends jspb.Message { + getRound(): number; + setRound(value: number): void; + + clearVotesList(): void; + getVotesList(): Array; + setVotesList(value: Array): void; + addVotes(value?: VoteInfo, index?: number): VoteInfo; - clearVotesList(): void; - getVotesList(): Array; - setVotesList(value: Array): void; - addVotes(value?: VoteInfo, index?: number): VoteInfo; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LastCommitInfo.AsObject; - static toObject(includeInstance: boolean, msg: LastCommitInfo): LastCommitInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LastCommitInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LastCommitInfo; - static deserializeBinaryFromReader(message: LastCommitInfo, reader: jspb.BinaryReader): LastCommitInfo; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LastCommitInfo.AsObject; + static toObject(includeInstance: boolean, msg: LastCommitInfo): LastCommitInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LastCommitInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LastCommitInfo; + static deserializeBinaryFromReader(message: LastCommitInfo, reader: jspb.BinaryReader): LastCommitInfo; } export namespace LastCommitInfo { - export type AsObject = { - round: number, - votesList: Array, - } -} - -export class Header extends jspb.Message { - getChainId(): string; - setChainId(value: string): void; - - getHeight(): number; - setHeight(value: number): void; - - hasTime(): boolean; - clearTime(): void; - getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getNumTxs(): number; - setNumTxs(value: number): void; - - getTotalTxs(): number; - setTotalTxs(value: number): void; - - hasLastBlockId(): boolean; - clearLastBlockId(): void; - getLastBlockId(): BlockID | undefined; - setLastBlockId(value?: BlockID): void; - - getLastCommitHash(): Uint8Array | string; - getLastCommitHash_asU8(): Uint8Array; - getLastCommitHash_asB64(): string; - setLastCommitHash(value: Uint8Array | string): void; - - getDataHash(): Uint8Array | string; - getDataHash_asU8(): Uint8Array; - getDataHash_asB64(): string; - setDataHash(value: Uint8Array | string): void; - - getValidatorsHash(): Uint8Array | string; - getValidatorsHash_asU8(): Uint8Array; - getValidatorsHash_asB64(): string; - setValidatorsHash(value: Uint8Array | string): void; - - getNextValidatorsHash(): Uint8Array | string; - getNextValidatorsHash_asU8(): Uint8Array; - getNextValidatorsHash_asB64(): string; - setNextValidatorsHash(value: Uint8Array | string): void; - - getConsensusHash(): Uint8Array | string; - getConsensusHash_asU8(): Uint8Array; - getConsensusHash_asB64(): string; - setConsensusHash(value: Uint8Array | string): void; - - getAppHash(): Uint8Array | string; - getAppHash_asU8(): Uint8Array; - getAppHash_asB64(): string; - setAppHash(value: Uint8Array | string): void; - - getLastResultsHash(): Uint8Array | string; - getLastResultsHash_asU8(): Uint8Array; - getLastResultsHash_asB64(): string; - setLastResultsHash(value: Uint8Array | string): void; - - getEvidenceHash(): Uint8Array | string; - getEvidenceHash_asU8(): Uint8Array; - getEvidenceHash_asB64(): string; - setEvidenceHash(value: Uint8Array | string): void; - - getProposerAddress(): Uint8Array | string; - getProposerAddress_asU8(): Uint8Array; - getProposerAddress_asB64(): string; - setProposerAddress(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Header.AsObject; - static toObject(includeInstance: boolean, msg: Header): Header.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Header; - static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; + export type AsObject = { + round: number, + votesList: Array, + } +} + +export class Header extends jspb.Message { + getChainId(): string; + setChainId(value: string): void; + + getHeight(): number; + setHeight(value: number): void; + + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getNumTxs(): number; + setNumTxs(value: number): void; + + getTotalTxs(): number; + setTotalTxs(value: number): void; + + + hasLastBlockId(): boolean; + clearLastBlockId(): void; + getLastBlockId(): BlockID | undefined; + setLastBlockId(value?: BlockID): void; + + getLastCommitHash(): Uint8Array | string; + getLastCommitHash_asU8(): Uint8Array; + getLastCommitHash_asB64(): string; + setLastCommitHash(value: Uint8Array | string): void; + + getDataHash(): Uint8Array | string; + getDataHash_asU8(): Uint8Array; + getDataHash_asB64(): string; + setDataHash(value: Uint8Array | string): void; + + getValidatorsHash(): Uint8Array | string; + getValidatorsHash_asU8(): Uint8Array; + getValidatorsHash_asB64(): string; + setValidatorsHash(value: Uint8Array | string): void; + + getNextValidatorsHash(): Uint8Array | string; + getNextValidatorsHash_asU8(): Uint8Array; + getNextValidatorsHash_asB64(): string; + setNextValidatorsHash(value: Uint8Array | string): void; + + getConsensusHash(): Uint8Array | string; + getConsensusHash_asU8(): Uint8Array; + getConsensusHash_asB64(): string; + setConsensusHash(value: Uint8Array | string): void; + + getAppHash(): Uint8Array | string; + getAppHash_asU8(): Uint8Array; + getAppHash_asB64(): string; + setAppHash(value: Uint8Array | string): void; + + getLastResultsHash(): Uint8Array | string; + getLastResultsHash_asU8(): Uint8Array; + getLastResultsHash_asB64(): string; + setLastResultsHash(value: Uint8Array | string): void; + + getEvidenceHash(): Uint8Array | string; + getEvidenceHash_asU8(): Uint8Array; + getEvidenceHash_asB64(): string; + setEvidenceHash(value: Uint8Array | string): void; + + getProposerAddress(): Uint8Array | string; + getProposerAddress_asU8(): Uint8Array; + getProposerAddress_asB64(): string; + setProposerAddress(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Header.AsObject; + static toObject(includeInstance: boolean, msg: Header): Header.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Header; + static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; } export namespace Header { - export type AsObject = { - chainId: string, - height: number, - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - numTxs: number, - totalTxs: number, - lastBlockId?: BlockID.AsObject, - lastCommitHash: Uint8Array | string, - dataHash: Uint8Array | string, - validatorsHash: Uint8Array | string, - nextValidatorsHash: Uint8Array | string, - consensusHash: Uint8Array | string, - appHash: Uint8Array | string, - lastResultsHash: Uint8Array | string, - evidenceHash: Uint8Array | string, - proposerAddress: Uint8Array | string, - } -} - -export class BlockID extends jspb.Message { - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; - - hasPartsHeader(): boolean; - clearPartsHeader(): void; - getPartsHeader(): PartSetHeader | undefined; - setPartsHeader(value?: PartSetHeader): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockID.AsObject; - static toObject(includeInstance: boolean, msg: BlockID): BlockID.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockID; - static deserializeBinaryFromReader(message: BlockID, reader: jspb.BinaryReader): BlockID; + export type AsObject = { + chainId: string, + height: number, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + numTxs: number, + totalTxs: number, + lastBlockId?: BlockID.AsObject, + lastCommitHash: Uint8Array | string, + dataHash: Uint8Array | string, + validatorsHash: Uint8Array | string, + nextValidatorsHash: Uint8Array | string, + consensusHash: Uint8Array | string, + appHash: Uint8Array | string, + lastResultsHash: Uint8Array | string, + evidenceHash: Uint8Array | string, + proposerAddress: Uint8Array | string, + } +} + +export class BlockID extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + + + hasPartsHeader(): boolean; + clearPartsHeader(): void; + getPartsHeader(): PartSetHeader | undefined; + setPartsHeader(value?: PartSetHeader): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockID.AsObject; + static toObject(includeInstance: boolean, msg: BlockID): BlockID.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockID, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockID; + static deserializeBinaryFromReader(message: BlockID, reader: jspb.BinaryReader): BlockID; } export namespace BlockID { - export type AsObject = { - hash: Uint8Array | string, - partsHeader?: PartSetHeader.AsObject, - } + export type AsObject = { + hash: Uint8Array | string, + partsHeader?: PartSetHeader.AsObject, + } } -export class PartSetHeader extends jspb.Message { - getTotal(): number; - setTotal(value: number): void; +export class PartSetHeader extends jspb.Message { + getTotal(): number; + setTotal(value: number): void; + + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PartSetHeader.AsObject; - static toObject(includeInstance: boolean, msg: PartSetHeader): PartSetHeader.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PartSetHeader, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PartSetHeader; - static deserializeBinaryFromReader(message: PartSetHeader, reader: jspb.BinaryReader): PartSetHeader; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PartSetHeader.AsObject; + static toObject(includeInstance: boolean, msg: PartSetHeader): PartSetHeader.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PartSetHeader, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PartSetHeader; + static deserializeBinaryFromReader(message: PartSetHeader, reader: jspb.BinaryReader): PartSetHeader; } export namespace PartSetHeader { - export type AsObject = { - total: number, - hash: Uint8Array | string, - } + export type AsObject = { + total: number, + hash: Uint8Array | string, + } } -export class Validator extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; +export class Validator extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; - getPower(): number; - setPower(value: number): void; + getPower(): number; + setPower(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Validator.AsObject; - static toObject(includeInstance: boolean, msg: Validator): Validator.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Validator, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Validator; - static deserializeBinaryFromReader(message: Validator, reader: jspb.BinaryReader): Validator; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Validator.AsObject; + static toObject(includeInstance: boolean, msg: Validator): Validator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Validator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Validator; + static deserializeBinaryFromReader(message: Validator, reader: jspb.BinaryReader): Validator; } export namespace Validator { - export type AsObject = { - address: Uint8Array | string, - power: number, - } + export type AsObject = { + address: Uint8Array | string, + power: number, + } } -export class ValidatorUpdate extends jspb.Message { - hasPubKey(): boolean; - clearPubKey(): void; - getPubKey(): PubKey | undefined; - setPubKey(value?: PubKey): void; +export class ValidatorUpdate extends jspb.Message { + + hasPubKey(): boolean; + clearPubKey(): void; + getPubKey(): PubKey | undefined; + setPubKey(value?: PubKey): void; + + getPower(): number; + setPower(value: number): void; - getPower(): number; - setPower(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ValidatorUpdate.AsObject; - static toObject(includeInstance: boolean, msg: ValidatorUpdate): ValidatorUpdate.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ValidatorUpdate, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ValidatorUpdate; - static deserializeBinaryFromReader(message: ValidatorUpdate, reader: jspb.BinaryReader): ValidatorUpdate; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidatorUpdate.AsObject; + static toObject(includeInstance: boolean, msg: ValidatorUpdate): ValidatorUpdate.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValidatorUpdate, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidatorUpdate; + static deserializeBinaryFromReader(message: ValidatorUpdate, reader: jspb.BinaryReader): ValidatorUpdate; } export namespace ValidatorUpdate { - export type AsObject = { - pubKey?: PubKey.AsObject, - power: number, - } + export type AsObject = { + pubKey?: PubKey.AsObject, + power: number, + } } -export class VoteInfo extends jspb.Message { - hasValidator(): boolean; - clearValidator(): void; - getValidator(): Validator | undefined; - setValidator(value?: Validator): void; +export class VoteInfo extends jspb.Message { + + hasValidator(): boolean; + clearValidator(): void; + getValidator(): Validator | undefined; + setValidator(value?: Validator): void; + + getSignedLastBlock(): boolean; + setSignedLastBlock(value: boolean): void; - getSignedLastBlock(): boolean; - setSignedLastBlock(value: boolean): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VoteInfo.AsObject; - static toObject(includeInstance: boolean, msg: VoteInfo): VoteInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VoteInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VoteInfo; - static deserializeBinaryFromReader(message: VoteInfo, reader: jspb.BinaryReader): VoteInfo; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VoteInfo.AsObject; + static toObject(includeInstance: boolean, msg: VoteInfo): VoteInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VoteInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VoteInfo; + static deserializeBinaryFromReader(message: VoteInfo, reader: jspb.BinaryReader): VoteInfo; } export namespace VoteInfo { - export type AsObject = { - validator?: Validator.AsObject, - signedLastBlock: boolean, - } + export type AsObject = { + validator?: Validator.AsObject, + signedLastBlock: boolean, + } } -export class PubKey extends jspb.Message { - getType(): string; - setType(value: string): void; +export class PubKey extends jspb.Message { + getType(): string; + setType(value: string): void; - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PubKey.AsObject; - static toObject(includeInstance: boolean, msg: PubKey): PubKey.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PubKey, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PubKey; - static deserializeBinaryFromReader(message: PubKey, reader: jspb.BinaryReader): PubKey; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PubKey.AsObject; + static toObject(includeInstance: boolean, msg: PubKey): PubKey.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PubKey, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PubKey; + static deserializeBinaryFromReader(message: PubKey, reader: jspb.BinaryReader): PubKey; } export namespace PubKey { - export type AsObject = { - type: string, - data: Uint8Array | string, - } + export type AsObject = { + type: string, + data: Uint8Array | string, + } } -export class Evidence extends jspb.Message { - getType(): string; - setType(value: string): void; +export class Evidence extends jspb.Message { + getType(): string; + setType(value: string): void; + + + hasValidator(): boolean; + clearValidator(): void; + getValidator(): Validator | undefined; + setValidator(value?: Validator): void; - hasValidator(): boolean; - clearValidator(): void; - getValidator(): Validator | undefined; - setValidator(value?: Validator): void; + getHeight(): number; + setHeight(value: number): void; - getHeight(): number; - setHeight(value: number): void; - hasTime(): boolean; - clearTime(): void; - getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - getTotalVotingPower(): number; - setTotalVotingPower(value: number): void; + getTotalVotingPower(): number; + setTotalVotingPower(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Evidence.AsObject; - static toObject(includeInstance: boolean, msg: Evidence): Evidence.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Evidence, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Evidence; - static deserializeBinaryFromReader(message: Evidence, reader: jspb.BinaryReader): Evidence; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Evidence.AsObject; + static toObject(includeInstance: boolean, msg: Evidence): Evidence.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Evidence, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Evidence; + static deserializeBinaryFromReader(message: Evidence, reader: jspb.BinaryReader): Evidence; } export namespace Evidence { - export type AsObject = { - type: string, - validator?: Validator.AsObject, - height: number, - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - totalVotingPower: number, - } + export type AsObject = { + type: string, + validator?: Validator.AsObject, + height: number, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + totalVotingPower: number, + } } - diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js index 825f173a6..56a304c71 100644 --- a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js +++ b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js @@ -1,4 +1,3 @@ -// source: github.com/tendermint/tendermint/abci/types/types.proto /** * @fileoverview * @enhanceable @@ -28,7 +27,6 @@ goog.exportSymbol('proto.types.LastCommitInfo', null, global); goog.exportSymbol('proto.types.PartSetHeader', null, global); goog.exportSymbol('proto.types.PubKey', null, global); goog.exportSymbol('proto.types.Request', null, global); -goog.exportSymbol('proto.types.Request.ValueCase', null, global); goog.exportSymbol('proto.types.RequestBeginBlock', null, global); goog.exportSymbol('proto.types.RequestCheckTx', null, global); goog.exportSymbol('proto.types.RequestCommit', null, global); @@ -41,7 +39,6 @@ goog.exportSymbol('proto.types.RequestInitChain', null, global); goog.exportSymbol('proto.types.RequestQuery', null, global); goog.exportSymbol('proto.types.RequestSetOption', null, global); goog.exportSymbol('proto.types.Response', null, global); -goog.exportSymbol('proto.types.Response.ValueCase', null, global); goog.exportSymbol('proto.types.ResponseBeginBlock', null, global); goog.exportSymbol('proto.types.ResponseCheckTx', null, global); goog.exportSymbol('proto.types.ResponseCommit', null, global); @@ -58,6 +55,7 @@ goog.exportSymbol('proto.types.TxSize', null, global); goog.exportSymbol('proto.types.Validator', null, global); goog.exportSymbol('proto.types.ValidatorUpdate', null, global); goog.exportSymbol('proto.types.VoteInfo', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -68,795 +66,13 @@ goog.exportSymbol('proto.types.VoteInfo', null, global); * @extends {jspb.Message} * @constructor */ -proto.types.Request = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.types.Request.oneofGroups_); -}; -goog.inherits(proto.types.Request, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.Request.displayName = 'proto.types.Request'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestEcho = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestEcho, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.RequestEcho.displayName = 'proto.types.RequestEcho'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestFlush = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestFlush, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.RequestFlush.displayName = 'proto.types.RequestFlush'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.RequestInfo.displayName = 'proto.types.RequestInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestSetOption = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestSetOption, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.RequestSetOption.displayName = 'proto.types.RequestSetOption'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestInitChain = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.RequestInitChain.repeatedFields_, null); -}; -goog.inherits(proto.types.RequestInitChain, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.RequestInitChain.displayName = 'proto.types.RequestInitChain'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestQuery = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestQuery, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.RequestQuery.displayName = 'proto.types.RequestQuery'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestBeginBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.RequestBeginBlock.repeatedFields_, null); -}; -goog.inherits(proto.types.RequestBeginBlock, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.RequestBeginBlock.displayName = 'proto.types.RequestBeginBlock'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestCheckTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestCheckTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.RequestCheckTx.displayName = 'proto.types.RequestCheckTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestDeliverTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestDeliverTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.RequestDeliverTx.displayName = 'proto.types.RequestDeliverTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestEndBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestEndBlock, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.RequestEndBlock.displayName = 'proto.types.RequestEndBlock'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestCommit = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestCommit, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.RequestCommit.displayName = 'proto.types.RequestCommit'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.Response = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.types.Response.oneofGroups_); -}; -goog.inherits(proto.types.Response, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.Response.displayName = 'proto.types.Response'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseException = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseException, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ResponseException.displayName = 'proto.types.ResponseException'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseEcho = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseEcho, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ResponseEcho.displayName = 'proto.types.ResponseEcho'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseFlush = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseFlush, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ResponseFlush.displayName = 'proto.types.ResponseFlush'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ResponseInfo.displayName = 'proto.types.ResponseInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseSetOption = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseSetOption, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ResponseSetOption.displayName = 'proto.types.ResponseSetOption'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseInitChain = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseInitChain.repeatedFields_, null); -}; -goog.inherits(proto.types.ResponseInitChain, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ResponseInitChain.displayName = 'proto.types.ResponseInitChain'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseQuery = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseQuery, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ResponseQuery.displayName = 'proto.types.ResponseQuery'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseBeginBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseBeginBlock.repeatedFields_, null); -}; -goog.inherits(proto.types.ResponseBeginBlock, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ResponseBeginBlock.displayName = 'proto.types.ResponseBeginBlock'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseCheckTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseCheckTx.repeatedFields_, null); -}; -goog.inherits(proto.types.ResponseCheckTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ResponseCheckTx.displayName = 'proto.types.ResponseCheckTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseDeliverTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseDeliverTx.repeatedFields_, null); -}; -goog.inherits(proto.types.ResponseDeliverTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ResponseDeliverTx.displayName = 'proto.types.ResponseDeliverTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseEndBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseEndBlock.repeatedFields_, null); -}; -goog.inherits(proto.types.ResponseEndBlock, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ResponseEndBlock.displayName = 'proto.types.ResponseEndBlock'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseCommit = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseCommit, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ResponseCommit.displayName = 'proto.types.ResponseCommit'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ConsensusParams = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ConsensusParams, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ConsensusParams.displayName = 'proto.types.ConsensusParams'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.BlockSize = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.BlockSize, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.BlockSize.displayName = 'proto.types.BlockSize'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.TxSize = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.TxSize, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.TxSize.displayName = 'proto.types.TxSize'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.BlockGossip = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.BlockGossip, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.BlockGossip.displayName = 'proto.types.BlockGossip'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.LastCommitInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.LastCommitInfo.repeatedFields_, null); -}; -goog.inherits(proto.types.LastCommitInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.LastCommitInfo.displayName = 'proto.types.LastCommitInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.Header = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.Header, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.Header.displayName = 'proto.types.Header'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.BlockID = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.BlockID, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.BlockID.displayName = 'proto.types.BlockID'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.PartSetHeader = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.PartSetHeader, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.PartSetHeader.displayName = 'proto.types.PartSetHeader'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.Validator = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.Validator, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.Validator.displayName = 'proto.types.Validator'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ValidatorUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ValidatorUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.ValidatorUpdate.displayName = 'proto.types.ValidatorUpdate'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.VoteInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.VoteInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.VoteInfo.displayName = 'proto.types.VoteInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.PubKey = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.PubKey, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.PubKey.displayName = 'proto.types.PubKey'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.Evidence = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.types.Request = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.types.Request.oneofGroups_); }; -goog.inherits(proto.types.Evidence, jspb.Message); +goog.inherits(proto.types.Request, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.types.Evidence.displayName = 'proto.types.Evidence'; + proto.types.Request.displayName = 'proto.types.Request'; } - /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all @@ -896,15 +112,13 @@ proto.types.Request.prototype.getValueCase = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.Request.prototype.toObject = function(opt_includeInstance) { @@ -914,8 +128,8 @@ proto.types.Request.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Request} msg The msg instance to transform. * @return {!Object} @@ -1155,21 +369,14 @@ proto.types.Request.prototype.getEcho = function() { }; -/** - * @param {?proto.types.RequestEcho|undefined} value - * @return {!proto.types.Request} returns this -*/ +/** @param {?proto.types.RequestEcho|undefined} value */ proto.types.Request.prototype.setEcho = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.types.Request.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 2, proto.types.Request.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Request} returns this - */ proto.types.Request.prototype.clearEcho = function() { - return this.setEcho(undefined); + this.setEcho(undefined); }; @@ -1192,21 +399,14 @@ proto.types.Request.prototype.getFlush = function() { }; -/** - * @param {?proto.types.RequestFlush|undefined} value - * @return {!proto.types.Request} returns this -*/ +/** @param {?proto.types.RequestFlush|undefined} value */ proto.types.Request.prototype.setFlush = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.types.Request.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 3, proto.types.Request.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Request} returns this - */ proto.types.Request.prototype.clearFlush = function() { - return this.setFlush(undefined); + this.setFlush(undefined); }; @@ -1229,21 +429,14 @@ proto.types.Request.prototype.getInfo = function() { }; -/** - * @param {?proto.types.RequestInfo|undefined} value - * @return {!proto.types.Request} returns this -*/ +/** @param {?proto.types.RequestInfo|undefined} value */ proto.types.Request.prototype.setInfo = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.types.Request.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 4, proto.types.Request.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Request} returns this - */ proto.types.Request.prototype.clearInfo = function() { - return this.setInfo(undefined); + this.setInfo(undefined); }; @@ -1266,21 +459,14 @@ proto.types.Request.prototype.getSetOption = function() { }; -/** - * @param {?proto.types.RequestSetOption|undefined} value - * @return {!proto.types.Request} returns this -*/ +/** @param {?proto.types.RequestSetOption|undefined} value */ proto.types.Request.prototype.setSetOption = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.types.Request.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 5, proto.types.Request.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Request} returns this - */ proto.types.Request.prototype.clearSetOption = function() { - return this.setSetOption(undefined); + this.setSetOption(undefined); }; @@ -1303,21 +489,14 @@ proto.types.Request.prototype.getInitChain = function() { }; -/** - * @param {?proto.types.RequestInitChain|undefined} value - * @return {!proto.types.Request} returns this -*/ +/** @param {?proto.types.RequestInitChain|undefined} value */ proto.types.Request.prototype.setInitChain = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.types.Request.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 6, proto.types.Request.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Request} returns this - */ proto.types.Request.prototype.clearInitChain = function() { - return this.setInitChain(undefined); + this.setInitChain(undefined); }; @@ -1340,21 +519,14 @@ proto.types.Request.prototype.getQuery = function() { }; -/** - * @param {?proto.types.RequestQuery|undefined} value - * @return {!proto.types.Request} returns this -*/ +/** @param {?proto.types.RequestQuery|undefined} value */ proto.types.Request.prototype.setQuery = function(value) { - return jspb.Message.setOneofWrapperField(this, 7, proto.types.Request.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 7, proto.types.Request.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Request} returns this - */ proto.types.Request.prototype.clearQuery = function() { - return this.setQuery(undefined); + this.setQuery(undefined); }; @@ -1377,21 +549,14 @@ proto.types.Request.prototype.getBeginBlock = function() { }; -/** - * @param {?proto.types.RequestBeginBlock|undefined} value - * @return {!proto.types.Request} returns this -*/ +/** @param {?proto.types.RequestBeginBlock|undefined} value */ proto.types.Request.prototype.setBeginBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 8, proto.types.Request.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 8, proto.types.Request.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Request} returns this - */ proto.types.Request.prototype.clearBeginBlock = function() { - return this.setBeginBlock(undefined); + this.setBeginBlock(undefined); }; @@ -1414,21 +579,14 @@ proto.types.Request.prototype.getCheckTx = function() { }; -/** - * @param {?proto.types.RequestCheckTx|undefined} value - * @return {!proto.types.Request} returns this -*/ +/** @param {?proto.types.RequestCheckTx|undefined} value */ proto.types.Request.prototype.setCheckTx = function(value) { - return jspb.Message.setOneofWrapperField(this, 9, proto.types.Request.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 9, proto.types.Request.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Request} returns this - */ proto.types.Request.prototype.clearCheckTx = function() { - return this.setCheckTx(undefined); + this.setCheckTx(undefined); }; @@ -1451,21 +609,14 @@ proto.types.Request.prototype.getDeliverTx = function() { }; -/** - * @param {?proto.types.RequestDeliverTx|undefined} value - * @return {!proto.types.Request} returns this -*/ +/** @param {?proto.types.RequestDeliverTx|undefined} value */ proto.types.Request.prototype.setDeliverTx = function(value) { - return jspb.Message.setOneofWrapperField(this, 19, proto.types.Request.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 19, proto.types.Request.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Request} returns this - */ proto.types.Request.prototype.clearDeliverTx = function() { - return this.setDeliverTx(undefined); + this.setDeliverTx(undefined); }; @@ -1488,21 +639,14 @@ proto.types.Request.prototype.getEndBlock = function() { }; -/** - * @param {?proto.types.RequestEndBlock|undefined} value - * @return {!proto.types.Request} returns this -*/ +/** @param {?proto.types.RequestEndBlock|undefined} value */ proto.types.Request.prototype.setEndBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 11, proto.types.Request.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 11, proto.types.Request.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Request} returns this - */ proto.types.Request.prototype.clearEndBlock = function() { - return this.setEndBlock(undefined); + this.setEndBlock(undefined); }; @@ -1525,21 +669,14 @@ proto.types.Request.prototype.getCommit = function() { }; -/** - * @param {?proto.types.RequestCommit|undefined} value - * @return {!proto.types.Request} returns this -*/ +/** @param {?proto.types.RequestCommit|undefined} value */ proto.types.Request.prototype.setCommit = function(value) { - return jspb.Message.setOneofWrapperField(this, 12, proto.types.Request.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 12, proto.types.Request.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Request} returns this - */ proto.types.Request.prototype.clearCommit = function() { - return this.setCommit(undefined); + this.setCommit(undefined); }; @@ -1553,19 +690,34 @@ proto.types.Request.prototype.hasCommit = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestEcho = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestEcho, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.RequestEcho.displayName = 'proto.types.RequestEcho'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestEcho.prototype.toObject = function(opt_includeInstance) { @@ -1575,8 +727,8 @@ proto.types.RequestEcho.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestEcho} msg The msg instance to transform. * @return {!Object} @@ -1673,29 +825,41 @@ proto.types.RequestEcho.prototype.getMessage = function() { }; -/** - * @param {string} value - * @return {!proto.types.RequestEcho} returns this - */ +/** @param {string} value */ proto.types.RequestEcho.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestFlush = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestFlush, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.RequestFlush.displayName = 'proto.types.RequestFlush'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestFlush.prototype.toObject = function(opt_includeInstance) { @@ -1705,8 +869,8 @@ proto.types.RequestFlush.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestFlush} msg The msg instance to transform. * @return {!Object} @@ -1784,19 +948,34 @@ proto.types.RequestFlush.serializeBinaryToWriter = function(message, writer) { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.RequestInfo.displayName = 'proto.types.RequestInfo'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestInfo.prototype.toObject = function(opt_includeInstance) { @@ -1806,8 +985,8 @@ proto.types.RequestInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestInfo} msg The msg instance to transform. * @return {!Object} @@ -1904,29 +1083,41 @@ proto.types.RequestInfo.prototype.getVersion = function() { }; -/** - * @param {string} value - * @return {!proto.types.RequestInfo} returns this - */ +/** @param {string} value */ proto.types.RequestInfo.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestSetOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestSetOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.RequestSetOption.displayName = 'proto.types.RequestSetOption'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestSetOption.prototype.toObject = function(opt_includeInstance) { @@ -1936,8 +1127,8 @@ proto.types.RequestSetOption.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestSetOption} msg The msg instance to transform. * @return {!Object} @@ -2046,12 +1237,9 @@ proto.types.RequestSetOption.prototype.getKey = function() { }; -/** - * @param {string} value - * @return {!proto.types.RequestSetOption} returns this - */ +/** @param {string} value */ proto.types.RequestSetOption.prototype.setKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -2064,16 +1252,30 @@ proto.types.RequestSetOption.prototype.getValue = function() { }; -/** - * @param {string} value - * @return {!proto.types.RequestSetOption} returns this - */ +/** @param {string} value */ proto.types.RequestSetOption.prototype.setValue = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestInitChain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.RequestInitChain.repeatedFields_, null); +}; +goog.inherits(proto.types.RequestInitChain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.RequestInitChain.displayName = 'proto.types.RequestInitChain'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -2085,15 +1287,13 @@ proto.types.RequestInitChain.repeatedFields_ = [4]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestInitChain.prototype.toObject = function(opt_includeInstance) { @@ -2103,8 +1303,8 @@ proto.types.RequestInitChain.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestInitChain} msg The msg instance to transform. * @return {!Object} @@ -2257,21 +1457,14 @@ proto.types.RequestInitChain.prototype.getTime = function() { }; -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.types.RequestInitChain} returns this -*/ +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ proto.types.RequestInitChain.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.RequestInitChain} returns this - */ proto.types.RequestInitChain.prototype.clearTime = function() { - return this.setTime(undefined); + this.setTime(undefined); }; @@ -2293,12 +1486,9 @@ proto.types.RequestInitChain.prototype.getChainId = function() { }; -/** - * @param {string} value - * @return {!proto.types.RequestInitChain} returns this - */ +/** @param {string} value */ proto.types.RequestInitChain.prototype.setChainId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; @@ -2312,21 +1502,14 @@ proto.types.RequestInitChain.prototype.getConsensusParams = function() { }; -/** - * @param {?proto.types.ConsensusParams|undefined} value - * @return {!proto.types.RequestInitChain} returns this -*/ +/** @param {?proto.types.ConsensusParams|undefined} value */ proto.types.RequestInitChain.prototype.setConsensusParams = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.RequestInitChain} returns this - */ proto.types.RequestInitChain.prototype.clearConsensusParams = function() { - return this.setConsensusParams(undefined); + this.setConsensusParams(undefined); }; @@ -2349,12 +1532,9 @@ proto.types.RequestInitChain.prototype.getValidatorsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.types.RequestInitChain} returns this -*/ +/** @param {!Array} value */ proto.types.RequestInitChain.prototype.setValidatorsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); + jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -2368,12 +1548,8 @@ proto.types.RequestInitChain.prototype.addValidators = function(opt_value, opt_i }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.types.RequestInitChain} returns this - */ proto.types.RequestInitChain.prototype.clearValidatorsList = function() { - return this.setValidatorsList([]); + this.setValidatorsList([]); }; @@ -2410,29 +1586,41 @@ proto.types.RequestInitChain.prototype.getAppStateBytes_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.RequestInitChain} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.RequestInitChain.prototype.setAppStateBytes = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); + jspb.Message.setProto3BytesField(this, 5, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.RequestQuery.displayName = 'proto.types.RequestQuery'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestQuery.prototype.toObject = function(opt_includeInstance) { @@ -2442,8 +1630,8 @@ proto.types.RequestQuery.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestQuery} msg The msg instance to transform. * @return {!Object} @@ -2454,7 +1642,7 @@ proto.types.RequestQuery.toObject = function(includeInstance, msg) { data: msg.getData_asB64(), path: jspb.Message.getFieldWithDefault(msg, 2, ""), height: jspb.Message.getFieldWithDefault(msg, 3, 0), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + prove: jspb.Message.getFieldWithDefault(msg, 4, false) }; if (includeInstance) { @@ -2600,12 +1788,9 @@ proto.types.RequestQuery.prototype.getData_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.RequestQuery} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.RequestQuery.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2618,12 +1803,9 @@ proto.types.RequestQuery.prototype.getPath = function() { }; -/** - * @param {string} value - * @return {!proto.types.RequestQuery} returns this - */ +/** @param {string} value */ proto.types.RequestQuery.prototype.setPath = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; @@ -2636,34 +1818,47 @@ proto.types.RequestQuery.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.types.RequestQuery} returns this - */ +/** @param {number} value */ proto.types.RequestQuery.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; /** * optional bool prove = 4; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.types.RequestQuery.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); }; -/** - * @param {boolean} value - * @return {!proto.types.RequestQuery} returns this - */ +/** @param {boolean} value */ proto.types.RequestQuery.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); + jspb.Message.setProto3BooleanField(this, 4, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestBeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.RequestBeginBlock.repeatedFields_, null); +}; +goog.inherits(proto.types.RequestBeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.RequestBeginBlock.displayName = 'proto.types.RequestBeginBlock'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -2675,15 +1870,13 @@ proto.types.RequestBeginBlock.repeatedFields_ = [4]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestBeginBlock.prototype.toObject = function(opt_includeInstance) { @@ -2693,8 +1886,8 @@ proto.types.RequestBeginBlock.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestBeginBlock} msg The msg instance to transform. * @return {!Object} @@ -2858,12 +2051,9 @@ proto.types.RequestBeginBlock.prototype.getHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.RequestBeginBlock} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.RequestBeginBlock.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2877,21 +2067,14 @@ proto.types.RequestBeginBlock.prototype.getHeader = function() { }; -/** - * @param {?proto.types.Header|undefined} value - * @return {!proto.types.RequestBeginBlock} returns this -*/ +/** @param {?proto.types.Header|undefined} value */ proto.types.RequestBeginBlock.prototype.setHeader = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.RequestBeginBlock} returns this - */ proto.types.RequestBeginBlock.prototype.clearHeader = function() { - return this.setHeader(undefined); + this.setHeader(undefined); }; @@ -2914,21 +2097,14 @@ proto.types.RequestBeginBlock.prototype.getLastCommitInfo = function() { }; -/** - * @param {?proto.types.LastCommitInfo|undefined} value - * @return {!proto.types.RequestBeginBlock} returns this -*/ +/** @param {?proto.types.LastCommitInfo|undefined} value */ proto.types.RequestBeginBlock.prototype.setLastCommitInfo = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.RequestBeginBlock} returns this - */ proto.types.RequestBeginBlock.prototype.clearLastCommitInfo = function() { - return this.setLastCommitInfo(undefined); + this.setLastCommitInfo(undefined); }; @@ -2951,12 +2127,9 @@ proto.types.RequestBeginBlock.prototype.getByzantineValidatorsList = function() }; -/** - * @param {!Array} value - * @return {!proto.types.RequestBeginBlock} returns this -*/ +/** @param {!Array} value */ proto.types.RequestBeginBlock.prototype.setByzantineValidatorsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); + jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -2970,29 +2143,40 @@ proto.types.RequestBeginBlock.prototype.addByzantineValidators = function(opt_va }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.types.RequestBeginBlock} returns this - */ proto.types.RequestBeginBlock.prototype.clearByzantineValidatorsList = function() { - return this.setByzantineValidatorsList([]); + this.setByzantineValidatorsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestCheckTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestCheckTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.RequestCheckTx.displayName = 'proto.types.RequestCheckTx'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { @@ -3002,8 +2186,8 @@ proto.types.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestCheckTx} msg The msg instance to transform. * @return {!Object} @@ -3124,29 +2308,41 @@ proto.types.RequestCheckTx.prototype.getTx_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.RequestCheckTx} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.RequestCheckTx.prototype.setTx = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestDeliverTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestDeliverTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.RequestDeliverTx.displayName = 'proto.types.RequestDeliverTx'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestDeliverTx.prototype.toObject = function(opt_includeInstance) { @@ -3156,8 +2352,8 @@ proto.types.RequestDeliverTx.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestDeliverTx} msg The msg instance to transform. * @return {!Object} @@ -3278,29 +2474,41 @@ proto.types.RequestDeliverTx.prototype.getTx_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.RequestDeliverTx} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.RequestDeliverTx.prototype.setTx = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestEndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestEndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.RequestEndBlock.displayName = 'proto.types.RequestEndBlock'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestEndBlock.prototype.toObject = function(opt_includeInstance) { @@ -3310,8 +2518,8 @@ proto.types.RequestEndBlock.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestEndBlock} msg The msg instance to transform. * @return {!Object} @@ -3408,29 +2616,41 @@ proto.types.RequestEndBlock.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.types.RequestEndBlock} returns this - */ +/** @param {number} value */ proto.types.RequestEndBlock.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.RequestCommit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.RequestCommit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.RequestCommit.displayName = 'proto.types.RequestCommit'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.RequestCommit.prototype.toObject = function(opt_includeInstance) { @@ -3440,8 +2660,8 @@ proto.types.RequestCommit.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.RequestCommit} msg The msg instance to transform. * @return {!Object} @@ -3519,6 +2739,23 @@ proto.types.RequestCommit.serializeBinaryToWriter = function(message, writer) { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.Response = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.types.Response.oneofGroups_); +}; +goog.inherits(proto.types.Response, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.Response.displayName = 'proto.types.Response'; +} /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all @@ -3559,15 +2796,13 @@ proto.types.Response.prototype.getValueCase = function() { if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.Response.prototype.toObject = function(opt_includeInstance) { @@ -3577,8 +2812,8 @@ proto.types.Response.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Response} msg The msg instance to transform. * @return {!Object} @@ -3832,21 +3067,14 @@ proto.types.Response.prototype.getException = function() { }; -/** - * @param {?proto.types.ResponseException|undefined} value - * @return {!proto.types.Response} returns this -*/ +/** @param {?proto.types.ResponseException|undefined} value */ proto.types.Response.prototype.setException = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.types.Response.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 1, proto.types.Response.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Response} returns this - */ proto.types.Response.prototype.clearException = function() { - return this.setException(undefined); + this.setException(undefined); }; @@ -3869,21 +3097,14 @@ proto.types.Response.prototype.getEcho = function() { }; -/** - * @param {?proto.types.ResponseEcho|undefined} value - * @return {!proto.types.Response} returns this -*/ +/** @param {?proto.types.ResponseEcho|undefined} value */ proto.types.Response.prototype.setEcho = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.types.Response.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 2, proto.types.Response.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Response} returns this - */ proto.types.Response.prototype.clearEcho = function() { - return this.setEcho(undefined); + this.setEcho(undefined); }; @@ -3906,21 +3127,14 @@ proto.types.Response.prototype.getFlush = function() { }; -/** - * @param {?proto.types.ResponseFlush|undefined} value - * @return {!proto.types.Response} returns this -*/ +/** @param {?proto.types.ResponseFlush|undefined} value */ proto.types.Response.prototype.setFlush = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.types.Response.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 3, proto.types.Response.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Response} returns this - */ proto.types.Response.prototype.clearFlush = function() { - return this.setFlush(undefined); + this.setFlush(undefined); }; @@ -3943,21 +3157,14 @@ proto.types.Response.prototype.getInfo = function() { }; -/** - * @param {?proto.types.ResponseInfo|undefined} value - * @return {!proto.types.Response} returns this -*/ +/** @param {?proto.types.ResponseInfo|undefined} value */ proto.types.Response.prototype.setInfo = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.types.Response.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 4, proto.types.Response.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Response} returns this - */ proto.types.Response.prototype.clearInfo = function() { - return this.setInfo(undefined); + this.setInfo(undefined); }; @@ -3980,21 +3187,14 @@ proto.types.Response.prototype.getSetOption = function() { }; -/** - * @param {?proto.types.ResponseSetOption|undefined} value - * @return {!proto.types.Response} returns this -*/ +/** @param {?proto.types.ResponseSetOption|undefined} value */ proto.types.Response.prototype.setSetOption = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.types.Response.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 5, proto.types.Response.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Response} returns this - */ proto.types.Response.prototype.clearSetOption = function() { - return this.setSetOption(undefined); + this.setSetOption(undefined); }; @@ -4017,21 +3217,14 @@ proto.types.Response.prototype.getInitChain = function() { }; -/** - * @param {?proto.types.ResponseInitChain|undefined} value - * @return {!proto.types.Response} returns this -*/ +/** @param {?proto.types.ResponseInitChain|undefined} value */ proto.types.Response.prototype.setInitChain = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.types.Response.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 6, proto.types.Response.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Response} returns this - */ proto.types.Response.prototype.clearInitChain = function() { - return this.setInitChain(undefined); + this.setInitChain(undefined); }; @@ -4054,21 +3247,14 @@ proto.types.Response.prototype.getQuery = function() { }; -/** - * @param {?proto.types.ResponseQuery|undefined} value - * @return {!proto.types.Response} returns this -*/ +/** @param {?proto.types.ResponseQuery|undefined} value */ proto.types.Response.prototype.setQuery = function(value) { - return jspb.Message.setOneofWrapperField(this, 7, proto.types.Response.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 7, proto.types.Response.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Response} returns this - */ proto.types.Response.prototype.clearQuery = function() { - return this.setQuery(undefined); + this.setQuery(undefined); }; @@ -4091,21 +3277,14 @@ proto.types.Response.prototype.getBeginBlock = function() { }; -/** - * @param {?proto.types.ResponseBeginBlock|undefined} value - * @return {!proto.types.Response} returns this -*/ +/** @param {?proto.types.ResponseBeginBlock|undefined} value */ proto.types.Response.prototype.setBeginBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 8, proto.types.Response.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 8, proto.types.Response.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Response} returns this - */ proto.types.Response.prototype.clearBeginBlock = function() { - return this.setBeginBlock(undefined); + this.setBeginBlock(undefined); }; @@ -4128,21 +3307,14 @@ proto.types.Response.prototype.getCheckTx = function() { }; -/** - * @param {?proto.types.ResponseCheckTx|undefined} value - * @return {!proto.types.Response} returns this -*/ +/** @param {?proto.types.ResponseCheckTx|undefined} value */ proto.types.Response.prototype.setCheckTx = function(value) { - return jspb.Message.setOneofWrapperField(this, 9, proto.types.Response.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 9, proto.types.Response.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Response} returns this - */ proto.types.Response.prototype.clearCheckTx = function() { - return this.setCheckTx(undefined); + this.setCheckTx(undefined); }; @@ -4165,21 +3337,14 @@ proto.types.Response.prototype.getDeliverTx = function() { }; -/** - * @param {?proto.types.ResponseDeliverTx|undefined} value - * @return {!proto.types.Response} returns this -*/ +/** @param {?proto.types.ResponseDeliverTx|undefined} value */ proto.types.Response.prototype.setDeliverTx = function(value) { - return jspb.Message.setOneofWrapperField(this, 10, proto.types.Response.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 10, proto.types.Response.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Response} returns this - */ proto.types.Response.prototype.clearDeliverTx = function() { - return this.setDeliverTx(undefined); + this.setDeliverTx(undefined); }; @@ -4202,21 +3367,14 @@ proto.types.Response.prototype.getEndBlock = function() { }; -/** - * @param {?proto.types.ResponseEndBlock|undefined} value - * @return {!proto.types.Response} returns this -*/ +/** @param {?proto.types.ResponseEndBlock|undefined} value */ proto.types.Response.prototype.setEndBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 11, proto.types.Response.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 11, proto.types.Response.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Response} returns this - */ proto.types.Response.prototype.clearEndBlock = function() { - return this.setEndBlock(undefined); + this.setEndBlock(undefined); }; @@ -4239,21 +3397,14 @@ proto.types.Response.prototype.getCommit = function() { }; -/** - * @param {?proto.types.ResponseCommit|undefined} value - * @return {!proto.types.Response} returns this -*/ +/** @param {?proto.types.ResponseCommit|undefined} value */ proto.types.Response.prototype.setCommit = function(value) { - return jspb.Message.setOneofWrapperField(this, 12, proto.types.Response.oneofGroups_[0], value); + jspb.Message.setOneofWrapperField(this, 12, proto.types.Response.oneofGroups_[0], value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Response} returns this - */ proto.types.Response.prototype.clearCommit = function() { - return this.setCommit(undefined); + this.setCommit(undefined); }; @@ -4267,19 +3418,34 @@ proto.types.Response.prototype.hasCommit = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseException = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseException, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ResponseException.displayName = 'proto.types.ResponseException'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseException.prototype.toObject = function(opt_includeInstance) { @@ -4289,8 +3455,8 @@ proto.types.ResponseException.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseException} msg The msg instance to transform. * @return {!Object} @@ -4387,29 +3553,41 @@ proto.types.ResponseException.prototype.getError = function() { }; -/** - * @param {string} value - * @return {!proto.types.ResponseException} returns this - */ +/** @param {string} value */ proto.types.ResponseException.prototype.setError = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseEcho = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseEcho, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ResponseEcho.displayName = 'proto.types.ResponseEcho'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseEcho.prototype.toObject = function(opt_includeInstance) { @@ -4419,8 +3597,8 @@ proto.types.ResponseEcho.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseEcho} msg The msg instance to transform. * @return {!Object} @@ -4517,29 +3695,41 @@ proto.types.ResponseEcho.prototype.getMessage = function() { }; -/** - * @param {string} value - * @return {!proto.types.ResponseEcho} returns this - */ +/** @param {string} value */ proto.types.ResponseEcho.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseFlush = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseFlush, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ResponseFlush.displayName = 'proto.types.ResponseFlush'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseFlush.prototype.toObject = function(opt_includeInstance) { @@ -4549,8 +3739,8 @@ proto.types.ResponseFlush.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseFlush} msg The msg instance to transform. * @return {!Object} @@ -4628,19 +3818,34 @@ proto.types.ResponseFlush.serializeBinaryToWriter = function(message, writer) { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ResponseInfo.displayName = 'proto.types.ResponseInfo'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseInfo.prototype.toObject = function(opt_includeInstance) { @@ -4650,8 +3855,8 @@ proto.types.ResponseInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseInfo} msg The msg instance to transform. * @return {!Object} @@ -4784,12 +3989,9 @@ proto.types.ResponseInfo.prototype.getData = function() { }; -/** - * @param {string} value - * @return {!proto.types.ResponseInfo} returns this - */ +/** @param {string} value */ proto.types.ResponseInfo.prototype.setData = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -4802,12 +4004,9 @@ proto.types.ResponseInfo.prototype.getVersion = function() { }; -/** - * @param {string} value - * @return {!proto.types.ResponseInfo} returns this - */ +/** @param {string} value */ proto.types.ResponseInfo.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; @@ -4820,12 +4019,9 @@ proto.types.ResponseInfo.prototype.getLastBlockHeight = function() { }; -/** - * @param {number} value - * @return {!proto.types.ResponseInfo} returns this - */ +/** @param {number} value */ proto.types.ResponseInfo.prototype.setLastBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; @@ -4862,29 +4058,41 @@ proto.types.ResponseInfo.prototype.getLastBlockAppHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.ResponseInfo} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.ResponseInfo.prototype.setLastBlockAppHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); + jspb.Message.setProto3BytesField(this, 4, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseSetOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseSetOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ResponseSetOption.displayName = 'proto.types.ResponseSetOption'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseSetOption.prototype.toObject = function(opt_includeInstance) { @@ -4894,8 +4102,8 @@ proto.types.ResponseSetOption.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseSetOption} msg The msg instance to transform. * @return {!Object} @@ -5016,12 +4224,9 @@ proto.types.ResponseSetOption.prototype.getCode = function() { }; -/** - * @param {number} value - * @return {!proto.types.ResponseSetOption} returns this - */ +/** @param {number} value */ proto.types.ResponseSetOption.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -5034,12 +4239,9 @@ proto.types.ResponseSetOption.prototype.getLog = function() { }; -/** - * @param {string} value - * @return {!proto.types.ResponseSetOption} returns this - */ +/** @param {string} value */ proto.types.ResponseSetOption.prototype.setLog = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; @@ -5052,16 +4254,30 @@ proto.types.ResponseSetOption.prototype.getInfo = function() { }; -/** - * @param {string} value - * @return {!proto.types.ResponseSetOption} returns this - */ +/** @param {string} value */ proto.types.ResponseSetOption.prototype.setInfo = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); + jspb.Message.setProto3StringField(this, 4, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseInitChain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseInitChain.repeatedFields_, null); +}; +goog.inherits(proto.types.ResponseInitChain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ResponseInitChain.displayName = 'proto.types.ResponseInitChain'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -5073,15 +4289,13 @@ proto.types.ResponseInitChain.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseInitChain.prototype.toObject = function(opt_includeInstance) { @@ -5091,8 +4305,8 @@ proto.types.ResponseInitChain.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseInitChain} msg The msg instance to transform. * @return {!Object} @@ -5207,21 +4421,14 @@ proto.types.ResponseInitChain.prototype.getConsensusParams = function() { }; -/** - * @param {?proto.types.ConsensusParams|undefined} value - * @return {!proto.types.ResponseInitChain} returns this -*/ +/** @param {?proto.types.ConsensusParams|undefined} value */ proto.types.ResponseInitChain.prototype.setConsensusParams = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.ResponseInitChain} returns this - */ proto.types.ResponseInitChain.prototype.clearConsensusParams = function() { - return this.setConsensusParams(undefined); + this.setConsensusParams(undefined); }; @@ -5244,12 +4451,9 @@ proto.types.ResponseInitChain.prototype.getValidatorsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.types.ResponseInitChain} returns this -*/ +/** @param {!Array} value */ proto.types.ResponseInitChain.prototype.setValidatorsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -5263,29 +4467,40 @@ proto.types.ResponseInitChain.prototype.addValidators = function(opt_value, opt_ }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.types.ResponseInitChain} returns this - */ proto.types.ResponseInitChain.prototype.clearValidatorsList = function() { - return this.setValidatorsList([]); + this.setValidatorsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ResponseQuery.displayName = 'proto.types.ResponseQuery'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseQuery.prototype.toObject = function(opt_includeInstance) { @@ -5295,8 +4510,8 @@ proto.types.ResponseQuery.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseQuery} msg The msg instance to transform. * @return {!Object} @@ -5477,12 +4692,9 @@ proto.types.ResponseQuery.prototype.getCode = function() { }; -/** - * @param {number} value - * @return {!proto.types.ResponseQuery} returns this - */ +/** @param {number} value */ proto.types.ResponseQuery.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -5495,12 +4707,9 @@ proto.types.ResponseQuery.prototype.getLog = function() { }; -/** - * @param {string} value - * @return {!proto.types.ResponseQuery} returns this - */ +/** @param {string} value */ proto.types.ResponseQuery.prototype.setLog = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; @@ -5513,12 +4722,9 @@ proto.types.ResponseQuery.prototype.getInfo = function() { }; -/** - * @param {string} value - * @return {!proto.types.ResponseQuery} returns this - */ +/** @param {string} value */ proto.types.ResponseQuery.prototype.setInfo = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); + jspb.Message.setProto3StringField(this, 4, value); }; @@ -5531,12 +4737,9 @@ proto.types.ResponseQuery.prototype.getIndex = function() { }; -/** - * @param {number} value - * @return {!proto.types.ResponseQuery} returns this - */ +/** @param {number} value */ proto.types.ResponseQuery.prototype.setIndex = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3IntField(this, 5, value); }; @@ -5573,12 +4776,9 @@ proto.types.ResponseQuery.prototype.getKey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.ResponseQuery} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.ResponseQuery.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); + jspb.Message.setProto3BytesField(this, 6, value); }; @@ -5615,12 +4815,9 @@ proto.types.ResponseQuery.prototype.getValue_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.ResponseQuery} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.ResponseQuery.prototype.setValue = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); + jspb.Message.setProto3BytesField(this, 7, value); }; @@ -5657,12 +4854,9 @@ proto.types.ResponseQuery.prototype.getProof_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.ResponseQuery} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.ResponseQuery.prototype.setProof = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); + jspb.Message.setProto3BytesField(this, 8, value); }; @@ -5675,16 +4869,30 @@ proto.types.ResponseQuery.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.types.ResponseQuery} returns this - */ +/** @param {number} value */ proto.types.ResponseQuery.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3IntField(this, 9, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseBeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseBeginBlock.repeatedFields_, null); +}; +goog.inherits(proto.types.ResponseBeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ResponseBeginBlock.displayName = 'proto.types.ResponseBeginBlock'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -5696,15 +4904,13 @@ proto.types.ResponseBeginBlock.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseBeginBlock.prototype.toObject = function(opt_includeInstance) { @@ -5714,8 +4920,8 @@ proto.types.ResponseBeginBlock.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseBeginBlock} msg The msg instance to transform. * @return {!Object} @@ -5816,12 +5022,9 @@ proto.types.ResponseBeginBlock.prototype.getTagsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.types.ResponseBeginBlock} returns this -*/ +/** @param {!Array} value */ proto.types.ResponseBeginBlock.prototype.setTagsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -5835,16 +5038,29 @@ proto.types.ResponseBeginBlock.prototype.addTags = function(opt_value, opt_index }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.types.ResponseBeginBlock} returns this - */ proto.types.ResponseBeginBlock.prototype.clearTagsList = function() { - return this.setTagsList([]); + this.setTagsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseCheckTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseCheckTx.repeatedFields_, null); +}; +goog.inherits(proto.types.ResponseCheckTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ResponseCheckTx.displayName = 'proto.types.ResponseCheckTx'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -5856,15 +5072,13 @@ proto.types.ResponseCheckTx.repeatedFields_ = [7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { @@ -5874,8 +5088,8 @@ proto.types.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseCheckTx} msg The msg instance to transform. * @return {!Object} @@ -6047,12 +5261,9 @@ proto.types.ResponseCheckTx.prototype.getCode = function() { }; -/** - * @param {number} value - * @return {!proto.types.ResponseCheckTx} returns this - */ +/** @param {number} value */ proto.types.ResponseCheckTx.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -6089,12 +5300,9 @@ proto.types.ResponseCheckTx.prototype.getData_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.ResponseCheckTx} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.ResponseCheckTx.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -6107,12 +5315,9 @@ proto.types.ResponseCheckTx.prototype.getLog = function() { }; -/** - * @param {string} value - * @return {!proto.types.ResponseCheckTx} returns this - */ +/** @param {string} value */ proto.types.ResponseCheckTx.prototype.setLog = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; @@ -6125,12 +5330,9 @@ proto.types.ResponseCheckTx.prototype.getInfo = function() { }; -/** - * @param {string} value - * @return {!proto.types.ResponseCheckTx} returns this - */ +/** @param {string} value */ proto.types.ResponseCheckTx.prototype.setInfo = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); + jspb.Message.setProto3StringField(this, 4, value); }; @@ -6143,12 +5345,9 @@ proto.types.ResponseCheckTx.prototype.getGasWanted = function() { }; -/** - * @param {number} value - * @return {!proto.types.ResponseCheckTx} returns this - */ +/** @param {number} value */ proto.types.ResponseCheckTx.prototype.setGasWanted = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3IntField(this, 5, value); }; @@ -6161,12 +5360,9 @@ proto.types.ResponseCheckTx.prototype.getGasUsed = function() { }; -/** - * @param {number} value - * @return {!proto.types.ResponseCheckTx} returns this - */ +/** @param {number} value */ proto.types.ResponseCheckTx.prototype.setGasUsed = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3IntField(this, 6, value); }; @@ -6180,12 +5376,9 @@ proto.types.ResponseCheckTx.prototype.getTagsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.types.ResponseCheckTx} returns this -*/ +/** @param {!Array} value */ proto.types.ResponseCheckTx.prototype.setTagsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); + jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -6199,16 +5392,29 @@ proto.types.ResponseCheckTx.prototype.addTags = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.types.ResponseCheckTx} returns this - */ proto.types.ResponseCheckTx.prototype.clearTagsList = function() { - return this.setTagsList([]); + this.setTagsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseDeliverTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseDeliverTx.repeatedFields_, null); +}; +goog.inherits(proto.types.ResponseDeliverTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ResponseDeliverTx.displayName = 'proto.types.ResponseDeliverTx'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -6220,15 +5426,13 @@ proto.types.ResponseDeliverTx.repeatedFields_ = [7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseDeliverTx.prototype.toObject = function(opt_includeInstance) { @@ -6238,8 +5442,8 @@ proto.types.ResponseDeliverTx.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseDeliverTx} msg The msg instance to transform. * @return {!Object} @@ -6411,12 +5615,9 @@ proto.types.ResponseDeliverTx.prototype.getCode = function() { }; -/** - * @param {number} value - * @return {!proto.types.ResponseDeliverTx} returns this - */ +/** @param {number} value */ proto.types.ResponseDeliverTx.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -6453,12 +5654,9 @@ proto.types.ResponseDeliverTx.prototype.getData_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.ResponseDeliverTx} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.ResponseDeliverTx.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -6471,12 +5669,9 @@ proto.types.ResponseDeliverTx.prototype.getLog = function() { }; -/** - * @param {string} value - * @return {!proto.types.ResponseDeliverTx} returns this - */ +/** @param {string} value */ proto.types.ResponseDeliverTx.prototype.setLog = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; @@ -6489,12 +5684,9 @@ proto.types.ResponseDeliverTx.prototype.getInfo = function() { }; -/** - * @param {string} value - * @return {!proto.types.ResponseDeliverTx} returns this - */ +/** @param {string} value */ proto.types.ResponseDeliverTx.prototype.setInfo = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); + jspb.Message.setProto3StringField(this, 4, value); }; @@ -6507,12 +5699,9 @@ proto.types.ResponseDeliverTx.prototype.getGasWanted = function() { }; -/** - * @param {number} value - * @return {!proto.types.ResponseDeliverTx} returns this - */ +/** @param {number} value */ proto.types.ResponseDeliverTx.prototype.setGasWanted = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3IntField(this, 5, value); }; @@ -6525,12 +5714,9 @@ proto.types.ResponseDeliverTx.prototype.getGasUsed = function() { }; -/** - * @param {number} value - * @return {!proto.types.ResponseDeliverTx} returns this - */ +/** @param {number} value */ proto.types.ResponseDeliverTx.prototype.setGasUsed = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3IntField(this, 6, value); }; @@ -6544,12 +5730,9 @@ proto.types.ResponseDeliverTx.prototype.getTagsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.types.ResponseDeliverTx} returns this -*/ +/** @param {!Array} value */ proto.types.ResponseDeliverTx.prototype.setTagsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); + jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -6563,16 +5746,29 @@ proto.types.ResponseDeliverTx.prototype.addTags = function(opt_value, opt_index) }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.types.ResponseDeliverTx} returns this - */ proto.types.ResponseDeliverTx.prototype.clearTagsList = function() { - return this.setTagsList([]); + this.setTagsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseEndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseEndBlock.repeatedFields_, null); +}; +goog.inherits(proto.types.ResponseEndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ResponseEndBlock.displayName = 'proto.types.ResponseEndBlock'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -6584,15 +5780,13 @@ proto.types.ResponseEndBlock.repeatedFields_ = [1,3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseEndBlock.prototype.toObject = function(opt_includeInstance) { @@ -6602,8 +5796,8 @@ proto.types.ResponseEndBlock.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseEndBlock} msg The msg instance to transform. * @return {!Object} @@ -6733,12 +5927,9 @@ proto.types.ResponseEndBlock.prototype.getValidatorUpdatesList = function() { }; -/** - * @param {!Array} value - * @return {!proto.types.ResponseEndBlock} returns this -*/ +/** @param {!Array} value */ proto.types.ResponseEndBlock.prototype.setValidatorUpdatesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -6752,12 +5943,8 @@ proto.types.ResponseEndBlock.prototype.addValidatorUpdates = function(opt_value, }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.types.ResponseEndBlock} returns this - */ proto.types.ResponseEndBlock.prototype.clearValidatorUpdatesList = function() { - return this.setValidatorUpdatesList([]); + this.setValidatorUpdatesList([]); }; @@ -6771,21 +5958,14 @@ proto.types.ResponseEndBlock.prototype.getConsensusParamUpdates = function() { }; -/** - * @param {?proto.types.ConsensusParams|undefined} value - * @return {!proto.types.ResponseEndBlock} returns this -*/ +/** @param {?proto.types.ConsensusParams|undefined} value */ proto.types.ResponseEndBlock.prototype.setConsensusParamUpdates = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.ResponseEndBlock} returns this - */ proto.types.ResponseEndBlock.prototype.clearConsensusParamUpdates = function() { - return this.setConsensusParamUpdates(undefined); + this.setConsensusParamUpdates(undefined); }; @@ -6808,12 +5988,9 @@ proto.types.ResponseEndBlock.prototype.getTagsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.types.ResponseEndBlock} returns this -*/ +/** @param {!Array} value */ proto.types.ResponseEndBlock.prototype.setTagsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); + jspb.Message.setRepeatedWrapperField(this, 3, value); }; @@ -6827,29 +6004,40 @@ proto.types.ResponseEndBlock.prototype.addTags = function(opt_value, opt_index) }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.types.ResponseEndBlock} returns this - */ proto.types.ResponseEndBlock.prototype.clearTagsList = function() { - return this.setTagsList([]); + this.setTagsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ResponseCommit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ResponseCommit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ResponseCommit.displayName = 'proto.types.ResponseCommit'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ResponseCommit.prototype.toObject = function(opt_includeInstance) { @@ -6859,8 +6047,8 @@ proto.types.ResponseCommit.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ResponseCommit} msg The msg instance to transform. * @return {!Object} @@ -6981,29 +6169,41 @@ proto.types.ResponseCommit.prototype.getData_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.ResponseCommit} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.ResponseCommit.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ConsensusParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ConsensusParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ConsensusParams.displayName = 'proto.types.ConsensusParams'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ConsensusParams.prototype.toObject = function(opt_includeInstance) { @@ -7013,8 +6213,8 @@ proto.types.ConsensusParams.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ConsensusParams} msg The msg instance to transform. * @return {!Object} @@ -7142,21 +6342,14 @@ proto.types.ConsensusParams.prototype.getBlockSize = function() { }; -/** - * @param {?proto.types.BlockSize|undefined} value - * @return {!proto.types.ConsensusParams} returns this -*/ +/** @param {?proto.types.BlockSize|undefined} value */ proto.types.ConsensusParams.prototype.setBlockSize = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.ConsensusParams} returns this - */ proto.types.ConsensusParams.prototype.clearBlockSize = function() { - return this.setBlockSize(undefined); + this.setBlockSize(undefined); }; @@ -7179,21 +6372,14 @@ proto.types.ConsensusParams.prototype.getTxSize = function() { }; -/** - * @param {?proto.types.TxSize|undefined} value - * @return {!proto.types.ConsensusParams} returns this -*/ +/** @param {?proto.types.TxSize|undefined} value */ proto.types.ConsensusParams.prototype.setTxSize = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.ConsensusParams} returns this - */ proto.types.ConsensusParams.prototype.clearTxSize = function() { - return this.setTxSize(undefined); + this.setTxSize(undefined); }; @@ -7216,21 +6402,14 @@ proto.types.ConsensusParams.prototype.getBlockGossip = function() { }; -/** - * @param {?proto.types.BlockGossip|undefined} value - * @return {!proto.types.ConsensusParams} returns this -*/ +/** @param {?proto.types.BlockGossip|undefined} value */ proto.types.ConsensusParams.prototype.setBlockGossip = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.ConsensusParams} returns this - */ proto.types.ConsensusParams.prototype.clearBlockGossip = function() { - return this.setBlockGossip(undefined); + this.setBlockGossip(undefined); }; @@ -7244,19 +6423,34 @@ proto.types.ConsensusParams.prototype.hasBlockGossip = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.BlockSize = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.BlockSize, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.BlockSize.displayName = 'proto.types.BlockSize'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.BlockSize.prototype.toObject = function(opt_includeInstance) { @@ -7266,8 +6460,8 @@ proto.types.BlockSize.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.BlockSize} msg The msg instance to transform. * @return {!Object} @@ -7376,12 +6570,9 @@ proto.types.BlockSize.prototype.getMaxBytes = function() { }; -/** - * @param {number} value - * @return {!proto.types.BlockSize} returns this - */ +/** @param {number} value */ proto.types.BlockSize.prototype.setMaxBytes = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -7394,29 +6585,41 @@ proto.types.BlockSize.prototype.getMaxGas = function() { }; -/** - * @param {number} value - * @return {!proto.types.BlockSize} returns this - */ +/** @param {number} value */ proto.types.BlockSize.prototype.setMaxGas = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.TxSize = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.TxSize, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.TxSize.displayName = 'proto.types.TxSize'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.TxSize.prototype.toObject = function(opt_includeInstance) { @@ -7426,8 +6629,8 @@ proto.types.TxSize.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.TxSize} msg The msg instance to transform. * @return {!Object} @@ -7536,12 +6739,9 @@ proto.types.TxSize.prototype.getMaxBytes = function() { }; -/** - * @param {number} value - * @return {!proto.types.TxSize} returns this - */ +/** @param {number} value */ proto.types.TxSize.prototype.setMaxBytes = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -7554,29 +6754,41 @@ proto.types.TxSize.prototype.getMaxGas = function() { }; +/** @param {number} value */ +proto.types.TxSize.prototype.setMaxGas = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + + /** - * @param {number} value - * @return {!proto.types.TxSize} returns this + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.types.TxSize.prototype.setMaxGas = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.types.BlockGossip = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - - - +goog.inherits(proto.types.BlockGossip, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.BlockGossip.displayName = 'proto.types.BlockGossip'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.BlockGossip.prototype.toObject = function(opt_includeInstance) { @@ -7586,8 +6798,8 @@ proto.types.BlockGossip.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.BlockGossip} msg The msg instance to transform. * @return {!Object} @@ -7684,16 +6896,30 @@ proto.types.BlockGossip.prototype.getBlockPartSizeBytes = function() { }; -/** - * @param {number} value - * @return {!proto.types.BlockGossip} returns this - */ +/** @param {number} value */ proto.types.BlockGossip.prototype.setBlockPartSizeBytes = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.LastCommitInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.types.LastCommitInfo.repeatedFields_, null); +}; +goog.inherits(proto.types.LastCommitInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.LastCommitInfo.displayName = 'proto.types.LastCommitInfo'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -7705,15 +6931,13 @@ proto.types.LastCommitInfo.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.LastCommitInfo.prototype.toObject = function(opt_includeInstance) { @@ -7723,8 +6947,8 @@ proto.types.LastCommitInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.LastCommitInfo} msg The msg instance to transform. * @return {!Object} @@ -7836,12 +7060,9 @@ proto.types.LastCommitInfo.prototype.getRound = function() { }; -/** - * @param {number} value - * @return {!proto.types.LastCommitInfo} returns this - */ +/** @param {number} value */ proto.types.LastCommitInfo.prototype.setRound = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -7855,12 +7076,9 @@ proto.types.LastCommitInfo.prototype.getVotesList = function() { }; -/** - * @param {!Array} value - * @return {!proto.types.LastCommitInfo} returns this -*/ +/** @param {!Array} value */ proto.types.LastCommitInfo.prototype.setVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -7874,29 +7092,40 @@ proto.types.LastCommitInfo.prototype.addVotes = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.types.LastCommitInfo} returns this - */ proto.types.LastCommitInfo.prototype.clearVotesList = function() { - return this.setVotesList([]); + this.setVotesList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.Header.displayName = 'proto.types.Header'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.Header.prototype.toObject = function(opt_includeInstance) { @@ -7906,8 +7135,8 @@ proto.types.Header.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Header} msg The msg instance to transform. * @return {!Object} @@ -8176,12 +7405,9 @@ proto.types.Header.prototype.getChainId = function() { }; -/** - * @param {string} value - * @return {!proto.types.Header} returns this - */ +/** @param {string} value */ proto.types.Header.prototype.setChainId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -8194,12 +7420,9 @@ proto.types.Header.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.types.Header} returns this - */ +/** @param {number} value */ proto.types.Header.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; @@ -8213,21 +7436,14 @@ proto.types.Header.prototype.getTime = function() { }; -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.types.Header} returns this -*/ +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ proto.types.Header.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Header} returns this - */ proto.types.Header.prototype.clearTime = function() { - return this.setTime(undefined); + this.setTime(undefined); }; @@ -8249,12 +7465,9 @@ proto.types.Header.prototype.getNumTxs = function() { }; -/** - * @param {number} value - * @return {!proto.types.Header} returns this - */ +/** @param {number} value */ proto.types.Header.prototype.setNumTxs = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3IntField(this, 4, value); }; @@ -8267,12 +7480,9 @@ proto.types.Header.prototype.getTotalTxs = function() { }; -/** - * @param {number} value - * @return {!proto.types.Header} returns this - */ +/** @param {number} value */ proto.types.Header.prototype.setTotalTxs = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3IntField(this, 5, value); }; @@ -8286,21 +7496,14 @@ proto.types.Header.prototype.getLastBlockId = function() { }; -/** - * @param {?proto.types.BlockID|undefined} value - * @return {!proto.types.Header} returns this -*/ +/** @param {?proto.types.BlockID|undefined} value */ proto.types.Header.prototype.setLastBlockId = function(value) { - return jspb.Message.setWrapperField(this, 6, value); + jspb.Message.setWrapperField(this, 6, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Header} returns this - */ proto.types.Header.prototype.clearLastBlockId = function() { - return this.setLastBlockId(undefined); + this.setLastBlockId(undefined); }; @@ -8346,12 +7549,9 @@ proto.types.Header.prototype.getLastCommitHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.Header} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.Header.prototype.setLastCommitHash = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); + jspb.Message.setProto3BytesField(this, 7, value); }; @@ -8388,12 +7588,9 @@ proto.types.Header.prototype.getDataHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.Header} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.Header.prototype.setDataHash = function(value) { - return jspb.Message.setProto3BytesField(this, 8, value); + jspb.Message.setProto3BytesField(this, 8, value); }; @@ -8430,12 +7627,9 @@ proto.types.Header.prototype.getValidatorsHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.Header} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.Header.prototype.setValidatorsHash = function(value) { - return jspb.Message.setProto3BytesField(this, 9, value); + jspb.Message.setProto3BytesField(this, 9, value); }; @@ -8472,12 +7666,9 @@ proto.types.Header.prototype.getNextValidatorsHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.Header} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.Header.prototype.setNextValidatorsHash = function(value) { - return jspb.Message.setProto3BytesField(this, 10, value); + jspb.Message.setProto3BytesField(this, 10, value); }; @@ -8514,12 +7705,9 @@ proto.types.Header.prototype.getConsensusHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.Header} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.Header.prototype.setConsensusHash = function(value) { - return jspb.Message.setProto3BytesField(this, 11, value); + jspb.Message.setProto3BytesField(this, 11, value); }; @@ -8556,12 +7744,9 @@ proto.types.Header.prototype.getAppHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.Header} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.Header.prototype.setAppHash = function(value) { - return jspb.Message.setProto3BytesField(this, 12, value); + jspb.Message.setProto3BytesField(this, 12, value); }; @@ -8598,12 +7783,9 @@ proto.types.Header.prototype.getLastResultsHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.Header} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.Header.prototype.setLastResultsHash = function(value) { - return jspb.Message.setProto3BytesField(this, 13, value); + jspb.Message.setProto3BytesField(this, 13, value); }; @@ -8640,12 +7822,9 @@ proto.types.Header.prototype.getEvidenceHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.Header} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.Header.prototype.setEvidenceHash = function(value) { - return jspb.Message.setProto3BytesField(this, 14, value); + jspb.Message.setProto3BytesField(this, 14, value); }; @@ -8682,29 +7861,41 @@ proto.types.Header.prototype.getProposerAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.Header} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.Header.prototype.setProposerAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 15, value); + jspb.Message.setProto3BytesField(this, 15, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.BlockID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.BlockID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.BlockID.displayName = 'proto.types.BlockID'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.BlockID.prototype.toObject = function(opt_includeInstance) { @@ -8714,8 +7905,8 @@ proto.types.BlockID.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.BlockID} msg The msg instance to transform. * @return {!Object} @@ -8850,12 +8041,9 @@ proto.types.BlockID.prototype.getHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.BlockID} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.BlockID.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -8869,21 +8057,14 @@ proto.types.BlockID.prototype.getPartsHeader = function() { }; -/** - * @param {?proto.types.PartSetHeader|undefined} value - * @return {!proto.types.BlockID} returns this -*/ +/** @param {?proto.types.PartSetHeader|undefined} value */ proto.types.BlockID.prototype.setPartsHeader = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.BlockID} returns this - */ proto.types.BlockID.prototype.clearPartsHeader = function() { - return this.setPartsHeader(undefined); + this.setPartsHeader(undefined); }; @@ -8897,19 +8078,34 @@ proto.types.BlockID.prototype.hasPartsHeader = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.PartSetHeader = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.PartSetHeader, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.PartSetHeader.displayName = 'proto.types.PartSetHeader'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.PartSetHeader.prototype.toObject = function(opt_includeInstance) { @@ -8919,8 +8115,8 @@ proto.types.PartSetHeader.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.PartSetHeader} msg The msg instance to transform. * @return {!Object} @@ -9029,12 +8225,9 @@ proto.types.PartSetHeader.prototype.getTotal = function() { }; -/** - * @param {number} value - * @return {!proto.types.PartSetHeader} returns this - */ +/** @param {number} value */ proto.types.PartSetHeader.prototype.setTotal = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -9071,29 +8264,41 @@ proto.types.PartSetHeader.prototype.getHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.PartSetHeader} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.PartSetHeader.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.Validator.displayName = 'proto.types.Validator'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.Validator.prototype.toObject = function(opt_includeInstance) { @@ -9103,8 +8308,8 @@ proto.types.Validator.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Validator} msg The msg instance to transform. * @return {!Object} @@ -9237,12 +8442,9 @@ proto.types.Validator.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.Validator} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.Validator.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -9255,29 +8457,41 @@ proto.types.Validator.prototype.getPower = function() { }; -/** - * @param {number} value - * @return {!proto.types.Validator} returns this - */ +/** @param {number} value */ proto.types.Validator.prototype.setPower = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.ValidatorUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.ValidatorUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.ValidatorUpdate.displayName = 'proto.types.ValidatorUpdate'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.ValidatorUpdate.prototype.toObject = function(opt_includeInstance) { @@ -9287,8 +8501,8 @@ proto.types.ValidatorUpdate.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.ValidatorUpdate} msg The msg instance to transform. * @return {!Object} @@ -9400,21 +8614,14 @@ proto.types.ValidatorUpdate.prototype.getPubKey = function() { }; -/** - * @param {?proto.types.PubKey|undefined} value - * @return {!proto.types.ValidatorUpdate} returns this -*/ +/** @param {?proto.types.PubKey|undefined} value */ proto.types.ValidatorUpdate.prototype.setPubKey = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.ValidatorUpdate} returns this - */ proto.types.ValidatorUpdate.prototype.clearPubKey = function() { - return this.setPubKey(undefined); + this.setPubKey(undefined); }; @@ -9436,29 +8643,41 @@ proto.types.ValidatorUpdate.prototype.getPower = function() { }; -/** - * @param {number} value - * @return {!proto.types.ValidatorUpdate} returns this - */ +/** @param {number} value */ proto.types.ValidatorUpdate.prototype.setPower = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.VoteInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.VoteInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.VoteInfo.displayName = 'proto.types.VoteInfo'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.VoteInfo.prototype.toObject = function(opt_includeInstance) { @@ -9468,8 +8687,8 @@ proto.types.VoteInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.VoteInfo} msg The msg instance to transform. * @return {!Object} @@ -9478,7 +8697,7 @@ proto.types.VoteInfo.prototype.toObject = function(opt_includeInstance) { proto.types.VoteInfo.toObject = function(includeInstance, msg) { var f, obj = { validator: (f = msg.getValidator()) && proto.types.Validator.toObject(includeInstance, f), - signedLastBlock: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + signedLastBlock: jspb.Message.getFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -9581,21 +8800,14 @@ proto.types.VoteInfo.prototype.getValidator = function() { }; -/** - * @param {?proto.types.Validator|undefined} value - * @return {!proto.types.VoteInfo} returns this -*/ +/** @param {?proto.types.Validator|undefined} value */ proto.types.VoteInfo.prototype.setValidator = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.VoteInfo} returns this - */ proto.types.VoteInfo.prototype.clearValidator = function() { - return this.setValidator(undefined); + this.setValidator(undefined); }; @@ -9610,36 +8822,50 @@ proto.types.VoteInfo.prototype.hasValidator = function() { /** * optional bool signed_last_block = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.types.VoteInfo.prototype.getSignedLastBlock = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); }; -/** - * @param {boolean} value - * @return {!proto.types.VoteInfo} returns this - */ +/** @param {boolean} value */ proto.types.VoteInfo.prototype.setSignedLastBlock = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); + jspb.Message.setProto3BooleanField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.PubKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.PubKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.PubKey.displayName = 'proto.types.PubKey'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.PubKey.prototype.toObject = function(opt_includeInstance) { @@ -9649,8 +8875,8 @@ proto.types.PubKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.PubKey} msg The msg instance to transform. * @return {!Object} @@ -9759,12 +8985,9 @@ proto.types.PubKey.prototype.getType = function() { }; -/** - * @param {string} value - * @return {!proto.types.PubKey} returns this - */ +/** @param {string} value */ proto.types.PubKey.prototype.setType = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -9801,29 +9024,41 @@ proto.types.PubKey.prototype.getData_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.types.PubKey} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.types.PubKey.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.types.Evidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.types.Evidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.types.Evidence.displayName = 'proto.types.Evidence'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.types.Evidence.prototype.toObject = function(opt_includeInstance) { @@ -9833,8 +9068,8 @@ proto.types.Evidence.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.types.Evidence} msg The msg instance to transform. * @return {!Object} @@ -9983,12 +9218,9 @@ proto.types.Evidence.prototype.getType = function() { }; -/** - * @param {string} value - * @return {!proto.types.Evidence} returns this - */ +/** @param {string} value */ proto.types.Evidence.prototype.setType = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -10002,21 +9234,14 @@ proto.types.Evidence.prototype.getValidator = function() { }; -/** - * @param {?proto.types.Validator|undefined} value - * @return {!proto.types.Evidence} returns this -*/ +/** @param {?proto.types.Validator|undefined} value */ proto.types.Evidence.prototype.setValidator = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Evidence} returns this - */ proto.types.Evidence.prototype.clearValidator = function() { - return this.setValidator(undefined); + this.setValidator(undefined); }; @@ -10038,12 +9263,9 @@ proto.types.Evidence.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.types.Evidence} returns this - */ +/** @param {number} value */ proto.types.Evidence.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; @@ -10057,21 +9279,14 @@ proto.types.Evidence.prototype.getTime = function() { }; -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.types.Evidence} returns this -*/ +/** @param {?proto.google.protobuf.Timestamp|undefined} value */ proto.types.Evidence.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + jspb.Message.setWrapperField(this, 4, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.types.Evidence} returns this - */ proto.types.Evidence.prototype.clearTime = function() { - return this.setTime(undefined); + this.setTime(undefined); }; @@ -10093,12 +9308,9 @@ proto.types.Evidence.prototype.getTotalVotingPower = function() { }; -/** - * @param {number} value - * @return {!proto.types.Evidence} returns this - */ +/** @param {number} value */ proto.types.Evidence.prototype.setTotalVotingPower = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3IntField(this, 5, value); }; diff --git a/js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.d.ts b/js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.d.ts b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.d.ts index 2fc8ea2f2..d75614fa4 100644 --- a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.d.ts +++ b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.d.ts @@ -1,60 +1,64 @@ // package: common // file: github.com/tendermint/tendermint/libs/common/types.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb"; -export class KVPair extends jspb.Message { - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; - - getValue(): Uint8Array | string; - getValue_asU8(): Uint8Array; - getValue_asB64(): string; - setValue(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KVPair.AsObject; - static toObject(includeInstance: boolean, msg: KVPair): KVPair.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KVPair, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KVPair; - static deserializeBinaryFromReader(message: KVPair, reader: jspb.BinaryReader): KVPair; +export class KVPair extends jspb.Message { + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): void; + + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KVPair.AsObject; + static toObject(includeInstance: boolean, msg: KVPair): KVPair.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KVPair, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KVPair; + static deserializeBinaryFromReader(message: KVPair, reader: jspb.BinaryReader): KVPair; } export namespace KVPair { - export type AsObject = { - key: Uint8Array | string, - value: Uint8Array | string, - } + export type AsObject = { + key: Uint8Array | string, + value: Uint8Array | string, + } } -export class KI64Pair extends jspb.Message { - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; - - getValue(): number; - setValue(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KI64Pair.AsObject; - static toObject(includeInstance: boolean, msg: KI64Pair): KI64Pair.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KI64Pair, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KI64Pair; - static deserializeBinaryFromReader(message: KI64Pair, reader: jspb.BinaryReader): KI64Pair; +export class KI64Pair extends jspb.Message { + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): void; + + getValue(): number; + setValue(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KI64Pair.AsObject; + static toObject(includeInstance: boolean, msg: KI64Pair): KI64Pair.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KI64Pair, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KI64Pair; + static deserializeBinaryFromReader(message: KI64Pair, reader: jspb.BinaryReader): KI64Pair; } export namespace KI64Pair { - export type AsObject = { - key: Uint8Array | string, - value: number, - } + export type AsObject = { + key: Uint8Array | string, + value: number, + } } - diff --git a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js index 0c37c73c4..979e8619f 100644 --- a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js +++ b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js @@ -1,4 +1,3 @@ -// source: github.com/tendermint/tendermint/libs/common/types.proto /** * @fileoverview * @enhanceable @@ -16,6 +15,7 @@ var github_com_gogo_protobuf_gogoproto_gogo_pb = require('../../../../../github. goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.common.KI64Pair', null, global); goog.exportSymbol('proto.common.KVPair', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -31,47 +31,19 @@ proto.common.KVPair = function(opt_data) { }; goog.inherits(proto.common.KVPair, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.common.KVPair.displayName = 'proto.common.KVPair'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.common.KI64Pair = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.common.KI64Pair, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.common.KI64Pair.displayName = 'proto.common.KI64Pair'; -} - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.common.KVPair.prototype.toObject = function(opt_includeInstance) { @@ -81,8 +53,8 @@ proto.common.KVPair.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.common.KVPair} msg The msg instance to transform. * @return {!Object} @@ -215,12 +187,9 @@ proto.common.KVPair.prototype.getKey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.common.KVPair} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.common.KVPair.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -257,29 +226,41 @@ proto.common.KVPair.prototype.getValue_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.common.KVPair} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.common.KVPair.prototype.setValue = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.common.KI64Pair = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.common.KI64Pair, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.common.KI64Pair.displayName = 'proto.common.KI64Pair'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.common.KI64Pair.prototype.toObject = function(opt_includeInstance) { @@ -289,8 +270,8 @@ proto.common.KI64Pair.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.common.KI64Pair} msg The msg instance to transform. * @return {!Object} @@ -423,12 +404,9 @@ proto.common.KI64Pair.prototype.getKey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.common.KI64Pair} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.common.KI64Pair.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -441,12 +419,9 @@ proto.common.KI64Pair.prototype.getValue = function() { }; -/** - * @param {number} value - * @return {!proto.common.KI64Pair} returns this - */ +/** @param {number} value */ proto.common.KI64Pair.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/google/protobuf/descriptor_grpc_pb.d.ts b/js/proto/google/protobuf/descriptor_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/google/protobuf/descriptor_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/google/protobuf/descriptor_pb.d.ts b/js/proto/google/protobuf/descriptor_pb.d.ts index 8825105ae..645544091 100644 --- a/js/proto/google/protobuf/descriptor_pb.d.ts +++ b/js/proto/google/protobuf/descriptor_pb.d.ts @@ -1,1246 +1,1365 @@ // package: google.protobuf // file: google/protobuf/descriptor.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; -export class FileDescriptorSet extends jspb.Message { - clearFileList(): void; - getFileList(): Array; - setFileList(value: Array): void; - addFile(value?: FileDescriptorProto, index?: number): FileDescriptorProto; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FileDescriptorSet.AsObject; - static toObject(includeInstance: boolean, msg: FileDescriptorSet): FileDescriptorSet.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FileDescriptorSet, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FileDescriptorSet; - static deserializeBinaryFromReader(message: FileDescriptorSet, reader: jspb.BinaryReader): FileDescriptorSet; +export class FileDescriptorSet extends jspb.Message { + clearFileList(): void; + getFileList(): Array; + setFileList(value: Array): void; + addFile(value?: FileDescriptorProto, index?: number): FileDescriptorProto; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileDescriptorSet.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorSet): FileDescriptorSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileDescriptorSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileDescriptorSet; + static deserializeBinaryFromReader(message: FileDescriptorSet, reader: jspb.BinaryReader): FileDescriptorSet; } export namespace FileDescriptorSet { - export type AsObject = { - fileList: Array, - } + export type AsObject = { + fileList: Array, + } } -export class FileDescriptorProto extends jspb.Message { - hasName(): boolean; - clearName(): void; - getName(): string | undefined; - setName(value: string): void; - - hasPackage(): boolean; - clearPackage(): void; - getPackage(): string | undefined; - setPackage(value: string): void; - - clearDependencyList(): void; - getDependencyList(): Array; - setDependencyList(value: Array): void; - addDependency(value: string, index?: number): string; - - clearPublicDependencyList(): void; - getPublicDependencyList(): Array; - setPublicDependencyList(value: Array): void; - addPublicDependency(value: number, index?: number): number; - - clearWeakDependencyList(): void; - getWeakDependencyList(): Array; - setWeakDependencyList(value: Array): void; - addWeakDependency(value: number, index?: number): number; - - clearMessageTypeList(): void; - getMessageTypeList(): Array; - setMessageTypeList(value: Array): void; - addMessageType(value?: DescriptorProto, index?: number): DescriptorProto; - - clearEnumTypeList(): void; - getEnumTypeList(): Array; - setEnumTypeList(value: Array): void; - addEnumType(value?: EnumDescriptorProto, index?: number): EnumDescriptorProto; - - clearServiceList(): void; - getServiceList(): Array; - setServiceList(value: Array): void; - addService(value?: ServiceDescriptorProto, index?: number): ServiceDescriptorProto; - - clearExtensionList(): void; - getExtensionList(): Array; - setExtensionList(value: Array): void; - addExtension(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; - - hasOptions(): boolean; - clearOptions(): void; - getOptions(): FileOptions | undefined; - setOptions(value?: FileOptions): void; - - hasSourceCodeInfo(): boolean; - clearSourceCodeInfo(): void; - getSourceCodeInfo(): SourceCodeInfo | undefined; - setSourceCodeInfo(value?: SourceCodeInfo): void; - - hasSyntax(): boolean; - clearSyntax(): void; - getSyntax(): string | undefined; - setSyntax(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FileDescriptorProto.AsObject; - static toObject(includeInstance: boolean, msg: FileDescriptorProto): FileDescriptorProto.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FileDescriptorProto, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FileDescriptorProto; - static deserializeBinaryFromReader(message: FileDescriptorProto, reader: jspb.BinaryReader): FileDescriptorProto; -} +export class FileDescriptorProto extends jspb.Message { -export namespace FileDescriptorProto { - export type AsObject = { - name?: string, - pb_package?: string, - dependencyList: Array, - publicDependencyList: Array, - weakDependencyList: Array, - messageTypeList: Array, - enumTypeList: Array, - serviceList: Array, - extensionList: Array, - options?: FileOptions.AsObject, - sourceCodeInfo?: SourceCodeInfo.AsObject, - syntax?: string, - } -} + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; -export class DescriptorProto extends jspb.Message { - hasName(): boolean; - clearName(): void; - getName(): string | undefined; - setName(value: string): void; - - clearFieldList(): void; - getFieldList(): Array; - setFieldList(value: Array): void; - addField(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; - - clearExtensionList(): void; - getExtensionList(): Array; - setExtensionList(value: Array): void; - addExtension(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; - - clearNestedTypeList(): void; - getNestedTypeList(): Array; - setNestedTypeList(value: Array): void; - addNestedType(value?: DescriptorProto, index?: number): DescriptorProto; - - clearEnumTypeList(): void; - getEnumTypeList(): Array; - setEnumTypeList(value: Array): void; - addEnumType(value?: EnumDescriptorProto, index?: number): EnumDescriptorProto; - - clearExtensionRangeList(): void; - getExtensionRangeList(): Array; - setExtensionRangeList(value: Array): void; - addExtensionRange(value?: DescriptorProto.ExtensionRange, index?: number): DescriptorProto.ExtensionRange; - - clearOneofDeclList(): void; - getOneofDeclList(): Array; - setOneofDeclList(value: Array): void; - addOneofDecl(value?: OneofDescriptorProto, index?: number): OneofDescriptorProto; - - hasOptions(): boolean; - clearOptions(): void; - getOptions(): MessageOptions | undefined; - setOptions(value?: MessageOptions): void; - - clearReservedRangeList(): void; - getReservedRangeList(): Array; - setReservedRangeList(value: Array): void; - addReservedRange(value?: DescriptorProto.ReservedRange, index?: number): DescriptorProto.ReservedRange; - - clearReservedNameList(): void; - getReservedNameList(): Array; - setReservedNameList(value: Array): void; - addReservedName(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DescriptorProto.AsObject; - static toObject(includeInstance: boolean, msg: DescriptorProto): DescriptorProto.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DescriptorProto, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DescriptorProto; - static deserializeBinaryFromReader(message: DescriptorProto, reader: jspb.BinaryReader): DescriptorProto; -} -export namespace DescriptorProto { - export type AsObject = { - name?: string, - fieldList: Array, - extensionList: Array, - nestedTypeList: Array, - enumTypeList: Array, - extensionRangeList: Array, - oneofDeclList: Array, - options?: MessageOptions.AsObject, - reservedRangeList: Array, - reservedNameList: Array, - } - - export class ExtensionRange extends jspb.Message { - hasStart(): boolean; - clearStart(): void; - getStart(): number | undefined; - setStart(value: number): void; - - hasEnd(): boolean; - clearEnd(): void; - getEnd(): number | undefined; - setEnd(value: number): void; + hasPackage(): boolean; + clearPackage(): void; + getPackage(): string | undefined; + setPackage(value: string): void; + + clearDependencyList(): void; + getDependencyList(): Array; + setDependencyList(value: Array): void; + addDependency(value: string, index?: number): string; + + clearPublicDependencyList(): void; + getPublicDependencyList(): Array; + setPublicDependencyList(value: Array): void; + addPublicDependency(value: number, index?: number): number; + + clearWeakDependencyList(): void; + getWeakDependencyList(): Array; + setWeakDependencyList(value: Array): void; + addWeakDependency(value: number, index?: number): number; + + clearMessageTypeList(): void; + getMessageTypeList(): Array; + setMessageTypeList(value: Array): void; + addMessageType(value?: DescriptorProto, index?: number): DescriptorProto; + + clearEnumTypeList(): void; + getEnumTypeList(): Array; + setEnumTypeList(value: Array): void; + addEnumType(value?: EnumDescriptorProto, index?: number): EnumDescriptorProto; + + clearServiceList(): void; + getServiceList(): Array; + setServiceList(value: Array): void; + addService(value?: ServiceDescriptorProto, index?: number): ServiceDescriptorProto; + + clearExtensionList(): void; + getExtensionList(): Array; + setExtensionList(value: Array): void; + addExtension(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; + hasOptions(): boolean; clearOptions(): void; - getOptions(): ExtensionRangeOptions | undefined; - setOptions(value?: ExtensionRangeOptions): void; + getOptions(): FileOptions | undefined; + setOptions(value?: FileOptions): void; + + + hasSourceCodeInfo(): boolean; + clearSourceCodeInfo(): void; + getSourceCodeInfo(): SourceCodeInfo | undefined; + setSourceCodeInfo(value?: SourceCodeInfo): void; + + + hasSyntax(): boolean; + clearSyntax(): void; + getSyntax(): string | undefined; + setSyntax(value: string): void; + serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExtensionRange.AsObject; - static toObject(includeInstance: boolean, msg: ExtensionRange): ExtensionRange.AsObject; + toObject(includeInstance?: boolean): FileDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorProto): FileDescriptorProto.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExtensionRange, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExtensionRange; - static deserializeBinaryFromReader(message: ExtensionRange, reader: jspb.BinaryReader): ExtensionRange; - } + static serializeBinaryToWriter(message: FileDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileDescriptorProto; + static deserializeBinaryFromReader(message: FileDescriptorProto, reader: jspb.BinaryReader): FileDescriptorProto; +} - export namespace ExtensionRange { +export namespace FileDescriptorProto { export type AsObject = { - start?: number, - end?: number, - options?: ExtensionRangeOptions.AsObject, + name?: string, + pb_package?: string, + dependencyList: Array, + publicDependencyList: Array, + weakDependencyList: Array, + messageTypeList: Array, + enumTypeList: Array, + serviceList: Array, + extensionList: Array, + options?: FileOptions.AsObject, + sourceCodeInfo?: SourceCodeInfo.AsObject, + syntax?: string, } - } +} + +export class DescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + clearFieldList(): void; + getFieldList(): Array; + setFieldList(value: Array): void; + addField(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; + + clearExtensionList(): void; + getExtensionList(): Array; + setExtensionList(value: Array): void; + addExtension(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; + + clearNestedTypeList(): void; + getNestedTypeList(): Array; + setNestedTypeList(value: Array): void; + addNestedType(value?: DescriptorProto, index?: number): DescriptorProto; + + clearEnumTypeList(): void; + getEnumTypeList(): Array; + setEnumTypeList(value: Array): void; + addEnumType(value?: EnumDescriptorProto, index?: number): EnumDescriptorProto; + + clearExtensionRangeList(): void; + getExtensionRangeList(): Array; + setExtensionRangeList(value: Array): void; + addExtensionRange(value?: DescriptorProto.ExtensionRange, index?: number): DescriptorProto.ExtensionRange; + + clearOneofDeclList(): void; + getOneofDeclList(): Array; + setOneofDeclList(value: Array): void; + addOneofDecl(value?: OneofDescriptorProto, index?: number): OneofDescriptorProto; - export class ReservedRange extends jspb.Message { - hasStart(): boolean; - clearStart(): void; - getStart(): number | undefined; - setStart(value: number): void; - hasEnd(): boolean; - clearEnd(): void; - getEnd(): number | undefined; - setEnd(value: number): void; + hasOptions(): boolean; + clearOptions(): void; + getOptions(): MessageOptions | undefined; + setOptions(value?: MessageOptions): void; + + clearReservedRangeList(): void; + getReservedRangeList(): Array; + setReservedRangeList(value: Array): void; + addReservedRange(value?: DescriptorProto.ReservedRange, index?: number): DescriptorProto.ReservedRange; + + clearReservedNameList(): void; + getReservedNameList(): Array; + setReservedNameList(value: Array): void; + addReservedName(value: string, index?: number): string; + serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReservedRange.AsObject; - static toObject(includeInstance: boolean, msg: ReservedRange): ReservedRange.AsObject; + toObject(includeInstance?: boolean): DescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: DescriptorProto): DescriptorProto.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ReservedRange, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReservedRange; - static deserializeBinaryFromReader(message: ReservedRange, reader: jspb.BinaryReader): ReservedRange; - } + static serializeBinaryToWriter(message: DescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DescriptorProto; + static deserializeBinaryFromReader(message: DescriptorProto, reader: jspb.BinaryReader): DescriptorProto; +} - export namespace ReservedRange { +export namespace DescriptorProto { export type AsObject = { - start?: number, - end?: number, + name?: string, + fieldList: Array, + extensionList: Array, + nestedTypeList: Array, + enumTypeList: Array, + extensionRangeList: Array, + oneofDeclList: Array, + options?: MessageOptions.AsObject, + reservedRangeList: Array, + reservedNameList: Array, + } + + + export class ExtensionRange extends jspb.Message { + + hasStart(): boolean; + clearStart(): void; + getStart(): number | undefined; + setStart(value: number): void; + + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): void; + + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): ExtensionRangeOptions | undefined; + setOptions(value?: ExtensionRangeOptions): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExtensionRange.AsObject; + static toObject(includeInstance: boolean, msg: ExtensionRange): ExtensionRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExtensionRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExtensionRange; + static deserializeBinaryFromReader(message: ExtensionRange, reader: jspb.BinaryReader): ExtensionRange; + } + + export namespace ExtensionRange { + export type AsObject = { + start?: number, + end?: number, + options?: ExtensionRangeOptions.AsObject, + } } - } + + export class ReservedRange extends jspb.Message { + + hasStart(): boolean; + clearStart(): void; + getStart(): number | undefined; + setStart(value: number): void; + + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ReservedRange.AsObject; + static toObject(includeInstance: boolean, msg: ReservedRange): ReservedRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ReservedRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ReservedRange; + static deserializeBinaryFromReader(message: ReservedRange, reader: jspb.BinaryReader): ReservedRange; + } + + export namespace ReservedRange { + export type AsObject = { + start?: number, + end?: number, + } + } + } -export class ExtensionRangeOptions extends jspb.Message { - clearUninterpretedOptionList(): void; - getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; - addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExtensionRangeOptions.AsObject; - static toObject(includeInstance: boolean, msg: ExtensionRangeOptions): ExtensionRangeOptions.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExtensionRangeOptions, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExtensionRangeOptions; - static deserializeBinaryFromReader(message: ExtensionRangeOptions, reader: jspb.BinaryReader): ExtensionRangeOptions; +export class ExtensionRangeOptions extends jspb.Message { + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExtensionRangeOptions.AsObject; + static toObject(includeInstance: boolean, msg: ExtensionRangeOptions): ExtensionRangeOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExtensionRangeOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExtensionRangeOptions; + static deserializeBinaryFromReader(message: ExtensionRangeOptions, reader: jspb.BinaryReader): ExtensionRangeOptions; } export namespace ExtensionRangeOptions { - export type AsObject = { - uninterpretedOptionList: Array, - } + export type AsObject = { + uninterpretedOptionList: Array, + } } -export class FieldDescriptorProto extends jspb.Message { - hasName(): boolean; - clearName(): void; - getName(): string | undefined; - setName(value: string): void; - - hasNumber(): boolean; - clearNumber(): void; - getNumber(): number | undefined; - setNumber(value: number): void; - - hasLabel(): boolean; - clearLabel(): void; - getLabel(): FieldDescriptorProto.LabelMap[keyof FieldDescriptorProto.LabelMap] | undefined; - setLabel(value: FieldDescriptorProto.LabelMap[keyof FieldDescriptorProto.LabelMap]): void; - - hasType(): boolean; - clearType(): void; - getType(): FieldDescriptorProto.TypeMap[keyof FieldDescriptorProto.TypeMap] | undefined; - setType(value: FieldDescriptorProto.TypeMap[keyof FieldDescriptorProto.TypeMap]): void; - - hasTypeName(): boolean; - clearTypeName(): void; - getTypeName(): string | undefined; - setTypeName(value: string): void; - - hasExtendee(): boolean; - clearExtendee(): void; - getExtendee(): string | undefined; - setExtendee(value: string): void; - - hasDefaultValue(): boolean; - clearDefaultValue(): void; - getDefaultValue(): string | undefined; - setDefaultValue(value: string): void; - - hasOneofIndex(): boolean; - clearOneofIndex(): void; - getOneofIndex(): number | undefined; - setOneofIndex(value: number): void; - - hasJsonName(): boolean; - clearJsonName(): void; - getJsonName(): string | undefined; - setJsonName(value: string): void; - - hasOptions(): boolean; - clearOptions(): void; - getOptions(): FieldOptions | undefined; - setOptions(value?: FieldOptions): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FieldDescriptorProto.AsObject; - static toObject(includeInstance: boolean, msg: FieldDescriptorProto): FieldDescriptorProto.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FieldDescriptorProto, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FieldDescriptorProto; - static deserializeBinaryFromReader(message: FieldDescriptorProto, reader: jspb.BinaryReader): FieldDescriptorProto; +export class FieldDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number | undefined; + setNumber(value: number): void; + + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): FieldDescriptorProto.Label | undefined; + setLabel(value: FieldDescriptorProto.Label): void; + + + hasType(): boolean; + clearType(): void; + getType(): FieldDescriptorProto.Type | undefined; + setType(value: FieldDescriptorProto.Type): void; + + + hasTypeName(): boolean; + clearTypeName(): void; + getTypeName(): string | undefined; + setTypeName(value: string): void; + + + hasExtendee(): boolean; + clearExtendee(): void; + getExtendee(): string | undefined; + setExtendee(value: string): void; + + + hasDefaultValue(): boolean; + clearDefaultValue(): void; + getDefaultValue(): string | undefined; + setDefaultValue(value: string): void; + + + hasOneofIndex(): boolean; + clearOneofIndex(): void; + getOneofIndex(): number | undefined; + setOneofIndex(value: number): void; + + + hasJsonName(): boolean; + clearJsonName(): void; + getJsonName(): string | undefined; + setJsonName(value: string): void; + + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): FieldOptions | undefined; + setOptions(value?: FieldOptions): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FieldDescriptorProto): FieldDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldDescriptorProto; + static deserializeBinaryFromReader(message: FieldDescriptorProto, reader: jspb.BinaryReader): FieldDescriptorProto; } export namespace FieldDescriptorProto { - export type AsObject = { - name?: string, - number?: number, - label?: FieldDescriptorProto.LabelMap[keyof FieldDescriptorProto.LabelMap], - type?: FieldDescriptorProto.TypeMap[keyof FieldDescriptorProto.TypeMap], - typeName?: string, - extendee?: string, - defaultValue?: string, - oneofIndex?: number, - jsonName?: string, - options?: FieldOptions.AsObject, - } - - export interface TypeMap { - TYPE_DOUBLE: 1; - TYPE_FLOAT: 2; - TYPE_INT64: 3; - TYPE_UINT64: 4; - TYPE_INT32: 5; - TYPE_FIXED64: 6; - TYPE_FIXED32: 7; - TYPE_BOOL: 8; - TYPE_STRING: 9; - TYPE_GROUP: 10; - TYPE_MESSAGE: 11; - TYPE_BYTES: 12; - TYPE_UINT32: 13; - TYPE_ENUM: 14; - TYPE_SFIXED32: 15; - TYPE_SFIXED64: 16; - TYPE_SINT32: 17; - TYPE_SINT64: 18; - } - - export const Type: TypeMap; - - export interface LabelMap { - LABEL_OPTIONAL: 1; - LABEL_REQUIRED: 2; - LABEL_REPEATED: 3; - } - - export const Label: LabelMap; + export type AsObject = { + name?: string, + number?: number, + label?: FieldDescriptorProto.Label, + type?: FieldDescriptorProto.Type, + typeName?: string, + extendee?: string, + defaultValue?: string, + oneofIndex?: number, + jsonName?: string, + options?: FieldOptions.AsObject, + } + + export enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18, + } + + export enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, + } + } -export class OneofDescriptorProto extends jspb.Message { - hasName(): boolean; - clearName(): void; - getName(): string | undefined; - setName(value: string): void; - - hasOptions(): boolean; - clearOptions(): void; - getOptions(): OneofOptions | undefined; - setOptions(value?: OneofOptions): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OneofDescriptorProto.AsObject; - static toObject(includeInstance: boolean, msg: OneofDescriptorProto): OneofDescriptorProto.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OneofDescriptorProto, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OneofDescriptorProto; - static deserializeBinaryFromReader(message: OneofDescriptorProto, reader: jspb.BinaryReader): OneofDescriptorProto; +export class OneofDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): OneofOptions | undefined; + setOptions(value?: OneofOptions): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: OneofDescriptorProto): OneofDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofDescriptorProto; + static deserializeBinaryFromReader(message: OneofDescriptorProto, reader: jspb.BinaryReader): OneofDescriptorProto; } export namespace OneofDescriptorProto { - export type AsObject = { - name?: string, - options?: OneofOptions.AsObject, - } + export type AsObject = { + name?: string, + options?: OneofOptions.AsObject, + } } -export class EnumDescriptorProto extends jspb.Message { - hasName(): boolean; - clearName(): void; - getName(): string | undefined; - setName(value: string): void; - - clearValueList(): void; - getValueList(): Array; - setValueList(value: Array): void; - addValue(value?: EnumValueDescriptorProto, index?: number): EnumValueDescriptorProto; - - hasOptions(): boolean; - clearOptions(): void; - getOptions(): EnumOptions | undefined; - setOptions(value?: EnumOptions): void; - - clearReservedRangeList(): void; - getReservedRangeList(): Array; - setReservedRangeList(value: Array): void; - addReservedRange(value?: EnumDescriptorProto.EnumReservedRange, index?: number): EnumDescriptorProto.EnumReservedRange; - - clearReservedNameList(): void; - getReservedNameList(): Array; - setReservedNameList(value: Array): void; - addReservedName(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EnumDescriptorProto.AsObject; - static toObject(includeInstance: boolean, msg: EnumDescriptorProto): EnumDescriptorProto.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EnumDescriptorProto, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EnumDescriptorProto; - static deserializeBinaryFromReader(message: EnumDescriptorProto, reader: jspb.BinaryReader): EnumDescriptorProto; -} +export class EnumDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + clearValueList(): void; + getValueList(): Array; + setValueList(value: Array): void; + addValue(value?: EnumValueDescriptorProto, index?: number): EnumValueDescriptorProto; + + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): EnumOptions | undefined; + setOptions(value?: EnumOptions): void; + + clearReservedRangeList(): void; + getReservedRangeList(): Array; + setReservedRangeList(value: Array): void; + addReservedRange(value?: EnumDescriptorProto.EnumReservedRange, index?: number): EnumDescriptorProto.EnumReservedRange; + + clearReservedNameList(): void; + getReservedNameList(): Array; + setReservedNameList(value: Array): void; + addReservedName(value: string, index?: number): string; -export namespace EnumDescriptorProto { - export type AsObject = { - name?: string, - valueList: Array, - options?: EnumOptions.AsObject, - reservedRangeList: Array, - reservedNameList: Array, - } - - export class EnumReservedRange extends jspb.Message { - hasStart(): boolean; - clearStart(): void; - getStart(): number | undefined; - setStart(value: number): void; - - hasEnd(): boolean; - clearEnd(): void; - getEnd(): number | undefined; - setEnd(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EnumReservedRange.AsObject; - static toObject(includeInstance: boolean, msg: EnumReservedRange): EnumReservedRange.AsObject; + toObject(includeInstance?: boolean): EnumDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumDescriptorProto): EnumDescriptorProto.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EnumReservedRange, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EnumReservedRange; - static deserializeBinaryFromReader(message: EnumReservedRange, reader: jspb.BinaryReader): EnumReservedRange; - } + static serializeBinaryToWriter(message: EnumDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumDescriptorProto; + static deserializeBinaryFromReader(message: EnumDescriptorProto, reader: jspb.BinaryReader): EnumDescriptorProto; +} - export namespace EnumReservedRange { +export namespace EnumDescriptorProto { export type AsObject = { - start?: number, - end?: number, + name?: string, + valueList: Array, + options?: EnumOptions.AsObject, + reservedRangeList: Array, + reservedNameList: Array, + } + + + export class EnumReservedRange extends jspb.Message { + + hasStart(): boolean; + clearStart(): void; + getStart(): number | undefined; + setStart(value: number): void; + + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumReservedRange.AsObject; + static toObject(includeInstance: boolean, msg: EnumReservedRange): EnumReservedRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumReservedRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumReservedRange; + static deserializeBinaryFromReader(message: EnumReservedRange, reader: jspb.BinaryReader): EnumReservedRange; } - } + + export namespace EnumReservedRange { + export type AsObject = { + start?: number, + end?: number, + } + } + } -export class EnumValueDescriptorProto extends jspb.Message { - hasName(): boolean; - clearName(): void; - getName(): string | undefined; - setName(value: string): void; - - hasNumber(): boolean; - clearNumber(): void; - getNumber(): number | undefined; - setNumber(value: number): void; - - hasOptions(): boolean; - clearOptions(): void; - getOptions(): EnumValueOptions | undefined; - setOptions(value?: EnumValueOptions): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EnumValueDescriptorProto.AsObject; - static toObject(includeInstance: boolean, msg: EnumValueDescriptorProto): EnumValueDescriptorProto.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EnumValueDescriptorProto, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EnumValueDescriptorProto; - static deserializeBinaryFromReader(message: EnumValueDescriptorProto, reader: jspb.BinaryReader): EnumValueDescriptorProto; +export class EnumValueDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number | undefined; + setNumber(value: number): void; + + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): EnumValueOptions | undefined; + setOptions(value?: EnumValueOptions): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValueDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueDescriptorProto): EnumValueDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValueDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValueDescriptorProto; + static deserializeBinaryFromReader(message: EnumValueDescriptorProto, reader: jspb.BinaryReader): EnumValueDescriptorProto; } export namespace EnumValueDescriptorProto { - export type AsObject = { - name?: string, - number?: number, - options?: EnumValueOptions.AsObject, - } + export type AsObject = { + name?: string, + number?: number, + options?: EnumValueOptions.AsObject, + } } -export class ServiceDescriptorProto extends jspb.Message { - hasName(): boolean; - clearName(): void; - getName(): string | undefined; - setName(value: string): void; - - clearMethodList(): void; - getMethodList(): Array; - setMethodList(value: Array): void; - addMethod(value?: MethodDescriptorProto, index?: number): MethodDescriptorProto; - - hasOptions(): boolean; - clearOptions(): void; - getOptions(): ServiceOptions | undefined; - setOptions(value?: ServiceOptions): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServiceDescriptorProto.AsObject; - static toObject(includeInstance: boolean, msg: ServiceDescriptorProto): ServiceDescriptorProto.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServiceDescriptorProto, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServiceDescriptorProto; - static deserializeBinaryFromReader(message: ServiceDescriptorProto, reader: jspb.BinaryReader): ServiceDescriptorProto; +export class ServiceDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + clearMethodList(): void; + getMethodList(): Array; + setMethodList(value: Array): void; + addMethod(value?: MethodDescriptorProto, index?: number): MethodDescriptorProto; + + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): ServiceOptions | undefined; + setOptions(value?: ServiceOptions): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: ServiceDescriptorProto): ServiceDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceDescriptorProto; + static deserializeBinaryFromReader(message: ServiceDescriptorProto, reader: jspb.BinaryReader): ServiceDescriptorProto; } export namespace ServiceDescriptorProto { - export type AsObject = { - name?: string, - methodList: Array, - options?: ServiceOptions.AsObject, - } + export type AsObject = { + name?: string, + methodList: Array, + options?: ServiceOptions.AsObject, + } } -export class MethodDescriptorProto extends jspb.Message { - hasName(): boolean; - clearName(): void; - getName(): string | undefined; - setName(value: string): void; - - hasInputType(): boolean; - clearInputType(): void; - getInputType(): string | undefined; - setInputType(value: string): void; - - hasOutputType(): boolean; - clearOutputType(): void; - getOutputType(): string | undefined; - setOutputType(value: string): void; - - hasOptions(): boolean; - clearOptions(): void; - getOptions(): MethodOptions | undefined; - setOptions(value?: MethodOptions): void; - - hasClientStreaming(): boolean; - clearClientStreaming(): void; - getClientStreaming(): boolean | undefined; - setClientStreaming(value: boolean): void; - - hasServerStreaming(): boolean; - clearServerStreaming(): void; - getServerStreaming(): boolean | undefined; - setServerStreaming(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MethodDescriptorProto.AsObject; - static toObject(includeInstance: boolean, msg: MethodDescriptorProto): MethodDescriptorProto.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MethodDescriptorProto, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MethodDescriptorProto; - static deserializeBinaryFromReader(message: MethodDescriptorProto, reader: jspb.BinaryReader): MethodDescriptorProto; +export class MethodDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): void; + + + hasInputType(): boolean; + clearInputType(): void; + getInputType(): string | undefined; + setInputType(value: string): void; + + + hasOutputType(): boolean; + clearOutputType(): void; + getOutputType(): string | undefined; + setOutputType(value: string): void; + + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): MethodOptions | undefined; + setOptions(value?: MethodOptions): void; + + + hasClientStreaming(): boolean; + clearClientStreaming(): void; + getClientStreaming(): boolean | undefined; + setClientStreaming(value: boolean): void; + + + hasServerStreaming(): boolean; + clearServerStreaming(): void; + getServerStreaming(): boolean | undefined; + setServerStreaming(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MethodDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: MethodDescriptorProto): MethodDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MethodDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MethodDescriptorProto; + static deserializeBinaryFromReader(message: MethodDescriptorProto, reader: jspb.BinaryReader): MethodDescriptorProto; } export namespace MethodDescriptorProto { - export type AsObject = { - name?: string, - inputType?: string, - outputType?: string, - options?: MethodOptions.AsObject, - clientStreaming?: boolean, - serverStreaming?: boolean, - } + export type AsObject = { + name?: string, + inputType?: string, + outputType?: string, + options?: MethodOptions.AsObject, + clientStreaming?: boolean, + serverStreaming?: boolean, + } } -export class FileOptions extends jspb.Message { - hasJavaPackage(): boolean; - clearJavaPackage(): void; - getJavaPackage(): string | undefined; - setJavaPackage(value: string): void; - - hasJavaOuterClassname(): boolean; - clearJavaOuterClassname(): void; - getJavaOuterClassname(): string | undefined; - setJavaOuterClassname(value: string): void; - - hasJavaMultipleFiles(): boolean; - clearJavaMultipleFiles(): void; - getJavaMultipleFiles(): boolean | undefined; - setJavaMultipleFiles(value: boolean): void; - - hasJavaGenerateEqualsAndHash(): boolean; - clearJavaGenerateEqualsAndHash(): void; - getJavaGenerateEqualsAndHash(): boolean | undefined; - setJavaGenerateEqualsAndHash(value: boolean): void; - - hasJavaStringCheckUtf8(): boolean; - clearJavaStringCheckUtf8(): void; - getJavaStringCheckUtf8(): boolean | undefined; - setJavaStringCheckUtf8(value: boolean): void; - - hasOptimizeFor(): boolean; - clearOptimizeFor(): void; - getOptimizeFor(): FileOptions.OptimizeModeMap[keyof FileOptions.OptimizeModeMap] | undefined; - setOptimizeFor(value: FileOptions.OptimizeModeMap[keyof FileOptions.OptimizeModeMap]): void; - - hasGoPackage(): boolean; - clearGoPackage(): void; - getGoPackage(): string | undefined; - setGoPackage(value: string): void; - - hasCcGenericServices(): boolean; - clearCcGenericServices(): void; - getCcGenericServices(): boolean | undefined; - setCcGenericServices(value: boolean): void; - - hasJavaGenericServices(): boolean; - clearJavaGenericServices(): void; - getJavaGenericServices(): boolean | undefined; - setJavaGenericServices(value: boolean): void; - - hasPyGenericServices(): boolean; - clearPyGenericServices(): void; - getPyGenericServices(): boolean | undefined; - setPyGenericServices(value: boolean): void; - - hasPhpGenericServices(): boolean; - clearPhpGenericServices(): void; - getPhpGenericServices(): boolean | undefined; - setPhpGenericServices(value: boolean): void; - - hasDeprecated(): boolean; - clearDeprecated(): void; - getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; - - hasCcEnableArenas(): boolean; - clearCcEnableArenas(): void; - getCcEnableArenas(): boolean | undefined; - setCcEnableArenas(value: boolean): void; - - hasObjcClassPrefix(): boolean; - clearObjcClassPrefix(): void; - getObjcClassPrefix(): string | undefined; - setObjcClassPrefix(value: string): void; - - hasCsharpNamespace(): boolean; - clearCsharpNamespace(): void; - getCsharpNamespace(): string | undefined; - setCsharpNamespace(value: string): void; - - hasSwiftPrefix(): boolean; - clearSwiftPrefix(): void; - getSwiftPrefix(): string | undefined; - setSwiftPrefix(value: string): void; - - hasPhpClassPrefix(): boolean; - clearPhpClassPrefix(): void; - getPhpClassPrefix(): string | undefined; - setPhpClassPrefix(value: string): void; - - hasPhpNamespace(): boolean; - clearPhpNamespace(): void; - getPhpNamespace(): string | undefined; - setPhpNamespace(value: string): void; - - hasPhpMetadataNamespace(): boolean; - clearPhpMetadataNamespace(): void; - getPhpMetadataNamespace(): string | undefined; - setPhpMetadataNamespace(value: string): void; - - hasRubyPackage(): boolean; - clearRubyPackage(): void; - getRubyPackage(): string | undefined; - setRubyPackage(value: string): void; - - clearUninterpretedOptionList(): void; - getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; - addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FileOptions.AsObject; - static toObject(includeInstance: boolean, msg: FileOptions): FileOptions.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FileOptions, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FileOptions; - static deserializeBinaryFromReader(message: FileOptions, reader: jspb.BinaryReader): FileOptions; +export class FileOptions extends jspb.Message { + + hasJavaPackage(): boolean; + clearJavaPackage(): void; + getJavaPackage(): string | undefined; + setJavaPackage(value: string): void; + + + hasJavaOuterClassname(): boolean; + clearJavaOuterClassname(): void; + getJavaOuterClassname(): string | undefined; + setJavaOuterClassname(value: string): void; + + + hasJavaMultipleFiles(): boolean; + clearJavaMultipleFiles(): void; + getJavaMultipleFiles(): boolean | undefined; + setJavaMultipleFiles(value: boolean): void; + + + hasJavaGenerateEqualsAndHash(): boolean; + clearJavaGenerateEqualsAndHash(): void; + getJavaGenerateEqualsAndHash(): boolean | undefined; + setJavaGenerateEqualsAndHash(value: boolean): void; + + + hasJavaStringCheckUtf8(): boolean; + clearJavaStringCheckUtf8(): void; + getJavaStringCheckUtf8(): boolean | undefined; + setJavaStringCheckUtf8(value: boolean): void; + + + hasOptimizeFor(): boolean; + clearOptimizeFor(): void; + getOptimizeFor(): FileOptions.OptimizeMode | undefined; + setOptimizeFor(value: FileOptions.OptimizeMode): void; + + + hasGoPackage(): boolean; + clearGoPackage(): void; + getGoPackage(): string | undefined; + setGoPackage(value: string): void; + + + hasCcGenericServices(): boolean; + clearCcGenericServices(): void; + getCcGenericServices(): boolean | undefined; + setCcGenericServices(value: boolean): void; + + + hasJavaGenericServices(): boolean; + clearJavaGenericServices(): void; + getJavaGenericServices(): boolean | undefined; + setJavaGenericServices(value: boolean): void; + + + hasPyGenericServices(): boolean; + clearPyGenericServices(): void; + getPyGenericServices(): boolean | undefined; + setPyGenericServices(value: boolean): void; + + + hasPhpGenericServices(): boolean; + clearPhpGenericServices(): void; + getPhpGenericServices(): boolean | undefined; + setPhpGenericServices(value: boolean): void; + + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + + hasCcEnableArenas(): boolean; + clearCcEnableArenas(): void; + getCcEnableArenas(): boolean | undefined; + setCcEnableArenas(value: boolean): void; + + + hasObjcClassPrefix(): boolean; + clearObjcClassPrefix(): void; + getObjcClassPrefix(): string | undefined; + setObjcClassPrefix(value: string): void; + + + hasCsharpNamespace(): boolean; + clearCsharpNamespace(): void; + getCsharpNamespace(): string | undefined; + setCsharpNamespace(value: string): void; + + + hasSwiftPrefix(): boolean; + clearSwiftPrefix(): void; + getSwiftPrefix(): string | undefined; + setSwiftPrefix(value: string): void; + + + hasPhpClassPrefix(): boolean; + clearPhpClassPrefix(): void; + getPhpClassPrefix(): string | undefined; + setPhpClassPrefix(value: string): void; + + + hasPhpNamespace(): boolean; + clearPhpNamespace(): void; + getPhpNamespace(): string | undefined; + setPhpNamespace(value: string): void; + + + hasPhpMetadataNamespace(): boolean; + clearPhpMetadataNamespace(): void; + getPhpMetadataNamespace(): string | undefined; + setPhpMetadataNamespace(value: string): void; + + + hasRubyPackage(): boolean; + clearRubyPackage(): void; + getRubyPackage(): string | undefined; + setRubyPackage(value: string): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileOptions.AsObject; + static toObject(includeInstance: boolean, msg: FileOptions): FileOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileOptions; + static deserializeBinaryFromReader(message: FileOptions, reader: jspb.BinaryReader): FileOptions; } export namespace FileOptions { - export type AsObject = { - javaPackage?: string, - javaOuterClassname?: string, - javaMultipleFiles?: boolean, - javaGenerateEqualsAndHash?: boolean, - javaStringCheckUtf8?: boolean, - optimizeFor?: FileOptions.OptimizeModeMap[keyof FileOptions.OptimizeModeMap], - goPackage?: string, - ccGenericServices?: boolean, - javaGenericServices?: boolean, - pyGenericServices?: boolean, - phpGenericServices?: boolean, - deprecated?: boolean, - ccEnableArenas?: boolean, - objcClassPrefix?: string, - csharpNamespace?: string, - swiftPrefix?: string, - phpClassPrefix?: string, - phpNamespace?: string, - phpMetadataNamespace?: string, - rubyPackage?: string, - uninterpretedOptionList: Array, - } - - export interface OptimizeModeMap { - SPEED: 1; - CODE_SIZE: 2; - LITE_RUNTIME: 3; - } - - export const OptimizeMode: OptimizeModeMap; + export type AsObject = { + javaPackage?: string, + javaOuterClassname?: string, + javaMultipleFiles?: boolean, + javaGenerateEqualsAndHash?: boolean, + javaStringCheckUtf8?: boolean, + optimizeFor?: FileOptions.OptimizeMode, + goPackage?: string, + ccGenericServices?: boolean, + javaGenericServices?: boolean, + pyGenericServices?: boolean, + phpGenericServices?: boolean, + deprecated?: boolean, + ccEnableArenas?: boolean, + objcClassPrefix?: string, + csharpNamespace?: string, + swiftPrefix?: string, + phpClassPrefix?: string, + phpNamespace?: string, + phpMetadataNamespace?: string, + rubyPackage?: string, + uninterpretedOptionList: Array, + } + + export enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3, + } + } -export class MessageOptions extends jspb.Message { - hasMessageSetWireFormat(): boolean; - clearMessageSetWireFormat(): void; - getMessageSetWireFormat(): boolean | undefined; - setMessageSetWireFormat(value: boolean): void; - - hasNoStandardDescriptorAccessor(): boolean; - clearNoStandardDescriptorAccessor(): void; - getNoStandardDescriptorAccessor(): boolean | undefined; - setNoStandardDescriptorAccessor(value: boolean): void; - - hasDeprecated(): boolean; - clearDeprecated(): void; - getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; - - hasMapEntry(): boolean; - clearMapEntry(): void; - getMapEntry(): boolean | undefined; - setMapEntry(value: boolean): void; - - clearUninterpretedOptionList(): void; - getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; - addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MessageOptions.AsObject; - static toObject(includeInstance: boolean, msg: MessageOptions): MessageOptions.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MessageOptions, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MessageOptions; - static deserializeBinaryFromReader(message: MessageOptions, reader: jspb.BinaryReader): MessageOptions; +export class MessageOptions extends jspb.Message { + + hasMessageSetWireFormat(): boolean; + clearMessageSetWireFormat(): void; + getMessageSetWireFormat(): boolean | undefined; + setMessageSetWireFormat(value: boolean): void; + + + hasNoStandardDescriptorAccessor(): boolean; + clearNoStandardDescriptorAccessor(): void; + getNoStandardDescriptorAccessor(): boolean | undefined; + setNoStandardDescriptorAccessor(value: boolean): void; + + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + + hasMapEntry(): boolean; + clearMapEntry(): void; + getMapEntry(): boolean | undefined; + setMapEntry(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MessageOptions.AsObject; + static toObject(includeInstance: boolean, msg: MessageOptions): MessageOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MessageOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MessageOptions; + static deserializeBinaryFromReader(message: MessageOptions, reader: jspb.BinaryReader): MessageOptions; } export namespace MessageOptions { - export type AsObject = { - messageSetWireFormat?: boolean, - noStandardDescriptorAccessor?: boolean, - deprecated?: boolean, - mapEntry?: boolean, - uninterpretedOptionList: Array, - } + export type AsObject = { + messageSetWireFormat?: boolean, + noStandardDescriptorAccessor?: boolean, + deprecated?: boolean, + mapEntry?: boolean, + uninterpretedOptionList: Array, + } } -export class FieldOptions extends jspb.Message { - hasCtype(): boolean; - clearCtype(): void; - getCtype(): FieldOptions.CTypeMap[keyof FieldOptions.CTypeMap] | undefined; - setCtype(value: FieldOptions.CTypeMap[keyof FieldOptions.CTypeMap]): void; - - hasPacked(): boolean; - clearPacked(): void; - getPacked(): boolean | undefined; - setPacked(value: boolean): void; - - hasJstype(): boolean; - clearJstype(): void; - getJstype(): FieldOptions.JSTypeMap[keyof FieldOptions.JSTypeMap] | undefined; - setJstype(value: FieldOptions.JSTypeMap[keyof FieldOptions.JSTypeMap]): void; - - hasLazy(): boolean; - clearLazy(): void; - getLazy(): boolean | undefined; - setLazy(value: boolean): void; - - hasDeprecated(): boolean; - clearDeprecated(): void; - getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; - - hasWeak(): boolean; - clearWeak(): void; - getWeak(): boolean | undefined; - setWeak(value: boolean): void; - - clearUninterpretedOptionList(): void; - getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; - addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FieldOptions.AsObject; - static toObject(includeInstance: boolean, msg: FieldOptions): FieldOptions.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FieldOptions, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FieldOptions; - static deserializeBinaryFromReader(message: FieldOptions, reader: jspb.BinaryReader): FieldOptions; +export class FieldOptions extends jspb.Message { + + hasCtype(): boolean; + clearCtype(): void; + getCtype(): FieldOptions.CType | undefined; + setCtype(value: FieldOptions.CType): void; + + + hasPacked(): boolean; + clearPacked(): void; + getPacked(): boolean | undefined; + setPacked(value: boolean): void; + + + hasJstype(): boolean; + clearJstype(): void; + getJstype(): FieldOptions.JSType | undefined; + setJstype(value: FieldOptions.JSType): void; + + + hasLazy(): boolean; + clearLazy(): void; + getLazy(): boolean | undefined; + setLazy(value: boolean): void; + + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + + hasWeak(): boolean; + clearWeak(): void; + getWeak(): boolean | undefined; + setWeak(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldOptions.AsObject; + static toObject(includeInstance: boolean, msg: FieldOptions): FieldOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldOptions; + static deserializeBinaryFromReader(message: FieldOptions, reader: jspb.BinaryReader): FieldOptions; } export namespace FieldOptions { - export type AsObject = { - ctype?: FieldOptions.CTypeMap[keyof FieldOptions.CTypeMap], - packed?: boolean, - jstype?: FieldOptions.JSTypeMap[keyof FieldOptions.JSTypeMap], - lazy?: boolean, - deprecated?: boolean, - weak?: boolean, - uninterpretedOptionList: Array, - } - - export interface CTypeMap { - STRING: 0; - CORD: 1; - STRING_PIECE: 2; - } - - export const CType: CTypeMap; - - export interface JSTypeMap { - JS_NORMAL: 0; - JS_STRING: 1; - JS_NUMBER: 2; - } - - export const JSType: JSTypeMap; + export type AsObject = { + ctype?: FieldOptions.CType, + packed?: boolean, + jstype?: FieldOptions.JSType, + lazy?: boolean, + deprecated?: boolean, + weak?: boolean, + uninterpretedOptionList: Array, + } + + export enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2, + } + + export enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2, + } + } -export class OneofOptions extends jspb.Message { - clearUninterpretedOptionList(): void; - getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; - addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): OneofOptions.AsObject; - static toObject(includeInstance: boolean, msg: OneofOptions): OneofOptions.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: OneofOptions, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): OneofOptions; - static deserializeBinaryFromReader(message: OneofOptions, reader: jspb.BinaryReader): OneofOptions; +export class OneofOptions extends jspb.Message { + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofOptions.AsObject; + static toObject(includeInstance: boolean, msg: OneofOptions): OneofOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofOptions; + static deserializeBinaryFromReader(message: OneofOptions, reader: jspb.BinaryReader): OneofOptions; } export namespace OneofOptions { - export type AsObject = { - uninterpretedOptionList: Array, - } + export type AsObject = { + uninterpretedOptionList: Array, + } } -export class EnumOptions extends jspb.Message { - hasAllowAlias(): boolean; - clearAllowAlias(): void; - getAllowAlias(): boolean | undefined; - setAllowAlias(value: boolean): void; - - hasDeprecated(): boolean; - clearDeprecated(): void; - getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; - - clearUninterpretedOptionList(): void; - getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; - addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EnumOptions.AsObject; - static toObject(includeInstance: boolean, msg: EnumOptions): EnumOptions.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EnumOptions, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EnumOptions; - static deserializeBinaryFromReader(message: EnumOptions, reader: jspb.BinaryReader): EnumOptions; +export class EnumOptions extends jspb.Message { + + hasAllowAlias(): boolean; + clearAllowAlias(): void; + getAllowAlias(): boolean | undefined; + setAllowAlias(value: boolean): void; + + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumOptions): EnumOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumOptions; + static deserializeBinaryFromReader(message: EnumOptions, reader: jspb.BinaryReader): EnumOptions; } export namespace EnumOptions { - export type AsObject = { - allowAlias?: boolean, - deprecated?: boolean, - uninterpretedOptionList: Array, - } + export type AsObject = { + allowAlias?: boolean, + deprecated?: boolean, + uninterpretedOptionList: Array, + } } -export class EnumValueOptions extends jspb.Message { - hasDeprecated(): boolean; - clearDeprecated(): void; - getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; - - clearUninterpretedOptionList(): void; - getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; - addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EnumValueOptions.AsObject; - static toObject(includeInstance: boolean, msg: EnumValueOptions): EnumValueOptions.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EnumValueOptions, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EnumValueOptions; - static deserializeBinaryFromReader(message: EnumValueOptions, reader: jspb.BinaryReader): EnumValueOptions; +export class EnumValueOptions extends jspb.Message { + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValueOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueOptions): EnumValueOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValueOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValueOptions; + static deserializeBinaryFromReader(message: EnumValueOptions, reader: jspb.BinaryReader): EnumValueOptions; } export namespace EnumValueOptions { - export type AsObject = { - deprecated?: boolean, - uninterpretedOptionList: Array, - } + export type AsObject = { + deprecated?: boolean, + uninterpretedOptionList: Array, + } } -export class ServiceOptions extends jspb.Message { - hasDeprecated(): boolean; - clearDeprecated(): void; - getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; - - clearUninterpretedOptionList(): void; - getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; - addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServiceOptions.AsObject; - static toObject(includeInstance: boolean, msg: ServiceOptions): ServiceOptions.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServiceOptions, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServiceOptions; - static deserializeBinaryFromReader(message: ServiceOptions, reader: jspb.BinaryReader): ServiceOptions; +export class ServiceOptions extends jspb.Message { + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceOptions.AsObject; + static toObject(includeInstance: boolean, msg: ServiceOptions): ServiceOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceOptions; + static deserializeBinaryFromReader(message: ServiceOptions, reader: jspb.BinaryReader): ServiceOptions; } export namespace ServiceOptions { - export type AsObject = { - deprecated?: boolean, - uninterpretedOptionList: Array, - } + export type AsObject = { + deprecated?: boolean, + uninterpretedOptionList: Array, + } } -export class MethodOptions extends jspb.Message { - hasDeprecated(): boolean; - clearDeprecated(): void; - getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; - - hasIdempotencyLevel(): boolean; - clearIdempotencyLevel(): void; - getIdempotencyLevel(): MethodOptions.IdempotencyLevelMap[keyof MethodOptions.IdempotencyLevelMap] | undefined; - setIdempotencyLevel(value: MethodOptions.IdempotencyLevelMap[keyof MethodOptions.IdempotencyLevelMap]): void; - - clearUninterpretedOptionList(): void; - getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; - addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MethodOptions.AsObject; - static toObject(includeInstance: boolean, msg: MethodOptions): MethodOptions.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MethodOptions, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MethodOptions; - static deserializeBinaryFromReader(message: MethodOptions, reader: jspb.BinaryReader): MethodOptions; +export class MethodOptions extends jspb.Message { + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): void; + + + hasIdempotencyLevel(): boolean; + clearIdempotencyLevel(): void; + getIdempotencyLevel(): MethodOptions.IdempotencyLevel | undefined; + setIdempotencyLevel(value: MethodOptions.IdempotencyLevel): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MethodOptions.AsObject; + static toObject(includeInstance: boolean, msg: MethodOptions): MethodOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MethodOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MethodOptions; + static deserializeBinaryFromReader(message: MethodOptions, reader: jspb.BinaryReader): MethodOptions; } export namespace MethodOptions { - export type AsObject = { - deprecated?: boolean, - idempotencyLevel?: MethodOptions.IdempotencyLevelMap[keyof MethodOptions.IdempotencyLevelMap], - uninterpretedOptionList: Array, - } - - export interface IdempotencyLevelMap { - IDEMPOTENCY_UNKNOWN: 0; - NO_SIDE_EFFECTS: 1; - IDEMPOTENT: 2; - } - - export const IdempotencyLevel: IdempotencyLevelMap; -} + export type AsObject = { + deprecated?: boolean, + idempotencyLevel?: MethodOptions.IdempotencyLevel, + uninterpretedOptionList: Array, + } + + export enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2, + } -export class UninterpretedOption extends jspb.Message { - clearNameList(): void; - getNameList(): Array; - setNameList(value: Array): void; - addName(value?: UninterpretedOption.NamePart, index?: number): UninterpretedOption.NamePart; - - hasIdentifierValue(): boolean; - clearIdentifierValue(): void; - getIdentifierValue(): string | undefined; - setIdentifierValue(value: string): void; - - hasPositiveIntValue(): boolean; - clearPositiveIntValue(): void; - getPositiveIntValue(): number | undefined; - setPositiveIntValue(value: number): void; - - hasNegativeIntValue(): boolean; - clearNegativeIntValue(): void; - getNegativeIntValue(): number | undefined; - setNegativeIntValue(value: number): void; - - hasDoubleValue(): boolean; - clearDoubleValue(): void; - getDoubleValue(): number | undefined; - setDoubleValue(value: number): void; - - hasStringValue(): boolean; - clearStringValue(): void; - getStringValue(): Uint8Array | string; - getStringValue_asU8(): Uint8Array; - getStringValue_asB64(): string; - setStringValue(value: Uint8Array | string): void; - - hasAggregateValue(): boolean; - clearAggregateValue(): void; - getAggregateValue(): string | undefined; - setAggregateValue(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UninterpretedOption.AsObject; - static toObject(includeInstance: boolean, msg: UninterpretedOption): UninterpretedOption.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UninterpretedOption, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UninterpretedOption; - static deserializeBinaryFromReader(message: UninterpretedOption, reader: jspb.BinaryReader): UninterpretedOption; } -export namespace UninterpretedOption { - export type AsObject = { - nameList: Array, - identifierValue?: string, - positiveIntValue?: number, - negativeIntValue?: number, - doubleValue?: number, - stringValue: Uint8Array | string, - aggregateValue?: string, - } - - export class NamePart extends jspb.Message { - hasNamePart(): boolean; - clearNamePart(): void; - getNamePart(): string | undefined; - setNamePart(value: string): void; - - hasIsExtension(): boolean; - clearIsExtension(): void; - getIsExtension(): boolean | undefined; - setIsExtension(value: boolean): void; +export class UninterpretedOption extends jspb.Message { + clearNameList(): void; + getNameList(): Array; + setNameList(value: Array): void; + addName(value?: UninterpretedOption.NamePart, index?: number): UninterpretedOption.NamePart; + + + hasIdentifierValue(): boolean; + clearIdentifierValue(): void; + getIdentifierValue(): string | undefined; + setIdentifierValue(value: string): void; + + + hasPositiveIntValue(): boolean; + clearPositiveIntValue(): void; + getPositiveIntValue(): number | undefined; + setPositiveIntValue(value: number): void; + + + hasNegativeIntValue(): boolean; + clearNegativeIntValue(): void; + getNegativeIntValue(): number | undefined; + setNegativeIntValue(value: number): void; + + + hasDoubleValue(): boolean; + clearDoubleValue(): void; + getDoubleValue(): number | undefined; + setDoubleValue(value: number): void; + + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): Uint8Array | string; + getStringValue_asU8(): Uint8Array; + getStringValue_asB64(): string; + setStringValue(value: Uint8Array | string): void; + + + hasAggregateValue(): boolean; + clearAggregateValue(): void; + getAggregateValue(): string | undefined; + setAggregateValue(value: string): void; + serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NamePart.AsObject; - static toObject(includeInstance: boolean, msg: NamePart): NamePart.AsObject; + toObject(includeInstance?: boolean): UninterpretedOption.AsObject; + static toObject(includeInstance: boolean, msg: UninterpretedOption): UninterpretedOption.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NamePart, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NamePart; - static deserializeBinaryFromReader(message: NamePart, reader: jspb.BinaryReader): NamePart; - } + static serializeBinaryToWriter(message: UninterpretedOption, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UninterpretedOption; + static deserializeBinaryFromReader(message: UninterpretedOption, reader: jspb.BinaryReader): UninterpretedOption; +} - export namespace NamePart { +export namespace UninterpretedOption { export type AsObject = { - namePart?: string, - isExtension?: boolean, + nameList: Array, + identifierValue?: string, + positiveIntValue?: number, + negativeIntValue?: number, + doubleValue?: number, + stringValue: Uint8Array | string, + aggregateValue?: string, + } + + + export class NamePart extends jspb.Message { + + hasNamePart(): boolean; + clearNamePart(): void; + getNamePart(): string | undefined; + setNamePart(value: string): void; + + + hasIsExtension(): boolean; + clearIsExtension(): void; + getIsExtension(): boolean | undefined; + setIsExtension(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NamePart.AsObject; + static toObject(includeInstance: boolean, msg: NamePart): NamePart.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NamePart, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NamePart; + static deserializeBinaryFromReader(message: NamePart, reader: jspb.BinaryReader): NamePart; + } + + export namespace NamePart { + export type AsObject = { + namePart?: string, + isExtension?: boolean, + } } - } -} -export class SourceCodeInfo extends jspb.Message { - clearLocationList(): void; - getLocationList(): Array; - setLocationList(value: Array): void; - addLocation(value?: SourceCodeInfo.Location, index?: number): SourceCodeInfo.Location; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SourceCodeInfo.AsObject; - static toObject(includeInstance: boolean, msg: SourceCodeInfo): SourceCodeInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SourceCodeInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SourceCodeInfo; - static deserializeBinaryFromReader(message: SourceCodeInfo, reader: jspb.BinaryReader): SourceCodeInfo; } -export namespace SourceCodeInfo { - export type AsObject = { - locationList: Array, - } - - export class Location extends jspb.Message { - clearPathList(): void; - getPathList(): Array; - setPathList(value: Array): void; - addPath(value: number, index?: number): number; - - clearSpanList(): void; - getSpanList(): Array; - setSpanList(value: Array): void; - addSpan(value: number, index?: number): number; - - hasLeadingComments(): boolean; - clearLeadingComments(): void; - getLeadingComments(): string | undefined; - setLeadingComments(value: string): void; - - hasTrailingComments(): boolean; - clearTrailingComments(): void; - getTrailingComments(): string | undefined; - setTrailingComments(value: string): void; - - clearLeadingDetachedCommentsList(): void; - getLeadingDetachedCommentsList(): Array; - setLeadingDetachedCommentsList(value: Array): void; - addLeadingDetachedComments(value: string, index?: number): string; +export class SourceCodeInfo extends jspb.Message { + clearLocationList(): void; + getLocationList(): Array; + setLocationList(value: Array): void; + addLocation(value?: SourceCodeInfo.Location, index?: number): SourceCodeInfo.Location; + serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Location.AsObject; - static toObject(includeInstance: boolean, msg: Location): Location.AsObject; + toObject(includeInstance?: boolean): SourceCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: SourceCodeInfo): SourceCodeInfo.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Location, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Location; - static deserializeBinaryFromReader(message: Location, reader: jspb.BinaryReader): Location; - } + static serializeBinaryToWriter(message: SourceCodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SourceCodeInfo; + static deserializeBinaryFromReader(message: SourceCodeInfo, reader: jspb.BinaryReader): SourceCodeInfo; +} - export namespace Location { +export namespace SourceCodeInfo { export type AsObject = { - pathList: Array, - spanList: Array, - leadingComments?: string, - trailingComments?: string, - leadingDetachedCommentsList: Array, + locationList: Array, + } + + + export class Location extends jspb.Message { + clearPathList(): void; + getPathList(): Array; + setPathList(value: Array): void; + addPath(value: number, index?: number): number; + + clearSpanList(): void; + getSpanList(): Array; + setSpanList(value: Array): void; + addSpan(value: number, index?: number): number; + + + hasLeadingComments(): boolean; + clearLeadingComments(): void; + getLeadingComments(): string | undefined; + setLeadingComments(value: string): void; + + + hasTrailingComments(): boolean; + clearTrailingComments(): void; + getTrailingComments(): string | undefined; + setTrailingComments(value: string): void; + + clearLeadingDetachedCommentsList(): void; + getLeadingDetachedCommentsList(): Array; + setLeadingDetachedCommentsList(value: Array): void; + addLeadingDetachedComments(value: string, index?: number): string; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Location.AsObject; + static toObject(includeInstance: boolean, msg: Location): Location.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Location, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Location; + static deserializeBinaryFromReader(message: Location, reader: jspb.BinaryReader): Location; + } + + export namespace Location { + export type AsObject = { + pathList: Array, + spanList: Array, + leadingComments?: string, + trailingComments?: string, + leadingDetachedCommentsList: Array, + } } - } -} -export class GeneratedCodeInfo extends jspb.Message { - clearAnnotationList(): void; - getAnnotationList(): Array; - setAnnotationList(value: Array): void; - addAnnotation(value?: GeneratedCodeInfo.Annotation, index?: number): GeneratedCodeInfo.Annotation; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GeneratedCodeInfo.AsObject; - static toObject(includeInstance: boolean, msg: GeneratedCodeInfo): GeneratedCodeInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GeneratedCodeInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GeneratedCodeInfo; - static deserializeBinaryFromReader(message: GeneratedCodeInfo, reader: jspb.BinaryReader): GeneratedCodeInfo; } -export namespace GeneratedCodeInfo { - export type AsObject = { - annotationList: Array, - } - - export class Annotation extends jspb.Message { - clearPathList(): void; - getPathList(): Array; - setPathList(value: Array): void; - addPath(value: number, index?: number): number; - - hasSourceFile(): boolean; - clearSourceFile(): void; - getSourceFile(): string | undefined; - setSourceFile(value: string): void; - - hasBegin(): boolean; - clearBegin(): void; - getBegin(): number | undefined; - setBegin(value: number): void; - - hasEnd(): boolean; - clearEnd(): void; - getEnd(): number | undefined; - setEnd(value: number): void; +export class GeneratedCodeInfo extends jspb.Message { + clearAnnotationList(): void; + getAnnotationList(): Array; + setAnnotationList(value: Array): void; + addAnnotation(value?: GeneratedCodeInfo.Annotation, index?: number): GeneratedCodeInfo.Annotation; + serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Annotation.AsObject; - static toObject(includeInstance: boolean, msg: Annotation): Annotation.AsObject; + toObject(includeInstance?: boolean): GeneratedCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: GeneratedCodeInfo): GeneratedCodeInfo.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Annotation, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Annotation; - static deserializeBinaryFromReader(message: Annotation, reader: jspb.BinaryReader): Annotation; - } + static serializeBinaryToWriter(message: GeneratedCodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GeneratedCodeInfo; + static deserializeBinaryFromReader(message: GeneratedCodeInfo, reader: jspb.BinaryReader): GeneratedCodeInfo; +} - export namespace Annotation { +export namespace GeneratedCodeInfo { export type AsObject = { - pathList: Array, - sourceFile?: string, - begin?: number, - end?: number, + annotationList: Array, } - } -} + + export class Annotation extends jspb.Message { + clearPathList(): void; + getPathList(): Array; + setPathList(value: Array): void; + addPath(value: number, index?: number): number; + + + hasSourceFile(): boolean; + clearSourceFile(): void; + getSourceFile(): string | undefined; + setSourceFile(value: string): void; + + + hasBegin(): boolean; + clearBegin(): void; + getBegin(): number | undefined; + setBegin(value: number): void; + + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Annotation.AsObject; + static toObject(includeInstance: boolean, msg: Annotation): Annotation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Annotation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Annotation; + static deserializeBinaryFromReader(message: Annotation, reader: jspb.BinaryReader): Annotation; + } + + export namespace Annotation { + export type AsObject = { + pathList: Array, + sourceFile?: string, + begin?: number, + end?: number, + } + } + +} diff --git a/js/proto/google/protobuf/descriptor_pb.js b/js/proto/google/protobuf/descriptor_pb.js index b15f0941d..7745f87c1 100644 --- a/js/proto/google/protobuf/descriptor_pb.js +++ b/js/proto/google/protobuf/descriptor_pb.js @@ -1,4 +1,3 @@ -// source: google/protobuf/descriptor.proto /** * @fileoverview * @enhanceable @@ -45,6 +44,7 @@ goog.exportSymbol('proto.google.protobuf.SourceCodeInfo', null, global); goog.exportSymbol('proto.google.protobuf.SourceCodeInfo.Location', null, global); goog.exportSymbol('proto.google.protobuf.UninterpretedOption', null, global); goog.exportSymbol('proto.google.protobuf.UninterpretedOption.NamePart', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -55,834 +55,13 @@ goog.exportSymbol('proto.google.protobuf.UninterpretedOption.NamePart', null, gl * @extends {jspb.Message} * @constructor */ -proto.google.protobuf.FileDescriptorSet = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorSet.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.FileDescriptorSet, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.FileDescriptorSet.displayName = 'proto.google.protobuf.FileDescriptorSet'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.FileDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorProto.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.FileDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.FileDescriptorProto.displayName = 'proto.google.protobuf.FileDescriptorProto'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.DescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.DescriptorProto.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.DescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.DescriptorProto.displayName = 'proto.google.protobuf.DescriptorProto'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.DescriptorProto.ExtensionRange = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.DescriptorProto.ExtensionRange, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.DescriptorProto.ExtensionRange.displayName = 'proto.google.protobuf.DescriptorProto.ExtensionRange'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.DescriptorProto.ReservedRange = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.DescriptorProto.ReservedRange, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.DescriptorProto.ReservedRange.displayName = 'proto.google.protobuf.DescriptorProto.ReservedRange'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.ExtensionRangeOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ExtensionRangeOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.ExtensionRangeOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.ExtensionRangeOptions.displayName = 'proto.google.protobuf.ExtensionRangeOptions'; -} - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.ExtensionRangeOptions.extensions = {}; - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.ExtensionRangeOptions.extensionsBinary = {}; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.FieldDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.FieldDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.FieldDescriptorProto.displayName = 'proto.google.protobuf.FieldDescriptorProto'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.OneofDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.OneofDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.OneofDescriptorProto.displayName = 'proto.google.protobuf.OneofDescriptorProto'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.EnumDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.EnumDescriptorProto.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.EnumDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.EnumDescriptorProto.displayName = 'proto.google.protobuf.EnumDescriptorProto'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.EnumDescriptorProto.EnumReservedRange = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.displayName = 'proto.google.protobuf.EnumDescriptorProto.EnumReservedRange'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.EnumValueDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.EnumValueDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.EnumValueDescriptorProto.displayName = 'proto.google.protobuf.EnumValueDescriptorProto'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.ServiceDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ServiceDescriptorProto.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.ServiceDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.ServiceDescriptorProto.displayName = 'proto.google.protobuf.ServiceDescriptorProto'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.MethodDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.MethodDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.MethodDescriptorProto.displayName = 'proto.google.protobuf.MethodDescriptorProto'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.FileOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FileOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.FileOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.FileOptions.displayName = 'proto.google.protobuf.FileOptions'; -} - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.FileOptions.extensions = {}; - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.FileOptions.extensionsBinary = {}; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.MessageOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MessageOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.MessageOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.MessageOptions.displayName = 'proto.google.protobuf.MessageOptions'; -} - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.MessageOptions.extensions = {}; - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.MessageOptions.extensionsBinary = {}; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.FieldOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FieldOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.FieldOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.FieldOptions.displayName = 'proto.google.protobuf.FieldOptions'; -} - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.FieldOptions.extensions = {}; - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.FieldOptions.extensionsBinary = {}; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.OneofOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.OneofOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.OneofOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.OneofOptions.displayName = 'proto.google.protobuf.OneofOptions'; -} - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.OneofOptions.extensions = {}; - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.OneofOptions.extensionsBinary = {}; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.EnumOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.EnumOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.EnumOptions.displayName = 'proto.google.protobuf.EnumOptions'; -} - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.EnumOptions.extensions = {}; - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.EnumOptions.extensionsBinary = {}; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.EnumValueOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumValueOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.EnumValueOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.EnumValueOptions.displayName = 'proto.google.protobuf.EnumValueOptions'; -} - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.EnumValueOptions.extensions = {}; - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.EnumValueOptions.extensionsBinary = {}; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.ServiceOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ServiceOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.ServiceOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.ServiceOptions.displayName = 'proto.google.protobuf.ServiceOptions'; -} - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.ServiceOptions.extensions = {}; - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.ServiceOptions.extensionsBinary = {}; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.MethodOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MethodOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.MethodOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.MethodOptions.displayName = 'proto.google.protobuf.MethodOptions'; -} - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.MethodOptions.extensions = {}; - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.MethodOptions.extensionsBinary = {}; - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.UninterpretedOption = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.UninterpretedOption.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.UninterpretedOption, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.UninterpretedOption.displayName = 'proto.google.protobuf.UninterpretedOption'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.UninterpretedOption.NamePart = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.UninterpretedOption.NamePart, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.UninterpretedOption.NamePart.displayName = 'proto.google.protobuf.UninterpretedOption.NamePart'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.SourceCodeInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.SourceCodeInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.SourceCodeInfo.displayName = 'proto.google.protobuf.SourceCodeInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.SourceCodeInfo.Location = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.SourceCodeInfo.Location, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.SourceCodeInfo.Location.displayName = 'proto.google.protobuf.SourceCodeInfo.Location'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.GeneratedCodeInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.GeneratedCodeInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.GeneratedCodeInfo.displayName = 'proto.google.protobuf.GeneratedCodeInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.GeneratedCodeInfo.Annotation = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_, null); +proto.google.protobuf.FileDescriptorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorSet.repeatedFields_, null); }; -goog.inherits(proto.google.protobuf.GeneratedCodeInfo.Annotation, jspb.Message); +goog.inherits(proto.google.protobuf.FileDescriptorSet, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.google.protobuf.GeneratedCodeInfo.Annotation.displayName = 'proto.google.protobuf.GeneratedCodeInfo.Annotation'; + proto.google.protobuf.FileDescriptorSet.displayName = 'proto.google.protobuf.FileDescriptorSet'; } - /** * List of repeated fields within this message type. * @private {!Array} @@ -894,15 +73,13 @@ proto.google.protobuf.FileDescriptorSet.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FileDescriptorSet.prototype.toObject = function(opt_includeInstance) { @@ -912,8 +89,8 @@ proto.google.protobuf.FileDescriptorSet.prototype.toObject = function(opt_includ /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FileDescriptorSet} msg The msg instance to transform. * @return {!Object} @@ -1014,12 +191,9 @@ proto.google.protobuf.FileDescriptorSet.prototype.getFileList = function() { }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.FileDescriptorSet} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.FileDescriptorSet.prototype.setFileList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -1033,16 +207,29 @@ proto.google.protobuf.FileDescriptorSet.prototype.addFile = function(opt_value, }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.FileDescriptorSet} returns this - */ proto.google.protobuf.FileDescriptorSet.prototype.clearFileList = function() { - return this.setFileList([]); + this.setFileList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FileDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.FileDescriptorProto.displayName = 'proto.google.protobuf.FileDescriptorProto'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -1054,15 +241,13 @@ proto.google.protobuf.FileDescriptorProto.repeatedFields_ = [3,10,11,4,5,6,7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -1072,8 +257,8 @@ proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_incl /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FileDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -1081,11 +266,11 @@ proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_incl */ proto.google.protobuf.FileDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, - pb_package: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, - dependencyList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, - publicDependencyList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, - weakDependencyList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, + name: jspb.Message.getField(msg, 1), + pb_package: jspb.Message.getField(msg, 2), + dependencyList: jspb.Message.getRepeatedField(msg, 3), + publicDependencyList: jspb.Message.getRepeatedField(msg, 10), + weakDependencyList: jspb.Message.getRepeatedField(msg, 11), messageTypeList: jspb.Message.toObjectList(msg.getMessageTypeList(), proto.google.protobuf.DescriptorProto.toObject, includeInstance), enumTypeList: jspb.Message.toObjectList(msg.getEnumTypeList(), @@ -1096,7 +281,7 @@ proto.google.protobuf.FileDescriptorProto.toObject = function(includeInstance, m proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), options: (f = msg.getOptions()) && proto.google.protobuf.FileOptions.toObject(includeInstance, f), sourceCodeInfo: (f = msg.getSourceCodeInfo()) && proto.google.protobuf.SourceCodeInfo.toObject(includeInstance, f), - syntax: (f = jspb.Message.getField(msg, 12)) == null ? undefined : f + syntax: jspb.Message.getField(msg, 12) }; if (includeInstance) { @@ -1318,21 +503,14 @@ proto.google.protobuf.FileDescriptorProto.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileDescriptorProto.prototype.setName = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ proto.google.protobuf.FileDescriptorProto.prototype.clearName = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -1354,21 +532,14 @@ proto.google.protobuf.FileDescriptorProto.prototype.getPackage = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileDescriptorProto.prototype.setPackage = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ proto.google.protobuf.FileDescriptorProto.prototype.clearPackage = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -1390,31 +561,23 @@ proto.google.protobuf.FileDescriptorProto.prototype.getDependencyList = function }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ +/** @param {!Array} value */ proto.google.protobuf.FileDescriptorProto.prototype.setDependencyList = function(value) { - return jspb.Message.setField(this, 3, value || []); + jspb.Message.setField(this, 3, value || []); }; /** * @param {string} value * @param {number=} opt_index - * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.addDependency = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); + jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ proto.google.protobuf.FileDescriptorProto.prototype.clearDependencyList = function() { - return this.setDependencyList([]); + this.setDependencyList([]); }; @@ -1427,31 +590,23 @@ proto.google.protobuf.FileDescriptorProto.prototype.getPublicDependencyList = fu }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ +/** @param {!Array} value */ proto.google.protobuf.FileDescriptorProto.prototype.setPublicDependencyList = function(value) { - return jspb.Message.setField(this, 10, value || []); + jspb.Message.setField(this, 10, value || []); }; /** * @param {number} value * @param {number=} opt_index - * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.addPublicDependency = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 10, value, opt_index); + jspb.Message.addToRepeatedField(this, 10, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ proto.google.protobuf.FileDescriptorProto.prototype.clearPublicDependencyList = function() { - return this.setPublicDependencyList([]); + this.setPublicDependencyList([]); }; @@ -1464,31 +619,23 @@ proto.google.protobuf.FileDescriptorProto.prototype.getWeakDependencyList = func }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ +/** @param {!Array} value */ proto.google.protobuf.FileDescriptorProto.prototype.setWeakDependencyList = function(value) { - return jspb.Message.setField(this, 11, value || []); + jspb.Message.setField(this, 11, value || []); }; /** * @param {number} value * @param {number=} opt_index - * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.addWeakDependency = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 11, value, opt_index); + jspb.Message.addToRepeatedField(this, 11, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ proto.google.protobuf.FileDescriptorProto.prototype.clearWeakDependencyList = function() { - return this.setWeakDependencyList([]); + this.setWeakDependencyList([]); }; @@ -1502,12 +649,9 @@ proto.google.protobuf.FileDescriptorProto.prototype.getMessageTypeList = functio }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.FileDescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.FileDescriptorProto.prototype.setMessageTypeList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); + jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -1521,12 +665,8 @@ proto.google.protobuf.FileDescriptorProto.prototype.addMessageType = function(op }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ proto.google.protobuf.FileDescriptorProto.prototype.clearMessageTypeList = function() { - return this.setMessageTypeList([]); + this.setMessageTypeList([]); }; @@ -1540,12 +680,9 @@ proto.google.protobuf.FileDescriptorProto.prototype.getEnumTypeList = function() }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.FileDescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.FileDescriptorProto.prototype.setEnumTypeList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); + jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -1559,12 +696,8 @@ proto.google.protobuf.FileDescriptorProto.prototype.addEnumType = function(opt_v }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ proto.google.protobuf.FileDescriptorProto.prototype.clearEnumTypeList = function() { - return this.setEnumTypeList([]); + this.setEnumTypeList([]); }; @@ -1578,12 +711,9 @@ proto.google.protobuf.FileDescriptorProto.prototype.getServiceList = function() }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.FileDescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.FileDescriptorProto.prototype.setServiceList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); + jspb.Message.setRepeatedWrapperField(this, 6, value); }; @@ -1597,12 +727,8 @@ proto.google.protobuf.FileDescriptorProto.prototype.addService = function(opt_va }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ proto.google.protobuf.FileDescriptorProto.prototype.clearServiceList = function() { - return this.setServiceList([]); + this.setServiceList([]); }; @@ -1616,12 +742,9 @@ proto.google.protobuf.FileDescriptorProto.prototype.getExtensionList = function( }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.FileDescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.FileDescriptorProto.prototype.setExtensionList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); + jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -1635,12 +758,8 @@ proto.google.protobuf.FileDescriptorProto.prototype.addExtension$ = function(opt }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ proto.google.protobuf.FileDescriptorProto.prototype.clearExtensionList = function() { - return this.setExtensionList([]); + this.setExtensionList([]); }; @@ -1654,21 +773,14 @@ proto.google.protobuf.FileDescriptorProto.prototype.getOptions = function() { }; -/** - * @param {?proto.google.protobuf.FileOptions|undefined} value - * @return {!proto.google.protobuf.FileDescriptorProto} returns this -*/ +/** @param {?proto.google.protobuf.FileOptions|undefined} value */ proto.google.protobuf.FileDescriptorProto.prototype.setOptions = function(value) { - return jspb.Message.setWrapperField(this, 8, value); + jspb.Message.setWrapperField(this, 8, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ proto.google.protobuf.FileDescriptorProto.prototype.clearOptions = function() { - return this.setOptions(undefined); + this.setOptions(undefined); }; @@ -1691,21 +803,14 @@ proto.google.protobuf.FileDescriptorProto.prototype.getSourceCodeInfo = function }; -/** - * @param {?proto.google.protobuf.SourceCodeInfo|undefined} value - * @return {!proto.google.protobuf.FileDescriptorProto} returns this -*/ +/** @param {?proto.google.protobuf.SourceCodeInfo|undefined} value */ proto.google.protobuf.FileDescriptorProto.prototype.setSourceCodeInfo = function(value) { - return jspb.Message.setWrapperField(this, 9, value); + jspb.Message.setWrapperField(this, 9, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ proto.google.protobuf.FileDescriptorProto.prototype.clearSourceCodeInfo = function() { - return this.setSourceCodeInfo(undefined); + this.setSourceCodeInfo(undefined); }; @@ -1727,21 +832,14 @@ proto.google.protobuf.FileDescriptorProto.prototype.getSyntax = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileDescriptorProto.prototype.setSyntax = function(value) { - return jspb.Message.setField(this, 12, value); + jspb.Message.setField(this, 12, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileDescriptorProto} returns this - */ proto.google.protobuf.FileDescriptorProto.prototype.clearSyntax = function() { - return jspb.Message.setField(this, 12, undefined); + jspb.Message.setField(this, 12, undefined); }; @@ -1755,6 +853,23 @@ proto.google.protobuf.FileDescriptorProto.prototype.hasSyntax = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.DescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.DescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.DescriptorProto.displayName = 'proto.google.protobuf.DescriptorProto'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -1766,15 +881,13 @@ proto.google.protobuf.DescriptorProto.repeatedFields_ = [2,6,3,4,5,8,9,10]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -1784,8 +897,8 @@ proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeI /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.DescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -1793,7 +906,7 @@ proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeI */ proto.google.protobuf.DescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + name: jspb.Message.getField(msg, 1), fieldList: jspb.Message.toObjectList(msg.getFieldList(), proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), extensionList: jspb.Message.toObjectList(msg.getExtensionList(), @@ -1809,7 +922,7 @@ proto.google.protobuf.DescriptorProto.toObject = function(includeInstance, msg) options: (f = msg.getOptions()) && proto.google.protobuf.MessageOptions.toObject(includeInstance, f), reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), proto.google.protobuf.DescriptorProto.ReservedRange.toObject, includeInstance), - reservedNameList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f + reservedNameList: jspb.Message.getRepeatedField(msg, 10) }; if (includeInstance) { @@ -2005,19 +1118,34 @@ proto.google.protobuf.DescriptorProto.serializeBinaryToWriter = function(message +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.DescriptorProto.ExtensionRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto.ExtensionRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.DescriptorProto.ExtensionRange.displayName = 'proto.google.protobuf.DescriptorProto.ExtensionRange'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = function(opt_includeInstance) { @@ -2027,8 +1155,8 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = functi /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} msg The msg instance to transform. * @return {!Object} @@ -2036,8 +1164,8 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = functi */ proto.google.protobuf.DescriptorProto.ExtensionRange.toObject = function(includeInstance, msg) { var f, obj = { - start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, - end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + start: jspb.Message.getField(msg, 1), + end: jspb.Message.getField(msg, 2), options: (f = msg.getOptions()) && proto.google.protobuf.ExtensionRangeOptions.toObject(includeInstance, f) }; @@ -2151,21 +1279,14 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getStart = functi }; -/** - * @param {number} value - * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this - */ +/** @param {number} value */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setStart = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this - */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearStart = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -2187,21 +1308,14 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getEnd = function }; -/** - * @param {number} value - * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this - */ +/** @param {number} value */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setEnd = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this - */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearEnd = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -2224,21 +1338,14 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getOptions = func }; -/** - * @param {?proto.google.protobuf.ExtensionRangeOptions|undefined} value - * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this -*/ +/** @param {?proto.google.protobuf.ExtensionRangeOptions|undefined} value */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setOptions = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this - */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearOptions = function() { - return this.setOptions(undefined); + this.setOptions(undefined); }; @@ -2252,19 +1359,34 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasOptions = func +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.DescriptorProto.ReservedRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto.ReservedRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.DescriptorProto.ReservedRange.displayName = 'proto.google.protobuf.DescriptorProto.ReservedRange'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = function(opt_includeInstance) { @@ -2274,8 +1396,8 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = functio /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} msg The msg instance to transform. * @return {!Object} @@ -2283,8 +1405,8 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = functio */ proto.google.protobuf.DescriptorProto.ReservedRange.toObject = function(includeInstance, msg) { var f, obj = { - start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, - end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f + start: jspb.Message.getField(msg, 1), + end: jspb.Message.getField(msg, 2) }; if (includeInstance) { @@ -2384,21 +1506,14 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getStart = functio }; -/** - * @param {number} value - * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this - */ +/** @param {number} value */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setStart = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this - */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearStart = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -2420,21 +1535,14 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getEnd = function( }; -/** - * @param {number} value - * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this - */ +/** @param {number} value */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setEnd = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this - */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearEnd = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -2456,21 +1564,14 @@ proto.google.protobuf.DescriptorProto.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.DescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.DescriptorProto.prototype.setName = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.DescriptorProto} returns this - */ proto.google.protobuf.DescriptorProto.prototype.clearName = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -2493,12 +1594,9 @@ proto.google.protobuf.DescriptorProto.prototype.getFieldList = function() { }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.DescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.DescriptorProto.prototype.setFieldList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -2512,12 +1610,8 @@ proto.google.protobuf.DescriptorProto.prototype.addField = function(opt_value, o }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.DescriptorProto} returns this - */ proto.google.protobuf.DescriptorProto.prototype.clearFieldList = function() { - return this.setFieldList([]); + this.setFieldList([]); }; @@ -2531,12 +1625,9 @@ proto.google.protobuf.DescriptorProto.prototype.getExtensionList = function() { }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.DescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.DescriptorProto.prototype.setExtensionList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); + jspb.Message.setRepeatedWrapperField(this, 6, value); }; @@ -2550,12 +1641,8 @@ proto.google.protobuf.DescriptorProto.prototype.addExtension$ = function(opt_val }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.DescriptorProto} returns this - */ proto.google.protobuf.DescriptorProto.prototype.clearExtensionList = function() { - return this.setExtensionList([]); + this.setExtensionList([]); }; @@ -2569,12 +1656,9 @@ proto.google.protobuf.DescriptorProto.prototype.getNestedTypeList = function() { }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.DescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.DescriptorProto.prototype.setNestedTypeList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); + jspb.Message.setRepeatedWrapperField(this, 3, value); }; @@ -2588,12 +1672,8 @@ proto.google.protobuf.DescriptorProto.prototype.addNestedType = function(opt_val }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.DescriptorProto} returns this - */ proto.google.protobuf.DescriptorProto.prototype.clearNestedTypeList = function() { - return this.setNestedTypeList([]); + this.setNestedTypeList([]); }; @@ -2607,12 +1687,9 @@ proto.google.protobuf.DescriptorProto.prototype.getEnumTypeList = function() { }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.DescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.DescriptorProto.prototype.setEnumTypeList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); + jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -2626,12 +1703,8 @@ proto.google.protobuf.DescriptorProto.prototype.addEnumType = function(opt_value }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.DescriptorProto} returns this - */ proto.google.protobuf.DescriptorProto.prototype.clearEnumTypeList = function() { - return this.setEnumTypeList([]); + this.setEnumTypeList([]); }; @@ -2645,12 +1718,9 @@ proto.google.protobuf.DescriptorProto.prototype.getExtensionRangeList = function }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.DescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.DescriptorProto.prototype.setExtensionRangeList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); + jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -2664,12 +1734,8 @@ proto.google.protobuf.DescriptorProto.prototype.addExtensionRange = function(opt }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.DescriptorProto} returns this - */ proto.google.protobuf.DescriptorProto.prototype.clearExtensionRangeList = function() { - return this.setExtensionRangeList([]); + this.setExtensionRangeList([]); }; @@ -2683,12 +1749,9 @@ proto.google.protobuf.DescriptorProto.prototype.getOneofDeclList = function() { }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.DescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.DescriptorProto.prototype.setOneofDeclList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value); + jspb.Message.setRepeatedWrapperField(this, 8, value); }; @@ -2702,12 +1765,8 @@ proto.google.protobuf.DescriptorProto.prototype.addOneofDecl = function(opt_valu }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.DescriptorProto} returns this - */ proto.google.protobuf.DescriptorProto.prototype.clearOneofDeclList = function() { - return this.setOneofDeclList([]); + this.setOneofDeclList([]); }; @@ -2721,21 +1780,14 @@ proto.google.protobuf.DescriptorProto.prototype.getOptions = function() { }; -/** - * @param {?proto.google.protobuf.MessageOptions|undefined} value - * @return {!proto.google.protobuf.DescriptorProto} returns this -*/ +/** @param {?proto.google.protobuf.MessageOptions|undefined} value */ proto.google.protobuf.DescriptorProto.prototype.setOptions = function(value) { - return jspb.Message.setWrapperField(this, 7, value); + jspb.Message.setWrapperField(this, 7, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.google.protobuf.DescriptorProto} returns this - */ proto.google.protobuf.DescriptorProto.prototype.clearOptions = function() { - return this.setOptions(undefined); + this.setOptions(undefined); }; @@ -2758,12 +1810,9 @@ proto.google.protobuf.DescriptorProto.prototype.getReservedRangeList = function( }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.DescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.DescriptorProto.prototype.setReservedRangeList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 9, value); + jspb.Message.setRepeatedWrapperField(this, 9, value); }; @@ -2777,12 +1826,8 @@ proto.google.protobuf.DescriptorProto.prototype.addReservedRange = function(opt_ }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.DescriptorProto} returns this - */ proto.google.protobuf.DescriptorProto.prototype.clearReservedRangeList = function() { - return this.setReservedRangeList([]); + this.setReservedRangeList([]); }; @@ -2795,35 +1840,44 @@ proto.google.protobuf.DescriptorProto.prototype.getReservedNameList = function() }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.DescriptorProto} returns this - */ +/** @param {!Array} value */ proto.google.protobuf.DescriptorProto.prototype.setReservedNameList = function(value) { - return jspb.Message.setField(this, 10, value || []); + jspb.Message.setField(this, 10, value || []); }; /** * @param {string} value * @param {number=} opt_index - * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.addReservedName = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 10, value, opt_index); + jspb.Message.addToRepeatedField(this, 10, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.DescriptorProto} returns this - */ proto.google.protobuf.DescriptorProto.prototype.clearReservedNameList = function() { - return this.setReservedNameList([]); + this.setReservedNameList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ExtensionRangeOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ExtensionRangeOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ExtensionRangeOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.ExtensionRangeOptions.displayName = 'proto.google.protobuf.ExtensionRangeOptions'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -2835,15 +1889,13 @@ proto.google.protobuf.ExtensionRangeOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.ExtensionRangeOptions.prototype.toObject = function(opt_includeInstance) { @@ -2853,8 +1905,8 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.toObject = function(opt_in /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.ExtensionRangeOptions} msg The msg instance to transform. * @return {!Object} @@ -2909,8 +1961,7 @@ proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader = functi msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, - proto.google.protobuf.ExtensionRangeOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.ExtensionRangeOptions.extensionsBinary, proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension, proto.google.protobuf.ExtensionRangeOptions.prototype.setExtension); break; @@ -2963,12 +2014,9 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.getUninterpretedOptionList }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.ExtensionRangeOptions.prototype.setUninterpretedOptionList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 999, value); + jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -2982,29 +2030,70 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.addUninterpretedOption = f }; +proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionList = function() { + this.setUninterpretedOptionList([]); +}; + + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.extensionsBinary = {}; + + /** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionList = function() { - return this.setUninterpretedOptionList([]); +proto.google.protobuf.FieldDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - - - +goog.inherits(proto.google.protobuf.FieldDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.FieldDescriptorProto.displayName = 'proto.google.protobuf.FieldDescriptorProto'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -3014,8 +2103,8 @@ proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_inc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FieldDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -3023,15 +2112,15 @@ proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_inc */ proto.google.protobuf.FieldDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, - number: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, - label: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, - type: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, - typeName: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f, - extendee: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, - defaultValue: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f, - oneofIndex: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f, - jsonName: (f = jspb.Message.getField(msg, 10)) == null ? undefined : f, + name: jspb.Message.getField(msg, 1), + number: jspb.Message.getField(msg, 3), + label: jspb.Message.getField(msg, 4), + type: jspb.Message.getField(msg, 5), + typeName: jspb.Message.getField(msg, 6), + extendee: jspb.Message.getField(msg, 2), + defaultValue: jspb.Message.getField(msg, 7), + oneofIndex: jspb.Message.getField(msg, 9), + jsonName: jspb.Message.getField(msg, 10), options: (f = msg.getOptions()) && proto.google.protobuf.FieldOptions.toObject(includeInstance, f) }; @@ -3255,21 +2344,14 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.FieldDescriptorProto.prototype.setName = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ proto.google.protobuf.FieldDescriptorProto.prototype.clearName = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -3291,21 +2373,14 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getNumber = function() { }; -/** - * @param {number} value - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ +/** @param {number} value */ proto.google.protobuf.FieldDescriptorProto.prototype.setNumber = function(value) { - return jspb.Message.setField(this, 3, value); + jspb.Message.setField(this, 3, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ proto.google.protobuf.FieldDescriptorProto.prototype.clearNumber = function() { - return jspb.Message.setField(this, 3, undefined); + jspb.Message.setField(this, 3, undefined); }; @@ -3327,21 +2402,14 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getLabel = function() { }; -/** - * @param {!proto.google.protobuf.FieldDescriptorProto.Label} value - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ +/** @param {!proto.google.protobuf.FieldDescriptorProto.Label} value */ proto.google.protobuf.FieldDescriptorProto.prototype.setLabel = function(value) { - return jspb.Message.setField(this, 4, value); + jspb.Message.setField(this, 4, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ proto.google.protobuf.FieldDescriptorProto.prototype.clearLabel = function() { - return jspb.Message.setField(this, 4, undefined); + jspb.Message.setField(this, 4, undefined); }; @@ -3363,21 +2431,14 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getType = function() { }; -/** - * @param {!proto.google.protobuf.FieldDescriptorProto.Type} value - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ +/** @param {!proto.google.protobuf.FieldDescriptorProto.Type} value */ proto.google.protobuf.FieldDescriptorProto.prototype.setType = function(value) { - return jspb.Message.setField(this, 5, value); + jspb.Message.setField(this, 5, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ proto.google.protobuf.FieldDescriptorProto.prototype.clearType = function() { - return jspb.Message.setField(this, 5, undefined); + jspb.Message.setField(this, 5, undefined); }; @@ -3399,21 +2460,14 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getTypeName = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.FieldDescriptorProto.prototype.setTypeName = function(value) { - return jspb.Message.setField(this, 6, value); + jspb.Message.setField(this, 6, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ proto.google.protobuf.FieldDescriptorProto.prototype.clearTypeName = function() { - return jspb.Message.setField(this, 6, undefined); + jspb.Message.setField(this, 6, undefined); }; @@ -3435,21 +2489,14 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getExtendee = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.FieldDescriptorProto.prototype.setExtendee = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ proto.google.protobuf.FieldDescriptorProto.prototype.clearExtendee = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -3471,21 +2518,14 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getDefaultValue = function( }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.FieldDescriptorProto.prototype.setDefaultValue = function(value) { - return jspb.Message.setField(this, 7, value); + jspb.Message.setField(this, 7, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ proto.google.protobuf.FieldDescriptorProto.prototype.clearDefaultValue = function() { - return jspb.Message.setField(this, 7, undefined); + jspb.Message.setField(this, 7, undefined); }; @@ -3507,21 +2547,14 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getOneofIndex = function() }; -/** - * @param {number} value - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ +/** @param {number} value */ proto.google.protobuf.FieldDescriptorProto.prototype.setOneofIndex = function(value) { - return jspb.Message.setField(this, 9, value); + jspb.Message.setField(this, 9, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ proto.google.protobuf.FieldDescriptorProto.prototype.clearOneofIndex = function() { - return jspb.Message.setField(this, 9, undefined); + jspb.Message.setField(this, 9, undefined); }; @@ -3543,21 +2576,14 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getJsonName = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.FieldDescriptorProto.prototype.setJsonName = function(value) { - return jspb.Message.setField(this, 10, value); + jspb.Message.setField(this, 10, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ proto.google.protobuf.FieldDescriptorProto.prototype.clearJsonName = function() { - return jspb.Message.setField(this, 10, undefined); + jspb.Message.setField(this, 10, undefined); }; @@ -3580,21 +2606,14 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getOptions = function() { }; -/** - * @param {?proto.google.protobuf.FieldOptions|undefined} value - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this -*/ +/** @param {?proto.google.protobuf.FieldOptions|undefined} value */ proto.google.protobuf.FieldDescriptorProto.prototype.setOptions = function(value) { - return jspb.Message.setWrapperField(this, 8, value); + jspb.Message.setWrapperField(this, 8, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.google.protobuf.FieldDescriptorProto} returns this - */ proto.google.protobuf.FieldDescriptorProto.prototype.clearOptions = function() { - return this.setOptions(undefined); + this.setOptions(undefined); }; @@ -3608,19 +2627,34 @@ proto.google.protobuf.FieldDescriptorProto.prototype.hasOptions = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.OneofDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.OneofDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.OneofDescriptorProto.displayName = 'proto.google.protobuf.OneofDescriptorProto'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -3630,8 +2664,8 @@ proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_inc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.OneofDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -3639,7 +2673,7 @@ proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_inc */ proto.google.protobuf.OneofDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + name: jspb.Message.getField(msg, 1), options: (f = msg.getOptions()) && proto.google.protobuf.OneofOptions.toObject(includeInstance, f) }; @@ -3742,21 +2776,14 @@ proto.google.protobuf.OneofDescriptorProto.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.OneofDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.OneofDescriptorProto.prototype.setName = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.OneofDescriptorProto} returns this - */ proto.google.protobuf.OneofDescriptorProto.prototype.clearName = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -3779,21 +2806,14 @@ proto.google.protobuf.OneofDescriptorProto.prototype.getOptions = function() { }; -/** - * @param {?proto.google.protobuf.OneofOptions|undefined} value - * @return {!proto.google.protobuf.OneofDescriptorProto} returns this -*/ +/** @param {?proto.google.protobuf.OneofOptions|undefined} value */ proto.google.protobuf.OneofDescriptorProto.prototype.setOptions = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.google.protobuf.OneofDescriptorProto} returns this - */ proto.google.protobuf.OneofDescriptorProto.prototype.clearOptions = function() { - return this.setOptions(undefined); + this.setOptions(undefined); }; @@ -3807,6 +2827,23 @@ proto.google.protobuf.OneofDescriptorProto.prototype.hasOptions = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.EnumDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.EnumDescriptorProto.displayName = 'proto.google.protobuf.EnumDescriptorProto'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -3818,15 +2855,13 @@ proto.google.protobuf.EnumDescriptorProto.repeatedFields_ = [2,4,5]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -3836,8 +2871,8 @@ proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_incl /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -3845,13 +2880,13 @@ proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_incl */ proto.google.protobuf.EnumDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + name: jspb.Message.getField(msg, 1), valueList: jspb.Message.toObjectList(msg.getValueList(), proto.google.protobuf.EnumValueDescriptorProto.toObject, includeInstance), options: (f = msg.getOptions()) && proto.google.protobuf.EnumOptions.toObject(includeInstance, f), reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject, includeInstance), - reservedNameList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f + reservedNameList: jspb.Message.getRepeatedField(msg, 5) }; if (includeInstance) { @@ -3982,19 +3017,34 @@ proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter = function(mes +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.displayName = 'proto.google.protobuf.EnumDescriptorProto.EnumReservedRange'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = function(opt_includeInstance) { @@ -4004,8 +3054,8 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} msg The msg instance to transform. * @return {!Object} @@ -4013,8 +3063,8 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject = function(includeInstance, msg) { var f, obj = { - start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, - end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f + start: jspb.Message.getField(msg, 1), + end: jspb.Message.getField(msg, 2) }; if (includeInstance) { @@ -4114,21 +3164,14 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getStart = }; -/** - * @param {number} value - * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this - */ +/** @param {number} value */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setStart = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this - */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearStart = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -4150,21 +3193,14 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getEnd = f }; -/** - * @param {number} value - * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this - */ +/** @param {number} value */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setEnd = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this - */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearEnd = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -4186,21 +3222,14 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.EnumDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.EnumDescriptorProto.prototype.setName = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.EnumDescriptorProto} returns this - */ proto.google.protobuf.EnumDescriptorProto.prototype.clearName = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -4223,12 +3252,9 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getValueList = function() { }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.EnumDescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.EnumDescriptorProto.prototype.setValueList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -4242,12 +3268,8 @@ proto.google.protobuf.EnumDescriptorProto.prototype.addValue = function(opt_valu }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.EnumDescriptorProto} returns this - */ proto.google.protobuf.EnumDescriptorProto.prototype.clearValueList = function() { - return this.setValueList([]); + this.setValueList([]); }; @@ -4261,21 +3283,14 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getOptions = function() { }; -/** - * @param {?proto.google.protobuf.EnumOptions|undefined} value - * @return {!proto.google.protobuf.EnumDescriptorProto} returns this -*/ +/** @param {?proto.google.protobuf.EnumOptions|undefined} value */ proto.google.protobuf.EnumDescriptorProto.prototype.setOptions = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.google.protobuf.EnumDescriptorProto} returns this - */ proto.google.protobuf.EnumDescriptorProto.prototype.clearOptions = function() { - return this.setOptions(undefined); + this.setOptions(undefined); }; @@ -4298,12 +3313,9 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getReservedRangeList = funct }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.EnumDescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.EnumDescriptorProto.prototype.setReservedRangeList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); + jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -4317,12 +3329,8 @@ proto.google.protobuf.EnumDescriptorProto.prototype.addReservedRange = function( }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.EnumDescriptorProto} returns this - */ proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedRangeList = function() { - return this.setReservedRangeList([]); + this.setReservedRangeList([]); }; @@ -4335,48 +3343,55 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getReservedNameList = functi }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.EnumDescriptorProto} returns this - */ +/** @param {!Array} value */ proto.google.protobuf.EnumDescriptorProto.prototype.setReservedNameList = function(value) { - return jspb.Message.setField(this, 5, value || []); + jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index - * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.addReservedName = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 5, value, opt_index); + jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.EnumDescriptorProto} returns this - */ proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedNameList = function() { - return this.setReservedNameList([]); + this.setReservedNameList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumValueDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.EnumValueDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.EnumValueDescriptorProto.displayName = 'proto.google.protobuf.EnumValueDescriptorProto'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -4386,8 +3401,8 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumValueDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -4395,8 +3410,8 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt */ proto.google.protobuf.EnumValueDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, - number: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + name: jspb.Message.getField(msg, 1), + number: jspb.Message.getField(msg, 2), options: (f = msg.getOptions()) && proto.google.protobuf.EnumValueOptions.toObject(includeInstance, f) }; @@ -4510,21 +3525,14 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.EnumValueDescriptorProto.prototype.setName = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this - */ proto.google.protobuf.EnumValueDescriptorProto.prototype.clearName = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -4546,21 +3554,14 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.getNumber = function() }; -/** - * @param {number} value - * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this - */ +/** @param {number} value */ proto.google.protobuf.EnumValueDescriptorProto.prototype.setNumber = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this - */ proto.google.protobuf.EnumValueDescriptorProto.prototype.clearNumber = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -4583,21 +3584,14 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.getOptions = function() }; -/** - * @param {?proto.google.protobuf.EnumValueOptions|undefined} value - * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this -*/ +/** @param {?proto.google.protobuf.EnumValueOptions|undefined} value */ proto.google.protobuf.EnumValueDescriptorProto.prototype.setOptions = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this - */ proto.google.protobuf.EnumValueDescriptorProto.prototype.clearOptions = function() { - return this.setOptions(undefined); + this.setOptions(undefined); }; @@ -4611,6 +3605,23 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.hasOptions = function() +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ServiceDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ServiceDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ServiceDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.ServiceDescriptorProto.displayName = 'proto.google.protobuf.ServiceDescriptorProto'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -4622,15 +3633,13 @@ proto.google.protobuf.ServiceDescriptorProto.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -4640,8 +3649,8 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_i /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.ServiceDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -4649,7 +3658,7 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_i */ proto.google.protobuf.ServiceDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + name: jspb.Message.getField(msg, 1), methodList: jspb.Message.toObjectList(msg.getMethodList(), proto.google.protobuf.MethodDescriptorProto.toObject, includeInstance), options: (f = msg.getOptions()) && proto.google.protobuf.ServiceOptions.toObject(includeInstance, f) @@ -4767,21 +3776,14 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.ServiceDescriptorProto.prototype.setName = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this - */ proto.google.protobuf.ServiceDescriptorProto.prototype.clearName = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -4804,12 +3806,9 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.getMethodList = function( }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.ServiceDescriptorProto.prototype.setMethodList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -4823,12 +3822,8 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.addMethod = function(opt_ }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this - */ proto.google.protobuf.ServiceDescriptorProto.prototype.clearMethodList = function() { - return this.setMethodList([]); + this.setMethodList([]); }; @@ -4842,21 +3837,14 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.getOptions = function() { }; -/** - * @param {?proto.google.protobuf.ServiceOptions|undefined} value - * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this -*/ +/** @param {?proto.google.protobuf.ServiceOptions|undefined} value */ proto.google.protobuf.ServiceDescriptorProto.prototype.setOptions = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this - */ proto.google.protobuf.ServiceDescriptorProto.prototype.clearOptions = function() { - return this.setOptions(undefined); + this.setOptions(undefined); }; @@ -4870,19 +3858,34 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.hasOptions = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.MethodDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.MethodDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.MethodDescriptorProto.displayName = 'proto.google.protobuf.MethodDescriptorProto'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -4892,8 +3895,8 @@ proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_in /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.MethodDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -4901,12 +3904,12 @@ proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_in */ proto.google.protobuf.MethodDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, - inputType: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, - outputType: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + name: jspb.Message.getField(msg, 1), + inputType: jspb.Message.getField(msg, 2), + outputType: jspb.Message.getField(msg, 3), options: (f = msg.getOptions()) && proto.google.protobuf.MethodOptions.toObject(includeInstance, f), - clientStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - serverStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + clientStreaming: jspb.Message.getFieldWithDefault(msg, 5, false), + serverStreaming: jspb.Message.getFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -5052,21 +4055,14 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.MethodDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.MethodDescriptorProto.prototype.setName = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.MethodDescriptorProto} returns this - */ proto.google.protobuf.MethodDescriptorProto.prototype.clearName = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -5088,21 +4084,14 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getInputType = function() }; -/** - * @param {string} value - * @return {!proto.google.protobuf.MethodDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.MethodDescriptorProto.prototype.setInputType = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.MethodDescriptorProto} returns this - */ proto.google.protobuf.MethodDescriptorProto.prototype.clearInputType = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -5124,21 +4113,14 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getOutputType = function() }; -/** - * @param {string} value - * @return {!proto.google.protobuf.MethodDescriptorProto} returns this - */ +/** @param {string} value */ proto.google.protobuf.MethodDescriptorProto.prototype.setOutputType = function(value) { - return jspb.Message.setField(this, 3, value); + jspb.Message.setField(this, 3, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.MethodDescriptorProto} returns this - */ proto.google.protobuf.MethodDescriptorProto.prototype.clearOutputType = function() { - return jspb.Message.setField(this, 3, undefined); + jspb.Message.setField(this, 3, undefined); }; @@ -5161,21 +4143,14 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getOptions = function() { }; -/** - * @param {?proto.google.protobuf.MethodOptions|undefined} value - * @return {!proto.google.protobuf.MethodDescriptorProto} returns this -*/ +/** @param {?proto.google.protobuf.MethodOptions|undefined} value */ proto.google.protobuf.MethodDescriptorProto.prototype.setOptions = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + jspb.Message.setWrapperField(this, 4, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.google.protobuf.MethodDescriptorProto} returns this - */ proto.google.protobuf.MethodDescriptorProto.prototype.clearOptions = function() { - return this.setOptions(undefined); + this.setOptions(undefined); }; @@ -5190,28 +4165,23 @@ proto.google.protobuf.MethodDescriptorProto.prototype.hasOptions = function() { /** * optional bool client_streaming = 5; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MethodDescriptorProto.prototype.getClientStreaming = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.MethodDescriptorProto} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.MethodDescriptorProto.prototype.setClientStreaming = function(value) { - return jspb.Message.setField(this, 5, value); + jspb.Message.setField(this, 5, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.MethodDescriptorProto} returns this - */ proto.google.protobuf.MethodDescriptorProto.prototype.clearClientStreaming = function() { - return jspb.Message.setField(this, 5, undefined); + jspb.Message.setField(this, 5, undefined); }; @@ -5226,28 +4196,23 @@ proto.google.protobuf.MethodDescriptorProto.prototype.hasClientStreaming = funct /** * optional bool server_streaming = 6; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MethodDescriptorProto.prototype.getServerStreaming = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.MethodDescriptorProto} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.MethodDescriptorProto.prototype.setServerStreaming = function(value) { - return jspb.Message.setField(this, 6, value); + jspb.Message.setField(this, 6, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.MethodDescriptorProto} returns this - */ proto.google.protobuf.MethodDescriptorProto.prototype.clearServerStreaming = function() { - return jspb.Message.setField(this, 6, undefined); + jspb.Message.setField(this, 6, undefined); }; @@ -5261,6 +4226,23 @@ proto.google.protobuf.MethodDescriptorProto.prototype.hasServerStreaming = funct +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FileOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FileOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.FileOptions.displayName = 'proto.google.protobuf.FileOptions'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -5272,15 +4254,13 @@ proto.google.protobuf.FileOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInstance) { @@ -5290,8 +4270,8 @@ proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FileOptions} msg The msg instance to transform. * @return {!Object} @@ -5299,26 +4279,26 @@ proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInsta */ proto.google.protobuf.FileOptions.toObject = function(includeInstance, msg) { var f, obj = { - javaPackage: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, - javaOuterClassname: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f, - javaMultipleFiles: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), - javaGenerateEqualsAndHash: (f = jspb.Message.getBooleanField(msg, 20)) == null ? undefined : f, - javaStringCheckUtf8: jspb.Message.getBooleanFieldWithDefault(msg, 27, false), + javaPackage: jspb.Message.getField(msg, 1), + javaOuterClassname: jspb.Message.getField(msg, 8), + javaMultipleFiles: jspb.Message.getFieldWithDefault(msg, 10, false), + javaGenerateEqualsAndHash: jspb.Message.getField(msg, 20), + javaStringCheckUtf8: jspb.Message.getFieldWithDefault(msg, 27, false), optimizeFor: jspb.Message.getFieldWithDefault(msg, 9, 1), - goPackage: (f = jspb.Message.getField(msg, 11)) == null ? undefined : f, - ccGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), - javaGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), - pyGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), - phpGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 42, false), - deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 23, false), - ccEnableArenas: jspb.Message.getBooleanFieldWithDefault(msg, 31, false), - objcClassPrefix: (f = jspb.Message.getField(msg, 36)) == null ? undefined : f, - csharpNamespace: (f = jspb.Message.getField(msg, 37)) == null ? undefined : f, - swiftPrefix: (f = jspb.Message.getField(msg, 39)) == null ? undefined : f, - phpClassPrefix: (f = jspb.Message.getField(msg, 40)) == null ? undefined : f, - phpNamespace: (f = jspb.Message.getField(msg, 41)) == null ? undefined : f, - phpMetadataNamespace: (f = jspb.Message.getField(msg, 44)) == null ? undefined : f, - rubyPackage: (f = jspb.Message.getField(msg, 45)) == null ? undefined : f, + goPackage: jspb.Message.getField(msg, 11), + ccGenericServices: jspb.Message.getFieldWithDefault(msg, 16, false), + javaGenericServices: jspb.Message.getFieldWithDefault(msg, 17, false), + pyGenericServices: jspb.Message.getFieldWithDefault(msg, 18, false), + phpGenericServices: jspb.Message.getFieldWithDefault(msg, 42, false), + deprecated: jspb.Message.getFieldWithDefault(msg, 23, false), + ccEnableArenas: jspb.Message.getFieldWithDefault(msg, 31, false), + objcClassPrefix: jspb.Message.getField(msg, 36), + csharpNamespace: jspb.Message.getField(msg, 37), + swiftPrefix: jspb.Message.getField(msg, 39), + phpClassPrefix: jspb.Message.getField(msg, 40), + phpNamespace: jspb.Message.getField(msg, 41), + phpMetadataNamespace: jspb.Message.getField(msg, 44), + rubyPackage: jspb.Message.getField(msg, 45), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -5446,8 +4426,7 @@ proto.google.protobuf.FileOptions.deserializeBinaryFromReader = function(msg, re msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, - proto.google.protobuf.FileOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.FileOptions.extensionsBinary, proto.google.protobuf.FileOptions.prototype.getExtension, proto.google.protobuf.FileOptions.prototype.setExtension); break; @@ -5648,21 +4627,14 @@ proto.google.protobuf.FileOptions.prototype.getJavaPackage = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileOptions.prototype.setJavaPackage = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearJavaPackage = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -5684,21 +4656,14 @@ proto.google.protobuf.FileOptions.prototype.getJavaOuterClassname = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileOptions.prototype.setJavaOuterClassname = function(value) { - return jspb.Message.setField(this, 8, value); + jspb.Message.setField(this, 8, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearJavaOuterClassname = function() { - return jspb.Message.setField(this, 8, undefined); + jspb.Message.setField(this, 8, undefined); }; @@ -5713,28 +4678,23 @@ proto.google.protobuf.FileOptions.prototype.hasJavaOuterClassname = function() { /** * optional bool java_multiple_files = 10; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaMultipleFiles = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FileOptions.prototype.setJavaMultipleFiles = function(value) { - return jspb.Message.setField(this, 10, value); + jspb.Message.setField(this, 10, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearJavaMultipleFiles = function() { - return jspb.Message.setField(this, 10, undefined); + jspb.Message.setField(this, 10, undefined); }; @@ -5749,28 +4709,23 @@ proto.google.protobuf.FileOptions.prototype.hasJavaMultipleFiles = function() { /** * optional bool java_generate_equals_and_hash = 20; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaGenerateEqualsAndHash = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 20, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 20, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FileOptions.prototype.setJavaGenerateEqualsAndHash = function(value) { - return jspb.Message.setField(this, 20, value); + jspb.Message.setField(this, 20, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearJavaGenerateEqualsAndHash = function() { - return jspb.Message.setField(this, 20, undefined); + jspb.Message.setField(this, 20, undefined); }; @@ -5785,28 +4740,23 @@ proto.google.protobuf.FileOptions.prototype.hasJavaGenerateEqualsAndHash = funct /** * optional bool java_string_check_utf8 = 27; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaStringCheckUtf8 = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 27, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 27, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FileOptions.prototype.setJavaStringCheckUtf8 = function(value) { - return jspb.Message.setField(this, 27, value); + jspb.Message.setField(this, 27, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearJavaStringCheckUtf8 = function() { - return jspb.Message.setField(this, 27, undefined); + jspb.Message.setField(this, 27, undefined); }; @@ -5828,21 +4778,14 @@ proto.google.protobuf.FileOptions.prototype.getOptimizeFor = function() { }; -/** - * @param {!proto.google.protobuf.FileOptions.OptimizeMode} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {!proto.google.protobuf.FileOptions.OptimizeMode} value */ proto.google.protobuf.FileOptions.prototype.setOptimizeFor = function(value) { - return jspb.Message.setField(this, 9, value); + jspb.Message.setField(this, 9, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearOptimizeFor = function() { - return jspb.Message.setField(this, 9, undefined); + jspb.Message.setField(this, 9, undefined); }; @@ -5864,21 +4807,14 @@ proto.google.protobuf.FileOptions.prototype.getGoPackage = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileOptions.prototype.setGoPackage = function(value) { - return jspb.Message.setField(this, 11, value); + jspb.Message.setField(this, 11, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearGoPackage = function() { - return jspb.Message.setField(this, 11, undefined); + jspb.Message.setField(this, 11, undefined); }; @@ -5893,28 +4829,23 @@ proto.google.protobuf.FileOptions.prototype.hasGoPackage = function() { /** * optional bool cc_generic_services = 16; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getCcGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 16, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FileOptions.prototype.setCcGenericServices = function(value) { - return jspb.Message.setField(this, 16, value); + jspb.Message.setField(this, 16, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearCcGenericServices = function() { - return jspb.Message.setField(this, 16, undefined); + jspb.Message.setField(this, 16, undefined); }; @@ -5929,28 +4860,23 @@ proto.google.protobuf.FileOptions.prototype.hasCcGenericServices = function() { /** * optional bool java_generic_services = 17; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 17, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FileOptions.prototype.setJavaGenericServices = function(value) { - return jspb.Message.setField(this, 17, value); + jspb.Message.setField(this, 17, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearJavaGenericServices = function() { - return jspb.Message.setField(this, 17, undefined); + jspb.Message.setField(this, 17, undefined); }; @@ -5965,28 +4891,23 @@ proto.google.protobuf.FileOptions.prototype.hasJavaGenericServices = function() /** * optional bool py_generic_services = 18; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getPyGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FileOptions.prototype.setPyGenericServices = function(value) { - return jspb.Message.setField(this, 18, value); + jspb.Message.setField(this, 18, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearPyGenericServices = function() { - return jspb.Message.setField(this, 18, undefined); + jspb.Message.setField(this, 18, undefined); }; @@ -6001,28 +4922,23 @@ proto.google.protobuf.FileOptions.prototype.hasPyGenericServices = function() { /** * optional bool php_generic_services = 42; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getPhpGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 42, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 42, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FileOptions.prototype.setPhpGenericServices = function(value) { - return jspb.Message.setField(this, 42, value); + jspb.Message.setField(this, 42, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearPhpGenericServices = function() { - return jspb.Message.setField(this, 42, undefined); + jspb.Message.setField(this, 42, undefined); }; @@ -6037,28 +4953,23 @@ proto.google.protobuf.FileOptions.prototype.hasPhpGenericServices = function() { /** * optional bool deprecated = 23; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 23, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 23, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FileOptions.prototype.setDeprecated = function(value) { - return jspb.Message.setField(this, 23, value); + jspb.Message.setField(this, 23, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearDeprecated = function() { - return jspb.Message.setField(this, 23, undefined); + jspb.Message.setField(this, 23, undefined); }; @@ -6073,28 +4984,23 @@ proto.google.protobuf.FileOptions.prototype.hasDeprecated = function() { /** * optional bool cc_enable_arenas = 31; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getCcEnableArenas = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 31, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 31, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FileOptions.prototype.setCcEnableArenas = function(value) { - return jspb.Message.setField(this, 31, value); + jspb.Message.setField(this, 31, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearCcEnableArenas = function() { - return jspb.Message.setField(this, 31, undefined); + jspb.Message.setField(this, 31, undefined); }; @@ -6116,21 +5022,14 @@ proto.google.protobuf.FileOptions.prototype.getObjcClassPrefix = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileOptions.prototype.setObjcClassPrefix = function(value) { - return jspb.Message.setField(this, 36, value); + jspb.Message.setField(this, 36, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearObjcClassPrefix = function() { - return jspb.Message.setField(this, 36, undefined); + jspb.Message.setField(this, 36, undefined); }; @@ -6152,21 +5051,14 @@ proto.google.protobuf.FileOptions.prototype.getCsharpNamespace = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileOptions.prototype.setCsharpNamespace = function(value) { - return jspb.Message.setField(this, 37, value); + jspb.Message.setField(this, 37, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearCsharpNamespace = function() { - return jspb.Message.setField(this, 37, undefined); + jspb.Message.setField(this, 37, undefined); }; @@ -6188,21 +5080,14 @@ proto.google.protobuf.FileOptions.prototype.getSwiftPrefix = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileOptions.prototype.setSwiftPrefix = function(value) { - return jspb.Message.setField(this, 39, value); + jspb.Message.setField(this, 39, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearSwiftPrefix = function() { - return jspb.Message.setField(this, 39, undefined); + jspb.Message.setField(this, 39, undefined); }; @@ -6224,21 +5109,14 @@ proto.google.protobuf.FileOptions.prototype.getPhpClassPrefix = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileOptions.prototype.setPhpClassPrefix = function(value) { - return jspb.Message.setField(this, 40, value); + jspb.Message.setField(this, 40, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearPhpClassPrefix = function() { - return jspb.Message.setField(this, 40, undefined); + jspb.Message.setField(this, 40, undefined); }; @@ -6260,21 +5138,14 @@ proto.google.protobuf.FileOptions.prototype.getPhpNamespace = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileOptions.prototype.setPhpNamespace = function(value) { - return jspb.Message.setField(this, 41, value); + jspb.Message.setField(this, 41, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearPhpNamespace = function() { - return jspb.Message.setField(this, 41, undefined); + jspb.Message.setField(this, 41, undefined); }; @@ -6296,21 +5167,14 @@ proto.google.protobuf.FileOptions.prototype.getPhpMetadataNamespace = function() }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileOptions.prototype.setPhpMetadataNamespace = function(value) { - return jspb.Message.setField(this, 44, value); + jspb.Message.setField(this, 44, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearPhpMetadataNamespace = function() { - return jspb.Message.setField(this, 44, undefined); + jspb.Message.setField(this, 44, undefined); }; @@ -6332,21 +5196,14 @@ proto.google.protobuf.FileOptions.prototype.getRubyPackage = function() { }; -/** - * @param {string} value - * @return {!proto.google.protobuf.FileOptions} returns this - */ +/** @param {string} value */ proto.google.protobuf.FileOptions.prototype.setRubyPackage = function(value) { - return jspb.Message.setField(this, 45, value); + jspb.Message.setField(this, 45, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearRubyPackage = function() { - return jspb.Message.setField(this, 45, undefined); + jspb.Message.setField(this, 45, undefined); }; @@ -6369,12 +5226,9 @@ proto.google.protobuf.FileOptions.prototype.getUninterpretedOptionList = functio }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.FileOptions} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.FileOptions.prototype.setUninterpretedOptionList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 999, value); + jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -6388,16 +5242,59 @@ proto.google.protobuf.FileOptions.prototype.addUninterpretedOption = function(op }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.FileOptions} returns this - */ proto.google.protobuf.FileOptions.prototype.clearUninterpretedOptionList = function() { - return this.setUninterpretedOptionList([]); + this.setUninterpretedOptionList([]); }; +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FileOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FileOptions.extensionsBinary = {}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.MessageOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MessageOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.MessageOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.MessageOptions.displayName = 'proto.google.protobuf.MessageOptions'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -6409,15 +5306,13 @@ proto.google.protobuf.MessageOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeInstance) { @@ -6427,8 +5322,8 @@ proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeIn /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.MessageOptions} msg The msg instance to transform. * @return {!Object} @@ -6436,10 +5331,10 @@ proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeIn */ proto.google.protobuf.MessageOptions.toObject = function(includeInstance, msg) { var f, obj = { - messageSetWireFormat: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - noStandardDescriptorAccessor: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - mapEntry: (f = jspb.Message.getBooleanField(msg, 7)) == null ? undefined : f, + messageSetWireFormat: jspb.Message.getFieldWithDefault(msg, 1, false), + noStandardDescriptorAccessor: jspb.Message.getFieldWithDefault(msg, 2, false), + deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), + mapEntry: jspb.Message.getField(msg, 7), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -6503,8 +5398,7 @@ proto.google.protobuf.MessageOptions.deserializeBinaryFromReader = function(msg, msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, - proto.google.protobuf.MessageOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.MessageOptions.extensionsBinary, proto.google.protobuf.MessageOptions.prototype.getExtension, proto.google.protobuf.MessageOptions.prototype.setExtension); break; @@ -6577,28 +5471,23 @@ proto.google.protobuf.MessageOptions.serializeBinaryToWriter = function(message, /** * optional bool message_set_wire_format = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getMessageSetWireFormat = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.MessageOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.MessageOptions.prototype.setMessageSetWireFormat = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.MessageOptions} returns this - */ proto.google.protobuf.MessageOptions.prototype.clearMessageSetWireFormat = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -6613,28 +5502,23 @@ proto.google.protobuf.MessageOptions.prototype.hasMessageSetWireFormat = functio /** * optional bool no_standard_descriptor_accessor = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getNoStandardDescriptorAccessor = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.MessageOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.MessageOptions.prototype.setNoStandardDescriptorAccessor = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.MessageOptions} returns this - */ proto.google.protobuf.MessageOptions.prototype.clearNoStandardDescriptorAccessor = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -6649,28 +5533,23 @@ proto.google.protobuf.MessageOptions.prototype.hasNoStandardDescriptorAccessor = /** * optional bool deprecated = 3; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.MessageOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.MessageOptions.prototype.setDeprecated = function(value) { - return jspb.Message.setField(this, 3, value); + jspb.Message.setField(this, 3, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.MessageOptions} returns this - */ proto.google.protobuf.MessageOptions.prototype.clearDeprecated = function() { - return jspb.Message.setField(this, 3, undefined); + jspb.Message.setField(this, 3, undefined); }; @@ -6685,28 +5564,23 @@ proto.google.protobuf.MessageOptions.prototype.hasDeprecated = function() { /** * optional bool map_entry = 7; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getMapEntry = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 7, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.MessageOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.MessageOptions.prototype.setMapEntry = function(value) { - return jspb.Message.setField(this, 7, value); + jspb.Message.setField(this, 7, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.MessageOptions} returns this - */ proto.google.protobuf.MessageOptions.prototype.clearMapEntry = function() { - return jspb.Message.setField(this, 7, undefined); + jspb.Message.setField(this, 7, undefined); }; @@ -6729,12 +5603,9 @@ proto.google.protobuf.MessageOptions.prototype.getUninterpretedOptionList = func }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.MessageOptions} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.MessageOptions.prototype.setUninterpretedOptionList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 999, value); + jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -6748,16 +5619,59 @@ proto.google.protobuf.MessageOptions.prototype.addUninterpretedOption = function }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.MessageOptions} returns this - */ proto.google.protobuf.MessageOptions.prototype.clearUninterpretedOptionList = function() { - return this.setUninterpretedOptionList([]); + this.setUninterpretedOptionList([]); }; +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MessageOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MessageOptions.extensionsBinary = {}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FieldOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FieldOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FieldOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.FieldOptions.displayName = 'proto.google.protobuf.FieldOptions'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -6769,15 +5683,13 @@ proto.google.protobuf.FieldOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInstance) { @@ -6787,8 +5699,8 @@ proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FieldOptions} msg The msg instance to transform. * @return {!Object} @@ -6797,11 +5709,11 @@ proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInst proto.google.protobuf.FieldOptions.toObject = function(includeInstance, msg) { var f, obj = { ctype: jspb.Message.getFieldWithDefault(msg, 1, 0), - packed: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, + packed: jspb.Message.getField(msg, 2), jstype: jspb.Message.getFieldWithDefault(msg, 6, 0), - lazy: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - weak: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + lazy: jspb.Message.getFieldWithDefault(msg, 5, false), + deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), + weak: jspb.Message.getFieldWithDefault(msg, 10, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -6873,8 +5785,7 @@ proto.google.protobuf.FieldOptions.deserializeBinaryFromReader = function(msg, r msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, - proto.google.protobuf.FieldOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.FieldOptions.extensionsBinary, proto.google.protobuf.FieldOptions.prototype.getExtension, proto.google.protobuf.FieldOptions.prototype.setExtension); break; @@ -6986,21 +5897,14 @@ proto.google.protobuf.FieldOptions.prototype.getCtype = function() { }; -/** - * @param {!proto.google.protobuf.FieldOptions.CType} value - * @return {!proto.google.protobuf.FieldOptions} returns this - */ +/** @param {!proto.google.protobuf.FieldOptions.CType} value */ proto.google.protobuf.FieldOptions.prototype.setCtype = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldOptions} returns this - */ proto.google.protobuf.FieldOptions.prototype.clearCtype = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -7015,28 +5919,23 @@ proto.google.protobuf.FieldOptions.prototype.hasCtype = function() { /** * optional bool packed = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getPacked = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FieldOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FieldOptions.prototype.setPacked = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldOptions} returns this - */ proto.google.protobuf.FieldOptions.prototype.clearPacked = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -7058,21 +5957,14 @@ proto.google.protobuf.FieldOptions.prototype.getJstype = function() { }; -/** - * @param {!proto.google.protobuf.FieldOptions.JSType} value - * @return {!proto.google.protobuf.FieldOptions} returns this - */ +/** @param {!proto.google.protobuf.FieldOptions.JSType} value */ proto.google.protobuf.FieldOptions.prototype.setJstype = function(value) { - return jspb.Message.setField(this, 6, value); + jspb.Message.setField(this, 6, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldOptions} returns this - */ proto.google.protobuf.FieldOptions.prototype.clearJstype = function() { - return jspb.Message.setField(this, 6, undefined); + jspb.Message.setField(this, 6, undefined); }; @@ -7087,28 +5979,23 @@ proto.google.protobuf.FieldOptions.prototype.hasJstype = function() { /** * optional bool lazy = 5; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getLazy = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FieldOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FieldOptions.prototype.setLazy = function(value) { - return jspb.Message.setField(this, 5, value); + jspb.Message.setField(this, 5, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldOptions} returns this - */ proto.google.protobuf.FieldOptions.prototype.clearLazy = function() { - return jspb.Message.setField(this, 5, undefined); + jspb.Message.setField(this, 5, undefined); }; @@ -7123,28 +6010,23 @@ proto.google.protobuf.FieldOptions.prototype.hasLazy = function() { /** * optional bool deprecated = 3; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FieldOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FieldOptions.prototype.setDeprecated = function(value) { - return jspb.Message.setField(this, 3, value); + jspb.Message.setField(this, 3, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldOptions} returns this - */ proto.google.protobuf.FieldOptions.prototype.clearDeprecated = function() { - return jspb.Message.setField(this, 3, undefined); + jspb.Message.setField(this, 3, undefined); }; @@ -7159,28 +6041,23 @@ proto.google.protobuf.FieldOptions.prototype.hasDeprecated = function() { /** * optional bool weak = 10; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getWeak = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.FieldOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.FieldOptions.prototype.setWeak = function(value) { - return jspb.Message.setField(this, 10, value); + jspb.Message.setField(this, 10, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.FieldOptions} returns this - */ proto.google.protobuf.FieldOptions.prototype.clearWeak = function() { - return jspb.Message.setField(this, 10, undefined); + jspb.Message.setField(this, 10, undefined); }; @@ -7203,12 +6080,9 @@ proto.google.protobuf.FieldOptions.prototype.getUninterpretedOptionList = functi }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.FieldOptions} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.FieldOptions.prototype.setUninterpretedOptionList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 999, value); + jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7222,16 +6096,59 @@ proto.google.protobuf.FieldOptions.prototype.addUninterpretedOption = function(o }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.FieldOptions} returns this - */ proto.google.protobuf.FieldOptions.prototype.clearUninterpretedOptionList = function() { - return this.setUninterpretedOptionList([]); + this.setUninterpretedOptionList([]); }; +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FieldOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FieldOptions.extensionsBinary = {}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.OneofOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.OneofOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.OneofOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.OneofOptions.displayName = 'proto.google.protobuf.OneofOptions'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -7243,15 +6160,13 @@ proto.google.protobuf.OneofOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.OneofOptions.prototype.toObject = function(opt_includeInstance) { @@ -7261,8 +6176,8 @@ proto.google.protobuf.OneofOptions.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.OneofOptions} msg The msg instance to transform. * @return {!Object} @@ -7317,8 +6232,7 @@ proto.google.protobuf.OneofOptions.deserializeBinaryFromReader = function(msg, r msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, - proto.google.protobuf.OneofOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.OneofOptions.extensionsBinary, proto.google.protobuf.OneofOptions.prototype.getExtension, proto.google.protobuf.OneofOptions.prototype.setExtension); break; @@ -7371,12 +6285,9 @@ proto.google.protobuf.OneofOptions.prototype.getUninterpretedOptionList = functi }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.OneofOptions} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.OneofOptions.prototype.setUninterpretedOptionList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 999, value); + jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7390,16 +6301,59 @@ proto.google.protobuf.OneofOptions.prototype.addUninterpretedOption = function(o }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.OneofOptions} returns this - */ proto.google.protobuf.OneofOptions.prototype.clearUninterpretedOptionList = function() { - return this.setUninterpretedOptionList([]); + this.setUninterpretedOptionList([]); }; +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.OneofOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.OneofOptions.extensionsBinary = {}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.EnumOptions.displayName = 'proto.google.protobuf.EnumOptions'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -7411,15 +6365,13 @@ proto.google.protobuf.EnumOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInstance) { @@ -7429,8 +6381,8 @@ proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumOptions} msg The msg instance to transform. * @return {!Object} @@ -7438,8 +6390,8 @@ proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInsta */ proto.google.protobuf.EnumOptions.toObject = function(includeInstance, msg) { var f, obj = { - allowAlias: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, - deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + allowAlias: jspb.Message.getField(msg, 2), + deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -7495,8 +6447,7 @@ proto.google.protobuf.EnumOptions.deserializeBinaryFromReader = function(msg, re msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, - proto.google.protobuf.EnumOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.EnumOptions.extensionsBinary, proto.google.protobuf.EnumOptions.prototype.getExtension, proto.google.protobuf.EnumOptions.prototype.setExtension); break; @@ -7555,28 +6506,23 @@ proto.google.protobuf.EnumOptions.serializeBinaryToWriter = function(message, wr /** * optional bool allow_alias = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.EnumOptions.prototype.getAllowAlias = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.EnumOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.EnumOptions.prototype.setAllowAlias = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.EnumOptions} returns this - */ proto.google.protobuf.EnumOptions.prototype.clearAllowAlias = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -7591,28 +6537,23 @@ proto.google.protobuf.EnumOptions.prototype.hasAllowAlias = function() { /** * optional bool deprecated = 3; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.EnumOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.EnumOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.EnumOptions.prototype.setDeprecated = function(value) { - return jspb.Message.setField(this, 3, value); + jspb.Message.setField(this, 3, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.EnumOptions} returns this - */ proto.google.protobuf.EnumOptions.prototype.clearDeprecated = function() { - return jspb.Message.setField(this, 3, undefined); + jspb.Message.setField(this, 3, undefined); }; @@ -7635,12 +6576,9 @@ proto.google.protobuf.EnumOptions.prototype.getUninterpretedOptionList = functio }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.EnumOptions} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.EnumOptions.prototype.setUninterpretedOptionList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 999, value); + jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7654,16 +6592,59 @@ proto.google.protobuf.EnumOptions.prototype.addUninterpretedOption = function(op }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.EnumOptions} returns this - */ proto.google.protobuf.EnumOptions.prototype.clearUninterpretedOptionList = function() { - return this.setUninterpretedOptionList([]); + this.setUninterpretedOptionList([]); }; +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumOptions.extensionsBinary = {}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumValueOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumValueOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumValueOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.EnumValueOptions.displayName = 'proto.google.protobuf.EnumValueOptions'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -7675,15 +6656,13 @@ proto.google.protobuf.EnumValueOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_includeInstance) { @@ -7693,8 +6672,8 @@ proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_include /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumValueOptions} msg The msg instance to transform. * @return {!Object} @@ -7702,7 +6681,7 @@ proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_include */ proto.google.protobuf.EnumValueOptions.toObject = function(includeInstance, msg) { var f, obj = { - deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + deprecated: jspb.Message.getFieldWithDefault(msg, 1, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -7754,8 +6733,7 @@ proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader = function(ms msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, - proto.google.protobuf.EnumValueOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.EnumValueOptions.extensionsBinary, proto.google.protobuf.EnumValueOptions.prototype.getExtension, proto.google.protobuf.EnumValueOptions.prototype.setExtension); break; @@ -7807,28 +6785,23 @@ proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter = function(messag /** * optional bool deprecated = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.EnumValueOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.EnumValueOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.EnumValueOptions.prototype.setDeprecated = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.EnumValueOptions} returns this - */ proto.google.protobuf.EnumValueOptions.prototype.clearDeprecated = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -7851,12 +6824,9 @@ proto.google.protobuf.EnumValueOptions.prototype.getUninterpretedOptionList = fu }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.EnumValueOptions} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.EnumValueOptions.prototype.setUninterpretedOptionList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 999, value); + jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7870,16 +6840,59 @@ proto.google.protobuf.EnumValueOptions.prototype.addUninterpretedOption = functi }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.EnumValueOptions} returns this - */ proto.google.protobuf.EnumValueOptions.prototype.clearUninterpretedOptionList = function() { - return this.setUninterpretedOptionList([]); + this.setUninterpretedOptionList([]); }; +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumValueOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumValueOptions.extensionsBinary = {}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ServiceOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ServiceOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ServiceOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.ServiceOptions.displayName = 'proto.google.protobuf.ServiceOptions'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -7891,15 +6904,13 @@ proto.google.protobuf.ServiceOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeInstance) { @@ -7909,8 +6920,8 @@ proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeIn /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.ServiceOptions} msg The msg instance to transform. * @return {!Object} @@ -7918,7 +6929,7 @@ proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeIn */ proto.google.protobuf.ServiceOptions.toObject = function(includeInstance, msg) { var f, obj = { - deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false), + deprecated: jspb.Message.getFieldWithDefault(msg, 33, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -7970,8 +6981,7 @@ proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader = function(msg, msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, - proto.google.protobuf.ServiceOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.ServiceOptions.extensionsBinary, proto.google.protobuf.ServiceOptions.prototype.getExtension, proto.google.protobuf.ServiceOptions.prototype.setExtension); break; @@ -8023,28 +7033,23 @@ proto.google.protobuf.ServiceOptions.serializeBinaryToWriter = function(message, /** * optional bool deprecated = 33; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.ServiceOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 33, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.ServiceOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.ServiceOptions.prototype.setDeprecated = function(value) { - return jspb.Message.setField(this, 33, value); + jspb.Message.setField(this, 33, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.ServiceOptions} returns this - */ proto.google.protobuf.ServiceOptions.prototype.clearDeprecated = function() { - return jspb.Message.setField(this, 33, undefined); + jspb.Message.setField(this, 33, undefined); }; @@ -8067,12 +7072,9 @@ proto.google.protobuf.ServiceOptions.prototype.getUninterpretedOptionList = func }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.ServiceOptions} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.ServiceOptions.prototype.setUninterpretedOptionList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 999, value); + jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -8086,16 +7088,59 @@ proto.google.protobuf.ServiceOptions.prototype.addUninterpretedOption = function }; +proto.google.protobuf.ServiceOptions.prototype.clearUninterpretedOptionList = function() { + this.setUninterpretedOptionList([]); +}; + + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ServiceOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ServiceOptions.extensionsBinary = {}; + + /** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.ServiceOptions} returns this + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.google.protobuf.ServiceOptions.prototype.clearUninterpretedOptionList = function() { - return this.setUninterpretedOptionList([]); +proto.google.protobuf.MethodOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MethodOptions.repeatedFields_, null); }; - - - +goog.inherits(proto.google.protobuf.MethodOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.MethodOptions.displayName = 'proto.google.protobuf.MethodOptions'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -8107,15 +7152,13 @@ proto.google.protobuf.MethodOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeInstance) { @@ -8125,8 +7168,8 @@ proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeIns /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.MethodOptions} msg The msg instance to transform. * @return {!Object} @@ -8134,7 +7177,7 @@ proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeIns */ proto.google.protobuf.MethodOptions.toObject = function(includeInstance, msg) { var f, obj = { - deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false), + deprecated: jspb.Message.getFieldWithDefault(msg, 33, false), idempotencyLevel: jspb.Message.getFieldWithDefault(msg, 34, 0), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) @@ -8191,8 +7234,7 @@ proto.google.protobuf.MethodOptions.deserializeBinaryFromReader = function(msg, msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, - proto.google.protobuf.MethodOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.MethodOptions.extensionsBinary, proto.google.protobuf.MethodOptions.prototype.getExtension, proto.google.protobuf.MethodOptions.prototype.setExtension); break; @@ -8260,28 +7302,23 @@ proto.google.protobuf.MethodOptions.IdempotencyLevel = { /** * optional bool deprecated = 33; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MethodOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 33, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.MethodOptions} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.MethodOptions.prototype.setDeprecated = function(value) { - return jspb.Message.setField(this, 33, value); + jspb.Message.setField(this, 33, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.MethodOptions} returns this - */ proto.google.protobuf.MethodOptions.prototype.clearDeprecated = function() { - return jspb.Message.setField(this, 33, undefined); + jspb.Message.setField(this, 33, undefined); }; @@ -8303,21 +7340,14 @@ proto.google.protobuf.MethodOptions.prototype.getIdempotencyLevel = function() { }; -/** - * @param {!proto.google.protobuf.MethodOptions.IdempotencyLevel} value - * @return {!proto.google.protobuf.MethodOptions} returns this - */ +/** @param {!proto.google.protobuf.MethodOptions.IdempotencyLevel} value */ proto.google.protobuf.MethodOptions.prototype.setIdempotencyLevel = function(value) { - return jspb.Message.setField(this, 34, value); + jspb.Message.setField(this, 34, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.MethodOptions} returns this - */ proto.google.protobuf.MethodOptions.prototype.clearIdempotencyLevel = function() { - return jspb.Message.setField(this, 34, undefined); + jspb.Message.setField(this, 34, undefined); }; @@ -8340,12 +7370,9 @@ proto.google.protobuf.MethodOptions.prototype.getUninterpretedOptionList = funct }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.MethodOptions} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.MethodOptions.prototype.setUninterpretedOptionList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 999, value); + jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -8359,16 +7386,59 @@ proto.google.protobuf.MethodOptions.prototype.addUninterpretedOption = function( }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.MethodOptions} returns this - */ proto.google.protobuf.MethodOptions.prototype.clearUninterpretedOptionList = function() { - return this.setUninterpretedOptionList([]); + this.setUninterpretedOptionList([]); }; +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MethodOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MethodOptions.extensionsBinary = {}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.UninterpretedOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.UninterpretedOption.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.UninterpretedOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.UninterpretedOption.displayName = 'proto.google.protobuf.UninterpretedOption'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -8380,15 +7450,13 @@ proto.google.protobuf.UninterpretedOption.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.UninterpretedOption.prototype.toObject = function(opt_includeInstance) { @@ -8398,8 +7466,8 @@ proto.google.protobuf.UninterpretedOption.prototype.toObject = function(opt_incl /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.UninterpretedOption} msg The msg instance to transform. * @return {!Object} @@ -8409,12 +7477,12 @@ proto.google.protobuf.UninterpretedOption.toObject = function(includeInstance, m var f, obj = { nameList: jspb.Message.toObjectList(msg.getNameList(), proto.google.protobuf.UninterpretedOption.NamePart.toObject, includeInstance), - identifierValue: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, - positiveIntValue: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, - negativeIntValue: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, - doubleValue: (f = jspb.Message.getOptionalFloatingPointField(msg, 6)) == null ? undefined : f, + identifierValue: jspb.Message.getField(msg, 3), + positiveIntValue: jspb.Message.getField(msg, 4), + negativeIntValue: jspb.Message.getField(msg, 5), + doubleValue: jspb.Message.getOptionalFloatingPointField(msg, 6), stringValue: msg.getStringValue_asB64(), - aggregateValue: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f + aggregateValue: jspb.Message.getField(msg, 8) }; if (includeInstance) { @@ -8563,19 +7631,34 @@ proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter = function(mes +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.UninterpretedOption.NamePart = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.UninterpretedOption.NamePart, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.UninterpretedOption.NamePart.displayName = 'proto.google.protobuf.UninterpretedOption.NamePart'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function(opt_includeInstance) { @@ -8585,8 +7668,8 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.UninterpretedOption.NamePart} msg The msg instance to transform. * @return {!Object} @@ -8594,8 +7677,8 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function */ proto.google.protobuf.UninterpretedOption.NamePart.toObject = function(includeInstance, msg) { var f, obj = { - namePart: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, - isExtension: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f + namePart: jspb.Message.getField(msg, 1), + isExtension: jspb.Message.getField(msg, 2) }; if (includeInstance) { @@ -8695,21 +7778,14 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.getNamePart = funct }; -/** - * @param {string} value - * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this - */ +/** @param {string} value */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.setNamePart = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this - */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearNamePart = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -8724,28 +7800,23 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasNamePart = funct /** * required bool is_extension = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.getIsExtension = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); }; -/** - * @param {boolean} value - * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this - */ +/** @param {boolean} value */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.setIsExtension = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this - */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearIsExtension = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -8768,12 +7839,9 @@ proto.google.protobuf.UninterpretedOption.prototype.getNameList = function() { }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.UninterpretedOption} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.UninterpretedOption.prototype.setNameList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -8787,12 +7855,8 @@ proto.google.protobuf.UninterpretedOption.prototype.addName = function(opt_value }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ proto.google.protobuf.UninterpretedOption.prototype.clearNameList = function() { - return this.setNameList([]); + this.setNameList([]); }; @@ -8805,21 +7869,14 @@ proto.google.protobuf.UninterpretedOption.prototype.getIdentifierValue = functio }; -/** - * @param {string} value - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ +/** @param {string} value */ proto.google.protobuf.UninterpretedOption.prototype.setIdentifierValue = function(value) { - return jspb.Message.setField(this, 3, value); + jspb.Message.setField(this, 3, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ proto.google.protobuf.UninterpretedOption.prototype.clearIdentifierValue = function() { - return jspb.Message.setField(this, 3, undefined); + jspb.Message.setField(this, 3, undefined); }; @@ -8841,21 +7898,14 @@ proto.google.protobuf.UninterpretedOption.prototype.getPositiveIntValue = functi }; -/** - * @param {number} value - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ +/** @param {number} value */ proto.google.protobuf.UninterpretedOption.prototype.setPositiveIntValue = function(value) { - return jspb.Message.setField(this, 4, value); + jspb.Message.setField(this, 4, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ proto.google.protobuf.UninterpretedOption.prototype.clearPositiveIntValue = function() { - return jspb.Message.setField(this, 4, undefined); + jspb.Message.setField(this, 4, undefined); }; @@ -8877,21 +7927,14 @@ proto.google.protobuf.UninterpretedOption.prototype.getNegativeIntValue = functi }; -/** - * @param {number} value - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ +/** @param {number} value */ proto.google.protobuf.UninterpretedOption.prototype.setNegativeIntValue = function(value) { - return jspb.Message.setField(this, 5, value); + jspb.Message.setField(this, 5, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ proto.google.protobuf.UninterpretedOption.prototype.clearNegativeIntValue = function() { - return jspb.Message.setField(this, 5, undefined); + jspb.Message.setField(this, 5, undefined); }; @@ -8909,25 +7952,18 @@ proto.google.protobuf.UninterpretedOption.prototype.hasNegativeIntValue = functi * @return {number} */ proto.google.protobuf.UninterpretedOption.prototype.getDoubleValue = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 6, 0.0)); }; -/** - * @param {number} value - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ +/** @param {number} value */ proto.google.protobuf.UninterpretedOption.prototype.setDoubleValue = function(value) { - return jspb.Message.setField(this, 6, value); + jspb.Message.setField(this, 6, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ proto.google.protobuf.UninterpretedOption.prototype.clearDoubleValue = function() { - return jspb.Message.setField(this, 6, undefined); + jspb.Message.setField(this, 6, undefined); }; @@ -8973,21 +8009,14 @@ proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asU8 = functi }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.google.protobuf.UninterpretedOption.prototype.setStringValue = function(value) { - return jspb.Message.setField(this, 7, value); + jspb.Message.setField(this, 7, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ proto.google.protobuf.UninterpretedOption.prototype.clearStringValue = function() { - return jspb.Message.setField(this, 7, undefined); + jspb.Message.setField(this, 7, undefined); }; @@ -9009,21 +8038,14 @@ proto.google.protobuf.UninterpretedOption.prototype.getAggregateValue = function }; -/** - * @param {string} value - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ +/** @param {string} value */ proto.google.protobuf.UninterpretedOption.prototype.setAggregateValue = function(value) { - return jspb.Message.setField(this, 8, value); + jspb.Message.setField(this, 8, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.UninterpretedOption} returns this - */ proto.google.protobuf.UninterpretedOption.prototype.clearAggregateValue = function() { - return jspb.Message.setField(this, 8, undefined); + jspb.Message.setField(this, 8, undefined); }; @@ -9037,6 +8059,23 @@ proto.google.protobuf.UninterpretedOption.prototype.hasAggregateValue = function +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.SourceCodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.SourceCodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.SourceCodeInfo.displayName = 'proto.google.protobuf.SourceCodeInfo'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -9048,15 +8087,13 @@ proto.google.protobuf.SourceCodeInfo.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.SourceCodeInfo.prototype.toObject = function(opt_includeInstance) { @@ -9066,8 +8103,8 @@ proto.google.protobuf.SourceCodeInfo.prototype.toObject = function(opt_includeIn /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.SourceCodeInfo} msg The msg instance to transform. * @return {!Object} @@ -9159,6 +8196,23 @@ proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter = function(message, +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.SourceCodeInfo.Location = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.SourceCodeInfo.Location, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.SourceCodeInfo.Location.displayName = 'proto.google.protobuf.SourceCodeInfo.Location'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -9170,15 +8224,13 @@ proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_ = [1,2,6]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_includeInstance) { @@ -9188,8 +8240,8 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_ /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.SourceCodeInfo.Location} msg The msg instance to transform. * @return {!Object} @@ -9197,11 +8249,11 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_ */ proto.google.protobuf.SourceCodeInfo.Location.toObject = function(includeInstance, msg) { var f, obj = { - pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - spanList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - leadingComments: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, - trailingComments: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, - leadingDetachedCommentsList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f + pathList: jspb.Message.getRepeatedField(msg, 1), + spanList: jspb.Message.getRepeatedField(msg, 2), + leadingComments: jspb.Message.getField(msg, 3), + trailingComments: jspb.Message.getField(msg, 4), + leadingDetachedCommentsList: jspb.Message.getRepeatedField(msg, 6) }; if (includeInstance) { @@ -9334,31 +8386,23 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getPathList = function() }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this - */ +/** @param {!Array} value */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setPathList = function(value) { - return jspb.Message.setField(this, 1, value || []); + jspb.Message.setField(this, 1, value || []); }; /** * @param {number} value * @param {number=} opt_index - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.addPath = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); + jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this - */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearPathList = function() { - return this.setPathList([]); + this.setPathList([]); }; @@ -9371,31 +8415,23 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getSpanList = function() }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this - */ +/** @param {!Array} value */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setSpanList = function(value) { - return jspb.Message.setField(this, 2, value || []); + jspb.Message.setField(this, 2, value || []); }; /** * @param {number} value * @param {number=} opt_index - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.addSpan = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); + jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this - */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearSpanList = function() { - return this.setSpanList([]); + this.setSpanList([]); }; @@ -9408,21 +8444,14 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingComments = fun }; -/** - * @param {string} value - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this - */ +/** @param {string} value */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingComments = function(value) { - return jspb.Message.setField(this, 3, value); + jspb.Message.setField(this, 3, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this - */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingComments = function() { - return jspb.Message.setField(this, 3, undefined); + jspb.Message.setField(this, 3, undefined); }; @@ -9444,21 +8473,14 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getTrailingComments = fu }; -/** - * @param {string} value - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this - */ +/** @param {string} value */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setTrailingComments = function(value) { - return jspb.Message.setField(this, 4, value); + jspb.Message.setField(this, 4, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this - */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearTrailingComments = function() { - return jspb.Message.setField(this, 4, undefined); + jspb.Message.setField(this, 4, undefined); }; @@ -9480,31 +8502,23 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingDetachedCommen }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this - */ +/** @param {!Array} value */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingDetachedCommentsList = function(value) { - return jspb.Message.setField(this, 6, value || []); + jspb.Message.setField(this, 6, value || []); }; /** * @param {string} value * @param {number=} opt_index - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.addLeadingDetachedComments = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); + jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this - */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingDetachedCommentsList = function() { - return this.setLeadingDetachedCommentsList([]); + this.setLeadingDetachedCommentsList([]); }; @@ -9518,12 +8532,9 @@ proto.google.protobuf.SourceCodeInfo.prototype.getLocationList = function() { }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.SourceCodeInfo} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.SourceCodeInfo.prototype.setLocationList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -9537,16 +8548,29 @@ proto.google.protobuf.SourceCodeInfo.prototype.addLocation = function(opt_value, }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.SourceCodeInfo} returns this - */ proto.google.protobuf.SourceCodeInfo.prototype.clearLocationList = function() { - return this.setLocationList([]); + this.setLocationList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.GeneratedCodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.GeneratedCodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.GeneratedCodeInfo.displayName = 'proto.google.protobuf.GeneratedCodeInfo'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -9558,15 +8582,13 @@ proto.google.protobuf.GeneratedCodeInfo.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.GeneratedCodeInfo.prototype.toObject = function(opt_includeInstance) { @@ -9576,8 +8598,8 @@ proto.google.protobuf.GeneratedCodeInfo.prototype.toObject = function(opt_includ /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.GeneratedCodeInfo} msg The msg instance to transform. * @return {!Object} @@ -9669,6 +8691,23 @@ proto.google.protobuf.GeneratedCodeInfo.serializeBinaryToWriter = function(messa +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.GeneratedCodeInfo.Annotation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.GeneratedCodeInfo.Annotation.displayName = 'proto.google.protobuf.GeneratedCodeInfo.Annotation'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -9680,15 +8719,13 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function(opt_includeInstance) { @@ -9698,8 +8735,8 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} msg The msg instance to transform. * @return {!Object} @@ -9707,10 +8744,10 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function */ proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject = function(includeInstance, msg) { var f, obj = { - pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - sourceFile: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, - begin: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, - end: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f + pathList: jspb.Message.getRepeatedField(msg, 1), + sourceFile: jspb.Message.getField(msg, 2), + begin: jspb.Message.getField(msg, 3), + end: jspb.Message.getField(msg, 4) }; if (includeInstance) { @@ -9832,31 +8869,23 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getPathList = funct }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this - */ +/** @param {!Array} value */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setPathList = function(value) { - return jspb.Message.setField(this, 1, value || []); + jspb.Message.setField(this, 1, value || []); }; /** * @param {number} value * @param {number=} opt_index - * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.addPath = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); + jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this - */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearPathList = function() { - return this.setPathList([]); + this.setPathList([]); }; @@ -9869,21 +8898,14 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getSourceFile = fun }; -/** - * @param {string} value - * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this - */ +/** @param {string} value */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setSourceFile = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this - */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearSourceFile = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -9905,21 +8927,14 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getBegin = function }; -/** - * @param {number} value - * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this - */ +/** @param {number} value */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setBegin = function(value) { - return jspb.Message.setField(this, 3, value); + jspb.Message.setField(this, 3, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this - */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearBegin = function() { - return jspb.Message.setField(this, 3, undefined); + jspb.Message.setField(this, 3, undefined); }; @@ -9941,21 +8956,14 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getEnd = function() }; -/** - * @param {number} value - * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this - */ +/** @param {number} value */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setEnd = function(value) { - return jspb.Message.setField(this, 4, value); + jspb.Message.setField(this, 4, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this - */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearEnd = function() { - return jspb.Message.setField(this, 4, undefined); + jspb.Message.setField(this, 4, undefined); }; @@ -9978,12 +8986,9 @@ proto.google.protobuf.GeneratedCodeInfo.prototype.getAnnotationList = function() }; -/** - * @param {!Array} value - * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this -*/ +/** @param {!Array} value */ proto.google.protobuf.GeneratedCodeInfo.prototype.setAnnotationList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -9997,12 +9002,8 @@ proto.google.protobuf.GeneratedCodeInfo.prototype.addAnnotation = function(opt_v }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this - */ proto.google.protobuf.GeneratedCodeInfo.prototype.clearAnnotationList = function() { - return this.setAnnotationList([]); + this.setAnnotationList([]); }; diff --git a/js/proto/google/protobuf/timestamp_grpc_pb.d.ts b/js/proto/google/protobuf/timestamp_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/google/protobuf/timestamp_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/google/protobuf/timestamp_pb.d.ts b/js/proto/google/protobuf/timestamp_pb.d.ts index 931c24658..a44250eda 100644 --- a/js/proto/google/protobuf/timestamp_pb.d.ts +++ b/js/proto/google/protobuf/timestamp_pb.d.ts @@ -1,29 +1,32 @@ // package: google.protobuf // file: google/protobuf/timestamp.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; -export class Timestamp extends jspb.Message { - getSeconds(): number; - setSeconds(value: number): void; +export class Timestamp extends jspb.Message { + getSeconds(): number; + setSeconds(value: number): void; + + getNanos(): number; + setNanos(value: number): void; - getNanos(): number; - setNanos(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Timestamp.AsObject; - static toObject(includeInstance: boolean, msg: Timestamp): Timestamp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Timestamp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Timestamp; - static deserializeBinaryFromReader(message: Timestamp, reader: jspb.BinaryReader): Timestamp; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Timestamp.AsObject; + static toObject(includeInstance: boolean, msg: Timestamp): Timestamp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Timestamp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Timestamp; + static deserializeBinaryFromReader(message: Timestamp, reader: jspb.BinaryReader): Timestamp; } export namespace Timestamp { - export type AsObject = { - seconds: number, - nanos: number, - } + export type AsObject = { + seconds: number, + nanos: number, + } } - diff --git a/js/proto/google/protobuf/timestamp_pb.js b/js/proto/google/protobuf/timestamp_pb.js index 2f13b459f..66557b49a 100644 --- a/js/proto/google/protobuf/timestamp_pb.js +++ b/js/proto/google/protobuf/timestamp_pb.js @@ -1,4 +1,3 @@ -// source: google/protobuf/timestamp.proto /** * @fileoverview * @enhanceable @@ -13,6 +12,7 @@ var goog = jspb; var global = Function('return this')(); goog.exportSymbol('proto.google.protobuf.Timestamp', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -28,26 +28,19 @@ proto.google.protobuf.Timestamp = function(opt_data) { }; goog.inherits(proto.google.protobuf.Timestamp, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.google.protobuf.Timestamp.displayName = 'proto.google.protobuf.Timestamp'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.Timestamp.prototype.toObject = function(opt_includeInstance) { @@ -57,8 +50,8 @@ proto.google.protobuf.Timestamp.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.Timestamp} msg The msg instance to transform. * @return {!Object} @@ -167,12 +160,9 @@ proto.google.protobuf.Timestamp.prototype.getSeconds = function() { }; -/** - * @param {number} value - * @return {!proto.google.protobuf.Timestamp} returns this - */ +/** @param {number} value */ proto.google.protobuf.Timestamp.prototype.setSeconds = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -185,12 +175,9 @@ proto.google.protobuf.Timestamp.prototype.getNanos = function() { }; -/** - * @param {number} value - * @return {!proto.google.protobuf.Timestamp} returns this - */ +/** @param {number} value */ proto.google.protobuf.Timestamp.prototype.setNanos = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; @@ -218,16 +205,3 @@ proto.google.protobuf.Timestamp.prototype.fromDate = function(value) { this.setSeconds(Math.floor(value.getTime() / 1000)); this.setNanos(value.getMilliseconds() * 1000000); }; - - -/** - * Factory method that returns a Timestamp object with value equal to - * the given Date. - * @param {!Date} value The value to set. - * @return {!proto.google.protobuf.Timestamp} - */ -proto.google.protobuf.Timestamp.fromDate = function(value) { - var timestamp = new proto.google.protobuf.Timestamp(); - timestamp.fromDate(value); - return timestamp; -}; diff --git a/js/proto/keys_grpc_pb.d.ts b/js/proto/keys_grpc_pb.d.ts index 7d5b0930c..7cca9ee41 100644 --- a/js/proto/keys_grpc_pb.d.ts +++ b/js/proto/keys_grpc_pb.d.ts @@ -1,60 +1,214 @@ -// GENERATED CODE -- DO NOT EDIT! - // package: keys // file: keys.proto +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; import * as keys_pb from "./keys_pb"; -import * as grpc from "grpc"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as crypto_pb from "./crypto_pb"; interface IKeysService extends grpc.ServiceDefinition { - generateKey: grpc.MethodDefinition; - publicKey: grpc.MethodDefinition; - sign: grpc.MethodDefinition; - verify: grpc.MethodDefinition; - import: grpc.MethodDefinition; - importJSON: grpc.MethodDefinition; - export: grpc.MethodDefinition; - hash: grpc.MethodDefinition; - removeName: grpc.MethodDefinition; - list: grpc.MethodDefinition; - addName: grpc.MethodDefinition; + generateKey: IKeysService_IGenerateKey; + publicKey: IKeysService_IPublicKey; + sign: IKeysService_ISign; + verify: IKeysService_IVerify; + import: IKeysService_IImport; + importJSON: IKeysService_IImportJSON; + export: IKeysService_IExport; + hash: IKeysService_IHash; + removeName: IKeysService_IRemoveName; + list: IKeysService_IList; + addName: IKeysService_IAddName; +} + +interface IKeysService_IGenerateKey extends grpc.MethodDefinition { + path: string; // "/keys.Keys/GenerateKey" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IKeysService_IPublicKey extends grpc.MethodDefinition { + path: string; // "/keys.Keys/PublicKey" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IKeysService_ISign extends grpc.MethodDefinition { + path: string; // "/keys.Keys/Sign" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IKeysService_IVerify extends grpc.MethodDefinition { + path: string; // "/keys.Keys/Verify" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IKeysService_IImport extends grpc.MethodDefinition { + path: string; // "/keys.Keys/Import" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IKeysService_IImportJSON extends grpc.MethodDefinition { + path: string; // "/keys.Keys/ImportJSON" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IKeysService_IExport extends grpc.MethodDefinition { + path: string; // "/keys.Keys/Export" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IKeysService_IHash extends grpc.MethodDefinition { + path: string; // "/keys.Keys/Hash" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IKeysService_IRemoveName extends grpc.MethodDefinition { + path: string; // "/keys.Keys/RemoveName" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IKeysService_IList extends grpc.MethodDefinition { + path: string; // "/keys.Keys/List" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IKeysService_IAddName extends grpc.MethodDefinition { + path: string; // "/keys.Keys/AddName" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } export const KeysService: IKeysService; -export class KeysClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - generateKey(argument: keys_pb.GenRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - generateKey(argument: keys_pb.GenRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - generateKey(argument: keys_pb.GenRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - publicKey(argument: keys_pb.PubRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - publicKey(argument: keys_pb.PubRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - publicKey(argument: keys_pb.PubRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - sign(argument: keys_pb.SignRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - sign(argument: keys_pb.SignRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - sign(argument: keys_pb.SignRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verify(argument: keys_pb.VerifyRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verify(argument: keys_pb.VerifyRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - verify(argument: keys_pb.VerifyRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - import(argument: keys_pb.ImportRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - import(argument: keys_pb.ImportRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - import(argument: keys_pb.ImportRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - importJSON(argument: keys_pb.ImportJSONRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - importJSON(argument: keys_pb.ImportJSONRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - importJSON(argument: keys_pb.ImportJSONRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - export(argument: keys_pb.ExportRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - export(argument: keys_pb.ExportRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - export(argument: keys_pb.ExportRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - hash(argument: keys_pb.HashRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - hash(argument: keys_pb.HashRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - hash(argument: keys_pb.HashRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - removeName(argument: keys_pb.RemoveNameRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - removeName(argument: keys_pb.RemoveNameRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - removeName(argument: keys_pb.RemoveNameRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - list(argument: keys_pb.ListRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - list(argument: keys_pb.ListRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - list(argument: keys_pb.ListRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - addName(argument: keys_pb.AddNameRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - addName(argument: keys_pb.AddNameRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - addName(argument: keys_pb.AddNameRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; +export interface IKeysServer { + generateKey: grpc.handleUnaryCall; + publicKey: grpc.handleUnaryCall; + sign: grpc.handleUnaryCall; + verify: grpc.handleUnaryCall; + import: grpc.handleUnaryCall; + importJSON: grpc.handleUnaryCall; + export: grpc.handleUnaryCall; + hash: grpc.handleUnaryCall; + removeName: grpc.handleUnaryCall; + list: grpc.handleUnaryCall; + addName: grpc.handleUnaryCall; +} + +export interface IKeysClient { + generateKey(request: keys_pb.GenRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.GenResponse) => void): grpc.ClientUnaryCall; + generateKey(request: keys_pb.GenRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.GenResponse) => void): grpc.ClientUnaryCall; + generateKey(request: keys_pb.GenRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.GenResponse) => void): grpc.ClientUnaryCall; + publicKey(request: keys_pb.PubRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.PubResponse) => void): grpc.ClientUnaryCall; + publicKey(request: keys_pb.PubRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.PubResponse) => void): grpc.ClientUnaryCall; + publicKey(request: keys_pb.PubRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.PubResponse) => void): grpc.ClientUnaryCall; + sign(request: keys_pb.SignRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.SignResponse) => void): grpc.ClientUnaryCall; + sign(request: keys_pb.SignRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.SignResponse) => void): grpc.ClientUnaryCall; + sign(request: keys_pb.SignRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.SignResponse) => void): grpc.ClientUnaryCall; + verify(request: keys_pb.VerifyRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.VerifyResponse) => void): grpc.ClientUnaryCall; + verify(request: keys_pb.VerifyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.VerifyResponse) => void): grpc.ClientUnaryCall; + verify(request: keys_pb.VerifyRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.VerifyResponse) => void): grpc.ClientUnaryCall; + import(request: keys_pb.ImportRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.ImportResponse) => void): grpc.ClientUnaryCall; + import(request: keys_pb.ImportRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.ImportResponse) => void): grpc.ClientUnaryCall; + import(request: keys_pb.ImportRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.ImportResponse) => void): grpc.ClientUnaryCall; + importJSON(request: keys_pb.ImportJSONRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.ImportResponse) => void): grpc.ClientUnaryCall; + importJSON(request: keys_pb.ImportJSONRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.ImportResponse) => void): grpc.ClientUnaryCall; + importJSON(request: keys_pb.ImportJSONRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.ImportResponse) => void): grpc.ClientUnaryCall; + export(request: keys_pb.ExportRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.ExportResponse) => void): grpc.ClientUnaryCall; + export(request: keys_pb.ExportRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.ExportResponse) => void): grpc.ClientUnaryCall; + export(request: keys_pb.ExportRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.ExportResponse) => void): grpc.ClientUnaryCall; + hash(request: keys_pb.HashRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.HashResponse) => void): grpc.ClientUnaryCall; + hash(request: keys_pb.HashRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.HashResponse) => void): grpc.ClientUnaryCall; + hash(request: keys_pb.HashRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.HashResponse) => void): grpc.ClientUnaryCall; + removeName(request: keys_pb.RemoveNameRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.RemoveNameResponse) => void): grpc.ClientUnaryCall; + removeName(request: keys_pb.RemoveNameRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.RemoveNameResponse) => void): grpc.ClientUnaryCall; + removeName(request: keys_pb.RemoveNameRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.RemoveNameResponse) => void): grpc.ClientUnaryCall; + list(request: keys_pb.ListRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.ListResponse) => void): grpc.ClientUnaryCall; + list(request: keys_pb.ListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.ListResponse) => void): grpc.ClientUnaryCall; + list(request: keys_pb.ListRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.ListResponse) => void): grpc.ClientUnaryCall; + addName(request: keys_pb.AddNameRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.AddNameResponse) => void): grpc.ClientUnaryCall; + addName(request: keys_pb.AddNameRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.AddNameResponse) => void): grpc.ClientUnaryCall; + addName(request: keys_pb.AddNameRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.AddNameResponse) => void): grpc.ClientUnaryCall; +} + +export class KeysClient extends grpc.Client implements IKeysClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public generateKey(request: keys_pb.GenRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.GenResponse) => void): grpc.ClientUnaryCall; + public generateKey(request: keys_pb.GenRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.GenResponse) => void): grpc.ClientUnaryCall; + public generateKey(request: keys_pb.GenRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.GenResponse) => void): grpc.ClientUnaryCall; + public publicKey(request: keys_pb.PubRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.PubResponse) => void): grpc.ClientUnaryCall; + public publicKey(request: keys_pb.PubRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.PubResponse) => void): grpc.ClientUnaryCall; + public publicKey(request: keys_pb.PubRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.PubResponse) => void): grpc.ClientUnaryCall; + public sign(request: keys_pb.SignRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.SignResponse) => void): grpc.ClientUnaryCall; + public sign(request: keys_pb.SignRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.SignResponse) => void): grpc.ClientUnaryCall; + public sign(request: keys_pb.SignRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.SignResponse) => void): grpc.ClientUnaryCall; + public verify(request: keys_pb.VerifyRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.VerifyResponse) => void): grpc.ClientUnaryCall; + public verify(request: keys_pb.VerifyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.VerifyResponse) => void): grpc.ClientUnaryCall; + public verify(request: keys_pb.VerifyRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.VerifyResponse) => void): grpc.ClientUnaryCall; + public import(request: keys_pb.ImportRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.ImportResponse) => void): grpc.ClientUnaryCall; + public import(request: keys_pb.ImportRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.ImportResponse) => void): grpc.ClientUnaryCall; + public import(request: keys_pb.ImportRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.ImportResponse) => void): grpc.ClientUnaryCall; + public importJSON(request: keys_pb.ImportJSONRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.ImportResponse) => void): grpc.ClientUnaryCall; + public importJSON(request: keys_pb.ImportJSONRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.ImportResponse) => void): grpc.ClientUnaryCall; + public importJSON(request: keys_pb.ImportJSONRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.ImportResponse) => void): grpc.ClientUnaryCall; + public export(request: keys_pb.ExportRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.ExportResponse) => void): grpc.ClientUnaryCall; + public export(request: keys_pb.ExportRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.ExportResponse) => void): grpc.ClientUnaryCall; + public export(request: keys_pb.ExportRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.ExportResponse) => void): grpc.ClientUnaryCall; + public hash(request: keys_pb.HashRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.HashResponse) => void): grpc.ClientUnaryCall; + public hash(request: keys_pb.HashRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.HashResponse) => void): grpc.ClientUnaryCall; + public hash(request: keys_pb.HashRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.HashResponse) => void): grpc.ClientUnaryCall; + public removeName(request: keys_pb.RemoveNameRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.RemoveNameResponse) => void): grpc.ClientUnaryCall; + public removeName(request: keys_pb.RemoveNameRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.RemoveNameResponse) => void): grpc.ClientUnaryCall; + public removeName(request: keys_pb.RemoveNameRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.RemoveNameResponse) => void): grpc.ClientUnaryCall; + public list(request: keys_pb.ListRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.ListResponse) => void): grpc.ClientUnaryCall; + public list(request: keys_pb.ListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.ListResponse) => void): grpc.ClientUnaryCall; + public list(request: keys_pb.ListRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.ListResponse) => void): grpc.ClientUnaryCall; + public addName(request: keys_pb.AddNameRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.AddNameResponse) => void): grpc.ClientUnaryCall; + public addName(request: keys_pb.AddNameRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.AddNameResponse) => void): grpc.ClientUnaryCall; + public addName(request: keys_pb.AddNameRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.AddNameResponse) => void): grpc.ClientUnaryCall; } diff --git a/js/proto/keys_grpc_pb.js b/js/proto/keys_grpc_pb.js index ed7f5c6f5..cd9ed9570 100644 --- a/js/proto/keys_grpc_pb.js +++ b/js/proto/keys_grpc_pb.js @@ -1,7 +1,6 @@ // GENERATED CODE -- DO NOT EDIT! 'use strict'; -var grpc = require('grpc'); var keys_pb = require('./keys_pb.js'); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); var crypto_pb = require('./crypto_pb.js'); @@ -238,7 +237,7 @@ function deserialize_keys_VerifyResponse(buffer_arg) { } -var KeysService = exports.KeysService = { +var KeysService = exports['keys.Keys'] = { generateKey: { path: '/keys.Keys/GenerateKey', requestStream: false, @@ -362,4 +361,3 @@ var KeysService = exports.KeysService = { }, }; -exports.KeysClient = grpc.makeGenericClientConstructor(KeysService); diff --git a/js/proto/keys_pb.d.ts b/js/proto/keys_pb.d.ts index 6b272c975..78900fe53 100644 --- a/js/proto/keys_pb.d.ts +++ b/js/proto/keys_pb.d.ts @@ -1,545 +1,571 @@ // package: keys // file: keys.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as crypto_pb from "./crypto_pb"; -export class ListRequest extends jspb.Message { - getKeyname(): string; - setKeyname(value: string): void; +export class ListRequest extends jspb.Message { + getKeyname(): string; + setKeyname(value: string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListRequest): ListRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListRequest; - static deserializeBinaryFromReader(message: ListRequest, reader: jspb.BinaryReader): ListRequest; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListRequest): ListRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListRequest; + static deserializeBinaryFromReader(message: ListRequest, reader: jspb.BinaryReader): ListRequest; } export namespace ListRequest { - export type AsObject = { - keyname: string, - } + export type AsObject = { + keyname: string, + } } -export class VerifyResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyResponse.AsObject; - static toObject(includeInstance: boolean, msg: VerifyResponse): VerifyResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyResponse; - static deserializeBinaryFromReader(message: VerifyResponse, reader: jspb.BinaryReader): VerifyResponse; +export class VerifyResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VerifyResponse.AsObject; + static toObject(includeInstance: boolean, msg: VerifyResponse): VerifyResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VerifyResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VerifyResponse; + static deserializeBinaryFromReader(message: VerifyResponse, reader: jspb.BinaryReader): VerifyResponse; } export namespace VerifyResponse { - export type AsObject = { - } + export type AsObject = { + } } -export class RemoveNameResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RemoveNameResponse.AsObject; - static toObject(includeInstance: boolean, msg: RemoveNameResponse): RemoveNameResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RemoveNameResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RemoveNameResponse; - static deserializeBinaryFromReader(message: RemoveNameResponse, reader: jspb.BinaryReader): RemoveNameResponse; +export class RemoveNameResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoveNameResponse.AsObject; + static toObject(includeInstance: boolean, msg: RemoveNameResponse): RemoveNameResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoveNameResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoveNameResponse; + static deserializeBinaryFromReader(message: RemoveNameResponse, reader: jspb.BinaryReader): RemoveNameResponse; } export namespace RemoveNameResponse { - export type AsObject = { - } + export type AsObject = { + } } -export class AddNameResponse extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddNameResponse.AsObject; - static toObject(includeInstance: boolean, msg: AddNameResponse): AddNameResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddNameResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddNameResponse; - static deserializeBinaryFromReader(message: AddNameResponse, reader: jspb.BinaryReader): AddNameResponse; +export class AddNameResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddNameResponse.AsObject; + static toObject(includeInstance: boolean, msg: AddNameResponse): AddNameResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddNameResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddNameResponse; + static deserializeBinaryFromReader(message: AddNameResponse, reader: jspb.BinaryReader): AddNameResponse; } export namespace AddNameResponse { - export type AsObject = { - } + export type AsObject = { + } } -export class RemoveNameRequest extends jspb.Message { - getKeyname(): string; - setKeyname(value: string): void; +export class RemoveNameRequest extends jspb.Message { + getKeyname(): string; + setKeyname(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RemoveNameRequest.AsObject; - static toObject(includeInstance: boolean, msg: RemoveNameRequest): RemoveNameRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RemoveNameRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RemoveNameRequest; - static deserializeBinaryFromReader(message: RemoveNameRequest, reader: jspb.BinaryReader): RemoveNameRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoveNameRequest.AsObject; + static toObject(includeInstance: boolean, msg: RemoveNameRequest): RemoveNameRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoveNameRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoveNameRequest; + static deserializeBinaryFromReader(message: RemoveNameRequest, reader: jspb.BinaryReader): RemoveNameRequest; } export namespace RemoveNameRequest { - export type AsObject = { - keyname: string, - } + export type AsObject = { + keyname: string, + } } -export class GenRequest extends jspb.Message { - getPassphrase(): string; - setPassphrase(value: string): void; +export class GenRequest extends jspb.Message { + getPassphrase(): string; + setPassphrase(value: string): void; + + getCurvetype(): string; + setCurvetype(value: string): void; - getCurvetype(): string; - setCurvetype(value: string): void; + getKeyname(): string; + setKeyname(value: string): void; - getKeyname(): string; - setKeyname(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GenRequest.AsObject; - static toObject(includeInstance: boolean, msg: GenRequest): GenRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GenRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GenRequest; - static deserializeBinaryFromReader(message: GenRequest, reader: jspb.BinaryReader): GenRequest; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenRequest.AsObject; + static toObject(includeInstance: boolean, msg: GenRequest): GenRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenRequest; + static deserializeBinaryFromReader(message: GenRequest, reader: jspb.BinaryReader): GenRequest; } export namespace GenRequest { - export type AsObject = { - passphrase: string, - curvetype: string, - keyname: string, - } + export type AsObject = { + passphrase: string, + curvetype: string, + keyname: string, + } } -export class GenResponse extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; +export class GenResponse extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GenResponse.AsObject; - static toObject(includeInstance: boolean, msg: GenResponse): GenResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GenResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GenResponse; - static deserializeBinaryFromReader(message: GenResponse, reader: jspb.BinaryReader): GenResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenResponse.AsObject; + static toObject(includeInstance: boolean, msg: GenResponse): GenResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenResponse; + static deserializeBinaryFromReader(message: GenResponse, reader: jspb.BinaryReader): GenResponse; } export namespace GenResponse { - export type AsObject = { - address: string, - } + export type AsObject = { + address: string, + } } -export class PubRequest extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; +export class PubRequest extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + + getName(): string; + setName(value: string): void; - getName(): string; - setName(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PubRequest.AsObject; - static toObject(includeInstance: boolean, msg: PubRequest): PubRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PubRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PubRequest; - static deserializeBinaryFromReader(message: PubRequest, reader: jspb.BinaryReader): PubRequest; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PubRequest.AsObject; + static toObject(includeInstance: boolean, msg: PubRequest): PubRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PubRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PubRequest; + static deserializeBinaryFromReader(message: PubRequest, reader: jspb.BinaryReader): PubRequest; } export namespace PubRequest { - export type AsObject = { - address: string, - name: string, - } + export type AsObject = { + address: string, + name: string, + } } -export class PubResponse extends jspb.Message { - getPublickey(): Uint8Array | string; - getPublickey_asU8(): Uint8Array; - getPublickey_asB64(): string; - setPublickey(value: Uint8Array | string): void; +export class PubResponse extends jspb.Message { + getPublickey(): Uint8Array | string; + getPublickey_asU8(): Uint8Array; + getPublickey_asB64(): string; + setPublickey(value: Uint8Array | string): void; - getCurvetype(): string; - setCurvetype(value: string): void; + getCurvetype(): string; + setCurvetype(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PubResponse.AsObject; - static toObject(includeInstance: boolean, msg: PubResponse): PubResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PubResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PubResponse; - static deserializeBinaryFromReader(message: PubResponse, reader: jspb.BinaryReader): PubResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PubResponse.AsObject; + static toObject(includeInstance: boolean, msg: PubResponse): PubResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PubResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PubResponse; + static deserializeBinaryFromReader(message: PubResponse, reader: jspb.BinaryReader): PubResponse; } export namespace PubResponse { - export type AsObject = { - publickey: Uint8Array | string, - curvetype: string, - } + export type AsObject = { + publickey: Uint8Array | string, + curvetype: string, + } } -export class ImportJSONRequest extends jspb.Message { - getPassphrase(): string; - setPassphrase(value: string): void; +export class ImportJSONRequest extends jspb.Message { + getPassphrase(): string; + setPassphrase(value: string): void; + + getJson(): string; + setJson(value: string): void; - getJson(): string; - setJson(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ImportJSONRequest.AsObject; - static toObject(includeInstance: boolean, msg: ImportJSONRequest): ImportJSONRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ImportJSONRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ImportJSONRequest; - static deserializeBinaryFromReader(message: ImportJSONRequest, reader: jspb.BinaryReader): ImportJSONRequest; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ImportJSONRequest.AsObject; + static toObject(includeInstance: boolean, msg: ImportJSONRequest): ImportJSONRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ImportJSONRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ImportJSONRequest; + static deserializeBinaryFromReader(message: ImportJSONRequest, reader: jspb.BinaryReader): ImportJSONRequest; } export namespace ImportJSONRequest { - export type AsObject = { - passphrase: string, - json: string, - } + export type AsObject = { + passphrase: string, + json: string, + } } -export class ImportResponse extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; +export class ImportResponse extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ImportResponse.AsObject; - static toObject(includeInstance: boolean, msg: ImportResponse): ImportResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ImportResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ImportResponse; - static deserializeBinaryFromReader(message: ImportResponse, reader: jspb.BinaryReader): ImportResponse; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ImportResponse.AsObject; + static toObject(includeInstance: boolean, msg: ImportResponse): ImportResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ImportResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ImportResponse; + static deserializeBinaryFromReader(message: ImportResponse, reader: jspb.BinaryReader): ImportResponse; } export namespace ImportResponse { - export type AsObject = { - address: string, - } + export type AsObject = { + address: string, + } } -export class ImportRequest extends jspb.Message { - getPassphrase(): string; - setPassphrase(value: string): void; +export class ImportRequest extends jspb.Message { + getPassphrase(): string; + setPassphrase(value: string): void; - getName(): string; - setName(value: string): void; + getName(): string; + setName(value: string): void; - getCurvetype(): string; - setCurvetype(value: string): void; + getCurvetype(): string; + setCurvetype(value: string): void; - getKeybytes(): Uint8Array | string; - getKeybytes_asU8(): Uint8Array; - getKeybytes_asB64(): string; - setKeybytes(value: Uint8Array | string): void; + getKeybytes(): Uint8Array | string; + getKeybytes_asU8(): Uint8Array; + getKeybytes_asB64(): string; + setKeybytes(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ImportRequest.AsObject; - static toObject(includeInstance: boolean, msg: ImportRequest): ImportRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ImportRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ImportRequest; - static deserializeBinaryFromReader(message: ImportRequest, reader: jspb.BinaryReader): ImportRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ImportRequest.AsObject; + static toObject(includeInstance: boolean, msg: ImportRequest): ImportRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ImportRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ImportRequest; + static deserializeBinaryFromReader(message: ImportRequest, reader: jspb.BinaryReader): ImportRequest; } export namespace ImportRequest { - export type AsObject = { - passphrase: string, - name: string, - curvetype: string, - keybytes: Uint8Array | string, - } + export type AsObject = { + passphrase: string, + name: string, + curvetype: string, + keybytes: Uint8Array | string, + } } -export class ExportRequest extends jspb.Message { - getPassphrase(): string; - setPassphrase(value: string): void; +export class ExportRequest extends jspb.Message { + getPassphrase(): string; + setPassphrase(value: string): void; + + getName(): string; + setName(value: string): void; - getName(): string; - setName(value: string): void; + getAddress(): string; + setAddress(value: string): void; - getAddress(): string; - setAddress(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExportRequest.AsObject; - static toObject(includeInstance: boolean, msg: ExportRequest): ExportRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExportRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExportRequest; - static deserializeBinaryFromReader(message: ExportRequest, reader: jspb.BinaryReader): ExportRequest; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExportRequest.AsObject; + static toObject(includeInstance: boolean, msg: ExportRequest): ExportRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExportRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExportRequest; + static deserializeBinaryFromReader(message: ExportRequest, reader: jspb.BinaryReader): ExportRequest; } export namespace ExportRequest { - export type AsObject = { - passphrase: string, - name: string, - address: string, - } -} - -export class ExportResponse extends jspb.Message { - getPublickey(): Uint8Array | string; - getPublickey_asU8(): Uint8Array; - getPublickey_asB64(): string; - setPublickey(value: Uint8Array | string): void; - - getPrivatekey(): Uint8Array | string; - getPrivatekey_asU8(): Uint8Array; - getPrivatekey_asB64(): string; - setPrivatekey(value: Uint8Array | string): void; - - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; - - getCurvetype(): string; - setCurvetype(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExportResponse.AsObject; - static toObject(includeInstance: boolean, msg: ExportResponse): ExportResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExportResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExportResponse; - static deserializeBinaryFromReader(message: ExportResponse, reader: jspb.BinaryReader): ExportResponse; + export type AsObject = { + passphrase: string, + name: string, + address: string, + } +} + +export class ExportResponse extends jspb.Message { + getPublickey(): Uint8Array | string; + getPublickey_asU8(): Uint8Array; + getPublickey_asB64(): string; + setPublickey(value: Uint8Array | string): void; + + getPrivatekey(): Uint8Array | string; + getPrivatekey_asU8(): Uint8Array; + getPrivatekey_asB64(): string; + setPrivatekey(value: Uint8Array | string): void; + + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getCurvetype(): string; + setCurvetype(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExportResponse.AsObject; + static toObject(includeInstance: boolean, msg: ExportResponse): ExportResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExportResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExportResponse; + static deserializeBinaryFromReader(message: ExportResponse, reader: jspb.BinaryReader): ExportResponse; } export namespace ExportResponse { - export type AsObject = { - publickey: Uint8Array | string, - privatekey: Uint8Array | string, - address: Uint8Array | string, - curvetype: string, - } + export type AsObject = { + publickey: Uint8Array | string, + privatekey: Uint8Array | string, + address: Uint8Array | string, + curvetype: string, + } } -export class SignRequest extends jspb.Message { - getPassphrase(): string; - setPassphrase(value: string): void; +export class SignRequest extends jspb.Message { + getPassphrase(): string; + setPassphrase(value: string): void; - getAddress(): string; - setAddress(value: string): void; + getAddress(): string; + setAddress(value: string): void; - getName(): string; - setName(value: string): void; + getName(): string; + setName(value: string): void; - getMessage(): Uint8Array | string; - getMessage_asU8(): Uint8Array; - getMessage_asB64(): string; - setMessage(value: Uint8Array | string): void; + getMessage(): Uint8Array | string; + getMessage_asU8(): Uint8Array; + getMessage_asB64(): string; + setMessage(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignRequest.AsObject; - static toObject(includeInstance: boolean, msg: SignRequest): SignRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignRequest; - static deserializeBinaryFromReader(message: SignRequest, reader: jspb.BinaryReader): SignRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignRequest.AsObject; + static toObject(includeInstance: boolean, msg: SignRequest): SignRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SignRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignRequest; + static deserializeBinaryFromReader(message: SignRequest, reader: jspb.BinaryReader): SignRequest; } export namespace SignRequest { - export type AsObject = { - passphrase: string, - address: string, - name: string, - message: Uint8Array | string, - } -} - -export class SignResponse extends jspb.Message { - hasSignature(): boolean; - clearSignature(): void; - getSignature(): crypto_pb.Signature | undefined; - setSignature(value?: crypto_pb.Signature): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignResponse.AsObject; - static toObject(includeInstance: boolean, msg: SignResponse): SignResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignResponse; - static deserializeBinaryFromReader(message: SignResponse, reader: jspb.BinaryReader): SignResponse; + export type AsObject = { + passphrase: string, + address: string, + name: string, + message: Uint8Array | string, + } +} + +export class SignResponse extends jspb.Message { + + hasSignature(): boolean; + clearSignature(): void; + getSignature(): crypto_pb.Signature | undefined; + setSignature(value?: crypto_pb.Signature): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignResponse.AsObject; + static toObject(includeInstance: boolean, msg: SignResponse): SignResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SignResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignResponse; + static deserializeBinaryFromReader(message: SignResponse, reader: jspb.BinaryReader): SignResponse; } export namespace SignResponse { - export type AsObject = { - signature?: crypto_pb.Signature.AsObject, - } + export type AsObject = { + signature?: crypto_pb.Signature.AsObject, + } } -export class VerifyRequest extends jspb.Message { - getPublickey(): Uint8Array | string; - getPublickey_asU8(): Uint8Array; - getPublickey_asB64(): string; - setPublickey(value: Uint8Array | string): void; +export class VerifyRequest extends jspb.Message { + getPublickey(): Uint8Array | string; + getPublickey_asU8(): Uint8Array; + getPublickey_asB64(): string; + setPublickey(value: Uint8Array | string): void; - getMessage(): Uint8Array | string; - getMessage_asU8(): Uint8Array; - getMessage_asB64(): string; - setMessage(value: Uint8Array | string): void; + getMessage(): Uint8Array | string; + getMessage_asU8(): Uint8Array; + getMessage_asB64(): string; + setMessage(value: Uint8Array | string): void; - hasSignature(): boolean; - clearSignature(): void; - getSignature(): crypto_pb.Signature | undefined; - setSignature(value?: crypto_pb.Signature): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyRequest.AsObject; - static toObject(includeInstance: boolean, msg: VerifyRequest): VerifyRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyRequest; - static deserializeBinaryFromReader(message: VerifyRequest, reader: jspb.BinaryReader): VerifyRequest; + hasSignature(): boolean; + clearSignature(): void; + getSignature(): crypto_pb.Signature | undefined; + setSignature(value?: crypto_pb.Signature): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VerifyRequest.AsObject; + static toObject(includeInstance: boolean, msg: VerifyRequest): VerifyRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VerifyRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VerifyRequest; + static deserializeBinaryFromReader(message: VerifyRequest, reader: jspb.BinaryReader): VerifyRequest; } export namespace VerifyRequest { - export type AsObject = { - publickey: Uint8Array | string, - message: Uint8Array | string, - signature?: crypto_pb.Signature.AsObject, - } + export type AsObject = { + publickey: Uint8Array | string, + message: Uint8Array | string, + signature?: crypto_pb.Signature.AsObject, + } } -export class HashRequest extends jspb.Message { - getHashtype(): string; - setHashtype(value: string): void; +export class HashRequest extends jspb.Message { + getHashtype(): string; + setHashtype(value: string): void; - getMessage(): Uint8Array | string; - getMessage_asU8(): Uint8Array; - getMessage_asB64(): string; - setMessage(value: Uint8Array | string): void; + getMessage(): Uint8Array | string; + getMessage_asU8(): Uint8Array; + getMessage_asB64(): string; + setMessage(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HashRequest.AsObject; - static toObject(includeInstance: boolean, msg: HashRequest): HashRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HashRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HashRequest; - static deserializeBinaryFromReader(message: HashRequest, reader: jspb.BinaryReader): HashRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HashRequest.AsObject; + static toObject(includeInstance: boolean, msg: HashRequest): HashRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HashRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HashRequest; + static deserializeBinaryFromReader(message: HashRequest, reader: jspb.BinaryReader): HashRequest; } export namespace HashRequest { - export type AsObject = { - hashtype: string, - message: Uint8Array | string, - } + export type AsObject = { + hashtype: string, + message: Uint8Array | string, + } } -export class HashResponse extends jspb.Message { - getHash(): string; - setHash(value: string): void; +export class HashResponse extends jspb.Message { + getHash(): string; + setHash(value: string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HashResponse.AsObject; - static toObject(includeInstance: boolean, msg: HashResponse): HashResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HashResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HashResponse; - static deserializeBinaryFromReader(message: HashResponse, reader: jspb.BinaryReader): HashResponse; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HashResponse.AsObject; + static toObject(includeInstance: boolean, msg: HashResponse): HashResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HashResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HashResponse; + static deserializeBinaryFromReader(message: HashResponse, reader: jspb.BinaryReader): HashResponse; } export namespace HashResponse { - export type AsObject = { - hash: string, - } + export type AsObject = { + hash: string, + } } -export class KeyID extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; +export class KeyID extends jspb.Message { + getAddress(): string; + setAddress(value: string): void; - clearKeynameList(): void; - getKeynameList(): Array; - setKeynameList(value: Array): void; - addKeyname(value: string, index?: number): string; + clearKeynameList(): void; + getKeynameList(): Array; + setKeynameList(value: Array): void; + addKeyname(value: string, index?: number): string; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyID.AsObject; - static toObject(includeInstance: boolean, msg: KeyID): KeyID.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyID; - static deserializeBinaryFromReader(message: KeyID, reader: jspb.BinaryReader): KeyID; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KeyID.AsObject; + static toObject(includeInstance: boolean, msg: KeyID): KeyID.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KeyID, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KeyID; + static deserializeBinaryFromReader(message: KeyID, reader: jspb.BinaryReader): KeyID; } export namespace KeyID { - export type AsObject = { - address: string, - keynameList: Array, - } + export type AsObject = { + address: string, + keynameList: Array, + } } -export class ListResponse extends jspb.Message { - clearKeyList(): void; - getKeyList(): Array; - setKeyList(value: Array): void; - addKey(value?: KeyID, index?: number): KeyID; +export class ListResponse extends jspb.Message { + clearKeyList(): void; + getKeyList(): Array; + setKeyList(value: Array): void; + addKey(value?: KeyID, index?: number): KeyID; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListResponse): ListResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListResponse; - static deserializeBinaryFromReader(message: ListResponse, reader: jspb.BinaryReader): ListResponse; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListResponse): ListResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListResponse; + static deserializeBinaryFromReader(message: ListResponse, reader: jspb.BinaryReader): ListResponse; } export namespace ListResponse { - export type AsObject = { - keyList: Array, - } + export type AsObject = { + keyList: Array, + } } -export class AddNameRequest extends jspb.Message { - getKeyname(): string; - setKeyname(value: string): void; +export class AddNameRequest extends jspb.Message { + getKeyname(): string; + setKeyname(value: string): void; - getAddress(): string; - setAddress(value: string): void; + getAddress(): string; + setAddress(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddNameRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddNameRequest): AddNameRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddNameRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddNameRequest; - static deserializeBinaryFromReader(message: AddNameRequest, reader: jspb.BinaryReader): AddNameRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddNameRequest.AsObject; + static toObject(includeInstance: boolean, msg: AddNameRequest): AddNameRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddNameRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddNameRequest; + static deserializeBinaryFromReader(message: AddNameRequest, reader: jspb.BinaryReader): AddNameRequest; } export namespace AddNameRequest { - export type AsObject = { - keyname: string, - address: string, - } + export type AsObject = { + keyname: string, + address: string, + } } - diff --git a/js/proto/keys_pb.js b/js/proto/keys_pb.js index 2750b4b79..f556a7750 100644 --- a/js/proto/keys_pb.js +++ b/js/proto/keys_pb.js @@ -1,4 +1,3 @@ -// source: keys.proto /** * @fileoverview * @enhanceable @@ -38,6 +37,7 @@ goog.exportSymbol('proto.keys.SignRequest', null, global); goog.exportSymbol('proto.keys.SignResponse', null, global); goog.exportSymbol('proto.keys.VerifyRequest', null, global); goog.exportSymbol('proto.keys.VerifyResponse', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -48,472 +48,24 @@ goog.exportSymbol('proto.keys.VerifyResponse', null, global); * @extends {jspb.Message} * @constructor */ -proto.keys.ListRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.ListRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.ListRequest.displayName = 'proto.keys.ListRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.VerifyResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.VerifyResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.VerifyResponse.displayName = 'proto.keys.VerifyResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.RemoveNameResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.RemoveNameResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.RemoveNameResponse.displayName = 'proto.keys.RemoveNameResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.AddNameResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.AddNameResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.AddNameResponse.displayName = 'proto.keys.AddNameResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.RemoveNameRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.RemoveNameRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.RemoveNameRequest.displayName = 'proto.keys.RemoveNameRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.GenRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.GenRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.GenRequest.displayName = 'proto.keys.GenRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.GenResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.GenResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.GenResponse.displayName = 'proto.keys.GenResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.PubRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.PubRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.PubRequest.displayName = 'proto.keys.PubRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.PubResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.PubResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.PubResponse.displayName = 'proto.keys.PubResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.ImportJSONRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.ImportJSONRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.ImportJSONRequest.displayName = 'proto.keys.ImportJSONRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.ImportResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.ImportResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.ImportResponse.displayName = 'proto.keys.ImportResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.ImportRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.ImportRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.ImportRequest.displayName = 'proto.keys.ImportRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.ExportRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.ExportRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.ExportRequest.displayName = 'proto.keys.ExportRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.ExportResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.ExportResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.ExportResponse.displayName = 'proto.keys.ExportResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.SignRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.SignRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.SignRequest.displayName = 'proto.keys.SignRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.SignResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.SignResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.SignResponse.displayName = 'proto.keys.SignResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.VerifyRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.VerifyRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.VerifyRequest.displayName = 'proto.keys.VerifyRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.HashRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.HashRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.HashRequest.displayName = 'proto.keys.HashRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.HashResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.HashResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.HashResponse.displayName = 'proto.keys.HashResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.KeyID = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.keys.KeyID.repeatedFields_, null); -}; -goog.inherits(proto.keys.KeyID, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.KeyID.displayName = 'proto.keys.KeyID'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.ListResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.keys.ListResponse.repeatedFields_, null); -}; -goog.inherits(proto.keys.ListResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.ListResponse.displayName = 'proto.keys.ListResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.AddNameRequest = function(opt_data) { +proto.keys.ListRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.keys.AddNameRequest, jspb.Message); +goog.inherits(proto.keys.ListRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.keys.AddNameRequest.displayName = 'proto.keys.AddNameRequest'; + proto.keys.ListRequest.displayName = 'proto.keys.ListRequest'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.ListRequest.prototype.toObject = function(opt_includeInstance) { @@ -523,8 +75,8 @@ proto.keys.ListRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ListRequest} msg The msg instance to transform. * @return {!Object} @@ -621,29 +173,41 @@ proto.keys.ListRequest.prototype.getKeyname = function() { }; -/** - * @param {string} value - * @return {!proto.keys.ListRequest} returns this - */ +/** @param {string} value */ proto.keys.ListRequest.prototype.setKeyname = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.VerifyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.VerifyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.VerifyResponse.displayName = 'proto.keys.VerifyResponse'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.VerifyResponse.prototype.toObject = function(opt_includeInstance) { @@ -653,8 +217,8 @@ proto.keys.VerifyResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.VerifyResponse} msg The msg instance to transform. * @return {!Object} @@ -732,19 +296,34 @@ proto.keys.VerifyResponse.serializeBinaryToWriter = function(message, writer) { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.RemoveNameResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.RemoveNameResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.RemoveNameResponse.displayName = 'proto.keys.RemoveNameResponse'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.RemoveNameResponse.prototype.toObject = function(opt_includeInstance) { @@ -754,8 +333,8 @@ proto.keys.RemoveNameResponse.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.RemoveNameResponse} msg The msg instance to transform. * @return {!Object} @@ -833,19 +412,34 @@ proto.keys.RemoveNameResponse.serializeBinaryToWriter = function(message, writer +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.AddNameResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.AddNameResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.AddNameResponse.displayName = 'proto.keys.AddNameResponse'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.AddNameResponse.prototype.toObject = function(opt_includeInstance) { @@ -855,8 +449,8 @@ proto.keys.AddNameResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.AddNameResponse} msg The msg instance to transform. * @return {!Object} @@ -934,19 +528,34 @@ proto.keys.AddNameResponse.serializeBinaryToWriter = function(message, writer) { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.RemoveNameRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.RemoveNameRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.RemoveNameRequest.displayName = 'proto.keys.RemoveNameRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.RemoveNameRequest.prototype.toObject = function(opt_includeInstance) { @@ -956,8 +565,8 @@ proto.keys.RemoveNameRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.RemoveNameRequest} msg The msg instance to transform. * @return {!Object} @@ -1054,29 +663,41 @@ proto.keys.RemoveNameRequest.prototype.getKeyname = function() { }; -/** - * @param {string} value - * @return {!proto.keys.RemoveNameRequest} returns this - */ +/** @param {string} value */ proto.keys.RemoveNameRequest.prototype.setKeyname = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.GenRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.GenRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.GenRequest.displayName = 'proto.keys.GenRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.GenRequest.prototype.toObject = function(opt_includeInstance) { @@ -1086,8 +707,8 @@ proto.keys.GenRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.GenRequest} msg The msg instance to transform. * @return {!Object} @@ -1208,12 +829,9 @@ proto.keys.GenRequest.prototype.getPassphrase = function() { }; -/** - * @param {string} value - * @return {!proto.keys.GenRequest} returns this - */ +/** @param {string} value */ proto.keys.GenRequest.prototype.setPassphrase = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -1226,12 +844,9 @@ proto.keys.GenRequest.prototype.getCurvetype = function() { }; -/** - * @param {string} value - * @return {!proto.keys.GenRequest} returns this - */ +/** @param {string} value */ proto.keys.GenRequest.prototype.setCurvetype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; @@ -1244,29 +859,41 @@ proto.keys.GenRequest.prototype.getKeyname = function() { }; -/** - * @param {string} value - * @return {!proto.keys.GenRequest} returns this - */ +/** @param {string} value */ proto.keys.GenRequest.prototype.setKeyname = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.GenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.GenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.GenResponse.displayName = 'proto.keys.GenResponse'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.GenResponse.prototype.toObject = function(opt_includeInstance) { @@ -1276,8 +903,8 @@ proto.keys.GenResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.GenResponse} msg The msg instance to transform. * @return {!Object} @@ -1374,29 +1001,41 @@ proto.keys.GenResponse.prototype.getAddress = function() { }; -/** - * @param {string} value - * @return {!proto.keys.GenResponse} returns this - */ +/** @param {string} value */ proto.keys.GenResponse.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.PubRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.PubRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.PubRequest.displayName = 'proto.keys.PubRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.PubRequest.prototype.toObject = function(opt_includeInstance) { @@ -1406,8 +1045,8 @@ proto.keys.PubRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.PubRequest} msg The msg instance to transform. * @return {!Object} @@ -1516,12 +1155,9 @@ proto.keys.PubRequest.prototype.getAddress = function() { }; -/** - * @param {string} value - * @return {!proto.keys.PubRequest} returns this - */ +/** @param {string} value */ proto.keys.PubRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -1534,29 +1170,41 @@ proto.keys.PubRequest.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.keys.PubRequest} returns this - */ +/** @param {string} value */ proto.keys.PubRequest.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.PubResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.PubResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.PubResponse.displayName = 'proto.keys.PubResponse'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.PubResponse.prototype.toObject = function(opt_includeInstance) { @@ -1566,8 +1214,8 @@ proto.keys.PubResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.PubResponse} msg The msg instance to transform. * @return {!Object} @@ -1700,12 +1348,9 @@ proto.keys.PubResponse.prototype.getPublickey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.keys.PubResponse} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.keys.PubResponse.prototype.setPublickey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1718,29 +1363,41 @@ proto.keys.PubResponse.prototype.getCurvetype = function() { }; -/** - * @param {string} value - * @return {!proto.keys.PubResponse} returns this - */ +/** @param {string} value */ proto.keys.PubResponse.prototype.setCurvetype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ImportJSONRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ImportJSONRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.ImportJSONRequest.displayName = 'proto.keys.ImportJSONRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.ImportJSONRequest.prototype.toObject = function(opt_includeInstance) { @@ -1750,8 +1407,8 @@ proto.keys.ImportJSONRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ImportJSONRequest} msg The msg instance to transform. * @return {!Object} @@ -1860,12 +1517,9 @@ proto.keys.ImportJSONRequest.prototype.getPassphrase = function() { }; -/** - * @param {string} value - * @return {!proto.keys.ImportJSONRequest} returns this - */ +/** @param {string} value */ proto.keys.ImportJSONRequest.prototype.setPassphrase = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -1878,29 +1532,41 @@ proto.keys.ImportJSONRequest.prototype.getJson = function() { }; -/** - * @param {string} value - * @return {!proto.keys.ImportJSONRequest} returns this - */ +/** @param {string} value */ proto.keys.ImportJSONRequest.prototype.setJson = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ImportResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ImportResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.ImportResponse.displayName = 'proto.keys.ImportResponse'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.ImportResponse.prototype.toObject = function(opt_includeInstance) { @@ -1910,8 +1576,8 @@ proto.keys.ImportResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ImportResponse} msg The msg instance to transform. * @return {!Object} @@ -2008,29 +1674,41 @@ proto.keys.ImportResponse.prototype.getAddress = function() { }; -/** - * @param {string} value - * @return {!proto.keys.ImportResponse} returns this - */ +/** @param {string} value */ proto.keys.ImportResponse.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ImportRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ImportRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.ImportRequest.displayName = 'proto.keys.ImportRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.ImportRequest.prototype.toObject = function(opt_includeInstance) { @@ -2040,8 +1718,8 @@ proto.keys.ImportRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ImportRequest} msg The msg instance to transform. * @return {!Object} @@ -2174,12 +1852,9 @@ proto.keys.ImportRequest.prototype.getPassphrase = function() { }; -/** - * @param {string} value - * @return {!proto.keys.ImportRequest} returns this - */ +/** @param {string} value */ proto.keys.ImportRequest.prototype.setPassphrase = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -2192,12 +1867,9 @@ proto.keys.ImportRequest.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.keys.ImportRequest} returns this - */ +/** @param {string} value */ proto.keys.ImportRequest.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; @@ -2210,12 +1882,9 @@ proto.keys.ImportRequest.prototype.getCurvetype = function() { }; -/** - * @param {string} value - * @return {!proto.keys.ImportRequest} returns this - */ +/** @param {string} value */ proto.keys.ImportRequest.prototype.setCurvetype = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; @@ -2252,29 +1921,41 @@ proto.keys.ImportRequest.prototype.getKeybytes_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.keys.ImportRequest} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.keys.ImportRequest.prototype.setKeybytes = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); + jspb.Message.setProto3BytesField(this, 4, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ExportRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ExportRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.ExportRequest.displayName = 'proto.keys.ExportRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.ExportRequest.prototype.toObject = function(opt_includeInstance) { @@ -2284,8 +1965,8 @@ proto.keys.ExportRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ExportRequest} msg The msg instance to transform. * @return {!Object} @@ -2406,12 +2087,9 @@ proto.keys.ExportRequest.prototype.getPassphrase = function() { }; -/** - * @param {string} value - * @return {!proto.keys.ExportRequest} returns this - */ +/** @param {string} value */ proto.keys.ExportRequest.prototype.setPassphrase = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -2424,12 +2102,9 @@ proto.keys.ExportRequest.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.keys.ExportRequest} returns this - */ +/** @param {string} value */ proto.keys.ExportRequest.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; @@ -2442,29 +2117,41 @@ proto.keys.ExportRequest.prototype.getAddress = function() { }; -/** - * @param {string} value - * @return {!proto.keys.ExportRequest} returns this - */ +/** @param {string} value */ proto.keys.ExportRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ExportResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ExportResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.ExportResponse.displayName = 'proto.keys.ExportResponse'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.ExportResponse.prototype.toObject = function(opt_includeInstance) { @@ -2474,8 +2161,8 @@ proto.keys.ExportResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ExportResponse} msg The msg instance to transform. * @return {!Object} @@ -2632,12 +2319,9 @@ proto.keys.ExportResponse.prototype.getPublickey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.keys.ExportResponse} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.keys.ExportResponse.prototype.setPublickey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2674,12 +2358,9 @@ proto.keys.ExportResponse.prototype.getPrivatekey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.keys.ExportResponse} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.keys.ExportResponse.prototype.setPrivatekey = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -2716,12 +2397,9 @@ proto.keys.ExportResponse.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.keys.ExportResponse} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.keys.ExportResponse.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setProto3BytesField(this, 3, value); }; @@ -2734,29 +2412,41 @@ proto.keys.ExportResponse.prototype.getCurvetype = function() { }; -/** - * @param {string} value - * @return {!proto.keys.ExportResponse} returns this - */ +/** @param {string} value */ proto.keys.ExportResponse.prototype.setCurvetype = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); + jspb.Message.setProto3StringField(this, 4, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.SignRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.SignRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.SignRequest.displayName = 'proto.keys.SignRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.SignRequest.prototype.toObject = function(opt_includeInstance) { @@ -2766,8 +2456,8 @@ proto.keys.SignRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.SignRequest} msg The msg instance to transform. * @return {!Object} @@ -2900,12 +2590,9 @@ proto.keys.SignRequest.prototype.getPassphrase = function() { }; -/** - * @param {string} value - * @return {!proto.keys.SignRequest} returns this - */ +/** @param {string} value */ proto.keys.SignRequest.prototype.setPassphrase = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -2918,12 +2605,9 @@ proto.keys.SignRequest.prototype.getAddress = function() { }; -/** - * @param {string} value - * @return {!proto.keys.SignRequest} returns this - */ +/** @param {string} value */ proto.keys.SignRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; @@ -2936,12 +2620,9 @@ proto.keys.SignRequest.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.keys.SignRequest} returns this - */ +/** @param {string} value */ proto.keys.SignRequest.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; @@ -2978,29 +2659,41 @@ proto.keys.SignRequest.prototype.getMessage_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.keys.SignRequest} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.keys.SignRequest.prototype.setMessage = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); + jspb.Message.setProto3BytesField(this, 4, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.SignResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.SignResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.SignResponse.displayName = 'proto.keys.SignResponse'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.SignResponse.prototype.toObject = function(opt_includeInstance) { @@ -3010,8 +2703,8 @@ proto.keys.SignResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.SignResponse} msg The msg instance to transform. * @return {!Object} @@ -3111,21 +2804,14 @@ proto.keys.SignResponse.prototype.getSignature = function() { }; -/** - * @param {?proto.crypto.Signature|undefined} value - * @return {!proto.keys.SignResponse} returns this -*/ +/** @param {?proto.crypto.Signature|undefined} value */ proto.keys.SignResponse.prototype.setSignature = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.keys.SignResponse} returns this - */ proto.keys.SignResponse.prototype.clearSignature = function() { - return this.setSignature(undefined); + this.setSignature(undefined); }; @@ -3139,19 +2825,34 @@ proto.keys.SignResponse.prototype.hasSignature = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.VerifyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.VerifyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.VerifyRequest.displayName = 'proto.keys.VerifyRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.VerifyRequest.prototype.toObject = function(opt_includeInstance) { @@ -3161,8 +2862,8 @@ proto.keys.VerifyRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.VerifyRequest} msg The msg instance to transform. * @return {!Object} @@ -3309,12 +3010,9 @@ proto.keys.VerifyRequest.prototype.getPublickey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.keys.VerifyRequest} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.keys.VerifyRequest.prototype.setPublickey = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -3351,12 +3049,9 @@ proto.keys.VerifyRequest.prototype.getMessage_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.keys.VerifyRequest} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.keys.VerifyRequest.prototype.setMessage = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setProto3BytesField(this, 3, value); }; @@ -3370,21 +3065,14 @@ proto.keys.VerifyRequest.prototype.getSignature = function() { }; -/** - * @param {?proto.crypto.Signature|undefined} value - * @return {!proto.keys.VerifyRequest} returns this -*/ +/** @param {?proto.crypto.Signature|undefined} value */ proto.keys.VerifyRequest.prototype.setSignature = function(value) { - return jspb.Message.setWrapperField(this, 5, value); + jspb.Message.setWrapperField(this, 5, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.keys.VerifyRequest} returns this - */ proto.keys.VerifyRequest.prototype.clearSignature = function() { - return this.setSignature(undefined); + this.setSignature(undefined); }; @@ -3398,19 +3086,34 @@ proto.keys.VerifyRequest.prototype.hasSignature = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.HashRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.HashRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.HashRequest.displayName = 'proto.keys.HashRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.HashRequest.prototype.toObject = function(opt_includeInstance) { @@ -3420,8 +3123,8 @@ proto.keys.HashRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.HashRequest} msg The msg instance to transform. * @return {!Object} @@ -3530,12 +3233,9 @@ proto.keys.HashRequest.prototype.getHashtype = function() { }; -/** - * @param {string} value - * @return {!proto.keys.HashRequest} returns this - */ +/** @param {string} value */ proto.keys.HashRequest.prototype.setHashtype = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -3572,29 +3272,41 @@ proto.keys.HashRequest.prototype.getMessage_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.keys.HashRequest} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.keys.HashRequest.prototype.setMessage = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.HashResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.HashResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.HashResponse.displayName = 'proto.keys.HashResponse'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.HashResponse.prototype.toObject = function(opt_includeInstance) { @@ -3604,8 +3316,8 @@ proto.keys.HashResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.HashResponse} msg The msg instance to transform. * @return {!Object} @@ -3702,16 +3414,30 @@ proto.keys.HashResponse.prototype.getHash = function() { }; -/** - * @param {string} value - * @return {!proto.keys.HashResponse} returns this - */ +/** @param {string} value */ proto.keys.HashResponse.prototype.setHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.KeyID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.keys.KeyID.repeatedFields_, null); +}; +goog.inherits(proto.keys.KeyID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.KeyID.displayName = 'proto.keys.KeyID'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -3723,15 +3449,13 @@ proto.keys.KeyID.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { @@ -3741,8 +3465,8 @@ proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.KeyID} msg The msg instance to transform. * @return {!Object} @@ -3751,7 +3475,7 @@ proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { proto.keys.KeyID.toObject = function(includeInstance, msg) { var f, obj = { address: jspb.Message.getFieldWithDefault(msg, 1, ""), - keynameList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + keynameList: jspb.Message.getRepeatedField(msg, 2) }; if (includeInstance) { @@ -3851,12 +3575,9 @@ proto.keys.KeyID.prototype.getAddress = function() { }; -/** - * @param {string} value - * @return {!proto.keys.KeyID} returns this - */ +/** @param {string} value */ proto.keys.KeyID.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -3869,35 +3590,44 @@ proto.keys.KeyID.prototype.getKeynameList = function() { }; -/** - * @param {!Array} value - * @return {!proto.keys.KeyID} returns this - */ +/** @param {!Array} value */ proto.keys.KeyID.prototype.setKeynameList = function(value) { - return jspb.Message.setField(this, 2, value || []); + jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index - * @return {!proto.keys.KeyID} returns this */ proto.keys.KeyID.prototype.addKeyname = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); + jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.keys.KeyID} returns this - */ proto.keys.KeyID.prototype.clearKeynameList = function() { - return this.setKeynameList([]); + this.setKeynameList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ListResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.keys.ListResponse.repeatedFields_, null); +}; +goog.inherits(proto.keys.ListResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.ListResponse.displayName = 'proto.keys.ListResponse'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -3909,15 +3639,13 @@ proto.keys.ListResponse.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.ListResponse.prototype.toObject = function(opt_includeInstance) { @@ -3927,8 +3655,8 @@ proto.keys.ListResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ListResponse} msg The msg instance to transform. * @return {!Object} @@ -4029,12 +3757,9 @@ proto.keys.ListResponse.prototype.getKeyList = function() { }; -/** - * @param {!Array} value - * @return {!proto.keys.ListResponse} returns this -*/ +/** @param {!Array} value */ proto.keys.ListResponse.prototype.setKeyList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -4048,29 +3773,40 @@ proto.keys.ListResponse.prototype.addKey = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.keys.ListResponse} returns this - */ proto.keys.ListResponse.prototype.clearKeyList = function() { - return this.setKeyList([]); + this.setKeyList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.AddNameRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.AddNameRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.keys.AddNameRequest.displayName = 'proto.keys.AddNameRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.keys.AddNameRequest.prototype.toObject = function(opt_includeInstance) { @@ -4080,8 +3816,8 @@ proto.keys.AddNameRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.AddNameRequest} msg The msg instance to transform. * @return {!Object} @@ -4190,12 +3926,9 @@ proto.keys.AddNameRequest.prototype.getKeyname = function() { }; -/** - * @param {string} value - * @return {!proto.keys.AddNameRequest} returns this - */ +/** @param {string} value */ proto.keys.AddNameRequest.prototype.setKeyname = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -4208,12 +3941,9 @@ proto.keys.AddNameRequest.prototype.getAddress = function() { }; -/** - * @param {string} value - * @return {!proto.keys.AddNameRequest} returns this - */ +/** @param {string} value */ proto.keys.AddNameRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; diff --git a/js/proto/names_grpc_pb.d.ts b/js/proto/names_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/names_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/names_pb.d.ts b/js/proto/names_pb.d.ts index b6dadd6cb..aece9d5c8 100644 --- a/js/proto/names_pb.d.ts +++ b/js/proto/names_pb.d.ts @@ -1,40 +1,43 @@ // package: names // file: names.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; -export class Entry extends jspb.Message { - getName(): string; - setName(value: string): void; - - getOwner(): Uint8Array | string; - getOwner_asU8(): Uint8Array; - getOwner_asB64(): string; - setOwner(value: Uint8Array | string): void; - - getData(): string; - setData(value: string): void; - - getExpires(): number; - setExpires(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Entry.AsObject; - static toObject(includeInstance: boolean, msg: Entry): Entry.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Entry, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Entry; - static deserializeBinaryFromReader(message: Entry, reader: jspb.BinaryReader): Entry; +export class Entry extends jspb.Message { + getName(): string; + setName(value: string): void; + + getOwner(): Uint8Array | string; + getOwner_asU8(): Uint8Array; + getOwner_asB64(): string; + setOwner(value: Uint8Array | string): void; + + getData(): string; + setData(value: string): void; + + getExpires(): number; + setExpires(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Entry.AsObject; + static toObject(includeInstance: boolean, msg: Entry): Entry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Entry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Entry; + static deserializeBinaryFromReader(message: Entry, reader: jspb.BinaryReader): Entry; } export namespace Entry { - export type AsObject = { - name: string, - owner: Uint8Array | string, - data: string, - expires: number, - } + export type AsObject = { + name: string, + owner: Uint8Array | string, + data: string, + expires: number, + } } - diff --git a/js/proto/names_pb.js b/js/proto/names_pb.js index c338739fe..d7ecf7281 100644 --- a/js/proto/names_pb.js +++ b/js/proto/names_pb.js @@ -1,4 +1,3 @@ -// source: names.proto /** * @fileoverview * @enhanceable @@ -15,6 +14,7 @@ var global = Function('return this')(); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.names.Entry', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,26 +30,19 @@ proto.names.Entry = function(opt_data) { }; goog.inherits(proto.names.Entry, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.names.Entry.displayName = 'proto.names.Entry'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.names.Entry.prototype.toObject = function(opt_includeInstance) { @@ -59,8 +52,8 @@ proto.names.Entry.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.names.Entry} msg The msg instance to transform. * @return {!Object} @@ -193,12 +186,9 @@ proto.names.Entry.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.names.Entry} returns this - */ +/** @param {string} value */ proto.names.Entry.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -235,12 +225,9 @@ proto.names.Entry.prototype.getOwner_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.names.Entry} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.names.Entry.prototype.setOwner = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -253,12 +240,9 @@ proto.names.Entry.prototype.getData = function() { }; -/** - * @param {string} value - * @return {!proto.names.Entry} returns this - */ +/** @param {string} value */ proto.names.Entry.prototype.setData = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; @@ -271,12 +255,9 @@ proto.names.Entry.prototype.getExpires = function() { }; -/** - * @param {number} value - * @return {!proto.names.Entry} returns this - */ +/** @param {number} value */ proto.names.Entry.prototype.setExpires = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3IntField(this, 4, value); }; diff --git a/js/proto/payload_grpc_pb.d.ts b/js/proto/payload_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/payload_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/payload_pb.d.ts b/js/proto/payload_pb.d.ts index 048fe89a0..73606cf61 100644 --- a/js/proto/payload_pb.d.ts +++ b/js/proto/payload_pb.d.ts @@ -1,589 +1,629 @@ // package: payload // file: payload.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as permission_pb from "./permission_pb"; import * as registry_pb from "./registry_pb"; import * as spec_pb from "./spec_pb"; -export class Any extends jspb.Message { - hasCalltx(): boolean; - clearCalltx(): void; - getCalltx(): CallTx | undefined; - setCalltx(value?: CallTx): void; - - hasSendtx(): boolean; - clearSendtx(): void; - getSendtx(): SendTx | undefined; - setSendtx(value?: SendTx): void; - - hasNametx(): boolean; - clearNametx(): void; - getNametx(): NameTx | undefined; - setNametx(value?: NameTx): void; - - hasPermstx(): boolean; - clearPermstx(): void; - getPermstx(): PermsTx | undefined; - setPermstx(value?: PermsTx): void; - - hasGovtx(): boolean; - clearGovtx(): void; - getGovtx(): GovTx | undefined; - setGovtx(value?: GovTx): void; - - hasBondtx(): boolean; - clearBondtx(): void; - getBondtx(): BondTx | undefined; - setBondtx(value?: BondTx): void; - - hasUnbondtx(): boolean; - clearUnbondtx(): void; - getUnbondtx(): UnbondTx | undefined; - setUnbondtx(value?: UnbondTx): void; - - hasBatchtx(): boolean; - clearBatchtx(): void; - getBatchtx(): BatchTx | undefined; - setBatchtx(value?: BatchTx): void; - - hasProposaltx(): boolean; - clearProposaltx(): void; - getProposaltx(): ProposalTx | undefined; - setProposaltx(value?: ProposalTx): void; - - hasIdentifytx(): boolean; - clearIdentifytx(): void; - getIdentifytx(): IdentifyTx | undefined; - setIdentifytx(value?: IdentifyTx): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Any.AsObject; - static toObject(includeInstance: boolean, msg: Any): Any.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Any, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Any; - static deserializeBinaryFromReader(message: Any, reader: jspb.BinaryReader): Any; +export class Any extends jspb.Message { + + hasCalltx(): boolean; + clearCalltx(): void; + getCalltx(): CallTx | undefined; + setCalltx(value?: CallTx): void; + + + hasSendtx(): boolean; + clearSendtx(): void; + getSendtx(): SendTx | undefined; + setSendtx(value?: SendTx): void; + + + hasNametx(): boolean; + clearNametx(): void; + getNametx(): NameTx | undefined; + setNametx(value?: NameTx): void; + + + hasPermstx(): boolean; + clearPermstx(): void; + getPermstx(): PermsTx | undefined; + setPermstx(value?: PermsTx): void; + + + hasGovtx(): boolean; + clearGovtx(): void; + getGovtx(): GovTx | undefined; + setGovtx(value?: GovTx): void; + + + hasBondtx(): boolean; + clearBondtx(): void; + getBondtx(): BondTx | undefined; + setBondtx(value?: BondTx): void; + + + hasUnbondtx(): boolean; + clearUnbondtx(): void; + getUnbondtx(): UnbondTx | undefined; + setUnbondtx(value?: UnbondTx): void; + + + hasBatchtx(): boolean; + clearBatchtx(): void; + getBatchtx(): BatchTx | undefined; + setBatchtx(value?: BatchTx): void; + + + hasProposaltx(): boolean; + clearProposaltx(): void; + getProposaltx(): ProposalTx | undefined; + setProposaltx(value?: ProposalTx): void; + + + hasIdentifytx(): boolean; + clearIdentifytx(): void; + getIdentifytx(): IdentifyTx | undefined; + setIdentifytx(value?: IdentifyTx): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Any.AsObject; + static toObject(includeInstance: boolean, msg: Any): Any.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Any, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Any; + static deserializeBinaryFromReader(message: Any, reader: jspb.BinaryReader): Any; } export namespace Any { - export type AsObject = { - calltx?: CallTx.AsObject, - sendtx?: SendTx.AsObject, - nametx?: NameTx.AsObject, - permstx?: PermsTx.AsObject, - govtx?: GovTx.AsObject, - bondtx?: BondTx.AsObject, - unbondtx?: UnbondTx.AsObject, - batchtx?: BatchTx.AsObject, - proposaltx?: ProposalTx.AsObject, - identifytx?: IdentifyTx.AsObject, - } -} - -export class TxInput extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; - - getAmount(): number; - setAmount(value: number): void; - - getSequence(): number; - setSequence(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TxInput.AsObject; - static toObject(includeInstance: boolean, msg: TxInput): TxInput.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TxInput, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TxInput; - static deserializeBinaryFromReader(message: TxInput, reader: jspb.BinaryReader): TxInput; + export type AsObject = { + calltx?: CallTx.AsObject, + sendtx?: SendTx.AsObject, + nametx?: NameTx.AsObject, + permstx?: PermsTx.AsObject, + govtx?: GovTx.AsObject, + bondtx?: BondTx.AsObject, + unbondtx?: UnbondTx.AsObject, + batchtx?: BatchTx.AsObject, + proposaltx?: ProposalTx.AsObject, + identifytx?: IdentifyTx.AsObject, + } +} + +export class TxInput extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getAmount(): number; + setAmount(value: number): void; + + getSequence(): number; + setSequence(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxInput.AsObject; + static toObject(includeInstance: boolean, msg: TxInput): TxInput.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxInput, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxInput; + static deserializeBinaryFromReader(message: TxInput, reader: jspb.BinaryReader): TxInput; } export namespace TxInput { - export type AsObject = { - address: Uint8Array | string, - amount: number, - sequence: number, - } + export type AsObject = { + address: Uint8Array | string, + amount: number, + sequence: number, + } } -export class TxOutput extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; +export class TxOutput extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; - getAmount(): number; - setAmount(value: number): void; + getAmount(): number; + setAmount(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TxOutput.AsObject; - static toObject(includeInstance: boolean, msg: TxOutput): TxOutput.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TxOutput, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TxOutput; - static deserializeBinaryFromReader(message: TxOutput, reader: jspb.BinaryReader): TxOutput; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxOutput.AsObject; + static toObject(includeInstance: boolean, msg: TxOutput): TxOutput.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxOutput, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxOutput; + static deserializeBinaryFromReader(message: TxOutput, reader: jspb.BinaryReader): TxOutput; } export namespace TxOutput { - export type AsObject = { - address: Uint8Array | string, - amount: number, - } + export type AsObject = { + address: Uint8Array | string, + amount: number, + } } -export class CallTx extends jspb.Message { - hasInput(): boolean; - clearInput(): void; - getInput(): TxInput | undefined; - setInput(value?: TxInput): void; +export class CallTx extends jspb.Message { + + hasInput(): boolean; + clearInput(): void; + getInput(): TxInput | undefined; + setInput(value?: TxInput): void; - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; - getGaslimit(): number; - setGaslimit(value: number): void; + getGaslimit(): number; + setGaslimit(value: number): void; - getFee(): number; - setFee(value: number): void; + getFee(): number; + setFee(value: number): void; - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; - getWasm(): Uint8Array | string; - getWasm_asU8(): Uint8Array; - getWasm_asB64(): string; - setWasm(value: Uint8Array | string): void; + getWasm(): Uint8Array | string; + getWasm_asU8(): Uint8Array; + getWasm_asB64(): string; + setWasm(value: Uint8Array | string): void; - clearContractmetaList(): void; - getContractmetaList(): Array; - setContractmetaList(value: Array): void; - addContractmeta(value?: ContractMeta, index?: number): ContractMeta; + clearContractmetaList(): void; + getContractmetaList(): Array; + setContractmetaList(value: Array): void; + addContractmeta(value?: ContractMeta, index?: number): ContractMeta; - getGasprice(): number; - setGasprice(value: number): void; + getGasprice(): number; + setGasprice(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CallTx.AsObject; - static toObject(includeInstance: boolean, msg: CallTx): CallTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CallTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CallTx; - static deserializeBinaryFromReader(message: CallTx, reader: jspb.BinaryReader): CallTx; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CallTx.AsObject; + static toObject(includeInstance: boolean, msg: CallTx): CallTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CallTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CallTx; + static deserializeBinaryFromReader(message: CallTx, reader: jspb.BinaryReader): CallTx; } export namespace CallTx { - export type AsObject = { - input?: TxInput.AsObject, - address: Uint8Array | string, - gaslimit: number, - fee: number, - data: Uint8Array | string, - wasm: Uint8Array | string, - contractmetaList: Array, - gasprice: number, - } -} - -export class ContractMeta extends jspb.Message { - getCodehash(): Uint8Array | string; - getCodehash_asU8(): Uint8Array; - getCodehash_asB64(): string; - setCodehash(value: Uint8Array | string): void; - - getMeta(): string; - setMeta(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractMeta.AsObject; - static toObject(includeInstance: boolean, msg: ContractMeta): ContractMeta.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractMeta, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractMeta; - static deserializeBinaryFromReader(message: ContractMeta, reader: jspb.BinaryReader): ContractMeta; + export type AsObject = { + input?: TxInput.AsObject, + address: Uint8Array | string, + gaslimit: number, + fee: number, + data: Uint8Array | string, + wasm: Uint8Array | string, + contractmetaList: Array, + gasprice: number, + } +} + +export class ContractMeta extends jspb.Message { + getCodehash(): Uint8Array | string; + getCodehash_asU8(): Uint8Array; + getCodehash_asB64(): string; + setCodehash(value: Uint8Array | string): void; + + getMeta(): string; + setMeta(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractMeta.AsObject; + static toObject(includeInstance: boolean, msg: ContractMeta): ContractMeta.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractMeta, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractMeta; + static deserializeBinaryFromReader(message: ContractMeta, reader: jspb.BinaryReader): ContractMeta; } export namespace ContractMeta { - export type AsObject = { - codehash: Uint8Array | string, - meta: string, - } + export type AsObject = { + codehash: Uint8Array | string, + meta: string, + } } -export class SendTx extends jspb.Message { - clearInputsList(): void; - getInputsList(): Array; - setInputsList(value: Array): void; - addInputs(value?: TxInput, index?: number): TxInput; +export class SendTx extends jspb.Message { + clearInputsList(): void; + getInputsList(): Array; + setInputsList(value: Array): void; + addInputs(value?: TxInput, index?: number): TxInput; + + clearOutputsList(): void; + getOutputsList(): Array; + setOutputsList(value: Array): void; + addOutputs(value?: TxOutput, index?: number): TxOutput; - clearOutputsList(): void; - getOutputsList(): Array; - setOutputsList(value: Array): void; - addOutputs(value?: TxOutput, index?: number): TxOutput; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendTx.AsObject; - static toObject(includeInstance: boolean, msg: SendTx): SendTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendTx; - static deserializeBinaryFromReader(message: SendTx, reader: jspb.BinaryReader): SendTx; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendTx.AsObject; + static toObject(includeInstance: boolean, msg: SendTx): SendTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SendTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SendTx; + static deserializeBinaryFromReader(message: SendTx, reader: jspb.BinaryReader): SendTx; } export namespace SendTx { - export type AsObject = { - inputsList: Array, - outputsList: Array, - } + export type AsObject = { + inputsList: Array, + outputsList: Array, + } } -export class PermsTx extends jspb.Message { - hasInput(): boolean; - clearInput(): void; - getInput(): TxInput | undefined; - setInput(value?: TxInput): void; +export class PermsTx extends jspb.Message { + + hasInput(): boolean; + clearInput(): void; + getInput(): TxInput | undefined; + setInput(value?: TxInput): void; + - hasPermargs(): boolean; - clearPermargs(): void; - getPermargs(): permission_pb.PermArgs | undefined; - setPermargs(value?: permission_pb.PermArgs): void; + hasPermargs(): boolean; + clearPermargs(): void; + getPermargs(): permission_pb.PermArgs | undefined; + setPermargs(value?: permission_pb.PermArgs): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PermsTx.AsObject; - static toObject(includeInstance: boolean, msg: PermsTx): PermsTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PermsTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PermsTx; - static deserializeBinaryFromReader(message: PermsTx, reader: jspb.BinaryReader): PermsTx; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PermsTx.AsObject; + static toObject(includeInstance: boolean, msg: PermsTx): PermsTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PermsTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PermsTx; + static deserializeBinaryFromReader(message: PermsTx, reader: jspb.BinaryReader): PermsTx; } export namespace PermsTx { - export type AsObject = { - input?: TxInput.AsObject, - permargs?: permission_pb.PermArgs.AsObject, - } + export type AsObject = { + input?: TxInput.AsObject, + permargs?: permission_pb.PermArgs.AsObject, + } } -export class NameTx extends jspb.Message { - hasInput(): boolean; - clearInput(): void; - getInput(): TxInput | undefined; - setInput(value?: TxInput): void; +export class NameTx extends jspb.Message { + + hasInput(): boolean; + clearInput(): void; + getInput(): TxInput | undefined; + setInput(value?: TxInput): void; + + getName(): string; + setName(value: string): void; - getName(): string; - setName(value: string): void; + getData(): string; + setData(value: string): void; - getData(): string; - setData(value: string): void; + getFee(): number; + setFee(value: number): void; - getFee(): number; - setFee(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NameTx.AsObject; - static toObject(includeInstance: boolean, msg: NameTx): NameTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NameTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NameTx; - static deserializeBinaryFromReader(message: NameTx, reader: jspb.BinaryReader): NameTx; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NameTx.AsObject; + static toObject(includeInstance: boolean, msg: NameTx): NameTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NameTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NameTx; + static deserializeBinaryFromReader(message: NameTx, reader: jspb.BinaryReader): NameTx; } export namespace NameTx { - export type AsObject = { - input?: TxInput.AsObject, - name: string, - data: string, - fee: number, - } -} - -export class BondTx extends jspb.Message { - hasInput(): boolean; - clearInput(): void; - getInput(): TxInput | undefined; - setInput(value?: TxInput): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BondTx.AsObject; - static toObject(includeInstance: boolean, msg: BondTx): BondTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BondTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BondTx; - static deserializeBinaryFromReader(message: BondTx, reader: jspb.BinaryReader): BondTx; + export type AsObject = { + input?: TxInput.AsObject, + name: string, + data: string, + fee: number, + } +} + +export class BondTx extends jspb.Message { + + hasInput(): boolean; + clearInput(): void; + getInput(): TxInput | undefined; + setInput(value?: TxInput): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BondTx.AsObject; + static toObject(includeInstance: boolean, msg: BondTx): BondTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BondTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BondTx; + static deserializeBinaryFromReader(message: BondTx, reader: jspb.BinaryReader): BondTx; } export namespace BondTx { - export type AsObject = { - input?: TxInput.AsObject, - } + export type AsObject = { + input?: TxInput.AsObject, + } } -export class UnbondTx extends jspb.Message { - hasInput(): boolean; - clearInput(): void; - getInput(): TxInput | undefined; - setInput(value?: TxInput): void; +export class UnbondTx extends jspb.Message { + + hasInput(): boolean; + clearInput(): void; + getInput(): TxInput | undefined; + setInput(value?: TxInput): void; + + + hasOutput(): boolean; + clearOutput(): void; + getOutput(): TxOutput | undefined; + setOutput(value?: TxOutput): void; - hasOutput(): boolean; - clearOutput(): void; - getOutput(): TxOutput | undefined; - setOutput(value?: TxOutput): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UnbondTx.AsObject; - static toObject(includeInstance: boolean, msg: UnbondTx): UnbondTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UnbondTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UnbondTx; - static deserializeBinaryFromReader(message: UnbondTx, reader: jspb.BinaryReader): UnbondTx; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UnbondTx.AsObject; + static toObject(includeInstance: boolean, msg: UnbondTx): UnbondTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UnbondTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UnbondTx; + static deserializeBinaryFromReader(message: UnbondTx, reader: jspb.BinaryReader): UnbondTx; } export namespace UnbondTx { - export type AsObject = { - input?: TxInput.AsObject, - output?: TxOutput.AsObject, - } + export type AsObject = { + input?: TxInput.AsObject, + output?: TxOutput.AsObject, + } } -export class GovTx extends jspb.Message { - clearInputsList(): void; - getInputsList(): Array; - setInputsList(value: Array): void; - addInputs(value?: TxInput, index?: number): TxInput; +export class GovTx extends jspb.Message { + clearInputsList(): void; + getInputsList(): Array; + setInputsList(value: Array): void; + addInputs(value?: TxInput, index?: number): TxInput; - clearAccountupdatesList(): void; - getAccountupdatesList(): Array; - setAccountupdatesList(value: Array): void; - addAccountupdates(value?: spec_pb.TemplateAccount, index?: number): spec_pb.TemplateAccount; + clearAccountupdatesList(): void; + getAccountupdatesList(): Array; + setAccountupdatesList(value: Array): void; + addAccountupdates(value?: spec_pb.TemplateAccount, index?: number): spec_pb.TemplateAccount; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GovTx.AsObject; - static toObject(includeInstance: boolean, msg: GovTx): GovTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GovTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GovTx; - static deserializeBinaryFromReader(message: GovTx, reader: jspb.BinaryReader): GovTx; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GovTx.AsObject; + static toObject(includeInstance: boolean, msg: GovTx): GovTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GovTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GovTx; + static deserializeBinaryFromReader(message: GovTx, reader: jspb.BinaryReader): GovTx; } export namespace GovTx { - export type AsObject = { - inputsList: Array, - accountupdatesList: Array, - } + export type AsObject = { + inputsList: Array, + accountupdatesList: Array, + } } -export class ProposalTx extends jspb.Message { - hasInput(): boolean; - clearInput(): void; - getInput(): TxInput | undefined; - setInput(value?: TxInput): void; +export class ProposalTx extends jspb.Message { + + hasInput(): boolean; + clearInput(): void; + getInput(): TxInput | undefined; + setInput(value?: TxInput): void; + + getVotingweight(): number; + setVotingweight(value: number): void; + + getProposalhash(): Uint8Array | string; + getProposalhash_asU8(): Uint8Array; + getProposalhash_asB64(): string; + setProposalhash(value: Uint8Array | string): void; - getVotingweight(): number; - setVotingweight(value: number): void; - getProposalhash(): Uint8Array | string; - getProposalhash_asU8(): Uint8Array; - getProposalhash_asB64(): string; - setProposalhash(value: Uint8Array | string): void; + hasProposal(): boolean; + clearProposal(): void; + getProposal(): Proposal | undefined; + setProposal(value?: Proposal): void; - hasProposal(): boolean; - clearProposal(): void; - getProposal(): Proposal | undefined; - setProposal(value?: Proposal): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProposalTx.AsObject; - static toObject(includeInstance: boolean, msg: ProposalTx): ProposalTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProposalTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProposalTx; - static deserializeBinaryFromReader(message: ProposalTx, reader: jspb.BinaryReader): ProposalTx; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProposalTx.AsObject; + static toObject(includeInstance: boolean, msg: ProposalTx): ProposalTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProposalTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProposalTx; + static deserializeBinaryFromReader(message: ProposalTx, reader: jspb.BinaryReader): ProposalTx; } export namespace ProposalTx { - export type AsObject = { - input?: TxInput.AsObject, - votingweight: number, - proposalhash: Uint8Array | string, - proposal?: Proposal.AsObject, - } -} - -export class IdentifyTx extends jspb.Message { - clearInputsList(): void; - getInputsList(): Array; - setInputsList(value: Array): void; - addInputs(value?: TxInput, index?: number): TxInput; - - hasNode(): boolean; - clearNode(): void; - getNode(): registry_pb.NodeIdentity | undefined; - setNode(value?: registry_pb.NodeIdentity): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): IdentifyTx.AsObject; - static toObject(includeInstance: boolean, msg: IdentifyTx): IdentifyTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: IdentifyTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): IdentifyTx; - static deserializeBinaryFromReader(message: IdentifyTx, reader: jspb.BinaryReader): IdentifyTx; + export type AsObject = { + input?: TxInput.AsObject, + votingweight: number, + proposalhash: Uint8Array | string, + proposal?: Proposal.AsObject, + } +} + +export class IdentifyTx extends jspb.Message { + clearInputsList(): void; + getInputsList(): Array; + setInputsList(value: Array): void; + addInputs(value?: TxInput, index?: number): TxInput; + + + hasNode(): boolean; + clearNode(): void; + getNode(): registry_pb.NodeIdentity | undefined; + setNode(value?: registry_pb.NodeIdentity): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentifyTx.AsObject; + static toObject(includeInstance: boolean, msg: IdentifyTx): IdentifyTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentifyTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentifyTx; + static deserializeBinaryFromReader(message: IdentifyTx, reader: jspb.BinaryReader): IdentifyTx; } export namespace IdentifyTx { - export type AsObject = { - inputsList: Array, - node?: registry_pb.NodeIdentity.AsObject, - } + export type AsObject = { + inputsList: Array, + node?: registry_pb.NodeIdentity.AsObject, + } } -export class BatchTx extends jspb.Message { - clearInputsList(): void; - getInputsList(): Array; - setInputsList(value: Array): void; - addInputs(value?: TxInput, index?: number): TxInput; +export class BatchTx extends jspb.Message { + clearInputsList(): void; + getInputsList(): Array; + setInputsList(value: Array): void; + addInputs(value?: TxInput, index?: number): TxInput; - clearTxsList(): void; - getTxsList(): Array; - setTxsList(value: Array): void; - addTxs(value?: Any, index?: number): Any; + clearTxsList(): void; + getTxsList(): Array; + setTxsList(value: Array): void; + addTxs(value?: Any, index?: number): Any; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BatchTx.AsObject; - static toObject(includeInstance: boolean, msg: BatchTx): BatchTx.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BatchTx, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BatchTx; - static deserializeBinaryFromReader(message: BatchTx, reader: jspb.BinaryReader): BatchTx; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BatchTx.AsObject; + static toObject(includeInstance: boolean, msg: BatchTx): BatchTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BatchTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BatchTx; + static deserializeBinaryFromReader(message: BatchTx, reader: jspb.BinaryReader): BatchTx; } export namespace BatchTx { - export type AsObject = { - inputsList: Array, - txsList: Array, - } + export type AsObject = { + inputsList: Array, + txsList: Array, + } } -export class Vote extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; +export class Vote extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getVotingweight(): number; + setVotingweight(value: number): void; - getVotingweight(): number; - setVotingweight(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Vote.AsObject; - static toObject(includeInstance: boolean, msg: Vote): Vote.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Vote, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Vote; - static deserializeBinaryFromReader(message: Vote, reader: jspb.BinaryReader): Vote; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Vote.AsObject; + static toObject(includeInstance: boolean, msg: Vote): Vote.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Vote, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Vote; + static deserializeBinaryFromReader(message: Vote, reader: jspb.BinaryReader): Vote; } export namespace Vote { - export type AsObject = { - address: Uint8Array | string, - votingweight: number, - } + export type AsObject = { + address: Uint8Array | string, + votingweight: number, + } } -export class Proposal extends jspb.Message { - getName(): string; - setName(value: string): void; +export class Proposal extends jspb.Message { + getName(): string; + setName(value: string): void; - getDescription(): string; - setDescription(value: string): void; + getDescription(): string; + setDescription(value: string): void; - hasBatchtx(): boolean; - clearBatchtx(): void; - getBatchtx(): BatchTx | undefined; - setBatchtx(value?: BatchTx): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Proposal.AsObject; - static toObject(includeInstance: boolean, msg: Proposal): Proposal.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Proposal, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Proposal; - static deserializeBinaryFromReader(message: Proposal, reader: jspb.BinaryReader): Proposal; + hasBatchtx(): boolean; + clearBatchtx(): void; + getBatchtx(): BatchTx | undefined; + setBatchtx(value?: BatchTx): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Proposal.AsObject; + static toObject(includeInstance: boolean, msg: Proposal): Proposal.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Proposal, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Proposal; + static deserializeBinaryFromReader(message: Proposal, reader: jspb.BinaryReader): Proposal; } export namespace Proposal { - export type AsObject = { - name: string, - description: string, - batchtx?: BatchTx.AsObject, - } -} - -export class Ballot extends jspb.Message { - hasProposal(): boolean; - clearProposal(): void; - getProposal(): Proposal | undefined; - setProposal(value?: Proposal): void; - - getFinalizingtx(): Uint8Array | string; - getFinalizingtx_asU8(): Uint8Array; - getFinalizingtx_asB64(): string; - setFinalizingtx(value: Uint8Array | string): void; - - getProposalstate(): Ballot.ProposalStateMap[keyof Ballot.ProposalStateMap]; - setProposalstate(value: Ballot.ProposalStateMap[keyof Ballot.ProposalStateMap]): void; - - clearVotesList(): void; - getVotesList(): Array; - setVotesList(value: Array): void; - addVotes(value?: Vote, index?: number): Vote; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Ballot.AsObject; - static toObject(includeInstance: boolean, msg: Ballot): Ballot.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Ballot, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Ballot; - static deserializeBinaryFromReader(message: Ballot, reader: jspb.BinaryReader): Ballot; + export type AsObject = { + name: string, + description: string, + batchtx?: BatchTx.AsObject, + } } -export namespace Ballot { - export type AsObject = { - proposal?: Proposal.AsObject, - finalizingtx: Uint8Array | string, - proposalstate: Ballot.ProposalStateMap[keyof Ballot.ProposalStateMap], - votesList: Array, - } +export class Ballot extends jspb.Message { + + hasProposal(): boolean; + clearProposal(): void; + getProposal(): Proposal | undefined; + setProposal(value?: Proposal): void; - export interface ProposalStateMap { - PROPOSED: 0; - EXECUTED: 1; - FAILED: 2; - } + getFinalizingtx(): Uint8Array | string; + getFinalizingtx_asU8(): Uint8Array; + getFinalizingtx_asB64(): string; + setFinalizingtx(value: Uint8Array | string): void; - export const ProposalState: ProposalStateMap; + getProposalstate(): Ballot.ProposalState; + setProposalstate(value: Ballot.ProposalState): void; + + clearVotesList(): void; + getVotesList(): Array; + setVotesList(value: Array): void; + addVotes(value?: Vote, index?: number): Vote; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Ballot.AsObject; + static toObject(includeInstance: boolean, msg: Ballot): Ballot.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Ballot, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Ballot; + static deserializeBinaryFromReader(message: Ballot, reader: jspb.BinaryReader): Ballot; } +export namespace Ballot { + export type AsObject = { + proposal?: Proposal.AsObject, + finalizingtx: Uint8Array | string, + proposalstate: Ballot.ProposalState, + votesList: Array, + } + + export enum ProposalState { + PROPOSED = 0, + EXECUTED = 1, + FAILED = 2, + } + +} diff --git a/js/proto/payload_pb.js b/js/proto/payload_pb.js index e04dd30d3..c6d00e48d 100644 --- a/js/proto/payload_pb.js +++ b/js/proto/payload_pb.js @@ -1,4 +1,3 @@ -// source: payload.proto /** * @fileoverview * @enhanceable @@ -38,6 +37,7 @@ goog.exportSymbol('proto.payload.TxInput', null, global); goog.exportSymbol('proto.payload.TxOutput', null, global); goog.exportSymbol('proto.payload.UnbondTx', null, global); goog.exportSymbol('proto.payload.Vote', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -53,362 +53,19 @@ proto.payload.Any = function(opt_data) { }; goog.inherits(proto.payload.Any, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.payload.Any.displayName = 'proto.payload.Any'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.TxInput = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.TxInput, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.TxInput.displayName = 'proto.payload.TxInput'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.TxOutput = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.TxOutput, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.TxOutput.displayName = 'proto.payload.TxOutput'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.CallTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.CallTx.repeatedFields_, null); -}; -goog.inherits(proto.payload.CallTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.CallTx.displayName = 'proto.payload.CallTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.ContractMeta = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.ContractMeta, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.ContractMeta.displayName = 'proto.payload.ContractMeta'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.SendTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.SendTx.repeatedFields_, null); -}; -goog.inherits(proto.payload.SendTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.SendTx.displayName = 'proto.payload.SendTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.PermsTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.PermsTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.PermsTx.displayName = 'proto.payload.PermsTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.NameTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.NameTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.NameTx.displayName = 'proto.payload.NameTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.BondTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.BondTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.BondTx.displayName = 'proto.payload.BondTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.UnbondTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.UnbondTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.UnbondTx.displayName = 'proto.payload.UnbondTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.GovTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.GovTx.repeatedFields_, null); -}; -goog.inherits(proto.payload.GovTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.GovTx.displayName = 'proto.payload.GovTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.ProposalTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.ProposalTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.ProposalTx.displayName = 'proto.payload.ProposalTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.IdentifyTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.IdentifyTx.repeatedFields_, null); -}; -goog.inherits(proto.payload.IdentifyTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.IdentifyTx.displayName = 'proto.payload.IdentifyTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.BatchTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.BatchTx.repeatedFields_, null); -}; -goog.inherits(proto.payload.BatchTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.BatchTx.displayName = 'proto.payload.BatchTx'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.Vote = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.Vote, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.Vote.displayName = 'proto.payload.Vote'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.Proposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.Proposal, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.Proposal.displayName = 'proto.payload.Proposal'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.Ballot = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.Ballot.repeatedFields_, null); -}; -goog.inherits(proto.payload.Ballot, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.payload.Ballot.displayName = 'proto.payload.Ballot'; -} - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.Any.prototype.toObject = function(opt_includeInstance) { @@ -418,8 +75,8 @@ proto.payload.Any.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Any} msg The msg instance to transform. * @return {!Object} @@ -645,21 +302,14 @@ proto.payload.Any.prototype.getCalltx = function() { }; -/** - * @param {?proto.payload.CallTx|undefined} value - * @return {!proto.payload.Any} returns this -*/ +/** @param {?proto.payload.CallTx|undefined} value */ proto.payload.Any.prototype.setCalltx = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.Any} returns this - */ proto.payload.Any.prototype.clearCalltx = function() { - return this.setCalltx(undefined); + this.setCalltx(undefined); }; @@ -682,21 +332,14 @@ proto.payload.Any.prototype.getSendtx = function() { }; -/** - * @param {?proto.payload.SendTx|undefined} value - * @return {!proto.payload.Any} returns this -*/ +/** @param {?proto.payload.SendTx|undefined} value */ proto.payload.Any.prototype.setSendtx = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.Any} returns this - */ proto.payload.Any.prototype.clearSendtx = function() { - return this.setSendtx(undefined); + this.setSendtx(undefined); }; @@ -719,21 +362,14 @@ proto.payload.Any.prototype.getNametx = function() { }; -/** - * @param {?proto.payload.NameTx|undefined} value - * @return {!proto.payload.Any} returns this -*/ +/** @param {?proto.payload.NameTx|undefined} value */ proto.payload.Any.prototype.setNametx = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.Any} returns this - */ proto.payload.Any.prototype.clearNametx = function() { - return this.setNametx(undefined); + this.setNametx(undefined); }; @@ -756,21 +392,14 @@ proto.payload.Any.prototype.getPermstx = function() { }; -/** - * @param {?proto.payload.PermsTx|undefined} value - * @return {!proto.payload.Any} returns this -*/ +/** @param {?proto.payload.PermsTx|undefined} value */ proto.payload.Any.prototype.setPermstx = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + jspb.Message.setWrapperField(this, 4, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.Any} returns this - */ proto.payload.Any.prototype.clearPermstx = function() { - return this.setPermstx(undefined); + this.setPermstx(undefined); }; @@ -793,21 +422,14 @@ proto.payload.Any.prototype.getGovtx = function() { }; -/** - * @param {?proto.payload.GovTx|undefined} value - * @return {!proto.payload.Any} returns this -*/ +/** @param {?proto.payload.GovTx|undefined} value */ proto.payload.Any.prototype.setGovtx = function(value) { - return jspb.Message.setWrapperField(this, 5, value); + jspb.Message.setWrapperField(this, 5, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.Any} returns this - */ proto.payload.Any.prototype.clearGovtx = function() { - return this.setGovtx(undefined); + this.setGovtx(undefined); }; @@ -830,21 +452,14 @@ proto.payload.Any.prototype.getBondtx = function() { }; -/** - * @param {?proto.payload.BondTx|undefined} value - * @return {!proto.payload.Any} returns this -*/ +/** @param {?proto.payload.BondTx|undefined} value */ proto.payload.Any.prototype.setBondtx = function(value) { - return jspb.Message.setWrapperField(this, 6, value); + jspb.Message.setWrapperField(this, 6, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.Any} returns this - */ proto.payload.Any.prototype.clearBondtx = function() { - return this.setBondtx(undefined); + this.setBondtx(undefined); }; @@ -867,21 +482,14 @@ proto.payload.Any.prototype.getUnbondtx = function() { }; -/** - * @param {?proto.payload.UnbondTx|undefined} value - * @return {!proto.payload.Any} returns this -*/ +/** @param {?proto.payload.UnbondTx|undefined} value */ proto.payload.Any.prototype.setUnbondtx = function(value) { - return jspb.Message.setWrapperField(this, 7, value); + jspb.Message.setWrapperField(this, 7, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.Any} returns this - */ proto.payload.Any.prototype.clearUnbondtx = function() { - return this.setUnbondtx(undefined); + this.setUnbondtx(undefined); }; @@ -904,21 +512,14 @@ proto.payload.Any.prototype.getBatchtx = function() { }; -/** - * @param {?proto.payload.BatchTx|undefined} value - * @return {!proto.payload.Any} returns this -*/ +/** @param {?proto.payload.BatchTx|undefined} value */ proto.payload.Any.prototype.setBatchtx = function(value) { - return jspb.Message.setWrapperField(this, 8, value); + jspb.Message.setWrapperField(this, 8, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.Any} returns this - */ proto.payload.Any.prototype.clearBatchtx = function() { - return this.setBatchtx(undefined); + this.setBatchtx(undefined); }; @@ -941,21 +542,14 @@ proto.payload.Any.prototype.getProposaltx = function() { }; -/** - * @param {?proto.payload.ProposalTx|undefined} value - * @return {!proto.payload.Any} returns this -*/ +/** @param {?proto.payload.ProposalTx|undefined} value */ proto.payload.Any.prototype.setProposaltx = function(value) { - return jspb.Message.setWrapperField(this, 9, value); + jspb.Message.setWrapperField(this, 9, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.Any} returns this - */ proto.payload.Any.prototype.clearProposaltx = function() { - return this.setProposaltx(undefined); + this.setProposaltx(undefined); }; @@ -978,21 +572,14 @@ proto.payload.Any.prototype.getIdentifytx = function() { }; -/** - * @param {?proto.payload.IdentifyTx|undefined} value - * @return {!proto.payload.Any} returns this -*/ +/** @param {?proto.payload.IdentifyTx|undefined} value */ proto.payload.Any.prototype.setIdentifytx = function(value) { - return jspb.Message.setWrapperField(this, 10, value); + jspb.Message.setWrapperField(this, 10, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.Any} returns this - */ proto.payload.Any.prototype.clearIdentifytx = function() { - return this.setIdentifytx(undefined); + this.setIdentifytx(undefined); }; @@ -1006,19 +593,34 @@ proto.payload.Any.prototype.hasIdentifytx = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.TxInput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.TxInput, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.TxInput.displayName = 'proto.payload.TxInput'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.TxInput.prototype.toObject = function(opt_includeInstance) { @@ -1028,8 +630,8 @@ proto.payload.TxInput.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.TxInput} msg The msg instance to transform. * @return {!Object} @@ -1174,12 +776,9 @@ proto.payload.TxInput.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.payload.TxInput} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.payload.TxInput.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1192,12 +791,9 @@ proto.payload.TxInput.prototype.getAmount = function() { }; -/** - * @param {number} value - * @return {!proto.payload.TxInput} returns this - */ +/** @param {number} value */ proto.payload.TxInput.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; @@ -1210,29 +806,41 @@ proto.payload.TxInput.prototype.getSequence = function() { }; -/** - * @param {number} value - * @return {!proto.payload.TxInput} returns this - */ +/** @param {number} value */ proto.payload.TxInput.prototype.setSequence = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.TxOutput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.TxOutput, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.TxOutput.displayName = 'proto.payload.TxOutput'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.TxOutput.prototype.toObject = function(opt_includeInstance) { @@ -1242,8 +850,8 @@ proto.payload.TxOutput.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.TxOutput} msg The msg instance to transform. * @return {!Object} @@ -1376,12 +984,9 @@ proto.payload.TxOutput.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.payload.TxOutput} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.payload.TxOutput.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1394,16 +999,30 @@ proto.payload.TxOutput.prototype.getAmount = function() { }; -/** - * @param {number} value - * @return {!proto.payload.TxOutput} returns this - */ +/** @param {number} value */ proto.payload.TxOutput.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.CallTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.CallTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.CallTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.CallTx.displayName = 'proto.payload.CallTx'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -1415,15 +1034,13 @@ proto.payload.CallTx.repeatedFields_ = [7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.CallTx.prototype.toObject = function(opt_includeInstance) { @@ -1433,8 +1050,8 @@ proto.payload.CallTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.CallTx} msg The msg instance to transform. * @return {!Object} @@ -1621,21 +1238,14 @@ proto.payload.CallTx.prototype.getInput = function() { }; -/** - * @param {?proto.payload.TxInput|undefined} value - * @return {!proto.payload.CallTx} returns this -*/ +/** @param {?proto.payload.TxInput|undefined} value */ proto.payload.CallTx.prototype.setInput = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.CallTx} returns this - */ proto.payload.CallTx.prototype.clearInput = function() { - return this.setInput(undefined); + this.setInput(undefined); }; @@ -1681,12 +1291,9 @@ proto.payload.CallTx.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.payload.CallTx} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.payload.CallTx.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -1699,12 +1306,9 @@ proto.payload.CallTx.prototype.getGaslimit = function() { }; -/** - * @param {number} value - * @return {!proto.payload.CallTx} returns this - */ +/** @param {number} value */ proto.payload.CallTx.prototype.setGaslimit = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; @@ -1717,12 +1321,9 @@ proto.payload.CallTx.prototype.getFee = function() { }; -/** - * @param {number} value - * @return {!proto.payload.CallTx} returns this - */ +/** @param {number} value */ proto.payload.CallTx.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3IntField(this, 4, value); }; @@ -1759,12 +1360,9 @@ proto.payload.CallTx.prototype.getData_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.payload.CallTx} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.payload.CallTx.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); + jspb.Message.setProto3BytesField(this, 5, value); }; @@ -1801,12 +1399,9 @@ proto.payload.CallTx.prototype.getWasm_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.payload.CallTx} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.payload.CallTx.prototype.setWasm = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); + jspb.Message.setProto3BytesField(this, 6, value); }; @@ -1820,12 +1415,9 @@ proto.payload.CallTx.prototype.getContractmetaList = function() { }; -/** - * @param {!Array} value - * @return {!proto.payload.CallTx} returns this -*/ +/** @param {!Array} value */ proto.payload.CallTx.prototype.setContractmetaList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); + jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -1839,12 +1431,8 @@ proto.payload.CallTx.prototype.addContractmeta = function(opt_value, opt_index) }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.CallTx} returns this - */ proto.payload.CallTx.prototype.clearContractmetaList = function() { - return this.setContractmetaList([]); + this.setContractmetaList([]); }; @@ -1857,29 +1445,41 @@ proto.payload.CallTx.prototype.getGasprice = function() { }; -/** - * @param {number} value - * @return {!proto.payload.CallTx} returns this - */ +/** @param {number} value */ proto.payload.CallTx.prototype.setGasprice = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3IntField(this, 8, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.ContractMeta = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.ContractMeta, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.ContractMeta.displayName = 'proto.payload.ContractMeta'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.ContractMeta.prototype.toObject = function(opt_includeInstance) { @@ -1889,8 +1489,8 @@ proto.payload.ContractMeta.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.ContractMeta} msg The msg instance to transform. * @return {!Object} @@ -2023,12 +1623,9 @@ proto.payload.ContractMeta.prototype.getCodehash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.payload.ContractMeta} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.payload.ContractMeta.prototype.setCodehash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2041,16 +1638,30 @@ proto.payload.ContractMeta.prototype.getMeta = function() { }; -/** - * @param {string} value - * @return {!proto.payload.ContractMeta} returns this - */ +/** @param {string} value */ proto.payload.ContractMeta.prototype.setMeta = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.SendTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.SendTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.SendTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.SendTx.displayName = 'proto.payload.SendTx'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -2062,15 +1673,13 @@ proto.payload.SendTx.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.SendTx.prototype.toObject = function(opt_includeInstance) { @@ -2080,8 +1689,8 @@ proto.payload.SendTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.SendTx} msg The msg instance to transform. * @return {!Object} @@ -2197,12 +1806,9 @@ proto.payload.SendTx.prototype.getInputsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.payload.SendTx} returns this -*/ +/** @param {!Array} value */ proto.payload.SendTx.prototype.setInputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -2216,12 +1822,8 @@ proto.payload.SendTx.prototype.addInputs = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.SendTx} returns this - */ proto.payload.SendTx.prototype.clearInputsList = function() { - return this.setInputsList([]); + this.setInputsList([]); }; @@ -2235,12 +1837,9 @@ proto.payload.SendTx.prototype.getOutputsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.payload.SendTx} returns this -*/ +/** @param {!Array} value */ proto.payload.SendTx.prototype.setOutputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -2254,29 +1853,40 @@ proto.payload.SendTx.prototype.addOutputs = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.SendTx} returns this - */ proto.payload.SendTx.prototype.clearOutputsList = function() { - return this.setOutputsList([]); + this.setOutputsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.PermsTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.PermsTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.PermsTx.displayName = 'proto.payload.PermsTx'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.PermsTx.prototype.toObject = function(opt_includeInstance) { @@ -2286,8 +1896,8 @@ proto.payload.PermsTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.PermsTx} msg The msg instance to transform. * @return {!Object} @@ -2401,21 +2011,14 @@ proto.payload.PermsTx.prototype.getInput = function() { }; -/** - * @param {?proto.payload.TxInput|undefined} value - * @return {!proto.payload.PermsTx} returns this -*/ +/** @param {?proto.payload.TxInput|undefined} value */ proto.payload.PermsTx.prototype.setInput = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.PermsTx} returns this - */ proto.payload.PermsTx.prototype.clearInput = function() { - return this.setInput(undefined); + this.setInput(undefined); }; @@ -2438,21 +2041,14 @@ proto.payload.PermsTx.prototype.getPermargs = function() { }; -/** - * @param {?proto.permission.PermArgs|undefined} value - * @return {!proto.payload.PermsTx} returns this -*/ +/** @param {?proto.permission.PermArgs|undefined} value */ proto.payload.PermsTx.prototype.setPermargs = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.PermsTx} returns this - */ proto.payload.PermsTx.prototype.clearPermargs = function() { - return this.setPermargs(undefined); + this.setPermargs(undefined); }; @@ -2466,19 +2062,34 @@ proto.payload.PermsTx.prototype.hasPermargs = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.NameTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.NameTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.NameTx.displayName = 'proto.payload.NameTx'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.NameTx.prototype.toObject = function(opt_includeInstance) { @@ -2488,8 +2099,8 @@ proto.payload.NameTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.NameTx} msg The msg instance to transform. * @return {!Object} @@ -2625,21 +2236,14 @@ proto.payload.NameTx.prototype.getInput = function() { }; -/** - * @param {?proto.payload.TxInput|undefined} value - * @return {!proto.payload.NameTx} returns this -*/ +/** @param {?proto.payload.TxInput|undefined} value */ proto.payload.NameTx.prototype.setInput = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.NameTx} returns this - */ proto.payload.NameTx.prototype.clearInput = function() { - return this.setInput(undefined); + this.setInput(undefined); }; @@ -2661,12 +2265,9 @@ proto.payload.NameTx.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.payload.NameTx} returns this - */ +/** @param {string} value */ proto.payload.NameTx.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; @@ -2679,12 +2280,9 @@ proto.payload.NameTx.prototype.getData = function() { }; -/** - * @param {string} value - * @return {!proto.payload.NameTx} returns this - */ +/** @param {string} value */ proto.payload.NameTx.prototype.setData = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; @@ -2697,29 +2295,41 @@ proto.payload.NameTx.prototype.getFee = function() { }; -/** - * @param {number} value - * @return {!proto.payload.NameTx} returns this - */ +/** @param {number} value */ proto.payload.NameTx.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3IntField(this, 4, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.BondTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.BondTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.BondTx.displayName = 'proto.payload.BondTx'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.BondTx.prototype.toObject = function(opt_includeInstance) { @@ -2729,8 +2339,8 @@ proto.payload.BondTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.BondTx} msg The msg instance to transform. * @return {!Object} @@ -2830,21 +2440,14 @@ proto.payload.BondTx.prototype.getInput = function() { }; -/** - * @param {?proto.payload.TxInput|undefined} value - * @return {!proto.payload.BondTx} returns this -*/ +/** @param {?proto.payload.TxInput|undefined} value */ proto.payload.BondTx.prototype.setInput = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.BondTx} returns this - */ proto.payload.BondTx.prototype.clearInput = function() { - return this.setInput(undefined); + this.setInput(undefined); }; @@ -2858,19 +2461,34 @@ proto.payload.BondTx.prototype.hasInput = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.UnbondTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.UnbondTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.UnbondTx.displayName = 'proto.payload.UnbondTx'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.UnbondTx.prototype.toObject = function(opt_includeInstance) { @@ -2880,8 +2498,8 @@ proto.payload.UnbondTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.UnbondTx} msg The msg instance to transform. * @return {!Object} @@ -2995,21 +2613,14 @@ proto.payload.UnbondTx.prototype.getInput = function() { }; -/** - * @param {?proto.payload.TxInput|undefined} value - * @return {!proto.payload.UnbondTx} returns this -*/ +/** @param {?proto.payload.TxInput|undefined} value */ proto.payload.UnbondTx.prototype.setInput = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.UnbondTx} returns this - */ proto.payload.UnbondTx.prototype.clearInput = function() { - return this.setInput(undefined); + this.setInput(undefined); }; @@ -3032,21 +2643,14 @@ proto.payload.UnbondTx.prototype.getOutput = function() { }; -/** - * @param {?proto.payload.TxOutput|undefined} value - * @return {!proto.payload.UnbondTx} returns this -*/ +/** @param {?proto.payload.TxOutput|undefined} value */ proto.payload.UnbondTx.prototype.setOutput = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.UnbondTx} returns this - */ proto.payload.UnbondTx.prototype.clearOutput = function() { - return this.setOutput(undefined); + this.setOutput(undefined); }; @@ -3060,6 +2664,23 @@ proto.payload.UnbondTx.prototype.hasOutput = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.GovTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.GovTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.GovTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.GovTx.displayName = 'proto.payload.GovTx'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -3071,15 +2692,13 @@ proto.payload.GovTx.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.GovTx.prototype.toObject = function(opt_includeInstance) { @@ -3089,8 +2708,8 @@ proto.payload.GovTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.GovTx} msg The msg instance to transform. * @return {!Object} @@ -3206,12 +2825,9 @@ proto.payload.GovTx.prototype.getInputsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.payload.GovTx} returns this -*/ +/** @param {!Array} value */ proto.payload.GovTx.prototype.setInputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3225,12 +2841,8 @@ proto.payload.GovTx.prototype.addInputs = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.GovTx} returns this - */ proto.payload.GovTx.prototype.clearInputsList = function() { - return this.setInputsList([]); + this.setInputsList([]); }; @@ -3244,12 +2856,9 @@ proto.payload.GovTx.prototype.getAccountupdatesList = function() { }; -/** - * @param {!Array} value - * @return {!proto.payload.GovTx} returns this -*/ +/** @param {!Array} value */ proto.payload.GovTx.prototype.setAccountupdatesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -3263,29 +2872,40 @@ proto.payload.GovTx.prototype.addAccountupdates = function(opt_value, opt_index) }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.GovTx} returns this - */ proto.payload.GovTx.prototype.clearAccountupdatesList = function() { - return this.setAccountupdatesList([]); + this.setAccountupdatesList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.ProposalTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.ProposalTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.ProposalTx.displayName = 'proto.payload.ProposalTx'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.ProposalTx.prototype.toObject = function(opt_includeInstance) { @@ -3295,8 +2915,8 @@ proto.payload.ProposalTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.ProposalTx} msg The msg instance to transform. * @return {!Object} @@ -3434,21 +3054,14 @@ proto.payload.ProposalTx.prototype.getInput = function() { }; -/** - * @param {?proto.payload.TxInput|undefined} value - * @return {!proto.payload.ProposalTx} returns this -*/ +/** @param {?proto.payload.TxInput|undefined} value */ proto.payload.ProposalTx.prototype.setInput = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.ProposalTx} returns this - */ proto.payload.ProposalTx.prototype.clearInput = function() { - return this.setInput(undefined); + this.setInput(undefined); }; @@ -3470,12 +3083,9 @@ proto.payload.ProposalTx.prototype.getVotingweight = function() { }; -/** - * @param {number} value - * @return {!proto.payload.ProposalTx} returns this - */ +/** @param {number} value */ proto.payload.ProposalTx.prototype.setVotingweight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; @@ -3512,12 +3122,9 @@ proto.payload.ProposalTx.prototype.getProposalhash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.payload.ProposalTx} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.payload.ProposalTx.prototype.setProposalhash = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setProto3BytesField(this, 3, value); }; @@ -3531,21 +3138,14 @@ proto.payload.ProposalTx.prototype.getProposal = function() { }; -/** - * @param {?proto.payload.Proposal|undefined} value - * @return {!proto.payload.ProposalTx} returns this -*/ +/** @param {?proto.payload.Proposal|undefined} value */ proto.payload.ProposalTx.prototype.setProposal = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + jspb.Message.setWrapperField(this, 4, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.ProposalTx} returns this - */ proto.payload.ProposalTx.prototype.clearProposal = function() { - return this.setProposal(undefined); + this.setProposal(undefined); }; @@ -3559,6 +3159,23 @@ proto.payload.ProposalTx.prototype.hasProposal = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.IdentifyTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.IdentifyTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.IdentifyTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.IdentifyTx.displayName = 'proto.payload.IdentifyTx'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -3570,15 +3187,13 @@ proto.payload.IdentifyTx.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.IdentifyTx.prototype.toObject = function(opt_includeInstance) { @@ -3588,8 +3203,8 @@ proto.payload.IdentifyTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.IdentifyTx} msg The msg instance to transform. * @return {!Object} @@ -3704,12 +3319,9 @@ proto.payload.IdentifyTx.prototype.getInputsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.payload.IdentifyTx} returns this -*/ +/** @param {!Array} value */ proto.payload.IdentifyTx.prototype.setInputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3723,12 +3335,8 @@ proto.payload.IdentifyTx.prototype.addInputs = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.IdentifyTx} returns this - */ proto.payload.IdentifyTx.prototype.clearInputsList = function() { - return this.setInputsList([]); + this.setInputsList([]); }; @@ -3742,21 +3350,14 @@ proto.payload.IdentifyTx.prototype.getNode = function() { }; -/** - * @param {?proto.registry.NodeIdentity|undefined} value - * @return {!proto.payload.IdentifyTx} returns this -*/ +/** @param {?proto.registry.NodeIdentity|undefined} value */ proto.payload.IdentifyTx.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.IdentifyTx} returns this - */ proto.payload.IdentifyTx.prototype.clearNode = function() { - return this.setNode(undefined); + this.setNode(undefined); }; @@ -3770,6 +3371,23 @@ proto.payload.IdentifyTx.prototype.hasNode = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.BatchTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.BatchTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.BatchTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.BatchTx.displayName = 'proto.payload.BatchTx'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -3781,15 +3399,13 @@ proto.payload.BatchTx.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.BatchTx.prototype.toObject = function(opt_includeInstance) { @@ -3799,8 +3415,8 @@ proto.payload.BatchTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.BatchTx} msg The msg instance to transform. * @return {!Object} @@ -3916,12 +3532,9 @@ proto.payload.BatchTx.prototype.getInputsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.payload.BatchTx} returns this -*/ +/** @param {!Array} value */ proto.payload.BatchTx.prototype.setInputsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3935,12 +3548,8 @@ proto.payload.BatchTx.prototype.addInputs = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.BatchTx} returns this - */ proto.payload.BatchTx.prototype.clearInputsList = function() { - return this.setInputsList([]); + this.setInputsList([]); }; @@ -3954,12 +3563,9 @@ proto.payload.BatchTx.prototype.getTxsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.payload.BatchTx} returns this -*/ +/** @param {!Array} value */ proto.payload.BatchTx.prototype.setTxsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -3973,29 +3579,40 @@ proto.payload.BatchTx.prototype.addTxs = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.BatchTx} returns this - */ proto.payload.BatchTx.prototype.clearTxsList = function() { - return this.setTxsList([]); + this.setTxsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.Vote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.Vote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.Vote.displayName = 'proto.payload.Vote'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.Vote.prototype.toObject = function(opt_includeInstance) { @@ -4005,8 +3622,8 @@ proto.payload.Vote.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Vote} msg The msg instance to transform. * @return {!Object} @@ -4139,12 +3756,9 @@ proto.payload.Vote.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.payload.Vote} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.payload.Vote.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -4157,29 +3771,41 @@ proto.payload.Vote.prototype.getVotingweight = function() { }; -/** - * @param {number} value - * @return {!proto.payload.Vote} returns this - */ +/** @param {number} value */ proto.payload.Vote.prototype.setVotingweight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.Proposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.Proposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.Proposal.displayName = 'proto.payload.Proposal'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.Proposal.prototype.toObject = function(opt_includeInstance) { @@ -4189,8 +3815,8 @@ proto.payload.Proposal.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Proposal} msg The msg instance to transform. * @return {!Object} @@ -4313,12 +3939,9 @@ proto.payload.Proposal.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.payload.Proposal} returns this - */ +/** @param {string} value */ proto.payload.Proposal.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -4331,12 +3954,9 @@ proto.payload.Proposal.prototype.getDescription = function() { }; -/** - * @param {string} value - * @return {!proto.payload.Proposal} returns this - */ +/** @param {string} value */ proto.payload.Proposal.prototype.setDescription = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; @@ -4350,21 +3970,14 @@ proto.payload.Proposal.prototype.getBatchtx = function() { }; -/** - * @param {?proto.payload.BatchTx|undefined} value - * @return {!proto.payload.Proposal} returns this -*/ +/** @param {?proto.payload.BatchTx|undefined} value */ proto.payload.Proposal.prototype.setBatchtx = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.Proposal} returns this - */ proto.payload.Proposal.prototype.clearBatchtx = function() { - return this.setBatchtx(undefined); + this.setBatchtx(undefined); }; @@ -4378,6 +3991,23 @@ proto.payload.Proposal.prototype.hasBatchtx = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.Ballot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.Ballot.repeatedFields_, null); +}; +goog.inherits(proto.payload.Ballot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.payload.Ballot.displayName = 'proto.payload.Ballot'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -4389,15 +4019,13 @@ proto.payload.Ballot.repeatedFields_ = [5]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.payload.Ballot.prototype.toObject = function(opt_includeInstance) { @@ -4407,8 +4035,8 @@ proto.payload.Ballot.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Ballot} msg The msg instance to transform. * @return {!Object} @@ -4556,21 +4184,14 @@ proto.payload.Ballot.prototype.getProposal = function() { }; -/** - * @param {?proto.payload.Proposal|undefined} value - * @return {!proto.payload.Ballot} returns this -*/ +/** @param {?proto.payload.Proposal|undefined} value */ proto.payload.Ballot.prototype.setProposal = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.payload.Ballot} returns this - */ proto.payload.Ballot.prototype.clearProposal = function() { - return this.setProposal(undefined); + this.setProposal(undefined); }; @@ -4616,12 +4237,9 @@ proto.payload.Ballot.prototype.getFinalizingtx_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.payload.Ballot} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.payload.Ballot.prototype.setFinalizingtx = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4634,12 +4252,9 @@ proto.payload.Ballot.prototype.getProposalstate = function() { }; -/** - * @param {!proto.payload.Ballot.ProposalState} value - * @return {!proto.payload.Ballot} returns this - */ +/** @param {!proto.payload.Ballot.ProposalState} value */ proto.payload.Ballot.prototype.setProposalstate = function(value) { - return jspb.Message.setProto3EnumField(this, 4, value); + jspb.Message.setProto3EnumField(this, 4, value); }; @@ -4653,12 +4268,9 @@ proto.payload.Ballot.prototype.getVotesList = function() { }; -/** - * @param {!Array} value - * @return {!proto.payload.Ballot} returns this -*/ +/** @param {!Array} value */ proto.payload.Ballot.prototype.setVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); + jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -4672,12 +4284,8 @@ proto.payload.Ballot.prototype.addVotes = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.payload.Ballot} returns this - */ proto.payload.Ballot.prototype.clearVotesList = function() { - return this.setVotesList([]); + this.setVotesList([]); }; diff --git a/js/proto/permission_grpc_pb.d.ts b/js/proto/permission_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/permission_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/permission_pb.d.ts b/js/proto/permission_pb.d.ts index dab1ad03c..bcf1af26b 100644 --- a/js/proto/permission_pb.d.ts +++ b/js/proto/permission_pb.d.ts @@ -1,110 +1,123 @@ // package: permission // file: permission.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; -export class AccountPermissions extends jspb.Message { - hasBase(): boolean; - clearBase(): void; - getBase(): BasePermissions | undefined; - setBase(value?: BasePermissions): void; - - clearRolesList(): void; - getRolesList(): Array; - setRolesList(value: Array): void; - addRoles(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AccountPermissions.AsObject; - static toObject(includeInstance: boolean, msg: AccountPermissions): AccountPermissions.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AccountPermissions, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AccountPermissions; - static deserializeBinaryFromReader(message: AccountPermissions, reader: jspb.BinaryReader): AccountPermissions; +export class AccountPermissions extends jspb.Message { + + hasBase(): boolean; + clearBase(): void; + getBase(): BasePermissions | undefined; + setBase(value?: BasePermissions): void; + + clearRolesList(): void; + getRolesList(): Array; + setRolesList(value: Array): void; + addRoles(value: string, index?: number): string; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AccountPermissions.AsObject; + static toObject(includeInstance: boolean, msg: AccountPermissions): AccountPermissions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AccountPermissions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AccountPermissions; + static deserializeBinaryFromReader(message: AccountPermissions, reader: jspb.BinaryReader): AccountPermissions; } export namespace AccountPermissions { - export type AsObject = { - base?: BasePermissions.AsObject, - rolesList: Array, - } + export type AsObject = { + base?: BasePermissions.AsObject, + rolesList: Array, + } } -export class BasePermissions extends jspb.Message { - hasPerms(): boolean; - clearPerms(): void; - getPerms(): number | undefined; - setPerms(value: number): void; - - hasSetbit(): boolean; - clearSetbit(): void; - getSetbit(): number | undefined; - setSetbit(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BasePermissions.AsObject; - static toObject(includeInstance: boolean, msg: BasePermissions): BasePermissions.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BasePermissions, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BasePermissions; - static deserializeBinaryFromReader(message: BasePermissions, reader: jspb.BinaryReader): BasePermissions; +export class BasePermissions extends jspb.Message { + + hasPerms(): boolean; + clearPerms(): void; + getPerms(): number | undefined; + setPerms(value: number): void; + + + hasSetbit(): boolean; + clearSetbit(): void; + getSetbit(): number | undefined; + setSetbit(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BasePermissions.AsObject; + static toObject(includeInstance: boolean, msg: BasePermissions): BasePermissions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BasePermissions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BasePermissions; + static deserializeBinaryFromReader(message: BasePermissions, reader: jspb.BinaryReader): BasePermissions; } export namespace BasePermissions { - export type AsObject = { - perms?: number, - setbit?: number, - } + export type AsObject = { + perms?: number, + setbit?: number, + } } -export class PermArgs extends jspb.Message { - hasAction(): boolean; - clearAction(): void; - getAction(): number | undefined; - setAction(value: number): void; - - hasTarget(): boolean; - clearTarget(): void; - getTarget(): Uint8Array | string; - getTarget_asU8(): Uint8Array; - getTarget_asB64(): string; - setTarget(value: Uint8Array | string): void; - - hasPermission(): boolean; - clearPermission(): void; - getPermission(): number | undefined; - setPermission(value: number): void; - - hasRole(): boolean; - clearRole(): void; - getRole(): string | undefined; - setRole(value: string): void; - - hasValue(): boolean; - clearValue(): void; - getValue(): boolean | undefined; - setValue(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PermArgs.AsObject; - static toObject(includeInstance: boolean, msg: PermArgs): PermArgs.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PermArgs, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PermArgs; - static deserializeBinaryFromReader(message: PermArgs, reader: jspb.BinaryReader): PermArgs; +export class PermArgs extends jspb.Message { + + hasAction(): boolean; + clearAction(): void; + getAction(): number | undefined; + setAction(value: number): void; + + + hasTarget(): boolean; + clearTarget(): void; + getTarget(): Uint8Array | string; + getTarget_asU8(): Uint8Array; + getTarget_asB64(): string; + setTarget(value: Uint8Array | string): void; + + + hasPermission(): boolean; + clearPermission(): void; + getPermission(): number | undefined; + setPermission(value: number): void; + + + hasRole(): boolean; + clearRole(): void; + getRole(): string | undefined; + setRole(value: string): void; + + + hasValue(): boolean; + clearValue(): void; + getValue(): boolean | undefined; + setValue(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PermArgs.AsObject; + static toObject(includeInstance: boolean, msg: PermArgs): PermArgs.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PermArgs, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PermArgs; + static deserializeBinaryFromReader(message: PermArgs, reader: jspb.BinaryReader): PermArgs; } export namespace PermArgs { - export type AsObject = { - action?: number, - target: Uint8Array | string, - permission?: number, - role?: string, - value?: boolean, - } + export type AsObject = { + action?: number, + target: Uint8Array | string, + permission?: number, + role?: string, + value?: boolean, + } } - diff --git a/js/proto/permission_pb.js b/js/proto/permission_pb.js index 19593fe24..5f31c6792 100644 --- a/js/proto/permission_pb.js +++ b/js/proto/permission_pb.js @@ -1,4 +1,3 @@ -// source: permission.proto /** * @fileoverview * @enhanceable @@ -17,6 +16,7 @@ goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.permission.AccountPermissions', null, global); goog.exportSymbol('proto.permission.BasePermissions', null, global); goog.exportSymbol('proto.permission.PermArgs', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -32,55 +32,8 @@ proto.permission.AccountPermissions = function(opt_data) { }; goog.inherits(proto.permission.AccountPermissions, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.permission.AccountPermissions.displayName = 'proto.permission.AccountPermissions'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.permission.BasePermissions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.permission.BasePermissions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.permission.BasePermissions.displayName = 'proto.permission.BasePermissions'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.permission.PermArgs = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.permission.PermArgs, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.permission.PermArgs.displayName = 'proto.permission.PermArgs'; -} - /** * List of repeated fields within this message type. * @private {!Array} @@ -92,15 +45,13 @@ proto.permission.AccountPermissions.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.permission.AccountPermissions.prototype.toObject = function(opt_includeInstance) { @@ -110,8 +61,8 @@ proto.permission.AccountPermissions.prototype.toObject = function(opt_includeIns /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.permission.AccountPermissions} msg The msg instance to transform. * @return {!Object} @@ -120,7 +71,7 @@ proto.permission.AccountPermissions.prototype.toObject = function(opt_includeIns proto.permission.AccountPermissions.toObject = function(includeInstance, msg) { var f, obj = { base: (f = msg.getBase()) && proto.permission.BasePermissions.toObject(includeInstance, f), - rolesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + rolesList: jspb.Message.getRepeatedField(msg, 2) }; if (includeInstance) { @@ -223,21 +174,14 @@ proto.permission.AccountPermissions.prototype.getBase = function() { }; -/** - * @param {?proto.permission.BasePermissions|undefined} value - * @return {!proto.permission.AccountPermissions} returns this -*/ +/** @param {?proto.permission.BasePermissions|undefined} value */ proto.permission.AccountPermissions.prototype.setBase = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.permission.AccountPermissions} returns this - */ proto.permission.AccountPermissions.prototype.clearBase = function() { - return this.setBase(undefined); + this.setBase(undefined); }; @@ -259,48 +203,55 @@ proto.permission.AccountPermissions.prototype.getRolesList = function() { }; -/** - * @param {!Array} value - * @return {!proto.permission.AccountPermissions} returns this - */ +/** @param {!Array} value */ proto.permission.AccountPermissions.prototype.setRolesList = function(value) { - return jspb.Message.setField(this, 2, value || []); + jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index - * @return {!proto.permission.AccountPermissions} returns this */ proto.permission.AccountPermissions.prototype.addRoles = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); + jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.permission.AccountPermissions} returns this - */ proto.permission.AccountPermissions.prototype.clearRolesList = function() { - return this.setRolesList([]); + this.setRolesList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.permission.BasePermissions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.permission.BasePermissions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.permission.BasePermissions.displayName = 'proto.permission.BasePermissions'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstance) { @@ -310,8 +261,8 @@ proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstan /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.permission.BasePermissions} msg The msg instance to transform. * @return {!Object} @@ -319,8 +270,8 @@ proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstan */ proto.permission.BasePermissions.toObject = function(includeInstance, msg) { var f, obj = { - perms: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, - setbit: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f + perms: jspb.Message.getField(msg, 1), + setbit: jspb.Message.getField(msg, 2) }; if (includeInstance) { @@ -420,21 +371,14 @@ proto.permission.BasePermissions.prototype.getPerms = function() { }; -/** - * @param {number} value - * @return {!proto.permission.BasePermissions} returns this - */ +/** @param {number} value */ proto.permission.BasePermissions.prototype.setPerms = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.permission.BasePermissions} returns this - */ proto.permission.BasePermissions.prototype.clearPerms = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -456,21 +400,14 @@ proto.permission.BasePermissions.prototype.getSetbit = function() { }; -/** - * @param {number} value - * @return {!proto.permission.BasePermissions} returns this - */ +/** @param {number} value */ proto.permission.BasePermissions.prototype.setSetbit = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.permission.BasePermissions} returns this - */ proto.permission.BasePermissions.prototype.clearSetbit = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -484,19 +421,34 @@ proto.permission.BasePermissions.prototype.hasSetbit = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.permission.PermArgs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.permission.PermArgs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.permission.PermArgs.displayName = 'proto.permission.PermArgs'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { @@ -506,8 +458,8 @@ proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.permission.PermArgs} msg The msg instance to transform. * @return {!Object} @@ -515,11 +467,11 @@ proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { */ proto.permission.PermArgs.toObject = function(includeInstance, msg) { var f, obj = { - action: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + action: jspb.Message.getField(msg, 1), target: msg.getTarget_asB64(), - permission: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, - role: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, - value: (f = jspb.Message.getBooleanField(msg, 5)) == null ? undefined : f + permission: jspb.Message.getField(msg, 3), + role: jspb.Message.getField(msg, 4), + value: jspb.Message.getField(msg, 5) }; if (includeInstance) { @@ -652,21 +604,14 @@ proto.permission.PermArgs.prototype.getAction = function() { }; -/** - * @param {number} value - * @return {!proto.permission.PermArgs} returns this - */ +/** @param {number} value */ proto.permission.PermArgs.prototype.setAction = function(value) { - return jspb.Message.setField(this, 1, value); + jspb.Message.setField(this, 1, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.permission.PermArgs} returns this - */ proto.permission.PermArgs.prototype.clearAction = function() { - return jspb.Message.setField(this, 1, undefined); + jspb.Message.setField(this, 1, undefined); }; @@ -712,21 +657,14 @@ proto.permission.PermArgs.prototype.getTarget_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.permission.PermArgs} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.permission.PermArgs.prototype.setTarget = function(value) { - return jspb.Message.setField(this, 2, value); + jspb.Message.setField(this, 2, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.permission.PermArgs} returns this - */ proto.permission.PermArgs.prototype.clearTarget = function() { - return jspb.Message.setField(this, 2, undefined); + jspb.Message.setField(this, 2, undefined); }; @@ -748,21 +686,14 @@ proto.permission.PermArgs.prototype.getPermission = function() { }; -/** - * @param {number} value - * @return {!proto.permission.PermArgs} returns this - */ +/** @param {number} value */ proto.permission.PermArgs.prototype.setPermission = function(value) { - return jspb.Message.setField(this, 3, value); + jspb.Message.setField(this, 3, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.permission.PermArgs} returns this - */ proto.permission.PermArgs.prototype.clearPermission = function() { - return jspb.Message.setField(this, 3, undefined); + jspb.Message.setField(this, 3, undefined); }; @@ -784,21 +715,14 @@ proto.permission.PermArgs.prototype.getRole = function() { }; -/** - * @param {string} value - * @return {!proto.permission.PermArgs} returns this - */ +/** @param {string} value */ proto.permission.PermArgs.prototype.setRole = function(value) { - return jspb.Message.setField(this, 4, value); + jspb.Message.setField(this, 4, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.permission.PermArgs} returns this - */ proto.permission.PermArgs.prototype.clearRole = function() { - return jspb.Message.setField(this, 4, undefined); + jspb.Message.setField(this, 4, undefined); }; @@ -813,28 +737,23 @@ proto.permission.PermArgs.prototype.hasRole = function() { /** * optional bool Value = 5; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.permission.PermArgs.prototype.getValue = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); }; -/** - * @param {boolean} value - * @return {!proto.permission.PermArgs} returns this - */ +/** @param {boolean} value */ proto.permission.PermArgs.prototype.setValue = function(value) { - return jspb.Message.setField(this, 5, value); + jspb.Message.setField(this, 5, value); }; -/** - * Clears the field making it undefined. - * @return {!proto.permission.PermArgs} returns this - */ proto.permission.PermArgs.prototype.clearValue = function() { - return jspb.Message.setField(this, 5, undefined); + jspb.Message.setField(this, 5, undefined); }; diff --git a/js/proto/registry_grpc_pb.d.ts b/js/proto/registry_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/registry_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/registry_pb.d.ts b/js/proto/registry_pb.d.ts index 9be2627d2..919b6b141 100644 --- a/js/proto/registry_pb.d.ts +++ b/js/proto/registry_pb.d.ts @@ -1,42 +1,45 @@ // package: registry // file: registry.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; -export class NodeIdentity extends jspb.Message { - getMoniker(): string; - setMoniker(value: string): void; - - getNetworkaddress(): string; - setNetworkaddress(value: string): void; - - getTendermintnodeid(): Uint8Array | string; - getTendermintnodeid_asU8(): Uint8Array; - getTendermintnodeid_asB64(): string; - setTendermintnodeid(value: Uint8Array | string): void; - - getValidatorpublickey(): Uint8Array | string; - getValidatorpublickey_asU8(): Uint8Array; - getValidatorpublickey_asB64(): string; - setValidatorpublickey(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeIdentity.AsObject; - static toObject(includeInstance: boolean, msg: NodeIdentity): NodeIdentity.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeIdentity, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeIdentity; - static deserializeBinaryFromReader(message: NodeIdentity, reader: jspb.BinaryReader): NodeIdentity; +export class NodeIdentity extends jspb.Message { + getMoniker(): string; + setMoniker(value: string): void; + + getNetworkaddress(): string; + setNetworkaddress(value: string): void; + + getTendermintnodeid(): Uint8Array | string; + getTendermintnodeid_asU8(): Uint8Array; + getTendermintnodeid_asB64(): string; + setTendermintnodeid(value: Uint8Array | string): void; + + getValidatorpublickey(): Uint8Array | string; + getValidatorpublickey_asU8(): Uint8Array; + getValidatorpublickey_asB64(): string; + setValidatorpublickey(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NodeIdentity.AsObject; + static toObject(includeInstance: boolean, msg: NodeIdentity): NodeIdentity.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NodeIdentity, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NodeIdentity; + static deserializeBinaryFromReader(message: NodeIdentity, reader: jspb.BinaryReader): NodeIdentity; } export namespace NodeIdentity { - export type AsObject = { - moniker: string, - networkaddress: string, - tendermintnodeid: Uint8Array | string, - validatorpublickey: Uint8Array | string, - } + export type AsObject = { + moniker: string, + networkaddress: string, + tendermintnodeid: Uint8Array | string, + validatorpublickey: Uint8Array | string, + } } - diff --git a/js/proto/registry_pb.js b/js/proto/registry_pb.js index bd4d4f396..4a9baa597 100644 --- a/js/proto/registry_pb.js +++ b/js/proto/registry_pb.js @@ -1,4 +1,3 @@ -// source: registry.proto /** * @fileoverview * @enhanceable @@ -15,6 +14,7 @@ var global = Function('return this')(); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.registry.NodeIdentity', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,26 +30,19 @@ proto.registry.NodeIdentity = function(opt_data) { }; goog.inherits(proto.registry.NodeIdentity, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.registry.NodeIdentity.displayName = 'proto.registry.NodeIdentity'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.registry.NodeIdentity.prototype.toObject = function(opt_includeInstance) { @@ -59,8 +52,8 @@ proto.registry.NodeIdentity.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.registry.NodeIdentity} msg The msg instance to transform. * @return {!Object} @@ -193,12 +186,9 @@ proto.registry.NodeIdentity.prototype.getMoniker = function() { }; -/** - * @param {string} value - * @return {!proto.registry.NodeIdentity} returns this - */ +/** @param {string} value */ proto.registry.NodeIdentity.prototype.setMoniker = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -211,12 +201,9 @@ proto.registry.NodeIdentity.prototype.getNetworkaddress = function() { }; -/** - * @param {string} value - * @return {!proto.registry.NodeIdentity} returns this - */ +/** @param {string} value */ proto.registry.NodeIdentity.prototype.setNetworkaddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; @@ -253,12 +240,9 @@ proto.registry.NodeIdentity.prototype.getTendermintnodeid_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.registry.NodeIdentity} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.registry.NodeIdentity.prototype.setTendermintnodeid = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setProto3BytesField(this, 3, value); }; @@ -295,12 +279,9 @@ proto.registry.NodeIdentity.prototype.getValidatorpublickey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.registry.NodeIdentity} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.registry.NodeIdentity.prototype.setValidatorpublickey = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); + jspb.Message.setProto3BytesField(this, 4, value); }; diff --git a/js/proto/rpc_grpc_pb.d.ts b/js/proto/rpc_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/rpc_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/rpc_pb.d.ts b/js/proto/rpc_pb.d.ts index 287c6a32e..deca2311c 100644 --- a/js/proto/rpc_pb.d.ts +++ b/js/proto/rpc_pb.d.ts @@ -1,65 +1,71 @@ // package: rpc // file: rpc.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as tendermint_pb from "./tendermint_pb"; import * as validator_pb from "./validator_pb"; import * as bcm_pb from "./bcm_pb"; -export class ResultStatus extends jspb.Message { - getChainid(): string; - setChainid(value: string): void; - - getRunid(): string; - setRunid(value: string): void; - - getBurrowversion(): string; - setBurrowversion(value: string): void; - - getGenesishash(): Uint8Array | string; - getGenesishash_asU8(): Uint8Array; - getGenesishash_asB64(): string; - setGenesishash(value: Uint8Array | string): void; - - hasNodeinfo(): boolean; - clearNodeinfo(): void; - getNodeinfo(): tendermint_pb.NodeInfo | undefined; - setNodeinfo(value?: tendermint_pb.NodeInfo): void; - - hasSyncinfo(): boolean; - clearSyncinfo(): void; - getSyncinfo(): bcm_pb.SyncInfo | undefined; - setSyncinfo(value?: bcm_pb.SyncInfo): void; - - getCatchingup(): boolean; - setCatchingup(value: boolean): void; - - hasValidatorinfo(): boolean; - clearValidatorinfo(): void; - getValidatorinfo(): validator_pb.Validator | undefined; - setValidatorinfo(value?: validator_pb.Validator): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResultStatus.AsObject; - static toObject(includeInstance: boolean, msg: ResultStatus): ResultStatus.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResultStatus, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResultStatus; - static deserializeBinaryFromReader(message: ResultStatus, reader: jspb.BinaryReader): ResultStatus; +export class ResultStatus extends jspb.Message { + getChainid(): string; + setChainid(value: string): void; + + getRunid(): string; + setRunid(value: string): void; + + getBurrowversion(): string; + setBurrowversion(value: string): void; + + getGenesishash(): Uint8Array | string; + getGenesishash_asU8(): Uint8Array; + getGenesishash_asB64(): string; + setGenesishash(value: Uint8Array | string): void; + + + hasNodeinfo(): boolean; + clearNodeinfo(): void; + getNodeinfo(): tendermint_pb.NodeInfo | undefined; + setNodeinfo(value?: tendermint_pb.NodeInfo): void; + + + hasSyncinfo(): boolean; + clearSyncinfo(): void; + getSyncinfo(): bcm_pb.SyncInfo | undefined; + setSyncinfo(value?: bcm_pb.SyncInfo): void; + + getCatchingup(): boolean; + setCatchingup(value: boolean): void; + + + hasValidatorinfo(): boolean; + clearValidatorinfo(): void; + getValidatorinfo(): validator_pb.Validator | undefined; + setValidatorinfo(value?: validator_pb.Validator): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResultStatus.AsObject; + static toObject(includeInstance: boolean, msg: ResultStatus): ResultStatus.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResultStatus, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResultStatus; + static deserializeBinaryFromReader(message: ResultStatus, reader: jspb.BinaryReader): ResultStatus; } export namespace ResultStatus { - export type AsObject = { - chainid: string, - runid: string, - burrowversion: string, - genesishash: Uint8Array | string, - nodeinfo?: tendermint_pb.NodeInfo.AsObject, - syncinfo?: bcm_pb.SyncInfo.AsObject, - catchingup: boolean, - validatorinfo?: validator_pb.Validator.AsObject, - } + export type AsObject = { + chainid: string, + runid: string, + burrowversion: string, + genesishash: Uint8Array | string, + nodeinfo?: tendermint_pb.NodeInfo.AsObject, + syncinfo?: bcm_pb.SyncInfo.AsObject, + catchingup: boolean, + validatorinfo?: validator_pb.Validator.AsObject, + } } - diff --git a/js/proto/rpc_pb.js b/js/proto/rpc_pb.js index c5b39bd08..ca8eda178 100644 --- a/js/proto/rpc_pb.js +++ b/js/proto/rpc_pb.js @@ -1,4 +1,3 @@ -// source: rpc.proto /** * @fileoverview * @enhanceable @@ -21,6 +20,7 @@ goog.object.extend(proto, validator_pb); var bcm_pb = require('./bcm_pb.js'); goog.object.extend(proto, bcm_pb); goog.exportSymbol('proto.rpc.ResultStatus', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -36,26 +36,19 @@ proto.rpc.ResultStatus = function(opt_data) { }; goog.inherits(proto.rpc.ResultStatus, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.rpc.ResultStatus.displayName = 'proto.rpc.ResultStatus'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpc.ResultStatus.prototype.toObject = function(opt_includeInstance) { @@ -65,8 +58,8 @@ proto.rpc.ResultStatus.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpc.ResultStatus} msg The msg instance to transform. * @return {!Object} @@ -80,7 +73,7 @@ proto.rpc.ResultStatus.toObject = function(includeInstance, msg) { genesishash: msg.getGenesishash_asB64(), nodeinfo: (f = msg.getNodeinfo()) && tendermint_pb.NodeInfo.toObject(includeInstance, f), syncinfo: (f = msg.getSyncinfo()) && bcm_pb.SyncInfo.toObject(includeInstance, f), - catchingup: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + catchingup: jspb.Message.getFieldWithDefault(msg, 8, false), validatorinfo: (f = msg.getValidatorinfo()) && validator_pb.Validator.toObject(includeInstance, f) }; @@ -253,12 +246,9 @@ proto.rpc.ResultStatus.prototype.getChainid = function() { }; -/** - * @param {string} value - * @return {!proto.rpc.ResultStatus} returns this - */ +/** @param {string} value */ proto.rpc.ResultStatus.prototype.setChainid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -271,12 +261,9 @@ proto.rpc.ResultStatus.prototype.getRunid = function() { }; -/** - * @param {string} value - * @return {!proto.rpc.ResultStatus} returns this - */ +/** @param {string} value */ proto.rpc.ResultStatus.prototype.setRunid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; @@ -289,12 +276,9 @@ proto.rpc.ResultStatus.prototype.getBurrowversion = function() { }; -/** - * @param {string} value - * @return {!proto.rpc.ResultStatus} returns this - */ +/** @param {string} value */ proto.rpc.ResultStatus.prototype.setBurrowversion = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; @@ -331,12 +315,9 @@ proto.rpc.ResultStatus.prototype.getGenesishash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpc.ResultStatus} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpc.ResultStatus.prototype.setGenesishash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); + jspb.Message.setProto3BytesField(this, 4, value); }; @@ -350,21 +331,14 @@ proto.rpc.ResultStatus.prototype.getNodeinfo = function() { }; -/** - * @param {?proto.tendermint.NodeInfo|undefined} value - * @return {!proto.rpc.ResultStatus} returns this -*/ +/** @param {?proto.tendermint.NodeInfo|undefined} value */ proto.rpc.ResultStatus.prototype.setNodeinfo = function(value) { - return jspb.Message.setWrapperField(this, 5, value); + jspb.Message.setWrapperField(this, 5, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.rpc.ResultStatus} returns this - */ proto.rpc.ResultStatus.prototype.clearNodeinfo = function() { - return this.setNodeinfo(undefined); + this.setNodeinfo(undefined); }; @@ -387,21 +361,14 @@ proto.rpc.ResultStatus.prototype.getSyncinfo = function() { }; -/** - * @param {?proto.bcm.SyncInfo|undefined} value - * @return {!proto.rpc.ResultStatus} returns this -*/ +/** @param {?proto.bcm.SyncInfo|undefined} value */ proto.rpc.ResultStatus.prototype.setSyncinfo = function(value) { - return jspb.Message.setWrapperField(this, 6, value); + jspb.Message.setWrapperField(this, 6, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.rpc.ResultStatus} returns this - */ proto.rpc.ResultStatus.prototype.clearSyncinfo = function() { - return this.setSyncinfo(undefined); + this.setSyncinfo(undefined); }; @@ -416,19 +383,18 @@ proto.rpc.ResultStatus.prototype.hasSyncinfo = function() { /** * optional bool CatchingUp = 8; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpc.ResultStatus.prototype.getCatchingup = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 8, false)); }; -/** - * @param {boolean} value - * @return {!proto.rpc.ResultStatus} returns this - */ +/** @param {boolean} value */ proto.rpc.ResultStatus.prototype.setCatchingup = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); + jspb.Message.setProto3BooleanField(this, 8, value); }; @@ -442,21 +408,14 @@ proto.rpc.ResultStatus.prototype.getValidatorinfo = function() { }; -/** - * @param {?proto.validator.Validator|undefined} value - * @return {!proto.rpc.ResultStatus} returns this -*/ +/** @param {?proto.validator.Validator|undefined} value */ proto.rpc.ResultStatus.prototype.setValidatorinfo = function(value) { - return jspb.Message.setWrapperField(this, 7, value); + jspb.Message.setWrapperField(this, 7, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.rpc.ResultStatus} returns this - */ proto.rpc.ResultStatus.prototype.clearValidatorinfo = function() { - return this.setValidatorinfo(undefined); + this.setValidatorinfo(undefined); }; diff --git a/js/proto/rpcdump_grpc_pb.d.ts b/js/proto/rpcdump_grpc_pb.d.ts index 3585069f5..7e5e3b320 100644 --- a/js/proto/rpcdump_grpc_pb.d.ts +++ b/js/proto/rpcdump_grpc_pb.d.ts @@ -1,20 +1,42 @@ -// GENERATED CODE -- DO NOT EDIT! - // package: rpcdump // file: rpcdump.proto +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; import * as rpcdump_pb from "./rpcdump_pb"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as dump_pb from "./dump_pb"; -import * as grpc from "grpc"; interface IDumpService extends grpc.ServiceDefinition { - getDump: grpc.MethodDefinition; + getDump: IDumpService_IGetDump; +} + +interface IDumpService_IGetDump extends grpc.MethodDefinition { + path: string; // "/rpcdump.Dump/GetDump" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } export const DumpService: IDumpService; -export class DumpClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - getDump(argument: rpcdump_pb.GetDumpParam, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - getDump(argument: rpcdump_pb.GetDumpParam, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; +export interface IDumpServer { + getDump: grpc.handleServerStreamingCall; +} + +export interface IDumpClient { + getDump(request: rpcdump_pb.GetDumpParam, options?: Partial): grpc.ClientReadableStream; + getDump(request: rpcdump_pb.GetDumpParam, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; +} + +export class DumpClient extends grpc.Client implements IDumpClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public getDump(request: rpcdump_pb.GetDumpParam, options?: Partial): grpc.ClientReadableStream; + public getDump(request: rpcdump_pb.GetDumpParam, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; } diff --git a/js/proto/rpcdump_grpc_pb.js b/js/proto/rpcdump_grpc_pb.js index b9abc69f5..eebb60d77 100644 --- a/js/proto/rpcdump_grpc_pb.js +++ b/js/proto/rpcdump_grpc_pb.js @@ -1,7 +1,6 @@ // GENERATED CODE -- DO NOT EDIT! 'use strict'; -var grpc = require('grpc'); var rpcdump_pb = require('./rpcdump_pb.js'); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); var dump_pb = require('./dump_pb.js'); @@ -29,7 +28,7 @@ function deserialize_rpcdump_GetDumpParam(buffer_arg) { } -var DumpService = exports.DumpService = { +var DumpService = exports['rpcdump.Dump'] = { getDump: { path: '/rpcdump.Dump/GetDump', requestStream: false, @@ -43,4 +42,3 @@ var DumpService = exports.DumpService = { }, }; -exports.DumpClient = grpc.makeGenericClientConstructor(DumpService); diff --git a/js/proto/rpcdump_pb.d.ts b/js/proto/rpcdump_pb.d.ts index cdd962306..ff25374cf 100644 --- a/js/proto/rpcdump_pb.d.ts +++ b/js/proto/rpcdump_pb.d.ts @@ -1,27 +1,30 @@ // package: rpcdump // file: rpcdump.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as dump_pb from "./dump_pb"; -export class GetDumpParam extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; +export class GetDumpParam extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetDumpParam.AsObject; - static toObject(includeInstance: boolean, msg: GetDumpParam): GetDumpParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetDumpParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetDumpParam; - static deserializeBinaryFromReader(message: GetDumpParam, reader: jspb.BinaryReader): GetDumpParam; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDumpParam.AsObject; + static toObject(includeInstance: boolean, msg: GetDumpParam): GetDumpParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDumpParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDumpParam; + static deserializeBinaryFromReader(message: GetDumpParam, reader: jspb.BinaryReader): GetDumpParam; } export namespace GetDumpParam { - export type AsObject = { - height: number, - } + export type AsObject = { + height: number, + } } - diff --git a/js/proto/rpcdump_pb.js b/js/proto/rpcdump_pb.js index f846a6cd5..f6eaa5874 100644 --- a/js/proto/rpcdump_pb.js +++ b/js/proto/rpcdump_pb.js @@ -1,4 +1,3 @@ -// source: rpcdump.proto /** * @fileoverview * @enhanceable @@ -17,6 +16,7 @@ goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); var dump_pb = require('./dump_pb.js'); goog.object.extend(proto, dump_pb); goog.exportSymbol('proto.rpcdump.GetDumpParam', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -32,26 +32,19 @@ proto.rpcdump.GetDumpParam = function(opt_data) { }; goog.inherits(proto.rpcdump.GetDumpParam, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.rpcdump.GetDumpParam.displayName = 'proto.rpcdump.GetDumpParam'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcdump.GetDumpParam.prototype.toObject = function(opt_includeInstance) { @@ -61,8 +54,8 @@ proto.rpcdump.GetDumpParam.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcdump.GetDumpParam} msg The msg instance to transform. * @return {!Object} @@ -159,12 +152,9 @@ proto.rpcdump.GetDumpParam.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.rpcdump.GetDumpParam} returns this - */ +/** @param {number} value */ proto.rpcdump.GetDumpParam.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; diff --git a/js/proto/rpcevents_grpc_pb.d.ts b/js/proto/rpcevents_grpc_pb.d.ts index 5809fe690..f457be828 100644 --- a/js/proto/rpcevents_grpc_pb.d.ts +++ b/js/proto/rpcevents_grpc_pb.d.ts @@ -1,27 +1,74 @@ -// GENERATED CODE -- DO NOT EDIT! - // package: rpcevents // file: rpcevents.proto +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; import * as rpcevents_pb from "./rpcevents_pb"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as exec_pb from "./exec_pb"; -import * as grpc from "grpc"; interface IExecutionEventsService extends grpc.ServiceDefinition { - stream: grpc.MethodDefinition; - tx: grpc.MethodDefinition; - events: grpc.MethodDefinition; + stream: IExecutionEventsService_IStream; + tx: IExecutionEventsService_ITx; + events: IExecutionEventsService_IEvents; +} + +interface IExecutionEventsService_IStream extends grpc.MethodDefinition { + path: string; // "/rpcevents.ExecutionEvents/Stream" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IExecutionEventsService_ITx extends grpc.MethodDefinition { + path: string; // "/rpcevents.ExecutionEvents/Tx" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IExecutionEventsService_IEvents extends grpc.MethodDefinition { + path: string; // "/rpcevents.ExecutionEvents/Events" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } export const ExecutionEventsService: IExecutionEventsService; -export class ExecutionEventsClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - stream(argument: rpcevents_pb.BlocksRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - stream(argument: rpcevents_pb.BlocksRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; - tx(argument: rpcevents_pb.TxRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - tx(argument: rpcevents_pb.TxRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - tx(argument: rpcevents_pb.TxRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - events(argument: rpcevents_pb.BlocksRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - events(argument: rpcevents_pb.BlocksRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; +export interface IExecutionEventsServer { + stream: grpc.handleServerStreamingCall; + tx: grpc.handleUnaryCall; + events: grpc.handleServerStreamingCall; +} + +export interface IExecutionEventsClient { + stream(request: rpcevents_pb.BlocksRequest, options?: Partial): grpc.ClientReadableStream; + stream(request: rpcevents_pb.BlocksRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + tx(request: rpcevents_pb.TxRequest, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + tx(request: rpcevents_pb.TxRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + tx(request: rpcevents_pb.TxRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + events(request: rpcevents_pb.BlocksRequest, options?: Partial): grpc.ClientReadableStream; + events(request: rpcevents_pb.BlocksRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; +} + +export class ExecutionEventsClient extends grpc.Client implements IExecutionEventsClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public stream(request: rpcevents_pb.BlocksRequest, options?: Partial): grpc.ClientReadableStream; + public stream(request: rpcevents_pb.BlocksRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public tx(request: rpcevents_pb.TxRequest, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public tx(request: rpcevents_pb.TxRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public tx(request: rpcevents_pb.TxRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public events(request: rpcevents_pb.BlocksRequest, options?: Partial): grpc.ClientReadableStream; + public events(request: rpcevents_pb.BlocksRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; } diff --git a/js/proto/rpcevents_grpc_pb.js b/js/proto/rpcevents_grpc_pb.js index 7e526e52d..4a326d75e 100644 --- a/js/proto/rpcevents_grpc_pb.js +++ b/js/proto/rpcevents_grpc_pb.js @@ -1,7 +1,6 @@ // GENERATED CODE -- DO NOT EDIT! 'use strict'; -var grpc = require('grpc'); var rpcevents_pb = require('./rpcevents_pb.js'); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); var exec_pb = require('./exec_pb.js'); @@ -64,7 +63,7 @@ function deserialize_rpcevents_TxRequest(buffer_arg) { // -------------------------------------------------- // Execution events -var ExecutionEventsService = exports.ExecutionEventsService = { +var ExecutionEventsService = exports['rpcevents.ExecutionEvents'] = { // Get StreamEvents (including transactions) for a range of block heights stream: { path: '/rpcevents.ExecutionEvents/Stream', @@ -104,4 +103,3 @@ events: { }, }; -exports.ExecutionEventsClient = grpc.makeGenericClientConstructor(ExecutionEventsService); diff --git a/js/proto/rpcevents_pb.d.ts b/js/proto/rpcevents_pb.d.ts index c338c5d6d..3ea6da1f0 100644 --- a/js/proto/rpcevents_pb.d.ts +++ b/js/proto/rpcevents_pb.d.ts @@ -1,225 +1,237 @@ // package: rpcevents // file: rpcevents.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as exec_pb from "./exec_pb"; -export class GetBlockRequest extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; +export class GetBlockRequest extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + getWait(): boolean; + setWait(value: boolean): void; - getWait(): boolean; - setWait(value: boolean): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetBlockRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetBlockRequest): GetBlockRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetBlockRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetBlockRequest; - static deserializeBinaryFromReader(message: GetBlockRequest, reader: jspb.BinaryReader): GetBlockRequest; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetBlockRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetBlockRequest): GetBlockRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetBlockRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetBlockRequest; + static deserializeBinaryFromReader(message: GetBlockRequest, reader: jspb.BinaryReader): GetBlockRequest; } export namespace GetBlockRequest { - export type AsObject = { - height: number, - wait: boolean, - } + export type AsObject = { + height: number, + wait: boolean, + } } -export class TxRequest extends jspb.Message { - getTxhash(): Uint8Array | string; - getTxhash_asU8(): Uint8Array; - getTxhash_asB64(): string; - setTxhash(value: Uint8Array | string): void; +export class TxRequest extends jspb.Message { + getTxhash(): Uint8Array | string; + getTxhash_asU8(): Uint8Array; + getTxhash_asB64(): string; + setTxhash(value: Uint8Array | string): void; + + getWait(): boolean; + setWait(value: boolean): void; - getWait(): boolean; - setWait(value: boolean): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TxRequest.AsObject; - static toObject(includeInstance: boolean, msg: TxRequest): TxRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TxRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TxRequest; - static deserializeBinaryFromReader(message: TxRequest, reader: jspb.BinaryReader): TxRequest; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxRequest.AsObject; + static toObject(includeInstance: boolean, msg: TxRequest): TxRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxRequest; + static deserializeBinaryFromReader(message: TxRequest, reader: jspb.BinaryReader): TxRequest; } export namespace TxRequest { - export type AsObject = { - txhash: Uint8Array | string, - wait: boolean, - } + export type AsObject = { + txhash: Uint8Array | string, + wait: boolean, + } } -export class BlocksRequest extends jspb.Message { - hasBlockrange(): boolean; - clearBlockrange(): void; - getBlockrange(): BlockRange | undefined; - setBlockrange(value?: BlockRange): void; +export class BlocksRequest extends jspb.Message { + + hasBlockrange(): boolean; + clearBlockrange(): void; + getBlockrange(): BlockRange | undefined; + setBlockrange(value?: BlockRange): void; + + getQuery(): string; + setQuery(value: string): void; - getQuery(): string; - setQuery(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlocksRequest.AsObject; - static toObject(includeInstance: boolean, msg: BlocksRequest): BlocksRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlocksRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlocksRequest; - static deserializeBinaryFromReader(message: BlocksRequest, reader: jspb.BinaryReader): BlocksRequest; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlocksRequest.AsObject; + static toObject(includeInstance: boolean, msg: BlocksRequest): BlocksRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlocksRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlocksRequest; + static deserializeBinaryFromReader(message: BlocksRequest, reader: jspb.BinaryReader): BlocksRequest; } export namespace BlocksRequest { - export type AsObject = { - blockrange?: BlockRange.AsObject, - query: string, - } + export type AsObject = { + blockrange?: BlockRange.AsObject, + query: string, + } } -export class EventsResponse extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; +export class EventsResponse extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; - clearEventsList(): void; - getEventsList(): Array; - setEventsList(value: Array): void; - addEvents(value?: exec_pb.Event, index?: number): exec_pb.Event; + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): void; + addEvents(value?: exec_pb.Event, index?: number): exec_pb.Event; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EventsResponse.AsObject; - static toObject(includeInstance: boolean, msg: EventsResponse): EventsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EventsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EventsResponse; - static deserializeBinaryFromReader(message: EventsResponse, reader: jspb.BinaryReader): EventsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EventsResponse.AsObject; + static toObject(includeInstance: boolean, msg: EventsResponse): EventsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EventsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventsResponse; + static deserializeBinaryFromReader(message: EventsResponse, reader: jspb.BinaryReader): EventsResponse; } export namespace EventsResponse { - export type AsObject = { - height: number, - eventsList: Array, - } + export type AsObject = { + height: number, + eventsList: Array, + } } -export class GetTxsRequest extends jspb.Message { - getStartheight(): number; - setStartheight(value: number): void; +export class GetTxsRequest extends jspb.Message { + getStartheight(): number; + setStartheight(value: number): void; + + getEndheight(): number; + setEndheight(value: number): void; - getEndheight(): number; - setEndheight(value: number): void; + getQuery(): string; + setQuery(value: string): void; - getQuery(): string; - setQuery(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetTxsRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetTxsRequest): GetTxsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetTxsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetTxsRequest; - static deserializeBinaryFromReader(message: GetTxsRequest, reader: jspb.BinaryReader): GetTxsRequest; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTxsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetTxsRequest): GetTxsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTxsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTxsRequest; + static deserializeBinaryFromReader(message: GetTxsRequest, reader: jspb.BinaryReader): GetTxsRequest; } export namespace GetTxsRequest { - export type AsObject = { - startheight: number, - endheight: number, - query: string, - } + export type AsObject = { + startheight: number, + endheight: number, + query: string, + } } -export class GetTxsResponse extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; +export class GetTxsResponse extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + + clearTxexecutionsList(): void; + getTxexecutionsList(): Array; + setTxexecutionsList(value: Array): void; + addTxexecutions(value?: exec_pb.TxExecution, index?: number): exec_pb.TxExecution; - clearTxexecutionsList(): void; - getTxexecutionsList(): Array; - setTxexecutionsList(value: Array): void; - addTxexecutions(value?: exec_pb.TxExecution, index?: number): exec_pb.TxExecution; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetTxsResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetTxsResponse): GetTxsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetTxsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetTxsResponse; - static deserializeBinaryFromReader(message: GetTxsResponse, reader: jspb.BinaryReader): GetTxsResponse; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTxsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetTxsResponse): GetTxsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTxsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTxsResponse; + static deserializeBinaryFromReader(message: GetTxsResponse, reader: jspb.BinaryReader): GetTxsResponse; } export namespace GetTxsResponse { - export type AsObject = { - height: number, - txexecutionsList: Array, - } + export type AsObject = { + height: number, + txexecutionsList: Array, + } } -export class Bound extends jspb.Message { - getType(): Bound.BoundTypeMap[keyof Bound.BoundTypeMap]; - setType(value: Bound.BoundTypeMap[keyof Bound.BoundTypeMap]): void; +export class Bound extends jspb.Message { + getType(): Bound.BoundType; + setType(value: Bound.BoundType): void; - getIndex(): number; - setIndex(value: number): void; + getIndex(): number; + setIndex(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Bound.AsObject; - static toObject(includeInstance: boolean, msg: Bound): Bound.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Bound, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Bound; - static deserializeBinaryFromReader(message: Bound, reader: jspb.BinaryReader): Bound; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Bound.AsObject; + static toObject(includeInstance: boolean, msg: Bound): Bound.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Bound, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Bound; + static deserializeBinaryFromReader(message: Bound, reader: jspb.BinaryReader): Bound; } export namespace Bound { - export type AsObject = { - type: Bound.BoundTypeMap[keyof Bound.BoundTypeMap], - index: number, - } - - export interface BoundTypeMap { - ABSOLUTE: 0; - RELATIVE: 1; - FIRST: 2; - LATEST: 3; - STREAM: 4; - } - - export const BoundType: BoundTypeMap; -} - -export class BlockRange extends jspb.Message { - hasStart(): boolean; - clearStart(): void; - getStart(): Bound | undefined; - setStart(value?: Bound): void; - - hasEnd(): boolean; - clearEnd(): void; - getEnd(): Bound | undefined; - setEnd(value?: Bound): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockRange.AsObject; - static toObject(includeInstance: boolean, msg: BlockRange): BlockRange.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockRange, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockRange; - static deserializeBinaryFromReader(message: BlockRange, reader: jspb.BinaryReader): BlockRange; + export type AsObject = { + type: Bound.BoundType, + index: number, + } + + export enum BoundType { + ABSOLUTE = 0, + RELATIVE = 1, + FIRST = 2, + LATEST = 3, + STREAM = 4, + } + } -export namespace BlockRange { - export type AsObject = { - start?: Bound.AsObject, - end?: Bound.AsObject, - } +export class BlockRange extends jspb.Message { + + hasStart(): boolean; + clearStart(): void; + getStart(): Bound | undefined; + setStart(value?: Bound): void; + + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): Bound | undefined; + setEnd(value?: Bound): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockRange.AsObject; + static toObject(includeInstance: boolean, msg: BlockRange): BlockRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockRange; + static deserializeBinaryFromReader(message: BlockRange, reader: jspb.BinaryReader): BlockRange; } +export namespace BlockRange { + export type AsObject = { + start?: Bound.AsObject, + end?: Bound.AsObject, + } +} diff --git a/js/proto/rpcevents_pb.js b/js/proto/rpcevents_pb.js index 25f593ae1..86353aef2 100644 --- a/js/proto/rpcevents_pb.js +++ b/js/proto/rpcevents_pb.js @@ -1,4 +1,3 @@ -// source: rpcevents.proto /** * @fileoverview * @enhanceable @@ -25,6 +24,7 @@ goog.exportSymbol('proto.rpcevents.GetBlockRequest', null, global); goog.exportSymbol('proto.rpcevents.GetTxsRequest', null, global); goog.exportSymbol('proto.rpcevents.GetTxsResponse', null, global); goog.exportSymbol('proto.rpcevents.TxRequest', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -40,173 +40,19 @@ proto.rpcevents.GetBlockRequest = function(opt_data) { }; goog.inherits(proto.rpcevents.GetBlockRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.rpcevents.GetBlockRequest.displayName = 'proto.rpcevents.GetBlockRequest'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.TxRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcevents.TxRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcevents.TxRequest.displayName = 'proto.rpcevents.TxRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.BlocksRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcevents.BlocksRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcevents.BlocksRequest.displayName = 'proto.rpcevents.BlocksRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.EventsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcevents.EventsResponse.repeatedFields_, null); -}; -goog.inherits(proto.rpcevents.EventsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcevents.EventsResponse.displayName = 'proto.rpcevents.EventsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.GetTxsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcevents.GetTxsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcevents.GetTxsRequest.displayName = 'proto.rpcevents.GetTxsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.GetTxsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcevents.GetTxsResponse.repeatedFields_, null); -}; -goog.inherits(proto.rpcevents.GetTxsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcevents.GetTxsResponse.displayName = 'proto.rpcevents.GetTxsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.Bound = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcevents.Bound, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcevents.Bound.displayName = 'proto.rpcevents.Bound'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.BlockRange = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcevents.BlockRange, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcevents.BlockRange.displayName = 'proto.rpcevents.BlockRange'; -} - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstance) { @@ -216,8 +62,8 @@ proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.GetBlockRequest} msg The msg instance to transform. * @return {!Object} @@ -226,7 +72,7 @@ proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstanc proto.rpcevents.GetBlockRequest.toObject = function(includeInstance, msg) { var f, obj = { height: jspb.Message.getFieldWithDefault(msg, 1, 0), - wait: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + wait: jspb.Message.getFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -326,47 +172,58 @@ proto.rpcevents.GetBlockRequest.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.rpcevents.GetBlockRequest} returns this - */ +/** @param {number} value */ proto.rpcevents.GetBlockRequest.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; /** * optional bool Wait = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpcevents.GetBlockRequest.prototype.getWait = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); }; -/** - * @param {boolean} value - * @return {!proto.rpcevents.GetBlockRequest} returns this - */ +/** @param {boolean} value */ proto.rpcevents.GetBlockRequest.prototype.setWait = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); + jspb.Message.setProto3BooleanField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.TxRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.TxRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcevents.TxRequest.displayName = 'proto.rpcevents.TxRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { @@ -376,8 +233,8 @@ proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.TxRequest} msg The msg instance to transform. * @return {!Object} @@ -386,7 +243,7 @@ proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { proto.rpcevents.TxRequest.toObject = function(includeInstance, msg) { var f, obj = { txhash: msg.getTxhash_asB64(), - wait: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + wait: jspb.Message.getFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -510,47 +367,58 @@ proto.rpcevents.TxRequest.prototype.getTxhash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpcevents.TxRequest} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpcevents.TxRequest.prototype.setTxhash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; /** * optional bool Wait = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpcevents.TxRequest.prototype.getWait = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); }; -/** - * @param {boolean} value - * @return {!proto.rpcevents.TxRequest} returns this - */ +/** @param {boolean} value */ proto.rpcevents.TxRequest.prototype.setWait = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); + jspb.Message.setProto3BooleanField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.BlocksRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.BlocksRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcevents.BlocksRequest.displayName = 'proto.rpcevents.BlocksRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.BlocksRequest.prototype.toObject = function(opt_includeInstance) { @@ -560,8 +428,8 @@ proto.rpcevents.BlocksRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.BlocksRequest} msg The msg instance to transform. * @return {!Object} @@ -673,21 +541,14 @@ proto.rpcevents.BlocksRequest.prototype.getBlockrange = function() { }; -/** - * @param {?proto.rpcevents.BlockRange|undefined} value - * @return {!proto.rpcevents.BlocksRequest} returns this -*/ +/** @param {?proto.rpcevents.BlockRange|undefined} value */ proto.rpcevents.BlocksRequest.prototype.setBlockrange = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.rpcevents.BlocksRequest} returns this - */ proto.rpcevents.BlocksRequest.prototype.clearBlockrange = function() { - return this.setBlockrange(undefined); + this.setBlockrange(undefined); }; @@ -709,16 +570,30 @@ proto.rpcevents.BlocksRequest.prototype.getQuery = function() { }; -/** - * @param {string} value - * @return {!proto.rpcevents.BlocksRequest} returns this - */ +/** @param {string} value */ proto.rpcevents.BlocksRequest.prototype.setQuery = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.EventsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcevents.EventsResponse.repeatedFields_, null); +}; +goog.inherits(proto.rpcevents.EventsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcevents.EventsResponse.displayName = 'proto.rpcevents.EventsResponse'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -730,15 +605,13 @@ proto.rpcevents.EventsResponse.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.EventsResponse.prototype.toObject = function(opt_includeInstance) { @@ -748,8 +621,8 @@ proto.rpcevents.EventsResponse.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.EventsResponse} msg The msg instance to transform. * @return {!Object} @@ -861,12 +734,9 @@ proto.rpcevents.EventsResponse.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.rpcevents.EventsResponse} returns this - */ +/** @param {number} value */ proto.rpcevents.EventsResponse.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -880,12 +750,9 @@ proto.rpcevents.EventsResponse.prototype.getEventsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.rpcevents.EventsResponse} returns this -*/ +/** @param {!Array} value */ proto.rpcevents.EventsResponse.prototype.setEventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -899,29 +766,40 @@ proto.rpcevents.EventsResponse.prototype.addEvents = function(opt_value, opt_ind }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.rpcevents.EventsResponse} returns this - */ proto.rpcevents.EventsResponse.prototype.clearEventsList = function() { - return this.setEventsList([]); + this.setEventsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.GetTxsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.GetTxsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcevents.GetTxsRequest.displayName = 'proto.rpcevents.GetTxsRequest'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.GetTxsRequest.prototype.toObject = function(opt_includeInstance) { @@ -931,8 +809,8 @@ proto.rpcevents.GetTxsRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.GetTxsRequest} msg The msg instance to transform. * @return {!Object} @@ -1053,12 +931,9 @@ proto.rpcevents.GetTxsRequest.prototype.getStartheight = function() { }; -/** - * @param {number} value - * @return {!proto.rpcevents.GetTxsRequest} returns this - */ +/** @param {number} value */ proto.rpcevents.GetTxsRequest.prototype.setStartheight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -1071,12 +946,9 @@ proto.rpcevents.GetTxsRequest.prototype.getEndheight = function() { }; -/** - * @param {number} value - * @return {!proto.rpcevents.GetTxsRequest} returns this - */ +/** @param {number} value */ proto.rpcevents.GetTxsRequest.prototype.setEndheight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; @@ -1089,16 +961,30 @@ proto.rpcevents.GetTxsRequest.prototype.getQuery = function() { }; -/** - * @param {string} value - * @return {!proto.rpcevents.GetTxsRequest} returns this - */ +/** @param {string} value */ proto.rpcevents.GetTxsRequest.prototype.setQuery = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.GetTxsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcevents.GetTxsResponse.repeatedFields_, null); +}; +goog.inherits(proto.rpcevents.GetTxsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcevents.GetTxsResponse.displayName = 'proto.rpcevents.GetTxsResponse'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -1110,15 +996,13 @@ proto.rpcevents.GetTxsResponse.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.GetTxsResponse.prototype.toObject = function(opt_includeInstance) { @@ -1128,8 +1012,8 @@ proto.rpcevents.GetTxsResponse.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.GetTxsResponse} msg The msg instance to transform. * @return {!Object} @@ -1241,12 +1125,9 @@ proto.rpcevents.GetTxsResponse.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.rpcevents.GetTxsResponse} returns this - */ +/** @param {number} value */ proto.rpcevents.GetTxsResponse.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -1260,12 +1141,9 @@ proto.rpcevents.GetTxsResponse.prototype.getTxexecutionsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.rpcevents.GetTxsResponse} returns this -*/ +/** @param {!Array} value */ proto.rpcevents.GetTxsResponse.prototype.setTxexecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -1279,29 +1157,40 @@ proto.rpcevents.GetTxsResponse.prototype.addTxexecutions = function(opt_value, o }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.rpcevents.GetTxsResponse} returns this - */ proto.rpcevents.GetTxsResponse.prototype.clearTxexecutionsList = function() { - return this.setTxexecutionsList([]); + this.setTxexecutionsList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.Bound = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.Bound, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcevents.Bound.displayName = 'proto.rpcevents.Bound'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.Bound.prototype.toObject = function(opt_includeInstance) { @@ -1311,8 +1200,8 @@ proto.rpcevents.Bound.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.Bound} msg The msg instance to transform. * @return {!Object} @@ -1432,12 +1321,9 @@ proto.rpcevents.Bound.prototype.getType = function() { }; -/** - * @param {!proto.rpcevents.Bound.BoundType} value - * @return {!proto.rpcevents.Bound} returns this - */ +/** @param {!proto.rpcevents.Bound.BoundType} value */ proto.rpcevents.Bound.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); + jspb.Message.setProto3EnumField(this, 1, value); }; @@ -1450,29 +1336,41 @@ proto.rpcevents.Bound.prototype.getIndex = function() { }; -/** - * @param {number} value - * @return {!proto.rpcevents.Bound} returns this - */ +/** @param {number} value */ proto.rpcevents.Bound.prototype.setIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.BlockRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.BlockRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcevents.BlockRange.displayName = 'proto.rpcevents.BlockRange'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.BlockRange.prototype.toObject = function(opt_includeInstance) { @@ -1482,8 +1380,8 @@ proto.rpcevents.BlockRange.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.BlockRange} msg The msg instance to transform. * @return {!Object} @@ -1597,21 +1495,14 @@ proto.rpcevents.BlockRange.prototype.getStart = function() { }; -/** - * @param {?proto.rpcevents.Bound|undefined} value - * @return {!proto.rpcevents.BlockRange} returns this -*/ +/** @param {?proto.rpcevents.Bound|undefined} value */ proto.rpcevents.BlockRange.prototype.setStart = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.rpcevents.BlockRange} returns this - */ proto.rpcevents.BlockRange.prototype.clearStart = function() { - return this.setStart(undefined); + this.setStart(undefined); }; @@ -1634,21 +1525,14 @@ proto.rpcevents.BlockRange.prototype.getEnd = function() { }; -/** - * @param {?proto.rpcevents.Bound|undefined} value - * @return {!proto.rpcevents.BlockRange} returns this -*/ +/** @param {?proto.rpcevents.Bound|undefined} value */ proto.rpcevents.BlockRange.prototype.setEnd = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.rpcevents.BlockRange} returns this - */ proto.rpcevents.BlockRange.prototype.clearEnd = function() { - return this.setEnd(undefined); + this.setEnd(undefined); }; diff --git a/js/proto/rpcquery_grpc_pb.d.ts b/js/proto/rpcquery_grpc_pb.d.ts index 9c48ba004..e65279dfc 100644 --- a/js/proto/rpcquery_grpc_pb.d.ts +++ b/js/proto/rpcquery_grpc_pb.d.ts @@ -1,74 +1,265 @@ -// GENERATED CODE -- DO NOT EDIT! - // package: rpcquery // file: rpcquery.proto +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; import * as rpcquery_pb from "./rpcquery_pb"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as github_com_tendermint_tendermint_abci_types_types_pb from "./github.com/tendermint/tendermint/abci/types/types_pb"; import * as names_pb from "./names_pb"; import * as acm_pb from "./acm_pb"; +import * as validator_pb from "./validator_pb"; +import * as registry_pb from "./registry_pb"; import * as rpc_pb from "./rpc_pb"; import * as payload_pb from "./payload_pb"; -import * as grpc from "grpc"; interface IQueryService extends grpc.ServiceDefinition { - status: grpc.MethodDefinition; - getAccount: grpc.MethodDefinition; - getMetadata: grpc.MethodDefinition; - getStorage: grpc.MethodDefinition; - listAccounts: grpc.MethodDefinition; - getName: grpc.MethodDefinition; - listNames: grpc.MethodDefinition; - getNetworkRegistry: grpc.MethodDefinition; - getValidatorSet: grpc.MethodDefinition; - getValidatorSetHistory: grpc.MethodDefinition; - getProposal: grpc.MethodDefinition; - listProposals: grpc.MethodDefinition; - getStats: grpc.MethodDefinition; - getBlockHeader: grpc.MethodDefinition; + status: IQueryService_IStatus; + getAccount: IQueryService_IGetAccount; + getMetadata: IQueryService_IGetMetadata; + getStorage: IQueryService_IGetStorage; + listAccounts: IQueryService_IListAccounts; + getName: IQueryService_IGetName; + listNames: IQueryService_IListNames; + getNetworkRegistry: IQueryService_IGetNetworkRegistry; + getValidatorSet: IQueryService_IGetValidatorSet; + getValidatorSetHistory: IQueryService_IGetValidatorSetHistory; + getProposal: IQueryService_IGetProposal; + listProposals: IQueryService_IListProposals; + getStats: IQueryService_IGetStats; + getBlockHeader: IQueryService_IGetBlockHeader; +} + +interface IQueryService_IStatus extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/Status" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IGetAccount extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/GetAccount" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IGetMetadata extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/GetMetadata" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IGetStorage extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/GetStorage" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IListAccounts extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/ListAccounts" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IGetName extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/GetName" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IListNames extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/ListNames" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IGetNetworkRegistry extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/GetNetworkRegistry" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IGetValidatorSet extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/GetValidatorSet" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IGetValidatorSetHistory extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/GetValidatorSetHistory" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IGetProposal extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/GetProposal" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IListProposals extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/ListProposals" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IGetStats extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/GetStats" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IQueryService_IGetBlockHeader extends grpc.MethodDefinition { + path: string; // "/rpcquery.Query/GetBlockHeader" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } export const QueryService: IQueryService; -export class QueryClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - status(argument: rpcquery_pb.StatusParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - status(argument: rpcquery_pb.StatusParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - status(argument: rpcquery_pb.StatusParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAccount(argument: rpcquery_pb.GetAccountParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAccount(argument: rpcquery_pb.GetAccountParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getAccount(argument: rpcquery_pb.GetAccountParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getMetadata(argument: rpcquery_pb.GetMetadataParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getMetadata(argument: rpcquery_pb.GetMetadataParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getMetadata(argument: rpcquery_pb.GetMetadataParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getStorage(argument: rpcquery_pb.GetStorageParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getStorage(argument: rpcquery_pb.GetStorageParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getStorage(argument: rpcquery_pb.GetStorageParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - listAccounts(argument: rpcquery_pb.ListAccountsParam, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - listAccounts(argument: rpcquery_pb.ListAccountsParam, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; - getName(argument: rpcquery_pb.GetNameParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getName(argument: rpcquery_pb.GetNameParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getName(argument: rpcquery_pb.GetNameParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - listNames(argument: rpcquery_pb.ListNamesParam, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - listNames(argument: rpcquery_pb.ListNamesParam, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; - getNetworkRegistry(argument: rpcquery_pb.GetNetworkRegistryParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getNetworkRegistry(argument: rpcquery_pb.GetNetworkRegistryParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getNetworkRegistry(argument: rpcquery_pb.GetNetworkRegistryParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getValidatorSet(argument: rpcquery_pb.GetValidatorSetParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getValidatorSet(argument: rpcquery_pb.GetValidatorSetParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getValidatorSet(argument: rpcquery_pb.GetValidatorSetParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getValidatorSetHistory(argument: rpcquery_pb.GetValidatorSetHistoryParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getValidatorSetHistory(argument: rpcquery_pb.GetValidatorSetHistoryParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getValidatorSetHistory(argument: rpcquery_pb.GetValidatorSetHistoryParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getProposal(argument: rpcquery_pb.GetProposalParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getProposal(argument: rpcquery_pb.GetProposalParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getProposal(argument: rpcquery_pb.GetProposalParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - listProposals(argument: rpcquery_pb.ListProposalsParam, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream; - listProposals(argument: rpcquery_pb.ListProposalsParam, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream; - getStats(argument: rpcquery_pb.GetStatsParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getStats(argument: rpcquery_pb.GetStatsParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getStats(argument: rpcquery_pb.GetStatsParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getBlockHeader(argument: rpcquery_pb.GetBlockParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getBlockHeader(argument: rpcquery_pb.GetBlockParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getBlockHeader(argument: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; +export interface IQueryServer { + status: grpc.handleUnaryCall; + getAccount: grpc.handleUnaryCall; + getMetadata: grpc.handleUnaryCall; + getStorage: grpc.handleUnaryCall; + listAccounts: grpc.handleServerStreamingCall; + getName: grpc.handleUnaryCall; + listNames: grpc.handleServerStreamingCall; + getNetworkRegistry: grpc.handleUnaryCall; + getValidatorSet: grpc.handleUnaryCall; + getValidatorSetHistory: grpc.handleUnaryCall; + getProposal: grpc.handleUnaryCall; + listProposals: grpc.handleServerStreamingCall; + getStats: grpc.handleUnaryCall; + getBlockHeader: grpc.handleUnaryCall; +} + +export interface IQueryClient { + status(request: rpcquery_pb.StatusParam, callback: (error: grpc.ServiceError | null, response: rpc_pb.ResultStatus) => void): grpc.ClientUnaryCall; + status(request: rpcquery_pb.StatusParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpc_pb.ResultStatus) => void): grpc.ClientUnaryCall; + status(request: rpcquery_pb.StatusParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpc_pb.ResultStatus) => void): grpc.ClientUnaryCall; + getAccount(request: rpcquery_pb.GetAccountParam, callback: (error: grpc.ServiceError | null, response: acm_pb.Account) => void): grpc.ClientUnaryCall; + getAccount(request: rpcquery_pb.GetAccountParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: acm_pb.Account) => void): grpc.ClientUnaryCall; + getAccount(request: rpcquery_pb.GetAccountParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: acm_pb.Account) => void): grpc.ClientUnaryCall; + getMetadata(request: rpcquery_pb.GetMetadataParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.MetadataResult) => void): grpc.ClientUnaryCall; + getMetadata(request: rpcquery_pb.GetMetadataParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.MetadataResult) => void): grpc.ClientUnaryCall; + getMetadata(request: rpcquery_pb.GetMetadataParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.MetadataResult) => void): grpc.ClientUnaryCall; + getStorage(request: rpcquery_pb.GetStorageParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.StorageValue) => void): grpc.ClientUnaryCall; + getStorage(request: rpcquery_pb.GetStorageParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.StorageValue) => void): grpc.ClientUnaryCall; + getStorage(request: rpcquery_pb.GetStorageParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.StorageValue) => void): grpc.ClientUnaryCall; + listAccounts(request: rpcquery_pb.ListAccountsParam, options?: Partial): grpc.ClientReadableStream; + listAccounts(request: rpcquery_pb.ListAccountsParam, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + getName(request: rpcquery_pb.GetNameParam, callback: (error: grpc.ServiceError | null, response: names_pb.Entry) => void): grpc.ClientUnaryCall; + getName(request: rpcquery_pb.GetNameParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: names_pb.Entry) => void): grpc.ClientUnaryCall; + getName(request: rpcquery_pb.GetNameParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: names_pb.Entry) => void): grpc.ClientUnaryCall; + listNames(request: rpcquery_pb.ListNamesParam, options?: Partial): grpc.ClientReadableStream; + listNames(request: rpcquery_pb.ListNamesParam, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + getNetworkRegistry(request: rpcquery_pb.GetNetworkRegistryParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.NetworkRegistry) => void): grpc.ClientUnaryCall; + getNetworkRegistry(request: rpcquery_pb.GetNetworkRegistryParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.NetworkRegistry) => void): grpc.ClientUnaryCall; + getNetworkRegistry(request: rpcquery_pb.GetNetworkRegistryParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.NetworkRegistry) => void): grpc.ClientUnaryCall; + getValidatorSet(request: rpcquery_pb.GetValidatorSetParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.ValidatorSet) => void): grpc.ClientUnaryCall; + getValidatorSet(request: rpcquery_pb.GetValidatorSetParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.ValidatorSet) => void): grpc.ClientUnaryCall; + getValidatorSet(request: rpcquery_pb.GetValidatorSetParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.ValidatorSet) => void): grpc.ClientUnaryCall; + getValidatorSetHistory(request: rpcquery_pb.GetValidatorSetHistoryParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.ValidatorSetHistory) => void): grpc.ClientUnaryCall; + getValidatorSetHistory(request: rpcquery_pb.GetValidatorSetHistoryParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.ValidatorSetHistory) => void): grpc.ClientUnaryCall; + getValidatorSetHistory(request: rpcquery_pb.GetValidatorSetHistoryParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.ValidatorSetHistory) => void): grpc.ClientUnaryCall; + getProposal(request: rpcquery_pb.GetProposalParam, callback: (error: grpc.ServiceError | null, response: payload_pb.Ballot) => void): grpc.ClientUnaryCall; + getProposal(request: rpcquery_pb.GetProposalParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: payload_pb.Ballot) => void): grpc.ClientUnaryCall; + getProposal(request: rpcquery_pb.GetProposalParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: payload_pb.Ballot) => void): grpc.ClientUnaryCall; + listProposals(request: rpcquery_pb.ListProposalsParam, options?: Partial): grpc.ClientReadableStream; + listProposals(request: rpcquery_pb.ListProposalsParam, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + getStats(request: rpcquery_pb.GetStatsParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.Stats) => void): grpc.ClientUnaryCall; + getStats(request: rpcquery_pb.GetStatsParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.Stats) => void): grpc.ClientUnaryCall; + getStats(request: rpcquery_pb.GetStatsParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.Stats) => void): grpc.ClientUnaryCall; + getBlockHeader(request: rpcquery_pb.GetBlockParam, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.Header) => void): grpc.ClientUnaryCall; + getBlockHeader(request: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.Header) => void): grpc.ClientUnaryCall; + getBlockHeader(request: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.Header) => void): grpc.ClientUnaryCall; +} + +export class QueryClient extends grpc.Client implements IQueryClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public status(request: rpcquery_pb.StatusParam, callback: (error: grpc.ServiceError | null, response: rpc_pb.ResultStatus) => void): grpc.ClientUnaryCall; + public status(request: rpcquery_pb.StatusParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpc_pb.ResultStatus) => void): grpc.ClientUnaryCall; + public status(request: rpcquery_pb.StatusParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpc_pb.ResultStatus) => void): grpc.ClientUnaryCall; + public getAccount(request: rpcquery_pb.GetAccountParam, callback: (error: grpc.ServiceError | null, response: acm_pb.Account) => void): grpc.ClientUnaryCall; + public getAccount(request: rpcquery_pb.GetAccountParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: acm_pb.Account) => void): grpc.ClientUnaryCall; + public getAccount(request: rpcquery_pb.GetAccountParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: acm_pb.Account) => void): grpc.ClientUnaryCall; + public getMetadata(request: rpcquery_pb.GetMetadataParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.MetadataResult) => void): grpc.ClientUnaryCall; + public getMetadata(request: rpcquery_pb.GetMetadataParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.MetadataResult) => void): grpc.ClientUnaryCall; + public getMetadata(request: rpcquery_pb.GetMetadataParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.MetadataResult) => void): grpc.ClientUnaryCall; + public getStorage(request: rpcquery_pb.GetStorageParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.StorageValue) => void): grpc.ClientUnaryCall; + public getStorage(request: rpcquery_pb.GetStorageParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.StorageValue) => void): grpc.ClientUnaryCall; + public getStorage(request: rpcquery_pb.GetStorageParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.StorageValue) => void): grpc.ClientUnaryCall; + public listAccounts(request: rpcquery_pb.ListAccountsParam, options?: Partial): grpc.ClientReadableStream; + public listAccounts(request: rpcquery_pb.ListAccountsParam, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public getName(request: rpcquery_pb.GetNameParam, callback: (error: grpc.ServiceError | null, response: names_pb.Entry) => void): grpc.ClientUnaryCall; + public getName(request: rpcquery_pb.GetNameParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: names_pb.Entry) => void): grpc.ClientUnaryCall; + public getName(request: rpcquery_pb.GetNameParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: names_pb.Entry) => void): grpc.ClientUnaryCall; + public listNames(request: rpcquery_pb.ListNamesParam, options?: Partial): grpc.ClientReadableStream; + public listNames(request: rpcquery_pb.ListNamesParam, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public getNetworkRegistry(request: rpcquery_pb.GetNetworkRegistryParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.NetworkRegistry) => void): grpc.ClientUnaryCall; + public getNetworkRegistry(request: rpcquery_pb.GetNetworkRegistryParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.NetworkRegistry) => void): grpc.ClientUnaryCall; + public getNetworkRegistry(request: rpcquery_pb.GetNetworkRegistryParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.NetworkRegistry) => void): grpc.ClientUnaryCall; + public getValidatorSet(request: rpcquery_pb.GetValidatorSetParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.ValidatorSet) => void): grpc.ClientUnaryCall; + public getValidatorSet(request: rpcquery_pb.GetValidatorSetParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.ValidatorSet) => void): grpc.ClientUnaryCall; + public getValidatorSet(request: rpcquery_pb.GetValidatorSetParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.ValidatorSet) => void): grpc.ClientUnaryCall; + public getValidatorSetHistory(request: rpcquery_pb.GetValidatorSetHistoryParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.ValidatorSetHistory) => void): grpc.ClientUnaryCall; + public getValidatorSetHistory(request: rpcquery_pb.GetValidatorSetHistoryParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.ValidatorSetHistory) => void): grpc.ClientUnaryCall; + public getValidatorSetHistory(request: rpcquery_pb.GetValidatorSetHistoryParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.ValidatorSetHistory) => void): grpc.ClientUnaryCall; + public getProposal(request: rpcquery_pb.GetProposalParam, callback: (error: grpc.ServiceError | null, response: payload_pb.Ballot) => void): grpc.ClientUnaryCall; + public getProposal(request: rpcquery_pb.GetProposalParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: payload_pb.Ballot) => void): grpc.ClientUnaryCall; + public getProposal(request: rpcquery_pb.GetProposalParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: payload_pb.Ballot) => void): grpc.ClientUnaryCall; + public listProposals(request: rpcquery_pb.ListProposalsParam, options?: Partial): grpc.ClientReadableStream; + public listProposals(request: rpcquery_pb.ListProposalsParam, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public getStats(request: rpcquery_pb.GetStatsParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.Stats) => void): grpc.ClientUnaryCall; + public getStats(request: rpcquery_pb.GetStatsParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.Stats) => void): grpc.ClientUnaryCall; + public getStats(request: rpcquery_pb.GetStatsParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.Stats) => void): grpc.ClientUnaryCall; + public getBlockHeader(request: rpcquery_pb.GetBlockParam, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.Header) => void): grpc.ClientUnaryCall; + public getBlockHeader(request: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.Header) => void): grpc.ClientUnaryCall; + public getBlockHeader(request: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.Header) => void): grpc.ClientUnaryCall; } diff --git a/js/proto/rpcquery_grpc_pb.js b/js/proto/rpcquery_grpc_pb.js index 30f7f0af9..af9a59adc 100644 --- a/js/proto/rpcquery_grpc_pb.js +++ b/js/proto/rpcquery_grpc_pb.js @@ -1,7 +1,6 @@ // GENERATED CODE -- DO NOT EDIT! 'use strict'; -var grpc = require('grpc'); var rpcquery_pb = require('./rpcquery_pb.js'); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); var github_com_tendermint_tendermint_abci_types_types_pb = require('./github.com/tendermint/tendermint/abci/types/types_pb.js'); @@ -299,7 +298,7 @@ function deserialize_types_Header(buffer_arg) { } -var QueryService = exports.QueryService = { +var QueryService = exports['rpcquery.Query'] = { status: { path: '/rpcquery.Query/Status', requestStream: false, @@ -457,4 +456,3 @@ getNetworkRegistry: { }, }; -exports.QueryClient = grpc.makeGenericClientConstructor(QueryService); diff --git a/js/proto/rpcquery_pb.d.ts b/js/proto/rpcquery_pb.d.ts index 129bf6aca..6c332df42 100644 --- a/js/proto/rpcquery_pb.d.ts +++ b/js/proto/rpcquery_pb.d.ts @@ -1,6 +1,9 @@ // package: rpcquery // file: rpcquery.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as github_com_tendermint_tendermint_abci_types_types_pb from "./github.com/tendermint/tendermint/abci/types/types_pb"; @@ -11,487 +14,510 @@ import * as registry_pb from "./registry_pb"; import * as rpc_pb from "./rpc_pb"; import * as payload_pb from "./payload_pb"; -export class StatusParam extends jspb.Message { - getBlocktimewithin(): string; - setBlocktimewithin(value: string): void; +export class StatusParam extends jspb.Message { + getBlocktimewithin(): string; + setBlocktimewithin(value: string): void; + + getBlockseentimewithin(): string; + setBlockseentimewithin(value: string): void; - getBlockseentimewithin(): string; - setBlockseentimewithin(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StatusParam.AsObject; - static toObject(includeInstance: boolean, msg: StatusParam): StatusParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StatusParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StatusParam; - static deserializeBinaryFromReader(message: StatusParam, reader: jspb.BinaryReader): StatusParam; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StatusParam.AsObject; + static toObject(includeInstance: boolean, msg: StatusParam): StatusParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StatusParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StatusParam; + static deserializeBinaryFromReader(message: StatusParam, reader: jspb.BinaryReader): StatusParam; } export namespace StatusParam { - export type AsObject = { - blocktimewithin: string, - blockseentimewithin: string, - } + export type AsObject = { + blocktimewithin: string, + blockseentimewithin: string, + } } -export class GetAccountParam extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; +export class GetAccountParam extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAccountParam.AsObject; - static toObject(includeInstance: boolean, msg: GetAccountParam): GetAccountParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAccountParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAccountParam; - static deserializeBinaryFromReader(message: GetAccountParam, reader: jspb.BinaryReader): GetAccountParam; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetAccountParam.AsObject; + static toObject(includeInstance: boolean, msg: GetAccountParam): GetAccountParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetAccountParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetAccountParam; + static deserializeBinaryFromReader(message: GetAccountParam, reader: jspb.BinaryReader): GetAccountParam; } export namespace GetAccountParam { - export type AsObject = { - address: Uint8Array | string, - } + export type AsObject = { + address: Uint8Array | string, + } } -export class GetMetadataParam extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; +export class GetMetadataParam extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getMetadatahash(): Uint8Array | string; + getMetadatahash_asU8(): Uint8Array; + getMetadatahash_asB64(): string; + setMetadatahash(value: Uint8Array | string): void; - getMetadatahash(): Uint8Array | string; - getMetadatahash_asU8(): Uint8Array; - getMetadatahash_asB64(): string; - setMetadatahash(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetMetadataParam.AsObject; - static toObject(includeInstance: boolean, msg: GetMetadataParam): GetMetadataParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetMetadataParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetMetadataParam; - static deserializeBinaryFromReader(message: GetMetadataParam, reader: jspb.BinaryReader): GetMetadataParam; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetMetadataParam.AsObject; + static toObject(includeInstance: boolean, msg: GetMetadataParam): GetMetadataParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetMetadataParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetMetadataParam; + static deserializeBinaryFromReader(message: GetMetadataParam, reader: jspb.BinaryReader): GetMetadataParam; } export namespace GetMetadataParam { - export type AsObject = { - address: Uint8Array | string, - metadatahash: Uint8Array | string, - } + export type AsObject = { + address: Uint8Array | string, + metadatahash: Uint8Array | string, + } } -export class MetadataResult extends jspb.Message { - getMetadata(): string; - setMetadata(value: string): void; +export class MetadataResult extends jspb.Message { + getMetadata(): string; + setMetadata(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MetadataResult.AsObject; - static toObject(includeInstance: boolean, msg: MetadataResult): MetadataResult.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MetadataResult, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MetadataResult; - static deserializeBinaryFromReader(message: MetadataResult, reader: jspb.BinaryReader): MetadataResult; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MetadataResult.AsObject; + static toObject(includeInstance: boolean, msg: MetadataResult): MetadataResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MetadataResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MetadataResult; + static deserializeBinaryFromReader(message: MetadataResult, reader: jspb.BinaryReader): MetadataResult; } export namespace MetadataResult { - export type AsObject = { - metadata: string, - } + export type AsObject = { + metadata: string, + } } -export class GetStorageParam extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; +export class GetStorageParam extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): void; - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetStorageParam.AsObject; - static toObject(includeInstance: boolean, msg: GetStorageParam): GetStorageParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetStorageParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetStorageParam; - static deserializeBinaryFromReader(message: GetStorageParam, reader: jspb.BinaryReader): GetStorageParam; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStorageParam.AsObject; + static toObject(includeInstance: boolean, msg: GetStorageParam): GetStorageParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetStorageParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStorageParam; + static deserializeBinaryFromReader(message: GetStorageParam, reader: jspb.BinaryReader): GetStorageParam; } export namespace GetStorageParam { - export type AsObject = { - address: Uint8Array | string, - key: Uint8Array | string, - } + export type AsObject = { + address: Uint8Array | string, + key: Uint8Array | string, + } } -export class StorageValue extends jspb.Message { - getValue(): Uint8Array | string; - getValue_asU8(): Uint8Array; - getValue_asB64(): string; - setValue(value: Uint8Array | string): void; +export class StorageValue extends jspb.Message { + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StorageValue.AsObject; - static toObject(includeInstance: boolean, msg: StorageValue): StorageValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StorageValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StorageValue; - static deserializeBinaryFromReader(message: StorageValue, reader: jspb.BinaryReader): StorageValue; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StorageValue.AsObject; + static toObject(includeInstance: boolean, msg: StorageValue): StorageValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StorageValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StorageValue; + static deserializeBinaryFromReader(message: StorageValue, reader: jspb.BinaryReader): StorageValue; } export namespace StorageValue { - export type AsObject = { - value: Uint8Array | string, - } + export type AsObject = { + value: Uint8Array | string, + } } -export class ListAccountsParam extends jspb.Message { - getQuery(): string; - setQuery(value: string): void; +export class ListAccountsParam extends jspb.Message { + getQuery(): string; + setQuery(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListAccountsParam.AsObject; - static toObject(includeInstance: boolean, msg: ListAccountsParam): ListAccountsParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListAccountsParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListAccountsParam; - static deserializeBinaryFromReader(message: ListAccountsParam, reader: jspb.BinaryReader): ListAccountsParam; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListAccountsParam.AsObject; + static toObject(includeInstance: boolean, msg: ListAccountsParam): ListAccountsParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListAccountsParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListAccountsParam; + static deserializeBinaryFromReader(message: ListAccountsParam, reader: jspb.BinaryReader): ListAccountsParam; } export namespace ListAccountsParam { - export type AsObject = { - query: string, - } + export type AsObject = { + query: string, + } } -export class GetNameParam extends jspb.Message { - getName(): string; - setName(value: string): void; +export class GetNameParam extends jspb.Message { + getName(): string; + setName(value: string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetNameParam.AsObject; - static toObject(includeInstance: boolean, msg: GetNameParam): GetNameParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetNameParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetNameParam; - static deserializeBinaryFromReader(message: GetNameParam, reader: jspb.BinaryReader): GetNameParam; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetNameParam.AsObject; + static toObject(includeInstance: boolean, msg: GetNameParam): GetNameParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetNameParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetNameParam; + static deserializeBinaryFromReader(message: GetNameParam, reader: jspb.BinaryReader): GetNameParam; } export namespace GetNameParam { - export type AsObject = { - name: string, - } + export type AsObject = { + name: string, + } } -export class ListNamesParam extends jspb.Message { - getQuery(): string; - setQuery(value: string): void; +export class ListNamesParam extends jspb.Message { + getQuery(): string; + setQuery(value: string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListNamesParam.AsObject; - static toObject(includeInstance: boolean, msg: ListNamesParam): ListNamesParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListNamesParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListNamesParam; - static deserializeBinaryFromReader(message: ListNamesParam, reader: jspb.BinaryReader): ListNamesParam; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListNamesParam.AsObject; + static toObject(includeInstance: boolean, msg: ListNamesParam): ListNamesParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListNamesParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListNamesParam; + static deserializeBinaryFromReader(message: ListNamesParam, reader: jspb.BinaryReader): ListNamesParam; } export namespace ListNamesParam { - export type AsObject = { - query: string, - } + export type AsObject = { + query: string, + } } -export class GetNetworkRegistryParam extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetNetworkRegistryParam.AsObject; - static toObject(includeInstance: boolean, msg: GetNetworkRegistryParam): GetNetworkRegistryParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetNetworkRegistryParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetNetworkRegistryParam; - static deserializeBinaryFromReader(message: GetNetworkRegistryParam, reader: jspb.BinaryReader): GetNetworkRegistryParam; +export class GetNetworkRegistryParam extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetNetworkRegistryParam.AsObject; + static toObject(includeInstance: boolean, msg: GetNetworkRegistryParam): GetNetworkRegistryParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetNetworkRegistryParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetNetworkRegistryParam; + static deserializeBinaryFromReader(message: GetNetworkRegistryParam, reader: jspb.BinaryReader): GetNetworkRegistryParam; } export namespace GetNetworkRegistryParam { - export type AsObject = { - } + export type AsObject = { + } } -export class GetValidatorSetParam extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetValidatorSetParam.AsObject; - static toObject(includeInstance: boolean, msg: GetValidatorSetParam): GetValidatorSetParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetValidatorSetParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetValidatorSetParam; - static deserializeBinaryFromReader(message: GetValidatorSetParam, reader: jspb.BinaryReader): GetValidatorSetParam; +export class GetValidatorSetParam extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetValidatorSetParam.AsObject; + static toObject(includeInstance: boolean, msg: GetValidatorSetParam): GetValidatorSetParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetValidatorSetParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetValidatorSetParam; + static deserializeBinaryFromReader(message: GetValidatorSetParam, reader: jspb.BinaryReader): GetValidatorSetParam; } export namespace GetValidatorSetParam { - export type AsObject = { - } + export type AsObject = { + } } -export class GetValidatorSetHistoryParam extends jspb.Message { - getIncludeprevious(): number; - setIncludeprevious(value: number): void; +export class GetValidatorSetHistoryParam extends jspb.Message { + getIncludeprevious(): number; + setIncludeprevious(value: number): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetValidatorSetHistoryParam.AsObject; - static toObject(includeInstance: boolean, msg: GetValidatorSetHistoryParam): GetValidatorSetHistoryParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetValidatorSetHistoryParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetValidatorSetHistoryParam; - static deserializeBinaryFromReader(message: GetValidatorSetHistoryParam, reader: jspb.BinaryReader): GetValidatorSetHistoryParam; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetValidatorSetHistoryParam.AsObject; + static toObject(includeInstance: boolean, msg: GetValidatorSetHistoryParam): GetValidatorSetHistoryParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetValidatorSetHistoryParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetValidatorSetHistoryParam; + static deserializeBinaryFromReader(message: GetValidatorSetHistoryParam, reader: jspb.BinaryReader): GetValidatorSetHistoryParam; } export namespace GetValidatorSetHistoryParam { - export type AsObject = { - includeprevious: number, - } + export type AsObject = { + includeprevious: number, + } } -export class NetworkRegistry extends jspb.Message { - clearSetList(): void; - getSetList(): Array; - setSetList(value: Array): void; - addSet(value?: RegisteredValidator, index?: number): RegisteredValidator; +export class NetworkRegistry extends jspb.Message { + clearSetList(): void; + getSetList(): Array; + setSetList(value: Array): void; + addSet(value?: RegisteredValidator, index?: number): RegisteredValidator; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NetworkRegistry.AsObject; - static toObject(includeInstance: boolean, msg: NetworkRegistry): NetworkRegistry.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NetworkRegistry, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NetworkRegistry; - static deserializeBinaryFromReader(message: NetworkRegistry, reader: jspb.BinaryReader): NetworkRegistry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NetworkRegistry.AsObject; + static toObject(includeInstance: boolean, msg: NetworkRegistry): NetworkRegistry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NetworkRegistry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NetworkRegistry; + static deserializeBinaryFromReader(message: NetworkRegistry, reader: jspb.BinaryReader): NetworkRegistry; } export namespace NetworkRegistry { - export type AsObject = { - setList: Array, - } + export type AsObject = { + setList: Array, + } } -export class RegisteredValidator extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; +export class RegisteredValidator extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + - hasNode(): boolean; - clearNode(): void; - getNode(): registry_pb.NodeIdentity | undefined; - setNode(value?: registry_pb.NodeIdentity): void; + hasNode(): boolean; + clearNode(): void; + getNode(): registry_pb.NodeIdentity | undefined; + setNode(value?: registry_pb.NodeIdentity): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RegisteredValidator.AsObject; - static toObject(includeInstance: boolean, msg: RegisteredValidator): RegisteredValidator.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RegisteredValidator, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RegisteredValidator; - static deserializeBinaryFromReader(message: RegisteredValidator, reader: jspb.BinaryReader): RegisteredValidator; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RegisteredValidator.AsObject; + static toObject(includeInstance: boolean, msg: RegisteredValidator): RegisteredValidator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RegisteredValidator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RegisteredValidator; + static deserializeBinaryFromReader(message: RegisteredValidator, reader: jspb.BinaryReader): RegisteredValidator; } export namespace RegisteredValidator { - export type AsObject = { - address: Uint8Array | string, - node?: registry_pb.NodeIdentity.AsObject, - } + export type AsObject = { + address: Uint8Array | string, + node?: registry_pb.NodeIdentity.AsObject, + } } -export class ValidatorSetHistory extends jspb.Message { - clearHistoryList(): void; - getHistoryList(): Array; - setHistoryList(value: Array): void; - addHistory(value?: ValidatorSet, index?: number): ValidatorSet; +export class ValidatorSetHistory extends jspb.Message { + clearHistoryList(): void; + getHistoryList(): Array; + setHistoryList(value: Array): void; + addHistory(value?: ValidatorSet, index?: number): ValidatorSet; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ValidatorSetHistory.AsObject; - static toObject(includeInstance: boolean, msg: ValidatorSetHistory): ValidatorSetHistory.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ValidatorSetHistory, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ValidatorSetHistory; - static deserializeBinaryFromReader(message: ValidatorSetHistory, reader: jspb.BinaryReader): ValidatorSetHistory; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidatorSetHistory.AsObject; + static toObject(includeInstance: boolean, msg: ValidatorSetHistory): ValidatorSetHistory.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValidatorSetHistory, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidatorSetHistory; + static deserializeBinaryFromReader(message: ValidatorSetHistory, reader: jspb.BinaryReader): ValidatorSetHistory; } export namespace ValidatorSetHistory { - export type AsObject = { - historyList: Array, - } + export type AsObject = { + historyList: Array, + } } -export class ValidatorSet extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; +export class ValidatorSet extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; - clearSetList(): void; - getSetList(): Array; - setSetList(value: Array): void; - addSet(value?: validator_pb.Validator, index?: number): validator_pb.Validator; + clearSetList(): void; + getSetList(): Array; + setSetList(value: Array): void; + addSet(value?: validator_pb.Validator, index?: number): validator_pb.Validator; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ValidatorSet.AsObject; - static toObject(includeInstance: boolean, msg: ValidatorSet): ValidatorSet.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ValidatorSet, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ValidatorSet; - static deserializeBinaryFromReader(message: ValidatorSet, reader: jspb.BinaryReader): ValidatorSet; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidatorSet.AsObject; + static toObject(includeInstance: boolean, msg: ValidatorSet): ValidatorSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValidatorSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidatorSet; + static deserializeBinaryFromReader(message: ValidatorSet, reader: jspb.BinaryReader): ValidatorSet; } export namespace ValidatorSet { - export type AsObject = { - height: number, - setList: Array, - } + export type AsObject = { + height: number, + setList: Array, + } } -export class GetProposalParam extends jspb.Message { - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; +export class GetProposalParam extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetProposalParam.AsObject; - static toObject(includeInstance: boolean, msg: GetProposalParam): GetProposalParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetProposalParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetProposalParam; - static deserializeBinaryFromReader(message: GetProposalParam, reader: jspb.BinaryReader): GetProposalParam; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetProposalParam.AsObject; + static toObject(includeInstance: boolean, msg: GetProposalParam): GetProposalParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetProposalParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetProposalParam; + static deserializeBinaryFromReader(message: GetProposalParam, reader: jspb.BinaryReader): GetProposalParam; } export namespace GetProposalParam { - export type AsObject = { - hash: Uint8Array | string, - } + export type AsObject = { + hash: Uint8Array | string, + } } -export class ListProposalsParam extends jspb.Message { - getProposed(): boolean; - setProposed(value: boolean): void; +export class ListProposalsParam extends jspb.Message { + getProposed(): boolean; + setProposed(value: boolean): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListProposalsParam.AsObject; - static toObject(includeInstance: boolean, msg: ListProposalsParam): ListProposalsParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListProposalsParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListProposalsParam; - static deserializeBinaryFromReader(message: ListProposalsParam, reader: jspb.BinaryReader): ListProposalsParam; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListProposalsParam.AsObject; + static toObject(includeInstance: boolean, msg: ListProposalsParam): ListProposalsParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListProposalsParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListProposalsParam; + static deserializeBinaryFromReader(message: ListProposalsParam, reader: jspb.BinaryReader): ListProposalsParam; } export namespace ListProposalsParam { - export type AsObject = { - proposed: boolean, - } + export type AsObject = { + proposed: boolean, + } } -export class ProposalResult extends jspb.Message { - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; +export class ProposalResult extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; - hasBallot(): boolean; - clearBallot(): void; - getBallot(): payload_pb.Ballot | undefined; - setBallot(value?: payload_pb.Ballot): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProposalResult.AsObject; - static toObject(includeInstance: boolean, msg: ProposalResult): ProposalResult.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProposalResult, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProposalResult; - static deserializeBinaryFromReader(message: ProposalResult, reader: jspb.BinaryReader): ProposalResult; + hasBallot(): boolean; + clearBallot(): void; + getBallot(): payload_pb.Ballot | undefined; + setBallot(value?: payload_pb.Ballot): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProposalResult.AsObject; + static toObject(includeInstance: boolean, msg: ProposalResult): ProposalResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProposalResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProposalResult; + static deserializeBinaryFromReader(message: ProposalResult, reader: jspb.BinaryReader): ProposalResult; } export namespace ProposalResult { - export type AsObject = { - hash: Uint8Array | string, - ballot?: payload_pb.Ballot.AsObject, - } + export type AsObject = { + hash: Uint8Array | string, + ballot?: payload_pb.Ballot.AsObject, + } } -export class GetStatsParam extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetStatsParam.AsObject; - static toObject(includeInstance: boolean, msg: GetStatsParam): GetStatsParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetStatsParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetStatsParam; - static deserializeBinaryFromReader(message: GetStatsParam, reader: jspb.BinaryReader): GetStatsParam; +export class GetStatsParam extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStatsParam.AsObject; + static toObject(includeInstance: boolean, msg: GetStatsParam): GetStatsParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetStatsParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStatsParam; + static deserializeBinaryFromReader(message: GetStatsParam, reader: jspb.BinaryReader): GetStatsParam; } export namespace GetStatsParam { - export type AsObject = { - } + export type AsObject = { + } } -export class Stats extends jspb.Message { - getAccountswithcode(): number; - setAccountswithcode(value: number): void; +export class Stats extends jspb.Message { + getAccountswithcode(): number; + setAccountswithcode(value: number): void; - getAccountswithoutcode(): number; - setAccountswithoutcode(value: number): void; + getAccountswithoutcode(): number; + setAccountswithoutcode(value: number): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Stats.AsObject; - static toObject(includeInstance: boolean, msg: Stats): Stats.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Stats, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Stats; - static deserializeBinaryFromReader(message: Stats, reader: jspb.BinaryReader): Stats; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Stats.AsObject; + static toObject(includeInstance: boolean, msg: Stats): Stats.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Stats, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Stats; + static deserializeBinaryFromReader(message: Stats, reader: jspb.BinaryReader): Stats; } export namespace Stats { - export type AsObject = { - accountswithcode: number, - accountswithoutcode: number, - } + export type AsObject = { + accountswithcode: number, + accountswithoutcode: number, + } } -export class GetBlockParam extends jspb.Message { - getHeight(): number; - setHeight(value: number): void; +export class GetBlockParam extends jspb.Message { + getHeight(): number; + setHeight(value: number): void; + - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetBlockParam.AsObject; - static toObject(includeInstance: boolean, msg: GetBlockParam): GetBlockParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetBlockParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetBlockParam; - static deserializeBinaryFromReader(message: GetBlockParam, reader: jspb.BinaryReader): GetBlockParam; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetBlockParam.AsObject; + static toObject(includeInstance: boolean, msg: GetBlockParam): GetBlockParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetBlockParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetBlockParam; + static deserializeBinaryFromReader(message: GetBlockParam, reader: jspb.BinaryReader): GetBlockParam; } export namespace GetBlockParam { - export type AsObject = { - height: number, - } + export type AsObject = { + height: number, + } } - diff --git a/js/proto/rpcquery_pb.js b/js/proto/rpcquery_pb.js index 9be4a8384..fb220b561 100644 --- a/js/proto/rpcquery_pb.js +++ b/js/proto/rpcquery_pb.js @@ -1,4 +1,3 @@ -// source: rpcquery.proto /** * @fileoverview * @enhanceable @@ -50,6 +49,7 @@ goog.exportSymbol('proto.rpcquery.StatusParam', null, global); goog.exportSymbol('proto.rpcquery.StorageValue', null, global); goog.exportSymbol('proto.rpcquery.ValidatorSet', null, global); goog.exportSymbol('proto.rpcquery.ValidatorSetHistory', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -60,472 +60,24 @@ goog.exportSymbol('proto.rpcquery.ValidatorSetHistory', null, global); * @extends {jspb.Message} * @constructor */ -proto.rpcquery.StatusParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.StatusParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.StatusParam.displayName = 'proto.rpcquery.StatusParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetAccountParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetAccountParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.GetAccountParam.displayName = 'proto.rpcquery.GetAccountParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetMetadataParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetMetadataParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.GetMetadataParam.displayName = 'proto.rpcquery.GetMetadataParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.MetadataResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.MetadataResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.MetadataResult.displayName = 'proto.rpcquery.MetadataResult'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetStorageParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetStorageParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.GetStorageParam.displayName = 'proto.rpcquery.GetStorageParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.StorageValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.StorageValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.StorageValue.displayName = 'proto.rpcquery.StorageValue'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.ListAccountsParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.ListAccountsParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.ListAccountsParam.displayName = 'proto.rpcquery.ListAccountsParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetNameParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetNameParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.GetNameParam.displayName = 'proto.rpcquery.GetNameParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.ListNamesParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.ListNamesParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.ListNamesParam.displayName = 'proto.rpcquery.ListNamesParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetNetworkRegistryParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetNetworkRegistryParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.GetNetworkRegistryParam.displayName = 'proto.rpcquery.GetNetworkRegistryParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetValidatorSetParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetValidatorSetParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.GetValidatorSetParam.displayName = 'proto.rpcquery.GetValidatorSetParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetValidatorSetHistoryParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetValidatorSetHistoryParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.GetValidatorSetHistoryParam.displayName = 'proto.rpcquery.GetValidatorSetHistoryParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.NetworkRegistry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.NetworkRegistry.repeatedFields_, null); -}; -goog.inherits(proto.rpcquery.NetworkRegistry, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.NetworkRegistry.displayName = 'proto.rpcquery.NetworkRegistry'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.RegisteredValidator = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.RegisteredValidator, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.RegisteredValidator.displayName = 'proto.rpcquery.RegisteredValidator'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.ValidatorSetHistory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.ValidatorSetHistory.repeatedFields_, null); -}; -goog.inherits(proto.rpcquery.ValidatorSetHistory, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.ValidatorSetHistory.displayName = 'proto.rpcquery.ValidatorSetHistory'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.ValidatorSet = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.ValidatorSet.repeatedFields_, null); -}; -goog.inherits(proto.rpcquery.ValidatorSet, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.ValidatorSet.displayName = 'proto.rpcquery.ValidatorSet'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetProposalParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetProposalParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.GetProposalParam.displayName = 'proto.rpcquery.GetProposalParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.ListProposalsParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.ListProposalsParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.ListProposalsParam.displayName = 'proto.rpcquery.ListProposalsParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.ProposalResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.ProposalResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.ProposalResult.displayName = 'proto.rpcquery.ProposalResult'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetStatsParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetStatsParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.GetStatsParam.displayName = 'proto.rpcquery.GetStatsParam'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.Stats = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.Stats, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.Stats.displayName = 'proto.rpcquery.Stats'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetBlockParam = function(opt_data) { +proto.rpcquery.StatusParam = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.rpcquery.GetBlockParam, jspb.Message); +goog.inherits(proto.rpcquery.StatusParam, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpcquery.GetBlockParam.displayName = 'proto.rpcquery.GetBlockParam'; + proto.rpcquery.StatusParam.displayName = 'proto.rpcquery.StatusParam'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.StatusParam.prototype.toObject = function(opt_includeInstance) { @@ -535,8 +87,8 @@ proto.rpcquery.StatusParam.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.StatusParam} msg The msg instance to transform. * @return {!Object} @@ -645,12 +197,9 @@ proto.rpcquery.StatusParam.prototype.getBlocktimewithin = function() { }; -/** - * @param {string} value - * @return {!proto.rpcquery.StatusParam} returns this - */ +/** @param {string} value */ proto.rpcquery.StatusParam.prototype.setBlocktimewithin = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -663,29 +212,41 @@ proto.rpcquery.StatusParam.prototype.getBlockseentimewithin = function() { }; -/** - * @param {string} value - * @return {!proto.rpcquery.StatusParam} returns this - */ +/** @param {string} value */ proto.rpcquery.StatusParam.prototype.setBlockseentimewithin = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetAccountParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetAccountParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.GetAccountParam.displayName = 'proto.rpcquery.GetAccountParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetAccountParam.prototype.toObject = function(opt_includeInstance) { @@ -695,8 +256,8 @@ proto.rpcquery.GetAccountParam.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetAccountParam} msg The msg instance to transform. * @return {!Object} @@ -817,29 +378,41 @@ proto.rpcquery.GetAccountParam.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpcquery.GetAccountParam} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpcquery.GetAccountParam.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetMetadataParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetMetadataParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.GetMetadataParam.displayName = 'proto.rpcquery.GetMetadataParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetMetadataParam.prototype.toObject = function(opt_includeInstance) { @@ -849,8 +422,8 @@ proto.rpcquery.GetMetadataParam.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetMetadataParam} msg The msg instance to transform. * @return {!Object} @@ -983,12 +556,9 @@ proto.rpcquery.GetMetadataParam.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpcquery.GetMetadataParam} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpcquery.GetMetadataParam.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1025,29 +595,41 @@ proto.rpcquery.GetMetadataParam.prototype.getMetadatahash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpcquery.GetMetadataParam} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpcquery.GetMetadataParam.prototype.setMetadatahash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.MetadataResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.MetadataResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.MetadataResult.displayName = 'proto.rpcquery.MetadataResult'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.MetadataResult.prototype.toObject = function(opt_includeInstance) { @@ -1057,8 +639,8 @@ proto.rpcquery.MetadataResult.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.MetadataResult} msg The msg instance to transform. * @return {!Object} @@ -1155,29 +737,41 @@ proto.rpcquery.MetadataResult.prototype.getMetadata = function() { }; -/** - * @param {string} value - * @return {!proto.rpcquery.MetadataResult} returns this - */ +/** @param {string} value */ proto.rpcquery.MetadataResult.prototype.setMetadata = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetStorageParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetStorageParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.GetStorageParam.displayName = 'proto.rpcquery.GetStorageParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetStorageParam.prototype.toObject = function(opt_includeInstance) { @@ -1187,8 +781,8 @@ proto.rpcquery.GetStorageParam.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetStorageParam} msg The msg instance to transform. * @return {!Object} @@ -1321,12 +915,9 @@ proto.rpcquery.GetStorageParam.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpcquery.GetStorageParam} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpcquery.GetStorageParam.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1363,29 +954,41 @@ proto.rpcquery.GetStorageParam.prototype.getKey_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpcquery.GetStorageParam} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpcquery.GetStorageParam.prototype.setKey = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.StorageValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.StorageValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.StorageValue.displayName = 'proto.rpcquery.StorageValue'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.StorageValue.prototype.toObject = function(opt_includeInstance) { @@ -1395,8 +998,8 @@ proto.rpcquery.StorageValue.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.StorageValue} msg The msg instance to transform. * @return {!Object} @@ -1517,29 +1120,41 @@ proto.rpcquery.StorageValue.prototype.getValue_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpcquery.StorageValue} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpcquery.StorageValue.prototype.setValue = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ListAccountsParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.ListAccountsParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.ListAccountsParam.displayName = 'proto.rpcquery.ListAccountsParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ListAccountsParam.prototype.toObject = function(opt_includeInstance) { @@ -1549,8 +1164,8 @@ proto.rpcquery.ListAccountsParam.prototype.toObject = function(opt_includeInstan /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ListAccountsParam} msg The msg instance to transform. * @return {!Object} @@ -1647,29 +1262,41 @@ proto.rpcquery.ListAccountsParam.prototype.getQuery = function() { }; -/** - * @param {string} value - * @return {!proto.rpcquery.ListAccountsParam} returns this - */ +/** @param {string} value */ proto.rpcquery.ListAccountsParam.prototype.setQuery = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetNameParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetNameParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.GetNameParam.displayName = 'proto.rpcquery.GetNameParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetNameParam.prototype.toObject = function(opt_includeInstance) { @@ -1679,8 +1306,8 @@ proto.rpcquery.GetNameParam.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetNameParam} msg The msg instance to transform. * @return {!Object} @@ -1777,29 +1404,41 @@ proto.rpcquery.GetNameParam.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.rpcquery.GetNameParam} returns this - */ +/** @param {string} value */ proto.rpcquery.GetNameParam.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ListNamesParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.ListNamesParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.ListNamesParam.displayName = 'proto.rpcquery.ListNamesParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ListNamesParam.prototype.toObject = function(opt_includeInstance) { @@ -1809,8 +1448,8 @@ proto.rpcquery.ListNamesParam.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ListNamesParam} msg The msg instance to transform. * @return {!Object} @@ -1907,29 +1546,41 @@ proto.rpcquery.ListNamesParam.prototype.getQuery = function() { }; -/** - * @param {string} value - * @return {!proto.rpcquery.ListNamesParam} returns this - */ +/** @param {string} value */ proto.rpcquery.ListNamesParam.prototype.setQuery = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetNetworkRegistryParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetNetworkRegistryParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.GetNetworkRegistryParam.displayName = 'proto.rpcquery.GetNetworkRegistryParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetNetworkRegistryParam.prototype.toObject = function(opt_includeInstance) { @@ -1939,8 +1590,8 @@ proto.rpcquery.GetNetworkRegistryParam.prototype.toObject = function(opt_include /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetNetworkRegistryParam} msg The msg instance to transform. * @return {!Object} @@ -2018,19 +1669,34 @@ proto.rpcquery.GetNetworkRegistryParam.serializeBinaryToWriter = function(messag +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetValidatorSetParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetValidatorSetParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.GetValidatorSetParam.displayName = 'proto.rpcquery.GetValidatorSetParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetValidatorSetParam.prototype.toObject = function(opt_includeInstance) { @@ -2040,8 +1706,8 @@ proto.rpcquery.GetValidatorSetParam.prototype.toObject = function(opt_includeIns /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetValidatorSetParam} msg The msg instance to transform. * @return {!Object} @@ -2119,19 +1785,34 @@ proto.rpcquery.GetValidatorSetParam.serializeBinaryToWriter = function(message, +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetValidatorSetHistoryParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetValidatorSetHistoryParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.GetValidatorSetHistoryParam.displayName = 'proto.rpcquery.GetValidatorSetHistoryParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetValidatorSetHistoryParam.prototype.toObject = function(opt_includeInstance) { @@ -2141,8 +1822,8 @@ proto.rpcquery.GetValidatorSetHistoryParam.prototype.toObject = function(opt_inc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetValidatorSetHistoryParam} msg The msg instance to transform. * @return {!Object} @@ -2239,16 +1920,30 @@ proto.rpcquery.GetValidatorSetHistoryParam.prototype.getIncludeprevious = functi }; -/** - * @param {number} value - * @return {!proto.rpcquery.GetValidatorSetHistoryParam} returns this - */ +/** @param {number} value */ proto.rpcquery.GetValidatorSetHistoryParam.prototype.setIncludeprevious = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.NetworkRegistry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.NetworkRegistry.repeatedFields_, null); +}; +goog.inherits(proto.rpcquery.NetworkRegistry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.NetworkRegistry.displayName = 'proto.rpcquery.NetworkRegistry'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -2260,15 +1955,13 @@ proto.rpcquery.NetworkRegistry.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.NetworkRegistry.prototype.toObject = function(opt_includeInstance) { @@ -2278,8 +1971,8 @@ proto.rpcquery.NetworkRegistry.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.NetworkRegistry} msg The msg instance to transform. * @return {!Object} @@ -2380,12 +2073,9 @@ proto.rpcquery.NetworkRegistry.prototype.getSetList = function() { }; -/** - * @param {!Array} value - * @return {!proto.rpcquery.NetworkRegistry} returns this -*/ +/** @param {!Array} value */ proto.rpcquery.NetworkRegistry.prototype.setSetList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -2399,29 +2089,40 @@ proto.rpcquery.NetworkRegistry.prototype.addSet = function(opt_value, opt_index) }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.rpcquery.NetworkRegistry} returns this - */ proto.rpcquery.NetworkRegistry.prototype.clearSetList = function() { - return this.setSetList([]); + this.setSetList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.RegisteredValidator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.RegisteredValidator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.RegisteredValidator.displayName = 'proto.rpcquery.RegisteredValidator'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.RegisteredValidator.prototype.toObject = function(opt_includeInstance) { @@ -2431,8 +2132,8 @@ proto.rpcquery.RegisteredValidator.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.RegisteredValidator} msg The msg instance to transform. * @return {!Object} @@ -2567,12 +2268,9 @@ proto.rpcquery.RegisteredValidator.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpcquery.RegisteredValidator} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpcquery.RegisteredValidator.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2586,21 +2284,14 @@ proto.rpcquery.RegisteredValidator.prototype.getNode = function() { }; -/** - * @param {?proto.registry.NodeIdentity|undefined} value - * @return {!proto.rpcquery.RegisteredValidator} returns this -*/ +/** @param {?proto.registry.NodeIdentity|undefined} value */ proto.rpcquery.RegisteredValidator.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.rpcquery.RegisteredValidator} returns this - */ proto.rpcquery.RegisteredValidator.prototype.clearNode = function() { - return this.setNode(undefined); + this.setNode(undefined); }; @@ -2614,6 +2305,23 @@ proto.rpcquery.RegisteredValidator.prototype.hasNode = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ValidatorSetHistory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.ValidatorSetHistory.repeatedFields_, null); +}; +goog.inherits(proto.rpcquery.ValidatorSetHistory, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.ValidatorSetHistory.displayName = 'proto.rpcquery.ValidatorSetHistory'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -2625,15 +2333,13 @@ proto.rpcquery.ValidatorSetHistory.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ValidatorSetHistory.prototype.toObject = function(opt_includeInstance) { @@ -2643,8 +2349,8 @@ proto.rpcquery.ValidatorSetHistory.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ValidatorSetHistory} msg The msg instance to transform. * @return {!Object} @@ -2745,12 +2451,9 @@ proto.rpcquery.ValidatorSetHistory.prototype.getHistoryList = function() { }; -/** - * @param {!Array} value - * @return {!proto.rpcquery.ValidatorSetHistory} returns this -*/ +/** @param {!Array} value */ proto.rpcquery.ValidatorSetHistory.prototype.setHistoryList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -2764,16 +2467,29 @@ proto.rpcquery.ValidatorSetHistory.prototype.addHistory = function(opt_value, op }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.rpcquery.ValidatorSetHistory} returns this - */ proto.rpcquery.ValidatorSetHistory.prototype.clearHistoryList = function() { - return this.setHistoryList([]); + this.setHistoryList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ValidatorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.ValidatorSet.repeatedFields_, null); +}; +goog.inherits(proto.rpcquery.ValidatorSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.ValidatorSet.displayName = 'proto.rpcquery.ValidatorSet'; +} /** * List of repeated fields within this message type. * @private {!Array} @@ -2785,15 +2501,13 @@ proto.rpcquery.ValidatorSet.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ValidatorSet.prototype.toObject = function(opt_includeInstance) { @@ -2803,8 +2517,8 @@ proto.rpcquery.ValidatorSet.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ValidatorSet} msg The msg instance to transform. * @return {!Object} @@ -2916,12 +2630,9 @@ proto.rpcquery.ValidatorSet.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.rpcquery.ValidatorSet} returns this - */ +/** @param {number} value */ proto.rpcquery.ValidatorSet.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -2935,12 +2646,9 @@ proto.rpcquery.ValidatorSet.prototype.getSetList = function() { }; -/** - * @param {!Array} value - * @return {!proto.rpcquery.ValidatorSet} returns this -*/ +/** @param {!Array} value */ proto.rpcquery.ValidatorSet.prototype.setSetList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -2954,29 +2662,40 @@ proto.rpcquery.ValidatorSet.prototype.addSet = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.rpcquery.ValidatorSet} returns this - */ proto.rpcquery.ValidatorSet.prototype.clearSetList = function() { - return this.setSetList([]); + this.setSetList([]); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetProposalParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetProposalParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.GetProposalParam.displayName = 'proto.rpcquery.GetProposalParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetProposalParam.prototype.toObject = function(opt_includeInstance) { @@ -2986,8 +2705,8 @@ proto.rpcquery.GetProposalParam.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetProposalParam} msg The msg instance to transform. * @return {!Object} @@ -3108,29 +2827,41 @@ proto.rpcquery.GetProposalParam.prototype.getHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpcquery.GetProposalParam} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpcquery.GetProposalParam.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ListProposalsParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.ListProposalsParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.ListProposalsParam.displayName = 'proto.rpcquery.ListProposalsParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInstance) { @@ -3140,8 +2871,8 @@ proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ListProposalsParam} msg The msg instance to transform. * @return {!Object} @@ -3149,7 +2880,7 @@ proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInsta */ proto.rpcquery.ListProposalsParam.toObject = function(includeInstance, msg) { var f, obj = { - proposed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + proposed: jspb.Message.getFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -3231,36 +2962,50 @@ proto.rpcquery.ListProposalsParam.serializeBinaryToWriter = function(message, wr /** * optional bool Proposed = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpcquery.ListProposalsParam.prototype.getProposed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** - * @param {boolean} value - * @return {!proto.rpcquery.ListProposalsParam} returns this - */ +/** @param {boolean} value */ proto.rpcquery.ListProposalsParam.prototype.setProposed = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); + jspb.Message.setProto3BooleanField(this, 1, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ProposalResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.ProposalResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.ProposalResult.displayName = 'proto.rpcquery.ProposalResult'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ProposalResult.prototype.toObject = function(opt_includeInstance) { @@ -3270,8 +3015,8 @@ proto.rpcquery.ProposalResult.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ProposalResult} msg The msg instance to transform. * @return {!Object} @@ -3406,12 +3151,9 @@ proto.rpcquery.ProposalResult.prototype.getHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpcquery.ProposalResult} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpcquery.ProposalResult.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3425,21 +3167,14 @@ proto.rpcquery.ProposalResult.prototype.getBallot = function() { }; -/** - * @param {?proto.payload.Ballot|undefined} value - * @return {!proto.rpcquery.ProposalResult} returns this -*/ +/** @param {?proto.payload.Ballot|undefined} value */ proto.rpcquery.ProposalResult.prototype.setBallot = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.rpcquery.ProposalResult} returns this - */ proto.rpcquery.ProposalResult.prototype.clearBallot = function() { - return this.setBallot(undefined); + this.setBallot(undefined); }; @@ -3453,19 +3188,34 @@ proto.rpcquery.ProposalResult.prototype.hasBallot = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetStatsParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetStatsParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.GetStatsParam.displayName = 'proto.rpcquery.GetStatsParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetStatsParam.prototype.toObject = function(opt_includeInstance) { @@ -3475,8 +3225,8 @@ proto.rpcquery.GetStatsParam.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetStatsParam} msg The msg instance to transform. * @return {!Object} @@ -3554,19 +3304,34 @@ proto.rpcquery.GetStatsParam.serializeBinaryToWriter = function(message, writer) +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.Stats = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.Stats, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.Stats.displayName = 'proto.rpcquery.Stats'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.Stats.prototype.toObject = function(opt_includeInstance) { @@ -3576,8 +3341,8 @@ proto.rpcquery.Stats.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.Stats} msg The msg instance to transform. * @return {!Object} @@ -3686,12 +3451,9 @@ proto.rpcquery.Stats.prototype.getAccountswithcode = function() { }; -/** - * @param {number} value - * @return {!proto.rpcquery.Stats} returns this - */ +/** @param {number} value */ proto.rpcquery.Stats.prototype.setAccountswithcode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -3704,29 +3466,41 @@ proto.rpcquery.Stats.prototype.getAccountswithoutcode = function() { }; -/** - * @param {number} value - * @return {!proto.rpcquery.Stats} returns this - */ +/** @param {number} value */ proto.rpcquery.Stats.prototype.setAccountswithoutcode = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3IntField(this, 2, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetBlockParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetBlockParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpcquery.GetBlockParam.displayName = 'proto.rpcquery.GetBlockParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetBlockParam.prototype.toObject = function(opt_includeInstance) { @@ -3736,8 +3510,8 @@ proto.rpcquery.GetBlockParam.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetBlockParam} msg The msg instance to transform. * @return {!Object} @@ -3834,12 +3608,9 @@ proto.rpcquery.GetBlockParam.prototype.getHeight = function() { }; -/** - * @param {number} value - * @return {!proto.rpcquery.GetBlockParam} returns this - */ +/** @param {number} value */ proto.rpcquery.GetBlockParam.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; diff --git a/js/proto/rpctransact_grpc_pb.d.ts b/js/proto/rpctransact_grpc_pb.d.ts index 75d5978b5..999967dbe 100644 --- a/js/proto/rpctransact_grpc_pb.d.ts +++ b/js/proto/rpctransact_grpc_pb.d.ts @@ -1,67 +1,234 @@ -// GENERATED CODE -- DO NOT EDIT! - // package: rpctransact // file: rpctransact.proto +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; import * as rpctransact_pb from "./rpctransact_pb"; +import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; import * as exec_pb from "./exec_pb"; import * as payload_pb from "./payload_pb"; import * as txs_pb from "./txs_pb"; -import * as grpc from "grpc"; interface ITransactService extends grpc.ServiceDefinition { - broadcastTxSync: grpc.MethodDefinition; - broadcastTxAsync: grpc.MethodDefinition; - signTx: grpc.MethodDefinition; - formulateTx: grpc.MethodDefinition; - callTxSync: grpc.MethodDefinition; - callTxAsync: grpc.MethodDefinition; - callTxSim: grpc.MethodDefinition; - callCodeSim: grpc.MethodDefinition; - sendTxSync: grpc.MethodDefinition; - sendTxAsync: grpc.MethodDefinition; - nameTxSync: grpc.MethodDefinition; - nameTxAsync: grpc.MethodDefinition; + broadcastTxSync: ITransactService_IBroadcastTxSync; + broadcastTxAsync: ITransactService_IBroadcastTxAsync; + signTx: ITransactService_ISignTx; + formulateTx: ITransactService_IFormulateTx; + callTxSync: ITransactService_ICallTxSync; + callTxAsync: ITransactService_ICallTxAsync; + callTxSim: ITransactService_ICallTxSim; + callCodeSim: ITransactService_ICallCodeSim; + sendTxSync: ITransactService_ISendTxSync; + sendTxAsync: ITransactService_ISendTxAsync; + nameTxSync: ITransactService_INameTxSync; + nameTxAsync: ITransactService_INameTxAsync; +} + +interface ITransactService_IBroadcastTxSync extends grpc.MethodDefinition { + path: string; // "/rpctransact.Transact/BroadcastTxSync" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITransactService_IBroadcastTxAsync extends grpc.MethodDefinition { + path: string; // "/rpctransact.Transact/BroadcastTxAsync" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITransactService_ISignTx extends grpc.MethodDefinition { + path: string; // "/rpctransact.Transact/SignTx" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITransactService_IFormulateTx extends grpc.MethodDefinition { + path: string; // "/rpctransact.Transact/FormulateTx" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITransactService_ICallTxSync extends grpc.MethodDefinition { + path: string; // "/rpctransact.Transact/CallTxSync" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITransactService_ICallTxAsync extends grpc.MethodDefinition { + path: string; // "/rpctransact.Transact/CallTxAsync" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITransactService_ICallTxSim extends grpc.MethodDefinition { + path: string; // "/rpctransact.Transact/CallTxSim" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITransactService_ICallCodeSim extends grpc.MethodDefinition { + path: string; // "/rpctransact.Transact/CallCodeSim" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITransactService_ISendTxSync extends grpc.MethodDefinition { + path: string; // "/rpctransact.Transact/SendTxSync" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITransactService_ISendTxAsync extends grpc.MethodDefinition { + path: string; // "/rpctransact.Transact/SendTxAsync" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITransactService_INameTxSync extends grpc.MethodDefinition { + path: string; // "/rpctransact.Transact/NameTxSync" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ITransactService_INameTxAsync extends grpc.MethodDefinition { + path: string; // "/rpctransact.Transact/NameTxAsync" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } export const TransactService: ITransactService; -export class TransactClient extends grpc.Client { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - broadcastTxSync(argument: rpctransact_pb.TxEnvelopeParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - broadcastTxSync(argument: rpctransact_pb.TxEnvelopeParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - broadcastTxSync(argument: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - broadcastTxAsync(argument: rpctransact_pb.TxEnvelopeParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - broadcastTxAsync(argument: rpctransact_pb.TxEnvelopeParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - broadcastTxAsync(argument: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - signTx(argument: rpctransact_pb.TxEnvelopeParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - signTx(argument: rpctransact_pb.TxEnvelopeParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - signTx(argument: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - formulateTx(argument: payload_pb.Any, callback: grpc.requestCallback): grpc.ClientUnaryCall; - formulateTx(argument: payload_pb.Any, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - formulateTx(argument: payload_pb.Any, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - callTxSync(argument: payload_pb.CallTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; - callTxSync(argument: payload_pb.CallTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - callTxSync(argument: payload_pb.CallTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - callTxAsync(argument: payload_pb.CallTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; - callTxAsync(argument: payload_pb.CallTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - callTxAsync(argument: payload_pb.CallTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - callTxSim(argument: payload_pb.CallTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; - callTxSim(argument: payload_pb.CallTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - callTxSim(argument: payload_pb.CallTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - callCodeSim(argument: rpctransact_pb.CallCodeParam, callback: grpc.requestCallback): grpc.ClientUnaryCall; - callCodeSim(argument: rpctransact_pb.CallCodeParam, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - callCodeSim(argument: rpctransact_pb.CallCodeParam, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - sendTxSync(argument: payload_pb.SendTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; - sendTxSync(argument: payload_pb.SendTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - sendTxSync(argument: payload_pb.SendTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - sendTxAsync(argument: payload_pb.SendTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; - sendTxAsync(argument: payload_pb.SendTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - sendTxAsync(argument: payload_pb.SendTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - nameTxSync(argument: payload_pb.NameTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; - nameTxSync(argument: payload_pb.NameTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - nameTxSync(argument: payload_pb.NameTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - nameTxAsync(argument: payload_pb.NameTx, callback: grpc.requestCallback): grpc.ClientUnaryCall; - nameTxAsync(argument: payload_pb.NameTx, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - nameTxAsync(argument: payload_pb.NameTx, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; +export interface ITransactServer { + broadcastTxSync: grpc.handleUnaryCall; + broadcastTxAsync: grpc.handleUnaryCall; + signTx: grpc.handleUnaryCall; + formulateTx: grpc.handleUnaryCall; + callTxSync: grpc.handleUnaryCall; + callTxAsync: grpc.handleUnaryCall; + callTxSim: grpc.handleUnaryCall; + callCodeSim: grpc.handleUnaryCall; + sendTxSync: grpc.handleUnaryCall; + sendTxAsync: grpc.handleUnaryCall; + nameTxSync: grpc.handleUnaryCall; + nameTxAsync: grpc.handleUnaryCall; +} + +export interface ITransactClient { + broadcastTxSync(request: rpctransact_pb.TxEnvelopeParam, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + broadcastTxSync(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + broadcastTxSync(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + broadcastTxAsync(request: rpctransact_pb.TxEnvelopeParam, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + broadcastTxAsync(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + broadcastTxAsync(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + signTx(request: rpctransact_pb.TxEnvelopeParam, callback: (error: grpc.ServiceError | null, response: rpctransact_pb.TxEnvelope) => void): grpc.ClientUnaryCall; + signTx(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpctransact_pb.TxEnvelope) => void): grpc.ClientUnaryCall; + signTx(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpctransact_pb.TxEnvelope) => void): grpc.ClientUnaryCall; + formulateTx(request: payload_pb.Any, callback: (error: grpc.ServiceError | null, response: rpctransact_pb.TxEnvelope) => void): grpc.ClientUnaryCall; + formulateTx(request: payload_pb.Any, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpctransact_pb.TxEnvelope) => void): grpc.ClientUnaryCall; + formulateTx(request: payload_pb.Any, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpctransact_pb.TxEnvelope) => void): grpc.ClientUnaryCall; + callTxSync(request: payload_pb.CallTx, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + callTxSync(request: payload_pb.CallTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + callTxSync(request: payload_pb.CallTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + callTxAsync(request: payload_pb.CallTx, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + callTxAsync(request: payload_pb.CallTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + callTxAsync(request: payload_pb.CallTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + callTxSim(request: payload_pb.CallTx, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + callTxSim(request: payload_pb.CallTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + callTxSim(request: payload_pb.CallTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + callCodeSim(request: rpctransact_pb.CallCodeParam, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + callCodeSim(request: rpctransact_pb.CallCodeParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + callCodeSim(request: rpctransact_pb.CallCodeParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + sendTxSync(request: payload_pb.SendTx, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + sendTxSync(request: payload_pb.SendTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + sendTxSync(request: payload_pb.SendTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + sendTxAsync(request: payload_pb.SendTx, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + sendTxAsync(request: payload_pb.SendTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + sendTxAsync(request: payload_pb.SendTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + nameTxSync(request: payload_pb.NameTx, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + nameTxSync(request: payload_pb.NameTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + nameTxSync(request: payload_pb.NameTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + nameTxAsync(request: payload_pb.NameTx, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + nameTxAsync(request: payload_pb.NameTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + nameTxAsync(request: payload_pb.NameTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; +} + +export class TransactClient extends grpc.Client implements ITransactClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public broadcastTxSync(request: rpctransact_pb.TxEnvelopeParam, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public broadcastTxSync(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public broadcastTxSync(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public broadcastTxAsync(request: rpctransact_pb.TxEnvelopeParam, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + public broadcastTxAsync(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + public broadcastTxAsync(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + public signTx(request: rpctransact_pb.TxEnvelopeParam, callback: (error: grpc.ServiceError | null, response: rpctransact_pb.TxEnvelope) => void): grpc.ClientUnaryCall; + public signTx(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpctransact_pb.TxEnvelope) => void): grpc.ClientUnaryCall; + public signTx(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpctransact_pb.TxEnvelope) => void): grpc.ClientUnaryCall; + public formulateTx(request: payload_pb.Any, callback: (error: grpc.ServiceError | null, response: rpctransact_pb.TxEnvelope) => void): grpc.ClientUnaryCall; + public formulateTx(request: payload_pb.Any, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpctransact_pb.TxEnvelope) => void): grpc.ClientUnaryCall; + public formulateTx(request: payload_pb.Any, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpctransact_pb.TxEnvelope) => void): grpc.ClientUnaryCall; + public callTxSync(request: payload_pb.CallTx, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public callTxSync(request: payload_pb.CallTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public callTxSync(request: payload_pb.CallTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public callTxAsync(request: payload_pb.CallTx, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + public callTxAsync(request: payload_pb.CallTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + public callTxAsync(request: payload_pb.CallTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + public callTxSim(request: payload_pb.CallTx, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public callTxSim(request: payload_pb.CallTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public callTxSim(request: payload_pb.CallTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public callCodeSim(request: rpctransact_pb.CallCodeParam, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public callCodeSim(request: rpctransact_pb.CallCodeParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public callCodeSim(request: rpctransact_pb.CallCodeParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public sendTxSync(request: payload_pb.SendTx, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public sendTxSync(request: payload_pb.SendTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public sendTxSync(request: payload_pb.SendTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public sendTxAsync(request: payload_pb.SendTx, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + public sendTxAsync(request: payload_pb.SendTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + public sendTxAsync(request: payload_pb.SendTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + public nameTxSync(request: payload_pb.NameTx, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public nameTxSync(request: payload_pb.NameTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public nameTxSync(request: payload_pb.NameTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; + public nameTxAsync(request: payload_pb.NameTx, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + public nameTxAsync(request: payload_pb.NameTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; + public nameTxAsync(request: payload_pb.NameTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: txs_pb.Receipt) => void): grpc.ClientUnaryCall; } diff --git a/js/proto/rpctransact_grpc_pb.js b/js/proto/rpctransact_grpc_pb.js index 230c0b12c..2f4e06aa6 100644 --- a/js/proto/rpctransact_grpc_pb.js +++ b/js/proto/rpctransact_grpc_pb.js @@ -1,7 +1,6 @@ // GENERATED CODE -- DO NOT EDIT! 'use strict'; -var grpc = require('grpc'); var rpctransact_pb = require('./rpctransact_pb.js'); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); @@ -110,7 +109,7 @@ function deserialize_txs_Receipt(buffer_arg) { // Transaction Service Definition -var TransactService = exports.TransactService = { +var TransactService = exports['rpctransact.Transact'] = { // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side // and wait for it to be included in block broadcastTxSync: { @@ -259,4 +258,3 @@ nameTxAsync: { }, }; -exports.TransactClient = grpc.makeGenericClientConstructor(TransactService); diff --git a/js/proto/rpctransact_pb.d.ts b/js/proto/rpctransact_pb.d.ts index 0269b8842..85f60e074 100644 --- a/js/proto/rpctransact_pb.d.ts +++ b/js/proto/rpctransact_pb.d.ts @@ -1,6 +1,9 @@ // package: rpctransact // file: rpctransact.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; @@ -8,93 +11,99 @@ import * as exec_pb from "./exec_pb"; import * as payload_pb from "./payload_pb"; import * as txs_pb from "./txs_pb"; -export class CallCodeParam extends jspb.Message { - getFromaddress(): Uint8Array | string; - getFromaddress_asU8(): Uint8Array; - getFromaddress_asB64(): string; - setFromaddress(value: Uint8Array | string): void; - - getCode(): Uint8Array | string; - getCode_asU8(): Uint8Array; - getCode_asB64(): string; - setCode(value: Uint8Array | string): void; - - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CallCodeParam.AsObject; - static toObject(includeInstance: boolean, msg: CallCodeParam): CallCodeParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CallCodeParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CallCodeParam; - static deserializeBinaryFromReader(message: CallCodeParam, reader: jspb.BinaryReader): CallCodeParam; +export class CallCodeParam extends jspb.Message { + getFromaddress(): Uint8Array | string; + getFromaddress_asU8(): Uint8Array; + getFromaddress_asB64(): string; + setFromaddress(value: Uint8Array | string): void; + + getCode(): Uint8Array | string; + getCode_asU8(): Uint8Array; + getCode_asB64(): string; + setCode(value: Uint8Array | string): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CallCodeParam.AsObject; + static toObject(includeInstance: boolean, msg: CallCodeParam): CallCodeParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CallCodeParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CallCodeParam; + static deserializeBinaryFromReader(message: CallCodeParam, reader: jspb.BinaryReader): CallCodeParam; } export namespace CallCodeParam { - export type AsObject = { - fromaddress: Uint8Array | string, - code: Uint8Array | string, - data: Uint8Array | string, - } + export type AsObject = { + fromaddress: Uint8Array | string, + code: Uint8Array | string, + data: Uint8Array | string, + } } -export class TxEnvelope extends jspb.Message { - hasEnvelope(): boolean; - clearEnvelope(): void; - getEnvelope(): txs_pb.Envelope | undefined; - setEnvelope(value?: txs_pb.Envelope): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TxEnvelope.AsObject; - static toObject(includeInstance: boolean, msg: TxEnvelope): TxEnvelope.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TxEnvelope, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TxEnvelope; - static deserializeBinaryFromReader(message: TxEnvelope, reader: jspb.BinaryReader): TxEnvelope; +export class TxEnvelope extends jspb.Message { + + hasEnvelope(): boolean; + clearEnvelope(): void; + getEnvelope(): txs_pb.Envelope | undefined; + setEnvelope(value?: txs_pb.Envelope): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxEnvelope.AsObject; + static toObject(includeInstance: boolean, msg: TxEnvelope): TxEnvelope.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxEnvelope, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxEnvelope; + static deserializeBinaryFromReader(message: TxEnvelope, reader: jspb.BinaryReader): TxEnvelope; } export namespace TxEnvelope { - export type AsObject = { - envelope?: txs_pb.Envelope.AsObject, - } + export type AsObject = { + envelope?: txs_pb.Envelope.AsObject, + } } -export class TxEnvelopeParam extends jspb.Message { - hasEnvelope(): boolean; - clearEnvelope(): void; - getEnvelope(): txs_pb.Envelope | undefined; - setEnvelope(value?: txs_pb.Envelope): void; - - hasPayload(): boolean; - clearPayload(): void; - getPayload(): payload_pb.Any | undefined; - setPayload(value?: payload_pb.Any): void; - - hasTimeout(): boolean; - clearTimeout(): void; - getTimeout(): google_protobuf_duration_pb.Duration | undefined; - setTimeout(value?: google_protobuf_duration_pb.Duration): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TxEnvelopeParam.AsObject; - static toObject(includeInstance: boolean, msg: TxEnvelopeParam): TxEnvelopeParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TxEnvelopeParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TxEnvelopeParam; - static deserializeBinaryFromReader(message: TxEnvelopeParam, reader: jspb.BinaryReader): TxEnvelopeParam; +export class TxEnvelopeParam extends jspb.Message { + + hasEnvelope(): boolean; + clearEnvelope(): void; + getEnvelope(): txs_pb.Envelope | undefined; + setEnvelope(value?: txs_pb.Envelope): void; + + + hasPayload(): boolean; + clearPayload(): void; + getPayload(): payload_pb.Any | undefined; + setPayload(value?: payload_pb.Any): void; + + + hasTimeout(): boolean; + clearTimeout(): void; + getTimeout(): google_protobuf_duration_pb.Duration | undefined; + setTimeout(value?: google_protobuf_duration_pb.Duration): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxEnvelopeParam.AsObject; + static toObject(includeInstance: boolean, msg: TxEnvelopeParam): TxEnvelopeParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxEnvelopeParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxEnvelopeParam; + static deserializeBinaryFromReader(message: TxEnvelopeParam, reader: jspb.BinaryReader): TxEnvelopeParam; } export namespace TxEnvelopeParam { - export type AsObject = { - envelope?: txs_pb.Envelope.AsObject, - payload?: payload_pb.Any.AsObject, - timeout?: google_protobuf_duration_pb.Duration.AsObject, - } + export type AsObject = { + envelope?: txs_pb.Envelope.AsObject, + payload?: payload_pb.Any.AsObject, + timeout?: google_protobuf_duration_pb.Duration.AsObject, + } } - diff --git a/js/proto/rpctransact_pb.js b/js/proto/rpctransact_pb.js index 991ba55c8..567c43531 100644 --- a/js/proto/rpctransact_pb.js +++ b/js/proto/rpctransact_pb.js @@ -1,4 +1,3 @@ -// source: rpctransact.proto /** * @fileoverview * @enhanceable @@ -25,6 +24,7 @@ goog.object.extend(proto, txs_pb); goog.exportSymbol('proto.rpctransact.CallCodeParam', null, global); goog.exportSymbol('proto.rpctransact.TxEnvelope', null, global); goog.exportSymbol('proto.rpctransact.TxEnvelopeParam', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -40,68 +40,19 @@ proto.rpctransact.CallCodeParam = function(opt_data) { }; goog.inherits(proto.rpctransact.CallCodeParam, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.rpctransact.CallCodeParam.displayName = 'proto.rpctransact.CallCodeParam'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpctransact.TxEnvelope = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpctransact.TxEnvelope, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpctransact.TxEnvelope.displayName = 'proto.rpctransact.TxEnvelope'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpctransact.TxEnvelopeParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpctransact.TxEnvelopeParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.rpctransact.TxEnvelopeParam.displayName = 'proto.rpctransact.TxEnvelopeParam'; -} - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpctransact.CallCodeParam.prototype.toObject = function(opt_includeInstance) { @@ -111,8 +62,8 @@ proto.rpctransact.CallCodeParam.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpctransact.CallCodeParam} msg The msg instance to transform. * @return {!Object} @@ -257,12 +208,9 @@ proto.rpctransact.CallCodeParam.prototype.getFromaddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpctransact.CallCodeParam} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpctransact.CallCodeParam.prototype.setFromaddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -299,12 +247,9 @@ proto.rpctransact.CallCodeParam.prototype.getCode_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpctransact.CallCodeParam} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpctransact.CallCodeParam.prototype.setCode = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -341,29 +286,41 @@ proto.rpctransact.CallCodeParam.prototype.getData_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.rpctransact.CallCodeParam} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.rpctransact.CallCodeParam.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); + jspb.Message.setProto3BytesField(this, 3, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpctransact.TxEnvelope = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpctransact.TxEnvelope, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpctransact.TxEnvelope.displayName = 'proto.rpctransact.TxEnvelope'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpctransact.TxEnvelope.prototype.toObject = function(opt_includeInstance) { @@ -373,8 +330,8 @@ proto.rpctransact.TxEnvelope.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpctransact.TxEnvelope} msg The msg instance to transform. * @return {!Object} @@ -474,21 +431,14 @@ proto.rpctransact.TxEnvelope.prototype.getEnvelope = function() { }; -/** - * @param {?proto.txs.Envelope|undefined} value - * @return {!proto.rpctransact.TxEnvelope} returns this -*/ +/** @param {?proto.txs.Envelope|undefined} value */ proto.rpctransact.TxEnvelope.prototype.setEnvelope = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.rpctransact.TxEnvelope} returns this - */ proto.rpctransact.TxEnvelope.prototype.clearEnvelope = function() { - return this.setEnvelope(undefined); + this.setEnvelope(undefined); }; @@ -502,19 +452,34 @@ proto.rpctransact.TxEnvelope.prototype.hasEnvelope = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpctransact.TxEnvelopeParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpctransact.TxEnvelopeParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.rpctransact.TxEnvelopeParam.displayName = 'proto.rpctransact.TxEnvelopeParam'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.rpctransact.TxEnvelopeParam.prototype.toObject = function(opt_includeInstance) { @@ -524,8 +489,8 @@ proto.rpctransact.TxEnvelopeParam.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpctransact.TxEnvelopeParam} msg The msg instance to transform. * @return {!Object} @@ -653,21 +618,14 @@ proto.rpctransact.TxEnvelopeParam.prototype.getEnvelope = function() { }; -/** - * @param {?proto.txs.Envelope|undefined} value - * @return {!proto.rpctransact.TxEnvelopeParam} returns this -*/ +/** @param {?proto.txs.Envelope|undefined} value */ proto.rpctransact.TxEnvelopeParam.prototype.setEnvelope = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + jspb.Message.setWrapperField(this, 1, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.rpctransact.TxEnvelopeParam} returns this - */ proto.rpctransact.TxEnvelopeParam.prototype.clearEnvelope = function() { - return this.setEnvelope(undefined); + this.setEnvelope(undefined); }; @@ -690,21 +648,14 @@ proto.rpctransact.TxEnvelopeParam.prototype.getPayload = function() { }; -/** - * @param {?proto.payload.Any|undefined} value - * @return {!proto.rpctransact.TxEnvelopeParam} returns this -*/ +/** @param {?proto.payload.Any|undefined} value */ proto.rpctransact.TxEnvelopeParam.prototype.setPayload = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.rpctransact.TxEnvelopeParam} returns this - */ proto.rpctransact.TxEnvelopeParam.prototype.clearPayload = function() { - return this.setPayload(undefined); + this.setPayload(undefined); }; @@ -727,21 +678,14 @@ proto.rpctransact.TxEnvelopeParam.prototype.getTimeout = function() { }; -/** - * @param {?proto.google.protobuf.Duration|undefined} value - * @return {!proto.rpctransact.TxEnvelopeParam} returns this -*/ +/** @param {?proto.google.protobuf.Duration|undefined} value */ proto.rpctransact.TxEnvelopeParam.prototype.setTimeout = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.rpctransact.TxEnvelopeParam} returns this - */ proto.rpctransact.TxEnvelopeParam.prototype.clearTimeout = function() { - return this.setTimeout(undefined); + this.setTimeout(undefined); }; diff --git a/js/proto/spec_grpc_pb.d.ts b/js/proto/spec_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/spec_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/spec_pb.d.ts b/js/proto/spec_pb.d.ts index 17b318d73..9e6b4ab4a 100644 --- a/js/proto/spec_pb.d.ts +++ b/js/proto/spec_pb.d.ts @@ -1,64 +1,68 @@ // package: spec // file: spec.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as crypto_pb from "./crypto_pb"; import * as balance_pb from "./balance_pb"; -export class TemplateAccount extends jspb.Message { - getName(): string; - setName(value: string): void; +export class TemplateAccount extends jspb.Message { + getName(): string; + setName(value: string): void; + + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; - hasPublickey(): boolean; - clearPublickey(): void; - getPublickey(): crypto_pb.PublicKey | undefined; - setPublickey(value?: crypto_pb.PublicKey): void; + hasPublickey(): boolean; + clearPublickey(): void; + getPublickey(): crypto_pb.PublicKey | undefined; + setPublickey(value?: crypto_pb.PublicKey): void; - clearAmountsList(): void; - getAmountsList(): Array; - setAmountsList(value: Array): void; - addAmounts(value?: balance_pb.Balance, index?: number): balance_pb.Balance; + clearAmountsList(): void; + getAmountsList(): Array; + setAmountsList(value: Array): void; + addAmounts(value?: balance_pb.Balance, index?: number): balance_pb.Balance; - clearPermissionsList(): void; - getPermissionsList(): Array; - setPermissionsList(value: Array): void; - addPermissions(value: string, index?: number): string; + clearPermissionsList(): void; + getPermissionsList(): Array; + setPermissionsList(value: Array): void; + addPermissions(value: string, index?: number): string; - clearRolesList(): void; - getRolesList(): Array; - setRolesList(value: Array): void; - addRoles(value: string, index?: number): string; + clearRolesList(): void; + getRolesList(): Array; + setRolesList(value: Array): void; + addRoles(value: string, index?: number): string; - getCode(): Uint8Array | string; - getCode_asU8(): Uint8Array; - getCode_asB64(): string; - setCode(value: Uint8Array | string): void; + getCode(): Uint8Array | string; + getCode_asU8(): Uint8Array; + getCode_asB64(): string; + setCode(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TemplateAccount.AsObject; - static toObject(includeInstance: boolean, msg: TemplateAccount): TemplateAccount.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TemplateAccount, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TemplateAccount; - static deserializeBinaryFromReader(message: TemplateAccount, reader: jspb.BinaryReader): TemplateAccount; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TemplateAccount.AsObject; + static toObject(includeInstance: boolean, msg: TemplateAccount): TemplateAccount.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TemplateAccount, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TemplateAccount; + static deserializeBinaryFromReader(message: TemplateAccount, reader: jspb.BinaryReader): TemplateAccount; } export namespace TemplateAccount { - export type AsObject = { - name: string, - address: Uint8Array | string, - publickey?: crypto_pb.PublicKey.AsObject, - amountsList: Array, - permissionsList: Array, - rolesList: Array, - code: Uint8Array | string, - } + export type AsObject = { + name: string, + address: Uint8Array | string, + publickey?: crypto_pb.PublicKey.AsObject, + amountsList: Array, + permissionsList: Array, + rolesList: Array, + code: Uint8Array | string, + } } - diff --git a/js/proto/spec_pb.js b/js/proto/spec_pb.js index c0b9cd6d6..c32a9fbaa 100644 --- a/js/proto/spec_pb.js +++ b/js/proto/spec_pb.js @@ -1,4 +1,3 @@ -// source: spec.proto /** * @fileoverview * @enhanceable @@ -19,6 +18,7 @@ goog.object.extend(proto, crypto_pb); var balance_pb = require('./balance_pb.js'); goog.object.extend(proto, balance_pb); goog.exportSymbol('proto.spec.TemplateAccount', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -34,13 +34,8 @@ proto.spec.TemplateAccount = function(opt_data) { }; goog.inherits(proto.spec.TemplateAccount, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.spec.TemplateAccount.displayName = 'proto.spec.TemplateAccount'; } - /** * List of repeated fields within this message type. * @private {!Array} @@ -52,15 +47,13 @@ proto.spec.TemplateAccount.repeatedFields_ = [4,5,6]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.spec.TemplateAccount.prototype.toObject = function(opt_includeInstance) { @@ -70,8 +63,8 @@ proto.spec.TemplateAccount.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.spec.TemplateAccount} msg The msg instance to transform. * @return {!Object} @@ -84,8 +77,8 @@ proto.spec.TemplateAccount.toObject = function(includeInstance, msg) { publickey: (f = msg.getPublickey()) && crypto_pb.PublicKey.toObject(includeInstance, f), amountsList: jspb.Message.toObjectList(msg.getAmountsList(), balance_pb.Balance.toObject, includeInstance), - permissionsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, - rolesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + permissionsList: jspb.Message.getRepeatedField(msg, 5), + rolesList: jspb.Message.getRepeatedField(msg, 6), code: msg.getCode_asB64() }; @@ -245,12 +238,9 @@ proto.spec.TemplateAccount.prototype.getName = function() { }; -/** - * @param {string} value - * @return {!proto.spec.TemplateAccount} returns this - */ +/** @param {string} value */ proto.spec.TemplateAccount.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + jspb.Message.setProto3StringField(this, 1, value); }; @@ -287,12 +277,9 @@ proto.spec.TemplateAccount.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.spec.TemplateAccount} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.spec.TemplateAccount.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -306,21 +293,14 @@ proto.spec.TemplateAccount.prototype.getPublickey = function() { }; -/** - * @param {?proto.crypto.PublicKey|undefined} value - * @return {!proto.spec.TemplateAccount} returns this -*/ +/** @param {?proto.crypto.PublicKey|undefined} value */ proto.spec.TemplateAccount.prototype.setPublickey = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + jspb.Message.setWrapperField(this, 3, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.spec.TemplateAccount} returns this - */ proto.spec.TemplateAccount.prototype.clearPublickey = function() { - return this.setPublickey(undefined); + this.setPublickey(undefined); }; @@ -343,12 +323,9 @@ proto.spec.TemplateAccount.prototype.getAmountsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.spec.TemplateAccount} returns this -*/ +/** @param {!Array} value */ proto.spec.TemplateAccount.prototype.setAmountsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); + jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -362,12 +339,8 @@ proto.spec.TemplateAccount.prototype.addAmounts = function(opt_value, opt_index) }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.spec.TemplateAccount} returns this - */ proto.spec.TemplateAccount.prototype.clearAmountsList = function() { - return this.setAmountsList([]); + this.setAmountsList([]); }; @@ -380,31 +353,23 @@ proto.spec.TemplateAccount.prototype.getPermissionsList = function() { }; -/** - * @param {!Array} value - * @return {!proto.spec.TemplateAccount} returns this - */ +/** @param {!Array} value */ proto.spec.TemplateAccount.prototype.setPermissionsList = function(value) { - return jspb.Message.setField(this, 5, value || []); + jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index - * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.addPermissions = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 5, value, opt_index); + jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.spec.TemplateAccount} returns this - */ proto.spec.TemplateAccount.prototype.clearPermissionsList = function() { - return this.setPermissionsList([]); + this.setPermissionsList([]); }; @@ -417,31 +382,23 @@ proto.spec.TemplateAccount.prototype.getRolesList = function() { }; -/** - * @param {!Array} value - * @return {!proto.spec.TemplateAccount} returns this - */ +/** @param {!Array} value */ proto.spec.TemplateAccount.prototype.setRolesList = function(value) { - return jspb.Message.setField(this, 6, value || []); + jspb.Message.setField(this, 6, value || []); }; /** * @param {string} value * @param {number=} opt_index - * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.addRoles = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); + jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.spec.TemplateAccount} returns this - */ proto.spec.TemplateAccount.prototype.clearRolesList = function() { - return this.setRolesList([]); + this.setRolesList([]); }; @@ -478,12 +435,9 @@ proto.spec.TemplateAccount.prototype.getCode_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.spec.TemplateAccount} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.spec.TemplateAccount.prototype.setCode = function(value) { - return jspb.Message.setProto3BytesField(this, 7, value); + jspb.Message.setProto3BytesField(this, 7, value); }; diff --git a/js/proto/storage_grpc_pb.d.ts b/js/proto/storage_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/storage_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/storage_pb.d.ts b/js/proto/storage_pb.d.ts index 8216319a0..68979975d 100644 --- a/js/proto/storage_pb.d.ts +++ b/js/proto/storage_pb.d.ts @@ -1,32 +1,35 @@ // package: storage // file: storage.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; -export class CommitID extends jspb.Message { - getVersion(): number; - setVersion(value: number): void; +export class CommitID extends jspb.Message { + getVersion(): number; + setVersion(value: number): void; + + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CommitID.AsObject; - static toObject(includeInstance: boolean, msg: CommitID): CommitID.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CommitID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CommitID; - static deserializeBinaryFromReader(message: CommitID, reader: jspb.BinaryReader): CommitID; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CommitID.AsObject; + static toObject(includeInstance: boolean, msg: CommitID): CommitID.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CommitID, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CommitID; + static deserializeBinaryFromReader(message: CommitID, reader: jspb.BinaryReader): CommitID; } export namespace CommitID { - export type AsObject = { - version: number, - hash: Uint8Array | string, - } + export type AsObject = { + version: number, + hash: Uint8Array | string, + } } - diff --git a/js/proto/storage_pb.js b/js/proto/storage_pb.js index 4a7d06688..c2b867e6b 100644 --- a/js/proto/storage_pb.js +++ b/js/proto/storage_pb.js @@ -1,4 +1,3 @@ -// source: storage.proto /** * @fileoverview * @enhanceable @@ -15,6 +14,7 @@ var global = Function('return this')(); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.storage.CommitID', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,26 +30,19 @@ proto.storage.CommitID = function(opt_data) { }; goog.inherits(proto.storage.CommitID, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.storage.CommitID.displayName = 'proto.storage.CommitID'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.storage.CommitID.prototype.toObject = function(opt_includeInstance) { @@ -59,8 +52,8 @@ proto.storage.CommitID.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.storage.CommitID} msg The msg instance to transform. * @return {!Object} @@ -169,12 +162,9 @@ proto.storage.CommitID.prototype.getVersion = function() { }; -/** - * @param {number} value - * @return {!proto.storage.CommitID} returns this - */ +/** @param {number} value */ proto.storage.CommitID.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -211,12 +201,9 @@ proto.storage.CommitID.prototype.getHash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.storage.CommitID} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.storage.CommitID.prototype.setHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; diff --git a/js/proto/tendermint_grpc_pb.d.ts b/js/proto/tendermint_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/tendermint_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/tendermint_pb.d.ts b/js/proto/tendermint_pb.d.ts index 8678f2589..f9754b4dd 100644 --- a/js/proto/tendermint_pb.d.ts +++ b/js/proto/tendermint_pb.d.ts @@ -1,58 +1,61 @@ // package: tendermint // file: tendermint.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; -export class NodeInfo extends jspb.Message { - getId(): Uint8Array | string; - getId_asU8(): Uint8Array; - getId_asB64(): string; - setId(value: Uint8Array | string): void; +export class NodeInfo extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): void; + + getListenaddress(): string; + setListenaddress(value: string): void; - getListenaddress(): string; - setListenaddress(value: string): void; + getNetwork(): string; + setNetwork(value: string): void; - getNetwork(): string; - setNetwork(value: string): void; + getVersion(): string; + setVersion(value: string): void; - getVersion(): string; - setVersion(value: string): void; + getChannels(): Uint8Array | string; + getChannels_asU8(): Uint8Array; + getChannels_asB64(): string; + setChannels(value: Uint8Array | string): void; - getChannels(): Uint8Array | string; - getChannels_asU8(): Uint8Array; - getChannels_asB64(): string; - setChannels(value: Uint8Array | string): void; + getMoniker(): string; + setMoniker(value: string): void; - getMoniker(): string; - setMoniker(value: string): void; + getRpcaddress(): string; + setRpcaddress(value: string): void; - getRpcaddress(): string; - setRpcaddress(value: string): void; + getTxindex(): string; + setTxindex(value: string): void; - getTxindex(): string; - setTxindex(value: string): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NodeInfo.AsObject; - static toObject(includeInstance: boolean, msg: NodeInfo): NodeInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NodeInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NodeInfo; - static deserializeBinaryFromReader(message: NodeInfo, reader: jspb.BinaryReader): NodeInfo; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: NodeInfo): NodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NodeInfo; + static deserializeBinaryFromReader(message: NodeInfo, reader: jspb.BinaryReader): NodeInfo; } export namespace NodeInfo { - export type AsObject = { - id: Uint8Array | string, - listenaddress: string, - network: string, - version: string, - channels: Uint8Array | string, - moniker: string, - rpcaddress: string, - txindex: string, - } + export type AsObject = { + id: Uint8Array | string, + listenaddress: string, + network: string, + version: string, + channels: Uint8Array | string, + moniker: string, + rpcaddress: string, + txindex: string, + } } - diff --git a/js/proto/tendermint_pb.js b/js/proto/tendermint_pb.js index 779e287f0..c7c028138 100644 --- a/js/proto/tendermint_pb.js +++ b/js/proto/tendermint_pb.js @@ -1,4 +1,3 @@ -// source: tendermint.proto /** * @fileoverview * @enhanceable @@ -15,6 +14,7 @@ var global = Function('return this')(); var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.tendermint.NodeInfo', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,26 +30,19 @@ proto.tendermint.NodeInfo = function(opt_data) { }; goog.inherits(proto.tendermint.NodeInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.tendermint.NodeInfo.displayName = 'proto.tendermint.NodeInfo'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.tendermint.NodeInfo.prototype.toObject = function(opt_includeInstance) { @@ -59,8 +52,8 @@ proto.tendermint.NodeInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.tendermint.NodeInfo} msg The msg instance to transform. * @return {!Object} @@ -265,12 +258,9 @@ proto.tendermint.NodeInfo.prototype.getId_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.NodeInfo} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.tendermint.NodeInfo.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -283,12 +273,9 @@ proto.tendermint.NodeInfo.prototype.getListenaddress = function() { }; -/** - * @param {string} value - * @return {!proto.tendermint.NodeInfo} returns this - */ +/** @param {string} value */ proto.tendermint.NodeInfo.prototype.setListenaddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + jspb.Message.setProto3StringField(this, 2, value); }; @@ -301,12 +288,9 @@ proto.tendermint.NodeInfo.prototype.getNetwork = function() { }; -/** - * @param {string} value - * @return {!proto.tendermint.NodeInfo} returns this - */ +/** @param {string} value */ proto.tendermint.NodeInfo.prototype.setNetwork = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + jspb.Message.setProto3StringField(this, 3, value); }; @@ -319,12 +303,9 @@ proto.tendermint.NodeInfo.prototype.getVersion = function() { }; -/** - * @param {string} value - * @return {!proto.tendermint.NodeInfo} returns this - */ +/** @param {string} value */ proto.tendermint.NodeInfo.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); + jspb.Message.setProto3StringField(this, 4, value); }; @@ -361,12 +342,9 @@ proto.tendermint.NodeInfo.prototype.getChannels_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.tendermint.NodeInfo} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.tendermint.NodeInfo.prototype.setChannels = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); + jspb.Message.setProto3BytesField(this, 5, value); }; @@ -379,12 +357,9 @@ proto.tendermint.NodeInfo.prototype.getMoniker = function() { }; -/** - * @param {string} value - * @return {!proto.tendermint.NodeInfo} returns this - */ +/** @param {string} value */ proto.tendermint.NodeInfo.prototype.setMoniker = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); + jspb.Message.setProto3StringField(this, 6, value); }; @@ -397,12 +372,9 @@ proto.tendermint.NodeInfo.prototype.getRpcaddress = function() { }; -/** - * @param {string} value - * @return {!proto.tendermint.NodeInfo} returns this - */ +/** @param {string} value */ proto.tendermint.NodeInfo.prototype.setRpcaddress = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); + jspb.Message.setProto3StringField(this, 7, value); }; @@ -415,12 +387,9 @@ proto.tendermint.NodeInfo.prototype.getTxindex = function() { }; -/** - * @param {string} value - * @return {!proto.tendermint.NodeInfo} returns this - */ +/** @param {string} value */ proto.tendermint.NodeInfo.prototype.setTxindex = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); + jspb.Message.setProto3StringField(this, 8, value); }; diff --git a/js/proto/txs_grpc_pb.d.ts b/js/proto/txs_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/txs_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/txs_pb.d.ts b/js/proto/txs_pb.d.ts index 4879ca13e..e774626bb 100644 --- a/js/proto/txs_pb.d.ts +++ b/js/proto/txs_pb.d.ts @@ -1,116 +1,122 @@ // package: txs // file: txs.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as crypto_pb from "./crypto_pb"; -export class Envelope extends jspb.Message { - clearSignatoriesList(): void; - getSignatoriesList(): Array; - setSignatoriesList(value: Array): void; - addSignatories(value?: Signatory, index?: number): Signatory; - - getTx(): Uint8Array | string; - getTx_asU8(): Uint8Array; - getTx_asB64(): string; - setTx(value: Uint8Array | string): void; - - getEncoding(): Envelope.EncodingTypeMap[keyof Envelope.EncodingTypeMap]; - setEncoding(value: Envelope.EncodingTypeMap[keyof Envelope.EncodingTypeMap]): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Envelope.AsObject; - static toObject(includeInstance: boolean, msg: Envelope): Envelope.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Envelope, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Envelope; - static deserializeBinaryFromReader(message: Envelope, reader: jspb.BinaryReader): Envelope; +export class Envelope extends jspb.Message { + clearSignatoriesList(): void; + getSignatoriesList(): Array; + setSignatoriesList(value: Array): void; + addSignatories(value?: Signatory, index?: number): Signatory; + + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): void; + + getEncoding(): Envelope.EncodingType; + setEncoding(value: Envelope.EncodingType): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Envelope.AsObject; + static toObject(includeInstance: boolean, msg: Envelope): Envelope.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Envelope, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Envelope; + static deserializeBinaryFromReader(message: Envelope, reader: jspb.BinaryReader): Envelope; } export namespace Envelope { - export type AsObject = { - signatoriesList: Array, - tx: Uint8Array | string, - encoding: Envelope.EncodingTypeMap[keyof Envelope.EncodingTypeMap], - } - - export interface EncodingTypeMap { - JSON: 0; - RLP: 1; - } - - export const EncodingType: EncodingTypeMap; + export type AsObject = { + signatoriesList: Array, + tx: Uint8Array | string, + encoding: Envelope.EncodingType, + } + + export enum EncodingType { + JSON = 0, + RLP = 1, + } + } -export class Signatory extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; - - hasPublickey(): boolean; - clearPublickey(): void; - getPublickey(): crypto_pb.PublicKey | undefined; - setPublickey(value?: crypto_pb.PublicKey): void; - - hasSignature(): boolean; - clearSignature(): void; - getSignature(): crypto_pb.Signature | undefined; - setSignature(value?: crypto_pb.Signature): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Signatory.AsObject; - static toObject(includeInstance: boolean, msg: Signatory): Signatory.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Signatory, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Signatory; - static deserializeBinaryFromReader(message: Signatory, reader: jspb.BinaryReader): Signatory; +export class Signatory extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + + hasPublickey(): boolean; + clearPublickey(): void; + getPublickey(): crypto_pb.PublicKey | undefined; + setPublickey(value?: crypto_pb.PublicKey): void; + + + hasSignature(): boolean; + clearSignature(): void; + getSignature(): crypto_pb.Signature | undefined; + setSignature(value?: crypto_pb.Signature): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Signatory.AsObject; + static toObject(includeInstance: boolean, msg: Signatory): Signatory.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Signatory, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Signatory; + static deserializeBinaryFromReader(message: Signatory, reader: jspb.BinaryReader): Signatory; } export namespace Signatory { - export type AsObject = { - address: Uint8Array | string, - publickey?: crypto_pb.PublicKey.AsObject, - signature?: crypto_pb.Signature.AsObject, - } + export type AsObject = { + address: Uint8Array | string, + publickey?: crypto_pb.PublicKey.AsObject, + signature?: crypto_pb.Signature.AsObject, + } } -export class Receipt extends jspb.Message { - getTxtype(): number; - setTxtype(value: number): void; - - getTxhash(): Uint8Array | string; - getTxhash_asU8(): Uint8Array; - getTxhash_asB64(): string; - setTxhash(value: Uint8Array | string): void; - - getCreatescontract(): boolean; - setCreatescontract(value: boolean): void; - - getContractaddress(): Uint8Array | string; - getContractaddress_asU8(): Uint8Array; - getContractaddress_asB64(): string; - setContractaddress(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Receipt.AsObject; - static toObject(includeInstance: boolean, msg: Receipt): Receipt.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Receipt, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Receipt; - static deserializeBinaryFromReader(message: Receipt, reader: jspb.BinaryReader): Receipt; +export class Receipt extends jspb.Message { + getTxtype(): number; + setTxtype(value: number): void; + + getTxhash(): Uint8Array | string; + getTxhash_asU8(): Uint8Array; + getTxhash_asB64(): string; + setTxhash(value: Uint8Array | string): void; + + getCreatescontract(): boolean; + setCreatescontract(value: boolean): void; + + getContractaddress(): Uint8Array | string; + getContractaddress_asU8(): Uint8Array; + getContractaddress_asB64(): string; + setContractaddress(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Receipt.AsObject; + static toObject(includeInstance: boolean, msg: Receipt): Receipt.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Receipt, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Receipt; + static deserializeBinaryFromReader(message: Receipt, reader: jspb.BinaryReader): Receipt; } export namespace Receipt { - export type AsObject = { - txtype: number, - txhash: Uint8Array | string, - createscontract: boolean, - contractaddress: Uint8Array | string, - } + export type AsObject = { + txtype: number, + txhash: Uint8Array | string, + createscontract: boolean, + contractaddress: Uint8Array | string, + } } - diff --git a/js/proto/txs_pb.js b/js/proto/txs_pb.js index 56ef46833..0c20d7b21 100644 --- a/js/proto/txs_pb.js +++ b/js/proto/txs_pb.js @@ -1,4 +1,3 @@ -// source: txs.proto /** * @fileoverview * @enhanceable @@ -20,6 +19,7 @@ goog.exportSymbol('proto.txs.Envelope', null, global); goog.exportSymbol('proto.txs.Envelope.EncodingType', null, global); goog.exportSymbol('proto.txs.Receipt', null, global); goog.exportSymbol('proto.txs.Signatory', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -35,55 +35,8 @@ proto.txs.Envelope = function(opt_data) { }; goog.inherits(proto.txs.Envelope, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.txs.Envelope.displayName = 'proto.txs.Envelope'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.txs.Signatory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.txs.Signatory, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.txs.Signatory.displayName = 'proto.txs.Signatory'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.txs.Receipt = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.txs.Receipt, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.txs.Receipt.displayName = 'proto.txs.Receipt'; -} - /** * List of repeated fields within this message type. * @private {!Array} @@ -95,15 +48,13 @@ proto.txs.Envelope.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.txs.Envelope.prototype.toObject = function(opt_includeInstance) { @@ -113,8 +64,8 @@ proto.txs.Envelope.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.txs.Envelope} msg The msg instance to transform. * @return {!Object} @@ -247,12 +198,9 @@ proto.txs.Envelope.prototype.getSignatoriesList = function() { }; -/** - * @param {!Array} value - * @return {!proto.txs.Envelope} returns this -*/ +/** @param {!Array} value */ proto.txs.Envelope.prototype.setSignatoriesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -266,12 +214,8 @@ proto.txs.Envelope.prototype.addSignatories = function(opt_value, opt_index) { }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.txs.Envelope} returns this - */ proto.txs.Envelope.prototype.clearSignatoriesList = function() { - return this.setSignatoriesList([]); + this.setSignatoriesList([]); }; @@ -308,12 +252,9 @@ proto.txs.Envelope.prototype.getTx_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.txs.Envelope} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.txs.Envelope.prototype.setTx = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -326,29 +267,41 @@ proto.txs.Envelope.prototype.getEncoding = function() { }; -/** - * @param {!proto.txs.Envelope.EncodingType} value - * @return {!proto.txs.Envelope} returns this - */ +/** @param {!proto.txs.Envelope.EncodingType} value */ proto.txs.Envelope.prototype.setEncoding = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); + jspb.Message.setProto3EnumField(this, 3, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.txs.Signatory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.txs.Signatory, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.txs.Signatory.displayName = 'proto.txs.Signatory'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.txs.Signatory.prototype.toObject = function(opt_includeInstance) { @@ -358,8 +311,8 @@ proto.txs.Signatory.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.txs.Signatory} msg The msg instance to transform. * @return {!Object} @@ -508,12 +461,9 @@ proto.txs.Signatory.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.txs.Signatory} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.txs.Signatory.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -527,21 +477,14 @@ proto.txs.Signatory.prototype.getPublickey = function() { }; -/** - * @param {?proto.crypto.PublicKey|undefined} value - * @return {!proto.txs.Signatory} returns this -*/ +/** @param {?proto.crypto.PublicKey|undefined} value */ proto.txs.Signatory.prototype.setPublickey = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.txs.Signatory} returns this - */ proto.txs.Signatory.prototype.clearPublickey = function() { - return this.setPublickey(undefined); + this.setPublickey(undefined); }; @@ -564,21 +507,14 @@ proto.txs.Signatory.prototype.getSignature = function() { }; -/** - * @param {?proto.crypto.Signature|undefined} value - * @return {!proto.txs.Signatory} returns this -*/ +/** @param {?proto.crypto.Signature|undefined} value */ proto.txs.Signatory.prototype.setSignature = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + jspb.Message.setWrapperField(this, 4, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.txs.Signatory} returns this - */ proto.txs.Signatory.prototype.clearSignature = function() { - return this.setSignature(undefined); + this.setSignature(undefined); }; @@ -592,19 +528,34 @@ proto.txs.Signatory.prototype.hasSignature = function() { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.txs.Receipt = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.txs.Receipt, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.txs.Receipt.displayName = 'proto.txs.Receipt'; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.txs.Receipt.prototype.toObject = function(opt_includeInstance) { @@ -614,8 +565,8 @@ proto.txs.Receipt.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.txs.Receipt} msg The msg instance to transform. * @return {!Object} @@ -625,7 +576,7 @@ proto.txs.Receipt.toObject = function(includeInstance, msg) { var f, obj = { txtype: jspb.Message.getFieldWithDefault(msg, 1, 0), txhash: msg.getTxhash_asB64(), - createscontract: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + createscontract: jspb.Message.getFieldWithDefault(msg, 3, false), contractaddress: msg.getContractaddress_asB64() }; @@ -748,12 +699,9 @@ proto.txs.Receipt.prototype.getTxtype = function() { }; -/** - * @param {number} value - * @return {!proto.txs.Receipt} returns this - */ +/** @param {number} value */ proto.txs.Receipt.prototype.setTxtype = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3IntField(this, 1, value); }; @@ -790,30 +738,26 @@ proto.txs.Receipt.prototype.getTxhash_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.txs.Receipt} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.txs.Receipt.prototype.setTxhash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); + jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional bool CreatesContract = 3; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.txs.Receipt.prototype.getCreatescontract = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); }; -/** - * @param {boolean} value - * @return {!proto.txs.Receipt} returns this - */ +/** @param {boolean} value */ proto.txs.Receipt.prototype.setCreatescontract = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); + jspb.Message.setProto3BooleanField(this, 3, value); }; @@ -850,12 +794,9 @@ proto.txs.Receipt.prototype.getContractaddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.txs.Receipt} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.txs.Receipt.prototype.setContractaddress = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); + jspb.Message.setProto3BytesField(this, 4, value); }; diff --git a/js/proto/validator_grpc_pb.d.ts b/js/proto/validator_grpc_pb.d.ts deleted file mode 100644 index 51b4d6959..000000000 --- a/js/proto/validator_grpc_pb.d.ts +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/js/proto/validator_pb.d.ts b/js/proto/validator_pb.d.ts index ac9da6810..8c6fd1343 100644 --- a/js/proto/validator_pb.d.ts +++ b/js/proto/validator_pb.d.ts @@ -1,39 +1,43 @@ // package: validator // file: validator.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; import * as crypto_pb from "./crypto_pb"; -export class Validator extends jspb.Message { - getAddress(): Uint8Array | string; - getAddress_asU8(): Uint8Array; - getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; - - hasPublickey(): boolean; - clearPublickey(): void; - getPublickey(): crypto_pb.PublicKey | undefined; - setPublickey(value?: crypto_pb.PublicKey): void; - - getPower(): number; - setPower(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Validator.AsObject; - static toObject(includeInstance: boolean, msg: Validator): Validator.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Validator, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Validator; - static deserializeBinaryFromReader(message: Validator, reader: jspb.BinaryReader): Validator; +export class Validator extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + + hasPublickey(): boolean; + clearPublickey(): void; + getPublickey(): crypto_pb.PublicKey | undefined; + setPublickey(value?: crypto_pb.PublicKey): void; + + getPower(): number; + setPower(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Validator.AsObject; + static toObject(includeInstance: boolean, msg: Validator): Validator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Validator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Validator; + static deserializeBinaryFromReader(message: Validator, reader: jspb.BinaryReader): Validator; } export namespace Validator { - export type AsObject = { - address: Uint8Array | string, - publickey?: crypto_pb.PublicKey.AsObject, - power: number, - } + export type AsObject = { + address: Uint8Array | string, + publickey?: crypto_pb.PublicKey.AsObject, + power: number, + } } - diff --git a/js/proto/validator_pb.js b/js/proto/validator_pb.js index 443a6da4c..90382775a 100644 --- a/js/proto/validator_pb.js +++ b/js/proto/validator_pb.js @@ -1,4 +1,3 @@ -// source: validator.proto /** * @fileoverview * @enhanceable @@ -17,6 +16,7 @@ goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); var crypto_pb = require('./crypto_pb.js'); goog.object.extend(proto, crypto_pb); goog.exportSymbol('proto.validator.Validator', null, global); + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -32,26 +32,19 @@ proto.validator.Validator = function(opt_data) { }; goog.inherits(proto.validator.Validator, jspb.Message); if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ proto.validator.Validator.displayName = 'proto.validator.Validator'; } - if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.validator.Validator.prototype.toObject = function(opt_includeInstance) { @@ -61,8 +54,8 @@ proto.validator.Validator.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.validator.Validator} msg The msg instance to transform. * @return {!Object} @@ -209,12 +202,9 @@ proto.validator.Validator.prototype.getAddress_asU8 = function() { }; -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.validator.Validator} returns this - */ +/** @param {!(string|Uint8Array)} value */ proto.validator.Validator.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + jspb.Message.setProto3BytesField(this, 1, value); }; @@ -228,21 +218,14 @@ proto.validator.Validator.prototype.getPublickey = function() { }; -/** - * @param {?proto.crypto.PublicKey|undefined} value - * @return {!proto.validator.Validator} returns this -*/ +/** @param {?proto.crypto.PublicKey|undefined} value */ proto.validator.Validator.prototype.setPublickey = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + jspb.Message.setWrapperField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.validator.Validator} returns this - */ proto.validator.Validator.prototype.clearPublickey = function() { - return this.setPublickey(undefined); + this.setPublickey(undefined); }; @@ -264,12 +247,9 @@ proto.validator.Validator.prototype.getPower = function() { }; -/** - * @param {number} value - * @return {!proto.validator.Validator} returns this - */ +/** @param {number} value */ proto.validator.Validator.prototype.setPower = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3IntField(this, 3, value); }; From a3929b4adc69a6062a841bc18a47e201d81016a2 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Sat, 16 May 2020 18:48:58 +0100 Subject: [PATCH 111/185] solc no longer generates these fields in the abi Signed-off-by: Sean Young --- execution/evm/abi/spec.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/execution/evm/abi/spec.go b/execution/evm/abi/spec.go index 5b4d79a66..33c44ee0e 100644 --- a/execution/evm/abi/spec.go +++ b/execution/evm/abi/spec.go @@ -27,8 +27,6 @@ type specJSON struct { Type string Inputs []argumentJSON Outputs []argumentJSON - Constant bool - Payable bool StateMutability string Anonymous bool } From cf68b271785b75eb60bd343a4c3469d7db475853 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Fri, 5 Jun 2020 16:36:46 +0100 Subject: [PATCH 112/185] Add some missing ewasm functions Signed-off-by: Sean Young --- execution/contexts/call_context.go | 21 ++--- execution/wasm/storage_test.solang.go | 4 +- execution/wasm/wasm.go | 112 ++++++++++++++++++++++---- execution/wasm/wasm_test.go | 26 +++++- 4 files changed, 133 insertions(+), 30 deletions(-) diff --git a/execution/contexts/call_context.go b/execution/contexts/call_context.go index 693653ffa..178c92753 100644 --- a/execution/contexts/call_context.go +++ b/execution/contexts/call_context.go @@ -185,8 +185,18 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error var err error txHash := ctx.txe.Envelope.Tx.Hash() gas := ctx.tx.GasLimit + + params := engine.CallParams{ + Origin: caller, + Caller: caller, + Callee: callee, + Input: ctx.tx.Data, + Value: value, + Gas: &gas, + } + if len(wcode) != 0 { - ret, err = wasm.RunWASM(txCache, callee, createContract, wcode, ctx.tx.Data) + ret, err = wasm.RunWASM(txCache, params, wcode) if err != nil { // Failure. Charge the gas fee. The 'value' was otherwise not transferred. ctx.Logger.InfoMsg("Error on WASM execution", @@ -211,15 +221,6 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error ctx.EVM.SetNonce(txHash) ctx.EVM.SetLogger(ctx.Logger.With(structure.TxHashKey, txHash)) - params := engine.CallParams{ - Origin: caller, - Caller: caller, - Callee: callee, - Input: ctx.tx.Data, - Value: value, - Gas: &gas, - } - ret, err = ctx.EVM.Execute(txCache, ctx.Blockchain, ctx.txe, params, code) if err != nil { diff --git a/execution/wasm/storage_test.solang.go b/execution/wasm/storage_test.solang.go index a40fcff43..c5514373e 100644 --- a/execution/wasm/storage_test.solang.go +++ b/execution/wasm/storage_test.solang.go @@ -2,5 +2,5 @@ package wasm import hex "github.com/tmthrgd/go-hex" -var Bytecode_storage_test = hex.MustDecodeString("0061736D01000000013A0B60037F7E7F0060037F7F7F0060027F7F0060000060017F0060017F017F60027F7F017F60047F7F7F7F0060047F7E7E7F006000017E6000017F029B010708657468657265756D06726576657274000208657468657265756D0B73746F726167654C6F6164000208657468657265756D0C73746F7261676553746F7265000208657468657265756D0F67657443616C6C4461746153697A65000A08657468657265756D0C63616C6C44617461436F7079000108657468657265756D0666696E697368000208657468657265756D066D656D6F7279020102020316150001020203040506010101010708080409030303030608017F01418080040B070801046D61696E001A0ACA0E151C00034020002001370300200041086A21002002417F6A22020D000B0B2600034020002001290300370300200041086A2100200141086A21012002417F6A22020D000B0B1C00034020004200370300200041086A21002001417F6A22010D000B0B1C0003402000427F370300200041086A21002001417F6A22010D000B0B2B00410041003602808004410041003602848004410041003A008C800441003F0041F0FF7B6A36028880040BAD0101037F024002402000450D00410021012000417C6A41003A00000240200041706A22022802002203450D00024020032D000C450D00200321010C010B20022003280200220136020002402001450D00200120023602040B200041786A2202200328020820022802006A41106A3602000B200041746A2802002203450D0020032D000C450D010B0F0B20012003360204200320013602002003200041786A28020020032802086A41106A3602080BA90101047F41808004210102400340024020012D000C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A360208200041003A000C2000200136020420012000360200200141086A20033602000B200141013A000C200141106A0BF50101057F024002400240200041706A22022802002203450D0020032D000C0D00200041786A220428020020032802086A41106A220520014F0D010B41002103410020014103766B21022001100C21010340200120036A200020036A290300370300200341086A2103200241016A22020D000B2000100B200121000C010B20042005360200200328020022032002360204200220033602002005200141076A41787122066B22054118490D00200020066A2201200336020002402003450D00200341046A20013602000B2001200541706A360208200141003A000C20012002360204200220013602002004200636020020000F0B20000B2D002000411F6A21000340200120002D00003A0000200141016A21012000417F6A21002002417F6A22020D000B0B29002000417F6A210003402001200020026A2D00003A0000200141016A21012002417F6A22020D000B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0B29002001417F6A21010340200120026A20002D00003A0000200041016A21002002417F6A22020D000B0BE80204077F017E037F027E200020034102746A417C6A21042003210502400340200522064101480D012006417F6A2105200428020021072004417C6A21042007450D000B0B200120034102746A417C6A21042003210502400340200522084101480D012008417F6A2105200428020021072004417C6A21042007450D000B0B024020034101480D002001417C6A21094100210A4200210B4100210C41002105410021010340200A20084E210D024002402005200520084822076A220E2001200A20064E6A22014D0D002000200C200D6A4102746A21042009200520076A4102746A21054200210F200E21070340200F4280808080107C200F200B200535020020043502007E7C2210200B541B210F200441046A21042005417C6A21052010210B2007417F6A220720014A0D000C020B0B4200210F200B21100B200C200D6A210C2002200A4102746A20103E02002010422088200F84210B200E2105200A41016A220A2003470D000B0B0B5201017E02402003450D000240200341C000710D00200141C00020036BAD8820022003AD220486842102200120048621010C010B20012003413F71AD862102420021010B20002002370308200020013703000B5201017E02402003450D000240200341C000710D00200241C00020036BAD8620012003AD220488842101200220048821020C010B20022003413F71AD882101420021020B20002002370308200020013703000B150002402000410171450D000F0B410041001000000B5102017F017E230041D0006B22002400200041386A4200370300200042003703302000420037032820004200370320200041206A20001001200020002903002201370340200041D0006A2400200142027C0B9D0102017F017E23004190016B22002400200041E0006A41186A4200370300200042003703702000420037036820004200370360200041E0006A200041C0006A1001200041206A41186A4200370300200042003703302000420037032820004200370320200020002903402201370380012000200142017C370388012000410410082000200029038801370300200041206A2000100220004190016A24000B5D01017F230041D0006B22002400200041C0006A4200370300200042003703382000420037033020004200370328200042E600370348200041086A4104100820002000290348370308200041286A200041086A1002200041D0006A24000B02000B2501017F100A10032200100C4100200010041019024020000D001018410041BA1110050B000B0BC111010041000BBA110061736D01000000013A0B60037F7E7F0060037F7F7F0060027F7F0060000060017F0060017F017F60027F7F017F60047F7F7F7F0060047F7E7E7F006000017E6000017F029B010708657468657265756D06726576657274000208657468657265756D0B73746F726167654C6F6164000208657468657265756D0C73746F7261676553746F7265000208657468657265756D0F67657443616C6C4461746153697A65000A08657468657265756D0C63616C6C44617461436F7079000108657468657265756D0666696E697368000208657468657265756D066D656D6F72790201020203151400010202030405060101010107080804090303030608017F01418080040B070801046D61696E00190AAA0F141C00034020002001370300200041086A21002002417F6A22020D000B0B2600034020002001290300370300200041086A2100200141086A21012002417F6A22020D000B0B1C00034020004200370300200041086A21002001417F6A22010D000B0B1C0003402000427F370300200041086A21002001417F6A22010D000B0B2B00410041003602808004410041003602848004410041003A008C800441003F0041F0FF7B6A36028880040BAD0101037F024002402000450D00410021012000417C6A41003A00000240200041706A22022802002203450D00024020032D000C450D00200321010C010B20022003280200220136020002402001450D00200120023602040B200041786A2202200328020820022802006A41106A3602000B200041746A2802002203450D0020032D000C450D010B0F0B20012003360204200320013602002003200041786A28020020032802086A41106A3602080BA90101047F41808004210102400340024020012D000C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A360208200041003A000C2000200136020420012000360200200141086A20033602000B200141013A000C200141106A0BF50101057F024002400240200041706A22022802002203450D0020032D000C0D00200041786A220428020020032802086A41106A220520014F0D010B41002103410020014103766B21022001100C21010340200120036A200020036A290300370300200341086A2103200241016A22020D000B2000100B200121000C010B20042005360200200328020022032002360204200220033602002005200141076A41787122066B22054118490D00200020066A2201200336020002402003450D00200341046A20013602000B2001200541706A360208200141003A000C20012002360204200220013602002004200636020020000F0B20000B2D002000411F6A21000340200120002D00003A0000200141016A21012000417F6A21002002417F6A22020D000B0B29002000417F6A210003402001200020026A2D00003A0000200141016A21012002417F6A22020D000B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0B29002001417F6A21010340200120026A20002D00003A0000200041016A21002002417F6A22020D000B0BE80204077F017E037F027E200020034102746A417C6A21042003210502400340200522064101480D012006417F6A2105200428020021072004417C6A21042007450D000B0B200120034102746A417C6A21042003210502400340200522084101480D012008417F6A2105200428020021072004417C6A21042007450D000B0B024020034101480D002001417C6A21094100210A4200210B4100210C41002105410021010340200A20084E210D024002402005200520084822076A220E2001200A20064E6A22014D0D002000200C200D6A4102746A21042009200520076A4102746A21054200210F200E21070340200F4280808080107C200F200B200535020020043502007E7C2210200B541B210F200441046A21042005417C6A21052010210B2007417F6A220720014A0D000C020B0B4200210F200B21100B200C200D6A210C2002200A4102746A20103E02002010422088200F84210B200E2105200A41016A220A2003470D000B0B0B5201017E02402003450D000240200341C000710D00200141C00020036BAD8820022003AD220486842102200120048621010C010B20012003413F71AD862102420021010B20002002370308200020013703000B5201017E02402003450D000240200341C000710D00200241C00020036BAD8620012003AD220488842101200220048821020C010B20022003413F71AD882101420021020B20002002370308200020013703000B150002402000410171450D000F0B410041001000000B5102017F017E230041D0006B22002400200041386A4200370300200042003703302000420037032820004200370320200041206A20001001200020002903002201370340200041D0006A2400200142027C0B9D0102017F017E23004190016B22002400200041E0006A41186A4200370300200042003703702000420037036820004200370360200041E0006A200041C0006A1001200041206A41186A4200370300200042003703302000420037032820004200370320200020002903402201370380012000200142017C370388012000410410082000200029038801370300200041206A2000100220004190016A24000B5D01017F230041D0006B22002400200041C0006A4200370300200042003703382000420037033020004200370328200042E600370348200041086A4104100820002000290348370308200041286A200041086A1002200041D0006A24000B870102047F017E230022002101100A10032202100C22034100200210040240200241034D0D002002417C6A21020240200328020041DE9AB88F79470D0020020D011017410041001005200124000F0B20020D00101621044120100C2202420041041006200041706A22032400200320043703002003200241081010200241201005200124000F0B000B") -var Abi_storage_test = []byte(`[{"name":"","type":"constructor","inputs":[],"outputs":[],"constant":false,"payable":false,"stateMutability":"nonpayable"},{"name":"getFooPlus2","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"constant":true,"payable":false,"stateMutability":"view"},{"name":"incFoo","type":"function","inputs":[],"outputs":[],"constant":false,"payable":false,"stateMutability":"nonpayable"}]`) +var Bytecode_storage_test = hex.MustDecodeString("0061736D0100000001230760027F7F0060000060017F017F60047F7E7E7F006000017F60017F0060037F7F7F000294010708657468657265756D0C73746F7261676553746F7265000008657468657265756D0C67657443616C6C56616C7565000508657468657265756D06726576657274000008657468657265756D0B676574436F646553697A65000408657468657265756D08636F6465436F7079000608657468657265756D0666696E697368000008657468657265756D066D656D6F727902010202030807000102030304010608017F01418080040B070801046D61696E000C0AB704071C00034020004200370300200041086A21002001417F6A22010D000B0B2B00410041003602808004410041003602848004410041003A008C800441003F0041F0FF7B6A36028880040BA90101047F41808004210102400340024020012D000C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A360208200041003A000C2000200136020420012000360200200141086A20033602000B200141013A000C200141106A0B5201017E02402003450D000240200341C000710D00200141C00020036BAD8820022003AD220486842102200120048621010C010B20012003413F71AD862102420021010B20002002370308200020013703000B5201017E02402003450D000240200341C000710D00200241C00020036BAD8620012003AD220488842101200220048821020C010B20022003413F71AD882101420021020B20002002370308200020013703000B4E01017F230041C0006B22002400200041386A4200370300200042003703302000420037032820004200370320200041041006200042E600370300200041206A20001000200041C0006A240041000B4C01017F230041106B220024002000100102402000290300200041086A290300844200510D00410041001002000B10071003419E716A2200100841E20E20001004100B1A410041BC081005000B0BC308010041000BBC080061736D0100000001230760027F7F0060000060017F017F60037F7F7F0060047F7E7E7F0060017F006000017F02B3010808657468657265756D0C67657443616C6C56616C7565000508657468657265756D06726576657274000008657468657265756D0F67657443616C6C4461746153697A65000608657468657265756D0C63616C6C44617461436F7079000308657468657265756D0B73746F726167654C6F6164000008657468657265756D0666696E697368000008657468657265756D0C73746F7261676553746F7265000008657468657265756D066D656D6F727902010202030807000102030404010608017F01418080040B070801046D61696E000D0AB806071C00034020004200370300200041086A21002001417F6A22010D000B0B2B00410041003602808004410041003602848004410041003A008C800441003F0041F0FF7B6A36028880040BA90101047F41808004210102400340024020012D000C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A360208200041003A000C2000200136020420012000360200200141086A20033602000B200141013A000C200141106A0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0B5201017E02402003450D000240200341C000710D00200141C00020036BAD8820022003AD220486842102200120048621010C010B20012003413F71AD862102420021010B20002002370308200020013703000B5201017E02402003450D000240200341C000710D00200241C00020036BAD8620012003AD220488842101200220048821020C010B20022003413F71AD882101420021020B20002002370308200020013703000BED0202047F017E23004190016B2200240020002201100002402001290300200141086A290300844200510D00410041001001000B100810022202100922034100200210030240024002400240200241034D0D002003280200220241DE9AB88F79460D01200241A298B6BE01470D00200041706A2200240020014188016A420037030020014200370380012001420037037820014200370370200141F0006A200141D0006A10042000200129035042027C37030041000D0241201009220141041007200020014108100A200141201005000B410041001001000B200141F0006A41186A420037030020014200370380012001420037037820014200370370200141F0006A200141D0006A1004200141306A41186A420037030020014200370340200142003703382001420037033020012903502104200141106A410410072001200442017C370310200141306A200141106A100641000D01410041001005000B410041001001000B410041001001000B") +var Abi_storage_test = []byte(`[{"type":"constructor","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"getFooPlus2","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"name":"incFoo","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"}]`) diff --git a/execution/wasm/wasm.go b/execution/wasm/wasm.go index 0220e50b6..2720d6123 100644 --- a/execution/wasm/wasm.go +++ b/execution/wasm/wasm.go @@ -1,27 +1,30 @@ package wasm import ( + "encoding/binary" "fmt" "github.com/hyperledger/burrow/acm/acmstate" burrow_binary "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" "github.com/perlin-network/life/exec" ) type execContext struct { errors.Maybe - address crypto.Address - input []byte - output []byte - state acmstate.ReaderWriter + code []byte + output []byte + returnData []byte + params engine.CallParams + state acmstate.ReaderWriter } // Implements ewasm, see https://github.com/ewasm/design // RunWASM creates a WASM VM, and executes the given WASM contract code -func RunWASM(state acmstate.ReaderWriter, address crypto.Address, createContract bool, wasm, input []byte) (output []byte, cerr error) { +func RunWASM(state acmstate.ReaderWriter, params engine.CallParams, wasm []byte) (output []byte, cerr error) { const errHeader = "ewasm" defer func() { if r := recover(); r != nil { @@ -32,14 +35,14 @@ func RunWASM(state acmstate.ReaderWriter, address crypto.Address, createContract // WASM config := exec.VMConfig{ DisableFloatingPoint: true, - MaxMemoryPages: 2, - DefaultMemoryPages: 2, + MaxMemoryPages: 16, + DefaultMemoryPages: 16, } execContext := execContext{ - address: address, - state: state, - input: input, + params: params, + code: wasm, + state: state, } // panics in ResolveFunc() will be recovered for us, no need for our own @@ -72,7 +75,7 @@ func (e *execContext) ResolveFunc(module, field string) exec.FunctionImport { switch field { case "getCallDataSize": return func(vm *exec.VirtualMachine) int64 { - return int64(len(e.input)) + return int64(len(e.params.Input)) } case "callDataCopy": @@ -82,7 +85,43 @@ func (e *execContext) ResolveFunc(module, field string) exec.FunctionImport { dataLen := int(uint32(vm.GetCurrentFrame().Locals[2])) if dataLen > 0 { - copy(vm.Memory[destPtr:], e.input[dataOffset:dataOffset+dataLen]) + copy(vm.Memory[destPtr:], e.params.Input[dataOffset:dataOffset+dataLen]) + } + + return 0 + } + + case "getReturnDataSize": + return func(vm *exec.VirtualMachine) int64 { + return int64(len(e.returnData)) + } + + case "returnDataCopy": + return func(vm *exec.VirtualMachine) int64 { + destPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataOffset := int(uint32(vm.GetCurrentFrame().Locals[1])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[2])) + + if dataLen > 0 { + copy(vm.Memory[destPtr:], e.returnData[dataOffset:dataOffset+dataLen]) + } + + return 0 + } + + case "getCodeSize": + return func(vm *exec.VirtualMachine) int64 { + return int64(len(e.code)) + } + + case "codeCopy": + return func(vm *exec.VirtualMachine) int64 { + destPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataOffset := int(uint32(vm.GetCurrentFrame().Locals[1])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[2])) + + if dataLen > 0 { + copy(vm.Memory[destPtr:], e.code[dataOffset:dataOffset+dataLen]) } return 0 @@ -97,7 +136,7 @@ func (e *execContext) ResolveFunc(module, field string) exec.FunctionImport { copy(key[:], vm.Memory[keyPtr:keyPtr+32]) - e.Void(e.state.SetStorage(e.address, key, vm.Memory[dataPtr:dataPtr+32])) + e.Void(e.state.SetStorage(e.params.Callee, key, vm.Memory[dataPtr:dataPtr+32])) return 0 } @@ -111,7 +150,7 @@ func (e *execContext) ResolveFunc(module, field string) exec.FunctionImport { copy(key[:], vm.Memory[keyPtr:keyPtr+32]) - val := e.Bytes(e.state.GetStorage(e.address, key)) + val := e.Bytes(e.state.GetStorage(e.params.Callee, key)) copy(vm.Memory[dataPtr:], val) return 0 @@ -138,6 +177,51 @@ func (e *execContext) ResolveFunc(module, field string) exec.FunctionImport { panic(errors.Codes.ExecutionReverted) } + case "getAddress": + return func(vm *exec.VirtualMachine) int64 { + addressPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + + copy(vm.Memory[addressPtr:], e.params.Callee.Bytes()) + + return 0 + } + + case "getCallValue": + return func(vm *exec.VirtualMachine) int64 { + + valuePtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + + // ewasm value is little endian 128 bit value + bs := make([]byte, 16) + binary.LittleEndian.PutUint64(bs, e.params.Value) + + copy(vm.Memory[valuePtr:], bs) + + return 0 + } + + case "getExternalBalance": + return func(vm *exec.VirtualMachine) int64 { + addressPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + balancePtr := int(uint32(vm.GetCurrentFrame().Locals[1])) + + address := crypto.Address{} + + copy(address[:], vm.Memory[addressPtr:addressPtr+crypto.AddressLength]) + acc, err := e.state.GetAccount(address) + if err != nil { + panic(errors.Codes.InvalidAddress) + } + + // ewasm value is little endian 128 bit value + bs := make([]byte, 16) + binary.LittleEndian.PutUint64(bs, acc.Balance) + + copy(vm.Memory[balancePtr:], bs) + + return 0 + } + default: panic(fmt.Sprintf("unknown function %s", field)) } diff --git a/execution/wasm/wasm_test.go b/execution/wasm/wasm_test.go index a39620b78..ff9ac1744 100644 --- a/execution/wasm/wasm_test.go +++ b/execution/wasm/wasm_test.go @@ -6,6 +6,7 @@ import ( "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/crypto" @@ -15,8 +16,19 @@ import ( func TestStaticCallWithValue(t *testing.T) { cache := acmstate.NewMemoryState() + gas := uint64(0) + + params := engine.CallParams{ + Origin: crypto.ZeroAddress, + Caller: crypto.ZeroAddress, + Callee: crypto.ZeroAddress, + Input: []byte{}, + Value: 0, + Gas: &gas, + } + // run constructor - runtime, cerr := RunWASM(cache, crypto.ZeroAddress, true, Bytecode_storage_test, []byte{}) + runtime, cerr := RunWASM(cache, params, Bytecode_storage_test) require.NoError(t, cerr) // run getFooPlus2 @@ -24,7 +36,9 @@ func TestStaticCallWithValue(t *testing.T) { require.NoError(t, err) calldata, _, err := spec.Pack("getFooPlus2") - returndata, cerr := RunWASM(cache, crypto.ZeroAddress, false, runtime, calldata) + params.Input = calldata + + returndata, cerr := RunWASM(cache, params, runtime) require.NoError(t, cerr) data := abi.GetPackingTypes(spec.Functions["getFooPlus2"].Outputs) @@ -39,7 +53,9 @@ func TestStaticCallWithValue(t *testing.T) { // call incFoo calldata, _, err = spec.Pack("incFoo") - returndata, cerr = RunWASM(cache, crypto.ZeroAddress, false, runtime, calldata) + params.Input = calldata + + returndata, cerr = RunWASM(cache, params, runtime) require.NoError(t, cerr) require.Equal(t, returndata, []byte{}) @@ -48,7 +64,9 @@ func TestStaticCallWithValue(t *testing.T) { calldata, _, err = spec.Pack("getFooPlus2") require.NoError(t, err) - returndata, cerr = RunWASM(cache, crypto.ZeroAddress, false, runtime, calldata) + params.Input = calldata + + returndata, cerr = RunWASM(cache, params, runtime) require.NoError(t, cerr) spec.Unpack(returndata, "getFooPlus2", data...) From 53b7fa6f1cdbdcfd9864d0dc92e413977acdd1e4 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 9 Jul 2020 13:01:09 +0100 Subject: [PATCH 113/185] [Vent] Add BytesToHex flag to byte32 fields to hex string columns Use varchar(64) instead of bytea/blob since easier to work with and used most places Signed-off-by: Silas Davis --- CHANGELOG.md | 8 +++++++- NOTES.md | 6 +----- docker-compose.yml | 2 -- project/history.go | 7 ++++++- vent/service/consumer_postgres_test.go | 5 +++-- vent/service/rowbuilder.go | 10 ++++++---- vent/sqlsol/projection.go | 27 +++++++++++++++++++++----- vent/test/sqlsol.go | 2 +- vent/test/sqlsol_log.json | 1 + vent/test/sqlsol_view.json | 1 + vent/types/event_class.go | 2 ++ 11 files changed, 50 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c92a0f7b..2579add06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,13 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.30.5] - 2020-07-09 +### Added +- [Vent] Add BytesToHex flag on projection field mappings that causes bytes fields (e.g. bytes32) solidity fields to be hex-encoded and mapped to varchar(64) rather than bytea/blob columns in postgres/sqlite + + ## [0.30.4] - 2020-04-05 ### Added - [Build] Added Helm chart -- [State] Account now has OpcodeBitset field to support upcoming EVM fixes +- [State] Account now has EVMOpcodeBitset field to support upcoming EVM fixes ### Fixed - [JS] Github actions release of JS lib @@ -661,6 +666,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.30.5]: https://github.com/hyperledger/burrow/compare/v0.30.4...v0.30.5 [0.30.4]: https://github.com/hyperledger/burrow/compare/v0.30.3...v0.30.4 [0.30.3]: https://github.com/hyperledger/burrow/compare/v0.30.2...v0.30.3 [0.30.2]: https://github.com/hyperledger/burrow/compare/v0.30.1...v0.30.2 diff --git a/NOTES.md b/NOTES.md index 90ef71c8b..5d3b8f732 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,7 +1,3 @@ ### Added -- [Build] Added Helm chart -- [State] Account now has OpcodeBitset field to support upcoming EVM fixes - -### Fixed -- [JS] Github actions release of JS lib +- [Vent] Add BytesToHex flag on projection field mappings that causes bytes fields (e.g. bytes32) solidity fields to be hex-encoded and mapped to varchar(64) rather than bytea/blob columns in postgres/sqlite diff --git a/docker-compose.yml b/docker-compose.yml index 28cfdd675..b69cd7c11 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,6 @@ services: - POSTGRES_HOST_AUTH_METHOD=trust ports: - 5432 - environment: - - POSTGRES_HOST_AUTH_METHOD=trust burrow: build: .github diff --git a/project/history.go b/project/history.go index 2d02e4bab..0155b54c0 100644 --- a/project/history.go +++ b/project/history.go @@ -47,7 +47,12 @@ func FullVersion() string { // To cut a new release add a release to the front of this slice then run the // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). - MustDeclareReleases("0.30.4 - 2020-04-05", + MustDeclareReleases( + "0.30.5 - 2020-07-09", + `### Added +- [Vent] Add BytesToHex flag on projection field mappings that causes bytes fields (e.g. bytes32) solidity fields to be hex-encoded and mapped to varchar(64) rather than bytea/blob columns in postgres/sqlite +`, + "0.30.4 - 2020-04-05", `### Added - [Build] Added Helm chart - [State] Account now has EVMOpcodeBitset field to support upcoming EVM fixes diff --git a/vent/service/consumer_postgres_test.go b/vent/service/consumer_postgres_test.go index be81ba870..a929ac752 100644 --- a/vent/service/consumer_postgres_test.go +++ b/vent/service/consumer_postgres_test.go @@ -111,8 +111,9 @@ func TestPostgresConsumer(t *testing.T) { t.Logf("latest height: %d, txe height: %d", height, txe.Height) assert.True(t, height >= txe.Height) } - assert.Equal(t, `{"_action" : "INSERT", "testdescription" : "\\x5472696767657220697421000000000000000000000000000000000000000000", "testname" : "TestTriggerEvent"}`, notifications["meta"]) - assert.Equal(t, `{"_action" : "INSERT", "testdescription" : "\\x5472696767657220697421000000000000000000000000000000000000000000", "testkey" : "\\x544553545f4556454e5453000000000000000000000000000000000000000000", "testname" : "TestTriggerEvent"}`, + assert.Equal(t, `{"_action" : "INSERT", "testdescription" : "5472696767657220697421000000000000000000000000000000000000000000", "testname" : "TestTriggerEvent"}`, + notifications["meta"]) + assert.Equal(t, `{"_action" : "INSERT", "testdescription" : "5472696767657220697421000000000000000000000000000000000000000000", "testkey" : "\\x544553545f4556454e5453000000000000000000000000000000000000000000", "testname" : "TestTriggerEvent"}`, notifications["keyed_meta"]) }) }) diff --git a/vent/service/rowbuilder.go b/vent/service/rowbuilder.go index 5e946beba..d369d4e1e 100644 --- a/vent/service/rowbuilder.go +++ b/vent/service/rowbuilder.go @@ -13,6 +13,7 @@ import ( "github.com/hyperledger/burrow/vent/sqlsol" "github.com/hyperledger/burrow/vent/types" "github.com/pkg/errors" + "github.com/tmthrgd/go-hex" ) // buildEventData builds event data from transactions @@ -50,11 +51,12 @@ func buildEventData(projection *sqlsol.Projection, eventClass *types.EventClass, } column, err := projection.GetColumn(eventClass.TableName, fieldMapping.ColumnName) if err == nil { - if fieldMapping.BytesToString { - if bs, ok := value.(*[]byte); ok { + if bs, ok := value.(*[]byte); ok { + if fieldMapping.BytesToString { str := sanitiseBytesForString(*bs, logger) - row[column.Name] = interface{}(str) - continue + value = interface{}(str) + } else if fieldMapping.BytesToHex { + value = hex.EncodeUpperToString(*bs) } } row[column.Name] = value diff --git a/vent/sqlsol/projection.go b/vent/sqlsol/projection.go index 807eaf0d3..adcb4b90e 100644 --- a/vent/sqlsol/projection.go +++ b/vent/sqlsol/projection.go @@ -120,7 +120,13 @@ func NewProjection(spec types.ProjectionSpec) (*Projection, error) { i := 0 for _, mapping := range eventClass.FieldMappings { - sqlType, sqlTypeLength, err := getSQLType(mapping.Type, mapping.BytesToString) + var bytesMapping BytesMapping + if mapping.BytesToHex { + bytesMapping = BytesToHex + } else if mapping.BytesToString { + bytesMapping = BytesToString + } + sqlType, sqlTypeLength, err := getSQLType(mapping.Type, bytesMapping) if err != nil { return nil, err } @@ -220,9 +226,17 @@ func readFile(file string) ([]byte, error) { return byteValue, nil } +type BytesMapping int + +const ( + BytesToBytes = iota + BytesToString + BytesToHex +) + // getSQLType maps event input types with corresponding SQL column types // takes into account related solidity types info and element indexed or hashed -func getSQLType(evmSignature string, bytesToString bool) (types.SQLColumnType, int, error) { +func getSQLType(evmSignature string, bytesMapping BytesMapping) (types.SQLColumnType, int, error) { evmSignature = strings.ToLower(evmSignature) re := regexp.MustCompile("[0-9]+") typeSize, _ := strconv.Atoi(re.FindString(evmSignature)) @@ -237,9 +251,12 @@ func getSQLType(evmSignature string, bytesToString bool) (types.SQLColumnType, i // solidity bytes => sql bytes // bytesToString == true means there is a string in there so => sql varchar case strings.HasPrefix(evmSignature, types.EventFieldTypeBytes): - if bytesToString { - return types.SQLColumnTypeVarchar, 40, nil - } else { + switch bytesMapping { + case BytesToString: + return types.SQLColumnTypeVarchar, 32, nil + case BytesToHex: + return types.SQLColumnTypeVarchar, 64, nil + default: return types.SQLColumnTypeByteA, 0, nil } // solidity string => sql text diff --git a/vent/test/sqlsol.go b/vent/test/sqlsol.go index 058fa4090..84d112b2b 100644 --- a/vent/test/sqlsol.go +++ b/vent/test/sqlsol.go @@ -109,7 +109,7 @@ func UnknownTypeJSONConfFile(t *testing.T) string { }, "Fields" , "ColumnName" , "ColumnName" : "testname", "Primary" : true}, - "description", "ColumnName" : "testdescription", "Primary" : false} + "description", "ColumnName" : "testdescription", "Primary" : false, "BytesToHex": true} } } ]` diff --git a/vent/test/sqlsol_log.json b/vent/test/sqlsol_log.json index bb11812d9..c2aad97d8 100644 --- a/vent/test/sqlsol_log.json +++ b/vent/test/sqlsol_log.json @@ -23,6 +23,7 @@ "ColumnName": "testdescription", "Type": "bytes32", "Primary": false, + "BytesToHex": true, "Notify": ["meta", "keyed_meta"] } ] diff --git a/vent/test/sqlsol_view.json b/vent/test/sqlsol_view.json index 4f7c94621..480f76c99 100644 --- a/vent/test/sqlsol_view.json +++ b/vent/test/sqlsol_view.json @@ -24,6 +24,7 @@ "ColumnName": "testdescription", "Type": "bytes32", "Primary": false, + "BytesToHex": true, "Notify": ["meta", "keyed_meta"] } ] diff --git a/vent/types/event_class.go b/vent/types/event_class.go index ae28c4b9e..92f3ee814 100644 --- a/vent/types/event_class.go +++ b/vent/types/event_class.go @@ -79,6 +79,8 @@ type EventFieldMapping struct { Primary bool `json:",omitempty"` // Whether to convert this event field from bytes32 to string BytesToString bool `json:",omitempty"` + // Whether to convert this event field from bytes32 to hex-encoded string + BytesToHex bool `json:",omitempty"` // Notification channels on which submit (via a trigger) a payload that contains this column's new value (upsert) or // old value (delete). The payload will contain all other values with the same channel set as a JSON object. Notify []string `json:",omitempty"` From 6f5e95cb4682ac7dbc9451df03953d4bc57a58f8 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 9 Jul 2020 17:25:56 +0100 Subject: [PATCH 114/185] More parallell exclusions to make deploy tests pass Signed-off-by: Silas Davis --- tests/jobs_fixtures/app52-proposal-execute/deploy.yaml | 2 ++ tests/jobs_fixtures/app57-bond-unbond/deploy.yaml | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/jobs_fixtures/app52-proposal-execute/deploy.yaml b/tests/jobs_fixtures/app52-proposal-execute/deploy.yaml index 24b190300..1b47b6c16 100644 --- a/tests/jobs_fixtures/app52-proposal-execute/deploy.yaml +++ b/tests/jobs_fixtures/app52-proposal-execute/deploy.yaml @@ -1,3 +1,5 @@ +no-parallel: true + jobs: - name: foobar deploy: diff --git a/tests/jobs_fixtures/app57-bond-unbond/deploy.yaml b/tests/jobs_fixtures/app57-bond-unbond/deploy.yaml index a33a1e7b7..8a086a910 100644 --- a/tests/jobs_fixtures/app57-bond-unbond/deploy.yaml +++ b/tests/jobs_fixtures/app57-bond-unbond/deploy.yaml @@ -1,5 +1,6 @@ -jobs: +no-parallel: true +jobs: - name: power set: val: 12345 @@ -42,4 +43,4 @@ jobs: assert: key: $PowerAfterRemoved relation: eq - val: $InitialTotalPower \ No newline at end of file + val: $InitialTotalPower From 9eb1e73fcee8a3bb259fe3437b973c32a5e20119 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Aug 2020 01:21:00 +0000 Subject: [PATCH 115/185] Bump elliptic from 6.5.2 to 6.5.3 in /js Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3) Signed-off-by: dependabot[bot] --- js/yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/yarn.lock b/js/yarn.lock index a50cac908..d47f2cb02 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -425,9 +425,9 @@ bip66@^1.1.5: safe-buffer "^5.0.1" bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.8, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + version "4.11.9" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" + integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== bn.js@^5.1.1: version "5.1.1" @@ -816,9 +816,9 @@ drbg.js@^1.0.1: create-hmac "^1.1.4" elliptic@^6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" - integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== + version "6.5.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" + integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== dependencies: bn.js "^4.4.0" brorand "^1.0.1" From a0eb435fca5d200c2d28c992bcb0caf16e23bd6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 Aug 2020 10:11:22 +0000 Subject: [PATCH 116/185] Bump elliptic from 6.5.0 to 6.5.3 in /docs/example/basic-app-website Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.0 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.0...v6.5.3) Signed-off-by: dependabot[bot] --- docs/example/basic-app-website/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/example/basic-app-website/package-lock.json b/docs/example/basic-app-website/package-lock.json index 00f76c4ba..0e50b768a 100644 --- a/docs/example/basic-app-website/package-lock.json +++ b/docs/example/basic-app-website/package-lock.json @@ -352,9 +352,9 @@ "integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q==" }, "elliptic": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.0.tgz", - "integrity": "sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", From 6ebcab8156552c65dfe0d97a0b6ba0fcbf574f3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 Aug 2020 10:11:22 +0000 Subject: [PATCH 117/185] Bump elliptic from 6.5.0 to 6.5.3 in /docs/example/basic-app Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.0 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.0...v6.5.3) Signed-off-by: dependabot[bot] --- docs/example/basic-app/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/example/basic-app/package-lock.json b/docs/example/basic-app/package-lock.json index 2df08c3a3..8b8e56f70 100644 --- a/docs/example/basic-app/package-lock.json +++ b/docs/example/basic-app/package-lock.json @@ -347,9 +347,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "elliptic": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.0.tgz", - "integrity": "sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", From 7c49f43c36b1aeb17bebeab94da630634792965e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2020 08:48:45 +0000 Subject: [PATCH 118/185] Bump lodash from 4.17.15 to 4.17.19 in /js Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] --- js/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/yarn.lock b/js/yarn.lock index d47f2cb02..daa9c3548 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -1739,9 +1739,9 @@ lodash.templatesettings@^4.0.0: lodash._reinterpolate "^3.0.0" lodash@^4.17.15: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + version "4.17.19" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" + integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== log-ok@^0.1.1: version "0.1.1" From 05daa74002849242fb237a5c8d9e02693c13cabf Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Fri, 20 Nov 2020 18:16:33 +0100 Subject: [PATCH 119/185] Return status from health check Signed-off-by: Silas Davis --- vent/service/server.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vent/service/server.go b/vent/service/server.go index 2bc41bc45..b4b176293 100644 --- a/vent/service/server.go +++ b/vent/service/server.go @@ -2,6 +2,7 @@ package service import ( "context" + "encoding/json" "net/http" "github.com/hyperledger/burrow/logging" @@ -70,6 +71,11 @@ func healthHandler(consumer *Consumer) func(resp http.ResponseWriter, req *http. resp.WriteHeader(http.StatusServiceUnavailable) } else { resp.WriteHeader(http.StatusOK) + bs, err := json.Marshal(consumer.statusMessage()) + if err == nil { + resp.Header().Set("Content-Type", "application/json") + resp.Write(bs) + } } } } From 5069f1bc9a79afcc2c3e8fb684c1b0d0e7a07162 Mon Sep 17 00:00:00 2001 From: vgrabovski-lacero-platform Date: Wed, 13 Jan 2021 02:26:15 +0200 Subject: [PATCH 120/185] =?UTF-8?q?Set=20correct=20value=20for=20=C2=ABcre?= =?UTF-8?q?ate2=C2=BB=20opcode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vitali Grabovski --- execution/evm/asm/opcodes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/execution/evm/asm/opcodes.go b/execution/evm/asm/opcodes.go index 62344e173..30357af06 100644 --- a/execution/evm/asm/opcodes.go +++ b/execution/evm/asm/opcodes.go @@ -174,10 +174,10 @@ const ( CALLCODE RETURN DELEGATECALL + CREATE2 // 0x70 range - other STATICCALL = 0xfa - CREATE2 = 0xfb REVERT = 0xfd INVALID = 0xfe SELFDESTRUCT = 0xff @@ -336,9 +336,9 @@ var opCodeNames = map[OpCode]string{ RETURN: "RETURN", CALLCODE: "CALLCODE", DELEGATECALL: "DELEGATECALL", + CREATE2: "CREATE2", STATICCALL: "STATICCALL", // 0x70 range - other - CREATE2: "CREATE2", REVERT: "REVERT", INVALID: "INVALID", SELFDESTRUCT: "SELFDESTRUCT", From 1dcef9cc210ce5b275a848851050f72c93befa0f Mon Sep 17 00:00:00 2001 From: Tri-stone Date: Thu, 14 Jan 2021 17:13:10 +0800 Subject: [PATCH 121/185] execution/evm/abi: check length before decode Bytes Signed-off-by: Tri-stone --- execution/evm/abi/primitives.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/execution/evm/abi/primitives.go b/execution/evm/abi/primitives.go index 025f15d0b..b2f712738 100644 --- a/execution/evm/abi/primitives.go +++ b/execution/evm/abi/primitives.go @@ -618,6 +618,9 @@ func (e EVMBytes) pack(v interface{}) ([]byte, error) { } func (e EVMBytes) unpack(data []byte, offset int, v interface{}) (int, error) { + if len(data)-offset < ElementSize { + return 0, fmt.Errorf("%v: not enough data", e) + } if e.M == 0 { s := EVMString{} From 99088f2a1fd1f55394cca267d58ea9d1291994f3 Mon Sep 17 00:00:00 2001 From: Tri-stone Date: Thu, 14 Jan 2021 16:45:44 +0800 Subject: [PATCH 122/185] execution/evm/abi: check data length before decoding Address and Bytes with ABI Signed-off-by: Tri-stone --- execution/evm/abi/primitives.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/execution/evm/abi/primitives.go b/execution/evm/abi/primitives.go index b2f712738..f3014f656 100644 --- a/execution/evm/abi/primitives.go +++ b/execution/evm/abi/primitives.go @@ -539,6 +539,9 @@ func (e EVMAddress) pack(v interface{}) ([]byte, error) { } func (e EVMAddress) unpack(data []byte, offset int, v interface{}) (int, error) { + if len(data)-offset < ElementSize { + return 0, fmt.Errorf("%v: not enough data", e) + } addr, err := crypto.AddressFromBytes(data[offset+ElementSize-crypto.AddressLength : offset+ElementSize]) if err != nil { return 0, err From 1baa672b56d7625f393cc4e0d2c9131e4e9973a9 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 25 Jan 2021 19:52:37 +0100 Subject: [PATCH 123/185] Fix CI - Upgrade images - Fix 81.test.ts which was failing silently via async mishandling - Bump JS versions - Use python3 in docker image to keep pip happy - Actually fix app03 (only took about 3 years :)) Signed-off-by: Silas Davis --- .github/Dockerfile | 6 +- .github/workflows/test.yaml | 6 +- Dockerfile | 2 +- Makefile | 2 +- docker-compose.yml | 2 +- js/package.json | 25 +- js/src/lib/events.ts | 14 +- .../test/{81.test.ts => event-listen.test.ts} | 17 +- js/yarn.lock | 904 +++++++++--------- .../deploy.yaml | 15 +- .../deploy.yaml | 3 - 11 files changed, 491 insertions(+), 505 deletions(-) rename js/src/test/{81.test.ts => event-listen.test.ts} (83%) diff --git a/.github/Dockerfile b/.github/Dockerfile index 16f57df67..537e70c53 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.13-alpine3.11 +FROM golang:1.15-alpine3.13 MAINTAINER Monax ENV DOCKER_VERSION "17.12.1-ce" @@ -21,9 +21,9 @@ RUN apk add --update --no-cache \ docker \ libffi-dev \ openssl-dev \ - python-dev \ + python3-dev \ py-pip -RUN pip install docker-compose +RUN pip3 install docker-compose # get docker client WORKDIR /usr/bin RUN curl -sS -L https://download.docker.com/linux/static/stable/x86_64/docker-$DOCKER_VERSION.tgz | tar xz --strip-components 1 docker/docker diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index acc43fc35..716482e7f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -36,7 +36,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: docker-compose run burrow make test_integration_vent + - run: make test_integration_vent_postgres docker: runs-on: ubuntu-latest @@ -68,7 +68,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: '8.x' + node-version: '14.x' - uses: actions/download-artifact@master with: name: burrow @@ -116,7 +116,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: '8.x' + node-version: '14.x' - uses: actions/download-artifact@master with: name: burrow diff --git a/Dockerfile b/Dockerfile index df7324a17..9843ab2b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # For solc binary FROM ethereum/solc:0.5.12 as solc-builder # We use a multistage build to avoid bloating our deployment image with build dependencies -FROM golang:1.13-alpine3.11 as builder +FROM golang:1.15-alpine3.12 as builder RUN apk add --no-cache --update git bash make musl-dev gcc libc6-compat diff --git a/Makefile b/Makefile index f12e0a288..33433e2fe 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ REPO := $(shell pwd) # Our own Go files containing the compiled bytecode of solidity files as a constant -CI_IMAGE="hyperledger/burrow:ci" +export CI_IMAGE=hyperledger/burrow:ci-2 VERSION := $(shell scripts/version.sh) # Gets implicit default GOPATH if not set diff --git a/docker-compose.yml b/docker-compose.yml index b69cd7c11..3325b049c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: - 5432 burrow: - build: .github + image: ${CI_IMAGE} environment: DB_URL: "postgres://postgres@db:5432/postgres?sslmode=disable" GO111MODULE: "on" diff --git a/js/package.json b/js/package.json index 71a0e0824..c6ded65a9 100644 --- a/js/package.json +++ b/js/package.json @@ -18,21 +18,26 @@ "test": "./test.sh 'src/test/**/*.test.ts'" }, "dependencies": { - "@grpc/grpc-js": "^1.0.2", + "@grpc/grpc-js": "^1.2.4", "@types/ethereumjs-abi": "^0.6.3", - "bn.js": "^5.1.1", + "bn.js": "^5.1.3", "ethereumjs-abi": "^0.6.8", - "google-protobuf": "^3.11.4", - "sha3": "^2.1.1", + "google-protobuf": "^3.14.0", + "sha3": "^2.1.3", "solc": "^0.6.1", - "ts-node": "^8.6.2", - "typescript": "^3.7.4" + "ts-node": "^9.1.1", + "typescript": "^4.1.3" }, "devDependencies": { - "@types/mocha": "^7.0.2", - "grpc-tools": "^1.8.1", - "grpc_tools_node_protoc_ts": "^3.0.0", - "mocha": "^7.1.1" + "@types/mocha": "^8.2.0", + "grpc-tools": "^1.10.0", + "grpc_tools_node_protoc_ts": "^5.1.0", + "mocha": "^8.2.1" + }, + "mocha": { + "bail": true, + "exit": true, + "timeout": 60000 }, "homepage": "https://github.com/hyperledger/burrow/", "keywords": [ diff --git a/js/src/lib/events.ts b/js/src/lib/events.ts index d11ef5253..ede13f553 100644 --- a/js/src/lib/events.ts +++ b/js/src/lib/events.ts @@ -1,14 +1,15 @@ -import { IExecutionEventsClient } from '../../proto/rpcevents_grpc_pb'; -import { BlocksRequest, BlockRange, Bound, EventsResponse } from '../../proto/rpcevents_pb'; -import { LogEvent } from '../../proto/exec_pb'; -import { Error } from './burrow'; +import {IExecutionEventsClient} from '../../proto/rpcevents_grpc_pb'; +import {BlocksRequest, BlockRange, Bound, EventsResponse} from '../../proto/rpcevents_pb'; +import {LogEvent} from '../../proto/exec_pb'; +import {Error} from './burrow'; import * as grpc from '@grpc/grpc-js'; export type EventStream = grpc.ClientReadableStream; export class Events { - constructor(private burrow: IExecutionEventsClient) {} + constructor(private burrow: IExecutionEventsClient) { + } listen(query: string, callback: (err: Error, log: LogEvent) => void): EventStream { const start = new Bound(); @@ -32,8 +33,7 @@ export class Events { callback(null, event.getLog()); }); }); - stream.on('error', (err: Error) => - err.code === grpc.status.CANCELLED ? callback(null, null) : callback(err, null)); + stream.on('error', (err: Error) => err.code === grpc.status.CANCELLED || callback(err, null)); return stream; } diff --git a/js/src/test/81.test.ts b/js/src/test/event-listen.test.ts similarity index 83% rename from js/src/test/81.test.ts rename to js/src/test/event-listen.test.ts index 41f59941b..ba66713b5 100644 --- a/js/src/test/81.test.ts +++ b/js/src/test/event-listen.test.ts @@ -4,7 +4,7 @@ import {burrow, compile} from '../test'; describe('Event listening', function () { it('listens to an event from a contract', async () => { - const source = ` + const source = ` pragma solidity >=0.0.0; contract Contract { event Pay( @@ -31,11 +31,12 @@ describe('Event listening', function () { } ` - const {abi, code} = compile(source, 'Contract') - const contract: any = await burrow.contracts.deploy(abi, code) + const {abi, code} = compile(source, 'Contract') + const contract: any = await burrow.contracts.deploy(abi, code) + const promise = new Promise((resolve, reject) => { const stream = contract.Pay((error, result) => { if (error) { - throw error; + reject(error); } else { const actual = Object.assign( {}, @@ -61,10 +62,14 @@ describe('Event listening', function () { ) stream.cancel() + resolve() } }); - - contract.announce() }) + + await contract.announce() + + return promise + }) }); diff --git a/js/yarn.lock b/js/yarn.lock index daa9c3548..bafaa8565 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -2,11 +2,13 @@ # yarn lockfile v1 -"@grpc/grpc-js@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.0.2.tgz#31d0b1dd0d34ee55ad973384a59c73ac58fb5421" - integrity sha512-rcMwqOV7JWp+mzTO9eM8FEIFsxMs3PFABegsTioMkTVpBbhmuTNpgBzb5xlzhUGuNb45pgVF7j7OlUnJ4S7vfw== +"@grpc/grpc-js@^1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.2.4.tgz#04f0bbefb2636296d17e821f3d52152fbe2f6989" + integrity sha512-z+EI20HYHLd3/uERtwOqP8Q4EPhGbz5RKUpiyo6xPWfR3pcjpf8sfNvY9XytDQ4xo1wNz7NqH1kh2UBonwzbfg== dependencies: + "@types/node" "^12.12.47" + google-auth-library "^6.1.1" semver "^6.2.0" "@types/bn.js@^4.11.3": @@ -16,11 +18,6 @@ dependencies: "@types/node" "*" -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== - "@types/ethereumjs-abi@^0.6.3": version "0.6.3" resolved "https://registry.yarnpkg.com/@types/ethereumjs-abi/-/ethereumjs-abi-0.6.3.tgz#eb5ed09fd86b9e2b1c0eb75d1e9bc29c50715c86" @@ -28,21 +25,45 @@ dependencies: "@types/node" "*" -"@types/mocha@^7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-7.0.2.tgz#b17f16cf933597e10d6d78eae3251e692ce8b0ce" - integrity sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w== +"@types/mocha@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" + integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== "@types/node@*": version "13.13.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.2.tgz#160d82623610db590a64e8ca81784e11117e5a54" integrity sha512-LB2R1Oyhpg8gu4SON/mfforE525+Hi/M1ineICEDftqNVTyFg1aRIeGuTvXAoWHc4nbrFncWtJgMmoyRvuGh7A== +"@types/node@^12.12.47": + version "12.19.15" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.15.tgz#0de7e978fb43db62da369db18ea088a63673c182" + integrity sha512-lowukE3GUI+VSYSu6VcBXl14d61Rp5hA1D+61r16qnwC0lYNSqdxcvRh0pswejorHfS+HgwBasM8jLXz0/aOsw== + +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + ansi-bgblack@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-bgblack/-/ansi-bgblack-0.1.1.tgz#a68ba5007887701b6aafbe3fa0dadfdfa8ee3ca2" @@ -120,10 +141,10 @@ ansi-bold@^0.1.1: dependencies: ansi-wrap "0.1.0" -ansi-colors@3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" - integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== ansi-colors@^0.2.0: version "0.2.0" @@ -243,11 +264,6 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== - ansi-reset@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-reset/-/ansi-reset-0.1.1.tgz#e7e71292c3c7ddcd4d62ef4a6c7c05980911c3b7" @@ -262,19 +278,18 @@ ansi-strikethrough@^0.1.1: dependencies: ansi-wrap "0.1.0" -ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.0: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: - "@types/color-name" "^1.1.1" color-convert "^2.0.1" ansi-underline@^0.1.1: @@ -365,6 +380,11 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= +arrify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" + integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== + assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -392,6 +412,11 @@ base64-js@^1.0.2: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== +base64-js@^1.3.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -405,6 +430,11 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" +bignumber.js@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" + integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== + binary-extensions@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" @@ -429,10 +459,10 @@ bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.8, bn.js@^4.4.0: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== -bn.js@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.1.tgz#48efc4031a9c4041b9c99c6941d903463ab62eb5" - integrity sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA== +bn.js@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b" + integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== brace-expansion@^1.1.7: version "1.1.11" @@ -487,6 +517,11 @@ browserify-aes@^1.0.6: inherits "^2.0.1" safe-buffer "^5.0.1" +buffer-equal-constant-time@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= + buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" @@ -497,10 +532,10 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= -buffer@5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.5.0.tgz#9c3caa3d623c33dd1c7ef584b89b88bf9c9bc1ce" - integrity sha512-9FTEDjLjwoAkEwyMGDjYJQN2gfRgOKBKRfiglhvibGbpeeU/pQn1bJxQqm32OD/AIeEuHxU9roxXxg34Byp/Ww== +buffer@5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" + integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" @@ -525,19 +560,23 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== +camelcase@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== + +chalk@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" + ansi-styles "^4.1.0" + supports-color "^7.1.0" -chokidar@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" - integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== +chokidar@3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" + integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -545,9 +584,9 @@ chokidar@3.3.0: is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.2.0" + readdirp "~3.5.0" optionalDependencies: - fsevents "~2.1.1" + fsevents "~2.1.2" chownr@^1.1.1: version "1.1.4" @@ -581,15 +620,6 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" - code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -707,6 +737,11 @@ create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + date.js@^0.3.1: version "0.3.3" resolved "https://registry.yarnpkg.com/date.js/-/date.js-0.3.3.tgz#ef1e92332f507a638795dbb985e951882e50bbda" @@ -714,12 +749,19 @@ date.js@^0.3.1: dependencies: debug "~3.1.0" -debug@3.2.6, debug@^3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== +debug@4: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== dependencies: - ms "^2.1.1" + ms "2.1.2" + +debug@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" + integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== + dependencies: + ms "2.1.2" debug@^2.2.0, debug@^2.3.3: version "2.6.9" @@ -728,6 +770,13 @@ debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" +debug@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -740,6 +789,11 @@ decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -757,13 +811,6 @@ default-compare@^1.0.0: dependencies: kind-of "^5.0.2" -define-properties@^1.1.2, define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -796,12 +843,7 @@ detect-libc@^1.0.2: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= -diff@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - -diff@^4.0.1: +diff@4.0.2, diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== @@ -815,6 +857,13 @@ drbg.js@^1.0.1: create-hash "^1.1.2" create-hmac "^1.1.4" +ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== + dependencies: + safe-buffer "^5.0.1" + elliptic@^6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" @@ -833,11 +882,6 @@ emoji-regex@^7.0.1: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - ent@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" @@ -848,36 +892,10 @@ error-symbol@^0.1.0: resolved "https://registry.yarnpkg.com/error-symbol/-/error-symbol-0.1.0.tgz#0a4dae37d600d15a29ba453d8ef920f1844333f6" integrity sha1-Ck2uN9YA0VopukU9jvkg8YRDM/Y= -es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: - version "1.17.5" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" - integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.1.5" - is-regex "^1.0.5" - object-inspect "^1.7.0" - object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimleft "^2.1.1" - string.prototype.trimright "^2.1.1" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== esprima@^4.0.0: version "4.0.1" @@ -913,6 +931,11 @@ ethjs-util@0.1.6: is-hex-prefixed "1.0.0" strip-hex-prefix "1.0.0" +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" @@ -949,6 +972,11 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" +extend@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" @@ -970,6 +998,11 @@ extglob@^2.0.4: dependencies: kind-of "^5.0.2" +fast-text-encoding@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz#ec02ac8e01ab8a319af182dae2681213cfe9ce53" + integrity sha512-dtm4QZH9nZtcDt8qJiOH9fcQd1NAgi+K1O2DbE6GG1PPCK/BWfOH3idCTRQ4ImXRUOyopDEgDEnVEE7Y/2Wrig== + file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" @@ -992,27 +1025,25 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-up@3.0.0, find-up@^3.0.0: +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== dependencies: locate-path "^3.0.0" -find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -flat@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" - integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== - dependencies: - is-buffer "~2.0.3" +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" @@ -1061,16 +1092,11 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@~2.1.1: +fsevents@~2.1.2: version "2.1.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -1085,6 +1111,25 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +gaxios@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-4.1.0.tgz#e8ad466db5a4383c70b9d63bfd14dfaa87eb0099" + integrity sha512-vb0to8xzGnA2qcgywAjtshOKKVDf2eQhJoiL6fHhgW5tVN7wNk7egnYIO9zotfn3lQ3De1VPdf7V5/BWfCtCmg== + dependencies: + abort-controller "^3.0.0" + extend "^3.0.2" + https-proxy-agent "^5.0.0" + is-stream "^2.0.0" + node-fetch "^2.3.0" + +gcp-metadata@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-4.2.1.tgz#31849fbcf9025ef34c2297c32a89a1e7e9f2cd62" + integrity sha512-tSk+REe5iq/N+K+SK1XjZJUrFPuDqGZVzCy2vocIHIGmPlTGsa8owXMJwGkrXr73NO0AzhPW4MF2DEHz7P2AVw== + dependencies: + gaxios "^4.0.0" + json-bigint "^1.0.0" + get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -1110,19 +1155,7 @@ glob-parent@~5.1.0: dependencies: is-glob "^4.0.1" -glob@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.3: +glob@7.1.6, glob@^7.1.3: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -1134,15 +1167,37 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -google-protobuf@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.5.0.tgz#b8cc63c74d83457bd8a9a904503c8efb26bca339" - integrity sha1-uMxjx02DRXvYqakEUDyO+ya8ozk= +google-auth-library@^6.1.1: + version "6.1.4" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-6.1.4.tgz#bc70c4f3b6681ae5273343466bcef37577b7ee44" + integrity sha512-q0kYtGWnDd9XquwiQGAZeI2Jnglk7NDi0cChE4tWp6Kpo/kbqnt9scJb0HP+/xqt03Beqw/xQah1OPrci+pOxw== + dependencies: + arrify "^2.0.0" + base64-js "^1.3.0" + ecdsa-sig-formatter "^1.0.11" + fast-text-encoding "^1.0.0" + gaxios "^4.0.0" + gcp-metadata "^4.2.0" + gtoken "^5.0.4" + jws "^4.0.0" + lru-cache "^6.0.0" + +google-p12-pem@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-3.0.3.tgz#673ac3a75d3903a87f05878f3c75e06fc151669e" + integrity sha512-wS0ek4ZtFx/ACKYF3JhyGe5kzH7pgiQ7J5otlumqR9psmWMYc+U9cErKlCYVYHoUaidXHdZ2xbo34kB+S+24hA== + dependencies: + node-forge "^0.10.0" + +google-protobuf@3.12.4: + version "3.12.4" + resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.12.4.tgz#fd89b7e5052cdb35a80f9b455612851d542a5c9f" + integrity sha512-ItTn8YepDQMHEMHloUPH+FDaTPiHTnbsMvP50aXfbI65IK3AA5+wXlHSygJH8xz+h1g4gu7V+CK5X1/SaGITsA== -google-protobuf@^3.11.4: - version "3.11.4" - resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.11.4.tgz#598ca405a3cfa917a2132994d008b5932ef42014" - integrity sha512-lL6b04rDirurUBOgsY2+LalI6Evq8eH5TcNzi7TYQ3BsIWelT0KSOQSBsXuavEkNf+odQU6c0lgz3UsZXeNX9Q== +google-protobuf@^3.14.0: + version "3.14.0" + resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.14.0.tgz#20373d22046e63831a5110e11a84f713cc43651e" + integrity sha512-bwa8dBuMpOxg7COyqkW6muQuvNnWgVN8TX/epDRGW5m0jcrmq2QJyCyiV8ZE2/6LaIIqJtiv9bYokFhfpy/o6w== graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.2.3" @@ -1154,22 +1209,32 @@ growl@1.10.5: resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== -grpc-tools@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/grpc-tools/-/grpc-tools-1.8.1.tgz#8b2e8bf42028d94c85817d954685c46a7bfbc31a" - integrity sha512-CvZLshEDbum8ZtB8r3bn6JsrHs3L7S1jf7PTa02nZSLmcLTKbiXH5UYrte06Kh7SdzFmkxPMaOsys2rCs+HRjA== +grpc-tools@^1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/grpc-tools/-/grpc-tools-1.10.0.tgz#687c0599715fc8c02e93496f8f37f89bc9840ef7" + integrity sha512-tEbO16TuXV+aJPTMK4FCd4Jw6uzR/wm4h3u27MmZQlWLETp3bL/6KQdVM6xujNx8N1Mbj0/Be2f/0SedzGm0dQ== dependencies: - node-pre-gyp "^0.12.0" + node-pre-gyp "^0.15.0" -grpc_tools_node_protoc_ts@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-3.0.0.tgz#02cf4bb7945b9c120f038447a2e2fa2164f2bef5" - integrity sha512-a4A3tadLwh5QGPlc31TSKAf40+HxFXh/nnW2driDBqAgVcMKkcZEVQpEnJJOU4lNqs2QwLFgPm9pUr/Hd+uv9g== +grpc_tools_node_protoc_ts@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.1.0.tgz#7ff0706bedc8902187fc1163bcd307156206c91d" + integrity sha512-jXn5JKmjdzPqjsrh7IPKnjlTFoNOHlP7xSKq8L9nDGbDrMj4qwEGHrQfX2YhqCmBc9pAQ9Y4+sPnlOTaOp61PA== dependencies: - google-protobuf "3.5.0" - handlebars "4.7.4" + google-protobuf "3.12.4" + handlebars "4.7.6" handlebars-helpers "0.10.0" +gtoken@^5.0.4: + version "5.2.0" + resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-5.2.0.tgz#7f1e029f9472bb8899d6911c03c66f7ad985c849" + integrity sha512-qbf6JWEYFMj3WMAluvYXl8GAiji6w8d9OmAGCbBg0xF4xD/yu6ZaO6BhoXNddRjKcOUpZD81iea1H5B45gAo1g== + dependencies: + gaxios "^4.0.0" + google-p12-pem "^3.0.3" + jws "^4.0.0" + mime "^2.2.0" + gulp-header@^1.7.1: version "1.8.12" resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" @@ -1229,18 +1294,7 @@ handlebars-utils@^1.0.2, handlebars-utils@^1.0.4, handlebars-utils@^1.0.6: kind-of "^6.0.0" typeof-article "^0.1.1" -handlebars@4.7.4: - version "4.7.4" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.4.tgz#902c579cc97b350bb4bc12e6cabd85b57dcd9975" - integrity sha512-Is8+SzHv8K9STNadlBVpVhxXrSXxVgTyIvhdg2Qjak1SfSZ7iEozLHdwiX1jJ9lLFkcFJxqGK5s/cI7ZX+qGkQ== - dependencies: - neo-async "^2.6.0" - source-map "^0.6.1" - yargs "^15.3.1" - optionalDependencies: - uglify-js "^3.1.4" - -handlebars@^4.0.11: +handlebars@4.7.6, handlebars@^4.0.11: version "4.7.6" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== @@ -1252,15 +1306,10 @@ handlebars@^4.0.11: optionalDependencies: uglify-js "^3.1.4" -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-symbols@^1.0.0, has-symbols@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== has-unicode@^2.0.0: version "2.0.1" @@ -1298,13 +1347,6 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - hash-base@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" @@ -1376,6 +1418,14 @@ html-tag@^2.0.0: is-self-closing "^1.0.1" kind-of "^6.0.0" +https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + dependencies: + agent-base "6" + debug "4" + iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -1444,16 +1494,6 @@ is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-buffer@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" - integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== - -is-callable@^1.1.4, is-callable@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" - integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== - is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -1468,11 +1508,6 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" @@ -1527,11 +1562,6 @@ is-fullwidth-code-point@^2.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" @@ -1575,6 +1605,11 @@ is-odd@^0.1.2: dependencies: is-number "^3.0.0" +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -1582,13 +1617,6 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-regex@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" - integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== - dependencies: - has "^1.0.3" - is-self-closing@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-self-closing/-/is-self-closing-1.0.1.tgz#5f406b527c7b12610176320338af0fa3896416e4" @@ -1596,12 +1624,10 @@ is-self-closing@^1.0.1: dependencies: self-closing-tags "^1.0.1" -is-symbol@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== - dependencies: - has-symbols "^1.0.1" +is-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" + integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== is-windows@^1.0.2: version "1.0.2" @@ -1640,14 +1666,21 @@ js-sha3@0.8.0: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== -js-yaml@3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== +js-yaml@3.14.0: + version "3.14.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== dependencies: argparse "^1.0.7" esprima "^4.0.0" +json-bigint@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1" + integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ== + dependencies: + bignumber.js "^9.0.0" + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -1655,6 +1688,23 @@ jsonfile@^2.1.0: optionalDependencies: graceful-fs "^4.1.6" +jwa@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.0.tgz#a7e9c3f29dae94027ebcaf49975c9345593410fc" + integrity sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA== + dependencies: + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jws@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.0.tgz#2d4e8cf6a318ffaa12615e9dec7e86e6c97310f4" + integrity sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg== + dependencies: + jwa "^2.0.0" + safe-buffer "^5.0.1" + keccak@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/keccak/-/keccak-2.1.0.tgz#734ea53f2edcfd0f42cdb8d5f4c358fef052752b" @@ -1711,12 +1761,12 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: - p-locate "^4.1.0" + p-locate "^5.0.0" lodash._reinterpolate@^3.0.0: version "3.0.0" @@ -1738,11 +1788,6 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "^3.0.0" -lodash@^4.17.15: - version "4.17.19" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" - integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== - log-ok@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/log-ok/-/log-ok-0.1.1.tgz#bea3dd36acd0b8a7240d78736b5b97c65444a334" @@ -1751,12 +1796,12 @@ log-ok@^0.1.1: ansi-green "^0.1.1" success-symbol "^0.1.0" -log-symbols@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" - integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== +log-symbols@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" + integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== dependencies: - chalk "^2.4.2" + chalk "^4.0.0" log-utils@^0.2.1: version "0.2.1" @@ -1779,6 +1824,13 @@ logging-helpers@^1.0.0: isobject "^3.0.0" log-utils "^0.2.1" +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" @@ -1829,6 +1881,11 @@ micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" +mime@^2.2.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.0.tgz#2b4af934401779806ee98026bb42e8c1ae1876b1" + integrity sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag== + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -1874,49 +1931,43 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.3.tgz#5a514b7179259287952881e94410ec5465659f8c" - integrity sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg== - dependencies: - minimist "^1.2.5" - -mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@^0.5.0, mkdirp@^0.5.3: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== dependencies: minimist "^1.2.5" -mocha@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.1.tgz#89fbb30d09429845b1bb893a830bf5771049a441" - integrity sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA== +mocha@^8.2.1: + version "8.2.1" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.2.1.tgz#f2fa68817ed0e53343d989df65ccd358bc3a4b39" + integrity sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w== dependencies: - ansi-colors "3.2.3" + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" browser-stdout "1.3.1" - chokidar "3.3.0" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" + chokidar "3.4.3" + debug "4.2.0" + diff "4.0.2" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.1.6" growl "1.10.5" he "1.2.0" - js-yaml "3.13.1" - log-symbols "3.0.0" + js-yaml "3.14.0" + log-symbols "4.0.0" minimatch "3.0.4" - mkdirp "0.5.3" - ms "2.1.1" - node-environment-flags "1.0.6" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" + ms "2.1.2" + nanoid "3.1.12" + serialize-javascript "5.0.1" + strip-json-comments "3.1.1" + supports-color "7.2.0" + which "2.0.2" wide-align "1.1.3" + workerpool "6.0.2" yargs "13.3.2" yargs-parser "13.1.2" - yargs-unparser "1.6.0" + yargs-unparser "2.0.0" moment@^2.18.1: version "2.24.0" @@ -1928,12 +1979,7 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -ms@^2.1.1: +ms@2.1.2, ms@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== @@ -1943,6 +1989,11 @@ nan@^2.14.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== +nanoid@3.1.12: + version "3.1.12" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654" + integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -1960,10 +2011,10 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" -needle@^2.2.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.1.tgz#14af48732463d7475696f937626b1b993247a56a" - integrity sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g== +needle@^2.5.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.6.0.tgz#24dbb55f2509e2324b4a99d61f413982013ccdbe" + integrity sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg== dependencies: debug "^3.2.6" iconv-lite "^0.4.4" @@ -1974,29 +2025,31 @@ neo-async@^2.6.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== -node-environment-flags@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" - integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== - dependencies: - object.getownpropertydescriptors "^2.0.3" - semver "^5.7.0" +node-fetch@^2.3.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== -node-pre-gyp@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" - integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== +node-forge@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3" + integrity sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA== + +node-pre-gyp@^0.15.0: + version "0.15.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.15.0.tgz#c2fc383276b74c7ffa842925241553e8b40f1087" + integrity sha512-7QcZa8/fpaU/BKenjcaeFF9hLz2+7S9AqyXFhlH/rilsQ/hPZKK32RtR5EQHJElgu+q5RfbJ34KriI79UWaorA== dependencies: detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" + mkdirp "^0.5.3" + needle "^2.5.0" nopt "^4.0.1" npm-packlist "^1.1.6" npmlog "^4.0.2" rc "^1.2.7" rimraf "^2.6.1" semver "^5.3.0" - tar "^4" + tar "^4.4.2" nopt@^4.0.1: version "4.0.3" @@ -2061,16 +2114,6 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" - integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== - -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" @@ -2078,24 +2121,6 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@4.1.0, object.assign@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - -object.getownpropertydescriptors@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" - integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -2128,13 +2153,20 @@ osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -p-limit@^2.0.0, p-limit@^2.2.0: +p-limit@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -2142,12 +2174,12 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: - p-limit "^2.2.0" + p-limit "^3.0.2" p-try@^2.0.0: version "2.2.0" @@ -2174,7 +2206,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -picomatch@^2.0.4: +picomatch@^2.0.4, picomatch@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== @@ -2189,6 +2221,13 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + rc@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -2212,12 +2251,12 @@ readable-stream@^2.0.6, readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readdirp@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" - integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== +readdirp@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" + integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== dependencies: - picomatch "^2.0.4" + picomatch "^2.2.1" regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" @@ -2304,6 +2343,11 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -2345,7 +2389,7 @@ self-closing-tags@^1.0.1: resolved "https://registry.yarnpkg.com/self-closing-tags/-/self-closing-tags-1.0.1.tgz#6c5fa497994bb826b484216916371accee490a5d" integrity sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA== -semver@^5.3.0, semver@^5.5.0, semver@^5.7.0: +semver@^5.3.0, semver@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -2355,6 +2399,13 @@ semver@^6.2.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +serialize-javascript@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -2385,12 +2436,12 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" -sha3@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/sha3/-/sha3-2.1.2.tgz#76f404e401d17ca1d23d8458a3790d57f0671bac" - integrity sha512-agYUtkzMsdFTQkM3ECyt6YW0552fyEb0tYZkl7olurS1Vg2Ms5+2SdF4VFPC1jnwtiXMb8b0fSyuAGZh+q2mAw== +sha3@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/sha3/-/sha3-2.1.3.tgz#ab05b841b2bce347765db31f57fe2a3134b9fb48" + integrity sha512-Io53D4o9qOmf3Ow9p/DoGLQiQHhtuR0ulbyambvRSG+OX5yXExk2yYfvjHtb7AtOyk6K6+sPeK/qaowWc/E/GA== dependencies: - buffer "5.5.0" + buffer "5.6.0" signal-exit@^3.0.0: version "3.0.3" @@ -2521,49 +2572,6 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" - integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" - -string.prototype.trimend@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" - integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -string.prototype.trimleft@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc" - integrity sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - string.prototype.trimstart "^1.0.0" - -string.prototype.trimright@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz#c76f1cef30f21bbad8afeb8db1511496cfb0f2a3" - integrity sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - string.prototype.trimend "^1.0.0" - -string.prototype.trimstart@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" - integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -2592,13 +2600,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== - dependencies: - ansi-regex "^5.0.0" - strip-hex-prefix@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" @@ -2606,7 +2607,12 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" -strip-json-comments@2.0.1, strip-json-comments@~2.0.1: +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= @@ -2621,21 +2627,14 @@ success-symbol@^0.1.0: resolved "https://registry.yarnpkg.com/success-symbol/-/success-symbol-0.1.0.tgz#24022e486f3bf1cdca094283b769c472d3b72897" integrity sha1-JAIuSG878c3KCUKDt2nEctO3KJc= -supports-color@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" - integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== - dependencies: - has-flag "^3.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== +supports-color@7.2.0, supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: - has-flag "^3.0.0" + has-flag "^4.0.0" -tar@^4: +tar@^4.4.2: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== @@ -2705,12 +2704,13 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -ts-node@^8.6.2: - version "8.9.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.9.0.tgz#d7bf7272dcbecd3a2aa18bd0b96c7d2f270c15d4" - integrity sha512-rwkXfOs9zmoHrV8xE++dmNd6ZIS+nmHHCxcV53ekGJrxFLMbp+pizpPS07ARvhwneCIECPppOwbZHvw9sQtU4w== +ts-node@^9.1.1: + version "9.1.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" + integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== dependencies: arg "^4.1.0" + create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" source-map-support "^0.5.17" @@ -2723,10 +2723,10 @@ typeof-article@^0.1.1: dependencies: kind-of "^3.1.0" -typescript@^3.7.4: - version "3.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" - integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== +typescript@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" + integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== uglify-js@^3.1.4: version "3.9.1" @@ -2778,10 +2778,10 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== +which@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" @@ -2797,6 +2797,11 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= +workerpool@6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.2.tgz#e241b43d8d033f1beb52c7851069456039d1d438" + integrity sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q== + wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" @@ -2806,15 +2811,6 @@ wrap-ansi@^5.1.0: string-width "^3.0.0" strip-ansi "^5.0.0" -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -2835,6 +2831,11 @@ yallist@^3.0.0, yallist@^3.0.3: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yargs-parser@13.1.2, yargs-parser@^13.1.2: version "13.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" @@ -2843,24 +2844,17 @@ yargs-parser@13.1.2, yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^18.1.1: - version "18.1.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" - integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-unparser@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" - integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== dependencies: - flat "^4.1.0" - lodash "^4.17.15" - yargs "^13.3.0" + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" -yargs@13.3.2, yargs@^13.3.0: +yargs@13.3.2: version "13.3.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== @@ -2876,23 +2870,6 @@ yargs@13.3.2, yargs@^13.3.0: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@^15.3.1: - version "15.3.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" - integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== - dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^18.1.1" - year@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/year/-/year-0.2.1.tgz#4083ae520a318b23ec86037f3000cb892bdf9bb0" @@ -2902,3 +2879,8 @@ yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/tests/jobs_fixtures/app03-basic_and_advanced_permission_txs_and_queries/deploy.yaml b/tests/jobs_fixtures/app03-basic_and_advanced_permission_txs_and_queries/deploy.yaml index 06a167b45..c391662bd 100644 --- a/tests/jobs_fixtures/app03-basic_and_advanced_permission_txs_and_queries/deploy.yaml +++ b/tests/jobs_fixtures/app03-basic_and_advanced_permission_txs_and_queries/deploy.yaml @@ -1,6 +1,3 @@ -# Exclusive with app33 -no-parallel: true - jobs: - name: perm @@ -14,26 +11,26 @@ jobs: - name: permTest1 permission: action: setBase - target: $key2 + target: Participant_1 permission: $perm value: "true" - name: permTest2 permission: action: unsetBase - target: $key2 + target: Participant_1 permission: $perm - name: permTest3 permission: action: addRole - target: $key2 + target: Participant_1 role: $role - name: permTest4 permission: action: removeRole - target: $key2 + target: Participant_1 role: $role - name: permTest5 @@ -44,7 +41,7 @@ jobs: - name: queryPerm1 query-account: - account: $key2 + account: Participant_1 field: permissions.roles - name: assertPerm1 @@ -55,7 +52,7 @@ jobs: - name: queryPerm2 query-account: - account: $key2 + account: Participant_1 field: permissions.base - name: assertPerm2 diff --git a/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/deploy.yaml b/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/deploy.yaml index 0f0448252..53095d564 100644 --- a/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/deploy.yaml +++ b/tests/jobs_fixtures/app33-evm_connection_edb_permissions_and_roles_layer/deploy.yaml @@ -1,6 +1,3 @@ -# Exclusive with app03 -no-parallel: true - jobs: - name: role From c34e3138cfc7b695abc06f9ce4d66bf7c3832329 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Jan 2021 20:38:46 +0000 Subject: [PATCH 124/185] Bump ini from 1.3.5 to 1.3.8 in /js Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] --- js/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/yarn.lock b/js/yarn.lock index bafaa8565..147cba0d5 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -1464,9 +1464,9 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== is-accessor-descriptor@^0.1.6: version "0.1.6" From 3ffa0c3524fa7db775d629f45dbb2b79d91b7242 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Jan 2021 20:38:54 +0000 Subject: [PATCH 125/185] Bump highlight.js from 9.18.1 to 9.18.5 in /js Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.18.1 to 9.18.5. - [Release notes](https://github.com/highlightjs/highlight.js/releases) - [Changelog](https://github.com/highlightjs/highlight.js/blob/9.18.5/CHANGES.md) - [Commits](https://github.com/highlightjs/highlight.js/compare/9.18.1...9.18.5) Signed-off-by: dependabot[bot] --- js/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/yarn.lock b/js/yarn.lock index bafaa8565..f6684b61d 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -1397,9 +1397,9 @@ helper-md@^0.2.2: remarkable "^1.6.2" highlight.js@^9.12.0: - version "9.18.1" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.1.tgz#ed21aa001fe6252bb10a3d76d47573c6539fe13c" - integrity sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg== + version "9.18.5" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.5.tgz#d18a359867f378c138d6819edfc2a8acd5f29825" + integrity sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA== hmac-drbg@^1.0.0: version "1.0.1" From 710aff2d4d4b5a442de81af1563fc738d089f80d Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Fri, 8 Jan 2021 11:47:40 +0100 Subject: [PATCH 126/185] Upgrade Tendermint and over dependencies Note: we have been forced to upgrade our protobuf dependency but in order to keep our custom gogoproto types we need to generated marshallers for all types and handle this path specially. Signed-off-by: Silas Davis --- .github/workflows/master.yaml | 2 +- .github/workflows/release.yaml | 4 +- .github/workflows/test.yaml | 12 +- Makefile | 13 +- acm/acm.pb.go | 76 +- acm/balance/balance.pb.go | 30 +- acm/validator/validator.pb.go | 325 +- bcm/bcm.pb.go | 69 +- bcm/block_store.go | 16 +- cmd/burrow/commands/accounts.go | 7 +- cmd/burrow/commands/config_options.go | 17 + cmd/burrow/commands/configure.go | 10 +- cmd/burrow/commands/dump.go | 7 +- cmd/burrow/commands/explore.go | 5 +- cmd/burrow/commands/keys.go | 7 +- consensus/abci/app.go | 19 +- consensus/abci/execute_tx.go | 5 +- consensus/abci/execute_tx_test.go | 5 +- consensus/tendermint/amino.go | 12 - consensus/tendermint/node_view.go | 12 +- .../priv_validator_from_tendermint.go.BK | 449 + consensus/tendermint/priv_validator_memory.go | 15 +- consensus/tendermint/sign_info.go | 52 +- consensus/tendermint/sign_info.go.bk | 237 + consensus/tendermint/tendermint.go | 15 +- consensus/tendermint/tendermint.pb.go | 545 +- consensus/tendermint/tendermint_test.go | 13 +- core/config.go | 6 +- core/kernel.go | 15 +- core/processes.go | 2 +- crypto/address.go | 3 +- crypto/crypto.go | 8 +- crypto/crypto.pb.go | 51 +- crypto/tendermint.go | 42 +- deploy/def/client.go | 5 +- deploy/jobs/jobs_proposal.go | 4 +- dump/dump.pb.go | 84 +- encoding/encoding.pb.go | 29 +- encoding/grpc.go | 44 + encoding/protobuf.go | 45 +- encoding/rlp/rlp.go | 9 +- event/pubsub/pubsub_test.go | 2 +- execution/contexts/proposal_context.go | 15 +- execution/errors/errors.pb.go | 31 +- execution/exec/block_execution_test.go | 6 +- execution/exec/exec.pb.go | 267 +- execution/exec/stream_event_test.go | 4 +- execution/execution.go | 8 +- execution/execution_test.go | 42 +- execution/names/names.pb.go | 36 +- execution/registry/registry.pb.go | 42 +- execution/state/proposals.go | 18 +- forensics/replay.go | 16 +- forensics/replay_test.go | 4 +- forensics/spin_test.go | 4 +- forensics/storage/cache_db.go | 9 +- forensics/storage/channel_iterator.go | 3 +- forensics/storage/kvcache.go | 4 +- forensics/storage/multi_iterator.go | 8 +- forensics/storage/unique_iterator.go | 4 +- genesis/spec/spec.pb.go | 58 +- go.mod | 81 +- go.sum | 719 +- integration/governance/governance_test.go | 7 +- integration/keys/keys_server_test.go | 5 +- integration/rpcinfo/info_server_test.go | 6 +- integration/rpctest/helpers.go | 13 +- js/package.json | 2 +- js/proto/acm_pb.d.ts | 30 +- js/proto/acm_pb.js | 195 +- js/proto/balance_pb.d.ts | 6 +- js/proto/balance_pb.js | 41 +- js/proto/bcm_pb.d.ts | 22 +- js/proto/bcm_pb.js | 173 +- js/proto/crypto_pb.d.ts | 16 +- js/proto/crypto_pb.js | 180 +- js/proto/dump_pb.d.ts | 28 +- js/proto/dump_pb.js | 316 +- js/proto/encoding_pb.d.ts | 6 +- js/proto/encoding_pb.js | 41 +- js/proto/errors_pb.d.ts | 6 +- js/proto/errors_pb.js | 41 +- js/proto/exec_pb.d.ts | 156 +- js/proto/exec_pb.js | 1762 ++- .../tendermint/abci/types/types_grpc_pb.d.ts | 215 - .../tendermint/abci/types/types_grpc_pb.js | 378 - .../tendermint/abci/types/types_pb.js | 9317 ------------ .../tendermint/libs/common/types_pb.d.ts | 64 - .../tendermint/libs/common/types_pb.js | 428 - .../protobuf => }/gogoproto/gogo_grpc_pb.js | 0 .../gogo/protobuf => }/gogoproto/gogo_pb.d.ts | 2 +- .../gogo/protobuf => }/gogoproto/gogo_pb.js | 3 + js/proto/google/protobuf/descriptor_pb.d.ts | 248 +- js/proto/google/protobuf/descriptor_pb.js | 3897 +++-- js/proto/google/protobuf/timestamp_pb.d.ts | 4 +- js/proto/google/protobuf/timestamp_pb.js | 50 +- js/proto/keys_grpc_pb.d.ts | 72 +- js/proto/keys_grpc_pb.js | 2 +- js/proto/keys_pb.d.ts | 82 +- js/proto/keys_pb.js | 1436 +- js/proto/names_pb.d.ts | 10 +- js/proto/names_pb.js | 55 +- js/proto/payload_pb.d.ts | 112 +- js/proto/payload_pb.js | 1434 +- js/proto/permission_pb.d.ts | 20 +- js/proto/permission_pb.js | 269 +- js/proto/registry_pb.d.ts | 10 +- js/proto/registry_pb.js | 55 +- js/proto/rpc_pb.d.ts | 18 +- js/proto/rpc_pb.js | 107 +- js/proto/rpcdump_grpc_pb.d.ts | 12 +- js/proto/rpcdump_grpc_pb.js | 2 +- js/proto/rpcdump_pb.d.ts | 4 +- js/proto/rpcdump_pb.js | 34 +- js/proto/rpcevents_grpc_pb.d.ts | 24 +- js/proto/rpcevents_grpc_pb.js | 2 +- js/proto/rpcevents_pb.d.ts | 36 +- js/proto/rpcevents_pb.js | 552 +- js/proto/rpcquery_grpc_pb.d.ts | 112 +- js/proto/rpcquery_grpc_pb.js | 20 +- js/proto/rpcquery_pb.d.ts | 56 +- js/proto/rpcquery_pb.js | 1355 +- js/proto/rpctransact_grpc_pb.d.ts | 78 +- js/proto/rpctransact_grpc_pb.js | 2 +- js/proto/rpctransact_pb.d.ts | 16 +- js/proto/rpctransact_pb.js | 204 +- js/proto/spec_pb.d.ts | 16 +- js/proto/spec_pb.js | 110 +- js/proto/storage_pb.d.ts | 6 +- js/proto/storage_pb.js | 41 +- js/proto/tendermint/abci/types_grpc_pb.d.ts | 286 + js/proto/tendermint/abci/types_grpc_pb.js | 513 + .../types => tendermint/abci}/types_pb.d.ts | 953 +- js/proto/tendermint/abci/types_pb.js | 11789 ++++++++++++++++ .../blockchain}/types_grpc_pb.js | 0 js/proto/tendermint/blockchain/types_pb.d.ts | 186 + js/proto/tendermint/blockchain/types_pb.js | 1208 ++ .../tendermint/consensus/types_grpc_pb.js | 1 + js/proto/tendermint/consensus/types_pb.d.ts | 420 + js/proto/tendermint/consensus/types_pb.js | 2855 ++++ js/proto/tendermint/consensus/wal_grpc_pb.js | 1 + js/proto/tendermint/consensus/wal_pb.d.ts | 189 + js/proto/tendermint/consensus/wal_pb.js | 1224 ++ js/proto/tendermint/crypto/keys_grpc_pb.js | 1 + js/proto/tendermint/crypto/keys_pb.d.ts | 55 + js/proto/tendermint/crypto/keys_pb.js | 312 + js/proto/tendermint/crypto/proof_grpc_pb.js | 1 + js/proto/tendermint/crypto/proof_pb.d.ts | 162 + js/proto/tendermint/crypto/proof_pb.js | 1216 ++ .../tendermint/libs/bits/types_grpc_pb.js | 1 + js/proto/tendermint/libs/bits/types_pb.d.ts | 34 + js/proto/tendermint/libs/bits/types_pb.js | 227 + js/proto/tendermint/mempool/types_grpc_pb.js | 1 + js/proto/tendermint/mempool/types_pb.d.ts | 66 + js/proto/tendermint/mempool/types_pb.js | 418 + js/proto/tendermint/p2p/conn_grpc_pb.js | 1 + js/proto/tendermint/p2p/conn_pb.d.ts | 156 + js/proto/tendermint/p2p/conn_pb.js | 1033 ++ js/proto/tendermint/p2p/pex_grpc_pb.js | 1 + js/proto/tendermint/p2p/pex_pb.d.ts | 92 + js/proto/tendermint/p2p/pex_pb.js | 577 + js/proto/tendermint/p2p/types_grpc_pb.js | 1 + js/proto/tendermint/p2p/types_pb.d.ts | 148 + js/proto/tendermint/p2p/types_pb.js | 1053 ++ js/proto/tendermint/privval/types_grpc_pb.js | 1 + js/proto/tendermint/privval/types_pb.d.ts | 345 + js/proto/tendermint/privval/types_pb.js | 2257 +++ .../tendermint/rpc/grpc/types_grpc_pb.d.ts | 60 + js/proto/tendermint/rpc/grpc/types_grpc_pb.js | 79 + js/proto/tendermint/rpc/grpc/types_pb.d.ts | 96 + js/proto/tendermint/rpc/grpc/types_pb.js | 665 + js/proto/tendermint/state/types_grpc_pb.js | 1 + js/proto/tendermint/state/types_pb.d.ts | 233 + js/proto/tendermint/state/types_pb.js | 1661 +++ .../tendermint/statesync/types_grpc_pb.js | 1 + js/proto/tendermint/statesync/types_pb.d.ts | 194 + js/proto/tendermint/statesync/types_pb.js | 1323 ++ js/proto/tendermint/store/types_grpc_pb.js | 1 + js/proto/tendermint/store/types_pb.d.ts | 32 + js/proto/tendermint/store/types_pb.js | 199 + js/proto/tendermint/types/block_grpc_pb.js | 1 + js/proto/tendermint/types/block_pb.d.ts | 55 + js/proto/tendermint/types/block_pb.js | 349 + .../tendermint/types/canonical_grpc_pb.js | 1 + js/proto/tendermint/types/canonical_pb.d.ts | 165 + js/proto/tendermint/types/canonical_pb.js | 1174 ++ js/proto/tendermint/types/events_grpc_pb.js | 1 + js/proto/tendermint/types/events_pb.d.ts | 36 + js/proto/tendermint/types/events_pb.js | 229 + js/proto/tendermint/types/evidence_grpc_pb.js | 1 + js/proto/tendermint/types/evidence_pb.d.ts | 168 + js/proto/tendermint/types/evidence_pb.js | 1137 ++ js/proto/tendermint/types/params_grpc_pb.js | 1 + js/proto/tendermint/types/params_pb.d.ts | 184 + js/proto/tendermint/types/params_pb.js | 1304 ++ js/proto/tendermint/types/types_grpc_pb.js | 1 + js/proto/tendermint/types/types_pb.d.ts | 569 + js/proto/tendermint/types/types_pb.js | 4229 ++++++ .../tendermint/types/validator_grpc_pb.js | 1 + js/proto/tendermint/types/validator_pb.d.ts | 109 + js/proto/tendermint/types/validator_pb.js | 774 + js/proto/tendermint/version/types_grpc_pb.js | 1 + js/proto/tendermint/version/types_pb.d.ts | 58 + js/proto/tendermint/version/types_pb.js | 383 + js/proto/tendermint_pb.d.ts | 18 +- js/proto/tendermint_pb.js | 83 +- js/proto/txs_pb.d.ts | 22 +- js/proto/txs_pb.js | 225 +- js/proto/validator_pb.d.ts | 8 +- js/proto/validator_pb.js | 54 +- js/src/test.ts | 1 + js/yarn.lock | 8 +- keys/filesystem_key_store.go | 1 + keys/key_client.go | 7 +- keys/keys.pb.go | 3957 +++++- keys/keys_grpc.pb.go | 458 + permission/permission.pb.go | 105 +- protobuf/acm.proto | 2 +- protobuf/balance.proto | 2 +- protobuf/bcm.proto | 4 +- protobuf/crypto.proto | 2 +- protobuf/dump.proto | 2 +- protobuf/encoding.proto | 2 +- protobuf/errors.proto | 2 +- protobuf/exec.proto | 8 +- .../tendermint/abci/types/types.proto | 317 - .../tendermint/libs/common/types.proto | 27 - .../gogo/protobuf => }/gogoproto/gogo.proto | 0 protobuf/keys.proto | 4 +- protobuf/names.proto | 2 +- protobuf/payload.proto | 5 +- protobuf/permission.proto | 3 +- protobuf/registry.proto | 6 +- protobuf/rpc.proto | 4 +- protobuf/rpcdump.proto | 4 +- protobuf/rpcevents.proto | 6 +- protobuf/rpcquery.proto | 10 +- protobuf/rpctransact.proto | 5 +- protobuf/spec.proto | 2 +- protobuf/storage.proto | 2 +- protobuf/tendermint.proto | 4 +- protobuf/txs.proto | 5 +- protobuf/validator.proto | 4 +- rpc/grpc.go | 5 +- rpc/lib/types/types.go | 4 +- rpc/result.go | 27 +- rpc/rpc.pb.go | 573 +- rpc/rpcdump/dump_server.go | 1 + rpc/rpcdump/rpcdump.pb.go | 324 +- rpc/rpcdump/rpcdump_grpc.pb.go | 126 + rpc/rpcevents/execution_events_server.go | 1 + rpc/rpcevents/rpcevents.pb.go | 447 +- rpc/rpcevents/rpcevents_grpc.pb.go | 234 + rpc/rpcquery/query_server.go | 5 +- rpc/rpcquery/rpcquery.pb.go | 3539 ++++- rpc/rpcquery/rpcquery_grpc.pb.go | 655 + rpc/rpctransact/rpctransact.pb.go | 641 +- rpc/rpctransact/rpctransact_grpc.pb.go | 525 + rpc/rpctransact/transact_server.go | 1 + rpc/service.go | 2 +- storage/prefix.go | 4 +- storage/prefix_db.go | 12 +- storage/rwtree.go | 2 +- storage/rwtree_test.go | 67 + storage/storage.pb.go | 29 +- storage/tree.go | 2 +- tests/test_runner.sh | 7 +- txs/payload/payload.go | 26 +- txs/payload/payload.pb.go | 463 +- txs/payload/payload_test.go | 35 + txs/payload/proposal_tx.go | 47 - txs/protobuf_codec_test.go | 6 +- txs/txs.pb.go | 119 +- vent/service/block_consumer_test.go | 4 +- vent/service/consumer.go | 4 +- vent/test/events.go | 5 +- 276 files changed, 64228 insertions(+), 20084 deletions(-) delete mode 100644 consensus/tendermint/amino.go create mode 100644 consensus/tendermint/priv_validator_from_tendermint.go.BK create mode 100644 consensus/tendermint/sign_info.go.bk create mode 100644 encoding/grpc.go delete mode 100644 js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.d.ts delete mode 100644 js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.js delete mode 100644 js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js delete mode 100644 js/proto/github.com/tendermint/tendermint/libs/common/types_pb.d.ts delete mode 100644 js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js rename js/proto/{github.com/gogo/protobuf => }/gogoproto/gogo_grpc_pb.js (100%) rename js/proto/{github.com/gogo/protobuf => }/gogoproto/gogo_pb.d.ts (98%) rename js/proto/{github.com/gogo/protobuf => }/gogoproto/gogo_pb.js (99%) create mode 100644 js/proto/tendermint/abci/types_grpc_pb.d.ts create mode 100644 js/proto/tendermint/abci/types_grpc_pb.js rename js/proto/{github.com/tendermint/tendermint/abci/types => tendermint/abci}/types_pb.d.ts (59%) create mode 100644 js/proto/tendermint/abci/types_pb.js rename js/proto/{github.com/tendermint/tendermint/libs/common => tendermint/blockchain}/types_grpc_pb.js (100%) create mode 100644 js/proto/tendermint/blockchain/types_pb.d.ts create mode 100644 js/proto/tendermint/blockchain/types_pb.js create mode 100644 js/proto/tendermint/consensus/types_grpc_pb.js create mode 100644 js/proto/tendermint/consensus/types_pb.d.ts create mode 100644 js/proto/tendermint/consensus/types_pb.js create mode 100644 js/proto/tendermint/consensus/wal_grpc_pb.js create mode 100644 js/proto/tendermint/consensus/wal_pb.d.ts create mode 100644 js/proto/tendermint/consensus/wal_pb.js create mode 100644 js/proto/tendermint/crypto/keys_grpc_pb.js create mode 100644 js/proto/tendermint/crypto/keys_pb.d.ts create mode 100644 js/proto/tendermint/crypto/keys_pb.js create mode 100644 js/proto/tendermint/crypto/proof_grpc_pb.js create mode 100644 js/proto/tendermint/crypto/proof_pb.d.ts create mode 100644 js/proto/tendermint/crypto/proof_pb.js create mode 100644 js/proto/tendermint/libs/bits/types_grpc_pb.js create mode 100644 js/proto/tendermint/libs/bits/types_pb.d.ts create mode 100644 js/proto/tendermint/libs/bits/types_pb.js create mode 100644 js/proto/tendermint/mempool/types_grpc_pb.js create mode 100644 js/proto/tendermint/mempool/types_pb.d.ts create mode 100644 js/proto/tendermint/mempool/types_pb.js create mode 100644 js/proto/tendermint/p2p/conn_grpc_pb.js create mode 100644 js/proto/tendermint/p2p/conn_pb.d.ts create mode 100644 js/proto/tendermint/p2p/conn_pb.js create mode 100644 js/proto/tendermint/p2p/pex_grpc_pb.js create mode 100644 js/proto/tendermint/p2p/pex_pb.d.ts create mode 100644 js/proto/tendermint/p2p/pex_pb.js create mode 100644 js/proto/tendermint/p2p/types_grpc_pb.js create mode 100644 js/proto/tendermint/p2p/types_pb.d.ts create mode 100644 js/proto/tendermint/p2p/types_pb.js create mode 100644 js/proto/tendermint/privval/types_grpc_pb.js create mode 100644 js/proto/tendermint/privval/types_pb.d.ts create mode 100644 js/proto/tendermint/privval/types_pb.js create mode 100644 js/proto/tendermint/rpc/grpc/types_grpc_pb.d.ts create mode 100644 js/proto/tendermint/rpc/grpc/types_grpc_pb.js create mode 100644 js/proto/tendermint/rpc/grpc/types_pb.d.ts create mode 100644 js/proto/tendermint/rpc/grpc/types_pb.js create mode 100644 js/proto/tendermint/state/types_grpc_pb.js create mode 100644 js/proto/tendermint/state/types_pb.d.ts create mode 100644 js/proto/tendermint/state/types_pb.js create mode 100644 js/proto/tendermint/statesync/types_grpc_pb.js create mode 100644 js/proto/tendermint/statesync/types_pb.d.ts create mode 100644 js/proto/tendermint/statesync/types_pb.js create mode 100644 js/proto/tendermint/store/types_grpc_pb.js create mode 100644 js/proto/tendermint/store/types_pb.d.ts create mode 100644 js/proto/tendermint/store/types_pb.js create mode 100644 js/proto/tendermint/types/block_grpc_pb.js create mode 100644 js/proto/tendermint/types/block_pb.d.ts create mode 100644 js/proto/tendermint/types/block_pb.js create mode 100644 js/proto/tendermint/types/canonical_grpc_pb.js create mode 100644 js/proto/tendermint/types/canonical_pb.d.ts create mode 100644 js/proto/tendermint/types/canonical_pb.js create mode 100644 js/proto/tendermint/types/events_grpc_pb.js create mode 100644 js/proto/tendermint/types/events_pb.d.ts create mode 100644 js/proto/tendermint/types/events_pb.js create mode 100644 js/proto/tendermint/types/evidence_grpc_pb.js create mode 100644 js/proto/tendermint/types/evidence_pb.d.ts create mode 100644 js/proto/tendermint/types/evidence_pb.js create mode 100644 js/proto/tendermint/types/params_grpc_pb.js create mode 100644 js/proto/tendermint/types/params_pb.d.ts create mode 100644 js/proto/tendermint/types/params_pb.js create mode 100644 js/proto/tendermint/types/types_grpc_pb.js create mode 100644 js/proto/tendermint/types/types_pb.d.ts create mode 100644 js/proto/tendermint/types/types_pb.js create mode 100644 js/proto/tendermint/types/validator_grpc_pb.js create mode 100644 js/proto/tendermint/types/validator_pb.d.ts create mode 100644 js/proto/tendermint/types/validator_pb.js create mode 100644 js/proto/tendermint/version/types_grpc_pb.js create mode 100644 js/proto/tendermint/version/types_pb.d.ts create mode 100644 js/proto/tendermint/version/types_pb.js create mode 100644 keys/keys_grpc.pb.go delete mode 100644 protobuf/github.com/tendermint/tendermint/abci/types/types.proto delete mode 100644 protobuf/github.com/tendermint/tendermint/libs/common/types.proto rename protobuf/{github.com/gogo/protobuf => }/gogoproto/gogo.proto (100%) create mode 100644 rpc/rpcdump/rpcdump_grpc.pb.go create mode 100644 rpc/rpcevents/rpcevents_grpc.pb.go create mode 100644 rpc/rpcquery/rpcquery_grpc.pb.go create mode 100644 rpc/rpctransact/rpctransact_grpc.pb.go create mode 100644 txs/payload/payload_test.go diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index b07e34c7e..c156dfc5e 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 id: go - uses: actions/checkout@v2 - run: make test diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 909ab799d..a98a27c21 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,7 +13,7 @@ jobs: - run: git fetch --prune --unshallow - uses: actions/setup-go@v1 with: - go-version: 1.13.x + go-version: 1.15 - uses: goreleaser/goreleaser-action@v1 with: version: latest @@ -30,7 +30,7 @@ jobs: - run: git fetch --unshallow --prune - uses: actions/setup-node@v1 with: - node-version: '12.x' + node-version: '14.x' - run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10} - name: publish env: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 716482e7f..c92911b1d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 id: go - uses: actions/checkout@v2 - run: git fetch --unshallow --prune @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.15 id: go - uses: actions/checkout@v1 - run: make test_integration @@ -66,9 +66,9 @@ jobs: needs: unit steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: - node-version: '14.x' + node-version: '14' - uses: actions/download-artifact@master with: name: burrow @@ -114,9 +114,9 @@ jobs: needs: unit steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: - node-version: '14.x' + node-version: '14' - uses: actions/download-artifact@master with: name: burrow diff --git a/Makefile b/Makefile index 33433e2fe..da5c66163 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,13 @@ BURROW_TS_PATH = ./js PROTO_GEN_TS_PATH = ${BURROW_TS_PATH}/proto NODE_BIN = ${BURROW_TS_PATH}/node_modules/.bin -PROTO_FILES = $(shell find . -path $(BURROW_TS_PATH) -prune -o -path ./node_modules -prune -o -type f -name '*.proto' -print) +# To access Tendermint bundled protobuf files from go module cache +TENDERMINT_MOD=github.com/tendermint/tendermint +TENDERMINT_VERSION=$(shell go list -m -f '{{ .Version }}' $(TENDERMINT_MOD)) +TENDERMINT_SRC=$(shell go env GOMODCACHE)/$(TENDERMINT_MOD)@$(TENDERMINT_VERSION) +TENDERMINT_PROTO=$(TENDERMINT_SRC)/proto + +PROTO_FILES = $(shell find . $(TENDERMINT_PROTO) -path $(BURROW_TS_PATH) -prune -o -path ./node_modules -prune -o -type f -name '*.proto' -print) PROTO_GO_FILES = $(patsubst %.proto, %.pb.go, $(PROTO_FILES)) PROTO_GO_FILES_REAL = $(shell find . -type f -name '*.pb.go' -print) PROTO_TS_FILES = $(patsubst %.proto, %.pb.ts, $(PROTO_FILES)) @@ -88,11 +94,12 @@ protobuf: $(PROTO_GO_FILES) $(PROTO_TS_FILES) fix # Implicit compile rule for GRPC/proto files (note since pb.go files no longer generated # in same directory as proto file this just regenerates everything %.pb.go: %.proto - protoc -I ./protobuf $< --gogo_out=plugins=grpc:${GOPATH}/src + protoc -I ./protobuf -I $(TENDERMINT_PROTO) $< --gogo_out=${GOPATH}/src --go-grpc_out=${GOPATH}/src # Using this: https://github.com/agreatfool/grpc_tools_node_protoc_ts %.pb.ts: %.proto - $(NODE_BIN)/grpc_tools_node_protoc -I protobuf \ + mkdir -p $(PROTO_GEN_TS_PATH) + $(NODE_BIN)/grpc_tools_node_protoc -I protobuf -I $(TENDERMINT_PROTO) \ --plugin="protoc-gen-ts=$(NODE_BIN)/protoc-gen-ts" \ --js_out="import_style=commonjs,binary:${PROTO_GEN_TS_PATH}" \ --ts_out="generate_package_definition:${PROTO_GEN_TS_PATH}" \ diff --git a/acm/acm.pb.go b/acm/acm.pb.go index 327221c1e..03f7ac130 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -194,39 +194,39 @@ func init() { proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } func init() { golang_proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } var fileDescriptor_49ed775bc0a6adf6 = []byte{ - // 506 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x31, 0x6f, 0xd3, 0x40, - 0x18, 0xed, 0x35, 0x69, 0xe3, 0x5c, 0x22, 0x54, 0x6e, 0x3a, 0x65, 0x70, 0x4c, 0xa7, 0x08, 0x35, - 0x0e, 0x02, 0xb2, 0x84, 0x29, 0xae, 0xa8, 0x2a, 0x41, 0xa3, 0xe2, 0x4a, 0x45, 0xb0, 0x9d, 0xcf, - 0x1f, 0x89, 0xa5, 0xd8, 0x67, 0xce, 0x67, 0xc0, 0x3f, 0x81, 0x7f, 0xc0, 0xc8, 0x4f, 0x61, 0xcc, - 0xc8, 0x58, 0x31, 0x44, 0x28, 0xdd, 0xfa, 0x2b, 0x90, 0x2f, 0x8e, 0x71, 0x3a, 0x54, 0x82, 0x6e, - 0x79, 0x79, 0xef, 0x7b, 0xef, 0xdd, 0xdd, 0x67, 0xdc, 0x64, 0x3c, 0xb4, 0x63, 0x29, 0x94, 0x20, - 0x35, 0xc6, 0xc3, 0x4e, 0x7f, 0x1a, 0xa8, 0x59, 0xea, 0xd9, 0x5c, 0x84, 0x83, 0xa9, 0x98, 0x8a, - 0x81, 0xe6, 0xbc, 0xf4, 0x83, 0x46, 0x1a, 0xe8, 0x5f, 0xeb, 0x99, 0xce, 0x41, 0x0c, 0x32, 0x0c, - 0x92, 0x24, 0x10, 0x51, 0xf1, 0x4f, 0x9b, 0xcb, 0x2c, 0x56, 0x05, 0x7f, 0xf8, 0x75, 0x0f, 0x37, - 0xc6, 0x9c, 0x8b, 0x34, 0x52, 0x64, 0x82, 0x1b, 0x63, 0xdf, 0x97, 0x90, 0x24, 0x14, 0x59, 0xa8, - 0xd7, 0x76, 0x9e, 0x2f, 0x96, 0xdd, 0x9d, 0x5f, 0xcb, 0xee, 0x51, 0x25, 0x73, 0x96, 0xc5, 0x20, - 0xe7, 0xe0, 0x4f, 0x41, 0x0e, 0xbc, 0x54, 0x4a, 0xf1, 0x79, 0x50, 0x18, 0x16, 0xb3, 0xee, 0xc6, - 0x84, 0x0c, 0x71, 0xf3, 0x3c, 0xf5, 0xe6, 0x01, 0x7f, 0x05, 0x19, 0xdd, 0xb5, 0x50, 0xaf, 0xf5, - 0xf4, 0xa1, 0x5d, 0x88, 0x4b, 0xc2, 0xa9, 0xe7, 0x21, 0xee, 0x5f, 0x25, 0xe9, 0x60, 0xe3, 0x02, - 0x3e, 0xa6, 0x10, 0x71, 0xa0, 0x35, 0x0b, 0xf5, 0xea, 0x6e, 0x89, 0x09, 0xc5, 0x0d, 0x87, 0xcd, - 0x59, 0x4e, 0xd5, 0x35, 0xb5, 0x81, 0xe4, 0x31, 0x6e, 0xbc, 0xbc, 0x3c, 0x3b, 0x16, 0x3e, 0xd0, - 0x3d, 0x5d, 0xfe, 0xa0, 0x28, 0x6f, 0x38, 0x99, 0x02, 0x2e, 0x7c, 0x70, 0x37, 0x02, 0x72, 0x82, - 0x5b, 0xe7, 0xe5, 0xb5, 0x24, 0x74, 0x5f, 0x57, 0x33, 0xed, 0xca, 0x55, 0x15, 0x57, 0x52, 0x51, - 0x15, 0x3d, 0xab, 0x83, 0x64, 0x84, 0x8d, 0xb7, 0xe3, 0x8b, 0x75, 0x68, 0x43, 0x87, 0x9a, 0xb7, - 0x43, 0x6f, 0x96, 0x5d, 0x7c, 0x24, 0xc2, 0x40, 0x41, 0x18, 0xab, 0xcc, 0x2d, 0xf5, 0xc4, 0xc6, - 0x78, 0xc2, 0x54, 0xf0, 0x09, 0x26, 0x2c, 0x04, 0xda, 0xb2, 0x50, 0xaf, 0xe9, 0x3c, 0xb8, 0xa5, - 0xae, 0x28, 0xc8, 0x25, 0x36, 0xf2, 0xb9, 0x53, 0x96, 0xcc, 0xa8, 0xa1, 0xb3, 0x46, 0x45, 0x56, - 0xff, 0xee, 0xd7, 0xf1, 0x82, 0x88, 0xc9, 0xcc, 0x3e, 0x85, 0x2f, 0x79, 0xa7, 0xe4, 0x66, 0xd9, - 0x45, 0x7d, 0xb7, 0xf4, 0x22, 0x43, 0xdc, 0x3e, 0x16, 0x91, 0x92, 0x8c, 0xab, 0x33, 0x50, 0x8c, - 0x36, 0xad, 0x9a, 0x7e, 0xa7, 0x7c, 0xed, 0xaa, 0x84, 0xbb, 0x25, 0x23, 0xaf, 0xb1, 0x71, 0x22, - 0x24, 0x78, 0xc0, 0x24, 0xc5, 0xba, 0xce, 0x93, 0x7f, 0x5e, 0x94, 0xd2, 0x61, 0x54, 0xff, 0xf6, - 0xbd, 0xbb, 0x73, 0x78, 0x85, 0xb6, 0xbb, 0x90, 0x37, 0x95, 0x33, 0xaf, 0x37, 0x72, 0xf8, 0x5f, - 0x67, 0xae, 0x1c, 0xf7, 0x1d, 0x6e, 0xe7, 0xd6, 0x3e, 0x53, 0x4c, 0xdb, 0xee, 0xde, 0xc7, 0x76, - 0xcb, 0x2a, 0xdf, 0xdb, 0x0d, 0xd6, 0x7b, 0xdb, 0x74, 0x4b, 0xec, 0xbc, 0x58, 0xac, 0x4c, 0xf4, - 0x73, 0x65, 0xa2, 0xab, 0x95, 0x89, 0x7e, 0xaf, 0x4c, 0xf4, 0xe3, 0xda, 0x44, 0x8b, 0x6b, 0x13, - 0xbd, 0x7f, 0x74, 0x77, 0x24, 0xe3, 0xa1, 0xb7, 0xaf, 0x3f, 0xd5, 0x67, 0x7f, 0x02, 0x00, 0x00, - 0xff, 0xff, 0xa2, 0x2c, 0x48, 0xa4, 0x0b, 0x04, 0x00, 0x00, + // 501 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x41, 0x6f, 0xd3, 0x4c, + 0x10, 0xed, 0x36, 0x69, 0xe3, 0x6c, 0xa2, 0x4f, 0xfd, 0x56, 0x1c, 0x56, 0x39, 0xd8, 0xa6, 0xa7, + 0x08, 0xb5, 0x0e, 0x02, 0x72, 0x09, 0xa7, 0xb8, 0xa2, 0xaa, 0x04, 0x8d, 0x8a, 0x2b, 0x15, 0xc1, + 0x6d, 0xbd, 0x1e, 0x25, 0x96, 0x62, 0xaf, 0x59, 0xaf, 0x01, 0xff, 0x04, 0xfe, 0x01, 0x47, 0x7e, + 0x0a, 0xc7, 0x1c, 0x39, 0x56, 0x1c, 0x22, 0x94, 0xde, 0xfa, 0x2b, 0x90, 0x37, 0x8e, 0x71, 0x7a, + 0xa8, 0x04, 0xdc, 0x32, 0x79, 0x6f, 0xde, 0x7b, 0x33, 0x3b, 0xc6, 0x6d, 0xc6, 0x23, 0x27, 0x91, + 0x42, 0x09, 0xd2, 0x60, 0x3c, 0xea, 0x3d, 0x98, 0x8a, 0xa9, 0xd0, 0xf5, 0xa0, 0xf8, 0xb5, 0x86, + 0x7a, 0x07, 0x09, 0xc8, 0x28, 0x4c, 0xd3, 0x50, 0xc4, 0xe5, 0x3f, 0x5d, 0x2e, 0xf3, 0x44, 0x95, + 0xf8, 0xe1, 0xe7, 0x3d, 0xdc, 0x1a, 0x73, 0x2e, 0xb2, 0x58, 0x91, 0x09, 0x6e, 0x8d, 0x83, 0x40, + 0x42, 0x9a, 0x52, 0x64, 0xa3, 0x7e, 0xd7, 0x7d, 0xb6, 0x58, 0x5a, 0x3b, 0x3f, 0x96, 0xd6, 0xd1, + 0x34, 0x54, 0xb3, 0xcc, 0x77, 0xb8, 0x88, 0x06, 0xb3, 0x3c, 0x01, 0x39, 0x87, 0x60, 0x0a, 0x72, + 0xe0, 0x67, 0x52, 0x8a, 0x8f, 0x83, 0x52, 0xb0, 0xec, 0xf5, 0x36, 0x22, 0x64, 0x88, 0xdb, 0x17, + 0x99, 0x3f, 0x0f, 0xf9, 0x4b, 0xc8, 0xe9, 0xae, 0x8d, 0xfa, 0x9d, 0x27, 0xff, 0x3b, 0x25, 0xb9, + 0x02, 0xdc, 0x66, 0x61, 0xe2, 0xfd, 0x66, 0x92, 0x1e, 0x36, 0x2e, 0xe1, 0x7d, 0x06, 0x31, 0x07, + 0xda, 0xb0, 0x51, 0xbf, 0xe9, 0x55, 0x35, 0xa1, 0xb8, 0xe5, 0xb2, 0x39, 0x2b, 0xa0, 0xa6, 0x86, + 0x36, 0x25, 0x79, 0x84, 0x5b, 0x2f, 0xae, 0xce, 0x4f, 0x44, 0x00, 0x74, 0x4f, 0x87, 0x3f, 0x28, + 0xc3, 0x1b, 0x6e, 0xae, 0x80, 0x8b, 0x00, 0xbc, 0x0d, 0x81, 0x9c, 0xe2, 0xce, 0x45, 0xb5, 0x96, + 0x94, 0xee, 0xeb, 0x68, 0xa6, 0x53, 0x5b, 0x55, 0xb9, 0x92, 0x1a, 0xab, 0xcc, 0x59, 0x6f, 0x24, + 0x23, 0x6c, 0xbc, 0x19, 0x5f, 0xae, 0x4d, 0x5b, 0xda, 0xd4, 0xbc, 0x6b, 0x7a, 0xbb, 0xb4, 0xf0, + 0x91, 0x88, 0x42, 0x05, 0x51, 0xa2, 0x72, 0xaf, 0xe2, 0x13, 0x07, 0xe3, 0x09, 0x53, 0xe1, 0x07, + 0x98, 0xb0, 0x08, 0x68, 0xc7, 0x46, 0xfd, 0xb6, 0xfb, 0xdf, 0x1d, 0x76, 0x8d, 0x41, 0xae, 0xb0, + 0x51, 0xf4, 0x9d, 0xb1, 0x74, 0x46, 0x0d, 0xed, 0x35, 0x2a, 0xbd, 0x8e, 0xef, 0x7f, 0x1d, 0x3f, + 0x8c, 0x99, 0xcc, 0x9d, 0x33, 0xf8, 0x54, 0x64, 0x4a, 0x6f, 0x97, 0x16, 0x3a, 0xf6, 0x2a, 0x2d, + 0x32, 0xc4, 0xdd, 0x13, 0x11, 0x2b, 0xc9, 0xb8, 0x3a, 0x07, 0xc5, 0x68, 0xdb, 0x6e, 0xe8, 0x77, + 0x2a, 0xae, 0xab, 0x0e, 0x78, 0x5b, 0x34, 0xf2, 0x0a, 0x1b, 0xa7, 0x42, 0x82, 0x0f, 0x4c, 0x52, + 0xac, 0xe3, 0x3c, 0xfe, 0xe3, 0x43, 0xa9, 0x14, 0x46, 0xcd, 0x2f, 0x5f, 0xad, 0x9d, 0xc3, 0x6b, + 0xb4, 0x9d, 0x85, 0xbc, 0xae, 0xcd, 0xbc, 0xbe, 0xc8, 0xe1, 0x5f, 0xcd, 0x5c, 0x1b, 0xf7, 0x2d, + 0xee, 0x16, 0xd2, 0x01, 0x53, 0x4c, 0xcb, 0xee, 0xfe, 0x8b, 0xec, 0x96, 0x54, 0x71, 0xb7, 0x9b, + 0x5a, 0xdf, 0x6d, 0xdb, 0xab, 0x6a, 0xf7, 0xf9, 0x62, 0x65, 0xa2, 0xef, 0x2b, 0x13, 0x5d, 0xaf, + 0x4c, 0xf4, 0x73, 0x65, 0xa2, 0x6f, 0x37, 0x26, 0x5a, 0xdc, 0x98, 0xe8, 0xdd, 0xc3, 0xfb, 0x2d, + 0x19, 0x8f, 0xfc, 0x7d, 0xfd, 0xa9, 0x3e, 0xfd, 0x15, 0x00, 0x00, 0xff, 0xff, 0x16, 0x20, 0x3b, + 0x5c, 0xf2, 0x03, 0x00, 0x00, } func (m *Account) Marshal() (dAtA []byte, err error) { @@ -866,10 +866,7 @@ func (m *Account) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthAcm - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAcm } if (iNdEx + skippy) > l { @@ -1018,10 +1015,7 @@ func (m *ContractMeta) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthAcm - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAcm } if (iNdEx + skippy) > l { diff --git a/acm/balance/balance.pb.go b/acm/balance/balance.pb.go index 167ba01f9..6aa7853a2 100644 --- a/acm/balance/balance.pb.go +++ b/acm/balance/balance.pb.go @@ -86,20 +86,19 @@ func init() { proto.RegisterFile("balance.proto", fileDescriptor_ee25a00b628521b func init() { golang_proto.RegisterFile("balance.proto", fileDescriptor_ee25a00b628521b1) } var fileDescriptor_ee25a00b628521b1 = []byte{ - // 199 bytes of a gzipped FileDescriptorProto + // 190 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0x4a, 0xcc, 0x49, - 0xcc, 0x4b, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x74, 0xd3, - 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, - 0xf2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x29, 0xf9, 0x72, 0xb1, 0x3b, - 0x41, 0x74, 0x0a, 0xc9, 0x70, 0xb1, 0x84, 0x54, 0x16, 0xa4, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0xf0, - 0x3a, 0x71, 0xfc, 0xba, 0x27, 0x0f, 0xe6, 0x07, 0x81, 0x49, 0x21, 0x31, 0x2e, 0x36, 0xc7, 0xdc, - 0xfc, 0xd2, 0xbc, 0x12, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x96, 0x20, 0x28, 0xcf, 0x8a, 0x67, 0xc6, - 0x02, 0x79, 0x86, 0x09, 0x8b, 0xe4, 0x19, 0x66, 0x2c, 0x92, 0x67, 0x70, 0x72, 0x3e, 0xf1, 0x48, - 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x1b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x3c, 0xf0, - 0x58, 0x8e, 0xf1, 0xc4, 0x63, 0x39, 0xc6, 0x28, 0x4d, 0x24, 0x77, 0x65, 0x54, 0x16, 0xa4, 0x16, - 0xe5, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x27, 0x95, 0x16, 0x15, 0xe5, 0x97, 0xeb, 0x27, 0x26, - 0xe7, 0xea, 0x43, 0xbd, 0x90, 0xc4, 0x06, 0x76, 0x9a, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xcb, - 0xf5, 0xf6, 0x66, 0xe3, 0x00, 0x00, 0x00, + 0xcc, 0x4b, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x44, 0xd2, + 0xf3, 0xd3, 0xf3, 0xc1, 0x62, 0xfa, 0x20, 0x16, 0x44, 0x5a, 0xc9, 0x97, 0x8b, 0xdd, 0x09, 0xa2, + 0x40, 0x48, 0x86, 0x8b, 0x25, 0xa4, 0xb2, 0x20, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0xd7, 0x89, + 0xe3, 0xd7, 0x3d, 0x79, 0x30, 0x3f, 0x08, 0x4c, 0x0a, 0x89, 0x71, 0xb1, 0x39, 0xe6, 0xe6, 0x97, + 0xe6, 0x95, 0x48, 0x30, 0x29, 0x30, 0x6a, 0xb0, 0x04, 0x41, 0x79, 0x56, 0x3c, 0x33, 0x16, 0xc8, + 0x33, 0x4c, 0x58, 0x24, 0xcf, 0x30, 0x63, 0x91, 0x3c, 0x83, 0x93, 0xf3, 0x89, 0x47, 0x72, 0x8c, + 0x17, 0x1e, 0xc9, 0x31, 0xde, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x81, 0xc7, 0x72, + 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x46, 0x69, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, + 0xe7, 0xea, 0x67, 0x54, 0x16, 0xa4, 0x16, 0xe5, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x27, 0x95, + 0x16, 0x15, 0xe5, 0x97, 0xeb, 0x27, 0x26, 0xe7, 0xea, 0x43, 0x5d, 0x9a, 0xc4, 0x06, 0x76, 0x9a, + 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x53, 0xf0, 0x13, 0xca, 0x00, 0x00, 0x00, } func (m *Balance) Marshal() (dAtA []byte, err error) { @@ -247,10 +246,7 @@ func (m *Balance) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthBalance - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthBalance } if (iNdEx + skippy) > l { diff --git a/acm/validator/validator.pb.go b/acm/validator/validator.pb.go index 0f22a9fbf..1ba583224 100644 --- a/acm/validator/validator.pb.go +++ b/acm/validator/validator.pb.go @@ -5,6 +5,7 @@ package validator import ( fmt "fmt" + io "io" math "math" math_bits "math/bits" @@ -42,16 +43,21 @@ func (*Validator) Descriptor() ([]byte, []int) { return fileDescriptor_bf1c6ec7c0d80dd5, []int{0} } func (m *Validator) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Validator.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Validator.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *Validator) XXX_Merge(src proto.Message) { xxx_messageInfo_Validator.Merge(m, src) } func (m *Validator) XXX_Size() int { - return xxx_messageInfo_Validator.Size(m) + return m.Size() } func (m *Validator) XXX_DiscardUnknown() { xxx_messageInfo_Validator.DiscardUnknown(m) @@ -88,21 +94,86 @@ var fileDescriptor_bf1c6ec7c0d80dd5 = []byte{ // 238 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x4b, 0xcc, 0xc9, 0x4c, 0x49, 0x2c, 0xc9, 0x2f, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x48, - 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, - 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0x29, 0xc5, 0x93, - 0x5c, 0x54, 0x59, 0x50, 0x02, 0xe5, 0x29, 0xad, 0x62, 0xe4, 0xe2, 0x0c, 0x83, 0x19, 0x25, 0xe4, - 0xc5, 0xc5, 0xee, 0x98, 0x92, 0x52, 0x94, 0x5a, 0x5c, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe3, - 0x64, 0x70, 0xeb, 0x9e, 0xbc, 0x0e, 0x92, 0xf9, 0x19, 0x95, 0x05, 0xa9, 0x45, 0x39, 0xa9, 0x29, - 0xe9, 0xa9, 0x45, 0xfa, 0x49, 0xa5, 0x45, 0x45, 0xf9, 0xe5, 0xfa, 0x50, 0xe3, 0xa0, 0xfa, 0x82, - 0x60, 0x06, 0x08, 0x99, 0x72, 0x71, 0x06, 0x94, 0x26, 0xe5, 0x64, 0x26, 0x7b, 0xa7, 0x56, 0x4a, - 0x30, 0x29, 0x30, 0x6a, 0x70, 0x1b, 0x09, 0xea, 0x41, 0x15, 0xc3, 0x25, 0x9c, 0x58, 0x4e, 0xdc, - 0x93, 0x67, 0x08, 0x42, 0xa8, 0x14, 0x12, 0xe1, 0x62, 0x0d, 0xc8, 0x2f, 0x4f, 0x2d, 0x92, 0x60, - 0x56, 0x60, 0xd4, 0x60, 0x09, 0x82, 0x70, 0xac, 0x58, 0x66, 0x2c, 0x90, 0x67, 0x70, 0xb2, 0xbd, - 0xf1, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x03, 0x8f, 0xe5, 0x18, 0x4f, 0x3c, 0x96, 0x63, - 0x8c, 0xd2, 0xc6, 0xef, 0xb6, 0xc4, 0xe4, 0x5c, 0x7d, 0x78, 0x40, 0x25, 0xb1, 0x81, 0xbd, 0x6c, - 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xcf, 0xfa, 0x61, 0xd2, 0x4d, 0x01, 0x00, 0x00, + 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x45, 0xf5, 0x41, 0x2c, 0x88, 0x02, 0x29, 0x9e, 0xe4, 0xa2, + 0xca, 0x82, 0x12, 0x28, 0x4f, 0x69, 0x15, 0x23, 0x17, 0x67, 0x18, 0x4c, 0x87, 0x90, 0x17, 0x17, + 0xbb, 0x63, 0x4a, 0x4a, 0x51, 0x6a, 0x71, 0xb1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x8f, 0x93, 0xc1, + 0xad, 0x7b, 0xf2, 0x3a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x19, + 0x95, 0x05, 0xa9, 0x45, 0x39, 0xa9, 0x29, 0xe9, 0xa9, 0x45, 0xfa, 0x49, 0xa5, 0x45, 0x45, 0xf9, + 0xe5, 0xfa, 0x50, 0xe3, 0xa0, 0xfa, 0x82, 0x60, 0x06, 0x08, 0x99, 0x72, 0x71, 0x06, 0x94, 0x26, + 0xe5, 0x64, 0x26, 0x7b, 0xa7, 0x56, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x1b, 0x09, 0xea, 0x41, + 0x15, 0xc3, 0x25, 0x9c, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x42, 0xa8, 0x14, 0x12, 0xe1, 0x62, + 0x0d, 0xc8, 0x2f, 0x4f, 0x2d, 0x92, 0x60, 0x56, 0x60, 0xd4, 0x60, 0x09, 0x82, 0x70, 0xac, 0x58, + 0x66, 0x2c, 0x90, 0x67, 0x70, 0x72, 0x3d, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x1b, + 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x3c, 0xf0, 0x58, 0x8e, 0xf1, 0xc4, 0x63, 0x39, 0xc6, + 0x28, 0x6d, 0xfc, 0x6e, 0x4c, 0x4c, 0xce, 0xd5, 0x87, 0x87, 0x4b, 0x12, 0x1b, 0xd8, 0xeb, 0xc6, + 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0xd3, 0x94, 0x44, 0x3c, 0x01, 0x00, 0x00, +} + +func (m *Validator) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } +func (m *Validator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Power != 0 { + i = encodeVarintValidator(dAtA, i, uint64(m.Power)) + i-- + dAtA[i] = 0x18 + } + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintValidator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Address != nil { + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintValidator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintValidator(dAtA []byte, offset int, v uint64) int { + offset -= sovValidator(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} func (m *Validator) Size() (n int) { if m == nil { return 0 @@ -130,3 +201,225 @@ func sovValidator(x uint64) (n int) { func sozValidator(x uint64) (n int) { return sovValidator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *Validator) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Validator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthValidator + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_hyperledger_burrow_crypto.Address + m.Address = &v + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthValidator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) + } + m.Power = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Power |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipValidator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipValidator(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowValidator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowValidator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowValidator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthValidator + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupValidator + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthValidator + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthValidator = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowValidator = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupValidator = fmt.Errorf("proto: unexpected end of group") +) diff --git a/bcm/bcm.pb.go b/bcm/bcm.pb.go index c0fc0afdf..46c0808c2 100644 --- a/bcm/bcm.pb.go +++ b/bcm/bcm.pb.go @@ -33,7 +33,7 @@ var _ = time.Kitchen const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type SyncInfo struct { - LatestBlockHeight uint64 `protobuf:"varint,1,opt,name=LatestBlockHeight,proto3" json:""` + LatestBlockHeight uint64 `protobuf:"varint,1,opt,name=LatestBlockHeight,proto3" json:"LatestBlockHeight,omitempty"` LatestBlockHash github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,2,opt,name=LatestBlockHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"LatestBlockHash"` LatestAppHash github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,3,opt,name=LatestAppHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"LatestAppHash"` // Timestamp of block as set by the block proposer @@ -175,35 +175,34 @@ func init() { proto.RegisterFile("bcm.proto", fileDescriptor_0c9ff3e1ca1cc0f1) } func init() { golang_proto.RegisterFile("bcm.proto", fileDescriptor_0c9ff3e1ca1cc0f1) } var fileDescriptor_0c9ff3e1ca1cc0f1 = []byte{ - // 437 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x3d, 0x8f, 0x94, 0x40, - 0x18, 0xc7, 0x6f, 0x76, 0xf1, 0x72, 0xce, 0xf9, 0x12, 0xc7, 0x98, 0xe0, 0x16, 0xb0, 0x5e, 0x45, - 0x23, 0x24, 0x67, 0xac, 0xac, 0x8e, 0x98, 0x78, 0x9a, 0x8b, 0x31, 0xec, 0xa9, 0x89, 0x16, 0x06, - 0xd8, 0x67, 0x61, 0x72, 0x0b, 0x43, 0x66, 0x86, 0x28, 0xdf, 0xc2, 0xd2, 0x8f, 0x63, 0xb9, 0x85, - 0x85, 0xa5, 0xb1, 0x58, 0x0d, 0xd7, 0xf9, 0x15, 0x6c, 0x0c, 0x03, 0x44, 0xe0, 0x2e, 0x31, 0xeb, - 0x76, 0x3c, 0x6f, 0x3f, 0xe6, 0xf9, 0x3f, 0x7f, 0x7c, 0x35, 0x08, 0x13, 0x3b, 0xe3, 0x4c, 0x32, - 0x32, 0x0e, 0xc2, 0x64, 0x72, 0x3f, 0xa2, 0x32, 0xce, 0x03, 0x3b, 0x64, 0x89, 0x13, 0xb1, 0x88, - 0x39, 0xaa, 0x16, 0xe4, 0x0b, 0x15, 0xa9, 0x40, 0x7d, 0xd5, 0x33, 0x13, 0x33, 0x62, 0x2c, 0x5a, - 0xc2, 0xdf, 0x2e, 0x49, 0x13, 0x10, 0xd2, 0x4f, 0xb2, 0xa6, 0xc1, 0x18, 0x36, 0xcc, 0x73, 0xee, - 0x4b, 0xca, 0xd2, 0xba, 0x7e, 0xf0, 0x7b, 0x8c, 0xf7, 0x66, 0x45, 0x1a, 0x3e, 0x4d, 0x17, 0x8c, - 0x1c, 0xe2, 0x5b, 0x27, 0xbe, 0x04, 0x21, 0xdd, 0x25, 0x0b, 0xcf, 0x8e, 0x81, 0x46, 0xb1, 0xd4, - 0xd1, 0x14, 0x59, 0x9a, 0xab, 0xfd, 0x5a, 0x9b, 0x3b, 0xde, 0xc5, 0x32, 0x79, 0x87, 0x6f, 0x76, - 0x93, 0xbe, 0x88, 0xf5, 0xd1, 0x14, 0x59, 0xd7, 0xdc, 0x87, 0xab, 0xb5, 0xb9, 0xf3, 0x7d, 0x6d, - 0x76, 0x37, 0x8a, 0x8b, 0x0c, 0xf8, 0x12, 0xe6, 0x11, 0x70, 0x27, 0xc8, 0x39, 0x67, 0xef, 0x9d, - 0x80, 0xa6, 0x3e, 0x2f, 0xec, 0x63, 0xf8, 0xe0, 0x16, 0x12, 0x84, 0x37, 0xa4, 0x91, 0xb7, 0xf8, - 0x7a, 0x9d, 0x3a, 0xca, 0x32, 0x85, 0x1f, 0x6f, 0x83, 0xef, 0xb3, 0xc8, 0xf3, 0xde, 0xeb, 0x4f, - 0x69, 0x02, 0xba, 0x36, 0x45, 0xd6, 0xfe, 0xe1, 0xc4, 0xae, 0x85, 0xb3, 0x5b, 0xe1, 0xec, 0xd3, - 0x56, 0x59, 0x77, 0xaf, 0xfa, 0xf5, 0xc7, 0x1f, 0x26, 0xf2, 0x86, 0xc3, 0xe4, 0x15, 0xbe, 0xdd, - 0x49, 0xcd, 0x00, 0x52, 0xc5, 0xbc, 0xb2, 0x01, 0xf3, 0x32, 0x00, 0x79, 0xd9, 0xe3, 0x3e, 0x6e, - 0x6e, 0xa8, 0xef, 0x2a, 0xee, 0xdd, 0x0b, 0xdc, 0xb6, 0xa1, 0xc6, 0x7e, 0x1a, 0x62, 0xdb, 0xf2, - 0xc1, 0x97, 0x11, 0xbe, 0xf1, 0x02, 0xb8, 0xa0, 0x42, 0xc2, 0x7c, 0x26, 0x7d, 0x09, 0xe4, 0x0c, - 0xdf, 0x69, 0xc4, 0x39, 0x5a, 0x48, 0xe0, 0x27, 0x7e, 0x33, 0xa3, 0x7c, 0xf0, 0xdf, 0xb2, 0x5f, - 0xce, 0x24, 0xcf, 0xaa, 0xdb, 0x76, 0xc5, 0x1f, 0x6d, 0x20, 0x54, 0x7f, 0x94, 0x58, 0xd5, 0x29, - 0xfb, 0xd6, 0xad, 0x9c, 0xa2, 0x79, 0xc3, 0x34, 0x79, 0x8d, 0xf7, 0x9f, 0x40, 0x0a, 0x82, 0x0a, - 0xe5, 0x27, 0x6d, 0x9b, 0xc5, 0xba, 0x24, 0xf7, 0xd1, 0xaa, 0x34, 0xd0, 0xd7, 0xd2, 0x40, 0xdf, - 0x4a, 0x03, 0xfd, 0x2c, 0x0d, 0xf4, 0xf9, 0xdc, 0x40, 0xab, 0x73, 0x03, 0xbd, 0xb9, 0xf7, 0x0f, - 0x6a, 0x98, 0x04, 0xbb, 0x6a, 0xd9, 0x07, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x25, 0xfd, 0xe5, - 0xbc, 0x12, 0x04, 0x00, 0x00, + // 428 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x4f, 0x8f, 0x93, 0x40, + 0x18, 0xc6, 0x9d, 0x52, 0x37, 0xeb, 0xac, 0x7f, 0xe2, 0xa8, 0x09, 0xf6, 0x00, 0x75, 0x4f, 0x1c, + 0x14, 0x12, 0x8d, 0x27, 0x4f, 0x4b, 0x4c, 0x5c, 0xcd, 0xc6, 0x98, 0x76, 0xd5, 0x44, 0x0f, 0x06, + 0xe8, 0x5b, 0x98, 0x6c, 0x61, 0xc8, 0xcc, 0x10, 0xe5, 0x5b, 0x78, 0xf4, 0xe3, 0x78, 0xec, 0xc1, + 0x83, 0x47, 0xe3, 0xa1, 0x1a, 0xfa, 0x19, 0xbc, 0x1b, 0x06, 0x48, 0x80, 0x36, 0x31, 0xb5, 0x37, + 0xe6, 0x7d, 0xde, 0xf7, 0xc7, 0xcc, 0xf3, 0x3e, 0xf8, 0x8a, 0x1f, 0xc4, 0x76, 0xca, 0x99, 0x64, + 0x44, 0xf3, 0x83, 0x78, 0x74, 0x3b, 0x64, 0x21, 0x53, 0x67, 0xa7, 0xfc, 0xaa, 0xa4, 0x91, 0x19, + 0x32, 0x16, 0x2e, 0xc0, 0x51, 0x27, 0x3f, 0x9b, 0x3b, 0x92, 0xc6, 0x20, 0xa4, 0x17, 0xa7, 0x75, + 0x83, 0xd1, 0x6f, 0x98, 0x65, 0xdc, 0x93, 0x94, 0x25, 0x95, 0x7e, 0xfc, 0x47, 0xc3, 0x87, 0xd3, + 0x3c, 0x09, 0x9e, 0x27, 0x73, 0x46, 0xee, 0xe3, 0x9b, 0x67, 0x9e, 0x04, 0x21, 0xdd, 0x05, 0x0b, + 0x2e, 0x4e, 0x81, 0x86, 0x91, 0xd4, 0xd1, 0x18, 0x59, 0xc3, 0xc9, 0xa6, 0x40, 0x3e, 0xe0, 0x1b, + 0xed, 0xa2, 0x27, 0x22, 0x7d, 0x30, 0x46, 0xd6, 0x55, 0xf7, 0xf1, 0x72, 0x65, 0x5e, 0xfa, 0xb9, + 0x32, 0x1f, 0x84, 0x54, 0x46, 0x99, 0x6f, 0x07, 0x2c, 0x76, 0xa2, 0x3c, 0x05, 0xbe, 0x80, 0x59, + 0x08, 0xdc, 0xf1, 0x33, 0xce, 0xd9, 0x47, 0xc7, 0xa7, 0x89, 0xc7, 0x73, 0xfb, 0x14, 0x3e, 0xb9, + 0xb9, 0x04, 0x31, 0xe9, 0xd3, 0xc8, 0x7b, 0x7c, 0xad, 0x2a, 0x9d, 0xa4, 0xa9, 0xc2, 0x6b, 0xfb, + 0xe0, 0xbb, 0x2c, 0xf2, 0xb2, 0x73, 0xfb, 0x73, 0x1a, 0x83, 0x3e, 0x1c, 0x23, 0xeb, 0xe8, 0xe1, + 0xc8, 0xae, 0x2c, 0xb3, 0x1b, 0xcb, 0xec, 0xf3, 0xc6, 0x53, 0xf7, 0xb0, 0xfc, 0xf5, 0xe7, 0x5f, + 0x26, 0x9a, 0xf4, 0x87, 0xc9, 0x1b, 0x7c, 0xab, 0x55, 0x9a, 0x02, 0x24, 0x8a, 0x79, 0x79, 0x07, + 0xe6, 0x36, 0x00, 0x79, 0xdd, 0xe1, 0x3e, 0xad, 0xb7, 0xa7, 0x1f, 0x28, 0xee, 0xdd, 0x0d, 0x6e, + 0xd3, 0x50, 0x61, 0xbf, 0xf4, 0xb1, 0x8d, 0x7c, 0xfc, 0x6d, 0x80, 0xaf, 0xbf, 0x02, 0x2e, 0xa8, + 0x90, 0x30, 0x9b, 0x4a, 0x4f, 0x02, 0xb9, 0xc0, 0x77, 0x6a, 0x73, 0x4e, 0xe6, 0x12, 0xf8, 0x99, + 0x57, 0xcf, 0xa8, 0x04, 0xfc, 0xb7, 0xed, 0xdb, 0x99, 0xe4, 0x45, 0xb9, 0xdb, 0xb6, 0xf9, 0x83, + 0x1d, 0x8c, 0xea, 0x8e, 0x12, 0xab, 0x5c, 0x65, 0x37, 0xb4, 0x9a, 0x0a, 0x6d, 0xbf, 0x4c, 0xde, + 0xe2, 0xa3, 0x67, 0x90, 0x80, 0xa0, 0x42, 0xe5, 0x69, 0xb8, 0xcf, 0xc3, 0xda, 0x24, 0xf7, 0xc9, + 0xb2, 0x30, 0xd0, 0xf7, 0xc2, 0x40, 0x3f, 0x0a, 0x03, 0xfd, 0x2e, 0x0c, 0xf4, 0x75, 0x6d, 0xa0, + 0xe5, 0xda, 0x40, 0xef, 0xee, 0xfd, 0x83, 0x1a, 0xc4, 0xfe, 0x81, 0x7a, 0xec, 0xa3, 0xbf, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x6e, 0x6b, 0x06, 0x93, 0xf3, 0x03, 0x00, 0x00, } func (m *SyncInfo) Marshal() (dAtA []byte, err error) { @@ -624,10 +623,7 @@ func (m *SyncInfo) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthBcm - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthBcm } if (iNdEx + skippy) > l { @@ -796,10 +792,7 @@ func (m *PersistedState) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthBcm - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthBcm } if (iNdEx + skippy) > l { diff --git a/bcm/block_store.go b/bcm/block_store.go index 1d3c1b4ae..db98df025 100644 --- a/bcm/block_store.go +++ b/bcm/block_store.go @@ -13,18 +13,22 @@ import ( type BlockStore struct { txDecoder txs.Decoder - state.BlockStoreRPC + state.BlockStore } -func NewBlockStore(blockStore state.BlockStoreRPC) *BlockStore { +func NewBlockStore(blockStore state.BlockStore) *BlockStore { return &BlockStore{ - txDecoder: txs.NewProtobufCodec(), - BlockStoreRPC: blockStore, + txDecoder: txs.NewProtobufCodec(), + BlockStore: blockStore, } } -func NewBlockExplorer(dbBackendType dbm.BackendType, dbDir string) *BlockStore { - return NewBlockStore(store.NewBlockStore(dbm.NewDB("blockstore", dbBackendType, dbDir))) +func NewBlockExplorer(dbBackendType dbm.BackendType, dbDir string) (*BlockStore, error) { + db, err := dbm.NewDB("blockstore", dbBackendType, dbDir) + if err != nil { + return nil, fmt.Errorf("could not create BlockExplorer: %w", err) + } + return NewBlockStore(store.NewBlockStore(db)), nil } func (bs *BlockStore) Block(height int64) (_ *Block, err error) { diff --git a/cmd/burrow/commands/accounts.go b/cmd/burrow/commands/accounts.go index e7580af0d..14a40765f 100644 --- a/cmd/burrow/commands/accounts.go +++ b/cmd/burrow/commands/accounts.go @@ -5,11 +5,12 @@ import ( "encoding/json" "time" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/deploy/compile" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/rpc/rpcquery" cli "github.com/jawher/mow.cli" - "google.golang.org/grpc" ) // Accounts lists all the accounts in a chain, alongside with any metadata like contract name and ABI @@ -26,9 +27,7 @@ func Accounts(output Output) func(cmd *cli.Cmd) { } defer cancel() - var opts []grpc.DialOption - opts = append(opts, grpc.WithInsecure()) - conn, err := grpc.DialContext(ctx, *chainURLOpt, opts...) + conn, err := encoding.GRPCDialContext(ctx, *chainURLOpt) if err != nil { output.Fatalf("failed to connect: %v", err) } diff --git a/cmd/burrow/commands/config_options.go b/cmd/burrow/commands/config_options.go index 0a58856de..a840711a2 100644 --- a/cmd/burrow/commands/config_options.go +++ b/cmd/burrow/commands/config_options.go @@ -2,6 +2,7 @@ package commands import ( "fmt" + "net" "strings" "github.com/hyperledger/burrow/config" @@ -18,6 +19,7 @@ type configOptions struct { initPassphraseOpt *string initMonikerOpt *string externalAddressOpt *string + grpcAddressOpt *string } const configFileSpec = "[--config=]" @@ -43,6 +45,7 @@ func addConfigOptions(cmd *cli.Cmd) *configOptions { "|--address=
] " + "[--passphrase=] " + "[--external-address=] " + + "[--grpc-address=] " + configFileSpec + " " + genesisFileSpec cmd.Spec = strings.Join([]string{cmd.Spec, spec}, " ") @@ -85,6 +88,12 @@ func addConfigOptions(cmd *cli.Cmd) *configOptions { EnvVar: "BURROW_EXTERNAL_ADDRESS", }), + grpcAddressOpt: cmd.String(cli.StringOpt{ + Name: "grpc-address", + Desc: "GRPC listen address", + EnvVar: "BURROW_GRPC_ADDRESS", + }), + configFileOpt: cmd.String(configFileOption), genesisFileOpt: cmd.String(genesisFileOption), @@ -119,6 +128,14 @@ func (opts *configOptions) obtainBurrowConfig() (*config.BurrowConfig, error) { if *opts.externalAddressOpt != "" { conf.Tendermint.ExternalAddress = *opts.externalAddressOpt } + if *opts.grpcAddressOpt != "" { + host, port, err := net.SplitHostPort(*opts.grpcAddressOpt) + if err != nil { + return nil, fmt.Errorf("could not parse GRPC listen addres: %w", err) + } + conf.RPC.GRPC.ListenHost = host + conf.RPC.GRPC.ListenPort = port + } return conf, nil } diff --git a/cmd/burrow/commands/configure.go b/cmd/burrow/commands/configure.go index 64aba0f4e..4bda6a660 100644 --- a/cmd/burrow/commands/configure.go +++ b/cmd/burrow/commands/configure.go @@ -20,8 +20,7 @@ import ( "github.com/hyperledger/burrow/logging/logconfig/presets" "github.com/hyperledger/burrow/rpc" cli "github.com/jawher/mow.cli" - "github.com/tendermint/go-amino" - cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" + tmjson "github.com/tendermint/tendermint/libs/json" dbm "github.com/tendermint/tm-db" ) @@ -226,18 +225,15 @@ func Configure(output Output) func(cmd *cli.Cmd) { peers := make([]string, 0) if conf.GenesisDoc != nil { - // NOTE: amino is needed here to add type metadata to JSON envelope for deserialisation to work - cdc := amino.NewCodec() - cryptoAmino.RegisterAmino(cdc) pkg.GenesisDoc = conf.GenesisDoc for _, val := range conf.GenesisDoc.Validators { nodeKey := tendermint.NewNodeKey() nodeAddress, _ := crypto.AddressFromHexString(string(nodeKey.ID())) - bs, err := cdc.MarshalJSON(nodeKey) + bs, err := tmjson.Marshal(nodeKey) if err != nil { - output.Fatalf("go-amino failed to json marshal private key: %v", err) + output.Fatalf("failed to json marshal private key: %v", err) } pkg.Keys[nodeAddress] = deployment.Key{Name: val.Name, Address: nodeAddress, KeyJSON: bs} diff --git a/cmd/burrow/commands/dump.go b/cmd/burrow/commands/dump.go index 843842c90..d95f0cb9c 100644 --- a/cmd/burrow/commands/dump.go +++ b/cmd/burrow/commands/dump.go @@ -6,13 +6,14 @@ import ( "os" "time" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/core" "github.com/hyperledger/burrow/dump" "github.com/hyperledger/burrow/logging/logconfig" "github.com/hyperledger/burrow/rpc/rpcdump" "github.com/hyperledger/burrow/rpc/rpcquery" cli "github.com/jawher/mow.cli" - "google.golang.org/grpc" ) type dumpOptions struct { @@ -101,9 +102,7 @@ func Dump(output Output) func(cmd *cli.Cmd) { } defer cancel() - var opts []grpc.DialOption - opts = append(opts, grpc.WithInsecure()) - conn, err := grpc.DialContext(ctx, *chainURLOpt, opts...) + conn, err := encoding.GRPCDialContext(ctx, *chainURLOpt) if err != nil { output.Fatalf("failed to connect: %v", err) } diff --git a/cmd/burrow/commands/explore.go b/cmd/burrow/commands/explore.go index 83128590d..ce239ab1b 100644 --- a/cmd/burrow/commands/explore.go +++ b/cmd/burrow/commands/explore.go @@ -37,7 +37,10 @@ func Explore(output Output) func(cmd *cli.Cmd) { output.Fatalf("genesis doc is required") } - explorer = bcm.NewBlockExplorer(dbm.BackendType(tmConf.DBBackend), tmConf.DBDir()) + explorer, err = bcm.NewBlockExplorer(dbm.BackendType(tmConf.DBBackend), tmConf.DBDir()) + if err != nil { + output.Fatalf("could not create BlockExplorer: %w", err) + } } cmd.Command("dump", "pretty print the state tree at the given height", func(cmd *cli.Cmd) { diff --git a/cmd/burrow/commands/keys.go b/cmd/burrow/commands/keys.go index f50c3be27..1cc1ec4d8 100644 --- a/cmd/burrow/commands/keys.go +++ b/cmd/burrow/commands/keys.go @@ -10,13 +10,14 @@ import ( "os" "time" + "github.com/hyperledger/burrow/encoding" + "github.com/howeyc/gopass" "github.com/hyperledger/burrow/config" "github.com/hyperledger/burrow/config/deployment" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/keys" cli "github.com/jawher/mow.cli" - "google.golang.org/grpc" ) // Keys runs as either client or server @@ -37,9 +38,7 @@ func Keys(output Output) func(cmd *cli.Cmd) { }) grpcKeysClient := func(output Output) keys.KeysClient { - var opts []grpc.DialOption - opts = append(opts, grpc.WithInsecure()) - conn, err := grpc.Dial(*keysHost+":"+*keysPort, opts...) + conn, err := encoding.GRPCDial(*keysHost + ":" + *keysPort) if err != nil { output.Fatalf("Failed to connect to grpc server: %v", err) } diff --git a/consensus/abci/app.go b/consensus/abci/app.go index c306cd498..ebbdc1037 100644 --- a/consensus/abci/app.go +++ b/consensus/abci/app.go @@ -17,6 +17,7 @@ import ( "github.com/hyperledger/burrow/project" "github.com/hyperledger/burrow/txs" "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/crypto/encoding" ) type Validators interface { @@ -29,6 +30,8 @@ const ( ) type App struct { + // Provides a no-op implementation for all methods (in particular snapshots for now will abort) + types.BaseApplication // Node information to return in Info nodeInfo string // State @@ -103,7 +106,7 @@ func (app *App) Query(reqQuery types.RequestQuery) (respQuery types.ResponseQuer return } -func (app *App) InitChain(chain types.RequestInitChain) (respInitChain types.ResponseInitChain) { +func (app *App) InitChain(chain types.RequestInitChain) types.ResponseInitChain { defer func() { if r := recover(); r != nil { app.panicFunc(fmt.Errorf("panic occurred in abci.App/InitChain: %v\n%s", r, debug.Stack())) @@ -119,17 +122,19 @@ func (app *App) InitChain(chain types.RequestInitChain) (respInitChain types.Res len(chain.Validators), currentSet.Size())) } for _, v := range chain.Validators { - pk, err := crypto.PublicKeyFromABCIPubKey(v.GetPubKey()) + pk, err := encoding.PubKeyFromProto(v.GetPubKey()) if err != nil { panic(err) } - err = app.checkValidatorMatches(currentSet, types.Validator{Address: pk.GetAddress().Bytes(), Power: v.Power}) + err = app.checkValidatorMatches(currentSet, types.Validator{Address: pk.Address().Bytes(), Power: v.Power}) if err != nil { panic(err) } } app.logger.InfoMsg("Initial validator set matches") - return + return types.ResponseInitChain{ + AppHash: app.blockchain.AppHashAfterLastBlock(), + } } func (app *App) BeginBlock(block types.RequestBeginBlock) (respBeginBlock types.ResponseBeginBlock) { @@ -235,8 +240,12 @@ func (app *App) EndBlock(reqEndBlock types.RequestEndBlock) types.ResponseEndBlo err := app.validators.ValidatorChanges(BurrowValidatorDelayInBlocks).IterateValidators(func(id crypto.Addressable, power *big.Int) error { app.logger.InfoMsg("Updating validator power", "validator_address", id.GetAddress(), "new_power", power) + pk, err := encoding.PubKeyToProto(id.GetPublicKey().TendermintPubKey()) + if err != nil { + panic(err) + } validatorUpdates = append(validatorUpdates, types.ValidatorUpdate{ - PubKey: id.GetPublicKey().ABCIPubKey(), + PubKey: pk, // Must ensure power fits in an int64 during execution Power: power.Int64(), }) diff --git a/consensus/abci/execute_tx.go b/consensus/abci/execute_tx.go index a46416906..da5d1b3f8 100644 --- a/consensus/abci/execute_tx.go +++ b/consensus/abci/execute_tx.go @@ -11,7 +11,6 @@ import ( "github.com/hyperledger/burrow/logging/structure" "github.com/hyperledger/burrow/txs" "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/kv" ) // Attempt to execute a transaction using ABCI conventions and codes @@ -36,9 +35,9 @@ func ExecuteTx(logHeader string, executor execution.Executor, txDecoder txs.Deco } } - tags := []kv.Pair{{Key: []byte(structure.TxHashKey), Value: []byte(txEnv.Tx.Hash().String())}} + tags := []types.EventAttribute{{Key: []byte(structure.TxHashKey), Value: []byte(txEnv.Tx.Hash().String())}} if txe.Receipt.CreatesContract { - tags = append(tags, kv.Pair{ + tags = append(tags, types.EventAttribute{ Key: []byte("created_contract_address"), Value: []byte(txe.Receipt.ContractAddress.String()), }) diff --git a/consensus/abci/execute_tx_test.go b/consensus/abci/execute_tx_test.go index c50c8c996..f995f6920 100644 --- a/consensus/abci/execute_tx_test.go +++ b/consensus/abci/execute_tx_test.go @@ -8,14 +8,13 @@ import ( "github.com/hyperledger/burrow/logging" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/kv" ) func TestWithEvents(t *testing.T) { var buf bytes.Buffer logger := logging.NewLogger(log.NewLogfmtLogger(&buf)) - kvp := kv.Pair{Key: []byte("foo"), Value: []byte("bar")} - event := types.Event{Type: "event", Attributes: []kv.Pair{kvp}} + kvp := types.EventAttribute{Key: []byte("foo"), Value: []byte("bar")} + event := types.Event{Type: "event", Attributes: []types.EventAttribute{kvp}} events := []types.Event{event} logger = WithEvents(logger, events) logger.InfoMsg("hello, world") diff --git a/consensus/tendermint/amino.go b/consensus/tendermint/amino.go deleted file mode 100644 index d2f96f648..000000000 --- a/consensus/tendermint/amino.go +++ /dev/null @@ -1,12 +0,0 @@ -package tendermint - -import ( - amino "github.com/tendermint/go-amino" - cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" -) - -var cdc = amino.NewCodec() - -func init() { - cryptoAmino.RegisterAmino(cdc) -} diff --git a/consensus/tendermint/node_view.go b/consensus/tendermint/node_view.go index 9c4c8185c..ba79ebdc1 100644 --- a/consensus/tendermint/node_view.go +++ b/consensus/tendermint/node_view.go @@ -21,7 +21,11 @@ type NodeView struct { } func NewNodeView(tmNode *Node, txDecoder txs.Decoder, runID simpleuuid.UUID) (*NodeView, error) { - publicKey, err := crypto.PublicKeyFromTendermintPubKey(tmNode.PrivValidator().GetPubKey()) + pk, err := tmNode.PrivValidator().GetPubKey() + if err != nil { + return nil, err + } + publicKey, err := crypto.PublicKeyFromTendermintPubKey(pk) if err != nil { return nil, err } @@ -59,18 +63,18 @@ func (nv *NodeView) NodeInfo() *NodeInfo { return &NodeInfo{} } -func (nv *NodeView) IsFastSyncing() bool { +func (nv *NodeView) IsSyncing() bool { if nv == nil { return true } - return nv.tmNode.ConsensusReactor().FastSync() + return nv.tmNode.ConsensusReactor().WaitSync() } func (nv *NodeView) Peers() p2p.IPeerSet { return nv.tmNode.Switch().Peers() } -func (nv *NodeView) BlockStore() state.BlockStoreRPC { +func (nv *NodeView) BlockStore() state.BlockStore { return nv.tmNode.BlockStore() } diff --git a/consensus/tendermint/priv_validator_from_tendermint.go.BK b/consensus/tendermint/priv_validator_from_tendermint.go.BK new file mode 100644 index 000000000..9d500c635 --- /dev/null +++ b/consensus/tendermint/priv_validator_from_tendermint.go.BK @@ -0,0 +1,449 @@ +package tendermint + +import ( +"bytes" +"errors" +"fmt" +"io/ioutil" +"time" + +"github.com/gogo/protobuf/proto" + +"github.com/tendermint/tendermint/crypto" +"github.com/tendermint/tendermint/crypto/ed25519" +"github.com/tendermint/tendermint/crypto/secp256k1" +tmbytes "github.com/tendermint/tendermint/libs/bytes" +tmjson "github.com/tendermint/tendermint/libs/json" +tmos "github.com/tendermint/tendermint/libs/os" +"github.com/tendermint/tendermint/libs/protoio" +"github.com/tendermint/tendermint/libs/tempfile" +tmproto "github.com/tendermint/tendermint/proto/tendermint/types" +"github.com/tendermint/tendermint/types" +tmtime "github.com/tendermint/tendermint/types/time" +) + +// TODO: type ? +const ( + stepNone int8 = 0 // Used to distinguish the initial state + stepPropose int8 = 1 + stepPrevote int8 = 2 + stepPrecommit int8 = 3 +) + +// A vote is either stepPrevote or stepPrecommit. +func voteToStep(vote *tmproto.Vote) int8 { + switch vote.Type { + case tmproto.PrevoteType: + return stepPrevote + case tmproto.PrecommitType: + return stepPrecommit + default: + panic(fmt.Sprintf("Unknown vote type: %v", vote.Type)) + } +} + +//------------------------------------------------------------------------------- + +// FilePVKey stores the immutable part of PrivValidator. +type FilePVKey struct { + Address types.Address `json:"address"` + PubKey crypto.PubKey `json:"pub_key"` + PrivKey crypto.PrivKey `json:"priv_key"` + + filePath string +} + +// Save persists the FilePVKey to its filePath. +func (pvKey FilePVKey) Save() { + outFile := pvKey.filePath + if outFile == "" { + panic("cannot save PrivValidator key: filePath not set") + } + + jsonBytes, err := tmjson.MarshalIndent(pvKey, "", " ") + if err != nil { + panic(err) + } + err = tempfile.WriteFileAtomic(outFile, jsonBytes, 0600) + if err != nil { + panic(err) + } + +} + +//------------------------------------------------------------------------------- + +// FilePVLastSignState stores the mutable part of PrivValidator. +type FilePVLastSignState struct { + Height int64 `json:"height"` + Round int32 `json:"round"` + Step int8 `json:"step"` + Signature []byte `json:"signature,omitempty"` + SignBytes tmbytes.HexBytes `json:"signbytes,omitempty"` + + filePath string +} + +// CheckHRS checks the given height, round, step (HRS) against that of the +// FilePVLastSignState. It returns an error if the arguments constitute a regression, +// or if they match but the SignBytes are empty. +// The returned boolean indicates whether the last Signature should be reused - +// it returns true if the HRS matches the arguments and the SignBytes are not empty (indicating +// we have already signed for this HRS, and can reuse the existing signature). +// It panics if the HRS matches the arguments, there's a SignBytes, but no Signature. +func (lss *FilePVLastSignState) CheckHRS(height int64, round int32, step int8) (bool, error) { + + if lss.Height > height { + return false, fmt.Errorf("height regression. Got %v, last height %v", height, lss.Height) + } + + if lss.Height == height { + if lss.Round > round { + return false, fmt.Errorf("round regression at height %v. Got %v, last round %v", height, round, lss.Round) + } + + if lss.Round == round { + if lss.Step > step { + return false, fmt.Errorf( + "step regression at height %v round %v. Got %v, last step %v", + height, + round, + step, + lss.Step, + ) + } else if lss.Step == step { + if lss.SignBytes != nil { + if lss.Signature == nil { + panic("pv: Signature is nil but SignBytes is not!") + } + return true, nil + } + return false, errors.New("no SignBytes found") + } + } + } + return false, nil +} + +// Save persists the FilePvLastSignState to its filePath. +func (lss *FilePVLastSignState) Save() { + outFile := lss.filePath + if outFile == "" { + panic("cannot save FilePVLastSignState: filePath not set") + } + jsonBytes, err := tmjson.MarshalIndent(lss, "", " ") + if err != nil { + panic(err) + } + err = tempfile.WriteFileAtomic(outFile, jsonBytes, 0600) + if err != nil { + panic(err) + } +} + +//------------------------------------------------------------------------------- + +// FilePV implements PrivValidator using data persisted to disk +// to prevent double signing. +// NOTE: the directories containing pv.Key.filePath and pv.LastSignState.filePath must already exist. +// It includes the LastSignature and LastSignBytes so we don't lose the signature +// if the process crashes after signing but before the resulting consensus message is processed. +type FilePV struct { + Key FilePVKey + LastSignState FilePVLastSignState +} + +// NewFilePV generates a new validator from the given key and paths. +func NewFilePV(privKey crypto.PrivKey, keyFilePath, stateFilePath string) *FilePV { + return &FilePV{ + Key: FilePVKey{ + Address: privKey.PubKey().Address(), + PubKey: privKey.PubKey(), + PrivKey: privKey, + filePath: keyFilePath, + }, + LastSignState: FilePVLastSignState{ + Step: stepNone, + filePath: stateFilePath, + }, + } +} + +// GenFilePV generates a new validator with randomly generated private key +// and sets the filePaths, but does not call Save(). +func GenFilePV(keyFilePath, stateFilePath, keyType string) (*FilePV, error) { + switch keyType { + case types.ABCIPubKeyTypeSecp256k1: + return NewFilePV(secp256k1.GenPrivKey(), keyFilePath, stateFilePath), nil + case "", types.ABCIPubKeyTypeEd25519: + return NewFilePV(ed25519.GenPrivKey(), keyFilePath, stateFilePath), nil + default: + return nil, fmt.Errorf("key type: %s is not supported", keyType) + } +} + +// LoadFilePV loads a FilePV from the filePaths. The FilePV handles double +// signing prevention by persisting data to the stateFilePath. If either file path +// does not exist, the program will exit. +func LoadFilePV(keyFilePath, stateFilePath string) *FilePV { + return loadFilePV(keyFilePath, stateFilePath, true) +} + +// LoadFilePVEmptyState loads a FilePV from the given keyFilePath, with an empty LastSignState. +// If the keyFilePath does not exist, the program will exit. +func LoadFilePVEmptyState(keyFilePath, stateFilePath string) *FilePV { + return loadFilePV(keyFilePath, stateFilePath, false) +} + +// If loadState is true, we load from the stateFilePath. Otherwise, we use an empty LastSignState. +func loadFilePV(keyFilePath, stateFilePath string, loadState bool) *FilePV { + keyJSONBytes, err := ioutil.ReadFile(keyFilePath) + if err != nil { + tmos.Exit(err.Error()) + } + pvKey := FilePVKey{} + err = tmjson.Unmarshal(keyJSONBytes, &pvKey) + if err != nil { + tmos.Exit(fmt.Sprintf("Error reading PrivValidator key from %v: %v\n", keyFilePath, err)) + } + + // overwrite pubkey and address for convenience + pvKey.PubKey = pvKey.PrivKey.PubKey() + pvKey.Address = pvKey.PubKey.Address() + pvKey.filePath = keyFilePath + + pvState := FilePVLastSignState{} + + if loadState { + stateJSONBytes, err := ioutil.ReadFile(stateFilePath) + if err != nil { + tmos.Exit(err.Error()) + } + err = tmjson.Unmarshal(stateJSONBytes, &pvState) + if err != nil { + tmos.Exit(fmt.Sprintf("Error reading PrivValidator state from %v: %v\n", stateFilePath, err)) + } + } + + pvState.filePath = stateFilePath + + return &FilePV{ + Key: pvKey, + LastSignState: pvState, + } +} + +// LoadOrGenFilePV loads a FilePV from the given filePaths +// or else generates a new one and saves it to the filePaths. +func LoadOrGenFilePV(keyFilePath, stateFilePath string) (*FilePV, error) { + var ( + pv *FilePV + err error + ) + if tmos.FileExists(keyFilePath) { + pv = LoadFilePV(keyFilePath, stateFilePath) + } else { + pv, err = GenFilePV(keyFilePath, stateFilePath, "") + pv.Save() + } + return pv, err +} + +// GetAddress returns the address of the validator. +// Implements PrivValidator. +func (pv *FilePV) GetAddress() types.Address { + return pv.Key.Address +} + +// GetPubKey returns the public key of the validator. +// Implements PrivValidator. +func (pv *FilePV) GetPubKey() (crypto.PubKey, error) { + return pv.Key.PubKey, nil +} + +// SignVote signs a canonical representation of the vote, along with the +// chainID. Implements PrivValidator. +func (pv *FilePV) SignVote(chainID string, vote *tmproto.Vote) error { + if err := pv.signVote(chainID, vote); err != nil { + return fmt.Errorf("error signing vote: %v", err) + } + return nil +} + +// SignProposal signs a canonical representation of the proposal, along with +// the chainID. Implements PrivValidator. +func (pv *FilePV) SignProposal(chainID string, proposal *tmproto.Proposal) error { + if err := pv.signProposal(chainID, proposal); err != nil { + return fmt.Errorf("error signing proposal: %v", err) + } + return nil +} + +// Save persists the FilePV to disk. +func (pv *FilePV) Save() { + pv.Key.Save() + pv.LastSignState.Save() +} + +// Reset resets all fields in the FilePV. +// NOTE: Unsafe! +func (pv *FilePV) Reset() { + var sig []byte + pv.LastSignState.Height = 0 + pv.LastSignState.Round = 0 + pv.LastSignState.Step = 0 + pv.LastSignState.Signature = sig + pv.LastSignState.SignBytes = nil + pv.Save() +} + +// String returns a string representation of the FilePV. +func (pv *FilePV) String() string { + return fmt.Sprintf( + "PrivValidator{%v LH:%v, LR:%v, LS:%v}", + pv.GetAddress(), + pv.LastSignState.Height, + pv.LastSignState.Round, + pv.LastSignState.Step, + ) +} + +//------------------------------------------------------------------------------------ + +// signVote checks if the vote is good to sign and sets the vote signature. +// It may need to set the timestamp as well if the vote is otherwise the same as +// a previously signed vote (ie. we crashed after signing but before the vote hit the WAL). +func (pv *FilePV) signVote(chainID string, vote *tmproto.Vote) error { + height, round, step := vote.Height, vote.Round, voteToStep(vote) + + lss := pv.LastSignState + + sameHRS, err := lss.CheckHRS(height, round, step) + if err != nil { + return err + } + + signBytes := types.VoteSignBytes(chainID, vote) + + // We might crash before writing to the wal, + // causing us to try to re-sign for the same HRS. + // If signbytes are the same, use the last signature. + // If they only differ by timestamp, use last timestamp and signature + // Otherwise, return error + if sameHRS { + if bytes.Equal(signBytes, lss.SignBytes) { + vote.Signature = lss.Signature + } else if timestamp, ok := checkVotesOnlyDifferByTimestamp(lss.SignBytes, signBytes); ok { + vote.Timestamp = timestamp + vote.Signature = lss.Signature + } else { + err = fmt.Errorf("conflicting data") + } + return err + } + + // It passed the checks. Sign the vote + sig, err := pv.Key.PrivKey.Sign(signBytes) + if err != nil { + return err + } + pv.saveSigned(height, round, step, signBytes, sig) + vote.Signature = sig + return nil +} + +// signProposal checks if the proposal is good to sign and sets the proposal signature. +// It may need to set the timestamp as well if the proposal is otherwise the same as +// a previously signed proposal ie. we crashed after signing but before the proposal hit the WAL). +func (pv *FilePV) signProposal(chainID string, proposal *tmproto.Proposal) error { + height, round, step := proposal.Height, proposal.Round, stepPropose + + lss := pv.LastSignState + + sameHRS, err := lss.CheckHRS(height, round, step) + if err != nil { + return err + } + + signBytes := types.ProposalSignBytes(chainID, proposal) + + // We might crash before writing to the wal, + // causing us to try to re-sign for the same HRS. + // If signbytes are the same, use the last signature. + // If they only differ by timestamp, use last timestamp and signature + // Otherwise, return error + if sameHRS { + if bytes.Equal(signBytes, lss.SignBytes) { + proposal.Signature = lss.Signature + } else if timestamp, ok := checkProposalsOnlyDifferByTimestamp(lss.SignBytes, signBytes); ok { + proposal.Timestamp = timestamp + proposal.Signature = lss.Signature + } else { + err = fmt.Errorf("conflicting data") + } + return err + } + + // It passed the checks. Sign the proposal + sig, err := pv.Key.PrivKey.Sign(signBytes) + if err != nil { + return err + } + pv.saveSigned(height, round, step, signBytes, sig) + proposal.Signature = sig + return nil +} + +// Persist height/round/step and signature +func (pv *FilePV) saveSigned(height int64, round int32, step int8, + signBytes []byte, sig []byte) { + + pv.LastSignState.Height = height + pv.LastSignState.Round = round + pv.LastSignState.Step = step + pv.LastSignState.Signature = sig + pv.LastSignState.SignBytes = signBytes + pv.LastSignState.Save() +} + +//----------------------------------------------------------------------------------------- + +// returns the timestamp from the lastSignBytes. +// returns true if the only difference in the votes is their timestamp. +func checkVotesOnlyDifferByTimestamp(lastSignBytes, newSignBytes []byte) (time.Time, bool) { + var lastVote, newVote tmproto.CanonicalVote + if err := protoio.UnmarshalDelimited(lastSignBytes, &lastVote); err != nil { + panic(fmt.Sprintf("LastSignBytes cannot be unmarshalled into vote: %v", err)) + } + if err := protoio.UnmarshalDelimited(newSignBytes, &newVote); err != nil { + panic(fmt.Sprintf("signBytes cannot be unmarshalled into vote: %v", err)) + } + + lastTime := lastVote.Timestamp + // set the times to the same value and check equality + now := tmtime.Now() + lastVote.Timestamp = now + newVote.Timestamp = now + + return lastTime, proto.Equal(&newVote, &lastVote) +} + +// returns the timestamp from the lastSignBytes. +// returns true if the only difference in the proposals is their timestamp +func checkProposalsOnlyDifferByTimestamp(lastSignBytes, newSignBytes []byte) (time.Time, bool) { + var lastProposal, newProposal tmproto.CanonicalProposal + if err := protoio.UnmarshalDelimited(lastSignBytes, &lastProposal); err != nil { + panic(fmt.Sprintf("LastSignBytes cannot be unmarshalled into proposal: %v", err)) + } + if err := protoio.UnmarshalDelimited(newSignBytes, &newProposal); err != nil { + panic(fmt.Sprintf("signBytes cannot be unmarshalled into proposal: %v", err)) + } + + lastTime := lastProposal.Timestamp + // set the times to the same value and check equality + now := tmtime.Now() + lastProposal.Timestamp = now + newProposal.Timestamp = now + + return lastTime, proto.Equal(&newProposal, &lastProposal) +} diff --git a/consensus/tendermint/priv_validator_memory.go b/consensus/tendermint/priv_validator_memory.go index ba87f2def..3715fbf1c 100644 --- a/consensus/tendermint/priv_validator_memory.go +++ b/consensus/tendermint/priv_validator_memory.go @@ -3,7 +3,8 @@ package tendermint import ( "github.com/hyperledger/burrow/crypto" tmCrypto "github.com/tendermint/tendermint/crypto" - tmTypes "github.com/tendermint/tendermint/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/tendermint/tendermint/types" ) type privValidatorMemory struct { @@ -12,7 +13,7 @@ type privValidatorMemory struct { lastSignedInfo *LastSignedInfo } -var _ tmTypes.PrivValidator = &privValidatorMemory{} +var _ types.PrivValidator = &privValidatorMemory{} // Create a PrivValidator with in-memory state that takes an addressable representing the validator identity // and a signer providing private signing for that identity. @@ -34,19 +35,19 @@ func asTendermintSigner(signer crypto.Signer) func(msg []byte) []byte { } } -func (pvm *privValidatorMemory) GetAddress() tmTypes.Address { +func (pvm *privValidatorMemory) GetAddress() types.Address { return pvm.Addressable.GetAddress().Bytes() } -func (pvm *privValidatorMemory) GetPubKey() tmCrypto.PubKey { - return pvm.GetPublicKey().TendermintPubKey() +func (pvm *privValidatorMemory) GetPubKey() (tmCrypto.PubKey, error) { + return pvm.GetPublicKey().TendermintPubKey(), nil } // TODO: consider persistence to disk/database to avoid double signing after a crash -func (pvm *privValidatorMemory) SignVote(chainID string, vote *tmTypes.Vote) error { +func (pvm *privValidatorMemory) SignVote(chainID string, vote *tmproto.Vote) error { return pvm.lastSignedInfo.SignVote(pvm.signer, chainID, vote) } -func (pvm *privValidatorMemory) SignProposal(chainID string, proposal *tmTypes.Proposal) error { +func (pvm *privValidatorMemory) SignProposal(chainID string, proposal *tmproto.Proposal) error { return pvm.lastSignedInfo.SignProposal(pvm.signer, chainID, proposal) } diff --git a/consensus/tendermint/sign_info.go b/consensus/tendermint/sign_info.go index 88c5c088d..1683150de 100644 --- a/consensus/tendermint/sign_info.go +++ b/consensus/tendermint/sign_info.go @@ -7,7 +7,10 @@ import ( "sync" "time" + "github.com/gogo/protobuf/proto" "github.com/hyperledger/burrow/binary" + "github.com/tendermint/tendermint/libs/protoio" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" ) @@ -20,15 +23,15 @@ const ( stepPrecommit int8 = 3 ) -func voteToStep(vote *types.Vote) int8 { +// A vote is either stepPrevote or stepPrecommit. +func voteToStep(vote *tmproto.Vote) int8 { switch vote.Type { - case types.PrevoteType: + case tmproto.PrevoteType: return stepPrevote - case types.PrecommitType: + case tmproto.PrecommitType: return stepPrecommit default: - panic("Unknown vote type") - return 0 + panic(fmt.Sprintf("Unknown vote type: %v", vote.Type)) } } @@ -37,7 +40,7 @@ func voteToStep(vote *types.Vote) int8 { type LastSignedInfo struct { sync.Mutex Height int64 `json:"height"` - Round int `json:"round"` + Round int32 `json:"round"` Step int8 `json:"step"` Signature []byte `json:"signature,omitempty"` // so we don't lose signatures SignBytes binary.HexBytes `json:"signbytes,omitempty"` // so we don't lose signatures @@ -53,7 +56,7 @@ type tmCryptoSigner func(msg []byte) []byte // SignVote signs a canonical representation of the vote, along with the // chainID. Implements PrivValidator. -func (lsi *LastSignedInfo) SignVote(sign tmCryptoSigner, chainID string, vote *types.Vote) error { +func (lsi *LastSignedInfo) SignVote(sign tmCryptoSigner, chainID string, vote *tmproto.Vote) error { lsi.Lock() defer lsi.Unlock() if err := lsi.signVote(sign, chainID, vote); err != nil { @@ -64,7 +67,7 @@ func (lsi *LastSignedInfo) SignVote(sign tmCryptoSigner, chainID string, vote *t // SignProposal signs a canonical representation of the proposal, along with // the chainID. Implements PrivValidator. -func (lsi *LastSignedInfo) SignProposal(sign tmCryptoSigner, chainID string, proposal *types.Proposal) error { +func (lsi *LastSignedInfo) SignProposal(sign tmCryptoSigner, chainID string, proposal *tmproto.Proposal) error { lsi.Lock() defer lsi.Unlock() if err := lsi.signProposal(sign, chainID, proposal); err != nil { @@ -74,7 +77,7 @@ func (lsi *LastSignedInfo) SignProposal(sign tmCryptoSigner, chainID string, pro } // returns error if HRS regression or no SignBytes. returns true if HRS is unchanged -func (lsi *LastSignedInfo) checkHRS(height int64, round int, step int8) (bool, error) { +func (lsi *LastSignedInfo) checkHRS(height int64, round int32, step int8) (bool, error) { if lsi.Height > height { return false, errors.New("height regression") } @@ -104,15 +107,15 @@ func (lsi *LastSignedInfo) checkHRS(height int64, round int, step int8) (bool, e // signVote checks if the vote is good to sign and sets the vote signature. // It may need to set the timestamp as well if the vote is otherwise the same as // a previously signed vote (ie. we crashed after signing but before the vote hit the WAL). -func (lsi *LastSignedInfo) signVote(sign tmCryptoSigner, chainID string, vote *types.Vote) error { +func (lsi *LastSignedInfo) signVote(sign tmCryptoSigner, chainID string, vote *tmproto.Vote) error { height, round, step := vote.Height, vote.Round, voteToStep(vote) - signBytes := vote.SignBytes(chainID) sameHRS, err := lsi.checkHRS(height, round, step) if err != nil { return err } + signBytes := types.VoteSignBytes(chainID, vote) // We might crash before writing to the wal, // causing us to try to re-sign for the same HRS. // If signbytes are the same, use the last signature. @@ -140,15 +143,16 @@ func (lsi *LastSignedInfo) signVote(sign tmCryptoSigner, chainID string, vote *t // signProposal checks if the proposal is good to sign and sets the proposal signature. // It may need to set the timestamp as well if the proposal is otherwise the same as // a previously signed proposal ie. we crashed after signing but before the proposal hit the WAL). -func (lsi *LastSignedInfo) signProposal(sign tmCryptoSigner, chainID string, proposal *types.Proposal) error { +func (lsi *LastSignedInfo) signProposal(sign tmCryptoSigner, chainID string, proposal *tmproto.Proposal) error { height, round, step := proposal.Height, proposal.Round, stepPropose - signBytes := proposal.SignBytes(chainID) sameHRS, err := lsi.checkHRS(height, round, step) if err != nil { return err } + signBytes := types.ProposalSignBytes(chainID, proposal) + // We might crash before writing to the wal, // causing us to try to re-sign for the same HRS. // If signbytes are the same, use the last signature. @@ -174,7 +178,7 @@ func (lsi *LastSignedInfo) signProposal(sign tmCryptoSigner, chainID string, pro } // Persist height/round/step and signature -func (lsi *LastSignedInfo) saveSigned(height int64, round int, step int8, +func (lsi *LastSignedInfo) saveSigned(height int64, round int32, step int8, signBytes []byte, sig []byte) { lsi.Height = height @@ -194,11 +198,11 @@ func (lsi *LastSignedInfo) String() string { // returns the timestamp from the lastSignBytes. // returns true if the only difference in the votes is their timestamp. func checkVotesOnlyDifferByTimestamp(lastSignBytes, newSignBytes []byte) (time.Time, bool) { - var lastVote, newVote types.CanonicalVote - if err := cdc.UnmarshalBinaryLengthPrefixed(lastSignBytes, &lastVote); err != nil { + var lastVote, newVote tmproto.CanonicalVote + if err := protoio.UnmarshalDelimited(lastSignBytes, &lastVote); err != nil { panic(fmt.Sprintf("LastSignBytes cannot be unmarshalled into vote: %v", err)) } - if err := cdc.UnmarshalBinaryLengthPrefixed(newSignBytes, &newVote); err != nil { + if err := protoio.UnmarshalDelimited(newSignBytes, &newVote); err != nil { panic(fmt.Sprintf("signBytes cannot be unmarshalled into vote: %v", err)) } @@ -208,20 +212,18 @@ func checkVotesOnlyDifferByTimestamp(lastSignBytes, newSignBytes []byte) (time.T now := tmtime.Now() lastVote.Timestamp = now newVote.Timestamp = now - lastVoteBytes, _ := cdc.MarshalJSON(lastVote) - newVoteBytes, _ := cdc.MarshalJSON(newVote) - return lastTime, bytes.Equal(newVoteBytes, lastVoteBytes) + return lastTime, proto.Equal(&newVote, &lastVote) } // returns the timestamp from the lastSignBytes. // returns true if the only difference in the proposals is their timestamp func checkProposalsOnlyDifferByTimestamp(lastSignBytes, newSignBytes []byte) (time.Time, bool) { - var lastProposal, newProposal types.CanonicalProposal - if err := cdc.UnmarshalBinaryLengthPrefixed(lastSignBytes, &lastProposal); err != nil { + var lastProposal, newProposal tmproto.CanonicalProposal + if err := protoio.UnmarshalDelimited(lastSignBytes, &lastProposal); err != nil { panic(fmt.Sprintf("LastSignBytes cannot be unmarshalled into proposal: %v", err)) } - if err := cdc.UnmarshalBinaryLengthPrefixed(newSignBytes, &newProposal); err != nil { + if err := protoio.UnmarshalDelimited(newSignBytes, &newProposal); err != nil { panic(fmt.Sprintf("signBytes cannot be unmarshalled into proposal: %v", err)) } @@ -230,8 +232,6 @@ func checkProposalsOnlyDifferByTimestamp(lastSignBytes, newSignBytes []byte) (ti now := tmtime.Now() lastProposal.Timestamp = now newProposal.Timestamp = now - lastProposalBytes, _ := cdc.MarshalBinaryLengthPrefixed(lastProposal) - newProposalBytes, _ := cdc.MarshalBinaryLengthPrefixed(newProposal) - return lastTime, bytes.Equal(newProposalBytes, lastProposalBytes) + return lastTime, proto.Equal(&newProposal, &lastProposal) } diff --git a/consensus/tendermint/sign_info.go.bk b/consensus/tendermint/sign_info.go.bk new file mode 100644 index 000000000..88c5c088d --- /dev/null +++ b/consensus/tendermint/sign_info.go.bk @@ -0,0 +1,237 @@ +package tendermint + +import ( + "bytes" + "errors" + "fmt" + "sync" + "time" + + "github.com/hyperledger/burrow/binary" + "github.com/tendermint/tendermint/types" + tmtime "github.com/tendermint/tendermint/types/time" +) + +// TODO: type ? +const ( + stepNone int8 = 0 // Used to distinguish the initial state + stepPropose int8 = 1 + stepPrevote int8 = 2 + stepPrecommit int8 = 3 +) + +func voteToStep(vote *types.Vote) int8 { + switch vote.Type { + case types.PrevoteType: + return stepPrevote + case types.PrecommitType: + return stepPrecommit + default: + panic("Unknown vote type") + return 0 + } +} + +// LastSignedInfo contains information about the latest +// data signed by a validator to help prevent double signing. +type LastSignedInfo struct { + sync.Mutex + Height int64 `json:"height"` + Round int `json:"round"` + Step int8 `json:"step"` + Signature []byte `json:"signature,omitempty"` // so we don't lose signatures + SignBytes binary.HexBytes `json:"signbytes,omitempty"` // so we don't lose signatures +} + +func NewLastSignedInfo() *LastSignedInfo { + return &LastSignedInfo{ + Step: stepNone, + } +} + +type tmCryptoSigner func(msg []byte) []byte + +// SignVote signs a canonical representation of the vote, along with the +// chainID. Implements PrivValidator. +func (lsi *LastSignedInfo) SignVote(sign tmCryptoSigner, chainID string, vote *types.Vote) error { + lsi.Lock() + defer lsi.Unlock() + if err := lsi.signVote(sign, chainID, vote); err != nil { + return fmt.Errorf("error signing vote: %v", err) + } + return nil +} + +// SignProposal signs a canonical representation of the proposal, along with +// the chainID. Implements PrivValidator. +func (lsi *LastSignedInfo) SignProposal(sign tmCryptoSigner, chainID string, proposal *types.Proposal) error { + lsi.Lock() + defer lsi.Unlock() + if err := lsi.signProposal(sign, chainID, proposal); err != nil { + return fmt.Errorf("error signing proposal: %v", err) + } + return nil +} + +// returns error if HRS regression or no SignBytes. returns true if HRS is unchanged +func (lsi *LastSignedInfo) checkHRS(height int64, round int, step int8) (bool, error) { + if lsi.Height > height { + return false, errors.New("height regression") + } + + if lsi.Height == height { + if lsi.Round > round { + return false, errors.New("round regression") + } + + if lsi.Round == round { + if lsi.Step > step { + return false, errors.New("step regression") + } else if lsi.Step == step { + if lsi.SignBytes != nil { + if lsi.Signature == nil { + panic("pv: Signature is nil but SignBytes is not!") + } + return true, nil + } + return false, errors.New("no Signature found") + } + } + } + return false, nil +} + +// signVote checks if the vote is good to sign and sets the vote signature. +// It may need to set the timestamp as well if the vote is otherwise the same as +// a previously signed vote (ie. we crashed after signing but before the vote hit the WAL). +func (lsi *LastSignedInfo) signVote(sign tmCryptoSigner, chainID string, vote *types.Vote) error { + height, round, step := vote.Height, vote.Round, voteToStep(vote) + signBytes := vote.SignBytes(chainID) + + sameHRS, err := lsi.checkHRS(height, round, step) + if err != nil { + return err + } + + // We might crash before writing to the wal, + // causing us to try to re-sign for the same HRS. + // If signbytes are the same, use the last signature. + // If they only differ by timestamp, use last timestamp and signature + // Otherwise, return error + if sameHRS { + if bytes.Equal(signBytes, lsi.SignBytes) { + vote.Signature = lsi.Signature + } else if timestamp, ok := checkVotesOnlyDifferByTimestamp(lsi.SignBytes, signBytes); ok { + vote.Timestamp = timestamp + vote.Signature = lsi.Signature + } else { + err = fmt.Errorf("conflicting data") + } + return err + } + + // It passed the checks. Sign the vote + sig := sign(signBytes) + lsi.saveSigned(height, round, step, signBytes, sig) + vote.Signature = sig + return nil +} + +// signProposal checks if the proposal is good to sign and sets the proposal signature. +// It may need to set the timestamp as well if the proposal is otherwise the same as +// a previously signed proposal ie. we crashed after signing but before the proposal hit the WAL). +func (lsi *LastSignedInfo) signProposal(sign tmCryptoSigner, chainID string, proposal *types.Proposal) error { + height, round, step := proposal.Height, proposal.Round, stepPropose + signBytes := proposal.SignBytes(chainID) + + sameHRS, err := lsi.checkHRS(height, round, step) + if err != nil { + return err + } + + // We might crash before writing to the wal, + // causing us to try to re-sign for the same HRS. + // If signbytes are the same, use the last signature. + // If they only differ by timestamp, use last timestamp and signature + // Otherwise, return error + if sameHRS { + if bytes.Equal(signBytes, lsi.SignBytes) { + proposal.Signature = lsi.Signature + } else if timestamp, ok := checkProposalsOnlyDifferByTimestamp(lsi.SignBytes, signBytes); ok { + proposal.Timestamp = timestamp + proposal.Signature = lsi.Signature + } else { + err = fmt.Errorf("conflicting data") + } + return err + } + + // It passed the checks. Sign the proposal + sig := sign(signBytes) + lsi.saveSigned(height, round, step, signBytes, sig) + proposal.Signature = sig + return nil +} + +// Persist height/round/step and signature +func (lsi *LastSignedInfo) saveSigned(height int64, round int, step int8, + signBytes []byte, sig []byte) { + + lsi.Height = height + lsi.Round = round + lsi.Step = step + lsi.Signature = sig + lsi.SignBytes = signBytes +} + +// String returns a string representation of the LastSignedInfo. +func (lsi *LastSignedInfo) String() string { + return fmt.Sprintf("PrivValidator{LH:%v, LR:%v, LS:%v}", lsi.Height, lsi.Round, lsi.Step) +} + +//------------------------------------- + +// returns the timestamp from the lastSignBytes. +// returns true if the only difference in the votes is their timestamp. +func checkVotesOnlyDifferByTimestamp(lastSignBytes, newSignBytes []byte) (time.Time, bool) { + var lastVote, newVote types.CanonicalVote + if err := cdc.UnmarshalBinaryLengthPrefixed(lastSignBytes, &lastVote); err != nil { + panic(fmt.Sprintf("LastSignBytes cannot be unmarshalled into vote: %v", err)) + } + if err := cdc.UnmarshalBinaryLengthPrefixed(newSignBytes, &newVote); err != nil { + panic(fmt.Sprintf("signBytes cannot be unmarshalled into vote: %v", err)) + } + + lastTime := lastVote.Timestamp + + // set the times to the same value and check equality + now := tmtime.Now() + lastVote.Timestamp = now + newVote.Timestamp = now + lastVoteBytes, _ := cdc.MarshalJSON(lastVote) + newVoteBytes, _ := cdc.MarshalJSON(newVote) + + return lastTime, bytes.Equal(newVoteBytes, lastVoteBytes) +} + +// returns the timestamp from the lastSignBytes. +// returns true if the only difference in the proposals is their timestamp +func checkProposalsOnlyDifferByTimestamp(lastSignBytes, newSignBytes []byte) (time.Time, bool) { + var lastProposal, newProposal types.CanonicalProposal + if err := cdc.UnmarshalBinaryLengthPrefixed(lastSignBytes, &lastProposal); err != nil { + panic(fmt.Sprintf("LastSignBytes cannot be unmarshalled into proposal: %v", err)) + } + if err := cdc.UnmarshalBinaryLengthPrefixed(newSignBytes, &newProposal); err != nil { + panic(fmt.Sprintf("signBytes cannot be unmarshalled into proposal: %v", err)) + } + + lastTime := lastProposal.Timestamp + // set the times to the same value and check equality + now := tmtime.Now() + lastProposal.Timestamp = now + newProposal.Timestamp = now + lastProposalBytes, _ := cdc.MarshalBinaryLengthPrefixed(lastProposal) + newProposalBytes, _ := cdc.MarshalBinaryLengthPrefixed(newProposal) + + return lastTime, bytes.Equal(newProposalBytes, lastProposalBytes) +} diff --git a/consensus/tendermint/tendermint.go b/consensus/tendermint/tendermint.go index 7f6b706e5..d31acf0ce 100644 --- a/consensus/tendermint/tendermint.go +++ b/consensus/tendermint/tendermint.go @@ -6,6 +6,8 @@ import ( "os" "path" + "github.com/tendermint/tendermint/version" + "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/consensus/abci" "github.com/hyperledger/burrow/crypto" @@ -21,6 +23,11 @@ import ( dbm "github.com/tendermint/tm-db" ) +func init() { + // Tendermint now sets this dynamically in it's build... we could also automate setting it + version.TMCoreSemVer = "0.34.3" +} + // Serves as a wrapper around the Tendermint node's closeable resources (database connections) type Node struct { *node.Node @@ -29,13 +36,16 @@ type Node struct { } } -func DBProvider(ID string, backendType dbm.BackendType, dbDir string) dbm.DB { +func DBProvider(ID string, backendType dbm.BackendType, dbDir string) (dbm.DB, error) { return dbm.NewDB(ID, backendType, dbDir) } // Since Tendermint doesn't close its DB connections func (n *Node) DBProvider(ctx *node.DBContext) (dbm.DB, error) { - db := DBProvider(ctx.ID, dbm.BackendType(ctx.Config.DBBackend), ctx.Config.DBDir()) + db, err := DBProvider(ctx.ID, dbm.BackendType(ctx.Config.DBBackend), ctx.Config.DBDir()) + if err != nil { + return nil, err + } n.closers = append(n.closers, db) return db, nil } @@ -97,6 +107,7 @@ func DeriveGenesisDoc(burrowGenesisDoc *genesis.GenesisDoc, appHash []byte) *tmT Validators: validators, AppHash: appHash, ConsensusParams: consensusParams, + InitialHeight: 1, } } diff --git a/consensus/tendermint/tendermint.pb.go b/consensus/tendermint/tendermint.pb.go index b5040393a..1bf67d54d 100644 --- a/consensus/tendermint/tendermint.pb.go +++ b/consensus/tendermint/tendermint.pb.go @@ -5,6 +5,7 @@ package tendermint import ( fmt "fmt" + io "io" math "math" math_bits "math/bits" @@ -48,16 +49,21 @@ func (*NodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor_04f926c8da23c367, []int{0} } func (m *NodeInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NodeInfo.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *NodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NodeInfo.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *NodeInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_NodeInfo.Merge(m, src) } func (m *NodeInfo) XXX_Size() int { - return xxx_messageInfo_NodeInfo.Size(m) + return m.Size() } func (m *NodeInfo) XXX_DiscardUnknown() { xxx_messageInfo_NodeInfo.DiscardUnknown(m) @@ -120,29 +126,129 @@ func init() { golang_proto.RegisterFile("tendermint.proto", fileDescriptor_04f92 var fileDescriptor_04f926c8da23c367 = []byte{ // 323 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x4f, 0x4f, 0xf2, 0x40, - 0x10, 0xc6, 0xdf, 0xed, 0xab, 0x80, 0x1b, 0x4d, 0x4c, 0x4f, 0x1b, 0x0f, 0x85, 0x18, 0x0f, 0x1c, - 0xa4, 0x4d, 0xfc, 0xf3, 0x01, 0x84, 0x1e, 0x6c, 0xa2, 0x44, 0x1b, 0xe3, 0xc1, 0x1b, 0xa5, 0x43, - 0xd9, 0x00, 0x3b, 0x64, 0x77, 0x1b, 0xe8, 0xb7, 0xf3, 0xc8, 0xd5, 0x9b, 0xf1, 0x40, 0x0c, 0x7c, - 0x11, 0xd3, 0x6d, 0x11, 0xbc, 0xe8, 0x6d, 0x7f, 0xcf, 0xb3, 0x33, 0xf3, 0xec, 0x0e, 0x3d, 0xd6, - 0x20, 0x62, 0x90, 0x13, 0x2e, 0xb4, 0x3b, 0x95, 0xa8, 0xd1, 0xa6, 0x5b, 0xe5, 0xa4, 0x95, 0x70, - 0x3d, 0x4c, 0x23, 0xb7, 0x8f, 0x13, 0x2f, 0xc1, 0x04, 0x3d, 0x73, 0x25, 0x4a, 0x07, 0x86, 0x0c, - 0x98, 0x53, 0x51, 0x7a, 0xfa, 0x66, 0xd1, 0x5a, 0x17, 0x63, 0x08, 0xc4, 0x00, 0x6d, 0x9f, 0x5a, - 0x81, 0xcf, 0x48, 0x83, 0x34, 0x0f, 0xdb, 0x57, 0x8b, 0x65, 0xfd, 0xdf, 0xc7, 0xb2, 0x7e, 0xbe, - 0xd3, 0x6f, 0x98, 0x4d, 0x41, 0x8e, 0x21, 0x4e, 0x40, 0x7a, 0x51, 0x2a, 0x25, 0xce, 0xbc, 0xbe, - 0xcc, 0xa6, 0x1a, 0xdd, 0x9b, 0x38, 0x96, 0xa0, 0x54, 0x68, 0x05, 0xbe, 0x7d, 0x46, 0x8f, 0xee, - 0xb8, 0xd2, 0x20, 0x4a, 0x91, 0x59, 0x0d, 0xd2, 0x3c, 0x08, 0x7f, 0x8a, 0x36, 0xa3, 0xd5, 0x2e, - 0xe8, 0x19, 0xca, 0x11, 0xfb, 0x6f, 0xfc, 0x0d, 0xe6, 0xce, 0x33, 0x48, 0xc5, 0x51, 0xb0, 0xbd, - 0xc2, 0x29, 0xd1, 0x7e, 0xa4, 0xb5, 0xce, 0xb0, 0x27, 0x04, 0x8c, 0x15, 0xdb, 0x37, 0x29, 0xaf, - 0xcb, 0x94, 0xad, 0xdf, 0x53, 0x46, 0x5c, 0xf4, 0x64, 0xe6, 0xde, 0xc2, 0xbc, 0x9d, 0x69, 0x50, - 0xe1, 0x77, 0x9b, 0x7c, 0xd8, 0x3d, 0x0a, 0x3e, 0x02, 0xc9, 0x2a, 0xc5, 0xb0, 0x12, 0x6d, 0x87, - 0xd2, 0xf0, 0xa1, 0xb3, 0x79, 0x43, 0xd5, 0x98, 0x3b, 0x4a, 0x5e, 0xf9, 0x34, 0x0f, 0x44, 0x0c, - 0x73, 0x56, 0x2b, 0x2a, 0x4b, 0x6c, 0xfb, 0xef, 0x2b, 0x87, 0x7c, 0xae, 0x1c, 0xf2, 0xba, 0x76, - 0xc8, 0x62, 0xed, 0x90, 0x97, 0x8b, 0x3f, 0x3e, 0x11, 0x85, 0x02, 0xa1, 0x52, 0xe5, 0x6d, 0x17, - 0x19, 0x55, 0xcc, 0x82, 0x2e, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xba, 0x9e, 0x0e, 0xac, 0xef, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x3d, 0x4f, 0xfb, 0x30, + 0x10, 0xc6, 0xff, 0xce, 0x1f, 0xda, 0x62, 0x81, 0x84, 0x22, 0x06, 0x8b, 0xc1, 0xad, 0x10, 0x43, + 0x07, 0x48, 0x24, 0x5e, 0x3e, 0x00, 0x6d, 0x07, 0x22, 0x95, 0x0a, 0x22, 0xc4, 0xc0, 0xd6, 0x34, + 0x47, 0x6a, 0xb5, 0xf5, 0x55, 0xb6, 0xab, 0x36, 0xdf, 0x8e, 0x31, 0x23, 0x6c, 0x88, 0xa1, 0x42, + 0xe9, 0x17, 0x41, 0x79, 0x29, 0x85, 0x05, 0x36, 0x3f, 0xbf, 0xc7, 0xe7, 0x7b, 0x7c, 0x47, 0xf7, + 0x0d, 0xc8, 0x10, 0xd4, 0x44, 0x48, 0xe3, 0x4c, 0x15, 0x1a, 0xb4, 0xe9, 0x86, 0x1c, 0x1e, 0x44, + 0x18, 0x61, 0x8e, 0xdd, 0xec, 0x54, 0xdc, 0x38, 0x7a, 0xb5, 0x68, 0xad, 0x87, 0x21, 0x78, 0xf2, + 0x09, 0xed, 0x0e, 0xb5, 0xbc, 0x0e, 0x23, 0x0d, 0xd2, 0xdc, 0x6d, 0x5d, 0x24, 0xcb, 0xfa, 0xbf, + 0xf7, 0x65, 0xfd, 0x24, 0x12, 0x66, 0x38, 0x0b, 0x9c, 0x01, 0x4e, 0xdc, 0x61, 0x3c, 0x05, 0x35, + 0x86, 0x30, 0x02, 0xe5, 0x06, 0x33, 0xa5, 0x70, 0xee, 0x0e, 0x54, 0x3c, 0x35, 0xe8, 0x5c, 0x85, + 0xa1, 0x02, 0xad, 0x7d, 0xcb, 0xeb, 0xd8, 0xc7, 0x74, 0xaf, 0x2b, 0xb4, 0x01, 0x59, 0x42, 0x66, + 0x35, 0x48, 0x73, 0xc7, 0xff, 0x09, 0x6d, 0x46, 0xab, 0x3d, 0x30, 0x73, 0x54, 0x23, 0xf6, 0x3f, + 0xf7, 0xd7, 0x32, 0x73, 0x1e, 0x40, 0x69, 0x81, 0x92, 0x6d, 0x15, 0x4e, 0x29, 0xed, 0x3b, 0x5a, + 0x6b, 0x0f, 0xfb, 0x52, 0xc2, 0x58, 0xb3, 0xed, 0x3c, 0xe5, 0x65, 0x99, 0xf2, 0xf4, 0xf7, 0x94, + 0x81, 0x90, 0x7d, 0x15, 0x3b, 0xd7, 0xb0, 0x68, 0xc5, 0x06, 0xb4, 0xff, 0xf5, 0x4c, 0xd6, 0xec, + 0x06, 0xa5, 0x18, 0x81, 0x62, 0x95, 0xa2, 0x59, 0x29, 0x6d, 0x4e, 0xa9, 0x7f, 0xdb, 0x5e, 0xff, + 0xa1, 0x9a, 0x9b, 0xdf, 0x48, 0x56, 0x79, 0xbf, 0xf0, 0x64, 0x08, 0x0b, 0x56, 0x2b, 0x2a, 0x4b, + 0xd9, 0xea, 0x26, 0x29, 0x27, 0x2f, 0x29, 0x27, 0x6f, 0x29, 0x27, 0x1f, 0x29, 0x27, 0xcf, 0x2b, + 0x4e, 0x92, 0x15, 0x27, 0x8f, 0x67, 0x7f, 0x0c, 0x13, 0xa5, 0x06, 0xa9, 0x67, 0xda, 0xdd, 0xec, + 0x2d, 0xa8, 0xe4, 0x8b, 0x3a, 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xba, 0x35, 0x49, 0xde, 0x01, 0x00, 0x00, } +func (m *NodeInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NodeInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.TxIndex) > 0 { + i -= len(m.TxIndex) + copy(dAtA[i:], m.TxIndex) + i = encodeVarintTendermint(dAtA, i, uint64(len(m.TxIndex))) + i-- + dAtA[i] = 0x42 + } + if len(m.RPCAddress) > 0 { + i -= len(m.RPCAddress) + copy(dAtA[i:], m.RPCAddress) + i = encodeVarintTendermint(dAtA, i, uint64(len(m.RPCAddress))) + i-- + dAtA[i] = 0x3a + } + if len(m.Moniker) > 0 { + i -= len(m.Moniker) + copy(dAtA[i:], m.Moniker) + i = encodeVarintTendermint(dAtA, i, uint64(len(m.Moniker))) + i-- + dAtA[i] = 0x32 + } + { + size := m.Channels.Size() + i -= size + if _, err := m.Channels.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTendermint(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintTendermint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.Network) > 0 { + i -= len(m.Network) + copy(dAtA[i:], m.Network) + i = encodeVarintTendermint(dAtA, i, uint64(len(m.Network))) + i-- + dAtA[i] = 0x1a + } + if len(m.ListenAddress) > 0 { + i -= len(m.ListenAddress) + copy(dAtA[i:], m.ListenAddress) + i = encodeVarintTendermint(dAtA, i, uint64(len(m.ListenAddress))) + i-- + dAtA[i] = 0x12 + } + { + size := m.ID.Size() + i -= size + if _, err := m.ID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTendermint(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintTendermint(dAtA []byte, offset int, v uint64) int { + offset -= sovTendermint(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} func (m *NodeInfo) Size() (n int) { if m == nil { return 0 @@ -189,3 +295,396 @@ func sovTendermint(x uint64) (n int) { func sozTendermint(x uint64) (n int) { return sovTendermint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *NodeInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTendermint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTendermint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTendermint + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTendermint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListenAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTendermint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTendermint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTendermint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ListenAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTendermint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTendermint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTendermint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Network = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTendermint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTendermint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTendermint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Channels", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTendermint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTendermint + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTendermint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Channels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTendermint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTendermint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTendermint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Moniker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RPCAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTendermint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTendermint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTendermint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RPCAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTendermint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTendermint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTendermint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxIndex = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTendermint(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTendermint + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTendermint(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTendermint + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTendermint + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTendermint + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTendermint + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTendermint + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTendermint + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTendermint = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTendermint = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTendermint = fmt.Errorf("proto: unexpected end of group") +) diff --git a/consensus/tendermint/tendermint_test.go b/consensus/tendermint/tendermint_test.go index 8b57efc2c..33ff78bb6 100644 --- a/consensus/tendermint/tendermint_test.go +++ b/consensus/tendermint/tendermint_test.go @@ -7,24 +7,21 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/go-amino" "github.com/tendermint/tendermint/crypto/ed25519" - cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" + tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/p2p" ) func TestMarshalNodeKey(t *testing.T) { - cdc := amino.NewCodec() - cryptoAmino.RegisterAmino(cdc) nodeKey := NewNodeKey() - bsAmino, err := cdc.MarshalJSON(nodeKey) + tmbs, err := tmjson.Marshal(nodeKey) require.NoError(t, err) file, err := ioutil.TempFile(os.TempDir(), "nodeKey-") require.NoError(t, err) defer os.Remove(file.Name()) - _, err = file.Write(bsAmino) + _, err = file.Write(tmbs) require.NoError(t, err) nk, err := p2p.LoadNodeKey(file.Name()) require.NoError(t, err) @@ -33,8 +30,8 @@ func TestMarshalNodeKey(t *testing.T) { bs, err := json.Marshal(nodeKey) require.NoError(t, err) nk = new(p2p.NodeKey) - nk.PrivKey = new(ed25519.PrivKeyEd25519) + nk.PrivKey = new(ed25519.PrivKey) err = json.Unmarshal(bs, nk) require.NoError(t, err) - require.Equal(t, nodeKey.PrivKey, *nk.PrivKey.(*ed25519.PrivKeyEd25519)) + require.Equal(t, nodeKey.PrivKey, *nk.PrivKey.(*ed25519.PrivKey)) } diff --git a/core/config.go b/core/config.go index d3e2216b5..182454974 100644 --- a/core/config.go +++ b/core/config.go @@ -65,8 +65,12 @@ func (kern *Kernel) LoadTendermintFromConfig(conf *config.BurrowConfig, privVal kern.database.Stats() + pubKey, err := privVal.GetPubKey() + if err != nil { + return err + } kern.info = fmt.Sprintf("Burrow_%s_%s_ValidatorID:%X", project.History.CurrentVersion().String(), - kern.Blockchain.ChainID(), privVal.GetPubKey().Address()) + kern.Blockchain.ChainID(), pubKey.Address()) app := abci.NewApp(kern.info, kern.Blockchain, kern.State, kern.checker, kern.committer, kern.txCodec, authorizedPeersProvider, kern.Panic, kern.Logger) diff --git a/core/kernel.go b/core/kernel.go index f0ebbc4a1..ebe2c0cc7 100644 --- a/core/kernel.go +++ b/core/kernel.go @@ -15,12 +15,14 @@ import ( "syscall" "time" - "github.com/hyperledger/burrow/dump" - "github.com/go-kit/kit/log" "github.com/hyperledger/burrow/bcm" "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/dump" + + // GRPC Codec + _ "github.com/hyperledger/burrow/encoding" "github.com/hyperledger/burrow/event" "github.com/hyperledger/burrow/execution" "github.com/hyperledger/burrow/execution/state" @@ -79,6 +81,13 @@ func NewKernel(dbDir string) (*Kernel, error) { return nil, fmt.Errorf("Burrow requires a database directory") } runID, err := simpleuuid.NewTime(time.Now()) // Create a random ID based on start time + if err != nil { + return nil, fmt.Errorf("could not create runID UUID: %w", err) + } + db, err := dbm.NewDB(BurrowDBName, dbm.GoLevelDBBackend, dbDir) + if err != nil { + return nil, fmt.Errorf("could not create DB for Kernel: %w", err) + } return &Kernel{ Logger: logging.NewNoopLogger(), RunID: runID, @@ -87,7 +96,7 @@ func NewKernel(dbDir string) (*Kernel, error) { listeners: make(map[string]net.Listener), shutdownNotify: make(chan struct{}), txCodec: txs.NewProtobufCodec(), - database: dbm.NewDB(BurrowDBName, dbm.GoLevelDBBackend, dbDir), + database: db, }, err } diff --git a/core/processes.go b/core/processes.go index 1a10c372e..76cc58362 100644 --- a/core/processes.go +++ b/core/processes.go @@ -200,7 +200,7 @@ func StartupLauncher(kern *Kernel) process.Launcher { logger := kern.Logger.With( "launch_time", start, "burrow_version", project.FullVersion(), - "tendermint_version", version.Version, + "tendermint_version", version.TMCoreSemVer, "validator_address", nodeView.ValidatorAddress(), "node_id", string(info.ID()), "net_address", netAddress.String(), diff --git a/crypto/address.go b/crypto/address.go index 4395362f2..a5837cf8d 100644 --- a/crypto/address.go +++ b/crypto/address.go @@ -158,7 +158,6 @@ func (address *Address) UnmarshalText(text []byte) error { func (address Address) MarshalText() ([]byte, error) { return ([]byte)(hex.EncodeUpperToString(address[:])), nil - } // Gogo proto support @@ -196,7 +195,7 @@ func Nonce(caller Address, nonce []byte) []byte { return hasher.Sum(nil) } -// Obtain a nearly unique nonce based on a montonic account sequence number +// Obtain a nearly unique nonce based on a monotonic account sequence number func SequenceNonce(address Address, sequence uint64) []byte { bs := make([]byte, 8) bin.BigEndian.PutUint64(bs, sequence) diff --git a/crypto/crypto.go b/crypto/crypto.go index 089eb675f..080696f46 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -52,14 +52,14 @@ func CurveTypeFromString(s string) (CurveType, error) { case "": return CurveTypeUnset, nil default: - return CurveTypeUnset, ErrInvalidCurve(s) + return CurveTypeUnset, fmt.Errorf("invalid curve name: '%s'", s) } } -type ErrInvalidCurve string +type ErrInvalidCurve uint32 -func (err ErrInvalidCurve) Error() string { - return fmt.Sprintf("invalid curve type") +func (curveType ErrInvalidCurve) Error() string { + return fmt.Sprintf("invalid curve type: %d", curveType) } // The types in this file allow us to control serialisation of keys and signatures, as well as the interface diff --git a/crypto/crypto.pb.go b/crypto/crypto.pb.go index bbd34dc7d..91be15f3f 100644 --- a/crypto/crypto.pb.go +++ b/crypto/crypto.pb.go @@ -182,25 +182,25 @@ func init() { proto.RegisterFile("crypto.proto", fileDescriptor_527278fb02d03321 func init() { golang_proto.RegisterFile("crypto.proto", fileDescriptor_527278fb02d03321) } var fileDescriptor_527278fb02d03321 = []byte{ - // 282 bytes of a gzipped FileDescriptorProto + // 274 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x2e, 0xaa, 0x2c, - 0x28, 0xc9, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0xa4, 0x74, 0xd3, 0x33, - 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xd2, - 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x4d, 0x66, 0xe4, 0xe2, 0x0c, - 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xf6, 0x4e, 0xad, 0x14, 0xd2, 0xe6, 0xe2, 0x74, 0x2e, 0x2d, 0x2a, - 0x4b, 0x0d, 0xa9, 0x2c, 0x48, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x75, 0xe2, 0xfd, 0x75, 0x4f, - 0x1e, 0x21, 0x18, 0x84, 0x60, 0x0a, 0x05, 0x23, 0xe9, 0x94, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x71, - 0x32, 0x3d, 0x71, 0x4f, 0x9e, 0xe1, 0xd6, 0x3d, 0x79, 0x64, 0x47, 0x64, 0x54, 0x16, 0xa4, 0x16, - 0xe5, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x27, 0x95, 0x16, 0x15, 0xe5, 0x97, 0xeb, 0x27, 0x65, - 0xe6, 0x25, 0x16, 0x55, 0xea, 0x79, 0xa4, 0x56, 0x38, 0x55, 0x96, 0xa4, 0x16, 0x07, 0x21, 0xcc, - 0xb1, 0x62, 0x99, 0xb1, 0x40, 0x9e, 0x41, 0xa9, 0x91, 0x91, 0x8b, 0x2b, 0xa0, 0x28, 0xb3, 0x2c, - 0xb1, 0x24, 0x95, 0x64, 0x67, 0xc9, 0x60, 0x38, 0x0b, 0xc9, 0x7c, 0x21, 0x39, 0x64, 0x83, 0x25, - 0x98, 0xc1, 0xd2, 0x48, 0x22, 0x56, 0x1c, 0x1d, 0x0b, 0xe4, 0x19, 0xc0, 0x6e, 0x88, 0xe1, 0xe2, - 0x0c, 0xce, 0x4c, 0xcf, 0x4b, 0x2c, 0x29, 0x2d, 0x4a, 0x25, 0xd9, 0x05, 0x70, 0x9d, 0x30, 0x17, - 0xc0, 0x05, 0x20, 0x3e, 0x74, 0xb2, 0x3b, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x1b, - 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x3c, 0xf0, 0x58, 0x8e, 0xf1, 0xc4, 0x63, 0x39, 0xc6, - 0x28, 0x15, 0xfc, 0x61, 0x07, 0x89, 0xe6, 0x24, 0x36, 0x70, 0xf4, 0x19, 0x03, 0x02, 0x00, 0x00, - 0xff, 0xff, 0x20, 0x25, 0x33, 0xe2, 0x05, 0x02, 0x00, 0x00, + 0x28, 0xc9, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0xa4, 0x44, 0xd2, 0xf3, + 0xd3, 0xf3, 0xc1, 0x42, 0xfa, 0x20, 0x16, 0x44, 0x56, 0x69, 0x32, 0x23, 0x17, 0x67, 0x40, 0x69, + 0x52, 0x4e, 0x66, 0xb2, 0x77, 0x6a, 0xa5, 0x90, 0x36, 0x17, 0xa7, 0x73, 0x69, 0x51, 0x59, 0x6a, + 0x48, 0x65, 0x41, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xaf, 0x13, 0xef, 0xaf, 0x7b, 0xf2, 0x08, + 0xc1, 0x20, 0x04, 0x53, 0x28, 0x18, 0x49, 0xa7, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x8f, 0x93, 0xe9, + 0x89, 0x7b, 0xf2, 0x0c, 0xb7, 0xee, 0xc9, 0xeb, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, + 0xe7, 0xe7, 0xea, 0x67, 0x54, 0x16, 0xa4, 0x16, 0xe5, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x27, + 0x95, 0x16, 0x15, 0xe5, 0x97, 0xeb, 0x27, 0x65, 0xe6, 0x25, 0x16, 0x55, 0xea, 0x79, 0xa4, 0x56, + 0x38, 0x55, 0x96, 0xa4, 0x16, 0x07, 0x21, 0xcc, 0xb1, 0x62, 0x99, 0xb1, 0x40, 0x9e, 0x41, 0xa9, + 0x91, 0x91, 0x8b, 0x2b, 0xa0, 0x28, 0xb3, 0x2c, 0xb1, 0x24, 0x95, 0x64, 0x67, 0xc9, 0x60, 0x38, + 0x0b, 0xc9, 0x7c, 0x21, 0x39, 0x64, 0x83, 0x25, 0x98, 0xc1, 0xd2, 0x48, 0x22, 0x56, 0x1c, 0x1d, + 0x0b, 0xe4, 0x19, 0xc0, 0x6e, 0x88, 0xe1, 0xe2, 0x0c, 0xce, 0x4c, 0xcf, 0x4b, 0x2c, 0x29, 0x2d, + 0x4a, 0x25, 0xd9, 0x05, 0x70, 0x9d, 0x30, 0x17, 0xc0, 0x05, 0x20, 0x3e, 0x74, 0xb2, 0x3b, 0xf1, + 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x1b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x3c, + 0xf0, 0x58, 0x8e, 0xf1, 0xc4, 0x63, 0x39, 0xc6, 0x28, 0x15, 0xfc, 0x61, 0x07, 0x89, 0xcd, 0x24, + 0x36, 0x70, 0xf4, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x98, 0xef, 0xb8, 0x3a, 0xec, 0x01, + 0x00, 0x00, } func (m *PublicKey) Marshal() (dAtA []byte, err error) { @@ -493,10 +493,7 @@ func (m *PublicKey) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthCrypto - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCrypto } if (iNdEx + skippy) > l { @@ -634,10 +631,7 @@ func (m *PrivateKey) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthCrypto - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCrypto } if (iNdEx + skippy) > l { @@ -741,10 +735,7 @@ func (m *Signature) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthCrypto - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCrypto } if (iNdEx + skippy) > l { diff --git a/crypto/tendermint.go b/crypto/tendermint.go index 44398161d..fc40829a2 100644 --- a/crypto/tendermint.go +++ b/crypto/tendermint.go @@ -2,67 +2,33 @@ package crypto import ( "fmt" - "strings" "github.com/btcsuite/btcd/btcec" - abci "github.com/tendermint/tendermint/abci/types" tmCrypto "github.com/tendermint/tendermint/crypto" tmEd25519 "github.com/tendermint/tendermint/crypto/ed25519" tmSecp256k1 "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/tendermint/tendermint/p2p" ) -func NodeIDFromAddress(id Address) p2p.ID { - return p2p.ID(strings.ToLower(id.String())) -} - func PublicKeyFromTendermintPubKey(pubKey tmCrypto.PubKey) (PublicKey, error) { switch pk := pubKey.(type) { - case tmEd25519.PubKeyEd25519: + case tmEd25519.PubKey: return PublicKeyFromBytes(pk[:], CurveTypeEd25519) - case tmSecp256k1.PubKeySecp256k1: + case tmSecp256k1.PubKey: return PublicKeyFromBytes(pk[:], CurveTypeSecp256k1) default: return PublicKey{}, fmt.Errorf("unrecognised tendermint public key type: %v", pk) } } -func PublicKeyFromABCIPubKey(pubKey abci.PubKey) (PublicKey, error) { - switch pubKey.Type { - case CurveTypeEd25519.ABCIType(): - return PublicKey{ - CurveType: CurveTypeEd25519, - PublicKey: pubKey.Data, - }, nil - case CurveTypeSecp256k1.ABCIType(): - return PublicKey{ - CurveType: CurveTypeSecp256k1, - PublicKey: pubKey.Data, - }, nil - } - return PublicKey{}, fmt.Errorf("did not recognise ABCI PubKey type: %s", pubKey.Type) -} // PublicKey extensions -// Return the ABCI PubKey. See Tendermint protobuf.go for the go-crypto conversion this is based on -func (p PublicKey) ABCIPubKey() abci.PubKey { - return abci.PubKey{ - Type: p.CurveType.ABCIType(), - Data: p.PublicKey, - } -} - func (p PublicKey) TendermintPubKey() tmCrypto.PubKey { switch p.CurveType { case CurveTypeEd25519: - pk := tmEd25519.PubKeyEd25519{} - copy(pk[:], p.PublicKey) - return pk + return tmEd25519.PubKey(p.PublicKey) case CurveTypeSecp256k1: - pk := tmSecp256k1.PubKeySecp256k1{} - copy(pk[:], p.PublicKey) - return pk + return tmSecp256k1.PubKey(p.PublicKey) default: return nil } diff --git a/deploy/def/client.go b/deploy/def/client.go index 03114133c..bb68718b9 100644 --- a/deploy/def/client.go +++ b/deploy/def/client.go @@ -8,6 +8,8 @@ import ( "strconv" "time" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/binary" @@ -28,7 +30,6 @@ import ( "github.com/hyperledger/burrow/txs/payload" "github.com/tendermint/tendermint/p2p" hex "github.com/tmthrgd/go-hex" - "google.golang.org/grpc" ) type Client struct { @@ -58,7 +59,7 @@ func NewClient(chain, keysClientAddress string, mempoolSigning bool, timeout tim // Connect GRPC clients using ChainURL func (c *Client) dial(logger *logging.Logger) error { if c.transactClient == nil { - conn, err := grpc.Dial(c.ChainAddress, grpc.WithInsecure()) + conn, err := encoding.GRPCDial(c.ChainAddress) if err != nil { return err } diff --git a/deploy/jobs/jobs_proposal.go b/deploy/jobs/jobs_proposal.go index a04566d6d..e0a936fc5 100644 --- a/deploy/jobs/jobs_proposal.go +++ b/deploy/jobs/jobs_proposal.go @@ -4,6 +4,8 @@ import ( "encoding/json" "fmt" + "github.com/hyperledger/burrow/execution/contexts" + "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" @@ -179,7 +181,7 @@ func ProposalJob(prop *def.Proposal, do *def.DeployArgs, parentScript *def.Playb return "", err } proposal.BatchTx.Inputs = []*payload.TxInput{proposalInput} - proposalHash := proposal.Hash() + proposalHash := contexts.HashProposal(&proposal) var proposalTx *payload.ProposalTx if do.ProposeVerify { diff --git a/dump/dump.pb.go b/dump/dump.pb.go index d3c2c0214..ebbd2b57d 100644 --- a/dump/dump.pb.go +++ b/dump/dump.pb.go @@ -292,38 +292,38 @@ func init() { proto.RegisterFile("dump.proto", fileDescriptor_58418148159c29a6) func init() { golang_proto.RegisterFile("dump.proto", fileDescriptor_58418148159c29a6) } var fileDescriptor_58418148159c29a6 = []byte{ - // 493 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0x65, 0x5b, 0xa7, 0x69, 0x37, 0xa5, 0x87, 0x55, 0x85, 0xac, 0x1c, 0x9c, 0xc8, 0x42, 0x10, - 0x21, 0xba, 0x91, 0x02, 0x45, 0x1c, 0x7a, 0x69, 0x68, 0x50, 0xab, 0x42, 0x0f, 0x4b, 0x55, 0x24, - 0x6e, 0xfe, 0x18, 0x1c, 0x4b, 0xb1, 0xd7, 0x5a, 0xaf, 0x21, 0xfe, 0x09, 0xdc, 0x38, 0x73, 0xe0, - 0xb7, 0x70, 0xcc, 0x11, 0x71, 0x42, 0x1c, 0x0a, 0x4a, 0xff, 0x08, 0xf2, 0x7e, 0x10, 0xe8, 0x01, - 0xc1, 0x6d, 0x66, 0x9e, 0xe7, 0xcd, 0xf3, 0x7b, 0x8b, 0x71, 0x5c, 0x65, 0x05, 0x2d, 0x04, 0x97, - 0x9c, 0x38, 0x4d, 0xdd, 0xdd, 0x4b, 0x52, 0x39, 0xad, 0x42, 0x1a, 0xf1, 0x6c, 0x98, 0xf0, 0x84, - 0x0f, 0x15, 0x18, 0x56, 0xaf, 0x55, 0xa7, 0x1a, 0x55, 0xe9, 0xa5, 0x6e, 0x2f, 0xe1, 0x3c, 0x99, - 0xc1, 0xea, 0x2b, 0x99, 0x66, 0x50, 0xca, 0xc0, 0xb2, 0x76, 0xb7, 0x82, 0x28, 0x33, 0x25, 0x86, - 0x39, 0x44, 0xa6, 0xee, 0xe4, 0x41, 0x06, 0xa5, 0x6e, 0xfc, 0x8f, 0x08, 0xb7, 0x5f, 0x48, 0x2e, - 0x82, 0x04, 0xc8, 0x53, 0xbc, 0x7e, 0x0a, 0xb5, 0x8b, 0xfa, 0x68, 0xb0, 0x3d, 0x7e, 0xb8, 0xb8, - 0xec, 0xdd, 0xf8, 0x76, 0xd9, 0xbb, 0xff, 0x9b, 0xa8, 0x69, 0x5d, 0x80, 0x98, 0x41, 0x9c, 0x80, - 0x18, 0x86, 0x95, 0x10, 0xfc, 0xed, 0x30, 0x4c, 0xf3, 0x40, 0xd4, 0xf4, 0x25, 0x17, 0xf1, 0x68, - 0xff, 0x11, 0x6b, 0x08, 0xc8, 0x29, 0x6e, 0x5d, 0x04, 0xb3, 0x0a, 0xdc, 0x35, 0xc5, 0xb4, 0x6f, - 0x98, 0xf6, 0xfe, 0x89, 0xe9, 0x18, 0xe6, 0xe3, 0x5a, 0x42, 0xc9, 0x34, 0x87, 0xff, 0x0e, 0xe1, - 0x9d, 0xc3, 0x28, 0xe2, 0x55, 0x2e, 0xad, 0xce, 0x33, 0xdc, 0x3e, 0x8c, 0x63, 0x01, 0x65, 0xf9, - 0x7f, 0x5a, 0x23, 0x51, 0x17, 0x92, 0x53, 0xb3, 0xcb, 0x2c, 0x09, 0xb9, 0xfb, 0xcb, 0x02, 0x77, - 0xad, 0xbf, 0x3e, 0xe8, 0x8c, 0x6e, 0x52, 0x95, 0x8d, 0x19, 0x32, 0x8b, 0xfa, 0x1f, 0x10, 0xde, - 0x9c, 0x5c, 0x3c, 0x9f, 0xbc, 0x81, 0x5c, 0x12, 0x17, 0xb7, 0x9f, 0x4c, 0x83, 0x34, 0x3f, 0x39, - 0x52, 0x2a, 0xb6, 0x98, 0x6d, 0xc9, 0x2e, 0x6e, 0x9d, 0xe4, 0x31, 0xcc, 0x5d, 0xa7, 0x8f, 0x06, - 0x0e, 0xd3, 0x0d, 0x79, 0x8c, 0x9d, 0xf3, 0x34, 0xd3, 0xa6, 0x74, 0x46, 0x5d, 0xaa, 0xd3, 0xa3, - 0x36, 0x3d, 0x7a, 0x6e, 0xd3, 0x1b, 0x6f, 0x36, 0xbf, 0xf3, 0xfe, 0x7b, 0x0f, 0x31, 0xb5, 0x41, - 0x6e, 0xe3, 0x96, 0x3a, 0xe9, 0xae, 0xab, 0xd5, 0x1d, 0xaa, 0xc2, 0x7c, 0xc6, 0x13, 0x35, 0x65, - 0x1a, 0xf4, 0xbf, 0x20, 0xec, 0x1c, 0x55, 0x59, 0x41, 0x6e, 0xe1, 0x8d, 0x63, 0x48, 0x93, 0xa9, - 0x54, 0xba, 0x1c, 0x66, 0x3a, 0x72, 0x07, 0xb7, 0x8d, 0x91, 0x46, 0xc3, 0x36, 0x6d, 0x1e, 0x88, - 0x99, 0x31, 0x0b, 0x92, 0x83, 0xeb, 0x86, 0x9b, 0xbb, 0xbb, 0xda, 0x95, 0x3f, 0x31, 0x76, 0x3d, - 0x9c, 0x7b, 0x2b, 0x8b, 0xd4, 0xff, 0x37, 0x7a, 0xd5, 0x9e, 0x9d, 0xb2, 0x95, 0x85, 0x7d, 0xec, - 0x9c, 0x05, 0x19, 0xb8, 0x2d, 0x23, 0x47, 0x3f, 0xcc, 0x49, 0x2e, 0x45, 0xcd, 0x14, 0x32, 0x3e, - 0x58, 0x2c, 0x3d, 0xf4, 0x79, 0xe9, 0xa1, 0xaf, 0x4b, 0x0f, 0xfd, 0x58, 0x7a, 0xe8, 0xd3, 0x95, - 0x87, 0x16, 0x57, 0x1e, 0x7a, 0xe5, 0xff, 0x3d, 0xeb, 0xe6, 0x64, 0xb8, 0xa1, 0xcc, 0x7d, 0xf0, - 0x33, 0x00, 0x00, 0xff, 0xff, 0x30, 0xe1, 0x0a, 0x94, 0x6b, 0x03, 0x00, 0x00, + // 489 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x3d, 0x6f, 0x13, 0x41, + 0x10, 0x65, 0xe3, 0x73, 0x9c, 0xac, 0x43, 0x8a, 0x95, 0x85, 0x4e, 0x2e, 0xce, 0x96, 0x85, 0xc0, + 0x42, 0xb0, 0x27, 0x19, 0x82, 0x28, 0xd2, 0xc4, 0xc4, 0x28, 0x51, 0x20, 0xc5, 0x12, 0x05, 0x89, + 0xee, 0x3e, 0x86, 0xf3, 0x49, 0xbe, 0xdb, 0xd3, 0xde, 0x1e, 0xf8, 0x7e, 0x02, 0x1d, 0x35, 0x05, + 0xbf, 0x85, 0xd2, 0x25, 0xa2, 0x42, 0x14, 0x01, 0x39, 0x7f, 0x04, 0xdd, 0x7e, 0x10, 0x91, 0x02, + 0x41, 0x37, 0x33, 0x4f, 0xf3, 0xe6, 0xed, 0x7b, 0x8b, 0x71, 0x5c, 0x65, 0x05, 0x2d, 0x04, 0x97, + 0x9c, 0x38, 0x4d, 0xdd, 0xef, 0x25, 0x3c, 0xe1, 0x6a, 0xe0, 0x37, 0x95, 0xc6, 0xfa, 0x83, 0x84, + 0xf3, 0x64, 0x01, 0xbe, 0xea, 0xc2, 0xea, 0x8d, 0x2f, 0xd3, 0x0c, 0x4a, 0x19, 0xd8, 0xe5, 0xfe, + 0x76, 0x10, 0x65, 0xa6, 0xc4, 0xb0, 0x84, 0xc8, 0xd4, 0xdd, 0x3c, 0xc8, 0xa0, 0xd4, 0xcd, 0xe8, + 0x13, 0xc2, 0x9d, 0x97, 0x92, 0x8b, 0x20, 0x01, 0xf2, 0x0c, 0xb7, 0x4e, 0xa0, 0x76, 0xd1, 0x10, + 0x8d, 0x77, 0xa6, 0x8f, 0x56, 0x17, 0x83, 0x1b, 0xdf, 0x2f, 0x06, 0xf7, 0x93, 0x54, 0xce, 0xab, + 0x90, 0x46, 0x3c, 0xf3, 0xe7, 0x75, 0x01, 0x62, 0x01, 0x71, 0x02, 0xc2, 0x0f, 0x2b, 0x21, 0xf8, + 0x3b, 0x3f, 0x4c, 0xf3, 0x40, 0xd4, 0xf4, 0x15, 0x17, 0xf1, 0x64, 0xef, 0x31, 0x6b, 0x08, 0xc8, + 0x09, 0x6e, 0x9f, 0x07, 0x8b, 0x0a, 0xdc, 0x0d, 0xc5, 0xb4, 0x67, 0x98, 0x1e, 0xfc, 0x13, 0xd3, + 0x11, 0x2c, 0xa7, 0xb5, 0x84, 0x92, 0x69, 0x8e, 0xd1, 0x7b, 0x84, 0x77, 0x0f, 0xa2, 0x88, 0x57, + 0xb9, 0xb4, 0x3a, 0x4f, 0x71, 0xe7, 0x20, 0x8e, 0x05, 0x94, 0xe5, 0xff, 0x69, 0x8d, 0x44, 0x5d, + 0x48, 0x4e, 0xcd, 0x2e, 0xb3, 0x24, 0xe4, 0xee, 0x6f, 0x0b, 0xdc, 0x8d, 0x61, 0x6b, 0xdc, 0x9d, + 0xdc, 0xa4, 0x2a, 0x02, 0x33, 0x64, 0x16, 0x1d, 0x7d, 0x44, 0x78, 0x6b, 0x76, 0xfe, 0x62, 0xf6, + 0x16, 0x72, 0x49, 0x5c, 0xdc, 0x79, 0x3a, 0x0f, 0xd2, 0xfc, 0xf8, 0x50, 0xa9, 0xd8, 0x66, 0xb6, + 0x25, 0x3d, 0xdc, 0x3e, 0xce, 0x63, 0x58, 0xba, 0xce, 0x10, 0x8d, 0x1d, 0xa6, 0x1b, 0xf2, 0x04, + 0x3b, 0x67, 0x69, 0xa6, 0x4d, 0xe9, 0x4e, 0xfa, 0x54, 0xa7, 0x47, 0x6d, 0x7a, 0xf4, 0xcc, 0xa6, + 0x37, 0xdd, 0x6a, 0x9e, 0xf3, 0xe1, 0xc7, 0x00, 0x31, 0xb5, 0x41, 0x6e, 0xe3, 0xb6, 0x3a, 0xe9, + 0xb6, 0xd4, 0xea, 0x2e, 0x55, 0x61, 0x3e, 0xe7, 0x89, 0x9a, 0x32, 0x0d, 0x8e, 0xbe, 0x22, 0xec, + 0x1c, 0x56, 0x59, 0x41, 0x6e, 0xe1, 0xcd, 0x23, 0x48, 0x93, 0xb9, 0x54, 0xba, 0x1c, 0x66, 0x3a, + 0x72, 0x07, 0x77, 0x8c, 0x91, 0x46, 0xc3, 0x0e, 0x6d, 0x3e, 0x88, 0x99, 0x31, 0x0b, 0x92, 0xfd, + 0xeb, 0x86, 0x9b, 0xbb, 0x3d, 0xed, 0xca, 0x9f, 0x18, 0xbb, 0x1e, 0xce, 0xbd, 0x2b, 0x8b, 0xd4, + 0xfb, 0x1b, 0xbd, 0x6a, 0xcf, 0x4e, 0xd9, 0x95, 0x85, 0x43, 0xec, 0x9c, 0x06, 0x19, 0xb8, 0x6d, + 0x23, 0x47, 0x7f, 0xcc, 0x59, 0x2e, 0x45, 0xcd, 0x14, 0x32, 0xdd, 0x5f, 0xad, 0x3d, 0xf4, 0x65, + 0xed, 0xa1, 0x6f, 0x6b, 0x0f, 0xfd, 0x5c, 0x7b, 0xe8, 0xf3, 0xa5, 0x87, 0x56, 0x97, 0x1e, 0x7a, + 0x3d, 0xfa, 0x7b, 0xd6, 0xcd, 0xc9, 0x70, 0x53, 0x99, 0xfb, 0xf0, 0x57, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x6b, 0xbe, 0xfd, 0xc8, 0x52, 0x03, 0x00, 0x00, } func (m *Storage) Marshal() (dAtA []byte, err error) { @@ -773,10 +773,7 @@ func (m *Storage) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthDump - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthDump } if (iNdEx + skippy) > l { @@ -894,10 +891,7 @@ func (m *AccountStorage) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthDump - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthDump } if (iNdEx + skippy) > l { @@ -1068,10 +1062,7 @@ func (m *EVMEvent) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthDump - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthDump } if (iNdEx + skippy) > l { @@ -1285,10 +1276,7 @@ func (m *Dump) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthDump - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthDump } if (iNdEx + skippy) > l { diff --git a/encoding/encoding.pb.go b/encoding/encoding.pb.go index 703b69cb6..4e355d5a0 100644 --- a/encoding/encoding.pb.go +++ b/encoding/encoding.pb.go @@ -89,19 +89,19 @@ func init() { proto.RegisterFile("encoding.proto", fileDescriptor_ac330e3fa468db func init() { golang_proto.RegisterFile("encoding.proto", fileDescriptor_ac330e3fa468db3c) } var fileDescriptor_ac330e3fa468db3c = []byte{ - // 189 bytes of a gzipped FileDescriptorProto + // 180 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0xcd, 0x4b, 0xce, - 0x4f, 0xc9, 0xcc, 0x4b, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, - 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, - 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0xb2, 0xe7, 0xe2, - 0x0e, 0x49, 0x2d, 0x2e, 0xf1, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15, 0x12, 0xe2, 0x62, 0x09, - 0xa9, 0x2c, 0x48, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0d, 0x02, 0xb3, 0x85, 0xc4, 0xb8, 0xd8, - 0x1c, 0x73, 0xf3, 0x4b, 0xf3, 0x4a, 0x24, 0x98, 0x14, 0x18, 0x35, 0x58, 0x82, 0xa0, 0x3c, 0x2b, - 0x96, 0x19, 0x0b, 0xe4, 0x19, 0x9c, 0x1c, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, - 0xc6, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x0f, 0x3c, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, - 0x31, 0x4a, 0x0d, 0xc9, 0x25, 0x19, 0x95, 0x05, 0xa9, 0x45, 0x39, 0xa9, 0x29, 0xe9, 0xa9, 0x45, - 0xfa, 0x49, 0xa5, 0x45, 0x45, 0xf9, 0xe5, 0xfa, 0x30, 0x17, 0x27, 0xb1, 0x81, 0x5d, 0x62, 0x0c, - 0x08, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x76, 0xda, 0xe3, 0xd4, 0x00, 0x00, 0x00, + 0x4f, 0xc9, 0xcc, 0x4b, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x44, + 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x82, 0xfa, 0x20, 0x16, 0x44, 0x5e, 0xc9, 0x9e, 0x8b, 0x3b, 0x24, + 0xb5, 0xb8, 0xc4, 0x37, 0xb5, 0xb8, 0x38, 0x31, 0x3d, 0x55, 0x48, 0x88, 0x8b, 0x25, 0xa4, 0xb2, + 0x20, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x37, 0x08, 0xcc, 0x16, 0x12, 0xe3, 0x62, 0x73, 0xcc, + 0xcd, 0x2f, 0xcd, 0x2b, 0x91, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x09, 0x82, 0xf2, 0xac, 0x58, 0x66, + 0x2c, 0x90, 0x67, 0x70, 0x72, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x1b, 0x8f, + 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x3c, 0xf0, 0x58, 0x8e, 0xf1, 0xc4, 0x63, 0x39, 0xc6, 0x28, + 0xb5, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x8c, 0xca, 0x82, 0xd4, + 0xa2, 0x9c, 0xd4, 0x94, 0xf4, 0xd4, 0x22, 0xfd, 0xa4, 0xd2, 0xa2, 0xa2, 0xfc, 0x72, 0x7d, 0x98, + 0xc3, 0x92, 0xd8, 0xc0, 0x2e, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x38, 0x2e, 0xed, + 0xbb, 0x00, 0x00, 0x00, } func (m *TestMessage) Marshal() (dAtA []byte, err error) { @@ -249,10 +249,7 @@ func (m *TestMessage) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthEncoding - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEncoding } if (iNdEx + skippy) > l { diff --git a/encoding/grpc.go b/encoding/grpc.go new file mode 100644 index 000000000..3d0a7bd66 --- /dev/null +++ b/encoding/grpc.go @@ -0,0 +1,44 @@ +package encoding + +import ( + "context" + + "github.com/gogo/protobuf/proto" + "google.golang.org/grpc" + "google.golang.org/grpc/encoding" +) + +func init() { + encoding.RegisterCodec(&GRPCCodec{}) +} + +const GRPCCodecName = "gogo" + +type GRPCCodec struct { +} + +func (G *GRPCCodec) String() string { + return GRPCCodecName +} + +func (G *GRPCCodec) Marshal(v interface{}) ([]byte, error) { + return Encode(v.(proto.Message)) +} + +func (G *GRPCCodec) Unmarshal(data []byte, v interface{}) error { + return Decode(data, v.(proto.Message)) +} + +func (G *GRPCCodec) Name() string { + return GRPCCodecName +} + +var DefaultDialOptions = []grpc.DialOption{grpc.WithInsecure(), grpc.WithDefaultCallOptions(grpc.CallContentSubtype(GRPCCodecName))} + +func GRPCDial(grpcAddress string, additionalOpts ...grpc.DialOption) (*grpc.ClientConn, error) { + return grpc.Dial(grpcAddress, append(additionalOpts, DefaultDialOptions...)...) +} + +func GRPCDialContext(ctx context.Context, grpcAddress string, additionalOpts ...grpc.DialOption) (*grpc.ClientConn, error) { + return grpc.DialContext(ctx, grpcAddress, append(additionalOpts, DefaultDialOptions...)...) +} diff --git a/encoding/protobuf.go b/encoding/protobuf.go index 211209848..78d0d8194 100644 --- a/encoding/protobuf.go +++ b/encoding/protobuf.go @@ -5,53 +5,58 @@ import ( "fmt" "io" + gogo "github.com/gogo/protobuf/proto" "github.com/golang/protobuf/proto" ) -type Buffer struct { - *proto.Buffer -} - -// Centralise proto.Buffer constructor. gogo protobuf freaks out about deterministic -// marshalling on objects with custom marshallers so we use google protobuf here -func NewBuffer(bs []byte) *Buffer { - buf := proto.NewBuffer(bs) - buf.SetDeterministic(true) - return &Buffer{Buffer: buf} -} +// TODO(Silas): we need a sustainable path WRT our reliance on gogoproto generated types - currently we rely on gogoproto +// generated marshalling code on all types // Single shot encoding func Encode(msg proto.Message) ([]byte, error) { - buf := NewBuffer(nil) - err := buf.Marshal(msg) + m, ok := msg.(gogo.Marshaler) + if ok { + // NOTE: we have to go down this path in order to handle custom types with protobuf-go v2 + return m.Marshal() + } + buffer := new(proto.Buffer) + buffer.SetDeterministic(true) + err := buffer.Marshal(msg) if err != nil { return nil, err } - return buf.Bytes(), nil + return buffer.Bytes(), nil } // Single shot decoding func Decode(bs []byte, msg proto.Message) error { - return NewBuffer(bs).Unmarshal(msg) + m, ok := msg.(gogo.Unmarshaler) + if ok { + // NOTE: we have to go down this path in order to handle custom types with protobuf-go v2 + return m.Unmarshal(bs) + } + buffer := new(proto.Buffer) + buffer.SetDeterministic(true) + buffer.SetBuf(bs) + return buffer.Unmarshal(msg) } // Write messages with length-prefix framing to the provider Writer. Returns the number of bytes written. func WriteMessage(w io.Writer, pb proto.Message) (int, error) { const errHeader = "WriteMessage()" - buf := NewBuffer(nil) - err := buf.Marshal(pb) + buf, err := Encode(pb) if err != nil { return 0, fmt.Errorf("%s: %v", errHeader, err) } // Write length prefix bs := make([]byte, binary.MaxVarintLen64) - n := binary.PutVarint(bs, int64(len(buf.Bytes()))) + n := binary.PutVarint(bs, int64(len(buf))) written, err := w.Write(bs[:n]) if err != nil { return written, fmt.Errorf("%s: %v", errHeader, err) } // Write message - n, err = w.Write(buf.Bytes()) + n, err = w.Write(buf) written += n return written, nil } @@ -82,7 +87,7 @@ func ReadMessage(r io.Reader, pb proto.Message) (int, error) { return read, fmt.Errorf("%s: expected protobuf message of %d bytes but could only read %d bytes", errHeader, msgLength, n) } - err = proto.NewBuffer(bs).Unmarshal(pb) + err = Decode(bs, pb) if err != nil { return read, fmt.Errorf("%s: %v", errHeader, err) } diff --git a/encoding/rlp/rlp.go b/encoding/rlp/rlp.go index 7a4d2fe43..916c0c4b3 100644 --- a/encoding/rlp/rlp.go +++ b/encoding/rlp/rlp.go @@ -1,3 +1,5 @@ +// +// See https://eth.wiki/fundamentals/rlp package rlp import ( @@ -54,6 +56,8 @@ func encodeUint64(i uint64) ([]byte, error) { } func encodeLength(n, offset int) []byte { + // > if a string is 0-55 bytes long, the RLP encoding consists of a single byte with value 0x80 plus + // > the length of the string followed by the string. if n <= 55 { return []uint8{uint8(n + offset)} } @@ -62,7 +66,10 @@ func encodeLength(n, offset int) []byte { b := make([]byte, 8) binary.BigEndian.PutUint64(b, i) size := bits.Len64(i)/8 + 1 - return append([]byte{uint8(0xb7 + len(string(n)))}, b[8-size:]...) + // > If a string is more than 55 bytes long, the RLP encoding consists of a single byte with value 0xb7 + // > plus the length in bytes of the length of the string in binary form, followed by the length of the string, + // > followed by the string + return append([]byte{uint8(0xb7 + size)}, b[8-size:]...) } func encodeString(input []byte) ([]byte, error) { diff --git a/event/pubsub/pubsub_test.go b/event/pubsub/pubsub_test.go index 94da8c07d..e8a405462 100644 --- a/event/pubsub/pubsub_test.go +++ b/event/pubsub/pubsub_test.go @@ -194,7 +194,7 @@ func benchmarkNClients(n int, b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - s.PublishWithTags(ctx, "Gamora", query.TagMap{"abci.Account.Owner": "Ivan", "abci.Invoices.Number": string(i)}) + s.PublishWithTags(ctx, "Gamora", query.TagMap{"abci.Account.Owner": "Ivan", "abci.Invoices.Number": fmt.Sprint(i)}) } } diff --git a/execution/contexts/proposal_context.go b/execution/contexts/proposal_context.go index 579ae25a5..9be2d8d9d 100644 --- a/execution/contexts/proposal_context.go +++ b/execution/contexts/proposal_context.go @@ -6,6 +6,8 @@ import ( "runtime/debug" "unicode" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/acm/validator" "github.com/hyperledger/burrow/crypto" @@ -29,6 +31,17 @@ type ProposalContext struct { Contexts map[payload.Type]Context } +func HashProposal(p *payload.Proposal) []byte { + bs, err := encoding.Encode(p) + if err != nil { + panic("failed to encode Proposal") + } + + hash := sha256.Sum256(bs) + + return hash[:] +} + func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) error { var ok bool ctx.tx, ok = p.(*payload.ProposalTx) @@ -77,7 +90,7 @@ func (ctx *ProposalContext) Execute(txe *exec.TxExecution, p payload.Payload) er return err } - proposalHash = ctx.tx.Proposal.Hash() + proposalHash = HashProposal(ctx.tx.Proposal) ballot, err = ctx.ProposalReg.GetProposal(proposalHash) if err != nil { diff --git a/execution/errors/errors.pb.go b/execution/errors/errors.pb.go index 47b0097ae..7b1fa60d9 100644 --- a/execution/errors/errors.pb.go +++ b/execution/errors/errors.pb.go @@ -88,20 +88,20 @@ func init() { proto.RegisterFile("errors.proto", fileDescriptor_24fe73c7f0ddb19c func init() { golang_proto.RegisterFile("errors.proto", fileDescriptor_24fe73c7f0ddb19c) } var fileDescriptor_24fe73c7f0ddb19c = []byte{ - // 202 bytes of a gzipped FileDescriptorProto + // 193 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x2d, 0x2a, 0xca, - 0x2f, 0x2a, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0xa4, 0x74, 0xd3, 0x33, - 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xd2, - 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x05, 0x73, 0x71, 0xba, 0x56, - 0x24, 0xa7, 0x16, 0x94, 0x64, 0xe6, 0xe7, 0x09, 0x29, 0x71, 0xb1, 0x38, 0xe7, 0xa7, 0xa4, 0x4a, - 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x3a, 0xf1, 0x3d, 0xba, 0x27, 0xcf, 0x05, 0xe2, 0xfb, 0x95, 0xe6, - 0x26, 0xa5, 0x16, 0x05, 0x81, 0xe5, 0x84, 0x64, 0x90, 0x34, 0x48, 0x30, 0x29, 0x30, 0x6a, 0x70, - 0x06, 0x21, 0x04, 0xac, 0x58, 0x66, 0x2c, 0x90, 0x67, 0x70, 0xf2, 0x38, 0xf1, 0x48, 0x8e, 0xf1, - 0xc2, 0x23, 0x39, 0xc6, 0x1b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x3c, 0xf0, 0x58, 0x8e, - 0xf1, 0xc4, 0x63, 0x39, 0xc6, 0x28, 0x3d, 0x24, 0xd7, 0x65, 0x54, 0x16, 0xa4, 0x16, 0xe5, 0xa4, - 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x27, 0x95, 0x16, 0x15, 0xe5, 0x97, 0xeb, 0xa7, 0x56, 0xa4, 0x26, - 0x97, 0x82, 0x0c, 0xd2, 0x87, 0xf8, 0x26, 0x89, 0x0d, 0xec, 0x4a, 0x63, 0x40, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x43, 0x4f, 0x55, 0x84, 0xec, 0x00, 0x00, 0x00, + 0x2f, 0x2a, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0xa4, 0x44, 0xd2, 0xf3, + 0xd3, 0xf3, 0xc1, 0x42, 0xfa, 0x20, 0x16, 0x44, 0x56, 0x29, 0x98, 0x8b, 0xd3, 0xb5, 0x22, 0x39, + 0xb5, 0xa0, 0x24, 0x33, 0x3f, 0x4f, 0x48, 0x89, 0x8b, 0xc5, 0x39, 0x3f, 0x25, 0x55, 0x82, 0x51, + 0x81, 0x51, 0x83, 0xd7, 0x89, 0xef, 0xd1, 0x3d, 0x79, 0x2e, 0x10, 0xdf, 0xaf, 0x34, 0x37, 0x29, + 0xb5, 0x28, 0x08, 0x2c, 0x27, 0x24, 0x83, 0xa4, 0x41, 0x82, 0x49, 0x81, 0x51, 0x83, 0x33, 0x08, + 0x21, 0x60, 0xc5, 0x32, 0x63, 0x81, 0x3c, 0x83, 0x93, 0xc7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, + 0xc9, 0x31, 0xde, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x81, 0xc7, 0x72, 0x8c, 0x27, + 0x1e, 0xcb, 0x31, 0x46, 0xe9, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, + 0x67, 0x54, 0x16, 0xa4, 0x16, 0xe5, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x27, 0x95, 0x16, 0x15, + 0xe5, 0x97, 0xeb, 0xa7, 0x56, 0xa4, 0x26, 0x97, 0x82, 0x0c, 0xd2, 0x87, 0x38, 0x3a, 0x89, 0x0d, + 0xec, 0x4a, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x6d, 0xcb, 0x28, 0xd3, 0x00, 0x00, + 0x00, } func (m *Exception) Marshal() (dAtA []byte, err error) { @@ -265,10 +265,7 @@ func (m *Exception) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthErrors - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthErrors } if (iNdEx + skippy) > l { diff --git a/execution/exec/block_execution_test.go b/execution/exec/block_execution_test.go index 009efa303..6cb6f9bcb 100644 --- a/execution/exec/block_execution_test.go +++ b/execution/exec/block_execution_test.go @@ -5,12 +5,12 @@ import ( "github.com/hyperledger/burrow/event/query" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) func TestBlockExecution_Marshal(t *testing.T) { be := &BlockExecution{ - Header: &types.Header{ + Header: &tmproto.Header{ Height: 3, AppHash: []byte{2}, ProposerAddress: []byte{1, 2, 33}, @@ -24,7 +24,7 @@ func TestBlockExecution_Marshal(t *testing.T) { func TestBlockExecution_StreamEvents(t *testing.T) { be := &BlockExecution{ - Header: &types.Header{ + Header: &tmproto.Header{ Height: 2, AppHash: []byte{2}, ProposerAddress: []byte{1, 2, 33}, diff --git a/execution/exec/exec.pb.go b/execution/exec/exec.pb.go index c78eb865f..94721a277 100644 --- a/execution/exec/exec.pb.go +++ b/execution/exec/exec.pb.go @@ -24,7 +24,7 @@ import ( github_com_hyperledger_burrow_txs "github.com/hyperledger/burrow/txs" txs "github.com/hyperledger/burrow/txs" github_com_hyperledger_burrow_txs_payload "github.com/hyperledger/burrow/txs/payload" - types "github.com/tendermint/tendermint/abci/types" + types "github.com/tendermint/tendermint/proto/tendermint/types" ) // Reference imports to suppress errors if they are not otherwise used. @@ -1367,90 +1367,89 @@ func init() { proto.RegisterFile("exec.proto", fileDescriptor_4d737c7315c25422) func init() { golang_proto.RegisterFile("exec.proto", fileDescriptor_4d737c7315c25422) } var fileDescriptor_4d737c7315c25422 = []byte{ - // 1318 bytes of a gzipped FileDescriptorProto + // 1311 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xef, 0xda, 0x6b, 0xc7, 0x7e, 0x76, 0xfa, 0x6d, 0x47, 0xfd, 0x22, 0xab, 0x42, 0x76, 0xd9, - 0x42, 0x29, 0xa5, 0x5d, 0x57, 0x81, 0x02, 0x2a, 0x12, 0xa2, 0x6e, 0x42, 0x1b, 0x28, 0x69, 0x99, - 0xba, 0x45, 0x20, 0x38, 0x6c, 0x76, 0xa7, 0xce, 0xaa, 0xf6, 0xee, 0x6a, 0x77, 0xb6, 0xac, 0xff, - 0x05, 0x4e, 0xf4, 0x56, 0x2e, 0xa8, 0x67, 0xce, 0xdc, 0xb8, 0x70, 0xcc, 0x8d, 0x1e, 0x51, 0x0f, - 0x06, 0xa5, 0x7f, 0x01, 0xe2, 0x44, 0x4f, 0x68, 0x66, 0xde, 0xac, 0x77, 0x49, 0x9a, 0x54, 0x24, - 0x48, 0x5c, 0xa2, 0x79, 0xef, 0x7d, 0xf6, 0xf9, 0xfd, 0xf8, 0xbc, 0x37, 0x13, 0x00, 0x96, 0x31, - 0xd7, 0x8e, 0xe2, 0x90, 0x87, 0xc4, 0x14, 0xe7, 0xe3, 0xe7, 0x46, 0x3e, 0xdf, 0x48, 0xd7, 0x6d, - 0x37, 0x9c, 0xf4, 0x47, 0xe1, 0x28, 0xec, 0x4b, 0xe3, 0x7a, 0x7a, 0x47, 0x4a, 0x52, 0x90, 0x27, - 0xf5, 0xd1, 0xf1, 0xb7, 0x0b, 0x70, 0xce, 0x02, 0x8f, 0xc5, 0x13, 0x3f, 0xe0, 0xc5, 0xa3, 0xb3, - 0xee, 0xfa, 0x7d, 0x3e, 0x8d, 0x58, 0xa2, 0xfe, 0xe2, 0x87, 0xbd, 0x51, 0x18, 0x8e, 0xc6, 0x6c, - 0xee, 0x9e, 0xfb, 0x13, 0x96, 0x70, 0x67, 0x12, 0x21, 0xa0, 0xcd, 0xe2, 0x38, 0x8c, 0x35, 0xbc, - 0x15, 0x38, 0x93, 0xfc, 0xdb, 0x26, 0xcf, 0xf4, 0xf1, 0x48, 0x24, 0x7e, 0x26, 0x49, 0xfc, 0x30, - 0x40, 0x0d, 0x24, 0x91, 0x4e, 0xc9, 0x5a, 0x81, 0xf6, 0x4d, 0x1e, 0x33, 0x67, 0xb2, 0x72, 0x8f, - 0x05, 0x3c, 0x21, 0x17, 0xca, 0x72, 0xc7, 0x38, 0x51, 0x3d, 0xdd, 0x5a, 0x3a, 0x6a, 0xcb, 0x2a, - 0x14, 0x2c, 0xb4, 0x04, 0xb3, 0x7e, 0xac, 0x40, 0xab, 0xa0, 0x20, 0xe7, 0x01, 0x06, 0x6c, 0xe4, - 0x07, 0x83, 0x71, 0xe8, 0xde, 0xed, 0x18, 0x27, 0x8c, 0xd3, 0xad, 0xa5, 0x23, 0xca, 0xc9, 0x5c, - 0x4f, 0x0b, 0x18, 0xf2, 0x2a, 0x2c, 0x48, 0x69, 0x98, 0x75, 0x2a, 0x12, 0xbe, 0x58, 0x80, 0x0f, - 0x33, 0xaa, 0xad, 0xe4, 0x33, 0x68, 0xac, 0x04, 0xf7, 0xd8, 0x38, 0x8c, 0x58, 0xa7, 0x8a, 0x48, - 0x91, 0xad, 0x56, 0x0e, 0xec, 0xc7, 0xb3, 0xde, 0x99, 0x42, 0xd1, 0x37, 0xa6, 0x11, 0x8b, 0xc7, - 0xcc, 0x1b, 0xb1, 0xb8, 0xbf, 0x9e, 0xc6, 0x71, 0xf8, 0x55, 0xbf, 0x88, 0xa7, 0xb9, 0x3b, 0xf2, - 0x12, 0xd4, 0x64, 0xf8, 0x1d, 0x53, 0xfa, 0x6d, 0xa9, 0x08, 0x54, 0xbe, 0xca, 0x22, 0x21, 0x81, - 0x37, 0xcc, 0x3a, 0xb5, 0x12, 0x44, 0xa8, 0xa8, 0xb2, 0x90, 0x33, 0x22, 0x40, 0x4f, 0x65, 0x5e, - 0x97, 0xa8, 0xc3, 0x39, 0x4a, 0xe5, 0x9d, 0xdb, 0x2f, 0x9a, 0x9b, 0x0f, 0x7b, 0x86, 0x75, 0xdf, - 0x28, 0x96, 0x8b, 0xbc, 0x00, 0xf5, 0xab, 0xcc, 0x1f, 0x6d, 0x70, 0x59, 0x38, 0x93, 0xa2, 0x24, - 0xf4, 0x6b, 0xe9, 0x64, 0x98, 0x25, 0x32, 0x6f, 0x93, 0xa2, 0x44, 0xce, 0xc2, 0xd1, 0x1b, 0x31, - 0xf3, 0x98, 0xcb, 0x92, 0x24, 0x8c, 0xf1, 0x53, 0x53, 0x42, 0xb6, 0x1b, 0xc8, 0x2b, 0xc2, 0xbb, - 0xe3, 0xb1, 0x38, 0xaf, 0xb3, 0x22, 0x9d, 0x52, 0x52, 0x34, 0x5a, 0xd6, 0x3c, 0x8b, 0x67, 0x05, - 0x64, 0x7d, 0x6f, 0xe4, 0x4d, 0x13, 0x59, 0x0f, 0x33, 0x74, 0x6c, 0x14, 0xb3, 0xd6, 0x5a, 0x9a, - 0xdb, 0xc9, 0x8b, 0xd0, 0x5c, 0x4b, 0x35, 0xc3, 0x6a, 0xd2, 0xe5, 0x5c, 0x41, 0x5e, 0x86, 0x3a, - 0x65, 0x49, 0x3a, 0xe6, 0x18, 0x60, 0x5b, 0xf9, 0x51, 0x3a, 0x8a, 0x36, 0xd2, 0x87, 0xe6, 0x4a, - 0xe6, 0xb2, 0x88, 0xfb, 0x61, 0x80, 0xfd, 0x3a, 0x6a, 0xe3, 0x40, 0xe4, 0x06, 0x3a, 0xc7, 0x58, - 0xb7, 0xb1, 0x73, 0xe4, 0x63, 0xa8, 0x0f, 0xb3, 0xab, 0x4e, 0xb2, 0x21, 0xcb, 0xd8, 0x1e, 0x5c, - 0xd8, 0x9c, 0xf5, 0x0e, 0x3d, 0x9e, 0xf5, 0xce, 0xed, 0xce, 0x99, 0x75, 0x3f, 0x70, 0xe2, 0xa9, - 0x7d, 0x95, 0x65, 0x83, 0x29, 0x67, 0x09, 0x45, 0x27, 0xd6, 0x9f, 0xc6, 0x3c, 0x73, 0xf2, 0xa1, - 0xf0, 0x3d, 0x9c, 0x46, 0x4c, 0xd6, 0x60, 0x71, 0xb0, 0xf4, 0x74, 0xd6, 0xb3, 0xf7, 0xe4, 0x62, - 0x3f, 0x72, 0xa6, 0xe3, 0xd0, 0xf1, 0x6c, 0xf1, 0x25, 0x45, 0x0f, 0x85, 0x38, 0x2b, 0x07, 0x10, - 0x67, 0xa1, 0x89, 0xd5, 0x12, 0xab, 0x8e, 0x41, 0x6d, 0x35, 0xf0, 0x58, 0x86, 0x8c, 0x51, 0x82, - 0x68, 0xc2, 0xf5, 0xd8, 0x1f, 0xf9, 0x01, 0x12, 0x1d, 0x9b, 0xa0, 0x74, 0x14, 0x6d, 0xd6, 0x0f, - 0x06, 0x1c, 0x96, 0x14, 0x59, 0xc9, 0x98, 0x9b, 0x8a, 0x32, 0x3f, 0x93, 0xbc, 0xff, 0x06, 0x49, - 0xc5, 0xb6, 0x1a, 0x66, 0xf9, 0x6f, 0x8b, 0xb9, 0x28, 0x6c, 0xab, 0x82, 0x85, 0x96, 0x60, 0xd6, - 0xfb, 0x70, 0xb8, 0x20, 0x7f, 0xc4, 0xa6, 0xbb, 0x8d, 0xdc, 0xf5, 0x3b, 0x77, 0x12, 0xa6, 0xb8, - 0x68, 0x52, 0x94, 0xac, 0xdf, 0x2b, 0xd0, 0x2a, 0xb8, 0x20, 0x67, 0xf3, 0x78, 0x77, 0xe4, 0xfe, - 0xc0, 0x7c, 0x34, 0xeb, 0x19, 0x79, 0xd8, 0xc5, 0x15, 0x56, 0x3f, 0xd8, 0x15, 0x76, 0x12, 0xea, - 0x38, 0x57, 0x0b, 0xb2, 0x16, 0xa5, 0x1d, 0x56, 0xdf, 0x36, 0x61, 0x8d, 0x5d, 0x26, 0xec, 0x14, - 0x2c, 0x50, 0xe6, 0x32, 0x3f, 0xe2, 0x9d, 0x26, 0xc2, 0xc4, 0x8f, 0xa2, 0x8e, 0x6a, 0x63, 0x79, - 0x12, 0x61, 0xef, 0x49, 0xdc, 0xd6, 0xb5, 0xd6, 0xf3, 0x75, 0xed, 0x6b, 0x43, 0x73, 0x92, 0x74, - 0x60, 0xe1, 0xf2, 0x86, 0xe3, 0x07, 0xab, 0xcb, 0xb2, 0xde, 0x4d, 0xaa, 0xc5, 0x42, 0x23, 0x2b, - 0x3b, 0xb3, 0xbc, 0x5a, 0x64, 0xf9, 0x3b, 0x60, 0x0e, 0xfd, 0x09, 0xc3, 0xfd, 0x71, 0xdc, 0x56, - 0x37, 0xae, 0xad, 0x6f, 0x5c, 0x7b, 0xa8, 0x6f, 0xdc, 0x41, 0x43, 0x0c, 0xdf, 0x37, 0xbf, 0xf6, - 0x0c, 0x2a, 0xbf, 0xb0, 0x7e, 0xae, 0xe8, 0x8e, 0xff, 0x97, 0x67, 0xfe, 0x75, 0x68, 0xca, 0x96, - 0xcb, 0xe8, 0xaa, 0x32, 0xba, 0xc5, 0xa7, 0xb3, 0xde, 0x5c, 0x49, 0xe7, 0x47, 0x51, 0x54, 0x29, - 0xac, 0x2e, 0xcb, 0x7a, 0x34, 0xa9, 0x16, 0x0b, 0x45, 0xad, 0xed, 0x5c, 0xd4, 0x7a, 0xb1, 0xa8, - 0x25, 0x3e, 0x2c, 0xec, 0xcd, 0x87, 0x8b, 0xe6, 0x83, 0x87, 0xbd, 0x43, 0xd6, 0xfd, 0x0a, 0xde, - 0xbe, 0x82, 0x9e, 0xa5, 0x61, 0x42, 0x7a, 0xfe, 0x6d, 0xf6, 0x4f, 0x89, 0x1f, 0x8f, 0x52, 0x7d, - 0x4b, 0xe0, 0xeb, 0x42, 0xaa, 0xf0, 0xc6, 0x96, 0x67, 0xf2, 0x1a, 0xd4, 0xaf, 0xa7, 0x5c, 0x00, - 0xab, 0x3a, 0x16, 0xb9, 0xc9, 0xa4, 0x0e, 0xe7, 0x42, 0x09, 0xe4, 0x24, 0x98, 0x97, 0x9d, 0xf1, - 0x18, 0xe9, 0xf0, 0x3f, 0x05, 0x14, 0x1a, 0x05, 0x93, 0x46, 0x72, 0x02, 0xaa, 0xd7, 0xc2, 0x11, - 0xae, 0x45, 0x9c, 0xf3, 0x6b, 0xe1, 0x48, 0x41, 0x84, 0x89, 0xbc, 0x07, 0x8b, 0x57, 0xc2, 0x7b, - 0x2c, 0x0e, 0x2e, 0xb9, 0x6e, 0x98, 0x06, 0x1c, 0x67, 0xbc, 0xa3, 0xb0, 0x25, 0x93, 0xfa, 0xaa, - 0x0c, 0xbf, 0xd8, 0x10, 0xf5, 0x90, 0x0f, 0x83, 0x07, 0x86, 0x9e, 0x54, 0xd1, 0x03, 0xca, 0x78, - 0x1a, 0x07, 0xb2, 0x28, 0x6d, 0x8a, 0x92, 0xe8, 0xda, 0x15, 0x27, 0xb9, 0x95, 0x30, 0x0f, 0x19, - 0xaf, 0x45, 0x72, 0x06, 0x9a, 0x6b, 0xce, 0x84, 0xad, 0x04, 0x3c, 0x9e, 0x62, 0xee, 0x6d, 0x5b, - 0x3d, 0x12, 0xa5, 0x8e, 0xce, 0xcd, 0xe4, 0x3c, 0x34, 0x6e, 0xb0, 0x78, 0x72, 0x29, 0x1e, 0x25, - 0x98, 0xfd, 0x31, 0xbb, 0xf0, 0x6e, 0xd4, 0x36, 0x9a, 0xa3, 0xac, 0x3f, 0x0c, 0x68, 0xe8, 0xb4, - 0xc9, 0x1a, 0x2c, 0x5c, 0xf2, 0xbc, 0x98, 0x25, 0x89, 0x8a, 0x6e, 0xf0, 0x26, 0xf2, 0xf6, 0xec, - 0xee, 0xbc, 0x75, 0xe3, 0x69, 0xc4, 0x43, 0x1b, 0xbf, 0xa5, 0xda, 0x09, 0x59, 0x05, 0x73, 0xd9, - 0xe1, 0xce, 0xfe, 0x86, 0x40, 0xba, 0x20, 0xd7, 0xa0, 0x3e, 0x0c, 0x23, 0xdf, 0x55, 0x97, 0xc3, - 0x73, 0x47, 0x86, 0xce, 0x3e, 0x0d, 0x63, 0x6f, 0xe9, 0xc2, 0x5b, 0x14, 0x7d, 0x58, 0xdf, 0x55, - 0xa0, 0x99, 0x13, 0x82, 0x9c, 0x86, 0x86, 0x10, 0xe4, 0x74, 0xd5, 0xe4, 0x74, 0xb5, 0x9f, 0xce, - 0x7a, 0xb9, 0x8e, 0xe6, 0x27, 0xf1, 0x3a, 0x12, 0x67, 0x99, 0x54, 0xe9, 0x86, 0xd0, 0x5a, 0x9a, - 0xdb, 0x45, 0xc4, 0x78, 0xf5, 0x56, 0xf6, 0x51, 0x4b, 0xbd, 0x2a, 0xbb, 0x00, 0x37, 0xb9, 0xe3, - 0xde, 0x5d, 0x66, 0x11, 0xdf, 0xc0, 0xed, 0x57, 0xd0, 0x88, 0x8d, 0x83, 0xbc, 0x32, 0xf7, 0xb5, - 0x71, 0x94, 0x13, 0xeb, 0x13, 0x20, 0xdb, 0x09, 0x4e, 0xde, 0x85, 0x45, 0x94, 0x6f, 0x45, 0x9e, - 0xc3, 0x19, 0xd6, 0xe0, 0xff, 0xb6, 0xfc, 0x4f, 0x64, 0xc8, 0x26, 0xd1, 0xd8, 0xe1, 0x0c, 0x21, - 0xb4, 0x8c, 0xb5, 0xbe, 0x00, 0x98, 0x4f, 0xf5, 0x41, 0x53, 0xcd, 0xfa, 0x12, 0x5a, 0x85, 0x55, - 0x70, 0xe0, 0xee, 0xbf, 0xad, 0x40, 0xa9, 0xb3, 0xe2, 0x8c, 0x8b, 0xed, 0x1f, 0x77, 0x56, 0xf9, - 0xc8, 0xbd, 0xb1, 0xfd, 0xf1, 0x44, 0xf9, 0xc8, 0x47, 0xae, 0xba, 0xff, 0x91, 0x3b, 0x06, 0xb5, - 0xdb, 0xce, 0x38, 0x65, 0xfa, 0x45, 0x29, 0x05, 0x72, 0x04, 0xaa, 0x57, 0x1c, 0xfd, 0xdc, 0x17, - 0xc7, 0xc1, 0x07, 0x9b, 0x5b, 0x5d, 0xe3, 0xd1, 0x56, 0xd7, 0xf8, 0x65, 0xab, 0x6b, 0xfc, 0xb6, - 0xd5, 0x35, 0x7e, 0x7a, 0xd2, 0x35, 0x36, 0x9f, 0x74, 0x8d, 0xcf, 0xf7, 0x48, 0x81, 0xe9, 0x47, - 0x81, 0x3c, 0xad, 0xd7, 0xe5, 0x7d, 0xfd, 0xc6, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xf0, - 0x3b, 0xe7, 0xab, 0x0f, 0x00, 0x00, + 0x17, 0xef, 0xda, 0x6b, 0xc7, 0x7e, 0x76, 0xfa, 0x6d, 0x47, 0xf9, 0x22, 0xab, 0xaa, 0xec, 0xb2, + 0x45, 0xa5, 0x94, 0xb2, 0xae, 0x02, 0x45, 0xa8, 0x48, 0x88, 0xba, 0x09, 0x6d, 0xa0, 0xa4, 0x65, + 0xea, 0x16, 0x81, 0xe0, 0xb0, 0xf1, 0x4e, 0x37, 0xab, 0xda, 0xbb, 0xab, 0xdd, 0xd9, 0xb2, 0xfe, + 0x17, 0x38, 0xc1, 0xad, 0x48, 0x08, 0xf5, 0xcc, 0xbf, 0xc0, 0x01, 0x8e, 0xb9, 0xd1, 0x23, 0xea, + 0xc1, 0xa0, 0xf4, 0x2f, 0x40, 0x9c, 0xe8, 0x09, 0xcd, 0xcc, 0x9b, 0xf5, 0x2e, 0x49, 0x93, 0x8a, + 0x04, 0x89, 0x4b, 0x34, 0xef, 0xbd, 0xcf, 0x3e, 0xbf, 0x1f, 0x9f, 0xf7, 0x66, 0x02, 0xc0, 0x32, + 0x36, 0xb2, 0xa3, 0x38, 0xe4, 0x21, 0x31, 0xc5, 0xf9, 0xc4, 0x92, 0x17, 0x7a, 0xa1, 0x54, 0xf4, + 0xc5, 0x49, 0xd9, 0x4e, 0x9c, 0xe4, 0x2c, 0x70, 0x59, 0x3c, 0xf1, 0x03, 0xde, 0xe7, 0xd3, 0x88, + 0x25, 0xea, 0x2f, 0x5a, 0x7b, 0x5e, 0x18, 0x7a, 0x63, 0xd6, 0x97, 0xd2, 0x46, 0x7a, 0xb7, 0xcf, + 0xfd, 0x09, 0x4b, 0xb8, 0x33, 0x89, 0x10, 0xd0, 0x66, 0x71, 0x1c, 0xc6, 0x1a, 0xde, 0x0a, 0x9c, + 0x49, 0xfe, 0x6d, 0x93, 0x67, 0xfa, 0x78, 0x2c, 0x12, 0xbf, 0x90, 0x24, 0x7e, 0x18, 0xa0, 0x06, + 0x92, 0x48, 0x87, 0x67, 0xad, 0x42, 0xfb, 0x16, 0x8f, 0x99, 0x33, 0x59, 0xbd, 0xcf, 0x02, 0x9e, + 0x90, 0x8b, 0x65, 0xb9, 0x63, 0x9c, 0xaa, 0x9e, 0x6d, 0x2d, 0x1f, 0xb7, 0x65, 0x46, 0x05, 0x0b, + 0x2d, 0xc1, 0xac, 0x1f, 0x2a, 0xd0, 0x2a, 0x28, 0xc8, 0x05, 0x80, 0x01, 0xf3, 0xfc, 0x60, 0x30, + 0x0e, 0x47, 0xf7, 0x3a, 0xc6, 0x29, 0xe3, 0x6c, 0x6b, 0xf9, 0x98, 0x72, 0x32, 0xd7, 0xd3, 0x02, + 0x86, 0xbc, 0x0c, 0x0b, 0x52, 0x1a, 0x66, 0x9d, 0x8a, 0x84, 0x2f, 0x16, 0xe0, 0xc3, 0x8c, 0x6a, + 0x2b, 0xf9, 0x04, 0x1a, 0xab, 0xc1, 0x7d, 0x36, 0x0e, 0x23, 0xd6, 0xa9, 0x22, 0x52, 0x64, 0xab, + 0x95, 0x03, 0xfb, 0xf1, 0xac, 0x77, 0xce, 0xf3, 0xf9, 0x66, 0xba, 0x61, 0x8f, 0xc2, 0x49, 0x7f, + 0x73, 0x1a, 0xb1, 0x78, 0xcc, 0x5c, 0x8f, 0xc5, 0xfd, 0x8d, 0x34, 0x8e, 0xc3, 0x2f, 0xfa, 0x45, + 0x3c, 0xcd, 0xdd, 0x91, 0x17, 0xa1, 0x26, 0xc3, 0xef, 0x98, 0xd2, 0x6f, 0x4b, 0x45, 0xa0, 0xf2, + 0x55, 0x16, 0x09, 0x09, 0xdc, 0x61, 0xd6, 0xa9, 0x95, 0x20, 0x42, 0x45, 0x95, 0x85, 0x9c, 0x13, + 0x01, 0xba, 0x2a, 0xf3, 0xba, 0x44, 0x1d, 0xcd, 0x51, 0x2a, 0xef, 0xdc, 0x7e, 0xc9, 0xdc, 0x7a, + 0xd8, 0x33, 0xac, 0x6f, 0x8d, 0x62, 0xb9, 0xc8, 0x0b, 0x50, 0xbf, 0xc6, 0x7c, 0x6f, 0x93, 0xcb, + 0xc2, 0x99, 0x14, 0x25, 0xa1, 0x5f, 0x4f, 0x27, 0xc3, 0x2c, 0x91, 0x79, 0x9b, 0x14, 0x25, 0x72, + 0x1e, 0x8e, 0xdf, 0x8c, 0x99, 0xcb, 0x46, 0x2c, 0x49, 0xc2, 0x18, 0x3f, 0x35, 0x25, 0x64, 0xa7, + 0x81, 0x5c, 0x10, 0xde, 0x1d, 0x97, 0xc5, 0x58, 0xe7, 0x8e, 0x3d, 0x67, 0xa1, 0xad, 0xf8, 0xa7, + 0xec, 0x14, 0x71, 0x96, 0x35, 0x4f, 0xe8, 0x59, 0xb1, 0x59, 0xdf, 0x1b, 0x79, 0xff, 0x44, 0x01, + 0x86, 0x19, 0xfe, 0x86, 0x51, 0x2c, 0x80, 0xd6, 0xd2, 0xdc, 0x4e, 0x4e, 0x42, 0x73, 0x3d, 0xd5, + 0x64, 0xab, 0x49, 0x97, 0x73, 0x05, 0x79, 0x09, 0xea, 0x94, 0x25, 0xe9, 0x98, 0x63, 0xac, 0x6d, + 0xe5, 0x47, 0xe9, 0x28, 0xda, 0x48, 0x1f, 0x9a, 0xab, 0xd9, 0x88, 0x45, 0xdc, 0x0f, 0x03, 0x6c, + 0xdd, 0x71, 0x1b, 0x67, 0x23, 0x37, 0xd0, 0x39, 0xc6, 0xba, 0x83, 0x4d, 0x24, 0x1f, 0x42, 0x7d, + 0x98, 0x5d, 0x73, 0x92, 0x4d, 0x59, 0xd1, 0xf6, 0xe0, 0xe2, 0xd6, 0xac, 0x77, 0xe4, 0xf1, 0xac, + 0xf7, 0xda, 0xde, 0xf4, 0xd9, 0xf0, 0x03, 0x27, 0x9e, 0xda, 0xd7, 0x58, 0x36, 0x98, 0x72, 0x96, + 0x50, 0x74, 0x62, 0xfd, 0x69, 0xcc, 0x33, 0x27, 0xef, 0x0b, 0xdf, 0xc3, 0x69, 0xc4, 0x64, 0x0d, + 0x16, 0x07, 0xcb, 0x4f, 0x67, 0x3d, 0x7b, 0x5f, 0x5a, 0xf6, 0x23, 0x67, 0x3a, 0x0e, 0x1d, 0xd7, + 0x16, 0x5f, 0x52, 0xf4, 0x50, 0x88, 0xb3, 0x72, 0x08, 0x71, 0x16, 0x9a, 0x58, 0x2d, 0x11, 0x6c, + 0x09, 0x6a, 0x6b, 0x81, 0xcb, 0x32, 0x24, 0x8f, 0x12, 0x44, 0x13, 0x6e, 0xc4, 0xbe, 0xe7, 0x07, + 0xc8, 0x79, 0x6c, 0x82, 0xd2, 0x51, 0xb4, 0x59, 0x3f, 0x1a, 0x70, 0x54, 0x52, 0x64, 0x35, 0x63, + 0xa3, 0x54, 0x94, 0xf9, 0x99, 0x3c, 0xfe, 0x97, 0xf9, 0x2a, 0x76, 0xd8, 0x30, 0xcb, 0xc3, 0x10, + 0xd3, 0x52, 0xd8, 0x61, 0x05, 0x0b, 0x2d, 0xc1, 0xac, 0x77, 0xe1, 0x68, 0x41, 0xfe, 0x80, 0x4d, + 0xf7, 0x1a, 0xc4, 0x1b, 0x77, 0xef, 0x26, 0x4c, 0xd1, 0xd2, 0xa4, 0x28, 0x59, 0xbf, 0x57, 0xa0, + 0x55, 0x70, 0x41, 0xce, 0xe7, 0xa1, 0xef, 0x3a, 0x06, 0x03, 0xf3, 0xd1, 0xac, 0x67, 0xe4, 0x61, + 0x17, 0x17, 0x5b, 0xfd, 0x70, 0x17, 0xdb, 0x69, 0xa8, 0xe3, 0x88, 0x2d, 0xc8, 0x5a, 0x94, 0x36, + 0x5b, 0x7d, 0xc7, 0xb0, 0x35, 0xf6, 0x18, 0xb6, 0x33, 0xb0, 0x40, 0xd9, 0x88, 0xf9, 0x11, 0xef, + 0x34, 0x11, 0x26, 0x7e, 0x14, 0x75, 0x54, 0x1b, 0xcb, 0x43, 0x09, 0xfb, 0x0f, 0xe5, 0x8e, 0xae, + 0xb5, 0x9e, 0xaf, 0x6b, 0x5f, 0x1a, 0x9a, 0x9e, 0xa4, 0x03, 0x0b, 0x57, 0x36, 0x1d, 0x3f, 0x58, + 0x5b, 0x91, 0xf5, 0x6e, 0x52, 0x2d, 0x16, 0x1a, 0x59, 0xd9, 0x9d, 0xf0, 0xd5, 0x22, 0xe1, 0xdf, + 0x02, 0x73, 0xe8, 0x4f, 0x18, 0xae, 0x92, 0x13, 0xb6, 0xba, 0x87, 0x6d, 0x7d, 0x0f, 0xdb, 0x43, + 0x7d, 0x0f, 0x0f, 0x1a, 0x62, 0x0e, 0xbf, 0xfa, 0xb5, 0x67, 0x50, 0xf9, 0x85, 0xf5, 0x73, 0x45, + 0x77, 0xfc, 0xbf, 0x3c, 0xfe, 0xaf, 0x42, 0x53, 0xb6, 0x5c, 0x46, 0x57, 0x95, 0xd1, 0x2d, 0x3e, + 0x9d, 0xf5, 0xe6, 0x4a, 0x3a, 0x3f, 0x8a, 0xa2, 0x4a, 0x61, 0x6d, 0x45, 0xd6, 0xa3, 0x49, 0xb5, + 0x58, 0x28, 0x6a, 0x6d, 0xf7, 0xa2, 0xd6, 0x8b, 0x45, 0x2d, 0xf1, 0x61, 0x61, 0x7f, 0x3e, 0x5c, + 0x32, 0x1f, 0x3c, 0xec, 0x1d, 0xb1, 0xbe, 0xae, 0xe0, 0x9d, 0x2c, 0xe8, 0x59, 0x1a, 0x26, 0xa4, + 0xe7, 0xdf, 0x66, 0xff, 0x8c, 0xf8, 0xf1, 0x28, 0xd5, 0x17, 0x06, 0xbe, 0x39, 0xa4, 0x0a, 0xef, + 0x71, 0x79, 0x26, 0xaf, 0x40, 0xfd, 0x46, 0xca, 0x05, 0xb0, 0xaa, 0x63, 0x91, 0x4b, 0x4d, 0xea, + 0x70, 0x2e, 0x94, 0x40, 0x4e, 0x83, 0x79, 0xc5, 0x19, 0x8f, 0x91, 0x0e, 0xff, 0x53, 0x40, 0xa1, + 0x51, 0x30, 0x69, 0x24, 0xa7, 0xa0, 0x7a, 0x3d, 0xf4, 0x70, 0x43, 0xe2, 0x9c, 0x5f, 0x0f, 0x3d, + 0x05, 0x11, 0x26, 0xf2, 0x0e, 0x2c, 0x5e, 0x0d, 0xef, 0xb3, 0x38, 0xb8, 0x3c, 0x1a, 0x85, 0x69, + 0xc0, 0x71, 0xc6, 0x3b, 0x0a, 0x5b, 0x32, 0xa9, 0xaf, 0xca, 0xf0, 0x4b, 0x0d, 0x51, 0x0f, 0xf9, + 0x5c, 0x78, 0x60, 0xe8, 0x49, 0x15, 0x3d, 0xa0, 0x8c, 0xa7, 0x71, 0x20, 0x8b, 0xd2, 0xa6, 0x28, + 0x89, 0xae, 0x5d, 0x75, 0x92, 0xdb, 0x09, 0x73, 0x91, 0xf1, 0x5a, 0x24, 0xe7, 0xa0, 0xb9, 0xee, + 0x4c, 0xd8, 0x6a, 0xc0, 0xe3, 0x29, 0xe6, 0xde, 0xb6, 0xd5, 0xd3, 0x51, 0xea, 0xe8, 0xdc, 0x4c, + 0x2e, 0x40, 0xe3, 0x26, 0x8b, 0x27, 0x97, 0x63, 0x2f, 0xc1, 0xec, 0x97, 0xec, 0xc2, 0x6b, 0x52, + 0xdb, 0x68, 0x8e, 0xb2, 0xfe, 0x30, 0xa0, 0xa1, 0xd3, 0x26, 0xeb, 0xb0, 0x70, 0xd9, 0x75, 0x63, + 0x96, 0x24, 0x2a, 0xba, 0xc1, 0x1b, 0xc8, 0xdb, 0xf3, 0x7b, 0xf3, 0x76, 0x14, 0x4f, 0x23, 0x1e, + 0xda, 0xf8, 0x2d, 0xd5, 0x4e, 0xc8, 0x1a, 0x98, 0x2b, 0x0e, 0x77, 0x0e, 0x36, 0x04, 0xd2, 0x05, + 0xb9, 0x0e, 0xf5, 0x61, 0x18, 0xf9, 0x23, 0x75, 0x39, 0x3c, 0x77, 0x64, 0xe8, 0xec, 0xe3, 0x30, + 0x76, 0x97, 0x2f, 0xbe, 0x49, 0xd1, 0x87, 0xf5, 0x5d, 0x05, 0x9a, 0x39, 0x21, 0xc8, 0x59, 0x68, + 0x08, 0x41, 0x4e, 0x57, 0x4d, 0x4e, 0x57, 0xfb, 0xe9, 0xac, 0x97, 0xeb, 0x68, 0x7e, 0x12, 0x0f, + 0x25, 0x71, 0x96, 0x49, 0x95, 0x6e, 0x08, 0xad, 0xa5, 0xb9, 0x5d, 0x44, 0x8c, 0xb7, 0x70, 0xe5, + 0x00, 0xb5, 0xd4, 0xab, 0xb2, 0x0b, 0x70, 0x8b, 0x3b, 0xa3, 0x7b, 0x2b, 0x2c, 0xe2, 0x9b, 0xb8, + 0xfd, 0x0a, 0x1a, 0xb1, 0x71, 0x90, 0x57, 0xe6, 0x81, 0x36, 0x8e, 0x72, 0x62, 0x7d, 0x04, 0x64, + 0x27, 0xc1, 0xc9, 0xdb, 0xb0, 0x88, 0xf2, 0xed, 0xc8, 0x75, 0x38, 0xc3, 0x1a, 0xfc, 0xdf, 0x96, + 0xff, 0x9f, 0x0c, 0xd9, 0x24, 0x1a, 0x3b, 0x9c, 0x21, 0x84, 0x96, 0xb1, 0xd6, 0x67, 0x00, 0xf3, + 0xa9, 0x3e, 0x6c, 0xaa, 0x59, 0x9f, 0x43, 0xab, 0xb0, 0x0a, 0x0e, 0xdd, 0xfd, 0x37, 0x15, 0x28, + 0x75, 0x56, 0x9c, 0x71, 0xb1, 0xfd, 0xe3, 0xce, 0x2a, 0x1f, 0xb9, 0x37, 0x76, 0x30, 0x9e, 0x28, + 0x1f, 0xf9, 0xc8, 0x55, 0x0f, 0x3e, 0x72, 0x4b, 0x50, 0xbb, 0xe3, 0x8c, 0x53, 0xa6, 0x1f, 0x97, + 0x52, 0x20, 0xc7, 0xa0, 0x7a, 0xd5, 0xd1, 0x2f, 0x7f, 0x71, 0x1c, 0xbc, 0xb7, 0xb5, 0xdd, 0x35, + 0x1e, 0x6d, 0x77, 0x8d, 0x5f, 0xb6, 0xbb, 0xc6, 0x6f, 0xdb, 0x5d, 0xe3, 0xa7, 0x27, 0x5d, 0x63, + 0xeb, 0x49, 0xd7, 0xf8, 0x74, 0x9f, 0x14, 0x98, 0x7e, 0x14, 0xc8, 0xd3, 0x46, 0x5d, 0xde, 0xd7, + 0xaf, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, 0xf2, 0xc4, 0xac, 0x30, 0x8d, 0x0f, 0x00, 0x00, } func (m *StreamEvents) Marshal() (dAtA []byte, err error) { @@ -3325,10 +3324,7 @@ func (m *StreamEvents) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -3595,10 +3591,7 @@ func (m *StreamEvent) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -3742,10 +3735,7 @@ func (m *BeginBlock) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -3815,10 +3805,7 @@ func (m *EndBlock) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -3996,10 +3983,7 @@ func (m *BeginTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -4083,10 +4067,7 @@ func (m *EndTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -4263,10 +4244,7 @@ func (m *TxHeader) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -4425,10 +4403,7 @@ func (m *BlockExecution) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -4517,10 +4492,7 @@ func (m *TxExecutionKey) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -4819,10 +4791,7 @@ func (m *TxExecution) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -4976,10 +4945,7 @@ func (m *Origin) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -5207,10 +5173,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -5477,10 +5440,7 @@ func (m *Event) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -5656,10 +5616,7 @@ func (m *Result) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -5811,10 +5768,7 @@ func (m *LogEvent) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -6005,10 +5959,7 @@ func (m *CallEvent) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -6095,10 +6046,7 @@ func (m *GovernAccountEvent) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -6182,10 +6130,7 @@ func (m *InputEvent) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -6269,10 +6214,7 @@ func (m *OutputEvent) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { @@ -6460,10 +6402,7 @@ func (m *CallData) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExec } if (iNdEx + skippy) > l { diff --git a/execution/exec/stream_event_test.go b/execution/exec/stream_event_test.go index fe8061dfe..b55fd3134 100644 --- a/execution/exec/stream_event_test.go +++ b/execution/exec/stream_event_test.go @@ -11,7 +11,7 @@ import ( "github.com/hyperledger/burrow/txs/payload" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) var genesisDoc, accounts, _ = genesis.NewDeterministicGenesis(345234523).GenesisDoc(10, 0) @@ -37,7 +37,7 @@ func TestTxExecution(t *testing.T) { func TestConsumeBlockExecution(t *testing.T) { height := int64(234242) be := &BlockExecution{ - Header: &types.Header{ + Header: &tmproto.Header{ ChainID: genesisDoc.ChainID(), AppHash: crypto.Keccak256([]byte("hashily")), Time: time.Now(), diff --git a/execution/execution.go b/execution/execution.go index c42e31cad..93b2738b8 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -30,7 +30,7 @@ import ( "github.com/hyperledger/burrow/permission" "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" - abciTypes "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/proto/tendermint/types" ) type Executor interface { @@ -68,7 +68,7 @@ type BatchExecutor interface { type BatchCommitter interface { BatchExecutor // Commit execution results to underlying State and provide opportunity to mutate state before it is saved - Commit(header *abciTypes.Header) (stateHash []byte, err error) + Commit(header *types.Header) (stateHash []byte, err error) } type executor struct { @@ -341,7 +341,7 @@ func (exe *executor) updateSignatory(sig txs.Signatory) error { // Commit the current state - optionally pass in the tendermint ABCI header for that to be included with the BeginBlock // StreamEvent -func (exe *executor) Commit(header *abciTypes.Header) (stateHash []byte, err error) { +func (exe *executor) Commit(header *types.Header) (stateHash []byte, err error) { // The write lock to the executor is controlled by the caller (e.g. abci.App) so we do not acquire it here to avoid // deadlock defer func() { @@ -444,7 +444,7 @@ func (exe *executor) PendingValidators() validator.IterableReader { return exe.validatorCache.Delta } -func (exe *executor) finaliseBlockExecution(header *abciTypes.Header) (*exec.BlockExecution, error) { +func (exe *executor) finaliseBlockExecution(header *types.Header) (*exec.BlockExecution, error) { if header != nil && uint64(header.Height) != exe.block.Height { return nil, fmt.Errorf("trying to finalise block execution with height %v but passed Tendermint"+ "block header at height %v", exe.block.Height, header.Height) diff --git a/execution/execution_test.go b/execution/execution_test.go index b5b4466f8..3fc66a543 100644 --- a/execution/execution_test.go +++ b/execution/execution_test.go @@ -33,7 +33,7 @@ import ( "github.com/hyperledger/burrow/txs/payload" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" hex "github.com/tmthrgd/go-hex" "golang.org/x/crypto/ripemd160" @@ -54,7 +54,8 @@ var testGenesisDoc, testPrivAccounts, _ = deterministicGenesis. var testChainID = testGenesisDoc.ChainID() func TestSendFails(t *testing.T) { - stateDB := dbm.NewDB("state", dbBackend, dbDir) + stateDB, err := dbm.NewDB("state", dbBackend, dbDir) + require.NoError(t, err) defer stateDB.Close() genDoc := newBaseGenDoc(permission.ZeroAccountPermissions, permission.ZeroAccountPermissions) genDoc.Accounts[1].Permissions.Base.Set(permission.Send, true) @@ -112,7 +113,8 @@ func TestSendFails(t *testing.T) { } func TestName(t *testing.T) { - stateDB := dbm.NewDB("state", dbBackend, dbDir) + stateDB, err := dbm.NewDB("state", dbBackend, dbDir) + require.NoError(t, err) defer stateDB.Close() genDoc := newBaseGenDoc(permission.ZeroAccountPermissions, permission.ZeroAccountPermissions) genDoc.Accounts[0].Permissions.Base.Set(permission.Send, true) @@ -147,7 +149,8 @@ func TestName(t *testing.T) { } func TestCallFails(t *testing.T) { - stateDB := dbm.NewDB("state", dbBackend, dbDir) + stateDB, err := dbm.NewDB("state", dbBackend, dbDir) + require.NoError(t, err) defer stateDB.Close() genDoc := newBaseGenDoc(permission.ZeroAccountPermissions, permission.ZeroAccountPermissions) genDoc.Accounts[1].Permissions.Base.Set(permission.Send, true) @@ -204,7 +207,8 @@ func TestCallFails(t *testing.T) { } func TestSendPermission(t *testing.T) { - stateDB := dbm.NewDB("state", dbBackend, dbDir) + stateDB, err := dbm.NewDB("state", dbBackend, dbDir) + require.NoError(t, err) defer stateDB.Close() genDoc := newBaseGenDoc(permission.ZeroAccountPermissions, permission.ZeroAccountPermissions) genDoc.Accounts[0].Permissions.Base.Set(permission.Send, true) // give the 0 account permission @@ -234,7 +238,8 @@ func TestSendPermission(t *testing.T) { } func TestCallPermission(t *testing.T) { - stateDB := dbm.NewDB("state", dbBackend, dbDir) + stateDB, err := dbm.NewDB("state", dbBackend, dbDir) + require.NoError(t, err) defer stateDB.Close() genDoc := newBaseGenDoc(permission.ZeroAccountPermissions, permission.ZeroAccountPermissions) genDoc.Accounts[0].Permissions.Base.Set(permission.Call, true) // give the 0 account permission @@ -469,7 +474,8 @@ func TestCreatePermission(t *testing.T) { } func TestCreateAccountPermission(t *testing.T) { - stateDB := dbm.NewDB("state", dbBackend, dbDir) + stateDB, err := dbm.NewDB("state", dbBackend, dbDir) + require.NoError(t, err) defer stateDB.Close() genDoc := newBaseGenDoc(permission.ZeroAccountPermissions, permission.ZeroAccountPermissions) genDoc.Accounts[0].Permissions.Base.Set(permission.Send, true) // give the 0 account permission @@ -606,7 +612,8 @@ func init() { } func TestSNativeCALL(t *testing.T) { - stateDB := dbm.NewDB("state", dbBackend, dbDir) + stateDB, err := dbm.NewDB("state", dbBackend, dbDir) + require.NoError(t, err) defer stateDB.Close() genDoc := newBaseGenDoc(permission.ZeroAccountPermissions, permission.ZeroAccountPermissions) genDoc.Accounts[0].Permissions.Base.Set(permission.Call, true) // give the 0 account permission @@ -753,7 +760,8 @@ func TestSNativeCALL(t *testing.T) { } func TestSNativeTx(t *testing.T) { - stateDB := dbm.NewDB("state", dbBackend, dbDir) + stateDB, err := dbm.NewDB("state", dbBackend, dbDir) + require.NoError(t, err) defer stateDB.Close() genDoc := newBaseGenDoc(permission.ZeroAccountPermissions, permission.ZeroAccountPermissions) genDoc.Accounts[0].Permissions.Base.Set(permission.Call, true) // give the 0 account permission @@ -1504,12 +1512,6 @@ func makeUsers(n int) []acm.AddressableSigner { return users } -func newBlockchain(genesisDoc *genesis.GenesisDoc) *bcm.Blockchain { - testDB := dbm.NewDB("test", dbBackend, ".") - blockchain, _, _ := bcm.LoadOrNewBlockchain(testDB, genesisDoc, logger) - return blockchain -} - func newBaseGenDoc(globalPerm, accountPerm permission.AccountPermissions) genesis.GenesisDoc { var genAccounts []genesis.Account for _, user := range users[:5] { @@ -1576,8 +1578,12 @@ type testExecutor struct { } func makeExecutor(state *state.State) *testExecutor { - blockchain := newBlockchain(testGenesisDoc) - err := blockchain.CommitBlockAtHeight(time.Now(), []byte("hashily"), state.Hash(), HeightAtVersion(state.Version())) + testDB, err := dbm.NewDB("test", dbBackend, ".") + if err != nil { + panic(err) + } + blockchain, _, _ := bcm.LoadOrNewBlockchain(testDB, testGenesisDoc, logger) + err = blockchain.CommitBlockAtHeight(time.Now(), []byte("hashily"), state.Hash(), HeightAtVersion(state.Version())) if err != nil { panic(err) } @@ -1598,7 +1604,7 @@ func copyState(t testing.TB, st *state.State) *state.State { return cpy } -func (te *testExecutor) Commit(header *types.Header) ([]byte, error) { +func (te *testExecutor) Commit(header *tmproto.Header) ([]byte, error) { appHash, err := te.executor.Commit(header) if err != nil { return nil, err diff --git a/execution/names/names.pb.go b/execution/names/names.pb.go index 815e30c2b..f44ebb9c0 100644 --- a/execution/names/names.pb.go +++ b/execution/names/names.pb.go @@ -104,23 +104,22 @@ func init() { proto.RegisterFile("names.proto", fileDescriptor_f4268625867c617c) func init() { golang_proto.RegisterFile("names.proto", fileDescriptor_f4268625867c617c) } var fileDescriptor_f4268625867c617c = []byte{ - // 249 bytes of a gzipped FileDescriptorProto + // 240 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0x4b, 0xcc, 0x4d, - 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, - 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, - 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0xcd, 0x66, 0xe4, 0x62, 0x75, 0xcd, - 0x2b, 0x29, 0xaa, 0x14, 0x12, 0xe2, 0x62, 0xf1, 0x4b, 0xcc, 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd4, - 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0xbc, 0xb8, 0x58, 0xfd, 0xcb, 0xf3, 0x52, 0x8b, 0x24, 0x98, 0x14, - 0x18, 0x35, 0x78, 0x9c, 0x4c, 0x4e, 0xdc, 0x93, 0x67, 0xb8, 0x75, 0x4f, 0x5e, 0x07, 0xc9, 0x8e, - 0x8c, 0xca, 0x82, 0xd4, 0xa2, 0x9c, 0xd4, 0x94, 0xf4, 0xd4, 0x22, 0xfd, 0xa4, 0xd2, 0xa2, 0xa2, - 0xfc, 0x72, 0xfd, 0xe4, 0xa2, 0xca, 0x82, 0x92, 0x7c, 0x3d, 0xc7, 0x94, 0x94, 0xa2, 0xd4, 0xe2, - 0xe2, 0x20, 0x88, 0x11, 0x20, 0xf3, 0x5d, 0x12, 0x4b, 0x12, 0x25, 0x98, 0x21, 0xe6, 0x83, 0xd8, - 0x42, 0x12, 0x5c, 0xec, 0xae, 0x15, 0x05, 0x99, 0x45, 0xa9, 0xc5, 0x12, 0x2c, 0x0a, 0x8c, 0x1a, - 0x2c, 0x41, 0x30, 0xae, 0x15, 0xcb, 0x8c, 0x05, 0xf2, 0x0c, 0x4e, 0xee, 0x27, 0x1e, 0xc9, 0x31, - 0x5e, 0x78, 0x24, 0xc7, 0x78, 0xe3, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x07, 0x1e, 0xcb, - 0x31, 0x9e, 0x78, 0x2c, 0xc7, 0x18, 0xa5, 0x8b, 0xdf, 0x09, 0xa9, 0x15, 0xa9, 0xc9, 0xa5, 0x25, - 0x99, 0xf9, 0x79, 0xfa, 0xe0, 0x50, 0x49, 0x62, 0x03, 0xfb, 0xd6, 0x18, 0x10, 0x00, 0x00, 0xff, - 0xff, 0x3c, 0xd9, 0x3b, 0x5f, 0x32, 0x01, 0x00, 0x00, + 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x44, 0xd2, 0xf3, 0xd3, + 0xf3, 0xc1, 0x22, 0xfa, 0x20, 0x16, 0x44, 0x52, 0x69, 0x36, 0x23, 0x17, 0xab, 0x6b, 0x5e, 0x49, + 0x51, 0xa5, 0x90, 0x10, 0x17, 0x8b, 0x5f, 0x62, 0x6e, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, + 0x10, 0x98, 0x2d, 0xe4, 0xc5, 0xc5, 0xea, 0x5f, 0x9e, 0x97, 0x5a, 0x24, 0xc1, 0xa4, 0xc0, 0xa8, + 0xc1, 0xe3, 0x64, 0x72, 0xe2, 0x9e, 0x3c, 0xc3, 0xad, 0x7b, 0xf2, 0x3a, 0xe9, 0x99, 0x25, 0x19, + 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x19, 0x95, 0x05, 0xa9, 0x45, 0x39, 0xa9, 0x29, 0xe9, + 0xa9, 0x45, 0xfa, 0x49, 0xa5, 0x45, 0x45, 0xf9, 0xe5, 0xfa, 0xc9, 0x45, 0x95, 0x05, 0x25, 0xf9, + 0x7a, 0x8e, 0x29, 0x29, 0x45, 0xa9, 0xc5, 0xc5, 0x41, 0x10, 0x23, 0x40, 0xe6, 0xbb, 0x24, 0x96, + 0x24, 0x4a, 0x30, 0x43, 0xcc, 0x07, 0xb1, 0x85, 0x24, 0xb8, 0xd8, 0x5d, 0x2b, 0x0a, 0x32, 0x8b, + 0x52, 0x8b, 0x25, 0x58, 0x14, 0x18, 0x35, 0x58, 0x82, 0x60, 0x5c, 0x2b, 0x96, 0x19, 0x0b, 0xe4, + 0x19, 0x9c, 0xdc, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc6, 0x23, 0x39, 0xc6, + 0x07, 0x8f, 0xe4, 0x18, 0x0f, 0x3c, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x31, 0x4a, 0x17, 0xbf, + 0x13, 0x52, 0x2b, 0x52, 0x93, 0x4b, 0x4b, 0x32, 0xf3, 0xf3, 0xf4, 0xc1, 0x9e, 0x4f, 0x62, 0x03, + 0xfb, 0xd6, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x78, 0xc9, 0x3e, 0x19, 0x01, 0x00, 0x00, } func (m *Entry) Marshal() (dAtA []byte, err error) { @@ -372,10 +371,7 @@ func (m *Entry) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthNames - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNames } if (iNdEx + skippy) > l { diff --git a/execution/registry/registry.pb.go b/execution/registry/registry.pb.go index 1980c798c..26b582c43 100644 --- a/execution/registry/registry.pb.go +++ b/execution/registry/registry.pb.go @@ -99,26 +99,25 @@ func init() { proto.RegisterFile("registry.proto", fileDescriptor_41af05d40a6155 func init() { golang_proto.RegisterFile("registry.proto", fileDescriptor_41af05d40a615591) } var fileDescriptor_41af05d40a615591 = []byte{ - // 296 bytes of a gzipped FileDescriptorProto + // 287 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0x4a, 0x4d, 0xcf, - 0x2c, 0x2e, 0x29, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, - 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, - 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x5a, 0xc0, 0xc4, - 0xc5, 0xe3, 0x97, 0x9f, 0x92, 0xea, 0x99, 0x92, 0x9a, 0x57, 0x92, 0x59, 0x52, 0x29, 0x24, 0xc1, - 0xc5, 0xee, 0x9b, 0x9f, 0x97, 0x99, 0x9d, 0x5a, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, - 0xe3, 0x0a, 0xa9, 0x71, 0xf1, 0xf9, 0xa5, 0x96, 0x94, 0xe7, 0x17, 0x65, 0x3b, 0xa6, 0xa4, 0x14, - 0xa5, 0x16, 0x17, 0x4b, 0x30, 0x81, 0x15, 0xa0, 0x89, 0x0a, 0x25, 0x70, 0x09, 0x84, 0xa4, 0xe6, - 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, 0x80, 0xcd, 0x76, 0x91, 0x60, 0x56, 0x60, 0xd4, 0xe0, - 0x71, 0x32, 0x39, 0x71, 0x4f, 0x9e, 0xe1, 0xd6, 0x3d, 0x79, 0x1d, 0x24, 0x37, 0x66, 0x54, 0x16, - 0xa4, 0x16, 0xe5, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x27, 0x95, 0x16, 0x15, 0xe5, 0x97, 0xeb, - 0x27, 0x17, 0x55, 0x16, 0x94, 0xe4, 0xeb, 0x41, 0xcd, 0x0b, 0xc2, 0x30, 0x4d, 0x28, 0x8d, 0x4b, - 0x28, 0x2c, 0x31, 0x27, 0x33, 0x25, 0xb1, 0x24, 0xbf, 0x28, 0xa0, 0x34, 0x29, 0x27, 0x33, 0xd9, - 0x3b, 0xb5, 0x52, 0x82, 0x05, 0x6c, 0x87, 0x19, 0xd4, 0x0e, 0x3d, 0xa2, 0xec, 0x80, 0xeb, 0x0e, - 0xc2, 0x62, 0xa2, 0x15, 0xcb, 0x8c, 0x05, 0xf2, 0x0c, 0x4e, 0x5e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, - 0x78, 0x24, 0xc7, 0x78, 0xe3, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x07, 0x1e, 0xcb, 0x31, - 0x9e, 0x78, 0x2c, 0xc7, 0x18, 0x65, 0x80, 0xdf, 0x8e, 0xd4, 0x8a, 0xd4, 0xe4, 0xd2, 0x92, 0xcc, - 0xfc, 0x3c, 0x7d, 0x58, 0xec, 0x24, 0xb1, 0x81, 0x43, 0xdd, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, - 0xbe, 0x93, 0xeb, 0x76, 0xc0, 0x01, 0x00, 0x00, + 0x2c, 0x2e, 0x29, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x44, + 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x82, 0xfa, 0x20, 0x16, 0x44, 0x5e, 0x69, 0x01, 0x13, 0x17, 0x8f, + 0x5f, 0x7e, 0x4a, 0xaa, 0x67, 0x4a, 0x6a, 0x5e, 0x49, 0x66, 0x49, 0xa5, 0x90, 0x04, 0x17, 0xbb, + 0x6f, 0x7e, 0x5e, 0x66, 0x76, 0x6a, 0x91, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x8c, 0x2b, + 0xa4, 0xc6, 0xc5, 0xe7, 0x97, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0xed, 0x98, 0x92, 0x52, 0x94, 0x5a, + 0x5c, 0x2c, 0xc1, 0x04, 0x56, 0x80, 0x26, 0x2a, 0x94, 0xc0, 0x25, 0x10, 0x92, 0x9a, 0x97, 0x92, + 0x5a, 0x94, 0x9b, 0x99, 0x57, 0x02, 0x36, 0xdb, 0x45, 0x82, 0x59, 0x81, 0x51, 0x83, 0xc7, 0xc9, + 0xe4, 0xc4, 0x3d, 0x79, 0x86, 0x5b, 0xf7, 0xe4, 0x75, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, + 0x92, 0xf3, 0x73, 0xf5, 0x33, 0x2a, 0x0b, 0x52, 0x8b, 0x72, 0x52, 0x53, 0xd2, 0x53, 0x8b, 0xf4, + 0x93, 0x4a, 0x8b, 0x8a, 0xf2, 0xcb, 0xf5, 0x93, 0x8b, 0x2a, 0x0b, 0x4a, 0xf2, 0xf5, 0xa0, 0xe6, + 0x05, 0x61, 0x98, 0x26, 0x94, 0xc6, 0x25, 0x14, 0x96, 0x98, 0x93, 0x99, 0x92, 0x58, 0x92, 0x5f, + 0x14, 0x50, 0x9a, 0x94, 0x93, 0x99, 0xec, 0x9d, 0x5a, 0x29, 0xc1, 0x02, 0xb6, 0xc3, 0x0c, 0x6a, + 0x87, 0x1e, 0x51, 0x76, 0xc0, 0x75, 0x07, 0x61, 0x31, 0xd1, 0x8a, 0x65, 0xc6, 0x02, 0x79, 0x06, + 0x27, 0xaf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0xbc, 0xf1, 0x48, 0x8e, 0xf1, 0xc1, + 0x23, 0x39, 0xc6, 0x03, 0x8f, 0xe5, 0x18, 0x4f, 0x3c, 0x96, 0x63, 0x8c, 0x32, 0xc0, 0x6f, 0x47, + 0x6a, 0x45, 0x6a, 0x72, 0x69, 0x49, 0x66, 0x7e, 0x9e, 0x3e, 0x2c, 0x12, 0x92, 0xd8, 0xc0, 0xa1, + 0x6e, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x64, 0x98, 0x22, 0xa9, 0xa7, 0x01, 0x00, 0x00, } func (m *NodeIdentity) Marshal() (dAtA []byte, err error) { @@ -388,10 +387,7 @@ func (m *NodeIdentity) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRegistry - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRegistry } if (iNdEx + skippy) > l { diff --git a/execution/state/proposals.go b/execution/state/proposals.go index 5b661ab98..a2e37128c 100644 --- a/execution/state/proposals.go +++ b/execution/state/proposals.go @@ -1,7 +1,7 @@ package state import ( - "fmt" + "github.com/hyperledger/burrow/encoding" "github.com/hyperledger/burrow/execution/proposal" "github.com/hyperledger/burrow/txs/payload" @@ -21,7 +21,12 @@ func (s *ReadState) GetProposal(proposalHash []byte) (*payload.Ballot, error) { return nil, nil } - return payload.DecodeBallot(bs) + ballot := new(payload.Ballot) + err = encoding.Decode(bs, ballot) + if err != nil { + return nil, err + } + return ballot, nil } func (ws *writeState) UpdateProposal(proposalHash []byte, p *payload.Ballot) error { @@ -29,7 +34,7 @@ func (ws *writeState) UpdateProposal(proposalHash []byte, p *payload.Ballot) err if err != nil { return err } - bs, err := p.Encode() + bs, err := encoding.Encode(p) if err != nil { return err } @@ -53,10 +58,11 @@ func (s *ReadState) IterateProposals(consumer func(proposalHash []byte, proposal return err } return tree.Iterate(nil, nil, true, func(key []byte, value []byte) error { - entry, err := payload.DecodeBallot(value) + ballot := new(payload.Ballot) + err := encoding.Decode(value, ballot) if err != nil { - return fmt.Errorf("State.IterateProposal() could not iterate over proposals: %v", err) + return err } - return consumer(key, entry) + return consumer(key, ballot) }) } diff --git a/forensics/replay.go b/forensics/replay.go index a00299a01..4fb5809ca 100644 --- a/forensics/replay.go +++ b/forensics/replay.go @@ -57,8 +57,14 @@ func NewSource(burrowDB, tmDB dbm.DB, genesisDoc *genesis.GenesisDoc) *Source { } func NewSourceFromDir(genesisDoc *genesis.GenesisDoc, dbDir string) *Source { - burrowDB := dbm.NewDB(core.BurrowDBName, dbm.GoLevelDBBackend, dbDir) - tmDB := dbm.NewDB("blockstore", dbm.GoLevelDBBackend, path.Join(dbDir, "data")) + burrowDB, err := dbm.NewDB(core.BurrowDBName, dbm.GoLevelDBBackend, dbDir) + if err != nil { + panic(fmt.Errorf("could not create core DB for replay source: %w", err)) + } + tmDB, err := dbm.NewDB("blockstore", dbm.GoLevelDBBackend, path.Join(dbDir, "data")) + if err != nil { + panic(fmt.Errorf("could not create blockstore DB for replay source: %w", err)) + } return NewSource(burrowDB, tmDB, genesisDoc) } @@ -73,7 +79,11 @@ func NewSourceFromGenesis(genesisDoc *genesis.GenesisDoc) *Source { if err != nil { panic(err) } - sm.SaveState(tmDB, st) + stateStore := sm.NewStore(tmDB) + err = stateStore.Save(st) + if err != nil { + panic(err) + } burrowDB, burrowState, burrowChain, err := initBurrow(genesisDoc) if err != nil { panic(err) diff --git a/forensics/replay_test.go b/forensics/replay_test.go index 67bf716df..a3e9a9238 100644 --- a/forensics/replay_test.go +++ b/forensics/replay_test.go @@ -120,8 +120,8 @@ func makeBlock(t *testing.T, st sm.State, bs *store.BlockStore, commit func(*typ partSet := block.MakePartSet(2) commitSigs := []types.CommitSig{{Timestamp: time.Time{}}} seenCommit := types.NewCommit(height, 0, types.BlockID{ - Hash: block.Hash(), - PartsHeader: partSet.Header(), + Hash: block.Hash(), + PartSetHeader: partSet.Header(), }, commitSigs) bs.SaveBlock(block, partSet, seenCommit) } diff --git a/forensics/spin_test.go b/forensics/spin_test.go index a77d9ab74..1eea2c818 100644 --- a/forensics/spin_test.go +++ b/forensics/spin_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/require" + "github.com/hyperledger/burrow/encoding" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/rpc/rpcevents" - "google.golang.org/grpc" ) func TestSpin(t *testing.T) { @@ -38,7 +38,7 @@ func TestSpinAll(t *testing.T) { func consume(name, listenAddress string, wg *sync.WaitGroup) error { defer wg.Done() - conn, err := grpc.Dial(listenAddress, grpc.WithInsecure()) + conn, err := encoding.GRPCDial(listenAddress) if err != nil { return err } diff --git a/forensics/storage/cache_db.go b/forensics/storage/cache_db.go index c93b86dba..a731fe32a 100644 --- a/forensics/storage/cache_db.go +++ b/forensics/storage/cache_db.go @@ -98,12 +98,14 @@ type cacheBatch struct { backend *CacheDB } -func (cb *cacheBatch) Set(key, value []byte) { +func (cb *cacheBatch) Set(key, value []byte) error { cb.cache.Set(key, value) + return nil } -func (cb *cacheBatch) Delete(key []byte) { +func (cb *cacheBatch) Delete(key []byte) error { cb.cache.Delete(key) + return nil } func (cb *cacheBatch) Write() error { @@ -111,7 +113,8 @@ func (cb *cacheBatch) Write() error { return nil } -func (cb *cacheBatch) Close() { +func (cb *cacheBatch) Close() error { + return nil } func (cb *cacheBatch) WriteSync() error { diff --git a/forensics/storage/channel_iterator.go b/forensics/storage/channel_iterator.go index 1cdc90234..47ff04235 100644 --- a/forensics/storage/channel_iterator.go +++ b/forensics/storage/channel_iterator.go @@ -89,10 +89,11 @@ func (it *ChannelIterator) Value() []byte { return it.kv.Value } -func (it *ChannelIterator) Close() { +func (it *ChannelIterator) Close() error { for range it.ch { // drain channel if necessary } + return nil } func (it *ChannelIterator) Error() error { diff --git a/forensics/storage/kvcache.go b/forensics/storage/kvcache.go index 7581213c2..a68ca5ebc 100644 --- a/forensics/storage/kvcache.go +++ b/forensics/storage/kvcache.go @@ -202,7 +202,9 @@ func (kvi *KVCacheIterator) Valid() bool { return kvi.keyIndex < len(kvi.keys) } -func (kvi *KVCacheIterator) Close() {} +func (kvi *KVCacheIterator) Close() error { + return nil +} func (kvi *KVCacheIterator) Error() error { return nil } diff --git a/forensics/storage/multi_iterator.go b/forensics/storage/multi_iterator.go index 8165196eb..7a846c9d9 100644 --- a/forensics/storage/multi_iterator.go +++ b/forensics/storage/multi_iterator.go @@ -109,11 +109,15 @@ func (mi *MultiIterator) Peek() storage.KVIterator { return mi.iterators[0] } -func (mi *MultiIterator) Close() { +func (mi *MultiIterator) Close() error { // Close any remaining valid iterators for _, it := range mi.iterators { - it.Close() + err := it.Close() + if err != nil { + return err + } } + return nil } func (mi *MultiIterator) Error() error { diff --git a/forensics/storage/unique_iterator.go b/forensics/storage/unique_iterator.go index b9fd20c89..29f8b9ce2 100644 --- a/forensics/storage/unique_iterator.go +++ b/forensics/storage/unique_iterator.go @@ -42,8 +42,8 @@ func (ui *uniqueIterator) Value() []byte { return ui.source.Value() } -func (ui *uniqueIterator) Close() { - ui.source.Close() +func (ui *uniqueIterator) Close() error { + return ui.source.Close() } func (ui *uniqueIterator) Error() error { diff --git a/genesis/spec/spec.pb.go b/genesis/spec/spec.pb.go index dc7643094..6e13643a1 100644 --- a/genesis/spec/spec.pb.go +++ b/genesis/spec/spec.pb.go @@ -117,33 +117,32 @@ func init() { proto.RegisterFile("spec.proto", fileDescriptor_423806180556987f) func init() { golang_proto.RegisterFile("spec.proto", fileDescriptor_423806180556987f) } var fileDescriptor_423806180556987f = []byte{ - // 401 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbf, 0x6f, 0xd4, 0x30, - 0x14, 0xc7, 0xcf, 0x5c, 0xda, 0xe3, 0x7c, 0x45, 0x50, 0x4f, 0x51, 0x87, 0x38, 0x3a, 0x06, 0x22, - 0x54, 0x12, 0xe9, 0x98, 0xe8, 0x76, 0xe1, 0xc7, 0x82, 0x84, 0xaa, 0xb4, 0x13, 0x5b, 0xe2, 0x3c, - 0xd2, 0x48, 0x71, 0x1c, 0xd9, 0x8e, 0x50, 0xfe, 0x0b, 0x24, 0x16, 0xe6, 0xfe, 0x25, 0x8c, 0x19, - 0x19, 0x51, 0x87, 0x08, 0xa5, 0x1b, 0x23, 0x7f, 0x01, 0x3a, 0xe7, 0x8e, 0xde, 0x44, 0x33, 0xf9, - 0x7d, 0xfd, 0xf4, 0xfd, 0xbc, 0x67, 0xbf, 0x87, 0xb1, 0xaa, 0x80, 0xf9, 0x95, 0x14, 0x5a, 0x10, - 0x6b, 0x13, 0x9f, 0xbc, 0xc8, 0x72, 0x7d, 0x55, 0x27, 0x3e, 0x13, 0x3c, 0xc8, 0x44, 0x26, 0x02, - 0x93, 0x4c, 0xea, 0x4f, 0x46, 0x19, 0x61, 0xa2, 0xc1, 0x74, 0x72, 0xc4, 0x64, 0x53, 0xe9, 0x9d, - 0x7a, 0x94, 0xc4, 0x45, 0x5c, 0x32, 0x18, 0xe4, 0xf2, 0xab, 0x85, 0x1f, 0x5f, 0x02, 0xaf, 0x8a, - 0x58, 0xc3, 0x9a, 0x31, 0x51, 0x97, 0x9a, 0x10, 0x6c, 0x7d, 0x88, 0x39, 0xd8, 0xc8, 0x45, 0xde, - 0x3c, 0x32, 0x31, 0xe1, 0x78, 0xb6, 0x4e, 0x53, 0x09, 0x4a, 0xd9, 0x0f, 0x5c, 0xe4, 0x1d, 0x85, - 0x17, 0x37, 0x1d, 0x3d, 0xdd, 0x6b, 0xe4, 0xaa, 0xa9, 0x40, 0x16, 0x90, 0x66, 0x20, 0x83, 0xa4, - 0x96, 0x52, 0x7c, 0x0e, 0xb6, 0x75, 0xb7, 0xbe, 0xdf, 0x1d, 0xc5, 0xa7, 0x82, 0xe7, 0x1a, 0x78, - 0xa5, 0x9b, 0x3f, 0x1d, 0x3d, 0xd6, 0x82, 0x17, 0x67, 0xcb, 0xbb, 0xbb, 0x65, 0xb4, 0xab, 0x41, - 0x2e, 0xf1, 0xfc, 0xbc, 0x4e, 0x8a, 0x9c, 0xbd, 0x87, 0xc6, 0x9e, 0xba, 0xc8, 0x5b, 0xac, 0x8e, - 0xfd, 0x2d, 0xef, 0x5f, 0x22, 0x7c, 0x3a, 0x86, 0x79, 0x07, 0x22, 0x17, 0x78, 0xb6, 0xe6, 0x9b, - 0x27, 0x2a, 0xdb, 0x72, 0xa7, 0xde, 0x62, 0xf5, 0xc4, 0xdf, 0xfd, 0x46, 0x38, 0x9c, 0xe1, 0xb3, - 0xb6, 0xa3, 0x93, 0x71, 0xad, 0x0e, 0x24, 0xf2, 0x16, 0x2f, 0xce, 0x41, 0xf2, 0x5c, 0xa9, 0x5c, - 0x94, 0xca, 0x3e, 0x70, 0xa7, 0xde, 0x7c, 0x5c, 0x67, 0xfb, 0x3e, 0xf2, 0x0a, 0x1f, 0x44, 0xa2, - 0x00, 0x65, 0x1f, 0x8e, 0x07, 0x0c, 0x0e, 0xf2, 0x0e, 0x5b, 0xaf, 0x45, 0x0a, 0xf6, 0xcc, 0x0c, - 0x66, 0xd5, 0x76, 0x14, 0xdd, 0x74, 0xf4, 0xf9, 0xff, 0x87, 0x13, 0x33, 0xee, 0x87, 0x8d, 0x06, - 0x26, 0x52, 0x88, 0x8c, 0xff, 0xec, 0xe1, 0x97, 0x6b, 0x3a, 0xf9, 0x76, 0x4d, 0x27, 0xe1, 0x9b, - 0xb6, 0x77, 0xd0, 0x8f, 0xde, 0x41, 0x3f, 0x7b, 0x07, 0xfd, 0xea, 0x1d, 0xf4, 0xfd, 0xd6, 0x41, - 0xed, 0xad, 0x83, 0x3e, 0xde, 0x43, 0xcd, 0xa0, 0x04, 0x95, 0xab, 0x60, 0xb3, 0xa7, 0xc9, 0xa1, - 0x59, 0xb1, 0x97, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xcf, 0x89, 0xb2, 0xc2, 0x02, 0x00, - 0x00, + // 394 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbf, 0x8e, 0xd3, 0x40, + 0x10, 0xc6, 0xb3, 0xc4, 0x77, 0x21, 0x9b, 0x43, 0x70, 0x2b, 0x0a, 0xeb, 0x0a, 0xaf, 0x15, 0x0a, + 0x2c, 0x74, 0xb2, 0xa5, 0x50, 0x71, 0x5d, 0xcc, 0x9f, 0x06, 0x09, 0x9d, 0x7c, 0x57, 0xd1, 0xd9, + 0xeb, 0x91, 0xcf, 0x92, 0xd7, 0x6b, 0xed, 0xae, 0x85, 0xfc, 0x16, 0x48, 0x34, 0xd4, 0x79, 0x12, + 0x4a, 0x97, 0x94, 0x28, 0x85, 0x85, 0x9c, 0x8e, 0x92, 0x27, 0x40, 0xb6, 0x13, 0x42, 0xc5, 0xb9, + 0xf2, 0x37, 0x33, 0xfa, 0x7e, 0x33, 0xde, 0x19, 0x8c, 0x55, 0x01, 0xcc, 0x2d, 0xa4, 0xd0, 0x82, + 0x18, 0x9d, 0xbe, 0x78, 0x9a, 0x88, 0x44, 0xf4, 0x09, 0xaf, 0x53, 0x43, 0xed, 0xe2, 0x8c, 0xc9, + 0xaa, 0xd0, 0x87, 0xe8, 0x51, 0x14, 0x66, 0x61, 0xce, 0x60, 0x08, 0x97, 0x5f, 0x0c, 0xfc, 0xf8, + 0x16, 0x78, 0x91, 0x85, 0x1a, 0xd6, 0x8c, 0x89, 0x32, 0xd7, 0x84, 0x60, 0xe3, 0x43, 0xc8, 0xc1, + 0x44, 0x36, 0x72, 0xe6, 0x41, 0xaf, 0x09, 0xc7, 0xb3, 0x75, 0x1c, 0x4b, 0x50, 0xca, 0x7c, 0x60, + 0x23, 0xe7, 0xcc, 0xbf, 0xd9, 0x36, 0xf4, 0x32, 0x49, 0xf5, 0x5d, 0x19, 0xb9, 0x4c, 0x70, 0xef, + 0xae, 0x2a, 0x40, 0x66, 0x10, 0x27, 0x20, 0xbd, 0xa8, 0x94, 0x52, 0x7c, 0xf2, 0xf6, 0x7d, 0xf7, + 0xbe, 0x5f, 0x0d, 0xc5, 0x97, 0x82, 0xa7, 0x1a, 0x78, 0xa1, 0xab, 0xdf, 0x0d, 0x3d, 0xd7, 0x82, + 0x67, 0x57, 0xcb, 0x63, 0x6e, 0x19, 0x1c, 0x7a, 0x90, 0x5b, 0x3c, 0xbf, 0x2e, 0xa3, 0x2c, 0x65, + 0xef, 0xa1, 0x32, 0xa7, 0x36, 0x72, 0x16, 0xab, 0x73, 0x77, 0xcf, 0xfb, 0x5b, 0xf0, 0x9f, 0x8d, + 0x61, 0x1e, 0x41, 0xe4, 0x06, 0xcf, 0xd6, 0xbc, 0xfb, 0x45, 0x65, 0x1a, 0xf6, 0xd4, 0x59, 0xac, + 0x9e, 0xb8, 0x87, 0xd7, 0xf0, 0x87, 0xaf, 0xff, 0xbc, 0x6e, 0xe8, 0x64, 0xdc, 0xa8, 0x03, 0x89, + 0xbc, 0xc5, 0x8b, 0x6b, 0x90, 0x3c, 0x55, 0x2a, 0x15, 0xb9, 0x32, 0x4f, 0xec, 0xa9, 0x33, 0x1f, + 0x37, 0xd9, 0xbf, 0x3e, 0xf2, 0x0a, 0x9f, 0x04, 0x22, 0x03, 0x65, 0x9e, 0x8e, 0x07, 0x0c, 0x0e, + 0xf2, 0x0e, 0x1b, 0xaf, 0x45, 0x0c, 0xe6, 0xac, 0x5f, 0xcc, 0xaa, 0x6e, 0x28, 0xda, 0x36, 0xf4, + 0xc5, 0xff, 0x97, 0x13, 0x32, 0xee, 0xfa, 0x95, 0x06, 0x26, 0x62, 0x08, 0x7a, 0xff, 0xd5, 0xc3, + 0xcf, 0x1b, 0x3a, 0xf9, 0xba, 0xa1, 0x13, 0xff, 0x4d, 0xdd, 0x5a, 0xe8, 0x7b, 0x6b, 0xa1, 0x1f, + 0xad, 0x85, 0x7e, 0xb6, 0x16, 0xfa, 0xb6, 0xb3, 0x50, 0xbd, 0xb3, 0xd0, 0xc7, 0x7b, 0xa8, 0x09, + 0xe4, 0xa0, 0x52, 0xe5, 0x75, 0xe7, 0x18, 0x9d, 0xf6, 0x27, 0xf6, 0xf2, 0x4f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xf3, 0x21, 0x48, 0x2d, 0xa9, 0x02, 0x00, 0x00, } func (m *TemplateAccount) Marshal() (dAtA []byte, err error) { @@ -582,10 +581,7 @@ func (m *TemplateAccount) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthSpec - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSpec } if (iNdEx + skippy) > l { diff --git a/go.mod b/go.mod index 191f9814c..fde9be15e 100644 --- a/go.mod +++ b/go.mod @@ -1,64 +1,57 @@ module github.com/hyperledger/burrow -go 1.12 +go 1.15 require ( github.com/BurntSushi/toml v0.3.1 - github.com/OneOfOne/xxhash v1.2.5 - github.com/alecthomas/jsonschema v0.0.0-20190122210438-a6952de1bbe6 - github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf // indirect - github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c + github.com/OneOfOne/xxhash v1.2.8 + github.com/alecthomas/jsonschema v0.0.0-20201129101101-7b852d451add + github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect + github.com/btcsuite/btcd v0.21.0-beta github.com/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9 + github.com/cosmos/iavl v0.15.3 github.com/eapache/channels v1.1.0 - github.com/eapache/queue v1.1.0 // indirect - github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13 + github.com/elgs/gojq v0.0.0-20201120033525-b5293fef2759 github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8 // indirect - github.com/fatih/color v1.7.0 - github.com/go-kit/kit v0.9.0 - github.com/go-ozzo/ozzo-validation v3.5.0+incompatible - github.com/gogo/protobuf v1.3.1 - github.com/golang/protobuf v1.3.3 - github.com/gorilla/websocket v1.4.1 - github.com/hashicorp/golang-lru v0.5.1 - github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c - github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365 - github.com/imdario/mergo v0.3.7 - github.com/jawher/mow.cli v1.1.0 - github.com/jmoiron/sqlx v1.2.0 - github.com/lib/pq v1.1.1 - github.com/mattn/go-colorable v0.1.2 // indirect - github.com/mattn/go-sqlite3 v1.10.0 + github.com/fatih/color v1.10.0 + github.com/go-kit/kit v0.10.0 + github.com/go-ozzo/ozzo-validation v3.6.0+incompatible + github.com/gogo/protobuf v1.3.2 + github.com/golang/protobuf v1.4.3 + github.com/gorilla/websocket v1.4.2 + github.com/hashicorp/golang-lru v0.5.4 + github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c + github.com/iancoleman/strcase v0.1.3 + github.com/imdario/mergo v0.3.11 + github.com/jawher/mow.cli v1.2.0 + github.com/jmoiron/sqlx v1.3.1 + github.com/lib/pq v1.9.0 + github.com/mattn/go-sqlite3 v1.14.6 github.com/monax/relic v2.0.0+incompatible github.com/perlin-network/life v0.0.0-20191203030451-05c0e0f7eaea github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v0.9.3 - github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 - github.com/prometheus/common v0.4.0 - github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a - github.com/sirupsen/logrus v1.4.2 // indirect - github.com/spf13/viper v1.6.2 + github.com/prometheus/client_golang v1.9.0 + github.com/prometheus/client_model v0.2.0 + github.com/prometheus/common v0.15.0 + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 + github.com/spf13/viper v1.7.1 github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485 - github.com/stretchr/testify v1.4.0 - github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d - github.com/tendermint/go-amino v0.14.1 - github.com/tendermint/iavl v0.13.0 - github.com/tendermint/tendermint v0.33.1 - github.com/tendermint/tm-db v0.4.0 + github.com/stretchr/testify v1.7.0 + github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca + github.com/tendermint/tendermint v0.34.3 + github.com/tendermint/tm-db v0.6.3 github.com/test-go/testify v1.1.4 github.com/tmthrgd/atomics v0.0.0-20190904060638-dc7a5fcc7e0d // indirect github.com/tmthrgd/go-bitset v0.0.0-20190904054048-394d9a556c05 github.com/tmthrgd/go-bitwise v0.0.0-20190904053232-1430ee983fca // indirect github.com/tmthrgd/go-byte-test v0.0.0-20190904060354-2794345b9929 // indirect - github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc github.com/tmthrgd/go-memset v0.0.0-20190904060434-6fb7a21f88f1 // indirect github.com/tmthrgd/go-popcount v0.0.0-20190904054823-afb1ace8b04f // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v1.1.0 - github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca - golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 - golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 - golang.org/x/sys v0.0.0-20190825160603-fb81701db80f // indirect - google.golang.org/grpc v1.27.1 - gopkg.in/yaml.v2 v2.2.4 + github.com/xeipuuv/gojsonschema v1.2.0 + github.com/xlab/treeprint v1.0.0 + golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad + golang.org/x/net v0.0.0-20210119194325-5f4716e94777 + google.golang.org/grpc v1.35.0 + gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 5db305adf..03b5108ca 100644 --- a/go.sum +++ b/go.sum @@ -1,282 +1,565 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.0.0-alpha.2 h1:EWbZLqGEPSIj2W69gx04KtNVkyPIfe3uj0DhDQJonbQ= +filippo.io/edwards25519 v1.0.0-alpha.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200102211924-4bcbc698314f h1:4O1om+UVU+Hfcihr1timk8YNXHxzZWgCo7ofnrZRApw= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200102211924-4bcbc698314f/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM= +github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= -github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= +github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= +github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= +github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= +github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/alecthomas/jsonschema v0.0.0-20190122210438-a6952de1bbe6 h1:xadBCbc8D9mmkaNfCsEBHbIoCjbayJXJNsY1JjPjNio= -github.com/alecthomas/jsonschema v0.0.0-20190122210438-a6952de1bbe6/go.mod h1:qpebaTNSsyUn5rPSJMsfqEtDw71TTggXM6stUDI16HA= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/alecthomas/jsonschema v0.0.0-20201129101101-7b852d451add h1:UWj2AVW7oygpatGgJRy6rvNBcl+J7u8vl6qTV+XNWzA= +github.com/alecthomas/jsonschema v0.0.0-20201129101101-7b852d451add/go.mod h1:/n6+1/DWPltRLWL/VKyUxg6tzsl5kHUCcraimt4vr60= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= +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/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +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/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf h1:eg0MeVzsP1G42dRafH3vf+al2vQIJU0YHX+1Tw87oco= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef h1:46PFijGLmAjMPwCCCo7Jf0W6f9slllCkkv7vyc1yOSg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= -github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c h1:aEbSeNALREWXk0G7UdNhR3ayBV7tZ4M2PNmnrCAph6Q= -github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +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/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-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= +github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= 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= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9 h1:Iy/9yf1PnKnwH8V0phEnqKE6aSIaqIZ+yn4PQgHF84E= github.com/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9/go.mod h1:6R3C29d3JonDKVjnlzFv5BGL/bfZP+0I7rKHKwiqKP8= +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 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/confio/ics23/go v0.0.0-20200817220745-f173e6211efb/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= +github.com/confio/ics23/go v0.6.3 h1:PuGK2V1NJWZ8sSkNDq91jgT/cahFEW9RGp4Y5jxulf0= +github.com/confio/ics23/go v0.6.3/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= 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-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/iavl v0.15.0-rc3.0.20201009144442-230e9bdf52cd/go.mod h1:3xOIaNNX19p0QrX0VqWa6voPRoJRGGYtny+DH8NEPvE= +github.com/cosmos/iavl v0.15.0-rc5/go.mod h1:WqoPL9yPTQ85QBMT45OOUzPxG/U/JcJoN7uMjgxke/I= +github.com/cosmos/iavl v0.15.3 h1:xE9r6HW8GeKeoYJN4zefpljZ1oukVScP/7M8oj6SUts= +github.com/cosmos/iavl v0.15.3/go.mod h1:OLjQiAQ4fGD2KDZooyJG9yz+p2ao2IAYSbke8mVvSA4= +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/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= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/dgraph-io/badger/v2 v2.2007.1/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= +github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= +github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de h1:t0UHb5vdojIDUqktM6+xJAfScFBsVpXZmqC9dsgJmeA= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/channels v1.1.0 h1:F1taHcn7/F0i8DYqKXJnyhJcVpp2kgFcNePxXtnyu4k= github.com/eapache/channels v1.1.0/go.mod h1:jMm2qB5Ubtg9zLd+inMZd2/NUvXgzmWXsDaLyQIGfH0= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13 h1:/voSflvo4UvPT0XZy+YQMuUk04topJ2swxyOOyXefMM= -github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13/go.mod h1:rQELVIqRXpraeUryHOBadz99ePvEVQmTVpGr8M9QQ4Q= +github.com/elgs/gojq v0.0.0-20201120033525-b5293fef2759 h1:WtAKk9RULee8RXnR3to5hg7TrsPVCdxYVrOZRjR54LU= +github.com/elgs/gojq v0.0.0-20201120033525-b5293fef2759/go.mod h1:rQELVIqRXpraeUryHOBadz99ePvEVQmTVpGr8M9QQ4Q= github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8 h1:bD2/rCXwgXJm2vgoSSSCM9IPjVFfEoQFFblzg7HHABI= github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8/go.mod h1:o4DgpccPNAQAlPSxo7I4L/LWNh2oyr/BBGSynrLTmZM= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +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.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3 h1:gSJmxrs37LgTqR/oyJBWok6k6SvXEUerFTbltIhXkBM= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= -github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +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-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-interpreter/wagon v0.6.0 h1:BBxDxjiJiHgw9EdkYXAWs8NHhwnazZ5P2EWBW5hFNWw= github.com/go-interpreter/wagon v0.6.0/go.mod h1:5+b/MBYkclRZngKF5s6qrgWxSLgE9F5dFdO1hAueZLc= 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-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= 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= github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-ozzo/ozzo-validation v3.5.0+incompatible h1:sUy/in/P6askYr16XJgTKq/0SZhiWsdg4WZGaLsGQkM= -github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= +github.com/go-ozzo/ozzo-validation v3.6.0+incompatible h1:msy24VGS42fKO9K1vLz82/GeYW1cILu7Nuuj1N3BBkE= +github.com/go-ozzo/ozzo-validation v3.6.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= 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/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/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 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 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/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/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 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +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 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +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.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= +github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= +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/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/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/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +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/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.1/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 h1:FlFbCRLd5Jr4iYXZufAvgWN6Ao0JrI5chLINnUXDDr0= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f h1:8N8XWLZelZNibkhM1FuF+3Ad3YIbgirjdMiVA0eUkaM= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= +github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/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-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +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= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +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 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/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/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c h1:kQWxfPIHVLbgLzphqk3QUflDy9QdksZR4ygR807bpy0= -github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +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/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hdevalence/ed25519consensus v0.0.0-20201207055737-7fde80a9d5ff h1:LeVKjw8pcDQj7WVVnbFvbD7ovcv+r/l15ka1NH6Lswc= +github.com/hdevalence/ed25519consensus v0.0.0-20201207055737-7fde80a9d5ff/go.mod h1:Feit0l8NcNO4g69XNjwvsR0LGcwMMfzI1TF253rOIlQ= +github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c h1:aY2hhxLhjEAbfXOx2nRJxCXezC6CO2V/yN+OCr1srtk= +github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365 h1:ECW73yc9MY7935nNYXUkK7Dz17YuSUI9yqRqYS8aBww= -github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= -github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= -github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk= +github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= +github.com/iancoleman/strcase v0.1.3 h1:dJBk1m2/qjL1twPLf68JND55vvivMupZ4wIzE8CTdBw= +github.com/iancoleman/strcase v0.1.3/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= +github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jawher/mow.cli v1.1.0 h1:NdtHXRc0CwZQ507wMvQ/IS+Q3W3x2fycn973/b8Zuk8= -github.com/jawher/mow.cli v1.1.0/go.mod h1:aNaQlc7ozF3vw6IJ2dHjp2ZFiA4ozMIYY6PyuRJwlUg= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jawher/mow.cli v1.2.0 h1:e6ViPPy+82A/NFF/cfbq3Lr6q4JHKT9tyHwTCcUQgQw= +github.com/jawher/mow.cli v1.2.0/go.mod h1:y+pcA3jBAdo/GIZx/0rFjw/K2bVEODP9rfZOfaiq8Ko= 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.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= -github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/jmoiron/sqlx v1.3.1 h1:aLN7YINNZ7cYOPK3QC83dbM6KT0NMqVMw961TqrejlE= +github.com/jmoiron/sqlx v1.3.1/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= 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/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4= -github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.9.0 h1:L8nSXQQzAYByakOFMTwpjRoHsMJklur4Gi59b6VivR8= +github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o= -github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +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.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= +github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= 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/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0= +github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +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-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= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +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/monax/relic v2.0.0+incompatible h1:5q+fw8Y7UJJuOBzGV5bZNlBk9k9ii6fzmdpwXsZKMdg= github.com/monax/relic v2.0.0+incompatible/go.mod h1:ZJcXg8m9tYkd2h6VeEZruhRUQPklFKbzFaTxyXrXxVk= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= +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.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= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/perlin-network/life v0.0.0-20191203030451-05c0e0f7eaea h1:okKoivlkNRRLqXraEtatHfEhW+D71QTwkaj+4n4M2Xc= github.com/perlin-network/life v0.0.0-20191203030451-05c0e0f7eaea/go.mod h1:3KEU5Dm8MAYWZqity880wOFJ9PhQjyKVZGwAEfc5Q4E= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= 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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= 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.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw= +github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= +github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= +github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/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 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +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 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 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.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/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/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= 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/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sasha-s/go-deadlock v0.2.0 h1:lMqc+fUb7RrFS3gQLtoQsJ7/6TV/pAIFvBsqX73DK8Y= +github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= +github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +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 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +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.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= -github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= -github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +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.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485 h1:tvEO2/Btzw9L4N2VlAHD7AXjk1g1yFTwbGEm8dz7QWY= github.com/streadway/simpleuuid v0.0.0-20130420165545-6617b501e485/go.mod h1:fMlyZAyOBbIsA9SgKX9V3X8DvF+5ImkZ+Z1HZcmo8Ec= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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.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 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/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 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +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.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= -github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= -github.com/tecbot/gorocksdb v0.0.0-20191017175515-d217d93fd4c5 h1:gVwAW5OwaZlDB5/CfqcGFM9p9C+KxvQKyNOltQ8orj0= -github.com/tecbot/gorocksdb v0.0.0-20191017175515-d217d93fd4c5/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6offJMk= -github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= -github.com/tendermint/iavl v0.13.0 h1:r2sINvNFlJsLlLhGoqlqPlREWYkuK26BvMfkBt+XQnA= -github.com/tendermint/iavl v0.13.0/go.mod h1:7nSUPdrsHEZ2nNZa+9gaIrcJciWd1jCQZXtcyARU82k= -github.com/tendermint/tendermint v0.33.0 h1:TW1g9sQs3YSqKM8o1+opL3/VmBy4Ke/VKV9MxYpqNbI= -github.com/tendermint/tendermint v0.33.0/go.mod h1:s5UoymnPIY+GcA3mMte4P9gpMP8vS7UH7HBXikT1pHI= -github.com/tendermint/tendermint v0.33.1 h1:8f68LUBz8yhISZvaLFP4siXXrLWsWeoYfelbdNtmvm4= -github.com/tendermint/tendermint v0.33.1/go.mod h1:fBOKyrlXOETqQ+heL8x/TZgSdmItON54csyabvktBp0= -github.com/tendermint/tm-db v0.4.0 h1:iPbCcLbf4nwDFhS39Zo1lpdS1X/cT9CkTlUx17FHQgA= -github.com/tendermint/tm-db v0.4.0/go.mod h1:+Cwhgowrf7NBGXmsqFMbwEtbo80XmyrlY5Jsk95JubQ= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= +github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= +github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg= +github.com/tendermint/tendermint v0.34.0 h1:eXCfMgoqVSzrjzOj6clI9GAejcHH0LvOlRjpCmMJksU= +github.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESxkbA3yo/INM4QwQ= +github.com/tendermint/tendermint v0.34.3 h1:9yEsf3WO5VAwPVwrmM+RffDMiijmNfWaBwNttHm0q5w= +github.com/tendermint/tendermint v0.34.3/go.mod h1:h57vnXeOlrdvvNFCqPBSaOrpOivl+2swWEtlUAqStYE= +github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI= +github.com/tendermint/tm-db v0.6.3 h1:ZkhQcKnB8/2jr5EaZwGndN4owkPsGezW2fSisS9zGbg= +github.com/tendermint/tm-db v0.6.3/go.mod h1:lfA1dL9/Y/Y8wwyPp2NMLyn5P5Ptr/gvDFNWtrCWSf8= github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmthrgd/atomics v0.0.0-20190904060638-dc7a5fcc7e0d h1:2QXSQjy/gDm0QeP9G9NaO9Hm2Cl1LAle4ZV0JeYK7XY= github.com/tmthrgd/atomics v0.0.0-20190904060638-dc7a5fcc7e0d/go.mod h1:J2+dTgaX/1g3PkyL6sLBglBWfaLmAp5bQbRhSfKw9XI= @@ -286,8 +569,8 @@ github.com/tmthrgd/go-bitwise v0.0.0-20190904053232-1430ee983fca h1:Ns4/7EvYZ7Fx github.com/tmthrgd/go-bitwise v0.0.0-20190904053232-1430ee983fca/go.mod h1:Ba4ek/h+sJUzTQ03ZGD1r0lazhxd7CBoEQzFk/icxxU= github.com/tmthrgd/go-byte-test v0.0.0-20190904060354-2794345b9929 h1:EV5x10oS2/QrR1RwniFQW1i22d/iyX/emvvMjHT32CA= github.com/tmthrgd/go-byte-test v0.0.0-20190904060354-2794345b9929/go.mod h1:MEz1Lt0fxSL/ZgE7VN3yUJV0sP5I5aYecYLd9y/viEs= -github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631 h1:IlK6taZBmMKDcGfMqIlD4la5BlekNrrLsdtCMSn6aJI= -github.com/tmthrgd/go-hex v0.0.0-20190303111820-0bdcb15db631/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/tmthrgd/go-memset v0.0.0-20190904060434-6fb7a21f88f1 h1:KfSLDmc6rrLHr//urKbNApu51nt2AzdrwBCxqq0gRlk= github.com/tmthrgd/go-memset v0.0.0-20190904060434-6fb7a21f88f1/go.mod h1:xUkvcKF3VBDKFmmqCtW333lognWBHzSScj4fgjVB0Ek= github.com/tmthrgd/go-popcount v0.0.0-20190904054823-afb1ace8b04f h1:Phf2p9+twoHct5ZjSTrI8K7iWeSxO4x1p5pShTl0J00= @@ -295,107 +578,309 @@ github.com/tmthrgd/go-popcount v0.0.0-20190904054823-afb1ace8b04f/go.mod h1:FcUQ github.com/twitchyliquid64/golang-asm v0.0.0-20190126203739-365674df15fc h1:RTUQlKzoZZVG3umWNzOYeFecQLIh+dbxXvJp1zPQJTI= github.com/twitchyliquid64/golang-asm v0.0.0-20190126203739-365674df15fc/go.mod h1:NoCfSFWosfqMqmmD7hApkirIK9ozpHjxRnRxs1l413A= 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/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.1.0 h1:ngVtJC9TY/lg0AA/1k48FYhBrhRoFlEmWzsehpNAaZg= -github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI= -github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/xlab/treeprint v1.0.0 h1:J0TkWtiuYgtdlrkkrDLISYBQ92M+X5m4LrIIMKrbDTs= +github.com/xlab/treeprint v1.0.0/go.mod h1:IoImgRak9i3zJyuxOKUP1v4UZd1tMoKkq/Cimt1uhCg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +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.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/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= 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-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= +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-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +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= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +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= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +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/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/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-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= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 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-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= +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-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/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-20200421231249-e086a090c8fd/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-20200625001655-4c5254603344/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-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 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-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 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= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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-20181122145206-62eef0e2fa9b/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-20190130150945-aca44879d564/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-20190306220234-b354f8bf4d9e/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-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190825160603-fb81701db80f h1:LCxigP8q3fPRGNVYndYsyHnF0zRrvcoVwZMfb8iQZe4= -golang.org/x/sys v0.0.0-20190825160603-fb81701db80f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +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= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/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-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-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e h1:AyodaIpKjppX+cBfTASF2E1US3H2JFBj920Ot3rtDjs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 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= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +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/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/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-20190114222345-bf090417da8b/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-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-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-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= +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-20190816200558-6889da9d5479/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-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-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/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-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +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= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.0 h1:Tfd7cKwKbFRsI8RMAD3oqqw7JPFRrvFlOsfbgVkjOOw= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +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= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4 h1:Rt0FRalMgdSlXAVJvX4pr65KfqaxHXSLkSJRD9pw6g0= +google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +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.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.23.1/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.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +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.32.0/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.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +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 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= 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 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +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-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +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/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +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= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +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= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/integration/governance/governance_test.go b/integration/governance/governance_test.go index a8c96ae7d..78d3ef26a 100644 --- a/integration/governance/governance_test.go +++ b/integration/governance/governance_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" tmcore "github.com/tendermint/tendermint/rpc/core" - rpctypes "github.com/tendermint/tendermint/rpc/lib/types" + "github.com/tendermint/tendermint/rpc/jsonrpc/types" ) func TestGovernance(t *testing.T) { @@ -90,8 +90,9 @@ func TestGovernance(t *testing.T) { err = rpctest.WaitNBlocks(ecli, 6) require.NoError(t, err) height := int64(genesisKernels[0].Blockchain.LastBlockHeight()) - genesisKernels[0].Node.ConfigureRPC() - tmVals, err := tmcore.Validators(&rpctypes.Context{}, &height, 0, 0) + err = genesisKernels[0].Node.ConfigureRPC() + require.NoError(t, err) + tmVals, err := tmcore.Validators(&types.Context{}, &height, nil, nil) require.NoError(t, err) vsOut = validator.NewTrimSet() diff --git a/integration/keys/keys_server_test.go b/integration/keys/keys_server_test.go index 6bc299941..5c23f4b4d 100644 --- a/integration/keys/keys_server_test.go +++ b/integration/keys/keys_server_test.go @@ -6,13 +6,14 @@ import ( "testing" "time" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/integration" "github.com/hyperledger/burrow/keys" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "google.golang.org/grpc" ) type hashInfo struct { @@ -35,7 +36,7 @@ func TestKeysServer(t *testing.T) { "sha256": {"hi", "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4"}, "ripemd160": {"hi", "242485AB6BFD3502BCB3442EA2E211687B8E4D89"}, } - conn, err := grpc.Dial(address, grpc.WithInsecure()) + conn, err := encoding.GRPCDial(address) require.NoError(t, err) cli := keys.NewKeysClient(conn) diff --git a/integration/rpcinfo/info_server_test.go b/integration/rpcinfo/info_server_test.go index 4ce7fd050..1d56e6c1e 100644 --- a/integration/rpcinfo/info_server_test.go +++ b/integration/rpcinfo/info_server_test.go @@ -13,6 +13,8 @@ import ( "testing" "time" + tmjson "github.com/tendermint/tendermint/libs/json" + "github.com/hyperledger/burrow/integration" "github.com/hyperledger/burrow/txs/payload" @@ -24,7 +26,6 @@ import ( "github.com/hyperledger/burrow/event" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/integration/rpctest" - "github.com/hyperledger/burrow/rpc" "github.com/hyperledger/burrow/rpc/rpcinfo/infoclient" "github.com/hyperledger/burrow/rpc/rpctransact" "github.com/hyperledger/burrow/txs" @@ -212,9 +213,8 @@ func TestInfoServer(t *testing.T) { bs, err := json.Marshal(rawMap) require.NoError(t, err) - cdc := rpc.NewAminoCodec() rs := new(ctypes.RoundState) - err = cdc.UnmarshalJSON(bs, rs) + err = tmjson.Unmarshal(bs, rs) require.NoError(t, err) assert.Equal(t, rs.Validators.Validators[0].Address, rs.Validators.Proposer.Address) diff --git a/integration/rpctest/helpers.go b/integration/rpctest/helpers.go index 5f544cb37..a7ec5d69b 100644 --- a/integration/rpctest/helpers.go +++ b/integration/rpctest/helpers.go @@ -4,10 +4,11 @@ import ( "context" "testing" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/crypto" - "golang.org/x/crypto/sha3" - + _ "github.com/hyperledger/burrow/encoding" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/names" "github.com/hyperledger/burrow/integration" @@ -19,7 +20,7 @@ import ( "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" "github.com/stretchr/testify/require" - "google.golang.org/grpc" + "golang.org/x/crypto/sha3" ) // Recursive call count for UpsieDownsie() function call from strange_loop.sol @@ -32,19 +33,19 @@ var GenesisDoc = integration.TestGenesisDoc(PrivateAccounts, 0) // Helpers func NewTransactClient(t testing.TB, listenAddress string) rpctransact.TransactClient { - conn, err := grpc.Dial(listenAddress, grpc.WithInsecure()) + conn, err := encoding.GRPCDial(listenAddress) require.NoError(t, err) return rpctransact.NewTransactClient(conn) } func NewExecutionEventsClient(t testing.TB, listenAddress string) rpcevents.ExecutionEventsClient { - conn, err := grpc.Dial(listenAddress, grpc.WithInsecure()) + conn, err := encoding.GRPCDial(listenAddress) require.NoError(t, err) return rpcevents.NewExecutionEventsClient(conn) } func NewQueryClient(t testing.TB, listenAddress string) rpcquery.QueryClient { - conn, err := grpc.Dial(listenAddress, grpc.WithInsecure()) + conn, err := encoding.GRPCDial(listenAddress) require.NoError(t, err) return rpcquery.NewQueryClient(conn) } diff --git a/js/package.json b/js/package.json index c6ded65a9..4a9a1307c 100644 --- a/js/package.json +++ b/js/package.json @@ -31,7 +31,7 @@ "devDependencies": { "@types/mocha": "^8.2.0", "grpc-tools": "^1.10.0", - "grpc_tools_node_protoc_ts": "^5.1.0", + "grpc_tools_node_protoc_ts": " ^5.1.1", "mocha": "^8.2.1" }, "mocha": { diff --git a/js/proto/acm_pb.d.ts b/js/proto/acm_pb.d.ts index b4df0ca29..24bdea2d5 100644 --- a/js/proto/acm_pb.d.ts +++ b/js/proto/acm_pb.d.ts @@ -5,7 +5,7 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as permission_pb from "./permission_pb"; import * as crypto_pb from "./crypto_pb"; @@ -13,53 +13,53 @@ export class Account extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): Account; hasPublickey(): boolean; clearPublickey(): void; getPublickey(): crypto_pb.PublicKey | undefined; - setPublickey(value?: crypto_pb.PublicKey): void; + setPublickey(value?: crypto_pb.PublicKey): Account; getSequence(): number; - setSequence(value: number): void; + setSequence(value: number): Account; getBalance(): number; - setBalance(value: number): void; + setBalance(value: number): Account; getEvmcode(): Uint8Array | string; getEvmcode_asU8(): Uint8Array; getEvmcode_asB64(): string; - setEvmcode(value: Uint8Array | string): void; + setEvmcode(value: Uint8Array | string): Account; hasPermissions(): boolean; clearPermissions(): void; getPermissions(): permission_pb.AccountPermissions | undefined; - setPermissions(value?: permission_pb.AccountPermissions): void; + setPermissions(value?: permission_pb.AccountPermissions): Account; getWasmcode(): Uint8Array | string; getWasmcode_asU8(): Uint8Array; getWasmcode_asB64(): string; - setWasmcode(value: Uint8Array | string): void; + setWasmcode(value: Uint8Array | string): Account; getNativename(): string; - setNativename(value: string): void; + setNativename(value: string): Account; getCodehash(): Uint8Array | string; getCodehash_asU8(): Uint8Array; getCodehash_asB64(): string; - setCodehash(value: Uint8Array | string): void; + setCodehash(value: Uint8Array | string): Account; clearContractmetaList(): void; getContractmetaList(): Array; - setContractmetaList(value: Array): void; + setContractmetaList(value: Array): Account; addContractmeta(value?: ContractMeta, index?: number): ContractMeta; getForebear(): Uint8Array | string; getForebear_asU8(): Uint8Array; getForebear_asB64(): string; - setForebear(value: Uint8Array | string): void; + setForebear(value: Uint8Array | string): Account; serializeBinary(): Uint8Array; @@ -92,15 +92,15 @@ export class ContractMeta extends jspb.Message { getCodehash(): Uint8Array | string; getCodehash_asU8(): Uint8Array; getCodehash_asB64(): string; - setCodehash(value: Uint8Array | string): void; + setCodehash(value: Uint8Array | string): ContractMeta; getMetadatahash(): Uint8Array | string; getMetadatahash_asU8(): Uint8Array; getMetadatahash_asB64(): string; - setMetadatahash(value: Uint8Array | string): void; + setMetadatahash(value: Uint8Array | string): ContractMeta; getMetadata(): string; - setMetadata(value: string): void; + setMetadata(value: string): ContractMeta; serializeBinary(): Uint8Array; diff --git a/js/proto/acm_pb.js b/js/proto/acm_pb.js index 3c2bb5f2f..f8f8cb28b 100644 --- a/js/proto/acm_pb.js +++ b/js/proto/acm_pb.js @@ -1,3 +1,4 @@ +// source: acm.proto /** * @fileoverview * @enhanceable @@ -6,20 +7,21 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); var permission_pb = require('./permission_pb.js'); goog.object.extend(proto, permission_pb); var crypto_pb = require('./crypto_pb.js'); goog.object.extend(proto, crypto_pb); goog.exportSymbol('proto.acm.Account', null, global); goog.exportSymbol('proto.acm.ContractMeta', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -35,8 +37,34 @@ proto.acm.Account = function(opt_data) { }; goog.inherits(proto.acm.Account, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.acm.Account.displayName = 'proto.acm.Account'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.acm.ContractMeta = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.acm.ContractMeta, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.acm.ContractMeta.displayName = 'proto.acm.ContractMeta'; +} + /** * List of repeated fields within this message type. * @private {!Array} @@ -48,13 +76,15 @@ proto.acm.Account.repeatedFields_ = [9]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.acm.Account.prototype.toObject = function(opt_includeInstance) { @@ -64,8 +94,8 @@ proto.acm.Account.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.acm.Account} msg The msg instance to transform. * @return {!Object} @@ -313,9 +343,12 @@ proto.acm.Account.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -329,14 +362,21 @@ proto.acm.Account.prototype.getPublickey = function() { }; -/** @param {?proto.crypto.PublicKey|undefined} value */ +/** + * @param {?proto.crypto.PublicKey|undefined} value + * @return {!proto.acm.Account} returns this +*/ proto.acm.Account.prototype.setPublickey = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.clearPublickey = function() { - this.setPublickey(undefined); + return this.setPublickey(undefined); }; @@ -358,9 +398,12 @@ proto.acm.Account.prototype.getSequence = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setSequence = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -373,9 +416,12 @@ proto.acm.Account.prototype.getBalance = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setBalance = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -412,9 +458,12 @@ proto.acm.Account.prototype.getEvmcode_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setEvmcode = function(value) { - jspb.Message.setProto3BytesField(this, 5, value); + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -428,14 +477,21 @@ proto.acm.Account.prototype.getPermissions = function() { }; -/** @param {?proto.permission.AccountPermissions|undefined} value */ +/** + * @param {?proto.permission.AccountPermissions|undefined} value + * @return {!proto.acm.Account} returns this +*/ proto.acm.Account.prototype.setPermissions = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.clearPermissions = function() { - this.setPermissions(undefined); + return this.setPermissions(undefined); }; @@ -481,9 +537,12 @@ proto.acm.Account.prototype.getWasmcode_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setWasmcode = function(value) { - jspb.Message.setProto3BytesField(this, 7, value); + return jspb.Message.setProto3BytesField(this, 7, value); }; @@ -496,9 +555,12 @@ proto.acm.Account.prototype.getNativename = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setNativename = function(value) { - jspb.Message.setProto3StringField(this, 11, value); + return jspb.Message.setProto3StringField(this, 11, value); }; @@ -535,9 +597,12 @@ proto.acm.Account.prototype.getCodehash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setCodehash = function(value) { - jspb.Message.setProto3BytesField(this, 8, value); + return jspb.Message.setProto3BytesField(this, 8, value); }; @@ -551,9 +616,12 @@ proto.acm.Account.prototype.getContractmetaList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.acm.Account} returns this +*/ proto.acm.Account.prototype.setContractmetaList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 9, value); + return jspb.Message.setRepeatedWrapperField(this, 9, value); }; @@ -567,8 +635,12 @@ proto.acm.Account.prototype.addContractmeta = function(opt_value, opt_index) { }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.clearContractmetaList = function() { - this.setContractmetaList([]); + return this.setContractmetaList([]); }; @@ -605,41 +677,29 @@ proto.acm.Account.prototype.getForebear_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.Account} returns this + */ proto.acm.Account.prototype.setForebear = function(value) { - jspb.Message.setProto3BytesField(this, 10, value); + return jspb.Message.setProto3BytesField(this, 10, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.acm.ContractMeta = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.acm.ContractMeta, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.acm.ContractMeta.displayName = 'proto.acm.ContractMeta'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.acm.ContractMeta.prototype.toObject = function(opt_includeInstance) { @@ -649,8 +709,8 @@ proto.acm.ContractMeta.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.acm.ContractMeta} msg The msg instance to transform. * @return {!Object} @@ -795,9 +855,12 @@ proto.acm.ContractMeta.prototype.getCodehash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.ContractMeta} returns this + */ proto.acm.ContractMeta.prototype.setCodehash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -834,9 +897,12 @@ proto.acm.ContractMeta.prototype.getMetadatahash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.acm.ContractMeta} returns this + */ proto.acm.ContractMeta.prototype.setMetadatahash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -849,9 +915,12 @@ proto.acm.ContractMeta.prototype.getMetadata = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.acm.ContractMeta} returns this + */ proto.acm.ContractMeta.prototype.setMetadata = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; diff --git a/js/proto/balance_pb.d.ts b/js/proto/balance_pb.d.ts index 60e37b6ac..58015a33a 100644 --- a/js/proto/balance_pb.d.ts +++ b/js/proto/balance_pb.d.ts @@ -5,14 +5,14 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; export class Balance extends jspb.Message { getType(): number; - setType(value: number): void; + setType(value: number): Balance; getAmount(): number; - setAmount(value: number): void; + setAmount(value: number): Balance; serializeBinary(): Uint8Array; diff --git a/js/proto/balance_pb.js b/js/proto/balance_pb.js index 1b67a8273..c3234f566 100644 --- a/js/proto/balance_pb.js +++ b/js/proto/balance_pb.js @@ -1,3 +1,4 @@ +// source: balance.proto /** * @fileoverview * @enhanceable @@ -6,15 +7,16 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.balance.Balance', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,19 +32,26 @@ proto.balance.Balance = function(opt_data) { }; goog.inherits(proto.balance.Balance, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.balance.Balance.displayName = 'proto.balance.Balance'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.balance.Balance.prototype.toObject = function(opt_includeInstance) { @@ -52,8 +61,8 @@ proto.balance.Balance.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.balance.Balance} msg The msg instance to transform. * @return {!Object} @@ -162,9 +171,12 @@ proto.balance.Balance.prototype.getType = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.balance.Balance} returns this + */ proto.balance.Balance.prototype.setType = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -177,9 +189,12 @@ proto.balance.Balance.prototype.getAmount = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.balance.Balance} returns this + */ proto.balance.Balance.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/bcm_pb.d.ts b/js/proto/bcm_pb.d.ts index dea7c3b3c..dff8860c2 100644 --- a/js/proto/bcm_pb.d.ts +++ b/js/proto/bcm_pb.d.ts @@ -5,41 +5,41 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; export class SyncInfo extends jspb.Message { getLatestblockheight(): number; - setLatestblockheight(value: number): void; + setLatestblockheight(value: number): SyncInfo; getLatestblockhash(): Uint8Array | string; getLatestblockhash_asU8(): Uint8Array; getLatestblockhash_asB64(): string; - setLatestblockhash(value: Uint8Array | string): void; + setLatestblockhash(value: Uint8Array | string): SyncInfo; getLatestapphash(): Uint8Array | string; getLatestapphash_asU8(): Uint8Array; getLatestapphash_asB64(): string; - setLatestapphash(value: Uint8Array | string): void; + setLatestapphash(value: Uint8Array | string): SyncInfo; hasLatestblocktime(): boolean; clearLatestblocktime(): void; getLatestblocktime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLatestblocktime(value?: google_protobuf_timestamp_pb.Timestamp): void; + setLatestblocktime(value?: google_protobuf_timestamp_pb.Timestamp): SyncInfo; hasLatestblockseentime(): boolean; clearLatestblockseentime(): void; getLatestblockseentime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLatestblockseentime(value?: google_protobuf_timestamp_pb.Timestamp): void; + setLatestblockseentime(value?: google_protobuf_timestamp_pb.Timestamp): SyncInfo; hasLatestblockduration(): boolean; clearLatestblockduration(): void; getLatestblockduration(): google_protobuf_duration_pb.Duration | undefined; - setLatestblockduration(value?: google_protobuf_duration_pb.Duration): void; + setLatestblockduration(value?: google_protobuf_duration_pb.Duration): SyncInfo; serializeBinary(): Uint8Array; @@ -67,21 +67,21 @@ export class PersistedState extends jspb.Message { getApphashafterlastblock(): Uint8Array | string; getApphashafterlastblock_asU8(): Uint8Array; getApphashafterlastblock_asB64(): string; - setApphashafterlastblock(value: Uint8Array | string): void; + setApphashafterlastblock(value: Uint8Array | string): PersistedState; hasLastblocktime(): boolean; clearLastblocktime(): void; getLastblocktime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLastblocktime(value?: google_protobuf_timestamp_pb.Timestamp): void; + setLastblocktime(value?: google_protobuf_timestamp_pb.Timestamp): PersistedState; getLastblockheight(): number; - setLastblockheight(value: number): void; + setLastblockheight(value: number): PersistedState; getGenesishash(): Uint8Array | string; getGenesishash_asU8(): Uint8Array; getGenesishash_asB64(): string; - setGenesishash(value: Uint8Array | string): void; + setGenesishash(value: Uint8Array | string): PersistedState; serializeBinary(): Uint8Array; diff --git a/js/proto/bcm_pb.js b/js/proto/bcm_pb.js index f0af86033..07e464ae2 100644 --- a/js/proto/bcm_pb.js +++ b/js/proto/bcm_pb.js @@ -1,3 +1,4 @@ +// source: bcm.proto /** * @fileoverview * @enhanceable @@ -6,20 +7,21 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); goog.object.extend(proto, google_protobuf_duration_pb); goog.exportSymbol('proto.bcm.PersistedState', null, global); goog.exportSymbol('proto.bcm.SyncInfo', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -35,19 +37,47 @@ proto.bcm.SyncInfo = function(opt_data) { }; goog.inherits(proto.bcm.SyncInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.bcm.SyncInfo.displayName = 'proto.bcm.SyncInfo'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.bcm.PersistedState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bcm.PersistedState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bcm.PersistedState.displayName = 'proto.bcm.PersistedState'; +} + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.bcm.SyncInfo.prototype.toObject = function(opt_includeInstance) { @@ -57,8 +87,8 @@ proto.bcm.SyncInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.bcm.SyncInfo} msg The msg instance to transform. * @return {!Object} @@ -221,9 +251,12 @@ proto.bcm.SyncInfo.prototype.getLatestblockheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.bcm.SyncInfo} returns this + */ proto.bcm.SyncInfo.prototype.setLatestblockheight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -260,9 +293,12 @@ proto.bcm.SyncInfo.prototype.getLatestblockhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bcm.SyncInfo} returns this + */ proto.bcm.SyncInfo.prototype.setLatestblockhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -299,9 +335,12 @@ proto.bcm.SyncInfo.prototype.getLatestapphash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bcm.SyncInfo} returns this + */ proto.bcm.SyncInfo.prototype.setLatestapphash = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -315,14 +354,21 @@ proto.bcm.SyncInfo.prototype.getLatestblocktime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.bcm.SyncInfo} returns this +*/ proto.bcm.SyncInfo.prototype.setLatestblocktime = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.bcm.SyncInfo} returns this + */ proto.bcm.SyncInfo.prototype.clearLatestblocktime = function() { - this.setLatestblocktime(undefined); + return this.setLatestblocktime(undefined); }; @@ -345,14 +391,21 @@ proto.bcm.SyncInfo.prototype.getLatestblockseentime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.bcm.SyncInfo} returns this +*/ proto.bcm.SyncInfo.prototype.setLatestblockseentime = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.bcm.SyncInfo} returns this + */ proto.bcm.SyncInfo.prototype.clearLatestblockseentime = function() { - this.setLatestblockseentime(undefined); + return this.setLatestblockseentime(undefined); }; @@ -375,14 +428,21 @@ proto.bcm.SyncInfo.prototype.getLatestblockduration = function() { }; -/** @param {?proto.google.protobuf.Duration|undefined} value */ +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.bcm.SyncInfo} returns this +*/ proto.bcm.SyncInfo.prototype.setLatestblockduration = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.bcm.SyncInfo} returns this + */ proto.bcm.SyncInfo.prototype.clearLatestblockduration = function() { - this.setLatestblockduration(undefined); + return this.setLatestblockduration(undefined); }; @@ -396,34 +456,19 @@ proto.bcm.SyncInfo.prototype.hasLatestblockduration = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.bcm.PersistedState = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.bcm.PersistedState, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.bcm.PersistedState.displayName = 'proto.bcm.PersistedState'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.bcm.PersistedState.prototype.toObject = function(opt_includeInstance) { @@ -433,8 +478,8 @@ proto.bcm.PersistedState.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.bcm.PersistedState} msg The msg instance to transform. * @return {!Object} @@ -593,9 +638,12 @@ proto.bcm.PersistedState.prototype.getApphashafterlastblock_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bcm.PersistedState} returns this + */ proto.bcm.PersistedState.prototype.setApphashafterlastblock = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -609,14 +657,21 @@ proto.bcm.PersistedState.prototype.getLastblocktime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.bcm.PersistedState} returns this +*/ proto.bcm.PersistedState.prototype.setLastblocktime = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.bcm.PersistedState} returns this + */ proto.bcm.PersistedState.prototype.clearLastblocktime = function() { - this.setLastblocktime(undefined); + return this.setLastblocktime(undefined); }; @@ -638,9 +693,12 @@ proto.bcm.PersistedState.prototype.getLastblockheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.bcm.PersistedState} returns this + */ proto.bcm.PersistedState.prototype.setLastblockheight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -677,9 +735,12 @@ proto.bcm.PersistedState.prototype.getGenesishash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bcm.PersistedState} returns this + */ proto.bcm.PersistedState.prototype.setGenesishash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; diff --git a/js/proto/crypto_pb.d.ts b/js/proto/crypto_pb.d.ts index 3041edf67..939d58cb8 100644 --- a/js/proto/crypto_pb.d.ts +++ b/js/proto/crypto_pb.d.ts @@ -5,16 +5,16 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; export class PublicKey extends jspb.Message { getCurvetype(): number; - setCurvetype(value: number): void; + setCurvetype(value: number): PublicKey; getPublickey(): Uint8Array | string; getPublickey_asU8(): Uint8Array; getPublickey_asB64(): string; - setPublickey(value: Uint8Array | string): void; + setPublickey(value: Uint8Array | string): PublicKey; serializeBinary(): Uint8Array; @@ -36,17 +36,17 @@ export namespace PublicKey { export class PrivateKey extends jspb.Message { getCurvetype(): number; - setCurvetype(value: number): void; + setCurvetype(value: number): PrivateKey; getPublickey(): Uint8Array | string; getPublickey_asU8(): Uint8Array; getPublickey_asB64(): string; - setPublickey(value: Uint8Array | string): void; + setPublickey(value: Uint8Array | string): PrivateKey; getPrivatekey(): Uint8Array | string; getPrivatekey_asU8(): Uint8Array; getPrivatekey_asB64(): string; - setPrivatekey(value: Uint8Array | string): void; + setPrivatekey(value: Uint8Array | string): PrivateKey; serializeBinary(): Uint8Array; @@ -69,12 +69,12 @@ export namespace PrivateKey { export class Signature extends jspb.Message { getCurvetype(): number; - setCurvetype(value: number): void; + setCurvetype(value: number): Signature; getSignature(): Uint8Array | string; getSignature_asU8(): Uint8Array; getSignature_asB64(): string; - setSignature(value: Uint8Array | string): void; + setSignature(value: Uint8Array | string): Signature; serializeBinary(): Uint8Array; diff --git a/js/proto/crypto_pb.js b/js/proto/crypto_pb.js index 696a5cbcb..9f904f9da 100644 --- a/js/proto/crypto_pb.js +++ b/js/proto/crypto_pb.js @@ -1,3 +1,4 @@ +// source: crypto.proto /** * @fileoverview * @enhanceable @@ -6,17 +7,18 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.crypto.PrivateKey', null, global); goog.exportSymbol('proto.crypto.PublicKey', null, global); goog.exportSymbol('proto.crypto.Signature', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -32,19 +34,68 @@ proto.crypto.PublicKey = function(opt_data) { }; goog.inherits(proto.crypto.PublicKey, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.crypto.PublicKey.displayName = 'proto.crypto.PublicKey'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.crypto.PrivateKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.crypto.PrivateKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.crypto.PrivateKey.displayName = 'proto.crypto.PrivateKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.crypto.Signature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.crypto.Signature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.crypto.Signature.displayName = 'proto.crypto.Signature'; +} + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.crypto.PublicKey.prototype.toObject = function(opt_includeInstance) { @@ -54,8 +105,8 @@ proto.crypto.PublicKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.crypto.PublicKey} msg The msg instance to transform. * @return {!Object} @@ -164,9 +215,12 @@ proto.crypto.PublicKey.prototype.getCurvetype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.crypto.PublicKey} returns this + */ proto.crypto.PublicKey.prototype.setCurvetype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -203,41 +257,29 @@ proto.crypto.PublicKey.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.crypto.PublicKey} returns this + */ proto.crypto.PublicKey.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.crypto.PrivateKey = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.crypto.PrivateKey, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.crypto.PrivateKey.displayName = 'proto.crypto.PrivateKey'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.crypto.PrivateKey.prototype.toObject = function(opt_includeInstance) { @@ -247,8 +289,8 @@ proto.crypto.PrivateKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.crypto.PrivateKey} msg The msg instance to transform. * @return {!Object} @@ -369,9 +411,12 @@ proto.crypto.PrivateKey.prototype.getCurvetype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.crypto.PrivateKey} returns this + */ proto.crypto.PrivateKey.prototype.setCurvetype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -408,9 +453,12 @@ proto.crypto.PrivateKey.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.crypto.PrivateKey} returns this + */ proto.crypto.PrivateKey.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -447,41 +495,29 @@ proto.crypto.PrivateKey.prototype.getPrivatekey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.crypto.PrivateKey} returns this + */ proto.crypto.PrivateKey.prototype.setPrivatekey = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.crypto.Signature = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.crypto.Signature, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.crypto.Signature.displayName = 'proto.crypto.Signature'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.crypto.Signature.prototype.toObject = function(opt_includeInstance) { @@ -491,8 +527,8 @@ proto.crypto.Signature.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.crypto.Signature} msg The msg instance to transform. * @return {!Object} @@ -601,9 +637,12 @@ proto.crypto.Signature.prototype.getCurvetype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.crypto.Signature} returns this + */ proto.crypto.Signature.prototype.setCurvetype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -640,9 +679,12 @@ proto.crypto.Signature.prototype.getSignature_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.crypto.Signature} returns this + */ proto.crypto.Signature.prototype.setSignature = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; diff --git a/js/proto/dump_pb.d.ts b/js/proto/dump_pb.d.ts index 8ba2ff7de..769b75fe3 100644 --- a/js/proto/dump_pb.d.ts +++ b/js/proto/dump_pb.d.ts @@ -5,7 +5,7 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as acm_pb from "./acm_pb"; import * as exec_pb from "./exec_pb"; @@ -15,12 +15,12 @@ export class Storage extends jspb.Message { getKey(): Uint8Array | string; getKey_asU8(): Uint8Array; getKey_asB64(): string; - setKey(value: Uint8Array | string): void; + setKey(value: Uint8Array | string): Storage; getValue(): Uint8Array | string; getValue_asU8(): Uint8Array; getValue_asB64(): string; - setValue(value: Uint8Array | string): void; + setValue(value: Uint8Array | string): Storage; serializeBinary(): Uint8Array; @@ -44,11 +44,11 @@ export class AccountStorage extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): AccountStorage; clearStorageList(): void; getStorageList(): Array; - setStorageList(value: Array): void; + setStorageList(value: Array): AccountStorage; addStorage(value?: Storage, index?: number): Storage; @@ -71,22 +71,22 @@ export namespace AccountStorage { export class EVMEvent extends jspb.Message { getChainid(): string; - setChainid(value: string): void; + setChainid(value: string): EVMEvent; getIndex(): number; - setIndex(value: number): void; + setIndex(value: number): EVMEvent; hasTime(): boolean; clearTime(): void; getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): EVMEvent; hasEvent(): boolean; clearEvent(): void; getEvent(): exec_pb.LogEvent | undefined; - setEvent(value?: exec_pb.LogEvent): void; + setEvent(value?: exec_pb.LogEvent): EVMEvent; serializeBinary(): Uint8Array; @@ -110,31 +110,31 @@ export namespace EVMEvent { export class Dump extends jspb.Message { getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): Dump; hasAccount(): boolean; clearAccount(): void; getAccount(): acm_pb.Account | undefined; - setAccount(value?: acm_pb.Account): void; + setAccount(value?: acm_pb.Account): Dump; hasAccountstorage(): boolean; clearAccountstorage(): void; getAccountstorage(): AccountStorage | undefined; - setAccountstorage(value?: AccountStorage): void; + setAccountstorage(value?: AccountStorage): Dump; hasEvmevent(): boolean; clearEvmevent(): void; getEvmevent(): EVMEvent | undefined; - setEvmevent(value?: EVMEvent): void; + setEvmevent(value?: EVMEvent): Dump; hasName(): boolean; clearName(): void; getName(): names_pb.Entry | undefined; - setName(value?: names_pb.Entry): void; + setName(value?: names_pb.Entry): Dump; serializeBinary(): Uint8Array; diff --git a/js/proto/dump_pb.js b/js/proto/dump_pb.js index 0bded5f28..0b0f5c4b5 100644 --- a/js/proto/dump_pb.js +++ b/js/proto/dump_pb.js @@ -1,3 +1,4 @@ +// source: dump.proto /** * @fileoverview * @enhanceable @@ -6,13 +7,15 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); var acm_pb = require('./acm_pb.js'); @@ -25,7 +28,6 @@ goog.exportSymbol('proto.dump.AccountStorage', null, global); goog.exportSymbol('proto.dump.Dump', null, global); goog.exportSymbol('proto.dump.EVMEvent', null, global); goog.exportSymbol('proto.dump.Storage', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -41,19 +43,89 @@ proto.dump.Storage = function(opt_data) { }; goog.inherits(proto.dump.Storage, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.dump.Storage.displayName = 'proto.dump.Storage'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.dump.AccountStorage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.dump.AccountStorage.repeatedFields_, null); +}; +goog.inherits(proto.dump.AccountStorage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.dump.AccountStorage.displayName = 'proto.dump.AccountStorage'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.dump.EVMEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.dump.EVMEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.dump.EVMEvent.displayName = 'proto.dump.EVMEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.dump.Dump = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.dump.Dump, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.dump.Dump.displayName = 'proto.dump.Dump'; +} + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.dump.Storage.prototype.toObject = function(opt_includeInstance) { @@ -63,8 +135,8 @@ proto.dump.Storage.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.Storage} msg The msg instance to transform. * @return {!Object} @@ -197,9 +269,12 @@ proto.dump.Storage.prototype.getKey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.dump.Storage} returns this + */ proto.dump.Storage.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -236,30 +311,16 @@ proto.dump.Storage.prototype.getValue_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.dump.Storage} returns this + */ proto.dump.Storage.prototype.setValue = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.dump.AccountStorage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.dump.AccountStorage.repeatedFields_, null); -}; -goog.inherits(proto.dump.AccountStorage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.dump.AccountStorage.displayName = 'proto.dump.AccountStorage'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -271,13 +332,15 @@ proto.dump.AccountStorage.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.dump.AccountStorage.prototype.toObject = function(opt_includeInstance) { @@ -287,8 +350,8 @@ proto.dump.AccountStorage.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.AccountStorage} msg The msg instance to transform. * @return {!Object} @@ -424,9 +487,12 @@ proto.dump.AccountStorage.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.dump.AccountStorage} returns this + */ proto.dump.AccountStorage.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -440,9 +506,12 @@ proto.dump.AccountStorage.prototype.getStorageList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.dump.AccountStorage} returns this +*/ proto.dump.AccountStorage.prototype.setStorageList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -456,40 +525,29 @@ proto.dump.AccountStorage.prototype.addStorage = function(opt_value, opt_index) }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.dump.AccountStorage} returns this + */ proto.dump.AccountStorage.prototype.clearStorageList = function() { - this.setStorageList([]); + return this.setStorageList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.dump.EVMEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.dump.EVMEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.dump.EVMEvent.displayName = 'proto.dump.EVMEvent'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.dump.EVMEvent.prototype.toObject = function(opt_includeInstance) { @@ -499,8 +557,8 @@ proto.dump.EVMEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.EVMEvent} msg The msg instance to transform. * @return {!Object} @@ -637,9 +695,12 @@ proto.dump.EVMEvent.prototype.getChainid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.dump.EVMEvent} returns this + */ proto.dump.EVMEvent.prototype.setChainid = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -652,9 +713,12 @@ proto.dump.EVMEvent.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.dump.EVMEvent} returns this + */ proto.dump.EVMEvent.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -668,14 +732,21 @@ proto.dump.EVMEvent.prototype.getTime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.dump.EVMEvent} returns this +*/ proto.dump.EVMEvent.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.dump.EVMEvent} returns this + */ proto.dump.EVMEvent.prototype.clearTime = function() { - this.setTime(undefined); + return this.setTime(undefined); }; @@ -698,14 +769,21 @@ proto.dump.EVMEvent.prototype.getEvent = function() { }; -/** @param {?proto.exec.LogEvent|undefined} value */ +/** + * @param {?proto.exec.LogEvent|undefined} value + * @return {!proto.dump.EVMEvent} returns this +*/ proto.dump.EVMEvent.prototype.setEvent = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.dump.EVMEvent} returns this + */ proto.dump.EVMEvent.prototype.clearEvent = function() { - this.setEvent(undefined); + return this.setEvent(undefined); }; @@ -719,34 +797,19 @@ proto.dump.EVMEvent.prototype.hasEvent = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.dump.Dump = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.dump.Dump, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.dump.Dump.displayName = 'proto.dump.Dump'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.dump.Dump.prototype.toObject = function(opt_includeInstance) { @@ -756,8 +819,8 @@ proto.dump.Dump.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.dump.Dump} msg The msg instance to transform. * @return {!Object} @@ -910,9 +973,12 @@ proto.dump.Dump.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.dump.Dump} returns this + */ proto.dump.Dump.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -926,14 +992,21 @@ proto.dump.Dump.prototype.getAccount = function() { }; -/** @param {?proto.acm.Account|undefined} value */ +/** + * @param {?proto.acm.Account|undefined} value + * @return {!proto.dump.Dump} returns this +*/ proto.dump.Dump.prototype.setAccount = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.dump.Dump} returns this + */ proto.dump.Dump.prototype.clearAccount = function() { - this.setAccount(undefined); + return this.setAccount(undefined); }; @@ -956,14 +1029,21 @@ proto.dump.Dump.prototype.getAccountstorage = function() { }; -/** @param {?proto.dump.AccountStorage|undefined} value */ +/** + * @param {?proto.dump.AccountStorage|undefined} value + * @return {!proto.dump.Dump} returns this +*/ proto.dump.Dump.prototype.setAccountstorage = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.dump.Dump} returns this + */ proto.dump.Dump.prototype.clearAccountstorage = function() { - this.setAccountstorage(undefined); + return this.setAccountstorage(undefined); }; @@ -986,14 +1066,21 @@ proto.dump.Dump.prototype.getEvmevent = function() { }; -/** @param {?proto.dump.EVMEvent|undefined} value */ +/** + * @param {?proto.dump.EVMEvent|undefined} value + * @return {!proto.dump.Dump} returns this +*/ proto.dump.Dump.prototype.setEvmevent = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.dump.Dump} returns this + */ proto.dump.Dump.prototype.clearEvmevent = function() { - this.setEvmevent(undefined); + return this.setEvmevent(undefined); }; @@ -1016,14 +1103,21 @@ proto.dump.Dump.prototype.getName = function() { }; -/** @param {?proto.names.Entry|undefined} value */ +/** + * @param {?proto.names.Entry|undefined} value + * @return {!proto.dump.Dump} returns this +*/ proto.dump.Dump.prototype.setName = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.dump.Dump} returns this + */ proto.dump.Dump.prototype.clearName = function() { - this.setName(undefined); + return this.setName(undefined); }; diff --git a/js/proto/encoding_pb.d.ts b/js/proto/encoding_pb.d.ts index d9cdffe6b..ed0c75546 100644 --- a/js/proto/encoding_pb.d.ts +++ b/js/proto/encoding_pb.d.ts @@ -5,14 +5,14 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; export class TestMessage extends jspb.Message { getType(): number; - setType(value: number): void; + setType(value: number): TestMessage; getAmount(): number; - setAmount(value: number): void; + setAmount(value: number): TestMessage; serializeBinary(): Uint8Array; diff --git a/js/proto/encoding_pb.js b/js/proto/encoding_pb.js index 79fce7b1b..96507c900 100644 --- a/js/proto/encoding_pb.js +++ b/js/proto/encoding_pb.js @@ -1,3 +1,4 @@ +// source: encoding.proto /** * @fileoverview * @enhanceable @@ -6,15 +7,16 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.encoding.TestMessage', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,19 +32,26 @@ proto.encoding.TestMessage = function(opt_data) { }; goog.inherits(proto.encoding.TestMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.encoding.TestMessage.displayName = 'proto.encoding.TestMessage'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.encoding.TestMessage.prototype.toObject = function(opt_includeInstance) { @@ -52,8 +61,8 @@ proto.encoding.TestMessage.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.encoding.TestMessage} msg The msg instance to transform. * @return {!Object} @@ -162,9 +171,12 @@ proto.encoding.TestMessage.prototype.getType = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.encoding.TestMessage} returns this + */ proto.encoding.TestMessage.prototype.setType = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -177,9 +189,12 @@ proto.encoding.TestMessage.prototype.getAmount = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.encoding.TestMessage} returns this + */ proto.encoding.TestMessage.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/js/proto/errors_pb.d.ts b/js/proto/errors_pb.d.ts index a3ee086e1..f235786bb 100644 --- a/js/proto/errors_pb.d.ts +++ b/js/proto/errors_pb.d.ts @@ -5,14 +5,14 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; export class Exception extends jspb.Message { getCode(): number; - setCode(value: number): void; + setCode(value: number): Exception; getException(): string; - setException(value: string): void; + setException(value: string): Exception; serializeBinary(): Uint8Array; diff --git a/js/proto/errors_pb.js b/js/proto/errors_pb.js index fe2c98e30..3f90948ed 100644 --- a/js/proto/errors_pb.js +++ b/js/proto/errors_pb.js @@ -1,3 +1,4 @@ +// source: errors.proto /** * @fileoverview * @enhanceable @@ -6,15 +7,16 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.errors.Exception', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,19 +32,26 @@ proto.errors.Exception = function(opt_data) { }; goog.inherits(proto.errors.Exception, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.errors.Exception.displayName = 'proto.errors.Exception'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.errors.Exception.prototype.toObject = function(opt_includeInstance) { @@ -52,8 +61,8 @@ proto.errors.Exception.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.errors.Exception} msg The msg instance to transform. * @return {!Object} @@ -162,9 +171,12 @@ proto.errors.Exception.prototype.getCode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.errors.Exception} returns this + */ proto.errors.Exception.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -177,9 +189,12 @@ proto.errors.Exception.prototype.getException = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.errors.Exception} returns this + */ proto.errors.Exception.prototype.setException = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; diff --git a/js/proto/exec_pb.d.ts b/js/proto/exec_pb.d.ts index 301f4b770..2bd02ece7 100644 --- a/js/proto/exec_pb.d.ts +++ b/js/proto/exec_pb.d.ts @@ -5,8 +5,8 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; -import * as github_com_tendermint_tendermint_abci_types_types_pb from "./github.com/tendermint/tendermint/abci/types/types_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; +import * as tendermint_types_types_pb from "./tendermint/types/types_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as errors_pb from "./errors_pb"; import * as names_pb from "./names_pb"; @@ -17,7 +17,7 @@ import * as spec_pb from "./spec_pb"; export class StreamEvents extends jspb.Message { clearStreameventsList(): void; getStreameventsList(): Array; - setStreameventsList(value: Array): void; + setStreameventsList(value: Array): StreamEvents; addStreamevents(value?: StreamEvent, index?: number): StreamEvent; @@ -42,37 +42,37 @@ export class StreamEvent extends jspb.Message { hasBeginblock(): boolean; clearBeginblock(): void; getBeginblock(): BeginBlock | undefined; - setBeginblock(value?: BeginBlock): void; + setBeginblock(value?: BeginBlock): StreamEvent; hasBegintx(): boolean; clearBegintx(): void; getBegintx(): BeginTx | undefined; - setBegintx(value?: BeginTx): void; + setBegintx(value?: BeginTx): StreamEvent; hasEnvelope(): boolean; clearEnvelope(): void; getEnvelope(): txs_pb.Envelope | undefined; - setEnvelope(value?: txs_pb.Envelope): void; + setEnvelope(value?: txs_pb.Envelope): StreamEvent; hasEvent(): boolean; clearEvent(): void; getEvent(): Event | undefined; - setEvent(value?: Event): void; + setEvent(value?: Event): StreamEvent; hasEndtx(): boolean; clearEndtx(): void; getEndtx(): EndTx | undefined; - setEndtx(value?: EndTx): void; + setEndtx(value?: EndTx): StreamEvent; hasEndblock(): boolean; clearEndblock(): void; getEndblock(): EndBlock | undefined; - setEndblock(value?: EndBlock): void; + setEndblock(value?: EndBlock): StreamEvent; serializeBinary(): Uint8Array; @@ -98,19 +98,19 @@ export namespace StreamEvent { export class BeginBlock extends jspb.Message { getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): BeginBlock; getNumtxs(): number; - setNumtxs(value: number): void; + setNumtxs(value: number): BeginBlock; getPredecessorheight(): number; - setPredecessorheight(value: number): void; + setPredecessorheight(value: number): BeginBlock; hasHeader(): boolean; clearHeader(): void; - getHeader(): github_com_tendermint_tendermint_abci_types_types_pb.Header | undefined; - setHeader(value?: github_com_tendermint_tendermint_abci_types_types_pb.Header): void; + getHeader(): tendermint_types_types_pb.Header | undefined; + setHeader(value?: tendermint_types_types_pb.Header): BeginBlock; serializeBinary(): Uint8Array; @@ -128,13 +128,13 @@ export namespace BeginBlock { height: number, numtxs: number, predecessorheight: number, - header?: github_com_tendermint_tendermint_abci_types_types_pb.Header.AsObject, + header?: tendermint_types_types_pb.Header.AsObject, } } export class EndBlock extends jspb.Message { getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): EndBlock; serializeBinary(): Uint8Array; @@ -158,22 +158,22 @@ export class BeginTx extends jspb.Message { hasTxheader(): boolean; clearTxheader(): void; getTxheader(): TxHeader | undefined; - setTxheader(value?: TxHeader): void; + setTxheader(value?: TxHeader): BeginTx; getNumevents(): number; - setNumevents(value: number): void; + setNumevents(value: number): BeginTx; hasResult(): boolean; clearResult(): void; getResult(): Result | undefined; - setResult(value?: Result): void; + setResult(value?: Result): BeginTx; hasException(): boolean; clearException(): void; getException(): errors_pb.Exception | undefined; - setException(value?: errors_pb.Exception): void; + setException(value?: errors_pb.Exception): BeginTx; serializeBinary(): Uint8Array; @@ -199,7 +199,7 @@ export class EndTx extends jspb.Message { getTxhash(): Uint8Array | string; getTxhash_asU8(): Uint8Array; getTxhash_asB64(): string; - setTxhash(value: Uint8Array | string): void; + setTxhash(value: Uint8Array | string): EndTx; serializeBinary(): Uint8Array; @@ -220,24 +220,24 @@ export namespace EndTx { export class TxHeader extends jspb.Message { getTxtype(): number; - setTxtype(value: number): void; + setTxtype(value: number): TxHeader; getTxhash(): Uint8Array | string; getTxhash_asU8(): Uint8Array; getTxhash_asB64(): string; - setTxhash(value: Uint8Array | string): void; + setTxhash(value: Uint8Array | string): TxHeader; getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): TxHeader; getIndex(): number; - setIndex(value: number): void; + setIndex(value: number): TxHeader; hasOrigin(): boolean; clearOrigin(): void; getOrigin(): Origin | undefined; - setOrigin(value?: Origin): void; + setOrigin(value?: Origin): TxHeader; serializeBinary(): Uint8Array; @@ -262,20 +262,20 @@ export namespace TxHeader { export class BlockExecution extends jspb.Message { getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): BlockExecution; getPredecessorheight(): number; - setPredecessorheight(value: number): void; + setPredecessorheight(value: number): BlockExecution; hasHeader(): boolean; clearHeader(): void; - getHeader(): github_com_tendermint_tendermint_abci_types_types_pb.Header | undefined; - setHeader(value?: github_com_tendermint_tendermint_abci_types_types_pb.Header): void; + getHeader(): tendermint_types_types_pb.Header | undefined; + setHeader(value?: tendermint_types_types_pb.Header): BlockExecution; clearTxexecutionsList(): void; getTxexecutionsList(): Array; - setTxexecutionsList(value: Array): void; + setTxexecutionsList(value: Array): BlockExecution; addTxexecutions(value?: TxExecution, index?: number): TxExecution; @@ -293,17 +293,17 @@ export namespace BlockExecution { export type AsObject = { height: number, predecessorheight: number, - header?: github_com_tendermint_tendermint_abci_types_types_pb.Header.AsObject, + header?: tendermint_types_types_pb.Header.AsObject, txexecutionsList: Array, } } export class TxExecutionKey extends jspb.Message { getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): TxExecutionKey; getOffset(): number; - setOffset(value: number): void; + setOffset(value: number): TxExecutionKey; serializeBinary(): Uint8Array; @@ -328,40 +328,40 @@ export class TxExecution extends jspb.Message { hasHeader(): boolean; clearHeader(): void; getHeader(): TxHeader | undefined; - setHeader(value?: TxHeader): void; + setHeader(value?: TxHeader): TxExecution; hasEnvelope(): boolean; clearEnvelope(): void; getEnvelope(): txs_pb.Envelope | undefined; - setEnvelope(value?: txs_pb.Envelope): void; + setEnvelope(value?: txs_pb.Envelope): TxExecution; clearEventsList(): void; getEventsList(): Array; - setEventsList(value: Array): void; + setEventsList(value: Array): TxExecution; addEvents(value?: Event, index?: number): Event; hasResult(): boolean; clearResult(): void; getResult(): Result | undefined; - setResult(value?: Result): void; + setResult(value?: Result): TxExecution; hasReceipt(): boolean; clearReceipt(): void; getReceipt(): txs_pb.Receipt | undefined; - setReceipt(value?: txs_pb.Receipt): void; + setReceipt(value?: txs_pb.Receipt): TxExecution; hasException(): boolean; clearException(): void; getException(): errors_pb.Exception | undefined; - setException(value?: errors_pb.Exception): void; + setException(value?: errors_pb.Exception): TxExecution; clearTxexecutionsList(): void; getTxexecutionsList(): Array; - setTxexecutionsList(value: Array): void; + setTxexecutionsList(value: Array): TxExecution; addTxexecutions(value?: TxExecution, index?: number): TxExecution; @@ -389,19 +389,19 @@ export namespace TxExecution { export class Origin extends jspb.Message { getChainid(): string; - setChainid(value: string): void; + setChainid(value: string): Origin; getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): Origin; getIndex(): number; - setIndex(value: number): void; + setIndex(value: number): Origin; hasTime(): boolean; clearTime(): void; getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): Origin; serializeBinary(): Uint8Array; @@ -425,30 +425,30 @@ export namespace Origin { export class Header extends jspb.Message { getTxtype(): number; - setTxtype(value: number): void; + setTxtype(value: number): Header; getTxhash(): Uint8Array | string; getTxhash_asU8(): Uint8Array; getTxhash_asB64(): string; - setTxhash(value: Uint8Array | string): void; + setTxhash(value: Uint8Array | string): Header; getEventtype(): number; - setEventtype(value: number): void; + setEventtype(value: number): Header; getEventid(): string; - setEventid(value: string): void; + setEventid(value: string): Header; getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): Header; getIndex(): number; - setIndex(value: number): void; + setIndex(value: number): Header; hasException(): boolean; clearException(): void; getException(): errors_pb.Exception | undefined; - setException(value?: errors_pb.Exception): void; + setException(value?: errors_pb.Exception): Header; serializeBinary(): Uint8Array; @@ -478,37 +478,37 @@ export class Event extends jspb.Message { hasHeader(): boolean; clearHeader(): void; getHeader(): Header | undefined; - setHeader(value?: Header): void; + setHeader(value?: Header): Event; hasInput(): boolean; clearInput(): void; getInput(): InputEvent | undefined; - setInput(value?: InputEvent): void; + setInput(value?: InputEvent): Event; hasOutput(): boolean; clearOutput(): void; getOutput(): OutputEvent | undefined; - setOutput(value?: OutputEvent): void; + setOutput(value?: OutputEvent): Event; hasCall(): boolean; clearCall(): void; getCall(): CallEvent | undefined; - setCall(value?: CallEvent): void; + setCall(value?: CallEvent): Event; hasLog(): boolean; clearLog(): void; getLog(): LogEvent | undefined; - setLog(value?: LogEvent): void; + setLog(value?: LogEvent): Event; hasGovernaccount(): boolean; clearGovernaccount(): void; getGovernaccount(): GovernAccountEvent | undefined; - setGovernaccount(value?: GovernAccountEvent): void; + setGovernaccount(value?: GovernAccountEvent): Event; serializeBinary(): Uint8Array; @@ -536,22 +536,22 @@ export class Result extends jspb.Message { getReturn(): Uint8Array | string; getReturn_asU8(): Uint8Array; getReturn_asB64(): string; - setReturn(value: Uint8Array | string): void; + setReturn(value: Uint8Array | string): Result; getGasused(): number; - setGasused(value: number): void; + setGasused(value: number): Result; hasNameentry(): boolean; clearNameentry(): void; getNameentry(): names_pb.Entry | undefined; - setNameentry(value?: names_pb.Entry): void; + setNameentry(value?: names_pb.Entry): Result; hasPermargs(): boolean; clearPermargs(): void; getPermargs(): permission_pb.PermArgs | undefined; - setPermargs(value?: permission_pb.PermArgs): void; + setPermargs(value?: permission_pb.PermArgs): Result; serializeBinary(): Uint8Array; @@ -577,18 +577,18 @@ export class LogEvent extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): LogEvent; getData(): Uint8Array | string; getData_asU8(): Uint8Array; getData_asB64(): string; - setData(value: Uint8Array | string): void; + setData(value: Uint8Array | string): LogEvent; clearTopicsList(): void; getTopicsList(): Array; getTopicsList_asU8(): Array; getTopicsList_asB64(): Array; - setTopicsList(value: Array): void; + setTopicsList(value: Array): LogEvent; addTopics(value: Uint8Array | string, index?: number): Uint8Array | string; @@ -612,26 +612,26 @@ export namespace LogEvent { export class CallEvent extends jspb.Message { getCalltype(): number; - setCalltype(value: number): void; + setCalltype(value: number): CallEvent; hasCalldata(): boolean; clearCalldata(): void; getCalldata(): CallData | undefined; - setCalldata(value?: CallData): void; + setCalldata(value?: CallData): CallEvent; getOrigin(): Uint8Array | string; getOrigin_asU8(): Uint8Array; getOrigin_asB64(): string; - setOrigin(value: Uint8Array | string): void; + setOrigin(value: Uint8Array | string): CallEvent; getStackdepth(): number; - setStackdepth(value: number): void; + setStackdepth(value: number): CallEvent; getReturn(): Uint8Array | string; getReturn_asU8(): Uint8Array; getReturn_asB64(): string; - setReturn(value: Uint8Array | string): void; + setReturn(value: Uint8Array | string): CallEvent; serializeBinary(): Uint8Array; @@ -659,7 +659,7 @@ export class GovernAccountEvent extends jspb.Message { hasAccountupdate(): boolean; clearAccountupdate(): void; getAccountupdate(): spec_pb.TemplateAccount | undefined; - setAccountupdate(value?: spec_pb.TemplateAccount): void; + setAccountupdate(value?: spec_pb.TemplateAccount): GovernAccountEvent; serializeBinary(): Uint8Array; @@ -682,7 +682,7 @@ export class InputEvent extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): InputEvent; serializeBinary(): Uint8Array; @@ -705,7 +705,7 @@ export class OutputEvent extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): OutputEvent; serializeBinary(): Uint8Array; @@ -728,23 +728,23 @@ export class CallData extends jspb.Message { getCaller(): Uint8Array | string; getCaller_asU8(): Uint8Array; getCaller_asB64(): string; - setCaller(value: Uint8Array | string): void; + setCaller(value: Uint8Array | string): CallData; getCallee(): Uint8Array | string; getCallee_asU8(): Uint8Array; getCallee_asB64(): string; - setCallee(value: Uint8Array | string): void; + setCallee(value: Uint8Array | string): CallData; getData(): Uint8Array | string; getData_asU8(): Uint8Array; getData_asB64(): string; - setData(value: Uint8Array | string): void; + setData(value: Uint8Array | string): CallData; getValue(): number; - setValue(value: number): void; + setValue(value: number): CallData; getGas(): number; - setGas(value: number): void; + setGas(value: number): CallData; serializeBinary(): Uint8Array; diff --git a/js/proto/exec_pb.js b/js/proto/exec_pb.js index a91541bb9..a49aca83c 100644 --- a/js/proto/exec_pb.js +++ b/js/proto/exec_pb.js @@ -1,3 +1,4 @@ +// source: exec.proto /** * @fileoverview * @enhanceable @@ -6,15 +7,17 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); -var github_com_tendermint_tendermint_abci_types_types_pb = require('./github.com/tendermint/tendermint/abci/types/types_pb.js'); -goog.object.extend(proto, github_com_tendermint_tendermint_abci_types_types_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var tendermint_types_types_pb = require('./tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); var errors_pb = require('./errors_pb.js'); @@ -47,7 +50,6 @@ goog.exportSymbol('proto.exec.StreamEvents', null, global); goog.exportSymbol('proto.exec.TxExecution', null, global); goog.exportSymbol('proto.exec.TxExecutionKey', null, global); goog.exportSymbol('proto.exec.TxHeader', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -63,8 +65,412 @@ proto.exec.StreamEvents = function(opt_data) { }; goog.inherits(proto.exec.StreamEvents, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.exec.StreamEvents.displayName = 'proto.exec.StreamEvents'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.StreamEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.StreamEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.StreamEvent.displayName = 'proto.exec.StreamEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.BeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.BeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.BeginBlock.displayName = 'proto.exec.BeginBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.EndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.EndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.EndBlock.displayName = 'proto.exec.EndBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.BeginTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.BeginTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.BeginTx.displayName = 'proto.exec.BeginTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.EndTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.EndTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.EndTx.displayName = 'proto.exec.EndTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.TxHeader = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.TxHeader, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.TxHeader.displayName = 'proto.exec.TxHeader'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.BlockExecution = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.BlockExecution.repeatedFields_, null); +}; +goog.inherits(proto.exec.BlockExecution, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.BlockExecution.displayName = 'proto.exec.BlockExecution'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.TxExecutionKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.TxExecutionKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.TxExecutionKey.displayName = 'proto.exec.TxExecutionKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.TxExecution = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.TxExecution.repeatedFields_, null); +}; +goog.inherits(proto.exec.TxExecution, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.TxExecution.displayName = 'proto.exec.TxExecution'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.Origin = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.Origin, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.Origin.displayName = 'proto.exec.Origin'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.Header.displayName = 'proto.exec.Header'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.Event = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.Event, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.Event.displayName = 'proto.exec.Event'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.Result = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.Result, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.Result.displayName = 'proto.exec.Result'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.LogEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.LogEvent.repeatedFields_, null); +}; +goog.inherits(proto.exec.LogEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.LogEvent.displayName = 'proto.exec.LogEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.CallEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.CallEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.CallEvent.displayName = 'proto.exec.CallEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.GovernAccountEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.GovernAccountEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.GovernAccountEvent.displayName = 'proto.exec.GovernAccountEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.InputEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.InputEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.InputEvent.displayName = 'proto.exec.InputEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.OutputEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.OutputEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.OutputEvent.displayName = 'proto.exec.OutputEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.CallData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.CallData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.CallData.displayName = 'proto.exec.CallData'; +} + /** * List of repeated fields within this message type. * @private {!Array} @@ -76,13 +482,15 @@ proto.exec.StreamEvents.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.StreamEvents.prototype.toObject = function(opt_includeInstance) { @@ -92,8 +500,8 @@ proto.exec.StreamEvents.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.StreamEvents} msg The msg instance to transform. * @return {!Object} @@ -194,9 +602,12 @@ proto.exec.StreamEvents.prototype.getStreameventsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.exec.StreamEvents} returns this +*/ proto.exec.StreamEvents.prototype.setStreameventsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -210,40 +621,29 @@ proto.exec.StreamEvents.prototype.addStreamevents = function(opt_value, opt_inde }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.exec.StreamEvents} returns this + */ proto.exec.StreamEvents.prototype.clearStreameventsList = function() { - this.setStreameventsList([]); + return this.setStreameventsList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.StreamEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.StreamEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.StreamEvent.displayName = 'proto.exec.StreamEvent'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.StreamEvent.prototype.toObject = function(opt_includeInstance) { @@ -253,8 +653,8 @@ proto.exec.StreamEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.StreamEvent} msg The msg instance to transform. * @return {!Object} @@ -424,14 +824,21 @@ proto.exec.StreamEvent.prototype.getBeginblock = function() { }; -/** @param {?proto.exec.BeginBlock|undefined} value */ +/** + * @param {?proto.exec.BeginBlock|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setBeginblock = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this + */ proto.exec.StreamEvent.prototype.clearBeginblock = function() { - this.setBeginblock(undefined); + return this.setBeginblock(undefined); }; @@ -454,14 +861,21 @@ proto.exec.StreamEvent.prototype.getBegintx = function() { }; -/** @param {?proto.exec.BeginTx|undefined} value */ +/** + * @param {?proto.exec.BeginTx|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setBegintx = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this + */ proto.exec.StreamEvent.prototype.clearBegintx = function() { - this.setBegintx(undefined); + return this.setBegintx(undefined); }; @@ -484,14 +898,21 @@ proto.exec.StreamEvent.prototype.getEnvelope = function() { }; -/** @param {?proto.txs.Envelope|undefined} value */ +/** + * @param {?proto.txs.Envelope|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setEnvelope = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this + */ proto.exec.StreamEvent.prototype.clearEnvelope = function() { - this.setEnvelope(undefined); + return this.setEnvelope(undefined); }; @@ -514,14 +935,21 @@ proto.exec.StreamEvent.prototype.getEvent = function() { }; -/** @param {?proto.exec.Event|undefined} value */ +/** + * @param {?proto.exec.Event|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setEvent = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this + */ proto.exec.StreamEvent.prototype.clearEvent = function() { - this.setEvent(undefined); + return this.setEvent(undefined); }; @@ -544,14 +972,21 @@ proto.exec.StreamEvent.prototype.getEndtx = function() { }; -/** @param {?proto.exec.EndTx|undefined} value */ +/** + * @param {?proto.exec.EndTx|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setEndtx = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this + */ proto.exec.StreamEvent.prototype.clearEndtx = function() { - this.setEndtx(undefined); + return this.setEndtx(undefined); }; @@ -574,14 +1009,21 @@ proto.exec.StreamEvent.prototype.getEndblock = function() { }; -/** @param {?proto.exec.EndBlock|undefined} value */ +/** + * @param {?proto.exec.EndBlock|undefined} value + * @return {!proto.exec.StreamEvent} returns this +*/ proto.exec.StreamEvent.prototype.setEndblock = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.StreamEvent} returns this + */ proto.exec.StreamEvent.prototype.clearEndblock = function() { - this.setEndblock(undefined); + return this.setEndblock(undefined); }; @@ -595,34 +1037,19 @@ proto.exec.StreamEvent.prototype.hasEndblock = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.BeginBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.BeginBlock, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.BeginBlock.displayName = 'proto.exec.BeginBlock'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.BeginBlock.prototype.toObject = function(opt_includeInstance) { @@ -632,8 +1059,8 @@ proto.exec.BeginBlock.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.BeginBlock} msg The msg instance to transform. * @return {!Object} @@ -644,7 +1071,7 @@ proto.exec.BeginBlock.toObject = function(includeInstance, msg) { height: jspb.Message.getFieldWithDefault(msg, 1, 0), numtxs: jspb.Message.getFieldWithDefault(msg, 3, 0), predecessorheight: jspb.Message.getFieldWithDefault(msg, 4, 0), - header: (f = msg.getHeader()) && github_com_tendermint_tendermint_abci_types_types_pb.Header.toObject(includeInstance, f) + header: (f = msg.getHeader()) && tendermint_types_types_pb.Header.toObject(includeInstance, f) }; if (includeInstance) { @@ -694,8 +1121,8 @@ proto.exec.BeginBlock.deserializeBinaryFromReader = function(msg, reader) { msg.setPredecessorheight(value); break; case 2: - var value = new github_com_tendermint_tendermint_abci_types_types_pb.Header; - reader.readMessage(value,github_com_tendermint_tendermint_abci_types_types_pb.Header.deserializeBinaryFromReader); + var value = new tendermint_types_types_pb.Header; + reader.readMessage(value,tendermint_types_types_pb.Header.deserializeBinaryFromReader); msg.setHeader(value); break; default: @@ -753,7 +1180,7 @@ proto.exec.BeginBlock.serializeBinaryToWriter = function(message, writer) { writer.writeMessage( 2, f, - github_com_tendermint_tendermint_abci_types_types_pb.Header.serializeBinaryToWriter + tendermint_types_types_pb.Header.serializeBinaryToWriter ); } }; @@ -768,9 +1195,12 @@ proto.exec.BeginBlock.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.BeginBlock} returns this + */ proto.exec.BeginBlock.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -783,9 +1213,12 @@ proto.exec.BeginBlock.prototype.getNumtxs = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.BeginBlock} returns this + */ proto.exec.BeginBlock.prototype.setNumtxs = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -798,30 +1231,40 @@ proto.exec.BeginBlock.prototype.getPredecessorheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.BeginBlock} returns this + */ proto.exec.BeginBlock.prototype.setPredecessorheight = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional types.Header Header = 2; - * @return {?proto.types.Header} + * optional tendermint.types.Header Header = 2; + * @return {?proto.tendermint.types.Header} */ proto.exec.BeginBlock.prototype.getHeader = function() { - return /** @type{?proto.types.Header} */ ( - jspb.Message.getWrapperField(this, github_com_tendermint_tendermint_abci_types_types_pb.Header, 2)); + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Header, 2)); }; -/** @param {?proto.types.Header|undefined} value */ +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.exec.BeginBlock} returns this +*/ proto.exec.BeginBlock.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.BeginBlock} returns this + */ proto.exec.BeginBlock.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -835,34 +1278,19 @@ proto.exec.BeginBlock.prototype.hasHeader = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.EndBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.EndBlock, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.EndBlock.displayName = 'proto.exec.EndBlock'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.EndBlock.prototype.toObject = function(opt_includeInstance) { @@ -872,8 +1300,8 @@ proto.exec.EndBlock.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.EndBlock} msg The msg instance to transform. * @return {!Object} @@ -970,41 +1398,29 @@ proto.exec.EndBlock.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.EndBlock} returns this + */ proto.exec.EndBlock.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.BeginTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.BeginTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.BeginTx.displayName = 'proto.exec.BeginTx'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.BeginTx.prototype.toObject = function(opt_includeInstance) { @@ -1014,8 +1430,8 @@ proto.exec.BeginTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.BeginTx} msg The msg instance to transform. * @return {!Object} @@ -1155,14 +1571,21 @@ proto.exec.BeginTx.prototype.getTxheader = function() { }; -/** @param {?proto.exec.TxHeader|undefined} value */ +/** + * @param {?proto.exec.TxHeader|undefined} value + * @return {!proto.exec.BeginTx} returns this +*/ proto.exec.BeginTx.prototype.setTxheader = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.BeginTx} returns this + */ proto.exec.BeginTx.prototype.clearTxheader = function() { - this.setTxheader(undefined); + return this.setTxheader(undefined); }; @@ -1184,9 +1607,12 @@ proto.exec.BeginTx.prototype.getNumevents = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.BeginTx} returns this + */ proto.exec.BeginTx.prototype.setNumevents = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -1200,14 +1626,21 @@ proto.exec.BeginTx.prototype.getResult = function() { }; -/** @param {?proto.exec.Result|undefined} value */ +/** + * @param {?proto.exec.Result|undefined} value + * @return {!proto.exec.BeginTx} returns this +*/ proto.exec.BeginTx.prototype.setResult = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.BeginTx} returns this + */ proto.exec.BeginTx.prototype.clearResult = function() { - this.setResult(undefined); + return this.setResult(undefined); }; @@ -1230,14 +1663,21 @@ proto.exec.BeginTx.prototype.getException = function() { }; -/** @param {?proto.errors.Exception|undefined} value */ +/** + * @param {?proto.errors.Exception|undefined} value + * @return {!proto.exec.BeginTx} returns this +*/ proto.exec.BeginTx.prototype.setException = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.BeginTx} returns this + */ proto.exec.BeginTx.prototype.clearException = function() { - this.setException(undefined); + return this.setException(undefined); }; @@ -1251,34 +1691,19 @@ proto.exec.BeginTx.prototype.hasException = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.EndTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.EndTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.EndTx.displayName = 'proto.exec.EndTx'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.EndTx.prototype.toObject = function(opt_includeInstance) { @@ -1288,8 +1713,8 @@ proto.exec.EndTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.EndTx} msg The msg instance to transform. * @return {!Object} @@ -1410,41 +1835,29 @@ proto.exec.EndTx.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.EndTx} returns this + */ proto.exec.EndTx.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.TxHeader = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.TxHeader, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.TxHeader.displayName = 'proto.exec.TxHeader'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.TxHeader.prototype.toObject = function(opt_includeInstance) { @@ -1454,8 +1867,8 @@ proto.exec.TxHeader.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.TxHeader} msg The msg instance to transform. * @return {!Object} @@ -1602,9 +2015,12 @@ proto.exec.TxHeader.prototype.getTxtype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.setTxtype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1641,9 +2057,12 @@ proto.exec.TxHeader.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -1656,9 +2075,12 @@ proto.exec.TxHeader.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1671,9 +2093,12 @@ proto.exec.TxHeader.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -1687,14 +2112,21 @@ proto.exec.TxHeader.prototype.getOrigin = function() { }; -/** @param {?proto.exec.Origin|undefined} value */ +/** + * @param {?proto.exec.Origin|undefined} value + * @return {!proto.exec.TxHeader} returns this +*/ proto.exec.TxHeader.prototype.setOrigin = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.TxHeader} returns this + */ proto.exec.TxHeader.prototype.clearOrigin = function() { - this.setOrigin(undefined); + return this.setOrigin(undefined); }; @@ -1708,23 +2140,6 @@ proto.exec.TxHeader.prototype.hasOrigin = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.BlockExecution = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.BlockExecution.repeatedFields_, null); -}; -goog.inherits(proto.exec.BlockExecution, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.BlockExecution.displayName = 'proto.exec.BlockExecution'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -1736,13 +2151,15 @@ proto.exec.BlockExecution.repeatedFields_ = [3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.BlockExecution.prototype.toObject = function(opt_includeInstance) { @@ -1752,8 +2169,8 @@ proto.exec.BlockExecution.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.BlockExecution} msg The msg instance to transform. * @return {!Object} @@ -1763,7 +2180,7 @@ proto.exec.BlockExecution.toObject = function(includeInstance, msg) { var f, obj = { height: jspb.Message.getFieldWithDefault(msg, 1, 0), predecessorheight: jspb.Message.getFieldWithDefault(msg, 4, 0), - header: (f = msg.getHeader()) && github_com_tendermint_tendermint_abci_types_types_pb.Header.toObject(includeInstance, f), + header: (f = msg.getHeader()) && tendermint_types_types_pb.Header.toObject(includeInstance, f), txexecutionsList: jspb.Message.toObjectList(msg.getTxexecutionsList(), proto.exec.TxExecution.toObject, includeInstance) }; @@ -1811,8 +2228,8 @@ proto.exec.BlockExecution.deserializeBinaryFromReader = function(msg, reader) { msg.setPredecessorheight(value); break; case 2: - var value = new github_com_tendermint_tendermint_abci_types_types_pb.Header; - reader.readMessage(value,github_com_tendermint_tendermint_abci_types_types_pb.Header.deserializeBinaryFromReader); + var value = new tendermint_types_types_pb.Header; + reader.readMessage(value,tendermint_types_types_pb.Header.deserializeBinaryFromReader); msg.setHeader(value); break; case 3: @@ -1868,7 +2285,7 @@ proto.exec.BlockExecution.serializeBinaryToWriter = function(message, writer) { writer.writeMessage( 2, f, - github_com_tendermint_tendermint_abci_types_types_pb.Header.serializeBinaryToWriter + tendermint_types_types_pb.Header.serializeBinaryToWriter ); } f = message.getTxexecutionsList(); @@ -1891,9 +2308,12 @@ proto.exec.BlockExecution.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.BlockExecution} returns this + */ proto.exec.BlockExecution.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1906,30 +2326,40 @@ proto.exec.BlockExecution.prototype.getPredecessorheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.BlockExecution} returns this + */ proto.exec.BlockExecution.prototype.setPredecessorheight = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional types.Header Header = 2; - * @return {?proto.types.Header} + * optional tendermint.types.Header Header = 2; + * @return {?proto.tendermint.types.Header} */ proto.exec.BlockExecution.prototype.getHeader = function() { - return /** @type{?proto.types.Header} */ ( - jspb.Message.getWrapperField(this, github_com_tendermint_tendermint_abci_types_types_pb.Header, 2)); + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Header, 2)); }; -/** @param {?proto.types.Header|undefined} value */ +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.exec.BlockExecution} returns this +*/ proto.exec.BlockExecution.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.BlockExecution} returns this + */ proto.exec.BlockExecution.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -1952,9 +2382,12 @@ proto.exec.BlockExecution.prototype.getTxexecutionsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.exec.BlockExecution} returns this +*/ proto.exec.BlockExecution.prototype.setTxexecutionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; @@ -1968,40 +2401,29 @@ proto.exec.BlockExecution.prototype.addTxexecutions = function(opt_value, opt_in }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.exec.BlockExecution} returns this + */ proto.exec.BlockExecution.prototype.clearTxexecutionsList = function() { - this.setTxexecutionsList([]); + return this.setTxexecutionsList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.TxExecutionKey = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.TxExecutionKey, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.TxExecutionKey.displayName = 'proto.exec.TxExecutionKey'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.TxExecutionKey.prototype.toObject = function(opt_includeInstance) { @@ -2011,8 +2433,8 @@ proto.exec.TxExecutionKey.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.TxExecutionKey} msg The msg instance to transform. * @return {!Object} @@ -2121,9 +2543,12 @@ proto.exec.TxExecutionKey.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxExecutionKey} returns this + */ proto.exec.TxExecutionKey.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2136,30 +2561,16 @@ proto.exec.TxExecutionKey.prototype.getOffset = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.TxExecutionKey} returns this + */ proto.exec.TxExecutionKey.prototype.setOffset = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.TxExecution = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.TxExecution.repeatedFields_, null); -}; -goog.inherits(proto.exec.TxExecution, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.TxExecution.displayName = 'proto.exec.TxExecution'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -2171,13 +2582,15 @@ proto.exec.TxExecution.repeatedFields_ = [7,11]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.TxExecution.prototype.toObject = function(opt_includeInstance) { @@ -2187,8 +2600,8 @@ proto.exec.TxExecution.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.TxExecution} msg The msg instance to transform. * @return {!Object} @@ -2374,14 +2787,21 @@ proto.exec.TxExecution.prototype.getHeader = function() { }; -/** @param {?proto.exec.TxHeader|undefined} value */ +/** + * @param {?proto.exec.TxHeader|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this + */ proto.exec.TxExecution.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -2404,14 +2824,21 @@ proto.exec.TxExecution.prototype.getEnvelope = function() { }; -/** @param {?proto.txs.Envelope|undefined} value */ +/** + * @param {?proto.txs.Envelope|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setEnvelope = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this + */ proto.exec.TxExecution.prototype.clearEnvelope = function() { - this.setEnvelope(undefined); + return this.setEnvelope(undefined); }; @@ -2434,9 +2861,12 @@ proto.exec.TxExecution.prototype.getEventsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setEventsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -2450,8 +2880,12 @@ proto.exec.TxExecution.prototype.addEvents = function(opt_value, opt_index) { }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.exec.TxExecution} returns this + */ proto.exec.TxExecution.prototype.clearEventsList = function() { - this.setEventsList([]); + return this.setEventsList([]); }; @@ -2465,14 +2899,21 @@ proto.exec.TxExecution.prototype.getResult = function() { }; -/** @param {?proto.exec.Result|undefined} value */ +/** + * @param {?proto.exec.Result|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setResult = function(value) { - jspb.Message.setWrapperField(this, 8, value); + return jspb.Message.setWrapperField(this, 8, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this + */ proto.exec.TxExecution.prototype.clearResult = function() { - this.setResult(undefined); + return this.setResult(undefined); }; @@ -2495,14 +2936,21 @@ proto.exec.TxExecution.prototype.getReceipt = function() { }; -/** @param {?proto.txs.Receipt|undefined} value */ +/** + * @param {?proto.txs.Receipt|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setReceipt = function(value) { - jspb.Message.setWrapperField(this, 9, value); + return jspb.Message.setWrapperField(this, 9, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this + */ proto.exec.TxExecution.prototype.clearReceipt = function() { - this.setReceipt(undefined); + return this.setReceipt(undefined); }; @@ -2525,14 +2973,21 @@ proto.exec.TxExecution.prototype.getException = function() { }; -/** @param {?proto.errors.Exception|undefined} value */ +/** + * @param {?proto.errors.Exception|undefined} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setException = function(value) { - jspb.Message.setWrapperField(this, 10, value); + return jspb.Message.setWrapperField(this, 10, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.TxExecution} returns this + */ proto.exec.TxExecution.prototype.clearException = function() { - this.setException(undefined); + return this.setException(undefined); }; @@ -2555,9 +3010,12 @@ proto.exec.TxExecution.prototype.getTxexecutionsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.exec.TxExecution} returns this +*/ proto.exec.TxExecution.prototype.setTxexecutionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 11, value); + return jspb.Message.setRepeatedWrapperField(this, 11, value); }; @@ -2571,40 +3029,29 @@ proto.exec.TxExecution.prototype.addTxexecutions = function(opt_value, opt_index }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.exec.TxExecution} returns this + */ proto.exec.TxExecution.prototype.clearTxexecutionsList = function() { - this.setTxexecutionsList([]); + return this.setTxexecutionsList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.Origin = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.Origin, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.Origin.displayName = 'proto.exec.Origin'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.Origin.prototype.toObject = function(opt_includeInstance) { @@ -2614,8 +3061,8 @@ proto.exec.Origin.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Origin} msg The msg instance to transform. * @return {!Object} @@ -2750,9 +3197,12 @@ proto.exec.Origin.prototype.getChainid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.exec.Origin} returns this + */ proto.exec.Origin.prototype.setChainid = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2765,9 +3215,12 @@ proto.exec.Origin.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Origin} returns this + */ proto.exec.Origin.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -2780,9 +3233,12 @@ proto.exec.Origin.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Origin} returns this + */ proto.exec.Origin.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -2796,14 +3252,21 @@ proto.exec.Origin.prototype.getTime = function() { }; -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.exec.Origin} returns this +*/ proto.exec.Origin.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.Origin} returns this + */ proto.exec.Origin.prototype.clearTime = function() { - this.setTime(undefined); + return this.setTime(undefined); }; @@ -2817,34 +3280,19 @@ proto.exec.Origin.prototype.hasTime = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.Header = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.Header, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.Header.displayName = 'proto.exec.Header'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.Header.prototype.toObject = function(opt_includeInstance) { @@ -2854,8 +3302,8 @@ proto.exec.Header.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Header} msg The msg instance to transform. * @return {!Object} @@ -3026,9 +3474,12 @@ proto.exec.Header.prototype.getTxtype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setTxtype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -3065,9 +3516,12 @@ proto.exec.Header.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -3080,9 +3534,12 @@ proto.exec.Header.prototype.getEventtype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setEventtype = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -3095,9 +3552,12 @@ proto.exec.Header.prototype.getEventid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setEventid = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -3110,9 +3570,12 @@ proto.exec.Header.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -3125,9 +3588,12 @@ proto.exec.Header.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 6, value); }; @@ -3141,14 +3607,21 @@ proto.exec.Header.prototype.getException = function() { }; -/** @param {?proto.errors.Exception|undefined} value */ +/** + * @param {?proto.errors.Exception|undefined} value + * @return {!proto.exec.Header} returns this +*/ proto.exec.Header.prototype.setException = function(value) { - jspb.Message.setWrapperField(this, 7, value); + return jspb.Message.setWrapperField(this, 7, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.Header} returns this + */ proto.exec.Header.prototype.clearException = function() { - this.setException(undefined); + return this.setException(undefined); }; @@ -3162,34 +3635,19 @@ proto.exec.Header.prototype.hasException = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.Event = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.Event, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.Event.displayName = 'proto.exec.Event'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.Event.prototype.toObject = function(opt_includeInstance) { @@ -3199,8 +3657,8 @@ proto.exec.Event.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Event} msg The msg instance to transform. * @return {!Object} @@ -3370,14 +3828,21 @@ proto.exec.Event.prototype.getHeader = function() { }; -/** @param {?proto.exec.Header|undefined} value */ +/** + * @param {?proto.exec.Header|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this + */ proto.exec.Event.prototype.clearHeader = function() { - this.setHeader(undefined); + return this.setHeader(undefined); }; @@ -3400,14 +3865,21 @@ proto.exec.Event.prototype.getInput = function() { }; -/** @param {?proto.exec.InputEvent|undefined} value */ +/** + * @param {?proto.exec.InputEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this + */ proto.exec.Event.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -3430,14 +3902,21 @@ proto.exec.Event.prototype.getOutput = function() { }; -/** @param {?proto.exec.OutputEvent|undefined} value */ +/** + * @param {?proto.exec.OutputEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setOutput = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this + */ proto.exec.Event.prototype.clearOutput = function() { - this.setOutput(undefined); + return this.setOutput(undefined); }; @@ -3460,14 +3939,21 @@ proto.exec.Event.prototype.getCall = function() { }; -/** @param {?proto.exec.CallEvent|undefined} value */ +/** + * @param {?proto.exec.CallEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setCall = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this + */ proto.exec.Event.prototype.clearCall = function() { - this.setCall(undefined); + return this.setCall(undefined); }; @@ -3490,14 +3976,21 @@ proto.exec.Event.prototype.getLog = function() { }; -/** @param {?proto.exec.LogEvent|undefined} value */ +/** + * @param {?proto.exec.LogEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setLog = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this + */ proto.exec.Event.prototype.clearLog = function() { - this.setLog(undefined); + return this.setLog(undefined); }; @@ -3520,14 +4013,21 @@ proto.exec.Event.prototype.getGovernaccount = function() { }; -/** @param {?proto.exec.GovernAccountEvent|undefined} value */ +/** + * @param {?proto.exec.GovernAccountEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ proto.exec.Event.prototype.setGovernaccount = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this + */ proto.exec.Event.prototype.clearGovernaccount = function() { - this.setGovernaccount(undefined); + return this.setGovernaccount(undefined); }; @@ -3541,34 +4041,19 @@ proto.exec.Event.prototype.hasGovernaccount = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.Result = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.Result, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.Result.displayName = 'proto.exec.Result'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.Result.prototype.toObject = function(opt_includeInstance) { @@ -3578,8 +4063,8 @@ proto.exec.Result.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.Result} msg The msg instance to transform. * @return {!Object} @@ -3740,9 +4225,12 @@ proto.exec.Result.prototype.getReturn_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.Result} returns this + */ proto.exec.Result.prototype.setReturn = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3755,9 +4243,12 @@ proto.exec.Result.prototype.getGasused = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.Result} returns this + */ proto.exec.Result.prototype.setGasused = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -3771,14 +4262,21 @@ proto.exec.Result.prototype.getNameentry = function() { }; -/** @param {?proto.names.Entry|undefined} value */ +/** + * @param {?proto.names.Entry|undefined} value + * @return {!proto.exec.Result} returns this +*/ proto.exec.Result.prototype.setNameentry = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.Result} returns this + */ proto.exec.Result.prototype.clearNameentry = function() { - this.setNameentry(undefined); + return this.setNameentry(undefined); }; @@ -3801,14 +4299,21 @@ proto.exec.Result.prototype.getPermargs = function() { }; -/** @param {?proto.permission.PermArgs|undefined} value */ +/** + * @param {?proto.permission.PermArgs|undefined} value + * @return {!proto.exec.Result} returns this +*/ proto.exec.Result.prototype.setPermargs = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.Result} returns this + */ proto.exec.Result.prototype.clearPermargs = function() { - this.setPermargs(undefined); + return this.setPermargs(undefined); }; @@ -3822,23 +4327,6 @@ proto.exec.Result.prototype.hasPermargs = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.LogEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.exec.LogEvent.repeatedFields_, null); -}; -goog.inherits(proto.exec.LogEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.LogEvent.displayName = 'proto.exec.LogEvent'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -3850,13 +4338,15 @@ proto.exec.LogEvent.repeatedFields_ = [3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.LogEvent.prototype.toObject = function(opt_includeInstance) { @@ -3866,8 +4356,8 @@ proto.exec.LogEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.LogEvent} msg The msg instance to transform. * @return {!Object} @@ -4012,9 +4502,12 @@ proto.exec.LogEvent.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.LogEvent} returns this + */ proto.exec.LogEvent.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -4051,9 +4544,12 @@ proto.exec.LogEvent.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.LogEvent} returns this + */ proto.exec.LogEvent.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4090,55 +4586,48 @@ proto.exec.LogEvent.prototype.getTopicsList_asU8 = function() { }; -/** @param {!(Array|Array)} value */ +/** + * @param {!(Array|Array)} value + * @return {!proto.exec.LogEvent} returns this + */ proto.exec.LogEvent.prototype.setTopicsList = function(value) { - jspb.Message.setField(this, 3, value || []); + return jspb.Message.setField(this, 3, value || []); }; /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index + * @return {!proto.exec.LogEvent} returns this */ proto.exec.LogEvent.prototype.addTopics = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 3, value, opt_index); + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.exec.LogEvent} returns this + */ proto.exec.LogEvent.prototype.clearTopicsList = function() { - this.setTopicsList([]); + return this.setTopicsList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.CallEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.CallEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.CallEvent.displayName = 'proto.exec.CallEvent'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.CallEvent.prototype.toObject = function(opt_includeInstance) { @@ -4148,8 +4637,8 @@ proto.exec.CallEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.CallEvent} msg The msg instance to transform. * @return {!Object} @@ -4296,9 +4785,12 @@ proto.exec.CallEvent.prototype.getCalltype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.setCalltype = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -4312,14 +4804,21 @@ proto.exec.CallEvent.prototype.getCalldata = function() { }; -/** @param {?proto.exec.CallData|undefined} value */ +/** + * @param {?proto.exec.CallData|undefined} value + * @return {!proto.exec.CallEvent} returns this +*/ proto.exec.CallEvent.prototype.setCalldata = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.clearCalldata = function() { - this.setCalldata(undefined); + return this.setCalldata(undefined); }; @@ -4365,9 +4864,12 @@ proto.exec.CallEvent.prototype.getOrigin_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.setOrigin = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4380,9 +4882,12 @@ proto.exec.CallEvent.prototype.getStackdepth = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.setStackdepth = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -4419,41 +4924,29 @@ proto.exec.CallEvent.prototype.getReturn_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallEvent} returns this + */ proto.exec.CallEvent.prototype.setReturn = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.GovernAccountEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.GovernAccountEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.GovernAccountEvent.displayName = 'proto.exec.GovernAccountEvent'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.GovernAccountEvent.prototype.toObject = function(opt_includeInstance) { @@ -4463,8 +4956,8 @@ proto.exec.GovernAccountEvent.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.GovernAccountEvent} msg The msg instance to transform. * @return {!Object} @@ -4564,14 +5057,21 @@ proto.exec.GovernAccountEvent.prototype.getAccountupdate = function() { }; -/** @param {?proto.spec.TemplateAccount|undefined} value */ +/** + * @param {?proto.spec.TemplateAccount|undefined} value + * @return {!proto.exec.GovernAccountEvent} returns this +*/ proto.exec.GovernAccountEvent.prototype.setAccountupdate = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.exec.GovernAccountEvent} returns this + */ proto.exec.GovernAccountEvent.prototype.clearAccountupdate = function() { - this.setAccountupdate(undefined); + return this.setAccountupdate(undefined); }; @@ -4585,34 +5085,19 @@ proto.exec.GovernAccountEvent.prototype.hasAccountupdate = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.InputEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.InputEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.InputEvent.displayName = 'proto.exec.InputEvent'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.InputEvent.prototype.toObject = function(opt_includeInstance) { @@ -4622,8 +5107,8 @@ proto.exec.InputEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.InputEvent} msg The msg instance to transform. * @return {!Object} @@ -4744,41 +5229,29 @@ proto.exec.InputEvent.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.InputEvent} returns this + */ proto.exec.InputEvent.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.OutputEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.OutputEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.OutputEvent.displayName = 'proto.exec.OutputEvent'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.OutputEvent.prototype.toObject = function(opt_includeInstance) { @@ -4788,8 +5261,8 @@ proto.exec.OutputEvent.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.OutputEvent} msg The msg instance to transform. * @return {!Object} @@ -4910,41 +5383,29 @@ proto.exec.OutputEvent.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.OutputEvent} returns this + */ proto.exec.OutputEvent.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.exec.CallData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.exec.CallData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.exec.CallData.displayName = 'proto.exec.CallData'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.exec.CallData.prototype.toObject = function(opt_includeInstance) { @@ -4954,8 +5415,8 @@ proto.exec.CallData.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.exec.CallData} msg The msg instance to transform. * @return {!Object} @@ -5124,9 +5585,12 @@ proto.exec.CallData.prototype.getCaller_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setCaller = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -5163,9 +5627,12 @@ proto.exec.CallData.prototype.getCallee_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setCallee = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -5202,9 +5669,12 @@ proto.exec.CallData.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -5217,9 +5687,12 @@ proto.exec.CallData.prototype.getValue = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -5232,9 +5705,12 @@ proto.exec.CallData.prototype.getGas = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.exec.CallData} returns this + */ proto.exec.CallData.prototype.setGas = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 5, value); }; diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.d.ts b/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.d.ts deleted file mode 100644 index 547066dfe..000000000 --- a/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.d.ts +++ /dev/null @@ -1,215 +0,0 @@ -// package: types -// file: github.com/tendermint/tendermint/abci/types/types.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "@grpc/grpc-js"; -import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; -import * as github_com_tendermint_tendermint_abci_types_types_pb from "../../../../../github.com/tendermint/tendermint/abci/types/types_pb"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb"; -import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as github_com_tendermint_tendermint_libs_common_types_pb from "../../../../../github.com/tendermint/tendermint/libs/common/types_pb"; - -interface IABCIApplicationService extends grpc.ServiceDefinition { - echo: IABCIApplicationService_IEcho; - flush: IABCIApplicationService_IFlush; - info: IABCIApplicationService_IInfo; - setOption: IABCIApplicationService_ISetOption; - deliverTx: IABCIApplicationService_IDeliverTx; - checkTx: IABCIApplicationService_ICheckTx; - query: IABCIApplicationService_IQuery; - commit: IABCIApplicationService_ICommit; - initChain: IABCIApplicationService_IInitChain; - beginBlock: IABCIApplicationService_IBeginBlock; - endBlock: IABCIApplicationService_IEndBlock; -} - -interface IABCIApplicationService_IEcho extends grpc.MethodDefinition { - path: string; // "/types.ABCIApplication/Echo" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IABCIApplicationService_IFlush extends grpc.MethodDefinition { - path: string; // "/types.ABCIApplication/Flush" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IABCIApplicationService_IInfo extends grpc.MethodDefinition { - path: string; // "/types.ABCIApplication/Info" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IABCIApplicationService_ISetOption extends grpc.MethodDefinition { - path: string; // "/types.ABCIApplication/SetOption" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IABCIApplicationService_IDeliverTx extends grpc.MethodDefinition { - path: string; // "/types.ABCIApplication/DeliverTx" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IABCIApplicationService_ICheckTx extends grpc.MethodDefinition { - path: string; // "/types.ABCIApplication/CheckTx" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IABCIApplicationService_IQuery extends grpc.MethodDefinition { - path: string; // "/types.ABCIApplication/Query" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IABCIApplicationService_ICommit extends grpc.MethodDefinition { - path: string; // "/types.ABCIApplication/Commit" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IABCIApplicationService_IInitChain extends grpc.MethodDefinition { - path: string; // "/types.ABCIApplication/InitChain" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IABCIApplicationService_IBeginBlock extends grpc.MethodDefinition { - path: string; // "/types.ABCIApplication/BeginBlock" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IABCIApplicationService_IEndBlock extends grpc.MethodDefinition { - path: string; // "/types.ABCIApplication/EndBlock" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const ABCIApplicationService: IABCIApplicationService; - -export interface IABCIApplicationServer { - echo: grpc.handleUnaryCall; - flush: grpc.handleUnaryCall; - info: grpc.handleUnaryCall; - setOption: grpc.handleUnaryCall; - deliverTx: grpc.handleUnaryCall; - checkTx: grpc.handleUnaryCall; - query: grpc.handleUnaryCall; - commit: grpc.handleUnaryCall; - initChain: grpc.handleUnaryCall; - beginBlock: grpc.handleUnaryCall; - endBlock: grpc.handleUnaryCall; -} - -export interface IABCIApplicationClient { - echo(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; - echo(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; - echo(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; - flush(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; - flush(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; - flush(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; - info(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; - info(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; - info(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; - setOption(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; - setOption(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; - setOption(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; - deliverTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; - deliverTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; - deliverTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; - checkTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; - checkTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; - checkTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; - query(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; - query(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; - query(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; - commit(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; - commit(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; - commit(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; - initChain(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; - initChain(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; - initChain(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; - beginBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; - beginBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; - beginBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; - endBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; - endBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; - endBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; -} - -export class ABCIApplicationClient extends grpc.Client implements IABCIApplicationClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public echo(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; - public echo(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; - public echo(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; - public flush(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; - public flush(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; - public flush(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; - public info(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; - public info(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; - public info(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; - public setOption(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; - public setOption(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; - public setOption(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; - public deliverTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; - public deliverTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; - public deliverTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; - public checkTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; - public checkTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; - public checkTx(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; - public query(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; - public query(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; - public query(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; - public commit(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; - public commit(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; - public commit(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; - public initChain(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; - public initChain(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; - public initChain(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; - public beginBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; - public beginBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; - public beginBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; - public endBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; - public endBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; - public endBlock(request: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; -} diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.js b/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.js deleted file mode 100644 index 1a10cefb4..000000000 --- a/js/proto/github.com/tendermint/tendermint/abci/types/types_grpc_pb.js +++ /dev/null @@ -1,378 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var github_com_tendermint_tendermint_abci_types_types_pb = require('../../../../../github.com/tendermint/tendermint/abci/types/types_pb.js'); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); -var github_com_tendermint_tendermint_libs_common_types_pb = require('../../../../../github.com/tendermint/tendermint/libs/common/types_pb.js'); - -function serialize_types_RequestBeginBlock(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock)) { - throw new Error('Expected argument of type types.RequestBeginBlock'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_RequestBeginBlock(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_RequestCheckTx(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx)) { - throw new Error('Expected argument of type types.RequestCheckTx'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_RequestCheckTx(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_RequestCommit(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit)) { - throw new Error('Expected argument of type types.RequestCommit'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_RequestCommit(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_RequestDeliverTx(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx)) { - throw new Error('Expected argument of type types.RequestDeliverTx'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_RequestDeliverTx(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_RequestEcho(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho)) { - throw new Error('Expected argument of type types.RequestEcho'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_RequestEcho(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_RequestEndBlock(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock)) { - throw new Error('Expected argument of type types.RequestEndBlock'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_RequestEndBlock(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_RequestFlush(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush)) { - throw new Error('Expected argument of type types.RequestFlush'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_RequestFlush(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_RequestInfo(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo)) { - throw new Error('Expected argument of type types.RequestInfo'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_RequestInfo(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_RequestInitChain(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain)) { - throw new Error('Expected argument of type types.RequestInitChain'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_RequestInitChain(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_RequestQuery(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery)) { - throw new Error('Expected argument of type types.RequestQuery'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_RequestQuery(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_RequestSetOption(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption)) { - throw new Error('Expected argument of type types.RequestSetOption'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_RequestSetOption(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_ResponseBeginBlock(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock)) { - throw new Error('Expected argument of type types.ResponseBeginBlock'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_ResponseBeginBlock(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_ResponseCheckTx(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx)) { - throw new Error('Expected argument of type types.ResponseCheckTx'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_ResponseCheckTx(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_ResponseCommit(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit)) { - throw new Error('Expected argument of type types.ResponseCommit'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_ResponseCommit(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_ResponseDeliverTx(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx)) { - throw new Error('Expected argument of type types.ResponseDeliverTx'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_ResponseDeliverTx(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_ResponseEcho(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho)) { - throw new Error('Expected argument of type types.ResponseEcho'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_ResponseEcho(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_ResponseEndBlock(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock)) { - throw new Error('Expected argument of type types.ResponseEndBlock'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_ResponseEndBlock(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_ResponseFlush(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush)) { - throw new Error('Expected argument of type types.ResponseFlush'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_ResponseFlush(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_ResponseInfo(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo)) { - throw new Error('Expected argument of type types.ResponseInfo'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_ResponseInfo(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_ResponseInitChain(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain)) { - throw new Error('Expected argument of type types.ResponseInitChain'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_ResponseInitChain(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_ResponseQuery(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery)) { - throw new Error('Expected argument of type types.ResponseQuery'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_ResponseQuery(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_types_ResponseSetOption(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption)) { - throw new Error('Expected argument of type types.ResponseSetOption'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_types_ResponseSetOption(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// ---------------------------------------- -// Service Definition -// -var ABCIApplicationService = exports['types.ABCIApplication'] = { - echo: { - path: '/types.ABCIApplication/Echo', - requestStream: false, - responseStream: false, - requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestEcho, - responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEcho, - requestSerialize: serialize_types_RequestEcho, - requestDeserialize: deserialize_types_RequestEcho, - responseSerialize: serialize_types_ResponseEcho, - responseDeserialize: deserialize_types_ResponseEcho, - }, - flush: { - path: '/types.ABCIApplication/Flush', - requestStream: false, - responseStream: false, - requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestFlush, - responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseFlush, - requestSerialize: serialize_types_RequestFlush, - requestDeserialize: deserialize_types_RequestFlush, - responseSerialize: serialize_types_ResponseFlush, - responseDeserialize: deserialize_types_ResponseFlush, - }, - info: { - path: '/types.ABCIApplication/Info', - requestStream: false, - responseStream: false, - requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestInfo, - responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInfo, - requestSerialize: serialize_types_RequestInfo, - requestDeserialize: deserialize_types_RequestInfo, - responseSerialize: serialize_types_ResponseInfo, - responseDeserialize: deserialize_types_ResponseInfo, - }, - setOption: { - path: '/types.ABCIApplication/SetOption', - requestStream: false, - responseStream: false, - requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestSetOption, - responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseSetOption, - requestSerialize: serialize_types_RequestSetOption, - requestDeserialize: deserialize_types_RequestSetOption, - responseSerialize: serialize_types_ResponseSetOption, - responseDeserialize: deserialize_types_ResponseSetOption, - }, - deliverTx: { - path: '/types.ABCIApplication/DeliverTx', - requestStream: false, - responseStream: false, - requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestDeliverTx, - responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseDeliverTx, - requestSerialize: serialize_types_RequestDeliverTx, - requestDeserialize: deserialize_types_RequestDeliverTx, - responseSerialize: serialize_types_ResponseDeliverTx, - responseDeserialize: deserialize_types_ResponseDeliverTx, - }, - checkTx: { - path: '/types.ABCIApplication/CheckTx', - requestStream: false, - responseStream: false, - requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestCheckTx, - responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCheckTx, - requestSerialize: serialize_types_RequestCheckTx, - requestDeserialize: deserialize_types_RequestCheckTx, - responseSerialize: serialize_types_ResponseCheckTx, - responseDeserialize: deserialize_types_ResponseCheckTx, - }, - query: { - path: '/types.ABCIApplication/Query', - requestStream: false, - responseStream: false, - requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestQuery, - responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseQuery, - requestSerialize: serialize_types_RequestQuery, - requestDeserialize: deserialize_types_RequestQuery, - responseSerialize: serialize_types_ResponseQuery, - responseDeserialize: deserialize_types_ResponseQuery, - }, - commit: { - path: '/types.ABCIApplication/Commit', - requestStream: false, - responseStream: false, - requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestCommit, - responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseCommit, - requestSerialize: serialize_types_RequestCommit, - requestDeserialize: deserialize_types_RequestCommit, - responseSerialize: serialize_types_ResponseCommit, - responseDeserialize: deserialize_types_ResponseCommit, - }, - initChain: { - path: '/types.ABCIApplication/InitChain', - requestStream: false, - responseStream: false, - requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestInitChain, - responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseInitChain, - requestSerialize: serialize_types_RequestInitChain, - requestDeserialize: deserialize_types_RequestInitChain, - responseSerialize: serialize_types_ResponseInitChain, - responseDeserialize: deserialize_types_ResponseInitChain, - }, - beginBlock: { - path: '/types.ABCIApplication/BeginBlock', - requestStream: false, - responseStream: false, - requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestBeginBlock, - responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseBeginBlock, - requestSerialize: serialize_types_RequestBeginBlock, - requestDeserialize: deserialize_types_RequestBeginBlock, - responseSerialize: serialize_types_ResponseBeginBlock, - responseDeserialize: deserialize_types_ResponseBeginBlock, - }, - endBlock: { - path: '/types.ABCIApplication/EndBlock', - requestStream: false, - responseStream: false, - requestType: github_com_tendermint_tendermint_abci_types_types_pb.RequestEndBlock, - responseType: github_com_tendermint_tendermint_abci_types_types_pb.ResponseEndBlock, - requestSerialize: serialize_types_RequestEndBlock, - requestDeserialize: deserialize_types_RequestEndBlock, - responseSerialize: serialize_types_ResponseEndBlock, - responseDeserialize: deserialize_types_ResponseEndBlock, - }, -}; - diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js b/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js deleted file mode 100644 index 56a304c71..000000000 --- a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.js +++ /dev/null @@ -1,9317 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); -var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); -goog.object.extend(proto, google_protobuf_timestamp_pb); -var github_com_tendermint_tendermint_libs_common_types_pb = require('../../../../../github.com/tendermint/tendermint/libs/common/types_pb.js'); -goog.object.extend(proto, github_com_tendermint_tendermint_libs_common_types_pb); -goog.exportSymbol('proto.types.BlockGossip', null, global); -goog.exportSymbol('proto.types.BlockID', null, global); -goog.exportSymbol('proto.types.BlockSize', null, global); -goog.exportSymbol('proto.types.ConsensusParams', null, global); -goog.exportSymbol('proto.types.Evidence', null, global); -goog.exportSymbol('proto.types.Header', null, global); -goog.exportSymbol('proto.types.LastCommitInfo', null, global); -goog.exportSymbol('proto.types.PartSetHeader', null, global); -goog.exportSymbol('proto.types.PubKey', null, global); -goog.exportSymbol('proto.types.Request', null, global); -goog.exportSymbol('proto.types.RequestBeginBlock', null, global); -goog.exportSymbol('proto.types.RequestCheckTx', null, global); -goog.exportSymbol('proto.types.RequestCommit', null, global); -goog.exportSymbol('proto.types.RequestDeliverTx', null, global); -goog.exportSymbol('proto.types.RequestEcho', null, global); -goog.exportSymbol('proto.types.RequestEndBlock', null, global); -goog.exportSymbol('proto.types.RequestFlush', null, global); -goog.exportSymbol('proto.types.RequestInfo', null, global); -goog.exportSymbol('proto.types.RequestInitChain', null, global); -goog.exportSymbol('proto.types.RequestQuery', null, global); -goog.exportSymbol('proto.types.RequestSetOption', null, global); -goog.exportSymbol('proto.types.Response', null, global); -goog.exportSymbol('proto.types.ResponseBeginBlock', null, global); -goog.exportSymbol('proto.types.ResponseCheckTx', null, global); -goog.exportSymbol('proto.types.ResponseCommit', null, global); -goog.exportSymbol('proto.types.ResponseDeliverTx', null, global); -goog.exportSymbol('proto.types.ResponseEcho', null, global); -goog.exportSymbol('proto.types.ResponseEndBlock', null, global); -goog.exportSymbol('proto.types.ResponseException', null, global); -goog.exportSymbol('proto.types.ResponseFlush', null, global); -goog.exportSymbol('proto.types.ResponseInfo', null, global); -goog.exportSymbol('proto.types.ResponseInitChain', null, global); -goog.exportSymbol('proto.types.ResponseQuery', null, global); -goog.exportSymbol('proto.types.ResponseSetOption', null, global); -goog.exportSymbol('proto.types.TxSize', null, global); -goog.exportSymbol('proto.types.Validator', null, global); -goog.exportSymbol('proto.types.ValidatorUpdate', null, global); -goog.exportSymbol('proto.types.VoteInfo', null, global); - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.Request = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.types.Request.oneofGroups_); -}; -goog.inherits(proto.types.Request, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.Request.displayName = 'proto.types.Request'; -} -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.types.Request.oneofGroups_ = [[2,3,4,5,6,7,8,9,19,11,12]]; - -/** - * @enum {number} - */ -proto.types.Request.ValueCase = { - VALUE_NOT_SET: 0, - ECHO: 2, - FLUSH: 3, - INFO: 4, - SET_OPTION: 5, - INIT_CHAIN: 6, - QUERY: 7, - BEGIN_BLOCK: 8, - CHECK_TX: 9, - DELIVER_TX: 19, - END_BLOCK: 11, - COMMIT: 12 -}; - -/** - * @return {proto.types.Request.ValueCase} - */ -proto.types.Request.prototype.getValueCase = function() { - return /** @type {proto.types.Request.ValueCase} */(jspb.Message.computeOneofCase(this, proto.types.Request.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.Request.prototype.toObject = function(opt_includeInstance) { - return proto.types.Request.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.Request} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.Request.toObject = function(includeInstance, msg) { - var f, obj = { - echo: (f = msg.getEcho()) && proto.types.RequestEcho.toObject(includeInstance, f), - flush: (f = msg.getFlush()) && proto.types.RequestFlush.toObject(includeInstance, f), - info: (f = msg.getInfo()) && proto.types.RequestInfo.toObject(includeInstance, f), - setOption: (f = msg.getSetOption()) && proto.types.RequestSetOption.toObject(includeInstance, f), - initChain: (f = msg.getInitChain()) && proto.types.RequestInitChain.toObject(includeInstance, f), - query: (f = msg.getQuery()) && proto.types.RequestQuery.toObject(includeInstance, f), - beginBlock: (f = msg.getBeginBlock()) && proto.types.RequestBeginBlock.toObject(includeInstance, f), - checkTx: (f = msg.getCheckTx()) && proto.types.RequestCheckTx.toObject(includeInstance, f), - deliverTx: (f = msg.getDeliverTx()) && proto.types.RequestDeliverTx.toObject(includeInstance, f), - endBlock: (f = msg.getEndBlock()) && proto.types.RequestEndBlock.toObject(includeInstance, f), - commit: (f = msg.getCommit()) && proto.types.RequestCommit.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.Request} - */ -proto.types.Request.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.Request; - return proto.types.Request.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.Request} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.Request} - */ -proto.types.Request.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = new proto.types.RequestEcho; - reader.readMessage(value,proto.types.RequestEcho.deserializeBinaryFromReader); - msg.setEcho(value); - break; - case 3: - var value = new proto.types.RequestFlush; - reader.readMessage(value,proto.types.RequestFlush.deserializeBinaryFromReader); - msg.setFlush(value); - break; - case 4: - var value = new proto.types.RequestInfo; - reader.readMessage(value,proto.types.RequestInfo.deserializeBinaryFromReader); - msg.setInfo(value); - break; - case 5: - var value = new proto.types.RequestSetOption; - reader.readMessage(value,proto.types.RequestSetOption.deserializeBinaryFromReader); - msg.setSetOption(value); - break; - case 6: - var value = new proto.types.RequestInitChain; - reader.readMessage(value,proto.types.RequestInitChain.deserializeBinaryFromReader); - msg.setInitChain(value); - break; - case 7: - var value = new proto.types.RequestQuery; - reader.readMessage(value,proto.types.RequestQuery.deserializeBinaryFromReader); - msg.setQuery(value); - break; - case 8: - var value = new proto.types.RequestBeginBlock; - reader.readMessage(value,proto.types.RequestBeginBlock.deserializeBinaryFromReader); - msg.setBeginBlock(value); - break; - case 9: - var value = new proto.types.RequestCheckTx; - reader.readMessage(value,proto.types.RequestCheckTx.deserializeBinaryFromReader); - msg.setCheckTx(value); - break; - case 19: - var value = new proto.types.RequestDeliverTx; - reader.readMessage(value,proto.types.RequestDeliverTx.deserializeBinaryFromReader); - msg.setDeliverTx(value); - break; - case 11: - var value = new proto.types.RequestEndBlock; - reader.readMessage(value,proto.types.RequestEndBlock.deserializeBinaryFromReader); - msg.setEndBlock(value); - break; - case 12: - var value = new proto.types.RequestCommit; - reader.readMessage(value,proto.types.RequestCommit.deserializeBinaryFromReader); - msg.setCommit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.Request.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.Request.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.Request} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.Request.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEcho(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.types.RequestEcho.serializeBinaryToWriter - ); - } - f = message.getFlush(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.types.RequestFlush.serializeBinaryToWriter - ); - } - f = message.getInfo(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.types.RequestInfo.serializeBinaryToWriter - ); - } - f = message.getSetOption(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.types.RequestSetOption.serializeBinaryToWriter - ); - } - f = message.getInitChain(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.types.RequestInitChain.serializeBinaryToWriter - ); - } - f = message.getQuery(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.types.RequestQuery.serializeBinaryToWriter - ); - } - f = message.getBeginBlock(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.types.RequestBeginBlock.serializeBinaryToWriter - ); - } - f = message.getCheckTx(); - if (f != null) { - writer.writeMessage( - 9, - f, - proto.types.RequestCheckTx.serializeBinaryToWriter - ); - } - f = message.getDeliverTx(); - if (f != null) { - writer.writeMessage( - 19, - f, - proto.types.RequestDeliverTx.serializeBinaryToWriter - ); - } - f = message.getEndBlock(); - if (f != null) { - writer.writeMessage( - 11, - f, - proto.types.RequestEndBlock.serializeBinaryToWriter - ); - } - f = message.getCommit(); - if (f != null) { - writer.writeMessage( - 12, - f, - proto.types.RequestCommit.serializeBinaryToWriter - ); - } -}; - - -/** - * optional RequestEcho echo = 2; - * @return {?proto.types.RequestEcho} - */ -proto.types.Request.prototype.getEcho = function() { - return /** @type{?proto.types.RequestEcho} */ ( - jspb.Message.getWrapperField(this, proto.types.RequestEcho, 2)); -}; - - -/** @param {?proto.types.RequestEcho|undefined} value */ -proto.types.Request.prototype.setEcho = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.types.Request.oneofGroups_[0], value); -}; - - -proto.types.Request.prototype.clearEcho = function() { - this.setEcho(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Request.prototype.hasEcho = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional RequestFlush flush = 3; - * @return {?proto.types.RequestFlush} - */ -proto.types.Request.prototype.getFlush = function() { - return /** @type{?proto.types.RequestFlush} */ ( - jspb.Message.getWrapperField(this, proto.types.RequestFlush, 3)); -}; - - -/** @param {?proto.types.RequestFlush|undefined} value */ -proto.types.Request.prototype.setFlush = function(value) { - jspb.Message.setOneofWrapperField(this, 3, proto.types.Request.oneofGroups_[0], value); -}; - - -proto.types.Request.prototype.clearFlush = function() { - this.setFlush(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Request.prototype.hasFlush = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional RequestInfo info = 4; - * @return {?proto.types.RequestInfo} - */ -proto.types.Request.prototype.getInfo = function() { - return /** @type{?proto.types.RequestInfo} */ ( - jspb.Message.getWrapperField(this, proto.types.RequestInfo, 4)); -}; - - -/** @param {?proto.types.RequestInfo|undefined} value */ -proto.types.Request.prototype.setInfo = function(value) { - jspb.Message.setOneofWrapperField(this, 4, proto.types.Request.oneofGroups_[0], value); -}; - - -proto.types.Request.prototype.clearInfo = function() { - this.setInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Request.prototype.hasInfo = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional RequestSetOption set_option = 5; - * @return {?proto.types.RequestSetOption} - */ -proto.types.Request.prototype.getSetOption = function() { - return /** @type{?proto.types.RequestSetOption} */ ( - jspb.Message.getWrapperField(this, proto.types.RequestSetOption, 5)); -}; - - -/** @param {?proto.types.RequestSetOption|undefined} value */ -proto.types.Request.prototype.setSetOption = function(value) { - jspb.Message.setOneofWrapperField(this, 5, proto.types.Request.oneofGroups_[0], value); -}; - - -proto.types.Request.prototype.clearSetOption = function() { - this.setSetOption(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Request.prototype.hasSetOption = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional RequestInitChain init_chain = 6; - * @return {?proto.types.RequestInitChain} - */ -proto.types.Request.prototype.getInitChain = function() { - return /** @type{?proto.types.RequestInitChain} */ ( - jspb.Message.getWrapperField(this, proto.types.RequestInitChain, 6)); -}; - - -/** @param {?proto.types.RequestInitChain|undefined} value */ -proto.types.Request.prototype.setInitChain = function(value) { - jspb.Message.setOneofWrapperField(this, 6, proto.types.Request.oneofGroups_[0], value); -}; - - -proto.types.Request.prototype.clearInitChain = function() { - this.setInitChain(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Request.prototype.hasInitChain = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional RequestQuery query = 7; - * @return {?proto.types.RequestQuery} - */ -proto.types.Request.prototype.getQuery = function() { - return /** @type{?proto.types.RequestQuery} */ ( - jspb.Message.getWrapperField(this, proto.types.RequestQuery, 7)); -}; - - -/** @param {?proto.types.RequestQuery|undefined} value */ -proto.types.Request.prototype.setQuery = function(value) { - jspb.Message.setOneofWrapperField(this, 7, proto.types.Request.oneofGroups_[0], value); -}; - - -proto.types.Request.prototype.clearQuery = function() { - this.setQuery(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Request.prototype.hasQuery = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional RequestBeginBlock begin_block = 8; - * @return {?proto.types.RequestBeginBlock} - */ -proto.types.Request.prototype.getBeginBlock = function() { - return /** @type{?proto.types.RequestBeginBlock} */ ( - jspb.Message.getWrapperField(this, proto.types.RequestBeginBlock, 8)); -}; - - -/** @param {?proto.types.RequestBeginBlock|undefined} value */ -proto.types.Request.prototype.setBeginBlock = function(value) { - jspb.Message.setOneofWrapperField(this, 8, proto.types.Request.oneofGroups_[0], value); -}; - - -proto.types.Request.prototype.clearBeginBlock = function() { - this.setBeginBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Request.prototype.hasBeginBlock = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional RequestCheckTx check_tx = 9; - * @return {?proto.types.RequestCheckTx} - */ -proto.types.Request.prototype.getCheckTx = function() { - return /** @type{?proto.types.RequestCheckTx} */ ( - jspb.Message.getWrapperField(this, proto.types.RequestCheckTx, 9)); -}; - - -/** @param {?proto.types.RequestCheckTx|undefined} value */ -proto.types.Request.prototype.setCheckTx = function(value) { - jspb.Message.setOneofWrapperField(this, 9, proto.types.Request.oneofGroups_[0], value); -}; - - -proto.types.Request.prototype.clearCheckTx = function() { - this.setCheckTx(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Request.prototype.hasCheckTx = function() { - return jspb.Message.getField(this, 9) != null; -}; - - -/** - * optional RequestDeliverTx deliver_tx = 19; - * @return {?proto.types.RequestDeliverTx} - */ -proto.types.Request.prototype.getDeliverTx = function() { - return /** @type{?proto.types.RequestDeliverTx} */ ( - jspb.Message.getWrapperField(this, proto.types.RequestDeliverTx, 19)); -}; - - -/** @param {?proto.types.RequestDeliverTx|undefined} value */ -proto.types.Request.prototype.setDeliverTx = function(value) { - jspb.Message.setOneofWrapperField(this, 19, proto.types.Request.oneofGroups_[0], value); -}; - - -proto.types.Request.prototype.clearDeliverTx = function() { - this.setDeliverTx(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Request.prototype.hasDeliverTx = function() { - return jspb.Message.getField(this, 19) != null; -}; - - -/** - * optional RequestEndBlock end_block = 11; - * @return {?proto.types.RequestEndBlock} - */ -proto.types.Request.prototype.getEndBlock = function() { - return /** @type{?proto.types.RequestEndBlock} */ ( - jspb.Message.getWrapperField(this, proto.types.RequestEndBlock, 11)); -}; - - -/** @param {?proto.types.RequestEndBlock|undefined} value */ -proto.types.Request.prototype.setEndBlock = function(value) { - jspb.Message.setOneofWrapperField(this, 11, proto.types.Request.oneofGroups_[0], value); -}; - - -proto.types.Request.prototype.clearEndBlock = function() { - this.setEndBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Request.prototype.hasEndBlock = function() { - return jspb.Message.getField(this, 11) != null; -}; - - -/** - * optional RequestCommit commit = 12; - * @return {?proto.types.RequestCommit} - */ -proto.types.Request.prototype.getCommit = function() { - return /** @type{?proto.types.RequestCommit} */ ( - jspb.Message.getWrapperField(this, proto.types.RequestCommit, 12)); -}; - - -/** @param {?proto.types.RequestCommit|undefined} value */ -proto.types.Request.prototype.setCommit = function(value) { - jspb.Message.setOneofWrapperField(this, 12, proto.types.Request.oneofGroups_[0], value); -}; - - -proto.types.Request.prototype.clearCommit = function() { - this.setCommit(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Request.prototype.hasCommit = function() { - return jspb.Message.getField(this, 12) != null; -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestEcho = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestEcho, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.RequestEcho.displayName = 'proto.types.RequestEcho'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.RequestEcho.prototype.toObject = function(opt_includeInstance) { - return proto.types.RequestEcho.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.RequestEcho} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestEcho.toObject = function(includeInstance, msg) { - var f, obj = { - message: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.RequestEcho} - */ -proto.types.RequestEcho.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.RequestEcho; - return proto.types.RequestEcho.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.RequestEcho} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.RequestEcho} - */ -proto.types.RequestEcho.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.RequestEcho.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.RequestEcho.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.RequestEcho} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestEcho.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string message = 1; - * @return {string} - */ -proto.types.RequestEcho.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.types.RequestEcho.prototype.setMessage = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestFlush = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestFlush, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.RequestFlush.displayName = 'proto.types.RequestFlush'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.RequestFlush.prototype.toObject = function(opt_includeInstance) { - return proto.types.RequestFlush.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.RequestFlush} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestFlush.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.RequestFlush} - */ -proto.types.RequestFlush.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.RequestFlush; - return proto.types.RequestFlush.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.RequestFlush} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.RequestFlush} - */ -proto.types.RequestFlush.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.RequestFlush.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.RequestFlush.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.RequestFlush} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestFlush.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.RequestInfo.displayName = 'proto.types.RequestInfo'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.RequestInfo.prototype.toObject = function(opt_includeInstance) { - return proto.types.RequestInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.RequestInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestInfo.toObject = function(includeInstance, msg) { - var f, obj = { - version: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.RequestInfo} - */ -proto.types.RequestInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.RequestInfo; - return proto.types.RequestInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.RequestInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.RequestInfo} - */ -proto.types.RequestInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.RequestInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.RequestInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.RequestInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string version = 1; - * @return {string} - */ -proto.types.RequestInfo.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.types.RequestInfo.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestSetOption = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestSetOption, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.RequestSetOption.displayName = 'proto.types.RequestSetOption'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.RequestSetOption.prototype.toObject = function(opt_includeInstance) { - return proto.types.RequestSetOption.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.RequestSetOption} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestSetOption.toObject = function(includeInstance, msg) { - var f, obj = { - key: jspb.Message.getFieldWithDefault(msg, 1, ""), - value: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.RequestSetOption} - */ -proto.types.RequestSetOption.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.RequestSetOption; - return proto.types.RequestSetOption.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.RequestSetOption} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.RequestSetOption} - */ -proto.types.RequestSetOption.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setKey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setValue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.RequestSetOption.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.RequestSetOption.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.RequestSetOption} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestSetOption.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getValue(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string key = 1; - * @return {string} - */ -proto.types.RequestSetOption.prototype.getKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.types.RequestSetOption.prototype.setKey = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string value = 2; - * @return {string} - */ -proto.types.RequestSetOption.prototype.getValue = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.types.RequestSetOption.prototype.setValue = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestInitChain = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.RequestInitChain.repeatedFields_, null); -}; -goog.inherits(proto.types.RequestInitChain, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.RequestInitChain.displayName = 'proto.types.RequestInitChain'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.types.RequestInitChain.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.RequestInitChain.prototype.toObject = function(opt_includeInstance) { - return proto.types.RequestInitChain.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.RequestInitChain} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestInitChain.toObject = function(includeInstance, msg) { - var f, obj = { - time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - chainId: jspb.Message.getFieldWithDefault(msg, 2, ""), - consensusParams: (f = msg.getConsensusParams()) && proto.types.ConsensusParams.toObject(includeInstance, f), - validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), - proto.types.ValidatorUpdate.toObject, includeInstance), - appStateBytes: msg.getAppStateBytes_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.RequestInitChain} - */ -proto.types.RequestInitChain.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.RequestInitChain; - return proto.types.RequestInitChain.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.RequestInitChain} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.RequestInitChain} - */ -proto.types.RequestInitChain.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTime(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setChainId(value); - break; - case 3: - var value = new proto.types.ConsensusParams; - reader.readMessage(value,proto.types.ConsensusParams.deserializeBinaryFromReader); - msg.setConsensusParams(value); - break; - case 4: - var value = new proto.types.ValidatorUpdate; - reader.readMessage(value,proto.types.ValidatorUpdate.deserializeBinaryFromReader); - msg.addValidators(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAppStateBytes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.RequestInitChain.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.RequestInitChain.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.RequestInitChain} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestInitChain.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTime(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getChainId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getConsensusParams(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.types.ConsensusParams.serializeBinaryToWriter - ); - } - f = message.getValidatorsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.types.ValidatorUpdate.serializeBinaryToWriter - ); - } - f = message.getAppStateBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } -}; - - -/** - * optional google.protobuf.Timestamp time = 1; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.types.RequestInitChain.prototype.getTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); -}; - - -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ -proto.types.RequestInitChain.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.types.RequestInitChain.prototype.clearTime = function() { - this.setTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.RequestInitChain.prototype.hasTime = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string chain_id = 2; - * @return {string} - */ -proto.types.RequestInitChain.prototype.getChainId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.types.RequestInitChain.prototype.setChainId = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional ConsensusParams consensus_params = 3; - * @return {?proto.types.ConsensusParams} - */ -proto.types.RequestInitChain.prototype.getConsensusParams = function() { - return /** @type{?proto.types.ConsensusParams} */ ( - jspb.Message.getWrapperField(this, proto.types.ConsensusParams, 3)); -}; - - -/** @param {?proto.types.ConsensusParams|undefined} value */ -proto.types.RequestInitChain.prototype.setConsensusParams = function(value) { - jspb.Message.setWrapperField(this, 3, value); -}; - - -proto.types.RequestInitChain.prototype.clearConsensusParams = function() { - this.setConsensusParams(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.RequestInitChain.prototype.hasConsensusParams = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * repeated ValidatorUpdate validators = 4; - * @return {!Array} - */ -proto.types.RequestInitChain.prototype.getValidatorsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.types.ValidatorUpdate, 4)); -}; - - -/** @param {!Array} value */ -proto.types.RequestInitChain.prototype.setValidatorsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.types.ValidatorUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.types.ValidatorUpdate} - */ -proto.types.RequestInitChain.prototype.addValidators = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.types.ValidatorUpdate, opt_index); -}; - - -proto.types.RequestInitChain.prototype.clearValidatorsList = function() { - this.setValidatorsList([]); -}; - - -/** - * optional bytes app_state_bytes = 5; - * @return {!(string|Uint8Array)} - */ -proto.types.RequestInitChain.prototype.getAppStateBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * optional bytes app_state_bytes = 5; - * This is a type-conversion wrapper around `getAppStateBytes()` - * @return {string} - */ -proto.types.RequestInitChain.prototype.getAppStateBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAppStateBytes())); -}; - - -/** - * optional bytes app_state_bytes = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAppStateBytes()` - * @return {!Uint8Array} - */ -proto.types.RequestInitChain.prototype.getAppStateBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAppStateBytes())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.RequestInitChain.prototype.setAppStateBytes = function(value) { - jspb.Message.setProto3BytesField(this, 5, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestQuery = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestQuery, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.RequestQuery.displayName = 'proto.types.RequestQuery'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.RequestQuery.prototype.toObject = function(opt_includeInstance) { - return proto.types.RequestQuery.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.RequestQuery} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestQuery.toObject = function(includeInstance, msg) { - var f, obj = { - data: msg.getData_asB64(), - path: jspb.Message.getFieldWithDefault(msg, 2, ""), - height: jspb.Message.getFieldWithDefault(msg, 3, 0), - prove: jspb.Message.getFieldWithDefault(msg, 4, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.RequestQuery} - */ -proto.types.RequestQuery.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.RequestQuery; - return proto.types.RequestQuery.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.RequestQuery} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.RequestQuery} - */ -proto.types.RequestQuery.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPath(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setHeight(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.RequestQuery.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.RequestQuery.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.RequestQuery} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestQuery.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPath(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getHeight(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional bytes data = 1; - * @return {!(string|Uint8Array)} - */ -proto.types.RequestQuery.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes data = 1; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.types.RequestQuery.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.types.RequestQuery.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.RequestQuery.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string path = 2; - * @return {string} - */ -proto.types.RequestQuery.prototype.getPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.types.RequestQuery.prototype.setPath = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 height = 3; - * @return {number} - */ -proto.types.RequestQuery.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.types.RequestQuery.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bool prove = 4; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.types.RequestQuery.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); -}; - - -/** @param {boolean} value */ -proto.types.RequestQuery.prototype.setProve = function(value) { - jspb.Message.setProto3BooleanField(this, 4, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestBeginBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.RequestBeginBlock.repeatedFields_, null); -}; -goog.inherits(proto.types.RequestBeginBlock, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.RequestBeginBlock.displayName = 'proto.types.RequestBeginBlock'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.types.RequestBeginBlock.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.RequestBeginBlock.prototype.toObject = function(opt_includeInstance) { - return proto.types.RequestBeginBlock.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.RequestBeginBlock} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestBeginBlock.toObject = function(includeInstance, msg) { - var f, obj = { - hash: msg.getHash_asB64(), - header: (f = msg.getHeader()) && proto.types.Header.toObject(includeInstance, f), - lastCommitInfo: (f = msg.getLastCommitInfo()) && proto.types.LastCommitInfo.toObject(includeInstance, f), - byzantineValidatorsList: jspb.Message.toObjectList(msg.getByzantineValidatorsList(), - proto.types.Evidence.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.RequestBeginBlock} - */ -proto.types.RequestBeginBlock.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.RequestBeginBlock; - return proto.types.RequestBeginBlock.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.RequestBeginBlock} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.RequestBeginBlock} - */ -proto.types.RequestBeginBlock.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); - break; - case 2: - var value = new proto.types.Header; - reader.readMessage(value,proto.types.Header.deserializeBinaryFromReader); - msg.setHeader(value); - break; - case 3: - var value = new proto.types.LastCommitInfo; - reader.readMessage(value,proto.types.LastCommitInfo.deserializeBinaryFromReader); - msg.setLastCommitInfo(value); - break; - case 4: - var value = new proto.types.Evidence; - reader.readMessage(value,proto.types.Evidence.deserializeBinaryFromReader); - msg.addByzantineValidators(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.RequestBeginBlock.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.RequestBeginBlock.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.RequestBeginBlock} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestBeginBlock.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getHeader(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.types.Header.serializeBinaryToWriter - ); - } - f = message.getLastCommitInfo(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.types.LastCommitInfo.serializeBinaryToWriter - ); - } - f = message.getByzantineValidatorsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.types.Evidence.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.types.RequestBeginBlock.prototype.getHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes hash = 1; - * This is a type-conversion wrapper around `getHash()` - * @return {string} - */ -proto.types.RequestBeginBlock.prototype.getHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); -}; - - -/** - * optional bytes hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` - * @return {!Uint8Array} - */ -proto.types.RequestBeginBlock.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.RequestBeginBlock.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional Header header = 2; - * @return {?proto.types.Header} - */ -proto.types.RequestBeginBlock.prototype.getHeader = function() { - return /** @type{?proto.types.Header} */ ( - jspb.Message.getWrapperField(this, proto.types.Header, 2)); -}; - - -/** @param {?proto.types.Header|undefined} value */ -proto.types.RequestBeginBlock.prototype.setHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.types.RequestBeginBlock.prototype.clearHeader = function() { - this.setHeader(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.RequestBeginBlock.prototype.hasHeader = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional LastCommitInfo last_commit_info = 3; - * @return {?proto.types.LastCommitInfo} - */ -proto.types.RequestBeginBlock.prototype.getLastCommitInfo = function() { - return /** @type{?proto.types.LastCommitInfo} */ ( - jspb.Message.getWrapperField(this, proto.types.LastCommitInfo, 3)); -}; - - -/** @param {?proto.types.LastCommitInfo|undefined} value */ -proto.types.RequestBeginBlock.prototype.setLastCommitInfo = function(value) { - jspb.Message.setWrapperField(this, 3, value); -}; - - -proto.types.RequestBeginBlock.prototype.clearLastCommitInfo = function() { - this.setLastCommitInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.RequestBeginBlock.prototype.hasLastCommitInfo = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * repeated Evidence byzantine_validators = 4; - * @return {!Array} - */ -proto.types.RequestBeginBlock.prototype.getByzantineValidatorsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.types.Evidence, 4)); -}; - - -/** @param {!Array} value */ -proto.types.RequestBeginBlock.prototype.setByzantineValidatorsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.types.Evidence=} opt_value - * @param {number=} opt_index - * @return {!proto.types.Evidence} - */ -proto.types.RequestBeginBlock.prototype.addByzantineValidators = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.types.Evidence, opt_index); -}; - - -proto.types.RequestBeginBlock.prototype.clearByzantineValidatorsList = function() { - this.setByzantineValidatorsList([]); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestCheckTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestCheckTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.RequestCheckTx.displayName = 'proto.types.RequestCheckTx'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { - return proto.types.RequestCheckTx.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.RequestCheckTx} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestCheckTx.toObject = function(includeInstance, msg) { - var f, obj = { - tx: msg.getTx_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.RequestCheckTx} - */ -proto.types.RequestCheckTx.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.RequestCheckTx; - return proto.types.RequestCheckTx.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.RequestCheckTx} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.RequestCheckTx} - */ -proto.types.RequestCheckTx.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTx(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.RequestCheckTx.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.RequestCheckTx.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.RequestCheckTx} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestCheckTx.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTx_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes tx = 1; - * @return {!(string|Uint8Array)} - */ -proto.types.RequestCheckTx.prototype.getTx = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes tx = 1; - * This is a type-conversion wrapper around `getTx()` - * @return {string} - */ -proto.types.RequestCheckTx.prototype.getTx_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTx())); -}; - - -/** - * optional bytes tx = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTx()` - * @return {!Uint8Array} - */ -proto.types.RequestCheckTx.prototype.getTx_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTx())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.RequestCheckTx.prototype.setTx = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestDeliverTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestDeliverTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.RequestDeliverTx.displayName = 'proto.types.RequestDeliverTx'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.RequestDeliverTx.prototype.toObject = function(opt_includeInstance) { - return proto.types.RequestDeliverTx.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.RequestDeliverTx} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestDeliverTx.toObject = function(includeInstance, msg) { - var f, obj = { - tx: msg.getTx_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.RequestDeliverTx} - */ -proto.types.RequestDeliverTx.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.RequestDeliverTx; - return proto.types.RequestDeliverTx.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.RequestDeliverTx} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.RequestDeliverTx} - */ -proto.types.RequestDeliverTx.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTx(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.RequestDeliverTx.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.RequestDeliverTx.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.RequestDeliverTx} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestDeliverTx.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTx_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes tx = 1; - * @return {!(string|Uint8Array)} - */ -proto.types.RequestDeliverTx.prototype.getTx = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes tx = 1; - * This is a type-conversion wrapper around `getTx()` - * @return {string} - */ -proto.types.RequestDeliverTx.prototype.getTx_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTx())); -}; - - -/** - * optional bytes tx = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTx()` - * @return {!Uint8Array} - */ -proto.types.RequestDeliverTx.prototype.getTx_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTx())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.RequestDeliverTx.prototype.setTx = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestEndBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestEndBlock, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.RequestEndBlock.displayName = 'proto.types.RequestEndBlock'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.RequestEndBlock.prototype.toObject = function(opt_includeInstance) { - return proto.types.RequestEndBlock.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.RequestEndBlock} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestEndBlock.toObject = function(includeInstance, msg) { - var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.RequestEndBlock} - */ -proto.types.RequestEndBlock.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.RequestEndBlock; - return proto.types.RequestEndBlock.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.RequestEndBlock} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.RequestEndBlock} - */ -proto.types.RequestEndBlock.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setHeight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.RequestEndBlock.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.RequestEndBlock.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.RequestEndBlock} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestEndBlock.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } -}; - - -/** - * optional int64 height = 1; - * @return {number} - */ -proto.types.RequestEndBlock.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.types.RequestEndBlock.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.RequestCommit = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.RequestCommit, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.RequestCommit.displayName = 'proto.types.RequestCommit'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.RequestCommit.prototype.toObject = function(opt_includeInstance) { - return proto.types.RequestCommit.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.RequestCommit} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestCommit.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.RequestCommit} - */ -proto.types.RequestCommit.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.RequestCommit; - return proto.types.RequestCommit.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.RequestCommit} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.RequestCommit} - */ -proto.types.RequestCommit.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.RequestCommit.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.RequestCommit.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.RequestCommit} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.RequestCommit.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.Response = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.types.Response.oneofGroups_); -}; -goog.inherits(proto.types.Response, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.Response.displayName = 'proto.types.Response'; -} -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.types.Response.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12]]; - -/** - * @enum {number} - */ -proto.types.Response.ValueCase = { - VALUE_NOT_SET: 0, - EXCEPTION: 1, - ECHO: 2, - FLUSH: 3, - INFO: 4, - SET_OPTION: 5, - INIT_CHAIN: 6, - QUERY: 7, - BEGIN_BLOCK: 8, - CHECK_TX: 9, - DELIVER_TX: 10, - END_BLOCK: 11, - COMMIT: 12 -}; - -/** - * @return {proto.types.Response.ValueCase} - */ -proto.types.Response.prototype.getValueCase = function() { - return /** @type {proto.types.Response.ValueCase} */(jspb.Message.computeOneofCase(this, proto.types.Response.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.Response.prototype.toObject = function(opt_includeInstance) { - return proto.types.Response.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.Response} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.Response.toObject = function(includeInstance, msg) { - var f, obj = { - exception: (f = msg.getException()) && proto.types.ResponseException.toObject(includeInstance, f), - echo: (f = msg.getEcho()) && proto.types.ResponseEcho.toObject(includeInstance, f), - flush: (f = msg.getFlush()) && proto.types.ResponseFlush.toObject(includeInstance, f), - info: (f = msg.getInfo()) && proto.types.ResponseInfo.toObject(includeInstance, f), - setOption: (f = msg.getSetOption()) && proto.types.ResponseSetOption.toObject(includeInstance, f), - initChain: (f = msg.getInitChain()) && proto.types.ResponseInitChain.toObject(includeInstance, f), - query: (f = msg.getQuery()) && proto.types.ResponseQuery.toObject(includeInstance, f), - beginBlock: (f = msg.getBeginBlock()) && proto.types.ResponseBeginBlock.toObject(includeInstance, f), - checkTx: (f = msg.getCheckTx()) && proto.types.ResponseCheckTx.toObject(includeInstance, f), - deliverTx: (f = msg.getDeliverTx()) && proto.types.ResponseDeliverTx.toObject(includeInstance, f), - endBlock: (f = msg.getEndBlock()) && proto.types.ResponseEndBlock.toObject(includeInstance, f), - commit: (f = msg.getCommit()) && proto.types.ResponseCommit.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.Response} - */ -proto.types.Response.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.Response; - return proto.types.Response.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.Response} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.Response} - */ -proto.types.Response.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.types.ResponseException; - reader.readMessage(value,proto.types.ResponseException.deserializeBinaryFromReader); - msg.setException(value); - break; - case 2: - var value = new proto.types.ResponseEcho; - reader.readMessage(value,proto.types.ResponseEcho.deserializeBinaryFromReader); - msg.setEcho(value); - break; - case 3: - var value = new proto.types.ResponseFlush; - reader.readMessage(value,proto.types.ResponseFlush.deserializeBinaryFromReader); - msg.setFlush(value); - break; - case 4: - var value = new proto.types.ResponseInfo; - reader.readMessage(value,proto.types.ResponseInfo.deserializeBinaryFromReader); - msg.setInfo(value); - break; - case 5: - var value = new proto.types.ResponseSetOption; - reader.readMessage(value,proto.types.ResponseSetOption.deserializeBinaryFromReader); - msg.setSetOption(value); - break; - case 6: - var value = new proto.types.ResponseInitChain; - reader.readMessage(value,proto.types.ResponseInitChain.deserializeBinaryFromReader); - msg.setInitChain(value); - break; - case 7: - var value = new proto.types.ResponseQuery; - reader.readMessage(value,proto.types.ResponseQuery.deserializeBinaryFromReader); - msg.setQuery(value); - break; - case 8: - var value = new proto.types.ResponseBeginBlock; - reader.readMessage(value,proto.types.ResponseBeginBlock.deserializeBinaryFromReader); - msg.setBeginBlock(value); - break; - case 9: - var value = new proto.types.ResponseCheckTx; - reader.readMessage(value,proto.types.ResponseCheckTx.deserializeBinaryFromReader); - msg.setCheckTx(value); - break; - case 10: - var value = new proto.types.ResponseDeliverTx; - reader.readMessage(value,proto.types.ResponseDeliverTx.deserializeBinaryFromReader); - msg.setDeliverTx(value); - break; - case 11: - var value = new proto.types.ResponseEndBlock; - reader.readMessage(value,proto.types.ResponseEndBlock.deserializeBinaryFromReader); - msg.setEndBlock(value); - break; - case 12: - var value = new proto.types.ResponseCommit; - reader.readMessage(value,proto.types.ResponseCommit.deserializeBinaryFromReader); - msg.setCommit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.Response.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.Response.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.Response} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.Response.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getException(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.types.ResponseException.serializeBinaryToWriter - ); - } - f = message.getEcho(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.types.ResponseEcho.serializeBinaryToWriter - ); - } - f = message.getFlush(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.types.ResponseFlush.serializeBinaryToWriter - ); - } - f = message.getInfo(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.types.ResponseInfo.serializeBinaryToWriter - ); - } - f = message.getSetOption(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.types.ResponseSetOption.serializeBinaryToWriter - ); - } - f = message.getInitChain(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.types.ResponseInitChain.serializeBinaryToWriter - ); - } - f = message.getQuery(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.types.ResponseQuery.serializeBinaryToWriter - ); - } - f = message.getBeginBlock(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.types.ResponseBeginBlock.serializeBinaryToWriter - ); - } - f = message.getCheckTx(); - if (f != null) { - writer.writeMessage( - 9, - f, - proto.types.ResponseCheckTx.serializeBinaryToWriter - ); - } - f = message.getDeliverTx(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.types.ResponseDeliverTx.serializeBinaryToWriter - ); - } - f = message.getEndBlock(); - if (f != null) { - writer.writeMessage( - 11, - f, - proto.types.ResponseEndBlock.serializeBinaryToWriter - ); - } - f = message.getCommit(); - if (f != null) { - writer.writeMessage( - 12, - f, - proto.types.ResponseCommit.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ResponseException exception = 1; - * @return {?proto.types.ResponseException} - */ -proto.types.Response.prototype.getException = function() { - return /** @type{?proto.types.ResponseException} */ ( - jspb.Message.getWrapperField(this, proto.types.ResponseException, 1)); -}; - - -/** @param {?proto.types.ResponseException|undefined} value */ -proto.types.Response.prototype.setException = function(value) { - jspb.Message.setOneofWrapperField(this, 1, proto.types.Response.oneofGroups_[0], value); -}; - - -proto.types.Response.prototype.clearException = function() { - this.setException(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Response.prototype.hasException = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ResponseEcho echo = 2; - * @return {?proto.types.ResponseEcho} - */ -proto.types.Response.prototype.getEcho = function() { - return /** @type{?proto.types.ResponseEcho} */ ( - jspb.Message.getWrapperField(this, proto.types.ResponseEcho, 2)); -}; - - -/** @param {?proto.types.ResponseEcho|undefined} value */ -proto.types.Response.prototype.setEcho = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.types.Response.oneofGroups_[0], value); -}; - - -proto.types.Response.prototype.clearEcho = function() { - this.setEcho(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Response.prototype.hasEcho = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional ResponseFlush flush = 3; - * @return {?proto.types.ResponseFlush} - */ -proto.types.Response.prototype.getFlush = function() { - return /** @type{?proto.types.ResponseFlush} */ ( - jspb.Message.getWrapperField(this, proto.types.ResponseFlush, 3)); -}; - - -/** @param {?proto.types.ResponseFlush|undefined} value */ -proto.types.Response.prototype.setFlush = function(value) { - jspb.Message.setOneofWrapperField(this, 3, proto.types.Response.oneofGroups_[0], value); -}; - - -proto.types.Response.prototype.clearFlush = function() { - this.setFlush(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Response.prototype.hasFlush = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional ResponseInfo info = 4; - * @return {?proto.types.ResponseInfo} - */ -proto.types.Response.prototype.getInfo = function() { - return /** @type{?proto.types.ResponseInfo} */ ( - jspb.Message.getWrapperField(this, proto.types.ResponseInfo, 4)); -}; - - -/** @param {?proto.types.ResponseInfo|undefined} value */ -proto.types.Response.prototype.setInfo = function(value) { - jspb.Message.setOneofWrapperField(this, 4, proto.types.Response.oneofGroups_[0], value); -}; - - -proto.types.Response.prototype.clearInfo = function() { - this.setInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Response.prototype.hasInfo = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional ResponseSetOption set_option = 5; - * @return {?proto.types.ResponseSetOption} - */ -proto.types.Response.prototype.getSetOption = function() { - return /** @type{?proto.types.ResponseSetOption} */ ( - jspb.Message.getWrapperField(this, proto.types.ResponseSetOption, 5)); -}; - - -/** @param {?proto.types.ResponseSetOption|undefined} value */ -proto.types.Response.prototype.setSetOption = function(value) { - jspb.Message.setOneofWrapperField(this, 5, proto.types.Response.oneofGroups_[0], value); -}; - - -proto.types.Response.prototype.clearSetOption = function() { - this.setSetOption(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Response.prototype.hasSetOption = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional ResponseInitChain init_chain = 6; - * @return {?proto.types.ResponseInitChain} - */ -proto.types.Response.prototype.getInitChain = function() { - return /** @type{?proto.types.ResponseInitChain} */ ( - jspb.Message.getWrapperField(this, proto.types.ResponseInitChain, 6)); -}; - - -/** @param {?proto.types.ResponseInitChain|undefined} value */ -proto.types.Response.prototype.setInitChain = function(value) { - jspb.Message.setOneofWrapperField(this, 6, proto.types.Response.oneofGroups_[0], value); -}; - - -proto.types.Response.prototype.clearInitChain = function() { - this.setInitChain(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Response.prototype.hasInitChain = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional ResponseQuery query = 7; - * @return {?proto.types.ResponseQuery} - */ -proto.types.Response.prototype.getQuery = function() { - return /** @type{?proto.types.ResponseQuery} */ ( - jspb.Message.getWrapperField(this, proto.types.ResponseQuery, 7)); -}; - - -/** @param {?proto.types.ResponseQuery|undefined} value */ -proto.types.Response.prototype.setQuery = function(value) { - jspb.Message.setOneofWrapperField(this, 7, proto.types.Response.oneofGroups_[0], value); -}; - - -proto.types.Response.prototype.clearQuery = function() { - this.setQuery(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Response.prototype.hasQuery = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional ResponseBeginBlock begin_block = 8; - * @return {?proto.types.ResponseBeginBlock} - */ -proto.types.Response.prototype.getBeginBlock = function() { - return /** @type{?proto.types.ResponseBeginBlock} */ ( - jspb.Message.getWrapperField(this, proto.types.ResponseBeginBlock, 8)); -}; - - -/** @param {?proto.types.ResponseBeginBlock|undefined} value */ -proto.types.Response.prototype.setBeginBlock = function(value) { - jspb.Message.setOneofWrapperField(this, 8, proto.types.Response.oneofGroups_[0], value); -}; - - -proto.types.Response.prototype.clearBeginBlock = function() { - this.setBeginBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Response.prototype.hasBeginBlock = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional ResponseCheckTx check_tx = 9; - * @return {?proto.types.ResponseCheckTx} - */ -proto.types.Response.prototype.getCheckTx = function() { - return /** @type{?proto.types.ResponseCheckTx} */ ( - jspb.Message.getWrapperField(this, proto.types.ResponseCheckTx, 9)); -}; - - -/** @param {?proto.types.ResponseCheckTx|undefined} value */ -proto.types.Response.prototype.setCheckTx = function(value) { - jspb.Message.setOneofWrapperField(this, 9, proto.types.Response.oneofGroups_[0], value); -}; - - -proto.types.Response.prototype.clearCheckTx = function() { - this.setCheckTx(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Response.prototype.hasCheckTx = function() { - return jspb.Message.getField(this, 9) != null; -}; - - -/** - * optional ResponseDeliverTx deliver_tx = 10; - * @return {?proto.types.ResponseDeliverTx} - */ -proto.types.Response.prototype.getDeliverTx = function() { - return /** @type{?proto.types.ResponseDeliverTx} */ ( - jspb.Message.getWrapperField(this, proto.types.ResponseDeliverTx, 10)); -}; - - -/** @param {?proto.types.ResponseDeliverTx|undefined} value */ -proto.types.Response.prototype.setDeliverTx = function(value) { - jspb.Message.setOneofWrapperField(this, 10, proto.types.Response.oneofGroups_[0], value); -}; - - -proto.types.Response.prototype.clearDeliverTx = function() { - this.setDeliverTx(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Response.prototype.hasDeliverTx = function() { - return jspb.Message.getField(this, 10) != null; -}; - - -/** - * optional ResponseEndBlock end_block = 11; - * @return {?proto.types.ResponseEndBlock} - */ -proto.types.Response.prototype.getEndBlock = function() { - return /** @type{?proto.types.ResponseEndBlock} */ ( - jspb.Message.getWrapperField(this, proto.types.ResponseEndBlock, 11)); -}; - - -/** @param {?proto.types.ResponseEndBlock|undefined} value */ -proto.types.Response.prototype.setEndBlock = function(value) { - jspb.Message.setOneofWrapperField(this, 11, proto.types.Response.oneofGroups_[0], value); -}; - - -proto.types.Response.prototype.clearEndBlock = function() { - this.setEndBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Response.prototype.hasEndBlock = function() { - return jspb.Message.getField(this, 11) != null; -}; - - -/** - * optional ResponseCommit commit = 12; - * @return {?proto.types.ResponseCommit} - */ -proto.types.Response.prototype.getCommit = function() { - return /** @type{?proto.types.ResponseCommit} */ ( - jspb.Message.getWrapperField(this, proto.types.ResponseCommit, 12)); -}; - - -/** @param {?proto.types.ResponseCommit|undefined} value */ -proto.types.Response.prototype.setCommit = function(value) { - jspb.Message.setOneofWrapperField(this, 12, proto.types.Response.oneofGroups_[0], value); -}; - - -proto.types.Response.prototype.clearCommit = function() { - this.setCommit(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Response.prototype.hasCommit = function() { - return jspb.Message.getField(this, 12) != null; -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseException = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseException, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ResponseException.displayName = 'proto.types.ResponseException'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ResponseException.prototype.toObject = function(opt_includeInstance) { - return proto.types.ResponseException.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ResponseException} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseException.toObject = function(includeInstance, msg) { - var f, obj = { - error: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ResponseException} - */ -proto.types.ResponseException.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ResponseException; - return proto.types.ResponseException.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ResponseException} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ResponseException} - */ -proto.types.ResponseException.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ResponseException.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ResponseException.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ResponseException} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseException.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string error = 1; - * @return {string} - */ -proto.types.ResponseException.prototype.getError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.types.ResponseException.prototype.setError = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseEcho = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseEcho, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ResponseEcho.displayName = 'proto.types.ResponseEcho'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ResponseEcho.prototype.toObject = function(opt_includeInstance) { - return proto.types.ResponseEcho.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ResponseEcho} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseEcho.toObject = function(includeInstance, msg) { - var f, obj = { - message: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ResponseEcho} - */ -proto.types.ResponseEcho.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ResponseEcho; - return proto.types.ResponseEcho.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ResponseEcho} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ResponseEcho} - */ -proto.types.ResponseEcho.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ResponseEcho.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ResponseEcho.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ResponseEcho} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseEcho.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string message = 1; - * @return {string} - */ -proto.types.ResponseEcho.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.types.ResponseEcho.prototype.setMessage = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseFlush = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseFlush, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ResponseFlush.displayName = 'proto.types.ResponseFlush'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ResponseFlush.prototype.toObject = function(opt_includeInstance) { - return proto.types.ResponseFlush.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ResponseFlush} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseFlush.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ResponseFlush} - */ -proto.types.ResponseFlush.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ResponseFlush; - return proto.types.ResponseFlush.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ResponseFlush} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ResponseFlush} - */ -proto.types.ResponseFlush.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ResponseFlush.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ResponseFlush.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ResponseFlush} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseFlush.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ResponseInfo.displayName = 'proto.types.ResponseInfo'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ResponseInfo.prototype.toObject = function(opt_includeInstance) { - return proto.types.ResponseInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ResponseInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseInfo.toObject = function(includeInstance, msg) { - var f, obj = { - data: jspb.Message.getFieldWithDefault(msg, 1, ""), - version: jspb.Message.getFieldWithDefault(msg, 2, ""), - lastBlockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), - lastBlockAppHash: msg.getLastBlockAppHash_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ResponseInfo} - */ -proto.types.ResponseInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ResponseInfo; - return proto.types.ResponseInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ResponseInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ResponseInfo} - */ -proto.types.ResponseInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setData(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLastBlockHeight(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastBlockAppHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ResponseInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ResponseInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ResponseInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getLastBlockHeight(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getLastBlockAppHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional string data = 1; - * @return {string} - */ -proto.types.ResponseInfo.prototype.getData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.types.ResponseInfo.prototype.setData = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string version = 2; - * @return {string} - */ -proto.types.ResponseInfo.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.types.ResponseInfo.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 last_block_height = 3; - * @return {number} - */ -proto.types.ResponseInfo.prototype.getLastBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.types.ResponseInfo.prototype.setLastBlockHeight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional bytes last_block_app_hash = 4; - * @return {!(string|Uint8Array)} - */ -proto.types.ResponseInfo.prototype.getLastBlockAppHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes last_block_app_hash = 4; - * This is a type-conversion wrapper around `getLastBlockAppHash()` - * @return {string} - */ -proto.types.ResponseInfo.prototype.getLastBlockAppHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastBlockAppHash())); -}; - - -/** - * optional bytes last_block_app_hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastBlockAppHash()` - * @return {!Uint8Array} - */ -proto.types.ResponseInfo.prototype.getLastBlockAppHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastBlockAppHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.ResponseInfo.prototype.setLastBlockAppHash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseSetOption = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseSetOption, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ResponseSetOption.displayName = 'proto.types.ResponseSetOption'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ResponseSetOption.prototype.toObject = function(opt_includeInstance) { - return proto.types.ResponseSetOption.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ResponseSetOption} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseSetOption.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - log: jspb.Message.getFieldWithDefault(msg, 3, ""), - info: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ResponseSetOption} - */ -proto.types.ResponseSetOption.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ResponseSetOption; - return proto.types.ResponseSetOption.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ResponseSetOption} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ResponseSetOption} - */ -proto.types.ResponseSetOption.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCode(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setLog(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setInfo(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ResponseSetOption.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ResponseSetOption.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ResponseSetOption} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseSetOption.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getLog(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getInfo(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional uint32 code = 1; - * @return {number} - */ -proto.types.ResponseSetOption.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.types.ResponseSetOption.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string log = 3; - * @return {string} - */ -proto.types.ResponseSetOption.prototype.getLog = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.types.ResponseSetOption.prototype.setLog = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string info = 4; - * @return {string} - */ -proto.types.ResponseSetOption.prototype.getInfo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.types.ResponseSetOption.prototype.setInfo = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseInitChain = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseInitChain.repeatedFields_, null); -}; -goog.inherits(proto.types.ResponseInitChain, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ResponseInitChain.displayName = 'proto.types.ResponseInitChain'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.types.ResponseInitChain.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ResponseInitChain.prototype.toObject = function(opt_includeInstance) { - return proto.types.ResponseInitChain.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ResponseInitChain} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseInitChain.toObject = function(includeInstance, msg) { - var f, obj = { - consensusParams: (f = msg.getConsensusParams()) && proto.types.ConsensusParams.toObject(includeInstance, f), - validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), - proto.types.ValidatorUpdate.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ResponseInitChain} - */ -proto.types.ResponseInitChain.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ResponseInitChain; - return proto.types.ResponseInitChain.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ResponseInitChain} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ResponseInitChain} - */ -proto.types.ResponseInitChain.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.types.ConsensusParams; - reader.readMessage(value,proto.types.ConsensusParams.deserializeBinaryFromReader); - msg.setConsensusParams(value); - break; - case 2: - var value = new proto.types.ValidatorUpdate; - reader.readMessage(value,proto.types.ValidatorUpdate.deserializeBinaryFromReader); - msg.addValidators(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ResponseInitChain.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ResponseInitChain.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ResponseInitChain} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseInitChain.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getConsensusParams(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.types.ConsensusParams.serializeBinaryToWriter - ); - } - f = message.getValidatorsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.types.ValidatorUpdate.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ConsensusParams consensus_params = 1; - * @return {?proto.types.ConsensusParams} - */ -proto.types.ResponseInitChain.prototype.getConsensusParams = function() { - return /** @type{?proto.types.ConsensusParams} */ ( - jspb.Message.getWrapperField(this, proto.types.ConsensusParams, 1)); -}; - - -/** @param {?proto.types.ConsensusParams|undefined} value */ -proto.types.ResponseInitChain.prototype.setConsensusParams = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.types.ResponseInitChain.prototype.clearConsensusParams = function() { - this.setConsensusParams(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.ResponseInitChain.prototype.hasConsensusParams = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated ValidatorUpdate validators = 2; - * @return {!Array} - */ -proto.types.ResponseInitChain.prototype.getValidatorsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.types.ValidatorUpdate, 2)); -}; - - -/** @param {!Array} value */ -proto.types.ResponseInitChain.prototype.setValidatorsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.types.ValidatorUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.types.ValidatorUpdate} - */ -proto.types.ResponseInitChain.prototype.addValidators = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.types.ValidatorUpdate, opt_index); -}; - - -proto.types.ResponseInitChain.prototype.clearValidatorsList = function() { - this.setValidatorsList([]); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseQuery = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseQuery, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ResponseQuery.displayName = 'proto.types.ResponseQuery'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ResponseQuery.prototype.toObject = function(opt_includeInstance) { - return proto.types.ResponseQuery.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ResponseQuery} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseQuery.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - log: jspb.Message.getFieldWithDefault(msg, 3, ""), - info: jspb.Message.getFieldWithDefault(msg, 4, ""), - index: jspb.Message.getFieldWithDefault(msg, 5, 0), - key: msg.getKey_asB64(), - value: msg.getValue_asB64(), - proof: msg.getProof_asB64(), - height: jspb.Message.getFieldWithDefault(msg, 9, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ResponseQuery} - */ -proto.types.ResponseQuery.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ResponseQuery; - return proto.types.ResponseQuery.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ResponseQuery} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ResponseQuery} - */ -proto.types.ResponseQuery.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCode(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setLog(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setInfo(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setIndex(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setKey(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValue(value); - break; - case 8: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProof(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setHeight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ResponseQuery.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ResponseQuery.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ResponseQuery} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseQuery.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getLog(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getInfo(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getIndex(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 6, - f - ); - } - f = message.getValue_asU8(); - if (f.length > 0) { - writer.writeBytes( - 7, - f - ); - } - f = message.getProof_asU8(); - if (f.length > 0) { - writer.writeBytes( - 8, - f - ); - } - f = message.getHeight(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } -}; - - -/** - * optional uint32 code = 1; - * @return {number} - */ -proto.types.ResponseQuery.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.types.ResponseQuery.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string log = 3; - * @return {string} - */ -proto.types.ResponseQuery.prototype.getLog = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.types.ResponseQuery.prototype.setLog = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string info = 4; - * @return {string} - */ -proto.types.ResponseQuery.prototype.getInfo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.types.ResponseQuery.prototype.setInfo = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional int64 index = 5; - * @return {number} - */ -proto.types.ResponseQuery.prototype.getIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.types.ResponseQuery.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional bytes key = 6; - * @return {!(string|Uint8Array)} - */ -proto.types.ResponseQuery.prototype.getKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes key = 6; - * This is a type-conversion wrapper around `getKey()` - * @return {string} - */ -proto.types.ResponseQuery.prototype.getKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKey())); -}; - - -/** - * optional bytes key = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKey()` - * @return {!Uint8Array} - */ -proto.types.ResponseQuery.prototype.getKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKey())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.ResponseQuery.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 6, value); -}; - - -/** - * optional bytes value = 7; - * @return {!(string|Uint8Array)} - */ -proto.types.ResponseQuery.prototype.getValue = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes value = 7; - * This is a type-conversion wrapper around `getValue()` - * @return {string} - */ -proto.types.ResponseQuery.prototype.getValue_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValue())); -}; - - -/** - * optional bytes value = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValue()` - * @return {!Uint8Array} - */ -proto.types.ResponseQuery.prototype.getValue_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValue())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.ResponseQuery.prototype.setValue = function(value) { - jspb.Message.setProto3BytesField(this, 7, value); -}; - - -/** - * optional bytes proof = 8; - * @return {!(string|Uint8Array)} - */ -proto.types.ResponseQuery.prototype.getProof = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * optional bytes proof = 8; - * This is a type-conversion wrapper around `getProof()` - * @return {string} - */ -proto.types.ResponseQuery.prototype.getProof_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProof())); -}; - - -/** - * optional bytes proof = 8; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProof()` - * @return {!Uint8Array} - */ -proto.types.ResponseQuery.prototype.getProof_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProof())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.ResponseQuery.prototype.setProof = function(value) { - jspb.Message.setProto3BytesField(this, 8, value); -}; - - -/** - * optional int64 height = 9; - * @return {number} - */ -proto.types.ResponseQuery.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** @param {number} value */ -proto.types.ResponseQuery.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 9, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseBeginBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseBeginBlock.repeatedFields_, null); -}; -goog.inherits(proto.types.ResponseBeginBlock, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ResponseBeginBlock.displayName = 'proto.types.ResponseBeginBlock'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.types.ResponseBeginBlock.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ResponseBeginBlock.prototype.toObject = function(opt_includeInstance) { - return proto.types.ResponseBeginBlock.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ResponseBeginBlock} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseBeginBlock.toObject = function(includeInstance, msg) { - var f, obj = { - tagsList: jspb.Message.toObjectList(msg.getTagsList(), - github_com_tendermint_tendermint_libs_common_types_pb.KVPair.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ResponseBeginBlock} - */ -proto.types.ResponseBeginBlock.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ResponseBeginBlock; - return proto.types.ResponseBeginBlock.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ResponseBeginBlock} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ResponseBeginBlock} - */ -proto.types.ResponseBeginBlock.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new github_com_tendermint_tendermint_libs_common_types_pb.KVPair; - reader.readMessage(value,github_com_tendermint_tendermint_libs_common_types_pb.KVPair.deserializeBinaryFromReader); - msg.addTags(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ResponseBeginBlock.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ResponseBeginBlock.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ResponseBeginBlock} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseBeginBlock.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTagsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - github_com_tendermint_tendermint_libs_common_types_pb.KVPair.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated common.KVPair tags = 1; - * @return {!Array} - */ -proto.types.ResponseBeginBlock.prototype.getTagsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, github_com_tendermint_tendermint_libs_common_types_pb.KVPair, 1)); -}; - - -/** @param {!Array} value */ -proto.types.ResponseBeginBlock.prototype.setTagsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.common.KVPair=} opt_value - * @param {number=} opt_index - * @return {!proto.common.KVPair} - */ -proto.types.ResponseBeginBlock.prototype.addTags = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.common.KVPair, opt_index); -}; - - -proto.types.ResponseBeginBlock.prototype.clearTagsList = function() { - this.setTagsList([]); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseCheckTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseCheckTx.repeatedFields_, null); -}; -goog.inherits(proto.types.ResponseCheckTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ResponseCheckTx.displayName = 'proto.types.ResponseCheckTx'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.types.ResponseCheckTx.repeatedFields_ = [7]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { - return proto.types.ResponseCheckTx.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ResponseCheckTx} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseCheckTx.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - data: msg.getData_asB64(), - log: jspb.Message.getFieldWithDefault(msg, 3, ""), - info: jspb.Message.getFieldWithDefault(msg, 4, ""), - gasWanted: jspb.Message.getFieldWithDefault(msg, 5, 0), - gasUsed: jspb.Message.getFieldWithDefault(msg, 6, 0), - tagsList: jspb.Message.toObjectList(msg.getTagsList(), - github_com_tendermint_tendermint_libs_common_types_pb.KVPair.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ResponseCheckTx} - */ -proto.types.ResponseCheckTx.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ResponseCheckTx; - return proto.types.ResponseCheckTx.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ResponseCheckTx} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ResponseCheckTx} - */ -proto.types.ResponseCheckTx.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCode(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setLog(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setInfo(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setGasWanted(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setGasUsed(value); - break; - case 7: - var value = new github_com_tendermint_tendermint_libs_common_types_pb.KVPair; - reader.readMessage(value,github_com_tendermint_tendermint_libs_common_types_pb.KVPair.deserializeBinaryFromReader); - msg.addTags(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ResponseCheckTx.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ResponseCheckTx.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ResponseCheckTx} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseCheckTx.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getLog(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getInfo(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getGasWanted(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getGasUsed(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getTagsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - github_com_tendermint_tendermint_libs_common_types_pb.KVPair.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint32 code = 1; - * @return {number} - */ -proto.types.ResponseCheckTx.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.types.ResponseCheckTx.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes data = 2; - * @return {!(string|Uint8Array)} - */ -proto.types.ResponseCheckTx.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes data = 2; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.types.ResponseCheckTx.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.types.ResponseCheckTx.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.ResponseCheckTx.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional string log = 3; - * @return {string} - */ -proto.types.ResponseCheckTx.prototype.getLog = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.types.ResponseCheckTx.prototype.setLog = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string info = 4; - * @return {string} - */ -proto.types.ResponseCheckTx.prototype.getInfo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.types.ResponseCheckTx.prototype.setInfo = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional int64 gas_wanted = 5; - * @return {number} - */ -proto.types.ResponseCheckTx.prototype.getGasWanted = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.types.ResponseCheckTx.prototype.setGasWanted = function(value) { - jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 gas_used = 6; - * @return {number} - */ -proto.types.ResponseCheckTx.prototype.getGasUsed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.types.ResponseCheckTx.prototype.setGasUsed = function(value) { - jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * repeated common.KVPair tags = 7; - * @return {!Array} - */ -proto.types.ResponseCheckTx.prototype.getTagsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, github_com_tendermint_tendermint_libs_common_types_pb.KVPair, 7)); -}; - - -/** @param {!Array} value */ -proto.types.ResponseCheckTx.prototype.setTagsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - - -/** - * @param {!proto.common.KVPair=} opt_value - * @param {number=} opt_index - * @return {!proto.common.KVPair} - */ -proto.types.ResponseCheckTx.prototype.addTags = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.common.KVPair, opt_index); -}; - - -proto.types.ResponseCheckTx.prototype.clearTagsList = function() { - this.setTagsList([]); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseDeliverTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseDeliverTx.repeatedFields_, null); -}; -goog.inherits(proto.types.ResponseDeliverTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ResponseDeliverTx.displayName = 'proto.types.ResponseDeliverTx'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.types.ResponseDeliverTx.repeatedFields_ = [7]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ResponseDeliverTx.prototype.toObject = function(opt_includeInstance) { - return proto.types.ResponseDeliverTx.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ResponseDeliverTx} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseDeliverTx.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - data: msg.getData_asB64(), - log: jspb.Message.getFieldWithDefault(msg, 3, ""), - info: jspb.Message.getFieldWithDefault(msg, 4, ""), - gasWanted: jspb.Message.getFieldWithDefault(msg, 5, 0), - gasUsed: jspb.Message.getFieldWithDefault(msg, 6, 0), - tagsList: jspb.Message.toObjectList(msg.getTagsList(), - github_com_tendermint_tendermint_libs_common_types_pb.KVPair.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ResponseDeliverTx} - */ -proto.types.ResponseDeliverTx.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ResponseDeliverTx; - return proto.types.ResponseDeliverTx.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ResponseDeliverTx} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ResponseDeliverTx} - */ -proto.types.ResponseDeliverTx.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCode(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setLog(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setInfo(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setGasWanted(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setGasUsed(value); - break; - case 7: - var value = new github_com_tendermint_tendermint_libs_common_types_pb.KVPair; - reader.readMessage(value,github_com_tendermint_tendermint_libs_common_types_pb.KVPair.deserializeBinaryFromReader); - msg.addTags(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ResponseDeliverTx.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ResponseDeliverTx.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ResponseDeliverTx} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseDeliverTx.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getLog(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getInfo(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getGasWanted(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getGasUsed(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getTagsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - github_com_tendermint_tendermint_libs_common_types_pb.KVPair.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint32 code = 1; - * @return {number} - */ -proto.types.ResponseDeliverTx.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.types.ResponseDeliverTx.prototype.setCode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes data = 2; - * @return {!(string|Uint8Array)} - */ -proto.types.ResponseDeliverTx.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes data = 2; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.types.ResponseDeliverTx.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.types.ResponseDeliverTx.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.ResponseDeliverTx.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional string log = 3; - * @return {string} - */ -proto.types.ResponseDeliverTx.prototype.getLog = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.types.ResponseDeliverTx.prototype.setLog = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string info = 4; - * @return {string} - */ -proto.types.ResponseDeliverTx.prototype.getInfo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.types.ResponseDeliverTx.prototype.setInfo = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional int64 gas_wanted = 5; - * @return {number} - */ -proto.types.ResponseDeliverTx.prototype.getGasWanted = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.types.ResponseDeliverTx.prototype.setGasWanted = function(value) { - jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 gas_used = 6; - * @return {number} - */ -proto.types.ResponseDeliverTx.prototype.getGasUsed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.types.ResponseDeliverTx.prototype.setGasUsed = function(value) { - jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * repeated common.KVPair tags = 7; - * @return {!Array} - */ -proto.types.ResponseDeliverTx.prototype.getTagsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, github_com_tendermint_tendermint_libs_common_types_pb.KVPair, 7)); -}; - - -/** @param {!Array} value */ -proto.types.ResponseDeliverTx.prototype.setTagsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - - -/** - * @param {!proto.common.KVPair=} opt_value - * @param {number=} opt_index - * @return {!proto.common.KVPair} - */ -proto.types.ResponseDeliverTx.prototype.addTags = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.common.KVPair, opt_index); -}; - - -proto.types.ResponseDeliverTx.prototype.clearTagsList = function() { - this.setTagsList([]); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseEndBlock = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.ResponseEndBlock.repeatedFields_, null); -}; -goog.inherits(proto.types.ResponseEndBlock, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ResponseEndBlock.displayName = 'proto.types.ResponseEndBlock'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.types.ResponseEndBlock.repeatedFields_ = [1,3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ResponseEndBlock.prototype.toObject = function(opt_includeInstance) { - return proto.types.ResponseEndBlock.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ResponseEndBlock} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseEndBlock.toObject = function(includeInstance, msg) { - var f, obj = { - validatorUpdatesList: jspb.Message.toObjectList(msg.getValidatorUpdatesList(), - proto.types.ValidatorUpdate.toObject, includeInstance), - consensusParamUpdates: (f = msg.getConsensusParamUpdates()) && proto.types.ConsensusParams.toObject(includeInstance, f), - tagsList: jspb.Message.toObjectList(msg.getTagsList(), - github_com_tendermint_tendermint_libs_common_types_pb.KVPair.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ResponseEndBlock} - */ -proto.types.ResponseEndBlock.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ResponseEndBlock; - return proto.types.ResponseEndBlock.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ResponseEndBlock} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ResponseEndBlock} - */ -proto.types.ResponseEndBlock.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.types.ValidatorUpdate; - reader.readMessage(value,proto.types.ValidatorUpdate.deserializeBinaryFromReader); - msg.addValidatorUpdates(value); - break; - case 2: - var value = new proto.types.ConsensusParams; - reader.readMessage(value,proto.types.ConsensusParams.deserializeBinaryFromReader); - msg.setConsensusParamUpdates(value); - break; - case 3: - var value = new github_com_tendermint_tendermint_libs_common_types_pb.KVPair; - reader.readMessage(value,github_com_tendermint_tendermint_libs_common_types_pb.KVPair.deserializeBinaryFromReader); - msg.addTags(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ResponseEndBlock.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ResponseEndBlock.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ResponseEndBlock} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseEndBlock.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValidatorUpdatesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.types.ValidatorUpdate.serializeBinaryToWriter - ); - } - f = message.getConsensusParamUpdates(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.types.ConsensusParams.serializeBinaryToWriter - ); - } - f = message.getTagsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - github_com_tendermint_tendermint_libs_common_types_pb.KVPair.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated ValidatorUpdate validator_updates = 1; - * @return {!Array} - */ -proto.types.ResponseEndBlock.prototype.getValidatorUpdatesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.types.ValidatorUpdate, 1)); -}; - - -/** @param {!Array} value */ -proto.types.ResponseEndBlock.prototype.setValidatorUpdatesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.types.ValidatorUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.types.ValidatorUpdate} - */ -proto.types.ResponseEndBlock.prototype.addValidatorUpdates = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.types.ValidatorUpdate, opt_index); -}; - - -proto.types.ResponseEndBlock.prototype.clearValidatorUpdatesList = function() { - this.setValidatorUpdatesList([]); -}; - - -/** - * optional ConsensusParams consensus_param_updates = 2; - * @return {?proto.types.ConsensusParams} - */ -proto.types.ResponseEndBlock.prototype.getConsensusParamUpdates = function() { - return /** @type{?proto.types.ConsensusParams} */ ( - jspb.Message.getWrapperField(this, proto.types.ConsensusParams, 2)); -}; - - -/** @param {?proto.types.ConsensusParams|undefined} value */ -proto.types.ResponseEndBlock.prototype.setConsensusParamUpdates = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.types.ResponseEndBlock.prototype.clearConsensusParamUpdates = function() { - this.setConsensusParamUpdates(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.ResponseEndBlock.prototype.hasConsensusParamUpdates = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * repeated common.KVPair tags = 3; - * @return {!Array} - */ -proto.types.ResponseEndBlock.prototype.getTagsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, github_com_tendermint_tendermint_libs_common_types_pb.KVPair, 3)); -}; - - -/** @param {!Array} value */ -proto.types.ResponseEndBlock.prototype.setTagsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.common.KVPair=} opt_value - * @param {number=} opt_index - * @return {!proto.common.KVPair} - */ -proto.types.ResponseEndBlock.prototype.addTags = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.common.KVPair, opt_index); -}; - - -proto.types.ResponseEndBlock.prototype.clearTagsList = function() { - this.setTagsList([]); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ResponseCommit = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ResponseCommit, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ResponseCommit.displayName = 'proto.types.ResponseCommit'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ResponseCommit.prototype.toObject = function(opt_includeInstance) { - return proto.types.ResponseCommit.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ResponseCommit} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseCommit.toObject = function(includeInstance, msg) { - var f, obj = { - data: msg.getData_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ResponseCommit} - */ -proto.types.ResponseCommit.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ResponseCommit; - return proto.types.ResponseCommit.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ResponseCommit} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ResponseCommit} - */ -proto.types.ResponseCommit.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ResponseCommit.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ResponseCommit.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ResponseCommit} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ResponseCommit.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes data = 2; - * @return {!(string|Uint8Array)} - */ -proto.types.ResponseCommit.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes data = 2; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.types.ResponseCommit.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.types.ResponseCommit.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.ResponseCommit.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ConsensusParams = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ConsensusParams, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ConsensusParams.displayName = 'proto.types.ConsensusParams'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ConsensusParams.prototype.toObject = function(opt_includeInstance) { - return proto.types.ConsensusParams.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ConsensusParams} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ConsensusParams.toObject = function(includeInstance, msg) { - var f, obj = { - blockSize: (f = msg.getBlockSize()) && proto.types.BlockSize.toObject(includeInstance, f), - txSize: (f = msg.getTxSize()) && proto.types.TxSize.toObject(includeInstance, f), - blockGossip: (f = msg.getBlockGossip()) && proto.types.BlockGossip.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ConsensusParams} - */ -proto.types.ConsensusParams.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ConsensusParams; - return proto.types.ConsensusParams.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ConsensusParams} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ConsensusParams} - */ -proto.types.ConsensusParams.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.types.BlockSize; - reader.readMessage(value,proto.types.BlockSize.deserializeBinaryFromReader); - msg.setBlockSize(value); - break; - case 2: - var value = new proto.types.TxSize; - reader.readMessage(value,proto.types.TxSize.deserializeBinaryFromReader); - msg.setTxSize(value); - break; - case 3: - var value = new proto.types.BlockGossip; - reader.readMessage(value,proto.types.BlockGossip.deserializeBinaryFromReader); - msg.setBlockGossip(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ConsensusParams.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ConsensusParams.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ConsensusParams} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ConsensusParams.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBlockSize(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.types.BlockSize.serializeBinaryToWriter - ); - } - f = message.getTxSize(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.types.TxSize.serializeBinaryToWriter - ); - } - f = message.getBlockGossip(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.types.BlockGossip.serializeBinaryToWriter - ); - } -}; - - -/** - * optional BlockSize block_size = 1; - * @return {?proto.types.BlockSize} - */ -proto.types.ConsensusParams.prototype.getBlockSize = function() { - return /** @type{?proto.types.BlockSize} */ ( - jspb.Message.getWrapperField(this, proto.types.BlockSize, 1)); -}; - - -/** @param {?proto.types.BlockSize|undefined} value */ -proto.types.ConsensusParams.prototype.setBlockSize = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.types.ConsensusParams.prototype.clearBlockSize = function() { - this.setBlockSize(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.ConsensusParams.prototype.hasBlockSize = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional TxSize tx_size = 2; - * @return {?proto.types.TxSize} - */ -proto.types.ConsensusParams.prototype.getTxSize = function() { - return /** @type{?proto.types.TxSize} */ ( - jspb.Message.getWrapperField(this, proto.types.TxSize, 2)); -}; - - -/** @param {?proto.types.TxSize|undefined} value */ -proto.types.ConsensusParams.prototype.setTxSize = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.types.ConsensusParams.prototype.clearTxSize = function() { - this.setTxSize(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.ConsensusParams.prototype.hasTxSize = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional BlockGossip block_gossip = 3; - * @return {?proto.types.BlockGossip} - */ -proto.types.ConsensusParams.prototype.getBlockGossip = function() { - return /** @type{?proto.types.BlockGossip} */ ( - jspb.Message.getWrapperField(this, proto.types.BlockGossip, 3)); -}; - - -/** @param {?proto.types.BlockGossip|undefined} value */ -proto.types.ConsensusParams.prototype.setBlockGossip = function(value) { - jspb.Message.setWrapperField(this, 3, value); -}; - - -proto.types.ConsensusParams.prototype.clearBlockGossip = function() { - this.setBlockGossip(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.ConsensusParams.prototype.hasBlockGossip = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.BlockSize = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.BlockSize, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.BlockSize.displayName = 'proto.types.BlockSize'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.BlockSize.prototype.toObject = function(opt_includeInstance) { - return proto.types.BlockSize.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.BlockSize} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.BlockSize.toObject = function(includeInstance, msg) { - var f, obj = { - maxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxGas: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.BlockSize} - */ -proto.types.BlockSize.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.BlockSize; - return proto.types.BlockSize.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.BlockSize} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.BlockSize} - */ -proto.types.BlockSize.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMaxBytes(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxGas(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.BlockSize.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.BlockSize.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.BlockSize} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.BlockSize.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMaxBytes(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getMaxGas(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional int32 max_bytes = 1; - * @return {number} - */ -proto.types.BlockSize.prototype.getMaxBytes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.types.BlockSize.prototype.setMaxBytes = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 max_gas = 2; - * @return {number} - */ -proto.types.BlockSize.prototype.getMaxGas = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.types.BlockSize.prototype.setMaxGas = function(value) { - jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.TxSize = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.TxSize, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.TxSize.displayName = 'proto.types.TxSize'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.TxSize.prototype.toObject = function(opt_includeInstance) { - return proto.types.TxSize.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.TxSize} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.TxSize.toObject = function(includeInstance, msg) { - var f, obj = { - maxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxGas: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.TxSize} - */ -proto.types.TxSize.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.TxSize; - return proto.types.TxSize.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.TxSize} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.TxSize} - */ -proto.types.TxSize.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMaxBytes(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxGas(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.TxSize.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.TxSize.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.TxSize} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.TxSize.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMaxBytes(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getMaxGas(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional int32 max_bytes = 1; - * @return {number} - */ -proto.types.TxSize.prototype.getMaxBytes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.types.TxSize.prototype.setMaxBytes = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 max_gas = 2; - * @return {number} - */ -proto.types.TxSize.prototype.getMaxGas = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.types.TxSize.prototype.setMaxGas = function(value) { - jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.BlockGossip = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.BlockGossip, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.BlockGossip.displayName = 'proto.types.BlockGossip'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.BlockGossip.prototype.toObject = function(opt_includeInstance) { - return proto.types.BlockGossip.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.BlockGossip} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.BlockGossip.toObject = function(includeInstance, msg) { - var f, obj = { - blockPartSizeBytes: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.BlockGossip} - */ -proto.types.BlockGossip.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.BlockGossip; - return proto.types.BlockGossip.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.BlockGossip} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.BlockGossip} - */ -proto.types.BlockGossip.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlockPartSizeBytes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.BlockGossip.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.BlockGossip.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.BlockGossip} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.BlockGossip.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBlockPartSizeBytes(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } -}; - - -/** - * optional int32 block_part_size_bytes = 1; - * @return {number} - */ -proto.types.BlockGossip.prototype.getBlockPartSizeBytes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.types.BlockGossip.prototype.setBlockPartSizeBytes = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.LastCommitInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.types.LastCommitInfo.repeatedFields_, null); -}; -goog.inherits(proto.types.LastCommitInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.LastCommitInfo.displayName = 'proto.types.LastCommitInfo'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.types.LastCommitInfo.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.LastCommitInfo.prototype.toObject = function(opt_includeInstance) { - return proto.types.LastCommitInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.LastCommitInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.LastCommitInfo.toObject = function(includeInstance, msg) { - var f, obj = { - round: jspb.Message.getFieldWithDefault(msg, 1, 0), - votesList: jspb.Message.toObjectList(msg.getVotesList(), - proto.types.VoteInfo.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.LastCommitInfo} - */ -proto.types.LastCommitInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.LastCommitInfo; - return proto.types.LastCommitInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.LastCommitInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.LastCommitInfo} - */ -proto.types.LastCommitInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRound(value); - break; - case 2: - var value = new proto.types.VoteInfo; - reader.readMessage(value,proto.types.VoteInfo.deserializeBinaryFromReader); - msg.addVotes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.LastCommitInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.LastCommitInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.LastCommitInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.LastCommitInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRound(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.types.VoteInfo.serializeBinaryToWriter - ); - } -}; - - -/** - * optional int32 round = 1; - * @return {number} - */ -proto.types.LastCommitInfo.prototype.getRound = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.types.LastCommitInfo.prototype.setRound = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * repeated VoteInfo votes = 2; - * @return {!Array} - */ -proto.types.LastCommitInfo.prototype.getVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.types.VoteInfo, 2)); -}; - - -/** @param {!Array} value */ -proto.types.LastCommitInfo.prototype.setVotesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.types.VoteInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.types.VoteInfo} - */ -proto.types.LastCommitInfo.prototype.addVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.types.VoteInfo, opt_index); -}; - - -proto.types.LastCommitInfo.prototype.clearVotesList = function() { - this.setVotesList([]); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.Header = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.Header, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.Header.displayName = 'proto.types.Header'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.Header.prototype.toObject = function(opt_includeInstance) { - return proto.types.Header.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.Header} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.Header.toObject = function(includeInstance, msg) { - var f, obj = { - chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), - height: jspb.Message.getFieldWithDefault(msg, 2, 0), - time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - numTxs: jspb.Message.getFieldWithDefault(msg, 4, 0), - totalTxs: jspb.Message.getFieldWithDefault(msg, 5, 0), - lastBlockId: (f = msg.getLastBlockId()) && proto.types.BlockID.toObject(includeInstance, f), - lastCommitHash: msg.getLastCommitHash_asB64(), - dataHash: msg.getDataHash_asB64(), - validatorsHash: msg.getValidatorsHash_asB64(), - nextValidatorsHash: msg.getNextValidatorsHash_asB64(), - consensusHash: msg.getConsensusHash_asB64(), - appHash: msg.getAppHash_asB64(), - lastResultsHash: msg.getLastResultsHash_asB64(), - evidenceHash: msg.getEvidenceHash_asB64(), - proposerAddress: msg.getProposerAddress_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.Header} - */ -proto.types.Header.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.Header; - return proto.types.Header.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.Header} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.Header} - */ -proto.types.Header.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChainId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setHeight(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTime(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNumTxs(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalTxs(value); - break; - case 6: - var value = new proto.types.BlockID; - reader.readMessage(value,proto.types.BlockID.deserializeBinaryFromReader); - msg.setLastBlockId(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastCommitHash(value); - break; - case 8: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDataHash(value); - break; - case 9: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValidatorsHash(value); - break; - case 10: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNextValidatorsHash(value); - break; - case 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setConsensusHash(value); - break; - case 12: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAppHash(value); - break; - case 13: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastResultsHash(value); - break; - case 14: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEvidenceHash(value); - break; - case 15: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProposerAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.Header.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.Header.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.Header} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.Header.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChainId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHeight(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getNumTxs(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getTotalTxs(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getLastBlockId(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.types.BlockID.serializeBinaryToWriter - ); - } - f = message.getLastCommitHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 7, - f - ); - } - f = message.getDataHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 8, - f - ); - } - f = message.getValidatorsHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 9, - f - ); - } - f = message.getNextValidatorsHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 10, - f - ); - } - f = message.getConsensusHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 11, - f - ); - } - f = message.getAppHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 12, - f - ); - } - f = message.getLastResultsHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 13, - f - ); - } - f = message.getEvidenceHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 14, - f - ); - } - f = message.getProposerAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 15, - f - ); - } -}; - - -/** - * optional string chain_id = 1; - * @return {string} - */ -proto.types.Header.prototype.getChainId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.types.Header.prototype.setChainId = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 height = 2; - * @return {number} - */ -proto.types.Header.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.types.Header.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional google.protobuf.Timestamp time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.types.Header.prototype.getTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ -proto.types.Header.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 3, value); -}; - - -proto.types.Header.prototype.clearTime = function() { - this.setTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Header.prototype.hasTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional int64 num_txs = 4; - * @return {number} - */ -proto.types.Header.prototype.getNumTxs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.types.Header.prototype.setNumTxs = function(value) { - jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 total_txs = 5; - * @return {number} - */ -proto.types.Header.prototype.getTotalTxs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.types.Header.prototype.setTotalTxs = function(value) { - jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional BlockID last_block_id = 6; - * @return {?proto.types.BlockID} - */ -proto.types.Header.prototype.getLastBlockId = function() { - return /** @type{?proto.types.BlockID} */ ( - jspb.Message.getWrapperField(this, proto.types.BlockID, 6)); -}; - - -/** @param {?proto.types.BlockID|undefined} value */ -proto.types.Header.prototype.setLastBlockId = function(value) { - jspb.Message.setWrapperField(this, 6, value); -}; - - -proto.types.Header.prototype.clearLastBlockId = function() { - this.setLastBlockId(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Header.prototype.hasLastBlockId = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional bytes last_commit_hash = 7; - * @return {!(string|Uint8Array)} - */ -proto.types.Header.prototype.getLastCommitHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * optional bytes last_commit_hash = 7; - * This is a type-conversion wrapper around `getLastCommitHash()` - * @return {string} - */ -proto.types.Header.prototype.getLastCommitHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastCommitHash())); -}; - - -/** - * optional bytes last_commit_hash = 7; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastCommitHash()` - * @return {!Uint8Array} - */ -proto.types.Header.prototype.getLastCommitHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastCommitHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.Header.prototype.setLastCommitHash = function(value) { - jspb.Message.setProto3BytesField(this, 7, value); -}; - - -/** - * optional bytes data_hash = 8; - * @return {!(string|Uint8Array)} - */ -proto.types.Header.prototype.getDataHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * optional bytes data_hash = 8; - * This is a type-conversion wrapper around `getDataHash()` - * @return {string} - */ -proto.types.Header.prototype.getDataHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDataHash())); -}; - - -/** - * optional bytes data_hash = 8; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDataHash()` - * @return {!Uint8Array} - */ -proto.types.Header.prototype.getDataHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDataHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.Header.prototype.setDataHash = function(value) { - jspb.Message.setProto3BytesField(this, 8, value); -}; - - -/** - * optional bytes validators_hash = 9; - * @return {!(string|Uint8Array)} - */ -proto.types.Header.prototype.getValidatorsHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * optional bytes validators_hash = 9; - * This is a type-conversion wrapper around `getValidatorsHash()` - * @return {string} - */ -proto.types.Header.prototype.getValidatorsHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValidatorsHash())); -}; - - -/** - * optional bytes validators_hash = 9; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValidatorsHash()` - * @return {!Uint8Array} - */ -proto.types.Header.prototype.getValidatorsHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValidatorsHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.Header.prototype.setValidatorsHash = function(value) { - jspb.Message.setProto3BytesField(this, 9, value); -}; - - -/** - * optional bytes next_validators_hash = 10; - * @return {!(string|Uint8Array)} - */ -proto.types.Header.prototype.getNextValidatorsHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * optional bytes next_validators_hash = 10; - * This is a type-conversion wrapper around `getNextValidatorsHash()` - * @return {string} - */ -proto.types.Header.prototype.getNextValidatorsHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNextValidatorsHash())); -}; - - -/** - * optional bytes next_validators_hash = 10; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNextValidatorsHash()` - * @return {!Uint8Array} - */ -proto.types.Header.prototype.getNextValidatorsHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNextValidatorsHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.Header.prototype.setNextValidatorsHash = function(value) { - jspb.Message.setProto3BytesField(this, 10, value); -}; - - -/** - * optional bytes consensus_hash = 11; - * @return {!(string|Uint8Array)} - */ -proto.types.Header.prototype.getConsensusHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** - * optional bytes consensus_hash = 11; - * This is a type-conversion wrapper around `getConsensusHash()` - * @return {string} - */ -proto.types.Header.prototype.getConsensusHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getConsensusHash())); -}; - - -/** - * optional bytes consensus_hash = 11; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getConsensusHash()` - * @return {!Uint8Array} - */ -proto.types.Header.prototype.getConsensusHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getConsensusHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.Header.prototype.setConsensusHash = function(value) { - jspb.Message.setProto3BytesField(this, 11, value); -}; - - -/** - * optional bytes app_hash = 12; - * @return {!(string|Uint8Array)} - */ -proto.types.Header.prototype.getAppHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** - * optional bytes app_hash = 12; - * This is a type-conversion wrapper around `getAppHash()` - * @return {string} - */ -proto.types.Header.prototype.getAppHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAppHash())); -}; - - -/** - * optional bytes app_hash = 12; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAppHash()` - * @return {!Uint8Array} - */ -proto.types.Header.prototype.getAppHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAppHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.Header.prototype.setAppHash = function(value) { - jspb.Message.setProto3BytesField(this, 12, value); -}; - - -/** - * optional bytes last_results_hash = 13; - * @return {!(string|Uint8Array)} - */ -proto.types.Header.prototype.getLastResultsHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); -}; - - -/** - * optional bytes last_results_hash = 13; - * This is a type-conversion wrapper around `getLastResultsHash()` - * @return {string} - */ -proto.types.Header.prototype.getLastResultsHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastResultsHash())); -}; - - -/** - * optional bytes last_results_hash = 13; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastResultsHash()` - * @return {!Uint8Array} - */ -proto.types.Header.prototype.getLastResultsHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastResultsHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.Header.prototype.setLastResultsHash = function(value) { - jspb.Message.setProto3BytesField(this, 13, value); -}; - - -/** - * optional bytes evidence_hash = 14; - * @return {!(string|Uint8Array)} - */ -proto.types.Header.prototype.getEvidenceHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, "")); -}; - - -/** - * optional bytes evidence_hash = 14; - * This is a type-conversion wrapper around `getEvidenceHash()` - * @return {string} - */ -proto.types.Header.prototype.getEvidenceHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEvidenceHash())); -}; - - -/** - * optional bytes evidence_hash = 14; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEvidenceHash()` - * @return {!Uint8Array} - */ -proto.types.Header.prototype.getEvidenceHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEvidenceHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.Header.prototype.setEvidenceHash = function(value) { - jspb.Message.setProto3BytesField(this, 14, value); -}; - - -/** - * optional bytes proposer_address = 15; - * @return {!(string|Uint8Array)} - */ -proto.types.Header.prototype.getProposerAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); -}; - - -/** - * optional bytes proposer_address = 15; - * This is a type-conversion wrapper around `getProposerAddress()` - * @return {string} - */ -proto.types.Header.prototype.getProposerAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProposerAddress())); -}; - - -/** - * optional bytes proposer_address = 15; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProposerAddress()` - * @return {!Uint8Array} - */ -proto.types.Header.prototype.getProposerAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProposerAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.Header.prototype.setProposerAddress = function(value) { - jspb.Message.setProto3BytesField(this, 15, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.BlockID = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.BlockID, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.BlockID.displayName = 'proto.types.BlockID'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.BlockID.prototype.toObject = function(opt_includeInstance) { - return proto.types.BlockID.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.BlockID} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.BlockID.toObject = function(includeInstance, msg) { - var f, obj = { - hash: msg.getHash_asB64(), - partsHeader: (f = msg.getPartsHeader()) && proto.types.PartSetHeader.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.BlockID} - */ -proto.types.BlockID.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.BlockID; - return proto.types.BlockID.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.BlockID} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.BlockID} - */ -proto.types.BlockID.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); - break; - case 2: - var value = new proto.types.PartSetHeader; - reader.readMessage(value,proto.types.PartSetHeader.deserializeBinaryFromReader); - msg.setPartsHeader(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.BlockID.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.BlockID.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.BlockID} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.BlockID.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPartsHeader(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.types.PartSetHeader.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.types.BlockID.prototype.getHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes hash = 1; - * This is a type-conversion wrapper around `getHash()` - * @return {string} - */ -proto.types.BlockID.prototype.getHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); -}; - - -/** - * optional bytes hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` - * @return {!Uint8Array} - */ -proto.types.BlockID.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.BlockID.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional PartSetHeader parts_header = 2; - * @return {?proto.types.PartSetHeader} - */ -proto.types.BlockID.prototype.getPartsHeader = function() { - return /** @type{?proto.types.PartSetHeader} */ ( - jspb.Message.getWrapperField(this, proto.types.PartSetHeader, 2)); -}; - - -/** @param {?proto.types.PartSetHeader|undefined} value */ -proto.types.BlockID.prototype.setPartsHeader = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.types.BlockID.prototype.clearPartsHeader = function() { - this.setPartsHeader(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.BlockID.prototype.hasPartsHeader = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.PartSetHeader = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.PartSetHeader, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.PartSetHeader.displayName = 'proto.types.PartSetHeader'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.PartSetHeader.prototype.toObject = function(opt_includeInstance) { - return proto.types.PartSetHeader.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.PartSetHeader} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.PartSetHeader.toObject = function(includeInstance, msg) { - var f, obj = { - total: jspb.Message.getFieldWithDefault(msg, 1, 0), - hash: msg.getHash_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.PartSetHeader} - */ -proto.types.PartSetHeader.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.PartSetHeader; - return proto.types.PartSetHeader.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.PartSetHeader} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.PartSetHeader} - */ -proto.types.PartSetHeader.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTotal(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.PartSetHeader.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.PartSetHeader.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.PartSetHeader} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.PartSetHeader.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTotal(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional int32 total = 1; - * @return {number} - */ -proto.types.PartSetHeader.prototype.getTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.types.PartSetHeader.prototype.setTotal = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bytes hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.types.PartSetHeader.prototype.getHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes hash = 2; - * This is a type-conversion wrapper around `getHash()` - * @return {string} - */ -proto.types.PartSetHeader.prototype.getHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHash())); -}; - - -/** - * optional bytes hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHash()` - * @return {!Uint8Array} - */ -proto.types.PartSetHeader.prototype.getHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.PartSetHeader.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.Validator = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.Validator, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.Validator.displayName = 'proto.types.Validator'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.Validator.prototype.toObject = function(opt_includeInstance) { - return proto.types.Validator.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.Validator} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.Validator.toObject = function(includeInstance, msg) { - var f, obj = { - address: msg.getAddress_asB64(), - power: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.Validator} - */ -proto.types.Validator.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.Validator; - return proto.types.Validator.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.Validator} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.Validator} - */ -proto.types.Validator.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPower(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.Validator.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.Validator.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.Validator} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.Validator.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPower(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional bytes address = 1; - * @return {!(string|Uint8Array)} - */ -proto.types.Validator.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes address = 1; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.types.Validator.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); -}; - - -/** - * optional bytes address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` - * @return {!Uint8Array} - */ -proto.types.Validator.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.Validator.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 power = 3; - * @return {number} - */ -proto.types.Validator.prototype.getPower = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.types.Validator.prototype.setPower = function(value) { - jspb.Message.setProto3IntField(this, 3, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.ValidatorUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.ValidatorUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.ValidatorUpdate.displayName = 'proto.types.ValidatorUpdate'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.ValidatorUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.types.ValidatorUpdate.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.ValidatorUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ValidatorUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - pubKey: (f = msg.getPubKey()) && proto.types.PubKey.toObject(includeInstance, f), - power: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.ValidatorUpdate} - */ -proto.types.ValidatorUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.ValidatorUpdate; - return proto.types.ValidatorUpdate.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.ValidatorUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.ValidatorUpdate} - */ -proto.types.ValidatorUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.types.PubKey; - reader.readMessage(value,proto.types.PubKey.deserializeBinaryFromReader); - msg.setPubKey(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPower(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.ValidatorUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.ValidatorUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.ValidatorUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.ValidatorUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubKey(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.types.PubKey.serializeBinaryToWriter - ); - } - f = message.getPower(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional PubKey pub_key = 1; - * @return {?proto.types.PubKey} - */ -proto.types.ValidatorUpdate.prototype.getPubKey = function() { - return /** @type{?proto.types.PubKey} */ ( - jspb.Message.getWrapperField(this, proto.types.PubKey, 1)); -}; - - -/** @param {?proto.types.PubKey|undefined} value */ -proto.types.ValidatorUpdate.prototype.setPubKey = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.types.ValidatorUpdate.prototype.clearPubKey = function() { - this.setPubKey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.ValidatorUpdate.prototype.hasPubKey = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int64 power = 2; - * @return {number} - */ -proto.types.ValidatorUpdate.prototype.getPower = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.types.ValidatorUpdate.prototype.setPower = function(value) { - jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.VoteInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.VoteInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.VoteInfo.displayName = 'proto.types.VoteInfo'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.VoteInfo.prototype.toObject = function(opt_includeInstance) { - return proto.types.VoteInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.VoteInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.VoteInfo.toObject = function(includeInstance, msg) { - var f, obj = { - validator: (f = msg.getValidator()) && proto.types.Validator.toObject(includeInstance, f), - signedLastBlock: jspb.Message.getFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.VoteInfo} - */ -proto.types.VoteInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.VoteInfo; - return proto.types.VoteInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.VoteInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.VoteInfo} - */ -proto.types.VoteInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.types.Validator; - reader.readMessage(value,proto.types.Validator.deserializeBinaryFromReader); - msg.setValidator(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSignedLastBlock(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.VoteInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.VoteInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.VoteInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.VoteInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValidator(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.types.Validator.serializeBinaryToWriter - ); - } - f = message.getSignedLastBlock(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional Validator validator = 1; - * @return {?proto.types.Validator} - */ -proto.types.VoteInfo.prototype.getValidator = function() { - return /** @type{?proto.types.Validator} */ ( - jspb.Message.getWrapperField(this, proto.types.Validator, 1)); -}; - - -/** @param {?proto.types.Validator|undefined} value */ -proto.types.VoteInfo.prototype.setValidator = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.types.VoteInfo.prototype.clearValidator = function() { - this.setValidator(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.VoteInfo.prototype.hasValidator = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bool signed_last_block = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.types.VoteInfo.prototype.getSignedLastBlock = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); -}; - - -/** @param {boolean} value */ -proto.types.VoteInfo.prototype.setSignedLastBlock = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.PubKey = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.PubKey, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.PubKey.displayName = 'proto.types.PubKey'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.PubKey.prototype.toObject = function(opt_includeInstance) { - return proto.types.PubKey.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.PubKey} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.PubKey.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, ""), - data: msg.getData_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.PubKey} - */ -proto.types.PubKey.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.PubKey; - return proto.types.PubKey.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.PubKey} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.PubKey} - */ -proto.types.PubKey.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setType(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.PubKey.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.PubKey.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.PubKey} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.PubKey.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional string type = 1; - * @return {string} - */ -proto.types.PubKey.prototype.getType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.types.PubKey.prototype.setType = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes data = 2; - * @return {!(string|Uint8Array)} - */ -proto.types.PubKey.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes data = 2; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.types.PubKey.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.types.PubKey.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.types.PubKey.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.types.Evidence = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.types.Evidence, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.types.Evidence.displayName = 'proto.types.Evidence'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.types.Evidence.prototype.toObject = function(opt_includeInstance) { - return proto.types.Evidence.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.types.Evidence} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.Evidence.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, ""), - validator: (f = msg.getValidator()) && proto.types.Validator.toObject(includeInstance, f), - height: jspb.Message.getFieldWithDefault(msg, 3, 0), - time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - totalVotingPower: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.types.Evidence} - */ -proto.types.Evidence.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.types.Evidence; - return proto.types.Evidence.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.types.Evidence} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.types.Evidence} - */ -proto.types.Evidence.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setType(value); - break; - case 2: - var value = new proto.types.Validator; - reader.readMessage(value,proto.types.Validator.deserializeBinaryFromReader); - msg.setValidator(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setHeight(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTime(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalVotingPower(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.types.Evidence.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.types.Evidence.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.types.Evidence} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.types.Evidence.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getValidator(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.types.Validator.serializeBinaryToWriter - ); - } - f = message.getHeight(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getTime(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getTotalVotingPower(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } -}; - - -/** - * optional string type = 1; - * @return {string} - */ -proto.types.Evidence.prototype.getType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.types.Evidence.prototype.setType = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional Validator validator = 2; - * @return {?proto.types.Validator} - */ -proto.types.Evidence.prototype.getValidator = function() { - return /** @type{?proto.types.Validator} */ ( - jspb.Message.getWrapperField(this, proto.types.Validator, 2)); -}; - - -/** @param {?proto.types.Validator|undefined} value */ -proto.types.Evidence.prototype.setValidator = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.types.Evidence.prototype.clearValidator = function() { - this.setValidator(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Evidence.prototype.hasValidator = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 height = 3; - * @return {number} - */ -proto.types.Evidence.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.types.Evidence.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional google.protobuf.Timestamp time = 4; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.types.Evidence.prototype.getTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); -}; - - -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ -proto.types.Evidence.prototype.setTime = function(value) { - jspb.Message.setWrapperField(this, 4, value); -}; - - -proto.types.Evidence.prototype.clearTime = function() { - this.setTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.types.Evidence.prototype.hasTime = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional int64 total_voting_power = 5; - * @return {number} - */ -proto.types.Evidence.prototype.getTotalVotingPower = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.types.Evidence.prototype.setTotalVotingPower = function(value) { - jspb.Message.setProto3IntField(this, 5, value); -}; - - -goog.object.extend(exports, proto.types); diff --git a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.d.ts b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.d.ts deleted file mode 100644 index d75614fa4..000000000 --- a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -// package: common -// file: github.com/tendermint/tendermint/libs/common/types.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb"; - -export class KVPair extends jspb.Message { - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; - - getValue(): Uint8Array | string; - getValue_asU8(): Uint8Array; - getValue_asB64(): string; - setValue(value: Uint8Array | string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KVPair.AsObject; - static toObject(includeInstance: boolean, msg: KVPair): KVPair.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KVPair, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KVPair; - static deserializeBinaryFromReader(message: KVPair, reader: jspb.BinaryReader): KVPair; -} - -export namespace KVPair { - export type AsObject = { - key: Uint8Array | string, - value: Uint8Array | string, - } -} - -export class KI64Pair extends jspb.Message { - getKey(): Uint8Array | string; - getKey_asU8(): Uint8Array; - getKey_asB64(): string; - setKey(value: Uint8Array | string): void; - - getValue(): number; - setValue(value: number): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KI64Pair.AsObject; - static toObject(includeInstance: boolean, msg: KI64Pair): KI64Pair.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KI64Pair, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KI64Pair; - static deserializeBinaryFromReader(message: KI64Pair, reader: jspb.BinaryReader): KI64Pair; -} - -export namespace KI64Pair { - export type AsObject = { - key: Uint8Array | string, - value: number, - } -} diff --git a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js b/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js deleted file mode 100644 index 979e8619f..000000000 --- a/js/proto/github.com/tendermint/tendermint/libs/common/types_pb.js +++ /dev/null @@ -1,428 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); -goog.exportSymbol('proto.common.KI64Pair', null, global); -goog.exportSymbol('proto.common.KVPair', null, global); - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.common.KVPair = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.common.KVPair, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.common.KVPair.displayName = 'proto.common.KVPair'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.common.KVPair.prototype.toObject = function(opt_includeInstance) { - return proto.common.KVPair.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.common.KVPair} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.common.KVPair.toObject = function(includeInstance, msg) { - var f, obj = { - key: msg.getKey_asB64(), - value: msg.getValue_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.common.KVPair} - */ -proto.common.KVPair.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.common.KVPair; - return proto.common.KVPair.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.common.KVPair} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.common.KVPair} - */ -proto.common.KVPair.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setKey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.common.KVPair.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.common.KVPair.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.common.KVPair} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.common.KVPair.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getValue_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes key = 1; - * @return {!(string|Uint8Array)} - */ -proto.common.KVPair.prototype.getKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes key = 1; - * This is a type-conversion wrapper around `getKey()` - * @return {string} - */ -proto.common.KVPair.prototype.getKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKey())); -}; - - -/** - * optional bytes key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKey()` - * @return {!Uint8Array} - */ -proto.common.KVPair.prototype.getKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKey())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.common.KVPair.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes value = 2; - * @return {!(string|Uint8Array)} - */ -proto.common.KVPair.prototype.getValue = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes value = 2; - * This is a type-conversion wrapper around `getValue()` - * @return {string} - */ -proto.common.KVPair.prototype.getValue_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValue())); -}; - - -/** - * optional bytes value = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValue()` - * @return {!Uint8Array} - */ -proto.common.KVPair.prototype.getValue_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValue())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.common.KVPair.prototype.setValue = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.common.KI64Pair = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.common.KI64Pair, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.common.KI64Pair.displayName = 'proto.common.KI64Pair'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.common.KI64Pair.prototype.toObject = function(opt_includeInstance) { - return proto.common.KI64Pair.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.common.KI64Pair} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.common.KI64Pair.toObject = function(includeInstance, msg) { - var f, obj = { - key: msg.getKey_asB64(), - value: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.common.KI64Pair} - */ -proto.common.KI64Pair.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.common.KI64Pair; - return proto.common.KI64Pair.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.common.KI64Pair} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.common.KI64Pair} - */ -proto.common.KI64Pair.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setKey(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.common.KI64Pair.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.common.KI64Pair.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.common.KI64Pair} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.common.KI64Pair.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getValue(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional bytes key = 1; - * @return {!(string|Uint8Array)} - */ -proto.common.KI64Pair.prototype.getKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes key = 1; - * This is a type-conversion wrapper around `getKey()` - * @return {string} - */ -proto.common.KI64Pair.prototype.getKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getKey())); -}; - - -/** - * optional bytes key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKey()` - * @return {!Uint8Array} - */ -proto.common.KI64Pair.prototype.getKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getKey())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.common.KI64Pair.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional int64 value = 2; - * @return {number} - */ -proto.common.KI64Pair.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.common.KI64Pair.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 2, value); -}; - - -goog.object.extend(exports, proto.common); diff --git a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.js b/js/proto/gogoproto/gogo_grpc_pb.js similarity index 100% rename from js/proto/github.com/gogo/protobuf/gogoproto/gogo_grpc_pb.js rename to js/proto/gogoproto/gogo_grpc_pb.js diff --git a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.d.ts b/js/proto/gogoproto/gogo_pb.d.ts similarity index 98% rename from js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.d.ts rename to js/proto/gogoproto/gogo_pb.d.ts index 0c29d5510..22a2c0112 100644 --- a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.d.ts +++ b/js/proto/gogoproto/gogo_pb.d.ts @@ -1,5 +1,5 @@ // package: gogoproto -// file: github.com/gogo/protobuf/gogoproto/gogo.proto +// file: gogoproto/gogo.proto /* tslint:disable */ /* eslint-disable */ diff --git a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js b/js/proto/gogoproto/gogo_pb.js similarity index 99% rename from js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js rename to js/proto/gogoproto/gogo_pb.js index 4d7ad97c0..235bd0e12 100644 --- a/js/proto/github.com/gogo/protobuf/gogoproto/gogo_pb.js +++ b/js/proto/gogoproto/gogo_pb.js @@ -1,3 +1,4 @@ +// source: gogoproto/gogo.proto /** * @fileoverview * @enhanceable @@ -6,6 +7,8 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; diff --git a/js/proto/google/protobuf/descriptor_pb.d.ts b/js/proto/google/protobuf/descriptor_pb.d.ts index 645544091..55bb93334 100644 --- a/js/proto/google/protobuf/descriptor_pb.d.ts +++ b/js/proto/google/protobuf/descriptor_pb.d.ts @@ -9,7 +9,7 @@ import * as jspb from "google-protobuf"; export class FileDescriptorSet extends jspb.Message { clearFileList(): void; getFileList(): Array; - setFileList(value: Array): void; + setFileList(value: Array): FileDescriptorSet; addFile(value?: FileDescriptorProto, index?: number): FileDescriptorProto; @@ -34,66 +34,66 @@ export class FileDescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; getName(): string | undefined; - setName(value: string): void; + setName(value: string): FileDescriptorProto; hasPackage(): boolean; clearPackage(): void; getPackage(): string | undefined; - setPackage(value: string): void; + setPackage(value: string): FileDescriptorProto; clearDependencyList(): void; getDependencyList(): Array; - setDependencyList(value: Array): void; + setDependencyList(value: Array): FileDescriptorProto; addDependency(value: string, index?: number): string; clearPublicDependencyList(): void; getPublicDependencyList(): Array; - setPublicDependencyList(value: Array): void; + setPublicDependencyList(value: Array): FileDescriptorProto; addPublicDependency(value: number, index?: number): number; clearWeakDependencyList(): void; getWeakDependencyList(): Array; - setWeakDependencyList(value: Array): void; + setWeakDependencyList(value: Array): FileDescriptorProto; addWeakDependency(value: number, index?: number): number; clearMessageTypeList(): void; getMessageTypeList(): Array; - setMessageTypeList(value: Array): void; + setMessageTypeList(value: Array): FileDescriptorProto; addMessageType(value?: DescriptorProto, index?: number): DescriptorProto; clearEnumTypeList(): void; getEnumTypeList(): Array; - setEnumTypeList(value: Array): void; + setEnumTypeList(value: Array): FileDescriptorProto; addEnumType(value?: EnumDescriptorProto, index?: number): EnumDescriptorProto; clearServiceList(): void; getServiceList(): Array; - setServiceList(value: Array): void; + setServiceList(value: Array): FileDescriptorProto; addService(value?: ServiceDescriptorProto, index?: number): ServiceDescriptorProto; clearExtensionList(): void; getExtensionList(): Array; - setExtensionList(value: Array): void; + setExtensionList(value: Array): FileDescriptorProto; addExtension(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; hasOptions(): boolean; clearOptions(): void; getOptions(): FileOptions | undefined; - setOptions(value?: FileOptions): void; + setOptions(value?: FileOptions): FileDescriptorProto; hasSourceCodeInfo(): boolean; clearSourceCodeInfo(): void; getSourceCodeInfo(): SourceCodeInfo | undefined; - setSourceCodeInfo(value?: SourceCodeInfo): void; + setSourceCodeInfo(value?: SourceCodeInfo): FileDescriptorProto; hasSyntax(): boolean; clearSyntax(): void; getSyntax(): string | undefined; - setSyntax(value: string): void; + setSyntax(value: string): FileDescriptorProto; serializeBinary(): Uint8Array; @@ -128,52 +128,52 @@ export class DescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; getName(): string | undefined; - setName(value: string): void; + setName(value: string): DescriptorProto; clearFieldList(): void; getFieldList(): Array; - setFieldList(value: Array): void; + setFieldList(value: Array): DescriptorProto; addField(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; clearExtensionList(): void; getExtensionList(): Array; - setExtensionList(value: Array): void; + setExtensionList(value: Array): DescriptorProto; addExtension(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; clearNestedTypeList(): void; getNestedTypeList(): Array; - setNestedTypeList(value: Array): void; + setNestedTypeList(value: Array): DescriptorProto; addNestedType(value?: DescriptorProto, index?: number): DescriptorProto; clearEnumTypeList(): void; getEnumTypeList(): Array; - setEnumTypeList(value: Array): void; + setEnumTypeList(value: Array): DescriptorProto; addEnumType(value?: EnumDescriptorProto, index?: number): EnumDescriptorProto; clearExtensionRangeList(): void; getExtensionRangeList(): Array; - setExtensionRangeList(value: Array): void; + setExtensionRangeList(value: Array): DescriptorProto; addExtensionRange(value?: DescriptorProto.ExtensionRange, index?: number): DescriptorProto.ExtensionRange; clearOneofDeclList(): void; getOneofDeclList(): Array; - setOneofDeclList(value: Array): void; + setOneofDeclList(value: Array): DescriptorProto; addOneofDecl(value?: OneofDescriptorProto, index?: number): OneofDescriptorProto; hasOptions(): boolean; clearOptions(): void; getOptions(): MessageOptions | undefined; - setOptions(value?: MessageOptions): void; + setOptions(value?: MessageOptions): DescriptorProto; clearReservedRangeList(): void; getReservedRangeList(): Array; - setReservedRangeList(value: Array): void; + setReservedRangeList(value: Array): DescriptorProto; addReservedRange(value?: DescriptorProto.ReservedRange, index?: number): DescriptorProto.ReservedRange; clearReservedNameList(): void; getReservedNameList(): Array; - setReservedNameList(value: Array): void; + setReservedNameList(value: Array): DescriptorProto; addReservedName(value: string, index?: number): string; @@ -207,19 +207,19 @@ export namespace DescriptorProto { hasStart(): boolean; clearStart(): void; getStart(): number | undefined; - setStart(value: number): void; + setStart(value: number): ExtensionRange; hasEnd(): boolean; clearEnd(): void; getEnd(): number | undefined; - setEnd(value: number): void; + setEnd(value: number): ExtensionRange; hasOptions(): boolean; clearOptions(): void; getOptions(): ExtensionRangeOptions | undefined; - setOptions(value?: ExtensionRangeOptions): void; + setOptions(value?: ExtensionRangeOptions): ExtensionRange; serializeBinary(): Uint8Array; @@ -245,13 +245,13 @@ export namespace DescriptorProto { hasStart(): boolean; clearStart(): void; getStart(): number | undefined; - setStart(value: number): void; + setStart(value: number): ReservedRange; hasEnd(): boolean; clearEnd(): void; getEnd(): number | undefined; - setEnd(value: number): void; + setEnd(value: number): ReservedRange; serializeBinary(): Uint8Array; @@ -276,7 +276,7 @@ export namespace DescriptorProto { export class ExtensionRangeOptions extends jspb.Message { clearUninterpretedOptionList(): void; getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; + setUninterpretedOptionList(value: Array): ExtensionRangeOptions; addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; @@ -301,61 +301,61 @@ export class FieldDescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; getName(): string | undefined; - setName(value: string): void; + setName(value: string): FieldDescriptorProto; hasNumber(): boolean; clearNumber(): void; getNumber(): number | undefined; - setNumber(value: number): void; + setNumber(value: number): FieldDescriptorProto; hasLabel(): boolean; clearLabel(): void; getLabel(): FieldDescriptorProto.Label | undefined; - setLabel(value: FieldDescriptorProto.Label): void; + setLabel(value: FieldDescriptorProto.Label): FieldDescriptorProto; hasType(): boolean; clearType(): void; getType(): FieldDescriptorProto.Type | undefined; - setType(value: FieldDescriptorProto.Type): void; + setType(value: FieldDescriptorProto.Type): FieldDescriptorProto; hasTypeName(): boolean; clearTypeName(): void; getTypeName(): string | undefined; - setTypeName(value: string): void; + setTypeName(value: string): FieldDescriptorProto; hasExtendee(): boolean; clearExtendee(): void; getExtendee(): string | undefined; - setExtendee(value: string): void; + setExtendee(value: string): FieldDescriptorProto; hasDefaultValue(): boolean; clearDefaultValue(): void; getDefaultValue(): string | undefined; - setDefaultValue(value: string): void; + setDefaultValue(value: string): FieldDescriptorProto; hasOneofIndex(): boolean; clearOneofIndex(): void; getOneofIndex(): number | undefined; - setOneofIndex(value: number): void; + setOneofIndex(value: number): FieldDescriptorProto; hasJsonName(): boolean; clearJsonName(): void; getJsonName(): string | undefined; - setJsonName(value: string): void; + setJsonName(value: string): FieldDescriptorProto; hasOptions(): boolean; clearOptions(): void; getOptions(): FieldOptions | undefined; - setOptions(value?: FieldOptions): void; + setOptions(value?: FieldOptions): FieldDescriptorProto; serializeBinary(): Uint8Array; @@ -416,13 +416,13 @@ export class OneofDescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; getName(): string | undefined; - setName(value: string): void; + setName(value: string): OneofDescriptorProto; hasOptions(): boolean; clearOptions(): void; getOptions(): OneofOptions | undefined; - setOptions(value?: OneofOptions): void; + setOptions(value?: OneofOptions): OneofDescriptorProto; serializeBinary(): Uint8Array; @@ -447,27 +447,27 @@ export class EnumDescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; getName(): string | undefined; - setName(value: string): void; + setName(value: string): EnumDescriptorProto; clearValueList(): void; getValueList(): Array; - setValueList(value: Array): void; + setValueList(value: Array): EnumDescriptorProto; addValue(value?: EnumValueDescriptorProto, index?: number): EnumValueDescriptorProto; hasOptions(): boolean; clearOptions(): void; getOptions(): EnumOptions | undefined; - setOptions(value?: EnumOptions): void; + setOptions(value?: EnumOptions): EnumDescriptorProto; clearReservedRangeList(): void; getReservedRangeList(): Array; - setReservedRangeList(value: Array): void; + setReservedRangeList(value: Array): EnumDescriptorProto; addReservedRange(value?: EnumDescriptorProto.EnumReservedRange, index?: number): EnumDescriptorProto.EnumReservedRange; clearReservedNameList(): void; getReservedNameList(): Array; - setReservedNameList(value: Array): void; + setReservedNameList(value: Array): EnumDescriptorProto; addReservedName(value: string, index?: number): string; @@ -496,13 +496,13 @@ export namespace EnumDescriptorProto { hasStart(): boolean; clearStart(): void; getStart(): number | undefined; - setStart(value: number): void; + setStart(value: number): EnumReservedRange; hasEnd(): boolean; clearEnd(): void; getEnd(): number | undefined; - setEnd(value: number): void; + setEnd(value: number): EnumReservedRange; serializeBinary(): Uint8Array; @@ -529,19 +529,19 @@ export class EnumValueDescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; getName(): string | undefined; - setName(value: string): void; + setName(value: string): EnumValueDescriptorProto; hasNumber(): boolean; clearNumber(): void; getNumber(): number | undefined; - setNumber(value: number): void; + setNumber(value: number): EnumValueDescriptorProto; hasOptions(): boolean; clearOptions(): void; getOptions(): EnumValueOptions | undefined; - setOptions(value?: EnumValueOptions): void; + setOptions(value?: EnumValueOptions): EnumValueDescriptorProto; serializeBinary(): Uint8Array; @@ -567,18 +567,18 @@ export class ServiceDescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; getName(): string | undefined; - setName(value: string): void; + setName(value: string): ServiceDescriptorProto; clearMethodList(): void; getMethodList(): Array; - setMethodList(value: Array): void; + setMethodList(value: Array): ServiceDescriptorProto; addMethod(value?: MethodDescriptorProto, index?: number): MethodDescriptorProto; hasOptions(): boolean; clearOptions(): void; getOptions(): ServiceOptions | undefined; - setOptions(value?: ServiceOptions): void; + setOptions(value?: ServiceOptions): ServiceDescriptorProto; serializeBinary(): Uint8Array; @@ -604,37 +604,37 @@ export class MethodDescriptorProto extends jspb.Message { hasName(): boolean; clearName(): void; getName(): string | undefined; - setName(value: string): void; + setName(value: string): MethodDescriptorProto; hasInputType(): boolean; clearInputType(): void; getInputType(): string | undefined; - setInputType(value: string): void; + setInputType(value: string): MethodDescriptorProto; hasOutputType(): boolean; clearOutputType(): void; getOutputType(): string | undefined; - setOutputType(value: string): void; + setOutputType(value: string): MethodDescriptorProto; hasOptions(): boolean; clearOptions(): void; getOptions(): MethodOptions | undefined; - setOptions(value?: MethodOptions): void; + setOptions(value?: MethodOptions): MethodDescriptorProto; hasClientStreaming(): boolean; clearClientStreaming(): void; getClientStreaming(): boolean | undefined; - setClientStreaming(value: boolean): void; + setClientStreaming(value: boolean): MethodDescriptorProto; hasServerStreaming(): boolean; clearServerStreaming(): void; getServerStreaming(): boolean | undefined; - setServerStreaming(value: boolean): void; + setServerStreaming(value: boolean): MethodDescriptorProto; serializeBinary(): Uint8Array; @@ -663,125 +663,125 @@ export class FileOptions extends jspb.Message { hasJavaPackage(): boolean; clearJavaPackage(): void; getJavaPackage(): string | undefined; - setJavaPackage(value: string): void; + setJavaPackage(value: string): FileOptions; hasJavaOuterClassname(): boolean; clearJavaOuterClassname(): void; getJavaOuterClassname(): string | undefined; - setJavaOuterClassname(value: string): void; + setJavaOuterClassname(value: string): FileOptions; hasJavaMultipleFiles(): boolean; clearJavaMultipleFiles(): void; getJavaMultipleFiles(): boolean | undefined; - setJavaMultipleFiles(value: boolean): void; + setJavaMultipleFiles(value: boolean): FileOptions; hasJavaGenerateEqualsAndHash(): boolean; clearJavaGenerateEqualsAndHash(): void; getJavaGenerateEqualsAndHash(): boolean | undefined; - setJavaGenerateEqualsAndHash(value: boolean): void; + setJavaGenerateEqualsAndHash(value: boolean): FileOptions; hasJavaStringCheckUtf8(): boolean; clearJavaStringCheckUtf8(): void; getJavaStringCheckUtf8(): boolean | undefined; - setJavaStringCheckUtf8(value: boolean): void; + setJavaStringCheckUtf8(value: boolean): FileOptions; hasOptimizeFor(): boolean; clearOptimizeFor(): void; getOptimizeFor(): FileOptions.OptimizeMode | undefined; - setOptimizeFor(value: FileOptions.OptimizeMode): void; + setOptimizeFor(value: FileOptions.OptimizeMode): FileOptions; hasGoPackage(): boolean; clearGoPackage(): void; getGoPackage(): string | undefined; - setGoPackage(value: string): void; + setGoPackage(value: string): FileOptions; hasCcGenericServices(): boolean; clearCcGenericServices(): void; getCcGenericServices(): boolean | undefined; - setCcGenericServices(value: boolean): void; + setCcGenericServices(value: boolean): FileOptions; hasJavaGenericServices(): boolean; clearJavaGenericServices(): void; getJavaGenericServices(): boolean | undefined; - setJavaGenericServices(value: boolean): void; + setJavaGenericServices(value: boolean): FileOptions; hasPyGenericServices(): boolean; clearPyGenericServices(): void; getPyGenericServices(): boolean | undefined; - setPyGenericServices(value: boolean): void; + setPyGenericServices(value: boolean): FileOptions; hasPhpGenericServices(): boolean; clearPhpGenericServices(): void; getPhpGenericServices(): boolean | undefined; - setPhpGenericServices(value: boolean): void; + setPhpGenericServices(value: boolean): FileOptions; hasDeprecated(): boolean; clearDeprecated(): void; getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; + setDeprecated(value: boolean): FileOptions; hasCcEnableArenas(): boolean; clearCcEnableArenas(): void; getCcEnableArenas(): boolean | undefined; - setCcEnableArenas(value: boolean): void; + setCcEnableArenas(value: boolean): FileOptions; hasObjcClassPrefix(): boolean; clearObjcClassPrefix(): void; getObjcClassPrefix(): string | undefined; - setObjcClassPrefix(value: string): void; + setObjcClassPrefix(value: string): FileOptions; hasCsharpNamespace(): boolean; clearCsharpNamespace(): void; getCsharpNamespace(): string | undefined; - setCsharpNamespace(value: string): void; + setCsharpNamespace(value: string): FileOptions; hasSwiftPrefix(): boolean; clearSwiftPrefix(): void; getSwiftPrefix(): string | undefined; - setSwiftPrefix(value: string): void; + setSwiftPrefix(value: string): FileOptions; hasPhpClassPrefix(): boolean; clearPhpClassPrefix(): void; getPhpClassPrefix(): string | undefined; - setPhpClassPrefix(value: string): void; + setPhpClassPrefix(value: string): FileOptions; hasPhpNamespace(): boolean; clearPhpNamespace(): void; getPhpNamespace(): string | undefined; - setPhpNamespace(value: string): void; + setPhpNamespace(value: string): FileOptions; hasPhpMetadataNamespace(): boolean; clearPhpMetadataNamespace(): void; getPhpMetadataNamespace(): string | undefined; - setPhpMetadataNamespace(value: string): void; + setPhpMetadataNamespace(value: string): FileOptions; hasRubyPackage(): boolean; clearRubyPackage(): void; getRubyPackage(): string | undefined; - setRubyPackage(value: string): void; + setRubyPackage(value: string): FileOptions; clearUninterpretedOptionList(): void; getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; + setUninterpretedOptionList(value: Array): FileOptions; addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; @@ -833,29 +833,29 @@ export class MessageOptions extends jspb.Message { hasMessageSetWireFormat(): boolean; clearMessageSetWireFormat(): void; getMessageSetWireFormat(): boolean | undefined; - setMessageSetWireFormat(value: boolean): void; + setMessageSetWireFormat(value: boolean): MessageOptions; hasNoStandardDescriptorAccessor(): boolean; clearNoStandardDescriptorAccessor(): void; getNoStandardDescriptorAccessor(): boolean | undefined; - setNoStandardDescriptorAccessor(value: boolean): void; + setNoStandardDescriptorAccessor(value: boolean): MessageOptions; hasDeprecated(): boolean; clearDeprecated(): void; getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; + setDeprecated(value: boolean): MessageOptions; hasMapEntry(): boolean; clearMapEntry(): void; getMapEntry(): boolean | undefined; - setMapEntry(value: boolean): void; + setMapEntry(value: boolean): MessageOptions; clearUninterpretedOptionList(): void; getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; + setUninterpretedOptionList(value: Array): MessageOptions; addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; @@ -884,41 +884,41 @@ export class FieldOptions extends jspb.Message { hasCtype(): boolean; clearCtype(): void; getCtype(): FieldOptions.CType | undefined; - setCtype(value: FieldOptions.CType): void; + setCtype(value: FieldOptions.CType): FieldOptions; hasPacked(): boolean; clearPacked(): void; getPacked(): boolean | undefined; - setPacked(value: boolean): void; + setPacked(value: boolean): FieldOptions; hasJstype(): boolean; clearJstype(): void; getJstype(): FieldOptions.JSType | undefined; - setJstype(value: FieldOptions.JSType): void; + setJstype(value: FieldOptions.JSType): FieldOptions; hasLazy(): boolean; clearLazy(): void; getLazy(): boolean | undefined; - setLazy(value: boolean): void; + setLazy(value: boolean): FieldOptions; hasDeprecated(): boolean; clearDeprecated(): void; getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; + setDeprecated(value: boolean): FieldOptions; hasWeak(): boolean; clearWeak(): void; getWeak(): boolean | undefined; - setWeak(value: boolean): void; + setWeak(value: boolean): FieldOptions; clearUninterpretedOptionList(): void; getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; + setUninterpretedOptionList(value: Array): FieldOptions; addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; @@ -960,7 +960,7 @@ export namespace FieldOptions { export class OneofOptions extends jspb.Message { clearUninterpretedOptionList(): void; getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; + setUninterpretedOptionList(value: Array): OneofOptions; addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; @@ -985,17 +985,17 @@ export class EnumOptions extends jspb.Message { hasAllowAlias(): boolean; clearAllowAlias(): void; getAllowAlias(): boolean | undefined; - setAllowAlias(value: boolean): void; + setAllowAlias(value: boolean): EnumOptions; hasDeprecated(): boolean; clearDeprecated(): void; getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; + setDeprecated(value: boolean): EnumOptions; clearUninterpretedOptionList(): void; getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; + setUninterpretedOptionList(value: Array): EnumOptions; addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; @@ -1022,11 +1022,11 @@ export class EnumValueOptions extends jspb.Message { hasDeprecated(): boolean; clearDeprecated(): void; getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; + setDeprecated(value: boolean): EnumValueOptions; clearUninterpretedOptionList(): void; getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; + setUninterpretedOptionList(value: Array): EnumValueOptions; addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; @@ -1052,11 +1052,11 @@ export class ServiceOptions extends jspb.Message { hasDeprecated(): boolean; clearDeprecated(): void; getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; + setDeprecated(value: boolean): ServiceOptions; clearUninterpretedOptionList(): void; getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; + setUninterpretedOptionList(value: Array): ServiceOptions; addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; @@ -1082,17 +1082,17 @@ export class MethodOptions extends jspb.Message { hasDeprecated(): boolean; clearDeprecated(): void; getDeprecated(): boolean | undefined; - setDeprecated(value: boolean): void; + setDeprecated(value: boolean): MethodOptions; hasIdempotencyLevel(): boolean; clearIdempotencyLevel(): void; getIdempotencyLevel(): MethodOptions.IdempotencyLevel | undefined; - setIdempotencyLevel(value: MethodOptions.IdempotencyLevel): void; + setIdempotencyLevel(value: MethodOptions.IdempotencyLevel): MethodOptions; clearUninterpretedOptionList(): void; getUninterpretedOptionList(): Array; - setUninterpretedOptionList(value: Array): void; + setUninterpretedOptionList(value: Array): MethodOptions; addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; @@ -1124,32 +1124,32 @@ export namespace MethodOptions { export class UninterpretedOption extends jspb.Message { clearNameList(): void; getNameList(): Array; - setNameList(value: Array): void; + setNameList(value: Array): UninterpretedOption; addName(value?: UninterpretedOption.NamePart, index?: number): UninterpretedOption.NamePart; hasIdentifierValue(): boolean; clearIdentifierValue(): void; getIdentifierValue(): string | undefined; - setIdentifierValue(value: string): void; + setIdentifierValue(value: string): UninterpretedOption; hasPositiveIntValue(): boolean; clearPositiveIntValue(): void; getPositiveIntValue(): number | undefined; - setPositiveIntValue(value: number): void; + setPositiveIntValue(value: number): UninterpretedOption; hasNegativeIntValue(): boolean; clearNegativeIntValue(): void; getNegativeIntValue(): number | undefined; - setNegativeIntValue(value: number): void; + setNegativeIntValue(value: number): UninterpretedOption; hasDoubleValue(): boolean; clearDoubleValue(): void; getDoubleValue(): number | undefined; - setDoubleValue(value: number): void; + setDoubleValue(value: number): UninterpretedOption; hasStringValue(): boolean; @@ -1157,13 +1157,13 @@ export class UninterpretedOption extends jspb.Message { getStringValue(): Uint8Array | string; getStringValue_asU8(): Uint8Array; getStringValue_asB64(): string; - setStringValue(value: Uint8Array | string): void; + setStringValue(value: Uint8Array | string): UninterpretedOption; hasAggregateValue(): boolean; clearAggregateValue(): void; getAggregateValue(): string | undefined; - setAggregateValue(value: string): void; + setAggregateValue(value: string): UninterpretedOption; serializeBinary(): Uint8Array; @@ -1193,13 +1193,13 @@ export namespace UninterpretedOption { hasNamePart(): boolean; clearNamePart(): void; getNamePart(): string | undefined; - setNamePart(value: string): void; + setNamePart(value: string): NamePart; hasIsExtension(): boolean; clearIsExtension(): void; getIsExtension(): boolean | undefined; - setIsExtension(value: boolean): void; + setIsExtension(value: boolean): NamePart; serializeBinary(): Uint8Array; @@ -1224,7 +1224,7 @@ export namespace UninterpretedOption { export class SourceCodeInfo extends jspb.Message { clearLocationList(): void; getLocationList(): Array; - setLocationList(value: Array): void; + setLocationList(value: Array): SourceCodeInfo; addLocation(value?: SourceCodeInfo.Location, index?: number): SourceCodeInfo.Location; @@ -1247,29 +1247,29 @@ export namespace SourceCodeInfo { export class Location extends jspb.Message { clearPathList(): void; getPathList(): Array; - setPathList(value: Array): void; + setPathList(value: Array): Location; addPath(value: number, index?: number): number; clearSpanList(): void; getSpanList(): Array; - setSpanList(value: Array): void; + setSpanList(value: Array): Location; addSpan(value: number, index?: number): number; hasLeadingComments(): boolean; clearLeadingComments(): void; getLeadingComments(): string | undefined; - setLeadingComments(value: string): void; + setLeadingComments(value: string): Location; hasTrailingComments(): boolean; clearTrailingComments(): void; getTrailingComments(): string | undefined; - setTrailingComments(value: string): void; + setTrailingComments(value: string): Location; clearLeadingDetachedCommentsList(): void; getLeadingDetachedCommentsList(): Array; - setLeadingDetachedCommentsList(value: Array): void; + setLeadingDetachedCommentsList(value: Array): Location; addLeadingDetachedComments(value: string, index?: number): string; @@ -1298,7 +1298,7 @@ export namespace SourceCodeInfo { export class GeneratedCodeInfo extends jspb.Message { clearAnnotationList(): void; getAnnotationList(): Array; - setAnnotationList(value: Array): void; + setAnnotationList(value: Array): GeneratedCodeInfo; addAnnotation(value?: GeneratedCodeInfo.Annotation, index?: number): GeneratedCodeInfo.Annotation; @@ -1321,26 +1321,26 @@ export namespace GeneratedCodeInfo { export class Annotation extends jspb.Message { clearPathList(): void; getPathList(): Array; - setPathList(value: Array): void; + setPathList(value: Array): Annotation; addPath(value: number, index?: number): number; hasSourceFile(): boolean; clearSourceFile(): void; getSourceFile(): string | undefined; - setSourceFile(value: string): void; + setSourceFile(value: string): Annotation; hasBegin(): boolean; clearBegin(): void; getBegin(): number | undefined; - setBegin(value: number): void; + setBegin(value: number): Annotation; hasEnd(): boolean; clearEnd(): void; getEnd(): number | undefined; - setEnd(value: number): void; + setEnd(value: number): Annotation; serializeBinary(): Uint8Array; diff --git a/js/proto/google/protobuf/descriptor_pb.js b/js/proto/google/protobuf/descriptor_pb.js index 7745f87c1..4eb1fe08c 100644 --- a/js/proto/google/protobuf/descriptor_pb.js +++ b/js/proto/google/protobuf/descriptor_pb.js @@ -1,3 +1,4 @@ +// source: google/protobuf/descriptor.proto /** * @fileoverview * @enhanceable @@ -6,6 +7,8 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; @@ -44,6 +47,716 @@ goog.exportSymbol('proto.google.protobuf.SourceCodeInfo', null, global); goog.exportSymbol('proto.google.protobuf.SourceCodeInfo.Location', null, global); goog.exportSymbol('proto.google.protobuf.UninterpretedOption', null, global); goog.exportSymbol('proto.google.protobuf.UninterpretedOption.NamePart', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FileDescriptorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorSet.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileDescriptorSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FileDescriptorSet.displayName = 'proto.google.protobuf.FileDescriptorSet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FileDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FileDescriptorProto.displayName = 'proto.google.protobuf.FileDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.DescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.DescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DescriptorProto.displayName = 'proto.google.protobuf.DescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.DescriptorProto.ExtensionRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto.ExtensionRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DescriptorProto.ExtensionRange.displayName = 'proto.google.protobuf.DescriptorProto.ExtensionRange'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.DescriptorProto.ReservedRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto.ReservedRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DescriptorProto.ReservedRange.displayName = 'proto.google.protobuf.DescriptorProto.ReservedRange'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ExtensionRangeOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ExtensionRangeOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ExtensionRangeOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ExtensionRangeOptions.displayName = 'proto.google.protobuf.ExtensionRangeOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FieldDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.FieldDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FieldDescriptorProto.displayName = 'proto.google.protobuf.FieldDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.OneofDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.OneofDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.OneofDescriptorProto.displayName = 'proto.google.protobuf.OneofDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.EnumDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumDescriptorProto.displayName = 'proto.google.protobuf.EnumDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.displayName = 'proto.google.protobuf.EnumDescriptorProto.EnumReservedRange'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumValueDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.EnumValueDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumValueDescriptorProto.displayName = 'proto.google.protobuf.EnumValueDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ServiceDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ServiceDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ServiceDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ServiceDescriptorProto.displayName = 'proto.google.protobuf.ServiceDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.MethodDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.MethodDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.MethodDescriptorProto.displayName = 'proto.google.protobuf.MethodDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FileOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FileOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FileOptions.displayName = 'proto.google.protobuf.FileOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FileOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FileOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.MessageOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MessageOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.MessageOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.MessageOptions.displayName = 'proto.google.protobuf.MessageOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MessageOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MessageOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FieldOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FieldOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FieldOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FieldOptions.displayName = 'proto.google.protobuf.FieldOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FieldOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FieldOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.OneofOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.OneofOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.OneofOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.OneofOptions.displayName = 'proto.google.protobuf.OneofOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.OneofOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.OneofOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumOptions.displayName = 'proto.google.protobuf.EnumOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumValueOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumValueOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumValueOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumValueOptions.displayName = 'proto.google.protobuf.EnumValueOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumValueOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumValueOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ServiceOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ServiceOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ServiceOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ServiceOptions.displayName = 'proto.google.protobuf.ServiceOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ServiceOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ServiceOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.MethodOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MethodOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.MethodOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.MethodOptions.displayName = 'proto.google.protobuf.MethodOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MethodOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MethodOptions.extensionsBinary = {}; /** * Generated by JsPbCodeGenerator. @@ -55,13 +768,123 @@ goog.exportSymbol('proto.google.protobuf.UninterpretedOption.NamePart', null, gl * @extends {jspb.Message} * @constructor */ -proto.google.protobuf.FileDescriptorSet = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorSet.repeatedFields_, null); +proto.google.protobuf.UninterpretedOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.UninterpretedOption.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.UninterpretedOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.UninterpretedOption.displayName = 'proto.google.protobuf.UninterpretedOption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.UninterpretedOption.NamePart = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.UninterpretedOption.NamePart, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.UninterpretedOption.NamePart.displayName = 'proto.google.protobuf.UninterpretedOption.NamePart'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.SourceCodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.SourceCodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.SourceCodeInfo.displayName = 'proto.google.protobuf.SourceCodeInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.SourceCodeInfo.Location = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.SourceCodeInfo.Location, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.SourceCodeInfo.Location.displayName = 'proto.google.protobuf.SourceCodeInfo.Location'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.GeneratedCodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.GeneratedCodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.GeneratedCodeInfo.displayName = 'proto.google.protobuf.GeneratedCodeInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_, null); }; -goog.inherits(proto.google.protobuf.FileDescriptorSet, jspb.Message); +goog.inherits(proto.google.protobuf.GeneratedCodeInfo.Annotation, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.FileDescriptorSet.displayName = 'proto.google.protobuf.FileDescriptorSet'; + /** + * @public + * @override + */ + proto.google.protobuf.GeneratedCodeInfo.Annotation.displayName = 'proto.google.protobuf.GeneratedCodeInfo.Annotation'; } + /** * List of repeated fields within this message type. * @private {!Array} @@ -73,13 +896,15 @@ proto.google.protobuf.FileDescriptorSet.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FileDescriptorSet.prototype.toObject = function(opt_includeInstance) { @@ -89,8 +914,8 @@ proto.google.protobuf.FileDescriptorSet.prototype.toObject = function(opt_includ /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FileDescriptorSet} msg The msg instance to transform. * @return {!Object} @@ -191,9 +1016,12 @@ proto.google.protobuf.FileDescriptorSet.prototype.getFileList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorSet} returns this +*/ proto.google.protobuf.FileDescriptorSet.prototype.setFileList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -207,29 +1035,16 @@ proto.google.protobuf.FileDescriptorSet.prototype.addFile = function(opt_value, }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorSet} returns this + */ proto.google.protobuf.FileDescriptorSet.prototype.clearFileList = function() { - this.setFileList([]); + return this.setFileList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.FileDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorProto.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.FileDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.FileDescriptorProto.displayName = 'proto.google.protobuf.FileDescriptorProto'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -241,13 +1056,15 @@ proto.google.protobuf.FileDescriptorProto.repeatedFields_ = [3,10,11,4,5,6,7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -257,8 +1074,8 @@ proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_incl /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FileDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -266,11 +1083,11 @@ proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_incl */ proto.google.protobuf.FileDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), - pb_package: jspb.Message.getField(msg, 2), - dependencyList: jspb.Message.getRepeatedField(msg, 3), - publicDependencyList: jspb.Message.getRepeatedField(msg, 10), - weakDependencyList: jspb.Message.getRepeatedField(msg, 11), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + pb_package: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + dependencyList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + publicDependencyList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, + weakDependencyList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, messageTypeList: jspb.Message.toObjectList(msg.getMessageTypeList(), proto.google.protobuf.DescriptorProto.toObject, includeInstance), enumTypeList: jspb.Message.toObjectList(msg.getEnumTypeList(), @@ -281,7 +1098,7 @@ proto.google.protobuf.FileDescriptorProto.toObject = function(includeInstance, m proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), options: (f = msg.getOptions()) && proto.google.protobuf.FileOptions.toObject(includeInstance, f), sourceCodeInfo: (f = msg.getSourceCodeInfo()) && proto.google.protobuf.SourceCodeInfo.toObject(includeInstance, f), - syntax: jspb.Message.getField(msg, 12) + syntax: (f = jspb.Message.getField(msg, 12)) == null ? undefined : f }; if (includeInstance) { @@ -331,12 +1148,16 @@ proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader = function msg.addDependency(value); break; case 10: - var value = /** @type {number} */ (reader.readInt32()); - msg.addPublicDependency(value); + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addPublicDependency(values[i]); + } break; case 11: - var value = /** @type {number} */ (reader.readInt32()); - msg.addWeakDependency(value); + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addWeakDependency(values[i]); + } break; case 4: var value = new proto.google.protobuf.DescriptorProto; @@ -503,14 +1324,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -532,14 +1360,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getPackage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setPackage = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.clearPackage = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -561,23 +1396,31 @@ proto.google.protobuf.FileDescriptorProto.prototype.getDependencyList = function }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setDependencyList = function(value) { - jspb.Message.setField(this, 3, value || []); + return jspb.Message.setField(this, 3, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.addDependency = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 3, value, opt_index); + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.clearDependencyList = function() { - this.setDependencyList([]); + return this.setDependencyList([]); }; @@ -590,23 +1433,31 @@ proto.google.protobuf.FileDescriptorProto.prototype.getPublicDependencyList = fu }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setPublicDependencyList = function(value) { - jspb.Message.setField(this, 10, value || []); + return jspb.Message.setField(this, 10, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.addPublicDependency = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 10, value, opt_index); + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.clearPublicDependencyList = function() { - this.setPublicDependencyList([]); + return this.setPublicDependencyList([]); }; @@ -619,23 +1470,31 @@ proto.google.protobuf.FileDescriptorProto.prototype.getWeakDependencyList = func }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setWeakDependencyList = function(value) { - jspb.Message.setField(this, 11, value || []); + return jspb.Message.setField(this, 11, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this */ proto.google.protobuf.FileDescriptorProto.prototype.addWeakDependency = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 11, value, opt_index); + return jspb.Message.addToRepeatedField(this, 11, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.clearWeakDependencyList = function() { - this.setWeakDependencyList([]); + return this.setWeakDependencyList([]); }; @@ -649,9 +1508,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.getMessageTypeList = functio }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setMessageTypeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -665,8 +1527,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.addMessageType = function(op }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.clearMessageTypeList = function() { - this.setMessageTypeList([]); + return this.setMessageTypeList([]); }; @@ -680,9 +1546,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.getEnumTypeList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setEnumTypeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); + return jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -696,8 +1565,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.addEnumType = function(opt_v }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.clearEnumTypeList = function() { - this.setEnumTypeList([]); + return this.setEnumTypeList([]); }; @@ -711,9 +1584,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.getServiceList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setServiceList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 6, value); + return jspb.Message.setRepeatedWrapperField(this, 6, value); }; @@ -727,8 +1603,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.addService = function(opt_va }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.clearServiceList = function() { - this.setServiceList([]); + return this.setServiceList([]); }; @@ -742,9 +1622,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.getExtensionList = function( }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setExtensionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -758,8 +1641,12 @@ proto.google.protobuf.FileDescriptorProto.prototype.addExtension$ = function(opt }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.clearExtensionList = function() { - this.setExtensionList([]); + return this.setExtensionList([]); }; @@ -773,14 +1660,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.FileOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.FileOptions|undefined} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 8, value); + return jspb.Message.setWrapperField(this, 8, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -803,14 +1697,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getSourceCodeInfo = function }; -/** @param {?proto.google.protobuf.SourceCodeInfo|undefined} value */ +/** + * @param {?proto.google.protobuf.SourceCodeInfo|undefined} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ proto.google.protobuf.FileDescriptorProto.prototype.setSourceCodeInfo = function(value) { - jspb.Message.setWrapperField(this, 9, value); + return jspb.Message.setWrapperField(this, 9, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.clearSourceCodeInfo = function() { - this.setSourceCodeInfo(undefined); + return this.setSourceCodeInfo(undefined); }; @@ -832,14 +1733,21 @@ proto.google.protobuf.FileDescriptorProto.prototype.getSyntax = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.setSyntax = function(value) { - jspb.Message.setField(this, 12, value); + return jspb.Message.setField(this, 12, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ proto.google.protobuf.FileDescriptorProto.prototype.clearSyntax = function() { - jspb.Message.setField(this, 12, undefined); + return jspb.Message.setField(this, 12, undefined); }; @@ -853,23 +1761,6 @@ proto.google.protobuf.FileDescriptorProto.prototype.hasSyntax = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.DescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.DescriptorProto.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.DescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.DescriptorProto.displayName = 'proto.google.protobuf.DescriptorProto'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -881,13 +1772,15 @@ proto.google.protobuf.DescriptorProto.repeatedFields_ = [2,6,3,4,5,8,9,10]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -897,8 +1790,8 @@ proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeI /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.DescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -906,7 +1799,7 @@ proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeI */ proto.google.protobuf.DescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, fieldList: jspb.Message.toObjectList(msg.getFieldList(), proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), extensionList: jspb.Message.toObjectList(msg.getExtensionList(), @@ -922,7 +1815,7 @@ proto.google.protobuf.DescriptorProto.toObject = function(includeInstance, msg) options: (f = msg.getOptions()) && proto.google.protobuf.MessageOptions.toObject(includeInstance, f), reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), proto.google.protobuf.DescriptorProto.ReservedRange.toObject, includeInstance), - reservedNameList: jspb.Message.getRepeatedField(msg, 10) + reservedNameList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f }; if (includeInstance) { @@ -1118,34 +2011,19 @@ proto.google.protobuf.DescriptorProto.serializeBinaryToWriter = function(message -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.DescriptorProto.ExtensionRange = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.DescriptorProto.ExtensionRange, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.DescriptorProto.ExtensionRange.displayName = 'proto.google.protobuf.DescriptorProto.ExtensionRange'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = function(opt_includeInstance) { @@ -1155,8 +2033,8 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = functi /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} msg The msg instance to transform. * @return {!Object} @@ -1164,8 +2042,8 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = functi */ proto.google.protobuf.DescriptorProto.ExtensionRange.toObject = function(includeInstance, msg) { var f, obj = { - start: jspb.Message.getField(msg, 1), - end: jspb.Message.getField(msg, 2), + start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.ExtensionRangeOptions.toObject(includeInstance, f) }; @@ -1279,14 +2157,21 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getStart = functi }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setStart = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearStart = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -1308,14 +2193,21 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getEnd = function }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setEnd = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearEnd = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -1338,14 +2230,21 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getOptions = func }; -/** @param {?proto.google.protobuf.ExtensionRangeOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.ExtensionRangeOptions|undefined} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this +*/ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -1359,34 +2258,19 @@ proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasOptions = func -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.DescriptorProto.ReservedRange = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.DescriptorProto.ReservedRange, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.DescriptorProto.ReservedRange.displayName = 'proto.google.protobuf.DescriptorProto.ReservedRange'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = function(opt_includeInstance) { @@ -1396,8 +2280,8 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = functio /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} msg The msg instance to transform. * @return {!Object} @@ -1405,8 +2289,8 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = functio */ proto.google.protobuf.DescriptorProto.ReservedRange.toObject = function(includeInstance, msg) { var f, obj = { - start: jspb.Message.getField(msg, 1), - end: jspb.Message.getField(msg, 2) + start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -1506,14 +2390,21 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getStart = functio }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setStart = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearStart = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -1535,14 +2426,21 @@ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getEnd = function( }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setEnd = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearEnd = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -1564,14 +2462,21 @@ proto.google.protobuf.DescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -1594,9 +2499,12 @@ proto.google.protobuf.DescriptorProto.prototype.getFieldList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setFieldList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -1610,8 +2518,12 @@ proto.google.protobuf.DescriptorProto.prototype.addField = function(opt_value, o }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.clearFieldList = function() { - this.setFieldList([]); + return this.setFieldList([]); }; @@ -1625,9 +2537,12 @@ proto.google.protobuf.DescriptorProto.prototype.getExtensionList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setExtensionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 6, value); + return jspb.Message.setRepeatedWrapperField(this, 6, value); }; @@ -1641,8 +2556,12 @@ proto.google.protobuf.DescriptorProto.prototype.addExtension$ = function(opt_val }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.clearExtensionList = function() { - this.setExtensionList([]); + return this.setExtensionList([]); }; @@ -1656,9 +2575,12 @@ proto.google.protobuf.DescriptorProto.prototype.getNestedTypeList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setNestedTypeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; @@ -1672,8 +2594,12 @@ proto.google.protobuf.DescriptorProto.prototype.addNestedType = function(opt_val }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.clearNestedTypeList = function() { - this.setNestedTypeList([]); + return this.setNestedTypeList([]); }; @@ -1687,9 +2613,12 @@ proto.google.protobuf.DescriptorProto.prototype.getEnumTypeList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setEnumTypeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -1703,8 +2632,12 @@ proto.google.protobuf.DescriptorProto.prototype.addEnumType = function(opt_value }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.clearEnumTypeList = function() { - this.setEnumTypeList([]); + return this.setEnumTypeList([]); }; @@ -1718,9 +2651,12 @@ proto.google.protobuf.DescriptorProto.prototype.getExtensionRangeList = function }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setExtensionRangeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); + return jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -1734,8 +2670,12 @@ proto.google.protobuf.DescriptorProto.prototype.addExtensionRange = function(opt }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.clearExtensionRangeList = function() { - this.setExtensionRangeList([]); + return this.setExtensionRangeList([]); }; @@ -1749,9 +2689,12 @@ proto.google.protobuf.DescriptorProto.prototype.getOneofDeclList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setOneofDeclList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 8, value); + return jspb.Message.setRepeatedWrapperField(this, 8, value); }; @@ -1765,8 +2708,12 @@ proto.google.protobuf.DescriptorProto.prototype.addOneofDecl = function(opt_valu }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.clearOneofDeclList = function() { - this.setOneofDeclList([]); + return this.setOneofDeclList([]); }; @@ -1780,14 +2727,21 @@ proto.google.protobuf.DescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.MessageOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.MessageOptions|undefined} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 7, value); + return jspb.Message.setWrapperField(this, 7, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -1810,9 +2764,12 @@ proto.google.protobuf.DescriptorProto.prototype.getReservedRangeList = function( }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ proto.google.protobuf.DescriptorProto.prototype.setReservedRangeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 9, value); + return jspb.Message.setRepeatedWrapperField(this, 9, value); }; @@ -1826,8 +2783,12 @@ proto.google.protobuf.DescriptorProto.prototype.addReservedRange = function(opt_ }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.clearReservedRangeList = function() { - this.setReservedRangeList([]); + return this.setReservedRangeList([]); }; @@ -1840,44 +2801,35 @@ proto.google.protobuf.DescriptorProto.prototype.getReservedNameList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.setReservedNameList = function(value) { - jspb.Message.setField(this, 10, value || []); + return jspb.Message.setField(this, 10, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto} returns this */ proto.google.protobuf.DescriptorProto.prototype.addReservedName = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 10, value, opt_index); + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ proto.google.protobuf.DescriptorProto.prototype.clearReservedNameList = function() { - this.setReservedNameList([]); + return this.setReservedNameList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.ExtensionRangeOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ExtensionRangeOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.ExtensionRangeOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.ExtensionRangeOptions.displayName = 'proto.google.protobuf.ExtensionRangeOptions'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -1889,13 +2841,15 @@ proto.google.protobuf.ExtensionRangeOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.ExtensionRangeOptions.prototype.toObject = function(opt_includeInstance) { @@ -1905,8 +2859,8 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.toObject = function(opt_in /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.ExtensionRangeOptions} msg The msg instance to transform. * @return {!Object} @@ -1961,7 +2915,8 @@ proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader = functi msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.ExtensionRangeOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.ExtensionRangeOptions.extensionsBinary, proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension, proto.google.protobuf.ExtensionRangeOptions.prototype.setExtension); break; @@ -2014,9 +2969,12 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.getUninterpretedOptionList }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this +*/ proto.google.protobuf.ExtensionRangeOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -2025,75 +2983,34 @@ proto.google.protobuf.ExtensionRangeOptions.prototype.setUninterpretedOptionList * @param {number=} opt_index * @return {!proto.google.protobuf.UninterpretedOption} */ -proto.google.protobuf.ExtensionRangeOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); -}; - - -proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); -}; - - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.ExtensionRangeOptions.extensions = {}; - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.ExtensionRangeOptions.extensionsBinary = {}; +proto.google.protobuf.ExtensionRangeOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this */ -proto.google.protobuf.FieldDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); }; -goog.inherits(proto.google.protobuf.FieldDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.FieldDescriptorProto.displayName = 'proto.google.protobuf.FieldDescriptorProto'; -} + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -2103,8 +3020,8 @@ proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_inc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FieldDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -2112,15 +3029,15 @@ proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_inc */ proto.google.protobuf.FieldDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), - number: jspb.Message.getField(msg, 3), - label: jspb.Message.getField(msg, 4), - type: jspb.Message.getField(msg, 5), - typeName: jspb.Message.getField(msg, 6), - extendee: jspb.Message.getField(msg, 2), - defaultValue: jspb.Message.getField(msg, 7), - oneofIndex: jspb.Message.getField(msg, 9), - jsonName: jspb.Message.getField(msg, 10), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + number: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + label: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + type: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + typeName: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f, + extendee: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + defaultValue: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f, + oneofIndex: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f, + jsonName: (f = jspb.Message.getField(msg, 10)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.FieldOptions.toObject(includeInstance, f) }; @@ -2344,14 +3261,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -2373,14 +3297,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getNumber = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setNumber = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.clearNumber = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -2402,14 +3333,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getLabel = function() { }; -/** @param {!proto.google.protobuf.FieldDescriptorProto.Label} value */ +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Label} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setLabel = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.clearLabel = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -2431,14 +3369,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getType = function() { }; -/** @param {!proto.google.protobuf.FieldDescriptorProto.Type} value */ +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Type} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setType = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.clearType = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; @@ -2460,14 +3405,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getTypeName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setTypeName = function(value) { - jspb.Message.setField(this, 6, value); + return jspb.Message.setField(this, 6, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.clearTypeName = function() { - jspb.Message.setField(this, 6, undefined); + return jspb.Message.setField(this, 6, undefined); }; @@ -2489,14 +3441,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getExtendee = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setExtendee = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.clearExtendee = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -2518,14 +3477,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getDefaultValue = function( }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setDefaultValue = function(value) { - jspb.Message.setField(this, 7, value); + return jspb.Message.setField(this, 7, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.clearDefaultValue = function() { - jspb.Message.setField(this, 7, undefined); + return jspb.Message.setField(this, 7, undefined); }; @@ -2547,14 +3513,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getOneofIndex = function() }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setOneofIndex = function(value) { - jspb.Message.setField(this, 9, value); + return jspb.Message.setField(this, 9, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.clearOneofIndex = function() { - jspb.Message.setField(this, 9, undefined); + return jspb.Message.setField(this, 9, undefined); }; @@ -2576,14 +3549,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getJsonName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.setJsonName = function(value) { - jspb.Message.setField(this, 10, value); + return jspb.Message.setField(this, 10, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.clearJsonName = function() { - jspb.Message.setField(this, 10, undefined); + return jspb.Message.setField(this, 10, undefined); }; @@ -2606,14 +3586,21 @@ proto.google.protobuf.FieldDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.FieldOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.FieldOptions|undefined} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this +*/ proto.google.protobuf.FieldDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 8, value); + return jspb.Message.setWrapperField(this, 8, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ proto.google.protobuf.FieldDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -2627,34 +3614,19 @@ proto.google.protobuf.FieldDescriptorProto.prototype.hasOptions = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.OneofDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.OneofDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.OneofDescriptorProto.displayName = 'proto.google.protobuf.OneofDescriptorProto'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -2664,8 +3636,8 @@ proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_inc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.OneofDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -2673,7 +3645,7 @@ proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_inc */ proto.google.protobuf.OneofDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.OneofOptions.toObject(includeInstance, f) }; @@ -2776,14 +3748,21 @@ proto.google.protobuf.OneofDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this + */ proto.google.protobuf.OneofDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this + */ proto.google.protobuf.OneofDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -2806,14 +3785,21 @@ proto.google.protobuf.OneofDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.OneofOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.OneofOptions|undefined} value + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this +*/ proto.google.protobuf.OneofDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this + */ proto.google.protobuf.OneofDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -2827,23 +3813,6 @@ proto.google.protobuf.OneofDescriptorProto.prototype.hasOptions = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.EnumDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.EnumDescriptorProto.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.EnumDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.EnumDescriptorProto.displayName = 'proto.google.protobuf.EnumDescriptorProto'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -2855,13 +3824,15 @@ proto.google.protobuf.EnumDescriptorProto.repeatedFields_ = [2,4,5]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -2871,8 +3842,8 @@ proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_incl /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -2880,13 +3851,13 @@ proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_incl */ proto.google.protobuf.EnumDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, valueList: jspb.Message.toObjectList(msg.getValueList(), proto.google.protobuf.EnumValueDescriptorProto.toObject, includeInstance), options: (f = msg.getOptions()) && proto.google.protobuf.EnumOptions.toObject(includeInstance, f), reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject, includeInstance), - reservedNameList: jspb.Message.getRepeatedField(msg, 5) + reservedNameList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f }; if (includeInstance) { @@ -3017,34 +3988,19 @@ proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter = function(mes -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.EnumDescriptorProto.EnumReservedRange = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.displayName = 'proto.google.protobuf.EnumDescriptorProto.EnumReservedRange'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = function(opt_includeInstance) { @@ -3054,8 +4010,8 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} msg The msg instance to transform. * @return {!Object} @@ -3063,8 +4019,8 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject = function(includeInstance, msg) { var f, obj = { - start: jspb.Message.getField(msg, 1), - end: jspb.Message.getField(msg, 2) + start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -3164,14 +4120,21 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getStart = }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setStart = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearStart = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -3193,14 +4156,21 @@ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getEnd = f }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setEnd = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearEnd = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -3222,14 +4192,21 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ proto.google.protobuf.EnumDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ proto.google.protobuf.EnumDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -3252,9 +4229,12 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getValueList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ proto.google.protobuf.EnumDescriptorProto.prototype.setValueList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -3268,8 +4248,12 @@ proto.google.protobuf.EnumDescriptorProto.prototype.addValue = function(opt_valu }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ proto.google.protobuf.EnumDescriptorProto.prototype.clearValueList = function() { - this.setValueList([]); + return this.setValueList([]); }; @@ -3283,14 +4267,21 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.EnumOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.EnumOptions|undefined} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ proto.google.protobuf.EnumDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ proto.google.protobuf.EnumDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -3313,9 +4304,12 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getReservedRangeList = funct }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ proto.google.protobuf.EnumDescriptorProto.prototype.setReservedRangeList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -3329,8 +4323,12 @@ proto.google.protobuf.EnumDescriptorProto.prototype.addReservedRange = function( }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedRangeList = function() { - this.setReservedRangeList([]); + return this.setReservedRangeList([]); }; @@ -3343,55 +4341,48 @@ proto.google.protobuf.EnumDescriptorProto.prototype.getReservedNameList = functi }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ proto.google.protobuf.EnumDescriptorProto.prototype.setReservedNameList = function(value) { - jspb.Message.setField(this, 5, value || []); + return jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this */ proto.google.protobuf.EnumDescriptorProto.prototype.addReservedName = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 5, value, opt_index); + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedNameList = function() { - this.setReservedNameList([]); + return this.setReservedNameList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.EnumValueDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.EnumValueDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.EnumValueDescriptorProto.displayName = 'proto.google.protobuf.EnumValueDescriptorProto'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -3401,8 +4392,8 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumValueDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -3410,8 +4401,8 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt */ proto.google.protobuf.EnumValueDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), - number: jspb.Message.getField(msg, 2), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + number: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.EnumValueOptions.toObject(includeInstance, f) }; @@ -3525,14 +4516,21 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ proto.google.protobuf.EnumValueDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ proto.google.protobuf.EnumValueDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -3554,14 +4552,21 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.getNumber = function() }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ proto.google.protobuf.EnumValueDescriptorProto.prototype.setNumber = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ proto.google.protobuf.EnumValueDescriptorProto.prototype.clearNumber = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -3584,14 +4589,21 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.getOptions = function() }; -/** @param {?proto.google.protobuf.EnumValueOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.EnumValueOptions|undefined} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this +*/ proto.google.protobuf.EnumValueDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ proto.google.protobuf.EnumValueDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -3605,23 +4617,6 @@ proto.google.protobuf.EnumValueDescriptorProto.prototype.hasOptions = function() -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.ServiceDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ServiceDescriptorProto.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.ServiceDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.ServiceDescriptorProto.displayName = 'proto.google.protobuf.ServiceDescriptorProto'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -3633,13 +4628,15 @@ proto.google.protobuf.ServiceDescriptorProto.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -3649,8 +4646,8 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_i /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.ServiceDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -3658,7 +4655,7 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_i */ proto.google.protobuf.ServiceDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, methodList: jspb.Message.toObjectList(msg.getMethodList(), proto.google.protobuf.MethodDescriptorProto.toObject, includeInstance), options: (f = msg.getOptions()) && proto.google.protobuf.ServiceOptions.toObject(includeInstance, f) @@ -3776,14 +4773,21 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ proto.google.protobuf.ServiceDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ proto.google.protobuf.ServiceDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -3806,9 +4810,12 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.getMethodList = function( }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this +*/ proto.google.protobuf.ServiceDescriptorProto.prototype.setMethodList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -3822,8 +4829,12 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.addMethod = function(opt_ }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ proto.google.protobuf.ServiceDescriptorProto.prototype.clearMethodList = function() { - this.setMethodList([]); + return this.setMethodList([]); }; @@ -3837,14 +4848,21 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.ServiceOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.ServiceOptions|undefined} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this +*/ proto.google.protobuf.ServiceDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ proto.google.protobuf.ServiceDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -3858,34 +4876,19 @@ proto.google.protobuf.ServiceDescriptorProto.prototype.hasOptions = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.MethodDescriptorProto = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.MethodDescriptorProto, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.MethodDescriptorProto.displayName = 'proto.google.protobuf.MethodDescriptorProto'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_includeInstance) { @@ -3895,8 +4898,8 @@ proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_in /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.MethodDescriptorProto} msg The msg instance to transform. * @return {!Object} @@ -3904,12 +4907,12 @@ proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_in */ proto.google.protobuf.MethodDescriptorProto.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getField(msg, 1), - inputType: jspb.Message.getField(msg, 2), - outputType: jspb.Message.getField(msg, 3), + name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + inputType: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + outputType: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, options: (f = msg.getOptions()) && proto.google.protobuf.MethodOptions.toObject(includeInstance, f), - clientStreaming: jspb.Message.getFieldWithDefault(msg, 5, false), - serverStreaming: jspb.Message.getFieldWithDefault(msg, 6, false) + clientStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + serverStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -4055,14 +5058,21 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.clearName = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -4084,14 +5094,21 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getInputType = function() }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setInputType = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.clearInputType = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -4113,14 +5130,21 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getOutputType = function() }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setOutputType = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.clearOutputType = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -4143,14 +5167,21 @@ proto.google.protobuf.MethodDescriptorProto.prototype.getOptions = function() { }; -/** @param {?proto.google.protobuf.MethodOptions|undefined} value */ +/** + * @param {?proto.google.protobuf.MethodOptions|undefined} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this +*/ proto.google.protobuf.MethodDescriptorProto.prototype.setOptions = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.clearOptions = function() { - this.setOptions(undefined); + return this.setOptions(undefined); }; @@ -4165,23 +5196,28 @@ proto.google.protobuf.MethodDescriptorProto.prototype.hasOptions = function() { /** * optional bool client_streaming = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MethodDescriptorProto.prototype.getClientStreaming = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setClientStreaming = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.clearClientStreaming = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; @@ -4196,23 +5232,28 @@ proto.google.protobuf.MethodDescriptorProto.prototype.hasClientStreaming = funct /** * optional bool server_streaming = 6; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MethodDescriptorProto.prototype.getServerStreaming = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.setServerStreaming = function(value) { - jspb.Message.setField(this, 6, value); + return jspb.Message.setField(this, 6, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ proto.google.protobuf.MethodDescriptorProto.prototype.clearServerStreaming = function() { - jspb.Message.setField(this, 6, undefined); + return jspb.Message.setField(this, 6, undefined); }; @@ -4226,23 +5267,6 @@ proto.google.protobuf.MethodDescriptorProto.prototype.hasServerStreaming = funct -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.FileOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FileOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.FileOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.FileOptions.displayName = 'proto.google.protobuf.FileOptions'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -4254,13 +5278,15 @@ proto.google.protobuf.FileOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInstance) { @@ -4270,8 +5296,8 @@ proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FileOptions} msg The msg instance to transform. * @return {!Object} @@ -4279,26 +5305,26 @@ proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInsta */ proto.google.protobuf.FileOptions.toObject = function(includeInstance, msg) { var f, obj = { - javaPackage: jspb.Message.getField(msg, 1), - javaOuterClassname: jspb.Message.getField(msg, 8), - javaMultipleFiles: jspb.Message.getFieldWithDefault(msg, 10, false), - javaGenerateEqualsAndHash: jspb.Message.getField(msg, 20), - javaStringCheckUtf8: jspb.Message.getFieldWithDefault(msg, 27, false), + javaPackage: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + javaOuterClassname: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f, + javaMultipleFiles: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + javaGenerateEqualsAndHash: (f = jspb.Message.getBooleanField(msg, 20)) == null ? undefined : f, + javaStringCheckUtf8: jspb.Message.getBooleanFieldWithDefault(msg, 27, false), optimizeFor: jspb.Message.getFieldWithDefault(msg, 9, 1), - goPackage: jspb.Message.getField(msg, 11), - ccGenericServices: jspb.Message.getFieldWithDefault(msg, 16, false), - javaGenericServices: jspb.Message.getFieldWithDefault(msg, 17, false), - pyGenericServices: jspb.Message.getFieldWithDefault(msg, 18, false), - phpGenericServices: jspb.Message.getFieldWithDefault(msg, 42, false), - deprecated: jspb.Message.getFieldWithDefault(msg, 23, false), - ccEnableArenas: jspb.Message.getFieldWithDefault(msg, 31, false), - objcClassPrefix: jspb.Message.getField(msg, 36), - csharpNamespace: jspb.Message.getField(msg, 37), - swiftPrefix: jspb.Message.getField(msg, 39), - phpClassPrefix: jspb.Message.getField(msg, 40), - phpNamespace: jspb.Message.getField(msg, 41), - phpMetadataNamespace: jspb.Message.getField(msg, 44), - rubyPackage: jspb.Message.getField(msg, 45), + goPackage: (f = jspb.Message.getField(msg, 11)) == null ? undefined : f, + ccGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), + javaGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), + pyGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), + phpGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 42, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 23, false), + ccEnableArenas: jspb.Message.getBooleanFieldWithDefault(msg, 31, false), + objcClassPrefix: (f = jspb.Message.getField(msg, 36)) == null ? undefined : f, + csharpNamespace: (f = jspb.Message.getField(msg, 37)) == null ? undefined : f, + swiftPrefix: (f = jspb.Message.getField(msg, 39)) == null ? undefined : f, + phpClassPrefix: (f = jspb.Message.getField(msg, 40)) == null ? undefined : f, + phpNamespace: (f = jspb.Message.getField(msg, 41)) == null ? undefined : f, + phpMetadataNamespace: (f = jspb.Message.getField(msg, 44)) == null ? undefined : f, + rubyPackage: (f = jspb.Message.getField(msg, 45)) == null ? undefined : f, uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -4426,7 +5452,8 @@ proto.google.protobuf.FileOptions.deserializeBinaryFromReader = function(msg, re msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.FileOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.FileOptions.extensionsBinary, proto.google.protobuf.FileOptions.prototype.getExtension, proto.google.protobuf.FileOptions.prototype.setExtension); break; @@ -4627,14 +5654,21 @@ proto.google.protobuf.FileOptions.prototype.getJavaPackage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaPackage = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearJavaPackage = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -4656,14 +5690,21 @@ proto.google.protobuf.FileOptions.prototype.getJavaOuterClassname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaOuterClassname = function(value) { - jspb.Message.setField(this, 8, value); + return jspb.Message.setField(this, 8, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearJavaOuterClassname = function() { - jspb.Message.setField(this, 8, undefined); + return jspb.Message.setField(this, 8, undefined); }; @@ -4678,23 +5719,28 @@ proto.google.protobuf.FileOptions.prototype.hasJavaOuterClassname = function() { /** * optional bool java_multiple_files = 10; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaMultipleFiles = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaMultipleFiles = function(value) { - jspb.Message.setField(this, 10, value); + return jspb.Message.setField(this, 10, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearJavaMultipleFiles = function() { - jspb.Message.setField(this, 10, undefined); + return jspb.Message.setField(this, 10, undefined); }; @@ -4709,23 +5755,28 @@ proto.google.protobuf.FileOptions.prototype.hasJavaMultipleFiles = function() { /** * optional bool java_generate_equals_and_hash = 20; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaGenerateEqualsAndHash = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 20, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 20, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaGenerateEqualsAndHash = function(value) { - jspb.Message.setField(this, 20, value); + return jspb.Message.setField(this, 20, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearJavaGenerateEqualsAndHash = function() { - jspb.Message.setField(this, 20, undefined); + return jspb.Message.setField(this, 20, undefined); }; @@ -4740,23 +5791,28 @@ proto.google.protobuf.FileOptions.prototype.hasJavaGenerateEqualsAndHash = funct /** * optional bool java_string_check_utf8 = 27; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaStringCheckUtf8 = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 27, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 27, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaStringCheckUtf8 = function(value) { - jspb.Message.setField(this, 27, value); + return jspb.Message.setField(this, 27, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearJavaStringCheckUtf8 = function() { - jspb.Message.setField(this, 27, undefined); + return jspb.Message.setField(this, 27, undefined); }; @@ -4778,14 +5834,21 @@ proto.google.protobuf.FileOptions.prototype.getOptimizeFor = function() { }; -/** @param {!proto.google.protobuf.FileOptions.OptimizeMode} value */ +/** + * @param {!proto.google.protobuf.FileOptions.OptimizeMode} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setOptimizeFor = function(value) { - jspb.Message.setField(this, 9, value); + return jspb.Message.setField(this, 9, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearOptimizeFor = function() { - jspb.Message.setField(this, 9, undefined); + return jspb.Message.setField(this, 9, undefined); }; @@ -4807,14 +5870,21 @@ proto.google.protobuf.FileOptions.prototype.getGoPackage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setGoPackage = function(value) { - jspb.Message.setField(this, 11, value); + return jspb.Message.setField(this, 11, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearGoPackage = function() { - jspb.Message.setField(this, 11, undefined); + return jspb.Message.setField(this, 11, undefined); }; @@ -4829,23 +5899,28 @@ proto.google.protobuf.FileOptions.prototype.hasGoPackage = function() { /** * optional bool cc_generic_services = 16; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getCcGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 16, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setCcGenericServices = function(value) { - jspb.Message.setField(this, 16, value); + return jspb.Message.setField(this, 16, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearCcGenericServices = function() { - jspb.Message.setField(this, 16, undefined); + return jspb.Message.setField(this, 16, undefined); }; @@ -4860,23 +5935,28 @@ proto.google.protobuf.FileOptions.prototype.hasCcGenericServices = function() { /** * optional bool java_generic_services = 17; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getJavaGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 17, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setJavaGenericServices = function(value) { - jspb.Message.setField(this, 17, value); + return jspb.Message.setField(this, 17, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearJavaGenericServices = function() { - jspb.Message.setField(this, 17, undefined); + return jspb.Message.setField(this, 17, undefined); }; @@ -4891,23 +5971,28 @@ proto.google.protobuf.FileOptions.prototype.hasJavaGenericServices = function() /** * optional bool py_generic_services = 18; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getPyGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPyGenericServices = function(value) { - jspb.Message.setField(this, 18, value); + return jspb.Message.setField(this, 18, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearPyGenericServices = function() { - jspb.Message.setField(this, 18, undefined); + return jspb.Message.setField(this, 18, undefined); }; @@ -4922,23 +6007,28 @@ proto.google.protobuf.FileOptions.prototype.hasPyGenericServices = function() { /** * optional bool php_generic_services = 42; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getPhpGenericServices = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 42, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 42, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPhpGenericServices = function(value) { - jspb.Message.setField(this, 42, value); + return jspb.Message.setField(this, 42, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearPhpGenericServices = function() { - jspb.Message.setField(this, 42, undefined); + return jspb.Message.setField(this, 42, undefined); }; @@ -4953,23 +6043,28 @@ proto.google.protobuf.FileOptions.prototype.hasPhpGenericServices = function() { /** * optional bool deprecated = 23; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 23, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 23, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 23, value); + return jspb.Message.setField(this, 23, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 23, undefined); + return jspb.Message.setField(this, 23, undefined); }; @@ -4984,23 +6079,28 @@ proto.google.protobuf.FileOptions.prototype.hasDeprecated = function() { /** * optional bool cc_enable_arenas = 31; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FileOptions.prototype.getCcEnableArenas = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 31, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 31, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setCcEnableArenas = function(value) { - jspb.Message.setField(this, 31, value); + return jspb.Message.setField(this, 31, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearCcEnableArenas = function() { - jspb.Message.setField(this, 31, undefined); + return jspb.Message.setField(this, 31, undefined); }; @@ -5022,14 +6122,21 @@ proto.google.protobuf.FileOptions.prototype.getObjcClassPrefix = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setObjcClassPrefix = function(value) { - jspb.Message.setField(this, 36, value); + return jspb.Message.setField(this, 36, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearObjcClassPrefix = function() { - jspb.Message.setField(this, 36, undefined); + return jspb.Message.setField(this, 36, undefined); }; @@ -5051,14 +6158,21 @@ proto.google.protobuf.FileOptions.prototype.getCsharpNamespace = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setCsharpNamespace = function(value) { - jspb.Message.setField(this, 37, value); + return jspb.Message.setField(this, 37, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearCsharpNamespace = function() { - jspb.Message.setField(this, 37, undefined); + return jspb.Message.setField(this, 37, undefined); }; @@ -5080,14 +6194,21 @@ proto.google.protobuf.FileOptions.prototype.getSwiftPrefix = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setSwiftPrefix = function(value) { - jspb.Message.setField(this, 39, value); + return jspb.Message.setField(this, 39, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearSwiftPrefix = function() { - jspb.Message.setField(this, 39, undefined); + return jspb.Message.setField(this, 39, undefined); }; @@ -5109,14 +6230,21 @@ proto.google.protobuf.FileOptions.prototype.getPhpClassPrefix = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPhpClassPrefix = function(value) { - jspb.Message.setField(this, 40, value); + return jspb.Message.setField(this, 40, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearPhpClassPrefix = function() { - jspb.Message.setField(this, 40, undefined); + return jspb.Message.setField(this, 40, undefined); }; @@ -5138,14 +6266,21 @@ proto.google.protobuf.FileOptions.prototype.getPhpNamespace = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPhpNamespace = function(value) { - jspb.Message.setField(this, 41, value); + return jspb.Message.setField(this, 41, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearPhpNamespace = function() { - jspb.Message.setField(this, 41, undefined); + return jspb.Message.setField(this, 41, undefined); }; @@ -5167,14 +6302,21 @@ proto.google.protobuf.FileOptions.prototype.getPhpMetadataNamespace = function() }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setPhpMetadataNamespace = function(value) { - jspb.Message.setField(this, 44, value); + return jspb.Message.setField(this, 44, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearPhpMetadataNamespace = function() { - jspb.Message.setField(this, 44, undefined); + return jspb.Message.setField(this, 44, undefined); }; @@ -5196,14 +6338,21 @@ proto.google.protobuf.FileOptions.prototype.getRubyPackage = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.setRubyPackage = function(value) { - jspb.Message.setField(this, 45, value); + return jspb.Message.setField(this, 45, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ proto.google.protobuf.FileOptions.prototype.clearRubyPackage = function() { - jspb.Message.setField(this, 45, undefined); + return jspb.Message.setField(this, 45, undefined); }; @@ -5226,9 +6375,12 @@ proto.google.protobuf.FileOptions.prototype.getUninterpretedOptionList = functio }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileOptions} returns this +*/ proto.google.protobuf.FileOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -5242,59 +6394,16 @@ proto.google.protobuf.FileOptions.prototype.addUninterpretedOption = function(op }; -proto.google.protobuf.FileOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); -}; - - - /** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileOptions} returns this */ -proto.google.protobuf.FileOptions.extensions = {}; - +proto.google.protobuf.FileOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.FileOptions.extensionsBinary = {}; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.MessageOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MessageOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.MessageOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.MessageOptions.displayName = 'proto.google.protobuf.MessageOptions'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -5306,13 +6415,15 @@ proto.google.protobuf.MessageOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeInstance) { @@ -5322,8 +6433,8 @@ proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeIn /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.MessageOptions} msg The msg instance to transform. * @return {!Object} @@ -5331,10 +6442,10 @@ proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeIn */ proto.google.protobuf.MessageOptions.toObject = function(includeInstance, msg) { var f, obj = { - messageSetWireFormat: jspb.Message.getFieldWithDefault(msg, 1, false), - noStandardDescriptorAccessor: jspb.Message.getFieldWithDefault(msg, 2, false), - deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), - mapEntry: jspb.Message.getField(msg, 7), + messageSetWireFormat: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + noStandardDescriptorAccessor: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + mapEntry: (f = jspb.Message.getBooleanField(msg, 7)) == null ? undefined : f, uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -5398,7 +6509,8 @@ proto.google.protobuf.MessageOptions.deserializeBinaryFromReader = function(msg, msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.MessageOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.MessageOptions.extensionsBinary, proto.google.protobuf.MessageOptions.prototype.getExtension, proto.google.protobuf.MessageOptions.prototype.setExtension); break; @@ -5471,23 +6583,28 @@ proto.google.protobuf.MessageOptions.serializeBinaryToWriter = function(message, /** * optional bool message_set_wire_format = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getMessageSetWireFormat = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.setMessageSetWireFormat = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.clearMessageSetWireFormat = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -5502,23 +6619,28 @@ proto.google.protobuf.MessageOptions.prototype.hasMessageSetWireFormat = functio /** * optional bool no_standard_descriptor_accessor = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getNoStandardDescriptorAccessor = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.setNoStandardDescriptorAccessor = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.clearNoStandardDescriptorAccessor = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -5533,23 +6655,28 @@ proto.google.protobuf.MessageOptions.prototype.hasNoStandardDescriptorAccessor = /** * optional bool deprecated = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -5564,23 +6691,28 @@ proto.google.protobuf.MessageOptions.prototype.hasDeprecated = function() { /** * optional bool map_entry = 7; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MessageOptions.prototype.getMapEntry = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 7, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.setMapEntry = function(value) { - jspb.Message.setField(this, 7, value); + return jspb.Message.setField(this, 7, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ proto.google.protobuf.MessageOptions.prototype.clearMapEntry = function() { - jspb.Message.setField(this, 7, undefined); + return jspb.Message.setField(this, 7, undefined); }; @@ -5603,9 +6735,12 @@ proto.google.protobuf.MessageOptions.prototype.getUninterpretedOptionList = func }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.MessageOptions} returns this +*/ proto.google.protobuf.MessageOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -5619,59 +6754,16 @@ proto.google.protobuf.MessageOptions.prototype.addUninterpretedOption = function }; -proto.google.protobuf.MessageOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); -}; - - - /** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.MessageOptions} returns this */ -proto.google.protobuf.MessageOptions.extensions = {}; - +proto.google.protobuf.MessageOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.MessageOptions.extensionsBinary = {}; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.FieldOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FieldOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.FieldOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.FieldOptions.displayName = 'proto.google.protobuf.FieldOptions'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -5683,13 +6775,15 @@ proto.google.protobuf.FieldOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInstance) { @@ -5699,8 +6793,8 @@ proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.FieldOptions} msg The msg instance to transform. * @return {!Object} @@ -5709,11 +6803,11 @@ proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInst proto.google.protobuf.FieldOptions.toObject = function(includeInstance, msg) { var f, obj = { ctype: jspb.Message.getFieldWithDefault(msg, 1, 0), - packed: jspb.Message.getField(msg, 2), + packed: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, jstype: jspb.Message.getFieldWithDefault(msg, 6, 0), - lazy: jspb.Message.getFieldWithDefault(msg, 5, false), - deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), - weak: jspb.Message.getFieldWithDefault(msg, 10, false), + lazy: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + weak: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -5785,7 +6879,8 @@ proto.google.protobuf.FieldOptions.deserializeBinaryFromReader = function(msg, r msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.FieldOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.FieldOptions.extensionsBinary, proto.google.protobuf.FieldOptions.prototype.getExtension, proto.google.protobuf.FieldOptions.prototype.setExtension); break; @@ -5897,14 +6992,21 @@ proto.google.protobuf.FieldOptions.prototype.getCtype = function() { }; -/** @param {!proto.google.protobuf.FieldOptions.CType} value */ +/** + * @param {!proto.google.protobuf.FieldOptions.CType} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setCtype = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.clearCtype = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -5919,23 +7021,28 @@ proto.google.protobuf.FieldOptions.prototype.hasCtype = function() { /** * optional bool packed = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getPacked = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setPacked = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.clearPacked = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -5957,14 +7064,21 @@ proto.google.protobuf.FieldOptions.prototype.getJstype = function() { }; -/** @param {!proto.google.protobuf.FieldOptions.JSType} value */ +/** + * @param {!proto.google.protobuf.FieldOptions.JSType} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setJstype = function(value) { - jspb.Message.setField(this, 6, value); + return jspb.Message.setField(this, 6, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.clearJstype = function() { - jspb.Message.setField(this, 6, undefined); + return jspb.Message.setField(this, 6, undefined); }; @@ -5979,23 +7093,28 @@ proto.google.protobuf.FieldOptions.prototype.hasJstype = function() { /** * optional bool lazy = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getLazy = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setLazy = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.clearLazy = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; @@ -6010,23 +7129,28 @@ proto.google.protobuf.FieldOptions.prototype.hasLazy = function() { /** * optional bool deprecated = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -6041,23 +7165,28 @@ proto.google.protobuf.FieldOptions.prototype.hasDeprecated = function() { /** * optional bool weak = 10; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.FieldOptions.prototype.getWeak = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.setWeak = function(value) { - jspb.Message.setField(this, 10, value); + return jspb.Message.setField(this, 10, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ proto.google.protobuf.FieldOptions.prototype.clearWeak = function() { - jspb.Message.setField(this, 10, undefined); + return jspb.Message.setField(this, 10, undefined); }; @@ -6080,9 +7209,12 @@ proto.google.protobuf.FieldOptions.prototype.getUninterpretedOptionList = functi }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FieldOptions} returns this +*/ proto.google.protobuf.FieldOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -6096,59 +7228,16 @@ proto.google.protobuf.FieldOptions.prototype.addUninterpretedOption = function(o }; -proto.google.protobuf.FieldOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); -}; - - - /** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FieldOptions} returns this */ -proto.google.protobuf.FieldOptions.extensions = {}; - +proto.google.protobuf.FieldOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.FieldOptions.extensionsBinary = {}; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.OneofOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.OneofOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.OneofOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.OneofOptions.displayName = 'proto.google.protobuf.OneofOptions'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -6160,13 +7249,15 @@ proto.google.protobuf.OneofOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.OneofOptions.prototype.toObject = function(opt_includeInstance) { @@ -6176,8 +7267,8 @@ proto.google.protobuf.OneofOptions.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.OneofOptions} msg The msg instance to transform. * @return {!Object} @@ -6232,7 +7323,8 @@ proto.google.protobuf.OneofOptions.deserializeBinaryFromReader = function(msg, r msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.OneofOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.OneofOptions.extensionsBinary, proto.google.protobuf.OneofOptions.prototype.getExtension, proto.google.protobuf.OneofOptions.prototype.setExtension); break; @@ -6285,9 +7377,12 @@ proto.google.protobuf.OneofOptions.prototype.getUninterpretedOptionList = functi }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.OneofOptions} returns this +*/ proto.google.protobuf.OneofOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -6301,59 +7396,16 @@ proto.google.protobuf.OneofOptions.prototype.addUninterpretedOption = function(o }; -proto.google.protobuf.OneofOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); -}; - - - /** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.OneofOptions} returns this */ -proto.google.protobuf.OneofOptions.extensions = {}; - +proto.google.protobuf.OneofOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.OneofOptions.extensionsBinary = {}; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.EnumOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.EnumOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.EnumOptions.displayName = 'proto.google.protobuf.EnumOptions'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -6365,13 +7417,15 @@ proto.google.protobuf.EnumOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInstance) { @@ -6381,8 +7435,8 @@ proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumOptions} msg The msg instance to transform. * @return {!Object} @@ -6390,8 +7444,8 @@ proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInsta */ proto.google.protobuf.EnumOptions.toObject = function(includeInstance, msg) { var f, obj = { - allowAlias: jspb.Message.getField(msg, 2), - deprecated: jspb.Message.getFieldWithDefault(msg, 3, false), + allowAlias: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -6447,7 +7501,8 @@ proto.google.protobuf.EnumOptions.deserializeBinaryFromReader = function(msg, re msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.EnumOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.EnumOptions.extensionsBinary, proto.google.protobuf.EnumOptions.prototype.getExtension, proto.google.protobuf.EnumOptions.prototype.setExtension); break; @@ -6506,23 +7561,28 @@ proto.google.protobuf.EnumOptions.serializeBinaryToWriter = function(message, wr /** * optional bool allow_alias = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.EnumOptions.prototype.getAllowAlias = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumOptions} returns this + */ proto.google.protobuf.EnumOptions.prototype.setAllowAlias = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumOptions} returns this + */ proto.google.protobuf.EnumOptions.prototype.clearAllowAlias = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -6537,23 +7597,28 @@ proto.google.protobuf.EnumOptions.prototype.hasAllowAlias = function() { /** * optional bool deprecated = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.EnumOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumOptions} returns this + */ proto.google.protobuf.EnumOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumOptions} returns this + */ proto.google.protobuf.EnumOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -6576,9 +7641,12 @@ proto.google.protobuf.EnumOptions.prototype.getUninterpretedOptionList = functio }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumOptions} returns this +*/ proto.google.protobuf.EnumOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -6592,59 +7660,16 @@ proto.google.protobuf.EnumOptions.prototype.addUninterpretedOption = function(op }; -proto.google.protobuf.EnumOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); -}; - - - /** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumOptions} returns this */ -proto.google.protobuf.EnumOptions.extensions = {}; - +proto.google.protobuf.EnumOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.EnumOptions.extensionsBinary = {}; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.EnumValueOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumValueOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.EnumValueOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.EnumValueOptions.displayName = 'proto.google.protobuf.EnumValueOptions'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -6656,13 +7681,15 @@ proto.google.protobuf.EnumValueOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_includeInstance) { @@ -6672,8 +7699,8 @@ proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_include /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.EnumValueOptions} msg The msg instance to transform. * @return {!Object} @@ -6681,7 +7708,7 @@ proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_include */ proto.google.protobuf.EnumValueOptions.toObject = function(includeInstance, msg) { var f, obj = { - deprecated: jspb.Message.getFieldWithDefault(msg, 1, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -6733,7 +7760,8 @@ proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader = function(ms msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.EnumValueOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.EnumValueOptions.extensionsBinary, proto.google.protobuf.EnumValueOptions.prototype.getExtension, proto.google.protobuf.EnumValueOptions.prototype.setExtension); break; @@ -6785,23 +7813,28 @@ proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter = function(messag /** * optional bool deprecated = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.EnumValueOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ proto.google.protobuf.EnumValueOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ proto.google.protobuf.EnumValueOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -6824,9 +7857,12 @@ proto.google.protobuf.EnumValueOptions.prototype.getUninterpretedOptionList = fu }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumValueOptions} returns this +*/ proto.google.protobuf.EnumValueOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -6840,59 +7876,16 @@ proto.google.protobuf.EnumValueOptions.prototype.addUninterpretedOption = functi }; -proto.google.protobuf.EnumValueOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); -}; - - - /** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumValueOptions} returns this */ -proto.google.protobuf.EnumValueOptions.extensions = {}; - +proto.google.protobuf.EnumValueOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.EnumValueOptions.extensionsBinary = {}; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.ServiceOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ServiceOptions.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.ServiceOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.ServiceOptions.displayName = 'proto.google.protobuf.ServiceOptions'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -6904,13 +7897,15 @@ proto.google.protobuf.ServiceOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeInstance) { @@ -6920,8 +7915,8 @@ proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeIn /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.ServiceOptions} msg The msg instance to transform. * @return {!Object} @@ -6929,7 +7924,7 @@ proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeIn */ proto.google.protobuf.ServiceOptions.toObject = function(includeInstance, msg) { var f, obj = { - deprecated: jspb.Message.getFieldWithDefault(msg, 33, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) }; @@ -6981,7 +7976,8 @@ proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader = function(msg, msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.ServiceOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.ServiceOptions.extensionsBinary, proto.google.protobuf.ServiceOptions.prototype.getExtension, proto.google.protobuf.ServiceOptions.prototype.setExtension); break; @@ -7033,23 +8029,28 @@ proto.google.protobuf.ServiceOptions.serializeBinaryToWriter = function(message, /** * optional bool deprecated = 33; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.ServiceOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 33, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.ServiceOptions} returns this + */ proto.google.protobuf.ServiceOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 33, value); + return jspb.Message.setField(this, 33, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.ServiceOptions} returns this + */ proto.google.protobuf.ServiceOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 33, undefined); + return jspb.Message.setField(this, 33, undefined); }; @@ -7072,9 +8073,12 @@ proto.google.protobuf.ServiceOptions.prototype.getUninterpretedOptionList = func }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ServiceOptions} returns this +*/ proto.google.protobuf.ServiceOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7088,59 +8092,16 @@ proto.google.protobuf.ServiceOptions.prototype.addUninterpretedOption = function }; -proto.google.protobuf.ServiceOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); -}; - - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.ServiceOptions.extensions = {}; - - -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.ServiceOptions.extensionsBinary = {}; - - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ServiceOptions} returns this */ -proto.google.protobuf.MethodOptions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MethodOptions.repeatedFields_, null); +proto.google.protobuf.ServiceOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); }; -goog.inherits(proto.google.protobuf.MethodOptions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.MethodOptions.displayName = 'proto.google.protobuf.MethodOptions'; -} + + + /** * List of repeated fields within this message type. * @private {!Array} @@ -7152,13 +8113,15 @@ proto.google.protobuf.MethodOptions.repeatedFields_ = [999]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeInstance) { @@ -7168,8 +8131,8 @@ proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeIns /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.MethodOptions} msg The msg instance to transform. * @return {!Object} @@ -7177,7 +8140,7 @@ proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeIns */ proto.google.protobuf.MethodOptions.toObject = function(includeInstance, msg) { var f, obj = { - deprecated: jspb.Message.getFieldWithDefault(msg, 33, false), + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false), idempotencyLevel: jspb.Message.getFieldWithDefault(msg, 34, 0), uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), proto.google.protobuf.UninterpretedOption.toObject, includeInstance) @@ -7234,7 +8197,8 @@ proto.google.protobuf.MethodOptions.deserializeBinaryFromReader = function(msg, msg.addUninterpretedOption(value); break; default: - jspb.Message.readBinaryExtension(msg, reader, proto.google.protobuf.MethodOptions.extensionsBinary, + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.MethodOptions.extensionsBinary, proto.google.protobuf.MethodOptions.prototype.getExtension, proto.google.protobuf.MethodOptions.prototype.setExtension); break; @@ -7302,23 +8266,28 @@ proto.google.protobuf.MethodOptions.IdempotencyLevel = { /** * optional bool deprecated = 33; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.MethodOptions.prototype.getDeprecated = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 33, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodOptions} returns this + */ proto.google.protobuf.MethodOptions.prototype.setDeprecated = function(value) { - jspb.Message.setField(this, 33, value); + return jspb.Message.setField(this, 33, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodOptions} returns this + */ proto.google.protobuf.MethodOptions.prototype.clearDeprecated = function() { - jspb.Message.setField(this, 33, undefined); + return jspb.Message.setField(this, 33, undefined); }; @@ -7340,14 +8309,21 @@ proto.google.protobuf.MethodOptions.prototype.getIdempotencyLevel = function() { }; -/** @param {!proto.google.protobuf.MethodOptions.IdempotencyLevel} value */ +/** + * @param {!proto.google.protobuf.MethodOptions.IdempotencyLevel} value + * @return {!proto.google.protobuf.MethodOptions} returns this + */ proto.google.protobuf.MethodOptions.prototype.setIdempotencyLevel = function(value) { - jspb.Message.setField(this, 34, value); + return jspb.Message.setField(this, 34, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodOptions} returns this + */ proto.google.protobuf.MethodOptions.prototype.clearIdempotencyLevel = function() { - jspb.Message.setField(this, 34, undefined); + return jspb.Message.setField(this, 34, undefined); }; @@ -7370,9 +8346,12 @@ proto.google.protobuf.MethodOptions.prototype.getUninterpretedOptionList = funct }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.MethodOptions} returns this +*/ proto.google.protobuf.MethodOptions.prototype.setUninterpretedOptionList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 999, value); + return jspb.Message.setRepeatedWrapperField(this, 999, value); }; @@ -7386,59 +8365,16 @@ proto.google.protobuf.MethodOptions.prototype.addUninterpretedOption = function( }; -proto.google.protobuf.MethodOptions.prototype.clearUninterpretedOptionList = function() { - this.setUninterpretedOptionList([]); -}; - - - /** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.MethodOptions} returns this */ -proto.google.protobuf.MethodOptions.extensions = {}; - +proto.google.protobuf.MethodOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; -/** - * The extensions registered with this message class. This is a map of - * extension field number to fieldInfo object. - * - * For example: - * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } - * - * fieldName contains the JsCompiler renamed field name property so that it - * works in OPTIMIZED mode. - * - * @type {!Object} - */ -proto.google.protobuf.MethodOptions.extensionsBinary = {}; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.UninterpretedOption = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.UninterpretedOption.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.UninterpretedOption, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.UninterpretedOption.displayName = 'proto.google.protobuf.UninterpretedOption'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -7450,13 +8386,15 @@ proto.google.protobuf.UninterpretedOption.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.UninterpretedOption.prototype.toObject = function(opt_includeInstance) { @@ -7466,8 +8404,8 @@ proto.google.protobuf.UninterpretedOption.prototype.toObject = function(opt_incl /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.UninterpretedOption} msg The msg instance to transform. * @return {!Object} @@ -7477,12 +8415,12 @@ proto.google.protobuf.UninterpretedOption.toObject = function(includeInstance, m var f, obj = { nameList: jspb.Message.toObjectList(msg.getNameList(), proto.google.protobuf.UninterpretedOption.NamePart.toObject, includeInstance), - identifierValue: jspb.Message.getField(msg, 3), - positiveIntValue: jspb.Message.getField(msg, 4), - negativeIntValue: jspb.Message.getField(msg, 5), - doubleValue: jspb.Message.getOptionalFloatingPointField(msg, 6), + identifierValue: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + positiveIntValue: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + negativeIntValue: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + doubleValue: (f = jspb.Message.getOptionalFloatingPointField(msg, 6)) == null ? undefined : f, stringValue: msg.getStringValue_asB64(), - aggregateValue: jspb.Message.getField(msg, 8) + aggregateValue: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f }; if (includeInstance) { @@ -7631,34 +8569,19 @@ proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter = function(mes -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.UninterpretedOption.NamePart = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.UninterpretedOption.NamePart, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.UninterpretedOption.NamePart.displayName = 'proto.google.protobuf.UninterpretedOption.NamePart'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function(opt_includeInstance) { @@ -7668,8 +8591,8 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.UninterpretedOption.NamePart} msg The msg instance to transform. * @return {!Object} @@ -7677,8 +8600,8 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function */ proto.google.protobuf.UninterpretedOption.NamePart.toObject = function(includeInstance, msg) { var f, obj = { - namePart: jspb.Message.getField(msg, 1), - isExtension: jspb.Message.getField(msg, 2) + namePart: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + isExtension: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -7778,14 +8701,21 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.getNamePart = funct }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.setNamePart = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearNamePart = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -7800,23 +8730,28 @@ proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasNamePart = funct /** * required bool is_extension = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.getIsExtension = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.setIsExtension = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearIsExtension = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -7839,9 +8774,12 @@ proto.google.protobuf.UninterpretedOption.prototype.getNameList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this +*/ proto.google.protobuf.UninterpretedOption.prototype.setNameList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -7855,8 +8793,12 @@ proto.google.protobuf.UninterpretedOption.prototype.addName = function(opt_value }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.clearNameList = function() { - this.setNameList([]); + return this.setNameList([]); }; @@ -7869,14 +8811,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getIdentifierValue = functio }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setIdentifierValue = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.clearIdentifierValue = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -7898,14 +8847,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getPositiveIntValue = functi }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setPositiveIntValue = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.clearPositiveIntValue = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -7927,14 +8883,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getNegativeIntValue = functi }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setNegativeIntValue = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.clearNegativeIntValue = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; @@ -7952,18 +8915,25 @@ proto.google.protobuf.UninterpretedOption.prototype.hasNegativeIntValue = functi * @return {number} */ proto.google.protobuf.UninterpretedOption.prototype.getDoubleValue = function() { - return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 6, 0.0)); + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setDoubleValue = function(value) { - jspb.Message.setField(this, 6, value); + return jspb.Message.setField(this, 6, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.clearDoubleValue = function() { - jspb.Message.setField(this, 6, undefined); + return jspb.Message.setField(this, 6, undefined); }; @@ -8009,14 +8979,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asU8 = functi }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setStringValue = function(value) { - jspb.Message.setField(this, 7, value); + return jspb.Message.setField(this, 7, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.clearStringValue = function() { - jspb.Message.setField(this, 7, undefined); + return jspb.Message.setField(this, 7, undefined); }; @@ -8038,14 +9015,21 @@ proto.google.protobuf.UninterpretedOption.prototype.getAggregateValue = function }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.setAggregateValue = function(value) { - jspb.Message.setField(this, 8, value); + return jspb.Message.setField(this, 8, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ proto.google.protobuf.UninterpretedOption.prototype.clearAggregateValue = function() { - jspb.Message.setField(this, 8, undefined); + return jspb.Message.setField(this, 8, undefined); }; @@ -8059,23 +9043,6 @@ proto.google.protobuf.UninterpretedOption.prototype.hasAggregateValue = function -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.SourceCodeInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.SourceCodeInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.SourceCodeInfo.displayName = 'proto.google.protobuf.SourceCodeInfo'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -8087,13 +9054,15 @@ proto.google.protobuf.SourceCodeInfo.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.SourceCodeInfo.prototype.toObject = function(opt_includeInstance) { @@ -8103,8 +9072,8 @@ proto.google.protobuf.SourceCodeInfo.prototype.toObject = function(opt_includeIn /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.SourceCodeInfo} msg The msg instance to transform. * @return {!Object} @@ -8196,23 +9165,6 @@ proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter = function(message, -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.SourceCodeInfo.Location = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.SourceCodeInfo.Location, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.SourceCodeInfo.Location.displayName = 'proto.google.protobuf.SourceCodeInfo.Location'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -8224,13 +9176,15 @@ proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_ = [1,2,6]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_includeInstance) { @@ -8240,8 +9194,8 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_ /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.SourceCodeInfo.Location} msg The msg instance to transform. * @return {!Object} @@ -8249,11 +9203,11 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_ */ proto.google.protobuf.SourceCodeInfo.Location.toObject = function(includeInstance, msg) { var f, obj = { - pathList: jspb.Message.getRepeatedField(msg, 1), - spanList: jspb.Message.getRepeatedField(msg, 2), - leadingComments: jspb.Message.getField(msg, 3), - trailingComments: jspb.Message.getField(msg, 4), - leadingDetachedCommentsList: jspb.Message.getRepeatedField(msg, 6) + pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + spanList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + leadingComments: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + trailingComments: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + leadingDetachedCommentsList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f }; if (includeInstance) { @@ -8291,12 +9245,16 @@ proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Array} */ (reader.readPackedInt32()); - msg.setPathList(value); + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addPath(values[i]); + } break; case 2: - var value = /** @type {!Array} */ (reader.readPackedInt32()); - msg.setSpanList(value); + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addSpan(values[i]); + } break; case 3: var value = /** @type {string} */ (reader.readString()); @@ -8386,23 +9344,31 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getPathList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setPathList = function(value) { - jspb.Message.setField(this, 1, value || []); + return jspb.Message.setField(this, 1, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.addPath = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 1, value, opt_index); + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearPathList = function() { - this.setPathList([]); + return this.setPathList([]); }; @@ -8415,23 +9381,31 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getSpanList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setSpanList = function(value) { - jspb.Message.setField(this, 2, value || []); + return jspb.Message.setField(this, 2, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.addSpan = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearSpanList = function() { - this.setSpanList([]); + return this.setSpanList([]); }; @@ -8444,14 +9418,21 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingComments = fun }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingComments = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingComments = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -8473,14 +9454,21 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getTrailingComments = fu }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setTrailingComments = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearTrailingComments = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -8502,23 +9490,31 @@ proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingDetachedCommen }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingDetachedCommentsList = function(value) { - jspb.Message.setField(this, 6, value || []); + return jspb.Message.setField(this, 6, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this */ proto.google.protobuf.SourceCodeInfo.Location.prototype.addLeadingDetachedComments = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 6, value, opt_index); + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingDetachedCommentsList = function() { - this.setLeadingDetachedCommentsList([]); + return this.setLeadingDetachedCommentsList([]); }; @@ -8532,9 +9528,12 @@ proto.google.protobuf.SourceCodeInfo.prototype.getLocationList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo} returns this +*/ proto.google.protobuf.SourceCodeInfo.prototype.setLocationList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -8548,29 +9547,16 @@ proto.google.protobuf.SourceCodeInfo.prototype.addLocation = function(opt_value, }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo} returns this + */ proto.google.protobuf.SourceCodeInfo.prototype.clearLocationList = function() { - this.setLocationList([]); + return this.setLocationList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.GeneratedCodeInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.GeneratedCodeInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.GeneratedCodeInfo.displayName = 'proto.google.protobuf.GeneratedCodeInfo'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -8582,13 +9568,15 @@ proto.google.protobuf.GeneratedCodeInfo.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.GeneratedCodeInfo.prototype.toObject = function(opt_includeInstance) { @@ -8598,8 +9586,8 @@ proto.google.protobuf.GeneratedCodeInfo.prototype.toObject = function(opt_includ /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.GeneratedCodeInfo} msg The msg instance to transform. * @return {!Object} @@ -8691,23 +9679,6 @@ proto.google.protobuf.GeneratedCodeInfo.serializeBinaryToWriter = function(messa -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.google.protobuf.GeneratedCodeInfo.Annotation = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.GeneratedCodeInfo.Annotation, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.google.protobuf.GeneratedCodeInfo.Annotation.displayName = 'proto.google.protobuf.GeneratedCodeInfo.Annotation'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -8719,13 +9690,15 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function(opt_includeInstance) { @@ -8735,8 +9708,8 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} msg The msg instance to transform. * @return {!Object} @@ -8744,10 +9717,10 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function */ proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject = function(includeInstance, msg) { var f, obj = { - pathList: jspb.Message.getRepeatedField(msg, 1), - sourceFile: jspb.Message.getField(msg, 2), - begin: jspb.Message.getField(msg, 3), - end: jspb.Message.getField(msg, 4) + pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + sourceFile: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + begin: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + end: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f }; if (includeInstance) { @@ -8785,8 +9758,10 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Array} */ (reader.readPackedInt32()); - msg.setPathList(value); + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addPath(values[i]); + } break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -8869,23 +9844,31 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getPathList = funct }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setPathList = function(value) { - jspb.Message.setField(this, 1, value || []); + return jspb.Message.setField(this, 1, value || []); }; /** * @param {number} value * @param {number=} opt_index + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.addPath = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 1, value, opt_index); + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearPathList = function() { - this.setPathList([]); + return this.setPathList([]); }; @@ -8898,14 +9881,21 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getSourceFile = fun }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setSourceFile = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearSourceFile = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -8927,14 +9917,21 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getBegin = function }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setBegin = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearBegin = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -8956,14 +9953,21 @@ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getEnd = function() }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setEnd = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearEnd = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -8986,9 +9990,12 @@ proto.google.protobuf.GeneratedCodeInfo.prototype.getAnnotationList = function() }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this +*/ proto.google.protobuf.GeneratedCodeInfo.prototype.setAnnotationList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -9002,8 +10009,12 @@ proto.google.protobuf.GeneratedCodeInfo.prototype.addAnnotation = function(opt_v }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this + */ proto.google.protobuf.GeneratedCodeInfo.prototype.clearAnnotationList = function() { - this.setAnnotationList([]); + return this.setAnnotationList([]); }; diff --git a/js/proto/google/protobuf/timestamp_pb.d.ts b/js/proto/google/protobuf/timestamp_pb.d.ts index a44250eda..e91fcdeec 100644 --- a/js/proto/google/protobuf/timestamp_pb.d.ts +++ b/js/proto/google/protobuf/timestamp_pb.d.ts @@ -8,10 +8,10 @@ import * as jspb from "google-protobuf"; export class Timestamp extends jspb.Message { getSeconds(): number; - setSeconds(value: number): void; + setSeconds(value: number): Timestamp; getNanos(): number; - setNanos(value: number): void; + setNanos(value: number): Timestamp; serializeBinary(): Uint8Array; diff --git a/js/proto/google/protobuf/timestamp_pb.js b/js/proto/google/protobuf/timestamp_pb.js index 66557b49a..6881a1d93 100644 --- a/js/proto/google/protobuf/timestamp_pb.js +++ b/js/proto/google/protobuf/timestamp_pb.js @@ -1,3 +1,4 @@ +// source: google/protobuf/timestamp.proto /** * @fileoverview * @enhanceable @@ -6,13 +7,14 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); goog.exportSymbol('proto.google.protobuf.Timestamp', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -28,19 +30,26 @@ proto.google.protobuf.Timestamp = function(opt_data) { }; goog.inherits(proto.google.protobuf.Timestamp, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.google.protobuf.Timestamp.displayName = 'proto.google.protobuf.Timestamp'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.google.protobuf.Timestamp.prototype.toObject = function(opt_includeInstance) { @@ -50,8 +59,8 @@ proto.google.protobuf.Timestamp.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.protobuf.Timestamp} msg The msg instance to transform. * @return {!Object} @@ -160,9 +169,12 @@ proto.google.protobuf.Timestamp.prototype.getSeconds = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.Timestamp} returns this + */ proto.google.protobuf.Timestamp.prototype.setSeconds = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -175,9 +187,12 @@ proto.google.protobuf.Timestamp.prototype.getNanos = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.google.protobuf.Timestamp} returns this + */ proto.google.protobuf.Timestamp.prototype.setNanos = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -205,3 +220,16 @@ proto.google.protobuf.Timestamp.prototype.fromDate = function(value) { this.setSeconds(Math.floor(value.getTime() / 1000)); this.setNanos(value.getMilliseconds() * 1000000); }; + + +/** + * Factory method that returns a Timestamp object with value equal to + * the given Date. + * @param {!Date} value The value to set. + * @return {!proto.google.protobuf.Timestamp} + */ +proto.google.protobuf.Timestamp.fromDate = function(value) { + var timestamp = new proto.google.protobuf.Timestamp(); + timestamp.fromDate(value); + return timestamp; +}; diff --git a/js/proto/keys_grpc_pb.d.ts b/js/proto/keys_grpc_pb.d.ts index 7cca9ee41..abeb0e1e9 100644 --- a/js/proto/keys_grpc_pb.d.ts +++ b/js/proto/keys_grpc_pb.d.ts @@ -7,7 +7,7 @@ import * as grpc from "@grpc/grpc-js"; import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; import * as keys_pb from "./keys_pb"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as crypto_pb from "./crypto_pb"; interface IKeysService extends grpc.ServiceDefinition { @@ -25,99 +25,99 @@ interface IKeysService extends grpc.ServiceDefinition { - path: string; // "/keys.Keys/GenerateKey" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/keys.Keys/GenerateKey"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IKeysService_IPublicKey extends grpc.MethodDefinition { - path: string; // "/keys.Keys/PublicKey" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/keys.Keys/PublicKey"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IKeysService_ISign extends grpc.MethodDefinition { - path: string; // "/keys.Keys/Sign" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/keys.Keys/Sign"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IKeysService_IVerify extends grpc.MethodDefinition { - path: string; // "/keys.Keys/Verify" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/keys.Keys/Verify"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IKeysService_IImport extends grpc.MethodDefinition { - path: string; // "/keys.Keys/Import" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/keys.Keys/Import"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IKeysService_IImportJSON extends grpc.MethodDefinition { - path: string; // "/keys.Keys/ImportJSON" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/keys.Keys/ImportJSON"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IKeysService_IExport extends grpc.MethodDefinition { - path: string; // "/keys.Keys/Export" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/keys.Keys/Export"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IKeysService_IHash extends grpc.MethodDefinition { - path: string; // "/keys.Keys/Hash" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/keys.Keys/Hash"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IKeysService_IRemoveName extends grpc.MethodDefinition { - path: string; // "/keys.Keys/RemoveName" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/keys.Keys/RemoveName"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IKeysService_IList extends grpc.MethodDefinition { - path: string; // "/keys.Keys/List" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/keys.Keys/List"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IKeysService_IAddName extends grpc.MethodDefinition { - path: string; // "/keys.Keys/AddName" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/keys.Keys/AddName"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; @@ -126,7 +126,7 @@ interface IKeysService_IAddName extends grpc.MethodDefinition; publicKey: grpc.handleUnaryCall; sign: grpc.handleUnaryCall; @@ -177,7 +177,7 @@ export interface IKeysClient { } export class KeysClient extends grpc.Client implements IKeysClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); public generateKey(request: keys_pb.GenRequest, callback: (error: grpc.ServiceError | null, response: keys_pb.GenResponse) => void): grpc.ClientUnaryCall; public generateKey(request: keys_pb.GenRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: keys_pb.GenResponse) => void): grpc.ClientUnaryCall; public generateKey(request: keys_pb.GenRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: keys_pb.GenResponse) => void): grpc.ClientUnaryCall; diff --git a/js/proto/keys_grpc_pb.js b/js/proto/keys_grpc_pb.js index cd9ed9570..a263a57d0 100644 --- a/js/proto/keys_grpc_pb.js +++ b/js/proto/keys_grpc_pb.js @@ -2,7 +2,7 @@ 'use strict'; var keys_pb = require('./keys_pb.js'); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); var crypto_pb = require('./crypto_pb.js'); function serialize_keys_AddNameRequest(arg) { diff --git a/js/proto/keys_pb.d.ts b/js/proto/keys_pb.d.ts index 78900fe53..93b0635d1 100644 --- a/js/proto/keys_pb.d.ts +++ b/js/proto/keys_pb.d.ts @@ -5,12 +5,12 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as crypto_pb from "./crypto_pb"; export class ListRequest extends jspb.Message { getKeyname(): string; - setKeyname(value: string): void; + setKeyname(value: string): ListRequest; serializeBinary(): Uint8Array; @@ -82,7 +82,7 @@ export namespace AddNameResponse { export class RemoveNameRequest extends jspb.Message { getKeyname(): string; - setKeyname(value: string): void; + setKeyname(value: string): RemoveNameRequest; serializeBinary(): Uint8Array; @@ -103,13 +103,13 @@ export namespace RemoveNameRequest { export class GenRequest extends jspb.Message { getPassphrase(): string; - setPassphrase(value: string): void; + setPassphrase(value: string): GenRequest; getCurvetype(): string; - setCurvetype(value: string): void; + setCurvetype(value: string): GenRequest; getKeyname(): string; - setKeyname(value: string): void; + setKeyname(value: string): GenRequest; serializeBinary(): Uint8Array; @@ -132,7 +132,7 @@ export namespace GenRequest { export class GenResponse extends jspb.Message { getAddress(): string; - setAddress(value: string): void; + setAddress(value: string): GenResponse; serializeBinary(): Uint8Array; @@ -153,10 +153,10 @@ export namespace GenResponse { export class PubRequest extends jspb.Message { getAddress(): string; - setAddress(value: string): void; + setAddress(value: string): PubRequest; getName(): string; - setName(value: string): void; + setName(value: string): PubRequest; serializeBinary(): Uint8Array; @@ -180,10 +180,10 @@ export class PubResponse extends jspb.Message { getPublickey(): Uint8Array | string; getPublickey_asU8(): Uint8Array; getPublickey_asB64(): string; - setPublickey(value: Uint8Array | string): void; + setPublickey(value: Uint8Array | string): PubResponse; getCurvetype(): string; - setCurvetype(value: string): void; + setCurvetype(value: string): PubResponse; serializeBinary(): Uint8Array; @@ -205,10 +205,10 @@ export namespace PubResponse { export class ImportJSONRequest extends jspb.Message { getPassphrase(): string; - setPassphrase(value: string): void; + setPassphrase(value: string): ImportJSONRequest; getJson(): string; - setJson(value: string): void; + setJson(value: string): ImportJSONRequest; serializeBinary(): Uint8Array; @@ -230,7 +230,7 @@ export namespace ImportJSONRequest { export class ImportResponse extends jspb.Message { getAddress(): string; - setAddress(value: string): void; + setAddress(value: string): ImportResponse; serializeBinary(): Uint8Array; @@ -251,18 +251,18 @@ export namespace ImportResponse { export class ImportRequest extends jspb.Message { getPassphrase(): string; - setPassphrase(value: string): void; + setPassphrase(value: string): ImportRequest; getName(): string; - setName(value: string): void; + setName(value: string): ImportRequest; getCurvetype(): string; - setCurvetype(value: string): void; + setCurvetype(value: string): ImportRequest; getKeybytes(): Uint8Array | string; getKeybytes_asU8(): Uint8Array; getKeybytes_asB64(): string; - setKeybytes(value: Uint8Array | string): void; + setKeybytes(value: Uint8Array | string): ImportRequest; serializeBinary(): Uint8Array; @@ -286,13 +286,13 @@ export namespace ImportRequest { export class ExportRequest extends jspb.Message { getPassphrase(): string; - setPassphrase(value: string): void; + setPassphrase(value: string): ExportRequest; getName(): string; - setName(value: string): void; + setName(value: string): ExportRequest; getAddress(): string; - setAddress(value: string): void; + setAddress(value: string): ExportRequest; serializeBinary(): Uint8Array; @@ -317,20 +317,20 @@ export class ExportResponse extends jspb.Message { getPublickey(): Uint8Array | string; getPublickey_asU8(): Uint8Array; getPublickey_asB64(): string; - setPublickey(value: Uint8Array | string): void; + setPublickey(value: Uint8Array | string): ExportResponse; getPrivatekey(): Uint8Array | string; getPrivatekey_asU8(): Uint8Array; getPrivatekey_asB64(): string; - setPrivatekey(value: Uint8Array | string): void; + setPrivatekey(value: Uint8Array | string): ExportResponse; getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): ExportResponse; getCurvetype(): string; - setCurvetype(value: string): void; + setCurvetype(value: string): ExportResponse; serializeBinary(): Uint8Array; @@ -354,18 +354,18 @@ export namespace ExportResponse { export class SignRequest extends jspb.Message { getPassphrase(): string; - setPassphrase(value: string): void; + setPassphrase(value: string): SignRequest; getAddress(): string; - setAddress(value: string): void; + setAddress(value: string): SignRequest; getName(): string; - setName(value: string): void; + setName(value: string): SignRequest; getMessage(): Uint8Array | string; getMessage_asU8(): Uint8Array; getMessage_asB64(): string; - setMessage(value: Uint8Array | string): void; + setMessage(value: Uint8Array | string): SignRequest; serializeBinary(): Uint8Array; @@ -392,7 +392,7 @@ export class SignResponse extends jspb.Message { hasSignature(): boolean; clearSignature(): void; getSignature(): crypto_pb.Signature | undefined; - setSignature(value?: crypto_pb.Signature): void; + setSignature(value?: crypto_pb.Signature): SignResponse; serializeBinary(): Uint8Array; @@ -415,18 +415,18 @@ export class VerifyRequest extends jspb.Message { getPublickey(): Uint8Array | string; getPublickey_asU8(): Uint8Array; getPublickey_asB64(): string; - setPublickey(value: Uint8Array | string): void; + setPublickey(value: Uint8Array | string): VerifyRequest; getMessage(): Uint8Array | string; getMessage_asU8(): Uint8Array; getMessage_asB64(): string; - setMessage(value: Uint8Array | string): void; + setMessage(value: Uint8Array | string): VerifyRequest; hasSignature(): boolean; clearSignature(): void; getSignature(): crypto_pb.Signature | undefined; - setSignature(value?: crypto_pb.Signature): void; + setSignature(value?: crypto_pb.Signature): VerifyRequest; serializeBinary(): Uint8Array; @@ -449,12 +449,12 @@ export namespace VerifyRequest { export class HashRequest extends jspb.Message { getHashtype(): string; - setHashtype(value: string): void; + setHashtype(value: string): HashRequest; getMessage(): Uint8Array | string; getMessage_asU8(): Uint8Array; getMessage_asB64(): string; - setMessage(value: Uint8Array | string): void; + setMessage(value: Uint8Array | string): HashRequest; serializeBinary(): Uint8Array; @@ -476,7 +476,7 @@ export namespace HashRequest { export class HashResponse extends jspb.Message { getHash(): string; - setHash(value: string): void; + setHash(value: string): HashResponse; serializeBinary(): Uint8Array; @@ -497,11 +497,11 @@ export namespace HashResponse { export class KeyID extends jspb.Message { getAddress(): string; - setAddress(value: string): void; + setAddress(value: string): KeyID; clearKeynameList(): void; getKeynameList(): Array; - setKeynameList(value: Array): void; + setKeynameList(value: Array): KeyID; addKeyname(value: string, index?: number): string; @@ -525,7 +525,7 @@ export namespace KeyID { export class ListResponse extends jspb.Message { clearKeyList(): void; getKeyList(): Array; - setKeyList(value: Array): void; + setKeyList(value: Array): ListResponse; addKey(value?: KeyID, index?: number): KeyID; @@ -547,10 +547,10 @@ export namespace ListResponse { export class AddNameRequest extends jspb.Message { getKeyname(): string; - setKeyname(value: string): void; + setKeyname(value: string): AddNameRequest; getAddress(): string; - setAddress(value: string): void; + setAddress(value: string): AddNameRequest; serializeBinary(): Uint8Array; diff --git a/js/proto/keys_pb.js b/js/proto/keys_pb.js index f556a7750..aa08580cc 100644 --- a/js/proto/keys_pb.js +++ b/js/proto/keys_pb.js @@ -1,3 +1,4 @@ +// source: keys.proto /** * @fileoverview * @enhanceable @@ -6,13 +7,15 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); var crypto_pb = require('./crypto_pb.js'); goog.object.extend(proto, crypto_pb); goog.exportSymbol('proto.keys.AddNameRequest', null, global); @@ -37,7 +40,6 @@ goog.exportSymbol('proto.keys.SignRequest', null, global); goog.exportSymbol('proto.keys.SignResponse', null, global); goog.exportSymbol('proto.keys.VerifyRequest', null, global); goog.exportSymbol('proto.keys.VerifyResponse', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -48,24 +50,472 @@ goog.exportSymbol('proto.keys.VerifyResponse', null, global); * @extends {jspb.Message} * @constructor */ -proto.keys.ListRequest = function(opt_data) { +proto.keys.ListRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ListRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ListRequest.displayName = 'proto.keys.ListRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.VerifyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.VerifyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.VerifyResponse.displayName = 'proto.keys.VerifyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.RemoveNameResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.RemoveNameResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.RemoveNameResponse.displayName = 'proto.keys.RemoveNameResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.AddNameResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.AddNameResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.AddNameResponse.displayName = 'proto.keys.AddNameResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.RemoveNameRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.RemoveNameRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.RemoveNameRequest.displayName = 'proto.keys.RemoveNameRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.GenRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.GenRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.GenRequest.displayName = 'proto.keys.GenRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.GenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.GenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.GenResponse.displayName = 'proto.keys.GenResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.PubRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.PubRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.PubRequest.displayName = 'proto.keys.PubRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.PubResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.PubResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.PubResponse.displayName = 'proto.keys.PubResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ImportJSONRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ImportJSONRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ImportJSONRequest.displayName = 'proto.keys.ImportJSONRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ImportResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ImportResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ImportResponse.displayName = 'proto.keys.ImportResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ImportRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ImportRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ImportRequest.displayName = 'proto.keys.ImportRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ExportRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ExportRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ExportRequest.displayName = 'proto.keys.ExportRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ExportResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.ExportResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ExportResponse.displayName = 'proto.keys.ExportResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.SignRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.SignRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.SignRequest.displayName = 'proto.keys.SignRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.SignResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.SignResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.SignResponse.displayName = 'proto.keys.SignResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.VerifyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.VerifyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.VerifyRequest.displayName = 'proto.keys.VerifyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.HashRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.HashRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.HashRequest.displayName = 'proto.keys.HashRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.HashResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.keys.HashResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.HashResponse.displayName = 'proto.keys.HashResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.KeyID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.keys.KeyID.repeatedFields_, null); +}; +goog.inherits(proto.keys.KeyID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.KeyID.displayName = 'proto.keys.KeyID'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.ListResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.keys.ListResponse.repeatedFields_, null); +}; +goog.inherits(proto.keys.ListResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.keys.ListResponse.displayName = 'proto.keys.ListResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.keys.AddNameRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.keys.ListRequest, jspb.Message); +goog.inherits(proto.keys.AddNameRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.keys.ListRequest.displayName = 'proto.keys.ListRequest'; + /** + * @public + * @override + */ + proto.keys.AddNameRequest.displayName = 'proto.keys.AddNameRequest'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ListRequest.prototype.toObject = function(opt_includeInstance) { @@ -75,8 +525,8 @@ proto.keys.ListRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ListRequest} msg The msg instance to transform. * @return {!Object} @@ -173,41 +623,29 @@ proto.keys.ListRequest.prototype.getKeyname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ListRequest} returns this + */ proto.keys.ListRequest.prototype.setKeyname = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.VerifyResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.VerifyResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.VerifyResponse.displayName = 'proto.keys.VerifyResponse'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.VerifyResponse.prototype.toObject = function(opt_includeInstance) { @@ -217,8 +655,8 @@ proto.keys.VerifyResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.VerifyResponse} msg The msg instance to transform. * @return {!Object} @@ -296,34 +734,19 @@ proto.keys.VerifyResponse.serializeBinaryToWriter = function(message, writer) { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.RemoveNameResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.RemoveNameResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.RemoveNameResponse.displayName = 'proto.keys.RemoveNameResponse'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.RemoveNameResponse.prototype.toObject = function(opt_includeInstance) { @@ -333,8 +756,8 @@ proto.keys.RemoveNameResponse.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.RemoveNameResponse} msg The msg instance to transform. * @return {!Object} @@ -412,34 +835,19 @@ proto.keys.RemoveNameResponse.serializeBinaryToWriter = function(message, writer -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.AddNameResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.AddNameResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.AddNameResponse.displayName = 'proto.keys.AddNameResponse'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.AddNameResponse.prototype.toObject = function(opt_includeInstance) { @@ -449,8 +857,8 @@ proto.keys.AddNameResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.AddNameResponse} msg The msg instance to transform. * @return {!Object} @@ -528,34 +936,19 @@ proto.keys.AddNameResponse.serializeBinaryToWriter = function(message, writer) { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.RemoveNameRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.RemoveNameRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.RemoveNameRequest.displayName = 'proto.keys.RemoveNameRequest'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.RemoveNameRequest.prototype.toObject = function(opt_includeInstance) { @@ -565,8 +958,8 @@ proto.keys.RemoveNameRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.RemoveNameRequest} msg The msg instance to transform. * @return {!Object} @@ -663,41 +1056,29 @@ proto.keys.RemoveNameRequest.prototype.getKeyname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.RemoveNameRequest} returns this + */ proto.keys.RemoveNameRequest.prototype.setKeyname = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.GenRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.GenRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.GenRequest.displayName = 'proto.keys.GenRequest'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.GenRequest.prototype.toObject = function(opt_includeInstance) { @@ -707,8 +1088,8 @@ proto.keys.GenRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.GenRequest} msg The msg instance to transform. * @return {!Object} @@ -829,9 +1210,12 @@ proto.keys.GenRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.GenRequest} returns this + */ proto.keys.GenRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -844,9 +1228,12 @@ proto.keys.GenRequest.prototype.getCurvetype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.GenRequest} returns this + */ proto.keys.GenRequest.prototype.setCurvetype = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -859,41 +1246,29 @@ proto.keys.GenRequest.prototype.getKeyname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.GenRequest} returns this + */ proto.keys.GenRequest.prototype.setKeyname = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.GenResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.GenResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.GenResponse.displayName = 'proto.keys.GenResponse'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.GenResponse.prototype.toObject = function(opt_includeInstance) { @@ -903,8 +1278,8 @@ proto.keys.GenResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.GenResponse} msg The msg instance to transform. * @return {!Object} @@ -1001,41 +1376,29 @@ proto.keys.GenResponse.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.GenResponse} returns this + */ proto.keys.GenResponse.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.PubRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.PubRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.PubRequest.displayName = 'proto.keys.PubRequest'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.PubRequest.prototype.toObject = function(opt_includeInstance) { @@ -1045,8 +1408,8 @@ proto.keys.PubRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.PubRequest} msg The msg instance to transform. * @return {!Object} @@ -1155,9 +1518,12 @@ proto.keys.PubRequest.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.PubRequest} returns this + */ proto.keys.PubRequest.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1170,41 +1536,29 @@ proto.keys.PubRequest.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.PubRequest} returns this + */ proto.keys.PubRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.PubResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.PubResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.PubResponse.displayName = 'proto.keys.PubResponse'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.PubResponse.prototype.toObject = function(opt_includeInstance) { @@ -1214,8 +1568,8 @@ proto.keys.PubResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.PubResponse} msg The msg instance to transform. * @return {!Object} @@ -1348,9 +1702,12 @@ proto.keys.PubResponse.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.PubResponse} returns this + */ proto.keys.PubResponse.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1363,41 +1720,29 @@ proto.keys.PubResponse.prototype.getCurvetype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.PubResponse} returns this + */ proto.keys.PubResponse.prototype.setCurvetype = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.ImportJSONRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.ImportJSONRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.ImportJSONRequest.displayName = 'proto.keys.ImportJSONRequest'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ImportJSONRequest.prototype.toObject = function(opt_includeInstance) { @@ -1407,8 +1752,8 @@ proto.keys.ImportJSONRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ImportJSONRequest} msg The msg instance to transform. * @return {!Object} @@ -1517,9 +1862,12 @@ proto.keys.ImportJSONRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportJSONRequest} returns this + */ proto.keys.ImportJSONRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1532,41 +1880,29 @@ proto.keys.ImportJSONRequest.prototype.getJson = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportJSONRequest} returns this + */ proto.keys.ImportJSONRequest.prototype.setJson = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.ImportResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.ImportResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.ImportResponse.displayName = 'proto.keys.ImportResponse'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ImportResponse.prototype.toObject = function(opt_includeInstance) { @@ -1576,8 +1912,8 @@ proto.keys.ImportResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ImportResponse} msg The msg instance to transform. * @return {!Object} @@ -1674,41 +2010,29 @@ proto.keys.ImportResponse.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportResponse} returns this + */ proto.keys.ImportResponse.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.ImportRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.ImportRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.ImportRequest.displayName = 'proto.keys.ImportRequest'; -} - + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ImportRequest.prototype.toObject = function(opt_includeInstance) { @@ -1718,8 +2042,8 @@ proto.keys.ImportRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ImportRequest} msg The msg instance to transform. * @return {!Object} @@ -1852,9 +2176,12 @@ proto.keys.ImportRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportRequest} returns this + */ proto.keys.ImportRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1867,9 +2194,12 @@ proto.keys.ImportRequest.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportRequest} returns this + */ proto.keys.ImportRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -1882,9 +2212,12 @@ proto.keys.ImportRequest.prototype.getCurvetype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ImportRequest} returns this + */ proto.keys.ImportRequest.prototype.setCurvetype = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -1921,41 +2254,29 @@ proto.keys.ImportRequest.prototype.getKeybytes_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.ImportRequest} returns this + */ proto.keys.ImportRequest.prototype.setKeybytes = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.ExportRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.ExportRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.ExportRequest.displayName = 'proto.keys.ExportRequest'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ExportRequest.prototype.toObject = function(opt_includeInstance) { @@ -1965,8 +2286,8 @@ proto.keys.ExportRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ExportRequest} msg The msg instance to transform. * @return {!Object} @@ -2087,9 +2408,12 @@ proto.keys.ExportRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ExportRequest} returns this + */ proto.keys.ExportRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2102,9 +2426,12 @@ proto.keys.ExportRequest.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ExportRequest} returns this + */ proto.keys.ExportRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2117,41 +2444,29 @@ proto.keys.ExportRequest.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ExportRequest} returns this + */ proto.keys.ExportRequest.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.ExportResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.ExportResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.ExportResponse.displayName = 'proto.keys.ExportResponse'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ExportResponse.prototype.toObject = function(opt_includeInstance) { @@ -2161,8 +2476,8 @@ proto.keys.ExportResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ExportResponse} msg The msg instance to transform. * @return {!Object} @@ -2319,9 +2634,12 @@ proto.keys.ExportResponse.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.ExportResponse} returns this + */ proto.keys.ExportResponse.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2358,9 +2676,12 @@ proto.keys.ExportResponse.prototype.getPrivatekey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.ExportResponse} returns this + */ proto.keys.ExportResponse.prototype.setPrivatekey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -2397,9 +2718,12 @@ proto.keys.ExportResponse.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.ExportResponse} returns this + */ proto.keys.ExportResponse.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -2412,41 +2736,29 @@ proto.keys.ExportResponse.prototype.getCurvetype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.ExportResponse} returns this + */ proto.keys.ExportResponse.prototype.setCurvetype = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.SignRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.SignRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.SignRequest.displayName = 'proto.keys.SignRequest'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.SignRequest.prototype.toObject = function(opt_includeInstance) { @@ -2456,8 +2768,8 @@ proto.keys.SignRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.SignRequest} msg The msg instance to transform. * @return {!Object} @@ -2590,9 +2902,12 @@ proto.keys.SignRequest.prototype.getPassphrase = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.SignRequest} returns this + */ proto.keys.SignRequest.prototype.setPassphrase = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2605,9 +2920,12 @@ proto.keys.SignRequest.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.SignRequest} returns this + */ proto.keys.SignRequest.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2620,9 +2938,12 @@ proto.keys.SignRequest.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.SignRequest} returns this + */ proto.keys.SignRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -2659,41 +2980,29 @@ proto.keys.SignRequest.prototype.getMessage_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.SignRequest} returns this + */ proto.keys.SignRequest.prototype.setMessage = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.SignResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.SignResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.SignResponse.displayName = 'proto.keys.SignResponse'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.SignResponse.prototype.toObject = function(opt_includeInstance) { @@ -2703,8 +3012,8 @@ proto.keys.SignResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.SignResponse} msg The msg instance to transform. * @return {!Object} @@ -2804,14 +3113,21 @@ proto.keys.SignResponse.prototype.getSignature = function() { }; -/** @param {?proto.crypto.Signature|undefined} value */ +/** + * @param {?proto.crypto.Signature|undefined} value + * @return {!proto.keys.SignResponse} returns this +*/ proto.keys.SignResponse.prototype.setSignature = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.keys.SignResponse} returns this + */ proto.keys.SignResponse.prototype.clearSignature = function() { - this.setSignature(undefined); + return this.setSignature(undefined); }; @@ -2825,34 +3141,19 @@ proto.keys.SignResponse.prototype.hasSignature = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.VerifyRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.VerifyRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.VerifyRequest.displayName = 'proto.keys.VerifyRequest'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.VerifyRequest.prototype.toObject = function(opt_includeInstance) { @@ -2862,8 +3163,8 @@ proto.keys.VerifyRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.VerifyRequest} msg The msg instance to transform. * @return {!Object} @@ -3010,9 +3311,12 @@ proto.keys.VerifyRequest.prototype.getPublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.VerifyRequest} returns this + */ proto.keys.VerifyRequest.prototype.setPublickey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -3049,9 +3353,12 @@ proto.keys.VerifyRequest.prototype.getMessage_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.VerifyRequest} returns this + */ proto.keys.VerifyRequest.prototype.setMessage = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -3065,14 +3372,21 @@ proto.keys.VerifyRequest.prototype.getSignature = function() { }; -/** @param {?proto.crypto.Signature|undefined} value */ +/** + * @param {?proto.crypto.Signature|undefined} value + * @return {!proto.keys.VerifyRequest} returns this +*/ proto.keys.VerifyRequest.prototype.setSignature = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.keys.VerifyRequest} returns this + */ proto.keys.VerifyRequest.prototype.clearSignature = function() { - this.setSignature(undefined); + return this.setSignature(undefined); }; @@ -3086,34 +3400,19 @@ proto.keys.VerifyRequest.prototype.hasSignature = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.HashRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.HashRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.HashRequest.displayName = 'proto.keys.HashRequest'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.HashRequest.prototype.toObject = function(opt_includeInstance) { @@ -3123,8 +3422,8 @@ proto.keys.HashRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.HashRequest} msg The msg instance to transform. * @return {!Object} @@ -3233,9 +3532,12 @@ proto.keys.HashRequest.prototype.getHashtype = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.HashRequest} returns this + */ proto.keys.HashRequest.prototype.setHashtype = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3272,41 +3574,29 @@ proto.keys.HashRequest.prototype.getMessage_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.keys.HashRequest} returns this + */ proto.keys.HashRequest.prototype.setMessage = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.HashResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.HashResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.HashResponse.displayName = 'proto.keys.HashResponse'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.HashResponse.prototype.toObject = function(opt_includeInstance) { @@ -3316,8 +3606,8 @@ proto.keys.HashResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.HashResponse} msg The msg instance to transform. * @return {!Object} @@ -3414,30 +3704,16 @@ proto.keys.HashResponse.prototype.getHash = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.HashResponse} returns this + */ proto.keys.HashResponse.prototype.setHash = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.KeyID = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.keys.KeyID.repeatedFields_, null); -}; -goog.inherits(proto.keys.KeyID, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.KeyID.displayName = 'proto.keys.KeyID'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -3449,13 +3725,15 @@ proto.keys.KeyID.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { @@ -3465,8 +3743,8 @@ proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.KeyID} msg The msg instance to transform. * @return {!Object} @@ -3475,7 +3753,7 @@ proto.keys.KeyID.prototype.toObject = function(opt_includeInstance) { proto.keys.KeyID.toObject = function(includeInstance, msg) { var f, obj = { address: jspb.Message.getFieldWithDefault(msg, 1, ""), - keynameList: jspb.Message.getRepeatedField(msg, 2) + keynameList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -3575,9 +3853,12 @@ proto.keys.KeyID.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.KeyID} returns this + */ proto.keys.KeyID.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3590,44 +3871,35 @@ proto.keys.KeyID.prototype.getKeynameList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.keys.KeyID} returns this + */ proto.keys.KeyID.prototype.setKeynameList = function(value) { - jspb.Message.setField(this, 2, value || []); + return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.keys.KeyID} returns this */ proto.keys.KeyID.prototype.addKeyname = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.keys.KeyID} returns this + */ proto.keys.KeyID.prototype.clearKeynameList = function() { - this.setKeynameList([]); + return this.setKeynameList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.ListResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.keys.ListResponse.repeatedFields_, null); -}; -goog.inherits(proto.keys.ListResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.ListResponse.displayName = 'proto.keys.ListResponse'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -3639,13 +3911,15 @@ proto.keys.ListResponse.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.ListResponse.prototype.toObject = function(opt_includeInstance) { @@ -3655,8 +3929,8 @@ proto.keys.ListResponse.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.ListResponse} msg The msg instance to transform. * @return {!Object} @@ -3757,9 +4031,12 @@ proto.keys.ListResponse.prototype.getKeyList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.keys.ListResponse} returns this +*/ proto.keys.ListResponse.prototype.setKeyList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3773,40 +4050,29 @@ proto.keys.ListResponse.prototype.addKey = function(opt_value, opt_index) { }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.keys.ListResponse} returns this + */ proto.keys.ListResponse.prototype.clearKeyList = function() { - this.setKeyList([]); + return this.setKeyList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.keys.AddNameRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.keys.AddNameRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.keys.AddNameRequest.displayName = 'proto.keys.AddNameRequest'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.keys.AddNameRequest.prototype.toObject = function(opt_includeInstance) { @@ -3816,8 +4082,8 @@ proto.keys.AddNameRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.keys.AddNameRequest} msg The msg instance to transform. * @return {!Object} @@ -3926,9 +4192,12 @@ proto.keys.AddNameRequest.prototype.getKeyname = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.AddNameRequest} returns this + */ proto.keys.AddNameRequest.prototype.setKeyname = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3941,9 +4210,12 @@ proto.keys.AddNameRequest.prototype.getAddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.keys.AddNameRequest} returns this + */ proto.keys.AddNameRequest.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; diff --git a/js/proto/names_pb.d.ts b/js/proto/names_pb.d.ts index aece9d5c8..b9a40b41a 100644 --- a/js/proto/names_pb.d.ts +++ b/js/proto/names_pb.d.ts @@ -5,22 +5,22 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; export class Entry extends jspb.Message { getName(): string; - setName(value: string): void; + setName(value: string): Entry; getOwner(): Uint8Array | string; getOwner_asU8(): Uint8Array; getOwner_asB64(): string; - setOwner(value: Uint8Array | string): void; + setOwner(value: Uint8Array | string): Entry; getData(): string; - setData(value: string): void; + setData(value: string): Entry; getExpires(): number; - setExpires(value: number): void; + setExpires(value: number): Entry; serializeBinary(): Uint8Array; diff --git a/js/proto/names_pb.js b/js/proto/names_pb.js index d7ecf7281..b034421dc 100644 --- a/js/proto/names_pb.js +++ b/js/proto/names_pb.js @@ -1,3 +1,4 @@ +// source: names.proto /** * @fileoverview * @enhanceable @@ -6,15 +7,16 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.names.Entry', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,19 +32,26 @@ proto.names.Entry = function(opt_data) { }; goog.inherits(proto.names.Entry, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.names.Entry.displayName = 'proto.names.Entry'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.names.Entry.prototype.toObject = function(opt_includeInstance) { @@ -52,8 +61,8 @@ proto.names.Entry.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.names.Entry} msg The msg instance to transform. * @return {!Object} @@ -186,9 +195,12 @@ proto.names.Entry.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.names.Entry} returns this + */ proto.names.Entry.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -225,9 +237,12 @@ proto.names.Entry.prototype.getOwner_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.names.Entry} returns this + */ proto.names.Entry.prototype.setOwner = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -240,9 +255,12 @@ proto.names.Entry.prototype.getData = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.names.Entry} returns this + */ proto.names.Entry.prototype.setData = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -255,9 +273,12 @@ proto.names.Entry.prototype.getExpires = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.names.Entry} returns this + */ proto.names.Entry.prototype.setExpires = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; diff --git a/js/proto/payload_pb.d.ts b/js/proto/payload_pb.d.ts index 73606cf61..bec6b2546 100644 --- a/js/proto/payload_pb.d.ts +++ b/js/proto/payload_pb.d.ts @@ -5,7 +5,7 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as permission_pb from "./permission_pb"; import * as registry_pb from "./registry_pb"; import * as spec_pb from "./spec_pb"; @@ -15,61 +15,61 @@ export class Any extends jspb.Message { hasCalltx(): boolean; clearCalltx(): void; getCalltx(): CallTx | undefined; - setCalltx(value?: CallTx): void; + setCalltx(value?: CallTx): Any; hasSendtx(): boolean; clearSendtx(): void; getSendtx(): SendTx | undefined; - setSendtx(value?: SendTx): void; + setSendtx(value?: SendTx): Any; hasNametx(): boolean; clearNametx(): void; getNametx(): NameTx | undefined; - setNametx(value?: NameTx): void; + setNametx(value?: NameTx): Any; hasPermstx(): boolean; clearPermstx(): void; getPermstx(): PermsTx | undefined; - setPermstx(value?: PermsTx): void; + setPermstx(value?: PermsTx): Any; hasGovtx(): boolean; clearGovtx(): void; getGovtx(): GovTx | undefined; - setGovtx(value?: GovTx): void; + setGovtx(value?: GovTx): Any; hasBondtx(): boolean; clearBondtx(): void; getBondtx(): BondTx | undefined; - setBondtx(value?: BondTx): void; + setBondtx(value?: BondTx): Any; hasUnbondtx(): boolean; clearUnbondtx(): void; getUnbondtx(): UnbondTx | undefined; - setUnbondtx(value?: UnbondTx): void; + setUnbondtx(value?: UnbondTx): Any; hasBatchtx(): boolean; clearBatchtx(): void; getBatchtx(): BatchTx | undefined; - setBatchtx(value?: BatchTx): void; + setBatchtx(value?: BatchTx): Any; hasProposaltx(): boolean; clearProposaltx(): void; getProposaltx(): ProposalTx | undefined; - setProposaltx(value?: ProposalTx): void; + setProposaltx(value?: ProposalTx): Any; hasIdentifytx(): boolean; clearIdentifytx(): void; getIdentifytx(): IdentifyTx | undefined; - setIdentifytx(value?: IdentifyTx): void; + setIdentifytx(value?: IdentifyTx): Any; serializeBinary(): Uint8Array; @@ -101,13 +101,13 @@ export class TxInput extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): TxInput; getAmount(): number; - setAmount(value: number): void; + setAmount(value: number): TxInput; getSequence(): number; - setSequence(value: number): void; + setSequence(value: number): TxInput; serializeBinary(): Uint8Array; @@ -132,10 +132,10 @@ export class TxOutput extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): TxOutput; getAmount(): number; - setAmount(value: number): void; + setAmount(value: number): TxOutput; serializeBinary(): Uint8Array; @@ -160,36 +160,36 @@ export class CallTx extends jspb.Message { hasInput(): boolean; clearInput(): void; getInput(): TxInput | undefined; - setInput(value?: TxInput): void; + setInput(value?: TxInput): CallTx; getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): CallTx; getGaslimit(): number; - setGaslimit(value: number): void; + setGaslimit(value: number): CallTx; getFee(): number; - setFee(value: number): void; + setFee(value: number): CallTx; getData(): Uint8Array | string; getData_asU8(): Uint8Array; getData_asB64(): string; - setData(value: Uint8Array | string): void; + setData(value: Uint8Array | string): CallTx; getWasm(): Uint8Array | string; getWasm_asU8(): Uint8Array; getWasm_asB64(): string; - setWasm(value: Uint8Array | string): void; + setWasm(value: Uint8Array | string): CallTx; clearContractmetaList(): void; getContractmetaList(): Array; - setContractmetaList(value: Array): void; + setContractmetaList(value: Array): CallTx; addContractmeta(value?: ContractMeta, index?: number): ContractMeta; getGasprice(): number; - setGasprice(value: number): void; + setGasprice(value: number): CallTx; serializeBinary(): Uint8Array; @@ -219,10 +219,10 @@ export class ContractMeta extends jspb.Message { getCodehash(): Uint8Array | string; getCodehash_asU8(): Uint8Array; getCodehash_asB64(): string; - setCodehash(value: Uint8Array | string): void; + setCodehash(value: Uint8Array | string): ContractMeta; getMeta(): string; - setMeta(value: string): void; + setMeta(value: string): ContractMeta; serializeBinary(): Uint8Array; @@ -245,12 +245,12 @@ export namespace ContractMeta { export class SendTx extends jspb.Message { clearInputsList(): void; getInputsList(): Array; - setInputsList(value: Array): void; + setInputsList(value: Array): SendTx; addInputs(value?: TxInput, index?: number): TxInput; clearOutputsList(): void; getOutputsList(): Array; - setOutputsList(value: Array): void; + setOutputsList(value: Array): SendTx; addOutputs(value?: TxOutput, index?: number): TxOutput; @@ -276,13 +276,13 @@ export class PermsTx extends jspb.Message { hasInput(): boolean; clearInput(): void; getInput(): TxInput | undefined; - setInput(value?: TxInput): void; + setInput(value?: TxInput): PermsTx; hasPermargs(): boolean; clearPermargs(): void; getPermargs(): permission_pb.PermArgs | undefined; - setPermargs(value?: permission_pb.PermArgs): void; + setPermargs(value?: permission_pb.PermArgs): PermsTx; serializeBinary(): Uint8Array; @@ -307,16 +307,16 @@ export class NameTx extends jspb.Message { hasInput(): boolean; clearInput(): void; getInput(): TxInput | undefined; - setInput(value?: TxInput): void; + setInput(value?: TxInput): NameTx; getName(): string; - setName(value: string): void; + setName(value: string): NameTx; getData(): string; - setData(value: string): void; + setData(value: string): NameTx; getFee(): number; - setFee(value: number): void; + setFee(value: number): NameTx; serializeBinary(): Uint8Array; @@ -343,7 +343,7 @@ export class BondTx extends jspb.Message { hasInput(): boolean; clearInput(): void; getInput(): TxInput | undefined; - setInput(value?: TxInput): void; + setInput(value?: TxInput): BondTx; serializeBinary(): Uint8Array; @@ -367,13 +367,13 @@ export class UnbondTx extends jspb.Message { hasInput(): boolean; clearInput(): void; getInput(): TxInput | undefined; - setInput(value?: TxInput): void; + setInput(value?: TxInput): UnbondTx; hasOutput(): boolean; clearOutput(): void; getOutput(): TxOutput | undefined; - setOutput(value?: TxOutput): void; + setOutput(value?: TxOutput): UnbondTx; serializeBinary(): Uint8Array; @@ -396,12 +396,12 @@ export namespace UnbondTx { export class GovTx extends jspb.Message { clearInputsList(): void; getInputsList(): Array; - setInputsList(value: Array): void; + setInputsList(value: Array): GovTx; addInputs(value?: TxInput, index?: number): TxInput; clearAccountupdatesList(): void; getAccountupdatesList(): Array; - setAccountupdatesList(value: Array): void; + setAccountupdatesList(value: Array): GovTx; addAccountupdates(value?: spec_pb.TemplateAccount, index?: number): spec_pb.TemplateAccount; @@ -427,21 +427,21 @@ export class ProposalTx extends jspb.Message { hasInput(): boolean; clearInput(): void; getInput(): TxInput | undefined; - setInput(value?: TxInput): void; + setInput(value?: TxInput): ProposalTx; getVotingweight(): number; - setVotingweight(value: number): void; + setVotingweight(value: number): ProposalTx; getProposalhash(): Uint8Array | string; getProposalhash_asU8(): Uint8Array; getProposalhash_asB64(): string; - setProposalhash(value: Uint8Array | string): void; + setProposalhash(value: Uint8Array | string): ProposalTx; hasProposal(): boolean; clearProposal(): void; getProposal(): Proposal | undefined; - setProposal(value?: Proposal): void; + setProposal(value?: Proposal): ProposalTx; serializeBinary(): Uint8Array; @@ -466,14 +466,14 @@ export namespace ProposalTx { export class IdentifyTx extends jspb.Message { clearInputsList(): void; getInputsList(): Array; - setInputsList(value: Array): void; + setInputsList(value: Array): IdentifyTx; addInputs(value?: TxInput, index?: number): TxInput; hasNode(): boolean; clearNode(): void; getNode(): registry_pb.NodeIdentity | undefined; - setNode(value?: registry_pb.NodeIdentity): void; + setNode(value?: registry_pb.NodeIdentity): IdentifyTx; serializeBinary(): Uint8Array; @@ -496,12 +496,12 @@ export namespace IdentifyTx { export class BatchTx extends jspb.Message { clearInputsList(): void; getInputsList(): Array; - setInputsList(value: Array): void; + setInputsList(value: Array): BatchTx; addInputs(value?: TxInput, index?: number): TxInput; clearTxsList(): void; getTxsList(): Array; - setTxsList(value: Array): void; + setTxsList(value: Array): BatchTx; addTxs(value?: Any, index?: number): Any; @@ -526,10 +526,10 @@ export class Vote extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): Vote; getVotingweight(): number; - setVotingweight(value: number): void; + setVotingweight(value: number): Vote; serializeBinary(): Uint8Array; @@ -551,16 +551,16 @@ export namespace Vote { export class Proposal extends jspb.Message { getName(): string; - setName(value: string): void; + setName(value: string): Proposal; getDescription(): string; - setDescription(value: string): void; + setDescription(value: string): Proposal; hasBatchtx(): boolean; clearBatchtx(): void; getBatchtx(): BatchTx | undefined; - setBatchtx(value?: BatchTx): void; + setBatchtx(value?: BatchTx): Proposal; serializeBinary(): Uint8Array; @@ -586,19 +586,19 @@ export class Ballot extends jspb.Message { hasProposal(): boolean; clearProposal(): void; getProposal(): Proposal | undefined; - setProposal(value?: Proposal): void; + setProposal(value?: Proposal): Ballot; getFinalizingtx(): Uint8Array | string; getFinalizingtx_asU8(): Uint8Array; getFinalizingtx_asB64(): string; - setFinalizingtx(value: Uint8Array | string): void; + setFinalizingtx(value: Uint8Array | string): Ballot; getProposalstate(): Ballot.ProposalState; - setProposalstate(value: Ballot.ProposalState): void; + setProposalstate(value: Ballot.ProposalState): Ballot; clearVotesList(): void; getVotesList(): Array; - setVotesList(value: Array): void; + setVotesList(value: Array): Ballot; addVotes(value?: Vote, index?: number): Vote; diff --git a/js/proto/payload_pb.js b/js/proto/payload_pb.js index c6d00e48d..595e53a13 100644 --- a/js/proto/payload_pb.js +++ b/js/proto/payload_pb.js @@ -1,3 +1,4 @@ +// source: payload.proto /** * @fileoverview * @enhanceable @@ -6,13 +7,15 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); var permission_pb = require('./permission_pb.js'); goog.object.extend(proto, permission_pb); var registry_pb = require('./registry_pb.js'); @@ -37,7 +40,6 @@ goog.exportSymbol('proto.payload.TxInput', null, global); goog.exportSymbol('proto.payload.TxOutput', null, global); goog.exportSymbol('proto.payload.UnbondTx', null, global); goog.exportSymbol('proto.payload.Vote', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -53,19 +55,362 @@ proto.payload.Any = function(opt_data) { }; goog.inherits(proto.payload.Any, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.payload.Any.displayName = 'proto.payload.Any'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.TxInput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.TxInput, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.TxInput.displayName = 'proto.payload.TxInput'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.TxOutput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.TxOutput, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.TxOutput.displayName = 'proto.payload.TxOutput'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.CallTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.CallTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.CallTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.CallTx.displayName = 'proto.payload.CallTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.ContractMeta = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.ContractMeta, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.ContractMeta.displayName = 'proto.payload.ContractMeta'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.SendTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.SendTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.SendTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.SendTx.displayName = 'proto.payload.SendTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.PermsTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.PermsTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.PermsTx.displayName = 'proto.payload.PermsTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.NameTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.NameTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.NameTx.displayName = 'proto.payload.NameTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.BondTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.BondTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.BondTx.displayName = 'proto.payload.BondTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.UnbondTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.UnbondTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.UnbondTx.displayName = 'proto.payload.UnbondTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.GovTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.GovTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.GovTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.GovTx.displayName = 'proto.payload.GovTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.ProposalTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.ProposalTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.ProposalTx.displayName = 'proto.payload.ProposalTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.IdentifyTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.IdentifyTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.IdentifyTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.IdentifyTx.displayName = 'proto.payload.IdentifyTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.BatchTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.BatchTx.repeatedFields_, null); +}; +goog.inherits(proto.payload.BatchTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.BatchTx.displayName = 'proto.payload.BatchTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.Vote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.Vote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.Vote.displayName = 'proto.payload.Vote'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.Proposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.payload.Proposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.Proposal.displayName = 'proto.payload.Proposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.payload.Ballot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.Ballot.repeatedFields_, null); +}; +goog.inherits(proto.payload.Ballot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.payload.Ballot.displayName = 'proto.payload.Ballot'; +} + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.Any.prototype.toObject = function(opt_includeInstance) { @@ -75,8 +420,8 @@ proto.payload.Any.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Any} msg The msg instance to transform. * @return {!Object} @@ -302,14 +647,21 @@ proto.payload.Any.prototype.getCalltx = function() { }; -/** @param {?proto.payload.CallTx|undefined} value */ +/** + * @param {?proto.payload.CallTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setCalltx = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this + */ proto.payload.Any.prototype.clearCalltx = function() { - this.setCalltx(undefined); + return this.setCalltx(undefined); }; @@ -332,14 +684,21 @@ proto.payload.Any.prototype.getSendtx = function() { }; -/** @param {?proto.payload.SendTx|undefined} value */ +/** + * @param {?proto.payload.SendTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setSendtx = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this + */ proto.payload.Any.prototype.clearSendtx = function() { - this.setSendtx(undefined); + return this.setSendtx(undefined); }; @@ -362,14 +721,21 @@ proto.payload.Any.prototype.getNametx = function() { }; -/** @param {?proto.payload.NameTx|undefined} value */ +/** + * @param {?proto.payload.NameTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setNametx = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this + */ proto.payload.Any.prototype.clearNametx = function() { - this.setNametx(undefined); + return this.setNametx(undefined); }; @@ -392,14 +758,21 @@ proto.payload.Any.prototype.getPermstx = function() { }; -/** @param {?proto.payload.PermsTx|undefined} value */ +/** + * @param {?proto.payload.PermsTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setPermstx = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this + */ proto.payload.Any.prototype.clearPermstx = function() { - this.setPermstx(undefined); + return this.setPermstx(undefined); }; @@ -422,14 +795,21 @@ proto.payload.Any.prototype.getGovtx = function() { }; -/** @param {?proto.payload.GovTx|undefined} value */ +/** + * @param {?proto.payload.GovTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setGovtx = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this + */ proto.payload.Any.prototype.clearGovtx = function() { - this.setGovtx(undefined); + return this.setGovtx(undefined); }; @@ -452,14 +832,21 @@ proto.payload.Any.prototype.getBondtx = function() { }; -/** @param {?proto.payload.BondTx|undefined} value */ +/** + * @param {?proto.payload.BondTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setBondtx = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this + */ proto.payload.Any.prototype.clearBondtx = function() { - this.setBondtx(undefined); + return this.setBondtx(undefined); }; @@ -482,14 +869,21 @@ proto.payload.Any.prototype.getUnbondtx = function() { }; -/** @param {?proto.payload.UnbondTx|undefined} value */ +/** + * @param {?proto.payload.UnbondTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setUnbondtx = function(value) { - jspb.Message.setWrapperField(this, 7, value); + return jspb.Message.setWrapperField(this, 7, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this + */ proto.payload.Any.prototype.clearUnbondtx = function() { - this.setUnbondtx(undefined); + return this.setUnbondtx(undefined); }; @@ -512,14 +906,21 @@ proto.payload.Any.prototype.getBatchtx = function() { }; -/** @param {?proto.payload.BatchTx|undefined} value */ +/** + * @param {?proto.payload.BatchTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setBatchtx = function(value) { - jspb.Message.setWrapperField(this, 8, value); + return jspb.Message.setWrapperField(this, 8, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this + */ proto.payload.Any.prototype.clearBatchtx = function() { - this.setBatchtx(undefined); + return this.setBatchtx(undefined); }; @@ -542,14 +943,21 @@ proto.payload.Any.prototype.getProposaltx = function() { }; -/** @param {?proto.payload.ProposalTx|undefined} value */ +/** + * @param {?proto.payload.ProposalTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setProposaltx = function(value) { - jspb.Message.setWrapperField(this, 9, value); + return jspb.Message.setWrapperField(this, 9, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this + */ proto.payload.Any.prototype.clearProposaltx = function() { - this.setProposaltx(undefined); + return this.setProposaltx(undefined); }; @@ -572,14 +980,21 @@ proto.payload.Any.prototype.getIdentifytx = function() { }; -/** @param {?proto.payload.IdentifyTx|undefined} value */ +/** + * @param {?proto.payload.IdentifyTx|undefined} value + * @return {!proto.payload.Any} returns this +*/ proto.payload.Any.prototype.setIdentifytx = function(value) { - jspb.Message.setWrapperField(this, 10, value); + return jspb.Message.setWrapperField(this, 10, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.Any} returns this + */ proto.payload.Any.prototype.clearIdentifytx = function() { - this.setIdentifytx(undefined); + return this.setIdentifytx(undefined); }; @@ -593,34 +1008,19 @@ proto.payload.Any.prototype.hasIdentifytx = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.TxInput = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.TxInput, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.TxInput.displayName = 'proto.payload.TxInput'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.TxInput.prototype.toObject = function(opt_includeInstance) { @@ -630,8 +1030,8 @@ proto.payload.TxInput.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.TxInput} msg The msg instance to transform. * @return {!Object} @@ -776,9 +1176,12 @@ proto.payload.TxInput.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.TxInput} returns this + */ proto.payload.TxInput.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -791,9 +1194,12 @@ proto.payload.TxInput.prototype.getAmount = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.TxInput} returns this + */ proto.payload.TxInput.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -806,41 +1212,29 @@ proto.payload.TxInput.prototype.getSequence = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.TxInput} returns this + */ proto.payload.TxInput.prototype.setSequence = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.TxOutput = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.TxOutput, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.TxOutput.displayName = 'proto.payload.TxOutput'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.TxOutput.prototype.toObject = function(opt_includeInstance) { @@ -850,8 +1244,8 @@ proto.payload.TxOutput.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.TxOutput} msg The msg instance to transform. * @return {!Object} @@ -984,9 +1378,12 @@ proto.payload.TxOutput.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.TxOutput} returns this + */ proto.payload.TxOutput.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -999,30 +1396,16 @@ proto.payload.TxOutput.prototype.getAmount = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.TxOutput} returns this + */ proto.payload.TxOutput.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.CallTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.CallTx.repeatedFields_, null); -}; -goog.inherits(proto.payload.CallTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.CallTx.displayName = 'proto.payload.CallTx'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -1034,13 +1417,15 @@ proto.payload.CallTx.repeatedFields_ = [7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.CallTx.prototype.toObject = function(opt_includeInstance) { @@ -1050,8 +1435,8 @@ proto.payload.CallTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.CallTx} msg The msg instance to transform. * @return {!Object} @@ -1238,14 +1623,21 @@ proto.payload.CallTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.CallTx} returns this +*/ proto.payload.CallTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -1291,9 +1683,12 @@ proto.payload.CallTx.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -1306,9 +1701,12 @@ proto.payload.CallTx.prototype.getGaslimit = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setGaslimit = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -1321,9 +1719,12 @@ proto.payload.CallTx.prototype.getFee = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setFee = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -1360,9 +1761,12 @@ proto.payload.CallTx.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 5, value); + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -1399,9 +1803,12 @@ proto.payload.CallTx.prototype.getWasm_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setWasm = function(value) { - jspb.Message.setProto3BytesField(this, 6, value); + return jspb.Message.setProto3BytesField(this, 6, value); }; @@ -1415,9 +1822,12 @@ proto.payload.CallTx.prototype.getContractmetaList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.CallTx} returns this +*/ proto.payload.CallTx.prototype.setContractmetaList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; @@ -1431,8 +1841,12 @@ proto.payload.CallTx.prototype.addContractmeta = function(opt_value, opt_index) }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.clearContractmetaList = function() { - this.setContractmetaList([]); + return this.setContractmetaList([]); }; @@ -1445,41 +1859,29 @@ proto.payload.CallTx.prototype.getGasprice = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.CallTx} returns this + */ proto.payload.CallTx.prototype.setGasprice = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + return jspb.Message.setProto3IntField(this, 8, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.ContractMeta = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.ContractMeta, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.ContractMeta.displayName = 'proto.payload.ContractMeta'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.ContractMeta.prototype.toObject = function(opt_includeInstance) { @@ -1489,8 +1891,8 @@ proto.payload.ContractMeta.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.ContractMeta} msg The msg instance to transform. * @return {!Object} @@ -1623,9 +2025,12 @@ proto.payload.ContractMeta.prototype.getCodehash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.ContractMeta} returns this + */ proto.payload.ContractMeta.prototype.setCodehash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -1638,30 +2043,16 @@ proto.payload.ContractMeta.prototype.getMeta = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.ContractMeta} returns this + */ proto.payload.ContractMeta.prototype.setMeta = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.SendTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.SendTx.repeatedFields_, null); -}; -goog.inherits(proto.payload.SendTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.SendTx.displayName = 'proto.payload.SendTx'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -1673,13 +2064,15 @@ proto.payload.SendTx.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.SendTx.prototype.toObject = function(opt_includeInstance) { @@ -1689,8 +2082,8 @@ proto.payload.SendTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.SendTx} msg The msg instance to transform. * @return {!Object} @@ -1806,9 +2199,12 @@ proto.payload.SendTx.prototype.getInputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.SendTx} returns this +*/ proto.payload.SendTx.prototype.setInputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -1822,8 +2218,12 @@ proto.payload.SendTx.prototype.addInputs = function(opt_value, opt_index) { }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.payload.SendTx} returns this + */ proto.payload.SendTx.prototype.clearInputsList = function() { - this.setInputsList([]); + return this.setInputsList([]); }; @@ -1837,9 +2237,12 @@ proto.payload.SendTx.prototype.getOutputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.SendTx} returns this +*/ proto.payload.SendTx.prototype.setOutputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -1853,40 +2256,29 @@ proto.payload.SendTx.prototype.addOutputs = function(opt_value, opt_index) { }; -proto.payload.SendTx.prototype.clearOutputsList = function() { - this.setOutputsList([]); -}; - - - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * Clears the list making it empty but non-null. + * @return {!proto.payload.SendTx} returns this */ -proto.payload.PermsTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.payload.SendTx.prototype.clearOutputsList = function() { + return this.setOutputsList([]); }; -goog.inherits(proto.payload.PermsTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.PermsTx.displayName = 'proto.payload.PermsTx'; -} + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.PermsTx.prototype.toObject = function(opt_includeInstance) { @@ -1896,8 +2288,8 @@ proto.payload.PermsTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.PermsTx} msg The msg instance to transform. * @return {!Object} @@ -2011,14 +2403,21 @@ proto.payload.PermsTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.PermsTx} returns this +*/ proto.payload.PermsTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.PermsTx} returns this + */ proto.payload.PermsTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -2041,14 +2440,21 @@ proto.payload.PermsTx.prototype.getPermargs = function() { }; -/** @param {?proto.permission.PermArgs|undefined} value */ +/** + * @param {?proto.permission.PermArgs|undefined} value + * @return {!proto.payload.PermsTx} returns this +*/ proto.payload.PermsTx.prototype.setPermargs = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.PermsTx} returns this + */ proto.payload.PermsTx.prototype.clearPermargs = function() { - this.setPermargs(undefined); + return this.setPermargs(undefined); }; @@ -2062,34 +2468,19 @@ proto.payload.PermsTx.prototype.hasPermargs = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.NameTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.NameTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.NameTx.displayName = 'proto.payload.NameTx'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.NameTx.prototype.toObject = function(opt_includeInstance) { @@ -2099,8 +2490,8 @@ proto.payload.NameTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.NameTx} msg The msg instance to transform. * @return {!Object} @@ -2236,14 +2627,21 @@ proto.payload.NameTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.NameTx} returns this +*/ proto.payload.NameTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.NameTx} returns this + */ proto.payload.NameTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -2265,9 +2663,12 @@ proto.payload.NameTx.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.NameTx} returns this + */ proto.payload.NameTx.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2280,9 +2681,12 @@ proto.payload.NameTx.prototype.getData = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.NameTx} returns this + */ proto.payload.NameTx.prototype.setData = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -2295,41 +2699,29 @@ proto.payload.NameTx.prototype.getFee = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.NameTx} returns this + */ proto.payload.NameTx.prototype.setFee = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 4, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.BondTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.BondTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.BondTx.displayName = 'proto.payload.BondTx'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.BondTx.prototype.toObject = function(opt_includeInstance) { @@ -2339,8 +2731,8 @@ proto.payload.BondTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.BondTx} msg The msg instance to transform. * @return {!Object} @@ -2440,14 +2832,21 @@ proto.payload.BondTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.BondTx} returns this +*/ proto.payload.BondTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.BondTx} returns this + */ proto.payload.BondTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -2461,34 +2860,19 @@ proto.payload.BondTx.prototype.hasInput = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.UnbondTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.UnbondTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.UnbondTx.displayName = 'proto.payload.UnbondTx'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.UnbondTx.prototype.toObject = function(opt_includeInstance) { @@ -2498,8 +2882,8 @@ proto.payload.UnbondTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.UnbondTx} msg The msg instance to transform. * @return {!Object} @@ -2613,14 +2997,21 @@ proto.payload.UnbondTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.UnbondTx} returns this +*/ proto.payload.UnbondTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.UnbondTx} returns this + */ proto.payload.UnbondTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -2643,14 +3034,21 @@ proto.payload.UnbondTx.prototype.getOutput = function() { }; -/** @param {?proto.payload.TxOutput|undefined} value */ +/** + * @param {?proto.payload.TxOutput|undefined} value + * @return {!proto.payload.UnbondTx} returns this +*/ proto.payload.UnbondTx.prototype.setOutput = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.UnbondTx} returns this + */ proto.payload.UnbondTx.prototype.clearOutput = function() { - this.setOutput(undefined); + return this.setOutput(undefined); }; @@ -2664,23 +3062,6 @@ proto.payload.UnbondTx.prototype.hasOutput = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.GovTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.GovTx.repeatedFields_, null); -}; -goog.inherits(proto.payload.GovTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.GovTx.displayName = 'proto.payload.GovTx'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -2692,13 +3073,15 @@ proto.payload.GovTx.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.GovTx.prototype.toObject = function(opt_includeInstance) { @@ -2708,8 +3091,8 @@ proto.payload.GovTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.GovTx} msg The msg instance to transform. * @return {!Object} @@ -2825,9 +3208,12 @@ proto.payload.GovTx.prototype.getInputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.GovTx} returns this +*/ proto.payload.GovTx.prototype.setInputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -2841,8 +3227,12 @@ proto.payload.GovTx.prototype.addInputs = function(opt_value, opt_index) { }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.payload.GovTx} returns this + */ proto.payload.GovTx.prototype.clearInputsList = function() { - this.setInputsList([]); + return this.setInputsList([]); }; @@ -2856,9 +3246,12 @@ proto.payload.GovTx.prototype.getAccountupdatesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.GovTx} returns this +*/ proto.payload.GovTx.prototype.setAccountupdatesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -2872,40 +3265,29 @@ proto.payload.GovTx.prototype.addAccountupdates = function(opt_value, opt_index) }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.payload.GovTx} returns this + */ proto.payload.GovTx.prototype.clearAccountupdatesList = function() { - this.setAccountupdatesList([]); + return this.setAccountupdatesList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.ProposalTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.ProposalTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.ProposalTx.displayName = 'proto.payload.ProposalTx'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.ProposalTx.prototype.toObject = function(opt_includeInstance) { @@ -2915,8 +3297,8 @@ proto.payload.ProposalTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.ProposalTx} msg The msg instance to transform. * @return {!Object} @@ -3054,14 +3436,21 @@ proto.payload.ProposalTx.prototype.getInput = function() { }; -/** @param {?proto.payload.TxInput|undefined} value */ +/** + * @param {?proto.payload.TxInput|undefined} value + * @return {!proto.payload.ProposalTx} returns this +*/ proto.payload.ProposalTx.prototype.setInput = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.ProposalTx} returns this + */ proto.payload.ProposalTx.prototype.clearInput = function() { - this.setInput(undefined); + return this.setInput(undefined); }; @@ -3083,9 +3472,12 @@ proto.payload.ProposalTx.prototype.getVotingweight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.ProposalTx} returns this + */ proto.payload.ProposalTx.prototype.setVotingweight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -3122,9 +3514,12 @@ proto.payload.ProposalTx.prototype.getProposalhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.ProposalTx} returns this + */ proto.payload.ProposalTx.prototype.setProposalhash = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -3138,14 +3533,21 @@ proto.payload.ProposalTx.prototype.getProposal = function() { }; -/** @param {?proto.payload.Proposal|undefined} value */ +/** + * @param {?proto.payload.Proposal|undefined} value + * @return {!proto.payload.ProposalTx} returns this +*/ proto.payload.ProposalTx.prototype.setProposal = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.ProposalTx} returns this + */ proto.payload.ProposalTx.prototype.clearProposal = function() { - this.setProposal(undefined); + return this.setProposal(undefined); }; @@ -3159,23 +3561,6 @@ proto.payload.ProposalTx.prototype.hasProposal = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.IdentifyTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.IdentifyTx.repeatedFields_, null); -}; -goog.inherits(proto.payload.IdentifyTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.IdentifyTx.displayName = 'proto.payload.IdentifyTx'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -3187,13 +3572,15 @@ proto.payload.IdentifyTx.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.IdentifyTx.prototype.toObject = function(opt_includeInstance) { @@ -3203,8 +3590,8 @@ proto.payload.IdentifyTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.IdentifyTx} msg The msg instance to transform. * @return {!Object} @@ -3319,9 +3706,12 @@ proto.payload.IdentifyTx.prototype.getInputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.IdentifyTx} returns this +*/ proto.payload.IdentifyTx.prototype.setInputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3335,8 +3725,12 @@ proto.payload.IdentifyTx.prototype.addInputs = function(opt_value, opt_index) { }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.payload.IdentifyTx} returns this + */ proto.payload.IdentifyTx.prototype.clearInputsList = function() { - this.setInputsList([]); + return this.setInputsList([]); }; @@ -3350,14 +3744,21 @@ proto.payload.IdentifyTx.prototype.getNode = function() { }; -/** @param {?proto.registry.NodeIdentity|undefined} value */ +/** + * @param {?proto.registry.NodeIdentity|undefined} value + * @return {!proto.payload.IdentifyTx} returns this +*/ proto.payload.IdentifyTx.prototype.setNode = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.IdentifyTx} returns this + */ proto.payload.IdentifyTx.prototype.clearNode = function() { - this.setNode(undefined); + return this.setNode(undefined); }; @@ -3371,23 +3772,6 @@ proto.payload.IdentifyTx.prototype.hasNode = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.BatchTx = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.BatchTx.repeatedFields_, null); -}; -goog.inherits(proto.payload.BatchTx, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.BatchTx.displayName = 'proto.payload.BatchTx'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -3399,13 +3783,15 @@ proto.payload.BatchTx.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.BatchTx.prototype.toObject = function(opt_includeInstance) { @@ -3415,8 +3801,8 @@ proto.payload.BatchTx.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.BatchTx} msg The msg instance to transform. * @return {!Object} @@ -3532,9 +3918,12 @@ proto.payload.BatchTx.prototype.getInputsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.BatchTx} returns this +*/ proto.payload.BatchTx.prototype.setInputsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -3548,8 +3937,12 @@ proto.payload.BatchTx.prototype.addInputs = function(opt_value, opt_index) { }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.payload.BatchTx} returns this + */ proto.payload.BatchTx.prototype.clearInputsList = function() { - this.setInputsList([]); + return this.setInputsList([]); }; @@ -3563,9 +3956,12 @@ proto.payload.BatchTx.prototype.getTxsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.BatchTx} returns this +*/ proto.payload.BatchTx.prototype.setTxsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -3579,40 +3975,29 @@ proto.payload.BatchTx.prototype.addTxs = function(opt_value, opt_index) { }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.payload.BatchTx} returns this + */ proto.payload.BatchTx.prototype.clearTxsList = function() { - this.setTxsList([]); + return this.setTxsList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.Vote = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.Vote, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.Vote.displayName = 'proto.payload.Vote'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.Vote.prototype.toObject = function(opt_includeInstance) { @@ -3622,8 +4007,8 @@ proto.payload.Vote.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Vote} msg The msg instance to transform. * @return {!Object} @@ -3756,9 +4141,12 @@ proto.payload.Vote.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.Vote} returns this + */ proto.payload.Vote.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3771,41 +4159,29 @@ proto.payload.Vote.prototype.getVotingweight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.payload.Vote} returns this + */ proto.payload.Vote.prototype.setVotingweight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.Proposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.payload.Proposal, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.Proposal.displayName = 'proto.payload.Proposal'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.Proposal.prototype.toObject = function(opt_includeInstance) { @@ -3815,8 +4191,8 @@ proto.payload.Proposal.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Proposal} msg The msg instance to transform. * @return {!Object} @@ -3939,9 +4315,12 @@ proto.payload.Proposal.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.Proposal} returns this + */ proto.payload.Proposal.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3954,9 +4333,12 @@ proto.payload.Proposal.prototype.getDescription = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.payload.Proposal} returns this + */ proto.payload.Proposal.prototype.setDescription = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -3970,14 +4352,21 @@ proto.payload.Proposal.prototype.getBatchtx = function() { }; -/** @param {?proto.payload.BatchTx|undefined} value */ +/** + * @param {?proto.payload.BatchTx|undefined} value + * @return {!proto.payload.Proposal} returns this +*/ proto.payload.Proposal.prototype.setBatchtx = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.Proposal} returns this + */ proto.payload.Proposal.prototype.clearBatchtx = function() { - this.setBatchtx(undefined); + return this.setBatchtx(undefined); }; @@ -3991,23 +4380,6 @@ proto.payload.Proposal.prototype.hasBatchtx = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.payload.Ballot = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.payload.Ballot.repeatedFields_, null); -}; -goog.inherits(proto.payload.Ballot, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.payload.Ballot.displayName = 'proto.payload.Ballot'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -4019,13 +4391,15 @@ proto.payload.Ballot.repeatedFields_ = [5]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.payload.Ballot.prototype.toObject = function(opt_includeInstance) { @@ -4035,8 +4409,8 @@ proto.payload.Ballot.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.payload.Ballot} msg The msg instance to transform. * @return {!Object} @@ -4184,14 +4558,21 @@ proto.payload.Ballot.prototype.getProposal = function() { }; -/** @param {?proto.payload.Proposal|undefined} value */ +/** + * @param {?proto.payload.Proposal|undefined} value + * @return {!proto.payload.Ballot} returns this +*/ proto.payload.Ballot.prototype.setProposal = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.payload.Ballot} returns this + */ proto.payload.Ballot.prototype.clearProposal = function() { - this.setProposal(undefined); + return this.setProposal(undefined); }; @@ -4237,9 +4618,12 @@ proto.payload.Ballot.prototype.getFinalizingtx_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.payload.Ballot} returns this + */ proto.payload.Ballot.prototype.setFinalizingtx = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -4252,9 +4636,12 @@ proto.payload.Ballot.prototype.getProposalstate = function() { }; -/** @param {!proto.payload.Ballot.ProposalState} value */ +/** + * @param {!proto.payload.Ballot.ProposalState} value + * @return {!proto.payload.Ballot} returns this + */ proto.payload.Ballot.prototype.setProposalstate = function(value) { - jspb.Message.setProto3EnumField(this, 4, value); + return jspb.Message.setProto3EnumField(this, 4, value); }; @@ -4268,9 +4655,12 @@ proto.payload.Ballot.prototype.getVotesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.payload.Ballot} returns this +*/ proto.payload.Ballot.prototype.setVotesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); + return jspb.Message.setRepeatedWrapperField(this, 5, value); }; @@ -4284,8 +4674,12 @@ proto.payload.Ballot.prototype.addVotes = function(opt_value, opt_index) { }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.payload.Ballot} returns this + */ proto.payload.Ballot.prototype.clearVotesList = function() { - this.setVotesList([]); + return this.setVotesList([]); }; diff --git a/js/proto/permission_pb.d.ts b/js/proto/permission_pb.d.ts index bcf1af26b..d6d7a5b8f 100644 --- a/js/proto/permission_pb.d.ts +++ b/js/proto/permission_pb.d.ts @@ -5,18 +5,18 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; export class AccountPermissions extends jspb.Message { hasBase(): boolean; clearBase(): void; getBase(): BasePermissions | undefined; - setBase(value?: BasePermissions): void; + setBase(value?: BasePermissions): AccountPermissions; clearRolesList(): void; getRolesList(): Array; - setRolesList(value: Array): void; + setRolesList(value: Array): AccountPermissions; addRoles(value: string, index?: number): string; @@ -42,13 +42,13 @@ export class BasePermissions extends jspb.Message { hasPerms(): boolean; clearPerms(): void; getPerms(): number | undefined; - setPerms(value: number): void; + setPerms(value: number): BasePermissions; hasSetbit(): boolean; clearSetbit(): void; getSetbit(): number | undefined; - setSetbit(value: number): void; + setSetbit(value: number): BasePermissions; serializeBinary(): Uint8Array; @@ -73,7 +73,7 @@ export class PermArgs extends jspb.Message { hasAction(): boolean; clearAction(): void; getAction(): number | undefined; - setAction(value: number): void; + setAction(value: number): PermArgs; hasTarget(): boolean; @@ -81,25 +81,25 @@ export class PermArgs extends jspb.Message { getTarget(): Uint8Array | string; getTarget_asU8(): Uint8Array; getTarget_asB64(): string; - setTarget(value: Uint8Array | string): void; + setTarget(value: Uint8Array | string): PermArgs; hasPermission(): boolean; clearPermission(): void; getPermission(): number | undefined; - setPermission(value: number): void; + setPermission(value: number): PermArgs; hasRole(): boolean; clearRole(): void; getRole(): string | undefined; - setRole(value: string): void; + setRole(value: string): PermArgs; hasValue(): boolean; clearValue(): void; getValue(): boolean | undefined; - setValue(value: boolean): void; + setValue(value: boolean): PermArgs; serializeBinary(): Uint8Array; diff --git a/js/proto/permission_pb.js b/js/proto/permission_pb.js index 5f31c6792..aafc3b089 100644 --- a/js/proto/permission_pb.js +++ b/js/proto/permission_pb.js @@ -1,3 +1,4 @@ +// source: permission.proto /** * @fileoverview * @enhanceable @@ -6,17 +7,18 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.permission.AccountPermissions', null, global); goog.exportSymbol('proto.permission.BasePermissions', null, global); goog.exportSymbol('proto.permission.PermArgs', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -32,8 +34,55 @@ proto.permission.AccountPermissions = function(opt_data) { }; goog.inherits(proto.permission.AccountPermissions, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.permission.AccountPermissions.displayName = 'proto.permission.AccountPermissions'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.permission.BasePermissions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.permission.BasePermissions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.permission.BasePermissions.displayName = 'proto.permission.BasePermissions'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.permission.PermArgs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.permission.PermArgs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.permission.PermArgs.displayName = 'proto.permission.PermArgs'; +} + /** * List of repeated fields within this message type. * @private {!Array} @@ -45,13 +94,15 @@ proto.permission.AccountPermissions.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.permission.AccountPermissions.prototype.toObject = function(opt_includeInstance) { @@ -61,8 +112,8 @@ proto.permission.AccountPermissions.prototype.toObject = function(opt_includeIns /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.permission.AccountPermissions} msg The msg instance to transform. * @return {!Object} @@ -71,7 +122,7 @@ proto.permission.AccountPermissions.prototype.toObject = function(opt_includeIns proto.permission.AccountPermissions.toObject = function(includeInstance, msg) { var f, obj = { base: (f = msg.getBase()) && proto.permission.BasePermissions.toObject(includeInstance, f), - rolesList: jspb.Message.getRepeatedField(msg, 2) + rolesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -174,14 +225,21 @@ proto.permission.AccountPermissions.prototype.getBase = function() { }; -/** @param {?proto.permission.BasePermissions|undefined} value */ +/** + * @param {?proto.permission.BasePermissions|undefined} value + * @return {!proto.permission.AccountPermissions} returns this +*/ proto.permission.AccountPermissions.prototype.setBase = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.permission.AccountPermissions} returns this + */ proto.permission.AccountPermissions.prototype.clearBase = function() { - this.setBase(undefined); + return this.setBase(undefined); }; @@ -203,55 +261,48 @@ proto.permission.AccountPermissions.prototype.getRolesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.permission.AccountPermissions} returns this + */ proto.permission.AccountPermissions.prototype.setRolesList = function(value) { - jspb.Message.setField(this, 2, value || []); + return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.permission.AccountPermissions} returns this */ proto.permission.AccountPermissions.prototype.addRoles = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.permission.AccountPermissions} returns this + */ proto.permission.AccountPermissions.prototype.clearRolesList = function() { - this.setRolesList([]); + return this.setRolesList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.permission.BasePermissions = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.permission.BasePermissions, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.permission.BasePermissions.displayName = 'proto.permission.BasePermissions'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstance) { @@ -261,8 +312,8 @@ proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstan /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.permission.BasePermissions} msg The msg instance to transform. * @return {!Object} @@ -270,8 +321,8 @@ proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstan */ proto.permission.BasePermissions.toObject = function(includeInstance, msg) { var f, obj = { - perms: jspb.Message.getField(msg, 1), - setbit: jspb.Message.getField(msg, 2) + perms: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + setbit: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -371,14 +422,21 @@ proto.permission.BasePermissions.prototype.getPerms = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.permission.BasePermissions} returns this + */ proto.permission.BasePermissions.prototype.setPerms = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.permission.BasePermissions} returns this + */ proto.permission.BasePermissions.prototype.clearPerms = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -400,14 +458,21 @@ proto.permission.BasePermissions.prototype.getSetbit = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.permission.BasePermissions} returns this + */ proto.permission.BasePermissions.prototype.setSetbit = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.permission.BasePermissions} returns this + */ proto.permission.BasePermissions.prototype.clearSetbit = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -421,34 +486,19 @@ proto.permission.BasePermissions.prototype.hasSetbit = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.permission.PermArgs = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.permission.PermArgs, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.permission.PermArgs.displayName = 'proto.permission.PermArgs'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { @@ -458,8 +508,8 @@ proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.permission.PermArgs} msg The msg instance to transform. * @return {!Object} @@ -467,11 +517,11 @@ proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { */ proto.permission.PermArgs.toObject = function(includeInstance, msg) { var f, obj = { - action: jspb.Message.getField(msg, 1), + action: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, target: msg.getTarget_asB64(), - permission: jspb.Message.getField(msg, 3), - role: jspb.Message.getField(msg, 4), - value: jspb.Message.getField(msg, 5) + permission: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + role: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + value: (f = jspb.Message.getBooleanField(msg, 5)) == null ? undefined : f }; if (includeInstance) { @@ -604,14 +654,21 @@ proto.permission.PermArgs.prototype.getAction = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setAction = function(value) { - jspb.Message.setField(this, 1, value); + return jspb.Message.setField(this, 1, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.clearAction = function() { - jspb.Message.setField(this, 1, undefined); + return jspb.Message.setField(this, 1, undefined); }; @@ -657,14 +714,21 @@ proto.permission.PermArgs.prototype.getTarget_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setTarget = function(value) { - jspb.Message.setField(this, 2, value); + return jspb.Message.setField(this, 2, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.clearTarget = function() { - jspb.Message.setField(this, 2, undefined); + return jspb.Message.setField(this, 2, undefined); }; @@ -686,14 +750,21 @@ proto.permission.PermArgs.prototype.getPermission = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setPermission = function(value) { - jspb.Message.setField(this, 3, value); + return jspb.Message.setField(this, 3, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.clearPermission = function() { - jspb.Message.setField(this, 3, undefined); + return jspb.Message.setField(this, 3, undefined); }; @@ -715,14 +786,21 @@ proto.permission.PermArgs.prototype.getRole = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setRole = function(value) { - jspb.Message.setField(this, 4, value); + return jspb.Message.setField(this, 4, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.clearRole = function() { - jspb.Message.setField(this, 4, undefined); + return jspb.Message.setField(this, 4, undefined); }; @@ -737,23 +815,28 @@ proto.permission.PermArgs.prototype.hasRole = function() { /** * optional bool Value = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.permission.PermArgs.prototype.getValue = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.setValue = function(value) { - jspb.Message.setField(this, 5, value); + return jspb.Message.setField(this, 5, value); }; +/** + * Clears the field making it undefined. + * @return {!proto.permission.PermArgs} returns this + */ proto.permission.PermArgs.prototype.clearValue = function() { - jspb.Message.setField(this, 5, undefined); + return jspb.Message.setField(this, 5, undefined); }; diff --git a/js/proto/registry_pb.d.ts b/js/proto/registry_pb.d.ts index 919b6b141..4d04df7e6 100644 --- a/js/proto/registry_pb.d.ts +++ b/js/proto/registry_pb.d.ts @@ -5,24 +5,24 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; export class NodeIdentity extends jspb.Message { getMoniker(): string; - setMoniker(value: string): void; + setMoniker(value: string): NodeIdentity; getNetworkaddress(): string; - setNetworkaddress(value: string): void; + setNetworkaddress(value: string): NodeIdentity; getTendermintnodeid(): Uint8Array | string; getTendermintnodeid_asU8(): Uint8Array; getTendermintnodeid_asB64(): string; - setTendermintnodeid(value: Uint8Array | string): void; + setTendermintnodeid(value: Uint8Array | string): NodeIdentity; getValidatorpublickey(): Uint8Array | string; getValidatorpublickey_asU8(): Uint8Array; getValidatorpublickey_asB64(): string; - setValidatorpublickey(value: Uint8Array | string): void; + setValidatorpublickey(value: Uint8Array | string): NodeIdentity; serializeBinary(): Uint8Array; diff --git a/js/proto/registry_pb.js b/js/proto/registry_pb.js index 4a9baa597..0b9136295 100644 --- a/js/proto/registry_pb.js +++ b/js/proto/registry_pb.js @@ -1,3 +1,4 @@ +// source: registry.proto /** * @fileoverview * @enhanceable @@ -6,15 +7,16 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.registry.NodeIdentity', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,19 +32,26 @@ proto.registry.NodeIdentity = function(opt_data) { }; goog.inherits(proto.registry.NodeIdentity, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.registry.NodeIdentity.displayName = 'proto.registry.NodeIdentity'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.registry.NodeIdentity.prototype.toObject = function(opt_includeInstance) { @@ -52,8 +61,8 @@ proto.registry.NodeIdentity.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.registry.NodeIdentity} msg The msg instance to transform. * @return {!Object} @@ -186,9 +195,12 @@ proto.registry.NodeIdentity.prototype.getMoniker = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.registry.NodeIdentity} returns this + */ proto.registry.NodeIdentity.prototype.setMoniker = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -201,9 +213,12 @@ proto.registry.NodeIdentity.prototype.getNetworkaddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.registry.NodeIdentity} returns this + */ proto.registry.NodeIdentity.prototype.setNetworkaddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -240,9 +255,12 @@ proto.registry.NodeIdentity.prototype.getTendermintnodeid_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.registry.NodeIdentity} returns this + */ proto.registry.NodeIdentity.prototype.setTendermintnodeid = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -279,9 +297,12 @@ proto.registry.NodeIdentity.prototype.getValidatorpublickey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.registry.NodeIdentity} returns this + */ proto.registry.NodeIdentity.prototype.setValidatorpublickey = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; diff --git a/js/proto/rpc_pb.d.ts b/js/proto/rpc_pb.d.ts index deca2311c..97771b2c0 100644 --- a/js/proto/rpc_pb.d.ts +++ b/js/proto/rpc_pb.d.ts @@ -5,46 +5,46 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as tendermint_pb from "./tendermint_pb"; import * as validator_pb from "./validator_pb"; import * as bcm_pb from "./bcm_pb"; export class ResultStatus extends jspb.Message { getChainid(): string; - setChainid(value: string): void; + setChainid(value: string): ResultStatus; getRunid(): string; - setRunid(value: string): void; + setRunid(value: string): ResultStatus; getBurrowversion(): string; - setBurrowversion(value: string): void; + setBurrowversion(value: string): ResultStatus; getGenesishash(): Uint8Array | string; getGenesishash_asU8(): Uint8Array; getGenesishash_asB64(): string; - setGenesishash(value: Uint8Array | string): void; + setGenesishash(value: Uint8Array | string): ResultStatus; hasNodeinfo(): boolean; clearNodeinfo(): void; getNodeinfo(): tendermint_pb.NodeInfo | undefined; - setNodeinfo(value?: tendermint_pb.NodeInfo): void; + setNodeinfo(value?: tendermint_pb.NodeInfo): ResultStatus; hasSyncinfo(): boolean; clearSyncinfo(): void; getSyncinfo(): bcm_pb.SyncInfo | undefined; - setSyncinfo(value?: bcm_pb.SyncInfo): void; + setSyncinfo(value?: bcm_pb.SyncInfo): ResultStatus; getCatchingup(): boolean; - setCatchingup(value: boolean): void; + setCatchingup(value: boolean): ResultStatus; hasValidatorinfo(): boolean; clearValidatorinfo(): void; getValidatorinfo(): validator_pb.Validator | undefined; - setValidatorinfo(value?: validator_pb.Validator): void; + setValidatorinfo(value?: validator_pb.Validator): ResultStatus; serializeBinary(): Uint8Array; diff --git a/js/proto/rpc_pb.js b/js/proto/rpc_pb.js index ca8eda178..fb9146be6 100644 --- a/js/proto/rpc_pb.js +++ b/js/proto/rpc_pb.js @@ -1,3 +1,4 @@ +// source: rpc.proto /** * @fileoverview * @enhanceable @@ -6,13 +7,15 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); var tendermint_pb = require('./tendermint_pb.js'); goog.object.extend(proto, tendermint_pb); var validator_pb = require('./validator_pb.js'); @@ -20,7 +23,6 @@ goog.object.extend(proto, validator_pb); var bcm_pb = require('./bcm_pb.js'); goog.object.extend(proto, bcm_pb); goog.exportSymbol('proto.rpc.ResultStatus', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -36,19 +38,26 @@ proto.rpc.ResultStatus = function(opt_data) { }; goog.inherits(proto.rpc.ResultStatus, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.rpc.ResultStatus.displayName = 'proto.rpc.ResultStatus'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpc.ResultStatus.prototype.toObject = function(opt_includeInstance) { @@ -58,8 +67,8 @@ proto.rpc.ResultStatus.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpc.ResultStatus} msg The msg instance to transform. * @return {!Object} @@ -73,7 +82,7 @@ proto.rpc.ResultStatus.toObject = function(includeInstance, msg) { genesishash: msg.getGenesishash_asB64(), nodeinfo: (f = msg.getNodeinfo()) && tendermint_pb.NodeInfo.toObject(includeInstance, f), syncinfo: (f = msg.getSyncinfo()) && bcm_pb.SyncInfo.toObject(includeInstance, f), - catchingup: jspb.Message.getFieldWithDefault(msg, 8, false), + catchingup: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), validatorinfo: (f = msg.getValidatorinfo()) && validator_pb.Validator.toObject(includeInstance, f) }; @@ -246,9 +255,12 @@ proto.rpc.ResultStatus.prototype.getChainid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setChainid = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -261,9 +273,12 @@ proto.rpc.ResultStatus.prototype.getRunid = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setRunid = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -276,9 +291,12 @@ proto.rpc.ResultStatus.prototype.getBurrowversion = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setBurrowversion = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -315,9 +333,12 @@ proto.rpc.ResultStatus.prototype.getGenesishash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setGenesishash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -331,14 +352,21 @@ proto.rpc.ResultStatus.prototype.getNodeinfo = function() { }; -/** @param {?proto.tendermint.NodeInfo|undefined} value */ +/** + * @param {?proto.tendermint.NodeInfo|undefined} value + * @return {!proto.rpc.ResultStatus} returns this +*/ proto.rpc.ResultStatus.prototype.setNodeinfo = function(value) { - jspb.Message.setWrapperField(this, 5, value); + return jspb.Message.setWrapperField(this, 5, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.clearNodeinfo = function() { - this.setNodeinfo(undefined); + return this.setNodeinfo(undefined); }; @@ -361,14 +389,21 @@ proto.rpc.ResultStatus.prototype.getSyncinfo = function() { }; -/** @param {?proto.bcm.SyncInfo|undefined} value */ +/** + * @param {?proto.bcm.SyncInfo|undefined} value + * @return {!proto.rpc.ResultStatus} returns this +*/ proto.rpc.ResultStatus.prototype.setSyncinfo = function(value) { - jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 6, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.clearSyncinfo = function() { - this.setSyncinfo(undefined); + return this.setSyncinfo(undefined); }; @@ -383,18 +418,19 @@ proto.rpc.ResultStatus.prototype.hasSyncinfo = function() { /** * optional bool CatchingUp = 8; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpc.ResultStatus.prototype.getCatchingup = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 8, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.setCatchingup = function(value) { - jspb.Message.setProto3BooleanField(this, 8, value); + return jspb.Message.setProto3BooleanField(this, 8, value); }; @@ -408,14 +444,21 @@ proto.rpc.ResultStatus.prototype.getValidatorinfo = function() { }; -/** @param {?proto.validator.Validator|undefined} value */ +/** + * @param {?proto.validator.Validator|undefined} value + * @return {!proto.rpc.ResultStatus} returns this +*/ proto.rpc.ResultStatus.prototype.setValidatorinfo = function(value) { - jspb.Message.setWrapperField(this, 7, value); + return jspb.Message.setWrapperField(this, 7, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.rpc.ResultStatus} returns this + */ proto.rpc.ResultStatus.prototype.clearValidatorinfo = function() { - this.setValidatorinfo(undefined); + return this.setValidatorinfo(undefined); }; diff --git a/js/proto/rpcdump_grpc_pb.d.ts b/js/proto/rpcdump_grpc_pb.d.ts index 7e5e3b320..9ae564151 100644 --- a/js/proto/rpcdump_grpc_pb.d.ts +++ b/js/proto/rpcdump_grpc_pb.d.ts @@ -7,7 +7,7 @@ import * as grpc from "@grpc/grpc-js"; import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; import * as rpcdump_pb from "./rpcdump_pb"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as dump_pb from "./dump_pb"; interface IDumpService extends grpc.ServiceDefinition { @@ -15,9 +15,9 @@ interface IDumpService extends grpc.ServiceDefinition { - path: string; // "/rpcdump.Dump/GetDump" - requestStream: boolean; // false - responseStream: boolean; // true + path: "/rpcdump.Dump/GetDump"; + requestStream: false; + responseStream: true; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; @@ -26,7 +26,7 @@ interface IDumpService_IGetDump extends grpc.MethodDefinition; } @@ -36,7 +36,7 @@ export interface IDumpClient { } export class DumpClient extends grpc.Client implements IDumpClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); public getDump(request: rpcdump_pb.GetDumpParam, options?: Partial): grpc.ClientReadableStream; public getDump(request: rpcdump_pb.GetDumpParam, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; } diff --git a/js/proto/rpcdump_grpc_pb.js b/js/proto/rpcdump_grpc_pb.js index eebb60d77..0ff25ed95 100644 --- a/js/proto/rpcdump_grpc_pb.js +++ b/js/proto/rpcdump_grpc_pb.js @@ -2,7 +2,7 @@ 'use strict'; var rpcdump_pb = require('./rpcdump_pb.js'); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); var dump_pb = require('./dump_pb.js'); function serialize_dump_Dump(arg) { diff --git a/js/proto/rpcdump_pb.d.ts b/js/proto/rpcdump_pb.d.ts index ff25374cf..a9ce2be97 100644 --- a/js/proto/rpcdump_pb.d.ts +++ b/js/proto/rpcdump_pb.d.ts @@ -5,12 +5,12 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as dump_pb from "./dump_pb"; export class GetDumpParam extends jspb.Message { getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): GetDumpParam; serializeBinary(): Uint8Array; diff --git a/js/proto/rpcdump_pb.js b/js/proto/rpcdump_pb.js index f6eaa5874..0a67429c2 100644 --- a/js/proto/rpcdump_pb.js +++ b/js/proto/rpcdump_pb.js @@ -1,3 +1,4 @@ +// source: rpcdump.proto /** * @fileoverview * @enhanceable @@ -6,17 +7,18 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); var dump_pb = require('./dump_pb.js'); goog.object.extend(proto, dump_pb); goog.exportSymbol('proto.rpcdump.GetDumpParam', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -32,19 +34,26 @@ proto.rpcdump.GetDumpParam = function(opt_data) { }; goog.inherits(proto.rpcdump.GetDumpParam, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.rpcdump.GetDumpParam.displayName = 'proto.rpcdump.GetDumpParam'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcdump.GetDumpParam.prototype.toObject = function(opt_includeInstance) { @@ -54,8 +63,8 @@ proto.rpcdump.GetDumpParam.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcdump.GetDumpParam} msg The msg instance to transform. * @return {!Object} @@ -152,9 +161,12 @@ proto.rpcdump.GetDumpParam.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcdump.GetDumpParam} returns this + */ proto.rpcdump.GetDumpParam.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; diff --git a/js/proto/rpcevents_grpc_pb.d.ts b/js/proto/rpcevents_grpc_pb.d.ts index f457be828..f902bcc89 100644 --- a/js/proto/rpcevents_grpc_pb.d.ts +++ b/js/proto/rpcevents_grpc_pb.d.ts @@ -7,7 +7,7 @@ import * as grpc from "@grpc/grpc-js"; import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; import * as rpcevents_pb from "./rpcevents_pb"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as exec_pb from "./exec_pb"; interface IExecutionEventsService extends grpc.ServiceDefinition { @@ -17,27 +17,27 @@ interface IExecutionEventsService extends grpc.ServiceDefinition { - path: string; // "/rpcevents.ExecutionEvents/Stream" - requestStream: boolean; // false - responseStream: boolean; // true + path: "/rpcevents.ExecutionEvents/Stream"; + requestStream: false; + responseStream: true; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IExecutionEventsService_ITx extends grpc.MethodDefinition { - path: string; // "/rpcevents.ExecutionEvents/Tx" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpcevents.ExecutionEvents/Tx"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IExecutionEventsService_IEvents extends grpc.MethodDefinition { - path: string; // "/rpcevents.ExecutionEvents/Events" - requestStream: boolean; // false - responseStream: boolean; // true + path: "/rpcevents.ExecutionEvents/Events"; + requestStream: false; + responseStream: true; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; @@ -46,7 +46,7 @@ interface IExecutionEventsService_IEvents extends grpc.MethodDefinition; tx: grpc.handleUnaryCall; events: grpc.handleServerStreamingCall; @@ -63,7 +63,7 @@ export interface IExecutionEventsClient { } export class ExecutionEventsClient extends grpc.Client implements IExecutionEventsClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); public stream(request: rpcevents_pb.BlocksRequest, options?: Partial): grpc.ClientReadableStream; public stream(request: rpcevents_pb.BlocksRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public tx(request: rpcevents_pb.TxRequest, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; diff --git a/js/proto/rpcevents_grpc_pb.js b/js/proto/rpcevents_grpc_pb.js index 4a326d75e..73e4b7c4d 100644 --- a/js/proto/rpcevents_grpc_pb.js +++ b/js/proto/rpcevents_grpc_pb.js @@ -2,7 +2,7 @@ 'use strict'; var rpcevents_pb = require('./rpcevents_pb.js'); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); var exec_pb = require('./exec_pb.js'); function serialize_exec_StreamEvent(arg) { diff --git a/js/proto/rpcevents_pb.d.ts b/js/proto/rpcevents_pb.d.ts index 3ea6da1f0..2ee0e4556 100644 --- a/js/proto/rpcevents_pb.d.ts +++ b/js/proto/rpcevents_pb.d.ts @@ -5,15 +5,15 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as exec_pb from "./exec_pb"; export class GetBlockRequest extends jspb.Message { getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): GetBlockRequest; getWait(): boolean; - setWait(value: boolean): void; + setWait(value: boolean): GetBlockRequest; serializeBinary(): Uint8Array; @@ -37,10 +37,10 @@ export class TxRequest extends jspb.Message { getTxhash(): Uint8Array | string; getTxhash_asU8(): Uint8Array; getTxhash_asB64(): string; - setTxhash(value: Uint8Array | string): void; + setTxhash(value: Uint8Array | string): TxRequest; getWait(): boolean; - setWait(value: boolean): void; + setWait(value: boolean): TxRequest; serializeBinary(): Uint8Array; @@ -65,10 +65,10 @@ export class BlocksRequest extends jspb.Message { hasBlockrange(): boolean; clearBlockrange(): void; getBlockrange(): BlockRange | undefined; - setBlockrange(value?: BlockRange): void; + setBlockrange(value?: BlockRange): BlocksRequest; getQuery(): string; - setQuery(value: string): void; + setQuery(value: string): BlocksRequest; serializeBinary(): Uint8Array; @@ -90,11 +90,11 @@ export namespace BlocksRequest { export class EventsResponse extends jspb.Message { getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): EventsResponse; clearEventsList(): void; getEventsList(): Array; - setEventsList(value: Array): void; + setEventsList(value: Array): EventsResponse; addEvents(value?: exec_pb.Event, index?: number): exec_pb.Event; @@ -117,13 +117,13 @@ export namespace EventsResponse { export class GetTxsRequest extends jspb.Message { getStartheight(): number; - setStartheight(value: number): void; + setStartheight(value: number): GetTxsRequest; getEndheight(): number; - setEndheight(value: number): void; + setEndheight(value: number): GetTxsRequest; getQuery(): string; - setQuery(value: string): void; + setQuery(value: string): GetTxsRequest; serializeBinary(): Uint8Array; @@ -146,11 +146,11 @@ export namespace GetTxsRequest { export class GetTxsResponse extends jspb.Message { getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): GetTxsResponse; clearTxexecutionsList(): void; getTxexecutionsList(): Array; - setTxexecutionsList(value: Array): void; + setTxexecutionsList(value: Array): GetTxsResponse; addTxexecutions(value?: exec_pb.TxExecution, index?: number): exec_pb.TxExecution; @@ -173,10 +173,10 @@ export namespace GetTxsResponse { export class Bound extends jspb.Message { getType(): Bound.BoundType; - setType(value: Bound.BoundType): void; + setType(value: Bound.BoundType): Bound; getIndex(): number; - setIndex(value: number): void; + setIndex(value: number): Bound; serializeBinary(): Uint8Array; @@ -210,13 +210,13 @@ export class BlockRange extends jspb.Message { hasStart(): boolean; clearStart(): void; getStart(): Bound | undefined; - setStart(value?: Bound): void; + setStart(value?: Bound): BlockRange; hasEnd(): boolean; clearEnd(): void; getEnd(): Bound | undefined; - setEnd(value?: Bound): void; + setEnd(value?: Bound): BlockRange; serializeBinary(): Uint8Array; diff --git a/js/proto/rpcevents_pb.js b/js/proto/rpcevents_pb.js index 86353aef2..b60eb96fa 100644 --- a/js/proto/rpcevents_pb.js +++ b/js/proto/rpcevents_pb.js @@ -1,3 +1,4 @@ +// source: rpcevents.proto /** * @fileoverview * @enhanceable @@ -6,13 +7,15 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); var exec_pb = require('./exec_pb.js'); goog.object.extend(proto, exec_pb); goog.exportSymbol('proto.rpcevents.BlockRange', null, global); @@ -24,7 +27,6 @@ goog.exportSymbol('proto.rpcevents.GetBlockRequest', null, global); goog.exportSymbol('proto.rpcevents.GetTxsRequest', null, global); goog.exportSymbol('proto.rpcevents.GetTxsResponse', null, global); goog.exportSymbol('proto.rpcevents.TxRequest', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -40,19 +42,173 @@ proto.rpcevents.GetBlockRequest = function(opt_data) { }; goog.inherits(proto.rpcevents.GetBlockRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.rpcevents.GetBlockRequest.displayName = 'proto.rpcevents.GetBlockRequest'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.TxRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.TxRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.TxRequest.displayName = 'proto.rpcevents.TxRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.BlocksRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.BlocksRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.BlocksRequest.displayName = 'proto.rpcevents.BlocksRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.EventsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcevents.EventsResponse.repeatedFields_, null); +}; +goog.inherits(proto.rpcevents.EventsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.EventsResponse.displayName = 'proto.rpcevents.EventsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.GetTxsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.GetTxsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.GetTxsRequest.displayName = 'proto.rpcevents.GetTxsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.GetTxsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcevents.GetTxsResponse.repeatedFields_, null); +}; +goog.inherits(proto.rpcevents.GetTxsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.GetTxsResponse.displayName = 'proto.rpcevents.GetTxsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.Bound = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.Bound, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.Bound.displayName = 'proto.rpcevents.Bound'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcevents.BlockRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcevents.BlockRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcevents.BlockRange.displayName = 'proto.rpcevents.BlockRange'; +} + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstance) { @@ -62,8 +218,8 @@ proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.GetBlockRequest} msg The msg instance to transform. * @return {!Object} @@ -72,7 +228,7 @@ proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstanc proto.rpcevents.GetBlockRequest.toObject = function(includeInstance, msg) { var f, obj = { height: jspb.Message.getFieldWithDefault(msg, 1, 0), - wait: jspb.Message.getFieldWithDefault(msg, 2, false) + wait: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -172,58 +328,47 @@ proto.rpcevents.GetBlockRequest.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.GetBlockRequest} returns this + */ proto.rpcevents.GetBlockRequest.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional bool Wait = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpcevents.GetBlockRequest.prototype.getWait = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.rpcevents.GetBlockRequest} returns this + */ proto.rpcevents.GetBlockRequest.prototype.setWait = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); + return jspb.Message.setProto3BooleanField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.TxRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcevents.TxRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcevents.TxRequest.displayName = 'proto.rpcevents.TxRequest'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { @@ -233,8 +378,8 @@ proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.TxRequest} msg The msg instance to transform. * @return {!Object} @@ -243,7 +388,7 @@ proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { proto.rpcevents.TxRequest.toObject = function(includeInstance, msg) { var f, obj = { txhash: msg.getTxhash_asB64(), - wait: jspb.Message.getFieldWithDefault(msg, 2, false) + wait: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -367,58 +512,47 @@ proto.rpcevents.TxRequest.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcevents.TxRequest} returns this + */ proto.rpcevents.TxRequest.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; /** * optional bool Wait = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpcevents.TxRequest.prototype.getWait = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.rpcevents.TxRequest} returns this + */ proto.rpcevents.TxRequest.prototype.setWait = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); + return jspb.Message.setProto3BooleanField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.BlocksRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcevents.BlocksRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcevents.BlocksRequest.displayName = 'proto.rpcevents.BlocksRequest'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.BlocksRequest.prototype.toObject = function(opt_includeInstance) { @@ -428,8 +562,8 @@ proto.rpcevents.BlocksRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.BlocksRequest} msg The msg instance to transform. * @return {!Object} @@ -541,14 +675,21 @@ proto.rpcevents.BlocksRequest.prototype.getBlockrange = function() { }; -/** @param {?proto.rpcevents.BlockRange|undefined} value */ +/** + * @param {?proto.rpcevents.BlockRange|undefined} value + * @return {!proto.rpcevents.BlocksRequest} returns this +*/ proto.rpcevents.BlocksRequest.prototype.setBlockrange = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.rpcevents.BlocksRequest} returns this + */ proto.rpcevents.BlocksRequest.prototype.clearBlockrange = function() { - this.setBlockrange(undefined); + return this.setBlockrange(undefined); }; @@ -570,30 +711,16 @@ proto.rpcevents.BlocksRequest.prototype.getQuery = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcevents.BlocksRequest} returns this + */ proto.rpcevents.BlocksRequest.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.EventsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcevents.EventsResponse.repeatedFields_, null); -}; -goog.inherits(proto.rpcevents.EventsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcevents.EventsResponse.displayName = 'proto.rpcevents.EventsResponse'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -605,13 +732,15 @@ proto.rpcevents.EventsResponse.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.EventsResponse.prototype.toObject = function(opt_includeInstance) { @@ -621,8 +750,8 @@ proto.rpcevents.EventsResponse.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.EventsResponse} msg The msg instance to transform. * @return {!Object} @@ -734,9 +863,12 @@ proto.rpcevents.EventsResponse.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.EventsResponse} returns this + */ proto.rpcevents.EventsResponse.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -750,9 +882,12 @@ proto.rpcevents.EventsResponse.prototype.getEventsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcevents.EventsResponse} returns this +*/ proto.rpcevents.EventsResponse.prototype.setEventsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -766,40 +901,29 @@ proto.rpcevents.EventsResponse.prototype.addEvents = function(opt_value, opt_ind }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.rpcevents.EventsResponse} returns this + */ proto.rpcevents.EventsResponse.prototype.clearEventsList = function() { - this.setEventsList([]); + return this.setEventsList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.GetTxsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcevents.GetTxsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcevents.GetTxsRequest.displayName = 'proto.rpcevents.GetTxsRequest'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.GetTxsRequest.prototype.toObject = function(opt_includeInstance) { @@ -809,8 +933,8 @@ proto.rpcevents.GetTxsRequest.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.GetTxsRequest} msg The msg instance to transform. * @return {!Object} @@ -931,9 +1055,12 @@ proto.rpcevents.GetTxsRequest.prototype.getStartheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.GetTxsRequest} returns this + */ proto.rpcevents.GetTxsRequest.prototype.setStartheight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -946,9 +1073,12 @@ proto.rpcevents.GetTxsRequest.prototype.getEndheight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.GetTxsRequest} returns this + */ proto.rpcevents.GetTxsRequest.prototype.setEndheight = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -961,30 +1091,16 @@ proto.rpcevents.GetTxsRequest.prototype.getQuery = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcevents.GetTxsRequest} returns this + */ proto.rpcevents.GetTxsRequest.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.GetTxsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcevents.GetTxsResponse.repeatedFields_, null); -}; -goog.inherits(proto.rpcevents.GetTxsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcevents.GetTxsResponse.displayName = 'proto.rpcevents.GetTxsResponse'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -996,13 +1112,15 @@ proto.rpcevents.GetTxsResponse.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.GetTxsResponse.prototype.toObject = function(opt_includeInstance) { @@ -1012,8 +1130,8 @@ proto.rpcevents.GetTxsResponse.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.GetTxsResponse} msg The msg instance to transform. * @return {!Object} @@ -1125,9 +1243,12 @@ proto.rpcevents.GetTxsResponse.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.GetTxsResponse} returns this + */ proto.rpcevents.GetTxsResponse.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -1141,9 +1262,12 @@ proto.rpcevents.GetTxsResponse.prototype.getTxexecutionsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcevents.GetTxsResponse} returns this +*/ proto.rpcevents.GetTxsResponse.prototype.setTxexecutionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -1157,40 +1281,29 @@ proto.rpcevents.GetTxsResponse.prototype.addTxexecutions = function(opt_value, o }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.rpcevents.GetTxsResponse} returns this + */ proto.rpcevents.GetTxsResponse.prototype.clearTxexecutionsList = function() { - this.setTxexecutionsList([]); + return this.setTxexecutionsList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.Bound = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcevents.Bound, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcevents.Bound.displayName = 'proto.rpcevents.Bound'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.Bound.prototype.toObject = function(opt_includeInstance) { @@ -1200,8 +1313,8 @@ proto.rpcevents.Bound.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.Bound} msg The msg instance to transform. * @return {!Object} @@ -1321,9 +1434,12 @@ proto.rpcevents.Bound.prototype.getType = function() { }; -/** @param {!proto.rpcevents.Bound.BoundType} value */ +/** + * @param {!proto.rpcevents.Bound.BoundType} value + * @return {!proto.rpcevents.Bound} returns this + */ proto.rpcevents.Bound.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 1, value); + return jspb.Message.setProto3EnumField(this, 1, value); }; @@ -1336,41 +1452,29 @@ proto.rpcevents.Bound.prototype.getIndex = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcevents.Bound} returns this + */ proto.rpcevents.Bound.prototype.setIndex = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcevents.BlockRange = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcevents.BlockRange, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcevents.BlockRange.displayName = 'proto.rpcevents.BlockRange'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcevents.BlockRange.prototype.toObject = function(opt_includeInstance) { @@ -1380,8 +1484,8 @@ proto.rpcevents.BlockRange.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcevents.BlockRange} msg The msg instance to transform. * @return {!Object} @@ -1495,14 +1599,21 @@ proto.rpcevents.BlockRange.prototype.getStart = function() { }; -/** @param {?proto.rpcevents.Bound|undefined} value */ +/** + * @param {?proto.rpcevents.Bound|undefined} value + * @return {!proto.rpcevents.BlockRange} returns this +*/ proto.rpcevents.BlockRange.prototype.setStart = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.rpcevents.BlockRange} returns this + */ proto.rpcevents.BlockRange.prototype.clearStart = function() { - this.setStart(undefined); + return this.setStart(undefined); }; @@ -1525,14 +1636,21 @@ proto.rpcevents.BlockRange.prototype.getEnd = function() { }; -/** @param {?proto.rpcevents.Bound|undefined} value */ +/** + * @param {?proto.rpcevents.Bound|undefined} value + * @return {!proto.rpcevents.BlockRange} returns this +*/ proto.rpcevents.BlockRange.prototype.setEnd = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.rpcevents.BlockRange} returns this + */ proto.rpcevents.BlockRange.prototype.clearEnd = function() { - this.setEnd(undefined); + return this.setEnd(undefined); }; diff --git a/js/proto/rpcquery_grpc_pb.d.ts b/js/proto/rpcquery_grpc_pb.d.ts index e65279dfc..2b674d9db 100644 --- a/js/proto/rpcquery_grpc_pb.d.ts +++ b/js/proto/rpcquery_grpc_pb.d.ts @@ -7,8 +7,8 @@ import * as grpc from "@grpc/grpc-js"; import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; import * as rpcquery_pb from "./rpcquery_pb"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; -import * as github_com_tendermint_tendermint_abci_types_types_pb from "./github.com/tendermint/tendermint/abci/types/types_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; +import * as tendermint_types_types_pb from "./tendermint/types/types_pb"; import * as names_pb from "./names_pb"; import * as acm_pb from "./acm_pb"; import * as validator_pb from "./validator_pb"; @@ -34,135 +34,135 @@ interface IQueryService extends grpc.ServiceDefinition { - path: string; // "/rpcquery.Query/Status" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpcquery.Query/Status"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IQueryService_IGetAccount extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/GetAccount" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpcquery.Query/GetAccount"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IQueryService_IGetMetadata extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/GetMetadata" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpcquery.Query/GetMetadata"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IQueryService_IGetStorage extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/GetStorage" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpcquery.Query/GetStorage"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IQueryService_IListAccounts extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/ListAccounts" - requestStream: boolean; // false - responseStream: boolean; // true + path: "/rpcquery.Query/ListAccounts"; + requestStream: false; + responseStream: true; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IQueryService_IGetName extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/GetName" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpcquery.Query/GetName"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IQueryService_IListNames extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/ListNames" - requestStream: boolean; // false - responseStream: boolean; // true + path: "/rpcquery.Query/ListNames"; + requestStream: false; + responseStream: true; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IQueryService_IGetNetworkRegistry extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/GetNetworkRegistry" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpcquery.Query/GetNetworkRegistry"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IQueryService_IGetValidatorSet extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/GetValidatorSet" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpcquery.Query/GetValidatorSet"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IQueryService_IGetValidatorSetHistory extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/GetValidatorSetHistory" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpcquery.Query/GetValidatorSetHistory"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IQueryService_IGetProposal extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/GetProposal" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpcquery.Query/GetProposal"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IQueryService_IListProposals extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/ListProposals" - requestStream: boolean; // false - responseStream: boolean; // true + path: "/rpcquery.Query/ListProposals"; + requestStream: false; + responseStream: true; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface IQueryService_IGetStats extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/GetStats" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpcquery.Query/GetStats"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IQueryService_IGetBlockHeader extends grpc.MethodDefinition { - path: string; // "/rpcquery.Query/GetBlockHeader" - requestStream: boolean; // false - responseStream: boolean; // false +interface IQueryService_IGetBlockHeader extends grpc.MethodDefinition { + path: "/rpcquery.Query/GetBlockHeader"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } export const QueryService: IQueryService; -export interface IQueryServer { +export interface IQueryServer extends grpc.UntypedServiceImplementation { status: grpc.handleUnaryCall; getAccount: grpc.handleUnaryCall; getMetadata: grpc.handleUnaryCall; @@ -176,7 +176,7 @@ export interface IQueryServer { getProposal: grpc.handleUnaryCall; listProposals: grpc.handleServerStreamingCall; getStats: grpc.handleUnaryCall; - getBlockHeader: grpc.handleUnaryCall; + getBlockHeader: grpc.handleUnaryCall; } export interface IQueryClient { @@ -216,13 +216,13 @@ export interface IQueryClient { getStats(request: rpcquery_pb.GetStatsParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.Stats) => void): grpc.ClientUnaryCall; getStats(request: rpcquery_pb.GetStatsParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.Stats) => void): grpc.ClientUnaryCall; getStats(request: rpcquery_pb.GetStatsParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.Stats) => void): grpc.ClientUnaryCall; - getBlockHeader(request: rpcquery_pb.GetBlockParam, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.Header) => void): grpc.ClientUnaryCall; - getBlockHeader(request: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.Header) => void): grpc.ClientUnaryCall; - getBlockHeader(request: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.Header) => void): grpc.ClientUnaryCall; + getBlockHeader(request: rpcquery_pb.GetBlockParam, callback: (error: grpc.ServiceError | null, response: tendermint_types_types_pb.Header) => void): grpc.ClientUnaryCall; + getBlockHeader(request: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_types_types_pb.Header) => void): grpc.ClientUnaryCall; + getBlockHeader(request: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_types_types_pb.Header) => void): grpc.ClientUnaryCall; } export class QueryClient extends grpc.Client implements IQueryClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); public status(request: rpcquery_pb.StatusParam, callback: (error: grpc.ServiceError | null, response: rpc_pb.ResultStatus) => void): grpc.ClientUnaryCall; public status(request: rpcquery_pb.StatusParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpc_pb.ResultStatus) => void): grpc.ClientUnaryCall; public status(request: rpcquery_pb.StatusParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpc_pb.ResultStatus) => void): grpc.ClientUnaryCall; @@ -259,7 +259,7 @@ export class QueryClient extends grpc.Client implements IQueryClient { public getStats(request: rpcquery_pb.GetStatsParam, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.Stats) => void): grpc.ClientUnaryCall; public getStats(request: rpcquery_pb.GetStatsParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.Stats) => void): grpc.ClientUnaryCall; public getStats(request: rpcquery_pb.GetStatsParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: rpcquery_pb.Stats) => void): grpc.ClientUnaryCall; - public getBlockHeader(request: rpcquery_pb.GetBlockParam, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.Header) => void): grpc.ClientUnaryCall; - public getBlockHeader(request: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.Header) => void): grpc.ClientUnaryCall; - public getBlockHeader(request: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: github_com_tendermint_tendermint_abci_types_types_pb.Header) => void): grpc.ClientUnaryCall; + public getBlockHeader(request: rpcquery_pb.GetBlockParam, callback: (error: grpc.ServiceError | null, response: tendermint_types_types_pb.Header) => void): grpc.ClientUnaryCall; + public getBlockHeader(request: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_types_types_pb.Header) => void): grpc.ClientUnaryCall; + public getBlockHeader(request: rpcquery_pb.GetBlockParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_types_types_pb.Header) => void): grpc.ClientUnaryCall; } diff --git a/js/proto/rpcquery_grpc_pb.js b/js/proto/rpcquery_grpc_pb.js index af9a59adc..167b96146 100644 --- a/js/proto/rpcquery_grpc_pb.js +++ b/js/proto/rpcquery_grpc_pb.js @@ -2,8 +2,8 @@ 'use strict'; var rpcquery_pb = require('./rpcquery_pb.js'); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -var github_com_tendermint_tendermint_abci_types_types_pb = require('./github.com/tendermint/tendermint/abci/types/types_pb.js'); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +var tendermint_types_types_pb = require('./tendermint/types/types_pb.js'); var names_pb = require('./names_pb.js'); var acm_pb = require('./acm_pb.js'); var validator_pb = require('./validator_pb.js'); @@ -286,15 +286,15 @@ function deserialize_rpcquery_ValidatorSetHistory(buffer_arg) { return rpcquery_pb.ValidatorSetHistory.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_types_Header(arg) { - if (!(arg instanceof github_com_tendermint_tendermint_abci_types_types_pb.Header)) { - throw new Error('Expected argument of type types.Header'); +function serialize_tendermint_types_Header(arg) { + if (!(arg instanceof tendermint_types_types_pb.Header)) { + throw new Error('Expected argument of type tendermint.types.Header'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_types_Header(buffer_arg) { - return github_com_tendermint_tendermint_abci_types_types_pb.Header.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_tendermint_types_Header(buffer_arg) { + return tendermint_types_types_pb.Header.deserializeBinary(new Uint8Array(buffer_arg)); } @@ -448,11 +448,11 @@ getNetworkRegistry: { requestStream: false, responseStream: false, requestType: rpcquery_pb.GetBlockParam, - responseType: github_com_tendermint_tendermint_abci_types_types_pb.Header, + responseType: tendermint_types_types_pb.Header, requestSerialize: serialize_rpcquery_GetBlockParam, requestDeserialize: deserialize_rpcquery_GetBlockParam, - responseSerialize: serialize_types_Header, - responseDeserialize: deserialize_types_Header, + responseSerialize: serialize_tendermint_types_Header, + responseDeserialize: deserialize_tendermint_types_Header, }, }; diff --git a/js/proto/rpcquery_pb.d.ts b/js/proto/rpcquery_pb.d.ts index 6c332df42..4b0a6db91 100644 --- a/js/proto/rpcquery_pb.d.ts +++ b/js/proto/rpcquery_pb.d.ts @@ -5,8 +5,8 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; -import * as github_com_tendermint_tendermint_abci_types_types_pb from "./github.com/tendermint/tendermint/abci/types/types_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; +import * as tendermint_types_types_pb from "./tendermint/types/types_pb"; import * as names_pb from "./names_pb"; import * as acm_pb from "./acm_pb"; import * as validator_pb from "./validator_pb"; @@ -16,10 +16,10 @@ import * as payload_pb from "./payload_pb"; export class StatusParam extends jspb.Message { getBlocktimewithin(): string; - setBlocktimewithin(value: string): void; + setBlocktimewithin(value: string): StatusParam; getBlockseentimewithin(): string; - setBlockseentimewithin(value: string): void; + setBlockseentimewithin(value: string): StatusParam; serializeBinary(): Uint8Array; @@ -43,7 +43,7 @@ export class GetAccountParam extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): GetAccountParam; serializeBinary(): Uint8Array; @@ -66,12 +66,12 @@ export class GetMetadataParam extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): GetMetadataParam; getMetadatahash(): Uint8Array | string; getMetadatahash_asU8(): Uint8Array; getMetadatahash_asB64(): string; - setMetadatahash(value: Uint8Array | string): void; + setMetadatahash(value: Uint8Array | string): GetMetadataParam; serializeBinary(): Uint8Array; @@ -93,7 +93,7 @@ export namespace GetMetadataParam { export class MetadataResult extends jspb.Message { getMetadata(): string; - setMetadata(value: string): void; + setMetadata(value: string): MetadataResult; serializeBinary(): Uint8Array; @@ -116,12 +116,12 @@ export class GetStorageParam extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): GetStorageParam; getKey(): Uint8Array | string; getKey_asU8(): Uint8Array; getKey_asB64(): string; - setKey(value: Uint8Array | string): void; + setKey(value: Uint8Array | string): GetStorageParam; serializeBinary(): Uint8Array; @@ -145,7 +145,7 @@ export class StorageValue extends jspb.Message { getValue(): Uint8Array | string; getValue_asU8(): Uint8Array; getValue_asB64(): string; - setValue(value: Uint8Array | string): void; + setValue(value: Uint8Array | string): StorageValue; serializeBinary(): Uint8Array; @@ -166,7 +166,7 @@ export namespace StorageValue { export class ListAccountsParam extends jspb.Message { getQuery(): string; - setQuery(value: string): void; + setQuery(value: string): ListAccountsParam; serializeBinary(): Uint8Array; @@ -187,7 +187,7 @@ export namespace ListAccountsParam { export class GetNameParam extends jspb.Message { getName(): string; - setName(value: string): void; + setName(value: string): GetNameParam; serializeBinary(): Uint8Array; @@ -208,7 +208,7 @@ export namespace GetNameParam { export class ListNamesParam extends jspb.Message { getQuery(): string; - setQuery(value: string): void; + setQuery(value: string): ListNamesParam; serializeBinary(): Uint8Array; @@ -263,7 +263,7 @@ export namespace GetValidatorSetParam { export class GetValidatorSetHistoryParam extends jspb.Message { getIncludeprevious(): number; - setIncludeprevious(value: number): void; + setIncludeprevious(value: number): GetValidatorSetHistoryParam; serializeBinary(): Uint8Array; @@ -285,7 +285,7 @@ export namespace GetValidatorSetHistoryParam { export class NetworkRegistry extends jspb.Message { clearSetList(): void; getSetList(): Array; - setSetList(value: Array): void; + setSetList(value: Array): NetworkRegistry; addSet(value?: RegisteredValidator, index?: number): RegisteredValidator; @@ -309,13 +309,13 @@ export class RegisteredValidator extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): RegisteredValidator; hasNode(): boolean; clearNode(): void; getNode(): registry_pb.NodeIdentity | undefined; - setNode(value?: registry_pb.NodeIdentity): void; + setNode(value?: registry_pb.NodeIdentity): RegisteredValidator; serializeBinary(): Uint8Array; @@ -338,7 +338,7 @@ export namespace RegisteredValidator { export class ValidatorSetHistory extends jspb.Message { clearHistoryList(): void; getHistoryList(): Array; - setHistoryList(value: Array): void; + setHistoryList(value: Array): ValidatorSetHistory; addHistory(value?: ValidatorSet, index?: number): ValidatorSet; @@ -360,11 +360,11 @@ export namespace ValidatorSetHistory { export class ValidatorSet extends jspb.Message { getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): ValidatorSet; clearSetList(): void; getSetList(): Array; - setSetList(value: Array): void; + setSetList(value: Array): ValidatorSet; addSet(value?: validator_pb.Validator, index?: number): validator_pb.Validator; @@ -389,7 +389,7 @@ export class GetProposalParam extends jspb.Message { getHash(): Uint8Array | string; getHash_asU8(): Uint8Array; getHash_asB64(): string; - setHash(value: Uint8Array | string): void; + setHash(value: Uint8Array | string): GetProposalParam; serializeBinary(): Uint8Array; @@ -410,7 +410,7 @@ export namespace GetProposalParam { export class ListProposalsParam extends jspb.Message { getProposed(): boolean; - setProposed(value: boolean): void; + setProposed(value: boolean): ListProposalsParam; serializeBinary(): Uint8Array; @@ -433,13 +433,13 @@ export class ProposalResult extends jspb.Message { getHash(): Uint8Array | string; getHash_asU8(): Uint8Array; getHash_asB64(): string; - setHash(value: Uint8Array | string): void; + setHash(value: Uint8Array | string): ProposalResult; hasBallot(): boolean; clearBallot(): void; getBallot(): payload_pb.Ballot | undefined; - setBallot(value?: payload_pb.Ballot): void; + setBallot(value?: payload_pb.Ballot): ProposalResult; serializeBinary(): Uint8Array; @@ -478,10 +478,10 @@ export namespace GetStatsParam { export class Stats extends jspb.Message { getAccountswithcode(): number; - setAccountswithcode(value: number): void; + setAccountswithcode(value: number): Stats; getAccountswithoutcode(): number; - setAccountswithoutcode(value: number): void; + setAccountswithoutcode(value: number): Stats; serializeBinary(): Uint8Array; @@ -503,7 +503,7 @@ export namespace Stats { export class GetBlockParam extends jspb.Message { getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): GetBlockParam; serializeBinary(): Uint8Array; diff --git a/js/proto/rpcquery_pb.js b/js/proto/rpcquery_pb.js index fb220b561..aa0524dab 100644 --- a/js/proto/rpcquery_pb.js +++ b/js/proto/rpcquery_pb.js @@ -1,3 +1,4 @@ +// source: rpcquery.proto /** * @fileoverview * @enhanceable @@ -6,15 +7,17 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); -var github_com_tendermint_tendermint_abci_types_types_pb = require('./github.com/tendermint/tendermint/abci/types/types_pb.js'); -goog.object.extend(proto, github_com_tendermint_tendermint_abci_types_types_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var tendermint_types_types_pb = require('./tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); var names_pb = require('./names_pb.js'); goog.object.extend(proto, names_pb); var acm_pb = require('./acm_pb.js'); @@ -49,7 +52,6 @@ goog.exportSymbol('proto.rpcquery.StatusParam', null, global); goog.exportSymbol('proto.rpcquery.StorageValue', null, global); goog.exportSymbol('proto.rpcquery.ValidatorSet', null, global); goog.exportSymbol('proto.rpcquery.ValidatorSetHistory', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -60,24 +62,472 @@ goog.exportSymbol('proto.rpcquery.ValidatorSetHistory', null, global); * @extends {jspb.Message} * @constructor */ -proto.rpcquery.StatusParam = function(opt_data) { +proto.rpcquery.StatusParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.StatusParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.StatusParam.displayName = 'proto.rpcquery.StatusParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetAccountParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetAccountParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetAccountParam.displayName = 'proto.rpcquery.GetAccountParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetMetadataParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetMetadataParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetMetadataParam.displayName = 'proto.rpcquery.GetMetadataParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.MetadataResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.MetadataResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.MetadataResult.displayName = 'proto.rpcquery.MetadataResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetStorageParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetStorageParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetStorageParam.displayName = 'proto.rpcquery.GetStorageParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.StorageValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.StorageValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.StorageValue.displayName = 'proto.rpcquery.StorageValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ListAccountsParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.ListAccountsParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.ListAccountsParam.displayName = 'proto.rpcquery.ListAccountsParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetNameParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetNameParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetNameParam.displayName = 'proto.rpcquery.GetNameParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ListNamesParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.ListNamesParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.ListNamesParam.displayName = 'proto.rpcquery.ListNamesParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetNetworkRegistryParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetNetworkRegistryParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetNetworkRegistryParam.displayName = 'proto.rpcquery.GetNetworkRegistryParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetValidatorSetParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetValidatorSetParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetValidatorSetParam.displayName = 'proto.rpcquery.GetValidatorSetParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetValidatorSetHistoryParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetValidatorSetHistoryParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetValidatorSetHistoryParam.displayName = 'proto.rpcquery.GetValidatorSetHistoryParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.NetworkRegistry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.NetworkRegistry.repeatedFields_, null); +}; +goog.inherits(proto.rpcquery.NetworkRegistry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.NetworkRegistry.displayName = 'proto.rpcquery.NetworkRegistry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.RegisteredValidator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.RegisteredValidator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.RegisteredValidator.displayName = 'proto.rpcquery.RegisteredValidator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ValidatorSetHistory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.ValidatorSetHistory.repeatedFields_, null); +}; +goog.inherits(proto.rpcquery.ValidatorSetHistory, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.ValidatorSetHistory.displayName = 'proto.rpcquery.ValidatorSetHistory'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ValidatorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.ValidatorSet.repeatedFields_, null); +}; +goog.inherits(proto.rpcquery.ValidatorSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.ValidatorSet.displayName = 'proto.rpcquery.ValidatorSet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetProposalParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetProposalParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetProposalParam.displayName = 'proto.rpcquery.GetProposalParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ListProposalsParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.ListProposalsParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.ListProposalsParam.displayName = 'proto.rpcquery.ListProposalsParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.ProposalResult = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.rpcquery.StatusParam, jspb.Message); +goog.inherits(proto.rpcquery.ProposalResult, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.rpcquery.StatusParam.displayName = 'proto.rpcquery.StatusParam'; + /** + * @public + * @override + */ + proto.rpcquery.ProposalResult.displayName = 'proto.rpcquery.ProposalResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetStatsParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetStatsParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetStatsParam.displayName = 'proto.rpcquery.GetStatsParam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.Stats = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.Stats, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.Stats.displayName = 'proto.rpcquery.Stats'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpcquery.GetBlockParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpcquery.GetBlockParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpcquery.GetBlockParam.displayName = 'proto.rpcquery.GetBlockParam'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.StatusParam.prototype.toObject = function(opt_includeInstance) { @@ -87,8 +537,8 @@ proto.rpcquery.StatusParam.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.StatusParam} msg The msg instance to transform. * @return {!Object} @@ -197,9 +647,12 @@ proto.rpcquery.StatusParam.prototype.getBlocktimewithin = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.StatusParam} returns this + */ proto.rpcquery.StatusParam.prototype.setBlocktimewithin = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -212,41 +665,29 @@ proto.rpcquery.StatusParam.prototype.getBlockseentimewithin = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.StatusParam} returns this + */ proto.rpcquery.StatusParam.prototype.setBlockseentimewithin = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetAccountParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetAccountParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.GetAccountParam.displayName = 'proto.rpcquery.GetAccountParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetAccountParam.prototype.toObject = function(opt_includeInstance) { @@ -256,8 +697,8 @@ proto.rpcquery.GetAccountParam.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetAccountParam} msg The msg instance to transform. * @return {!Object} @@ -378,41 +819,29 @@ proto.rpcquery.GetAccountParam.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetAccountParam} returns this + */ proto.rpcquery.GetAccountParam.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetMetadataParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetMetadataParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.GetMetadataParam.displayName = 'proto.rpcquery.GetMetadataParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetMetadataParam.prototype.toObject = function(opt_includeInstance) { @@ -422,8 +851,8 @@ proto.rpcquery.GetMetadataParam.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetMetadataParam} msg The msg instance to transform. * @return {!Object} @@ -556,9 +985,12 @@ proto.rpcquery.GetMetadataParam.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetMetadataParam} returns this + */ proto.rpcquery.GetMetadataParam.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -595,41 +1027,29 @@ proto.rpcquery.GetMetadataParam.prototype.getMetadatahash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetMetadataParam} returns this + */ proto.rpcquery.GetMetadataParam.prototype.setMetadatahash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.MetadataResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.MetadataResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.MetadataResult.displayName = 'proto.rpcquery.MetadataResult'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.MetadataResult.prototype.toObject = function(opt_includeInstance) { @@ -639,8 +1059,8 @@ proto.rpcquery.MetadataResult.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.MetadataResult} msg The msg instance to transform. * @return {!Object} @@ -737,41 +1157,29 @@ proto.rpcquery.MetadataResult.prototype.getMetadata = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.MetadataResult} returns this + */ proto.rpcquery.MetadataResult.prototype.setMetadata = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetStorageParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetStorageParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.GetStorageParam.displayName = 'proto.rpcquery.GetStorageParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetStorageParam.prototype.toObject = function(opt_includeInstance) { @@ -781,8 +1189,8 @@ proto.rpcquery.GetStorageParam.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetStorageParam} msg The msg instance to transform. * @return {!Object} @@ -915,9 +1323,12 @@ proto.rpcquery.GetStorageParam.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetStorageParam} returns this + */ proto.rpcquery.GetStorageParam.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -954,41 +1365,29 @@ proto.rpcquery.GetStorageParam.prototype.getKey_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetStorageParam} returns this + */ proto.rpcquery.GetStorageParam.prototype.setKey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.StorageValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.StorageValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.StorageValue.displayName = 'proto.rpcquery.StorageValue'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.StorageValue.prototype.toObject = function(opt_includeInstance) { @@ -998,8 +1397,8 @@ proto.rpcquery.StorageValue.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.StorageValue} msg The msg instance to transform. * @return {!Object} @@ -1120,41 +1519,29 @@ proto.rpcquery.StorageValue.prototype.getValue_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.StorageValue} returns this + */ proto.rpcquery.StorageValue.prototype.setValue = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.ListAccountsParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.ListAccountsParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.ListAccountsParam.displayName = 'proto.rpcquery.ListAccountsParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ListAccountsParam.prototype.toObject = function(opt_includeInstance) { @@ -1164,8 +1551,8 @@ proto.rpcquery.ListAccountsParam.prototype.toObject = function(opt_includeInstan /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ListAccountsParam} msg The msg instance to transform. * @return {!Object} @@ -1262,41 +1649,29 @@ proto.rpcquery.ListAccountsParam.prototype.getQuery = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.ListAccountsParam} returns this + */ proto.rpcquery.ListAccountsParam.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetNameParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetNameParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.GetNameParam.displayName = 'proto.rpcquery.GetNameParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetNameParam.prototype.toObject = function(opt_includeInstance) { @@ -1306,8 +1681,8 @@ proto.rpcquery.GetNameParam.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetNameParam} msg The msg instance to transform. * @return {!Object} @@ -1404,41 +1779,29 @@ proto.rpcquery.GetNameParam.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.rpcquery.GetNameParam} returns this + */ proto.rpcquery.GetNameParam.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.ListNamesParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.ListNamesParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.ListNamesParam.displayName = 'proto.rpcquery.ListNamesParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ListNamesParam.prototype.toObject = function(opt_includeInstance) { @@ -1448,8 +1811,8 @@ proto.rpcquery.ListNamesParam.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ListNamesParam} msg The msg instance to transform. * @return {!Object} @@ -1546,41 +1909,29 @@ proto.rpcquery.ListNamesParam.prototype.getQuery = function() { }; -/** @param {string} value */ -proto.rpcquery.ListNamesParam.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetNetworkRegistryParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetNetworkRegistryParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.GetNetworkRegistryParam.displayName = 'proto.rpcquery.GetNetworkRegistryParam'; -} + * @param {string} value + * @return {!proto.rpcquery.ListNamesParam} returns this + */ +proto.rpcquery.ListNamesParam.prototype.setQuery = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetNetworkRegistryParam.prototype.toObject = function(opt_includeInstance) { @@ -1590,8 +1941,8 @@ proto.rpcquery.GetNetworkRegistryParam.prototype.toObject = function(opt_include /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetNetworkRegistryParam} msg The msg instance to transform. * @return {!Object} @@ -1669,34 +2020,19 @@ proto.rpcquery.GetNetworkRegistryParam.serializeBinaryToWriter = function(messag -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetValidatorSetParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetValidatorSetParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.GetValidatorSetParam.displayName = 'proto.rpcquery.GetValidatorSetParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetValidatorSetParam.prototype.toObject = function(opt_includeInstance) { @@ -1706,8 +2042,8 @@ proto.rpcquery.GetValidatorSetParam.prototype.toObject = function(opt_includeIns /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetValidatorSetParam} msg The msg instance to transform. * @return {!Object} @@ -1785,34 +2121,19 @@ proto.rpcquery.GetValidatorSetParam.serializeBinaryToWriter = function(message, -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetValidatorSetHistoryParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetValidatorSetHistoryParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.GetValidatorSetHistoryParam.displayName = 'proto.rpcquery.GetValidatorSetHistoryParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetValidatorSetHistoryParam.prototype.toObject = function(opt_includeInstance) { @@ -1822,8 +2143,8 @@ proto.rpcquery.GetValidatorSetHistoryParam.prototype.toObject = function(opt_inc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetValidatorSetHistoryParam} msg The msg instance to transform. * @return {!Object} @@ -1920,30 +2241,16 @@ proto.rpcquery.GetValidatorSetHistoryParam.prototype.getIncludeprevious = functi }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.GetValidatorSetHistoryParam} returns this + */ proto.rpcquery.GetValidatorSetHistoryParam.prototype.setIncludeprevious = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.NetworkRegistry = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.NetworkRegistry.repeatedFields_, null); -}; -goog.inherits(proto.rpcquery.NetworkRegistry, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.NetworkRegistry.displayName = 'proto.rpcquery.NetworkRegistry'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -1955,13 +2262,15 @@ proto.rpcquery.NetworkRegistry.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.NetworkRegistry.prototype.toObject = function(opt_includeInstance) { @@ -1971,8 +2280,8 @@ proto.rpcquery.NetworkRegistry.prototype.toObject = function(opt_includeInstance /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.NetworkRegistry} msg The msg instance to transform. * @return {!Object} @@ -2073,9 +2382,12 @@ proto.rpcquery.NetworkRegistry.prototype.getSetList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcquery.NetworkRegistry} returns this +*/ proto.rpcquery.NetworkRegistry.prototype.setSetList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -2089,40 +2401,29 @@ proto.rpcquery.NetworkRegistry.prototype.addSet = function(opt_value, opt_index) }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.rpcquery.NetworkRegistry} returns this + */ proto.rpcquery.NetworkRegistry.prototype.clearSetList = function() { - this.setSetList([]); + return this.setSetList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.RegisteredValidator = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.RegisteredValidator, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.RegisteredValidator.displayName = 'proto.rpcquery.RegisteredValidator'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.RegisteredValidator.prototype.toObject = function(opt_includeInstance) { @@ -2132,8 +2433,8 @@ proto.rpcquery.RegisteredValidator.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.RegisteredValidator} msg The msg instance to transform. * @return {!Object} @@ -2268,9 +2569,12 @@ proto.rpcquery.RegisteredValidator.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.RegisteredValidator} returns this + */ proto.rpcquery.RegisteredValidator.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -2284,14 +2588,21 @@ proto.rpcquery.RegisteredValidator.prototype.getNode = function() { }; -/** @param {?proto.registry.NodeIdentity|undefined} value */ +/** + * @param {?proto.registry.NodeIdentity|undefined} value + * @return {!proto.rpcquery.RegisteredValidator} returns this +*/ proto.rpcquery.RegisteredValidator.prototype.setNode = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.rpcquery.RegisteredValidator} returns this + */ proto.rpcquery.RegisteredValidator.prototype.clearNode = function() { - this.setNode(undefined); + return this.setNode(undefined); }; @@ -2305,23 +2616,6 @@ proto.rpcquery.RegisteredValidator.prototype.hasNode = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.ValidatorSetHistory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.ValidatorSetHistory.repeatedFields_, null); -}; -goog.inherits(proto.rpcquery.ValidatorSetHistory, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.ValidatorSetHistory.displayName = 'proto.rpcquery.ValidatorSetHistory'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -2333,13 +2627,15 @@ proto.rpcquery.ValidatorSetHistory.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ValidatorSetHistory.prototype.toObject = function(opt_includeInstance) { @@ -2349,8 +2645,8 @@ proto.rpcquery.ValidatorSetHistory.prototype.toObject = function(opt_includeInst /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ValidatorSetHistory} msg The msg instance to transform. * @return {!Object} @@ -2451,9 +2747,12 @@ proto.rpcquery.ValidatorSetHistory.prototype.getHistoryList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcquery.ValidatorSetHistory} returns this +*/ proto.rpcquery.ValidatorSetHistory.prototype.setHistoryList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -2467,29 +2766,16 @@ proto.rpcquery.ValidatorSetHistory.prototype.addHistory = function(opt_value, op }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.rpcquery.ValidatorSetHistory} returns this + */ proto.rpcquery.ValidatorSetHistory.prototype.clearHistoryList = function() { - this.setHistoryList([]); + return this.setHistoryList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.ValidatorSet = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcquery.ValidatorSet.repeatedFields_, null); -}; -goog.inherits(proto.rpcquery.ValidatorSet, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.ValidatorSet.displayName = 'proto.rpcquery.ValidatorSet'; -} /** * List of repeated fields within this message type. * @private {!Array} @@ -2501,13 +2787,15 @@ proto.rpcquery.ValidatorSet.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ValidatorSet.prototype.toObject = function(opt_includeInstance) { @@ -2517,8 +2805,8 @@ proto.rpcquery.ValidatorSet.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ValidatorSet} msg The msg instance to transform. * @return {!Object} @@ -2630,9 +2918,12 @@ proto.rpcquery.ValidatorSet.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.ValidatorSet} returns this + */ proto.rpcquery.ValidatorSet.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2646,9 +2937,12 @@ proto.rpcquery.ValidatorSet.prototype.getSetList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.rpcquery.ValidatorSet} returns this +*/ proto.rpcquery.ValidatorSet.prototype.setSetList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; @@ -2662,40 +2956,29 @@ proto.rpcquery.ValidatorSet.prototype.addSet = function(opt_value, opt_index) { }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.rpcquery.ValidatorSet} returns this + */ proto.rpcquery.ValidatorSet.prototype.clearSetList = function() { - this.setSetList([]); + return this.setSetList([]); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetProposalParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetProposalParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.GetProposalParam.displayName = 'proto.rpcquery.GetProposalParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetProposalParam.prototype.toObject = function(opt_includeInstance) { @@ -2705,8 +2988,8 @@ proto.rpcquery.GetProposalParam.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetProposalParam} msg The msg instance to transform. * @return {!Object} @@ -2827,41 +3110,29 @@ proto.rpcquery.GetProposalParam.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.GetProposalParam} returns this + */ proto.rpcquery.GetProposalParam.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.ListProposalsParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.ListProposalsParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.ListProposalsParam.displayName = 'proto.rpcquery.ListProposalsParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInstance) { @@ -2871,8 +3142,8 @@ proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ListProposalsParam} msg The msg instance to transform. * @return {!Object} @@ -2880,7 +3151,7 @@ proto.rpcquery.ListProposalsParam.prototype.toObject = function(opt_includeInsta */ proto.rpcquery.ListProposalsParam.toObject = function(includeInstance, msg) { var f, obj = { - proposed: jspb.Message.getFieldWithDefault(msg, 1, false) + proposed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -2962,50 +3233,36 @@ proto.rpcquery.ListProposalsParam.serializeBinaryToWriter = function(message, wr /** * optional bool Proposed = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.rpcquery.ListProposalsParam.prototype.getProposed = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.rpcquery.ListProposalsParam} returns this + */ proto.rpcquery.ListProposalsParam.prototype.setProposed = function(value) { - jspb.Message.setProto3BooleanField(this, 1, value); + return jspb.Message.setProto3BooleanField(this, 1, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.ProposalResult = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.ProposalResult, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.ProposalResult.displayName = 'proto.rpcquery.ProposalResult'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.ProposalResult.prototype.toObject = function(opt_includeInstance) { @@ -3015,8 +3272,8 @@ proto.rpcquery.ProposalResult.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.ProposalResult} msg The msg instance to transform. * @return {!Object} @@ -3151,9 +3408,12 @@ proto.rpcquery.ProposalResult.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpcquery.ProposalResult} returns this + */ proto.rpcquery.ProposalResult.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -3167,14 +3427,21 @@ proto.rpcquery.ProposalResult.prototype.getBallot = function() { }; -/** @param {?proto.payload.Ballot|undefined} value */ +/** + * @param {?proto.payload.Ballot|undefined} value + * @return {!proto.rpcquery.ProposalResult} returns this +*/ proto.rpcquery.ProposalResult.prototype.setBallot = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.rpcquery.ProposalResult} returns this + */ proto.rpcquery.ProposalResult.prototype.clearBallot = function() { - this.setBallot(undefined); + return this.setBallot(undefined); }; @@ -3188,34 +3455,19 @@ proto.rpcquery.ProposalResult.prototype.hasBallot = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetStatsParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetStatsParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.GetStatsParam.displayName = 'proto.rpcquery.GetStatsParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetStatsParam.prototype.toObject = function(opt_includeInstance) { @@ -3225,8 +3477,8 @@ proto.rpcquery.GetStatsParam.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetStatsParam} msg The msg instance to transform. * @return {!Object} @@ -3304,34 +3556,19 @@ proto.rpcquery.GetStatsParam.serializeBinaryToWriter = function(message, writer) -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.Stats = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.Stats, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.Stats.displayName = 'proto.rpcquery.Stats'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.Stats.prototype.toObject = function(opt_includeInstance) { @@ -3341,8 +3578,8 @@ proto.rpcquery.Stats.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.Stats} msg The msg instance to transform. * @return {!Object} @@ -3451,9 +3688,12 @@ proto.rpcquery.Stats.prototype.getAccountswithcode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.Stats} returns this + */ proto.rpcquery.Stats.prototype.setAccountswithcode = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -3466,41 +3706,29 @@ proto.rpcquery.Stats.prototype.getAccountswithoutcode = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.Stats} returns this + */ proto.rpcquery.Stats.prototype.setAccountswithoutcode = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpcquery.GetBlockParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpcquery.GetBlockParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpcquery.GetBlockParam.displayName = 'proto.rpcquery.GetBlockParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpcquery.GetBlockParam.prototype.toObject = function(opt_includeInstance) { @@ -3510,8 +3738,8 @@ proto.rpcquery.GetBlockParam.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpcquery.GetBlockParam} msg The msg instance to transform. * @return {!Object} @@ -3608,9 +3836,12 @@ proto.rpcquery.GetBlockParam.prototype.getHeight = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.rpcquery.GetBlockParam} returns this + */ proto.rpcquery.GetBlockParam.prototype.setHeight = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; diff --git a/js/proto/rpctransact_grpc_pb.d.ts b/js/proto/rpctransact_grpc_pb.d.ts index 999967dbe..eccd3ef64 100644 --- a/js/proto/rpctransact_grpc_pb.d.ts +++ b/js/proto/rpctransact_grpc_pb.d.ts @@ -7,7 +7,7 @@ import * as grpc from "@grpc/grpc-js"; import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; import * as rpctransact_pb from "./rpctransact_pb"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; import * as exec_pb from "./exec_pb"; import * as payload_pb from "./payload_pb"; @@ -29,108 +29,108 @@ interface ITransactService extends grpc.ServiceDefinition { - path: string; // "/rpctransact.Transact/BroadcastTxSync" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpctransact.Transact/BroadcastTxSync"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface ITransactService_IBroadcastTxAsync extends grpc.MethodDefinition { - path: string; // "/rpctransact.Transact/BroadcastTxAsync" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpctransact.Transact/BroadcastTxAsync"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface ITransactService_ISignTx extends grpc.MethodDefinition { - path: string; // "/rpctransact.Transact/SignTx" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpctransact.Transact/SignTx"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface ITransactService_IFormulateTx extends grpc.MethodDefinition { - path: string; // "/rpctransact.Transact/FormulateTx" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpctransact.Transact/FormulateTx"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface ITransactService_ICallTxSync extends grpc.MethodDefinition { - path: string; // "/rpctransact.Transact/CallTxSync" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpctransact.Transact/CallTxSync"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface ITransactService_ICallTxAsync extends grpc.MethodDefinition { - path: string; // "/rpctransact.Transact/CallTxAsync" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpctransact.Transact/CallTxAsync"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface ITransactService_ICallTxSim extends grpc.MethodDefinition { - path: string; // "/rpctransact.Transact/CallTxSim" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpctransact.Transact/CallTxSim"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface ITransactService_ICallCodeSim extends grpc.MethodDefinition { - path: string; // "/rpctransact.Transact/CallCodeSim" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpctransact.Transact/CallCodeSim"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface ITransactService_ISendTxSync extends grpc.MethodDefinition { - path: string; // "/rpctransact.Transact/SendTxSync" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpctransact.Transact/SendTxSync"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface ITransactService_ISendTxAsync extends grpc.MethodDefinition { - path: string; // "/rpctransact.Transact/SendTxAsync" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpctransact.Transact/SendTxAsync"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface ITransactService_INameTxSync extends grpc.MethodDefinition { - path: string; // "/rpctransact.Transact/NameTxSync" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpctransact.Transact/NameTxSync"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } interface ITransactService_INameTxAsync extends grpc.MethodDefinition { - path: string; // "/rpctransact.Transact/NameTxAsync" - requestStream: boolean; // false - responseStream: boolean; // false + path: "/rpctransact.Transact/NameTxAsync"; + requestStream: false; + responseStream: false; requestSerialize: grpc.serialize; requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; @@ -139,7 +139,7 @@ interface ITransactService_INameTxAsync extends grpc.MethodDefinition; broadcastTxAsync: grpc.handleUnaryCall; signTx: grpc.handleUnaryCall; @@ -194,7 +194,7 @@ export interface ITransactClient { } export class TransactClient extends grpc.Client implements ITransactClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); public broadcastTxSync(request: rpctransact_pb.TxEnvelopeParam, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; public broadcastTxSync(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; public broadcastTxSync(request: rpctransact_pb.TxEnvelopeParam, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: exec_pb.TxExecution) => void): grpc.ClientUnaryCall; diff --git a/js/proto/rpctransact_grpc_pb.js b/js/proto/rpctransact_grpc_pb.js index 2f4e06aa6..906833532 100644 --- a/js/proto/rpctransact_grpc_pb.js +++ b/js/proto/rpctransact_grpc_pb.js @@ -2,7 +2,7 @@ 'use strict'; var rpctransact_pb = require('./rpctransact_pb.js'); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); var exec_pb = require('./exec_pb.js'); var payload_pb = require('./payload_pb.js'); diff --git a/js/proto/rpctransact_pb.d.ts b/js/proto/rpctransact_pb.d.ts index 85f60e074..800a5be2a 100644 --- a/js/proto/rpctransact_pb.d.ts +++ b/js/proto/rpctransact_pb.d.ts @@ -5,7 +5,7 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; import * as exec_pb from "./exec_pb"; import * as payload_pb from "./payload_pb"; @@ -15,17 +15,17 @@ export class CallCodeParam extends jspb.Message { getFromaddress(): Uint8Array | string; getFromaddress_asU8(): Uint8Array; getFromaddress_asB64(): string; - setFromaddress(value: Uint8Array | string): void; + setFromaddress(value: Uint8Array | string): CallCodeParam; getCode(): Uint8Array | string; getCode_asU8(): Uint8Array; getCode_asB64(): string; - setCode(value: Uint8Array | string): void; + setCode(value: Uint8Array | string): CallCodeParam; getData(): Uint8Array | string; getData_asU8(): Uint8Array; getData_asB64(): string; - setData(value: Uint8Array | string): void; + setData(value: Uint8Array | string): CallCodeParam; serializeBinary(): Uint8Array; @@ -51,7 +51,7 @@ export class TxEnvelope extends jspb.Message { hasEnvelope(): boolean; clearEnvelope(): void; getEnvelope(): txs_pb.Envelope | undefined; - setEnvelope(value?: txs_pb.Envelope): void; + setEnvelope(value?: txs_pb.Envelope): TxEnvelope; serializeBinary(): Uint8Array; @@ -75,19 +75,19 @@ export class TxEnvelopeParam extends jspb.Message { hasEnvelope(): boolean; clearEnvelope(): void; getEnvelope(): txs_pb.Envelope | undefined; - setEnvelope(value?: txs_pb.Envelope): void; + setEnvelope(value?: txs_pb.Envelope): TxEnvelopeParam; hasPayload(): boolean; clearPayload(): void; getPayload(): payload_pb.Any | undefined; - setPayload(value?: payload_pb.Any): void; + setPayload(value?: payload_pb.Any): TxEnvelopeParam; hasTimeout(): boolean; clearTimeout(): void; getTimeout(): google_protobuf_duration_pb.Duration | undefined; - setTimeout(value?: google_protobuf_duration_pb.Duration): void; + setTimeout(value?: google_protobuf_duration_pb.Duration): TxEnvelopeParam; serializeBinary(): Uint8Array; diff --git a/js/proto/rpctransact_pb.js b/js/proto/rpctransact_pb.js index 567c43531..203888c09 100644 --- a/js/proto/rpctransact_pb.js +++ b/js/proto/rpctransact_pb.js @@ -1,3 +1,4 @@ +// source: rpctransact.proto /** * @fileoverview * @enhanceable @@ -6,13 +7,15 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); goog.object.extend(proto, google_protobuf_duration_pb); var exec_pb = require('./exec_pb.js'); @@ -24,7 +27,6 @@ goog.object.extend(proto, txs_pb); goog.exportSymbol('proto.rpctransact.CallCodeParam', null, global); goog.exportSymbol('proto.rpctransact.TxEnvelope', null, global); goog.exportSymbol('proto.rpctransact.TxEnvelopeParam', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -40,19 +42,68 @@ proto.rpctransact.CallCodeParam = function(opt_data) { }; goog.inherits(proto.rpctransact.CallCodeParam, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.rpctransact.CallCodeParam.displayName = 'proto.rpctransact.CallCodeParam'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpctransact.TxEnvelope = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpctransact.TxEnvelope, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpctransact.TxEnvelope.displayName = 'proto.rpctransact.TxEnvelope'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.rpctransact.TxEnvelopeParam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.rpctransact.TxEnvelopeParam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.rpctransact.TxEnvelopeParam.displayName = 'proto.rpctransact.TxEnvelopeParam'; +} + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpctransact.CallCodeParam.prototype.toObject = function(opt_includeInstance) { @@ -62,8 +113,8 @@ proto.rpctransact.CallCodeParam.prototype.toObject = function(opt_includeInstanc /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpctransact.CallCodeParam} msg The msg instance to transform. * @return {!Object} @@ -208,9 +259,12 @@ proto.rpctransact.CallCodeParam.prototype.getFromaddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpctransact.CallCodeParam} returns this + */ proto.rpctransact.CallCodeParam.prototype.setFromaddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -247,9 +301,12 @@ proto.rpctransact.CallCodeParam.prototype.getCode_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpctransact.CallCodeParam} returns this + */ proto.rpctransact.CallCodeParam.prototype.setCode = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -286,41 +343,29 @@ proto.rpctransact.CallCodeParam.prototype.getData_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.rpctransact.CallCodeParam} returns this + */ proto.rpctransact.CallCodeParam.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); + return jspb.Message.setProto3BytesField(this, 3, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpctransact.TxEnvelope = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpctransact.TxEnvelope, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpctransact.TxEnvelope.displayName = 'proto.rpctransact.TxEnvelope'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpctransact.TxEnvelope.prototype.toObject = function(opt_includeInstance) { @@ -330,8 +375,8 @@ proto.rpctransact.TxEnvelope.prototype.toObject = function(opt_includeInstance) /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpctransact.TxEnvelope} msg The msg instance to transform. * @return {!Object} @@ -431,14 +476,21 @@ proto.rpctransact.TxEnvelope.prototype.getEnvelope = function() { }; -/** @param {?proto.txs.Envelope|undefined} value */ +/** + * @param {?proto.txs.Envelope|undefined} value + * @return {!proto.rpctransact.TxEnvelope} returns this +*/ proto.rpctransact.TxEnvelope.prototype.setEnvelope = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.rpctransact.TxEnvelope} returns this + */ proto.rpctransact.TxEnvelope.prototype.clearEnvelope = function() { - this.setEnvelope(undefined); + return this.setEnvelope(undefined); }; @@ -452,34 +504,19 @@ proto.rpctransact.TxEnvelope.prototype.hasEnvelope = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.rpctransact.TxEnvelopeParam = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.rpctransact.TxEnvelopeParam, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.rpctransact.TxEnvelopeParam.displayName = 'proto.rpctransact.TxEnvelopeParam'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.rpctransact.TxEnvelopeParam.prototype.toObject = function(opt_includeInstance) { @@ -489,8 +526,8 @@ proto.rpctransact.TxEnvelopeParam.prototype.toObject = function(opt_includeInsta /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.rpctransact.TxEnvelopeParam} msg The msg instance to transform. * @return {!Object} @@ -618,14 +655,21 @@ proto.rpctransact.TxEnvelopeParam.prototype.getEnvelope = function() { }; -/** @param {?proto.txs.Envelope|undefined} value */ +/** + * @param {?proto.txs.Envelope|undefined} value + * @return {!proto.rpctransact.TxEnvelopeParam} returns this +*/ proto.rpctransact.TxEnvelopeParam.prototype.setEnvelope = function(value) { - jspb.Message.setWrapperField(this, 1, value); + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.rpctransact.TxEnvelopeParam} returns this + */ proto.rpctransact.TxEnvelopeParam.prototype.clearEnvelope = function() { - this.setEnvelope(undefined); + return this.setEnvelope(undefined); }; @@ -648,14 +692,21 @@ proto.rpctransact.TxEnvelopeParam.prototype.getPayload = function() { }; -/** @param {?proto.payload.Any|undefined} value */ +/** + * @param {?proto.payload.Any|undefined} value + * @return {!proto.rpctransact.TxEnvelopeParam} returns this +*/ proto.rpctransact.TxEnvelopeParam.prototype.setPayload = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.rpctransact.TxEnvelopeParam} returns this + */ proto.rpctransact.TxEnvelopeParam.prototype.clearPayload = function() { - this.setPayload(undefined); + return this.setPayload(undefined); }; @@ -678,14 +729,21 @@ proto.rpctransact.TxEnvelopeParam.prototype.getTimeout = function() { }; -/** @param {?proto.google.protobuf.Duration|undefined} value */ +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.rpctransact.TxEnvelopeParam} returns this +*/ proto.rpctransact.TxEnvelopeParam.prototype.setTimeout = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.rpctransact.TxEnvelopeParam} returns this + */ proto.rpctransact.TxEnvelopeParam.prototype.clearTimeout = function() { - this.setTimeout(undefined); + return this.setTimeout(undefined); }; diff --git a/js/proto/spec_pb.d.ts b/js/proto/spec_pb.d.ts index 9e6b4ab4a..037da85cf 100644 --- a/js/proto/spec_pb.d.ts +++ b/js/proto/spec_pb.d.ts @@ -5,44 +5,44 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as crypto_pb from "./crypto_pb"; import * as balance_pb from "./balance_pb"; export class TemplateAccount extends jspb.Message { getName(): string; - setName(value: string): void; + setName(value: string): TemplateAccount; getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): TemplateAccount; hasPublickey(): boolean; clearPublickey(): void; getPublickey(): crypto_pb.PublicKey | undefined; - setPublickey(value?: crypto_pb.PublicKey): void; + setPublickey(value?: crypto_pb.PublicKey): TemplateAccount; clearAmountsList(): void; getAmountsList(): Array; - setAmountsList(value: Array): void; + setAmountsList(value: Array): TemplateAccount; addAmounts(value?: balance_pb.Balance, index?: number): balance_pb.Balance; clearPermissionsList(): void; getPermissionsList(): Array; - setPermissionsList(value: Array): void; + setPermissionsList(value: Array): TemplateAccount; addPermissions(value: string, index?: number): string; clearRolesList(): void; getRolesList(): Array; - setRolesList(value: Array): void; + setRolesList(value: Array): TemplateAccount; addRoles(value: string, index?: number): string; getCode(): Uint8Array | string; getCode_asU8(): Uint8Array; getCode_asB64(): string; - setCode(value: Uint8Array | string): void; + setCode(value: Uint8Array | string): TemplateAccount; serializeBinary(): Uint8Array; diff --git a/js/proto/spec_pb.js b/js/proto/spec_pb.js index c32a9fbaa..4ea1ad43b 100644 --- a/js/proto/spec_pb.js +++ b/js/proto/spec_pb.js @@ -1,3 +1,4 @@ +// source: spec.proto /** * @fileoverview * @enhanceable @@ -6,19 +7,20 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); var crypto_pb = require('./crypto_pb.js'); goog.object.extend(proto, crypto_pb); var balance_pb = require('./balance_pb.js'); goog.object.extend(proto, balance_pb); goog.exportSymbol('proto.spec.TemplateAccount', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -34,8 +36,13 @@ proto.spec.TemplateAccount = function(opt_data) { }; goog.inherits(proto.spec.TemplateAccount, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.spec.TemplateAccount.displayName = 'proto.spec.TemplateAccount'; } + /** * List of repeated fields within this message type. * @private {!Array} @@ -47,13 +54,15 @@ proto.spec.TemplateAccount.repeatedFields_ = [4,5,6]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.spec.TemplateAccount.prototype.toObject = function(opt_includeInstance) { @@ -63,8 +72,8 @@ proto.spec.TemplateAccount.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.spec.TemplateAccount} msg The msg instance to transform. * @return {!Object} @@ -77,8 +86,8 @@ proto.spec.TemplateAccount.toObject = function(includeInstance, msg) { publickey: (f = msg.getPublickey()) && crypto_pb.PublicKey.toObject(includeInstance, f), amountsList: jspb.Message.toObjectList(msg.getAmountsList(), balance_pb.Balance.toObject, includeInstance), - permissionsList: jspb.Message.getRepeatedField(msg, 5), - rolesList: jspb.Message.getRepeatedField(msg, 6), + permissionsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + rolesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, code: msg.getCode_asB64() }; @@ -238,9 +247,12 @@ proto.spec.TemplateAccount.prototype.getName = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -277,9 +289,12 @@ proto.spec.TemplateAccount.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -293,14 +308,21 @@ proto.spec.TemplateAccount.prototype.getPublickey = function() { }; -/** @param {?proto.crypto.PublicKey|undefined} value */ +/** + * @param {?proto.crypto.PublicKey|undefined} value + * @return {!proto.spec.TemplateAccount} returns this +*/ proto.spec.TemplateAccount.prototype.setPublickey = function(value) { - jspb.Message.setWrapperField(this, 3, value); + return jspb.Message.setWrapperField(this, 3, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.clearPublickey = function() { - this.setPublickey(undefined); + return this.setPublickey(undefined); }; @@ -323,9 +345,12 @@ proto.spec.TemplateAccount.prototype.getAmountsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.spec.TemplateAccount} returns this +*/ proto.spec.TemplateAccount.prototype.setAmountsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; @@ -339,8 +364,12 @@ proto.spec.TemplateAccount.prototype.addAmounts = function(opt_value, opt_index) }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.clearAmountsList = function() { - this.setAmountsList([]); + return this.setAmountsList([]); }; @@ -353,23 +382,31 @@ proto.spec.TemplateAccount.prototype.getPermissionsList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setPermissionsList = function(value) { - jspb.Message.setField(this, 5, value || []); + return jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.addPermissions = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 5, value, opt_index); + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.clearPermissionsList = function() { - this.setPermissionsList([]); + return this.setPermissionsList([]); }; @@ -382,23 +419,31 @@ proto.spec.TemplateAccount.prototype.getRolesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setRolesList = function(value) { - jspb.Message.setField(this, 6, value || []); + return jspb.Message.setField(this, 6, value || []); }; /** * @param {string} value * @param {number=} opt_index + * @return {!proto.spec.TemplateAccount} returns this */ proto.spec.TemplateAccount.prototype.addRoles = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 6, value, opt_index); + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.clearRolesList = function() { - this.setRolesList([]); + return this.setRolesList([]); }; @@ -435,9 +480,12 @@ proto.spec.TemplateAccount.prototype.getCode_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.spec.TemplateAccount} returns this + */ proto.spec.TemplateAccount.prototype.setCode = function(value) { - jspb.Message.setProto3BytesField(this, 7, value); + return jspb.Message.setProto3BytesField(this, 7, value); }; diff --git a/js/proto/storage_pb.d.ts b/js/proto/storage_pb.d.ts index 68979975d..a924f26b3 100644 --- a/js/proto/storage_pb.d.ts +++ b/js/proto/storage_pb.d.ts @@ -5,16 +5,16 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; export class CommitID extends jspb.Message { getVersion(): number; - setVersion(value: number): void; + setVersion(value: number): CommitID; getHash(): Uint8Array | string; getHash_asU8(): Uint8Array; getHash_asB64(): string; - setHash(value: Uint8Array | string): void; + setHash(value: Uint8Array | string): CommitID; serializeBinary(): Uint8Array; diff --git a/js/proto/storage_pb.js b/js/proto/storage_pb.js index c2b867e6b..1995cceca 100644 --- a/js/proto/storage_pb.js +++ b/js/proto/storage_pb.js @@ -1,3 +1,4 @@ +// source: storage.proto /** * @fileoverview * @enhanceable @@ -6,15 +7,16 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.storage.CommitID', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,19 +32,26 @@ proto.storage.CommitID = function(opt_data) { }; goog.inherits(proto.storage.CommitID, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.storage.CommitID.displayName = 'proto.storage.CommitID'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.storage.CommitID.prototype.toObject = function(opt_includeInstance) { @@ -52,8 +61,8 @@ proto.storage.CommitID.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.storage.CommitID} msg The msg instance to transform. * @return {!Object} @@ -162,9 +171,12 @@ proto.storage.CommitID.prototype.getVersion = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.storage.CommitID} returns this + */ proto.storage.CommitID.prototype.setVersion = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -201,9 +213,12 @@ proto.storage.CommitID.prototype.getHash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.storage.CommitID} returns this + */ proto.storage.CommitID.prototype.setHash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; diff --git a/js/proto/tendermint/abci/types_grpc_pb.d.ts b/js/proto/tendermint/abci/types_grpc_pb.d.ts new file mode 100644 index 000000000..5859074ef --- /dev/null +++ b/js/proto/tendermint/abci/types_grpc_pb.d.ts @@ -0,0 +1,286 @@ +// package: tendermint.abci +// file: tendermint/abci/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; +import * as tendermint_abci_types_pb from "../../tendermint/abci/types_pb"; +import * as tendermint_crypto_proof_pb from "../../tendermint/crypto/proof_pb"; +import * as tendermint_types_types_pb from "../../tendermint/types/types_pb"; +import * as tendermint_crypto_keys_pb from "../../tendermint/crypto/keys_pb"; +import * as tendermint_types_params_pb from "../../tendermint/types/params_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; + +interface IABCIApplicationService extends grpc.ServiceDefinition { + echo: IABCIApplicationService_IEcho; + flush: IABCIApplicationService_IFlush; + info: IABCIApplicationService_IInfo; + setOption: IABCIApplicationService_ISetOption; + deliverTx: IABCIApplicationService_IDeliverTx; + checkTx: IABCIApplicationService_ICheckTx; + query: IABCIApplicationService_IQuery; + commit: IABCIApplicationService_ICommit; + initChain: IABCIApplicationService_IInitChain; + beginBlock: IABCIApplicationService_IBeginBlock; + endBlock: IABCIApplicationService_IEndBlock; + listSnapshots: IABCIApplicationService_IListSnapshots; + offerSnapshot: IABCIApplicationService_IOfferSnapshot; + loadSnapshotChunk: IABCIApplicationService_ILoadSnapshotChunk; + applySnapshotChunk: IABCIApplicationService_IApplySnapshotChunk; +} + +interface IABCIApplicationService_IEcho extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/Echo"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IFlush extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/Flush"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IInfo extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/Info"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_ISetOption extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/SetOption"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IDeliverTx extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/DeliverTx"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_ICheckTx extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/CheckTx"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IQuery extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/Query"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_ICommit extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/Commit"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IInitChain extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/InitChain"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IBeginBlock extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/BeginBlock"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IEndBlock extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/EndBlock"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IListSnapshots extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/ListSnapshots"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IOfferSnapshot extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/OfferSnapshot"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_ILoadSnapshotChunk extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/LoadSnapshotChunk"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IABCIApplicationService_IApplySnapshotChunk extends grpc.MethodDefinition { + path: "/tendermint.abci.ABCIApplication/ApplySnapshotChunk"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const ABCIApplicationService: IABCIApplicationService; + +export interface IABCIApplicationServer extends grpc.UntypedServiceImplementation { + echo: grpc.handleUnaryCall; + flush: grpc.handleUnaryCall; + info: grpc.handleUnaryCall; + setOption: grpc.handleUnaryCall; + deliverTx: grpc.handleUnaryCall; + checkTx: grpc.handleUnaryCall; + query: grpc.handleUnaryCall; + commit: grpc.handleUnaryCall; + initChain: grpc.handleUnaryCall; + beginBlock: grpc.handleUnaryCall; + endBlock: grpc.handleUnaryCall; + listSnapshots: grpc.handleUnaryCall; + offerSnapshot: grpc.handleUnaryCall; + loadSnapshotChunk: grpc.handleUnaryCall; + applySnapshotChunk: grpc.handleUnaryCall; +} + +export interface IABCIApplicationClient { + echo(request: tendermint_abci_types_pb.RequestEcho, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; + echo(request: tendermint_abci_types_pb.RequestEcho, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; + echo(request: tendermint_abci_types_pb.RequestEcho, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; + flush(request: tendermint_abci_types_pb.RequestFlush, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; + flush(request: tendermint_abci_types_pb.RequestFlush, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; + flush(request: tendermint_abci_types_pb.RequestFlush, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; + info(request: tendermint_abci_types_pb.RequestInfo, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; + info(request: tendermint_abci_types_pb.RequestInfo, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; + info(request: tendermint_abci_types_pb.RequestInfo, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; + setOption(request: tendermint_abci_types_pb.RequestSetOption, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; + setOption(request: tendermint_abci_types_pb.RequestSetOption, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; + setOption(request: tendermint_abci_types_pb.RequestSetOption, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; + deliverTx(request: tendermint_abci_types_pb.RequestDeliverTx, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; + deliverTx(request: tendermint_abci_types_pb.RequestDeliverTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; + deliverTx(request: tendermint_abci_types_pb.RequestDeliverTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; + checkTx(request: tendermint_abci_types_pb.RequestCheckTx, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; + checkTx(request: tendermint_abci_types_pb.RequestCheckTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; + checkTx(request: tendermint_abci_types_pb.RequestCheckTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; + query(request: tendermint_abci_types_pb.RequestQuery, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; + query(request: tendermint_abci_types_pb.RequestQuery, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; + query(request: tendermint_abci_types_pb.RequestQuery, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; + commit(request: tendermint_abci_types_pb.RequestCommit, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; + commit(request: tendermint_abci_types_pb.RequestCommit, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; + commit(request: tendermint_abci_types_pb.RequestCommit, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; + initChain(request: tendermint_abci_types_pb.RequestInitChain, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; + initChain(request: tendermint_abci_types_pb.RequestInitChain, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; + initChain(request: tendermint_abci_types_pb.RequestInitChain, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; + beginBlock(request: tendermint_abci_types_pb.RequestBeginBlock, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; + beginBlock(request: tendermint_abci_types_pb.RequestBeginBlock, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; + beginBlock(request: tendermint_abci_types_pb.RequestBeginBlock, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; + endBlock(request: tendermint_abci_types_pb.RequestEndBlock, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; + endBlock(request: tendermint_abci_types_pb.RequestEndBlock, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; + endBlock(request: tendermint_abci_types_pb.RequestEndBlock, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; + listSnapshots(request: tendermint_abci_types_pb.RequestListSnapshots, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseListSnapshots) => void): grpc.ClientUnaryCall; + listSnapshots(request: tendermint_abci_types_pb.RequestListSnapshots, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseListSnapshots) => void): grpc.ClientUnaryCall; + listSnapshots(request: tendermint_abci_types_pb.RequestListSnapshots, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseListSnapshots) => void): grpc.ClientUnaryCall; + offerSnapshot(request: tendermint_abci_types_pb.RequestOfferSnapshot, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseOfferSnapshot) => void): grpc.ClientUnaryCall; + offerSnapshot(request: tendermint_abci_types_pb.RequestOfferSnapshot, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseOfferSnapshot) => void): grpc.ClientUnaryCall; + offerSnapshot(request: tendermint_abci_types_pb.RequestOfferSnapshot, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseOfferSnapshot) => void): grpc.ClientUnaryCall; + loadSnapshotChunk(request: tendermint_abci_types_pb.RequestLoadSnapshotChunk, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseLoadSnapshotChunk) => void): grpc.ClientUnaryCall; + loadSnapshotChunk(request: tendermint_abci_types_pb.RequestLoadSnapshotChunk, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseLoadSnapshotChunk) => void): grpc.ClientUnaryCall; + loadSnapshotChunk(request: tendermint_abci_types_pb.RequestLoadSnapshotChunk, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseLoadSnapshotChunk) => void): grpc.ClientUnaryCall; + applySnapshotChunk(request: tendermint_abci_types_pb.RequestApplySnapshotChunk, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseApplySnapshotChunk) => void): grpc.ClientUnaryCall; + applySnapshotChunk(request: tendermint_abci_types_pb.RequestApplySnapshotChunk, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseApplySnapshotChunk) => void): grpc.ClientUnaryCall; + applySnapshotChunk(request: tendermint_abci_types_pb.RequestApplySnapshotChunk, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseApplySnapshotChunk) => void): grpc.ClientUnaryCall; +} + +export class ABCIApplicationClient extends grpc.Client implements IABCIApplicationClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public echo(request: tendermint_abci_types_pb.RequestEcho, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; + public echo(request: tendermint_abci_types_pb.RequestEcho, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; + public echo(request: tendermint_abci_types_pb.RequestEcho, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseEcho) => void): grpc.ClientUnaryCall; + public flush(request: tendermint_abci_types_pb.RequestFlush, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; + public flush(request: tendermint_abci_types_pb.RequestFlush, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; + public flush(request: tendermint_abci_types_pb.RequestFlush, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseFlush) => void): grpc.ClientUnaryCall; + public info(request: tendermint_abci_types_pb.RequestInfo, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; + public info(request: tendermint_abci_types_pb.RequestInfo, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; + public info(request: tendermint_abci_types_pb.RequestInfo, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseInfo) => void): grpc.ClientUnaryCall; + public setOption(request: tendermint_abci_types_pb.RequestSetOption, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; + public setOption(request: tendermint_abci_types_pb.RequestSetOption, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; + public setOption(request: tendermint_abci_types_pb.RequestSetOption, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseSetOption) => void): grpc.ClientUnaryCall; + public deliverTx(request: tendermint_abci_types_pb.RequestDeliverTx, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; + public deliverTx(request: tendermint_abci_types_pb.RequestDeliverTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; + public deliverTx(request: tendermint_abci_types_pb.RequestDeliverTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseDeliverTx) => void): grpc.ClientUnaryCall; + public checkTx(request: tendermint_abci_types_pb.RequestCheckTx, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; + public checkTx(request: tendermint_abci_types_pb.RequestCheckTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; + public checkTx(request: tendermint_abci_types_pb.RequestCheckTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseCheckTx) => void): grpc.ClientUnaryCall; + public query(request: tendermint_abci_types_pb.RequestQuery, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; + public query(request: tendermint_abci_types_pb.RequestQuery, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; + public query(request: tendermint_abci_types_pb.RequestQuery, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseQuery) => void): grpc.ClientUnaryCall; + public commit(request: tendermint_abci_types_pb.RequestCommit, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; + public commit(request: tendermint_abci_types_pb.RequestCommit, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; + public commit(request: tendermint_abci_types_pb.RequestCommit, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseCommit) => void): grpc.ClientUnaryCall; + public initChain(request: tendermint_abci_types_pb.RequestInitChain, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; + public initChain(request: tendermint_abci_types_pb.RequestInitChain, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; + public initChain(request: tendermint_abci_types_pb.RequestInitChain, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseInitChain) => void): grpc.ClientUnaryCall; + public beginBlock(request: tendermint_abci_types_pb.RequestBeginBlock, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; + public beginBlock(request: tendermint_abci_types_pb.RequestBeginBlock, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; + public beginBlock(request: tendermint_abci_types_pb.RequestBeginBlock, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseBeginBlock) => void): grpc.ClientUnaryCall; + public endBlock(request: tendermint_abci_types_pb.RequestEndBlock, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; + public endBlock(request: tendermint_abci_types_pb.RequestEndBlock, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; + public endBlock(request: tendermint_abci_types_pb.RequestEndBlock, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseEndBlock) => void): grpc.ClientUnaryCall; + public listSnapshots(request: tendermint_abci_types_pb.RequestListSnapshots, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseListSnapshots) => void): grpc.ClientUnaryCall; + public listSnapshots(request: tendermint_abci_types_pb.RequestListSnapshots, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseListSnapshots) => void): grpc.ClientUnaryCall; + public listSnapshots(request: tendermint_abci_types_pb.RequestListSnapshots, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseListSnapshots) => void): grpc.ClientUnaryCall; + public offerSnapshot(request: tendermint_abci_types_pb.RequestOfferSnapshot, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseOfferSnapshot) => void): grpc.ClientUnaryCall; + public offerSnapshot(request: tendermint_abci_types_pb.RequestOfferSnapshot, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseOfferSnapshot) => void): grpc.ClientUnaryCall; + public offerSnapshot(request: tendermint_abci_types_pb.RequestOfferSnapshot, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseOfferSnapshot) => void): grpc.ClientUnaryCall; + public loadSnapshotChunk(request: tendermint_abci_types_pb.RequestLoadSnapshotChunk, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseLoadSnapshotChunk) => void): grpc.ClientUnaryCall; + public loadSnapshotChunk(request: tendermint_abci_types_pb.RequestLoadSnapshotChunk, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseLoadSnapshotChunk) => void): grpc.ClientUnaryCall; + public loadSnapshotChunk(request: tendermint_abci_types_pb.RequestLoadSnapshotChunk, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseLoadSnapshotChunk) => void): grpc.ClientUnaryCall; + public applySnapshotChunk(request: tendermint_abci_types_pb.RequestApplySnapshotChunk, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseApplySnapshotChunk) => void): grpc.ClientUnaryCall; + public applySnapshotChunk(request: tendermint_abci_types_pb.RequestApplySnapshotChunk, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseApplySnapshotChunk) => void): grpc.ClientUnaryCall; + public applySnapshotChunk(request: tendermint_abci_types_pb.RequestApplySnapshotChunk, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_abci_types_pb.ResponseApplySnapshotChunk) => void): grpc.ClientUnaryCall; +} diff --git a/js/proto/tendermint/abci/types_grpc_pb.js b/js/proto/tendermint/abci/types_grpc_pb.js new file mode 100644 index 000000000..ce0071733 --- /dev/null +++ b/js/proto/tendermint/abci/types_grpc_pb.js @@ -0,0 +1,513 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var tendermint_abci_types_pb = require('../../tendermint/abci/types_pb.js'); +var tendermint_crypto_proof_pb = require('../../tendermint/crypto/proof_pb.js'); +var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); +var tendermint_crypto_keys_pb = require('../../tendermint/crypto/keys_pb.js'); +var tendermint_types_params_pb = require('../../tendermint/types/params_pb.js'); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); + +function serialize_tendermint_abci_RequestApplySnapshotChunk(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestApplySnapshotChunk)) { + throw new Error('Expected argument of type tendermint.abci.RequestApplySnapshotChunk'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestApplySnapshotChunk(buffer_arg) { + return tendermint_abci_types_pb.RequestApplySnapshotChunk.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestBeginBlock(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestBeginBlock)) { + throw new Error('Expected argument of type tendermint.abci.RequestBeginBlock'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestBeginBlock(buffer_arg) { + return tendermint_abci_types_pb.RequestBeginBlock.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestCheckTx(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestCheckTx)) { + throw new Error('Expected argument of type tendermint.abci.RequestCheckTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestCheckTx(buffer_arg) { + return tendermint_abci_types_pb.RequestCheckTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestCommit(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestCommit)) { + throw new Error('Expected argument of type tendermint.abci.RequestCommit'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestCommit(buffer_arg) { + return tendermint_abci_types_pb.RequestCommit.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestDeliverTx(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestDeliverTx)) { + throw new Error('Expected argument of type tendermint.abci.RequestDeliverTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestDeliverTx(buffer_arg) { + return tendermint_abci_types_pb.RequestDeliverTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestEcho(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestEcho)) { + throw new Error('Expected argument of type tendermint.abci.RequestEcho'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestEcho(buffer_arg) { + return tendermint_abci_types_pb.RequestEcho.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestEndBlock(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestEndBlock)) { + throw new Error('Expected argument of type tendermint.abci.RequestEndBlock'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestEndBlock(buffer_arg) { + return tendermint_abci_types_pb.RequestEndBlock.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestFlush(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestFlush)) { + throw new Error('Expected argument of type tendermint.abci.RequestFlush'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestFlush(buffer_arg) { + return tendermint_abci_types_pb.RequestFlush.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestInfo(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestInfo)) { + throw new Error('Expected argument of type tendermint.abci.RequestInfo'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestInfo(buffer_arg) { + return tendermint_abci_types_pb.RequestInfo.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestInitChain(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestInitChain)) { + throw new Error('Expected argument of type tendermint.abci.RequestInitChain'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestInitChain(buffer_arg) { + return tendermint_abci_types_pb.RequestInitChain.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestListSnapshots(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestListSnapshots)) { + throw new Error('Expected argument of type tendermint.abci.RequestListSnapshots'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestListSnapshots(buffer_arg) { + return tendermint_abci_types_pb.RequestListSnapshots.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestLoadSnapshotChunk(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestLoadSnapshotChunk)) { + throw new Error('Expected argument of type tendermint.abci.RequestLoadSnapshotChunk'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestLoadSnapshotChunk(buffer_arg) { + return tendermint_abci_types_pb.RequestLoadSnapshotChunk.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestOfferSnapshot(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestOfferSnapshot)) { + throw new Error('Expected argument of type tendermint.abci.RequestOfferSnapshot'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestOfferSnapshot(buffer_arg) { + return tendermint_abci_types_pb.RequestOfferSnapshot.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestQuery(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestQuery)) { + throw new Error('Expected argument of type tendermint.abci.RequestQuery'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestQuery(buffer_arg) { + return tendermint_abci_types_pb.RequestQuery.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_RequestSetOption(arg) { + if (!(arg instanceof tendermint_abci_types_pb.RequestSetOption)) { + throw new Error('Expected argument of type tendermint.abci.RequestSetOption'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_RequestSetOption(buffer_arg) { + return tendermint_abci_types_pb.RequestSetOption.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseApplySnapshotChunk(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseApplySnapshotChunk)) { + throw new Error('Expected argument of type tendermint.abci.ResponseApplySnapshotChunk'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseApplySnapshotChunk(buffer_arg) { + return tendermint_abci_types_pb.ResponseApplySnapshotChunk.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseBeginBlock(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseBeginBlock)) { + throw new Error('Expected argument of type tendermint.abci.ResponseBeginBlock'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseBeginBlock(buffer_arg) { + return tendermint_abci_types_pb.ResponseBeginBlock.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseCheckTx(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseCheckTx)) { + throw new Error('Expected argument of type tendermint.abci.ResponseCheckTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseCheckTx(buffer_arg) { + return tendermint_abci_types_pb.ResponseCheckTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseCommit(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseCommit)) { + throw new Error('Expected argument of type tendermint.abci.ResponseCommit'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseCommit(buffer_arg) { + return tendermint_abci_types_pb.ResponseCommit.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseDeliverTx(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseDeliverTx)) { + throw new Error('Expected argument of type tendermint.abci.ResponseDeliverTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseDeliverTx(buffer_arg) { + return tendermint_abci_types_pb.ResponseDeliverTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseEcho(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseEcho)) { + throw new Error('Expected argument of type tendermint.abci.ResponseEcho'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseEcho(buffer_arg) { + return tendermint_abci_types_pb.ResponseEcho.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseEndBlock(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseEndBlock)) { + throw new Error('Expected argument of type tendermint.abci.ResponseEndBlock'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseEndBlock(buffer_arg) { + return tendermint_abci_types_pb.ResponseEndBlock.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseFlush(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseFlush)) { + throw new Error('Expected argument of type tendermint.abci.ResponseFlush'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseFlush(buffer_arg) { + return tendermint_abci_types_pb.ResponseFlush.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseInfo(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseInfo)) { + throw new Error('Expected argument of type tendermint.abci.ResponseInfo'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseInfo(buffer_arg) { + return tendermint_abci_types_pb.ResponseInfo.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseInitChain(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseInitChain)) { + throw new Error('Expected argument of type tendermint.abci.ResponseInitChain'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseInitChain(buffer_arg) { + return tendermint_abci_types_pb.ResponseInitChain.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseListSnapshots(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseListSnapshots)) { + throw new Error('Expected argument of type tendermint.abci.ResponseListSnapshots'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseListSnapshots(buffer_arg) { + return tendermint_abci_types_pb.ResponseListSnapshots.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseLoadSnapshotChunk(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseLoadSnapshotChunk)) { + throw new Error('Expected argument of type tendermint.abci.ResponseLoadSnapshotChunk'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseLoadSnapshotChunk(buffer_arg) { + return tendermint_abci_types_pb.ResponseLoadSnapshotChunk.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseOfferSnapshot(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseOfferSnapshot)) { + throw new Error('Expected argument of type tendermint.abci.ResponseOfferSnapshot'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseOfferSnapshot(buffer_arg) { + return tendermint_abci_types_pb.ResponseOfferSnapshot.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseQuery(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseQuery)) { + throw new Error('Expected argument of type tendermint.abci.ResponseQuery'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseQuery(buffer_arg) { + return tendermint_abci_types_pb.ResponseQuery.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_abci_ResponseSetOption(arg) { + if (!(arg instanceof tendermint_abci_types_pb.ResponseSetOption)) { + throw new Error('Expected argument of type tendermint.abci.ResponseSetOption'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_abci_ResponseSetOption(buffer_arg) { + return tendermint_abci_types_pb.ResponseSetOption.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// ---------------------------------------- +// Service Definition +// +var ABCIApplicationService = exports['tendermint.abci.ABCIApplication'] = { + echo: { + path: '/tendermint.abci.ABCIApplication/Echo', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestEcho, + responseType: tendermint_abci_types_pb.ResponseEcho, + requestSerialize: serialize_tendermint_abci_RequestEcho, + requestDeserialize: deserialize_tendermint_abci_RequestEcho, + responseSerialize: serialize_tendermint_abci_ResponseEcho, + responseDeserialize: deserialize_tendermint_abci_ResponseEcho, + }, + flush: { + path: '/tendermint.abci.ABCIApplication/Flush', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestFlush, + responseType: tendermint_abci_types_pb.ResponseFlush, + requestSerialize: serialize_tendermint_abci_RequestFlush, + requestDeserialize: deserialize_tendermint_abci_RequestFlush, + responseSerialize: serialize_tendermint_abci_ResponseFlush, + responseDeserialize: deserialize_tendermint_abci_ResponseFlush, + }, + info: { + path: '/tendermint.abci.ABCIApplication/Info', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestInfo, + responseType: tendermint_abci_types_pb.ResponseInfo, + requestSerialize: serialize_tendermint_abci_RequestInfo, + requestDeserialize: deserialize_tendermint_abci_RequestInfo, + responseSerialize: serialize_tendermint_abci_ResponseInfo, + responseDeserialize: deserialize_tendermint_abci_ResponseInfo, + }, + setOption: { + path: '/tendermint.abci.ABCIApplication/SetOption', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestSetOption, + responseType: tendermint_abci_types_pb.ResponseSetOption, + requestSerialize: serialize_tendermint_abci_RequestSetOption, + requestDeserialize: deserialize_tendermint_abci_RequestSetOption, + responseSerialize: serialize_tendermint_abci_ResponseSetOption, + responseDeserialize: deserialize_tendermint_abci_ResponseSetOption, + }, + deliverTx: { + path: '/tendermint.abci.ABCIApplication/DeliverTx', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestDeliverTx, + responseType: tendermint_abci_types_pb.ResponseDeliverTx, + requestSerialize: serialize_tendermint_abci_RequestDeliverTx, + requestDeserialize: deserialize_tendermint_abci_RequestDeliverTx, + responseSerialize: serialize_tendermint_abci_ResponseDeliverTx, + responseDeserialize: deserialize_tendermint_abci_ResponseDeliverTx, + }, + checkTx: { + path: '/tendermint.abci.ABCIApplication/CheckTx', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestCheckTx, + responseType: tendermint_abci_types_pb.ResponseCheckTx, + requestSerialize: serialize_tendermint_abci_RequestCheckTx, + requestDeserialize: deserialize_tendermint_abci_RequestCheckTx, + responseSerialize: serialize_tendermint_abci_ResponseCheckTx, + responseDeserialize: deserialize_tendermint_abci_ResponseCheckTx, + }, + query: { + path: '/tendermint.abci.ABCIApplication/Query', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestQuery, + responseType: tendermint_abci_types_pb.ResponseQuery, + requestSerialize: serialize_tendermint_abci_RequestQuery, + requestDeserialize: deserialize_tendermint_abci_RequestQuery, + responseSerialize: serialize_tendermint_abci_ResponseQuery, + responseDeserialize: deserialize_tendermint_abci_ResponseQuery, + }, + commit: { + path: '/tendermint.abci.ABCIApplication/Commit', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestCommit, + responseType: tendermint_abci_types_pb.ResponseCommit, + requestSerialize: serialize_tendermint_abci_RequestCommit, + requestDeserialize: deserialize_tendermint_abci_RequestCommit, + responseSerialize: serialize_tendermint_abci_ResponseCommit, + responseDeserialize: deserialize_tendermint_abci_ResponseCommit, + }, + initChain: { + path: '/tendermint.abci.ABCIApplication/InitChain', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestInitChain, + responseType: tendermint_abci_types_pb.ResponseInitChain, + requestSerialize: serialize_tendermint_abci_RequestInitChain, + requestDeserialize: deserialize_tendermint_abci_RequestInitChain, + responseSerialize: serialize_tendermint_abci_ResponseInitChain, + responseDeserialize: deserialize_tendermint_abci_ResponseInitChain, + }, + beginBlock: { + path: '/tendermint.abci.ABCIApplication/BeginBlock', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestBeginBlock, + responseType: tendermint_abci_types_pb.ResponseBeginBlock, + requestSerialize: serialize_tendermint_abci_RequestBeginBlock, + requestDeserialize: deserialize_tendermint_abci_RequestBeginBlock, + responseSerialize: serialize_tendermint_abci_ResponseBeginBlock, + responseDeserialize: deserialize_tendermint_abci_ResponseBeginBlock, + }, + endBlock: { + path: '/tendermint.abci.ABCIApplication/EndBlock', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestEndBlock, + responseType: tendermint_abci_types_pb.ResponseEndBlock, + requestSerialize: serialize_tendermint_abci_RequestEndBlock, + requestDeserialize: deserialize_tendermint_abci_RequestEndBlock, + responseSerialize: serialize_tendermint_abci_ResponseEndBlock, + responseDeserialize: deserialize_tendermint_abci_ResponseEndBlock, + }, + listSnapshots: { + path: '/tendermint.abci.ABCIApplication/ListSnapshots', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestListSnapshots, + responseType: tendermint_abci_types_pb.ResponseListSnapshots, + requestSerialize: serialize_tendermint_abci_RequestListSnapshots, + requestDeserialize: deserialize_tendermint_abci_RequestListSnapshots, + responseSerialize: serialize_tendermint_abci_ResponseListSnapshots, + responseDeserialize: deserialize_tendermint_abci_ResponseListSnapshots, + }, + offerSnapshot: { + path: '/tendermint.abci.ABCIApplication/OfferSnapshot', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestOfferSnapshot, + responseType: tendermint_abci_types_pb.ResponseOfferSnapshot, + requestSerialize: serialize_tendermint_abci_RequestOfferSnapshot, + requestDeserialize: deserialize_tendermint_abci_RequestOfferSnapshot, + responseSerialize: serialize_tendermint_abci_ResponseOfferSnapshot, + responseDeserialize: deserialize_tendermint_abci_ResponseOfferSnapshot, + }, + loadSnapshotChunk: { + path: '/tendermint.abci.ABCIApplication/LoadSnapshotChunk', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestLoadSnapshotChunk, + responseType: tendermint_abci_types_pb.ResponseLoadSnapshotChunk, + requestSerialize: serialize_tendermint_abci_RequestLoadSnapshotChunk, + requestDeserialize: deserialize_tendermint_abci_RequestLoadSnapshotChunk, + responseSerialize: serialize_tendermint_abci_ResponseLoadSnapshotChunk, + responseDeserialize: deserialize_tendermint_abci_ResponseLoadSnapshotChunk, + }, + applySnapshotChunk: { + path: '/tendermint.abci.ABCIApplication/ApplySnapshotChunk', + requestStream: false, + responseStream: false, + requestType: tendermint_abci_types_pb.RequestApplySnapshotChunk, + responseType: tendermint_abci_types_pb.ResponseApplySnapshotChunk, + requestSerialize: serialize_tendermint_abci_RequestApplySnapshotChunk, + requestDeserialize: deserialize_tendermint_abci_RequestApplySnapshotChunk, + responseSerialize: serialize_tendermint_abci_ResponseApplySnapshotChunk, + responseDeserialize: deserialize_tendermint_abci_ResponseApplySnapshotChunk, + }, +}; + diff --git a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.d.ts b/js/proto/tendermint/abci/types_pb.d.ts similarity index 59% rename from js/proto/github.com/tendermint/tendermint/abci/types/types_pb.d.ts rename to js/proto/tendermint/abci/types_pb.d.ts index 97ca0d0b2..d35c89a8a 100644 --- a/js/proto/github.com/tendermint/tendermint/abci/types/types_pb.d.ts +++ b/js/proto/tendermint/abci/types_pb.d.ts @@ -1,80 +1,107 @@ -// package: types -// file: github.com/tendermint/tendermint/abci/types/types.proto +// package: tendermint.abci +// file: tendermint/abci/types.proto /* tslint:disable */ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "../../../../../github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as tendermint_crypto_proof_pb from "../../tendermint/crypto/proof_pb"; +import * as tendermint_types_types_pb from "../../tendermint/types/types_pb"; +import * as tendermint_crypto_keys_pb from "../../tendermint/crypto/keys_pb"; +import * as tendermint_types_params_pb from "../../tendermint/types/params_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -import * as github_com_tendermint_tendermint_libs_common_types_pb from "../../../../../github.com/tendermint/tendermint/libs/common/types_pb"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; export class Request extends jspb.Message { hasEcho(): boolean; clearEcho(): void; getEcho(): RequestEcho | undefined; - setEcho(value?: RequestEcho): void; + setEcho(value?: RequestEcho): Request; hasFlush(): boolean; clearFlush(): void; getFlush(): RequestFlush | undefined; - setFlush(value?: RequestFlush): void; + setFlush(value?: RequestFlush): Request; hasInfo(): boolean; clearInfo(): void; getInfo(): RequestInfo | undefined; - setInfo(value?: RequestInfo): void; + setInfo(value?: RequestInfo): Request; hasSetOption(): boolean; clearSetOption(): void; getSetOption(): RequestSetOption | undefined; - setSetOption(value?: RequestSetOption): void; + setSetOption(value?: RequestSetOption): Request; hasInitChain(): boolean; clearInitChain(): void; getInitChain(): RequestInitChain | undefined; - setInitChain(value?: RequestInitChain): void; + setInitChain(value?: RequestInitChain): Request; hasQuery(): boolean; clearQuery(): void; getQuery(): RequestQuery | undefined; - setQuery(value?: RequestQuery): void; + setQuery(value?: RequestQuery): Request; hasBeginBlock(): boolean; clearBeginBlock(): void; getBeginBlock(): RequestBeginBlock | undefined; - setBeginBlock(value?: RequestBeginBlock): void; + setBeginBlock(value?: RequestBeginBlock): Request; hasCheckTx(): boolean; clearCheckTx(): void; getCheckTx(): RequestCheckTx | undefined; - setCheckTx(value?: RequestCheckTx): void; + setCheckTx(value?: RequestCheckTx): Request; hasDeliverTx(): boolean; clearDeliverTx(): void; getDeliverTx(): RequestDeliverTx | undefined; - setDeliverTx(value?: RequestDeliverTx): void; + setDeliverTx(value?: RequestDeliverTx): Request; hasEndBlock(): boolean; clearEndBlock(): void; getEndBlock(): RequestEndBlock | undefined; - setEndBlock(value?: RequestEndBlock): void; + setEndBlock(value?: RequestEndBlock): Request; hasCommit(): boolean; clearCommit(): void; getCommit(): RequestCommit | undefined; - setCommit(value?: RequestCommit): void; + setCommit(value?: RequestCommit): Request; + + + hasListSnapshots(): boolean; + clearListSnapshots(): void; + getListSnapshots(): RequestListSnapshots | undefined; + setListSnapshots(value?: RequestListSnapshots): Request; + + + hasOfferSnapshot(): boolean; + clearOfferSnapshot(): void; + getOfferSnapshot(): RequestOfferSnapshot | undefined; + setOfferSnapshot(value?: RequestOfferSnapshot): Request; + + + hasLoadSnapshotChunk(): boolean; + clearLoadSnapshotChunk(): void; + getLoadSnapshotChunk(): RequestLoadSnapshotChunk | undefined; + setLoadSnapshotChunk(value?: RequestLoadSnapshotChunk): Request; + + + hasApplySnapshotChunk(): boolean; + clearApplySnapshotChunk(): void; + getApplySnapshotChunk(): RequestApplySnapshotChunk | undefined; + setApplySnapshotChunk(value?: RequestApplySnapshotChunk): Request; getValueCase(): Request.ValueCase; @@ -102,32 +129,44 @@ export namespace Request { deliverTx?: RequestDeliverTx.AsObject, endBlock?: RequestEndBlock.AsObject, commit?: RequestCommit.AsObject, + listSnapshots?: RequestListSnapshots.AsObject, + offerSnapshot?: RequestOfferSnapshot.AsObject, + loadSnapshotChunk?: RequestLoadSnapshotChunk.AsObject, + applySnapshotChunk?: RequestApplySnapshotChunk.AsObject, } export enum ValueCase { VALUE_NOT_SET = 0, - ECHO = 2, + ECHO = 1, - FLUSH = 3, + FLUSH = 2, - INFO = 4, + INFO = 3, - SET_OPTION = 5, + SET_OPTION = 4, - INIT_CHAIN = 6, + INIT_CHAIN = 5, - QUERY = 7, + QUERY = 6, - BEGIN_BLOCK = 8, + BEGIN_BLOCK = 7, - CHECK_TX = 9, + CHECK_TX = 8, - DELIVER_TX = 19, + DELIVER_TX = 9, - END_BLOCK = 11, + END_BLOCK = 10, - COMMIT = 12, + COMMIT = 11, + + LIST_SNAPSHOTS = 12, + + OFFER_SNAPSHOT = 13, + + LOAD_SNAPSHOT_CHUNK = 14, + + APPLY_SNAPSHOT_CHUNK = 15, } @@ -135,7 +174,7 @@ export namespace Request { export class RequestEcho extends jspb.Message { getMessage(): string; - setMessage(value: string): void; + setMessage(value: string): RequestEcho; serializeBinary(): Uint8Array; @@ -173,7 +212,13 @@ export namespace RequestFlush { export class RequestInfo extends jspb.Message { getVersion(): string; - setVersion(value: string): void; + setVersion(value: string): RequestInfo; + + getBlockVersion(): number; + setBlockVersion(value: number): RequestInfo; + + getP2pVersion(): number; + setP2pVersion(value: number): RequestInfo; serializeBinary(): Uint8Array; @@ -189,15 +234,17 @@ export class RequestInfo extends jspb.Message { export namespace RequestInfo { export type AsObject = { version: string, + blockVersion: number, + p2pVersion: number, } } export class RequestSetOption extends jspb.Message { getKey(): string; - setKey(value: string): void; + setKey(value: string): RequestSetOption; getValue(): string; - setValue(value: string): void; + setValue(value: string): RequestSetOption; serializeBinary(): Uint8Array; @@ -222,26 +269,29 @@ export class RequestInitChain extends jspb.Message { hasTime(): boolean; clearTime(): void; getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): RequestInitChain; getChainId(): string; - setChainId(value: string): void; + setChainId(value: string): RequestInitChain; hasConsensusParams(): boolean; clearConsensusParams(): void; getConsensusParams(): ConsensusParams | undefined; - setConsensusParams(value?: ConsensusParams): void; + setConsensusParams(value?: ConsensusParams): RequestInitChain; clearValidatorsList(): void; getValidatorsList(): Array; - setValidatorsList(value: Array): void; + setValidatorsList(value: Array): RequestInitChain; addValidators(value?: ValidatorUpdate, index?: number): ValidatorUpdate; getAppStateBytes(): Uint8Array | string; getAppStateBytes_asU8(): Uint8Array; getAppStateBytes_asB64(): string; - setAppStateBytes(value: Uint8Array | string): void; + setAppStateBytes(value: Uint8Array | string): RequestInitChain; + + getInitialHeight(): number; + setInitialHeight(value: number): RequestInitChain; serializeBinary(): Uint8Array; @@ -261,6 +311,7 @@ export namespace RequestInitChain { consensusParams?: ConsensusParams.AsObject, validatorsList: Array, appStateBytes: Uint8Array | string, + initialHeight: number, } } @@ -268,16 +319,16 @@ export class RequestQuery extends jspb.Message { getData(): Uint8Array | string; getData_asU8(): Uint8Array; getData_asB64(): string; - setData(value: Uint8Array | string): void; + setData(value: Uint8Array | string): RequestQuery; getPath(): string; - setPath(value: string): void; + setPath(value: string): RequestQuery; getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): RequestQuery; getProve(): boolean; - setProve(value: boolean): void; + setProve(value: boolean): RequestQuery; serializeBinary(): Uint8Array; @@ -303,23 +354,23 @@ export class RequestBeginBlock extends jspb.Message { getHash(): Uint8Array | string; getHash_asU8(): Uint8Array; getHash_asB64(): string; - setHash(value: Uint8Array | string): void; + setHash(value: Uint8Array | string): RequestBeginBlock; hasHeader(): boolean; clearHeader(): void; - getHeader(): Header | undefined; - setHeader(value?: Header): void; + getHeader(): tendermint_types_types_pb.Header | undefined; + setHeader(value?: tendermint_types_types_pb.Header): RequestBeginBlock; hasLastCommitInfo(): boolean; clearLastCommitInfo(): void; getLastCommitInfo(): LastCommitInfo | undefined; - setLastCommitInfo(value?: LastCommitInfo): void; + setLastCommitInfo(value?: LastCommitInfo): RequestBeginBlock; clearByzantineValidatorsList(): void; getByzantineValidatorsList(): Array; - setByzantineValidatorsList(value: Array): void; + setByzantineValidatorsList(value: Array): RequestBeginBlock; addByzantineValidators(value?: Evidence, index?: number): Evidence; @@ -336,7 +387,7 @@ export class RequestBeginBlock extends jspb.Message { export namespace RequestBeginBlock { export type AsObject = { hash: Uint8Array | string, - header?: Header.AsObject, + header?: tendermint_types_types_pb.Header.AsObject, lastCommitInfo?: LastCommitInfo.AsObject, byzantineValidatorsList: Array, } @@ -346,7 +397,10 @@ export class RequestCheckTx extends jspb.Message { getTx(): Uint8Array | string; getTx_asU8(): Uint8Array; getTx_asB64(): string; - setTx(value: Uint8Array | string): void; + setTx(value: Uint8Array | string): RequestCheckTx; + + getType(): CheckTxType; + setType(value: CheckTxType): RequestCheckTx; serializeBinary(): Uint8Array; @@ -362,6 +416,7 @@ export class RequestCheckTx extends jspb.Message { export namespace RequestCheckTx { export type AsObject = { tx: Uint8Array | string, + type: CheckTxType, } } @@ -369,7 +424,7 @@ export class RequestDeliverTx extends jspb.Message { getTx(): Uint8Array | string; getTx_asU8(): Uint8Array; getTx_asB64(): string; - setTx(value: Uint8Array | string): void; + setTx(value: Uint8Array | string): RequestDeliverTx; serializeBinary(): Uint8Array; @@ -390,7 +445,7 @@ export namespace RequestDeliverTx { export class RequestEndBlock extends jspb.Message { getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): RequestEndBlock; serializeBinary(): Uint8Array; @@ -426,78 +481,209 @@ export namespace RequestCommit { } } +export class RequestListSnapshots extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestListSnapshots.AsObject; + static toObject(includeInstance: boolean, msg: RequestListSnapshots): RequestListSnapshots.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestListSnapshots, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestListSnapshots; + static deserializeBinaryFromReader(message: RequestListSnapshots, reader: jspb.BinaryReader): RequestListSnapshots; +} + +export namespace RequestListSnapshots { + export type AsObject = { + } +} + +export class RequestOfferSnapshot extends jspb.Message { + + hasSnapshot(): boolean; + clearSnapshot(): void; + getSnapshot(): Snapshot | undefined; + setSnapshot(value?: Snapshot): RequestOfferSnapshot; + + getAppHash(): Uint8Array | string; + getAppHash_asU8(): Uint8Array; + getAppHash_asB64(): string; + setAppHash(value: Uint8Array | string): RequestOfferSnapshot; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestOfferSnapshot.AsObject; + static toObject(includeInstance: boolean, msg: RequestOfferSnapshot): RequestOfferSnapshot.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestOfferSnapshot, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestOfferSnapshot; + static deserializeBinaryFromReader(message: RequestOfferSnapshot, reader: jspb.BinaryReader): RequestOfferSnapshot; +} + +export namespace RequestOfferSnapshot { + export type AsObject = { + snapshot?: Snapshot.AsObject, + appHash: Uint8Array | string, + } +} + +export class RequestLoadSnapshotChunk extends jspb.Message { + getHeight(): number; + setHeight(value: number): RequestLoadSnapshotChunk; + + getFormat(): number; + setFormat(value: number): RequestLoadSnapshotChunk; + + getChunk(): number; + setChunk(value: number): RequestLoadSnapshotChunk; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestLoadSnapshotChunk.AsObject; + static toObject(includeInstance: boolean, msg: RequestLoadSnapshotChunk): RequestLoadSnapshotChunk.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestLoadSnapshotChunk, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestLoadSnapshotChunk; + static deserializeBinaryFromReader(message: RequestLoadSnapshotChunk, reader: jspb.BinaryReader): RequestLoadSnapshotChunk; +} + +export namespace RequestLoadSnapshotChunk { + export type AsObject = { + height: number, + format: number, + chunk: number, + } +} + +export class RequestApplySnapshotChunk extends jspb.Message { + getIndex(): number; + setIndex(value: number): RequestApplySnapshotChunk; + + getChunk(): Uint8Array | string; + getChunk_asU8(): Uint8Array; + getChunk_asB64(): string; + setChunk(value: Uint8Array | string): RequestApplySnapshotChunk; + + getSender(): string; + setSender(value: string): RequestApplySnapshotChunk; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestApplySnapshotChunk.AsObject; + static toObject(includeInstance: boolean, msg: RequestApplySnapshotChunk): RequestApplySnapshotChunk.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestApplySnapshotChunk, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestApplySnapshotChunk; + static deserializeBinaryFromReader(message: RequestApplySnapshotChunk, reader: jspb.BinaryReader): RequestApplySnapshotChunk; +} + +export namespace RequestApplySnapshotChunk { + export type AsObject = { + index: number, + chunk: Uint8Array | string, + sender: string, + } +} + export class Response extends jspb.Message { hasException(): boolean; clearException(): void; getException(): ResponseException | undefined; - setException(value?: ResponseException): void; + setException(value?: ResponseException): Response; hasEcho(): boolean; clearEcho(): void; getEcho(): ResponseEcho | undefined; - setEcho(value?: ResponseEcho): void; + setEcho(value?: ResponseEcho): Response; hasFlush(): boolean; clearFlush(): void; getFlush(): ResponseFlush | undefined; - setFlush(value?: ResponseFlush): void; + setFlush(value?: ResponseFlush): Response; hasInfo(): boolean; clearInfo(): void; getInfo(): ResponseInfo | undefined; - setInfo(value?: ResponseInfo): void; + setInfo(value?: ResponseInfo): Response; hasSetOption(): boolean; clearSetOption(): void; getSetOption(): ResponseSetOption | undefined; - setSetOption(value?: ResponseSetOption): void; + setSetOption(value?: ResponseSetOption): Response; hasInitChain(): boolean; clearInitChain(): void; getInitChain(): ResponseInitChain | undefined; - setInitChain(value?: ResponseInitChain): void; + setInitChain(value?: ResponseInitChain): Response; hasQuery(): boolean; clearQuery(): void; getQuery(): ResponseQuery | undefined; - setQuery(value?: ResponseQuery): void; + setQuery(value?: ResponseQuery): Response; hasBeginBlock(): boolean; clearBeginBlock(): void; getBeginBlock(): ResponseBeginBlock | undefined; - setBeginBlock(value?: ResponseBeginBlock): void; + setBeginBlock(value?: ResponseBeginBlock): Response; hasCheckTx(): boolean; clearCheckTx(): void; getCheckTx(): ResponseCheckTx | undefined; - setCheckTx(value?: ResponseCheckTx): void; + setCheckTx(value?: ResponseCheckTx): Response; hasDeliverTx(): boolean; clearDeliverTx(): void; getDeliverTx(): ResponseDeliverTx | undefined; - setDeliverTx(value?: ResponseDeliverTx): void; + setDeliverTx(value?: ResponseDeliverTx): Response; hasEndBlock(): boolean; clearEndBlock(): void; getEndBlock(): ResponseEndBlock | undefined; - setEndBlock(value?: ResponseEndBlock): void; + setEndBlock(value?: ResponseEndBlock): Response; hasCommit(): boolean; clearCommit(): void; getCommit(): ResponseCommit | undefined; - setCommit(value?: ResponseCommit): void; + setCommit(value?: ResponseCommit): Response; + + + hasListSnapshots(): boolean; + clearListSnapshots(): void; + getListSnapshots(): ResponseListSnapshots | undefined; + setListSnapshots(value?: ResponseListSnapshots): Response; + + + hasOfferSnapshot(): boolean; + clearOfferSnapshot(): void; + getOfferSnapshot(): ResponseOfferSnapshot | undefined; + setOfferSnapshot(value?: ResponseOfferSnapshot): Response; + + + hasLoadSnapshotChunk(): boolean; + clearLoadSnapshotChunk(): void; + getLoadSnapshotChunk(): ResponseLoadSnapshotChunk | undefined; + setLoadSnapshotChunk(value?: ResponseLoadSnapshotChunk): Response; + + + hasApplySnapshotChunk(): boolean; + clearApplySnapshotChunk(): void; + getApplySnapshotChunk(): ResponseApplySnapshotChunk | undefined; + setApplySnapshotChunk(value?: ResponseApplySnapshotChunk): Response; getValueCase(): Response.ValueCase; @@ -526,6 +712,10 @@ export namespace Response { deliverTx?: ResponseDeliverTx.AsObject, endBlock?: ResponseEndBlock.AsObject, commit?: ResponseCommit.AsObject, + listSnapshots?: ResponseListSnapshots.AsObject, + offerSnapshot?: ResponseOfferSnapshot.AsObject, + loadSnapshotChunk?: ResponseLoadSnapshotChunk.AsObject, + applySnapshotChunk?: ResponseApplySnapshotChunk.AsObject, } export enum ValueCase { @@ -555,13 +745,21 @@ export namespace Response { COMMIT = 12, + LIST_SNAPSHOTS = 13, + + OFFER_SNAPSHOT = 14, + + LOAD_SNAPSHOT_CHUNK = 15, + + APPLY_SNAPSHOT_CHUNK = 16, + } } export class ResponseException extends jspb.Message { getError(): string; - setError(value: string): void; + setError(value: string): ResponseException; serializeBinary(): Uint8Array; @@ -582,7 +780,7 @@ export namespace ResponseException { export class ResponseEcho extends jspb.Message { getMessage(): string; - setMessage(value: string): void; + setMessage(value: string): ResponseEcho; serializeBinary(): Uint8Array; @@ -620,18 +818,21 @@ export namespace ResponseFlush { export class ResponseInfo extends jspb.Message { getData(): string; - setData(value: string): void; + setData(value: string): ResponseInfo; getVersion(): string; - setVersion(value: string): void; + setVersion(value: string): ResponseInfo; + + getAppVersion(): number; + setAppVersion(value: number): ResponseInfo; getLastBlockHeight(): number; - setLastBlockHeight(value: number): void; + setLastBlockHeight(value: number): ResponseInfo; getLastBlockAppHash(): Uint8Array | string; getLastBlockAppHash_asU8(): Uint8Array; getLastBlockAppHash_asB64(): string; - setLastBlockAppHash(value: Uint8Array | string): void; + setLastBlockAppHash(value: Uint8Array | string): ResponseInfo; serializeBinary(): Uint8Array; @@ -648,6 +849,7 @@ export namespace ResponseInfo { export type AsObject = { data: string, version: string, + appVersion: number, lastBlockHeight: number, lastBlockAppHash: Uint8Array | string, } @@ -655,13 +857,13 @@ export namespace ResponseInfo { export class ResponseSetOption extends jspb.Message { getCode(): number; - setCode(value: number): void; + setCode(value: number): ResponseSetOption; getLog(): string; - setLog(value: string): void; + setLog(value: string): ResponseSetOption; getInfo(): string; - setInfo(value: string): void; + setInfo(value: string): ResponseSetOption; serializeBinary(): Uint8Array; @@ -687,13 +889,18 @@ export class ResponseInitChain extends jspb.Message { hasConsensusParams(): boolean; clearConsensusParams(): void; getConsensusParams(): ConsensusParams | undefined; - setConsensusParams(value?: ConsensusParams): void; + setConsensusParams(value?: ConsensusParams): ResponseInitChain; clearValidatorsList(): void; getValidatorsList(): Array; - setValidatorsList(value: Array): void; + setValidatorsList(value: Array): ResponseInitChain; addValidators(value?: ValidatorUpdate, index?: number): ValidatorUpdate; + getAppHash(): Uint8Array | string; + getAppHash_asU8(): Uint8Array; + getAppHash_asB64(): string; + setAppHash(value: Uint8Array | string): ResponseInitChain; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ResponseInitChain.AsObject; @@ -709,39 +916,44 @@ export namespace ResponseInitChain { export type AsObject = { consensusParams?: ConsensusParams.AsObject, validatorsList: Array, + appHash: Uint8Array | string, } } export class ResponseQuery extends jspb.Message { getCode(): number; - setCode(value: number): void; + setCode(value: number): ResponseQuery; getLog(): string; - setLog(value: string): void; + setLog(value: string): ResponseQuery; getInfo(): string; - setInfo(value: string): void; + setInfo(value: string): ResponseQuery; getIndex(): number; - setIndex(value: number): void; + setIndex(value: number): ResponseQuery; getKey(): Uint8Array | string; getKey_asU8(): Uint8Array; getKey_asB64(): string; - setKey(value: Uint8Array | string): void; + setKey(value: Uint8Array | string): ResponseQuery; getValue(): Uint8Array | string; getValue_asU8(): Uint8Array; getValue_asB64(): string; - setValue(value: Uint8Array | string): void; + setValue(value: Uint8Array | string): ResponseQuery; + - getProof(): Uint8Array | string; - getProof_asU8(): Uint8Array; - getProof_asB64(): string; - setProof(value: Uint8Array | string): void; + hasProofOps(): boolean; + clearProofOps(): void; + getProofOps(): tendermint_crypto_proof_pb.ProofOps | undefined; + setProofOps(value?: tendermint_crypto_proof_pb.ProofOps): ResponseQuery; getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): ResponseQuery; + + getCodespace(): string; + setCodespace(value: string): ResponseQuery; serializeBinary(): Uint8Array; @@ -762,16 +974,17 @@ export namespace ResponseQuery { index: number, key: Uint8Array | string, value: Uint8Array | string, - proof: Uint8Array | string, + proofOps?: tendermint_crypto_proof_pb.ProofOps.AsObject, height: number, + codespace: string, } } export class ResponseBeginBlock extends jspb.Message { - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): ResponseBeginBlock; + addEvents(value?: Event, index?: number): Event; serializeBinary(): Uint8Array; @@ -786,35 +999,38 @@ export class ResponseBeginBlock extends jspb.Message { export namespace ResponseBeginBlock { export type AsObject = { - tagsList: Array, + eventsList: Array, } } export class ResponseCheckTx extends jspb.Message { getCode(): number; - setCode(value: number): void; + setCode(value: number): ResponseCheckTx; getData(): Uint8Array | string; getData_asU8(): Uint8Array; getData_asB64(): string; - setData(value: Uint8Array | string): void; + setData(value: Uint8Array | string): ResponseCheckTx; getLog(): string; - setLog(value: string): void; + setLog(value: string): ResponseCheckTx; getInfo(): string; - setInfo(value: string): void; + setInfo(value: string): ResponseCheckTx; getGasWanted(): number; - setGasWanted(value: number): void; + setGasWanted(value: number): ResponseCheckTx; getGasUsed(): number; - setGasUsed(value: number): void; + setGasUsed(value: number): ResponseCheckTx; - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): ResponseCheckTx; + addEvents(value?: Event, index?: number): Event; + + getCodespace(): string; + setCodespace(value: string): ResponseCheckTx; serializeBinary(): Uint8Array; @@ -835,35 +1051,39 @@ export namespace ResponseCheckTx { info: string, gasWanted: number, gasUsed: number, - tagsList: Array, + eventsList: Array, + codespace: string, } } export class ResponseDeliverTx extends jspb.Message { getCode(): number; - setCode(value: number): void; + setCode(value: number): ResponseDeliverTx; getData(): Uint8Array | string; getData_asU8(): Uint8Array; getData_asB64(): string; - setData(value: Uint8Array | string): void; + setData(value: Uint8Array | string): ResponseDeliverTx; getLog(): string; - setLog(value: string): void; + setLog(value: string): ResponseDeliverTx; getInfo(): string; - setInfo(value: string): void; + setInfo(value: string): ResponseDeliverTx; getGasWanted(): number; - setGasWanted(value: number): void; + setGasWanted(value: number): ResponseDeliverTx; getGasUsed(): number; - setGasUsed(value: number): void; + setGasUsed(value: number): ResponseDeliverTx; + + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): ResponseDeliverTx; + addEvents(value?: Event, index?: number): Event; - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + getCodespace(): string; + setCodespace(value: string): ResponseDeliverTx; serializeBinary(): Uint8Array; @@ -884,26 +1104,27 @@ export namespace ResponseDeliverTx { info: string, gasWanted: number, gasUsed: number, - tagsList: Array, + eventsList: Array, + codespace: string, } } export class ResponseEndBlock extends jspb.Message { clearValidatorUpdatesList(): void; getValidatorUpdatesList(): Array; - setValidatorUpdatesList(value: Array): void; + setValidatorUpdatesList(value: Array): ResponseEndBlock; addValidatorUpdates(value?: ValidatorUpdate, index?: number): ValidatorUpdate; hasConsensusParamUpdates(): boolean; clearConsensusParamUpdates(): void; getConsensusParamUpdates(): ConsensusParams | undefined; - setConsensusParamUpdates(value?: ConsensusParams): void; + setConsensusParamUpdates(value?: ConsensusParams): ResponseEndBlock; - clearTagsList(): void; - getTagsList(): Array; - setTagsList(value: Array): void; - addTags(value?: github_com_tendermint_tendermint_libs_common_types_pb.KVPair, index?: number): github_com_tendermint_tendermint_libs_common_types_pb.KVPair; + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): ResponseEndBlock; + addEvents(value?: Event, index?: number): Event; serializeBinary(): Uint8Array; @@ -920,7 +1141,7 @@ export namespace ResponseEndBlock { export type AsObject = { validatorUpdatesList: Array, consensusParamUpdates?: ConsensusParams.AsObject, - tagsList: Array, + eventsList: Array, } } @@ -928,7 +1149,10 @@ export class ResponseCommit extends jspb.Message { getData(): Uint8Array | string; getData_asU8(): Uint8Array; getData_asB64(): string; - setData(value: Uint8Array | string): void; + setData(value: Uint8Array | string): ResponseCommit; + + getRetainHeight(): number; + setRetainHeight(value: number): ResponseCommit; serializeBinary(): Uint8Array; @@ -944,125 +1168,207 @@ export class ResponseCommit extends jspb.Message { export namespace ResponseCommit { export type AsObject = { data: Uint8Array | string, + retainHeight: number, } } -export class ConsensusParams extends jspb.Message { +export class ResponseListSnapshots extends jspb.Message { + clearSnapshotsList(): void; + getSnapshotsList(): Array; + setSnapshotsList(value: Array): ResponseListSnapshots; + addSnapshots(value?: Snapshot, index?: number): Snapshot; - hasBlockSize(): boolean; - clearBlockSize(): void; - getBlockSize(): BlockSize | undefined; - setBlockSize(value?: BlockSize): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseListSnapshots.AsObject; + static toObject(includeInstance: boolean, msg: ResponseListSnapshots): ResponseListSnapshots.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseListSnapshots, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseListSnapshots; + static deserializeBinaryFromReader(message: ResponseListSnapshots, reader: jspb.BinaryReader): ResponseListSnapshots; +} - hasTxSize(): boolean; - clearTxSize(): void; - getTxSize(): TxSize | undefined; - setTxSize(value?: TxSize): void; +export namespace ResponseListSnapshots { + export type AsObject = { + snapshotsList: Array, + } +} +export class ResponseOfferSnapshot extends jspb.Message { + getResult(): ResponseOfferSnapshot.Result; + setResult(value: ResponseOfferSnapshot.Result): ResponseOfferSnapshot; - hasBlockGossip(): boolean; - clearBlockGossip(): void; - getBlockGossip(): BlockGossip | undefined; - setBlockGossip(value?: BlockGossip): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseOfferSnapshot.AsObject; + static toObject(includeInstance: boolean, msg: ResponseOfferSnapshot): ResponseOfferSnapshot.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseOfferSnapshot, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseOfferSnapshot; + static deserializeBinaryFromReader(message: ResponseOfferSnapshot, reader: jspb.BinaryReader): ResponseOfferSnapshot; +} + +export namespace ResponseOfferSnapshot { + export type AsObject = { + result: ResponseOfferSnapshot.Result, + } + + export enum Result { + UNKNOWN = 0, + ACCEPT = 1, + ABORT = 2, + REJECT = 3, + REJECT_FORMAT = 4, + REJECT_SENDER = 5, + } + +} + +export class ResponseLoadSnapshotChunk extends jspb.Message { + getChunk(): Uint8Array | string; + getChunk_asU8(): Uint8Array; + getChunk_asB64(): string; + setChunk(value: Uint8Array | string): ResponseLoadSnapshotChunk; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConsensusParams.AsObject; - static toObject(includeInstance: boolean, msg: ConsensusParams): ConsensusParams.AsObject; + toObject(includeInstance?: boolean): ResponseLoadSnapshotChunk.AsObject; + static toObject(includeInstance: boolean, msg: ResponseLoadSnapshotChunk): ResponseLoadSnapshotChunk.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConsensusParams, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConsensusParams; - static deserializeBinaryFromReader(message: ConsensusParams, reader: jspb.BinaryReader): ConsensusParams; + static serializeBinaryToWriter(message: ResponseLoadSnapshotChunk, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseLoadSnapshotChunk; + static deserializeBinaryFromReader(message: ResponseLoadSnapshotChunk, reader: jspb.BinaryReader): ResponseLoadSnapshotChunk; } -export namespace ConsensusParams { +export namespace ResponseLoadSnapshotChunk { export type AsObject = { - blockSize?: BlockSize.AsObject, - txSize?: TxSize.AsObject, - blockGossip?: BlockGossip.AsObject, + chunk: Uint8Array | string, } } -export class BlockSize extends jspb.Message { - getMaxBytes(): number; - setMaxBytes(value: number): void; +export class ResponseApplySnapshotChunk extends jspb.Message { + getResult(): ResponseApplySnapshotChunk.Result; + setResult(value: ResponseApplySnapshotChunk.Result): ResponseApplySnapshotChunk; - getMaxGas(): number; - setMaxGas(value: number): void; + clearRefetchChunksList(): void; + getRefetchChunksList(): Array; + setRefetchChunksList(value: Array): ResponseApplySnapshotChunk; + addRefetchChunks(value: number, index?: number): number; + + clearRejectSendersList(): void; + getRejectSendersList(): Array; + setRejectSendersList(value: Array): ResponseApplySnapshotChunk; + addRejectSenders(value: string, index?: number): string; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockSize.AsObject; - static toObject(includeInstance: boolean, msg: BlockSize): BlockSize.AsObject; + toObject(includeInstance?: boolean): ResponseApplySnapshotChunk.AsObject; + static toObject(includeInstance: boolean, msg: ResponseApplySnapshotChunk): ResponseApplySnapshotChunk.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockSize, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockSize; - static deserializeBinaryFromReader(message: BlockSize, reader: jspb.BinaryReader): BlockSize; + static serializeBinaryToWriter(message: ResponseApplySnapshotChunk, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseApplySnapshotChunk; + static deserializeBinaryFromReader(message: ResponseApplySnapshotChunk, reader: jspb.BinaryReader): ResponseApplySnapshotChunk; } -export namespace BlockSize { +export namespace ResponseApplySnapshotChunk { export type AsObject = { - maxBytes: number, - maxGas: number, + result: ResponseApplySnapshotChunk.Result, + refetchChunksList: Array, + rejectSendersList: Array, } + + export enum Result { + UNKNOWN = 0, + ACCEPT = 1, + ABORT = 2, + RETRY = 3, + RETRY_SNAPSHOT = 4, + REJECT_SNAPSHOT = 5, + } + } -export class TxSize extends jspb.Message { - getMaxBytes(): number; - setMaxBytes(value: number): void; +export class ConsensusParams extends jspb.Message { - getMaxGas(): number; - setMaxGas(value: number): void; + hasBlock(): boolean; + clearBlock(): void; + getBlock(): BlockParams | undefined; + setBlock(value?: BlockParams): ConsensusParams; + + + hasEvidence(): boolean; + clearEvidence(): void; + getEvidence(): tendermint_types_params_pb.EvidenceParams | undefined; + setEvidence(value?: tendermint_types_params_pb.EvidenceParams): ConsensusParams; + + + hasValidator(): boolean; + clearValidator(): void; + getValidator(): tendermint_types_params_pb.ValidatorParams | undefined; + setValidator(value?: tendermint_types_params_pb.ValidatorParams): ConsensusParams; + + + hasVersion(): boolean; + clearVersion(): void; + getVersion(): tendermint_types_params_pb.VersionParams | undefined; + setVersion(value?: tendermint_types_params_pb.VersionParams): ConsensusParams; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TxSize.AsObject; - static toObject(includeInstance: boolean, msg: TxSize): TxSize.AsObject; + toObject(includeInstance?: boolean): ConsensusParams.AsObject; + static toObject(includeInstance: boolean, msg: ConsensusParams): ConsensusParams.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TxSize, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TxSize; - static deserializeBinaryFromReader(message: TxSize, reader: jspb.BinaryReader): TxSize; + static serializeBinaryToWriter(message: ConsensusParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConsensusParams; + static deserializeBinaryFromReader(message: ConsensusParams, reader: jspb.BinaryReader): ConsensusParams; } -export namespace TxSize { +export namespace ConsensusParams { export type AsObject = { - maxBytes: number, - maxGas: number, + block?: BlockParams.AsObject, + evidence?: tendermint_types_params_pb.EvidenceParams.AsObject, + validator?: tendermint_types_params_pb.ValidatorParams.AsObject, + version?: tendermint_types_params_pb.VersionParams.AsObject, } } -export class BlockGossip extends jspb.Message { - getBlockPartSizeBytes(): number; - setBlockPartSizeBytes(value: number): void; +export class BlockParams extends jspb.Message { + getMaxBytes(): number; + setMaxBytes(value: number): BlockParams; + + getMaxGas(): number; + setMaxGas(value: number): BlockParams; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockGossip.AsObject; - static toObject(includeInstance: boolean, msg: BlockGossip): BlockGossip.AsObject; + toObject(includeInstance?: boolean): BlockParams.AsObject; + static toObject(includeInstance: boolean, msg: BlockParams): BlockParams.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockGossip, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockGossip; - static deserializeBinaryFromReader(message: BlockGossip, reader: jspb.BinaryReader): BlockGossip; + static serializeBinaryToWriter(message: BlockParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockParams; + static deserializeBinaryFromReader(message: BlockParams, reader: jspb.BinaryReader): BlockParams; } -export namespace BlockGossip { +export namespace BlockParams { export type AsObject = { - blockPartSizeBytes: number, + maxBytes: number, + maxGas: number, } } export class LastCommitInfo extends jspb.Message { getRound(): number; - setRound(value: number): void; + setRound(value: number): LastCommitInfo; clearVotesList(): void; getVotesList(): Array; - setVotesList(value: Array): void; + setVotesList(value: Array): LastCommitInfo; addVotes(value?: VoteInfo, index?: number): VoteInfo; @@ -1083,161 +1389,101 @@ export namespace LastCommitInfo { } } -export class Header extends jspb.Message { - getChainId(): string; - setChainId(value: string): void; - - getHeight(): number; - setHeight(value: number): void; - - - hasTime(): boolean; - clearTime(): void; - getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getNumTxs(): number; - setNumTxs(value: number): void; - - getTotalTxs(): number; - setTotalTxs(value: number): void; - - - hasLastBlockId(): boolean; - clearLastBlockId(): void; - getLastBlockId(): BlockID | undefined; - setLastBlockId(value?: BlockID): void; - - getLastCommitHash(): Uint8Array | string; - getLastCommitHash_asU8(): Uint8Array; - getLastCommitHash_asB64(): string; - setLastCommitHash(value: Uint8Array | string): void; - - getDataHash(): Uint8Array | string; - getDataHash_asU8(): Uint8Array; - getDataHash_asB64(): string; - setDataHash(value: Uint8Array | string): void; - - getValidatorsHash(): Uint8Array | string; - getValidatorsHash_asU8(): Uint8Array; - getValidatorsHash_asB64(): string; - setValidatorsHash(value: Uint8Array | string): void; - - getNextValidatorsHash(): Uint8Array | string; - getNextValidatorsHash_asU8(): Uint8Array; - getNextValidatorsHash_asB64(): string; - setNextValidatorsHash(value: Uint8Array | string): void; - - getConsensusHash(): Uint8Array | string; - getConsensusHash_asU8(): Uint8Array; - getConsensusHash_asB64(): string; - setConsensusHash(value: Uint8Array | string): void; - - getAppHash(): Uint8Array | string; - getAppHash_asU8(): Uint8Array; - getAppHash_asB64(): string; - setAppHash(value: Uint8Array | string): void; - - getLastResultsHash(): Uint8Array | string; - getLastResultsHash_asU8(): Uint8Array; - getLastResultsHash_asB64(): string; - setLastResultsHash(value: Uint8Array | string): void; - - getEvidenceHash(): Uint8Array | string; - getEvidenceHash_asU8(): Uint8Array; - getEvidenceHash_asB64(): string; - setEvidenceHash(value: Uint8Array | string): void; +export class Event extends jspb.Message { + getType(): string; + setType(value: string): Event; - getProposerAddress(): Uint8Array | string; - getProposerAddress_asU8(): Uint8Array; - getProposerAddress_asB64(): string; - setProposerAddress(value: Uint8Array | string): void; + clearAttributesList(): void; + getAttributesList(): Array; + setAttributesList(value: Array): Event; + addAttributes(value?: EventAttribute, index?: number): EventAttribute; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Header.AsObject; - static toObject(includeInstance: boolean, msg: Header): Header.AsObject; + toObject(includeInstance?: boolean): Event.AsObject; + static toObject(includeInstance: boolean, msg: Event): Event.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Header; - static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; + static serializeBinaryToWriter(message: Event, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Event; + static deserializeBinaryFromReader(message: Event, reader: jspb.BinaryReader): Event; } -export namespace Header { +export namespace Event { export type AsObject = { - chainId: string, - height: number, - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - numTxs: number, - totalTxs: number, - lastBlockId?: BlockID.AsObject, - lastCommitHash: Uint8Array | string, - dataHash: Uint8Array | string, - validatorsHash: Uint8Array | string, - nextValidatorsHash: Uint8Array | string, - consensusHash: Uint8Array | string, - appHash: Uint8Array | string, - lastResultsHash: Uint8Array | string, - evidenceHash: Uint8Array | string, - proposerAddress: Uint8Array | string, + type: string, + attributesList: Array, } } -export class BlockID extends jspb.Message { - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; +export class EventAttribute extends jspb.Message { + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): EventAttribute; + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): EventAttribute; - hasPartsHeader(): boolean; - clearPartsHeader(): void; - getPartsHeader(): PartSetHeader | undefined; - setPartsHeader(value?: PartSetHeader): void; + getIndex(): boolean; + setIndex(value: boolean): EventAttribute; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockID.AsObject; - static toObject(includeInstance: boolean, msg: BlockID): BlockID.AsObject; + toObject(includeInstance?: boolean): EventAttribute.AsObject; + static toObject(includeInstance: boolean, msg: EventAttribute): EventAttribute.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockID; - static deserializeBinaryFromReader(message: BlockID, reader: jspb.BinaryReader): BlockID; + static serializeBinaryToWriter(message: EventAttribute, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventAttribute; + static deserializeBinaryFromReader(message: EventAttribute, reader: jspb.BinaryReader): EventAttribute; } -export namespace BlockID { +export namespace EventAttribute { export type AsObject = { - hash: Uint8Array | string, - partsHeader?: PartSetHeader.AsObject, + key: Uint8Array | string, + value: Uint8Array | string, + index: boolean, } } -export class PartSetHeader extends jspb.Message { - getTotal(): number; - setTotal(value: number): void; +export class TxResult extends jspb.Message { + getHeight(): number; + setHeight(value: number): TxResult; - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; + getIndex(): number; + setIndex(value: number): TxResult; + + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): TxResult; + + + hasResult(): boolean; + clearResult(): void; + getResult(): ResponseDeliverTx | undefined; + setResult(value?: ResponseDeliverTx): TxResult; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PartSetHeader.AsObject; - static toObject(includeInstance: boolean, msg: PartSetHeader): PartSetHeader.AsObject; + toObject(includeInstance?: boolean): TxResult.AsObject; + static toObject(includeInstance: boolean, msg: TxResult): TxResult.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PartSetHeader, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PartSetHeader; - static deserializeBinaryFromReader(message: PartSetHeader, reader: jspb.BinaryReader): PartSetHeader; + static serializeBinaryToWriter(message: TxResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxResult; + static deserializeBinaryFromReader(message: TxResult, reader: jspb.BinaryReader): TxResult; } -export namespace PartSetHeader { +export namespace TxResult { export type AsObject = { - total: number, - hash: Uint8Array | string, + height: number, + index: number, + tx: Uint8Array | string, + result?: ResponseDeliverTx.AsObject, } } @@ -1245,10 +1491,10 @@ export class Validator extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): Validator; getPower(): number; - setPower(value: number): void; + setPower(value: number): Validator; serializeBinary(): Uint8Array; @@ -1272,11 +1518,11 @@ export class ValidatorUpdate extends jspb.Message { hasPubKey(): boolean; clearPubKey(): void; - getPubKey(): PubKey | undefined; - setPubKey(value?: PubKey): void; + getPubKey(): tendermint_crypto_keys_pb.PublicKey | undefined; + setPubKey(value?: tendermint_crypto_keys_pb.PublicKey): ValidatorUpdate; getPower(): number; - setPower(value: number): void; + setPower(value: number): ValidatorUpdate; serializeBinary(): Uint8Array; @@ -1291,7 +1537,7 @@ export class ValidatorUpdate extends jspb.Message { export namespace ValidatorUpdate { export type AsObject = { - pubKey?: PubKey.AsObject, + pubKey?: tendermint_crypto_keys_pb.PublicKey.AsObject, power: number, } } @@ -1301,10 +1547,10 @@ export class VoteInfo extends jspb.Message { hasValidator(): boolean; clearValidator(): void; getValidator(): Validator | undefined; - setValidator(value?: Validator): void; + setValidator(value?: Validator): VoteInfo; getSignedLastBlock(): boolean; - setSignedLastBlock(value: boolean): void; + setSignedLastBlock(value: boolean): VoteInfo; serializeBinary(): Uint8Array; @@ -1324,54 +1570,27 @@ export namespace VoteInfo { } } -export class PubKey extends jspb.Message { - getType(): string; - setType(value: string): void; - - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PubKey.AsObject; - static toObject(includeInstance: boolean, msg: PubKey): PubKey.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PubKey, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PubKey; - static deserializeBinaryFromReader(message: PubKey, reader: jspb.BinaryReader): PubKey; -} - -export namespace PubKey { - export type AsObject = { - type: string, - data: Uint8Array | string, - } -} - export class Evidence extends jspb.Message { - getType(): string; - setType(value: string): void; + getType(): EvidenceType; + setType(value: EvidenceType): Evidence; hasValidator(): boolean; clearValidator(): void; getValidator(): Validator | undefined; - setValidator(value?: Validator): void; + setValidator(value?: Validator): Evidence; getHeight(): number; - setHeight(value: number): void; + setHeight(value: number): Evidence; hasTime(): boolean; clearTime(): void; getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): Evidence; getTotalVotingPower(): number; - setTotalVotingPower(value: number): void; + setTotalVotingPower(value: number): Evidence; serializeBinary(): Uint8Array; @@ -1386,10 +1605,62 @@ export class Evidence extends jspb.Message { export namespace Evidence { export type AsObject = { - type: string, + type: EvidenceType, validator?: Validator.AsObject, height: number, time?: google_protobuf_timestamp_pb.Timestamp.AsObject, totalVotingPower: number, } } + +export class Snapshot extends jspb.Message { + getHeight(): number; + setHeight(value: number): Snapshot; + + getFormat(): number; + setFormat(value: number): Snapshot; + + getChunks(): number; + setChunks(value: number): Snapshot; + + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): Snapshot; + + getMetadata(): Uint8Array | string; + getMetadata_asU8(): Uint8Array; + getMetadata_asB64(): string; + setMetadata(value: Uint8Array | string): Snapshot; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Snapshot.AsObject; + static toObject(includeInstance: boolean, msg: Snapshot): Snapshot.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Snapshot, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Snapshot; + static deserializeBinaryFromReader(message: Snapshot, reader: jspb.BinaryReader): Snapshot; +} + +export namespace Snapshot { + export type AsObject = { + height: number, + format: number, + chunks: number, + hash: Uint8Array | string, + metadata: Uint8Array | string, + } +} + +export enum CheckTxType { + NEW = 0, + RECHECK = 1, +} + +export enum EvidenceType { + UNKNOWN = 0, + DUPLICATE_VOTE = 1, + LIGHT_CLIENT_ATTACK = 2, +} diff --git a/js/proto/tendermint/abci/types_pb.js b/js/proto/tendermint/abci/types_pb.js new file mode 100644 index 000000000..2a68a91f4 --- /dev/null +++ b/js/proto/tendermint/abci/types_pb.js @@ -0,0 +1,11789 @@ +// source: tendermint/abci/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var tendermint_crypto_proof_pb = require('../../tendermint/crypto/proof_pb.js'); +goog.object.extend(proto, tendermint_crypto_proof_pb); +var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); +var tendermint_crypto_keys_pb = require('../../tendermint/crypto/keys_pb.js'); +goog.object.extend(proto, tendermint_crypto_keys_pb); +var tendermint_types_params_pb = require('../../tendermint/types/params_pb.js'); +goog.object.extend(proto, tendermint_types_params_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.tendermint.abci.BlockParams', null, global); +goog.exportSymbol('proto.tendermint.abci.CheckTxType', null, global); +goog.exportSymbol('proto.tendermint.abci.ConsensusParams', null, global); +goog.exportSymbol('proto.tendermint.abci.Event', null, global); +goog.exportSymbol('proto.tendermint.abci.EventAttribute', null, global); +goog.exportSymbol('proto.tendermint.abci.Evidence', null, global); +goog.exportSymbol('proto.tendermint.abci.EvidenceType', null, global); +goog.exportSymbol('proto.tendermint.abci.LastCommitInfo', null, global); +goog.exportSymbol('proto.tendermint.abci.Request', null, global); +goog.exportSymbol('proto.tendermint.abci.Request.ValueCase', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestApplySnapshotChunk', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestBeginBlock', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestCheckTx', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestCommit', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestDeliverTx', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestEcho', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestEndBlock', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestFlush', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestInfo', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestInitChain', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestListSnapshots', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestLoadSnapshotChunk', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestOfferSnapshot', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestQuery', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestSetOption', null, global); +goog.exportSymbol('proto.tendermint.abci.Response', null, global); +goog.exportSymbol('proto.tendermint.abci.Response.ValueCase', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseApplySnapshotChunk', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseApplySnapshotChunk.Result', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseBeginBlock', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseCheckTx', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseCommit', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseDeliverTx', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseEcho', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseEndBlock', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseException', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseFlush', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseInfo', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseInitChain', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseListSnapshots', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseLoadSnapshotChunk', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseOfferSnapshot', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseOfferSnapshot.Result', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseQuery', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseSetOption', null, global); +goog.exportSymbol('proto.tendermint.abci.Snapshot', null, global); +goog.exportSymbol('proto.tendermint.abci.TxResult', null, global); +goog.exportSymbol('proto.tendermint.abci.Validator', null, global); +goog.exportSymbol('proto.tendermint.abci.ValidatorUpdate', null, global); +goog.exportSymbol('proto.tendermint.abci.VoteInfo', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.Request = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.abci.Request.oneofGroups_); +}; +goog.inherits(proto.tendermint.abci.Request, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Request.displayName = 'proto.tendermint.abci.Request'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestEcho = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestEcho, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestEcho.displayName = 'proto.tendermint.abci.RequestEcho'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestFlush = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestFlush, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestFlush.displayName = 'proto.tendermint.abci.RequestFlush'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestInfo.displayName = 'proto.tendermint.abci.RequestInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestSetOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestSetOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestSetOption.displayName = 'proto.tendermint.abci.RequestSetOption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestInitChain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestInitChain.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.RequestInitChain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestInitChain.displayName = 'proto.tendermint.abci.RequestInitChain'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestQuery.displayName = 'proto.tendermint.abci.RequestQuery'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestBeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestBeginBlock.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.RequestBeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestBeginBlock.displayName = 'proto.tendermint.abci.RequestBeginBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestCheckTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestCheckTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestCheckTx.displayName = 'proto.tendermint.abci.RequestCheckTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestDeliverTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestDeliverTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestDeliverTx.displayName = 'proto.tendermint.abci.RequestDeliverTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestEndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestEndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestEndBlock.displayName = 'proto.tendermint.abci.RequestEndBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestCommit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestCommit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestCommit.displayName = 'proto.tendermint.abci.RequestCommit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestListSnapshots = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestListSnapshots, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestListSnapshots.displayName = 'proto.tendermint.abci.RequestListSnapshots'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestOfferSnapshot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestOfferSnapshot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestOfferSnapshot.displayName = 'proto.tendermint.abci.RequestOfferSnapshot'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestLoadSnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestLoadSnapshotChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestLoadSnapshotChunk.displayName = 'proto.tendermint.abci.RequestLoadSnapshotChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.RequestApplySnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestApplySnapshotChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestApplySnapshotChunk.displayName = 'proto.tendermint.abci.RequestApplySnapshotChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.Response = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.abci.Response.oneofGroups_); +}; +goog.inherits(proto.tendermint.abci.Response, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Response.displayName = 'proto.tendermint.abci.Response'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseException = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseException, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseException.displayName = 'proto.tendermint.abci.ResponseException'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseEcho = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseEcho, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseEcho.displayName = 'proto.tendermint.abci.ResponseEcho'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseFlush = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseFlush, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseFlush.displayName = 'proto.tendermint.abci.ResponseFlush'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseInfo.displayName = 'proto.tendermint.abci.ResponseInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseSetOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseSetOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseSetOption.displayName = 'proto.tendermint.abci.ResponseSetOption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseInitChain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseInitChain.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseInitChain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseInitChain.displayName = 'proto.tendermint.abci.ResponseInitChain'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseQuery.displayName = 'proto.tendermint.abci.ResponseQuery'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseBeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseBeginBlock.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseBeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseBeginBlock.displayName = 'proto.tendermint.abci.ResponseBeginBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseCheckTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseCheckTx.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseCheckTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseCheckTx.displayName = 'proto.tendermint.abci.ResponseCheckTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseDeliverTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseDeliverTx.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseDeliverTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseDeliverTx.displayName = 'proto.tendermint.abci.ResponseDeliverTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseEndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseEndBlock.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseEndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseEndBlock.displayName = 'proto.tendermint.abci.ResponseEndBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseCommit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseCommit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseCommit.displayName = 'proto.tendermint.abci.ResponseCommit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseListSnapshots = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseListSnapshots.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseListSnapshots, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseListSnapshots.displayName = 'proto.tendermint.abci.ResponseListSnapshots'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseOfferSnapshot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseOfferSnapshot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseOfferSnapshot.displayName = 'proto.tendermint.abci.ResponseOfferSnapshot'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseLoadSnapshotChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseLoadSnapshotChunk.displayName = 'proto.tendermint.abci.ResponseLoadSnapshotChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ResponseApplySnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseApplySnapshotChunk.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseApplySnapshotChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseApplySnapshotChunk.displayName = 'proto.tendermint.abci.ResponseApplySnapshotChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ConsensusParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ConsensusParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ConsensusParams.displayName = 'proto.tendermint.abci.ConsensusParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.BlockParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.BlockParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.BlockParams.displayName = 'proto.tendermint.abci.BlockParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.LastCommitInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.LastCommitInfo.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.LastCommitInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.LastCommitInfo.displayName = 'proto.tendermint.abci.LastCommitInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.Event = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.Event.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.Event, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Event.displayName = 'proto.tendermint.abci.Event'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.EventAttribute = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.EventAttribute, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.EventAttribute.displayName = 'proto.tendermint.abci.EventAttribute'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.TxResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.TxResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.TxResult.displayName = 'proto.tendermint.abci.TxResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Validator.displayName = 'proto.tendermint.abci.Validator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.ValidatorUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ValidatorUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ValidatorUpdate.displayName = 'proto.tendermint.abci.ValidatorUpdate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.VoteInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.VoteInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.VoteInfo.displayName = 'proto.tendermint.abci.VoteInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.Evidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.Evidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Evidence.displayName = 'proto.tendermint.abci.Evidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.abci.Snapshot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.Snapshot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Snapshot.displayName = 'proto.tendermint.abci.Snapshot'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.abci.Request.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]]; + +/** + * @enum {number} + */ +proto.tendermint.abci.Request.ValueCase = { + VALUE_NOT_SET: 0, + ECHO: 1, + FLUSH: 2, + INFO: 3, + SET_OPTION: 4, + INIT_CHAIN: 5, + QUERY: 6, + BEGIN_BLOCK: 7, + CHECK_TX: 8, + DELIVER_TX: 9, + END_BLOCK: 10, + COMMIT: 11, + LIST_SNAPSHOTS: 12, + OFFER_SNAPSHOT: 13, + LOAD_SNAPSHOT_CHUNK: 14, + APPLY_SNAPSHOT_CHUNK: 15 +}; + +/** + * @return {proto.tendermint.abci.Request.ValueCase} + */ +proto.tendermint.abci.Request.prototype.getValueCase = function() { + return /** @type {proto.tendermint.abci.Request.ValueCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.abci.Request.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.Request.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Request.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.Request} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Request.toObject = function(includeInstance, msg) { + var f, obj = { + echo: (f = msg.getEcho()) && proto.tendermint.abci.RequestEcho.toObject(includeInstance, f), + flush: (f = msg.getFlush()) && proto.tendermint.abci.RequestFlush.toObject(includeInstance, f), + info: (f = msg.getInfo()) && proto.tendermint.abci.RequestInfo.toObject(includeInstance, f), + setOption: (f = msg.getSetOption()) && proto.tendermint.abci.RequestSetOption.toObject(includeInstance, f), + initChain: (f = msg.getInitChain()) && proto.tendermint.abci.RequestInitChain.toObject(includeInstance, f), + query: (f = msg.getQuery()) && proto.tendermint.abci.RequestQuery.toObject(includeInstance, f), + beginBlock: (f = msg.getBeginBlock()) && proto.tendermint.abci.RequestBeginBlock.toObject(includeInstance, f), + checkTx: (f = msg.getCheckTx()) && proto.tendermint.abci.RequestCheckTx.toObject(includeInstance, f), + deliverTx: (f = msg.getDeliverTx()) && proto.tendermint.abci.RequestDeliverTx.toObject(includeInstance, f), + endBlock: (f = msg.getEndBlock()) && proto.tendermint.abci.RequestEndBlock.toObject(includeInstance, f), + commit: (f = msg.getCommit()) && proto.tendermint.abci.RequestCommit.toObject(includeInstance, f), + listSnapshots: (f = msg.getListSnapshots()) && proto.tendermint.abci.RequestListSnapshots.toObject(includeInstance, f), + offerSnapshot: (f = msg.getOfferSnapshot()) && proto.tendermint.abci.RequestOfferSnapshot.toObject(includeInstance, f), + loadSnapshotChunk: (f = msg.getLoadSnapshotChunk()) && proto.tendermint.abci.RequestLoadSnapshotChunk.toObject(includeInstance, f), + applySnapshotChunk: (f = msg.getApplySnapshotChunk()) && proto.tendermint.abci.RequestApplySnapshotChunk.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.Request} + */ +proto.tendermint.abci.Request.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Request; + return proto.tendermint.abci.Request.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Request} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Request} + */ +proto.tendermint.abci.Request.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.abci.RequestEcho; + reader.readMessage(value,proto.tendermint.abci.RequestEcho.deserializeBinaryFromReader); + msg.setEcho(value); + break; + case 2: + var value = new proto.tendermint.abci.RequestFlush; + reader.readMessage(value,proto.tendermint.abci.RequestFlush.deserializeBinaryFromReader); + msg.setFlush(value); + break; + case 3: + var value = new proto.tendermint.abci.RequestInfo; + reader.readMessage(value,proto.tendermint.abci.RequestInfo.deserializeBinaryFromReader); + msg.setInfo(value); + break; + case 4: + var value = new proto.tendermint.abci.RequestSetOption; + reader.readMessage(value,proto.tendermint.abci.RequestSetOption.deserializeBinaryFromReader); + msg.setSetOption(value); + break; + case 5: + var value = new proto.tendermint.abci.RequestInitChain; + reader.readMessage(value,proto.tendermint.abci.RequestInitChain.deserializeBinaryFromReader); + msg.setInitChain(value); + break; + case 6: + var value = new proto.tendermint.abci.RequestQuery; + reader.readMessage(value,proto.tendermint.abci.RequestQuery.deserializeBinaryFromReader); + msg.setQuery(value); + break; + case 7: + var value = new proto.tendermint.abci.RequestBeginBlock; + reader.readMessage(value,proto.tendermint.abci.RequestBeginBlock.deserializeBinaryFromReader); + msg.setBeginBlock(value); + break; + case 8: + var value = new proto.tendermint.abci.RequestCheckTx; + reader.readMessage(value,proto.tendermint.abci.RequestCheckTx.deserializeBinaryFromReader); + msg.setCheckTx(value); + break; + case 9: + var value = new proto.tendermint.abci.RequestDeliverTx; + reader.readMessage(value,proto.tendermint.abci.RequestDeliverTx.deserializeBinaryFromReader); + msg.setDeliverTx(value); + break; + case 10: + var value = new proto.tendermint.abci.RequestEndBlock; + reader.readMessage(value,proto.tendermint.abci.RequestEndBlock.deserializeBinaryFromReader); + msg.setEndBlock(value); + break; + case 11: + var value = new proto.tendermint.abci.RequestCommit; + reader.readMessage(value,proto.tendermint.abci.RequestCommit.deserializeBinaryFromReader); + msg.setCommit(value); + break; + case 12: + var value = new proto.tendermint.abci.RequestListSnapshots; + reader.readMessage(value,proto.tendermint.abci.RequestListSnapshots.deserializeBinaryFromReader); + msg.setListSnapshots(value); + break; + case 13: + var value = new proto.tendermint.abci.RequestOfferSnapshot; + reader.readMessage(value,proto.tendermint.abci.RequestOfferSnapshot.deserializeBinaryFromReader); + msg.setOfferSnapshot(value); + break; + case 14: + var value = new proto.tendermint.abci.RequestLoadSnapshotChunk; + reader.readMessage(value,proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinaryFromReader); + msg.setLoadSnapshotChunk(value); + break; + case 15: + var value = new proto.tendermint.abci.RequestApplySnapshotChunk; + reader.readMessage(value,proto.tendermint.abci.RequestApplySnapshotChunk.deserializeBinaryFromReader); + msg.setApplySnapshotChunk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Request.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Request.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.Request} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Request.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEcho(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.RequestEcho.serializeBinaryToWriter + ); + } + f = message.getFlush(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.abci.RequestFlush.serializeBinaryToWriter + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.abci.RequestInfo.serializeBinaryToWriter + ); + } + f = message.getSetOption(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.abci.RequestSetOption.serializeBinaryToWriter + ); + } + f = message.getInitChain(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.abci.RequestInitChain.serializeBinaryToWriter + ); + } + f = message.getQuery(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.tendermint.abci.RequestQuery.serializeBinaryToWriter + ); + } + f = message.getBeginBlock(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.tendermint.abci.RequestBeginBlock.serializeBinaryToWriter + ); + } + f = message.getCheckTx(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.tendermint.abci.RequestCheckTx.serializeBinaryToWriter + ); + } + f = message.getDeliverTx(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.tendermint.abci.RequestDeliverTx.serializeBinaryToWriter + ); + } + f = message.getEndBlock(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.tendermint.abci.RequestEndBlock.serializeBinaryToWriter + ); + } + f = message.getCommit(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.tendermint.abci.RequestCommit.serializeBinaryToWriter + ); + } + f = message.getListSnapshots(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.tendermint.abci.RequestListSnapshots.serializeBinaryToWriter + ); + } + f = message.getOfferSnapshot(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.tendermint.abci.RequestOfferSnapshot.serializeBinaryToWriter + ); + } + f = message.getLoadSnapshotChunk(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.tendermint.abci.RequestLoadSnapshotChunk.serializeBinaryToWriter + ); + } + f = message.getApplySnapshotChunk(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.tendermint.abci.RequestApplySnapshotChunk.serializeBinaryToWriter + ); + } +}; + + +/** + * optional RequestEcho echo = 1; + * @return {?proto.tendermint.abci.RequestEcho} + */ +proto.tendermint.abci.Request.prototype.getEcho = function() { + return /** @type{?proto.tendermint.abci.RequestEcho} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestEcho, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestEcho|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setEcho = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearEcho = function() { + return this.setEcho(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasEcho = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional RequestFlush flush = 2; + * @return {?proto.tendermint.abci.RequestFlush} + */ +proto.tendermint.abci.Request.prototype.getFlush = function() { + return /** @type{?proto.tendermint.abci.RequestFlush} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestFlush, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestFlush|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setFlush = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearFlush = function() { + return this.setFlush(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasFlush = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional RequestInfo info = 3; + * @return {?proto.tendermint.abci.RequestInfo} + */ +proto.tendermint.abci.Request.prototype.getInfo = function() { + return /** @type{?proto.tendermint.abci.RequestInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestInfo, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestInfo|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearInfo = function() { + return this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional RequestSetOption set_option = 4; + * @return {?proto.tendermint.abci.RequestSetOption} + */ +proto.tendermint.abci.Request.prototype.getSetOption = function() { + return /** @type{?proto.tendermint.abci.RequestSetOption} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestSetOption, 4)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestSetOption|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setSetOption = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearSetOption = function() { + return this.setSetOption(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasSetOption = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional RequestInitChain init_chain = 5; + * @return {?proto.tendermint.abci.RequestInitChain} + */ +proto.tendermint.abci.Request.prototype.getInitChain = function() { + return /** @type{?proto.tendermint.abci.RequestInitChain} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestInitChain, 5)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestInitChain|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setInitChain = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearInitChain = function() { + return this.setInitChain(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasInitChain = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional RequestQuery query = 6; + * @return {?proto.tendermint.abci.RequestQuery} + */ +proto.tendermint.abci.Request.prototype.getQuery = function() { + return /** @type{?proto.tendermint.abci.RequestQuery} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestQuery, 6)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestQuery|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearQuery = function() { + return this.setQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasQuery = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional RequestBeginBlock begin_block = 7; + * @return {?proto.tendermint.abci.RequestBeginBlock} + */ +proto.tendermint.abci.Request.prototype.getBeginBlock = function() { + return /** @type{?proto.tendermint.abci.RequestBeginBlock} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestBeginBlock, 7)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestBeginBlock|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setBeginBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearBeginBlock = function() { + return this.setBeginBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasBeginBlock = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional RequestCheckTx check_tx = 8; + * @return {?proto.tendermint.abci.RequestCheckTx} + */ +proto.tendermint.abci.Request.prototype.getCheckTx = function() { + return /** @type{?proto.tendermint.abci.RequestCheckTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestCheckTx, 8)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestCheckTx|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setCheckTx = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearCheckTx = function() { + return this.setCheckTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasCheckTx = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional RequestDeliverTx deliver_tx = 9; + * @return {?proto.tendermint.abci.RequestDeliverTx} + */ +proto.tendermint.abci.Request.prototype.getDeliverTx = function() { + return /** @type{?proto.tendermint.abci.RequestDeliverTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestDeliverTx, 9)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestDeliverTx|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setDeliverTx = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearDeliverTx = function() { + return this.setDeliverTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasDeliverTx = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional RequestEndBlock end_block = 10; + * @return {?proto.tendermint.abci.RequestEndBlock} + */ +proto.tendermint.abci.Request.prototype.getEndBlock = function() { + return /** @type{?proto.tendermint.abci.RequestEndBlock} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestEndBlock, 10)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestEndBlock|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setEndBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearEndBlock = function() { + return this.setEndBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasEndBlock = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional RequestCommit commit = 11; + * @return {?proto.tendermint.abci.RequestCommit} + */ +proto.tendermint.abci.Request.prototype.getCommit = function() { + return /** @type{?proto.tendermint.abci.RequestCommit} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestCommit, 11)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestCommit|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setCommit = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearCommit = function() { + return this.setCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasCommit = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional RequestListSnapshots list_snapshots = 12; + * @return {?proto.tendermint.abci.RequestListSnapshots} + */ +proto.tendermint.abci.Request.prototype.getListSnapshots = function() { + return /** @type{?proto.tendermint.abci.RequestListSnapshots} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestListSnapshots, 12)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestListSnapshots|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setListSnapshots = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearListSnapshots = function() { + return this.setListSnapshots(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasListSnapshots = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional RequestOfferSnapshot offer_snapshot = 13; + * @return {?proto.tendermint.abci.RequestOfferSnapshot} + */ +proto.tendermint.abci.Request.prototype.getOfferSnapshot = function() { + return /** @type{?proto.tendermint.abci.RequestOfferSnapshot} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestOfferSnapshot, 13)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestOfferSnapshot|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setOfferSnapshot = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearOfferSnapshot = function() { + return this.setOfferSnapshot(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasOfferSnapshot = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional RequestLoadSnapshotChunk load_snapshot_chunk = 14; + * @return {?proto.tendermint.abci.RequestLoadSnapshotChunk} + */ +proto.tendermint.abci.Request.prototype.getLoadSnapshotChunk = function() { + return /** @type{?proto.tendermint.abci.RequestLoadSnapshotChunk} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestLoadSnapshotChunk, 14)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestLoadSnapshotChunk|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setLoadSnapshotChunk = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearLoadSnapshotChunk = function() { + return this.setLoadSnapshotChunk(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasLoadSnapshotChunk = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional RequestApplySnapshotChunk apply_snapshot_chunk = 15; + * @return {?proto.tendermint.abci.RequestApplySnapshotChunk} + */ +proto.tendermint.abci.Request.prototype.getApplySnapshotChunk = function() { + return /** @type{?proto.tendermint.abci.RequestApplySnapshotChunk} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestApplySnapshotChunk, 15)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestApplySnapshotChunk|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setApplySnapshotChunk = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.tendermint.abci.Request.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Request} returns this + */ +proto.tendermint.abci.Request.prototype.clearApplySnapshotChunk = function() { + return this.setApplySnapshotChunk(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasApplySnapshotChunk = function() { + return jspb.Message.getField(this, 15) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestEcho.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestEcho.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestEcho} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestEcho.toObject = function(includeInstance, msg) { + var f, obj = { + message: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestEcho} + */ +proto.tendermint.abci.RequestEcho.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestEcho; + return proto.tendermint.abci.RequestEcho.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestEcho} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestEcho} + */ +proto.tendermint.abci.RequestEcho.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestEcho.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestEcho.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestEcho} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestEcho.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.tendermint.abci.RequestEcho.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestEcho} returns this + */ +proto.tendermint.abci.RequestEcho.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestFlush.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestFlush.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestFlush} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestFlush.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestFlush} + */ +proto.tendermint.abci.RequestFlush.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestFlush; + return proto.tendermint.abci.RequestFlush.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestFlush} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestFlush} + */ +proto.tendermint.abci.RequestFlush.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestFlush.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestFlush.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestFlush} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestFlush.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestInfo.toObject = function(includeInstance, msg) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, ""), + blockVersion: jspb.Message.getFieldWithDefault(msg, 2, 0), + p2pVersion: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestInfo} + */ +proto.tendermint.abci.RequestInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestInfo; + return proto.tendermint.abci.RequestInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestInfo} + */ +proto.tendermint.abci.RequestInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlockVersion(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setP2pVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBlockVersion(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getP2pVersion(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string version = 1; + * @return {string} + */ +proto.tendermint.abci.RequestInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestInfo} returns this + */ +proto.tendermint.abci.RequestInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 block_version = 2; + * @return {number} + */ +proto.tendermint.abci.RequestInfo.prototype.getBlockVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestInfo} returns this + */ +proto.tendermint.abci.RequestInfo.prototype.setBlockVersion = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 p2p_version = 3; + * @return {number} + */ +proto.tendermint.abci.RequestInfo.prototype.getP2pVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestInfo} returns this + */ +proto.tendermint.abci.RequestInfo.prototype.setP2pVersion = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestSetOption.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestSetOption.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestSetOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestSetOption.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestSetOption} + */ +proto.tendermint.abci.RequestSetOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestSetOption; + return proto.tendermint.abci.RequestSetOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestSetOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestSetOption} + */ +proto.tendermint.abci.RequestSetOption.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestSetOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestSetOption.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestSetOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestSetOption.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.tendermint.abci.RequestSetOption.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestSetOption} returns this + */ +proto.tendermint.abci.RequestSetOption.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string value = 2; + * @return {string} + */ +proto.tendermint.abci.RequestSetOption.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestSetOption} returns this + */ +proto.tendermint.abci.RequestSetOption.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.RequestInitChain.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestInitChain.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestInitChain.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestInitChain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestInitChain.toObject = function(includeInstance, msg) { + var f, obj = { + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + chainId: jspb.Message.getFieldWithDefault(msg, 2, ""), + consensusParams: (f = msg.getConsensusParams()) && proto.tendermint.abci.ConsensusParams.toObject(includeInstance, f), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.tendermint.abci.ValidatorUpdate.toObject, includeInstance), + appStateBytes: msg.getAppStateBytes_asB64(), + initialHeight: jspb.Message.getFieldWithDefault(msg, 6, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestInitChain} + */ +proto.tendermint.abci.RequestInitChain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestInitChain; + return proto.tendermint.abci.RequestInitChain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestInitChain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestInitChain} + */ +proto.tendermint.abci.RequestInitChain.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 3: + var value = new proto.tendermint.abci.ConsensusParams; + reader.readMessage(value,proto.tendermint.abci.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParams(value); + break; + case 4: + var value = new proto.tendermint.abci.ValidatorUpdate; + reader.readMessage(value,proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppStateBytes(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setInitialHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestInitChain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestInitChain.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestInitChain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestInitChain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getConsensusParams(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.abci.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter + ); + } + f = message.getAppStateBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getInitialHeight(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } +}; + + +/** + * optional google.protobuf.Timestamp time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.abci.RequestInitChain.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this +*/ +proto.tendermint.abci.RequestInitChain.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestInitChain.prototype.hasTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string chain_id = 2; + * @return {string} + */ +proto.tendermint.abci.RequestInitChain.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional ConsensusParams consensus_params = 3; + * @return {?proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.RequestInitChain.prototype.getConsensusParams = function() { + return /** @type{?proto.tendermint.abci.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ConsensusParams, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.ConsensusParams|undefined} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this +*/ +proto.tendermint.abci.RequestInitChain.prototype.setConsensusParams = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.clearConsensusParams = function() { + return this.setConsensusParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestInitChain.prototype.hasConsensusParams = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated ValidatorUpdate validators = 4; + * @return {!Array} + */ +proto.tendermint.abci.RequestInitChain.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.ValidatorUpdate, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this +*/ +proto.tendermint.abci.RequestInitChain.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.tendermint.abci.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.RequestInitChain.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.abci.ValidatorUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional bytes app_state_bytes = 5; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestInitChain.prototype.getAppStateBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes app_state_bytes = 5; + * This is a type-conversion wrapper around `getAppStateBytes()` + * @return {string} + */ +proto.tendermint.abci.RequestInitChain.prototype.getAppStateBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppStateBytes())); +}; + + +/** + * optional bytes app_state_bytes = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppStateBytes()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestInitChain.prototype.getAppStateBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppStateBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.setAppStateBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional int64 initial_height = 6; + * @return {number} + */ +proto.tendermint.abci.RequestInitChain.prototype.getInitialHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.setInitialHeight = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestQuery.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestQuery.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestQuery} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestQuery.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + path: jspb.Message.getFieldWithDefault(msg, 2, ""), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestQuery} + */ +proto.tendermint.abci.RequestQuery.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestQuery; + return proto.tendermint.abci.RequestQuery.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestQuery} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestQuery} + */ +proto.tendermint.abci.RequestQuery.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPath(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestQuery.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestQuery.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestQuery} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestQuery.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestQuery.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.tendermint.abci.RequestQuery.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestQuery.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestQuery} returns this + */ +proto.tendermint.abci.RequestQuery.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string path = 2; + * @return {string} + */ +proto.tendermint.abci.RequestQuery.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestQuery} returns this + */ +proto.tendermint.abci.RequestQuery.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.tendermint.abci.RequestQuery.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestQuery} returns this + */ +proto.tendermint.abci.RequestQuery.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bool prove = 4; + * @return {boolean} + */ +proto.tendermint.abci.RequestQuery.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.tendermint.abci.RequestQuery} returns this + */ +proto.tendermint.abci.RequestQuery.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.RequestBeginBlock.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestBeginBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestBeginBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestBeginBlock.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_asB64(), + header: (f = msg.getHeader()) && tendermint_types_types_pb.Header.toObject(includeInstance, f), + lastCommitInfo: (f = msg.getLastCommitInfo()) && proto.tendermint.abci.LastCommitInfo.toObject(includeInstance, f), + byzantineValidatorsList: jspb.Message.toObjectList(msg.getByzantineValidatorsList(), + proto.tendermint.abci.Evidence.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestBeginBlock} + */ +proto.tendermint.abci.RequestBeginBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestBeginBlock; + return proto.tendermint.abci.RequestBeginBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestBeginBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestBeginBlock} + */ +proto.tendermint.abci.RequestBeginBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 2: + var value = new tendermint_types_types_pb.Header; + reader.readMessage(value,tendermint_types_types_pb.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 3: + var value = new proto.tendermint.abci.LastCommitInfo; + reader.readMessage(value,proto.tendermint.abci.LastCommitInfo.deserializeBinaryFromReader); + msg.setLastCommitInfo(value); + break; + case 4: + var value = new proto.tendermint.abci.Evidence; + reader.readMessage(value,proto.tendermint.abci.Evidence.deserializeBinaryFromReader); + msg.addByzantineValidators(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestBeginBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestBeginBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestBeginBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_types_pb.Header.serializeBinaryToWriter + ); + } + f = message.getLastCommitInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.abci.LastCommitInfo.serializeBinaryToWriter + ); + } + f = message.getByzantineValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.tendermint.abci.Evidence.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes hash = 1; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this + */ +proto.tendermint.abci.RequestBeginBlock.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional tendermint.types.Header header = 2; + * @return {?proto.tendermint.types.Header} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Header, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this +*/ +proto.tendermint.abci.RequestBeginBlock.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this + */ +proto.tendermint.abci.RequestBeginBlock.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.hasHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional LastCommitInfo last_commit_info = 3; + * @return {?proto.tendermint.abci.LastCommitInfo} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.getLastCommitInfo = function() { + return /** @type{?proto.tendermint.abci.LastCommitInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.LastCommitInfo, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.LastCommitInfo|undefined} value + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this +*/ +proto.tendermint.abci.RequestBeginBlock.prototype.setLastCommitInfo = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this + */ +proto.tendermint.abci.RequestBeginBlock.prototype.clearLastCommitInfo = function() { + return this.setLastCommitInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.hasLastCommitInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated Evidence byzantine_validators = 4; + * @return {!Array} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.getByzantineValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Evidence, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this +*/ +proto.tendermint.abci.RequestBeginBlock.prototype.setByzantineValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.tendermint.abci.Evidence=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Evidence} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.addByzantineValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.abci.Evidence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this + */ +proto.tendermint.abci.RequestBeginBlock.prototype.clearByzantineValidatorsList = function() { + return this.setByzantineValidatorsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestCheckTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestCheckTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestCheckTx.toObject = function(includeInstance, msg) { + var f, obj = { + tx: msg.getTx_asB64(), + type: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestCheckTx} + */ +proto.tendermint.abci.RequestCheckTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestCheckTx; + return proto.tendermint.abci.RequestCheckTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestCheckTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestCheckTx} + */ +proto.tendermint.abci.RequestCheckTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTx(value); + break; + case 2: + var value = /** @type {!proto.tendermint.abci.CheckTxType} */ (reader.readEnum()); + msg.setType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestCheckTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestCheckTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestCheckTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestCheckTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional bytes tx = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestCheckTx.prototype.getTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes tx = 1; + * This is a type-conversion wrapper around `getTx()` + * @return {string} + */ +proto.tendermint.abci.RequestCheckTx.prototype.getTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTx())); +}; + + +/** + * optional bytes tx = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTx()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestCheckTx.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestCheckTx} returns this + */ +proto.tendermint.abci.RequestCheckTx.prototype.setTx = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional CheckTxType type = 2; + * @return {!proto.tendermint.abci.CheckTxType} + */ +proto.tendermint.abci.RequestCheckTx.prototype.getType = function() { + return /** @type {!proto.tendermint.abci.CheckTxType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.tendermint.abci.CheckTxType} value + * @return {!proto.tendermint.abci.RequestCheckTx} returns this + */ +proto.tendermint.abci.RequestCheckTx.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestDeliverTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestDeliverTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestDeliverTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestDeliverTx.toObject = function(includeInstance, msg) { + var f, obj = { + tx: msg.getTx_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestDeliverTx} + */ +proto.tendermint.abci.RequestDeliverTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestDeliverTx; + return proto.tendermint.abci.RequestDeliverTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestDeliverTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestDeliverTx} + */ +proto.tendermint.abci.RequestDeliverTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestDeliverTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestDeliverTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestDeliverTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestDeliverTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes tx = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestDeliverTx.prototype.getTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes tx = 1; + * This is a type-conversion wrapper around `getTx()` + * @return {string} + */ +proto.tendermint.abci.RequestDeliverTx.prototype.getTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTx())); +}; + + +/** + * optional bytes tx = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTx()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestDeliverTx.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestDeliverTx} returns this + */ +proto.tendermint.abci.RequestDeliverTx.prototype.setTx = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestEndBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestEndBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestEndBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestEndBlock.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestEndBlock} + */ +proto.tendermint.abci.RequestEndBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestEndBlock; + return proto.tendermint.abci.RequestEndBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestEndBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestEndBlock} + */ +proto.tendermint.abci.RequestEndBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestEndBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestEndBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestEndBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestEndBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.abci.RequestEndBlock.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestEndBlock} returns this + */ +proto.tendermint.abci.RequestEndBlock.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestCommit.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestCommit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestCommit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestCommit.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestCommit} + */ +proto.tendermint.abci.RequestCommit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestCommit; + return proto.tendermint.abci.RequestCommit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestCommit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestCommit} + */ +proto.tendermint.abci.RequestCommit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestCommit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestCommit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestCommit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestCommit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestListSnapshots.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestListSnapshots.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestListSnapshots} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestListSnapshots.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestListSnapshots} + */ +proto.tendermint.abci.RequestListSnapshots.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestListSnapshots; + return proto.tendermint.abci.RequestListSnapshots.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestListSnapshots} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestListSnapshots} + */ +proto.tendermint.abci.RequestListSnapshots.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestListSnapshots.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestListSnapshots.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestListSnapshots} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestListSnapshots.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestOfferSnapshot.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestOfferSnapshot} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestOfferSnapshot.toObject = function(includeInstance, msg) { + var f, obj = { + snapshot: (f = msg.getSnapshot()) && proto.tendermint.abci.Snapshot.toObject(includeInstance, f), + appHash: msg.getAppHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestOfferSnapshot} + */ +proto.tendermint.abci.RequestOfferSnapshot.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestOfferSnapshot; + return proto.tendermint.abci.RequestOfferSnapshot.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestOfferSnapshot} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestOfferSnapshot} + */ +proto.tendermint.abci.RequestOfferSnapshot.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.abci.Snapshot; + reader.readMessage(value,proto.tendermint.abci.Snapshot.deserializeBinaryFromReader); + msg.setSnapshot(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestOfferSnapshot.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestOfferSnapshot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestOfferSnapshot.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSnapshot(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.Snapshot.serializeBinaryToWriter + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional Snapshot snapshot = 1; + * @return {?proto.tendermint.abci.Snapshot} + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.getSnapshot = function() { + return /** @type{?proto.tendermint.abci.Snapshot} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.Snapshot, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.Snapshot|undefined} value + * @return {!proto.tendermint.abci.RequestOfferSnapshot} returns this +*/ +proto.tendermint.abci.RequestOfferSnapshot.prototype.setSnapshot = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestOfferSnapshot} returns this + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.clearSnapshot = function() { + return this.setSnapshot(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.hasSnapshot = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes app_hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.getAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes app_hash = 2; + * This is a type-conversion wrapper around `getAppHash()` + * @return {string} + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.getAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppHash())); +}; + + +/** + * optional bytes app_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppHash()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestOfferSnapshot} returns this + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.setAppHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestLoadSnapshotChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + format: jspb.Message.getFieldWithDefault(msg, 2, 0), + chunk: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestLoadSnapshotChunk; + return proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFormat(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChunk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestLoadSnapshotChunk.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getFormat(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getChunk(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 format = 2; + * @return {number} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getFormat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setFormat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 chunk = 3; + * @return {number} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getChunk = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setChunk = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestApplySnapshotChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestApplySnapshotChunk.toObject = function(includeInstance, msg) { + var f, obj = { + index: jspb.Message.getFieldWithDefault(msg, 1, 0), + chunk: msg.getChunk_asB64(), + sender: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestApplySnapshotChunk; + return proto.tendermint.abci.RequestApplySnapshotChunk.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setIndex(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChunk(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestApplySnapshotChunk.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestApplySnapshotChunk.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getChunk_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional uint32 index = 1; + * @return {number} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes chunk = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes chunk = 2; + * This is a type-conversion wrapper around `getChunk()` + * @return {string} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChunk())); +}; + + +/** + * optional bytes chunk = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChunk()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChunk())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.setChunk = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.abci.Response.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]]; + +/** + * @enum {number} + */ +proto.tendermint.abci.Response.ValueCase = { + VALUE_NOT_SET: 0, + EXCEPTION: 1, + ECHO: 2, + FLUSH: 3, + INFO: 4, + SET_OPTION: 5, + INIT_CHAIN: 6, + QUERY: 7, + BEGIN_BLOCK: 8, + CHECK_TX: 9, + DELIVER_TX: 10, + END_BLOCK: 11, + COMMIT: 12, + LIST_SNAPSHOTS: 13, + OFFER_SNAPSHOT: 14, + LOAD_SNAPSHOT_CHUNK: 15, + APPLY_SNAPSHOT_CHUNK: 16 +}; + +/** + * @return {proto.tendermint.abci.Response.ValueCase} + */ +proto.tendermint.abci.Response.prototype.getValueCase = function() { + return /** @type {proto.tendermint.abci.Response.ValueCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.abci.Response.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.Response.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Response.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.Response} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Response.toObject = function(includeInstance, msg) { + var f, obj = { + exception: (f = msg.getException()) && proto.tendermint.abci.ResponseException.toObject(includeInstance, f), + echo: (f = msg.getEcho()) && proto.tendermint.abci.ResponseEcho.toObject(includeInstance, f), + flush: (f = msg.getFlush()) && proto.tendermint.abci.ResponseFlush.toObject(includeInstance, f), + info: (f = msg.getInfo()) && proto.tendermint.abci.ResponseInfo.toObject(includeInstance, f), + setOption: (f = msg.getSetOption()) && proto.tendermint.abci.ResponseSetOption.toObject(includeInstance, f), + initChain: (f = msg.getInitChain()) && proto.tendermint.abci.ResponseInitChain.toObject(includeInstance, f), + query: (f = msg.getQuery()) && proto.tendermint.abci.ResponseQuery.toObject(includeInstance, f), + beginBlock: (f = msg.getBeginBlock()) && proto.tendermint.abci.ResponseBeginBlock.toObject(includeInstance, f), + checkTx: (f = msg.getCheckTx()) && proto.tendermint.abci.ResponseCheckTx.toObject(includeInstance, f), + deliverTx: (f = msg.getDeliverTx()) && proto.tendermint.abci.ResponseDeliverTx.toObject(includeInstance, f), + endBlock: (f = msg.getEndBlock()) && proto.tendermint.abci.ResponseEndBlock.toObject(includeInstance, f), + commit: (f = msg.getCommit()) && proto.tendermint.abci.ResponseCommit.toObject(includeInstance, f), + listSnapshots: (f = msg.getListSnapshots()) && proto.tendermint.abci.ResponseListSnapshots.toObject(includeInstance, f), + offerSnapshot: (f = msg.getOfferSnapshot()) && proto.tendermint.abci.ResponseOfferSnapshot.toObject(includeInstance, f), + loadSnapshotChunk: (f = msg.getLoadSnapshotChunk()) && proto.tendermint.abci.ResponseLoadSnapshotChunk.toObject(includeInstance, f), + applySnapshotChunk: (f = msg.getApplySnapshotChunk()) && proto.tendermint.abci.ResponseApplySnapshotChunk.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.Response} + */ +proto.tendermint.abci.Response.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Response; + return proto.tendermint.abci.Response.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Response} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Response} + */ +proto.tendermint.abci.Response.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.abci.ResponseException; + reader.readMessage(value,proto.tendermint.abci.ResponseException.deserializeBinaryFromReader); + msg.setException(value); + break; + case 2: + var value = new proto.tendermint.abci.ResponseEcho; + reader.readMessage(value,proto.tendermint.abci.ResponseEcho.deserializeBinaryFromReader); + msg.setEcho(value); + break; + case 3: + var value = new proto.tendermint.abci.ResponseFlush; + reader.readMessage(value,proto.tendermint.abci.ResponseFlush.deserializeBinaryFromReader); + msg.setFlush(value); + break; + case 4: + var value = new proto.tendermint.abci.ResponseInfo; + reader.readMessage(value,proto.tendermint.abci.ResponseInfo.deserializeBinaryFromReader); + msg.setInfo(value); + break; + case 5: + var value = new proto.tendermint.abci.ResponseSetOption; + reader.readMessage(value,proto.tendermint.abci.ResponseSetOption.deserializeBinaryFromReader); + msg.setSetOption(value); + break; + case 6: + var value = new proto.tendermint.abci.ResponseInitChain; + reader.readMessage(value,proto.tendermint.abci.ResponseInitChain.deserializeBinaryFromReader); + msg.setInitChain(value); + break; + case 7: + var value = new proto.tendermint.abci.ResponseQuery; + reader.readMessage(value,proto.tendermint.abci.ResponseQuery.deserializeBinaryFromReader); + msg.setQuery(value); + break; + case 8: + var value = new proto.tendermint.abci.ResponseBeginBlock; + reader.readMessage(value,proto.tendermint.abci.ResponseBeginBlock.deserializeBinaryFromReader); + msg.setBeginBlock(value); + break; + case 9: + var value = new proto.tendermint.abci.ResponseCheckTx; + reader.readMessage(value,proto.tendermint.abci.ResponseCheckTx.deserializeBinaryFromReader); + msg.setCheckTx(value); + break; + case 10: + var value = new proto.tendermint.abci.ResponseDeliverTx; + reader.readMessage(value,proto.tendermint.abci.ResponseDeliverTx.deserializeBinaryFromReader); + msg.setDeliverTx(value); + break; + case 11: + var value = new proto.tendermint.abci.ResponseEndBlock; + reader.readMessage(value,proto.tendermint.abci.ResponseEndBlock.deserializeBinaryFromReader); + msg.setEndBlock(value); + break; + case 12: + var value = new proto.tendermint.abci.ResponseCommit; + reader.readMessage(value,proto.tendermint.abci.ResponseCommit.deserializeBinaryFromReader); + msg.setCommit(value); + break; + case 13: + var value = new proto.tendermint.abci.ResponseListSnapshots; + reader.readMessage(value,proto.tendermint.abci.ResponseListSnapshots.deserializeBinaryFromReader); + msg.setListSnapshots(value); + break; + case 14: + var value = new proto.tendermint.abci.ResponseOfferSnapshot; + reader.readMessage(value,proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinaryFromReader); + msg.setOfferSnapshot(value); + break; + case 15: + var value = new proto.tendermint.abci.ResponseLoadSnapshotChunk; + reader.readMessage(value,proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinaryFromReader); + msg.setLoadSnapshotChunk(value); + break; + case 16: + var value = new proto.tendermint.abci.ResponseApplySnapshotChunk; + reader.readMessage(value,proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinaryFromReader); + msg.setApplySnapshotChunk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Response.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Response.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.Response} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Response.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getException(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.ResponseException.serializeBinaryToWriter + ); + } + f = message.getEcho(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.abci.ResponseEcho.serializeBinaryToWriter + ); + } + f = message.getFlush(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.abci.ResponseFlush.serializeBinaryToWriter + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.abci.ResponseInfo.serializeBinaryToWriter + ); + } + f = message.getSetOption(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.abci.ResponseSetOption.serializeBinaryToWriter + ); + } + f = message.getInitChain(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.tendermint.abci.ResponseInitChain.serializeBinaryToWriter + ); + } + f = message.getQuery(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.tendermint.abci.ResponseQuery.serializeBinaryToWriter + ); + } + f = message.getBeginBlock(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.tendermint.abci.ResponseBeginBlock.serializeBinaryToWriter + ); + } + f = message.getCheckTx(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.tendermint.abci.ResponseCheckTx.serializeBinaryToWriter + ); + } + f = message.getDeliverTx(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.tendermint.abci.ResponseDeliverTx.serializeBinaryToWriter + ); + } + f = message.getEndBlock(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.tendermint.abci.ResponseEndBlock.serializeBinaryToWriter + ); + } + f = message.getCommit(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.tendermint.abci.ResponseCommit.serializeBinaryToWriter + ); + } + f = message.getListSnapshots(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.tendermint.abci.ResponseListSnapshots.serializeBinaryToWriter + ); + } + f = message.getOfferSnapshot(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.tendermint.abci.ResponseOfferSnapshot.serializeBinaryToWriter + ); + } + f = message.getLoadSnapshotChunk(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.tendermint.abci.ResponseLoadSnapshotChunk.serializeBinaryToWriter + ); + } + f = message.getApplySnapshotChunk(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.tendermint.abci.ResponseApplySnapshotChunk.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ResponseException exception = 1; + * @return {?proto.tendermint.abci.ResponseException} + */ +proto.tendermint.abci.Response.prototype.getException = function() { + return /** @type{?proto.tendermint.abci.ResponseException} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseException, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseException|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setException = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearException = function() { + return this.setException(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasException = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ResponseEcho echo = 2; + * @return {?proto.tendermint.abci.ResponseEcho} + */ +proto.tendermint.abci.Response.prototype.getEcho = function() { + return /** @type{?proto.tendermint.abci.ResponseEcho} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseEcho, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseEcho|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setEcho = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearEcho = function() { + return this.setEcho(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasEcho = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ResponseFlush flush = 3; + * @return {?proto.tendermint.abci.ResponseFlush} + */ +proto.tendermint.abci.Response.prototype.getFlush = function() { + return /** @type{?proto.tendermint.abci.ResponseFlush} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseFlush, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseFlush|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setFlush = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearFlush = function() { + return this.setFlush(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasFlush = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ResponseInfo info = 4; + * @return {?proto.tendermint.abci.ResponseInfo} + */ +proto.tendermint.abci.Response.prototype.getInfo = function() { + return /** @type{?proto.tendermint.abci.ResponseInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseInfo, 4)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseInfo|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearInfo = function() { + return this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasInfo = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional ResponseSetOption set_option = 5; + * @return {?proto.tendermint.abci.ResponseSetOption} + */ +proto.tendermint.abci.Response.prototype.getSetOption = function() { + return /** @type{?proto.tendermint.abci.ResponseSetOption} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseSetOption, 5)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseSetOption|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setSetOption = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearSetOption = function() { + return this.setSetOption(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasSetOption = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional ResponseInitChain init_chain = 6; + * @return {?proto.tendermint.abci.ResponseInitChain} + */ +proto.tendermint.abci.Response.prototype.getInitChain = function() { + return /** @type{?proto.tendermint.abci.ResponseInitChain} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseInitChain, 6)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseInitChain|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setInitChain = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearInitChain = function() { + return this.setInitChain(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasInitChain = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional ResponseQuery query = 7; + * @return {?proto.tendermint.abci.ResponseQuery} + */ +proto.tendermint.abci.Response.prototype.getQuery = function() { + return /** @type{?proto.tendermint.abci.ResponseQuery} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseQuery, 7)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseQuery|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearQuery = function() { + return this.setQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasQuery = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional ResponseBeginBlock begin_block = 8; + * @return {?proto.tendermint.abci.ResponseBeginBlock} + */ +proto.tendermint.abci.Response.prototype.getBeginBlock = function() { + return /** @type{?proto.tendermint.abci.ResponseBeginBlock} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseBeginBlock, 8)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseBeginBlock|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setBeginBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearBeginBlock = function() { + return this.setBeginBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasBeginBlock = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional ResponseCheckTx check_tx = 9; + * @return {?proto.tendermint.abci.ResponseCheckTx} + */ +proto.tendermint.abci.Response.prototype.getCheckTx = function() { + return /** @type{?proto.tendermint.abci.ResponseCheckTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseCheckTx, 9)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseCheckTx|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setCheckTx = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearCheckTx = function() { + return this.setCheckTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasCheckTx = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional ResponseDeliverTx deliver_tx = 10; + * @return {?proto.tendermint.abci.ResponseDeliverTx} + */ +proto.tendermint.abci.Response.prototype.getDeliverTx = function() { + return /** @type{?proto.tendermint.abci.ResponseDeliverTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseDeliverTx, 10)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseDeliverTx|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setDeliverTx = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearDeliverTx = function() { + return this.setDeliverTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasDeliverTx = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional ResponseEndBlock end_block = 11; + * @return {?proto.tendermint.abci.ResponseEndBlock} + */ +proto.tendermint.abci.Response.prototype.getEndBlock = function() { + return /** @type{?proto.tendermint.abci.ResponseEndBlock} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseEndBlock, 11)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseEndBlock|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setEndBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearEndBlock = function() { + return this.setEndBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasEndBlock = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional ResponseCommit commit = 12; + * @return {?proto.tendermint.abci.ResponseCommit} + */ +proto.tendermint.abci.Response.prototype.getCommit = function() { + return /** @type{?proto.tendermint.abci.ResponseCommit} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseCommit, 12)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseCommit|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setCommit = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearCommit = function() { + return this.setCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasCommit = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional ResponseListSnapshots list_snapshots = 13; + * @return {?proto.tendermint.abci.ResponseListSnapshots} + */ +proto.tendermint.abci.Response.prototype.getListSnapshots = function() { + return /** @type{?proto.tendermint.abci.ResponseListSnapshots} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseListSnapshots, 13)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseListSnapshots|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setListSnapshots = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearListSnapshots = function() { + return this.setListSnapshots(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasListSnapshots = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional ResponseOfferSnapshot offer_snapshot = 14; + * @return {?proto.tendermint.abci.ResponseOfferSnapshot} + */ +proto.tendermint.abci.Response.prototype.getOfferSnapshot = function() { + return /** @type{?proto.tendermint.abci.ResponseOfferSnapshot} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseOfferSnapshot, 14)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseOfferSnapshot|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setOfferSnapshot = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearOfferSnapshot = function() { + return this.setOfferSnapshot(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasOfferSnapshot = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional ResponseLoadSnapshotChunk load_snapshot_chunk = 15; + * @return {?proto.tendermint.abci.ResponseLoadSnapshotChunk} + */ +proto.tendermint.abci.Response.prototype.getLoadSnapshotChunk = function() { + return /** @type{?proto.tendermint.abci.ResponseLoadSnapshotChunk} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseLoadSnapshotChunk, 15)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseLoadSnapshotChunk|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setLoadSnapshotChunk = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearLoadSnapshotChunk = function() { + return this.setLoadSnapshotChunk(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasLoadSnapshotChunk = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional ResponseApplySnapshotChunk apply_snapshot_chunk = 16; + * @return {?proto.tendermint.abci.ResponseApplySnapshotChunk} + */ +proto.tendermint.abci.Response.prototype.getApplySnapshotChunk = function() { + return /** @type{?proto.tendermint.abci.ResponseApplySnapshotChunk} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseApplySnapshotChunk, 16)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseApplySnapshotChunk|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setApplySnapshotChunk = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.tendermint.abci.Response.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Response} returns this + */ +proto.tendermint.abci.Response.prototype.clearApplySnapshotChunk = function() { + return this.setApplySnapshotChunk(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasApplySnapshotChunk = function() { + return jspb.Message.getField(this, 16) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseException.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseException.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseException} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseException.toObject = function(includeInstance, msg) { + var f, obj = { + error: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseException} + */ +proto.tendermint.abci.ResponseException.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseException; + return proto.tendermint.abci.ResponseException.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseException} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseException} + */ +proto.tendermint.abci.ResponseException.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseException.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseException.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseException} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseException.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string error = 1; + * @return {string} + */ +proto.tendermint.abci.ResponseException.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseException} returns this + */ +proto.tendermint.abci.ResponseException.prototype.setError = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseEcho.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseEcho.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseEcho} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseEcho.toObject = function(includeInstance, msg) { + var f, obj = { + message: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseEcho} + */ +proto.tendermint.abci.ResponseEcho.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseEcho; + return proto.tendermint.abci.ResponseEcho.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseEcho} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseEcho} + */ +proto.tendermint.abci.ResponseEcho.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseEcho.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseEcho.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseEcho} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseEcho.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.tendermint.abci.ResponseEcho.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseEcho} returns this + */ +proto.tendermint.abci.ResponseEcho.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseFlush.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseFlush.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseFlush} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseFlush.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseFlush} + */ +proto.tendermint.abci.ResponseFlush.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseFlush; + return proto.tendermint.abci.ResponseFlush.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseFlush} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseFlush} + */ +proto.tendermint.abci.ResponseFlush.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseFlush.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseFlush.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseFlush} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseFlush.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseInfo.toObject = function(includeInstance, msg) { + var f, obj = { + data: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: jspb.Message.getFieldWithDefault(msg, 2, ""), + appVersion: jspb.Message.getFieldWithDefault(msg, 3, 0), + lastBlockHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + lastBlockAppHash: msg.getLastBlockAppHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseInfo} + */ +proto.tendermint.abci.ResponseInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseInfo; + return proto.tendermint.abci.ResponseInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseInfo} + */ +proto.tendermint.abci.ResponseInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAppVersion(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastBlockHeight(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastBlockAppHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAppVersion(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getLastBlockHeight(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getLastBlockAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional string data = 1; + * @return {string} + */ +proto.tendermint.abci.ResponseInfo.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string version = 2; + * @return {string} + */ +proto.tendermint.abci.ResponseInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 app_version = 3; + * @return {number} + */ +proto.tendermint.abci.ResponseInfo.prototype.getAppVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setAppVersion = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 last_block_height = 4; + * @return {number} + */ +proto.tendermint.abci.ResponseInfo.prototype.getLastBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setLastBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes last_block_app_hash = 5; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseInfo.prototype.getLastBlockAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes last_block_app_hash = 5; + * This is a type-conversion wrapper around `getLastBlockAppHash()` + * @return {string} + */ +proto.tendermint.abci.ResponseInfo.prototype.getLastBlockAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastBlockAppHash())); +}; + + +/** + * optional bytes last_block_app_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastBlockAppHash()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseInfo.prototype.getLastBlockAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastBlockAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setLastBlockAppHash = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseSetOption.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseSetOption.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseSetOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseSetOption.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseSetOption} + */ +proto.tendermint.abci.ResponseSetOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseSetOption; + return proto.tendermint.abci.ResponseSetOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseSetOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseSetOption} + */ +proto.tendermint.abci.ResponseSetOption.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseSetOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseSetOption.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseSetOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseSetOption.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.tendermint.abci.ResponseSetOption.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseSetOption} returns this + */ +proto.tendermint.abci.ResponseSetOption.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.tendermint.abci.ResponseSetOption.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseSetOption} returns this + */ +proto.tendermint.abci.ResponseSetOption.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.tendermint.abci.ResponseSetOption.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseSetOption} returns this + */ +proto.tendermint.abci.ResponseSetOption.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseInitChain.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseInitChain.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseInitChain.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseInitChain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseInitChain.toObject = function(includeInstance, msg) { + var f, obj = { + consensusParams: (f = msg.getConsensusParams()) && proto.tendermint.abci.ConsensusParams.toObject(includeInstance, f), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.tendermint.abci.ValidatorUpdate.toObject, includeInstance), + appHash: msg.getAppHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseInitChain} + */ +proto.tendermint.abci.ResponseInitChain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseInitChain; + return proto.tendermint.abci.ResponseInitChain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseInitChain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseInitChain} + */ +proto.tendermint.abci.ResponseInitChain.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.abci.ConsensusParams; + reader.readMessage(value,proto.tendermint.abci.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParams(value); + break; + case 2: + var value = new proto.tendermint.abci.ValidatorUpdate; + reader.readMessage(value,proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseInitChain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseInitChain.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseInitChain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseInitChain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional ConsensusParams consensus_params = 1; + * @return {?proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getConsensusParams = function() { + return /** @type{?proto.tendermint.abci.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ConsensusParams, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.ConsensusParams|undefined} value + * @return {!proto.tendermint.abci.ResponseInitChain} returns this +*/ +proto.tendermint.abci.ResponseInitChain.prototype.setConsensusParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ResponseInitChain} returns this + */ +proto.tendermint.abci.ResponseInitChain.prototype.clearConsensusParams = function() { + return this.setConsensusParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ResponseInitChain.prototype.hasConsensusParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated ValidatorUpdate validators = 2; + * @return {!Array} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.ValidatorUpdate, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseInitChain} returns this +*/ +proto.tendermint.abci.ResponseInitChain.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.tendermint.abci.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.ResponseInitChain.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tendermint.abci.ValidatorUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseInitChain} returns this + */ +proto.tendermint.abci.ResponseInitChain.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional bytes app_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes app_hash = 3; + * This is a type-conversion wrapper around `getAppHash()` + * @return {string} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppHash())); +}; + + +/** + * optional bytes app_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppHash()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseInitChain} returns this + */ +proto.tendermint.abci.ResponseInitChain.prototype.setAppHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseQuery.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseQuery.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseQuery} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseQuery.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: jspb.Message.getFieldWithDefault(msg, 4, ""), + index: jspb.Message.getFieldWithDefault(msg, 5, 0), + key: msg.getKey_asB64(), + value: msg.getValue_asB64(), + proofOps: (f = msg.getProofOps()) && tendermint_crypto_proof_pb.ProofOps.toObject(includeInstance, f), + height: jspb.Message.getFieldWithDefault(msg, 9, 0), + codespace: jspb.Message.getFieldWithDefault(msg, 10, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseQuery} + */ +proto.tendermint.abci.ResponseQuery.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseQuery; + return proto.tendermint.abci.ResponseQuery.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseQuery} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseQuery} + */ +proto.tendermint.abci.ResponseQuery.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setIndex(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + case 8: + var value = new tendermint_crypto_proof_pb.ProofOps; + reader.readMessage(value,tendermint_crypto_proof_pb.ProofOps.deserializeBinaryFromReader); + msg.setProofOps(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setCodespace(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseQuery.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseQuery.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseQuery} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseQuery.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProofOps(); + if (f != null) { + writer.writeMessage( + 8, + f, + tendermint_crypto_proof_pb.ProofOps.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getCodespace(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.tendermint.abci.ResponseQuery.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 index = 5; + * @return {number} + */ +proto.tendermint.abci.ResponseQuery.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional bytes key = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseQuery.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes key = 6; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseQuery.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional bytes value = 7; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseQuery.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes value = 7; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseQuery.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional tendermint.crypto.ProofOps proof_ops = 8; + * @return {?proto.tendermint.crypto.ProofOps} + */ +proto.tendermint.abci.ResponseQuery.prototype.getProofOps = function() { + return /** @type{?proto.tendermint.crypto.ProofOps} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_proof_pb.ProofOps, 8)); +}; + + +/** + * @param {?proto.tendermint.crypto.ProofOps|undefined} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this +*/ +proto.tendermint.abci.ResponseQuery.prototype.setProofOps = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.clearProofOps = function() { + return this.setProofOps(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ResponseQuery.prototype.hasProofOps = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional int64 height = 9; + * @return {number} + */ +proto.tendermint.abci.ResponseQuery.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional string codespace = 10; + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getCodespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseBeginBlock.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseBeginBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseBeginBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseBeginBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseBeginBlock.toObject = function(includeInstance, msg) { + var f, obj = { + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.tendermint.abci.Event.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseBeginBlock} + */ +proto.tendermint.abci.ResponseBeginBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseBeginBlock; + return proto.tendermint.abci.ResponseBeginBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseBeginBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseBeginBlock} + */ +proto.tendermint.abci.ResponseBeginBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.abci.Event; + reader.readMessage(value,proto.tendermint.abci.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseBeginBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseBeginBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseBeginBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseBeginBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.abci.Event.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Event events = 1; + * @return {!Array} + */ +proto.tendermint.abci.ResponseBeginBlock.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseBeginBlock} returns this +*/ +proto.tendermint.abci.ResponseBeginBlock.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} + */ +proto.tendermint.abci.ResponseBeginBlock.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.abci.Event, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseBeginBlock} returns this + */ +proto.tendermint.abci.ResponseBeginBlock.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseCheckTx.repeatedFields_ = [7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseCheckTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseCheckTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseCheckTx.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + data: msg.getData_asB64(), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: jspb.Message.getFieldWithDefault(msg, 4, ""), + gasWanted: jspb.Message.getFieldWithDefault(msg, 5, 0), + gasUsed: jspb.Message.getFieldWithDefault(msg, 6, 0), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.tendermint.abci.Event.toObject, includeInstance), + codespace: jspb.Message.getFieldWithDefault(msg, 8, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseCheckTx} + */ +proto.tendermint.abci.ResponseCheckTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseCheckTx; + return proto.tendermint.abci.ResponseCheckTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseCheckTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseCheckTx} + */ +proto.tendermint.abci.ResponseCheckTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasWanted(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasUsed(value); + break; + case 7: + var value = new proto.tendermint.abci.Event; + reader.readMessage(value,proto.tendermint.abci.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setCodespace(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseCheckTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseCheckTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseCheckTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getGasWanted(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getGasUsed(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.tendermint.abci.Event.serializeBinaryToWriter + ); + } + f = message.getCodespace(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 gas_wanted = 5; + * @return {number} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getGasWanted = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setGasWanted = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 gas_used = 6; + * @return {number} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getGasUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setGasUsed = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * repeated Event events = 7; + * @return {!Array} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this +*/ +proto.tendermint.abci.ResponseCheckTx.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.tendermint.abci.Event, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + +/** + * optional string codespace = 8; + * @return {string} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getCodespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseDeliverTx.repeatedFields_ = [7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseDeliverTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseDeliverTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseDeliverTx.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + data: msg.getData_asB64(), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: jspb.Message.getFieldWithDefault(msg, 4, ""), + gasWanted: jspb.Message.getFieldWithDefault(msg, 5, 0), + gasUsed: jspb.Message.getFieldWithDefault(msg, 6, 0), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.tendermint.abci.Event.toObject, includeInstance), + codespace: jspb.Message.getFieldWithDefault(msg, 8, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseDeliverTx} + */ +proto.tendermint.abci.ResponseDeliverTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseDeliverTx; + return proto.tendermint.abci.ResponseDeliverTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseDeliverTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseDeliverTx} + */ +proto.tendermint.abci.ResponseDeliverTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasWanted(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasUsed(value); + break; + case 7: + var value = new proto.tendermint.abci.Event; + reader.readMessage(value,proto.tendermint.abci.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setCodespace(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseDeliverTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseDeliverTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseDeliverTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getGasWanted(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getGasUsed(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.tendermint.abci.Event.serializeBinaryToWriter + ); + } + f = message.getCodespace(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 gas_wanted = 5; + * @return {number} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getGasWanted = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setGasWanted = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 gas_used = 6; + * @return {number} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getGasUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setGasUsed = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * repeated Event events = 7; + * @return {!Array} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this +*/ +proto.tendermint.abci.ResponseDeliverTx.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.tendermint.abci.Event, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + +/** + * optional string codespace = 8; + * @return {string} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getCodespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseEndBlock.repeatedFields_ = [1,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseEndBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseEndBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseEndBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseEndBlock.toObject = function(includeInstance, msg) { + var f, obj = { + validatorUpdatesList: jspb.Message.toObjectList(msg.getValidatorUpdatesList(), + proto.tendermint.abci.ValidatorUpdate.toObject, includeInstance), + consensusParamUpdates: (f = msg.getConsensusParamUpdates()) && proto.tendermint.abci.ConsensusParams.toObject(includeInstance, f), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.tendermint.abci.Event.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseEndBlock} + */ +proto.tendermint.abci.ResponseEndBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseEndBlock; + return proto.tendermint.abci.ResponseEndBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseEndBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseEndBlock} + */ +proto.tendermint.abci.ResponseEndBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.abci.ValidatorUpdate; + reader.readMessage(value,proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidatorUpdates(value); + break; + case 2: + var value = new proto.tendermint.abci.ConsensusParams; + reader.readMessage(value,proto.tendermint.abci.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParamUpdates(value); + break; + case 3: + var value = new proto.tendermint.abci.Event; + reader.readMessage(value,proto.tendermint.abci.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseEndBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseEndBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseEndBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseEndBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorUpdatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter + ); + } + f = message.getConsensusParamUpdates(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.abci.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.tendermint.abci.Event.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ValidatorUpdate validator_updates = 1; + * @return {!Array} + */ +proto.tendermint.abci.ResponseEndBlock.prototype.getValidatorUpdatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.ValidatorUpdate, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseEndBlock} returns this +*/ +proto.tendermint.abci.ResponseEndBlock.prototype.setValidatorUpdatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.abci.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.ResponseEndBlock.prototype.addValidatorUpdates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.abci.ValidatorUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseEndBlock} returns this + */ +proto.tendermint.abci.ResponseEndBlock.prototype.clearValidatorUpdatesList = function() { + return this.setValidatorUpdatesList([]); +}; + + +/** + * optional ConsensusParams consensus_param_updates = 2; + * @return {?proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.ResponseEndBlock.prototype.getConsensusParamUpdates = function() { + return /** @type{?proto.tendermint.abci.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ConsensusParams, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.ConsensusParams|undefined} value + * @return {!proto.tendermint.abci.ResponseEndBlock} returns this +*/ +proto.tendermint.abci.ResponseEndBlock.prototype.setConsensusParamUpdates = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ResponseEndBlock} returns this + */ +proto.tendermint.abci.ResponseEndBlock.prototype.clearConsensusParamUpdates = function() { + return this.setConsensusParamUpdates(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ResponseEndBlock.prototype.hasConsensusParamUpdates = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated Event events = 3; + * @return {!Array} + */ +proto.tendermint.abci.ResponseEndBlock.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseEndBlock} returns this +*/ +proto.tendermint.abci.ResponseEndBlock.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} + */ +proto.tendermint.abci.ResponseEndBlock.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tendermint.abci.Event, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseEndBlock} returns this + */ +proto.tendermint.abci.ResponseEndBlock.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseCommit.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseCommit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseCommit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseCommit.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + retainHeight: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseCommit} + */ +proto.tendermint.abci.ResponseCommit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseCommit; + return proto.tendermint.abci.ResponseCommit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseCommit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseCommit} + */ +proto.tendermint.abci.ResponseCommit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRetainHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseCommit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseCommit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseCommit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseCommit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getRetainHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseCommit.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.tendermint.abci.ResponseCommit.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseCommit.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseCommit} returns this + */ +proto.tendermint.abci.ResponseCommit.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional int64 retain_height = 3; + * @return {number} + */ +proto.tendermint.abci.ResponseCommit.prototype.getRetainHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseCommit} returns this + */ +proto.tendermint.abci.ResponseCommit.prototype.setRetainHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseListSnapshots.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseListSnapshots.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseListSnapshots.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseListSnapshots} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseListSnapshots.toObject = function(includeInstance, msg) { + var f, obj = { + snapshotsList: jspb.Message.toObjectList(msg.getSnapshotsList(), + proto.tendermint.abci.Snapshot.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseListSnapshots} + */ +proto.tendermint.abci.ResponseListSnapshots.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseListSnapshots; + return proto.tendermint.abci.ResponseListSnapshots.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseListSnapshots} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseListSnapshots} + */ +proto.tendermint.abci.ResponseListSnapshots.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.abci.Snapshot; + reader.readMessage(value,proto.tendermint.abci.Snapshot.deserializeBinaryFromReader); + msg.addSnapshots(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseListSnapshots.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseListSnapshots.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseListSnapshots} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseListSnapshots.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSnapshotsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.abci.Snapshot.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Snapshot snapshots = 1; + * @return {!Array} + */ +proto.tendermint.abci.ResponseListSnapshots.prototype.getSnapshotsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Snapshot, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseListSnapshots} returns this +*/ +proto.tendermint.abci.ResponseListSnapshots.prototype.setSnapshotsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.abci.Snapshot=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Snapshot} + */ +proto.tendermint.abci.ResponseListSnapshots.prototype.addSnapshots = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.abci.Snapshot, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseListSnapshots} returns this + */ +proto.tendermint.abci.ResponseListSnapshots.prototype.clearSnapshotsList = function() { + return this.setSnapshotsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseOfferSnapshot.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseOfferSnapshot.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseOfferSnapshot} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseOfferSnapshot.toObject = function(includeInstance, msg) { + var f, obj = { + result: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseOfferSnapshot} + */ +proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseOfferSnapshot; + return proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseOfferSnapshot} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseOfferSnapshot} + */ +proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.tendermint.abci.ResponseOfferSnapshot.Result} */ (reader.readEnum()); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseOfferSnapshot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseOfferSnapshot.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseOfferSnapshot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseOfferSnapshot.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.tendermint.abci.ResponseOfferSnapshot.Result = { + UNKNOWN: 0, + ACCEPT: 1, + ABORT: 2, + REJECT: 3, + REJECT_FORMAT: 4, + REJECT_SENDER: 5 +}; + +/** + * optional Result result = 1; + * @return {!proto.tendermint.abci.ResponseOfferSnapshot.Result} + */ +proto.tendermint.abci.ResponseOfferSnapshot.prototype.getResult = function() { + return /** @type {!proto.tendermint.abci.ResponseOfferSnapshot.Result} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.abci.ResponseOfferSnapshot.Result} value + * @return {!proto.tendermint.abci.ResponseOfferSnapshot} returns this + */ +proto.tendermint.abci.ResponseOfferSnapshot.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseLoadSnapshotChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseLoadSnapshotChunk} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.toObject = function(includeInstance, msg) { + var f, obj = { + chunk: msg.getChunk_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseLoadSnapshotChunk; + return proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseLoadSnapshotChunk} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChunk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseLoadSnapshotChunk.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseLoadSnapshotChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChunk_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes chunk = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.getChunk = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes chunk = 1; + * This is a type-conversion wrapper around `getChunk()` + * @return {string} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.getChunk_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChunk())); +}; + + +/** + * optional bytes chunk = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChunk()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.getChunk_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChunk())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.setChunk = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.repeatedFields_ = [2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseApplySnapshotChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.toObject = function(includeInstance, msg) { + var f, obj = { + result: jspb.Message.getFieldWithDefault(msg, 1, 0), + refetchChunksList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + rejectSendersList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseApplySnapshotChunk; + return proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} */ (reader.readEnum()); + msg.setResult(value); + break; + case 2: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); + for (var i = 0; i < values.length; i++) { + msg.addRefetchChunks(values[i]); + } + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addRejectSenders(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseApplySnapshotChunk.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getRefetchChunksList(); + if (f.length > 0) { + writer.writePackedUint32( + 2, + f + ); + } + f = message.getRejectSendersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.Result = { + UNKNOWN: 0, + ACCEPT: 1, + ABORT: 2, + RETRY: 3, + RETRY_SNAPSHOT: 4, + REJECT_SNAPSHOT: 5 +}; + +/** + * optional Result result = 1; + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getResult = function() { + return /** @type {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} value + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * repeated uint32 refetch_chunks = 2; + * @return {!Array} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getRefetchChunksList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setRefetchChunksList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.addRefetchChunks = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.clearRefetchChunksList = function() { + return this.setRefetchChunksList([]); +}; + + +/** + * repeated string reject_senders = 3; + * @return {!Array} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getRejectSendersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setRejectSendersList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.addRejectSenders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.clearRejectSendersList = function() { + return this.setRejectSendersList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ConsensusParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ConsensusParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ConsensusParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ConsensusParams.toObject = function(includeInstance, msg) { + var f, obj = { + block: (f = msg.getBlock()) && proto.tendermint.abci.BlockParams.toObject(includeInstance, f), + evidence: (f = msg.getEvidence()) && tendermint_types_params_pb.EvidenceParams.toObject(includeInstance, f), + validator: (f = msg.getValidator()) && tendermint_types_params_pb.ValidatorParams.toObject(includeInstance, f), + version: (f = msg.getVersion()) && tendermint_types_params_pb.VersionParams.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.ConsensusParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ConsensusParams; + return proto.tendermint.abci.ConsensusParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ConsensusParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.ConsensusParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.abci.BlockParams; + reader.readMessage(value,proto.tendermint.abci.BlockParams.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 2: + var value = new tendermint_types_params_pb.EvidenceParams; + reader.readMessage(value,tendermint_types_params_pb.EvidenceParams.deserializeBinaryFromReader); + msg.setEvidence(value); + break; + case 3: + var value = new tendermint_types_params_pb.ValidatorParams; + reader.readMessage(value,tendermint_types_params_pb.ValidatorParams.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 4: + var value = new tendermint_types_params_pb.VersionParams; + reader.readMessage(value,tendermint_types_params_pb.VersionParams.deserializeBinaryFromReader); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ConsensusParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ConsensusParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ConsensusParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ConsensusParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.BlockParams.serializeBinaryToWriter + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_params_pb.EvidenceParams.serializeBinaryToWriter + ); + } + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_types_params_pb.ValidatorParams.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_types_params_pb.VersionParams.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BlockParams block = 1; + * @return {?proto.tendermint.abci.BlockParams} + */ +proto.tendermint.abci.ConsensusParams.prototype.getBlock = function() { + return /** @type{?proto.tendermint.abci.BlockParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.BlockParams, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.BlockParams|undefined} value + * @return {!proto.tendermint.abci.ConsensusParams} returns this +*/ +proto.tendermint.abci.ConsensusParams.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ConsensusParams} returns this + */ +proto.tendermint.abci.ConsensusParams.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ConsensusParams.prototype.hasBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional tendermint.types.EvidenceParams evidence = 2; + * @return {?proto.tendermint.types.EvidenceParams} + */ +proto.tendermint.abci.ConsensusParams.prototype.getEvidence = function() { + return /** @type{?proto.tendermint.types.EvidenceParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.EvidenceParams, 2)); +}; + + +/** + * @param {?proto.tendermint.types.EvidenceParams|undefined} value + * @return {!proto.tendermint.abci.ConsensusParams} returns this +*/ +proto.tendermint.abci.ConsensusParams.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ConsensusParams} returns this + */ +proto.tendermint.abci.ConsensusParams.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ConsensusParams.prototype.hasEvidence = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional tendermint.types.ValidatorParams validator = 3; + * @return {?proto.tendermint.types.ValidatorParams} + */ +proto.tendermint.abci.ConsensusParams.prototype.getValidator = function() { + return /** @type{?proto.tendermint.types.ValidatorParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.ValidatorParams, 3)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorParams|undefined} value + * @return {!proto.tendermint.abci.ConsensusParams} returns this +*/ +proto.tendermint.abci.ConsensusParams.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ConsensusParams} returns this + */ +proto.tendermint.abci.ConsensusParams.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ConsensusParams.prototype.hasValidator = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional tendermint.types.VersionParams version = 4; + * @return {?proto.tendermint.types.VersionParams} + */ +proto.tendermint.abci.ConsensusParams.prototype.getVersion = function() { + return /** @type{?proto.tendermint.types.VersionParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.VersionParams, 4)); +}; + + +/** + * @param {?proto.tendermint.types.VersionParams|undefined} value + * @return {!proto.tendermint.abci.ConsensusParams} returns this +*/ +proto.tendermint.abci.ConsensusParams.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ConsensusParams} returns this + */ +proto.tendermint.abci.ConsensusParams.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ConsensusParams.prototype.hasVersion = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.BlockParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.BlockParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.BlockParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.BlockParams.toObject = function(includeInstance, msg) { + var f, obj = { + maxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxGas: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.BlockParams} + */ +proto.tendermint.abci.BlockParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.BlockParams; + return proto.tendermint.abci.BlockParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.BlockParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.BlockParams} + */ +proto.tendermint.abci.BlockParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxBytes(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxGas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.BlockParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.BlockParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.BlockParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.BlockParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxBytes(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMaxGas(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 max_bytes = 1; + * @return {number} + */ +proto.tendermint.abci.BlockParams.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.BlockParams} returns this + */ +proto.tendermint.abci.BlockParams.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 max_gas = 2; + * @return {number} + */ +proto.tendermint.abci.BlockParams.prototype.getMaxGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.BlockParams} returns this + */ +proto.tendermint.abci.BlockParams.prototype.setMaxGas = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.LastCommitInfo.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.LastCommitInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.LastCommitInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.LastCommitInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.LastCommitInfo.toObject = function(includeInstance, msg) { + var f, obj = { + round: jspb.Message.getFieldWithDefault(msg, 1, 0), + votesList: jspb.Message.toObjectList(msg.getVotesList(), + proto.tendermint.abci.VoteInfo.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.LastCommitInfo} + */ +proto.tendermint.abci.LastCommitInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.LastCommitInfo; + return proto.tendermint.abci.LastCommitInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.LastCommitInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.LastCommitInfo} + */ +proto.tendermint.abci.LastCommitInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 2: + var value = new proto.tendermint.abci.VoteInfo; + reader.readMessage(value,proto.tendermint.abci.VoteInfo.deserializeBinaryFromReader); + msg.addVotes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.LastCommitInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.LastCommitInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.LastCommitInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.LastCommitInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.tendermint.abci.VoteInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 round = 1; + * @return {number} + */ +proto.tendermint.abci.LastCommitInfo.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.LastCommitInfo} returns this + */ +proto.tendermint.abci.LastCommitInfo.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated VoteInfo votes = 2; + * @return {!Array} + */ +proto.tendermint.abci.LastCommitInfo.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.VoteInfo, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.LastCommitInfo} returns this +*/ +proto.tendermint.abci.LastCommitInfo.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.tendermint.abci.VoteInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.VoteInfo} + */ +proto.tendermint.abci.LastCommitInfo.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tendermint.abci.VoteInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.LastCommitInfo} returns this + */ +proto.tendermint.abci.LastCommitInfo.prototype.clearVotesList = function() { + return this.setVotesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.Event.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.Event.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Event.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.Event} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Event.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + attributesList: jspb.Message.toObjectList(msg.getAttributesList(), + proto.tendermint.abci.EventAttribute.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.Event} + */ +proto.tendermint.abci.Event.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Event; + return proto.tendermint.abci.Event.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Event} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Event} + */ +proto.tendermint.abci.Event.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = new proto.tendermint.abci.EventAttribute; + reader.readMessage(value,proto.tendermint.abci.EventAttribute.deserializeBinaryFromReader); + msg.addAttributes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Event.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Event.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.Event} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Event.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAttributesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.tendermint.abci.EventAttribute.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.tendermint.abci.Event.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.Event} returns this + */ +proto.tendermint.abci.Event.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated EventAttribute attributes = 2; + * @return {!Array} + */ +proto.tendermint.abci.Event.prototype.getAttributesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.EventAttribute, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.Event} returns this +*/ +proto.tendermint.abci.Event.prototype.setAttributesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.tendermint.abci.EventAttribute=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.EventAttribute} + */ +proto.tendermint.abci.Event.prototype.addAttributes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tendermint.abci.EventAttribute, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.Event} returns this + */ +proto.tendermint.abci.Event.prototype.clearAttributesList = function() { + return this.setAttributesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.EventAttribute.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.EventAttribute.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.EventAttribute} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.EventAttribute.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + value: msg.getValue_asB64(), + index: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.EventAttribute} + */ +proto.tendermint.abci.EventAttribute.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.EventAttribute; + return proto.tendermint.abci.EventAttribute.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.EventAttribute} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.EventAttribute} + */ +proto.tendermint.abci.EventAttribute.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIndex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.EventAttribute.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.EventAttribute.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.EventAttribute} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.EventAttribute.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getIndex(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.EventAttribute.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes key = 1; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.tendermint.abci.EventAttribute.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.EventAttribute.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.EventAttribute} returns this + */ +proto.tendermint.abci.EventAttribute.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.EventAttribute.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes value = 2; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.tendermint.abci.EventAttribute.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.EventAttribute.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.EventAttribute} returns this + */ +proto.tendermint.abci.EventAttribute.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bool index = 3; + * @return {boolean} + */ +proto.tendermint.abci.EventAttribute.prototype.getIndex = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.tendermint.abci.EventAttribute} returns this + */ +proto.tendermint.abci.EventAttribute.prototype.setIndex = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.TxResult.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.TxResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.TxResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.TxResult.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + index: jspb.Message.getFieldWithDefault(msg, 2, 0), + tx: msg.getTx_asB64(), + result: (f = msg.getResult()) && proto.tendermint.abci.ResponseDeliverTx.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.TxResult} + */ +proto.tendermint.abci.TxResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.TxResult; + return proto.tendermint.abci.TxResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.TxResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.TxResult} + */ +proto.tendermint.abci.TxResult.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setIndex(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTx(value); + break; + case 4: + var value = new proto.tendermint.abci.ResponseDeliverTx; + reader.readMessage(value,proto.tendermint.abci.ResponseDeliverTx.deserializeBinaryFromReader); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.TxResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.TxResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.TxResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.TxResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.abci.ResponseDeliverTx.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.abci.TxResult.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.TxResult} returns this + */ +proto.tendermint.abci.TxResult.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 index = 2; + * @return {number} + */ +proto.tendermint.abci.TxResult.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.TxResult} returns this + */ +proto.tendermint.abci.TxResult.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes tx = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.TxResult.prototype.getTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes tx = 3; + * This is a type-conversion wrapper around `getTx()` + * @return {string} + */ +proto.tendermint.abci.TxResult.prototype.getTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTx())); +}; + + +/** + * optional bytes tx = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTx()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.TxResult.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.TxResult} returns this + */ +proto.tendermint.abci.TxResult.prototype.setTx = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional ResponseDeliverTx result = 4; + * @return {?proto.tendermint.abci.ResponseDeliverTx} + */ +proto.tendermint.abci.TxResult.prototype.getResult = function() { + return /** @type{?proto.tendermint.abci.ResponseDeliverTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseDeliverTx, 4)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseDeliverTx|undefined} value + * @return {!proto.tendermint.abci.TxResult} returns this +*/ +proto.tendermint.abci.TxResult.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.TxResult} returns this + */ +proto.tendermint.abci.TxResult.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.TxResult.prototype.hasResult = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.Validator.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Validator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.Validator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Validator.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + power: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.Validator} + */ +proto.tendermint.abci.Validator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Validator; + return proto.tendermint.abci.Validator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Validator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Validator} + */ +proto.tendermint.abci.Validator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Validator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Validator.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.Validator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Validator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes address = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.Validator.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.tendermint.abci.Validator.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.Validator.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.Validator} returns this + */ +proto.tendermint.abci.Validator.prototype.setAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional int64 power = 3; + * @return {number} + */ +proto.tendermint.abci.Validator.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Validator} returns this + */ +proto.tendermint.abci.Validator.prototype.setPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ValidatorUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.ValidatorUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ValidatorUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: (f = msg.getPubKey()) && tendermint_crypto_keys_pb.PublicKey.toObject(includeInstance, f), + power: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.ValidatorUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ValidatorUpdate; + return proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ValidatorUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_crypto_keys_pb.PublicKey; + reader.readMessage(value,tendermint_crypto_keys_pb.PublicKey.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.ValidatorUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_crypto_keys_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional tendermint.crypto.PublicKey pub_key = 1; + * @return {?proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.getPubKey = function() { + return /** @type{?proto.tendermint.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_keys_pb.PublicKey, 1)); +}; + + +/** + * @param {?proto.tendermint.crypto.PublicKey|undefined} value + * @return {!proto.tendermint.abci.ValidatorUpdate} returns this +*/ +proto.tendermint.abci.ValidatorUpdate.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ValidatorUpdate} returns this + */ +proto.tendermint.abci.ValidatorUpdate.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 power = 2; + * @return {number} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ValidatorUpdate} returns this + */ +proto.tendermint.abci.ValidatorUpdate.prototype.setPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.VoteInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.VoteInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.VoteInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.VoteInfo.toObject = function(includeInstance, msg) { + var f, obj = { + validator: (f = msg.getValidator()) && proto.tendermint.abci.Validator.toObject(includeInstance, f), + signedLastBlock: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.VoteInfo} + */ +proto.tendermint.abci.VoteInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.VoteInfo; + return proto.tendermint.abci.VoteInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.VoteInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.VoteInfo} + */ +proto.tendermint.abci.VoteInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.abci.Validator; + reader.readMessage(value,proto.tendermint.abci.Validator.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSignedLastBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.VoteInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.VoteInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.VoteInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.VoteInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.Validator.serializeBinaryToWriter + ); + } + f = message.getSignedLastBlock(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional Validator validator = 1; + * @return {?proto.tendermint.abci.Validator} + */ +proto.tendermint.abci.VoteInfo.prototype.getValidator = function() { + return /** @type{?proto.tendermint.abci.Validator} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.Validator, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.Validator|undefined} value + * @return {!proto.tendermint.abci.VoteInfo} returns this +*/ +proto.tendermint.abci.VoteInfo.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.VoteInfo} returns this + */ +proto.tendermint.abci.VoteInfo.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.VoteInfo.prototype.hasValidator = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool signed_last_block = 2; + * @return {boolean} + */ +proto.tendermint.abci.VoteInfo.prototype.getSignedLastBlock = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.tendermint.abci.VoteInfo} returns this + */ +proto.tendermint.abci.VoteInfo.prototype.setSignedLastBlock = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.Evidence.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Evidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.Evidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Evidence.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + validator: (f = msg.getValidator()) && proto.tendermint.abci.Validator.toObject(includeInstance, f), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + totalVotingPower: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.Evidence} + */ +proto.tendermint.abci.Evidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Evidence; + return proto.tendermint.abci.Evidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Evidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Evidence} + */ +proto.tendermint.abci.Evidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.tendermint.abci.EvidenceType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = new proto.tendermint.abci.Validator; + reader.readMessage(value,proto.tendermint.abci.Validator.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Evidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Evidence.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.Evidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Evidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.abci.Validator.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional EvidenceType type = 1; + * @return {!proto.tendermint.abci.EvidenceType} + */ +proto.tendermint.abci.Evidence.prototype.getType = function() { + return /** @type {!proto.tendermint.abci.EvidenceType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.abci.EvidenceType} value + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional Validator validator = 2; + * @return {?proto.tendermint.abci.Validator} + */ +proto.tendermint.abci.Evidence.prototype.getValidator = function() { + return /** @type{?proto.tendermint.abci.Validator} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.Validator, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.Validator|undefined} value + * @return {!proto.tendermint.abci.Evidence} returns this +*/ +proto.tendermint.abci.Evidence.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Evidence.prototype.hasValidator = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.tendermint.abci.Evidence.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.abci.Evidence.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.abci.Evidence} returns this +*/ +proto.tendermint.abci.Evidence.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Evidence.prototype.hasTime = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int64 total_voting_power = 5; + * @return {number} + */ +proto.tendermint.abci.Evidence.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.setTotalVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.abci.Snapshot.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Snapshot.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.abci.Snapshot} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Snapshot.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + format: jspb.Message.getFieldWithDefault(msg, 2, 0), + chunks: jspb.Message.getFieldWithDefault(msg, 3, 0), + hash: msg.getHash_asB64(), + metadata: msg.getMetadata_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.Snapshot} + */ +proto.tendermint.abci.Snapshot.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Snapshot; + return proto.tendermint.abci.Snapshot.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Snapshot} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Snapshot} + */ +proto.tendermint.abci.Snapshot.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFormat(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChunks(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Snapshot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Snapshot.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.abci.Snapshot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Snapshot.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getFormat(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getChunks(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getMetadata_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.tendermint.abci.Snapshot.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 format = 2; + * @return {number} + */ +proto.tendermint.abci.Snapshot.prototype.getFormat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setFormat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 chunks = 3; + * @return {number} + */ +proto.tendermint.abci.Snapshot.prototype.getChunks = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setChunks = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.Snapshot.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes hash = 4; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.tendermint.abci.Snapshot.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.Snapshot.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes metadata = 5; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.Snapshot.prototype.getMetadata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes metadata = 5; + * This is a type-conversion wrapper around `getMetadata()` + * @return {string} + */ +proto.tendermint.abci.Snapshot.prototype.getMetadata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMetadata())); +}; + + +/** + * optional bytes metadata = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMetadata()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.Snapshot.prototype.getMetadata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMetadata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setMetadata = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * @enum {number} + */ +proto.tendermint.abci.CheckTxType = { + NEW: 0, + RECHECK: 1 +}; + +/** + * @enum {number} + */ +proto.tendermint.abci.EvidenceType = { + UNKNOWN: 0, + DUPLICATE_VOTE: 1, + LIGHT_CLIENT_ATTACK: 2 +}; + +goog.object.extend(exports, proto.tendermint.abci); diff --git a/js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.js b/js/proto/tendermint/blockchain/types_grpc_pb.js similarity index 100% rename from js/proto/github.com/tendermint/tendermint/libs/common/types_grpc_pb.js rename to js/proto/tendermint/blockchain/types_grpc_pb.js diff --git a/js/proto/tendermint/blockchain/types_pb.d.ts b/js/proto/tendermint/blockchain/types_pb.d.ts new file mode 100644 index 000000000..e2eece8b4 --- /dev/null +++ b/js/proto/tendermint/blockchain/types_pb.d.ts @@ -0,0 +1,186 @@ +// package: tendermint.blockchain +// file: tendermint/blockchain/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as tendermint_types_block_pb from "../../tendermint/types/block_pb"; + +export class BlockRequest extends jspb.Message { + getHeight(): number; + setHeight(value: number): BlockRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockRequest.AsObject; + static toObject(includeInstance: boolean, msg: BlockRequest): BlockRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockRequest; + static deserializeBinaryFromReader(message: BlockRequest, reader: jspb.BinaryReader): BlockRequest; +} + +export namespace BlockRequest { + export type AsObject = { + height: number, + } +} + +export class NoBlockResponse extends jspb.Message { + getHeight(): number; + setHeight(value: number): NoBlockResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NoBlockResponse.AsObject; + static toObject(includeInstance: boolean, msg: NoBlockResponse): NoBlockResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NoBlockResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NoBlockResponse; + static deserializeBinaryFromReader(message: NoBlockResponse, reader: jspb.BinaryReader): NoBlockResponse; +} + +export namespace NoBlockResponse { + export type AsObject = { + height: number, + } +} + +export class BlockResponse extends jspb.Message { + + hasBlock(): boolean; + clearBlock(): void; + getBlock(): tendermint_types_block_pb.Block | undefined; + setBlock(value?: tendermint_types_block_pb.Block): BlockResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockResponse.AsObject; + static toObject(includeInstance: boolean, msg: BlockResponse): BlockResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockResponse; + static deserializeBinaryFromReader(message: BlockResponse, reader: jspb.BinaryReader): BlockResponse; +} + +export namespace BlockResponse { + export type AsObject = { + block?: tendermint_types_block_pb.Block.AsObject, + } +} + +export class StatusRequest extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StatusRequest.AsObject; + static toObject(includeInstance: boolean, msg: StatusRequest): StatusRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StatusRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StatusRequest; + static deserializeBinaryFromReader(message: StatusRequest, reader: jspb.BinaryReader): StatusRequest; +} + +export namespace StatusRequest { + export type AsObject = { + } +} + +export class StatusResponse extends jspb.Message { + getHeight(): number; + setHeight(value: number): StatusResponse; + + getBase(): number; + setBase(value: number): StatusResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StatusResponse.AsObject; + static toObject(includeInstance: boolean, msg: StatusResponse): StatusResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StatusResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StatusResponse; + static deserializeBinaryFromReader(message: StatusResponse, reader: jspb.BinaryReader): StatusResponse; +} + +export namespace StatusResponse { + export type AsObject = { + height: number, + base: number, + } +} + +export class Message extends jspb.Message { + + hasBlockRequest(): boolean; + clearBlockRequest(): void; + getBlockRequest(): BlockRequest | undefined; + setBlockRequest(value?: BlockRequest): Message; + + + hasNoBlockResponse(): boolean; + clearNoBlockResponse(): void; + getNoBlockResponse(): NoBlockResponse | undefined; + setNoBlockResponse(value?: NoBlockResponse): Message; + + + hasBlockResponse(): boolean; + clearBlockResponse(): void; + getBlockResponse(): BlockResponse | undefined; + setBlockResponse(value?: BlockResponse): Message; + + + hasStatusRequest(): boolean; + clearStatusRequest(): void; + getStatusRequest(): StatusRequest | undefined; + setStatusRequest(value?: StatusRequest): Message; + + + hasStatusResponse(): boolean; + clearStatusResponse(): void; + getStatusResponse(): StatusResponse | undefined; + setStatusResponse(value?: StatusResponse): Message; + + + getSumCase(): Message.SumCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Message.AsObject; + static toObject(includeInstance: boolean, msg: Message): Message.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Message, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Message; + static deserializeBinaryFromReader(message: Message, reader: jspb.BinaryReader): Message; +} + +export namespace Message { + export type AsObject = { + blockRequest?: BlockRequest.AsObject, + noBlockResponse?: NoBlockResponse.AsObject, + blockResponse?: BlockResponse.AsObject, + statusRequest?: StatusRequest.AsObject, + statusResponse?: StatusResponse.AsObject, + } + + export enum SumCase { + SUM_NOT_SET = 0, + + BLOCK_REQUEST = 1, + + NO_BLOCK_RESPONSE = 2, + + BLOCK_RESPONSE = 3, + + STATUS_REQUEST = 4, + + STATUS_RESPONSE = 5, + + } + +} diff --git a/js/proto/tendermint/blockchain/types_pb.js b/js/proto/tendermint/blockchain/types_pb.js new file mode 100644 index 000000000..7f0aecd69 --- /dev/null +++ b/js/proto/tendermint/blockchain/types_pb.js @@ -0,0 +1,1208 @@ +// source: tendermint/blockchain/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var tendermint_types_block_pb = require('../../tendermint/types/block_pb.js'); +goog.object.extend(proto, tendermint_types_block_pb); +goog.exportSymbol('proto.tendermint.blockchain.BlockRequest', null, global); +goog.exportSymbol('proto.tendermint.blockchain.BlockResponse', null, global); +goog.exportSymbol('proto.tendermint.blockchain.Message', null, global); +goog.exportSymbol('proto.tendermint.blockchain.Message.SumCase', null, global); +goog.exportSymbol('proto.tendermint.blockchain.NoBlockResponse', null, global); +goog.exportSymbol('proto.tendermint.blockchain.StatusRequest', null, global); +goog.exportSymbol('proto.tendermint.blockchain.StatusResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.blockchain.BlockRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.blockchain.BlockRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.blockchain.BlockRequest.displayName = 'proto.tendermint.blockchain.BlockRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.blockchain.NoBlockResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.blockchain.NoBlockResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.blockchain.NoBlockResponse.displayName = 'proto.tendermint.blockchain.NoBlockResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.blockchain.BlockResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.blockchain.BlockResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.blockchain.BlockResponse.displayName = 'proto.tendermint.blockchain.BlockResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.blockchain.StatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.blockchain.StatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.blockchain.StatusRequest.displayName = 'proto.tendermint.blockchain.StatusRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.blockchain.StatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.blockchain.StatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.blockchain.StatusResponse.displayName = 'proto.tendermint.blockchain.StatusResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.blockchain.Message = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.blockchain.Message.oneofGroups_); +}; +goog.inherits(proto.tendermint.blockchain.Message, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.blockchain.Message.displayName = 'proto.tendermint.blockchain.Message'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.blockchain.BlockRequest.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.blockchain.BlockRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.blockchain.BlockRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.blockchain.BlockRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.blockchain.BlockRequest} + */ +proto.tendermint.blockchain.BlockRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.blockchain.BlockRequest; + return proto.tendermint.blockchain.BlockRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.blockchain.BlockRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.blockchain.BlockRequest} + */ +proto.tendermint.blockchain.BlockRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.blockchain.BlockRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.blockchain.BlockRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.blockchain.BlockRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.blockchain.BlockRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.blockchain.BlockRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.blockchain.BlockRequest} returns this + */ +proto.tendermint.blockchain.BlockRequest.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.blockchain.NoBlockResponse.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.blockchain.NoBlockResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.blockchain.NoBlockResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.blockchain.NoBlockResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.blockchain.NoBlockResponse} + */ +proto.tendermint.blockchain.NoBlockResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.blockchain.NoBlockResponse; + return proto.tendermint.blockchain.NoBlockResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.blockchain.NoBlockResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.blockchain.NoBlockResponse} + */ +proto.tendermint.blockchain.NoBlockResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.blockchain.NoBlockResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.blockchain.NoBlockResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.blockchain.NoBlockResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.blockchain.NoBlockResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.blockchain.NoBlockResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.blockchain.NoBlockResponse} returns this + */ +proto.tendermint.blockchain.NoBlockResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.blockchain.BlockResponse.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.blockchain.BlockResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.blockchain.BlockResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.blockchain.BlockResponse.toObject = function(includeInstance, msg) { + var f, obj = { + block: (f = msg.getBlock()) && tendermint_types_block_pb.Block.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.blockchain.BlockResponse} + */ +proto.tendermint.blockchain.BlockResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.blockchain.BlockResponse; + return proto.tendermint.blockchain.BlockResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.blockchain.BlockResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.blockchain.BlockResponse} + */ +proto.tendermint.blockchain.BlockResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_block_pb.Block; + reader.readMessage(value,tendermint_types_block_pb.Block.deserializeBinaryFromReader); + msg.setBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.blockchain.BlockResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.blockchain.BlockResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.blockchain.BlockResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.blockchain.BlockResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_block_pb.Block.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.Block block = 1; + * @return {?proto.tendermint.types.Block} + */ +proto.tendermint.blockchain.BlockResponse.prototype.getBlock = function() { + return /** @type{?proto.tendermint.types.Block} */ ( + jspb.Message.getWrapperField(this, tendermint_types_block_pb.Block, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Block|undefined} value + * @return {!proto.tendermint.blockchain.BlockResponse} returns this +*/ +proto.tendermint.blockchain.BlockResponse.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.blockchain.BlockResponse} returns this + */ +proto.tendermint.blockchain.BlockResponse.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.blockchain.BlockResponse.prototype.hasBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.blockchain.StatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.blockchain.StatusRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.blockchain.StatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.blockchain.StatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.blockchain.StatusRequest} + */ +proto.tendermint.blockchain.StatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.blockchain.StatusRequest; + return proto.tendermint.blockchain.StatusRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.blockchain.StatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.blockchain.StatusRequest} + */ +proto.tendermint.blockchain.StatusRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.blockchain.StatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.blockchain.StatusRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.blockchain.StatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.blockchain.StatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.blockchain.StatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.blockchain.StatusResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.blockchain.StatusResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.blockchain.StatusResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + base: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.blockchain.StatusResponse} + */ +proto.tendermint.blockchain.StatusResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.blockchain.StatusResponse; + return proto.tendermint.blockchain.StatusResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.blockchain.StatusResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.blockchain.StatusResponse} + */ +proto.tendermint.blockchain.StatusResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBase(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.blockchain.StatusResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.blockchain.StatusResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.blockchain.StatusResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.blockchain.StatusResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getBase(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.blockchain.StatusResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.blockchain.StatusResponse} returns this + */ +proto.tendermint.blockchain.StatusResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 base = 2; + * @return {number} + */ +proto.tendermint.blockchain.StatusResponse.prototype.getBase = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.blockchain.StatusResponse} returns this + */ +proto.tendermint.blockchain.StatusResponse.prototype.setBase = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.blockchain.Message.oneofGroups_ = [[1,2,3,4,5]]; + +/** + * @enum {number} + */ +proto.tendermint.blockchain.Message.SumCase = { + SUM_NOT_SET: 0, + BLOCK_REQUEST: 1, + NO_BLOCK_RESPONSE: 2, + BLOCK_RESPONSE: 3, + STATUS_REQUEST: 4, + STATUS_RESPONSE: 5 +}; + +/** + * @return {proto.tendermint.blockchain.Message.SumCase} + */ +proto.tendermint.blockchain.Message.prototype.getSumCase = function() { + return /** @type {proto.tendermint.blockchain.Message.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.blockchain.Message.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.blockchain.Message.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.blockchain.Message.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.blockchain.Message} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.blockchain.Message.toObject = function(includeInstance, msg) { + var f, obj = { + blockRequest: (f = msg.getBlockRequest()) && proto.tendermint.blockchain.BlockRequest.toObject(includeInstance, f), + noBlockResponse: (f = msg.getNoBlockResponse()) && proto.tendermint.blockchain.NoBlockResponse.toObject(includeInstance, f), + blockResponse: (f = msg.getBlockResponse()) && proto.tendermint.blockchain.BlockResponse.toObject(includeInstance, f), + statusRequest: (f = msg.getStatusRequest()) && proto.tendermint.blockchain.StatusRequest.toObject(includeInstance, f), + statusResponse: (f = msg.getStatusResponse()) && proto.tendermint.blockchain.StatusResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.blockchain.Message} + */ +proto.tendermint.blockchain.Message.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.blockchain.Message; + return proto.tendermint.blockchain.Message.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.blockchain.Message} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.blockchain.Message} + */ +proto.tendermint.blockchain.Message.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.blockchain.BlockRequest; + reader.readMessage(value,proto.tendermint.blockchain.BlockRequest.deserializeBinaryFromReader); + msg.setBlockRequest(value); + break; + case 2: + var value = new proto.tendermint.blockchain.NoBlockResponse; + reader.readMessage(value,proto.tendermint.blockchain.NoBlockResponse.deserializeBinaryFromReader); + msg.setNoBlockResponse(value); + break; + case 3: + var value = new proto.tendermint.blockchain.BlockResponse; + reader.readMessage(value,proto.tendermint.blockchain.BlockResponse.deserializeBinaryFromReader); + msg.setBlockResponse(value); + break; + case 4: + var value = new proto.tendermint.blockchain.StatusRequest; + reader.readMessage(value,proto.tendermint.blockchain.StatusRequest.deserializeBinaryFromReader); + msg.setStatusRequest(value); + break; + case 5: + var value = new proto.tendermint.blockchain.StatusResponse; + reader.readMessage(value,proto.tendermint.blockchain.StatusResponse.deserializeBinaryFromReader); + msg.setStatusResponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.blockchain.Message.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.blockchain.Message.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.blockchain.Message} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.blockchain.Message.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.blockchain.BlockRequest.serializeBinaryToWriter + ); + } + f = message.getNoBlockResponse(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.blockchain.NoBlockResponse.serializeBinaryToWriter + ); + } + f = message.getBlockResponse(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.blockchain.BlockResponse.serializeBinaryToWriter + ); + } + f = message.getStatusRequest(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.blockchain.StatusRequest.serializeBinaryToWriter + ); + } + f = message.getStatusResponse(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.blockchain.StatusResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BlockRequest block_request = 1; + * @return {?proto.tendermint.blockchain.BlockRequest} + */ +proto.tendermint.blockchain.Message.prototype.getBlockRequest = function() { + return /** @type{?proto.tendermint.blockchain.BlockRequest} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.blockchain.BlockRequest, 1)); +}; + + +/** + * @param {?proto.tendermint.blockchain.BlockRequest|undefined} value + * @return {!proto.tendermint.blockchain.Message} returns this +*/ +proto.tendermint.blockchain.Message.prototype.setBlockRequest = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.blockchain.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.blockchain.Message} returns this + */ +proto.tendermint.blockchain.Message.prototype.clearBlockRequest = function() { + return this.setBlockRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.blockchain.Message.prototype.hasBlockRequest = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional NoBlockResponse no_block_response = 2; + * @return {?proto.tendermint.blockchain.NoBlockResponse} + */ +proto.tendermint.blockchain.Message.prototype.getNoBlockResponse = function() { + return /** @type{?proto.tendermint.blockchain.NoBlockResponse} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.blockchain.NoBlockResponse, 2)); +}; + + +/** + * @param {?proto.tendermint.blockchain.NoBlockResponse|undefined} value + * @return {!proto.tendermint.blockchain.Message} returns this +*/ +proto.tendermint.blockchain.Message.prototype.setNoBlockResponse = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.blockchain.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.blockchain.Message} returns this + */ +proto.tendermint.blockchain.Message.prototype.clearNoBlockResponse = function() { + return this.setNoBlockResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.blockchain.Message.prototype.hasNoBlockResponse = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional BlockResponse block_response = 3; + * @return {?proto.tendermint.blockchain.BlockResponse} + */ +proto.tendermint.blockchain.Message.prototype.getBlockResponse = function() { + return /** @type{?proto.tendermint.blockchain.BlockResponse} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.blockchain.BlockResponse, 3)); +}; + + +/** + * @param {?proto.tendermint.blockchain.BlockResponse|undefined} value + * @return {!proto.tendermint.blockchain.Message} returns this +*/ +proto.tendermint.blockchain.Message.prototype.setBlockResponse = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.tendermint.blockchain.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.blockchain.Message} returns this + */ +proto.tendermint.blockchain.Message.prototype.clearBlockResponse = function() { + return this.setBlockResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.blockchain.Message.prototype.hasBlockResponse = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional StatusRequest status_request = 4; + * @return {?proto.tendermint.blockchain.StatusRequest} + */ +proto.tendermint.blockchain.Message.prototype.getStatusRequest = function() { + return /** @type{?proto.tendermint.blockchain.StatusRequest} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.blockchain.StatusRequest, 4)); +}; + + +/** + * @param {?proto.tendermint.blockchain.StatusRequest|undefined} value + * @return {!proto.tendermint.blockchain.Message} returns this +*/ +proto.tendermint.blockchain.Message.prototype.setStatusRequest = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.tendermint.blockchain.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.blockchain.Message} returns this + */ +proto.tendermint.blockchain.Message.prototype.clearStatusRequest = function() { + return this.setStatusRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.blockchain.Message.prototype.hasStatusRequest = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional StatusResponse status_response = 5; + * @return {?proto.tendermint.blockchain.StatusResponse} + */ +proto.tendermint.blockchain.Message.prototype.getStatusResponse = function() { + return /** @type{?proto.tendermint.blockchain.StatusResponse} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.blockchain.StatusResponse, 5)); +}; + + +/** + * @param {?proto.tendermint.blockchain.StatusResponse|undefined} value + * @return {!proto.tendermint.blockchain.Message} returns this +*/ +proto.tendermint.blockchain.Message.prototype.setStatusResponse = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.tendermint.blockchain.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.blockchain.Message} returns this + */ +proto.tendermint.blockchain.Message.prototype.clearStatusResponse = function() { + return this.setStatusResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.blockchain.Message.prototype.hasStatusResponse = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +goog.object.extend(exports, proto.tendermint.blockchain); diff --git a/js/proto/tendermint/consensus/types_grpc_pb.js b/js/proto/tendermint/consensus/types_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/consensus/types_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/consensus/types_pb.d.ts b/js/proto/tendermint/consensus/types_pb.d.ts new file mode 100644 index 000000000..fcadfc10b --- /dev/null +++ b/js/proto/tendermint/consensus/types_pb.d.ts @@ -0,0 +1,420 @@ +// package: tendermint.consensus +// file: tendermint/consensus/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as tendermint_types_types_pb from "../../tendermint/types/types_pb"; +import * as tendermint_libs_bits_types_pb from "../../tendermint/libs/bits/types_pb"; + +export class NewRoundStep extends jspb.Message { + getHeight(): number; + setHeight(value: number): NewRoundStep; + + getRound(): number; + setRound(value: number): NewRoundStep; + + getStep(): number; + setStep(value: number): NewRoundStep; + + getSecondsSinceStartTime(): number; + setSecondsSinceStartTime(value: number): NewRoundStep; + + getLastCommitRound(): number; + setLastCommitRound(value: number): NewRoundStep; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NewRoundStep.AsObject; + static toObject(includeInstance: boolean, msg: NewRoundStep): NewRoundStep.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NewRoundStep, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NewRoundStep; + static deserializeBinaryFromReader(message: NewRoundStep, reader: jspb.BinaryReader): NewRoundStep; +} + +export namespace NewRoundStep { + export type AsObject = { + height: number, + round: number, + step: number, + secondsSinceStartTime: number, + lastCommitRound: number, + } +} + +export class NewValidBlock extends jspb.Message { + getHeight(): number; + setHeight(value: number): NewValidBlock; + + getRound(): number; + setRound(value: number): NewValidBlock; + + + hasBlockPartSetHeader(): boolean; + clearBlockPartSetHeader(): void; + getBlockPartSetHeader(): tendermint_types_types_pb.PartSetHeader | undefined; + setBlockPartSetHeader(value?: tendermint_types_types_pb.PartSetHeader): NewValidBlock; + + + hasBlockParts(): boolean; + clearBlockParts(): void; + getBlockParts(): tendermint_libs_bits_types_pb.BitArray | undefined; + setBlockParts(value?: tendermint_libs_bits_types_pb.BitArray): NewValidBlock; + + getIsCommit(): boolean; + setIsCommit(value: boolean): NewValidBlock; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NewValidBlock.AsObject; + static toObject(includeInstance: boolean, msg: NewValidBlock): NewValidBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NewValidBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NewValidBlock; + static deserializeBinaryFromReader(message: NewValidBlock, reader: jspb.BinaryReader): NewValidBlock; +} + +export namespace NewValidBlock { + export type AsObject = { + height: number, + round: number, + blockPartSetHeader?: tendermint_types_types_pb.PartSetHeader.AsObject, + blockParts?: tendermint_libs_bits_types_pb.BitArray.AsObject, + isCommit: boolean, + } +} + +export class Proposal extends jspb.Message { + + hasProposal(): boolean; + clearProposal(): void; + getProposal(): tendermint_types_types_pb.Proposal | undefined; + setProposal(value?: tendermint_types_types_pb.Proposal): Proposal; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Proposal.AsObject; + static toObject(includeInstance: boolean, msg: Proposal): Proposal.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Proposal, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Proposal; + static deserializeBinaryFromReader(message: Proposal, reader: jspb.BinaryReader): Proposal; +} + +export namespace Proposal { + export type AsObject = { + proposal?: tendermint_types_types_pb.Proposal.AsObject, + } +} + +export class ProposalPOL extends jspb.Message { + getHeight(): number; + setHeight(value: number): ProposalPOL; + + getProposalPolRound(): number; + setProposalPolRound(value: number): ProposalPOL; + + + hasProposalPol(): boolean; + clearProposalPol(): void; + getProposalPol(): tendermint_libs_bits_types_pb.BitArray | undefined; + setProposalPol(value?: tendermint_libs_bits_types_pb.BitArray): ProposalPOL; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProposalPOL.AsObject; + static toObject(includeInstance: boolean, msg: ProposalPOL): ProposalPOL.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProposalPOL, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProposalPOL; + static deserializeBinaryFromReader(message: ProposalPOL, reader: jspb.BinaryReader): ProposalPOL; +} + +export namespace ProposalPOL { + export type AsObject = { + height: number, + proposalPolRound: number, + proposalPol?: tendermint_libs_bits_types_pb.BitArray.AsObject, + } +} + +export class BlockPart extends jspb.Message { + getHeight(): number; + setHeight(value: number): BlockPart; + + getRound(): number; + setRound(value: number): BlockPart; + + + hasPart(): boolean; + clearPart(): void; + getPart(): tendermint_types_types_pb.Part | undefined; + setPart(value?: tendermint_types_types_pb.Part): BlockPart; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockPart.AsObject; + static toObject(includeInstance: boolean, msg: BlockPart): BlockPart.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockPart, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockPart; + static deserializeBinaryFromReader(message: BlockPart, reader: jspb.BinaryReader): BlockPart; +} + +export namespace BlockPart { + export type AsObject = { + height: number, + round: number, + part?: tendermint_types_types_pb.Part.AsObject, + } +} + +export class Vote extends jspb.Message { + + hasVote(): boolean; + clearVote(): void; + getVote(): tendermint_types_types_pb.Vote | undefined; + setVote(value?: tendermint_types_types_pb.Vote): Vote; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Vote.AsObject; + static toObject(includeInstance: boolean, msg: Vote): Vote.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Vote, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Vote; + static deserializeBinaryFromReader(message: Vote, reader: jspb.BinaryReader): Vote; +} + +export namespace Vote { + export type AsObject = { + vote?: tendermint_types_types_pb.Vote.AsObject, + } +} + +export class HasVote extends jspb.Message { + getHeight(): number; + setHeight(value: number): HasVote; + + getRound(): number; + setRound(value: number): HasVote; + + getType(): tendermint_types_types_pb.SignedMsgType; + setType(value: tendermint_types_types_pb.SignedMsgType): HasVote; + + getIndex(): number; + setIndex(value: number): HasVote; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HasVote.AsObject; + static toObject(includeInstance: boolean, msg: HasVote): HasVote.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HasVote, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HasVote; + static deserializeBinaryFromReader(message: HasVote, reader: jspb.BinaryReader): HasVote; +} + +export namespace HasVote { + export type AsObject = { + height: number, + round: number, + type: tendermint_types_types_pb.SignedMsgType, + index: number, + } +} + +export class VoteSetMaj23 extends jspb.Message { + getHeight(): number; + setHeight(value: number): VoteSetMaj23; + + getRound(): number; + setRound(value: number): VoteSetMaj23; + + getType(): tendermint_types_types_pb.SignedMsgType; + setType(value: tendermint_types_types_pb.SignedMsgType): VoteSetMaj23; + + + hasBlockId(): boolean; + clearBlockId(): void; + getBlockId(): tendermint_types_types_pb.BlockID | undefined; + setBlockId(value?: tendermint_types_types_pb.BlockID): VoteSetMaj23; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VoteSetMaj23.AsObject; + static toObject(includeInstance: boolean, msg: VoteSetMaj23): VoteSetMaj23.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VoteSetMaj23, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VoteSetMaj23; + static deserializeBinaryFromReader(message: VoteSetMaj23, reader: jspb.BinaryReader): VoteSetMaj23; +} + +export namespace VoteSetMaj23 { + export type AsObject = { + height: number, + round: number, + type: tendermint_types_types_pb.SignedMsgType, + blockId?: tendermint_types_types_pb.BlockID.AsObject, + } +} + +export class VoteSetBits extends jspb.Message { + getHeight(): number; + setHeight(value: number): VoteSetBits; + + getRound(): number; + setRound(value: number): VoteSetBits; + + getType(): tendermint_types_types_pb.SignedMsgType; + setType(value: tendermint_types_types_pb.SignedMsgType): VoteSetBits; + + + hasBlockId(): boolean; + clearBlockId(): void; + getBlockId(): tendermint_types_types_pb.BlockID | undefined; + setBlockId(value?: tendermint_types_types_pb.BlockID): VoteSetBits; + + + hasVotes(): boolean; + clearVotes(): void; + getVotes(): tendermint_libs_bits_types_pb.BitArray | undefined; + setVotes(value?: tendermint_libs_bits_types_pb.BitArray): VoteSetBits; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VoteSetBits.AsObject; + static toObject(includeInstance: boolean, msg: VoteSetBits): VoteSetBits.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VoteSetBits, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VoteSetBits; + static deserializeBinaryFromReader(message: VoteSetBits, reader: jspb.BinaryReader): VoteSetBits; +} + +export namespace VoteSetBits { + export type AsObject = { + height: number, + round: number, + type: tendermint_types_types_pb.SignedMsgType, + blockId?: tendermint_types_types_pb.BlockID.AsObject, + votes?: tendermint_libs_bits_types_pb.BitArray.AsObject, + } +} + +export class Message extends jspb.Message { + + hasNewRoundStep(): boolean; + clearNewRoundStep(): void; + getNewRoundStep(): NewRoundStep | undefined; + setNewRoundStep(value?: NewRoundStep): Message; + + + hasNewValidBlock(): boolean; + clearNewValidBlock(): void; + getNewValidBlock(): NewValidBlock | undefined; + setNewValidBlock(value?: NewValidBlock): Message; + + + hasProposal(): boolean; + clearProposal(): void; + getProposal(): Proposal | undefined; + setProposal(value?: Proposal): Message; + + + hasProposalPol(): boolean; + clearProposalPol(): void; + getProposalPol(): ProposalPOL | undefined; + setProposalPol(value?: ProposalPOL): Message; + + + hasBlockPart(): boolean; + clearBlockPart(): void; + getBlockPart(): BlockPart | undefined; + setBlockPart(value?: BlockPart): Message; + + + hasVote(): boolean; + clearVote(): void; + getVote(): Vote | undefined; + setVote(value?: Vote): Message; + + + hasHasVote(): boolean; + clearHasVote(): void; + getHasVote(): HasVote | undefined; + setHasVote(value?: HasVote): Message; + + + hasVoteSetMaj23(): boolean; + clearVoteSetMaj23(): void; + getVoteSetMaj23(): VoteSetMaj23 | undefined; + setVoteSetMaj23(value?: VoteSetMaj23): Message; + + + hasVoteSetBits(): boolean; + clearVoteSetBits(): void; + getVoteSetBits(): VoteSetBits | undefined; + setVoteSetBits(value?: VoteSetBits): Message; + + + getSumCase(): Message.SumCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Message.AsObject; + static toObject(includeInstance: boolean, msg: Message): Message.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Message, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Message; + static deserializeBinaryFromReader(message: Message, reader: jspb.BinaryReader): Message; +} + +export namespace Message { + export type AsObject = { + newRoundStep?: NewRoundStep.AsObject, + newValidBlock?: NewValidBlock.AsObject, + proposal?: Proposal.AsObject, + proposalPol?: ProposalPOL.AsObject, + blockPart?: BlockPart.AsObject, + vote?: Vote.AsObject, + hasVote?: HasVote.AsObject, + voteSetMaj23?: VoteSetMaj23.AsObject, + voteSetBits?: VoteSetBits.AsObject, + } + + export enum SumCase { + SUM_NOT_SET = 0, + + NEW_ROUND_STEP = 1, + + NEW_VALID_BLOCK = 2, + + PROPOSAL = 3, + + PROPOSAL_POL = 4, + + BLOCK_PART = 5, + + VOTE = 6, + + HAS_VOTE = 7, + + VOTE_SET_MAJ23 = 8, + + VOTE_SET_BITS = 9, + + } + +} diff --git a/js/proto/tendermint/consensus/types_pb.js b/js/proto/tendermint/consensus/types_pb.js new file mode 100644 index 000000000..b0609fe4b --- /dev/null +++ b/js/proto/tendermint/consensus/types_pb.js @@ -0,0 +1,2855 @@ +// source: tendermint/consensus/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); +var tendermint_libs_bits_types_pb = require('../../tendermint/libs/bits/types_pb.js'); +goog.object.extend(proto, tendermint_libs_bits_types_pb); +goog.exportSymbol('proto.tendermint.consensus.BlockPart', null, global); +goog.exportSymbol('proto.tendermint.consensus.HasVote', null, global); +goog.exportSymbol('proto.tendermint.consensus.Message', null, global); +goog.exportSymbol('proto.tendermint.consensus.Message.SumCase', null, global); +goog.exportSymbol('proto.tendermint.consensus.NewRoundStep', null, global); +goog.exportSymbol('proto.tendermint.consensus.NewValidBlock', null, global); +goog.exportSymbol('proto.tendermint.consensus.Proposal', null, global); +goog.exportSymbol('proto.tendermint.consensus.ProposalPOL', null, global); +goog.exportSymbol('proto.tendermint.consensus.Vote', null, global); +goog.exportSymbol('proto.tendermint.consensus.VoteSetBits', null, global); +goog.exportSymbol('proto.tendermint.consensus.VoteSetMaj23', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.NewRoundStep = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.NewRoundStep, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.NewRoundStep.displayName = 'proto.tendermint.consensus.NewRoundStep'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.NewValidBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.NewValidBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.NewValidBlock.displayName = 'proto.tendermint.consensus.NewValidBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.Proposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.Proposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.Proposal.displayName = 'proto.tendermint.consensus.Proposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.ProposalPOL = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.ProposalPOL, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.ProposalPOL.displayName = 'proto.tendermint.consensus.ProposalPOL'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.BlockPart = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.BlockPart, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.BlockPart.displayName = 'proto.tendermint.consensus.BlockPart'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.Vote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.Vote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.Vote.displayName = 'proto.tendermint.consensus.Vote'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.HasVote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.HasVote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.HasVote.displayName = 'proto.tendermint.consensus.HasVote'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.VoteSetMaj23 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.VoteSetMaj23, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.VoteSetMaj23.displayName = 'proto.tendermint.consensus.VoteSetMaj23'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.VoteSetBits = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.VoteSetBits, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.VoteSetBits.displayName = 'proto.tendermint.consensus.VoteSetBits'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.Message = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.consensus.Message.oneofGroups_); +}; +goog.inherits(proto.tendermint.consensus.Message, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.Message.displayName = 'proto.tendermint.consensus.Message'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.NewRoundStep.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.NewRoundStep.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.NewRoundStep} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.NewRoundStep.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + round: jspb.Message.getFieldWithDefault(msg, 2, 0), + step: jspb.Message.getFieldWithDefault(msg, 3, 0), + secondsSinceStartTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + lastCommitRound: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.NewRoundStep} + */ +proto.tendermint.consensus.NewRoundStep.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.NewRoundStep; + return proto.tendermint.consensus.NewRoundStep.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.NewRoundStep} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.NewRoundStep} + */ +proto.tendermint.consensus.NewRoundStep.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setStep(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSecondsSinceStartTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLastCommitRound(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.NewRoundStep.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.NewRoundStep.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.NewRoundStep} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.NewRoundStep.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getStep(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getSecondsSinceStartTime(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getLastCommitRound(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.consensus.NewRoundStep.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.NewRoundStep} returns this + */ +proto.tendermint.consensus.NewRoundStep.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.tendermint.consensus.NewRoundStep.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.NewRoundStep} returns this + */ +proto.tendermint.consensus.NewRoundStep.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 step = 3; + * @return {number} + */ +proto.tendermint.consensus.NewRoundStep.prototype.getStep = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.NewRoundStep} returns this + */ +proto.tendermint.consensus.NewRoundStep.prototype.setStep = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 seconds_since_start_time = 4; + * @return {number} + */ +proto.tendermint.consensus.NewRoundStep.prototype.getSecondsSinceStartTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.NewRoundStep} returns this + */ +proto.tendermint.consensus.NewRoundStep.prototype.setSecondsSinceStartTime = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int32 last_commit_round = 5; + * @return {number} + */ +proto.tendermint.consensus.NewRoundStep.prototype.getLastCommitRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.NewRoundStep} returns this + */ +proto.tendermint.consensus.NewRoundStep.prototype.setLastCommitRound = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.NewValidBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.NewValidBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.NewValidBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.NewValidBlock.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + round: jspb.Message.getFieldWithDefault(msg, 2, 0), + blockPartSetHeader: (f = msg.getBlockPartSetHeader()) && tendermint_types_types_pb.PartSetHeader.toObject(includeInstance, f), + blockParts: (f = msg.getBlockParts()) && tendermint_libs_bits_types_pb.BitArray.toObject(includeInstance, f), + isCommit: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.NewValidBlock} + */ +proto.tendermint.consensus.NewValidBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.NewValidBlock; + return proto.tendermint.consensus.NewValidBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.NewValidBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.NewValidBlock} + */ +proto.tendermint.consensus.NewValidBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var value = new tendermint_types_types_pb.PartSetHeader; + reader.readMessage(value,tendermint_types_types_pb.PartSetHeader.deserializeBinaryFromReader); + msg.setBlockPartSetHeader(value); + break; + case 4: + var value = new tendermint_libs_bits_types_pb.BitArray; + reader.readMessage(value,tendermint_libs_bits_types_pb.BitArray.deserializeBinaryFromReader); + msg.setBlockParts(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsCommit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.NewValidBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.NewValidBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.NewValidBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.NewValidBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getBlockPartSetHeader(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_types_types_pb.PartSetHeader.serializeBinaryToWriter + ); + } + f = message.getBlockParts(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_libs_bits_types_pb.BitArray.serializeBinaryToWriter + ); + } + f = message.getIsCommit(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.consensus.NewValidBlock.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.NewValidBlock} returns this + */ +proto.tendermint.consensus.NewValidBlock.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.tendermint.consensus.NewValidBlock.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.NewValidBlock} returns this + */ +proto.tendermint.consensus.NewValidBlock.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional tendermint.types.PartSetHeader block_part_set_header = 3; + * @return {?proto.tendermint.types.PartSetHeader} + */ +proto.tendermint.consensus.NewValidBlock.prototype.getBlockPartSetHeader = function() { + return /** @type{?proto.tendermint.types.PartSetHeader} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.PartSetHeader, 3)); +}; + + +/** + * @param {?proto.tendermint.types.PartSetHeader|undefined} value + * @return {!proto.tendermint.consensus.NewValidBlock} returns this +*/ +proto.tendermint.consensus.NewValidBlock.prototype.setBlockPartSetHeader = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.NewValidBlock} returns this + */ +proto.tendermint.consensus.NewValidBlock.prototype.clearBlockPartSetHeader = function() { + return this.setBlockPartSetHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.NewValidBlock.prototype.hasBlockPartSetHeader = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional tendermint.libs.bits.BitArray block_parts = 4; + * @return {?proto.tendermint.libs.bits.BitArray} + */ +proto.tendermint.consensus.NewValidBlock.prototype.getBlockParts = function() { + return /** @type{?proto.tendermint.libs.bits.BitArray} */ ( + jspb.Message.getWrapperField(this, tendermint_libs_bits_types_pb.BitArray, 4)); +}; + + +/** + * @param {?proto.tendermint.libs.bits.BitArray|undefined} value + * @return {!proto.tendermint.consensus.NewValidBlock} returns this +*/ +proto.tendermint.consensus.NewValidBlock.prototype.setBlockParts = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.NewValidBlock} returns this + */ +proto.tendermint.consensus.NewValidBlock.prototype.clearBlockParts = function() { + return this.setBlockParts(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.NewValidBlock.prototype.hasBlockParts = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool is_commit = 5; + * @return {boolean} + */ +proto.tendermint.consensus.NewValidBlock.prototype.getIsCommit = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.tendermint.consensus.NewValidBlock} returns this + */ +proto.tendermint.consensus.NewValidBlock.prototype.setIsCommit = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.Proposal.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.Proposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.Proposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.Proposal.toObject = function(includeInstance, msg) { + var f, obj = { + proposal: (f = msg.getProposal()) && tendermint_types_types_pb.Proposal.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.Proposal} + */ +proto.tendermint.consensus.Proposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.Proposal; + return proto.tendermint.consensus.Proposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.Proposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.Proposal} + */ +proto.tendermint.consensus.Proposal.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Proposal; + reader.readMessage(value,tendermint_types_types_pb.Proposal.deserializeBinaryFromReader); + msg.setProposal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.Proposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.Proposal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.Proposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.Proposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposal(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Proposal.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.Proposal proposal = 1; + * @return {?proto.tendermint.types.Proposal} + */ +proto.tendermint.consensus.Proposal.prototype.getProposal = function() { + return /** @type{?proto.tendermint.types.Proposal} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Proposal, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Proposal|undefined} value + * @return {!proto.tendermint.consensus.Proposal} returns this +*/ +proto.tendermint.consensus.Proposal.prototype.setProposal = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.Proposal} returns this + */ +proto.tendermint.consensus.Proposal.prototype.clearProposal = function() { + return this.setProposal(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.Proposal.prototype.hasProposal = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.ProposalPOL.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.ProposalPOL.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.ProposalPOL} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.ProposalPOL.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + proposalPolRound: jspb.Message.getFieldWithDefault(msg, 2, 0), + proposalPol: (f = msg.getProposalPol()) && tendermint_libs_bits_types_pb.BitArray.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.ProposalPOL} + */ +proto.tendermint.consensus.ProposalPOL.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.ProposalPOL; + return proto.tendermint.consensus.ProposalPOL.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.ProposalPOL} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.ProposalPOL} + */ +proto.tendermint.consensus.ProposalPOL.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setProposalPolRound(value); + break; + case 3: + var value = new tendermint_libs_bits_types_pb.BitArray; + reader.readMessage(value,tendermint_libs_bits_types_pb.BitArray.deserializeBinaryFromReader); + msg.setProposalPol(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.ProposalPOL.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.ProposalPOL.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.ProposalPOL} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.ProposalPOL.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getProposalPolRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getProposalPol(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_libs_bits_types_pb.BitArray.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.consensus.ProposalPOL.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.ProposalPOL} returns this + */ +proto.tendermint.consensus.ProposalPOL.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 proposal_pol_round = 2; + * @return {number} + */ +proto.tendermint.consensus.ProposalPOL.prototype.getProposalPolRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.ProposalPOL} returns this + */ +proto.tendermint.consensus.ProposalPOL.prototype.setProposalPolRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional tendermint.libs.bits.BitArray proposal_pol = 3; + * @return {?proto.tendermint.libs.bits.BitArray} + */ +proto.tendermint.consensus.ProposalPOL.prototype.getProposalPol = function() { + return /** @type{?proto.tendermint.libs.bits.BitArray} */ ( + jspb.Message.getWrapperField(this, tendermint_libs_bits_types_pb.BitArray, 3)); +}; + + +/** + * @param {?proto.tendermint.libs.bits.BitArray|undefined} value + * @return {!proto.tendermint.consensus.ProposalPOL} returns this +*/ +proto.tendermint.consensus.ProposalPOL.prototype.setProposalPol = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.ProposalPOL} returns this + */ +proto.tendermint.consensus.ProposalPOL.prototype.clearProposalPol = function() { + return this.setProposalPol(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.ProposalPOL.prototype.hasProposalPol = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.BlockPart.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.BlockPart.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.BlockPart} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.BlockPart.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + round: jspb.Message.getFieldWithDefault(msg, 2, 0), + part: (f = msg.getPart()) && tendermint_types_types_pb.Part.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.BlockPart} + */ +proto.tendermint.consensus.BlockPart.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.BlockPart; + return proto.tendermint.consensus.BlockPart.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.BlockPart} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.BlockPart} + */ +proto.tendermint.consensus.BlockPart.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var value = new tendermint_types_types_pb.Part; + reader.readMessage(value,tendermint_types_types_pb.Part.deserializeBinaryFromReader); + msg.setPart(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.BlockPart.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.BlockPart.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.BlockPart} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.BlockPart.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getPart(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_types_types_pb.Part.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.consensus.BlockPart.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.BlockPart} returns this + */ +proto.tendermint.consensus.BlockPart.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.tendermint.consensus.BlockPart.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.BlockPart} returns this + */ +proto.tendermint.consensus.BlockPart.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional tendermint.types.Part part = 3; + * @return {?proto.tendermint.types.Part} + */ +proto.tendermint.consensus.BlockPart.prototype.getPart = function() { + return /** @type{?proto.tendermint.types.Part} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Part, 3)); +}; + + +/** + * @param {?proto.tendermint.types.Part|undefined} value + * @return {!proto.tendermint.consensus.BlockPart} returns this +*/ +proto.tendermint.consensus.BlockPart.prototype.setPart = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.BlockPart} returns this + */ +proto.tendermint.consensus.BlockPart.prototype.clearPart = function() { + return this.setPart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.BlockPart.prototype.hasPart = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.Vote.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.Vote.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.Vote} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.Vote.toObject = function(includeInstance, msg) { + var f, obj = { + vote: (f = msg.getVote()) && tendermint_types_types_pb.Vote.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.Vote} + */ +proto.tendermint.consensus.Vote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.Vote; + return proto.tendermint.consensus.Vote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.Vote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.Vote} + */ +proto.tendermint.consensus.Vote.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Vote; + reader.readMessage(value,tendermint_types_types_pb.Vote.deserializeBinaryFromReader); + msg.setVote(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.Vote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.Vote.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.Vote} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.Vote.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVote(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Vote.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.Vote vote = 1; + * @return {?proto.tendermint.types.Vote} + */ +proto.tendermint.consensus.Vote.prototype.getVote = function() { + return /** @type{?proto.tendermint.types.Vote} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Vote, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Vote|undefined} value + * @return {!proto.tendermint.consensus.Vote} returns this +*/ +proto.tendermint.consensus.Vote.prototype.setVote = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.Vote} returns this + */ +proto.tendermint.consensus.Vote.prototype.clearVote = function() { + return this.setVote(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.Vote.prototype.hasVote = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.HasVote.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.HasVote.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.HasVote} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.HasVote.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + round: jspb.Message.getFieldWithDefault(msg, 2, 0), + type: jspb.Message.getFieldWithDefault(msg, 3, 0), + index: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.HasVote} + */ +proto.tendermint.consensus.HasVote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.HasVote; + return proto.tendermint.consensus.HasVote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.HasVote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.HasVote} + */ +proto.tendermint.consensus.HasVote.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var value = /** @type {!proto.tendermint.types.SignedMsgType} */ (reader.readEnum()); + msg.setType(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setIndex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.HasVote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.HasVote.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.HasVote} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.HasVote.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.consensus.HasVote.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.HasVote} returns this + */ +proto.tendermint.consensus.HasVote.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.tendermint.consensus.HasVote.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.HasVote} returns this + */ +proto.tendermint.consensus.HasVote.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional tendermint.types.SignedMsgType type = 3; + * @return {!proto.tendermint.types.SignedMsgType} + */ +proto.tendermint.consensus.HasVote.prototype.getType = function() { + return /** @type {!proto.tendermint.types.SignedMsgType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.tendermint.types.SignedMsgType} value + * @return {!proto.tendermint.consensus.HasVote} returns this + */ +proto.tendermint.consensus.HasVote.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional int32 index = 4; + * @return {number} + */ +proto.tendermint.consensus.HasVote.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.HasVote} returns this + */ +proto.tendermint.consensus.HasVote.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.VoteSetMaj23.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.VoteSetMaj23.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.VoteSetMaj23} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.VoteSetMaj23.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + round: jspb.Message.getFieldWithDefault(msg, 2, 0), + type: jspb.Message.getFieldWithDefault(msg, 3, 0), + blockId: (f = msg.getBlockId()) && tendermint_types_types_pb.BlockID.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.VoteSetMaj23} + */ +proto.tendermint.consensus.VoteSetMaj23.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.VoteSetMaj23; + return proto.tendermint.consensus.VoteSetMaj23.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.VoteSetMaj23} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.VoteSetMaj23} + */ +proto.tendermint.consensus.VoteSetMaj23.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var value = /** @type {!proto.tendermint.types.SignedMsgType} */ (reader.readEnum()); + msg.setType(value); + break; + case 4: + var value = new tendermint_types_types_pb.BlockID; + reader.readMessage(value,tendermint_types_types_pb.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.VoteSetMaj23.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.VoteSetMaj23.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.VoteSetMaj23} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.VoteSetMaj23.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_types_types_pb.BlockID.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.consensus.VoteSetMaj23.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.VoteSetMaj23} returns this + */ +proto.tendermint.consensus.VoteSetMaj23.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.tendermint.consensus.VoteSetMaj23.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.VoteSetMaj23} returns this + */ +proto.tendermint.consensus.VoteSetMaj23.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional tendermint.types.SignedMsgType type = 3; + * @return {!proto.tendermint.types.SignedMsgType} + */ +proto.tendermint.consensus.VoteSetMaj23.prototype.getType = function() { + return /** @type {!proto.tendermint.types.SignedMsgType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.tendermint.types.SignedMsgType} value + * @return {!proto.tendermint.consensus.VoteSetMaj23} returns this + */ +proto.tendermint.consensus.VoteSetMaj23.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional tendermint.types.BlockID block_id = 4; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.consensus.VoteSetMaj23.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.BlockID, 4)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.consensus.VoteSetMaj23} returns this +*/ +proto.tendermint.consensus.VoteSetMaj23.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.VoteSetMaj23} returns this + */ +proto.tendermint.consensus.VoteSetMaj23.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.VoteSetMaj23.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.VoteSetBits.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.VoteSetBits.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.VoteSetBits} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.VoteSetBits.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + round: jspb.Message.getFieldWithDefault(msg, 2, 0), + type: jspb.Message.getFieldWithDefault(msg, 3, 0), + blockId: (f = msg.getBlockId()) && tendermint_types_types_pb.BlockID.toObject(includeInstance, f), + votes: (f = msg.getVotes()) && tendermint_libs_bits_types_pb.BitArray.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.VoteSetBits} + */ +proto.tendermint.consensus.VoteSetBits.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.VoteSetBits; + return proto.tendermint.consensus.VoteSetBits.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.VoteSetBits} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.VoteSetBits} + */ +proto.tendermint.consensus.VoteSetBits.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var value = /** @type {!proto.tendermint.types.SignedMsgType} */ (reader.readEnum()); + msg.setType(value); + break; + case 4: + var value = new tendermint_types_types_pb.BlockID; + reader.readMessage(value,tendermint_types_types_pb.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 5: + var value = new tendermint_libs_bits_types_pb.BitArray; + reader.readMessage(value,tendermint_libs_bits_types_pb.BitArray.deserializeBinaryFromReader); + msg.setVotes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.VoteSetBits.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.VoteSetBits.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.VoteSetBits} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.VoteSetBits.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_types_types_pb.BlockID.serializeBinaryToWriter + ); + } + f = message.getVotes(); + if (f != null) { + writer.writeMessage( + 5, + f, + tendermint_libs_bits_types_pb.BitArray.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.consensus.VoteSetBits.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.VoteSetBits} returns this + */ +proto.tendermint.consensus.VoteSetBits.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.tendermint.consensus.VoteSetBits.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.VoteSetBits} returns this + */ +proto.tendermint.consensus.VoteSetBits.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional tendermint.types.SignedMsgType type = 3; + * @return {!proto.tendermint.types.SignedMsgType} + */ +proto.tendermint.consensus.VoteSetBits.prototype.getType = function() { + return /** @type {!proto.tendermint.types.SignedMsgType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.tendermint.types.SignedMsgType} value + * @return {!proto.tendermint.consensus.VoteSetBits} returns this + */ +proto.tendermint.consensus.VoteSetBits.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional tendermint.types.BlockID block_id = 4; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.consensus.VoteSetBits.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.BlockID, 4)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.consensus.VoteSetBits} returns this +*/ +proto.tendermint.consensus.VoteSetBits.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.VoteSetBits} returns this + */ +proto.tendermint.consensus.VoteSetBits.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.VoteSetBits.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional tendermint.libs.bits.BitArray votes = 5; + * @return {?proto.tendermint.libs.bits.BitArray} + */ +proto.tendermint.consensus.VoteSetBits.prototype.getVotes = function() { + return /** @type{?proto.tendermint.libs.bits.BitArray} */ ( + jspb.Message.getWrapperField(this, tendermint_libs_bits_types_pb.BitArray, 5)); +}; + + +/** + * @param {?proto.tendermint.libs.bits.BitArray|undefined} value + * @return {!proto.tendermint.consensus.VoteSetBits} returns this +*/ +proto.tendermint.consensus.VoteSetBits.prototype.setVotes = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.VoteSetBits} returns this + */ +proto.tendermint.consensus.VoteSetBits.prototype.clearVotes = function() { + return this.setVotes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.VoteSetBits.prototype.hasVotes = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.consensus.Message.oneofGroups_ = [[1,2,3,4,5,6,7,8,9]]; + +/** + * @enum {number} + */ +proto.tendermint.consensus.Message.SumCase = { + SUM_NOT_SET: 0, + NEW_ROUND_STEP: 1, + NEW_VALID_BLOCK: 2, + PROPOSAL: 3, + PROPOSAL_POL: 4, + BLOCK_PART: 5, + VOTE: 6, + HAS_VOTE: 7, + VOTE_SET_MAJ23: 8, + VOTE_SET_BITS: 9 +}; + +/** + * @return {proto.tendermint.consensus.Message.SumCase} + */ +proto.tendermint.consensus.Message.prototype.getSumCase = function() { + return /** @type {proto.tendermint.consensus.Message.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.consensus.Message.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.Message.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.Message.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.Message} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.Message.toObject = function(includeInstance, msg) { + var f, obj = { + newRoundStep: (f = msg.getNewRoundStep()) && proto.tendermint.consensus.NewRoundStep.toObject(includeInstance, f), + newValidBlock: (f = msg.getNewValidBlock()) && proto.tendermint.consensus.NewValidBlock.toObject(includeInstance, f), + proposal: (f = msg.getProposal()) && proto.tendermint.consensus.Proposal.toObject(includeInstance, f), + proposalPol: (f = msg.getProposalPol()) && proto.tendermint.consensus.ProposalPOL.toObject(includeInstance, f), + blockPart: (f = msg.getBlockPart()) && proto.tendermint.consensus.BlockPart.toObject(includeInstance, f), + vote: (f = msg.getVote()) && proto.tendermint.consensus.Vote.toObject(includeInstance, f), + hasVote: (f = msg.getHasVote()) && proto.tendermint.consensus.HasVote.toObject(includeInstance, f), + voteSetMaj23: (f = msg.getVoteSetMaj23()) && proto.tendermint.consensus.VoteSetMaj23.toObject(includeInstance, f), + voteSetBits: (f = msg.getVoteSetBits()) && proto.tendermint.consensus.VoteSetBits.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.Message} + */ +proto.tendermint.consensus.Message.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.Message; + return proto.tendermint.consensus.Message.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.Message} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.Message} + */ +proto.tendermint.consensus.Message.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.consensus.NewRoundStep; + reader.readMessage(value,proto.tendermint.consensus.NewRoundStep.deserializeBinaryFromReader); + msg.setNewRoundStep(value); + break; + case 2: + var value = new proto.tendermint.consensus.NewValidBlock; + reader.readMessage(value,proto.tendermint.consensus.NewValidBlock.deserializeBinaryFromReader); + msg.setNewValidBlock(value); + break; + case 3: + var value = new proto.tendermint.consensus.Proposal; + reader.readMessage(value,proto.tendermint.consensus.Proposal.deserializeBinaryFromReader); + msg.setProposal(value); + break; + case 4: + var value = new proto.tendermint.consensus.ProposalPOL; + reader.readMessage(value,proto.tendermint.consensus.ProposalPOL.deserializeBinaryFromReader); + msg.setProposalPol(value); + break; + case 5: + var value = new proto.tendermint.consensus.BlockPart; + reader.readMessage(value,proto.tendermint.consensus.BlockPart.deserializeBinaryFromReader); + msg.setBlockPart(value); + break; + case 6: + var value = new proto.tendermint.consensus.Vote; + reader.readMessage(value,proto.tendermint.consensus.Vote.deserializeBinaryFromReader); + msg.setVote(value); + break; + case 7: + var value = new proto.tendermint.consensus.HasVote; + reader.readMessage(value,proto.tendermint.consensus.HasVote.deserializeBinaryFromReader); + msg.setHasVote(value); + break; + case 8: + var value = new proto.tendermint.consensus.VoteSetMaj23; + reader.readMessage(value,proto.tendermint.consensus.VoteSetMaj23.deserializeBinaryFromReader); + msg.setVoteSetMaj23(value); + break; + case 9: + var value = new proto.tendermint.consensus.VoteSetBits; + reader.readMessage(value,proto.tendermint.consensus.VoteSetBits.deserializeBinaryFromReader); + msg.setVoteSetBits(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.Message.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.Message.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.Message} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.Message.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNewRoundStep(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.consensus.NewRoundStep.serializeBinaryToWriter + ); + } + f = message.getNewValidBlock(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.consensus.NewValidBlock.serializeBinaryToWriter + ); + } + f = message.getProposal(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.consensus.Proposal.serializeBinaryToWriter + ); + } + f = message.getProposalPol(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.consensus.ProposalPOL.serializeBinaryToWriter + ); + } + f = message.getBlockPart(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.consensus.BlockPart.serializeBinaryToWriter + ); + } + f = message.getVote(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.tendermint.consensus.Vote.serializeBinaryToWriter + ); + } + f = message.getHasVote(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.tendermint.consensus.HasVote.serializeBinaryToWriter + ); + } + f = message.getVoteSetMaj23(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.tendermint.consensus.VoteSetMaj23.serializeBinaryToWriter + ); + } + f = message.getVoteSetBits(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.tendermint.consensus.VoteSetBits.serializeBinaryToWriter + ); + } +}; + + +/** + * optional NewRoundStep new_round_step = 1; + * @return {?proto.tendermint.consensus.NewRoundStep} + */ +proto.tendermint.consensus.Message.prototype.getNewRoundStep = function() { + return /** @type{?proto.tendermint.consensus.NewRoundStep} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.NewRoundStep, 1)); +}; + + +/** + * @param {?proto.tendermint.consensus.NewRoundStep|undefined} value + * @return {!proto.tendermint.consensus.Message} returns this +*/ +proto.tendermint.consensus.Message.prototype.setNewRoundStep = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.consensus.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.Message} returns this + */ +proto.tendermint.consensus.Message.prototype.clearNewRoundStep = function() { + return this.setNewRoundStep(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.Message.prototype.hasNewRoundStep = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional NewValidBlock new_valid_block = 2; + * @return {?proto.tendermint.consensus.NewValidBlock} + */ +proto.tendermint.consensus.Message.prototype.getNewValidBlock = function() { + return /** @type{?proto.tendermint.consensus.NewValidBlock} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.NewValidBlock, 2)); +}; + + +/** + * @param {?proto.tendermint.consensus.NewValidBlock|undefined} value + * @return {!proto.tendermint.consensus.Message} returns this +*/ +proto.tendermint.consensus.Message.prototype.setNewValidBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.consensus.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.Message} returns this + */ +proto.tendermint.consensus.Message.prototype.clearNewValidBlock = function() { + return this.setNewValidBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.Message.prototype.hasNewValidBlock = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Proposal proposal = 3; + * @return {?proto.tendermint.consensus.Proposal} + */ +proto.tendermint.consensus.Message.prototype.getProposal = function() { + return /** @type{?proto.tendermint.consensus.Proposal} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.Proposal, 3)); +}; + + +/** + * @param {?proto.tendermint.consensus.Proposal|undefined} value + * @return {!proto.tendermint.consensus.Message} returns this +*/ +proto.tendermint.consensus.Message.prototype.setProposal = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.tendermint.consensus.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.Message} returns this + */ +proto.tendermint.consensus.Message.prototype.clearProposal = function() { + return this.setProposal(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.Message.prototype.hasProposal = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ProposalPOL proposal_pol = 4; + * @return {?proto.tendermint.consensus.ProposalPOL} + */ +proto.tendermint.consensus.Message.prototype.getProposalPol = function() { + return /** @type{?proto.tendermint.consensus.ProposalPOL} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.ProposalPOL, 4)); +}; + + +/** + * @param {?proto.tendermint.consensus.ProposalPOL|undefined} value + * @return {!proto.tendermint.consensus.Message} returns this +*/ +proto.tendermint.consensus.Message.prototype.setProposalPol = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.tendermint.consensus.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.Message} returns this + */ +proto.tendermint.consensus.Message.prototype.clearProposalPol = function() { + return this.setProposalPol(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.Message.prototype.hasProposalPol = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional BlockPart block_part = 5; + * @return {?proto.tendermint.consensus.BlockPart} + */ +proto.tendermint.consensus.Message.prototype.getBlockPart = function() { + return /** @type{?proto.tendermint.consensus.BlockPart} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.BlockPart, 5)); +}; + + +/** + * @param {?proto.tendermint.consensus.BlockPart|undefined} value + * @return {!proto.tendermint.consensus.Message} returns this +*/ +proto.tendermint.consensus.Message.prototype.setBlockPart = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.tendermint.consensus.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.Message} returns this + */ +proto.tendermint.consensus.Message.prototype.clearBlockPart = function() { + return this.setBlockPart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.Message.prototype.hasBlockPart = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional Vote vote = 6; + * @return {?proto.tendermint.consensus.Vote} + */ +proto.tendermint.consensus.Message.prototype.getVote = function() { + return /** @type{?proto.tendermint.consensus.Vote} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.Vote, 6)); +}; + + +/** + * @param {?proto.tendermint.consensus.Vote|undefined} value + * @return {!proto.tendermint.consensus.Message} returns this +*/ +proto.tendermint.consensus.Message.prototype.setVote = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.tendermint.consensus.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.Message} returns this + */ +proto.tendermint.consensus.Message.prototype.clearVote = function() { + return this.setVote(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.Message.prototype.hasVote = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional HasVote has_vote = 7; + * @return {?proto.tendermint.consensus.HasVote} + */ +proto.tendermint.consensus.Message.prototype.getHasVote = function() { + return /** @type{?proto.tendermint.consensus.HasVote} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.HasVote, 7)); +}; + + +/** + * @param {?proto.tendermint.consensus.HasVote|undefined} value + * @return {!proto.tendermint.consensus.Message} returns this +*/ +proto.tendermint.consensus.Message.prototype.setHasVote = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.tendermint.consensus.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.Message} returns this + */ +proto.tendermint.consensus.Message.prototype.clearHasVote = function() { + return this.setHasVote(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.Message.prototype.hasHasVote = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional VoteSetMaj23 vote_set_maj23 = 8; + * @return {?proto.tendermint.consensus.VoteSetMaj23} + */ +proto.tendermint.consensus.Message.prototype.getVoteSetMaj23 = function() { + return /** @type{?proto.tendermint.consensus.VoteSetMaj23} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.VoteSetMaj23, 8)); +}; + + +/** + * @param {?proto.tendermint.consensus.VoteSetMaj23|undefined} value + * @return {!proto.tendermint.consensus.Message} returns this +*/ +proto.tendermint.consensus.Message.prototype.setVoteSetMaj23 = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.tendermint.consensus.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.Message} returns this + */ +proto.tendermint.consensus.Message.prototype.clearVoteSetMaj23 = function() { + return this.setVoteSetMaj23(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.Message.prototype.hasVoteSetMaj23 = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional VoteSetBits vote_set_bits = 9; + * @return {?proto.tendermint.consensus.VoteSetBits} + */ +proto.tendermint.consensus.Message.prototype.getVoteSetBits = function() { + return /** @type{?proto.tendermint.consensus.VoteSetBits} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.VoteSetBits, 9)); +}; + + +/** + * @param {?proto.tendermint.consensus.VoteSetBits|undefined} value + * @return {!proto.tendermint.consensus.Message} returns this +*/ +proto.tendermint.consensus.Message.prototype.setVoteSetBits = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.tendermint.consensus.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.Message} returns this + */ +proto.tendermint.consensus.Message.prototype.clearVoteSetBits = function() { + return this.setVoteSetBits(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.Message.prototype.hasVoteSetBits = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +goog.object.extend(exports, proto.tendermint.consensus); diff --git a/js/proto/tendermint/consensus/wal_grpc_pb.js b/js/proto/tendermint/consensus/wal_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/consensus/wal_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/consensus/wal_pb.d.ts b/js/proto/tendermint/consensus/wal_pb.d.ts new file mode 100644 index 000000000..ded1a8614 --- /dev/null +++ b/js/proto/tendermint/consensus/wal_pb.d.ts @@ -0,0 +1,189 @@ +// package: tendermint.consensus +// file: tendermint/consensus/wal.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as tendermint_consensus_types_pb from "../../tendermint/consensus/types_pb"; +import * as tendermint_types_events_pb from "../../tendermint/types/events_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class MsgInfo extends jspb.Message { + + hasMsg(): boolean; + clearMsg(): void; + getMsg(): tendermint_consensus_types_pb.Message | undefined; + setMsg(value?: tendermint_consensus_types_pb.Message): MsgInfo; + + getPeerId(): string; + setPeerId(value: string): MsgInfo; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MsgInfo.AsObject; + static toObject(includeInstance: boolean, msg: MsgInfo): MsgInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MsgInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MsgInfo; + static deserializeBinaryFromReader(message: MsgInfo, reader: jspb.BinaryReader): MsgInfo; +} + +export namespace MsgInfo { + export type AsObject = { + msg?: tendermint_consensus_types_pb.Message.AsObject, + peerId: string, + } +} + +export class TimeoutInfo extends jspb.Message { + + hasDuration(): boolean; + clearDuration(): void; + getDuration(): google_protobuf_duration_pb.Duration | undefined; + setDuration(value?: google_protobuf_duration_pb.Duration): TimeoutInfo; + + getHeight(): number; + setHeight(value: number): TimeoutInfo; + + getRound(): number; + setRound(value: number): TimeoutInfo; + + getStep(): number; + setStep(value: number): TimeoutInfo; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TimeoutInfo.AsObject; + static toObject(includeInstance: boolean, msg: TimeoutInfo): TimeoutInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TimeoutInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TimeoutInfo; + static deserializeBinaryFromReader(message: TimeoutInfo, reader: jspb.BinaryReader): TimeoutInfo; +} + +export namespace TimeoutInfo { + export type AsObject = { + duration?: google_protobuf_duration_pb.Duration.AsObject, + height: number, + round: number, + step: number, + } +} + +export class EndHeight extends jspb.Message { + getHeight(): number; + setHeight(value: number): EndHeight; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EndHeight.AsObject; + static toObject(includeInstance: boolean, msg: EndHeight): EndHeight.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EndHeight, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EndHeight; + static deserializeBinaryFromReader(message: EndHeight, reader: jspb.BinaryReader): EndHeight; +} + +export namespace EndHeight { + export type AsObject = { + height: number, + } +} + +export class WALMessage extends jspb.Message { + + hasEventDataRoundState(): boolean; + clearEventDataRoundState(): void; + getEventDataRoundState(): tendermint_types_events_pb.EventDataRoundState | undefined; + setEventDataRoundState(value?: tendermint_types_events_pb.EventDataRoundState): WALMessage; + + + hasMsgInfo(): boolean; + clearMsgInfo(): void; + getMsgInfo(): MsgInfo | undefined; + setMsgInfo(value?: MsgInfo): WALMessage; + + + hasTimeoutInfo(): boolean; + clearTimeoutInfo(): void; + getTimeoutInfo(): TimeoutInfo | undefined; + setTimeoutInfo(value?: TimeoutInfo): WALMessage; + + + hasEndHeight(): boolean; + clearEndHeight(): void; + getEndHeight(): EndHeight | undefined; + setEndHeight(value?: EndHeight): WALMessage; + + + getSumCase(): WALMessage.SumCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WALMessage.AsObject; + static toObject(includeInstance: boolean, msg: WALMessage): WALMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: WALMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WALMessage; + static deserializeBinaryFromReader(message: WALMessage, reader: jspb.BinaryReader): WALMessage; +} + +export namespace WALMessage { + export type AsObject = { + eventDataRoundState?: tendermint_types_events_pb.EventDataRoundState.AsObject, + msgInfo?: MsgInfo.AsObject, + timeoutInfo?: TimeoutInfo.AsObject, + endHeight?: EndHeight.AsObject, + } + + export enum SumCase { + SUM_NOT_SET = 0, + + EVENT_DATA_ROUND_STATE = 1, + + MSG_INFO = 2, + + TIMEOUT_INFO = 3, + + END_HEIGHT = 4, + + } + +} + +export class TimedWALMessage extends jspb.Message { + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): TimedWALMessage; + + + hasMsg(): boolean; + clearMsg(): void; + getMsg(): WALMessage | undefined; + setMsg(value?: WALMessage): TimedWALMessage; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TimedWALMessage.AsObject; + static toObject(includeInstance: boolean, msg: TimedWALMessage): TimedWALMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TimedWALMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TimedWALMessage; + static deserializeBinaryFromReader(message: TimedWALMessage, reader: jspb.BinaryReader): TimedWALMessage; +} + +export namespace TimedWALMessage { + export type AsObject = { + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + msg?: WALMessage.AsObject, + } +} diff --git a/js/proto/tendermint/consensus/wal_pb.js b/js/proto/tendermint/consensus/wal_pb.js new file mode 100644 index 000000000..2d09c3baf --- /dev/null +++ b/js/proto/tendermint/consensus/wal_pb.js @@ -0,0 +1,1224 @@ +// source: tendermint/consensus/wal.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var tendermint_consensus_types_pb = require('../../tendermint/consensus/types_pb.js'); +goog.object.extend(proto, tendermint_consensus_types_pb); +var tendermint_types_events_pb = require('../../tendermint/types/events_pb.js'); +goog.object.extend(proto, tendermint_types_events_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.tendermint.consensus.EndHeight', null, global); +goog.exportSymbol('proto.tendermint.consensus.MsgInfo', null, global); +goog.exportSymbol('proto.tendermint.consensus.TimedWALMessage', null, global); +goog.exportSymbol('proto.tendermint.consensus.TimeoutInfo', null, global); +goog.exportSymbol('proto.tendermint.consensus.WALMessage', null, global); +goog.exportSymbol('proto.tendermint.consensus.WALMessage.SumCase', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.MsgInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.MsgInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.MsgInfo.displayName = 'proto.tendermint.consensus.MsgInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.TimeoutInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.TimeoutInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.TimeoutInfo.displayName = 'proto.tendermint.consensus.TimeoutInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.EndHeight = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.EndHeight, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.EndHeight.displayName = 'proto.tendermint.consensus.EndHeight'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.WALMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.consensus.WALMessage.oneofGroups_); +}; +goog.inherits(proto.tendermint.consensus.WALMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.WALMessage.displayName = 'proto.tendermint.consensus.WALMessage'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.consensus.TimedWALMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.consensus.TimedWALMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.consensus.TimedWALMessage.displayName = 'proto.tendermint.consensus.TimedWALMessage'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.MsgInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.MsgInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.MsgInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.MsgInfo.toObject = function(includeInstance, msg) { + var f, obj = { + msg: (f = msg.getMsg()) && tendermint_consensus_types_pb.Message.toObject(includeInstance, f), + peerId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.MsgInfo} + */ +proto.tendermint.consensus.MsgInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.MsgInfo; + return proto.tendermint.consensus.MsgInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.MsgInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.MsgInfo} + */ +proto.tendermint.consensus.MsgInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_consensus_types_pb.Message; + reader.readMessage(value,tendermint_consensus_types_pb.Message.deserializeBinaryFromReader); + msg.setMsg(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPeerId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.MsgInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.MsgInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.MsgInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.MsgInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsg(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_consensus_types_pb.Message.serializeBinaryToWriter + ); + } + f = message.getPeerId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional Message msg = 1; + * @return {?proto.tendermint.consensus.Message} + */ +proto.tendermint.consensus.MsgInfo.prototype.getMsg = function() { + return /** @type{?proto.tendermint.consensus.Message} */ ( + jspb.Message.getWrapperField(this, tendermint_consensus_types_pb.Message, 1)); +}; + + +/** + * @param {?proto.tendermint.consensus.Message|undefined} value + * @return {!proto.tendermint.consensus.MsgInfo} returns this +*/ +proto.tendermint.consensus.MsgInfo.prototype.setMsg = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.MsgInfo} returns this + */ +proto.tendermint.consensus.MsgInfo.prototype.clearMsg = function() { + return this.setMsg(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.MsgInfo.prototype.hasMsg = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string peer_id = 2; + * @return {string} + */ +proto.tendermint.consensus.MsgInfo.prototype.getPeerId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.consensus.MsgInfo} returns this + */ +proto.tendermint.consensus.MsgInfo.prototype.setPeerId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.TimeoutInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.TimeoutInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.TimeoutInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.TimeoutInfo.toObject = function(includeInstance, msg) { + var f, obj = { + duration: (f = msg.getDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + round: jspb.Message.getFieldWithDefault(msg, 3, 0), + step: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.TimeoutInfo} + */ +proto.tendermint.consensus.TimeoutInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.TimeoutInfo; + return proto.tendermint.consensus.TimeoutInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.TimeoutInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.TimeoutInfo} + */ +proto.tendermint.consensus.TimeoutInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setDuration(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setStep(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.TimeoutInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.TimeoutInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.TimeoutInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.TimeoutInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDuration(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getStep(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } +}; + + +/** + * optional google.protobuf.Duration duration = 1; + * @return {?proto.google.protobuf.Duration} + */ +proto.tendermint.consensus.TimeoutInfo.prototype.getDuration = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.tendermint.consensus.TimeoutInfo} returns this +*/ +proto.tendermint.consensus.TimeoutInfo.prototype.setDuration = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.TimeoutInfo} returns this + */ +proto.tendermint.consensus.TimeoutInfo.prototype.clearDuration = function() { + return this.setDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.TimeoutInfo.prototype.hasDuration = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.tendermint.consensus.TimeoutInfo.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.TimeoutInfo} returns this + */ +proto.tendermint.consensus.TimeoutInfo.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 round = 3; + * @return {number} + */ +proto.tendermint.consensus.TimeoutInfo.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.TimeoutInfo} returns this + */ +proto.tendermint.consensus.TimeoutInfo.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint32 step = 4; + * @return {number} + */ +proto.tendermint.consensus.TimeoutInfo.prototype.getStep = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.TimeoutInfo} returns this + */ +proto.tendermint.consensus.TimeoutInfo.prototype.setStep = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.EndHeight.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.EndHeight.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.EndHeight} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.EndHeight.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.EndHeight} + */ +proto.tendermint.consensus.EndHeight.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.EndHeight; + return proto.tendermint.consensus.EndHeight.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.EndHeight} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.EndHeight} + */ +proto.tendermint.consensus.EndHeight.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.EndHeight.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.EndHeight.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.EndHeight} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.EndHeight.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.consensus.EndHeight.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.consensus.EndHeight} returns this + */ +proto.tendermint.consensus.EndHeight.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.consensus.WALMessage.oneofGroups_ = [[1,2,3,4]]; + +/** + * @enum {number} + */ +proto.tendermint.consensus.WALMessage.SumCase = { + SUM_NOT_SET: 0, + EVENT_DATA_ROUND_STATE: 1, + MSG_INFO: 2, + TIMEOUT_INFO: 3, + END_HEIGHT: 4 +}; + +/** + * @return {proto.tendermint.consensus.WALMessage.SumCase} + */ +proto.tendermint.consensus.WALMessage.prototype.getSumCase = function() { + return /** @type {proto.tendermint.consensus.WALMessage.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.consensus.WALMessage.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.WALMessage.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.WALMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.WALMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.WALMessage.toObject = function(includeInstance, msg) { + var f, obj = { + eventDataRoundState: (f = msg.getEventDataRoundState()) && tendermint_types_events_pb.EventDataRoundState.toObject(includeInstance, f), + msgInfo: (f = msg.getMsgInfo()) && proto.tendermint.consensus.MsgInfo.toObject(includeInstance, f), + timeoutInfo: (f = msg.getTimeoutInfo()) && proto.tendermint.consensus.TimeoutInfo.toObject(includeInstance, f), + endHeight: (f = msg.getEndHeight()) && proto.tendermint.consensus.EndHeight.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.WALMessage} + */ +proto.tendermint.consensus.WALMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.WALMessage; + return proto.tendermint.consensus.WALMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.WALMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.WALMessage} + */ +proto.tendermint.consensus.WALMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_events_pb.EventDataRoundState; + reader.readMessage(value,tendermint_types_events_pb.EventDataRoundState.deserializeBinaryFromReader); + msg.setEventDataRoundState(value); + break; + case 2: + var value = new proto.tendermint.consensus.MsgInfo; + reader.readMessage(value,proto.tendermint.consensus.MsgInfo.deserializeBinaryFromReader); + msg.setMsgInfo(value); + break; + case 3: + var value = new proto.tendermint.consensus.TimeoutInfo; + reader.readMessage(value,proto.tendermint.consensus.TimeoutInfo.deserializeBinaryFromReader); + msg.setTimeoutInfo(value); + break; + case 4: + var value = new proto.tendermint.consensus.EndHeight; + reader.readMessage(value,proto.tendermint.consensus.EndHeight.deserializeBinaryFromReader); + msg.setEndHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.WALMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.WALMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.WALMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.WALMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEventDataRoundState(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_events_pb.EventDataRoundState.serializeBinaryToWriter + ); + } + f = message.getMsgInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.consensus.MsgInfo.serializeBinaryToWriter + ); + } + f = message.getTimeoutInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.consensus.TimeoutInfo.serializeBinaryToWriter + ); + } + f = message.getEndHeight(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.consensus.EndHeight.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.EventDataRoundState event_data_round_state = 1; + * @return {?proto.tendermint.types.EventDataRoundState} + */ +proto.tendermint.consensus.WALMessage.prototype.getEventDataRoundState = function() { + return /** @type{?proto.tendermint.types.EventDataRoundState} */ ( + jspb.Message.getWrapperField(this, tendermint_types_events_pb.EventDataRoundState, 1)); +}; + + +/** + * @param {?proto.tendermint.types.EventDataRoundState|undefined} value + * @return {!proto.tendermint.consensus.WALMessage} returns this +*/ +proto.tendermint.consensus.WALMessage.prototype.setEventDataRoundState = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.consensus.WALMessage.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.WALMessage} returns this + */ +proto.tendermint.consensus.WALMessage.prototype.clearEventDataRoundState = function() { + return this.setEventDataRoundState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.WALMessage.prototype.hasEventDataRoundState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional MsgInfo msg_info = 2; + * @return {?proto.tendermint.consensus.MsgInfo} + */ +proto.tendermint.consensus.WALMessage.prototype.getMsgInfo = function() { + return /** @type{?proto.tendermint.consensus.MsgInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.MsgInfo, 2)); +}; + + +/** + * @param {?proto.tendermint.consensus.MsgInfo|undefined} value + * @return {!proto.tendermint.consensus.WALMessage} returns this +*/ +proto.tendermint.consensus.WALMessage.prototype.setMsgInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.consensus.WALMessage.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.WALMessage} returns this + */ +proto.tendermint.consensus.WALMessage.prototype.clearMsgInfo = function() { + return this.setMsgInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.WALMessage.prototype.hasMsgInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional TimeoutInfo timeout_info = 3; + * @return {?proto.tendermint.consensus.TimeoutInfo} + */ +proto.tendermint.consensus.WALMessage.prototype.getTimeoutInfo = function() { + return /** @type{?proto.tendermint.consensus.TimeoutInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.TimeoutInfo, 3)); +}; + + +/** + * @param {?proto.tendermint.consensus.TimeoutInfo|undefined} value + * @return {!proto.tendermint.consensus.WALMessage} returns this +*/ +proto.tendermint.consensus.WALMessage.prototype.setTimeoutInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.tendermint.consensus.WALMessage.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.WALMessage} returns this + */ +proto.tendermint.consensus.WALMessage.prototype.clearTimeoutInfo = function() { + return this.setTimeoutInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.WALMessage.prototype.hasTimeoutInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional EndHeight end_height = 4; + * @return {?proto.tendermint.consensus.EndHeight} + */ +proto.tendermint.consensus.WALMessage.prototype.getEndHeight = function() { + return /** @type{?proto.tendermint.consensus.EndHeight} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.EndHeight, 4)); +}; + + +/** + * @param {?proto.tendermint.consensus.EndHeight|undefined} value + * @return {!proto.tendermint.consensus.WALMessage} returns this +*/ +proto.tendermint.consensus.WALMessage.prototype.setEndHeight = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.tendermint.consensus.WALMessage.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.WALMessage} returns this + */ +proto.tendermint.consensus.WALMessage.prototype.clearEndHeight = function() { + return this.setEndHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.WALMessage.prototype.hasEndHeight = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.consensus.TimedWALMessage.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.consensus.TimedWALMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.consensus.TimedWALMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.TimedWALMessage.toObject = function(includeInstance, msg) { + var f, obj = { + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + msg: (f = msg.getMsg()) && proto.tendermint.consensus.WALMessage.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.consensus.TimedWALMessage} + */ +proto.tendermint.consensus.TimedWALMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.consensus.TimedWALMessage; + return proto.tendermint.consensus.TimedWALMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.consensus.TimedWALMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.consensus.TimedWALMessage} + */ +proto.tendermint.consensus.TimedWALMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 2: + var value = new proto.tendermint.consensus.WALMessage; + reader.readMessage(value,proto.tendermint.consensus.WALMessage.deserializeBinaryFromReader); + msg.setMsg(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.consensus.TimedWALMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.consensus.TimedWALMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.consensus.TimedWALMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.consensus.TimedWALMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getMsg(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.consensus.WALMessage.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Timestamp time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.consensus.TimedWALMessage.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.consensus.TimedWALMessage} returns this +*/ +proto.tendermint.consensus.TimedWALMessage.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.TimedWALMessage} returns this + */ +proto.tendermint.consensus.TimedWALMessage.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.TimedWALMessage.prototype.hasTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional WALMessage msg = 2; + * @return {?proto.tendermint.consensus.WALMessage} + */ +proto.tendermint.consensus.TimedWALMessage.prototype.getMsg = function() { + return /** @type{?proto.tendermint.consensus.WALMessage} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.consensus.WALMessage, 2)); +}; + + +/** + * @param {?proto.tendermint.consensus.WALMessage|undefined} value + * @return {!proto.tendermint.consensus.TimedWALMessage} returns this +*/ +proto.tendermint.consensus.TimedWALMessage.prototype.setMsg = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.consensus.TimedWALMessage} returns this + */ +proto.tendermint.consensus.TimedWALMessage.prototype.clearMsg = function() { + return this.setMsg(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.consensus.TimedWALMessage.prototype.hasMsg = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.tendermint.consensus); diff --git a/js/proto/tendermint/crypto/keys_grpc_pb.js b/js/proto/tendermint/crypto/keys_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/crypto/keys_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/crypto/keys_pb.d.ts b/js/proto/tendermint/crypto/keys_pb.d.ts new file mode 100644 index 000000000..a4e9a2303 --- /dev/null +++ b/js/proto/tendermint/crypto/keys_pb.d.ts @@ -0,0 +1,55 @@ +// package: tendermint.crypto +// file: tendermint/crypto/keys.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; + +export class PublicKey extends jspb.Message { + + hasEd25519(): boolean; + clearEd25519(): void; + getEd25519(): Uint8Array | string; + getEd25519_asU8(): Uint8Array; + getEd25519_asB64(): string; + setEd25519(value: Uint8Array | string): PublicKey; + + + hasSecp256k1(): boolean; + clearSecp256k1(): void; + getSecp256k1(): Uint8Array | string; + getSecp256k1_asU8(): Uint8Array; + getSecp256k1_asB64(): string; + setSecp256k1(value: Uint8Array | string): PublicKey; + + + getSumCase(): PublicKey.SumCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PublicKey.AsObject; + static toObject(includeInstance: boolean, msg: PublicKey): PublicKey.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PublicKey, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PublicKey; + static deserializeBinaryFromReader(message: PublicKey, reader: jspb.BinaryReader): PublicKey; +} + +export namespace PublicKey { + export type AsObject = { + ed25519: Uint8Array | string, + secp256k1: Uint8Array | string, + } + + export enum SumCase { + SUM_NOT_SET = 0, + + ED25519 = 1, + + SECP256K1 = 2, + + } + +} diff --git a/js/proto/tendermint/crypto/keys_pb.js b/js/proto/tendermint/crypto/keys_pb.js new file mode 100644 index 000000000..89acbb08f --- /dev/null +++ b/js/proto/tendermint/crypto/keys_pb.js @@ -0,0 +1,312 @@ +// source: tendermint/crypto/keys.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.tendermint.crypto.PublicKey', null, global); +goog.exportSymbol('proto.tendermint.crypto.PublicKey.SumCase', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.crypto.PublicKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.crypto.PublicKey.oneofGroups_); +}; +goog.inherits(proto.tendermint.crypto.PublicKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.PublicKey.displayName = 'proto.tendermint.crypto.PublicKey'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.crypto.PublicKey.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.tendermint.crypto.PublicKey.SumCase = { + SUM_NOT_SET: 0, + ED25519: 1, + SECP256K1: 2 +}; + +/** + * @return {proto.tendermint.crypto.PublicKey.SumCase} + */ +proto.tendermint.crypto.PublicKey.prototype.getSumCase = function() { + return /** @type {proto.tendermint.crypto.PublicKey.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.crypto.PublicKey.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.crypto.PublicKey.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.PublicKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.crypto.PublicKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.PublicKey.toObject = function(includeInstance, msg) { + var f, obj = { + ed25519: msg.getEd25519_asB64(), + secp256k1: msg.getSecp256k1_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.crypto.PublicKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.PublicKey; + return proto.tendermint.crypto.PublicKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.PublicKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.crypto.PublicKey.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEd25519(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSecp256k1(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.PublicKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.PublicKey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.crypto.PublicKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.PublicKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes ed25519 = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.PublicKey.prototype.getEd25519 = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes ed25519 = 1; + * This is a type-conversion wrapper around `getEd25519()` + * @return {string} + */ +proto.tendermint.crypto.PublicKey.prototype.getEd25519_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEd25519())); +}; + + +/** + * optional bytes ed25519 = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEd25519()` + * @return {!Uint8Array} + */ +proto.tendermint.crypto.PublicKey.prototype.getEd25519_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEd25519())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.PublicKey} returns this + */ +proto.tendermint.crypto.PublicKey.prototype.setEd25519 = function(value) { + return jspb.Message.setOneofField(this, 1, proto.tendermint.crypto.PublicKey.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.tendermint.crypto.PublicKey} returns this + */ +proto.tendermint.crypto.PublicKey.prototype.clearEd25519 = function() { + return jspb.Message.setOneofField(this, 1, proto.tendermint.crypto.PublicKey.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.crypto.PublicKey.prototype.hasEd25519 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes secp256k1 = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.PublicKey.prototype.getSecp256k1 = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes secp256k1 = 2; + * This is a type-conversion wrapper around `getSecp256k1()` + * @return {string} + */ +proto.tendermint.crypto.PublicKey.prototype.getSecp256k1_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSecp256k1())); +}; + + +/** + * optional bytes secp256k1 = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSecp256k1()` + * @return {!Uint8Array} + */ +proto.tendermint.crypto.PublicKey.prototype.getSecp256k1_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSecp256k1())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.PublicKey} returns this + */ +proto.tendermint.crypto.PublicKey.prototype.setSecp256k1 = function(value) { + return jspb.Message.setOneofField(this, 2, proto.tendermint.crypto.PublicKey.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.tendermint.crypto.PublicKey} returns this + */ +proto.tendermint.crypto.PublicKey.prototype.clearSecp256k1 = function() { + return jspb.Message.setOneofField(this, 2, proto.tendermint.crypto.PublicKey.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.crypto.PublicKey.prototype.hasSecp256k1 = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.tendermint.crypto); diff --git a/js/proto/tendermint/crypto/proof_grpc_pb.js b/js/proto/tendermint/crypto/proof_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/crypto/proof_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/crypto/proof_pb.d.ts b/js/proto/tendermint/crypto/proof_pb.d.ts new file mode 100644 index 000000000..df2ddb53d --- /dev/null +++ b/js/proto/tendermint/crypto/proof_pb.d.ts @@ -0,0 +1,162 @@ +// package: tendermint.crypto +// file: tendermint/crypto/proof.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; + +export class Proof extends jspb.Message { + getTotal(): number; + setTotal(value: number): Proof; + + getIndex(): number; + setIndex(value: number): Proof; + + getLeafHash(): Uint8Array | string; + getLeafHash_asU8(): Uint8Array; + getLeafHash_asB64(): string; + setLeafHash(value: Uint8Array | string): Proof; + + clearAuntsList(): void; + getAuntsList(): Array; + getAuntsList_asU8(): Array; + getAuntsList_asB64(): Array; + setAuntsList(value: Array): Proof; + addAunts(value: Uint8Array | string, index?: number): Uint8Array | string; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Proof.AsObject; + static toObject(includeInstance: boolean, msg: Proof): Proof.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Proof, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Proof; + static deserializeBinaryFromReader(message: Proof, reader: jspb.BinaryReader): Proof; +} + +export namespace Proof { + export type AsObject = { + total: number, + index: number, + leafHash: Uint8Array | string, + auntsList: Array, + } +} + +export class ValueOp extends jspb.Message { + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): ValueOp; + + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): ValueOp; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValueOp.AsObject; + static toObject(includeInstance: boolean, msg: ValueOp): ValueOp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValueOp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValueOp; + static deserializeBinaryFromReader(message: ValueOp, reader: jspb.BinaryReader): ValueOp; +} + +export namespace ValueOp { + export type AsObject = { + key: Uint8Array | string, + proof?: Proof.AsObject, + } +} + +export class DominoOp extends jspb.Message { + getKey(): string; + setKey(value: string): DominoOp; + + getInput(): string; + setInput(value: string): DominoOp; + + getOutput(): string; + setOutput(value: string): DominoOp; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DominoOp.AsObject; + static toObject(includeInstance: boolean, msg: DominoOp): DominoOp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DominoOp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DominoOp; + static deserializeBinaryFromReader(message: DominoOp, reader: jspb.BinaryReader): DominoOp; +} + +export namespace DominoOp { + export type AsObject = { + key: string, + input: string, + output: string, + } +} + +export class ProofOp extends jspb.Message { + getType(): string; + setType(value: string): ProofOp; + + getKey(): Uint8Array | string; + getKey_asU8(): Uint8Array; + getKey_asB64(): string; + setKey(value: Uint8Array | string): ProofOp; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): ProofOp; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProofOp.AsObject; + static toObject(includeInstance: boolean, msg: ProofOp): ProofOp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProofOp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProofOp; + static deserializeBinaryFromReader(message: ProofOp, reader: jspb.BinaryReader): ProofOp; +} + +export namespace ProofOp { + export type AsObject = { + type: string, + key: Uint8Array | string, + data: Uint8Array | string, + } +} + +export class ProofOps extends jspb.Message { + clearOpsList(): void; + getOpsList(): Array; + setOpsList(value: Array): ProofOps; + addOps(value?: ProofOp, index?: number): ProofOp; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProofOps.AsObject; + static toObject(includeInstance: boolean, msg: ProofOps): ProofOps.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProofOps, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProofOps; + static deserializeBinaryFromReader(message: ProofOps, reader: jspb.BinaryReader): ProofOps; +} + +export namespace ProofOps { + export type AsObject = { + opsList: Array, + } +} diff --git a/js/proto/tendermint/crypto/proof_pb.js b/js/proto/tendermint/crypto/proof_pb.js new file mode 100644 index 000000000..96338204a --- /dev/null +++ b/js/proto/tendermint/crypto/proof_pb.js @@ -0,0 +1,1216 @@ +// source: tendermint/crypto/proof.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.tendermint.crypto.DominoOp', null, global); +goog.exportSymbol('proto.tendermint.crypto.Proof', null, global); +goog.exportSymbol('proto.tendermint.crypto.ProofOp', null, global); +goog.exportSymbol('proto.tendermint.crypto.ProofOps', null, global); +goog.exportSymbol('proto.tendermint.crypto.ValueOp', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.crypto.Proof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.crypto.Proof.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.crypto.Proof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.Proof.displayName = 'proto.tendermint.crypto.Proof'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.crypto.ValueOp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.crypto.ValueOp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.ValueOp.displayName = 'proto.tendermint.crypto.ValueOp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.crypto.DominoOp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.crypto.DominoOp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.DominoOp.displayName = 'proto.tendermint.crypto.DominoOp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.crypto.ProofOp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.crypto.ProofOp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.ProofOp.displayName = 'proto.tendermint.crypto.ProofOp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.crypto.ProofOps = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.crypto.ProofOps.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.crypto.ProofOps, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.ProofOps.displayName = 'proto.tendermint.crypto.ProofOps'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.crypto.Proof.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.crypto.Proof.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.Proof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.crypto.Proof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.Proof.toObject = function(includeInstance, msg) { + var f, obj = { + total: jspb.Message.getFieldWithDefault(msg, 1, 0), + index: jspb.Message.getFieldWithDefault(msg, 2, 0), + leafHash: msg.getLeafHash_asB64(), + auntsList: msg.getAuntsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.crypto.Proof} + */ +proto.tendermint.crypto.Proof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.Proof; + return proto.tendermint.crypto.Proof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.Proof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.Proof} + */ +proto.tendermint.crypto.Proof.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotal(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setIndex(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLeafHash(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addAunts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.Proof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.Proof.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.crypto.Proof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.Proof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotal(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getLeafHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getAuntsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } +}; + + +/** + * optional int64 total = 1; + * @return {number} + */ +proto.tendermint.crypto.Proof.prototype.getTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.setTotal = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 index = 2; + * @return {number} + */ +proto.tendermint.crypto.Proof.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes leaf_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.Proof.prototype.getLeafHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes leaf_hash = 3; + * This is a type-conversion wrapper around `getLeafHash()` + * @return {string} + */ +proto.tendermint.crypto.Proof.prototype.getLeafHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLeafHash())); +}; + + +/** + * optional bytes leaf_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLeafHash()` + * @return {!Uint8Array} + */ +proto.tendermint.crypto.Proof.prototype.getLeafHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLeafHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.setLeafHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * repeated bytes aunts = 4; + * @return {!(Array|Array)} + */ +proto.tendermint.crypto.Proof.prototype.getAuntsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * repeated bytes aunts = 4; + * This is a type-conversion wrapper around `getAuntsList()` + * @return {!Array} + */ +proto.tendermint.crypto.Proof.prototype.getAuntsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getAuntsList())); +}; + + +/** + * repeated bytes aunts = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAuntsList()` + * @return {!Array} + */ +proto.tendermint.crypto.Proof.prototype.getAuntsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getAuntsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.setAuntsList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.addAunts = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.clearAuntsList = function() { + return this.setAuntsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.crypto.ValueOp.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.ValueOp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.crypto.ValueOp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ValueOp.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + proof: (f = msg.getProof()) && proto.tendermint.crypto.Proof.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.crypto.ValueOp} + */ +proto.tendermint.crypto.ValueOp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.ValueOp; + return proto.tendermint.crypto.ValueOp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.ValueOp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.ValueOp} + */ +proto.tendermint.crypto.ValueOp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 2: + var value = new proto.tendermint.crypto.Proof; + reader.readMessage(value,proto.tendermint.crypto.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.ValueOp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.ValueOp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.crypto.ValueOp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ValueOp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.crypto.Proof.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.ValueOp.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes key = 1; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.tendermint.crypto.ValueOp.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.tendermint.crypto.ValueOp.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.ValueOp} returns this + */ +proto.tendermint.crypto.ValueOp.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.tendermint.crypto.Proof} + */ +proto.tendermint.crypto.ValueOp.prototype.getProof = function() { + return /** @type{?proto.tendermint.crypto.Proof} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.crypto.Proof, 2)); +}; + + +/** + * @param {?proto.tendermint.crypto.Proof|undefined} value + * @return {!proto.tendermint.crypto.ValueOp} returns this +*/ +proto.tendermint.crypto.ValueOp.prototype.setProof = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.crypto.ValueOp} returns this + */ +proto.tendermint.crypto.ValueOp.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.crypto.ValueOp.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.crypto.DominoOp.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.DominoOp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.crypto.DominoOp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.DominoOp.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + input: jspb.Message.getFieldWithDefault(msg, 2, ""), + output: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.crypto.DominoOp} + */ +proto.tendermint.crypto.DominoOp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.DominoOp; + return proto.tendermint.crypto.DominoOp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.DominoOp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.DominoOp} + */ +proto.tendermint.crypto.DominoOp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setInput(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOutput(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.DominoOp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.DominoOp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.crypto.DominoOp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.DominoOp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOutput(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.tendermint.crypto.DominoOp.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.crypto.DominoOp} returns this + */ +proto.tendermint.crypto.DominoOp.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string input = 2; + * @return {string} + */ +proto.tendermint.crypto.DominoOp.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.crypto.DominoOp} returns this + */ +proto.tendermint.crypto.DominoOp.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string output = 3; + * @return {string} + */ +proto.tendermint.crypto.DominoOp.prototype.getOutput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.crypto.DominoOp} returns this + */ +proto.tendermint.crypto.DominoOp.prototype.setOutput = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.crypto.ProofOp.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.ProofOp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.crypto.ProofOp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ProofOp.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: msg.getKey_asB64(), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.crypto.ProofOp} + */ +proto.tendermint.crypto.ProofOp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.ProofOp; + return proto.tendermint.crypto.ProofOp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.ProofOp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.ProofOp} + */ +proto.tendermint.crypto.ProofOp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.ProofOp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.ProofOp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.crypto.ProofOp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ProofOp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.tendermint.crypto.ProofOp.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.crypto.ProofOp} returns this + */ +proto.tendermint.crypto.ProofOp.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes key = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.ProofOp.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes key = 2; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.tendermint.crypto.ProofOp.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKey()` + * @return {!Uint8Array} + */ +proto.tendermint.crypto.ProofOp.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.ProofOp} returns this + */ +proto.tendermint.crypto.ProofOp.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.ProofOp.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.tendermint.crypto.ProofOp.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.tendermint.crypto.ProofOp.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.ProofOp} returns this + */ +proto.tendermint.crypto.ProofOp.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.crypto.ProofOps.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.crypto.ProofOps.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.ProofOps.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.crypto.ProofOps} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ProofOps.toObject = function(includeInstance, msg) { + var f, obj = { + opsList: jspb.Message.toObjectList(msg.getOpsList(), + proto.tendermint.crypto.ProofOp.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.crypto.ProofOps} + */ +proto.tendermint.crypto.ProofOps.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.ProofOps; + return proto.tendermint.crypto.ProofOps.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.ProofOps} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.ProofOps} + */ +proto.tendermint.crypto.ProofOps.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.crypto.ProofOp; + reader.readMessage(value,proto.tendermint.crypto.ProofOp.deserializeBinaryFromReader); + msg.addOps(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.ProofOps.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.ProofOps.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.crypto.ProofOps} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ProofOps.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOpsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.crypto.ProofOp.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ProofOp ops = 1; + * @return {!Array} + */ +proto.tendermint.crypto.ProofOps.prototype.getOpsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.crypto.ProofOp, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.crypto.ProofOps} returns this +*/ +proto.tendermint.crypto.ProofOps.prototype.setOpsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.crypto.ProofOp=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.crypto.ProofOp} + */ +proto.tendermint.crypto.ProofOps.prototype.addOps = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.crypto.ProofOp, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.crypto.ProofOps} returns this + */ +proto.tendermint.crypto.ProofOps.prototype.clearOpsList = function() { + return this.setOpsList([]); +}; + + +goog.object.extend(exports, proto.tendermint.crypto); diff --git a/js/proto/tendermint/libs/bits/types_grpc_pb.js b/js/proto/tendermint/libs/bits/types_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/libs/bits/types_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/libs/bits/types_pb.d.ts b/js/proto/tendermint/libs/bits/types_pb.d.ts new file mode 100644 index 000000000..e57ad32dd --- /dev/null +++ b/js/proto/tendermint/libs/bits/types_pb.d.ts @@ -0,0 +1,34 @@ +// package: tendermint.libs.bits +// file: tendermint/libs/bits/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class BitArray extends jspb.Message { + getBits(): number; + setBits(value: number): BitArray; + + clearElemsList(): void; + getElemsList(): Array; + setElemsList(value: Array): BitArray; + addElems(value: number, index?: number): number; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BitArray.AsObject; + static toObject(includeInstance: boolean, msg: BitArray): BitArray.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BitArray, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BitArray; + static deserializeBinaryFromReader(message: BitArray, reader: jspb.BinaryReader): BitArray; +} + +export namespace BitArray { + export type AsObject = { + bits: number, + elemsList: Array, + } +} diff --git a/js/proto/tendermint/libs/bits/types_pb.js b/js/proto/tendermint/libs/bits/types_pb.js new file mode 100644 index 000000000..057b898f2 --- /dev/null +++ b/js/proto/tendermint/libs/bits/types_pb.js @@ -0,0 +1,227 @@ +// source: tendermint/libs/bits/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.tendermint.libs.bits.BitArray', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.libs.bits.BitArray = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.libs.bits.BitArray.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.libs.bits.BitArray, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.libs.bits.BitArray.displayName = 'proto.tendermint.libs.bits.BitArray'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.libs.bits.BitArray.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.libs.bits.BitArray.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.libs.bits.BitArray.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.libs.bits.BitArray} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.libs.bits.BitArray.toObject = function(includeInstance, msg) { + var f, obj = { + bits: jspb.Message.getFieldWithDefault(msg, 1, 0), + elemsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.libs.bits.BitArray} + */ +proto.tendermint.libs.bits.BitArray.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.libs.bits.BitArray; + return proto.tendermint.libs.bits.BitArray.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.libs.bits.BitArray} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.libs.bits.BitArray} + */ +proto.tendermint.libs.bits.BitArray.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBits(value); + break; + case 2: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addElems(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.libs.bits.BitArray.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.libs.bits.BitArray.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.libs.bits.BitArray} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.libs.bits.BitArray.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBits(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getElemsList(); + if (f.length > 0) { + writer.writePackedUint64( + 2, + f + ); + } +}; + + +/** + * optional int64 bits = 1; + * @return {number} + */ +proto.tendermint.libs.bits.BitArray.prototype.getBits = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.libs.bits.BitArray} returns this + */ +proto.tendermint.libs.bits.BitArray.prototype.setBits = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated uint64 elems = 2; + * @return {!Array} + */ +proto.tendermint.libs.bits.BitArray.prototype.getElemsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.libs.bits.BitArray} returns this + */ +proto.tendermint.libs.bits.BitArray.prototype.setElemsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.tendermint.libs.bits.BitArray} returns this + */ +proto.tendermint.libs.bits.BitArray.prototype.addElems = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.libs.bits.BitArray} returns this + */ +proto.tendermint.libs.bits.BitArray.prototype.clearElemsList = function() { + return this.setElemsList([]); +}; + + +goog.object.extend(exports, proto.tendermint.libs.bits); diff --git a/js/proto/tendermint/mempool/types_grpc_pb.js b/js/proto/tendermint/mempool/types_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/mempool/types_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/mempool/types_pb.d.ts b/js/proto/tendermint/mempool/types_pb.d.ts new file mode 100644 index 000000000..5b74e5f80 --- /dev/null +++ b/js/proto/tendermint/mempool/types_pb.d.ts @@ -0,0 +1,66 @@ +// package: tendermint.mempool +// file: tendermint/mempool/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Txs extends jspb.Message { + clearTxsList(): void; + getTxsList(): Array; + getTxsList_asU8(): Array; + getTxsList_asB64(): Array; + setTxsList(value: Array): Txs; + addTxs(value: Uint8Array | string, index?: number): Uint8Array | string; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Txs.AsObject; + static toObject(includeInstance: boolean, msg: Txs): Txs.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Txs, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Txs; + static deserializeBinaryFromReader(message: Txs, reader: jspb.BinaryReader): Txs; +} + +export namespace Txs { + export type AsObject = { + txsList: Array, + } +} + +export class Message extends jspb.Message { + + hasTxs(): boolean; + clearTxs(): void; + getTxs(): Txs | undefined; + setTxs(value?: Txs): Message; + + + getSumCase(): Message.SumCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Message.AsObject; + static toObject(includeInstance: boolean, msg: Message): Message.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Message, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Message; + static deserializeBinaryFromReader(message: Message, reader: jspb.BinaryReader): Message; +} + +export namespace Message { + export type AsObject = { + txs?: Txs.AsObject, + } + + export enum SumCase { + SUM_NOT_SET = 0, + + TXS = 1, + + } + +} diff --git a/js/proto/tendermint/mempool/types_pb.js b/js/proto/tendermint/mempool/types_pb.js new file mode 100644 index 000000000..ed9910508 --- /dev/null +++ b/js/proto/tendermint/mempool/types_pb.js @@ -0,0 +1,418 @@ +// source: tendermint/mempool/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.tendermint.mempool.Message', null, global); +goog.exportSymbol('proto.tendermint.mempool.Message.SumCase', null, global); +goog.exportSymbol('proto.tendermint.mempool.Txs', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.mempool.Txs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.mempool.Txs.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.mempool.Txs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.mempool.Txs.displayName = 'proto.tendermint.mempool.Txs'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.mempool.Message = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.mempool.Message.oneofGroups_); +}; +goog.inherits(proto.tendermint.mempool.Message, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.mempool.Message.displayName = 'proto.tendermint.mempool.Message'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.mempool.Txs.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.mempool.Txs.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.mempool.Txs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.mempool.Txs} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.mempool.Txs.toObject = function(includeInstance, msg) { + var f, obj = { + txsList: msg.getTxsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.mempool.Txs} + */ +proto.tendermint.mempool.Txs.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.mempool.Txs; + return proto.tendermint.mempool.Txs.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.mempool.Txs} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.mempool.Txs} + */ +proto.tendermint.mempool.Txs.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addTxs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.mempool.Txs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.mempool.Txs.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.mempool.Txs} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.mempool.Txs.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes txs = 1; + * @return {!(Array|Array)} + */ +proto.tendermint.mempool.Txs.prototype.getTxsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes txs = 1; + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} + */ +proto.tendermint.mempool.Txs.prototype.getTxsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTxsList())); +}; + + +/** + * repeated bytes txs = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} + */ +proto.tendermint.mempool.Txs.prototype.getTxsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTxsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.tendermint.mempool.Txs} returns this + */ +proto.tendermint.mempool.Txs.prototype.setTxsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.tendermint.mempool.Txs} returns this + */ +proto.tendermint.mempool.Txs.prototype.addTxs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.mempool.Txs} returns this + */ +proto.tendermint.mempool.Txs.prototype.clearTxsList = function() { + return this.setTxsList([]); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.mempool.Message.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.tendermint.mempool.Message.SumCase = { + SUM_NOT_SET: 0, + TXS: 1 +}; + +/** + * @return {proto.tendermint.mempool.Message.SumCase} + */ +proto.tendermint.mempool.Message.prototype.getSumCase = function() { + return /** @type {proto.tendermint.mempool.Message.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.mempool.Message.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.mempool.Message.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.mempool.Message.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.mempool.Message} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.mempool.Message.toObject = function(includeInstance, msg) { + var f, obj = { + txs: (f = msg.getTxs()) && proto.tendermint.mempool.Txs.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.mempool.Message} + */ +proto.tendermint.mempool.Message.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.mempool.Message; + return proto.tendermint.mempool.Message.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.mempool.Message} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.mempool.Message} + */ +proto.tendermint.mempool.Message.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.mempool.Txs; + reader.readMessage(value,proto.tendermint.mempool.Txs.deserializeBinaryFromReader); + msg.setTxs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.mempool.Message.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.mempool.Message.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.mempool.Message} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.mempool.Message.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxs(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.mempool.Txs.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Txs txs = 1; + * @return {?proto.tendermint.mempool.Txs} + */ +proto.tendermint.mempool.Message.prototype.getTxs = function() { + return /** @type{?proto.tendermint.mempool.Txs} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.mempool.Txs, 1)); +}; + + +/** + * @param {?proto.tendermint.mempool.Txs|undefined} value + * @return {!proto.tendermint.mempool.Message} returns this +*/ +proto.tendermint.mempool.Message.prototype.setTxs = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.mempool.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.mempool.Message} returns this + */ +proto.tendermint.mempool.Message.prototype.clearTxs = function() { + return this.setTxs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.mempool.Message.prototype.hasTxs = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.tendermint.mempool); diff --git a/js/proto/tendermint/p2p/conn_grpc_pb.js b/js/proto/tendermint/p2p/conn_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/p2p/conn_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/p2p/conn_pb.d.ts b/js/proto/tendermint/p2p/conn_pb.d.ts new file mode 100644 index 000000000..439a212ed --- /dev/null +++ b/js/proto/tendermint/p2p/conn_pb.d.ts @@ -0,0 +1,156 @@ +// package: tendermint.p2p +// file: tendermint/p2p/conn.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as tendermint_crypto_keys_pb from "../../tendermint/crypto/keys_pb"; + +export class PacketPing extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PacketPing.AsObject; + static toObject(includeInstance: boolean, msg: PacketPing): PacketPing.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PacketPing, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PacketPing; + static deserializeBinaryFromReader(message: PacketPing, reader: jspb.BinaryReader): PacketPing; +} + +export namespace PacketPing { + export type AsObject = { + } +} + +export class PacketPong extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PacketPong.AsObject; + static toObject(includeInstance: boolean, msg: PacketPong): PacketPong.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PacketPong, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PacketPong; + static deserializeBinaryFromReader(message: PacketPong, reader: jspb.BinaryReader): PacketPong; +} + +export namespace PacketPong { + export type AsObject = { + } +} + +export class PacketMsg extends jspb.Message { + getChannelId(): number; + setChannelId(value: number): PacketMsg; + + getEof(): boolean; + setEof(value: boolean): PacketMsg; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): PacketMsg; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PacketMsg.AsObject; + static toObject(includeInstance: boolean, msg: PacketMsg): PacketMsg.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PacketMsg, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PacketMsg; + static deserializeBinaryFromReader(message: PacketMsg, reader: jspb.BinaryReader): PacketMsg; +} + +export namespace PacketMsg { + export type AsObject = { + channelId: number, + eof: boolean, + data: Uint8Array | string, + } +} + +export class Packet extends jspb.Message { + + hasPacketPing(): boolean; + clearPacketPing(): void; + getPacketPing(): PacketPing | undefined; + setPacketPing(value?: PacketPing): Packet; + + + hasPacketPong(): boolean; + clearPacketPong(): void; + getPacketPong(): PacketPong | undefined; + setPacketPong(value?: PacketPong): Packet; + + + hasPacketMsg(): boolean; + clearPacketMsg(): void; + getPacketMsg(): PacketMsg | undefined; + setPacketMsg(value?: PacketMsg): Packet; + + + getSumCase(): Packet.SumCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Packet.AsObject; + static toObject(includeInstance: boolean, msg: Packet): Packet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Packet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Packet; + static deserializeBinaryFromReader(message: Packet, reader: jspb.BinaryReader): Packet; +} + +export namespace Packet { + export type AsObject = { + packetPing?: PacketPing.AsObject, + packetPong?: PacketPong.AsObject, + packetMsg?: PacketMsg.AsObject, + } + + export enum SumCase { + SUM_NOT_SET = 0, + + PACKET_PING = 1, + + PACKET_PONG = 2, + + PACKET_MSG = 3, + + } + +} + +export class AuthSigMessage extends jspb.Message { + + hasPubKey(): boolean; + clearPubKey(): void; + getPubKey(): tendermint_crypto_keys_pb.PublicKey | undefined; + setPubKey(value?: tendermint_crypto_keys_pb.PublicKey): AuthSigMessage; + + getSig(): Uint8Array | string; + getSig_asU8(): Uint8Array; + getSig_asB64(): string; + setSig(value: Uint8Array | string): AuthSigMessage; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AuthSigMessage.AsObject; + static toObject(includeInstance: boolean, msg: AuthSigMessage): AuthSigMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AuthSigMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AuthSigMessage; + static deserializeBinaryFromReader(message: AuthSigMessage, reader: jspb.BinaryReader): AuthSigMessage; +} + +export namespace AuthSigMessage { + export type AsObject = { + pubKey?: tendermint_crypto_keys_pb.PublicKey.AsObject, + sig: Uint8Array | string, + } +} diff --git a/js/proto/tendermint/p2p/conn_pb.js b/js/proto/tendermint/p2p/conn_pb.js new file mode 100644 index 000000000..16628c3cf --- /dev/null +++ b/js/proto/tendermint/p2p/conn_pb.js @@ -0,0 +1,1033 @@ +// source: tendermint/p2p/conn.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var tendermint_crypto_keys_pb = require('../../tendermint/crypto/keys_pb.js'); +goog.object.extend(proto, tendermint_crypto_keys_pb); +goog.exportSymbol('proto.tendermint.p2p.AuthSigMessage', null, global); +goog.exportSymbol('proto.tendermint.p2p.Packet', null, global); +goog.exportSymbol('proto.tendermint.p2p.Packet.SumCase', null, global); +goog.exportSymbol('proto.tendermint.p2p.PacketMsg', null, global); +goog.exportSymbol('proto.tendermint.p2p.PacketPing', null, global); +goog.exportSymbol('proto.tendermint.p2p.PacketPong', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.p2p.PacketPing = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.PacketPing, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.PacketPing.displayName = 'proto.tendermint.p2p.PacketPing'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.p2p.PacketPong = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.PacketPong, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.PacketPong.displayName = 'proto.tendermint.p2p.PacketPong'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.p2p.PacketMsg = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.PacketMsg, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.PacketMsg.displayName = 'proto.tendermint.p2p.PacketMsg'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.p2p.Packet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.p2p.Packet.oneofGroups_); +}; +goog.inherits(proto.tendermint.p2p.Packet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.Packet.displayName = 'proto.tendermint.p2p.Packet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.p2p.AuthSigMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.AuthSigMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.AuthSigMessage.displayName = 'proto.tendermint.p2p.AuthSigMessage'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.p2p.PacketPing.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.PacketPing.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.p2p.PacketPing} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.PacketPing.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.p2p.PacketPing} + */ +proto.tendermint.p2p.PacketPing.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.PacketPing; + return proto.tendermint.p2p.PacketPing.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.PacketPing} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.PacketPing} + */ +proto.tendermint.p2p.PacketPing.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.PacketPing.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.PacketPing.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.p2p.PacketPing} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.PacketPing.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.p2p.PacketPong.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.PacketPong.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.p2p.PacketPong} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.PacketPong.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.p2p.PacketPong} + */ +proto.tendermint.p2p.PacketPong.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.PacketPong; + return proto.tendermint.p2p.PacketPong.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.PacketPong} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.PacketPong} + */ +proto.tendermint.p2p.PacketPong.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.PacketPong.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.PacketPong.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.p2p.PacketPong} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.PacketPong.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.p2p.PacketMsg.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.PacketMsg.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.p2p.PacketMsg} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.PacketMsg.toObject = function(includeInstance, msg) { + var f, obj = { + channelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + eof: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.p2p.PacketMsg} + */ +proto.tendermint.p2p.PacketMsg.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.PacketMsg; + return proto.tendermint.p2p.PacketMsg.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.PacketMsg} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.PacketMsg} + */ +proto.tendermint.p2p.PacketMsg.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setChannelId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEof(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.PacketMsg.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.PacketMsg.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.p2p.PacketMsg} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.PacketMsg.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelId(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getEof(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional int32 channel_id = 1; + * @return {number} + */ +proto.tendermint.p2p.PacketMsg.prototype.getChannelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.PacketMsg} returns this + */ +proto.tendermint.p2p.PacketMsg.prototype.setChannelId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool eof = 2; + * @return {boolean} + */ +proto.tendermint.p2p.PacketMsg.prototype.getEof = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.tendermint.p2p.PacketMsg} returns this + */ +proto.tendermint.p2p.PacketMsg.prototype.setEof = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.p2p.PacketMsg.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.tendermint.p2p.PacketMsg.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.tendermint.p2p.PacketMsg.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.p2p.PacketMsg} returns this + */ +proto.tendermint.p2p.PacketMsg.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.p2p.Packet.oneofGroups_ = [[1,2,3]]; + +/** + * @enum {number} + */ +proto.tendermint.p2p.Packet.SumCase = { + SUM_NOT_SET: 0, + PACKET_PING: 1, + PACKET_PONG: 2, + PACKET_MSG: 3 +}; + +/** + * @return {proto.tendermint.p2p.Packet.SumCase} + */ +proto.tendermint.p2p.Packet.prototype.getSumCase = function() { + return /** @type {proto.tendermint.p2p.Packet.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.p2p.Packet.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.p2p.Packet.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.Packet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.p2p.Packet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.Packet.toObject = function(includeInstance, msg) { + var f, obj = { + packetPing: (f = msg.getPacketPing()) && proto.tendermint.p2p.PacketPing.toObject(includeInstance, f), + packetPong: (f = msg.getPacketPong()) && proto.tendermint.p2p.PacketPong.toObject(includeInstance, f), + packetMsg: (f = msg.getPacketMsg()) && proto.tendermint.p2p.PacketMsg.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.p2p.Packet} + */ +proto.tendermint.p2p.Packet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.Packet; + return proto.tendermint.p2p.Packet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.Packet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.Packet} + */ +proto.tendermint.p2p.Packet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.p2p.PacketPing; + reader.readMessage(value,proto.tendermint.p2p.PacketPing.deserializeBinaryFromReader); + msg.setPacketPing(value); + break; + case 2: + var value = new proto.tendermint.p2p.PacketPong; + reader.readMessage(value,proto.tendermint.p2p.PacketPong.deserializeBinaryFromReader); + msg.setPacketPong(value); + break; + case 3: + var value = new proto.tendermint.p2p.PacketMsg; + reader.readMessage(value,proto.tendermint.p2p.PacketMsg.deserializeBinaryFromReader); + msg.setPacketMsg(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.Packet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.Packet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.p2p.Packet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.Packet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPacketPing(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.p2p.PacketPing.serializeBinaryToWriter + ); + } + f = message.getPacketPong(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.p2p.PacketPong.serializeBinaryToWriter + ); + } + f = message.getPacketMsg(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.p2p.PacketMsg.serializeBinaryToWriter + ); + } +}; + + +/** + * optional PacketPing packet_ping = 1; + * @return {?proto.tendermint.p2p.PacketPing} + */ +proto.tendermint.p2p.Packet.prototype.getPacketPing = function() { + return /** @type{?proto.tendermint.p2p.PacketPing} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.p2p.PacketPing, 1)); +}; + + +/** + * @param {?proto.tendermint.p2p.PacketPing|undefined} value + * @return {!proto.tendermint.p2p.Packet} returns this +*/ +proto.tendermint.p2p.Packet.prototype.setPacketPing = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.p2p.Packet.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.p2p.Packet} returns this + */ +proto.tendermint.p2p.Packet.prototype.clearPacketPing = function() { + return this.setPacketPing(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.p2p.Packet.prototype.hasPacketPing = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional PacketPong packet_pong = 2; + * @return {?proto.tendermint.p2p.PacketPong} + */ +proto.tendermint.p2p.Packet.prototype.getPacketPong = function() { + return /** @type{?proto.tendermint.p2p.PacketPong} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.p2p.PacketPong, 2)); +}; + + +/** + * @param {?proto.tendermint.p2p.PacketPong|undefined} value + * @return {!proto.tendermint.p2p.Packet} returns this +*/ +proto.tendermint.p2p.Packet.prototype.setPacketPong = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.p2p.Packet.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.p2p.Packet} returns this + */ +proto.tendermint.p2p.Packet.prototype.clearPacketPong = function() { + return this.setPacketPong(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.p2p.Packet.prototype.hasPacketPong = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional PacketMsg packet_msg = 3; + * @return {?proto.tendermint.p2p.PacketMsg} + */ +proto.tendermint.p2p.Packet.prototype.getPacketMsg = function() { + return /** @type{?proto.tendermint.p2p.PacketMsg} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.p2p.PacketMsg, 3)); +}; + + +/** + * @param {?proto.tendermint.p2p.PacketMsg|undefined} value + * @return {!proto.tendermint.p2p.Packet} returns this +*/ +proto.tendermint.p2p.Packet.prototype.setPacketMsg = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.tendermint.p2p.Packet.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.p2p.Packet} returns this + */ +proto.tendermint.p2p.Packet.prototype.clearPacketMsg = function() { + return this.setPacketMsg(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.p2p.Packet.prototype.hasPacketMsg = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.p2p.AuthSigMessage.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.AuthSigMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.p2p.AuthSigMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.AuthSigMessage.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: (f = msg.getPubKey()) && tendermint_crypto_keys_pb.PublicKey.toObject(includeInstance, f), + sig: msg.getSig_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.p2p.AuthSigMessage} + */ +proto.tendermint.p2p.AuthSigMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.AuthSigMessage; + return proto.tendermint.p2p.AuthSigMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.AuthSigMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.AuthSigMessage} + */ +proto.tendermint.p2p.AuthSigMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_crypto_keys_pb.PublicKey; + reader.readMessage(value,tendermint_crypto_keys_pb.PublicKey.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSig(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.AuthSigMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.AuthSigMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.p2p.AuthSigMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.AuthSigMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_crypto_keys_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getSig_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional tendermint.crypto.PublicKey pub_key = 1; + * @return {?proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.p2p.AuthSigMessage.prototype.getPubKey = function() { + return /** @type{?proto.tendermint.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_keys_pb.PublicKey, 1)); +}; + + +/** + * @param {?proto.tendermint.crypto.PublicKey|undefined} value + * @return {!proto.tendermint.p2p.AuthSigMessage} returns this +*/ +proto.tendermint.p2p.AuthSigMessage.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.p2p.AuthSigMessage} returns this + */ +proto.tendermint.p2p.AuthSigMessage.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.p2p.AuthSigMessage.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes sig = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.p2p.AuthSigMessage.prototype.getSig = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes sig = 2; + * This is a type-conversion wrapper around `getSig()` + * @return {string} + */ +proto.tendermint.p2p.AuthSigMessage.prototype.getSig_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSig())); +}; + + +/** + * optional bytes sig = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSig()` + * @return {!Uint8Array} + */ +proto.tendermint.p2p.AuthSigMessage.prototype.getSig_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSig())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.p2p.AuthSigMessage} returns this + */ +proto.tendermint.p2p.AuthSigMessage.prototype.setSig = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.p2p); diff --git a/js/proto/tendermint/p2p/pex_grpc_pb.js b/js/proto/tendermint/p2p/pex_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/p2p/pex_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/p2p/pex_pb.d.ts b/js/proto/tendermint/p2p/pex_pb.d.ts new file mode 100644 index 000000000..a9a6642a5 --- /dev/null +++ b/js/proto/tendermint/p2p/pex_pb.d.ts @@ -0,0 +1,92 @@ +// package: tendermint.p2p +// file: tendermint/p2p/pex.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as tendermint_p2p_types_pb from "../../tendermint/p2p/types_pb"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; + +export class PexRequest extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PexRequest.AsObject; + static toObject(includeInstance: boolean, msg: PexRequest): PexRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PexRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PexRequest; + static deserializeBinaryFromReader(message: PexRequest, reader: jspb.BinaryReader): PexRequest; +} + +export namespace PexRequest { + export type AsObject = { + } +} + +export class PexAddrs extends jspb.Message { + clearAddrsList(): void; + getAddrsList(): Array; + setAddrsList(value: Array): PexAddrs; + addAddrs(value?: tendermint_p2p_types_pb.NetAddress, index?: number): tendermint_p2p_types_pb.NetAddress; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PexAddrs.AsObject; + static toObject(includeInstance: boolean, msg: PexAddrs): PexAddrs.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PexAddrs, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PexAddrs; + static deserializeBinaryFromReader(message: PexAddrs, reader: jspb.BinaryReader): PexAddrs; +} + +export namespace PexAddrs { + export type AsObject = { + addrsList: Array, + } +} + +export class Message extends jspb.Message { + + hasPexRequest(): boolean; + clearPexRequest(): void; + getPexRequest(): PexRequest | undefined; + setPexRequest(value?: PexRequest): Message; + + + hasPexAddrs(): boolean; + clearPexAddrs(): void; + getPexAddrs(): PexAddrs | undefined; + setPexAddrs(value?: PexAddrs): Message; + + + getSumCase(): Message.SumCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Message.AsObject; + static toObject(includeInstance: boolean, msg: Message): Message.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Message, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Message; + static deserializeBinaryFromReader(message: Message, reader: jspb.BinaryReader): Message; +} + +export namespace Message { + export type AsObject = { + pexRequest?: PexRequest.AsObject, + pexAddrs?: PexAddrs.AsObject, + } + + export enum SumCase { + SUM_NOT_SET = 0, + + PEX_REQUEST = 1, + + PEX_ADDRS = 2, + + } + +} diff --git a/js/proto/tendermint/p2p/pex_pb.js b/js/proto/tendermint/p2p/pex_pb.js new file mode 100644 index 000000000..9e0ce1ff9 --- /dev/null +++ b/js/proto/tendermint/p2p/pex_pb.js @@ -0,0 +1,577 @@ +// source: tendermint/p2p/pex.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var tendermint_p2p_types_pb = require('../../tendermint/p2p/types_pb.js'); +goog.object.extend(proto, tendermint_p2p_types_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.tendermint.p2p.Message', null, global); +goog.exportSymbol('proto.tendermint.p2p.Message.SumCase', null, global); +goog.exportSymbol('proto.tendermint.p2p.PexAddrs', null, global); +goog.exportSymbol('proto.tendermint.p2p.PexRequest', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.p2p.PexRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.PexRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.PexRequest.displayName = 'proto.tendermint.p2p.PexRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.p2p.PexAddrs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.p2p.PexAddrs.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.p2p.PexAddrs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.PexAddrs.displayName = 'proto.tendermint.p2p.PexAddrs'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.p2p.Message = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.p2p.Message.oneofGroups_); +}; +goog.inherits(proto.tendermint.p2p.Message, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.Message.displayName = 'proto.tendermint.p2p.Message'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.p2p.PexRequest.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.PexRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.p2p.PexRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.PexRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.p2p.PexRequest} + */ +proto.tendermint.p2p.PexRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.PexRequest; + return proto.tendermint.p2p.PexRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.PexRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.PexRequest} + */ +proto.tendermint.p2p.PexRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.PexRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.PexRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.p2p.PexRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.PexRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.p2p.PexAddrs.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.p2p.PexAddrs.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.PexAddrs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.p2p.PexAddrs} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.PexAddrs.toObject = function(includeInstance, msg) { + var f, obj = { + addrsList: jspb.Message.toObjectList(msg.getAddrsList(), + tendermint_p2p_types_pb.NetAddress.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.p2p.PexAddrs} + */ +proto.tendermint.p2p.PexAddrs.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.PexAddrs; + return proto.tendermint.p2p.PexAddrs.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.PexAddrs} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.PexAddrs} + */ +proto.tendermint.p2p.PexAddrs.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_p2p_types_pb.NetAddress; + reader.readMessage(value,tendermint_p2p_types_pb.NetAddress.deserializeBinaryFromReader); + msg.addAddrs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.PexAddrs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.PexAddrs.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.p2p.PexAddrs} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.PexAddrs.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddrsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + tendermint_p2p_types_pb.NetAddress.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated NetAddress addrs = 1; + * @return {!Array} + */ +proto.tendermint.p2p.PexAddrs.prototype.getAddrsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, tendermint_p2p_types_pb.NetAddress, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.p2p.PexAddrs} returns this +*/ +proto.tendermint.p2p.PexAddrs.prototype.setAddrsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.p2p.NetAddress=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.p2p.NetAddress} + */ +proto.tendermint.p2p.PexAddrs.prototype.addAddrs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.p2p.NetAddress, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.p2p.PexAddrs} returns this + */ +proto.tendermint.p2p.PexAddrs.prototype.clearAddrsList = function() { + return this.setAddrsList([]); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.p2p.Message.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.tendermint.p2p.Message.SumCase = { + SUM_NOT_SET: 0, + PEX_REQUEST: 1, + PEX_ADDRS: 2 +}; + +/** + * @return {proto.tendermint.p2p.Message.SumCase} + */ +proto.tendermint.p2p.Message.prototype.getSumCase = function() { + return /** @type {proto.tendermint.p2p.Message.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.p2p.Message.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.p2p.Message.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.Message.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.p2p.Message} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.Message.toObject = function(includeInstance, msg) { + var f, obj = { + pexRequest: (f = msg.getPexRequest()) && proto.tendermint.p2p.PexRequest.toObject(includeInstance, f), + pexAddrs: (f = msg.getPexAddrs()) && proto.tendermint.p2p.PexAddrs.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.p2p.Message} + */ +proto.tendermint.p2p.Message.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.Message; + return proto.tendermint.p2p.Message.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.Message} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.Message} + */ +proto.tendermint.p2p.Message.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.p2p.PexRequest; + reader.readMessage(value,proto.tendermint.p2p.PexRequest.deserializeBinaryFromReader); + msg.setPexRequest(value); + break; + case 2: + var value = new proto.tendermint.p2p.PexAddrs; + reader.readMessage(value,proto.tendermint.p2p.PexAddrs.deserializeBinaryFromReader); + msg.setPexAddrs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.Message.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.Message.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.p2p.Message} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.Message.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPexRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.p2p.PexRequest.serializeBinaryToWriter + ); + } + f = message.getPexAddrs(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.p2p.PexAddrs.serializeBinaryToWriter + ); + } +}; + + +/** + * optional PexRequest pex_request = 1; + * @return {?proto.tendermint.p2p.PexRequest} + */ +proto.tendermint.p2p.Message.prototype.getPexRequest = function() { + return /** @type{?proto.tendermint.p2p.PexRequest} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.p2p.PexRequest, 1)); +}; + + +/** + * @param {?proto.tendermint.p2p.PexRequest|undefined} value + * @return {!proto.tendermint.p2p.Message} returns this +*/ +proto.tendermint.p2p.Message.prototype.setPexRequest = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.p2p.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.p2p.Message} returns this + */ +proto.tendermint.p2p.Message.prototype.clearPexRequest = function() { + return this.setPexRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.p2p.Message.prototype.hasPexRequest = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional PexAddrs pex_addrs = 2; + * @return {?proto.tendermint.p2p.PexAddrs} + */ +proto.tendermint.p2p.Message.prototype.getPexAddrs = function() { + return /** @type{?proto.tendermint.p2p.PexAddrs} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.p2p.PexAddrs, 2)); +}; + + +/** + * @param {?proto.tendermint.p2p.PexAddrs|undefined} value + * @return {!proto.tendermint.p2p.Message} returns this +*/ +proto.tendermint.p2p.Message.prototype.setPexAddrs = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.p2p.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.p2p.Message} returns this + */ +proto.tendermint.p2p.Message.prototype.clearPexAddrs = function() { + return this.setPexAddrs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.p2p.Message.prototype.hasPexAddrs = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.tendermint.p2p); diff --git a/js/proto/tendermint/p2p/types_grpc_pb.js b/js/proto/tendermint/p2p/types_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/p2p/types_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/p2p/types_pb.d.ts b/js/proto/tendermint/p2p/types_pb.d.ts new file mode 100644 index 000000000..e854a6f36 --- /dev/null +++ b/js/proto/tendermint/p2p/types_pb.d.ts @@ -0,0 +1,148 @@ +// package: tendermint.p2p +// file: tendermint/p2p/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; + +export class NetAddress extends jspb.Message { + getId(): string; + setId(value: string): NetAddress; + + getIp(): string; + setIp(value: string): NetAddress; + + getPort(): number; + setPort(value: number): NetAddress; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NetAddress.AsObject; + static toObject(includeInstance: boolean, msg: NetAddress): NetAddress.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NetAddress, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NetAddress; + static deserializeBinaryFromReader(message: NetAddress, reader: jspb.BinaryReader): NetAddress; +} + +export namespace NetAddress { + export type AsObject = { + id: string, + ip: string, + port: number, + } +} + +export class ProtocolVersion extends jspb.Message { + getP2p(): number; + setP2p(value: number): ProtocolVersion; + + getBlock(): number; + setBlock(value: number): ProtocolVersion; + + getApp(): number; + setApp(value: number): ProtocolVersion; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProtocolVersion.AsObject; + static toObject(includeInstance: boolean, msg: ProtocolVersion): ProtocolVersion.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProtocolVersion, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProtocolVersion; + static deserializeBinaryFromReader(message: ProtocolVersion, reader: jspb.BinaryReader): ProtocolVersion; +} + +export namespace ProtocolVersion { + export type AsObject = { + p2p: number, + block: number, + app: number, + } +} + +export class DefaultNodeInfo extends jspb.Message { + + hasProtocolVersion(): boolean; + clearProtocolVersion(): void; + getProtocolVersion(): ProtocolVersion | undefined; + setProtocolVersion(value?: ProtocolVersion): DefaultNodeInfo; + + getDefaultNodeId(): string; + setDefaultNodeId(value: string): DefaultNodeInfo; + + getListenAddr(): string; + setListenAddr(value: string): DefaultNodeInfo; + + getNetwork(): string; + setNetwork(value: string): DefaultNodeInfo; + + getVersion(): string; + setVersion(value: string): DefaultNodeInfo; + + getChannels(): Uint8Array | string; + getChannels_asU8(): Uint8Array; + getChannels_asB64(): string; + setChannels(value: Uint8Array | string): DefaultNodeInfo; + + getMoniker(): string; + setMoniker(value: string): DefaultNodeInfo; + + + hasOther(): boolean; + clearOther(): void; + getOther(): DefaultNodeInfoOther | undefined; + setOther(value?: DefaultNodeInfoOther): DefaultNodeInfo; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DefaultNodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: DefaultNodeInfo): DefaultNodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DefaultNodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DefaultNodeInfo; + static deserializeBinaryFromReader(message: DefaultNodeInfo, reader: jspb.BinaryReader): DefaultNodeInfo; +} + +export namespace DefaultNodeInfo { + export type AsObject = { + protocolVersion?: ProtocolVersion.AsObject, + defaultNodeId: string, + listenAddr: string, + network: string, + version: string, + channels: Uint8Array | string, + moniker: string, + other?: DefaultNodeInfoOther.AsObject, + } +} + +export class DefaultNodeInfoOther extends jspb.Message { + getTxIndex(): string; + setTxIndex(value: string): DefaultNodeInfoOther; + + getRpcAddress(): string; + setRpcAddress(value: string): DefaultNodeInfoOther; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DefaultNodeInfoOther.AsObject; + static toObject(includeInstance: boolean, msg: DefaultNodeInfoOther): DefaultNodeInfoOther.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DefaultNodeInfoOther, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DefaultNodeInfoOther; + static deserializeBinaryFromReader(message: DefaultNodeInfoOther, reader: jspb.BinaryReader): DefaultNodeInfoOther; +} + +export namespace DefaultNodeInfoOther { + export type AsObject = { + txIndex: string, + rpcAddress: string, + } +} diff --git a/js/proto/tendermint/p2p/types_pb.js b/js/proto/tendermint/p2p/types_pb.js new file mode 100644 index 000000000..00eeecc00 --- /dev/null +++ b/js/proto/tendermint/p2p/types_pb.js @@ -0,0 +1,1053 @@ +// source: tendermint/p2p/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.tendermint.p2p.DefaultNodeInfo', null, global); +goog.exportSymbol('proto.tendermint.p2p.DefaultNodeInfoOther', null, global); +goog.exportSymbol('proto.tendermint.p2p.NetAddress', null, global); +goog.exportSymbol('proto.tendermint.p2p.ProtocolVersion', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.p2p.NetAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.NetAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.NetAddress.displayName = 'proto.tendermint.p2p.NetAddress'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.p2p.ProtocolVersion = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.ProtocolVersion, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.ProtocolVersion.displayName = 'proto.tendermint.p2p.ProtocolVersion'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.p2p.DefaultNodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.DefaultNodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.DefaultNodeInfo.displayName = 'proto.tendermint.p2p.DefaultNodeInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.p2p.DefaultNodeInfoOther = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.DefaultNodeInfoOther, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.DefaultNodeInfoOther.displayName = 'proto.tendermint.p2p.DefaultNodeInfoOther'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.p2p.NetAddress.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.NetAddress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.p2p.NetAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.NetAddress.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + ip: jspb.Message.getFieldWithDefault(msg, 2, ""), + port: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.p2p.NetAddress} + */ +proto.tendermint.p2p.NetAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.NetAddress; + return proto.tendermint.p2p.NetAddress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.NetAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.NetAddress} + */ +proto.tendermint.p2p.NetAddress.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setIp(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPort(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.NetAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.NetAddress.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.p2p.NetAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.NetAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIp(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPort(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.tendermint.p2p.NetAddress.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.NetAddress} returns this + */ +proto.tendermint.p2p.NetAddress.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string ip = 2; + * @return {string} + */ +proto.tendermint.p2p.NetAddress.prototype.getIp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.NetAddress} returns this + */ +proto.tendermint.p2p.NetAddress.prototype.setIp = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint32 port = 3; + * @return {number} + */ +proto.tendermint.p2p.NetAddress.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.NetAddress} returns this + */ +proto.tendermint.p2p.NetAddress.prototype.setPort = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.ProtocolVersion.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.p2p.ProtocolVersion} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.ProtocolVersion.toObject = function(includeInstance, msg) { + var f, obj = { + p2p: jspb.Message.getFieldWithDefault(msg, 1, 0), + block: jspb.Message.getFieldWithDefault(msg, 2, 0), + app: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.p2p.ProtocolVersion} + */ +proto.tendermint.p2p.ProtocolVersion.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.ProtocolVersion; + return proto.tendermint.p2p.ProtocolVersion.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.ProtocolVersion} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.ProtocolVersion} + */ +proto.tendermint.p2p.ProtocolVersion.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setP2p(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlock(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setApp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.ProtocolVersion.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.p2p.ProtocolVersion} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.ProtocolVersion.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getP2p(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getBlock(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getApp(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional uint64 p2p = 1; + * @return {number} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.getP2p = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.ProtocolVersion} returns this + */ +proto.tendermint.p2p.ProtocolVersion.prototype.setP2p = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 block = 2; + * @return {number} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.getBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.ProtocolVersion} returns this + */ +proto.tendermint.p2p.ProtocolVersion.prototype.setBlock = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 app = 3; + * @return {number} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.getApp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.ProtocolVersion} returns this + */ +proto.tendermint.p2p.ProtocolVersion.prototype.setApp = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.DefaultNodeInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.p2p.DefaultNodeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.DefaultNodeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + protocolVersion: (f = msg.getProtocolVersion()) && proto.tendermint.p2p.ProtocolVersion.toObject(includeInstance, f), + defaultNodeId: jspb.Message.getFieldWithDefault(msg, 2, ""), + listenAddr: jspb.Message.getFieldWithDefault(msg, 3, ""), + network: jspb.Message.getFieldWithDefault(msg, 4, ""), + version: jspb.Message.getFieldWithDefault(msg, 5, ""), + channels: msg.getChannels_asB64(), + moniker: jspb.Message.getFieldWithDefault(msg, 7, ""), + other: (f = msg.getOther()) && proto.tendermint.p2p.DefaultNodeInfoOther.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.p2p.DefaultNodeInfo} + */ +proto.tendermint.p2p.DefaultNodeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.DefaultNodeInfo; + return proto.tendermint.p2p.DefaultNodeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.DefaultNodeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.DefaultNodeInfo} + */ +proto.tendermint.p2p.DefaultNodeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.p2p.ProtocolVersion; + reader.readMessage(value,proto.tendermint.p2p.ProtocolVersion.deserializeBinaryFromReader); + msg.setProtocolVersion(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDefaultNodeId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setListenAddr(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setNetwork(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChannels(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setMoniker(value); + break; + case 8: + var value = new proto.tendermint.p2p.DefaultNodeInfoOther; + reader.readMessage(value,proto.tendermint.p2p.DefaultNodeInfoOther.deserializeBinaryFromReader); + msg.setOther(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.DefaultNodeInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.p2p.DefaultNodeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.DefaultNodeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProtocolVersion(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.p2p.ProtocolVersion.serializeBinaryToWriter + ); + } + f = message.getDefaultNodeId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getListenAddr(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getNetwork(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getChannels_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getMoniker(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getOther(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.tendermint.p2p.DefaultNodeInfoOther.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ProtocolVersion protocol_version = 1; + * @return {?proto.tendermint.p2p.ProtocolVersion} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getProtocolVersion = function() { + return /** @type{?proto.tendermint.p2p.ProtocolVersion} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.p2p.ProtocolVersion, 1)); +}; + + +/** + * @param {?proto.tendermint.p2p.ProtocolVersion|undefined} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this +*/ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setProtocolVersion = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.clearProtocolVersion = function() { + return this.setProtocolVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.hasProtocolVersion = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string default_node_id = 2; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getDefaultNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setDefaultNodeId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string listen_addr = 3; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getListenAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setListenAddr = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string network = 4; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getNetwork = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setNetwork = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string version = 5; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bytes channels = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getChannels = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes channels = 6; + * This is a type-conversion wrapper around `getChannels()` + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getChannels_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChannels())); +}; + + +/** + * optional bytes channels = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChannels()` + * @return {!Uint8Array} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getChannels_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChannels())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setChannels = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional string moniker = 7; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getMoniker = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setMoniker = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional DefaultNodeInfoOther other = 8; + * @return {?proto.tendermint.p2p.DefaultNodeInfoOther} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getOther = function() { + return /** @type{?proto.tendermint.p2p.DefaultNodeInfoOther} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.p2p.DefaultNodeInfoOther, 8)); +}; + + +/** + * @param {?proto.tendermint.p2p.DefaultNodeInfoOther|undefined} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this +*/ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setOther = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.clearOther = function() { + return this.setOther(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.hasOther = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.DefaultNodeInfoOther.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.p2p.DefaultNodeInfoOther} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.DefaultNodeInfoOther.toObject = function(includeInstance, msg) { + var f, obj = { + txIndex: jspb.Message.getFieldWithDefault(msg, 1, ""), + rpcAddress: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.p2p.DefaultNodeInfoOther} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.DefaultNodeInfoOther; + return proto.tendermint.p2p.DefaultNodeInfoOther.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.DefaultNodeInfoOther} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.DefaultNodeInfoOther} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTxIndex(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRpcAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.DefaultNodeInfoOther.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.p2p.DefaultNodeInfoOther} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.DefaultNodeInfoOther.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxIndex(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRpcAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string tx_index = 1; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.getTxIndex = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfoOther} returns this + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.setTxIndex = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string rpc_address = 2; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.getRpcAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfoOther} returns this + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.setRpcAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.p2p); diff --git a/js/proto/tendermint/privval/types_grpc_pb.js b/js/proto/tendermint/privval/types_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/privval/types_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/privval/types_pb.d.ts b/js/proto/tendermint/privval/types_pb.d.ts new file mode 100644 index 000000000..ff0f131e0 --- /dev/null +++ b/js/proto/tendermint/privval/types_pb.d.ts @@ -0,0 +1,345 @@ +// package: tendermint.privval +// file: tendermint/privval/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as tendermint_crypto_keys_pb from "../../tendermint/crypto/keys_pb"; +import * as tendermint_types_types_pb from "../../tendermint/types/types_pb"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; + +export class RemoteSignerError extends jspb.Message { + getCode(): number; + setCode(value: number): RemoteSignerError; + + getDescription(): string; + setDescription(value: string): RemoteSignerError; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoteSignerError.AsObject; + static toObject(includeInstance: boolean, msg: RemoteSignerError): RemoteSignerError.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoteSignerError, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoteSignerError; + static deserializeBinaryFromReader(message: RemoteSignerError, reader: jspb.BinaryReader): RemoteSignerError; +} + +export namespace RemoteSignerError { + export type AsObject = { + code: number, + description: string, + } +} + +export class PubKeyRequest extends jspb.Message { + getChainId(): string; + setChainId(value: string): PubKeyRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PubKeyRequest.AsObject; + static toObject(includeInstance: boolean, msg: PubKeyRequest): PubKeyRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PubKeyRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PubKeyRequest; + static deserializeBinaryFromReader(message: PubKeyRequest, reader: jspb.BinaryReader): PubKeyRequest; +} + +export namespace PubKeyRequest { + export type AsObject = { + chainId: string, + } +} + +export class PubKeyResponse extends jspb.Message { + + hasPubKey(): boolean; + clearPubKey(): void; + getPubKey(): tendermint_crypto_keys_pb.PublicKey | undefined; + setPubKey(value?: tendermint_crypto_keys_pb.PublicKey): PubKeyResponse; + + + hasError(): boolean; + clearError(): void; + getError(): RemoteSignerError | undefined; + setError(value?: RemoteSignerError): PubKeyResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PubKeyResponse.AsObject; + static toObject(includeInstance: boolean, msg: PubKeyResponse): PubKeyResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PubKeyResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PubKeyResponse; + static deserializeBinaryFromReader(message: PubKeyResponse, reader: jspb.BinaryReader): PubKeyResponse; +} + +export namespace PubKeyResponse { + export type AsObject = { + pubKey?: tendermint_crypto_keys_pb.PublicKey.AsObject, + error?: RemoteSignerError.AsObject, + } +} + +export class SignVoteRequest extends jspb.Message { + + hasVote(): boolean; + clearVote(): void; + getVote(): tendermint_types_types_pb.Vote | undefined; + setVote(value?: tendermint_types_types_pb.Vote): SignVoteRequest; + + getChainId(): string; + setChainId(value: string): SignVoteRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignVoteRequest.AsObject; + static toObject(includeInstance: boolean, msg: SignVoteRequest): SignVoteRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SignVoteRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignVoteRequest; + static deserializeBinaryFromReader(message: SignVoteRequest, reader: jspb.BinaryReader): SignVoteRequest; +} + +export namespace SignVoteRequest { + export type AsObject = { + vote?: tendermint_types_types_pb.Vote.AsObject, + chainId: string, + } +} + +export class SignedVoteResponse extends jspb.Message { + + hasVote(): boolean; + clearVote(): void; + getVote(): tendermint_types_types_pb.Vote | undefined; + setVote(value?: tendermint_types_types_pb.Vote): SignedVoteResponse; + + + hasError(): boolean; + clearError(): void; + getError(): RemoteSignerError | undefined; + setError(value?: RemoteSignerError): SignedVoteResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignedVoteResponse.AsObject; + static toObject(includeInstance: boolean, msg: SignedVoteResponse): SignedVoteResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SignedVoteResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignedVoteResponse; + static deserializeBinaryFromReader(message: SignedVoteResponse, reader: jspb.BinaryReader): SignedVoteResponse; +} + +export namespace SignedVoteResponse { + export type AsObject = { + vote?: tendermint_types_types_pb.Vote.AsObject, + error?: RemoteSignerError.AsObject, + } +} + +export class SignProposalRequest extends jspb.Message { + + hasProposal(): boolean; + clearProposal(): void; + getProposal(): tendermint_types_types_pb.Proposal | undefined; + setProposal(value?: tendermint_types_types_pb.Proposal): SignProposalRequest; + + getChainId(): string; + setChainId(value: string): SignProposalRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignProposalRequest.AsObject; + static toObject(includeInstance: boolean, msg: SignProposalRequest): SignProposalRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SignProposalRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignProposalRequest; + static deserializeBinaryFromReader(message: SignProposalRequest, reader: jspb.BinaryReader): SignProposalRequest; +} + +export namespace SignProposalRequest { + export type AsObject = { + proposal?: tendermint_types_types_pb.Proposal.AsObject, + chainId: string, + } +} + +export class SignedProposalResponse extends jspb.Message { + + hasProposal(): boolean; + clearProposal(): void; + getProposal(): tendermint_types_types_pb.Proposal | undefined; + setProposal(value?: tendermint_types_types_pb.Proposal): SignedProposalResponse; + + + hasError(): boolean; + clearError(): void; + getError(): RemoteSignerError | undefined; + setError(value?: RemoteSignerError): SignedProposalResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignedProposalResponse.AsObject; + static toObject(includeInstance: boolean, msg: SignedProposalResponse): SignedProposalResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SignedProposalResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignedProposalResponse; + static deserializeBinaryFromReader(message: SignedProposalResponse, reader: jspb.BinaryReader): SignedProposalResponse; +} + +export namespace SignedProposalResponse { + export type AsObject = { + proposal?: tendermint_types_types_pb.Proposal.AsObject, + error?: RemoteSignerError.AsObject, + } +} + +export class PingRequest extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PingRequest.AsObject; + static toObject(includeInstance: boolean, msg: PingRequest): PingRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PingRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PingRequest; + static deserializeBinaryFromReader(message: PingRequest, reader: jspb.BinaryReader): PingRequest; +} + +export namespace PingRequest { + export type AsObject = { + } +} + +export class PingResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PingResponse.AsObject; + static toObject(includeInstance: boolean, msg: PingResponse): PingResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PingResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PingResponse; + static deserializeBinaryFromReader(message: PingResponse, reader: jspb.BinaryReader): PingResponse; +} + +export namespace PingResponse { + export type AsObject = { + } +} + +export class Message extends jspb.Message { + + hasPubKeyRequest(): boolean; + clearPubKeyRequest(): void; + getPubKeyRequest(): PubKeyRequest | undefined; + setPubKeyRequest(value?: PubKeyRequest): Message; + + + hasPubKeyResponse(): boolean; + clearPubKeyResponse(): void; + getPubKeyResponse(): PubKeyResponse | undefined; + setPubKeyResponse(value?: PubKeyResponse): Message; + + + hasSignVoteRequest(): boolean; + clearSignVoteRequest(): void; + getSignVoteRequest(): SignVoteRequest | undefined; + setSignVoteRequest(value?: SignVoteRequest): Message; + + + hasSignedVoteResponse(): boolean; + clearSignedVoteResponse(): void; + getSignedVoteResponse(): SignedVoteResponse | undefined; + setSignedVoteResponse(value?: SignedVoteResponse): Message; + + + hasSignProposalRequest(): boolean; + clearSignProposalRequest(): void; + getSignProposalRequest(): SignProposalRequest | undefined; + setSignProposalRequest(value?: SignProposalRequest): Message; + + + hasSignedProposalResponse(): boolean; + clearSignedProposalResponse(): void; + getSignedProposalResponse(): SignedProposalResponse | undefined; + setSignedProposalResponse(value?: SignedProposalResponse): Message; + + + hasPingRequest(): boolean; + clearPingRequest(): void; + getPingRequest(): PingRequest | undefined; + setPingRequest(value?: PingRequest): Message; + + + hasPingResponse(): boolean; + clearPingResponse(): void; + getPingResponse(): PingResponse | undefined; + setPingResponse(value?: PingResponse): Message; + + + getSumCase(): Message.SumCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Message.AsObject; + static toObject(includeInstance: boolean, msg: Message): Message.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Message, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Message; + static deserializeBinaryFromReader(message: Message, reader: jspb.BinaryReader): Message; +} + +export namespace Message { + export type AsObject = { + pubKeyRequest?: PubKeyRequest.AsObject, + pubKeyResponse?: PubKeyResponse.AsObject, + signVoteRequest?: SignVoteRequest.AsObject, + signedVoteResponse?: SignedVoteResponse.AsObject, + signProposalRequest?: SignProposalRequest.AsObject, + signedProposalResponse?: SignedProposalResponse.AsObject, + pingRequest?: PingRequest.AsObject, + pingResponse?: PingResponse.AsObject, + } + + export enum SumCase { + SUM_NOT_SET = 0, + + PUB_KEY_REQUEST = 1, + + PUB_KEY_RESPONSE = 2, + + SIGN_VOTE_REQUEST = 3, + + SIGNED_VOTE_RESPONSE = 4, + + SIGN_PROPOSAL_REQUEST = 5, + + SIGNED_PROPOSAL_RESPONSE = 6, + + PING_REQUEST = 7, + + PING_RESPONSE = 8, + + } + +} + +export enum Errors { + ERRORS_UNKNOWN = 0, + ERRORS_UNEXPECTED_RESPONSE = 1, + ERRORS_NO_CONNECTION = 2, + ERRORS_CONNECTION_TIMEOUT = 3, + ERRORS_READ_TIMEOUT = 4, + ERRORS_WRITE_TIMEOUT = 5, +} diff --git a/js/proto/tendermint/privval/types_pb.js b/js/proto/tendermint/privval/types_pb.js new file mode 100644 index 000000000..388f57893 --- /dev/null +++ b/js/proto/tendermint/privval/types_pb.js @@ -0,0 +1,2257 @@ +// source: tendermint/privval/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var tendermint_crypto_keys_pb = require('../../tendermint/crypto/keys_pb.js'); +goog.object.extend(proto, tendermint_crypto_keys_pb); +var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.tendermint.privval.Errors', null, global); +goog.exportSymbol('proto.tendermint.privval.Message', null, global); +goog.exportSymbol('proto.tendermint.privval.Message.SumCase', null, global); +goog.exportSymbol('proto.tendermint.privval.PingRequest', null, global); +goog.exportSymbol('proto.tendermint.privval.PingResponse', null, global); +goog.exportSymbol('proto.tendermint.privval.PubKeyRequest', null, global); +goog.exportSymbol('proto.tendermint.privval.PubKeyResponse', null, global); +goog.exportSymbol('proto.tendermint.privval.RemoteSignerError', null, global); +goog.exportSymbol('proto.tendermint.privval.SignProposalRequest', null, global); +goog.exportSymbol('proto.tendermint.privval.SignVoteRequest', null, global); +goog.exportSymbol('proto.tendermint.privval.SignedProposalResponse', null, global); +goog.exportSymbol('proto.tendermint.privval.SignedVoteResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.privval.RemoteSignerError = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.privval.RemoteSignerError, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.privval.RemoteSignerError.displayName = 'proto.tendermint.privval.RemoteSignerError'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.privval.PubKeyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.privval.PubKeyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.privval.PubKeyRequest.displayName = 'proto.tendermint.privval.PubKeyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.privval.PubKeyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.privval.PubKeyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.privval.PubKeyResponse.displayName = 'proto.tendermint.privval.PubKeyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.privval.SignVoteRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.privval.SignVoteRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.privval.SignVoteRequest.displayName = 'proto.tendermint.privval.SignVoteRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.privval.SignedVoteResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.privval.SignedVoteResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.privval.SignedVoteResponse.displayName = 'proto.tendermint.privval.SignedVoteResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.privval.SignProposalRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.privval.SignProposalRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.privval.SignProposalRequest.displayName = 'proto.tendermint.privval.SignProposalRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.privval.SignedProposalResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.privval.SignedProposalResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.privval.SignedProposalResponse.displayName = 'proto.tendermint.privval.SignedProposalResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.privval.PingRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.privval.PingRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.privval.PingRequest.displayName = 'proto.tendermint.privval.PingRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.privval.PingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.privval.PingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.privval.PingResponse.displayName = 'proto.tendermint.privval.PingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.privval.Message = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.privval.Message.oneofGroups_); +}; +goog.inherits(proto.tendermint.privval.Message, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.privval.Message.displayName = 'proto.tendermint.privval.Message'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.privval.RemoteSignerError.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.privval.RemoteSignerError.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.privval.RemoteSignerError} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.RemoteSignerError.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + description: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.privval.RemoteSignerError} + */ +proto.tendermint.privval.RemoteSignerError.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.privval.RemoteSignerError; + return proto.tendermint.privval.RemoteSignerError.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.privval.RemoteSignerError} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.privval.RemoteSignerError} + */ +proto.tendermint.privval.RemoteSignerError.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.privval.RemoteSignerError.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.privval.RemoteSignerError.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.privval.RemoteSignerError} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.RemoteSignerError.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional int32 code = 1; + * @return {number} + */ +proto.tendermint.privval.RemoteSignerError.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.privval.RemoteSignerError} returns this + */ +proto.tendermint.privval.RemoteSignerError.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.tendermint.privval.RemoteSignerError.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.privval.RemoteSignerError} returns this + */ +proto.tendermint.privval.RemoteSignerError.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.privval.PubKeyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.privval.PubKeyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.privval.PubKeyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.PubKeyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + chainId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.privval.PubKeyRequest} + */ +proto.tendermint.privval.PubKeyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.privval.PubKeyRequest; + return proto.tendermint.privval.PubKeyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.privval.PubKeyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.privval.PubKeyRequest} + */ +proto.tendermint.privval.PubKeyRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.privval.PubKeyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.privval.PubKeyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.privval.PubKeyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.PubKeyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string chain_id = 1; + * @return {string} + */ +proto.tendermint.privval.PubKeyRequest.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.privval.PubKeyRequest} returns this + */ +proto.tendermint.privval.PubKeyRequest.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.privval.PubKeyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.privval.PubKeyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.privval.PubKeyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.PubKeyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: (f = msg.getPubKey()) && tendermint_crypto_keys_pb.PublicKey.toObject(includeInstance, f), + error: (f = msg.getError()) && proto.tendermint.privval.RemoteSignerError.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.privval.PubKeyResponse} + */ +proto.tendermint.privval.PubKeyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.privval.PubKeyResponse; + return proto.tendermint.privval.PubKeyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.privval.PubKeyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.privval.PubKeyResponse} + */ +proto.tendermint.privval.PubKeyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_crypto_keys_pb.PublicKey; + reader.readMessage(value,tendermint_crypto_keys_pb.PublicKey.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 2: + var value = new proto.tendermint.privval.RemoteSignerError; + reader.readMessage(value,proto.tendermint.privval.RemoteSignerError.deserializeBinaryFromReader); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.privval.PubKeyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.privval.PubKeyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.privval.PubKeyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.PubKeyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_crypto_keys_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.privval.RemoteSignerError.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.crypto.PublicKey pub_key = 1; + * @return {?proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.privval.PubKeyResponse.prototype.getPubKey = function() { + return /** @type{?proto.tendermint.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_keys_pb.PublicKey, 1)); +}; + + +/** + * @param {?proto.tendermint.crypto.PublicKey|undefined} value + * @return {!proto.tendermint.privval.PubKeyResponse} returns this +*/ +proto.tendermint.privval.PubKeyResponse.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.PubKeyResponse} returns this + */ +proto.tendermint.privval.PubKeyResponse.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.PubKeyResponse.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional RemoteSignerError error = 2; + * @return {?proto.tendermint.privval.RemoteSignerError} + */ +proto.tendermint.privval.PubKeyResponse.prototype.getError = function() { + return /** @type{?proto.tendermint.privval.RemoteSignerError} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.privval.RemoteSignerError, 2)); +}; + + +/** + * @param {?proto.tendermint.privval.RemoteSignerError|undefined} value + * @return {!proto.tendermint.privval.PubKeyResponse} returns this +*/ +proto.tendermint.privval.PubKeyResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.PubKeyResponse} returns this + */ +proto.tendermint.privval.PubKeyResponse.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.PubKeyResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.privval.SignVoteRequest.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.privval.SignVoteRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.privval.SignVoteRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.SignVoteRequest.toObject = function(includeInstance, msg) { + var f, obj = { + vote: (f = msg.getVote()) && tendermint_types_types_pb.Vote.toObject(includeInstance, f), + chainId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.privval.SignVoteRequest} + */ +proto.tendermint.privval.SignVoteRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.privval.SignVoteRequest; + return proto.tendermint.privval.SignVoteRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.privval.SignVoteRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.privval.SignVoteRequest} + */ +proto.tendermint.privval.SignVoteRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Vote; + reader.readMessage(value,tendermint_types_types_pb.Vote.deserializeBinaryFromReader); + msg.setVote(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.privval.SignVoteRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.privval.SignVoteRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.privval.SignVoteRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.SignVoteRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVote(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional tendermint.types.Vote vote = 1; + * @return {?proto.tendermint.types.Vote} + */ +proto.tendermint.privval.SignVoteRequest.prototype.getVote = function() { + return /** @type{?proto.tendermint.types.Vote} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Vote, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Vote|undefined} value + * @return {!proto.tendermint.privval.SignVoteRequest} returns this +*/ +proto.tendermint.privval.SignVoteRequest.prototype.setVote = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.SignVoteRequest} returns this + */ +proto.tendermint.privval.SignVoteRequest.prototype.clearVote = function() { + return this.setVote(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.SignVoteRequest.prototype.hasVote = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string chain_id = 2; + * @return {string} + */ +proto.tendermint.privval.SignVoteRequest.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.privval.SignVoteRequest} returns this + */ +proto.tendermint.privval.SignVoteRequest.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.privval.SignedVoteResponse.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.privval.SignedVoteResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.privval.SignedVoteResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.SignedVoteResponse.toObject = function(includeInstance, msg) { + var f, obj = { + vote: (f = msg.getVote()) && tendermint_types_types_pb.Vote.toObject(includeInstance, f), + error: (f = msg.getError()) && proto.tendermint.privval.RemoteSignerError.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.privval.SignedVoteResponse} + */ +proto.tendermint.privval.SignedVoteResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.privval.SignedVoteResponse; + return proto.tendermint.privval.SignedVoteResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.privval.SignedVoteResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.privval.SignedVoteResponse} + */ +proto.tendermint.privval.SignedVoteResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Vote; + reader.readMessage(value,tendermint_types_types_pb.Vote.deserializeBinaryFromReader); + msg.setVote(value); + break; + case 2: + var value = new proto.tendermint.privval.RemoteSignerError; + reader.readMessage(value,proto.tendermint.privval.RemoteSignerError.deserializeBinaryFromReader); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.privval.SignedVoteResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.privval.SignedVoteResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.privval.SignedVoteResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.SignedVoteResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVote(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.privval.RemoteSignerError.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.Vote vote = 1; + * @return {?proto.tendermint.types.Vote} + */ +proto.tendermint.privval.SignedVoteResponse.prototype.getVote = function() { + return /** @type{?proto.tendermint.types.Vote} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Vote, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Vote|undefined} value + * @return {!proto.tendermint.privval.SignedVoteResponse} returns this +*/ +proto.tendermint.privval.SignedVoteResponse.prototype.setVote = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.SignedVoteResponse} returns this + */ +proto.tendermint.privval.SignedVoteResponse.prototype.clearVote = function() { + return this.setVote(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.SignedVoteResponse.prototype.hasVote = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional RemoteSignerError error = 2; + * @return {?proto.tendermint.privval.RemoteSignerError} + */ +proto.tendermint.privval.SignedVoteResponse.prototype.getError = function() { + return /** @type{?proto.tendermint.privval.RemoteSignerError} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.privval.RemoteSignerError, 2)); +}; + + +/** + * @param {?proto.tendermint.privval.RemoteSignerError|undefined} value + * @return {!proto.tendermint.privval.SignedVoteResponse} returns this +*/ +proto.tendermint.privval.SignedVoteResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.SignedVoteResponse} returns this + */ +proto.tendermint.privval.SignedVoteResponse.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.SignedVoteResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.privval.SignProposalRequest.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.privval.SignProposalRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.privval.SignProposalRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.SignProposalRequest.toObject = function(includeInstance, msg) { + var f, obj = { + proposal: (f = msg.getProposal()) && tendermint_types_types_pb.Proposal.toObject(includeInstance, f), + chainId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.privval.SignProposalRequest} + */ +proto.tendermint.privval.SignProposalRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.privval.SignProposalRequest; + return proto.tendermint.privval.SignProposalRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.privval.SignProposalRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.privval.SignProposalRequest} + */ +proto.tendermint.privval.SignProposalRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Proposal; + reader.readMessage(value,tendermint_types_types_pb.Proposal.deserializeBinaryFromReader); + msg.setProposal(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.privval.SignProposalRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.privval.SignProposalRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.privval.SignProposalRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.SignProposalRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposal(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Proposal.serializeBinaryToWriter + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional tendermint.types.Proposal proposal = 1; + * @return {?proto.tendermint.types.Proposal} + */ +proto.tendermint.privval.SignProposalRequest.prototype.getProposal = function() { + return /** @type{?proto.tendermint.types.Proposal} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Proposal, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Proposal|undefined} value + * @return {!proto.tendermint.privval.SignProposalRequest} returns this +*/ +proto.tendermint.privval.SignProposalRequest.prototype.setProposal = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.SignProposalRequest} returns this + */ +proto.tendermint.privval.SignProposalRequest.prototype.clearProposal = function() { + return this.setProposal(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.SignProposalRequest.prototype.hasProposal = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string chain_id = 2; + * @return {string} + */ +proto.tendermint.privval.SignProposalRequest.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.privval.SignProposalRequest} returns this + */ +proto.tendermint.privval.SignProposalRequest.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.privval.SignedProposalResponse.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.privval.SignedProposalResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.privval.SignedProposalResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.SignedProposalResponse.toObject = function(includeInstance, msg) { + var f, obj = { + proposal: (f = msg.getProposal()) && tendermint_types_types_pb.Proposal.toObject(includeInstance, f), + error: (f = msg.getError()) && proto.tendermint.privval.RemoteSignerError.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.privval.SignedProposalResponse} + */ +proto.tendermint.privval.SignedProposalResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.privval.SignedProposalResponse; + return proto.tendermint.privval.SignedProposalResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.privval.SignedProposalResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.privval.SignedProposalResponse} + */ +proto.tendermint.privval.SignedProposalResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Proposal; + reader.readMessage(value,tendermint_types_types_pb.Proposal.deserializeBinaryFromReader); + msg.setProposal(value); + break; + case 2: + var value = new proto.tendermint.privval.RemoteSignerError; + reader.readMessage(value,proto.tendermint.privval.RemoteSignerError.deserializeBinaryFromReader); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.privval.SignedProposalResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.privval.SignedProposalResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.privval.SignedProposalResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.SignedProposalResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposal(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Proposal.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.privval.RemoteSignerError.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.Proposal proposal = 1; + * @return {?proto.tendermint.types.Proposal} + */ +proto.tendermint.privval.SignedProposalResponse.prototype.getProposal = function() { + return /** @type{?proto.tendermint.types.Proposal} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Proposal, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Proposal|undefined} value + * @return {!proto.tendermint.privval.SignedProposalResponse} returns this +*/ +proto.tendermint.privval.SignedProposalResponse.prototype.setProposal = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.SignedProposalResponse} returns this + */ +proto.tendermint.privval.SignedProposalResponse.prototype.clearProposal = function() { + return this.setProposal(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.SignedProposalResponse.prototype.hasProposal = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional RemoteSignerError error = 2; + * @return {?proto.tendermint.privval.RemoteSignerError} + */ +proto.tendermint.privval.SignedProposalResponse.prototype.getError = function() { + return /** @type{?proto.tendermint.privval.RemoteSignerError} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.privval.RemoteSignerError, 2)); +}; + + +/** + * @param {?proto.tendermint.privval.RemoteSignerError|undefined} value + * @return {!proto.tendermint.privval.SignedProposalResponse} returns this +*/ +proto.tendermint.privval.SignedProposalResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.SignedProposalResponse} returns this + */ +proto.tendermint.privval.SignedProposalResponse.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.SignedProposalResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.privval.PingRequest.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.privval.PingRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.privval.PingRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.PingRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.privval.PingRequest} + */ +proto.tendermint.privval.PingRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.privval.PingRequest; + return proto.tendermint.privval.PingRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.privval.PingRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.privval.PingRequest} + */ +proto.tendermint.privval.PingRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.privval.PingRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.privval.PingRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.privval.PingRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.PingRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.privval.PingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.privval.PingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.privval.PingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.PingResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.privval.PingResponse} + */ +proto.tendermint.privval.PingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.privval.PingResponse; + return proto.tendermint.privval.PingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.privval.PingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.privval.PingResponse} + */ +proto.tendermint.privval.PingResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.privval.PingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.privval.PingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.privval.PingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.PingResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.privval.Message.oneofGroups_ = [[1,2,3,4,5,6,7,8]]; + +/** + * @enum {number} + */ +proto.tendermint.privval.Message.SumCase = { + SUM_NOT_SET: 0, + PUB_KEY_REQUEST: 1, + PUB_KEY_RESPONSE: 2, + SIGN_VOTE_REQUEST: 3, + SIGNED_VOTE_RESPONSE: 4, + SIGN_PROPOSAL_REQUEST: 5, + SIGNED_PROPOSAL_RESPONSE: 6, + PING_REQUEST: 7, + PING_RESPONSE: 8 +}; + +/** + * @return {proto.tendermint.privval.Message.SumCase} + */ +proto.tendermint.privval.Message.prototype.getSumCase = function() { + return /** @type {proto.tendermint.privval.Message.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.privval.Message.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.privval.Message.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.privval.Message.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.privval.Message} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.Message.toObject = function(includeInstance, msg) { + var f, obj = { + pubKeyRequest: (f = msg.getPubKeyRequest()) && proto.tendermint.privval.PubKeyRequest.toObject(includeInstance, f), + pubKeyResponse: (f = msg.getPubKeyResponse()) && proto.tendermint.privval.PubKeyResponse.toObject(includeInstance, f), + signVoteRequest: (f = msg.getSignVoteRequest()) && proto.tendermint.privval.SignVoteRequest.toObject(includeInstance, f), + signedVoteResponse: (f = msg.getSignedVoteResponse()) && proto.tendermint.privval.SignedVoteResponse.toObject(includeInstance, f), + signProposalRequest: (f = msg.getSignProposalRequest()) && proto.tendermint.privval.SignProposalRequest.toObject(includeInstance, f), + signedProposalResponse: (f = msg.getSignedProposalResponse()) && proto.tendermint.privval.SignedProposalResponse.toObject(includeInstance, f), + pingRequest: (f = msg.getPingRequest()) && proto.tendermint.privval.PingRequest.toObject(includeInstance, f), + pingResponse: (f = msg.getPingResponse()) && proto.tendermint.privval.PingResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.privval.Message} + */ +proto.tendermint.privval.Message.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.privval.Message; + return proto.tendermint.privval.Message.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.privval.Message} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.privval.Message} + */ +proto.tendermint.privval.Message.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.privval.PubKeyRequest; + reader.readMessage(value,proto.tendermint.privval.PubKeyRequest.deserializeBinaryFromReader); + msg.setPubKeyRequest(value); + break; + case 2: + var value = new proto.tendermint.privval.PubKeyResponse; + reader.readMessage(value,proto.tendermint.privval.PubKeyResponse.deserializeBinaryFromReader); + msg.setPubKeyResponse(value); + break; + case 3: + var value = new proto.tendermint.privval.SignVoteRequest; + reader.readMessage(value,proto.tendermint.privval.SignVoteRequest.deserializeBinaryFromReader); + msg.setSignVoteRequest(value); + break; + case 4: + var value = new proto.tendermint.privval.SignedVoteResponse; + reader.readMessage(value,proto.tendermint.privval.SignedVoteResponse.deserializeBinaryFromReader); + msg.setSignedVoteResponse(value); + break; + case 5: + var value = new proto.tendermint.privval.SignProposalRequest; + reader.readMessage(value,proto.tendermint.privval.SignProposalRequest.deserializeBinaryFromReader); + msg.setSignProposalRequest(value); + break; + case 6: + var value = new proto.tendermint.privval.SignedProposalResponse; + reader.readMessage(value,proto.tendermint.privval.SignedProposalResponse.deserializeBinaryFromReader); + msg.setSignedProposalResponse(value); + break; + case 7: + var value = new proto.tendermint.privval.PingRequest; + reader.readMessage(value,proto.tendermint.privval.PingRequest.deserializeBinaryFromReader); + msg.setPingRequest(value); + break; + case 8: + var value = new proto.tendermint.privval.PingResponse; + reader.readMessage(value,proto.tendermint.privval.PingResponse.deserializeBinaryFromReader); + msg.setPingResponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.privval.Message.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.privval.Message.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.privval.Message} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.privval.Message.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKeyRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.privval.PubKeyRequest.serializeBinaryToWriter + ); + } + f = message.getPubKeyResponse(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.privval.PubKeyResponse.serializeBinaryToWriter + ); + } + f = message.getSignVoteRequest(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.privval.SignVoteRequest.serializeBinaryToWriter + ); + } + f = message.getSignedVoteResponse(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.privval.SignedVoteResponse.serializeBinaryToWriter + ); + } + f = message.getSignProposalRequest(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.privval.SignProposalRequest.serializeBinaryToWriter + ); + } + f = message.getSignedProposalResponse(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.tendermint.privval.SignedProposalResponse.serializeBinaryToWriter + ); + } + f = message.getPingRequest(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.tendermint.privval.PingRequest.serializeBinaryToWriter + ); + } + f = message.getPingResponse(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.tendermint.privval.PingResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional PubKeyRequest pub_key_request = 1; + * @return {?proto.tendermint.privval.PubKeyRequest} + */ +proto.tendermint.privval.Message.prototype.getPubKeyRequest = function() { + return /** @type{?proto.tendermint.privval.PubKeyRequest} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.privval.PubKeyRequest, 1)); +}; + + +/** + * @param {?proto.tendermint.privval.PubKeyRequest|undefined} value + * @return {!proto.tendermint.privval.Message} returns this +*/ +proto.tendermint.privval.Message.prototype.setPubKeyRequest = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.privval.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.Message} returns this + */ +proto.tendermint.privval.Message.prototype.clearPubKeyRequest = function() { + return this.setPubKeyRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.Message.prototype.hasPubKeyRequest = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional PubKeyResponse pub_key_response = 2; + * @return {?proto.tendermint.privval.PubKeyResponse} + */ +proto.tendermint.privval.Message.prototype.getPubKeyResponse = function() { + return /** @type{?proto.tendermint.privval.PubKeyResponse} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.privval.PubKeyResponse, 2)); +}; + + +/** + * @param {?proto.tendermint.privval.PubKeyResponse|undefined} value + * @return {!proto.tendermint.privval.Message} returns this +*/ +proto.tendermint.privval.Message.prototype.setPubKeyResponse = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.privval.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.Message} returns this + */ +proto.tendermint.privval.Message.prototype.clearPubKeyResponse = function() { + return this.setPubKeyResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.Message.prototype.hasPubKeyResponse = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional SignVoteRequest sign_vote_request = 3; + * @return {?proto.tendermint.privval.SignVoteRequest} + */ +proto.tendermint.privval.Message.prototype.getSignVoteRequest = function() { + return /** @type{?proto.tendermint.privval.SignVoteRequest} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.privval.SignVoteRequest, 3)); +}; + + +/** + * @param {?proto.tendermint.privval.SignVoteRequest|undefined} value + * @return {!proto.tendermint.privval.Message} returns this +*/ +proto.tendermint.privval.Message.prototype.setSignVoteRequest = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.tendermint.privval.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.Message} returns this + */ +proto.tendermint.privval.Message.prototype.clearSignVoteRequest = function() { + return this.setSignVoteRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.Message.prototype.hasSignVoteRequest = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional SignedVoteResponse signed_vote_response = 4; + * @return {?proto.tendermint.privval.SignedVoteResponse} + */ +proto.tendermint.privval.Message.prototype.getSignedVoteResponse = function() { + return /** @type{?proto.tendermint.privval.SignedVoteResponse} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.privval.SignedVoteResponse, 4)); +}; + + +/** + * @param {?proto.tendermint.privval.SignedVoteResponse|undefined} value + * @return {!proto.tendermint.privval.Message} returns this +*/ +proto.tendermint.privval.Message.prototype.setSignedVoteResponse = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.tendermint.privval.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.Message} returns this + */ +proto.tendermint.privval.Message.prototype.clearSignedVoteResponse = function() { + return this.setSignedVoteResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.Message.prototype.hasSignedVoteResponse = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional SignProposalRequest sign_proposal_request = 5; + * @return {?proto.tendermint.privval.SignProposalRequest} + */ +proto.tendermint.privval.Message.prototype.getSignProposalRequest = function() { + return /** @type{?proto.tendermint.privval.SignProposalRequest} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.privval.SignProposalRequest, 5)); +}; + + +/** + * @param {?proto.tendermint.privval.SignProposalRequest|undefined} value + * @return {!proto.tendermint.privval.Message} returns this +*/ +proto.tendermint.privval.Message.prototype.setSignProposalRequest = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.tendermint.privval.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.Message} returns this + */ +proto.tendermint.privval.Message.prototype.clearSignProposalRequest = function() { + return this.setSignProposalRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.Message.prototype.hasSignProposalRequest = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional SignedProposalResponse signed_proposal_response = 6; + * @return {?proto.tendermint.privval.SignedProposalResponse} + */ +proto.tendermint.privval.Message.prototype.getSignedProposalResponse = function() { + return /** @type{?proto.tendermint.privval.SignedProposalResponse} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.privval.SignedProposalResponse, 6)); +}; + + +/** + * @param {?proto.tendermint.privval.SignedProposalResponse|undefined} value + * @return {!proto.tendermint.privval.Message} returns this +*/ +proto.tendermint.privval.Message.prototype.setSignedProposalResponse = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.tendermint.privval.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.Message} returns this + */ +proto.tendermint.privval.Message.prototype.clearSignedProposalResponse = function() { + return this.setSignedProposalResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.Message.prototype.hasSignedProposalResponse = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional PingRequest ping_request = 7; + * @return {?proto.tendermint.privval.PingRequest} + */ +proto.tendermint.privval.Message.prototype.getPingRequest = function() { + return /** @type{?proto.tendermint.privval.PingRequest} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.privval.PingRequest, 7)); +}; + + +/** + * @param {?proto.tendermint.privval.PingRequest|undefined} value + * @return {!proto.tendermint.privval.Message} returns this +*/ +proto.tendermint.privval.Message.prototype.setPingRequest = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.tendermint.privval.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.Message} returns this + */ +proto.tendermint.privval.Message.prototype.clearPingRequest = function() { + return this.setPingRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.Message.prototype.hasPingRequest = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional PingResponse ping_response = 8; + * @return {?proto.tendermint.privval.PingResponse} + */ +proto.tendermint.privval.Message.prototype.getPingResponse = function() { + return /** @type{?proto.tendermint.privval.PingResponse} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.privval.PingResponse, 8)); +}; + + +/** + * @param {?proto.tendermint.privval.PingResponse|undefined} value + * @return {!proto.tendermint.privval.Message} returns this +*/ +proto.tendermint.privval.Message.prototype.setPingResponse = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.tendermint.privval.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.privval.Message} returns this + */ +proto.tendermint.privval.Message.prototype.clearPingResponse = function() { + return this.setPingResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.privval.Message.prototype.hasPingResponse = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * @enum {number} + */ +proto.tendermint.privval.Errors = { + ERRORS_UNKNOWN: 0, + ERRORS_UNEXPECTED_RESPONSE: 1, + ERRORS_NO_CONNECTION: 2, + ERRORS_CONNECTION_TIMEOUT: 3, + ERRORS_READ_TIMEOUT: 4, + ERRORS_WRITE_TIMEOUT: 5 +}; + +goog.object.extend(exports, proto.tendermint.privval); diff --git a/js/proto/tendermint/rpc/grpc/types_grpc_pb.d.ts b/js/proto/tendermint/rpc/grpc/types_grpc_pb.d.ts new file mode 100644 index 000000000..12d6ff430 --- /dev/null +++ b/js/proto/tendermint/rpc/grpc/types_grpc_pb.d.ts @@ -0,0 +1,60 @@ +// package: tendermint.rpc.grpc +// file: tendermint/rpc/grpc/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; +import * as tendermint_rpc_grpc_types_pb from "../../../tendermint/rpc/grpc/types_pb"; +import * as tendermint_abci_types_pb from "../../../tendermint/abci/types_pb"; + +interface IBroadcastAPIService extends grpc.ServiceDefinition { + ping: IBroadcastAPIService_IPing; + broadcastTx: IBroadcastAPIService_IBroadcastTx; +} + +interface IBroadcastAPIService_IPing extends grpc.MethodDefinition { + path: "/tendermint.rpc.grpc.BroadcastAPI/Ping"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IBroadcastAPIService_IBroadcastTx extends grpc.MethodDefinition { + path: "/tendermint.rpc.grpc.BroadcastAPI/BroadcastTx"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const BroadcastAPIService: IBroadcastAPIService; + +export interface IBroadcastAPIServer extends grpc.UntypedServiceImplementation { + ping: grpc.handleUnaryCall; + broadcastTx: grpc.handleUnaryCall; +} + +export interface IBroadcastAPIClient { + ping(request: tendermint_rpc_grpc_types_pb.RequestPing, callback: (error: grpc.ServiceError | null, response: tendermint_rpc_grpc_types_pb.ResponsePing) => void): grpc.ClientUnaryCall; + ping(request: tendermint_rpc_grpc_types_pb.RequestPing, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_rpc_grpc_types_pb.ResponsePing) => void): grpc.ClientUnaryCall; + ping(request: tendermint_rpc_grpc_types_pb.RequestPing, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_rpc_grpc_types_pb.ResponsePing) => void): grpc.ClientUnaryCall; + broadcastTx(request: tendermint_rpc_grpc_types_pb.RequestBroadcastTx, callback: (error: grpc.ServiceError | null, response: tendermint_rpc_grpc_types_pb.ResponseBroadcastTx) => void): grpc.ClientUnaryCall; + broadcastTx(request: tendermint_rpc_grpc_types_pb.RequestBroadcastTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_rpc_grpc_types_pb.ResponseBroadcastTx) => void): grpc.ClientUnaryCall; + broadcastTx(request: tendermint_rpc_grpc_types_pb.RequestBroadcastTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_rpc_grpc_types_pb.ResponseBroadcastTx) => void): grpc.ClientUnaryCall; +} + +export class BroadcastAPIClient extends grpc.Client implements IBroadcastAPIClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public ping(request: tendermint_rpc_grpc_types_pb.RequestPing, callback: (error: grpc.ServiceError | null, response: tendermint_rpc_grpc_types_pb.ResponsePing) => void): grpc.ClientUnaryCall; + public ping(request: tendermint_rpc_grpc_types_pb.RequestPing, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_rpc_grpc_types_pb.ResponsePing) => void): grpc.ClientUnaryCall; + public ping(request: tendermint_rpc_grpc_types_pb.RequestPing, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_rpc_grpc_types_pb.ResponsePing) => void): grpc.ClientUnaryCall; + public broadcastTx(request: tendermint_rpc_grpc_types_pb.RequestBroadcastTx, callback: (error: grpc.ServiceError | null, response: tendermint_rpc_grpc_types_pb.ResponseBroadcastTx) => void): grpc.ClientUnaryCall; + public broadcastTx(request: tendermint_rpc_grpc_types_pb.RequestBroadcastTx, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: tendermint_rpc_grpc_types_pb.ResponseBroadcastTx) => void): grpc.ClientUnaryCall; + public broadcastTx(request: tendermint_rpc_grpc_types_pb.RequestBroadcastTx, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: tendermint_rpc_grpc_types_pb.ResponseBroadcastTx) => void): grpc.ClientUnaryCall; +} diff --git a/js/proto/tendermint/rpc/grpc/types_grpc_pb.js b/js/proto/tendermint/rpc/grpc/types_grpc_pb.js new file mode 100644 index 000000000..b3135236c --- /dev/null +++ b/js/proto/tendermint/rpc/grpc/types_grpc_pb.js @@ -0,0 +1,79 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var tendermint_rpc_grpc_types_pb = require('../../../tendermint/rpc/grpc/types_pb.js'); +var tendermint_abci_types_pb = require('../../../tendermint/abci/types_pb.js'); + +function serialize_tendermint_rpc_grpc_RequestBroadcastTx(arg) { + if (!(arg instanceof tendermint_rpc_grpc_types_pb.RequestBroadcastTx)) { + throw new Error('Expected argument of type tendermint.rpc.grpc.RequestBroadcastTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_rpc_grpc_RequestBroadcastTx(buffer_arg) { + return tendermint_rpc_grpc_types_pb.RequestBroadcastTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_rpc_grpc_RequestPing(arg) { + if (!(arg instanceof tendermint_rpc_grpc_types_pb.RequestPing)) { + throw new Error('Expected argument of type tendermint.rpc.grpc.RequestPing'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_rpc_grpc_RequestPing(buffer_arg) { + return tendermint_rpc_grpc_types_pb.RequestPing.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_rpc_grpc_ResponseBroadcastTx(arg) { + if (!(arg instanceof tendermint_rpc_grpc_types_pb.ResponseBroadcastTx)) { + throw new Error('Expected argument of type tendermint.rpc.grpc.ResponseBroadcastTx'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_rpc_grpc_ResponseBroadcastTx(buffer_arg) { + return tendermint_rpc_grpc_types_pb.ResponseBroadcastTx.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_tendermint_rpc_grpc_ResponsePing(arg) { + if (!(arg instanceof tendermint_rpc_grpc_types_pb.ResponsePing)) { + throw new Error('Expected argument of type tendermint.rpc.grpc.ResponsePing'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_tendermint_rpc_grpc_ResponsePing(buffer_arg) { + return tendermint_rpc_grpc_types_pb.ResponsePing.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// ---------------------------------------- +// Service Definition +// +var BroadcastAPIService = exports['tendermint.rpc.grpc.BroadcastAPI'] = { + ping: { + path: '/tendermint.rpc.grpc.BroadcastAPI/Ping', + requestStream: false, + responseStream: false, + requestType: tendermint_rpc_grpc_types_pb.RequestPing, + responseType: tendermint_rpc_grpc_types_pb.ResponsePing, + requestSerialize: serialize_tendermint_rpc_grpc_RequestPing, + requestDeserialize: deserialize_tendermint_rpc_grpc_RequestPing, + responseSerialize: serialize_tendermint_rpc_grpc_ResponsePing, + responseDeserialize: deserialize_tendermint_rpc_grpc_ResponsePing, + }, + broadcastTx: { + path: '/tendermint.rpc.grpc.BroadcastAPI/BroadcastTx', + requestStream: false, + responseStream: false, + requestType: tendermint_rpc_grpc_types_pb.RequestBroadcastTx, + responseType: tendermint_rpc_grpc_types_pb.ResponseBroadcastTx, + requestSerialize: serialize_tendermint_rpc_grpc_RequestBroadcastTx, + requestDeserialize: deserialize_tendermint_rpc_grpc_RequestBroadcastTx, + responseSerialize: serialize_tendermint_rpc_grpc_ResponseBroadcastTx, + responseDeserialize: deserialize_tendermint_rpc_grpc_ResponseBroadcastTx, + }, +}; + diff --git a/js/proto/tendermint/rpc/grpc/types_pb.d.ts b/js/proto/tendermint/rpc/grpc/types_pb.d.ts new file mode 100644 index 000000000..afee84671 --- /dev/null +++ b/js/proto/tendermint/rpc/grpc/types_pb.d.ts @@ -0,0 +1,96 @@ +// package: tendermint.rpc.grpc +// file: tendermint/rpc/grpc/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as tendermint_abci_types_pb from "../../../tendermint/abci/types_pb"; + +export class RequestPing extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestPing.AsObject; + static toObject(includeInstance: boolean, msg: RequestPing): RequestPing.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestPing, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestPing; + static deserializeBinaryFromReader(message: RequestPing, reader: jspb.BinaryReader): RequestPing; +} + +export namespace RequestPing { + export type AsObject = { + } +} + +export class RequestBroadcastTx extends jspb.Message { + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): RequestBroadcastTx; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestBroadcastTx.AsObject; + static toObject(includeInstance: boolean, msg: RequestBroadcastTx): RequestBroadcastTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestBroadcastTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestBroadcastTx; + static deserializeBinaryFromReader(message: RequestBroadcastTx, reader: jspb.BinaryReader): RequestBroadcastTx; +} + +export namespace RequestBroadcastTx { + export type AsObject = { + tx: Uint8Array | string, + } +} + +export class ResponsePing extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponsePing.AsObject; + static toObject(includeInstance: boolean, msg: ResponsePing): ResponsePing.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponsePing, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponsePing; + static deserializeBinaryFromReader(message: ResponsePing, reader: jspb.BinaryReader): ResponsePing; +} + +export namespace ResponsePing { + export type AsObject = { + } +} + +export class ResponseBroadcastTx extends jspb.Message { + + hasCheckTx(): boolean; + clearCheckTx(): void; + getCheckTx(): tendermint_abci_types_pb.ResponseCheckTx | undefined; + setCheckTx(value?: tendermint_abci_types_pb.ResponseCheckTx): ResponseBroadcastTx; + + + hasDeliverTx(): boolean; + clearDeliverTx(): void; + getDeliverTx(): tendermint_abci_types_pb.ResponseDeliverTx | undefined; + setDeliverTx(value?: tendermint_abci_types_pb.ResponseDeliverTx): ResponseBroadcastTx; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResponseBroadcastTx.AsObject; + static toObject(includeInstance: boolean, msg: ResponseBroadcastTx): ResponseBroadcastTx.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResponseBroadcastTx, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResponseBroadcastTx; + static deserializeBinaryFromReader(message: ResponseBroadcastTx, reader: jspb.BinaryReader): ResponseBroadcastTx; +} + +export namespace ResponseBroadcastTx { + export type AsObject = { + checkTx?: tendermint_abci_types_pb.ResponseCheckTx.AsObject, + deliverTx?: tendermint_abci_types_pb.ResponseDeliverTx.AsObject, + } +} diff --git a/js/proto/tendermint/rpc/grpc/types_pb.js b/js/proto/tendermint/rpc/grpc/types_pb.js new file mode 100644 index 000000000..62dcac82d --- /dev/null +++ b/js/proto/tendermint/rpc/grpc/types_pb.js @@ -0,0 +1,665 @@ +// source: tendermint/rpc/grpc/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var tendermint_abci_types_pb = require('../../../tendermint/abci/types_pb.js'); +goog.object.extend(proto, tendermint_abci_types_pb); +goog.exportSymbol('proto.tendermint.rpc.grpc.RequestBroadcastTx', null, global); +goog.exportSymbol('proto.tendermint.rpc.grpc.RequestPing', null, global); +goog.exportSymbol('proto.tendermint.rpc.grpc.ResponseBroadcastTx', null, global); +goog.exportSymbol('proto.tendermint.rpc.grpc.ResponsePing', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.rpc.grpc.RequestPing = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.rpc.grpc.RequestPing, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.rpc.grpc.RequestPing.displayName = 'proto.tendermint.rpc.grpc.RequestPing'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.rpc.grpc.RequestBroadcastTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.rpc.grpc.RequestBroadcastTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.rpc.grpc.RequestBroadcastTx.displayName = 'proto.tendermint.rpc.grpc.RequestBroadcastTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.rpc.grpc.ResponsePing = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.rpc.grpc.ResponsePing, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.rpc.grpc.ResponsePing.displayName = 'proto.tendermint.rpc.grpc.ResponsePing'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.rpc.grpc.ResponseBroadcastTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.rpc.grpc.ResponseBroadcastTx.displayName = 'proto.tendermint.rpc.grpc.ResponseBroadcastTx'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.rpc.grpc.RequestPing.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.rpc.grpc.RequestPing.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.rpc.grpc.RequestPing} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.rpc.grpc.RequestPing.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.rpc.grpc.RequestPing} + */ +proto.tendermint.rpc.grpc.RequestPing.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.rpc.grpc.RequestPing; + return proto.tendermint.rpc.grpc.RequestPing.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.rpc.grpc.RequestPing} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.rpc.grpc.RequestPing} + */ +proto.tendermint.rpc.grpc.RequestPing.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.rpc.grpc.RequestPing.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.rpc.grpc.RequestPing.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.rpc.grpc.RequestPing} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.rpc.grpc.RequestPing.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.rpc.grpc.RequestBroadcastTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.rpc.grpc.RequestBroadcastTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.rpc.grpc.RequestBroadcastTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.rpc.grpc.RequestBroadcastTx.toObject = function(includeInstance, msg) { + var f, obj = { + tx: msg.getTx_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.rpc.grpc.RequestBroadcastTx} + */ +proto.tendermint.rpc.grpc.RequestBroadcastTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.rpc.grpc.RequestBroadcastTx; + return proto.tendermint.rpc.grpc.RequestBroadcastTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.rpc.grpc.RequestBroadcastTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.rpc.grpc.RequestBroadcastTx} + */ +proto.tendermint.rpc.grpc.RequestBroadcastTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.rpc.grpc.RequestBroadcastTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.rpc.grpc.RequestBroadcastTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.rpc.grpc.RequestBroadcastTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.rpc.grpc.RequestBroadcastTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes tx = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.rpc.grpc.RequestBroadcastTx.prototype.getTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes tx = 1; + * This is a type-conversion wrapper around `getTx()` + * @return {string} + */ +proto.tendermint.rpc.grpc.RequestBroadcastTx.prototype.getTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTx())); +}; + + +/** + * optional bytes tx = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTx()` + * @return {!Uint8Array} + */ +proto.tendermint.rpc.grpc.RequestBroadcastTx.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.rpc.grpc.RequestBroadcastTx} returns this + */ +proto.tendermint.rpc.grpc.RequestBroadcastTx.prototype.setTx = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.rpc.grpc.ResponsePing.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.rpc.grpc.ResponsePing.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.rpc.grpc.ResponsePing} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.rpc.grpc.ResponsePing.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.rpc.grpc.ResponsePing} + */ +proto.tendermint.rpc.grpc.ResponsePing.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.rpc.grpc.ResponsePing; + return proto.tendermint.rpc.grpc.ResponsePing.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.rpc.grpc.ResponsePing} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.rpc.grpc.ResponsePing} + */ +proto.tendermint.rpc.grpc.ResponsePing.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.rpc.grpc.ResponsePing.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.rpc.grpc.ResponsePing.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.rpc.grpc.ResponsePing} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.rpc.grpc.ResponsePing.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.rpc.grpc.ResponseBroadcastTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.rpc.grpc.ResponseBroadcastTx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.toObject = function(includeInstance, msg) { + var f, obj = { + checkTx: (f = msg.getCheckTx()) && tendermint_abci_types_pb.ResponseCheckTx.toObject(includeInstance, f), + deliverTx: (f = msg.getDeliverTx()) && tendermint_abci_types_pb.ResponseDeliverTx.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.rpc.grpc.ResponseBroadcastTx} + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.rpc.grpc.ResponseBroadcastTx; + return proto.tendermint.rpc.grpc.ResponseBroadcastTx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.rpc.grpc.ResponseBroadcastTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.rpc.grpc.ResponseBroadcastTx} + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_abci_types_pb.ResponseCheckTx; + reader.readMessage(value,tendermint_abci_types_pb.ResponseCheckTx.deserializeBinaryFromReader); + msg.setCheckTx(value); + break; + case 2: + var value = new tendermint_abci_types_pb.ResponseDeliverTx; + reader.readMessage(value,tendermint_abci_types_pb.ResponseDeliverTx.deserializeBinaryFromReader); + msg.setDeliverTx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.rpc.grpc.ResponseBroadcastTx.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.rpc.grpc.ResponseBroadcastTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCheckTx(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_abci_types_pb.ResponseCheckTx.serializeBinaryToWriter + ); + } + f = message.getDeliverTx(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_abci_types_pb.ResponseDeliverTx.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.abci.ResponseCheckTx check_tx = 1; + * @return {?proto.tendermint.abci.ResponseCheckTx} + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.prototype.getCheckTx = function() { + return /** @type{?proto.tendermint.abci.ResponseCheckTx} */ ( + jspb.Message.getWrapperField(this, tendermint_abci_types_pb.ResponseCheckTx, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseCheckTx|undefined} value + * @return {!proto.tendermint.rpc.grpc.ResponseBroadcastTx} returns this +*/ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.prototype.setCheckTx = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.rpc.grpc.ResponseBroadcastTx} returns this + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.prototype.clearCheckTx = function() { + return this.setCheckTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.prototype.hasCheckTx = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional tendermint.abci.ResponseDeliverTx deliver_tx = 2; + * @return {?proto.tendermint.abci.ResponseDeliverTx} + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.prototype.getDeliverTx = function() { + return /** @type{?proto.tendermint.abci.ResponseDeliverTx} */ ( + jspb.Message.getWrapperField(this, tendermint_abci_types_pb.ResponseDeliverTx, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseDeliverTx|undefined} value + * @return {!proto.tendermint.rpc.grpc.ResponseBroadcastTx} returns this +*/ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.prototype.setDeliverTx = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.rpc.grpc.ResponseBroadcastTx} returns this + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.prototype.clearDeliverTx = function() { + return this.setDeliverTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.rpc.grpc.ResponseBroadcastTx.prototype.hasDeliverTx = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.tendermint.rpc.grpc); diff --git a/js/proto/tendermint/state/types_grpc_pb.js b/js/proto/tendermint/state/types_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/state/types_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/state/types_pb.d.ts b/js/proto/tendermint/state/types_pb.d.ts new file mode 100644 index 000000000..2c3657c70 --- /dev/null +++ b/js/proto/tendermint/state/types_pb.d.ts @@ -0,0 +1,233 @@ +// package: tendermint.state +// file: tendermint/state/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as tendermint_abci_types_pb from "../../tendermint/abci/types_pb"; +import * as tendermint_types_types_pb from "../../tendermint/types/types_pb"; +import * as tendermint_types_validator_pb from "../../tendermint/types/validator_pb"; +import * as tendermint_types_params_pb from "../../tendermint/types/params_pb"; +import * as tendermint_version_types_pb from "../../tendermint/version/types_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class ABCIResponses extends jspb.Message { + clearDeliverTxsList(): void; + getDeliverTxsList(): Array; + setDeliverTxsList(value: Array): ABCIResponses; + addDeliverTxs(value?: tendermint_abci_types_pb.ResponseDeliverTx, index?: number): tendermint_abci_types_pb.ResponseDeliverTx; + + + hasEndBlock(): boolean; + clearEndBlock(): void; + getEndBlock(): tendermint_abci_types_pb.ResponseEndBlock | undefined; + setEndBlock(value?: tendermint_abci_types_pb.ResponseEndBlock): ABCIResponses; + + + hasBeginBlock(): boolean; + clearBeginBlock(): void; + getBeginBlock(): tendermint_abci_types_pb.ResponseBeginBlock | undefined; + setBeginBlock(value?: tendermint_abci_types_pb.ResponseBeginBlock): ABCIResponses; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ABCIResponses.AsObject; + static toObject(includeInstance: boolean, msg: ABCIResponses): ABCIResponses.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ABCIResponses, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ABCIResponses; + static deserializeBinaryFromReader(message: ABCIResponses, reader: jspb.BinaryReader): ABCIResponses; +} + +export namespace ABCIResponses { + export type AsObject = { + deliverTxsList: Array, + endBlock?: tendermint_abci_types_pb.ResponseEndBlock.AsObject, + beginBlock?: tendermint_abci_types_pb.ResponseBeginBlock.AsObject, + } +} + +export class ValidatorsInfo extends jspb.Message { + + hasValidatorSet(): boolean; + clearValidatorSet(): void; + getValidatorSet(): tendermint_types_validator_pb.ValidatorSet | undefined; + setValidatorSet(value?: tendermint_types_validator_pb.ValidatorSet): ValidatorsInfo; + + getLastHeightChanged(): number; + setLastHeightChanged(value: number): ValidatorsInfo; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidatorsInfo.AsObject; + static toObject(includeInstance: boolean, msg: ValidatorsInfo): ValidatorsInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValidatorsInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidatorsInfo; + static deserializeBinaryFromReader(message: ValidatorsInfo, reader: jspb.BinaryReader): ValidatorsInfo; +} + +export namespace ValidatorsInfo { + export type AsObject = { + validatorSet?: tendermint_types_validator_pb.ValidatorSet.AsObject, + lastHeightChanged: number, + } +} + +export class ConsensusParamsInfo extends jspb.Message { + + hasConsensusParams(): boolean; + clearConsensusParams(): void; + getConsensusParams(): tendermint_types_params_pb.ConsensusParams | undefined; + setConsensusParams(value?: tendermint_types_params_pb.ConsensusParams): ConsensusParamsInfo; + + getLastHeightChanged(): number; + setLastHeightChanged(value: number): ConsensusParamsInfo; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConsensusParamsInfo.AsObject; + static toObject(includeInstance: boolean, msg: ConsensusParamsInfo): ConsensusParamsInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConsensusParamsInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConsensusParamsInfo; + static deserializeBinaryFromReader(message: ConsensusParamsInfo, reader: jspb.BinaryReader): ConsensusParamsInfo; +} + +export namespace ConsensusParamsInfo { + export type AsObject = { + consensusParams?: tendermint_types_params_pb.ConsensusParams.AsObject, + lastHeightChanged: number, + } +} + +export class Version extends jspb.Message { + + hasConsensus(): boolean; + clearConsensus(): void; + getConsensus(): tendermint_version_types_pb.Consensus | undefined; + setConsensus(value?: tendermint_version_types_pb.Consensus): Version; + + getSoftware(): string; + setSoftware(value: string): Version; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Version.AsObject; + static toObject(includeInstance: boolean, msg: Version): Version.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Version, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Version; + static deserializeBinaryFromReader(message: Version, reader: jspb.BinaryReader): Version; +} + +export namespace Version { + export type AsObject = { + consensus?: tendermint_version_types_pb.Consensus.AsObject, + software: string, + } +} + +export class State extends jspb.Message { + + hasVersion(): boolean; + clearVersion(): void; + getVersion(): Version | undefined; + setVersion(value?: Version): State; + + getChainId(): string; + setChainId(value: string): State; + + getInitialHeight(): number; + setInitialHeight(value: number): State; + + getLastBlockHeight(): number; + setLastBlockHeight(value: number): State; + + + hasLastBlockId(): boolean; + clearLastBlockId(): void; + getLastBlockId(): tendermint_types_types_pb.BlockID | undefined; + setLastBlockId(value?: tendermint_types_types_pb.BlockID): State; + + + hasLastBlockTime(): boolean; + clearLastBlockTime(): void; + getLastBlockTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastBlockTime(value?: google_protobuf_timestamp_pb.Timestamp): State; + + + hasNextValidators(): boolean; + clearNextValidators(): void; + getNextValidators(): tendermint_types_validator_pb.ValidatorSet | undefined; + setNextValidators(value?: tendermint_types_validator_pb.ValidatorSet): State; + + + hasValidators(): boolean; + clearValidators(): void; + getValidators(): tendermint_types_validator_pb.ValidatorSet | undefined; + setValidators(value?: tendermint_types_validator_pb.ValidatorSet): State; + + + hasLastValidators(): boolean; + clearLastValidators(): void; + getLastValidators(): tendermint_types_validator_pb.ValidatorSet | undefined; + setLastValidators(value?: tendermint_types_validator_pb.ValidatorSet): State; + + getLastHeightValidatorsChanged(): number; + setLastHeightValidatorsChanged(value: number): State; + + + hasConsensusParams(): boolean; + clearConsensusParams(): void; + getConsensusParams(): tendermint_types_params_pb.ConsensusParams | undefined; + setConsensusParams(value?: tendermint_types_params_pb.ConsensusParams): State; + + getLastHeightConsensusParamsChanged(): number; + setLastHeightConsensusParamsChanged(value: number): State; + + getLastResultsHash(): Uint8Array | string; + getLastResultsHash_asU8(): Uint8Array; + getLastResultsHash_asB64(): string; + setLastResultsHash(value: Uint8Array | string): State; + + getAppHash(): Uint8Array | string; + getAppHash_asU8(): Uint8Array; + getAppHash_asB64(): string; + setAppHash(value: Uint8Array | string): State; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): State.AsObject; + static toObject(includeInstance: boolean, msg: State): State.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: State, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): State; + static deserializeBinaryFromReader(message: State, reader: jspb.BinaryReader): State; +} + +export namespace State { + export type AsObject = { + version?: Version.AsObject, + chainId: string, + initialHeight: number, + lastBlockHeight: number, + lastBlockId?: tendermint_types_types_pb.BlockID.AsObject, + lastBlockTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + nextValidators?: tendermint_types_validator_pb.ValidatorSet.AsObject, + validators?: tendermint_types_validator_pb.ValidatorSet.AsObject, + lastValidators?: tendermint_types_validator_pb.ValidatorSet.AsObject, + lastHeightValidatorsChanged: number, + consensusParams?: tendermint_types_params_pb.ConsensusParams.AsObject, + lastHeightConsensusParamsChanged: number, + lastResultsHash: Uint8Array | string, + appHash: Uint8Array | string, + } +} diff --git a/js/proto/tendermint/state/types_pb.js b/js/proto/tendermint/state/types_pb.js new file mode 100644 index 000000000..7868b2af4 --- /dev/null +++ b/js/proto/tendermint/state/types_pb.js @@ -0,0 +1,1661 @@ +// source: tendermint/state/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var tendermint_abci_types_pb = require('../../tendermint/abci/types_pb.js'); +goog.object.extend(proto, tendermint_abci_types_pb); +var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); +var tendermint_types_validator_pb = require('../../tendermint/types/validator_pb.js'); +goog.object.extend(proto, tendermint_types_validator_pb); +var tendermint_types_params_pb = require('../../tendermint/types/params_pb.js'); +goog.object.extend(proto, tendermint_types_params_pb); +var tendermint_version_types_pb = require('../../tendermint/version/types_pb.js'); +goog.object.extend(proto, tendermint_version_types_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.tendermint.state.ABCIResponses', null, global); +goog.exportSymbol('proto.tendermint.state.ConsensusParamsInfo', null, global); +goog.exportSymbol('proto.tendermint.state.State', null, global); +goog.exportSymbol('proto.tendermint.state.ValidatorsInfo', null, global); +goog.exportSymbol('proto.tendermint.state.Version', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.state.ABCIResponses = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.state.ABCIResponses.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.state.ABCIResponses, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.state.ABCIResponses.displayName = 'proto.tendermint.state.ABCIResponses'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.state.ValidatorsInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.state.ValidatorsInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.state.ValidatorsInfo.displayName = 'proto.tendermint.state.ValidatorsInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.state.ConsensusParamsInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.state.ConsensusParamsInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.state.ConsensusParamsInfo.displayName = 'proto.tendermint.state.ConsensusParamsInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.state.Version = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.state.Version, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.state.Version.displayName = 'proto.tendermint.state.Version'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.state.State = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.state.State, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.state.State.displayName = 'proto.tendermint.state.State'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.state.ABCIResponses.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.state.ABCIResponses.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.state.ABCIResponses.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.state.ABCIResponses} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.state.ABCIResponses.toObject = function(includeInstance, msg) { + var f, obj = { + deliverTxsList: jspb.Message.toObjectList(msg.getDeliverTxsList(), + tendermint_abci_types_pb.ResponseDeliverTx.toObject, includeInstance), + endBlock: (f = msg.getEndBlock()) && tendermint_abci_types_pb.ResponseEndBlock.toObject(includeInstance, f), + beginBlock: (f = msg.getBeginBlock()) && tendermint_abci_types_pb.ResponseBeginBlock.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.state.ABCIResponses} + */ +proto.tendermint.state.ABCIResponses.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.state.ABCIResponses; + return proto.tendermint.state.ABCIResponses.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.state.ABCIResponses} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.state.ABCIResponses} + */ +proto.tendermint.state.ABCIResponses.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_abci_types_pb.ResponseDeliverTx; + reader.readMessage(value,tendermint_abci_types_pb.ResponseDeliverTx.deserializeBinaryFromReader); + msg.addDeliverTxs(value); + break; + case 2: + var value = new tendermint_abci_types_pb.ResponseEndBlock; + reader.readMessage(value,tendermint_abci_types_pb.ResponseEndBlock.deserializeBinaryFromReader); + msg.setEndBlock(value); + break; + case 3: + var value = new tendermint_abci_types_pb.ResponseBeginBlock; + reader.readMessage(value,tendermint_abci_types_pb.ResponseBeginBlock.deserializeBinaryFromReader); + msg.setBeginBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.state.ABCIResponses.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.state.ABCIResponses.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.state.ABCIResponses} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.state.ABCIResponses.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDeliverTxsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + tendermint_abci_types_pb.ResponseDeliverTx.serializeBinaryToWriter + ); + } + f = message.getEndBlock(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_abci_types_pb.ResponseEndBlock.serializeBinaryToWriter + ); + } + f = message.getBeginBlock(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_abci_types_pb.ResponseBeginBlock.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated tendermint.abci.ResponseDeliverTx deliver_txs = 1; + * @return {!Array} + */ +proto.tendermint.state.ABCIResponses.prototype.getDeliverTxsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, tendermint_abci_types_pb.ResponseDeliverTx, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.state.ABCIResponses} returns this +*/ +proto.tendermint.state.ABCIResponses.prototype.setDeliverTxsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.abci.ResponseDeliverTx=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ResponseDeliverTx} + */ +proto.tendermint.state.ABCIResponses.prototype.addDeliverTxs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.abci.ResponseDeliverTx, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.state.ABCIResponses} returns this + */ +proto.tendermint.state.ABCIResponses.prototype.clearDeliverTxsList = function() { + return this.setDeliverTxsList([]); +}; + + +/** + * optional tendermint.abci.ResponseEndBlock end_block = 2; + * @return {?proto.tendermint.abci.ResponseEndBlock} + */ +proto.tendermint.state.ABCIResponses.prototype.getEndBlock = function() { + return /** @type{?proto.tendermint.abci.ResponseEndBlock} */ ( + jspb.Message.getWrapperField(this, tendermint_abci_types_pb.ResponseEndBlock, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseEndBlock|undefined} value + * @return {!proto.tendermint.state.ABCIResponses} returns this +*/ +proto.tendermint.state.ABCIResponses.prototype.setEndBlock = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.state.ABCIResponses} returns this + */ +proto.tendermint.state.ABCIResponses.prototype.clearEndBlock = function() { + return this.setEndBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.state.ABCIResponses.prototype.hasEndBlock = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional tendermint.abci.ResponseBeginBlock begin_block = 3; + * @return {?proto.tendermint.abci.ResponseBeginBlock} + */ +proto.tendermint.state.ABCIResponses.prototype.getBeginBlock = function() { + return /** @type{?proto.tendermint.abci.ResponseBeginBlock} */ ( + jspb.Message.getWrapperField(this, tendermint_abci_types_pb.ResponseBeginBlock, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseBeginBlock|undefined} value + * @return {!proto.tendermint.state.ABCIResponses} returns this +*/ +proto.tendermint.state.ABCIResponses.prototype.setBeginBlock = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.state.ABCIResponses} returns this + */ +proto.tendermint.state.ABCIResponses.prototype.clearBeginBlock = function() { + return this.setBeginBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.state.ABCIResponses.prototype.hasBeginBlock = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.state.ValidatorsInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.state.ValidatorsInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.state.ValidatorsInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.state.ValidatorsInfo.toObject = function(includeInstance, msg) { + var f, obj = { + validatorSet: (f = msg.getValidatorSet()) && tendermint_types_validator_pb.ValidatorSet.toObject(includeInstance, f), + lastHeightChanged: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.state.ValidatorsInfo} + */ +proto.tendermint.state.ValidatorsInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.state.ValidatorsInfo; + return proto.tendermint.state.ValidatorsInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.state.ValidatorsInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.state.ValidatorsInfo} + */ +proto.tendermint.state.ValidatorsInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_validator_pb.ValidatorSet; + reader.readMessage(value,tendermint_types_validator_pb.ValidatorSet.deserializeBinaryFromReader); + msg.setValidatorSet(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastHeightChanged(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.state.ValidatorsInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.state.ValidatorsInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.state.ValidatorsInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.state.ValidatorsInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorSet(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_validator_pb.ValidatorSet.serializeBinaryToWriter + ); + } + f = message.getLastHeightChanged(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional tendermint.types.ValidatorSet validator_set = 1; + * @return {?proto.tendermint.types.ValidatorSet} + */ +proto.tendermint.state.ValidatorsInfo.prototype.getValidatorSet = function() { + return /** @type{?proto.tendermint.types.ValidatorSet} */ ( + jspb.Message.getWrapperField(this, tendermint_types_validator_pb.ValidatorSet, 1)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorSet|undefined} value + * @return {!proto.tendermint.state.ValidatorsInfo} returns this +*/ +proto.tendermint.state.ValidatorsInfo.prototype.setValidatorSet = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.state.ValidatorsInfo} returns this + */ +proto.tendermint.state.ValidatorsInfo.prototype.clearValidatorSet = function() { + return this.setValidatorSet(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.state.ValidatorsInfo.prototype.hasValidatorSet = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 last_height_changed = 2; + * @return {number} + */ +proto.tendermint.state.ValidatorsInfo.prototype.getLastHeightChanged = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.state.ValidatorsInfo} returns this + */ +proto.tendermint.state.ValidatorsInfo.prototype.setLastHeightChanged = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.state.ConsensusParamsInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.state.ConsensusParamsInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.state.ConsensusParamsInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.state.ConsensusParamsInfo.toObject = function(includeInstance, msg) { + var f, obj = { + consensusParams: (f = msg.getConsensusParams()) && tendermint_types_params_pb.ConsensusParams.toObject(includeInstance, f), + lastHeightChanged: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.state.ConsensusParamsInfo} + */ +proto.tendermint.state.ConsensusParamsInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.state.ConsensusParamsInfo; + return proto.tendermint.state.ConsensusParamsInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.state.ConsensusParamsInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.state.ConsensusParamsInfo} + */ +proto.tendermint.state.ConsensusParamsInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_params_pb.ConsensusParams; + reader.readMessage(value,tendermint_types_params_pb.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParams(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastHeightChanged(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.state.ConsensusParamsInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.state.ConsensusParamsInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.state.ConsensusParamsInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.state.ConsensusParamsInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_params_pb.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getLastHeightChanged(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional tendermint.types.ConsensusParams consensus_params = 1; + * @return {?proto.tendermint.types.ConsensusParams} + */ +proto.tendermint.state.ConsensusParamsInfo.prototype.getConsensusParams = function() { + return /** @type{?proto.tendermint.types.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.ConsensusParams, 1)); +}; + + +/** + * @param {?proto.tendermint.types.ConsensusParams|undefined} value + * @return {!proto.tendermint.state.ConsensusParamsInfo} returns this +*/ +proto.tendermint.state.ConsensusParamsInfo.prototype.setConsensusParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.state.ConsensusParamsInfo} returns this + */ +proto.tendermint.state.ConsensusParamsInfo.prototype.clearConsensusParams = function() { + return this.setConsensusParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.state.ConsensusParamsInfo.prototype.hasConsensusParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 last_height_changed = 2; + * @return {number} + */ +proto.tendermint.state.ConsensusParamsInfo.prototype.getLastHeightChanged = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.state.ConsensusParamsInfo} returns this + */ +proto.tendermint.state.ConsensusParamsInfo.prototype.setLastHeightChanged = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.state.Version.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.state.Version.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.state.Version} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.state.Version.toObject = function(includeInstance, msg) { + var f, obj = { + consensus: (f = msg.getConsensus()) && tendermint_version_types_pb.Consensus.toObject(includeInstance, f), + software: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.state.Version} + */ +proto.tendermint.state.Version.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.state.Version; + return proto.tendermint.state.Version.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.state.Version} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.state.Version} + */ +proto.tendermint.state.Version.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_version_types_pb.Consensus; + reader.readMessage(value,tendermint_version_types_pb.Consensus.deserializeBinaryFromReader); + msg.setConsensus(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSoftware(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.state.Version.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.state.Version.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.state.Version} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.state.Version.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensus(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_version_types_pb.Consensus.serializeBinaryToWriter + ); + } + f = message.getSoftware(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional tendermint.version.Consensus consensus = 1; + * @return {?proto.tendermint.version.Consensus} + */ +proto.tendermint.state.Version.prototype.getConsensus = function() { + return /** @type{?proto.tendermint.version.Consensus} */ ( + jspb.Message.getWrapperField(this, tendermint_version_types_pb.Consensus, 1)); +}; + + +/** + * @param {?proto.tendermint.version.Consensus|undefined} value + * @return {!proto.tendermint.state.Version} returns this +*/ +proto.tendermint.state.Version.prototype.setConsensus = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.state.Version} returns this + */ +proto.tendermint.state.Version.prototype.clearConsensus = function() { + return this.setConsensus(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.state.Version.prototype.hasConsensus = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string software = 2; + * @return {string} + */ +proto.tendermint.state.Version.prototype.getSoftware = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.state.Version} returns this + */ +proto.tendermint.state.Version.prototype.setSoftware = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.state.State.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.state.State.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.state.State} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.state.State.toObject = function(includeInstance, msg) { + var f, obj = { + version: (f = msg.getVersion()) && proto.tendermint.state.Version.toObject(includeInstance, f), + chainId: jspb.Message.getFieldWithDefault(msg, 2, ""), + initialHeight: jspb.Message.getFieldWithDefault(msg, 14, 0), + lastBlockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + lastBlockId: (f = msg.getLastBlockId()) && tendermint_types_types_pb.BlockID.toObject(includeInstance, f), + lastBlockTime: (f = msg.getLastBlockTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + nextValidators: (f = msg.getNextValidators()) && tendermint_types_validator_pb.ValidatorSet.toObject(includeInstance, f), + validators: (f = msg.getValidators()) && tendermint_types_validator_pb.ValidatorSet.toObject(includeInstance, f), + lastValidators: (f = msg.getLastValidators()) && tendermint_types_validator_pb.ValidatorSet.toObject(includeInstance, f), + lastHeightValidatorsChanged: jspb.Message.getFieldWithDefault(msg, 9, 0), + consensusParams: (f = msg.getConsensusParams()) && tendermint_types_params_pb.ConsensusParams.toObject(includeInstance, f), + lastHeightConsensusParamsChanged: jspb.Message.getFieldWithDefault(msg, 11, 0), + lastResultsHash: msg.getLastResultsHash_asB64(), + appHash: msg.getAppHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.state.State} + */ +proto.tendermint.state.State.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.state.State; + return proto.tendermint.state.State.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.state.State} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.state.State} + */ +proto.tendermint.state.State.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.state.Version; + reader.readMessage(value,proto.tendermint.state.Version.deserializeBinaryFromReader); + msg.setVersion(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 14: + var value = /** @type {number} */ (reader.readInt64()); + msg.setInitialHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastBlockHeight(value); + break; + case 4: + var value = new tendermint_types_types_pb.BlockID; + reader.readMessage(value,tendermint_types_types_pb.BlockID.deserializeBinaryFromReader); + msg.setLastBlockId(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastBlockTime(value); + break; + case 6: + var value = new tendermint_types_validator_pb.ValidatorSet; + reader.readMessage(value,tendermint_types_validator_pb.ValidatorSet.deserializeBinaryFromReader); + msg.setNextValidators(value); + break; + case 7: + var value = new tendermint_types_validator_pb.ValidatorSet; + reader.readMessage(value,tendermint_types_validator_pb.ValidatorSet.deserializeBinaryFromReader); + msg.setValidators(value); + break; + case 8: + var value = new tendermint_types_validator_pb.ValidatorSet; + reader.readMessage(value,tendermint_types_validator_pb.ValidatorSet.deserializeBinaryFromReader); + msg.setLastValidators(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastHeightValidatorsChanged(value); + break; + case 10: + var value = new tendermint_types_params_pb.ConsensusParams; + reader.readMessage(value,tendermint_types_params_pb.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParams(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastHeightConsensusParamsChanged(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastResultsHash(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.state.State.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.state.State.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.state.State} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.state.State.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.state.Version.serializeBinaryToWriter + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getInitialHeight(); + if (f !== 0) { + writer.writeInt64( + 14, + f + ); + } + f = message.getLastBlockHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getLastBlockId(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_types_types_pb.BlockID.serializeBinaryToWriter + ); + } + f = message.getLastBlockTime(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getNextValidators(); + if (f != null) { + writer.writeMessage( + 6, + f, + tendermint_types_validator_pb.ValidatorSet.serializeBinaryToWriter + ); + } + f = message.getValidators(); + if (f != null) { + writer.writeMessage( + 7, + f, + tendermint_types_validator_pb.ValidatorSet.serializeBinaryToWriter + ); + } + f = message.getLastValidators(); + if (f != null) { + writer.writeMessage( + 8, + f, + tendermint_types_validator_pb.ValidatorSet.serializeBinaryToWriter + ); + } + f = message.getLastHeightValidatorsChanged(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getConsensusParams(); + if (f != null) { + writer.writeMessage( + 10, + f, + tendermint_types_params_pb.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getLastHeightConsensusParamsChanged(); + if (f !== 0) { + writer.writeInt64( + 11, + f + ); + } + f = message.getLastResultsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 12, + f + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 13, + f + ); + } +}; + + +/** + * optional Version version = 1; + * @return {?proto.tendermint.state.Version} + */ +proto.tendermint.state.State.prototype.getVersion = function() { + return /** @type{?proto.tendermint.state.Version} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.state.Version, 1)); +}; + + +/** + * @param {?proto.tendermint.state.Version|undefined} value + * @return {!proto.tendermint.state.State} returns this +*/ +proto.tendermint.state.State.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.state.State.prototype.hasVersion = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string chain_id = 2; + * @return {string} + */ +proto.tendermint.state.State.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 initial_height = 14; + * @return {number} + */ +proto.tendermint.state.State.prototype.getInitialHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.setInitialHeight = function(value) { + return jspb.Message.setProto3IntField(this, 14, value); +}; + + +/** + * optional int64 last_block_height = 3; + * @return {number} + */ +proto.tendermint.state.State.prototype.getLastBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.setLastBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional tendermint.types.BlockID last_block_id = 4; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.state.State.prototype.getLastBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.BlockID, 4)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.state.State} returns this +*/ +proto.tendermint.state.State.prototype.setLastBlockId = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.clearLastBlockId = function() { + return this.setLastBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.state.State.prototype.hasLastBlockId = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Timestamp last_block_time = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.state.State.prototype.getLastBlockTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.state.State} returns this +*/ +proto.tendermint.state.State.prototype.setLastBlockTime = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.clearLastBlockTime = function() { + return this.setLastBlockTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.state.State.prototype.hasLastBlockTime = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional tendermint.types.ValidatorSet next_validators = 6; + * @return {?proto.tendermint.types.ValidatorSet} + */ +proto.tendermint.state.State.prototype.getNextValidators = function() { + return /** @type{?proto.tendermint.types.ValidatorSet} */ ( + jspb.Message.getWrapperField(this, tendermint_types_validator_pb.ValidatorSet, 6)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorSet|undefined} value + * @return {!proto.tendermint.state.State} returns this +*/ +proto.tendermint.state.State.prototype.setNextValidators = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.clearNextValidators = function() { + return this.setNextValidators(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.state.State.prototype.hasNextValidators = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional tendermint.types.ValidatorSet validators = 7; + * @return {?proto.tendermint.types.ValidatorSet} + */ +proto.tendermint.state.State.prototype.getValidators = function() { + return /** @type{?proto.tendermint.types.ValidatorSet} */ ( + jspb.Message.getWrapperField(this, tendermint_types_validator_pb.ValidatorSet, 7)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorSet|undefined} value + * @return {!proto.tendermint.state.State} returns this +*/ +proto.tendermint.state.State.prototype.setValidators = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.clearValidators = function() { + return this.setValidators(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.state.State.prototype.hasValidators = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional tendermint.types.ValidatorSet last_validators = 8; + * @return {?proto.tendermint.types.ValidatorSet} + */ +proto.tendermint.state.State.prototype.getLastValidators = function() { + return /** @type{?proto.tendermint.types.ValidatorSet} */ ( + jspb.Message.getWrapperField(this, tendermint_types_validator_pb.ValidatorSet, 8)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorSet|undefined} value + * @return {!proto.tendermint.state.State} returns this +*/ +proto.tendermint.state.State.prototype.setLastValidators = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.clearLastValidators = function() { + return this.setLastValidators(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.state.State.prototype.hasLastValidators = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional int64 last_height_validators_changed = 9; + * @return {number} + */ +proto.tendermint.state.State.prototype.getLastHeightValidatorsChanged = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.setLastHeightValidatorsChanged = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional tendermint.types.ConsensusParams consensus_params = 10; + * @return {?proto.tendermint.types.ConsensusParams} + */ +proto.tendermint.state.State.prototype.getConsensusParams = function() { + return /** @type{?proto.tendermint.types.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.ConsensusParams, 10)); +}; + + +/** + * @param {?proto.tendermint.types.ConsensusParams|undefined} value + * @return {!proto.tendermint.state.State} returns this +*/ +proto.tendermint.state.State.prototype.setConsensusParams = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.clearConsensusParams = function() { + return this.setConsensusParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.state.State.prototype.hasConsensusParams = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional int64 last_height_consensus_params_changed = 11; + * @return {number} + */ +proto.tendermint.state.State.prototype.getLastHeightConsensusParamsChanged = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.setLastHeightConsensusParamsChanged = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional bytes last_results_hash = 12; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.state.State.prototype.getLastResultsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes last_results_hash = 12; + * This is a type-conversion wrapper around `getLastResultsHash()` + * @return {string} + */ +proto.tendermint.state.State.prototype.getLastResultsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastResultsHash())); +}; + + +/** + * optional bytes last_results_hash = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastResultsHash()` + * @return {!Uint8Array} + */ +proto.tendermint.state.State.prototype.getLastResultsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastResultsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.setLastResultsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 12, value); +}; + + +/** + * optional bytes app_hash = 13; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.state.State.prototype.getAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes app_hash = 13; + * This is a type-conversion wrapper around `getAppHash()` + * @return {string} + */ +proto.tendermint.state.State.prototype.getAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppHash())); +}; + + +/** + * optional bytes app_hash = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppHash()` + * @return {!Uint8Array} + */ +proto.tendermint.state.State.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.state.State} returns this + */ +proto.tendermint.state.State.prototype.setAppHash = function(value) { + return jspb.Message.setProto3BytesField(this, 13, value); +}; + + +goog.object.extend(exports, proto.tendermint.state); diff --git a/js/proto/tendermint/statesync/types_grpc_pb.js b/js/proto/tendermint/statesync/types_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/statesync/types_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/statesync/types_pb.d.ts b/js/proto/tendermint/statesync/types_pb.d.ts new file mode 100644 index 000000000..089fd9602 --- /dev/null +++ b/js/proto/tendermint/statesync/types_pb.d.ts @@ -0,0 +1,194 @@ +// package: tendermint.statesync +// file: tendermint/statesync/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Message extends jspb.Message { + + hasSnapshotsRequest(): boolean; + clearSnapshotsRequest(): void; + getSnapshotsRequest(): SnapshotsRequest | undefined; + setSnapshotsRequest(value?: SnapshotsRequest): Message; + + + hasSnapshotsResponse(): boolean; + clearSnapshotsResponse(): void; + getSnapshotsResponse(): SnapshotsResponse | undefined; + setSnapshotsResponse(value?: SnapshotsResponse): Message; + + + hasChunkRequest(): boolean; + clearChunkRequest(): void; + getChunkRequest(): ChunkRequest | undefined; + setChunkRequest(value?: ChunkRequest): Message; + + + hasChunkResponse(): boolean; + clearChunkResponse(): void; + getChunkResponse(): ChunkResponse | undefined; + setChunkResponse(value?: ChunkResponse): Message; + + + getSumCase(): Message.SumCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Message.AsObject; + static toObject(includeInstance: boolean, msg: Message): Message.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Message, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Message; + static deserializeBinaryFromReader(message: Message, reader: jspb.BinaryReader): Message; +} + +export namespace Message { + export type AsObject = { + snapshotsRequest?: SnapshotsRequest.AsObject, + snapshotsResponse?: SnapshotsResponse.AsObject, + chunkRequest?: ChunkRequest.AsObject, + chunkResponse?: ChunkResponse.AsObject, + } + + export enum SumCase { + SUM_NOT_SET = 0, + + SNAPSHOTS_REQUEST = 1, + + SNAPSHOTS_RESPONSE = 2, + + CHUNK_REQUEST = 3, + + CHUNK_RESPONSE = 4, + + } + +} + +export class SnapshotsRequest extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SnapshotsRequest.AsObject; + static toObject(includeInstance: boolean, msg: SnapshotsRequest): SnapshotsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SnapshotsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SnapshotsRequest; + static deserializeBinaryFromReader(message: SnapshotsRequest, reader: jspb.BinaryReader): SnapshotsRequest; +} + +export namespace SnapshotsRequest { + export type AsObject = { + } +} + +export class SnapshotsResponse extends jspb.Message { + getHeight(): number; + setHeight(value: number): SnapshotsResponse; + + getFormat(): number; + setFormat(value: number): SnapshotsResponse; + + getChunks(): number; + setChunks(value: number): SnapshotsResponse; + + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): SnapshotsResponse; + + getMetadata(): Uint8Array | string; + getMetadata_asU8(): Uint8Array; + getMetadata_asB64(): string; + setMetadata(value: Uint8Array | string): SnapshotsResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SnapshotsResponse.AsObject; + static toObject(includeInstance: boolean, msg: SnapshotsResponse): SnapshotsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SnapshotsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SnapshotsResponse; + static deserializeBinaryFromReader(message: SnapshotsResponse, reader: jspb.BinaryReader): SnapshotsResponse; +} + +export namespace SnapshotsResponse { + export type AsObject = { + height: number, + format: number, + chunks: number, + hash: Uint8Array | string, + metadata: Uint8Array | string, + } +} + +export class ChunkRequest extends jspb.Message { + getHeight(): number; + setHeight(value: number): ChunkRequest; + + getFormat(): number; + setFormat(value: number): ChunkRequest; + + getIndex(): number; + setIndex(value: number): ChunkRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChunkRequest.AsObject; + static toObject(includeInstance: boolean, msg: ChunkRequest): ChunkRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChunkRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChunkRequest; + static deserializeBinaryFromReader(message: ChunkRequest, reader: jspb.BinaryReader): ChunkRequest; +} + +export namespace ChunkRequest { + export type AsObject = { + height: number, + format: number, + index: number, + } +} + +export class ChunkResponse extends jspb.Message { + getHeight(): number; + setHeight(value: number): ChunkResponse; + + getFormat(): number; + setFormat(value: number): ChunkResponse; + + getIndex(): number; + setIndex(value: number): ChunkResponse; + + getChunk(): Uint8Array | string; + getChunk_asU8(): Uint8Array; + getChunk_asB64(): string; + setChunk(value: Uint8Array | string): ChunkResponse; + + getMissing(): boolean; + setMissing(value: boolean): ChunkResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChunkResponse.AsObject; + static toObject(includeInstance: boolean, msg: ChunkResponse): ChunkResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChunkResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChunkResponse; + static deserializeBinaryFromReader(message: ChunkResponse, reader: jspb.BinaryReader): ChunkResponse; +} + +export namespace ChunkResponse { + export type AsObject = { + height: number, + format: number, + index: number, + chunk: Uint8Array | string, + missing: boolean, + } +} diff --git a/js/proto/tendermint/statesync/types_pb.js b/js/proto/tendermint/statesync/types_pb.js new file mode 100644 index 000000000..10db6b29e --- /dev/null +++ b/js/proto/tendermint/statesync/types_pb.js @@ -0,0 +1,1323 @@ +// source: tendermint/statesync/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.tendermint.statesync.ChunkRequest', null, global); +goog.exportSymbol('proto.tendermint.statesync.ChunkResponse', null, global); +goog.exportSymbol('proto.tendermint.statesync.Message', null, global); +goog.exportSymbol('proto.tendermint.statesync.Message.SumCase', null, global); +goog.exportSymbol('proto.tendermint.statesync.SnapshotsRequest', null, global); +goog.exportSymbol('proto.tendermint.statesync.SnapshotsResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.statesync.Message = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.statesync.Message.oneofGroups_); +}; +goog.inherits(proto.tendermint.statesync.Message, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.statesync.Message.displayName = 'proto.tendermint.statesync.Message'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.statesync.SnapshotsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.statesync.SnapshotsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.statesync.SnapshotsRequest.displayName = 'proto.tendermint.statesync.SnapshotsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.statesync.SnapshotsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.statesync.SnapshotsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.statesync.SnapshotsResponse.displayName = 'proto.tendermint.statesync.SnapshotsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.statesync.ChunkRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.statesync.ChunkRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.statesync.ChunkRequest.displayName = 'proto.tendermint.statesync.ChunkRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.statesync.ChunkResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.statesync.ChunkResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.statesync.ChunkResponse.displayName = 'proto.tendermint.statesync.ChunkResponse'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.statesync.Message.oneofGroups_ = [[1,2,3,4]]; + +/** + * @enum {number} + */ +proto.tendermint.statesync.Message.SumCase = { + SUM_NOT_SET: 0, + SNAPSHOTS_REQUEST: 1, + SNAPSHOTS_RESPONSE: 2, + CHUNK_REQUEST: 3, + CHUNK_RESPONSE: 4 +}; + +/** + * @return {proto.tendermint.statesync.Message.SumCase} + */ +proto.tendermint.statesync.Message.prototype.getSumCase = function() { + return /** @type {proto.tendermint.statesync.Message.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.statesync.Message.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.statesync.Message.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.statesync.Message.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.statesync.Message} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.statesync.Message.toObject = function(includeInstance, msg) { + var f, obj = { + snapshotsRequest: (f = msg.getSnapshotsRequest()) && proto.tendermint.statesync.SnapshotsRequest.toObject(includeInstance, f), + snapshotsResponse: (f = msg.getSnapshotsResponse()) && proto.tendermint.statesync.SnapshotsResponse.toObject(includeInstance, f), + chunkRequest: (f = msg.getChunkRequest()) && proto.tendermint.statesync.ChunkRequest.toObject(includeInstance, f), + chunkResponse: (f = msg.getChunkResponse()) && proto.tendermint.statesync.ChunkResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.statesync.Message} + */ +proto.tendermint.statesync.Message.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.statesync.Message; + return proto.tendermint.statesync.Message.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.statesync.Message} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.statesync.Message} + */ +proto.tendermint.statesync.Message.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.statesync.SnapshotsRequest; + reader.readMessage(value,proto.tendermint.statesync.SnapshotsRequest.deserializeBinaryFromReader); + msg.setSnapshotsRequest(value); + break; + case 2: + var value = new proto.tendermint.statesync.SnapshotsResponse; + reader.readMessage(value,proto.tendermint.statesync.SnapshotsResponse.deserializeBinaryFromReader); + msg.setSnapshotsResponse(value); + break; + case 3: + var value = new proto.tendermint.statesync.ChunkRequest; + reader.readMessage(value,proto.tendermint.statesync.ChunkRequest.deserializeBinaryFromReader); + msg.setChunkRequest(value); + break; + case 4: + var value = new proto.tendermint.statesync.ChunkResponse; + reader.readMessage(value,proto.tendermint.statesync.ChunkResponse.deserializeBinaryFromReader); + msg.setChunkResponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.statesync.Message.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.statesync.Message.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.statesync.Message} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.statesync.Message.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSnapshotsRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.statesync.SnapshotsRequest.serializeBinaryToWriter + ); + } + f = message.getSnapshotsResponse(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.statesync.SnapshotsResponse.serializeBinaryToWriter + ); + } + f = message.getChunkRequest(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.statesync.ChunkRequest.serializeBinaryToWriter + ); + } + f = message.getChunkResponse(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.statesync.ChunkResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SnapshotsRequest snapshots_request = 1; + * @return {?proto.tendermint.statesync.SnapshotsRequest} + */ +proto.tendermint.statesync.Message.prototype.getSnapshotsRequest = function() { + return /** @type{?proto.tendermint.statesync.SnapshotsRequest} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.statesync.SnapshotsRequest, 1)); +}; + + +/** + * @param {?proto.tendermint.statesync.SnapshotsRequest|undefined} value + * @return {!proto.tendermint.statesync.Message} returns this +*/ +proto.tendermint.statesync.Message.prototype.setSnapshotsRequest = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.statesync.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.statesync.Message} returns this + */ +proto.tendermint.statesync.Message.prototype.clearSnapshotsRequest = function() { + return this.setSnapshotsRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.statesync.Message.prototype.hasSnapshotsRequest = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional SnapshotsResponse snapshots_response = 2; + * @return {?proto.tendermint.statesync.SnapshotsResponse} + */ +proto.tendermint.statesync.Message.prototype.getSnapshotsResponse = function() { + return /** @type{?proto.tendermint.statesync.SnapshotsResponse} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.statesync.SnapshotsResponse, 2)); +}; + + +/** + * @param {?proto.tendermint.statesync.SnapshotsResponse|undefined} value + * @return {!proto.tendermint.statesync.Message} returns this +*/ +proto.tendermint.statesync.Message.prototype.setSnapshotsResponse = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.statesync.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.statesync.Message} returns this + */ +proto.tendermint.statesync.Message.prototype.clearSnapshotsResponse = function() { + return this.setSnapshotsResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.statesync.Message.prototype.hasSnapshotsResponse = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ChunkRequest chunk_request = 3; + * @return {?proto.tendermint.statesync.ChunkRequest} + */ +proto.tendermint.statesync.Message.prototype.getChunkRequest = function() { + return /** @type{?proto.tendermint.statesync.ChunkRequest} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.statesync.ChunkRequest, 3)); +}; + + +/** + * @param {?proto.tendermint.statesync.ChunkRequest|undefined} value + * @return {!proto.tendermint.statesync.Message} returns this +*/ +proto.tendermint.statesync.Message.prototype.setChunkRequest = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.tendermint.statesync.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.statesync.Message} returns this + */ +proto.tendermint.statesync.Message.prototype.clearChunkRequest = function() { + return this.setChunkRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.statesync.Message.prototype.hasChunkRequest = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ChunkResponse chunk_response = 4; + * @return {?proto.tendermint.statesync.ChunkResponse} + */ +proto.tendermint.statesync.Message.prototype.getChunkResponse = function() { + return /** @type{?proto.tendermint.statesync.ChunkResponse} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.statesync.ChunkResponse, 4)); +}; + + +/** + * @param {?proto.tendermint.statesync.ChunkResponse|undefined} value + * @return {!proto.tendermint.statesync.Message} returns this +*/ +proto.tendermint.statesync.Message.prototype.setChunkResponse = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.tendermint.statesync.Message.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.statesync.Message} returns this + */ +proto.tendermint.statesync.Message.prototype.clearChunkResponse = function() { + return this.setChunkResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.statesync.Message.prototype.hasChunkResponse = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.statesync.SnapshotsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.statesync.SnapshotsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.statesync.SnapshotsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.statesync.SnapshotsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.statesync.SnapshotsRequest} + */ +proto.tendermint.statesync.SnapshotsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.statesync.SnapshotsRequest; + return proto.tendermint.statesync.SnapshotsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.statesync.SnapshotsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.statesync.SnapshotsRequest} + */ +proto.tendermint.statesync.SnapshotsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.statesync.SnapshotsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.statesync.SnapshotsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.statesync.SnapshotsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.statesync.SnapshotsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.statesync.SnapshotsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.statesync.SnapshotsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.statesync.SnapshotsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + format: jspb.Message.getFieldWithDefault(msg, 2, 0), + chunks: jspb.Message.getFieldWithDefault(msg, 3, 0), + hash: msg.getHash_asB64(), + metadata: msg.getMetadata_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.statesync.SnapshotsResponse} + */ +proto.tendermint.statesync.SnapshotsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.statesync.SnapshotsResponse; + return proto.tendermint.statesync.SnapshotsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.statesync.SnapshotsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.statesync.SnapshotsResponse} + */ +proto.tendermint.statesync.SnapshotsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFormat(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChunks(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.statesync.SnapshotsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.statesync.SnapshotsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.statesync.SnapshotsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getFormat(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getChunks(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getMetadata_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.statesync.SnapshotsResponse} returns this + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 format = 2; + * @return {number} + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.getFormat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.statesync.SnapshotsResponse} returns this + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.setFormat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 chunks = 3; + * @return {number} + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.getChunks = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.statesync.SnapshotsResponse} returns this + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.setChunks = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes hash = 4; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.statesync.SnapshotsResponse} returns this + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes metadata = 5; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.getMetadata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes metadata = 5; + * This is a type-conversion wrapper around `getMetadata()` + * @return {string} + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.getMetadata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMetadata())); +}; + + +/** + * optional bytes metadata = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMetadata()` + * @return {!Uint8Array} + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.getMetadata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMetadata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.statesync.SnapshotsResponse} returns this + */ +proto.tendermint.statesync.SnapshotsResponse.prototype.setMetadata = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.statesync.ChunkRequest.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.statesync.ChunkRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.statesync.ChunkRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.statesync.ChunkRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + format: jspb.Message.getFieldWithDefault(msg, 2, 0), + index: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.statesync.ChunkRequest} + */ +proto.tendermint.statesync.ChunkRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.statesync.ChunkRequest; + return proto.tendermint.statesync.ChunkRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.statesync.ChunkRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.statesync.ChunkRequest} + */ +proto.tendermint.statesync.ChunkRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFormat(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setIndex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.statesync.ChunkRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.statesync.ChunkRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.statesync.ChunkRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.statesync.ChunkRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getFormat(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.tendermint.statesync.ChunkRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.statesync.ChunkRequest} returns this + */ +proto.tendermint.statesync.ChunkRequest.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 format = 2; + * @return {number} + */ +proto.tendermint.statesync.ChunkRequest.prototype.getFormat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.statesync.ChunkRequest} returns this + */ +proto.tendermint.statesync.ChunkRequest.prototype.setFormat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 index = 3; + * @return {number} + */ +proto.tendermint.statesync.ChunkRequest.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.statesync.ChunkRequest} returns this + */ +proto.tendermint.statesync.ChunkRequest.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.statesync.ChunkResponse.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.statesync.ChunkResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.statesync.ChunkResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.statesync.ChunkResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + format: jspb.Message.getFieldWithDefault(msg, 2, 0), + index: jspb.Message.getFieldWithDefault(msg, 3, 0), + chunk: msg.getChunk_asB64(), + missing: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.statesync.ChunkResponse} + */ +proto.tendermint.statesync.ChunkResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.statesync.ChunkResponse; + return proto.tendermint.statesync.ChunkResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.statesync.ChunkResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.statesync.ChunkResponse} + */ +proto.tendermint.statesync.ChunkResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFormat(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setIndex(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChunk(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMissing(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.statesync.ChunkResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.statesync.ChunkResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.statesync.ChunkResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.statesync.ChunkResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getFormat(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getChunk_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getMissing(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.tendermint.statesync.ChunkResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.statesync.ChunkResponse} returns this + */ +proto.tendermint.statesync.ChunkResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 format = 2; + * @return {number} + */ +proto.tendermint.statesync.ChunkResponse.prototype.getFormat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.statesync.ChunkResponse} returns this + */ +proto.tendermint.statesync.ChunkResponse.prototype.setFormat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 index = 3; + * @return {number} + */ +proto.tendermint.statesync.ChunkResponse.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.statesync.ChunkResponse} returns this + */ +proto.tendermint.statesync.ChunkResponse.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes chunk = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.statesync.ChunkResponse.prototype.getChunk = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes chunk = 4; + * This is a type-conversion wrapper around `getChunk()` + * @return {string} + */ +proto.tendermint.statesync.ChunkResponse.prototype.getChunk_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChunk())); +}; + + +/** + * optional bytes chunk = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChunk()` + * @return {!Uint8Array} + */ +proto.tendermint.statesync.ChunkResponse.prototype.getChunk_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChunk())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.statesync.ChunkResponse} returns this + */ +proto.tendermint.statesync.ChunkResponse.prototype.setChunk = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bool missing = 5; + * @return {boolean} + */ +proto.tendermint.statesync.ChunkResponse.prototype.getMissing = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.tendermint.statesync.ChunkResponse} returns this + */ +proto.tendermint.statesync.ChunkResponse.prototype.setMissing = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +goog.object.extend(exports, proto.tendermint.statesync); diff --git a/js/proto/tendermint/store/types_grpc_pb.js b/js/proto/tendermint/store/types_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/store/types_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/store/types_pb.d.ts b/js/proto/tendermint/store/types_pb.d.ts new file mode 100644 index 000000000..67e4e249a --- /dev/null +++ b/js/proto/tendermint/store/types_pb.d.ts @@ -0,0 +1,32 @@ +// package: tendermint.store +// file: tendermint/store/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class BlockStoreState extends jspb.Message { + getBase(): number; + setBase(value: number): BlockStoreState; + + getHeight(): number; + setHeight(value: number): BlockStoreState; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockStoreState.AsObject; + static toObject(includeInstance: boolean, msg: BlockStoreState): BlockStoreState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockStoreState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockStoreState; + static deserializeBinaryFromReader(message: BlockStoreState, reader: jspb.BinaryReader): BlockStoreState; +} + +export namespace BlockStoreState { + export type AsObject = { + base: number, + height: number, + } +} diff --git a/js/proto/tendermint/store/types_pb.js b/js/proto/tendermint/store/types_pb.js new file mode 100644 index 000000000..efc0dd653 --- /dev/null +++ b/js/proto/tendermint/store/types_pb.js @@ -0,0 +1,199 @@ +// source: tendermint/store/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.tendermint.store.BlockStoreState', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.store.BlockStoreState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.store.BlockStoreState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.store.BlockStoreState.displayName = 'proto.tendermint.store.BlockStoreState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.store.BlockStoreState.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.store.BlockStoreState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.store.BlockStoreState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.store.BlockStoreState.toObject = function(includeInstance, msg) { + var f, obj = { + base: jspb.Message.getFieldWithDefault(msg, 1, 0), + height: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.store.BlockStoreState} + */ +proto.tendermint.store.BlockStoreState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.store.BlockStoreState; + return proto.tendermint.store.BlockStoreState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.store.BlockStoreState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.store.BlockStoreState} + */ +proto.tendermint.store.BlockStoreState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBase(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.store.BlockStoreState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.store.BlockStoreState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.store.BlockStoreState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.store.BlockStoreState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBase(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 base = 1; + * @return {number} + */ +proto.tendermint.store.BlockStoreState.prototype.getBase = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.store.BlockStoreState} returns this + */ +proto.tendermint.store.BlockStoreState.prototype.setBase = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.tendermint.store.BlockStoreState.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.store.BlockStoreState} returns this + */ +proto.tendermint.store.BlockStoreState.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.store); diff --git a/js/proto/tendermint/types/block_grpc_pb.js b/js/proto/tendermint/types/block_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/types/block_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/types/block_pb.d.ts b/js/proto/tendermint/types/block_pb.d.ts new file mode 100644 index 000000000..ceb01ae55 --- /dev/null +++ b/js/proto/tendermint/types/block_pb.d.ts @@ -0,0 +1,55 @@ +// package: tendermint.types +// file: tendermint/types/block.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as tendermint_types_types_pb from "../../tendermint/types/types_pb"; +import * as tendermint_types_evidence_pb from "../../tendermint/types/evidence_pb"; + +export class Block extends jspb.Message { + + hasHeader(): boolean; + clearHeader(): void; + getHeader(): tendermint_types_types_pb.Header | undefined; + setHeader(value?: tendermint_types_types_pb.Header): Block; + + + hasData(): boolean; + clearData(): void; + getData(): tendermint_types_types_pb.Data | undefined; + setData(value?: tendermint_types_types_pb.Data): Block; + + + hasEvidence(): boolean; + clearEvidence(): void; + getEvidence(): tendermint_types_evidence_pb.EvidenceList | undefined; + setEvidence(value?: tendermint_types_evidence_pb.EvidenceList): Block; + + + hasLastCommit(): boolean; + clearLastCommit(): void; + getLastCommit(): tendermint_types_types_pb.Commit | undefined; + setLastCommit(value?: tendermint_types_types_pb.Commit): Block; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Block.AsObject; + static toObject(includeInstance: boolean, msg: Block): Block.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Block, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Block; + static deserializeBinaryFromReader(message: Block, reader: jspb.BinaryReader): Block; +} + +export namespace Block { + export type AsObject = { + header?: tendermint_types_types_pb.Header.AsObject, + data?: tendermint_types_types_pb.Data.AsObject, + evidence?: tendermint_types_evidence_pb.EvidenceList.AsObject, + lastCommit?: tendermint_types_types_pb.Commit.AsObject, + } +} diff --git a/js/proto/tendermint/types/block_pb.js b/js/proto/tendermint/types/block_pb.js new file mode 100644 index 000000000..97f477eb7 --- /dev/null +++ b/js/proto/tendermint/types/block_pb.js @@ -0,0 +1,349 @@ +// source: tendermint/types/block.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); +var tendermint_types_evidence_pb = require('../../tendermint/types/evidence_pb.js'); +goog.object.extend(proto, tendermint_types_evidence_pb); +goog.exportSymbol('proto.tendermint.types.Block', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.Block = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Block, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Block.displayName = 'proto.tendermint.types.Block'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.Block.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Block.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.Block} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Block.toObject = function(includeInstance, msg) { + var f, obj = { + header: (f = msg.getHeader()) && tendermint_types_types_pb.Header.toObject(includeInstance, f), + data: (f = msg.getData()) && tendermint_types_types_pb.Data.toObject(includeInstance, f), + evidence: (f = msg.getEvidence()) && tendermint_types_evidence_pb.EvidenceList.toObject(includeInstance, f), + lastCommit: (f = msg.getLastCommit()) && tendermint_types_types_pb.Commit.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.Block} + */ +proto.tendermint.types.Block.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Block; + return proto.tendermint.types.Block.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Block} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Block} + */ +proto.tendermint.types.Block.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Header; + reader.readMessage(value,tendermint_types_types_pb.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 2: + var value = new tendermint_types_types_pb.Data; + reader.readMessage(value,tendermint_types_types_pb.Data.deserializeBinaryFromReader); + msg.setData(value); + break; + case 3: + var value = new tendermint_types_evidence_pb.EvidenceList; + reader.readMessage(value,tendermint_types_evidence_pb.EvidenceList.deserializeBinaryFromReader); + msg.setEvidence(value); + break; + case 4: + var value = new tendermint_types_types_pb.Commit; + reader.readMessage(value,tendermint_types_types_pb.Commit.deserializeBinaryFromReader); + msg.setLastCommit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Block.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Block.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.Block} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Block.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Header.serializeBinaryToWriter + ); + } + f = message.getData(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_types_pb.Data.serializeBinaryToWriter + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_types_evidence_pb.EvidenceList.serializeBinaryToWriter + ); + } + f = message.getLastCommit(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_types_types_pb.Commit.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Header header = 1; + * @return {?proto.tendermint.types.Header} + */ +proto.tendermint.types.Block.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Header, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.tendermint.types.Block} returns this +*/ +proto.tendermint.types.Block.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Block} returns this + */ +proto.tendermint.types.Block.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Block.prototype.hasHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Data data = 2; + * @return {?proto.tendermint.types.Data} + */ +proto.tendermint.types.Block.prototype.getData = function() { + return /** @type{?proto.tendermint.types.Data} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Data, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Data|undefined} value + * @return {!proto.tendermint.types.Block} returns this +*/ +proto.tendermint.types.Block.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Block} returns this + */ +proto.tendermint.types.Block.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Block.prototype.hasData = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional EvidenceList evidence = 3; + * @return {?proto.tendermint.types.EvidenceList} + */ +proto.tendermint.types.Block.prototype.getEvidence = function() { + return /** @type{?proto.tendermint.types.EvidenceList} */ ( + jspb.Message.getWrapperField(this, tendermint_types_evidence_pb.EvidenceList, 3)); +}; + + +/** + * @param {?proto.tendermint.types.EvidenceList|undefined} value + * @return {!proto.tendermint.types.Block} returns this +*/ +proto.tendermint.types.Block.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Block} returns this + */ +proto.tendermint.types.Block.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Block.prototype.hasEvidence = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Commit last_commit = 4; + * @return {?proto.tendermint.types.Commit} + */ +proto.tendermint.types.Block.prototype.getLastCommit = function() { + return /** @type{?proto.tendermint.types.Commit} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Commit, 4)); +}; + + +/** + * @param {?proto.tendermint.types.Commit|undefined} value + * @return {!proto.tendermint.types.Block} returns this +*/ +proto.tendermint.types.Block.prototype.setLastCommit = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Block} returns this + */ +proto.tendermint.types.Block.prototype.clearLastCommit = function() { + return this.setLastCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Block.prototype.hasLastCommit = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/js/proto/tendermint/types/canonical_grpc_pb.js b/js/proto/tendermint/types/canonical_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/types/canonical_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/types/canonical_pb.d.ts b/js/proto/tendermint/types/canonical_pb.d.ts new file mode 100644 index 000000000..550878405 --- /dev/null +++ b/js/proto/tendermint/types/canonical_pb.d.ts @@ -0,0 +1,165 @@ +// package: tendermint.types +// file: tendermint/types/canonical.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as tendermint_types_types_pb from "../../tendermint/types/types_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class CanonicalBlockID extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): CanonicalBlockID; + + + hasPartSetHeader(): boolean; + clearPartSetHeader(): void; + getPartSetHeader(): CanonicalPartSetHeader | undefined; + setPartSetHeader(value?: CanonicalPartSetHeader): CanonicalBlockID; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CanonicalBlockID.AsObject; + static toObject(includeInstance: boolean, msg: CanonicalBlockID): CanonicalBlockID.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CanonicalBlockID, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CanonicalBlockID; + static deserializeBinaryFromReader(message: CanonicalBlockID, reader: jspb.BinaryReader): CanonicalBlockID; +} + +export namespace CanonicalBlockID { + export type AsObject = { + hash: Uint8Array | string, + partSetHeader?: CanonicalPartSetHeader.AsObject, + } +} + +export class CanonicalPartSetHeader extends jspb.Message { + getTotal(): number; + setTotal(value: number): CanonicalPartSetHeader; + + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): CanonicalPartSetHeader; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CanonicalPartSetHeader.AsObject; + static toObject(includeInstance: boolean, msg: CanonicalPartSetHeader): CanonicalPartSetHeader.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CanonicalPartSetHeader, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CanonicalPartSetHeader; + static deserializeBinaryFromReader(message: CanonicalPartSetHeader, reader: jspb.BinaryReader): CanonicalPartSetHeader; +} + +export namespace CanonicalPartSetHeader { + export type AsObject = { + total: number, + hash: Uint8Array | string, + } +} + +export class CanonicalProposal extends jspb.Message { + getType(): tendermint_types_types_pb.SignedMsgType; + setType(value: tendermint_types_types_pb.SignedMsgType): CanonicalProposal; + + getHeight(): number; + setHeight(value: number): CanonicalProposal; + + getRound(): number; + setRound(value: number): CanonicalProposal; + + getPolRound(): number; + setPolRound(value: number): CanonicalProposal; + + + hasBlockId(): boolean; + clearBlockId(): void; + getBlockId(): CanonicalBlockID | undefined; + setBlockId(value?: CanonicalBlockID): CanonicalProposal; + + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): CanonicalProposal; + + getChainId(): string; + setChainId(value: string): CanonicalProposal; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CanonicalProposal.AsObject; + static toObject(includeInstance: boolean, msg: CanonicalProposal): CanonicalProposal.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CanonicalProposal, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CanonicalProposal; + static deserializeBinaryFromReader(message: CanonicalProposal, reader: jspb.BinaryReader): CanonicalProposal; +} + +export namespace CanonicalProposal { + export type AsObject = { + type: tendermint_types_types_pb.SignedMsgType, + height: number, + round: number, + polRound: number, + blockId?: CanonicalBlockID.AsObject, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + chainId: string, + } +} + +export class CanonicalVote extends jspb.Message { + getType(): tendermint_types_types_pb.SignedMsgType; + setType(value: tendermint_types_types_pb.SignedMsgType): CanonicalVote; + + getHeight(): number; + setHeight(value: number): CanonicalVote; + + getRound(): number; + setRound(value: number): CanonicalVote; + + + hasBlockId(): boolean; + clearBlockId(): void; + getBlockId(): CanonicalBlockID | undefined; + setBlockId(value?: CanonicalBlockID): CanonicalVote; + + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): CanonicalVote; + + getChainId(): string; + setChainId(value: string): CanonicalVote; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CanonicalVote.AsObject; + static toObject(includeInstance: boolean, msg: CanonicalVote): CanonicalVote.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CanonicalVote, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CanonicalVote; + static deserializeBinaryFromReader(message: CanonicalVote, reader: jspb.BinaryReader): CanonicalVote; +} + +export namespace CanonicalVote { + export type AsObject = { + type: tendermint_types_types_pb.SignedMsgType, + height: number, + round: number, + blockId?: CanonicalBlockID.AsObject, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + chainId: string, + } +} diff --git a/js/proto/tendermint/types/canonical_pb.js b/js/proto/tendermint/types/canonical_pb.js new file mode 100644 index 000000000..8d5d6a708 --- /dev/null +++ b/js/proto/tendermint/types/canonical_pb.js @@ -0,0 +1,1174 @@ +// source: tendermint/types/canonical.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.tendermint.types.CanonicalBlockID', null, global); +goog.exportSymbol('proto.tendermint.types.CanonicalPartSetHeader', null, global); +goog.exportSymbol('proto.tendermint.types.CanonicalProposal', null, global); +goog.exportSymbol('proto.tendermint.types.CanonicalVote', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.CanonicalBlockID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.CanonicalBlockID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.CanonicalBlockID.displayName = 'proto.tendermint.types.CanonicalBlockID'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.CanonicalPartSetHeader = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.CanonicalPartSetHeader, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.CanonicalPartSetHeader.displayName = 'proto.tendermint.types.CanonicalPartSetHeader'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.CanonicalProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.CanonicalProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.CanonicalProposal.displayName = 'proto.tendermint.types.CanonicalProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.CanonicalVote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.CanonicalVote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.CanonicalVote.displayName = 'proto.tendermint.types.CanonicalVote'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.CanonicalBlockID.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.CanonicalBlockID.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.CanonicalBlockID} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CanonicalBlockID.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_asB64(), + partSetHeader: (f = msg.getPartSetHeader()) && proto.tendermint.types.CanonicalPartSetHeader.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.CanonicalBlockID} + */ +proto.tendermint.types.CanonicalBlockID.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.CanonicalBlockID; + return proto.tendermint.types.CanonicalBlockID.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.CanonicalBlockID} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.CanonicalBlockID} + */ +proto.tendermint.types.CanonicalBlockID.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 2: + var value = new proto.tendermint.types.CanonicalPartSetHeader; + reader.readMessage(value,proto.tendermint.types.CanonicalPartSetHeader.deserializeBinaryFromReader); + msg.setPartSetHeader(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.CanonicalBlockID.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.CanonicalBlockID.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.CanonicalBlockID} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CanonicalBlockID.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPartSetHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.CanonicalPartSetHeader.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.CanonicalBlockID.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes hash = 1; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.tendermint.types.CanonicalBlockID.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.CanonicalBlockID.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.CanonicalBlockID} returns this + */ +proto.tendermint.types.CanonicalBlockID.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional CanonicalPartSetHeader part_set_header = 2; + * @return {?proto.tendermint.types.CanonicalPartSetHeader} + */ +proto.tendermint.types.CanonicalBlockID.prototype.getPartSetHeader = function() { + return /** @type{?proto.tendermint.types.CanonicalPartSetHeader} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.CanonicalPartSetHeader, 2)); +}; + + +/** + * @param {?proto.tendermint.types.CanonicalPartSetHeader|undefined} value + * @return {!proto.tendermint.types.CanonicalBlockID} returns this +*/ +proto.tendermint.types.CanonicalBlockID.prototype.setPartSetHeader = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.CanonicalBlockID} returns this + */ +proto.tendermint.types.CanonicalBlockID.prototype.clearPartSetHeader = function() { + return this.setPartSetHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.CanonicalBlockID.prototype.hasPartSetHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.CanonicalPartSetHeader.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.CanonicalPartSetHeader.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.CanonicalPartSetHeader} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CanonicalPartSetHeader.toObject = function(includeInstance, msg) { + var f, obj = { + total: jspb.Message.getFieldWithDefault(msg, 1, 0), + hash: msg.getHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.CanonicalPartSetHeader} + */ +proto.tendermint.types.CanonicalPartSetHeader.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.CanonicalPartSetHeader; + return proto.tendermint.types.CanonicalPartSetHeader.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.CanonicalPartSetHeader} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.CanonicalPartSetHeader} + */ +proto.tendermint.types.CanonicalPartSetHeader.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTotal(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.CanonicalPartSetHeader.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.CanonicalPartSetHeader.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.CanonicalPartSetHeader} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CanonicalPartSetHeader.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotal(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional uint32 total = 1; + * @return {number} + */ +proto.tendermint.types.CanonicalPartSetHeader.prototype.getTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.CanonicalPartSetHeader} returns this + */ +proto.tendermint.types.CanonicalPartSetHeader.prototype.setTotal = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.CanonicalPartSetHeader.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes hash = 2; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.tendermint.types.CanonicalPartSetHeader.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.CanonicalPartSetHeader.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.CanonicalPartSetHeader} returns this + */ +proto.tendermint.types.CanonicalPartSetHeader.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.CanonicalProposal.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.CanonicalProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.CanonicalProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CanonicalProposal.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + round: jspb.Message.getFieldWithDefault(msg, 3, 0), + polRound: jspb.Message.getFieldWithDefault(msg, 4, 0), + blockId: (f = msg.getBlockId()) && proto.tendermint.types.CanonicalBlockID.toObject(includeInstance, f), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + chainId: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.CanonicalProposal} + */ +proto.tendermint.types.CanonicalProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.CanonicalProposal; + return proto.tendermint.types.CanonicalProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.CanonicalProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.CanonicalProposal} + */ +proto.tendermint.types.CanonicalProposal.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.tendermint.types.SignedMsgType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setRound(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPolRound(value); + break; + case 5: + var value = new proto.tendermint.types.CanonicalBlockID; + reader.readMessage(value,proto.tendermint.types.CanonicalBlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.CanonicalProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.CanonicalProposal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.CanonicalProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CanonicalProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeSfixed64( + 2, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeSfixed64( + 3, + f + ); + } + f = message.getPolRound(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.types.CanonicalBlockID.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional SignedMsgType type = 1; + * @return {!proto.tendermint.types.SignedMsgType} + */ +proto.tendermint.types.CanonicalProposal.prototype.getType = function() { + return /** @type {!proto.tendermint.types.SignedMsgType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.types.SignedMsgType} value + * @return {!proto.tendermint.types.CanonicalProposal} returns this + */ +proto.tendermint.types.CanonicalProposal.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional sfixed64 height = 2; + * @return {number} + */ +proto.tendermint.types.CanonicalProposal.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.CanonicalProposal} returns this + */ +proto.tendermint.types.CanonicalProposal.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional sfixed64 round = 3; + * @return {number} + */ +proto.tendermint.types.CanonicalProposal.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.CanonicalProposal} returns this + */ +proto.tendermint.types.CanonicalProposal.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 pol_round = 4; + * @return {number} + */ +proto.tendermint.types.CanonicalProposal.prototype.getPolRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.CanonicalProposal} returns this + */ +proto.tendermint.types.CanonicalProposal.prototype.setPolRound = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional CanonicalBlockID block_id = 5; + * @return {?proto.tendermint.types.CanonicalBlockID} + */ +proto.tendermint.types.CanonicalProposal.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.CanonicalBlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.CanonicalBlockID, 5)); +}; + + +/** + * @param {?proto.tendermint.types.CanonicalBlockID|undefined} value + * @return {!proto.tendermint.types.CanonicalProposal} returns this +*/ +proto.tendermint.types.CanonicalProposal.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.CanonicalProposal} returns this + */ +proto.tendermint.types.CanonicalProposal.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.CanonicalProposal.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.CanonicalProposal.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.types.CanonicalProposal} returns this +*/ +proto.tendermint.types.CanonicalProposal.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.CanonicalProposal} returns this + */ +proto.tendermint.types.CanonicalProposal.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.CanonicalProposal.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string chain_id = 7; + * @return {string} + */ +proto.tendermint.types.CanonicalProposal.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.types.CanonicalProposal} returns this + */ +proto.tendermint.types.CanonicalProposal.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.CanonicalVote.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.CanonicalVote.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.CanonicalVote} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CanonicalVote.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + round: jspb.Message.getFieldWithDefault(msg, 3, 0), + blockId: (f = msg.getBlockId()) && proto.tendermint.types.CanonicalBlockID.toObject(includeInstance, f), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + chainId: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.CanonicalVote} + */ +proto.tendermint.types.CanonicalVote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.CanonicalVote; + return proto.tendermint.types.CanonicalVote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.CanonicalVote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.CanonicalVote} + */ +proto.tendermint.types.CanonicalVote.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.tendermint.types.SignedMsgType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setRound(value); + break; + case 4: + var value = new proto.tendermint.types.CanonicalBlockID; + reader.readMessage(value,proto.tendermint.types.CanonicalBlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.CanonicalVote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.CanonicalVote.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.CanonicalVote} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CanonicalVote.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeSfixed64( + 2, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeSfixed64( + 3, + f + ); + } + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.types.CanonicalBlockID.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional SignedMsgType type = 1; + * @return {!proto.tendermint.types.SignedMsgType} + */ +proto.tendermint.types.CanonicalVote.prototype.getType = function() { + return /** @type {!proto.tendermint.types.SignedMsgType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.types.SignedMsgType} value + * @return {!proto.tendermint.types.CanonicalVote} returns this + */ +proto.tendermint.types.CanonicalVote.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional sfixed64 height = 2; + * @return {number} + */ +proto.tendermint.types.CanonicalVote.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.CanonicalVote} returns this + */ +proto.tendermint.types.CanonicalVote.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional sfixed64 round = 3; + * @return {number} + */ +proto.tendermint.types.CanonicalVote.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.CanonicalVote} returns this + */ +proto.tendermint.types.CanonicalVote.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional CanonicalBlockID block_id = 4; + * @return {?proto.tendermint.types.CanonicalBlockID} + */ +proto.tendermint.types.CanonicalVote.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.CanonicalBlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.CanonicalBlockID, 4)); +}; + + +/** + * @param {?proto.tendermint.types.CanonicalBlockID|undefined} value + * @return {!proto.tendermint.types.CanonicalVote} returns this +*/ +proto.tendermint.types.CanonicalVote.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.CanonicalVote} returns this + */ +proto.tendermint.types.CanonicalVote.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.CanonicalVote.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.CanonicalVote.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.types.CanonicalVote} returns this +*/ +proto.tendermint.types.CanonicalVote.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.CanonicalVote} returns this + */ +proto.tendermint.types.CanonicalVote.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.CanonicalVote.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string chain_id = 6; + * @return {string} + */ +proto.tendermint.types.CanonicalVote.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.types.CanonicalVote} returns this + */ +proto.tendermint.types.CanonicalVote.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/js/proto/tendermint/types/events_grpc_pb.js b/js/proto/tendermint/types/events_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/types/events_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/types/events_pb.d.ts b/js/proto/tendermint/types/events_pb.d.ts new file mode 100644 index 000000000..cd516b0d5 --- /dev/null +++ b/js/proto/tendermint/types/events_pb.d.ts @@ -0,0 +1,36 @@ +// package: tendermint.types +// file: tendermint/types/events.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class EventDataRoundState extends jspb.Message { + getHeight(): number; + setHeight(value: number): EventDataRoundState; + + getRound(): number; + setRound(value: number): EventDataRoundState; + + getStep(): string; + setStep(value: string): EventDataRoundState; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EventDataRoundState.AsObject; + static toObject(includeInstance: boolean, msg: EventDataRoundState): EventDataRoundState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EventDataRoundState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventDataRoundState; + static deserializeBinaryFromReader(message: EventDataRoundState, reader: jspb.BinaryReader): EventDataRoundState; +} + +export namespace EventDataRoundState { + export type AsObject = { + height: number, + round: number, + step: string, + } +} diff --git a/js/proto/tendermint/types/events_pb.js b/js/proto/tendermint/types/events_pb.js new file mode 100644 index 000000000..59bdd691f --- /dev/null +++ b/js/proto/tendermint/types/events_pb.js @@ -0,0 +1,229 @@ +// source: tendermint/types/events.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.tendermint.types.EventDataRoundState', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.EventDataRoundState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.EventDataRoundState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.EventDataRoundState.displayName = 'proto.tendermint.types.EventDataRoundState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.EventDataRoundState.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.EventDataRoundState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.EventDataRoundState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EventDataRoundState.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + round: jspb.Message.getFieldWithDefault(msg, 2, 0), + step: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.EventDataRoundState} + */ +proto.tendermint.types.EventDataRoundState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.EventDataRoundState; + return proto.tendermint.types.EventDataRoundState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.EventDataRoundState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.EventDataRoundState} + */ +proto.tendermint.types.EventDataRoundState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setStep(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.EventDataRoundState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.EventDataRoundState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.EventDataRoundState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EventDataRoundState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getStep(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.types.EventDataRoundState.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.EventDataRoundState} returns this + */ +proto.tendermint.types.EventDataRoundState.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.tendermint.types.EventDataRoundState.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.EventDataRoundState} returns this + */ +proto.tendermint.types.EventDataRoundState.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string step = 3; + * @return {string} + */ +proto.tendermint.types.EventDataRoundState.prototype.getStep = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.types.EventDataRoundState} returns this + */ +proto.tendermint.types.EventDataRoundState.prototype.setStep = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/js/proto/tendermint/types/evidence_grpc_pb.js b/js/proto/tendermint/types/evidence_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/types/evidence_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/types/evidence_pb.d.ts b/js/proto/tendermint/types/evidence_pb.d.ts new file mode 100644 index 000000000..2579a4603 --- /dev/null +++ b/js/proto/tendermint/types/evidence_pb.d.ts @@ -0,0 +1,168 @@ +// package: tendermint.types +// file: tendermint/types/evidence.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as tendermint_types_types_pb from "../../tendermint/types/types_pb"; +import * as tendermint_types_validator_pb from "../../tendermint/types/validator_pb"; + +export class Evidence extends jspb.Message { + + hasDuplicateVoteEvidence(): boolean; + clearDuplicateVoteEvidence(): void; + getDuplicateVoteEvidence(): DuplicateVoteEvidence | undefined; + setDuplicateVoteEvidence(value?: DuplicateVoteEvidence): Evidence; + + + hasLightClientAttackEvidence(): boolean; + clearLightClientAttackEvidence(): void; + getLightClientAttackEvidence(): LightClientAttackEvidence | undefined; + setLightClientAttackEvidence(value?: LightClientAttackEvidence): Evidence; + + + getSumCase(): Evidence.SumCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Evidence.AsObject; + static toObject(includeInstance: boolean, msg: Evidence): Evidence.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Evidence, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Evidence; + static deserializeBinaryFromReader(message: Evidence, reader: jspb.BinaryReader): Evidence; +} + +export namespace Evidence { + export type AsObject = { + duplicateVoteEvidence?: DuplicateVoteEvidence.AsObject, + lightClientAttackEvidence?: LightClientAttackEvidence.AsObject, + } + + export enum SumCase { + SUM_NOT_SET = 0, + + DUPLICATE_VOTE_EVIDENCE = 1, + + LIGHT_CLIENT_ATTACK_EVIDENCE = 2, + + } + +} + +export class DuplicateVoteEvidence extends jspb.Message { + + hasVoteA(): boolean; + clearVoteA(): void; + getVoteA(): tendermint_types_types_pb.Vote | undefined; + setVoteA(value?: tendermint_types_types_pb.Vote): DuplicateVoteEvidence; + + + hasVoteB(): boolean; + clearVoteB(): void; + getVoteB(): tendermint_types_types_pb.Vote | undefined; + setVoteB(value?: tendermint_types_types_pb.Vote): DuplicateVoteEvidence; + + getTotalVotingPower(): number; + setTotalVotingPower(value: number): DuplicateVoteEvidence; + + getValidatorPower(): number; + setValidatorPower(value: number): DuplicateVoteEvidence; + + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): DuplicateVoteEvidence; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DuplicateVoteEvidence.AsObject; + static toObject(includeInstance: boolean, msg: DuplicateVoteEvidence): DuplicateVoteEvidence.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DuplicateVoteEvidence, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DuplicateVoteEvidence; + static deserializeBinaryFromReader(message: DuplicateVoteEvidence, reader: jspb.BinaryReader): DuplicateVoteEvidence; +} + +export namespace DuplicateVoteEvidence { + export type AsObject = { + voteA?: tendermint_types_types_pb.Vote.AsObject, + voteB?: tendermint_types_types_pb.Vote.AsObject, + totalVotingPower: number, + validatorPower: number, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class LightClientAttackEvidence extends jspb.Message { + + hasConflictingBlock(): boolean; + clearConflictingBlock(): void; + getConflictingBlock(): tendermint_types_types_pb.LightBlock | undefined; + setConflictingBlock(value?: tendermint_types_types_pb.LightBlock): LightClientAttackEvidence; + + getCommonHeight(): number; + setCommonHeight(value: number): LightClientAttackEvidence; + + clearByzantineValidatorsList(): void; + getByzantineValidatorsList(): Array; + setByzantineValidatorsList(value: Array): LightClientAttackEvidence; + addByzantineValidators(value?: tendermint_types_validator_pb.Validator, index?: number): tendermint_types_validator_pb.Validator; + + getTotalVotingPower(): number; + setTotalVotingPower(value: number): LightClientAttackEvidence; + + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): LightClientAttackEvidence; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LightClientAttackEvidence.AsObject; + static toObject(includeInstance: boolean, msg: LightClientAttackEvidence): LightClientAttackEvidence.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LightClientAttackEvidence, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LightClientAttackEvidence; + static deserializeBinaryFromReader(message: LightClientAttackEvidence, reader: jspb.BinaryReader): LightClientAttackEvidence; +} + +export namespace LightClientAttackEvidence { + export type AsObject = { + conflictingBlock?: tendermint_types_types_pb.LightBlock.AsObject, + commonHeight: number, + byzantineValidatorsList: Array, + totalVotingPower: number, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class EvidenceList extends jspb.Message { + clearEvidenceList(): void; + getEvidenceList(): Array; + setEvidenceList(value: Array): EvidenceList; + addEvidence(value?: Evidence, index?: number): Evidence; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EvidenceList.AsObject; + static toObject(includeInstance: boolean, msg: EvidenceList): EvidenceList.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EvidenceList, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EvidenceList; + static deserializeBinaryFromReader(message: EvidenceList, reader: jspb.BinaryReader): EvidenceList; +} + +export namespace EvidenceList { + export type AsObject = { + evidenceList: Array, + } +} diff --git a/js/proto/tendermint/types/evidence_pb.js b/js/proto/tendermint/types/evidence_pb.js new file mode 100644 index 000000000..8455dc943 --- /dev/null +++ b/js/proto/tendermint/types/evidence_pb.js @@ -0,0 +1,1137 @@ +// source: tendermint/types/evidence.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); +var tendermint_types_validator_pb = require('../../tendermint/types/validator_pb.js'); +goog.object.extend(proto, tendermint_types_validator_pb); +goog.exportSymbol('proto.tendermint.types.DuplicateVoteEvidence', null, global); +goog.exportSymbol('proto.tendermint.types.Evidence', null, global); +goog.exportSymbol('proto.tendermint.types.Evidence.SumCase', null, global); +goog.exportSymbol('proto.tendermint.types.EvidenceList', null, global); +goog.exportSymbol('proto.tendermint.types.LightClientAttackEvidence', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.Evidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.types.Evidence.oneofGroups_); +}; +goog.inherits(proto.tendermint.types.Evidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Evidence.displayName = 'proto.tendermint.types.Evidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.DuplicateVoteEvidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.DuplicateVoteEvidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.DuplicateVoteEvidence.displayName = 'proto.tendermint.types.DuplicateVoteEvidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.LightClientAttackEvidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.LightClientAttackEvidence.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.LightClientAttackEvidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.LightClientAttackEvidence.displayName = 'proto.tendermint.types.LightClientAttackEvidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.EvidenceList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.EvidenceList.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.EvidenceList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.EvidenceList.displayName = 'proto.tendermint.types.EvidenceList'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.tendermint.types.Evidence.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.tendermint.types.Evidence.SumCase = { + SUM_NOT_SET: 0, + DUPLICATE_VOTE_EVIDENCE: 1, + LIGHT_CLIENT_ATTACK_EVIDENCE: 2 +}; + +/** + * @return {proto.tendermint.types.Evidence.SumCase} + */ +proto.tendermint.types.Evidence.prototype.getSumCase = function() { + return /** @type {proto.tendermint.types.Evidence.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.types.Evidence.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.Evidence.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Evidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.Evidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Evidence.toObject = function(includeInstance, msg) { + var f, obj = { + duplicateVoteEvidence: (f = msg.getDuplicateVoteEvidence()) && proto.tendermint.types.DuplicateVoteEvidence.toObject(includeInstance, f), + lightClientAttackEvidence: (f = msg.getLightClientAttackEvidence()) && proto.tendermint.types.LightClientAttackEvidence.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.Evidence} + */ +proto.tendermint.types.Evidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Evidence; + return proto.tendermint.types.Evidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Evidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Evidence} + */ +proto.tendermint.types.Evidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.DuplicateVoteEvidence; + reader.readMessage(value,proto.tendermint.types.DuplicateVoteEvidence.deserializeBinaryFromReader); + msg.setDuplicateVoteEvidence(value); + break; + case 2: + var value = new proto.tendermint.types.LightClientAttackEvidence; + reader.readMessage(value,proto.tendermint.types.LightClientAttackEvidence.deserializeBinaryFromReader); + msg.setLightClientAttackEvidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Evidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Evidence.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.Evidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Evidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDuplicateVoteEvidence(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.DuplicateVoteEvidence.serializeBinaryToWriter + ); + } + f = message.getLightClientAttackEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.LightClientAttackEvidence.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DuplicateVoteEvidence duplicate_vote_evidence = 1; + * @return {?proto.tendermint.types.DuplicateVoteEvidence} + */ +proto.tendermint.types.Evidence.prototype.getDuplicateVoteEvidence = function() { + return /** @type{?proto.tendermint.types.DuplicateVoteEvidence} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.DuplicateVoteEvidence, 1)); +}; + + +/** + * @param {?proto.tendermint.types.DuplicateVoteEvidence|undefined} value + * @return {!proto.tendermint.types.Evidence} returns this +*/ +proto.tendermint.types.Evidence.prototype.setDuplicateVoteEvidence = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.types.Evidence.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Evidence} returns this + */ +proto.tendermint.types.Evidence.prototype.clearDuplicateVoteEvidence = function() { + return this.setDuplicateVoteEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Evidence.prototype.hasDuplicateVoteEvidence = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional LightClientAttackEvidence light_client_attack_evidence = 2; + * @return {?proto.tendermint.types.LightClientAttackEvidence} + */ +proto.tendermint.types.Evidence.prototype.getLightClientAttackEvidence = function() { + return /** @type{?proto.tendermint.types.LightClientAttackEvidence} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.LightClientAttackEvidence, 2)); +}; + + +/** + * @param {?proto.tendermint.types.LightClientAttackEvidence|undefined} value + * @return {!proto.tendermint.types.Evidence} returns this +*/ +proto.tendermint.types.Evidence.prototype.setLightClientAttackEvidence = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.types.Evidence.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Evidence} returns this + */ +proto.tendermint.types.Evidence.prototype.clearLightClientAttackEvidence = function() { + return this.setLightClientAttackEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Evidence.prototype.hasLightClientAttackEvidence = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.DuplicateVoteEvidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.DuplicateVoteEvidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.DuplicateVoteEvidence.toObject = function(includeInstance, msg) { + var f, obj = { + voteA: (f = msg.getVoteA()) && tendermint_types_types_pb.Vote.toObject(includeInstance, f), + voteB: (f = msg.getVoteB()) && tendermint_types_types_pb.Vote.toObject(includeInstance, f), + totalVotingPower: jspb.Message.getFieldWithDefault(msg, 3, 0), + validatorPower: jspb.Message.getFieldWithDefault(msg, 4, 0), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} + */ +proto.tendermint.types.DuplicateVoteEvidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.DuplicateVoteEvidence; + return proto.tendermint.types.DuplicateVoteEvidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.DuplicateVoteEvidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} + */ +proto.tendermint.types.DuplicateVoteEvidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Vote; + reader.readMessage(value,tendermint_types_types_pb.Vote.deserializeBinaryFromReader); + msg.setVoteA(value); + break; + case 2: + var value = new tendermint_types_types_pb.Vote; + reader.readMessage(value,tendermint_types_types_pb.Vote.deserializeBinaryFromReader); + msg.setVoteB(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValidatorPower(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.DuplicateVoteEvidence.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.DuplicateVoteEvidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.DuplicateVoteEvidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVoteA(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getVoteB(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_types_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getValidatorPower(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Vote vote_a = 1; + * @return {?proto.tendermint.types.Vote} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getVoteA = function() { + return /** @type{?proto.tendermint.types.Vote} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Vote, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Vote|undefined} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this +*/ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setVoteA = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.clearVoteA = function() { + return this.setVoteA(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.hasVoteA = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Vote vote_b = 2; + * @return {?proto.tendermint.types.Vote} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getVoteB = function() { + return /** @type{?proto.tendermint.types.Vote} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Vote, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Vote|undefined} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this +*/ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setVoteB = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.clearVoteB = function() { + return this.setVoteB(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.hasVoteB = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 total_voting_power = 3; + * @return {number} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setTotalVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 validator_power = 4; + * @return {number} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getValidatorPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setValidatorPower = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this +*/ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.LightClientAttackEvidence.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.LightClientAttackEvidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.LightClientAttackEvidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.LightClientAttackEvidence.toObject = function(includeInstance, msg) { + var f, obj = { + conflictingBlock: (f = msg.getConflictingBlock()) && tendermint_types_types_pb.LightBlock.toObject(includeInstance, f), + commonHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + byzantineValidatorsList: jspb.Message.toObjectList(msg.getByzantineValidatorsList(), + tendermint_types_validator_pb.Validator.toObject, includeInstance), + totalVotingPower: jspb.Message.getFieldWithDefault(msg, 4, 0), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.LightClientAttackEvidence} + */ +proto.tendermint.types.LightClientAttackEvidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.LightClientAttackEvidence; + return proto.tendermint.types.LightClientAttackEvidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.LightClientAttackEvidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.LightClientAttackEvidence} + */ +proto.tendermint.types.LightClientAttackEvidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.LightBlock; + reader.readMessage(value,tendermint_types_types_pb.LightBlock.deserializeBinaryFromReader); + msg.setConflictingBlock(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCommonHeight(value); + break; + case 3: + var value = new tendermint_types_validator_pb.Validator; + reader.readMessage(value,tendermint_types_validator_pb.Validator.deserializeBinaryFromReader); + msg.addByzantineValidators(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.LightClientAttackEvidence.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.LightClientAttackEvidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.LightClientAttackEvidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConflictingBlock(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.LightBlock.serializeBinaryToWriter + ); + } + f = message.getCommonHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getByzantineValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + tendermint_types_validator_pb.Validator.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional LightBlock conflicting_block = 1; + * @return {?proto.tendermint.types.LightBlock} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getConflictingBlock = function() { + return /** @type{?proto.tendermint.types.LightBlock} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.LightBlock, 1)); +}; + + +/** + * @param {?proto.tendermint.types.LightBlock|undefined} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this +*/ +proto.tendermint.types.LightClientAttackEvidence.prototype.setConflictingBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.clearConflictingBlock = function() { + return this.setConflictingBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.hasConflictingBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 common_height = 2; + * @return {number} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getCommonHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.setCommonHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated Validator byzantine_validators = 3; + * @return {!Array} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getByzantineValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, tendermint_types_validator_pb.Validator, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this +*/ +proto.tendermint.types.LightClientAttackEvidence.prototype.setByzantineValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.tendermint.types.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Validator} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.addByzantineValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tendermint.types.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.clearByzantineValidatorsList = function() { + return this.setByzantineValidatorsList([]); +}; + + +/** + * optional int64 total_voting_power = 4; + * @return {number} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.setTotalVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this +*/ +proto.tendermint.types.LightClientAttackEvidence.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.EvidenceList.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.EvidenceList.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.EvidenceList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.EvidenceList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EvidenceList.toObject = function(includeInstance, msg) { + var f, obj = { + evidenceList: jspb.Message.toObjectList(msg.getEvidenceList(), + proto.tendermint.types.Evidence.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.EvidenceList} + */ +proto.tendermint.types.EvidenceList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.EvidenceList; + return proto.tendermint.types.EvidenceList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.EvidenceList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.EvidenceList} + */ +proto.tendermint.types.EvidenceList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.Evidence; + reader.readMessage(value,proto.tendermint.types.Evidence.deserializeBinaryFromReader); + msg.addEvidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.EvidenceList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.EvidenceList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.EvidenceList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EvidenceList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvidenceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.types.Evidence.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Evidence evidence = 1; + * @return {!Array} + */ +proto.tendermint.types.EvidenceList.prototype.getEvidenceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.types.Evidence, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.EvidenceList} returns this +*/ +proto.tendermint.types.EvidenceList.prototype.setEvidenceList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.types.Evidence=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Evidence} + */ +proto.tendermint.types.EvidenceList.prototype.addEvidence = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.types.Evidence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.EvidenceList} returns this + */ +proto.tendermint.types.EvidenceList.prototype.clearEvidenceList = function() { + return this.setEvidenceList([]); +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/js/proto/tendermint/types/params_grpc_pb.js b/js/proto/tendermint/types/params_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/types/params_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/types/params_pb.d.ts b/js/proto/tendermint/types/params_pb.d.ts new file mode 100644 index 000000000..a36d5a879 --- /dev/null +++ b/js/proto/tendermint/types/params_pb.d.ts @@ -0,0 +1,184 @@ +// package: tendermint.types +// file: tendermint/types/params.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; + +export class ConsensusParams extends jspb.Message { + + hasBlock(): boolean; + clearBlock(): void; + getBlock(): BlockParams | undefined; + setBlock(value?: BlockParams): ConsensusParams; + + + hasEvidence(): boolean; + clearEvidence(): void; + getEvidence(): EvidenceParams | undefined; + setEvidence(value?: EvidenceParams): ConsensusParams; + + + hasValidator(): boolean; + clearValidator(): void; + getValidator(): ValidatorParams | undefined; + setValidator(value?: ValidatorParams): ConsensusParams; + + + hasVersion(): boolean; + clearVersion(): void; + getVersion(): VersionParams | undefined; + setVersion(value?: VersionParams): ConsensusParams; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConsensusParams.AsObject; + static toObject(includeInstance: boolean, msg: ConsensusParams): ConsensusParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConsensusParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConsensusParams; + static deserializeBinaryFromReader(message: ConsensusParams, reader: jspb.BinaryReader): ConsensusParams; +} + +export namespace ConsensusParams { + export type AsObject = { + block?: BlockParams.AsObject, + evidence?: EvidenceParams.AsObject, + validator?: ValidatorParams.AsObject, + version?: VersionParams.AsObject, + } +} + +export class BlockParams extends jspb.Message { + getMaxBytes(): number; + setMaxBytes(value: number): BlockParams; + + getMaxGas(): number; + setMaxGas(value: number): BlockParams; + + getTimeIotaMs(): number; + setTimeIotaMs(value: number): BlockParams; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockParams.AsObject; + static toObject(includeInstance: boolean, msg: BlockParams): BlockParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockParams; + static deserializeBinaryFromReader(message: BlockParams, reader: jspb.BinaryReader): BlockParams; +} + +export namespace BlockParams { + export type AsObject = { + maxBytes: number, + maxGas: number, + timeIotaMs: number, + } +} + +export class EvidenceParams extends jspb.Message { + getMaxAgeNumBlocks(): number; + setMaxAgeNumBlocks(value: number): EvidenceParams; + + + hasMaxAgeDuration(): boolean; + clearMaxAgeDuration(): void; + getMaxAgeDuration(): google_protobuf_duration_pb.Duration | undefined; + setMaxAgeDuration(value?: google_protobuf_duration_pb.Duration): EvidenceParams; + + getMaxBytes(): number; + setMaxBytes(value: number): EvidenceParams; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EvidenceParams.AsObject; + static toObject(includeInstance: boolean, msg: EvidenceParams): EvidenceParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EvidenceParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EvidenceParams; + static deserializeBinaryFromReader(message: EvidenceParams, reader: jspb.BinaryReader): EvidenceParams; +} + +export namespace EvidenceParams { + export type AsObject = { + maxAgeNumBlocks: number, + maxAgeDuration?: google_protobuf_duration_pb.Duration.AsObject, + maxBytes: number, + } +} + +export class ValidatorParams extends jspb.Message { + clearPubKeyTypesList(): void; + getPubKeyTypesList(): Array; + setPubKeyTypesList(value: Array): ValidatorParams; + addPubKeyTypes(value: string, index?: number): string; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidatorParams.AsObject; + static toObject(includeInstance: boolean, msg: ValidatorParams): ValidatorParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValidatorParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidatorParams; + static deserializeBinaryFromReader(message: ValidatorParams, reader: jspb.BinaryReader): ValidatorParams; +} + +export namespace ValidatorParams { + export type AsObject = { + pubKeyTypesList: Array, + } +} + +export class VersionParams extends jspb.Message { + getAppVersion(): number; + setAppVersion(value: number): VersionParams; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VersionParams.AsObject; + static toObject(includeInstance: boolean, msg: VersionParams): VersionParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VersionParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VersionParams; + static deserializeBinaryFromReader(message: VersionParams, reader: jspb.BinaryReader): VersionParams; +} + +export namespace VersionParams { + export type AsObject = { + appVersion: number, + } +} + +export class HashedParams extends jspb.Message { + getBlockMaxBytes(): number; + setBlockMaxBytes(value: number): HashedParams; + + getBlockMaxGas(): number; + setBlockMaxGas(value: number): HashedParams; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HashedParams.AsObject; + static toObject(includeInstance: boolean, msg: HashedParams): HashedParams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HashedParams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HashedParams; + static deserializeBinaryFromReader(message: HashedParams, reader: jspb.BinaryReader): HashedParams; +} + +export namespace HashedParams { + export type AsObject = { + blockMaxBytes: number, + blockMaxGas: number, + } +} diff --git a/js/proto/tendermint/types/params_pb.js b/js/proto/tendermint/types/params_pb.js new file mode 100644 index 000000000..bf1817385 --- /dev/null +++ b/js/proto/tendermint/types/params_pb.js @@ -0,0 +1,1304 @@ +// source: tendermint/types/params.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +goog.exportSymbol('proto.tendermint.types.BlockParams', null, global); +goog.exportSymbol('proto.tendermint.types.ConsensusParams', null, global); +goog.exportSymbol('proto.tendermint.types.EvidenceParams', null, global); +goog.exportSymbol('proto.tendermint.types.HashedParams', null, global); +goog.exportSymbol('proto.tendermint.types.ValidatorParams', null, global); +goog.exportSymbol('proto.tendermint.types.VersionParams', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.ConsensusParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.ConsensusParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.ConsensusParams.displayName = 'proto.tendermint.types.ConsensusParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.BlockParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.BlockParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.BlockParams.displayName = 'proto.tendermint.types.BlockParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.EvidenceParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.EvidenceParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.EvidenceParams.displayName = 'proto.tendermint.types.EvidenceParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.ValidatorParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.ValidatorParams.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.ValidatorParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.ValidatorParams.displayName = 'proto.tendermint.types.ValidatorParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.VersionParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.VersionParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.VersionParams.displayName = 'proto.tendermint.types.VersionParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.HashedParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.HashedParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.HashedParams.displayName = 'proto.tendermint.types.HashedParams'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.ConsensusParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.ConsensusParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.ConsensusParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ConsensusParams.toObject = function(includeInstance, msg) { + var f, obj = { + block: (f = msg.getBlock()) && proto.tendermint.types.BlockParams.toObject(includeInstance, f), + evidence: (f = msg.getEvidence()) && proto.tendermint.types.EvidenceParams.toObject(includeInstance, f), + validator: (f = msg.getValidator()) && proto.tendermint.types.ValidatorParams.toObject(includeInstance, f), + version: (f = msg.getVersion()) && proto.tendermint.types.VersionParams.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.ConsensusParams} + */ +proto.tendermint.types.ConsensusParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.ConsensusParams; + return proto.tendermint.types.ConsensusParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.ConsensusParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.ConsensusParams} + */ +proto.tendermint.types.ConsensusParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.BlockParams; + reader.readMessage(value,proto.tendermint.types.BlockParams.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 2: + var value = new proto.tendermint.types.EvidenceParams; + reader.readMessage(value,proto.tendermint.types.EvidenceParams.deserializeBinaryFromReader); + msg.setEvidence(value); + break; + case 3: + var value = new proto.tendermint.types.ValidatorParams; + reader.readMessage(value,proto.tendermint.types.ValidatorParams.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 4: + var value = new proto.tendermint.types.VersionParams; + reader.readMessage(value,proto.tendermint.types.VersionParams.deserializeBinaryFromReader); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.ConsensusParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.ConsensusParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.ConsensusParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ConsensusParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.BlockParams.serializeBinaryToWriter + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.EvidenceParams.serializeBinaryToWriter + ); + } + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.types.ValidatorParams.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.types.VersionParams.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BlockParams block = 1; + * @return {?proto.tendermint.types.BlockParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getBlock = function() { + return /** @type{?proto.tendermint.types.BlockParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockParams, 1)); +}; + + +/** + * @param {?proto.tendermint.types.BlockParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional EvidenceParams evidence = 2; + * @return {?proto.tendermint.types.EvidenceParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getEvidence = function() { + return /** @type{?proto.tendermint.types.EvidenceParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.EvidenceParams, 2)); +}; + + +/** + * @param {?proto.tendermint.types.EvidenceParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasEvidence = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ValidatorParams validator = 3; + * @return {?proto.tendermint.types.ValidatorParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getValidator = function() { + return /** @type{?proto.tendermint.types.ValidatorParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.ValidatorParams, 3)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasValidator = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional VersionParams version = 4; + * @return {?proto.tendermint.types.VersionParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getVersion = function() { + return /** @type{?proto.tendermint.types.VersionParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.VersionParams, 4)); +}; + + +/** + * @param {?proto.tendermint.types.VersionParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasVersion = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.BlockParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.BlockParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.BlockParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockParams.toObject = function(includeInstance, msg) { + var f, obj = { + maxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxGas: jspb.Message.getFieldWithDefault(msg, 2, 0), + timeIotaMs: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.BlockParams} + */ +proto.tendermint.types.BlockParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.BlockParams; + return proto.tendermint.types.BlockParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.BlockParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.BlockParams} + */ +proto.tendermint.types.BlockParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxBytes(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxGas(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeIotaMs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.BlockParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.BlockParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.BlockParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxBytes(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMaxGas(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getTimeIotaMs(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional int64 max_bytes = 1; + * @return {number} + */ +proto.tendermint.types.BlockParams.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockParams} returns this + */ +proto.tendermint.types.BlockParams.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 max_gas = 2; + * @return {number} + */ +proto.tendermint.types.BlockParams.prototype.getMaxGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockParams} returns this + */ +proto.tendermint.types.BlockParams.prototype.setMaxGas = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 time_iota_ms = 3; + * @return {number} + */ +proto.tendermint.types.BlockParams.prototype.getTimeIotaMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockParams} returns this + */ +proto.tendermint.types.BlockParams.prototype.setTimeIotaMs = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.EvidenceParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.EvidenceParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.EvidenceParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EvidenceParams.toObject = function(includeInstance, msg) { + var f, obj = { + maxAgeNumBlocks: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxAgeDuration: (f = msg.getMaxAgeDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + maxBytes: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.EvidenceParams} + */ +proto.tendermint.types.EvidenceParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.EvidenceParams; + return proto.tendermint.types.EvidenceParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.EvidenceParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.EvidenceParams} + */ +proto.tendermint.types.EvidenceParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxAgeNumBlocks(value); + break; + case 2: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setMaxAgeDuration(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.EvidenceParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.EvidenceParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.EvidenceParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EvidenceParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxAgeNumBlocks(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMaxAgeDuration(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getMaxBytes(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional int64 max_age_num_blocks = 1; + * @return {number} + */ +proto.tendermint.types.EvidenceParams.prototype.getMaxAgeNumBlocks = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.EvidenceParams} returns this + */ +proto.tendermint.types.EvidenceParams.prototype.setMaxAgeNumBlocks = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Duration max_age_duration = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.tendermint.types.EvidenceParams.prototype.getMaxAgeDuration = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.tendermint.types.EvidenceParams} returns this +*/ +proto.tendermint.types.EvidenceParams.prototype.setMaxAgeDuration = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.EvidenceParams} returns this + */ +proto.tendermint.types.EvidenceParams.prototype.clearMaxAgeDuration = function() { + return this.setMaxAgeDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.EvidenceParams.prototype.hasMaxAgeDuration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 max_bytes = 3; + * @return {number} + */ +proto.tendermint.types.EvidenceParams.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.EvidenceParams} returns this + */ +proto.tendermint.types.EvidenceParams.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.ValidatorParams.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.ValidatorParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.ValidatorParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.ValidatorParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ValidatorParams.toObject = function(includeInstance, msg) { + var f, obj = { + pubKeyTypesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.ValidatorParams} + */ +proto.tendermint.types.ValidatorParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.ValidatorParams; + return proto.tendermint.types.ValidatorParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.ValidatorParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.ValidatorParams} + */ +proto.tendermint.types.ValidatorParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addPubKeyTypes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.ValidatorParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.ValidatorParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.ValidatorParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ValidatorParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKeyTypesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string pub_key_types = 1; + * @return {!Array} + */ +proto.tendermint.types.ValidatorParams.prototype.getPubKeyTypesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.ValidatorParams} returns this + */ +proto.tendermint.types.ValidatorParams.prototype.setPubKeyTypesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.tendermint.types.ValidatorParams} returns this + */ +proto.tendermint.types.ValidatorParams.prototype.addPubKeyTypes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.ValidatorParams} returns this + */ +proto.tendermint.types.ValidatorParams.prototype.clearPubKeyTypesList = function() { + return this.setPubKeyTypesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.VersionParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.VersionParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.VersionParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.VersionParams.toObject = function(includeInstance, msg) { + var f, obj = { + appVersion: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.VersionParams} + */ +proto.tendermint.types.VersionParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.VersionParams; + return proto.tendermint.types.VersionParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.VersionParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.VersionParams} + */ +proto.tendermint.types.VersionParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAppVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.VersionParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.VersionParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.VersionParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.VersionParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAppVersion(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 app_version = 1; + * @return {number} + */ +proto.tendermint.types.VersionParams.prototype.getAppVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.VersionParams} returns this + */ +proto.tendermint.types.VersionParams.prototype.setAppVersion = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.HashedParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.HashedParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.HashedParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.HashedParams.toObject = function(includeInstance, msg) { + var f, obj = { + blockMaxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), + blockMaxGas: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.HashedParams} + */ +proto.tendermint.types.HashedParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.HashedParams; + return proto.tendermint.types.HashedParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.HashedParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.HashedParams} + */ +proto.tendermint.types.HashedParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBlockMaxBytes(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBlockMaxGas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.HashedParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.HashedParams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.HashedParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.HashedParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockMaxBytes(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getBlockMaxGas(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 block_max_bytes = 1; + * @return {number} + */ +proto.tendermint.types.HashedParams.prototype.getBlockMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.HashedParams} returns this + */ +proto.tendermint.types.HashedParams.prototype.setBlockMaxBytes = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 block_max_gas = 2; + * @return {number} + */ +proto.tendermint.types.HashedParams.prototype.getBlockMaxGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.HashedParams} returns this + */ +proto.tendermint.types.HashedParams.prototype.setBlockMaxGas = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/js/proto/tendermint/types/types_grpc_pb.js b/js/proto/tendermint/types/types_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/types/types_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/types/types_pb.d.ts b/js/proto/tendermint/types/types_pb.d.ts new file mode 100644 index 000000000..73939a4d3 --- /dev/null +++ b/js/proto/tendermint/types/types_pb.d.ts @@ -0,0 +1,569 @@ +// package: tendermint.types +// file: tendermint/types/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as tendermint_crypto_proof_pb from "../../tendermint/crypto/proof_pb"; +import * as tendermint_version_types_pb from "../../tendermint/version/types_pb"; +import * as tendermint_types_validator_pb from "../../tendermint/types/validator_pb"; + +export class PartSetHeader extends jspb.Message { + getTotal(): number; + setTotal(value: number): PartSetHeader; + + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): PartSetHeader; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PartSetHeader.AsObject; + static toObject(includeInstance: boolean, msg: PartSetHeader): PartSetHeader.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PartSetHeader, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PartSetHeader; + static deserializeBinaryFromReader(message: PartSetHeader, reader: jspb.BinaryReader): PartSetHeader; +} + +export namespace PartSetHeader { + export type AsObject = { + total: number, + hash: Uint8Array | string, + } +} + +export class Part extends jspb.Message { + getIndex(): number; + setIndex(value: number): Part; + + getBytes(): Uint8Array | string; + getBytes_asU8(): Uint8Array; + getBytes_asB64(): string; + setBytes(value: Uint8Array | string): Part; + + + hasProof(): boolean; + clearProof(): void; + getProof(): tendermint_crypto_proof_pb.Proof | undefined; + setProof(value?: tendermint_crypto_proof_pb.Proof): Part; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Part.AsObject; + static toObject(includeInstance: boolean, msg: Part): Part.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Part, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Part; + static deserializeBinaryFromReader(message: Part, reader: jspb.BinaryReader): Part; +} + +export namespace Part { + export type AsObject = { + index: number, + bytes: Uint8Array | string, + proof?: tendermint_crypto_proof_pb.Proof.AsObject, + } +} + +export class BlockID extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): BlockID; + + + hasPartSetHeader(): boolean; + clearPartSetHeader(): void; + getPartSetHeader(): PartSetHeader | undefined; + setPartSetHeader(value?: PartSetHeader): BlockID; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockID.AsObject; + static toObject(includeInstance: boolean, msg: BlockID): BlockID.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockID, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockID; + static deserializeBinaryFromReader(message: BlockID, reader: jspb.BinaryReader): BlockID; +} + +export namespace BlockID { + export type AsObject = { + hash: Uint8Array | string, + partSetHeader?: PartSetHeader.AsObject, + } +} + +export class Header extends jspb.Message { + + hasVersion(): boolean; + clearVersion(): void; + getVersion(): tendermint_version_types_pb.Consensus | undefined; + setVersion(value?: tendermint_version_types_pb.Consensus): Header; + + getChainId(): string; + setChainId(value: string): Header; + + getHeight(): number; + setHeight(value: number): Header; + + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): Header; + + + hasLastBlockId(): boolean; + clearLastBlockId(): void; + getLastBlockId(): BlockID | undefined; + setLastBlockId(value?: BlockID): Header; + + getLastCommitHash(): Uint8Array | string; + getLastCommitHash_asU8(): Uint8Array; + getLastCommitHash_asB64(): string; + setLastCommitHash(value: Uint8Array | string): Header; + + getDataHash(): Uint8Array | string; + getDataHash_asU8(): Uint8Array; + getDataHash_asB64(): string; + setDataHash(value: Uint8Array | string): Header; + + getValidatorsHash(): Uint8Array | string; + getValidatorsHash_asU8(): Uint8Array; + getValidatorsHash_asB64(): string; + setValidatorsHash(value: Uint8Array | string): Header; + + getNextValidatorsHash(): Uint8Array | string; + getNextValidatorsHash_asU8(): Uint8Array; + getNextValidatorsHash_asB64(): string; + setNextValidatorsHash(value: Uint8Array | string): Header; + + getConsensusHash(): Uint8Array | string; + getConsensusHash_asU8(): Uint8Array; + getConsensusHash_asB64(): string; + setConsensusHash(value: Uint8Array | string): Header; + + getAppHash(): Uint8Array | string; + getAppHash_asU8(): Uint8Array; + getAppHash_asB64(): string; + setAppHash(value: Uint8Array | string): Header; + + getLastResultsHash(): Uint8Array | string; + getLastResultsHash_asU8(): Uint8Array; + getLastResultsHash_asB64(): string; + setLastResultsHash(value: Uint8Array | string): Header; + + getEvidenceHash(): Uint8Array | string; + getEvidenceHash_asU8(): Uint8Array; + getEvidenceHash_asB64(): string; + setEvidenceHash(value: Uint8Array | string): Header; + + getProposerAddress(): Uint8Array | string; + getProposerAddress_asU8(): Uint8Array; + getProposerAddress_asB64(): string; + setProposerAddress(value: Uint8Array | string): Header; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Header.AsObject; + static toObject(includeInstance: boolean, msg: Header): Header.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Header; + static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; +} + +export namespace Header { + export type AsObject = { + version?: tendermint_version_types_pb.Consensus.AsObject, + chainId: string, + height: number, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + lastBlockId?: BlockID.AsObject, + lastCommitHash: Uint8Array | string, + dataHash: Uint8Array | string, + validatorsHash: Uint8Array | string, + nextValidatorsHash: Uint8Array | string, + consensusHash: Uint8Array | string, + appHash: Uint8Array | string, + lastResultsHash: Uint8Array | string, + evidenceHash: Uint8Array | string, + proposerAddress: Uint8Array | string, + } +} + +export class Data extends jspb.Message { + clearTxsList(): void; + getTxsList(): Array; + getTxsList_asU8(): Array; + getTxsList_asB64(): Array; + setTxsList(value: Array): Data; + addTxs(value: Uint8Array | string, index?: number): Uint8Array | string; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Data.AsObject; + static toObject(includeInstance: boolean, msg: Data): Data.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Data, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Data; + static deserializeBinaryFromReader(message: Data, reader: jspb.BinaryReader): Data; +} + +export namespace Data { + export type AsObject = { + txsList: Array, + } +} + +export class Vote extends jspb.Message { + getType(): SignedMsgType; + setType(value: SignedMsgType): Vote; + + getHeight(): number; + setHeight(value: number): Vote; + + getRound(): number; + setRound(value: number): Vote; + + + hasBlockId(): boolean; + clearBlockId(): void; + getBlockId(): BlockID | undefined; + setBlockId(value?: BlockID): Vote; + + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): Vote; + + getValidatorAddress(): Uint8Array | string; + getValidatorAddress_asU8(): Uint8Array; + getValidatorAddress_asB64(): string; + setValidatorAddress(value: Uint8Array | string): Vote; + + getValidatorIndex(): number; + setValidatorIndex(value: number): Vote; + + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): Vote; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Vote.AsObject; + static toObject(includeInstance: boolean, msg: Vote): Vote.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Vote, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Vote; + static deserializeBinaryFromReader(message: Vote, reader: jspb.BinaryReader): Vote; +} + +export namespace Vote { + export type AsObject = { + type: SignedMsgType, + height: number, + round: number, + blockId?: BlockID.AsObject, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + validatorAddress: Uint8Array | string, + validatorIndex: number, + signature: Uint8Array | string, + } +} + +export class Commit extends jspb.Message { + getHeight(): number; + setHeight(value: number): Commit; + + getRound(): number; + setRound(value: number): Commit; + + + hasBlockId(): boolean; + clearBlockId(): void; + getBlockId(): BlockID | undefined; + setBlockId(value?: BlockID): Commit; + + clearSignaturesList(): void; + getSignaturesList(): Array; + setSignaturesList(value: Array): Commit; + addSignatures(value?: CommitSig, index?: number): CommitSig; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Commit.AsObject; + static toObject(includeInstance: boolean, msg: Commit): Commit.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Commit, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Commit; + static deserializeBinaryFromReader(message: Commit, reader: jspb.BinaryReader): Commit; +} + +export namespace Commit { + export type AsObject = { + height: number, + round: number, + blockId?: BlockID.AsObject, + signaturesList: Array, + } +} + +export class CommitSig extends jspb.Message { + getBlockIdFlag(): BlockIDFlag; + setBlockIdFlag(value: BlockIDFlag): CommitSig; + + getValidatorAddress(): Uint8Array | string; + getValidatorAddress_asU8(): Uint8Array; + getValidatorAddress_asB64(): string; + setValidatorAddress(value: Uint8Array | string): CommitSig; + + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): CommitSig; + + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): CommitSig; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CommitSig.AsObject; + static toObject(includeInstance: boolean, msg: CommitSig): CommitSig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CommitSig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CommitSig; + static deserializeBinaryFromReader(message: CommitSig, reader: jspb.BinaryReader): CommitSig; +} + +export namespace CommitSig { + export type AsObject = { + blockIdFlag: BlockIDFlag, + validatorAddress: Uint8Array | string, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + signature: Uint8Array | string, + } +} + +export class Proposal extends jspb.Message { + getType(): SignedMsgType; + setType(value: SignedMsgType): Proposal; + + getHeight(): number; + setHeight(value: number): Proposal; + + getRound(): number; + setRound(value: number): Proposal; + + getPolRound(): number; + setPolRound(value: number): Proposal; + + + hasBlockId(): boolean; + clearBlockId(): void; + getBlockId(): BlockID | undefined; + setBlockId(value?: BlockID): Proposal; + + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): Proposal; + + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): Proposal; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Proposal.AsObject; + static toObject(includeInstance: boolean, msg: Proposal): Proposal.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Proposal, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Proposal; + static deserializeBinaryFromReader(message: Proposal, reader: jspb.BinaryReader): Proposal; +} + +export namespace Proposal { + export type AsObject = { + type: SignedMsgType, + height: number, + round: number, + polRound: number, + blockId?: BlockID.AsObject, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + signature: Uint8Array | string, + } +} + +export class SignedHeader extends jspb.Message { + + hasHeader(): boolean; + clearHeader(): void; + getHeader(): Header | undefined; + setHeader(value?: Header): SignedHeader; + + + hasCommit(): boolean; + clearCommit(): void; + getCommit(): Commit | undefined; + setCommit(value?: Commit): SignedHeader; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignedHeader.AsObject; + static toObject(includeInstance: boolean, msg: SignedHeader): SignedHeader.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SignedHeader, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignedHeader; + static deserializeBinaryFromReader(message: SignedHeader, reader: jspb.BinaryReader): SignedHeader; +} + +export namespace SignedHeader { + export type AsObject = { + header?: Header.AsObject, + commit?: Commit.AsObject, + } +} + +export class LightBlock extends jspb.Message { + + hasSignedHeader(): boolean; + clearSignedHeader(): void; + getSignedHeader(): SignedHeader | undefined; + setSignedHeader(value?: SignedHeader): LightBlock; + + + hasValidatorSet(): boolean; + clearValidatorSet(): void; + getValidatorSet(): tendermint_types_validator_pb.ValidatorSet | undefined; + setValidatorSet(value?: tendermint_types_validator_pb.ValidatorSet): LightBlock; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LightBlock.AsObject; + static toObject(includeInstance: boolean, msg: LightBlock): LightBlock.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LightBlock, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LightBlock; + static deserializeBinaryFromReader(message: LightBlock, reader: jspb.BinaryReader): LightBlock; +} + +export namespace LightBlock { + export type AsObject = { + signedHeader?: SignedHeader.AsObject, + validatorSet?: tendermint_types_validator_pb.ValidatorSet.AsObject, + } +} + +export class BlockMeta extends jspb.Message { + + hasBlockId(): boolean; + clearBlockId(): void; + getBlockId(): BlockID | undefined; + setBlockId(value?: BlockID): BlockMeta; + + getBlockSize(): number; + setBlockSize(value: number): BlockMeta; + + + hasHeader(): boolean; + clearHeader(): void; + getHeader(): Header | undefined; + setHeader(value?: Header): BlockMeta; + + getNumTxs(): number; + setNumTxs(value: number): BlockMeta; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockMeta.AsObject; + static toObject(includeInstance: boolean, msg: BlockMeta): BlockMeta.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockMeta, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockMeta; + static deserializeBinaryFromReader(message: BlockMeta, reader: jspb.BinaryReader): BlockMeta; +} + +export namespace BlockMeta { + export type AsObject = { + blockId?: BlockID.AsObject, + blockSize: number, + header?: Header.AsObject, + numTxs: number, + } +} + +export class TxProof extends jspb.Message { + getRootHash(): Uint8Array | string; + getRootHash_asU8(): Uint8Array; + getRootHash_asB64(): string; + setRootHash(value: Uint8Array | string): TxProof; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): TxProof; + + + hasProof(): boolean; + clearProof(): void; + getProof(): tendermint_crypto_proof_pb.Proof | undefined; + setProof(value?: tendermint_crypto_proof_pb.Proof): TxProof; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxProof.AsObject; + static toObject(includeInstance: boolean, msg: TxProof): TxProof.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TxProof, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TxProof; + static deserializeBinaryFromReader(message: TxProof, reader: jspb.BinaryReader): TxProof; +} + +export namespace TxProof { + export type AsObject = { + rootHash: Uint8Array | string, + data: Uint8Array | string, + proof?: tendermint_crypto_proof_pb.Proof.AsObject, + } +} + +export enum BlockIDFlag { + BLOCK_ID_FLAG_UNKNOWN = 0, + BLOCK_ID_FLAG_ABSENT = 1, + BLOCK_ID_FLAG_COMMIT = 2, + BLOCK_ID_FLAG_NIL = 3, +} + +export enum SignedMsgType { + SIGNED_MSG_TYPE_UNKNOWN = 0, + SIGNED_MSG_TYPE_PREVOTE = 1, + SIGNED_MSG_TYPE_PRECOMMIT = 2, + SIGNED_MSG_TYPE_PROPOSAL = 32, +} diff --git a/js/proto/tendermint/types/types_pb.js b/js/proto/tendermint/types/types_pb.js new file mode 100644 index 000000000..aeaa1003a --- /dev/null +++ b/js/proto/tendermint/types/types_pb.js @@ -0,0 +1,4229 @@ +// source: tendermint/types/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var tendermint_crypto_proof_pb = require('../../tendermint/crypto/proof_pb.js'); +goog.object.extend(proto, tendermint_crypto_proof_pb); +var tendermint_version_types_pb = require('../../tendermint/version/types_pb.js'); +goog.object.extend(proto, tendermint_version_types_pb); +var tendermint_types_validator_pb = require('../../tendermint/types/validator_pb.js'); +goog.object.extend(proto, tendermint_types_validator_pb); +goog.exportSymbol('proto.tendermint.types.BlockID', null, global); +goog.exportSymbol('proto.tendermint.types.BlockIDFlag', null, global); +goog.exportSymbol('proto.tendermint.types.BlockMeta', null, global); +goog.exportSymbol('proto.tendermint.types.Commit', null, global); +goog.exportSymbol('proto.tendermint.types.CommitSig', null, global); +goog.exportSymbol('proto.tendermint.types.Data', null, global); +goog.exportSymbol('proto.tendermint.types.Header', null, global); +goog.exportSymbol('proto.tendermint.types.LightBlock', null, global); +goog.exportSymbol('proto.tendermint.types.Part', null, global); +goog.exportSymbol('proto.tendermint.types.PartSetHeader', null, global); +goog.exportSymbol('proto.tendermint.types.Proposal', null, global); +goog.exportSymbol('proto.tendermint.types.SignedHeader', null, global); +goog.exportSymbol('proto.tendermint.types.SignedMsgType', null, global); +goog.exportSymbol('proto.tendermint.types.TxProof', null, global); +goog.exportSymbol('proto.tendermint.types.Vote', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.PartSetHeader = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.PartSetHeader, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.PartSetHeader.displayName = 'proto.tendermint.types.PartSetHeader'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.Part = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Part, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Part.displayName = 'proto.tendermint.types.Part'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.BlockID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.BlockID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.BlockID.displayName = 'proto.tendermint.types.BlockID'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Header.displayName = 'proto.tendermint.types.Header'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.Data = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.Data.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.Data, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Data.displayName = 'proto.tendermint.types.Data'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.Vote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Vote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Vote.displayName = 'proto.tendermint.types.Vote'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.Commit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.Commit.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.Commit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Commit.displayName = 'proto.tendermint.types.Commit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.CommitSig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.CommitSig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.CommitSig.displayName = 'proto.tendermint.types.CommitSig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.Proposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Proposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Proposal.displayName = 'proto.tendermint.types.Proposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.SignedHeader = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.SignedHeader, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.SignedHeader.displayName = 'proto.tendermint.types.SignedHeader'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.LightBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.LightBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.LightBlock.displayName = 'proto.tendermint.types.LightBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.BlockMeta = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.BlockMeta, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.BlockMeta.displayName = 'proto.tendermint.types.BlockMeta'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.TxProof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.TxProof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.TxProof.displayName = 'proto.tendermint.types.TxProof'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.PartSetHeader.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.PartSetHeader.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.PartSetHeader} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.PartSetHeader.toObject = function(includeInstance, msg) { + var f, obj = { + total: jspb.Message.getFieldWithDefault(msg, 1, 0), + hash: msg.getHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.PartSetHeader} + */ +proto.tendermint.types.PartSetHeader.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.PartSetHeader; + return proto.tendermint.types.PartSetHeader.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.PartSetHeader} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.PartSetHeader} + */ +proto.tendermint.types.PartSetHeader.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTotal(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.PartSetHeader.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.PartSetHeader.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.PartSetHeader} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.PartSetHeader.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotal(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional uint32 total = 1; + * @return {number} + */ +proto.tendermint.types.PartSetHeader.prototype.getTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.PartSetHeader} returns this + */ +proto.tendermint.types.PartSetHeader.prototype.setTotal = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.PartSetHeader.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes hash = 2; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.tendermint.types.PartSetHeader.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.PartSetHeader.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.PartSetHeader} returns this + */ +proto.tendermint.types.PartSetHeader.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.Part.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Part.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.Part} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Part.toObject = function(includeInstance, msg) { + var f, obj = { + index: jspb.Message.getFieldWithDefault(msg, 1, 0), + bytes: msg.getBytes_asB64(), + proof: (f = msg.getProof()) && tendermint_crypto_proof_pb.Proof.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.Part} + */ +proto.tendermint.types.Part.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Part; + return proto.tendermint.types.Part.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Part} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Part} + */ +proto.tendermint.types.Part.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setIndex(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBytes(value); + break; + case 3: + var value = new tendermint_crypto_proof_pb.Proof; + reader.readMessage(value,tendermint_crypto_proof_pb.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Part.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Part.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.Part} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Part.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_crypto_proof_pb.Proof.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 index = 1; + * @return {number} + */ +proto.tendermint.types.Part.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Part} returns this + */ +proto.tendermint.types.Part.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes bytes = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Part.prototype.getBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes bytes = 2; + * This is a type-conversion wrapper around `getBytes()` + * @return {string} + */ +proto.tendermint.types.Part.prototype.getBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBytes())); +}; + + +/** + * optional bytes bytes = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBytes()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Part.prototype.getBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Part} returns this + */ +proto.tendermint.types.Part.prototype.setBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional tendermint.crypto.Proof proof = 3; + * @return {?proto.tendermint.crypto.Proof} + */ +proto.tendermint.types.Part.prototype.getProof = function() { + return /** @type{?proto.tendermint.crypto.Proof} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_proof_pb.Proof, 3)); +}; + + +/** + * @param {?proto.tendermint.crypto.Proof|undefined} value + * @return {!proto.tendermint.types.Part} returns this +*/ +proto.tendermint.types.Part.prototype.setProof = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Part} returns this + */ +proto.tendermint.types.Part.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Part.prototype.hasProof = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.BlockID.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.BlockID.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.BlockID} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockID.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_asB64(), + partSetHeader: (f = msg.getPartSetHeader()) && proto.tendermint.types.PartSetHeader.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.BlockID} + */ +proto.tendermint.types.BlockID.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.BlockID; + return proto.tendermint.types.BlockID.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.BlockID} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.BlockID} + */ +proto.tendermint.types.BlockID.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 2: + var value = new proto.tendermint.types.PartSetHeader; + reader.readMessage(value,proto.tendermint.types.PartSetHeader.deserializeBinaryFromReader); + msg.setPartSetHeader(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.BlockID.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.BlockID.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.BlockID} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockID.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPartSetHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.PartSetHeader.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.BlockID.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes hash = 1; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.tendermint.types.BlockID.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.BlockID.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.BlockID} returns this + */ +proto.tendermint.types.BlockID.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional PartSetHeader part_set_header = 2; + * @return {?proto.tendermint.types.PartSetHeader} + */ +proto.tendermint.types.BlockID.prototype.getPartSetHeader = function() { + return /** @type{?proto.tendermint.types.PartSetHeader} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.PartSetHeader, 2)); +}; + + +/** + * @param {?proto.tendermint.types.PartSetHeader|undefined} value + * @return {!proto.tendermint.types.BlockID} returns this +*/ +proto.tendermint.types.BlockID.prototype.setPartSetHeader = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.BlockID} returns this + */ +proto.tendermint.types.BlockID.prototype.clearPartSetHeader = function() { + return this.setPartSetHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.BlockID.prototype.hasPartSetHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.Header.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Header.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.Header} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Header.toObject = function(includeInstance, msg) { + var f, obj = { + version: (f = msg.getVersion()) && tendermint_version_types_pb.Consensus.toObject(includeInstance, f), + chainId: jspb.Message.getFieldWithDefault(msg, 2, ""), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + lastBlockId: (f = msg.getLastBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), + lastCommitHash: msg.getLastCommitHash_asB64(), + dataHash: msg.getDataHash_asB64(), + validatorsHash: msg.getValidatorsHash_asB64(), + nextValidatorsHash: msg.getNextValidatorsHash_asB64(), + consensusHash: msg.getConsensusHash_asB64(), + appHash: msg.getAppHash_asB64(), + lastResultsHash: msg.getLastResultsHash_asB64(), + evidenceHash: msg.getEvidenceHash_asB64(), + proposerAddress: msg.getProposerAddress_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.Header} + */ +proto.tendermint.types.Header.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Header; + return proto.tendermint.types.Header.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Header} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Header} + */ +proto.tendermint.types.Header.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_version_types_pb.Consensus; + reader.readMessage(value,tendermint_version_types_pb.Consensus.deserializeBinaryFromReader); + msg.setVersion(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 5: + var value = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setLastBlockId(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastCommitHash(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDataHash(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValidatorsHash(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNextValidatorsHash(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setConsensusHash(value); + break; + case 11: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppHash(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastResultsHash(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEvidenceHash(value); + break; + case 14: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProposerAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Header.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.Header} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Header.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_version_types_pb.Consensus.serializeBinaryToWriter + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLastBlockId(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getLastCommitHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getDataHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getValidatorsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getNextValidatorsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 9, + f + ); + } + f = message.getConsensusHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, + f + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 11, + f + ); + } + f = message.getLastResultsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 12, + f + ); + } + f = message.getEvidenceHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 13, + f + ); + } + f = message.getProposerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 14, + f + ); + } +}; + + +/** + * optional tendermint.version.Consensus version = 1; + * @return {?proto.tendermint.version.Consensus} + */ +proto.tendermint.types.Header.prototype.getVersion = function() { + return /** @type{?proto.tendermint.version.Consensus} */ ( + jspb.Message.getWrapperField(this, tendermint_version_types_pb.Consensus, 1)); +}; + + +/** + * @param {?proto.tendermint.version.Consensus|undefined} value + * @return {!proto.tendermint.types.Header} returns this +*/ +proto.tendermint.types.Header.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Header.prototype.hasVersion = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string chain_id = 2; + * @return {string} + */ +proto.tendermint.types.Header.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.tendermint.types.Header.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.Header.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.types.Header} returns this +*/ +proto.tendermint.types.Header.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Header.prototype.hasTime = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional BlockID last_block_id = 5; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.Header.prototype.getLastBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 5)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.Header} returns this +*/ +proto.tendermint.types.Header.prototype.setLastBlockId = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.clearLastBlockId = function() { + return this.setLastBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Header.prototype.hasLastBlockId = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes last_commit_hash = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getLastCommitHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes last_commit_hash = 6; + * This is a type-conversion wrapper around `getLastCommitHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getLastCommitHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastCommitHash())); +}; + + +/** + * optional bytes last_commit_hash = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastCommitHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getLastCommitHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastCommitHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setLastCommitHash = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional bytes data_hash = 7; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getDataHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes data_hash = 7; + * This is a type-conversion wrapper around `getDataHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getDataHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataHash())); +}; + + +/** + * optional bytes data_hash = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getDataHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDataHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setDataHash = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional bytes validators_hash = 8; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getValidatorsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes validators_hash = 8; + * This is a type-conversion wrapper around `getValidatorsHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getValidatorsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValidatorsHash())); +}; + + +/** + * optional bytes validators_hash = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValidatorsHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getValidatorsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setValidatorsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * optional bytes next_validators_hash = 9; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getNextValidatorsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes next_validators_hash = 9; + * This is a type-conversion wrapper around `getNextValidatorsHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getNextValidatorsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNextValidatorsHash())); +}; + + +/** + * optional bytes next_validators_hash = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNextValidatorsHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getNextValidatorsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNextValidatorsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setNextValidatorsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 9, value); +}; + + +/** + * optional bytes consensus_hash = 10; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getConsensusHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * optional bytes consensus_hash = 10; + * This is a type-conversion wrapper around `getConsensusHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getConsensusHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getConsensusHash())); +}; + + +/** + * optional bytes consensus_hash = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getConsensusHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getConsensusHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getConsensusHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setConsensusHash = function(value) { + return jspb.Message.setProto3BytesField(this, 10, value); +}; + + +/** + * optional bytes app_hash = 11; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * optional bytes app_hash = 11; + * This is a type-conversion wrapper around `getAppHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppHash())); +}; + + +/** + * optional bytes app_hash = 11; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setAppHash = function(value) { + return jspb.Message.setProto3BytesField(this, 11, value); +}; + + +/** + * optional bytes last_results_hash = 12; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getLastResultsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes last_results_hash = 12; + * This is a type-conversion wrapper around `getLastResultsHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getLastResultsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastResultsHash())); +}; + + +/** + * optional bytes last_results_hash = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastResultsHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getLastResultsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastResultsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setLastResultsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 12, value); +}; + + +/** + * optional bytes evidence_hash = 13; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getEvidenceHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes evidence_hash = 13; + * This is a type-conversion wrapper around `getEvidenceHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getEvidenceHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEvidenceHash())); +}; + + +/** + * optional bytes evidence_hash = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEvidenceHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getEvidenceHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEvidenceHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setEvidenceHash = function(value) { + return jspb.Message.setProto3BytesField(this, 13, value); +}; + + +/** + * optional bytes proposer_address = 14; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getProposerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * optional bytes proposer_address = 14; + * This is a type-conversion wrapper around `getProposerAddress()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getProposerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProposerAddress())); +}; + + +/** + * optional bytes proposer_address = 14; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProposerAddress()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getProposerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProposerAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setProposerAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 14, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.Data.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.Data.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Data.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.Data} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Data.toObject = function(includeInstance, msg) { + var f, obj = { + txsList: msg.getTxsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.Data} + */ +proto.tendermint.types.Data.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Data; + return proto.tendermint.types.Data.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Data} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Data} + */ +proto.tendermint.types.Data.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addTxs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Data.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Data.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.Data} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Data.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes txs = 1; + * @return {!(Array|Array)} + */ +proto.tendermint.types.Data.prototype.getTxsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes txs = 1; + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} + */ +proto.tendermint.types.Data.prototype.getTxsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTxsList())); +}; + + +/** + * repeated bytes txs = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxsList()` + * @return {!Array} + */ +proto.tendermint.types.Data.prototype.getTxsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTxsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.tendermint.types.Data} returns this + */ +proto.tendermint.types.Data.prototype.setTxsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Data} returns this + */ +proto.tendermint.types.Data.prototype.addTxs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.Data} returns this + */ +proto.tendermint.types.Data.prototype.clearTxsList = function() { + return this.setTxsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.Vote.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Vote.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.Vote} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Vote.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + round: jspb.Message.getFieldWithDefault(msg, 3, 0), + blockId: (f = msg.getBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + validatorAddress: msg.getValidatorAddress_asB64(), + validatorIndex: jspb.Message.getFieldWithDefault(msg, 7, 0), + signature: msg.getSignature_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.Vote} + */ +proto.tendermint.types.Vote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Vote; + return proto.tendermint.types.Vote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Vote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Vote} + */ +proto.tendermint.types.Vote.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.tendermint.types.SignedMsgType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 4: + var value = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValidatorAddress(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setValidatorIndex(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Vote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Vote.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.Vote} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Vote.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getValidatorAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getValidatorIndex(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } +}; + + +/** + * optional SignedMsgType type = 1; + * @return {!proto.tendermint.types.SignedMsgType} + */ +proto.tendermint.types.Vote.prototype.getType = function() { + return /** @type {!proto.tendermint.types.SignedMsgType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.types.SignedMsgType} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.tendermint.types.Vote.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 round = 3; + * @return {number} + */ +proto.tendermint.types.Vote.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional BlockID block_id = 4; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.Vote.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 4)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.Vote} returns this +*/ +proto.tendermint.types.Vote.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Vote.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.Vote.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.types.Vote} returns this +*/ +proto.tendermint.types.Vote.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Vote.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes validator_address = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Vote.prototype.getValidatorAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes validator_address = 6; + * This is a type-conversion wrapper around `getValidatorAddress()` + * @return {string} + */ +proto.tendermint.types.Vote.prototype.getValidatorAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValidatorAddress())); +}; + + +/** + * optional bytes validator_address = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValidatorAddress()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Vote.prototype.getValidatorAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional int32 validator_index = 7; + * @return {number} + */ +proto.tendermint.types.Vote.prototype.getValidatorIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setValidatorIndex = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional bytes signature = 8; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Vote.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes signature = 8; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.tendermint.types.Vote.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Vote.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.Commit.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.Commit.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Commit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.Commit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Commit.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + round: jspb.Message.getFieldWithDefault(msg, 2, 0), + blockId: (f = msg.getBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), + signaturesList: jspb.Message.toObjectList(msg.getSignaturesList(), + proto.tendermint.types.CommitSig.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.Commit} + */ +proto.tendermint.types.Commit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Commit; + return proto.tendermint.types.Commit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Commit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Commit} + */ +proto.tendermint.types.Commit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var value = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 4: + var value = new proto.tendermint.types.CommitSig; + reader.readMessage(value,proto.tendermint.types.CommitSig.deserializeBinaryFromReader); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Commit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Commit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.Commit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Commit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getSignaturesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.tendermint.types.CommitSig.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.types.Commit.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Commit} returns this + */ +proto.tendermint.types.Commit.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.tendermint.types.Commit.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Commit} returns this + */ +proto.tendermint.types.Commit.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional BlockID block_id = 3; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.Commit.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 3)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.Commit} returns this +*/ +proto.tendermint.types.Commit.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Commit} returns this + */ +proto.tendermint.types.Commit.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Commit.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated CommitSig signatures = 4; + * @return {!Array} + */ +proto.tendermint.types.Commit.prototype.getSignaturesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.types.CommitSig, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.Commit} returns this +*/ +proto.tendermint.types.Commit.prototype.setSignaturesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.tendermint.types.CommitSig=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.CommitSig} + */ +proto.tendermint.types.Commit.prototype.addSignatures = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.types.CommitSig, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.Commit} returns this + */ +proto.tendermint.types.Commit.prototype.clearSignaturesList = function() { + return this.setSignaturesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.CommitSig.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.CommitSig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.CommitSig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CommitSig.toObject = function(includeInstance, msg) { + var f, obj = { + blockIdFlag: jspb.Message.getFieldWithDefault(msg, 1, 0), + validatorAddress: msg.getValidatorAddress_asB64(), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + signature: msg.getSignature_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.CommitSig} + */ +proto.tendermint.types.CommitSig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.CommitSig; + return proto.tendermint.types.CommitSig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.CommitSig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.CommitSig} + */ +proto.tendermint.types.CommitSig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.tendermint.types.BlockIDFlag} */ (reader.readEnum()); + msg.setBlockIdFlag(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValidatorAddress(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.CommitSig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.CommitSig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.CommitSig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CommitSig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockIdFlag(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getValidatorAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional BlockIDFlag block_id_flag = 1; + * @return {!proto.tendermint.types.BlockIDFlag} + */ +proto.tendermint.types.CommitSig.prototype.getBlockIdFlag = function() { + return /** @type {!proto.tendermint.types.BlockIDFlag} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.types.BlockIDFlag} value + * @return {!proto.tendermint.types.CommitSig} returns this + */ +proto.tendermint.types.CommitSig.prototype.setBlockIdFlag = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bytes validator_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.CommitSig.prototype.getValidatorAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes validator_address = 2; + * This is a type-conversion wrapper around `getValidatorAddress()` + * @return {string} + */ +proto.tendermint.types.CommitSig.prototype.getValidatorAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValidatorAddress())); +}; + + +/** + * optional bytes validator_address = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValidatorAddress()` + * @return {!Uint8Array} + */ +proto.tendermint.types.CommitSig.prototype.getValidatorAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.CommitSig} returns this + */ +proto.tendermint.types.CommitSig.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.CommitSig.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.types.CommitSig} returns this +*/ +proto.tendermint.types.CommitSig.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.CommitSig} returns this + */ +proto.tendermint.types.CommitSig.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.CommitSig.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes signature = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.CommitSig.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes signature = 4; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.tendermint.types.CommitSig.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.tendermint.types.CommitSig.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.CommitSig} returns this + */ +proto.tendermint.types.CommitSig.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.Proposal.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Proposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.Proposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Proposal.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + round: jspb.Message.getFieldWithDefault(msg, 3, 0), + polRound: jspb.Message.getFieldWithDefault(msg, 4, 0), + blockId: (f = msg.getBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + signature: msg.getSignature_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.Proposal} + */ +proto.tendermint.types.Proposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Proposal; + return proto.tendermint.types.Proposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Proposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Proposal} + */ +proto.tendermint.types.Proposal.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.tendermint.types.SignedMsgType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPolRound(value); + break; + case 5: + var value = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Proposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Proposal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.Proposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Proposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getPolRound(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } +}; + + +/** + * optional SignedMsgType type = 1; + * @return {!proto.tendermint.types.SignedMsgType} + */ +proto.tendermint.types.Proposal.prototype.getType = function() { + return /** @type {!proto.tendermint.types.SignedMsgType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.types.SignedMsgType} value + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.tendermint.types.Proposal.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 round = 3; + * @return {number} + */ +proto.tendermint.types.Proposal.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 pol_round = 4; + * @return {number} + */ +proto.tendermint.types.Proposal.prototype.getPolRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.setPolRound = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional BlockID block_id = 5; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.Proposal.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 5)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.Proposal} returns this +*/ +proto.tendermint.types.Proposal.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Proposal.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.Proposal.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.types.Proposal} returns this +*/ +proto.tendermint.types.Proposal.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Proposal.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes signature = 7; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Proposal.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes signature = 7; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.tendermint.types.Proposal.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Proposal.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.SignedHeader.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.SignedHeader.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.SignedHeader} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.SignedHeader.toObject = function(includeInstance, msg) { + var f, obj = { + header: (f = msg.getHeader()) && proto.tendermint.types.Header.toObject(includeInstance, f), + commit: (f = msg.getCommit()) && proto.tendermint.types.Commit.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.SignedHeader} + */ +proto.tendermint.types.SignedHeader.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.SignedHeader; + return proto.tendermint.types.SignedHeader.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.SignedHeader} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.SignedHeader} + */ +proto.tendermint.types.SignedHeader.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.Header; + reader.readMessage(value,proto.tendermint.types.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 2: + var value = new proto.tendermint.types.Commit; + reader.readMessage(value,proto.tendermint.types.Commit.deserializeBinaryFromReader); + msg.setCommit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.SignedHeader.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.SignedHeader.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.SignedHeader} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.SignedHeader.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.Header.serializeBinaryToWriter + ); + } + f = message.getCommit(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.Commit.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Header header = 1; + * @return {?proto.tendermint.types.Header} + */ +proto.tendermint.types.SignedHeader.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.Header, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.tendermint.types.SignedHeader} returns this +*/ +proto.tendermint.types.SignedHeader.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.SignedHeader} returns this + */ +proto.tendermint.types.SignedHeader.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.SignedHeader.prototype.hasHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Commit commit = 2; + * @return {?proto.tendermint.types.Commit} + */ +proto.tendermint.types.SignedHeader.prototype.getCommit = function() { + return /** @type{?proto.tendermint.types.Commit} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.Commit, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Commit|undefined} value + * @return {!proto.tendermint.types.SignedHeader} returns this +*/ +proto.tendermint.types.SignedHeader.prototype.setCommit = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.SignedHeader} returns this + */ +proto.tendermint.types.SignedHeader.prototype.clearCommit = function() { + return this.setCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.SignedHeader.prototype.hasCommit = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.LightBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.LightBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.LightBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.LightBlock.toObject = function(includeInstance, msg) { + var f, obj = { + signedHeader: (f = msg.getSignedHeader()) && proto.tendermint.types.SignedHeader.toObject(includeInstance, f), + validatorSet: (f = msg.getValidatorSet()) && tendermint_types_validator_pb.ValidatorSet.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.LightBlock} + */ +proto.tendermint.types.LightBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.LightBlock; + return proto.tendermint.types.LightBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.LightBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.LightBlock} + */ +proto.tendermint.types.LightBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.SignedHeader; + reader.readMessage(value,proto.tendermint.types.SignedHeader.deserializeBinaryFromReader); + msg.setSignedHeader(value); + break; + case 2: + var value = new tendermint_types_validator_pb.ValidatorSet; + reader.readMessage(value,tendermint_types_validator_pb.ValidatorSet.deserializeBinaryFromReader); + msg.setValidatorSet(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.LightBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.LightBlock.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.LightBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.LightBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignedHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.SignedHeader.serializeBinaryToWriter + ); + } + f = message.getValidatorSet(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_validator_pb.ValidatorSet.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SignedHeader signed_header = 1; + * @return {?proto.tendermint.types.SignedHeader} + */ +proto.tendermint.types.LightBlock.prototype.getSignedHeader = function() { + return /** @type{?proto.tendermint.types.SignedHeader} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.SignedHeader, 1)); +}; + + +/** + * @param {?proto.tendermint.types.SignedHeader|undefined} value + * @return {!proto.tendermint.types.LightBlock} returns this +*/ +proto.tendermint.types.LightBlock.prototype.setSignedHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.LightBlock} returns this + */ +proto.tendermint.types.LightBlock.prototype.clearSignedHeader = function() { + return this.setSignedHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.LightBlock.prototype.hasSignedHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ValidatorSet validator_set = 2; + * @return {?proto.tendermint.types.ValidatorSet} + */ +proto.tendermint.types.LightBlock.prototype.getValidatorSet = function() { + return /** @type{?proto.tendermint.types.ValidatorSet} */ ( + jspb.Message.getWrapperField(this, tendermint_types_validator_pb.ValidatorSet, 2)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorSet|undefined} value + * @return {!proto.tendermint.types.LightBlock} returns this +*/ +proto.tendermint.types.LightBlock.prototype.setValidatorSet = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.LightBlock} returns this + */ +proto.tendermint.types.LightBlock.prototype.clearValidatorSet = function() { + return this.setValidatorSet(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.LightBlock.prototype.hasValidatorSet = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.BlockMeta.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.BlockMeta.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.BlockMeta} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockMeta.toObject = function(includeInstance, msg) { + var f, obj = { + blockId: (f = msg.getBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), + blockSize: jspb.Message.getFieldWithDefault(msg, 2, 0), + header: (f = msg.getHeader()) && proto.tendermint.types.Header.toObject(includeInstance, f), + numTxs: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.BlockMeta} + */ +proto.tendermint.types.BlockMeta.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.BlockMeta; + return proto.tendermint.types.BlockMeta.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.BlockMeta} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.BlockMeta} + */ +proto.tendermint.types.BlockMeta.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBlockSize(value); + break; + case 3: + var value = new proto.tendermint.types.Header; + reader.readMessage(value,proto.tendermint.types.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNumTxs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.BlockMeta.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.BlockMeta.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.BlockMeta} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockMeta.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getBlockSize(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.types.Header.serializeBinaryToWriter + ); + } + f = message.getNumTxs(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional BlockID block_id = 1; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.BlockMeta.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 1)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.BlockMeta} returns this +*/ +proto.tendermint.types.BlockMeta.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.BlockMeta} returns this + */ +proto.tendermint.types.BlockMeta.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.BlockMeta.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 block_size = 2; + * @return {number} + */ +proto.tendermint.types.BlockMeta.prototype.getBlockSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockMeta} returns this + */ +proto.tendermint.types.BlockMeta.prototype.setBlockSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional Header header = 3; + * @return {?proto.tendermint.types.Header} + */ +proto.tendermint.types.BlockMeta.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.Header, 3)); +}; + + +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.tendermint.types.BlockMeta} returns this +*/ +proto.tendermint.types.BlockMeta.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.BlockMeta} returns this + */ +proto.tendermint.types.BlockMeta.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.BlockMeta.prototype.hasHeader = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int64 num_txs = 4; + * @return {number} + */ +proto.tendermint.types.BlockMeta.prototype.getNumTxs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockMeta} returns this + */ +proto.tendermint.types.BlockMeta.prototype.setNumTxs = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.TxProof.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.TxProof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.TxProof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.TxProof.toObject = function(includeInstance, msg) { + var f, obj = { + rootHash: msg.getRootHash_asB64(), + data: msg.getData_asB64(), + proof: (f = msg.getProof()) && tendermint_crypto_proof_pb.Proof.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.TxProof} + */ +proto.tendermint.types.TxProof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.TxProof; + return proto.tendermint.types.TxProof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.TxProof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.TxProof} + */ +proto.tendermint.types.TxProof.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRootHash(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = new tendermint_crypto_proof_pb.Proof; + reader.readMessage(value,tendermint_crypto_proof_pb.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.TxProof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.TxProof.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.TxProof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.TxProof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRootHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_crypto_proof_pb.Proof.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes root_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.TxProof.prototype.getRootHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes root_hash = 1; + * This is a type-conversion wrapper around `getRootHash()` + * @return {string} + */ +proto.tendermint.types.TxProof.prototype.getRootHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRootHash())); +}; + + +/** + * optional bytes root_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRootHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.TxProof.prototype.getRootHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRootHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.TxProof} returns this + */ +proto.tendermint.types.TxProof.prototype.setRootHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.TxProof.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.tendermint.types.TxProof.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.tendermint.types.TxProof.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.TxProof} returns this + */ +proto.tendermint.types.TxProof.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional tendermint.crypto.Proof proof = 3; + * @return {?proto.tendermint.crypto.Proof} + */ +proto.tendermint.types.TxProof.prototype.getProof = function() { + return /** @type{?proto.tendermint.crypto.Proof} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_proof_pb.Proof, 3)); +}; + + +/** + * @param {?proto.tendermint.crypto.Proof|undefined} value + * @return {!proto.tendermint.types.TxProof} returns this +*/ +proto.tendermint.types.TxProof.prototype.setProof = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.TxProof} returns this + */ +proto.tendermint.types.TxProof.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.TxProof.prototype.hasProof = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * @enum {number} + */ +proto.tendermint.types.BlockIDFlag = { + BLOCK_ID_FLAG_UNKNOWN: 0, + BLOCK_ID_FLAG_ABSENT: 1, + BLOCK_ID_FLAG_COMMIT: 2, + BLOCK_ID_FLAG_NIL: 3 +}; + +/** + * @enum {number} + */ +proto.tendermint.types.SignedMsgType = { + SIGNED_MSG_TYPE_UNKNOWN: 0, + SIGNED_MSG_TYPE_PREVOTE: 1, + SIGNED_MSG_TYPE_PRECOMMIT: 2, + SIGNED_MSG_TYPE_PROPOSAL: 32 +}; + +goog.object.extend(exports, proto.tendermint.types); diff --git a/js/proto/tendermint/types/validator_grpc_pb.js b/js/proto/tendermint/types/validator_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/types/validator_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/types/validator_pb.d.ts b/js/proto/tendermint/types/validator_pb.d.ts new file mode 100644 index 000000000..ce221b924 --- /dev/null +++ b/js/proto/tendermint/types/validator_pb.d.ts @@ -0,0 +1,109 @@ +// package: tendermint.types +// file: tendermint/types/validator.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; +import * as tendermint_crypto_keys_pb from "../../tendermint/crypto/keys_pb"; + +export class ValidatorSet extends jspb.Message { + clearValidatorsList(): void; + getValidatorsList(): Array; + setValidatorsList(value: Array): ValidatorSet; + addValidators(value?: Validator, index?: number): Validator; + + + hasProposer(): boolean; + clearProposer(): void; + getProposer(): Validator | undefined; + setProposer(value?: Validator): ValidatorSet; + + getTotalVotingPower(): number; + setTotalVotingPower(value: number): ValidatorSet; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidatorSet.AsObject; + static toObject(includeInstance: boolean, msg: ValidatorSet): ValidatorSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValidatorSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidatorSet; + static deserializeBinaryFromReader(message: ValidatorSet, reader: jspb.BinaryReader): ValidatorSet; +} + +export namespace ValidatorSet { + export type AsObject = { + validatorsList: Array, + proposer?: Validator.AsObject, + totalVotingPower: number, + } +} + +export class Validator extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): Validator; + + + hasPubKey(): boolean; + clearPubKey(): void; + getPubKey(): tendermint_crypto_keys_pb.PublicKey | undefined; + setPubKey(value?: tendermint_crypto_keys_pb.PublicKey): Validator; + + getVotingPower(): number; + setVotingPower(value: number): Validator; + + getProposerPriority(): number; + setProposerPriority(value: number): Validator; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Validator.AsObject; + static toObject(includeInstance: boolean, msg: Validator): Validator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Validator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Validator; + static deserializeBinaryFromReader(message: Validator, reader: jspb.BinaryReader): Validator; +} + +export namespace Validator { + export type AsObject = { + address: Uint8Array | string, + pubKey?: tendermint_crypto_keys_pb.PublicKey.AsObject, + votingPower: number, + proposerPriority: number, + } +} + +export class SimpleValidator extends jspb.Message { + + hasPubKey(): boolean; + clearPubKey(): void; + getPubKey(): tendermint_crypto_keys_pb.PublicKey | undefined; + setPubKey(value?: tendermint_crypto_keys_pb.PublicKey): SimpleValidator; + + getVotingPower(): number; + setVotingPower(value: number): SimpleValidator; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SimpleValidator.AsObject; + static toObject(includeInstance: boolean, msg: SimpleValidator): SimpleValidator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SimpleValidator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SimpleValidator; + static deserializeBinaryFromReader(message: SimpleValidator, reader: jspb.BinaryReader): SimpleValidator; +} + +export namespace SimpleValidator { + export type AsObject = { + pubKey?: tendermint_crypto_keys_pb.PublicKey.AsObject, + votingPower: number, + } +} diff --git a/js/proto/tendermint/types/validator_pb.js b/js/proto/tendermint/types/validator_pb.js new file mode 100644 index 000000000..6314e5c75 --- /dev/null +++ b/js/proto/tendermint/types/validator_pb.js @@ -0,0 +1,774 @@ +// source: tendermint/types/validator.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +var tendermint_crypto_keys_pb = require('../../tendermint/crypto/keys_pb.js'); +goog.object.extend(proto, tendermint_crypto_keys_pb); +goog.exportSymbol('proto.tendermint.types.SimpleValidator', null, global); +goog.exportSymbol('proto.tendermint.types.Validator', null, global); +goog.exportSymbol('proto.tendermint.types.ValidatorSet', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.ValidatorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.ValidatorSet.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.ValidatorSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.ValidatorSet.displayName = 'proto.tendermint.types.ValidatorSet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Validator.displayName = 'proto.tendermint.types.Validator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.types.SimpleValidator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.SimpleValidator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.SimpleValidator.displayName = 'proto.tendermint.types.SimpleValidator'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.ValidatorSet.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.ValidatorSet.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.ValidatorSet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.ValidatorSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ValidatorSet.toObject = function(includeInstance, msg) { + var f, obj = { + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.tendermint.types.Validator.toObject, includeInstance), + proposer: (f = msg.getProposer()) && proto.tendermint.types.Validator.toObject(includeInstance, f), + totalVotingPower: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.ValidatorSet} + */ +proto.tendermint.types.ValidatorSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.ValidatorSet; + return proto.tendermint.types.ValidatorSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.ValidatorSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.ValidatorSet} + */ +proto.tendermint.types.ValidatorSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.Validator; + reader.readMessage(value,proto.tendermint.types.Validator.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 2: + var value = new proto.tendermint.types.Validator; + reader.readMessage(value,proto.tendermint.types.Validator.deserializeBinaryFromReader); + msg.setProposer(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.ValidatorSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.ValidatorSet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.ValidatorSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ValidatorSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.types.Validator.serializeBinaryToWriter + ); + } + f = message.getProposer(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.Validator.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * repeated Validator validators = 1; + * @return {!Array} + */ +proto.tendermint.types.ValidatorSet.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.types.Validator, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.ValidatorSet} returns this +*/ +proto.tendermint.types.ValidatorSet.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.types.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Validator} + */ +proto.tendermint.types.ValidatorSet.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.types.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.ValidatorSet} returns this + */ +proto.tendermint.types.ValidatorSet.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional Validator proposer = 2; + * @return {?proto.tendermint.types.Validator} + */ +proto.tendermint.types.ValidatorSet.prototype.getProposer = function() { + return /** @type{?proto.tendermint.types.Validator} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.Validator, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Validator|undefined} value + * @return {!proto.tendermint.types.ValidatorSet} returns this +*/ +proto.tendermint.types.ValidatorSet.prototype.setProposer = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ValidatorSet} returns this + */ +proto.tendermint.types.ValidatorSet.prototype.clearProposer = function() { + return this.setProposer(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ValidatorSet.prototype.hasProposer = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 total_voting_power = 3; + * @return {number} + */ +proto.tendermint.types.ValidatorSet.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.ValidatorSet} returns this + */ +proto.tendermint.types.ValidatorSet.prototype.setTotalVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.Validator.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Validator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.Validator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Validator.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + pubKey: (f = msg.getPubKey()) && tendermint_crypto_keys_pb.PublicKey.toObject(includeInstance, f), + votingPower: jspb.Message.getFieldWithDefault(msg, 3, 0), + proposerPriority: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.Validator} + */ +proto.tendermint.types.Validator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Validator; + return proto.tendermint.types.Validator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Validator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Validator} + */ +proto.tendermint.types.Validator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = new tendermint_crypto_keys_pb.PublicKey; + reader.readMessage(value,tendermint_crypto_keys_pb.PublicKey.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVotingPower(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setProposerPriority(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Validator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Validator.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.Validator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Validator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_crypto_keys_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getVotingPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getProposerPriority(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional bytes address = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Validator.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.tendermint.types.Validator.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Validator.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Validator} returns this + */ +proto.tendermint.types.Validator.prototype.setAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional tendermint.crypto.PublicKey pub_key = 2; + * @return {?proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.types.Validator.prototype.getPubKey = function() { + return /** @type{?proto.tendermint.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_keys_pb.PublicKey, 2)); +}; + + +/** + * @param {?proto.tendermint.crypto.PublicKey|undefined} value + * @return {!proto.tendermint.types.Validator} returns this +*/ +proto.tendermint.types.Validator.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Validator} returns this + */ +proto.tendermint.types.Validator.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Validator.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 voting_power = 3; + * @return {number} + */ +proto.tendermint.types.Validator.prototype.getVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Validator} returns this + */ +proto.tendermint.types.Validator.prototype.setVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 proposer_priority = 4; + * @return {number} + */ +proto.tendermint.types.Validator.prototype.getProposerPriority = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Validator} returns this + */ +proto.tendermint.types.Validator.prototype.setProposerPriority = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.types.SimpleValidator.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.SimpleValidator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.types.SimpleValidator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.SimpleValidator.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: (f = msg.getPubKey()) && tendermint_crypto_keys_pb.PublicKey.toObject(includeInstance, f), + votingPower: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.types.SimpleValidator} + */ +proto.tendermint.types.SimpleValidator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.SimpleValidator; + return proto.tendermint.types.SimpleValidator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.SimpleValidator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.SimpleValidator} + */ +proto.tendermint.types.SimpleValidator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_crypto_keys_pb.PublicKey; + reader.readMessage(value,tendermint_crypto_keys_pb.PublicKey.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVotingPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.SimpleValidator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.SimpleValidator.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.types.SimpleValidator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.SimpleValidator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_crypto_keys_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getVotingPower(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional tendermint.crypto.PublicKey pub_key = 1; + * @return {?proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.types.SimpleValidator.prototype.getPubKey = function() { + return /** @type{?proto.tendermint.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_keys_pb.PublicKey, 1)); +}; + + +/** + * @param {?proto.tendermint.crypto.PublicKey|undefined} value + * @return {!proto.tendermint.types.SimpleValidator} returns this +*/ +proto.tendermint.types.SimpleValidator.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.SimpleValidator} returns this + */ +proto.tendermint.types.SimpleValidator.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.SimpleValidator.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 voting_power = 2; + * @return {number} + */ +proto.tendermint.types.SimpleValidator.prototype.getVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.SimpleValidator} returns this + */ +proto.tendermint.types.SimpleValidator.prototype.setVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/js/proto/tendermint/version/types_grpc_pb.js b/js/proto/tendermint/version/types_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/js/proto/tendermint/version/types_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/js/proto/tendermint/version/types_pb.d.ts b/js/proto/tendermint/version/types_pb.d.ts new file mode 100644 index 000000000..efa883cbf --- /dev/null +++ b/js/proto/tendermint/version/types_pb.d.ts @@ -0,0 +1,58 @@ +// package: tendermint.version +// file: tendermint/version/types.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as gogoproto_gogo_pb from "../../gogoproto/gogo_pb"; + +export class App extends jspb.Message { + getProtocol(): number; + setProtocol(value: number): App; + + getSoftware(): string; + setSoftware(value: string): App; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): App.AsObject; + static toObject(includeInstance: boolean, msg: App): App.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: App, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): App; + static deserializeBinaryFromReader(message: App, reader: jspb.BinaryReader): App; +} + +export namespace App { + export type AsObject = { + protocol: number, + software: string, + } +} + +export class Consensus extends jspb.Message { + getBlock(): number; + setBlock(value: number): Consensus; + + getApp(): number; + setApp(value: number): Consensus; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Consensus.AsObject; + static toObject(includeInstance: boolean, msg: Consensus): Consensus.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Consensus, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Consensus; + static deserializeBinaryFromReader(message: Consensus, reader: jspb.BinaryReader): Consensus; +} + +export namespace Consensus { + export type AsObject = { + block: number, + app: number, + } +} diff --git a/js/proto/tendermint/version/types_pb.js b/js/proto/tendermint/version/types_pb.js new file mode 100644 index 000000000..2617a64b2 --- /dev/null +++ b/js/proto/tendermint/version/types_pb.js @@ -0,0 +1,383 @@ +// source: tendermint/version/types.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.tendermint.version.App', null, global); +goog.exportSymbol('proto.tendermint.version.Consensus', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.version.App = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.version.App, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.version.App.displayName = 'proto.tendermint.version.App'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.tendermint.version.Consensus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.version.Consensus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.version.Consensus.displayName = 'proto.tendermint.version.Consensus'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.version.App.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.version.App.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.version.App} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.version.App.toObject = function(includeInstance, msg) { + var f, obj = { + protocol: jspb.Message.getFieldWithDefault(msg, 1, 0), + software: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.version.App} + */ +proto.tendermint.version.App.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.version.App; + return proto.tendermint.version.App.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.version.App} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.version.App} + */ +proto.tendermint.version.App.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setProtocol(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSoftware(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.version.App.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.version.App.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.version.App} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.version.App.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProtocol(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSoftware(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 protocol = 1; + * @return {number} + */ +proto.tendermint.version.App.prototype.getProtocol = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.version.App} returns this + */ +proto.tendermint.version.App.prototype.setProtocol = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string software = 2; + * @return {string} + */ +proto.tendermint.version.App.prototype.getSoftware = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.version.App} returns this + */ +proto.tendermint.version.App.prototype.setSoftware = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.tendermint.version.Consensus.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.version.Consensus.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.tendermint.version.Consensus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.version.Consensus.toObject = function(includeInstance, msg) { + var f, obj = { + block: jspb.Message.getFieldWithDefault(msg, 1, 0), + app: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.version.Consensus} + */ +proto.tendermint.version.Consensus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.version.Consensus; + return proto.tendermint.version.Consensus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.version.Consensus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.version.Consensus} + */ +proto.tendermint.version.Consensus.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlock(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setApp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.version.Consensus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.version.Consensus.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.tendermint.version.Consensus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.version.Consensus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlock(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getApp(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 block = 1; + * @return {number} + */ +proto.tendermint.version.Consensus.prototype.getBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.version.Consensus} returns this + */ +proto.tendermint.version.Consensus.prototype.setBlock = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 app = 2; + * @return {number} + */ +proto.tendermint.version.Consensus.prototype.getApp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.version.Consensus} returns this + */ +proto.tendermint.version.Consensus.prototype.setApp = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.version); diff --git a/js/proto/tendermint_pb.d.ts b/js/proto/tendermint_pb.d.ts index f9754b4dd..e07b68a42 100644 --- a/js/proto/tendermint_pb.d.ts +++ b/js/proto/tendermint_pb.d.ts @@ -5,36 +5,36 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; export class NodeInfo extends jspb.Message { getId(): Uint8Array | string; getId_asU8(): Uint8Array; getId_asB64(): string; - setId(value: Uint8Array | string): void; + setId(value: Uint8Array | string): NodeInfo; getListenaddress(): string; - setListenaddress(value: string): void; + setListenaddress(value: string): NodeInfo; getNetwork(): string; - setNetwork(value: string): void; + setNetwork(value: string): NodeInfo; getVersion(): string; - setVersion(value: string): void; + setVersion(value: string): NodeInfo; getChannels(): Uint8Array | string; getChannels_asU8(): Uint8Array; getChannels_asB64(): string; - setChannels(value: Uint8Array | string): void; + setChannels(value: Uint8Array | string): NodeInfo; getMoniker(): string; - setMoniker(value: string): void; + setMoniker(value: string): NodeInfo; getRpcaddress(): string; - setRpcaddress(value: string): void; + setRpcaddress(value: string): NodeInfo; getTxindex(): string; - setTxindex(value: string): void; + setTxindex(value: string): NodeInfo; serializeBinary(): Uint8Array; diff --git a/js/proto/tendermint_pb.js b/js/proto/tendermint_pb.js index c7c028138..f2c88d2ec 100644 --- a/js/proto/tendermint_pb.js +++ b/js/proto/tendermint_pb.js @@ -1,3 +1,4 @@ +// source: tendermint.proto /** * @fileoverview * @enhanceable @@ -6,15 +7,16 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.tendermint.NodeInfo', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -30,19 +32,26 @@ proto.tendermint.NodeInfo = function(opt_data) { }; goog.inherits(proto.tendermint.NodeInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.tendermint.NodeInfo.displayName = 'proto.tendermint.NodeInfo'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.tendermint.NodeInfo.prototype.toObject = function(opt_includeInstance) { @@ -52,8 +61,8 @@ proto.tendermint.NodeInfo.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.tendermint.NodeInfo} msg The msg instance to transform. * @return {!Object} @@ -258,9 +267,12 @@ proto.tendermint.NodeInfo.prototype.getId_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setId = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -273,9 +285,12 @@ proto.tendermint.NodeInfo.prototype.getListenaddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setListenaddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -288,9 +303,12 @@ proto.tendermint.NodeInfo.prototype.getNetwork = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setNetwork = function(value) { - jspb.Message.setProto3StringField(this, 3, value); + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -303,9 +321,12 @@ proto.tendermint.NodeInfo.prototype.getVersion = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -342,9 +363,12 @@ proto.tendermint.NodeInfo.prototype.getChannels_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setChannels = function(value) { - jspb.Message.setProto3BytesField(this, 5, value); + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -357,9 +381,12 @@ proto.tendermint.NodeInfo.prototype.getMoniker = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setMoniker = function(value) { - jspb.Message.setProto3StringField(this, 6, value); + return jspb.Message.setProto3StringField(this, 6, value); }; @@ -372,9 +399,12 @@ proto.tendermint.NodeInfo.prototype.getRpcaddress = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setRpcaddress = function(value) { - jspb.Message.setProto3StringField(this, 7, value); + return jspb.Message.setProto3StringField(this, 7, value); }; @@ -387,9 +417,12 @@ proto.tendermint.NodeInfo.prototype.getTxindex = function() { }; -/** @param {string} value */ +/** + * @param {string} value + * @return {!proto.tendermint.NodeInfo} returns this + */ proto.tendermint.NodeInfo.prototype.setTxindex = function(value) { - jspb.Message.setProto3StringField(this, 8, value); + return jspb.Message.setProto3StringField(this, 8, value); }; diff --git a/js/proto/txs_pb.d.ts b/js/proto/txs_pb.d.ts index e774626bb..567732c17 100644 --- a/js/proto/txs_pb.d.ts +++ b/js/proto/txs_pb.d.ts @@ -5,22 +5,22 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as crypto_pb from "./crypto_pb"; export class Envelope extends jspb.Message { clearSignatoriesList(): void; getSignatoriesList(): Array; - setSignatoriesList(value: Array): void; + setSignatoriesList(value: Array): Envelope; addSignatories(value?: Signatory, index?: number): Signatory; getTx(): Uint8Array | string; getTx_asU8(): Uint8Array; getTx_asB64(): string; - setTx(value: Uint8Array | string): void; + setTx(value: Uint8Array | string): Envelope; getEncoding(): Envelope.EncodingType; - setEncoding(value: Envelope.EncodingType): void; + setEncoding(value: Envelope.EncodingType): Envelope; serializeBinary(): Uint8Array; @@ -51,19 +51,19 @@ export class Signatory extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): Signatory; hasPublickey(): boolean; clearPublickey(): void; getPublickey(): crypto_pb.PublicKey | undefined; - setPublickey(value?: crypto_pb.PublicKey): void; + setPublickey(value?: crypto_pb.PublicKey): Signatory; hasSignature(): boolean; clearSignature(): void; getSignature(): crypto_pb.Signature | undefined; - setSignature(value?: crypto_pb.Signature): void; + setSignature(value?: crypto_pb.Signature): Signatory; serializeBinary(): Uint8Array; @@ -86,20 +86,20 @@ export namespace Signatory { export class Receipt extends jspb.Message { getTxtype(): number; - setTxtype(value: number): void; + setTxtype(value: number): Receipt; getTxhash(): Uint8Array | string; getTxhash_asU8(): Uint8Array; getTxhash_asB64(): string; - setTxhash(value: Uint8Array | string): void; + setTxhash(value: Uint8Array | string): Receipt; getCreatescontract(): boolean; - setCreatescontract(value: boolean): void; + setCreatescontract(value: boolean): Receipt; getContractaddress(): Uint8Array | string; getContractaddress_asU8(): Uint8Array; getContractaddress_asB64(): string; - setContractaddress(value: Uint8Array | string): void; + setContractaddress(value: Uint8Array | string): Receipt; serializeBinary(): Uint8Array; diff --git a/js/proto/txs_pb.js b/js/proto/txs_pb.js index 0c20d7b21..a266996c7 100644 --- a/js/proto/txs_pb.js +++ b/js/proto/txs_pb.js @@ -1,3 +1,4 @@ +// source: txs.proto /** * @fileoverview * @enhanceable @@ -6,20 +7,21 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); var crypto_pb = require('./crypto_pb.js'); goog.object.extend(proto, crypto_pb); goog.exportSymbol('proto.txs.Envelope', null, global); goog.exportSymbol('proto.txs.Envelope.EncodingType', null, global); goog.exportSymbol('proto.txs.Receipt', null, global); goog.exportSymbol('proto.txs.Signatory', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -35,8 +37,55 @@ proto.txs.Envelope = function(opt_data) { }; goog.inherits(proto.txs.Envelope, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.txs.Envelope.displayName = 'proto.txs.Envelope'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.txs.Signatory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.txs.Signatory, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.txs.Signatory.displayName = 'proto.txs.Signatory'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.txs.Receipt = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.txs.Receipt, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.txs.Receipt.displayName = 'proto.txs.Receipt'; +} + /** * List of repeated fields within this message type. * @private {!Array} @@ -48,13 +97,15 @@ proto.txs.Envelope.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.txs.Envelope.prototype.toObject = function(opt_includeInstance) { @@ -64,8 +115,8 @@ proto.txs.Envelope.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.txs.Envelope} msg The msg instance to transform. * @return {!Object} @@ -198,9 +249,12 @@ proto.txs.Envelope.prototype.getSignatoriesList = function() { }; -/** @param {!Array} value */ +/** + * @param {!Array} value + * @return {!proto.txs.Envelope} returns this +*/ proto.txs.Envelope.prototype.setSignatoriesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -214,8 +268,12 @@ proto.txs.Envelope.prototype.addSignatories = function(opt_value, opt_index) { }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.txs.Envelope} returns this + */ proto.txs.Envelope.prototype.clearSignatoriesList = function() { - this.setSignatoriesList([]); + return this.setSignatoriesList([]); }; @@ -252,9 +310,12 @@ proto.txs.Envelope.prototype.getTx_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.txs.Envelope} returns this + */ proto.txs.Envelope.prototype.setTx = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -267,41 +328,29 @@ proto.txs.Envelope.prototype.getEncoding = function() { }; -/** @param {!proto.txs.Envelope.EncodingType} value */ +/** + * @param {!proto.txs.Envelope.EncodingType} value + * @return {!proto.txs.Envelope} returns this + */ proto.txs.Envelope.prototype.setEncoding = function(value) { - jspb.Message.setProto3EnumField(this, 3, value); + return jspb.Message.setProto3EnumField(this, 3, value); }; -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.txs.Signatory = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.txs.Signatory, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.txs.Signatory.displayName = 'proto.txs.Signatory'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.txs.Signatory.prototype.toObject = function(opt_includeInstance) { @@ -311,8 +360,8 @@ proto.txs.Signatory.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.txs.Signatory} msg The msg instance to transform. * @return {!Object} @@ -461,9 +510,12 @@ proto.txs.Signatory.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.txs.Signatory} returns this + */ proto.txs.Signatory.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -477,14 +529,21 @@ proto.txs.Signatory.prototype.getPublickey = function() { }; -/** @param {?proto.crypto.PublicKey|undefined} value */ +/** + * @param {?proto.crypto.PublicKey|undefined} value + * @return {!proto.txs.Signatory} returns this +*/ proto.txs.Signatory.prototype.setPublickey = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.txs.Signatory} returns this + */ proto.txs.Signatory.prototype.clearPublickey = function() { - this.setPublickey(undefined); + return this.setPublickey(undefined); }; @@ -507,14 +566,21 @@ proto.txs.Signatory.prototype.getSignature = function() { }; -/** @param {?proto.crypto.Signature|undefined} value */ +/** + * @param {?proto.crypto.Signature|undefined} value + * @return {!proto.txs.Signatory} returns this +*/ proto.txs.Signatory.prototype.setSignature = function(value) { - jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 4, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.txs.Signatory} returns this + */ proto.txs.Signatory.prototype.clearSignature = function() { - this.setSignature(undefined); + return this.setSignature(undefined); }; @@ -528,34 +594,19 @@ proto.txs.Signatory.prototype.hasSignature = function() { -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.txs.Receipt = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.txs.Receipt, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.txs.Receipt.displayName = 'proto.txs.Receipt'; -} if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.txs.Receipt.prototype.toObject = function(opt_includeInstance) { @@ -565,8 +616,8 @@ proto.txs.Receipt.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.txs.Receipt} msg The msg instance to transform. * @return {!Object} @@ -576,7 +627,7 @@ proto.txs.Receipt.toObject = function(includeInstance, msg) { var f, obj = { txtype: jspb.Message.getFieldWithDefault(msg, 1, 0), txhash: msg.getTxhash_asB64(), - createscontract: jspb.Message.getFieldWithDefault(msg, 3, false), + createscontract: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), contractaddress: msg.getContractaddress_asB64() }; @@ -699,9 +750,12 @@ proto.txs.Receipt.prototype.getTxtype = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.txs.Receipt} returns this + */ proto.txs.Receipt.prototype.setTxtype = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -738,26 +792,30 @@ proto.txs.Receipt.prototype.getTxhash_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.txs.Receipt} returns this + */ proto.txs.Receipt.prototype.setTxhash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + return jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional bool CreatesContract = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.txs.Receipt.prototype.getCreatescontract = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; -/** @param {boolean} value */ +/** + * @param {boolean} value + * @return {!proto.txs.Receipt} returns this + */ proto.txs.Receipt.prototype.setCreatescontract = function(value) { - jspb.Message.setProto3BooleanField(this, 3, value); + return jspb.Message.setProto3BooleanField(this, 3, value); }; @@ -794,9 +852,12 @@ proto.txs.Receipt.prototype.getContractaddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.txs.Receipt} returns this + */ proto.txs.Receipt.prototype.setContractaddress = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; diff --git a/js/proto/validator_pb.d.ts b/js/proto/validator_pb.d.ts index 8c6fd1343..ae6ef0aca 100644 --- a/js/proto/validator_pb.d.ts +++ b/js/proto/validator_pb.d.ts @@ -5,23 +5,23 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; +import * as gogoproto_gogo_pb from "./gogoproto/gogo_pb"; import * as crypto_pb from "./crypto_pb"; export class Validator extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; - setAddress(value: Uint8Array | string): void; + setAddress(value: Uint8Array | string): Validator; hasPublickey(): boolean; clearPublickey(): void; getPublickey(): crypto_pb.PublicKey | undefined; - setPublickey(value?: crypto_pb.PublicKey): void; + setPublickey(value?: crypto_pb.PublicKey): Validator; getPower(): number; - setPower(value: number): void; + setPower(value: number): Validator; serializeBinary(): Uint8Array; diff --git a/js/proto/validator_pb.js b/js/proto/validator_pb.js index 90382775a..7d7c89680 100644 --- a/js/proto/validator_pb.js +++ b/js/proto/validator_pb.js @@ -1,3 +1,4 @@ +// source: validator.proto /** * @fileoverview * @enhanceable @@ -6,17 +7,18 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); +var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); var crypto_pb = require('./crypto_pb.js'); goog.object.extend(proto, crypto_pb); goog.exportSymbol('proto.validator.Validator', null, global); - /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -32,19 +34,26 @@ proto.validator.Validator = function(opt_data) { }; goog.inherits(proto.validator.Validator, jspb.Message); if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ proto.validator.Validator.displayName = 'proto.validator.Validator'; } + if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration * @return {!Object} */ proto.validator.Validator.prototype.toObject = function(opt_includeInstance) { @@ -54,8 +63,8 @@ proto.validator.Validator.prototype.toObject = function(opt_includeInstance) { /** * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.validator.Validator} msg The msg instance to transform. * @return {!Object} @@ -202,9 +211,12 @@ proto.validator.Validator.prototype.getAddress_asU8 = function() { }; -/** @param {!(string|Uint8Array)} value */ +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.validator.Validator} returns this + */ proto.validator.Validator.prototype.setAddress = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -218,14 +230,21 @@ proto.validator.Validator.prototype.getPublickey = function() { }; -/** @param {?proto.crypto.PublicKey|undefined} value */ +/** + * @param {?proto.crypto.PublicKey|undefined} value + * @return {!proto.validator.Validator} returns this +*/ proto.validator.Validator.prototype.setPublickey = function(value) { - jspb.Message.setWrapperField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.validator.Validator} returns this + */ proto.validator.Validator.prototype.clearPublickey = function() { - this.setPublickey(undefined); + return this.setPublickey(undefined); }; @@ -247,9 +266,12 @@ proto.validator.Validator.prototype.getPower = function() { }; -/** @param {number} value */ +/** + * @param {number} value + * @return {!proto.validator.Validator} returns this + */ proto.validator.Validator.prototype.setPower = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 3, value); }; diff --git a/js/src/test.ts b/js/src/test.ts index 0b70415f7..fd137513e 100644 --- a/js/src/test.ts +++ b/js/src/test.ts @@ -16,5 +16,6 @@ export const compile = (source: string, name: string) => { const url = process.env.BURROW_URL || 'localhost:20997'; const addr = process.env.SIGNING_ADDRESS || 'C9F239591C593CB8EE192B0009C6A0F2C9F8D768'; +console.log(`Connecting to Burrow at ${url}...`) export const burrow = new Burrow(url, addr); diff --git a/js/yarn.lock b/js/yarn.lock index 9b76cff87..1cd8a0d36 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -1216,10 +1216,10 @@ grpc-tools@^1.10.0: dependencies: node-pre-gyp "^0.15.0" -grpc_tools_node_protoc_ts@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.1.0.tgz#7ff0706bedc8902187fc1163bcd307156206c91d" - integrity sha512-jXn5JKmjdzPqjsrh7IPKnjlTFoNOHlP7xSKq8L9nDGbDrMj4qwEGHrQfX2YhqCmBc9pAQ9Y4+sPnlOTaOp61PA== +"grpc_tools_node_protoc_ts@ ^5.1.1": + version "5.1.1" + resolved "https://registry.yarnpkg.com/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.1.1.tgz#199fff9a2143cf672adc693c1774ef20ecf48258" + integrity sha512-IR+629LMKQnwLQxAnNz9GTLKSWX+d0HcO8JNeU+Vf2dW3d2pdM4ue7Vsx/gvXClcrywx3/pbPkXVeJNC8MkEcg== dependencies: google-protobuf "3.12.4" handlebars "4.7.6" diff --git a/keys/filesystem_key_store.go b/keys/filesystem_key_store.go index f097ac5ef..6af7c7907 100644 --- a/keys/filesystem_key_store.go +++ b/keys/filesystem_key_store.go @@ -19,6 +19,7 @@ import ( type FilesystemKeyStore struct { sync.Mutex + UnimplementedKeysServer AllowBadFilePermissions bool keysDirPath string } diff --git a/keys/key_client.go b/keys/key_client.go index d4a3583f1..ab7c10974 100644 --- a/keys/key_client.go +++ b/keys/key_client.go @@ -8,9 +8,10 @@ import ( "fmt" "time" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/logging" - "google.golang.org/grpc" ) type KeyClient interface { @@ -163,9 +164,7 @@ func (l *remoteKeyClient) HealthCheck() error { // NewRemoteKeyClient returns a new keys client for provided rpc location func NewRemoteKeyClient(rpcAddress string, logger *logging.Logger) (KeyClient, error) { logger = logger.WithScope("RemoteKeyClient") - var opts []grpc.DialOption - opts = append(opts, grpc.WithInsecure()) - conn, err := grpc.Dial(rpcAddress, opts...) + conn, err := encoding.GRPCDial(rpcAddress) if err != nil { return nil, err } diff --git a/keys/keys.pb.go b/keys/keys.pb.go index 1965b5b9c..273559683 100644 --- a/keys/keys.pb.go +++ b/keys/keys.pb.go @@ -4,8 +4,8 @@ package keys import ( - context "context" fmt "fmt" + io "io" math "math" math_bits "math/bits" @@ -13,9 +13,6 @@ import ( proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" crypto "github.com/hyperledger/burrow/crypto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -44,16 +41,21 @@ func (*ListRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{0} } func (m *ListRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListRequest.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ListRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_ListRequest.Merge(m, src) } func (m *ListRequest) XXX_Size() int { - return xxx_messageInfo_ListRequest.Size(m) + return m.Size() } func (m *ListRequest) XXX_DiscardUnknown() { xxx_messageInfo_ListRequest.DiscardUnknown(m) @@ -85,16 +87,21 @@ func (*VerifyResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{1} } func (m *VerifyResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VerifyResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *VerifyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VerifyResponse.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *VerifyResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_VerifyResponse.Merge(m, src) } func (m *VerifyResponse) XXX_Size() int { - return xxx_messageInfo_VerifyResponse.Size(m) + return m.Size() } func (m *VerifyResponse) XXX_DiscardUnknown() { xxx_messageInfo_VerifyResponse.DiscardUnknown(m) @@ -119,16 +126,21 @@ func (*RemoveNameResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{2} } func (m *RemoveNameResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RemoveNameResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *RemoveNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RemoveNameResponse.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *RemoveNameResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_RemoveNameResponse.Merge(m, src) } func (m *RemoveNameResponse) XXX_Size() int { - return xxx_messageInfo_RemoveNameResponse.Size(m) + return m.Size() } func (m *RemoveNameResponse) XXX_DiscardUnknown() { xxx_messageInfo_RemoveNameResponse.DiscardUnknown(m) @@ -153,16 +165,21 @@ func (*AddNameResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{3} } func (m *AddNameResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddNameResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *AddNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddNameResponse.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *AddNameResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_AddNameResponse.Merge(m, src) } func (m *AddNameResponse) XXX_Size() int { - return xxx_messageInfo_AddNameResponse.Size(m) + return m.Size() } func (m *AddNameResponse) XXX_DiscardUnknown() { xxx_messageInfo_AddNameResponse.DiscardUnknown(m) @@ -188,16 +205,21 @@ func (*RemoveNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{4} } func (m *RemoveNameRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RemoveNameRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *RemoveNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RemoveNameRequest.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *RemoveNameRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_RemoveNameRequest.Merge(m, src) } func (m *RemoveNameRequest) XXX_Size() int { - return xxx_messageInfo_RemoveNameRequest.Size(m) + return m.Size() } func (m *RemoveNameRequest) XXX_DiscardUnknown() { xxx_messageInfo_RemoveNameRequest.DiscardUnknown(m) @@ -232,16 +254,21 @@ func (*GenRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{5} } func (m *GenRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GenRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GenRequest.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GenRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_GenRequest.Merge(m, src) } func (m *GenRequest) XXX_Size() int { - return xxx_messageInfo_GenRequest.Size(m) + return m.Size() } func (m *GenRequest) XXX_DiscardUnknown() { xxx_messageInfo_GenRequest.DiscardUnknown(m) @@ -288,16 +315,21 @@ func (*GenResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{6} } func (m *GenResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GenResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GenResponse.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GenResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_GenResponse.Merge(m, src) } func (m *GenResponse) XXX_Size() int { - return xxx_messageInfo_GenResponse.Size(m) + return m.Size() } func (m *GenResponse) XXX_DiscardUnknown() { xxx_messageInfo_GenResponse.DiscardUnknown(m) @@ -331,16 +363,21 @@ func (*PubRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{7} } func (m *PubRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PubRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *PubRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PubRequest.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *PubRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_PubRequest.Merge(m, src) } func (m *PubRequest) XXX_Size() int { - return xxx_messageInfo_PubRequest.Size(m) + return m.Size() } func (m *PubRequest) XXX_DiscardUnknown() { xxx_messageInfo_PubRequest.DiscardUnknown(m) @@ -381,16 +418,21 @@ func (*PubResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{8} } func (m *PubResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PubResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *PubResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PubResponse.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *PubResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_PubResponse.Merge(m, src) } func (m *PubResponse) XXX_Size() int { - return xxx_messageInfo_PubResponse.Size(m) + return m.Size() } func (m *PubResponse) XXX_DiscardUnknown() { xxx_messageInfo_PubResponse.DiscardUnknown(m) @@ -431,16 +473,21 @@ func (*ImportJSONRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{9} } func (m *ImportJSONRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ImportJSONRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ImportJSONRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ImportJSONRequest.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ImportJSONRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_ImportJSONRequest.Merge(m, src) } func (m *ImportJSONRequest) XXX_Size() int { - return xxx_messageInfo_ImportJSONRequest.Size(m) + return m.Size() } func (m *ImportJSONRequest) XXX_DiscardUnknown() { xxx_messageInfo_ImportJSONRequest.DiscardUnknown(m) @@ -480,16 +527,21 @@ func (*ImportResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{10} } func (m *ImportResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ImportResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ImportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ImportResponse.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ImportResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_ImportResponse.Merge(m, src) } func (m *ImportResponse) XXX_Size() int { - return xxx_messageInfo_ImportResponse.Size(m) + return m.Size() } func (m *ImportResponse) XXX_DiscardUnknown() { xxx_messageInfo_ImportResponse.DiscardUnknown(m) @@ -525,16 +577,21 @@ func (*ImportRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{11} } func (m *ImportRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ImportRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ImportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ImportRequest.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ImportRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_ImportRequest.Merge(m, src) } func (m *ImportRequest) XXX_Size() int { - return xxx_messageInfo_ImportRequest.Size(m) + return m.Size() } func (m *ImportRequest) XXX_DiscardUnknown() { xxx_messageInfo_ImportRequest.DiscardUnknown(m) @@ -590,16 +647,21 @@ func (*ExportRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{12} } func (m *ExportRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExportRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ExportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExportRequest.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ExportRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_ExportRequest.Merge(m, src) } func (m *ExportRequest) XXX_Size() int { - return xxx_messageInfo_ExportRequest.Size(m) + return m.Size() } func (m *ExportRequest) XXX_DiscardUnknown() { xxx_messageInfo_ExportRequest.DiscardUnknown(m) @@ -649,16 +711,21 @@ func (*ExportResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{13} } func (m *ExportResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExportResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ExportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExportResponse.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ExportResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_ExportResponse.Merge(m, src) } func (m *ExportResponse) XXX_Size() int { - return xxx_messageInfo_ExportResponse.Size(m) + return m.Size() } func (m *ExportResponse) XXX_DiscardUnknown() { xxx_messageInfo_ExportResponse.DiscardUnknown(m) @@ -715,16 +782,21 @@ func (*SignRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{14} } func (m *SignRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SignRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SignRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SignRequest.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *SignRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_SignRequest.Merge(m, src) } func (m *SignRequest) XXX_Size() int { - return xxx_messageInfo_SignRequest.Size(m) + return m.Size() } func (m *SignRequest) XXX_DiscardUnknown() { xxx_messageInfo_SignRequest.DiscardUnknown(m) @@ -778,16 +850,21 @@ func (*SignResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{15} } func (m *SignResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SignResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SignResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SignResponse.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *SignResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_SignResponse.Merge(m, src) } func (m *SignResponse) XXX_Size() int { - return xxx_messageInfo_SignResponse.Size(m) + return m.Size() } func (m *SignResponse) XXX_DiscardUnknown() { xxx_messageInfo_SignResponse.DiscardUnknown(m) @@ -822,16 +899,21 @@ func (*VerifyRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{16} } func (m *VerifyRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VerifyRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *VerifyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VerifyRequest.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *VerifyRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_VerifyRequest.Merge(m, src) } func (m *VerifyRequest) XXX_Size() int { - return xxx_messageInfo_VerifyRequest.Size(m) + return m.Size() } func (m *VerifyRequest) XXX_DiscardUnknown() { xxx_messageInfo_VerifyRequest.DiscardUnknown(m) @@ -879,16 +961,21 @@ func (*HashRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{17} } func (m *HashRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HashRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *HashRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HashRequest.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *HashRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_HashRequest.Merge(m, src) } func (m *HashRequest) XXX_Size() int { - return xxx_messageInfo_HashRequest.Size(m) + return m.Size() } func (m *HashRequest) XXX_DiscardUnknown() { xxx_messageInfo_HashRequest.DiscardUnknown(m) @@ -928,16 +1015,21 @@ func (*HashResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{18} } func (m *HashResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HashResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *HashResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HashResponse.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *HashResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_HashResponse.Merge(m, src) } func (m *HashResponse) XXX_Size() int { - return xxx_messageInfo_HashResponse.Size(m) + return m.Size() } func (m *HashResponse) XXX_DiscardUnknown() { xxx_messageInfo_HashResponse.DiscardUnknown(m) @@ -971,16 +1063,21 @@ func (*KeyID) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{19} } func (m *KeyID) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_KeyID.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *KeyID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_KeyID.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *KeyID) XXX_Merge(src proto.Message) { xxx_messageInfo_KeyID.Merge(m, src) } func (m *KeyID) XXX_Size() int { - return xxx_messageInfo_KeyID.Size(m) + return m.Size() } func (m *KeyID) XXX_DiscardUnknown() { xxx_messageInfo_KeyID.DiscardUnknown(m) @@ -1020,16 +1117,21 @@ func (*ListResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{20} } func (m *ListResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ListResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_ListResponse.Merge(m, src) } func (m *ListResponse) XXX_Size() int { - return xxx_messageInfo_ListResponse.Size(m) + return m.Size() } func (m *ListResponse) XXX_DiscardUnknown() { xxx_messageInfo_ListResponse.DiscardUnknown(m) @@ -1063,16 +1165,21 @@ func (*AddNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9084e97af2346a26, []int{21} } func (m *AddNameRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddNameRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *AddNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddNameRequest.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *AddNameRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_AddNameRequest.Merge(m, src) } func (m *AddNameRequest) XXX_Size() int { - return xxx_messageInfo_AddNameRequest.Size(m) + return m.Size() } func (m *AddNameRequest) XXX_DiscardUnknown() { xxx_messageInfo_AddNameRequest.DiscardUnknown(m) @@ -1148,497 +1255,961 @@ func init() { proto.RegisterFile("keys.proto", fileDescriptor_9084e97af2346a26) func init() { golang_proto.RegisterFile("keys.proto", fileDescriptor_9084e97af2346a26) } var fileDescriptor_9084e97af2346a26 = []byte{ - // 763 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x4f, 0x13, 0x41, - 0x14, 0x4e, 0xbb, 0x0b, 0xd2, 0xb7, 0xa5, 0xd2, 0x15, 0x63, 0xb3, 0xc1, 0x86, 0xcc, 0x05, 0x62, - 0xd2, 0xd6, 0x14, 0xe3, 0x41, 0x0e, 0x84, 0x1f, 0x06, 0xb1, 0x8a, 0xa4, 0x18, 0x0f, 0x26, 0x1e, - 0xb6, 0xf4, 0xd1, 0x36, 0xd0, 0xee, 0x3a, 0xb3, 0x8b, 0xec, 0xc1, 0xab, 0x7f, 0x97, 0x47, 0x4f, - 0x9e, 0x3d, 0x1a, 0xf8, 0x47, 0xcc, 0xcc, 0xec, 0x74, 0x67, 0x16, 0xc4, 0x26, 0xde, 0xe6, 0xfd, - 0x9a, 0xef, 0xbd, 0x37, 0x5f, 0xbf, 0x2d, 0xc0, 0x19, 0x26, 0xac, 0x19, 0xd2, 0x20, 0x0a, 0x5c, - 0x9b, 0x9f, 0xbd, 0xc6, 0x60, 0x14, 0x0d, 0xe3, 0x5e, 0xf3, 0x24, 0x18, 0xb7, 0x06, 0xc1, 0x20, - 0x68, 0x89, 0x60, 0x2f, 0x3e, 0x15, 0x96, 0x30, 0xc4, 0x49, 0x16, 0x79, 0xe5, 0x13, 0x9a, 0x84, - 0x51, 0x6a, 0x91, 0x35, 0x70, 0xde, 0x8c, 0x58, 0xd4, 0xc5, 0xcf, 0x31, 0xb2, 0xc8, 0xad, 0xc1, - 0xbd, 0x0e, 0x26, 0x87, 0xfe, 0x18, 0x6b, 0x85, 0xd5, 0xc2, 0x7a, 0xa9, 0xab, 0x4c, 0xb2, 0x04, - 0x95, 0x0f, 0x48, 0x47, 0xa7, 0x49, 0x17, 0x59, 0x18, 0x4c, 0x18, 0x92, 0x65, 0x70, 0xbb, 0x38, - 0x0e, 0x2e, 0x90, 0xc7, 0xa7, 0xde, 0x2a, 0xdc, 0xdf, 0xee, 0xf7, 0x0d, 0x57, 0x03, 0xaa, 0x7a, - 0xe2, 0xbf, 0x90, 0xfa, 0x00, 0xfb, 0x38, 0x51, 0x79, 0x75, 0x80, 0x23, 0x9f, 0xb1, 0x70, 0x48, - 0x7d, 0xa6, 0x52, 0x35, 0x8f, 0xbb, 0x02, 0xa5, 0xdd, 0x98, 0x5e, 0xe0, 0xfb, 0x24, 0xc4, 0x5a, - 0x51, 0x84, 0x33, 0x87, 0x8e, 0x62, 0x99, 0x28, 0x6b, 0xe0, 0x08, 0x14, 0xd9, 0x23, 0x4f, 0xdc, - 0xee, 0xf7, 0x29, 0x32, 0xa6, 0xda, 0x49, 0x4d, 0xf2, 0x02, 0xe0, 0x28, 0xee, 0x69, 0x6d, 0xdf, - 0x9e, 0xe7, 0xba, 0x60, 0x0b, 0x1c, 0xd9, 0x83, 0x38, 0x93, 0x03, 0x70, 0x44, 0x6d, 0x0a, 0xb2, - 0x02, 0xa5, 0xa3, 0xb8, 0x77, 0x3e, 0x3a, 0xe9, 0x60, 0x22, 0xca, 0xcb, 0xdd, 0xcc, 0x71, 0xf7, - 0x24, 0x64, 0x1f, 0xaa, 0x07, 0xe3, 0x30, 0xa0, 0xd1, 0xeb, 0xe3, 0x77, 0x87, 0xb3, 0x2e, 0xc7, - 0x05, 0x9b, 0xa7, 0xab, 0x9e, 0xf8, 0x99, 0x3c, 0x81, 0x8a, 0xbc, 0x68, 0x86, 0xd9, 0xbf, 0xc2, - 0xa2, 0xca, 0x9d, 0x19, 0x30, 0xbf, 0x04, 0x73, 0x2e, 0x2b, 0xff, 0x42, 0x1e, 0x2c, 0x74, 0x30, - 0xd9, 0x49, 0x22, 0x64, 0x35, 0x5b, 0xac, 0x64, 0x6a, 0x93, 0x4f, 0xb0, 0xf8, 0xf2, 0xf2, 0x7f, - 0xe1, 0xb5, 0xe9, 0x2c, 0x73, 0xba, 0x6f, 0x05, 0xa8, 0xa8, 0xfb, 0xf3, 0x2f, 0x74, 0x96, 0x7f, - 0xa1, 0x33, 0x4c, 0x04, 0x3c, 0x1d, 0x5d, 0xf8, 0x11, 0xf2, 0x70, 0x51, 0x84, 0x35, 0x4f, 0x1e, - 0xaa, 0x9c, 0x91, 0xc3, 0xd8, 0x81, 0x9d, 0x7f, 0xdb, 0x18, 0x9c, 0xe3, 0xd1, 0x60, 0x66, 0xca, - 0x6b, 0x30, 0xc5, 0xdb, 0x39, 0x68, 0x99, 0xf3, 0xbf, 0x45, 0xc6, 0xfc, 0x01, 0xa6, 0xfb, 0x55, - 0x26, 0xd9, 0x82, 0xb2, 0x84, 0x4d, 0x87, 0x6f, 0x41, 0x89, 0xdb, 0x7e, 0x14, 0x53, 0x79, 0x85, - 0xd3, 0xae, 0x36, 0x53, 0xb5, 0x98, 0x06, 0xba, 0x59, 0x0e, 0xb9, 0x84, 0x45, 0xa5, 0x09, 0xb2, - 0x73, 0x83, 0xe0, 0xc5, 0x3c, 0xc1, 0xb5, 0x4e, 0x2c, 0xa3, 0x13, 0x13, 0x79, 0x6e, 0x06, 0xe4, - 0x5d, 0x70, 0x5e, 0xf9, 0x6c, 0xa8, 0x70, 0x3d, 0x58, 0xe0, 0x66, 0xc4, 0xb7, 0x2b, 0xf7, 0x35, - 0xb5, 0x75, 0xd4, 0xa2, 0x39, 0x3f, 0x81, 0xb2, 0xbc, 0x24, 0x9d, 0xdf, 0x05, 0x9b, 0xdb, 0xe9, - 0x0d, 0xe2, 0x4c, 0x36, 0x61, 0xae, 0x83, 0xc9, 0xc1, 0xde, 0x1d, 0x3f, 0x7c, 0x4d, 0x63, 0x8a, - 0xab, 0x96, 0xae, 0x31, 0x0d, 0x28, 0x4b, 0x71, 0x4d, 0x01, 0x1e, 0x83, 0x25, 0x79, 0x65, 0xad, - 0x3b, 0x6d, 0xa7, 0x29, 0x94, 0x5c, 0xdc, 0xde, 0xe5, 0x7e, 0xb2, 0x07, 0x95, 0xa9, 0x74, 0xea, - 0x22, 0x39, 0x31, 0x45, 0x72, 0x92, 0x63, 0xb5, 0xc9, 0x81, 0xf6, 0x4f, 0x1b, 0xec, 0x0e, 0x26, - 0xcc, 0x6d, 0x0b, 0x85, 0x43, 0xea, 0x47, 0xc8, 0xb7, 0xbf, 0x24, 0xf1, 0x32, 0x69, 0xf5, 0xaa, - 0x9a, 0x27, 0xed, 0xf0, 0xa9, 0xf6, 0x80, 0xaa, 0x22, 0x53, 0x3f, 0x55, 0xa1, 0x6b, 0x5a, 0x03, - 0x6c, 0xfe, 0x2c, 0x6e, 0x1a, 0xd2, 0x78, 0xec, 0xb9, 0xba, 0x2b, 0x4d, 0xdf, 0x80, 0x79, 0x49, - 0x19, 0xf7, 0x81, 0x8c, 0x1a, 0x04, 0xf2, 0x96, 0x4d, 0x67, 0x56, 0x24, 0x65, 0x48, 0x15, 0x19, - 0xa2, 0xa4, 0x8a, 0x72, 0xaa, 0xb6, 0x09, 0x90, 0x09, 0xa6, 0xfb, 0x48, 0xcf, 0xd1, 0x24, 0xf4, - 0x2f, 0xc5, 0x1b, 0x30, 0x2f, 0x95, 0x41, 0x21, 0x1a, 0x3a, 0xa4, 0x8a, 0x72, 0xe2, 0xd1, 0x90, - 0xfc, 0x51, 0xab, 0xd0, 0x08, 0xaa, 0x56, 0x61, 0xd0, 0x6d, 0x0b, 0x20, 0xfb, 0x2c, 0xaa, 0x06, - 0x6f, 0x7c, 0x28, 0xbd, 0xda, 0xcd, 0x40, 0x86, 0xc7, 0xe9, 0xa5, 0xf0, 0xb4, 0xef, 0xb8, 0xc2, - 0x33, 0xd8, 0xf7, 0x5c, 0x50, 0x46, 0x80, 0xa5, 0xfd, 0x9b, 0x6c, 0xf3, 0x1e, 0xe6, 0xbc, 0xb2, - 0x6e, 0xe7, 0xd9, 0xaf, 0xab, 0x7a, 0xe1, 0xf7, 0x55, 0xbd, 0xf0, 0xfd, 0xba, 0x5e, 0xf8, 0x71, - 0x5d, 0x2f, 0x7c, 0x24, 0xda, 0x3f, 0x8e, 0x61, 0x12, 0x22, 0x3d, 0xc7, 0xfe, 0x00, 0x69, 0xab, - 0x17, 0x53, 0x1a, 0x7c, 0x69, 0xf1, 0x5b, 0x7a, 0xf3, 0xe2, 0xff, 0xc5, 0xc6, 0x9f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x32, 0xe4, 0x71, 0xd8, 0xb0, 0x08, 0x00, 0x00, + // 766 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0xd3, 0x4a, + 0x14, 0x95, 0x63, 0xb7, 0xaf, 0xb9, 0x4e, 0xf3, 0x1a, 0xbf, 0x3e, 0xbd, 0xc8, 0xea, 0x8b, 0xaa, + 0xd9, 0xb4, 0x42, 0x4a, 0x82, 0x52, 0x89, 0x05, 0x45, 0xaa, 0xfa, 0x81, 0x4a, 0x09, 0x94, 0x2a, + 0x45, 0x2c, 0x90, 0x58, 0x38, 0xcd, 0x25, 0x89, 0xda, 0xc4, 0x61, 0xc6, 0x2e, 0xf5, 0x82, 0x2d, + 0xbf, 0x8b, 0x65, 0x57, 0x88, 0x25, 0x4b, 0x94, 0xfe, 0x11, 0x34, 0x33, 0x9e, 0x78, 0xc6, 0x2d, + 0x25, 0x12, 0xbb, 0xb9, 0x5f, 0x73, 0xee, 0xbd, 0x73, 0x72, 0x1c, 0x80, 0x73, 0x4c, 0x58, 0x63, + 0x42, 0xc3, 0x28, 0xf4, 0x1c, 0x7e, 0xf6, 0x57, 0xfb, 0x61, 0x3f, 0x14, 0x8e, 0x26, 0x3f, 0xc9, + 0x98, 0x5f, 0x3a, 0xa3, 0xc9, 0x24, 0x4a, 0x2d, 0xb2, 0x01, 0xee, 0x8b, 0x21, 0x8b, 0x3a, 0xf8, + 0x21, 0x46, 0x16, 0x79, 0x55, 0xf8, 0xab, 0x8d, 0xc9, 0x71, 0x30, 0xc2, 0xaa, 0xb5, 0x6e, 0x6d, + 0x16, 0x3b, 0xca, 0x24, 0x2b, 0x50, 0x7e, 0x83, 0x74, 0xf8, 0x3e, 0xe9, 0x20, 0x9b, 0x84, 0x63, + 0x86, 0x64, 0x15, 0xbc, 0x0e, 0x8e, 0xc2, 0x4b, 0xe4, 0xf1, 0x99, 0xb7, 0x02, 0x7f, 0xef, 0xf6, + 0x7a, 0x86, 0xab, 0x0e, 0x15, 0x3d, 0xf1, 0x77, 0x48, 0x3d, 0x80, 0x43, 0x1c, 0xab, 0xbc, 0x1a, + 0xc0, 0x49, 0xc0, 0xd8, 0x64, 0x40, 0x03, 0xa6, 0x52, 0x35, 0x8f, 0xb7, 0x06, 0xc5, 0xfd, 0x98, + 0x5e, 0xe2, 0xeb, 0x64, 0x82, 0xd5, 0x82, 0x08, 0x67, 0x0e, 0x1d, 0xc5, 0x36, 0x51, 0x36, 0xc0, + 0x15, 0x28, 0xb2, 0x47, 0x9e, 0xb8, 0xdb, 0xeb, 0x51, 0x64, 0x4c, 0xb5, 0x93, 0x9a, 0xe4, 0x31, + 0xc0, 0x49, 0xdc, 0xd5, 0xda, 0xbe, 0x3b, 0xcf, 0xf3, 0xc0, 0x11, 0x38, 0xb2, 0x07, 0x71, 0x26, + 0x47, 0xe0, 0x8a, 0xda, 0x14, 0x64, 0x0d, 0x8a, 0x27, 0x71, 0xf7, 0x62, 0x78, 0xd6, 0xc6, 0x44, + 0x94, 0x97, 0x3a, 0x99, 0xe3, 0xfe, 0x49, 0xc8, 0x21, 0x54, 0x8e, 0x46, 0x93, 0x90, 0x46, 0xcf, + 0x4f, 0x5f, 0x1d, 0xcf, 0xbb, 0x1c, 0x0f, 0x1c, 0x9e, 0xae, 0x7a, 0xe2, 0x67, 0xf2, 0x00, 0xca, + 0xf2, 0xa2, 0x39, 0x66, 0xff, 0x04, 0xcb, 0x2a, 0x77, 0x6e, 0xc0, 0xfc, 0x12, 0xcc, 0xb9, 0xec, + 0xfc, 0x0b, 0xf9, 0xb0, 0xd4, 0xc6, 0x64, 0x2f, 0x89, 0x90, 0x55, 0x1d, 0xb1, 0x92, 0x99, 0x4d, + 0xde, 0xc1, 0xf2, 0xd3, 0xab, 0x3f, 0x85, 0xd7, 0xa6, 0xb3, 0xcd, 0xe9, 0x3e, 0x5b, 0x50, 0x56, + 0xf7, 0xe7, 0x5f, 0xe8, 0x3c, 0xff, 0x42, 0xe7, 0x98, 0x08, 0x78, 0x3a, 0xbc, 0x0c, 0x22, 0xe4, + 0xe1, 0x82, 0x08, 0x6b, 0x9e, 0x3c, 0x54, 0x29, 0x23, 0x87, 0xb1, 0x03, 0x27, 0xff, 0xb6, 0x31, + 0xb8, 0xa7, 0xc3, 0xfe, 0xdc, 0x94, 0xd7, 0x60, 0x0a, 0x77, 0x73, 0xd0, 0x36, 0xe7, 0x7f, 0x89, + 0x8c, 0x05, 0x7d, 0x4c, 0xf7, 0xab, 0x4c, 0xb2, 0x03, 0x25, 0x09, 0x9b, 0x0e, 0xdf, 0x84, 0x22, + 0xb7, 0x83, 0x28, 0xa6, 0xf2, 0x0a, 0xb7, 0x55, 0x69, 0xa4, 0x6a, 0x31, 0x0b, 0x74, 0xb2, 0x1c, + 0x72, 0x05, 0xcb, 0x4a, 0x13, 0x64, 0xe7, 0x06, 0xc1, 0x0b, 0x79, 0x82, 0x6b, 0x9d, 0xd8, 0x46, + 0x27, 0x26, 0xf2, 0xc2, 0x1c, 0xc8, 0xfb, 0xe0, 0x3e, 0x0b, 0xd8, 0x40, 0xe1, 0xfa, 0xb0, 0xc4, + 0xcd, 0x88, 0x6f, 0x57, 0xee, 0x6b, 0x66, 0xeb, 0xa8, 0x05, 0x73, 0x7e, 0x02, 0x25, 0x79, 0x49, + 0x3a, 0xbf, 0x07, 0x0e, 0xb7, 0xd3, 0x1b, 0xc4, 0x99, 0x6c, 0xc3, 0x42, 0x1b, 0x93, 0xa3, 0x83, + 0x7b, 0x7e, 0xf8, 0x9a, 0xc6, 0x14, 0xd6, 0x6d, 0x5d, 0x63, 0xea, 0x50, 0x92, 0xe2, 0x9a, 0x02, + 0xfc, 0x0f, 0xb6, 0xe4, 0x95, 0xbd, 0xe9, 0xb6, 0xdc, 0x86, 0x10, 0x6c, 0x71, 0x7b, 0x87, 0xfb, + 0xc9, 0x01, 0x94, 0x67, 0xd2, 0xa9, 0x8b, 0xe4, 0xd8, 0x14, 0xc9, 0x71, 0x8e, 0xd5, 0x26, 0x07, + 0x5a, 0x5f, 0x1d, 0x70, 0xda, 0x98, 0x30, 0xaf, 0x25, 0x14, 0x0e, 0x69, 0x10, 0x21, 0xdf, 0xfe, + 0x8a, 0xc4, 0xcb, 0xa4, 0xd5, 0xaf, 0x68, 0x9e, 0xb4, 0xc3, 0x87, 0xda, 0x03, 0xaa, 0x8a, 0x4c, + 0xfd, 0x54, 0x85, 0xae, 0x69, 0x75, 0x70, 0xf8, 0xb3, 0x78, 0x69, 0x48, 0xe3, 0xb1, 0xef, 0xe9, + 0xae, 0x34, 0x7d, 0x0b, 0x16, 0x25, 0x65, 0xbc, 0x7f, 0x64, 0xd4, 0x20, 0x90, 0xbf, 0x6a, 0x3a, + 0xb3, 0x22, 0x29, 0x43, 0xaa, 0xc8, 0x10, 0x25, 0x55, 0x94, 0x53, 0xb5, 0x6d, 0x80, 0x4c, 0x30, + 0xbd, 0xff, 0xf4, 0x1c, 0x4d, 0x42, 0x7f, 0x51, 0xbc, 0x05, 0x8b, 0x52, 0x19, 0x14, 0xa2, 0xa1, + 0x43, 0xaa, 0x28, 0x27, 0x1e, 0x75, 0xc9, 0x1f, 0xb5, 0x0a, 0x8d, 0xa0, 0x6a, 0x15, 0x06, 0xdd, + 0x76, 0x00, 0xb2, 0xcf, 0xa2, 0x6a, 0xf0, 0xd6, 0x87, 0xd2, 0xaf, 0xde, 0x0e, 0x64, 0x78, 0x9c, + 0x5e, 0x0a, 0x4f, 0xfb, 0x8e, 0x2b, 0x3c, 0x83, 0x7d, 0x8f, 0x04, 0x65, 0x04, 0x58, 0xda, 0xbf, + 0xc9, 0x36, 0xff, 0xdf, 0x9c, 0x57, 0xd6, 0xed, 0x3d, 0xb9, 0x9e, 0xd6, 0xac, 0x6f, 0xd3, 0x9a, + 0xf5, 0x7d, 0x5a, 0xb3, 0x7e, 0x4c, 0x6b, 0xd6, 0x97, 0x9b, 0x9a, 0x75, 0x7d, 0x53, 0xb3, 0xde, + 0x92, 0xfe, 0x30, 0x1a, 0xc4, 0xdd, 0xc6, 0x59, 0x38, 0x6a, 0x0e, 0x92, 0x09, 0xd2, 0x0b, 0xec, + 0xf5, 0x91, 0x36, 0xbb, 0x31, 0xa5, 0xe1, 0xc7, 0x26, 0xbf, 0xad, 0xbb, 0x28, 0xfe, 0x67, 0x6c, + 0xfd, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x02, 0xda, 0xb5, 0x9f, 0x08, 0x00, 0x00, +} + +func (m *ListRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +func (m *ListRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} -// 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.SupportPackageIsVersion4 +func (m *ListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.KeyName) > 0 { + i -= len(m.KeyName) + copy(dAtA[i:], m.KeyName) + i = encodeVarintKeys(dAtA, i, uint64(len(m.KeyName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} -// KeysClient is the client API for Keys service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type KeysClient interface { - GenerateKey(ctx context.Context, in *GenRequest, opts ...grpc.CallOption) (*GenResponse, error) - PublicKey(ctx context.Context, in *PubRequest, opts ...grpc.CallOption) (*PubResponse, error) - Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) - Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) - Import(ctx context.Context, in *ImportRequest, opts ...grpc.CallOption) (*ImportResponse, error) - ImportJSON(ctx context.Context, in *ImportJSONRequest, opts ...grpc.CallOption) (*ImportResponse, error) - Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ExportResponse, error) - Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error) - RemoveName(ctx context.Context, in *RemoveNameRequest, opts ...grpc.CallOption) (*RemoveNameResponse, error) - List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) - AddName(ctx context.Context, in *AddNameRequest, opts ...grpc.CallOption) (*AddNameResponse, error) +func (m *VerifyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -type keysClient struct { - cc *grpc.ClientConn +func (m *VerifyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func NewKeysClient(cc *grpc.ClientConn) KeysClient { - return &keysClient{cc} +func (m *VerifyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil } -func (c *keysClient) GenerateKey(ctx context.Context, in *GenRequest, opts ...grpc.CallOption) (*GenResponse, error) { - out := new(GenResponse) - err := c.cc.Invoke(ctx, "/keys.Keys/GenerateKey", in, out, opts...) +func (m *RemoveNameResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *keysClient) PublicKey(ctx context.Context, in *PubRequest, opts ...grpc.CallOption) (*PubResponse, error) { - out := new(PubResponse) - err := c.cc.Invoke(ctx, "/keys.Keys/PublicKey", in, out, opts...) - if err != nil { - return nil, err +func (m *RemoveNameResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveNameResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return out, nil + return len(dAtA) - i, nil } -func (c *keysClient) Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) { - out := new(SignResponse) - err := c.cc.Invoke(ctx, "/keys.Keys/Sign", in, out, opts...) +func (m *AddNameResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *keysClient) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) { - out := new(VerifyResponse) - err := c.cc.Invoke(ctx, "/keys.Keys/Verify", in, out, opts...) - if err != nil { - return nil, err +func (m *AddNameResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddNameResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return out, nil + return len(dAtA) - i, nil } -func (c *keysClient) Import(ctx context.Context, in *ImportRequest, opts ...grpc.CallOption) (*ImportResponse, error) { - out := new(ImportResponse) - err := c.cc.Invoke(ctx, "/keys.Keys/Import", in, out, opts...) +func (m *RemoveNameRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *keysClient) ImportJSON(ctx context.Context, in *ImportJSONRequest, opts ...grpc.CallOption) (*ImportResponse, error) { - out := new(ImportResponse) - err := c.cc.Invoke(ctx, "/keys.Keys/ImportJSON", in, out, opts...) - if err != nil { - return nil, err +func (m *RemoveNameRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveNameRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.KeyName) > 0 { + i -= len(m.KeyName) + copy(dAtA[i:], m.KeyName) + i = encodeVarintKeys(dAtA, i, uint64(len(m.KeyName))) + i-- + dAtA[i] = 0xa } - return out, nil + return len(dAtA) - i, nil } -func (c *keysClient) Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ExportResponse, error) { - out := new(ExportResponse) - err := c.cc.Invoke(ctx, "/keys.Keys/Export", in, out, opts...) +func (m *GenRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil +} + +func (m *GenRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (c *keysClient) Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error) { - out := new(HashResponse) - err := c.cc.Invoke(ctx, "/keys.Keys/Hash", in, out, opts...) +func (m *GenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.KeyName) > 0 { + i -= len(m.KeyName) + copy(dAtA[i:], m.KeyName) + i = encodeVarintKeys(dAtA, i, uint64(len(m.KeyName))) + i-- + dAtA[i] = 0x1a + } + if len(m.CurveType) > 0 { + i -= len(m.CurveType) + copy(dAtA[i:], m.CurveType) + i = encodeVarintKeys(dAtA, i, uint64(len(m.CurveType))) + i-- + dAtA[i] = 0x12 + } + if len(m.Passphrase) > 0 { + i -= len(m.Passphrase) + copy(dAtA[i:], m.Passphrase) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Passphrase))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GenResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *keysClient) RemoveName(ctx context.Context, in *RemoveNameRequest, opts ...grpc.CallOption) (*RemoveNameResponse, error) { - out := new(RemoveNameResponse) - err := c.cc.Invoke(ctx, "/keys.Keys/RemoveName", in, out, opts...) - if err != nil { - return nil, err +func (m *GenResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return out, nil + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (c *keysClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { - out := new(ListResponse) - err := c.cc.Invoke(ctx, "/keys.Keys/List", in, out, opts...) +func (m *PubRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil +} + +func (m *PubRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (c *keysClient) AddName(ctx context.Context, in *AddNameRequest, opts ...grpc.CallOption) (*AddNameResponse, error) { - out := new(AddNameResponse) - err := c.cc.Invoke(ctx, "/keys.Keys/AddName", in, out, opts...) +func (m *PubRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PubResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -// KeysServer is the server API for Keys service. -type KeysServer interface { - GenerateKey(context.Context, *GenRequest) (*GenResponse, error) - PublicKey(context.Context, *PubRequest) (*PubResponse, error) - Sign(context.Context, *SignRequest) (*SignResponse, error) - Verify(context.Context, *VerifyRequest) (*VerifyResponse, error) - Import(context.Context, *ImportRequest) (*ImportResponse, error) - ImportJSON(context.Context, *ImportJSONRequest) (*ImportResponse, error) - Export(context.Context, *ExportRequest) (*ExportResponse, error) - Hash(context.Context, *HashRequest) (*HashResponse, error) - RemoveName(context.Context, *RemoveNameRequest) (*RemoveNameResponse, error) - List(context.Context, *ListRequest) (*ListResponse, error) - AddName(context.Context, *AddNameRequest) (*AddNameResponse, error) +func (m *PubResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -// UnimplementedKeysServer can be embedded to have forward compatible implementations. -type UnimplementedKeysServer struct { +func (m *PubResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.CurveType) > 0 { + i -= len(m.CurveType) + copy(dAtA[i:], m.CurveType) + i = encodeVarintKeys(dAtA, i, uint64(len(m.CurveType))) + i-- + dAtA[i] = 0x12 + } + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintKeys(dAtA, i, uint64(len(m.PublicKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ImportJSONRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (*UnimplementedKeysServer) GenerateKey(ctx context.Context, req *GenRequest) (*GenResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GenerateKey not implemented") -} -func (*UnimplementedKeysServer) PublicKey(ctx context.Context, req *PubRequest) (*PubResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PublicKey not implemented") +func (m *ImportJSONRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (*UnimplementedKeysServer) Sign(ctx context.Context, req *SignRequest) (*SignResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented") -} -func (*UnimplementedKeysServer) Verify(ctx context.Context, req *VerifyRequest) (*VerifyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") -} -func (*UnimplementedKeysServer) Import(ctx context.Context, req *ImportRequest) (*ImportResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Import not implemented") -} -func (*UnimplementedKeysServer) ImportJSON(ctx context.Context, req *ImportJSONRequest) (*ImportResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImportJSON not implemented") -} -func (*UnimplementedKeysServer) Export(ctx context.Context, req *ExportRequest) (*ExportResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") -} -func (*UnimplementedKeysServer) Hash(ctx context.Context, req *HashRequest) (*HashResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Hash not implemented") -} -func (*UnimplementedKeysServer) RemoveName(ctx context.Context, req *RemoveNameRequest) (*RemoveNameResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveName not implemented") -} -func (*UnimplementedKeysServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") -} -func (*UnimplementedKeysServer) AddName(ctx context.Context, req *AddNameRequest) (*AddNameResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddName not implemented") + +func (m *ImportJSONRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.JSON) > 0 { + i -= len(m.JSON) + copy(dAtA[i:], m.JSON) + i = encodeVarintKeys(dAtA, i, uint64(len(m.JSON))) + i-- + dAtA[i] = 0x12 + } + if len(m.Passphrase) > 0 { + i -= len(m.Passphrase) + copy(dAtA[i:], m.Passphrase) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Passphrase))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ImportResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func RegisterKeysServer(s *grpc.Server, srv KeysServer) { - s.RegisterService(&_Keys_serviceDesc, srv) +func (m *ImportResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func _Keys_GenerateKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GenRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeysServer).GenerateKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/keys.Keys/GenerateKey", +func (m *ImportResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).GenerateKey(ctx, req.(*GenRequest)) + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa } - return interceptor(ctx, in, info, handler) + return len(dAtA) - i, nil } -func _Keys_PublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PubRequest) - if err := dec(in); err != nil { +func (m *ImportRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(KeysServer).PublicKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/keys.Keys/PublicKey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).PublicKey(ctx, req.(*PubRequest)) - } - return interceptor(ctx, in, info, handler) + return dAtA[:n], nil +} + +func (m *ImportRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func _Keys_Sign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignRequest) - if err := dec(in); err != nil { +func (m *ImportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.KeyBytes) > 0 { + i -= len(m.KeyBytes) + copy(dAtA[i:], m.KeyBytes) + i = encodeVarintKeys(dAtA, i, uint64(len(m.KeyBytes))) + i-- + dAtA[i] = 0x22 + } + if len(m.CurveType) > 0 { + i -= len(m.CurveType) + copy(dAtA[i:], m.CurveType) + i = encodeVarintKeys(dAtA, i, uint64(len(m.CurveType))) + i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Passphrase) > 0 { + i -= len(m.Passphrase) + copy(dAtA[i:], m.Passphrase) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Passphrase))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExportRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(KeysServer).Sign(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/keys.Keys/Sign", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).Sign(ctx, req.(*SignRequest)) - } - return interceptor(ctx, in, info, handler) + return dAtA[:n], nil } -func _Keys_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VerifyRequest) - if err := dec(in); err != nil { +func (m *ExportRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Passphrase) > 0 { + i -= len(m.Passphrase) + copy(dAtA[i:], m.Passphrase) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Passphrase))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExportResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(KeysServer).Verify(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/keys.Keys/Verify", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).Verify(ctx, req.(*VerifyRequest)) - } - return interceptor(ctx, in, info, handler) + return dAtA[:n], nil +} + +func (m *ExportResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func _Keys_Import_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ImportRequest) - if err := dec(in); err != nil { +func (m *ExportResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.CurveType) > 0 { + i -= len(m.CurveType) + copy(dAtA[i:], m.CurveType) + i = encodeVarintKeys(dAtA, i, uint64(len(m.CurveType))) + i-- + dAtA[i] = 0x22 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x1a + } + if len(m.Privatekey) > 0 { + i -= len(m.Privatekey) + copy(dAtA[i:], m.Privatekey) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Privatekey))) + i-- + dAtA[i] = 0x12 + } + if len(m.Publickey) > 0 { + i -= len(m.Publickey) + copy(dAtA[i:], m.Publickey) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Publickey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SignRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(KeysServer).Import(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/keys.Keys/Import", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).Import(ctx, req.(*ImportRequest)) - } - return interceptor(ctx, in, info, handler) + return dAtA[:n], nil } -func _Keys_ImportJSON_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ImportJSONRequest) - if err := dec(in); err != nil { +func (m *SignRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x22 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.Passphrase) > 0 { + i -= len(m.Passphrase) + copy(dAtA[i:], m.Passphrase) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Passphrase))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SignResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(KeysServer).ImportJSON(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/keys.Keys/ImportJSON", + return dAtA[:n], nil +} + +func (m *SignResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).ImportJSON(ctx, req.(*ImportJSONRequest)) + if m.Signature != nil { + { + size, err := m.Signature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintKeys(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - return interceptor(ctx, in, info, handler) + return len(dAtA) - i, nil } -func _Keys_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExportRequest) - if err := dec(in); err != nil { +func (m *VerifyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(KeysServer).Export(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/keys.Keys/Export", + return dAtA[:n], nil +} + +func (m *VerifyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VerifyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).Export(ctx, req.(*ExportRequest)) + if m.Signature != nil { + { + size, err := m.Signature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintKeys(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x1a + } + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintKeys(dAtA, i, uint64(len(m.PublicKey))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *HashRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return dAtA[:n], nil } -func _Keys_Hash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HashRequest) - if err := dec(in); err != nil { +func (m *HashRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HashRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + if len(m.Hashtype) > 0 { + i -= len(m.Hashtype) + copy(dAtA[i:], m.Hashtype) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Hashtype))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HashResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(KeysServer).Hash(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/keys.Keys/Hash", + return dAtA[:n], nil +} + +func (m *HashResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HashResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).Hash(ctx, req.(*HashRequest)) + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa } - return interceptor(ctx, in, info, handler) + return len(dAtA) - i, nil } -func _Keys_RemoveName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveNameRequest) - if err := dec(in); err != nil { +func (m *KeyID) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(KeysServer).RemoveName(ctx, in) + return dAtA[:n], nil +} + +func (m *KeyID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KeyID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/keys.Keys/RemoveName", + if len(m.KeyName) > 0 { + for iNdEx := len(m.KeyName) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.KeyName[iNdEx]) + copy(dAtA[i:], m.KeyName[iNdEx]) + i = encodeVarintKeys(dAtA, i, uint64(len(m.KeyName[iNdEx]))) + i-- + dAtA[i] = 0x12 + } } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).RemoveName(ctx, req.(*RemoveNameRequest)) + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa } - return interceptor(ctx, in, info, handler) + return len(dAtA) - i, nil } -func _Keys_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListRequest) - if err := dec(in); err != nil { +func (m *ListResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(KeysServer).List(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/keys.Keys/List", + return dAtA[:n], nil +} + +func (m *ListResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).List(ctx, req.(*ListRequest)) + if len(m.Key) > 0 { + for iNdEx := len(m.Key) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Key[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintKeys(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return interceptor(ctx, in, info, handler) + return len(dAtA) - i, nil } -func _Keys_AddName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddNameRequest) - if err := dec(in); err != nil { +func (m *AddNameRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(KeysServer).AddName(ctx, in) + return dAtA[:n], nil +} + +func (m *AddNameRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddNameRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/keys.Keys/AddName", + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).AddName(ctx, req.(*AddNameRequest)) + if len(m.Keyname) > 0 { + i -= len(m.Keyname) + copy(dAtA[i:], m.Keyname) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Keyname))) + i-- + dAtA[i] = 0xa } - return interceptor(ctx, in, info, handler) + return len(dAtA) - i, nil } -var _Keys_serviceDesc = grpc.ServiceDesc{ - ServiceName: "keys.Keys", - HandlerType: (*KeysServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GenerateKey", - Handler: _Keys_GenerateKey_Handler, - }, - { - MethodName: "PublicKey", - Handler: _Keys_PublicKey_Handler, - }, - { - MethodName: "Sign", - Handler: _Keys_Sign_Handler, - }, - { - MethodName: "Verify", - Handler: _Keys_Verify_Handler, - }, - { - MethodName: "Import", - Handler: _Keys_Import_Handler, - }, - { - MethodName: "ImportJSON", - Handler: _Keys_ImportJSON_Handler, - }, - { - MethodName: "Export", - Handler: _Keys_Export_Handler, - }, - { - MethodName: "Hash", - Handler: _Keys_Hash_Handler, - }, - { - MethodName: "RemoveName", - Handler: _Keys_RemoveName_Handler, - }, - { - MethodName: "List", - Handler: _Keys_List_Handler, - }, - { - MethodName: "AddName", - Handler: _Keys_AddName_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "keys.proto", +func encodeVarintKeys(dAtA []byte, offset int, v uint64) int { + offset -= sovKeys(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base } - func (m *ListRequest) Size() (n int) { if m == nil { return 0 @@ -2073,3 +2644,2517 @@ func sovKeys(x uint64) (n int) { func sozKeys(x uint64) (n int) { return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *ListRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VerifyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveNameResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveNameResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveNameResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AddNameResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AddNameResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AddNameResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveNameRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveNameRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveNameRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Passphrase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Passphrase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurveType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurveType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PubRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PubRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PubRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PubResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PubResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PubResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if m.PublicKey == nil { + m.PublicKey = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurveType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurveType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportJSONRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImportJSONRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportJSONRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Passphrase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Passphrase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JSON", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JSON = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImportResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImportRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Passphrase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Passphrase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurveType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurveType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyBytes = append(m.KeyBytes[:0], dAtA[iNdEx:postIndex]...) + if m.KeyBytes == nil { + m.KeyBytes = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Passphrase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Passphrase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Publickey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Publickey = append(m.Publickey[:0], dAtA[iNdEx:postIndex]...) + if m.Publickey == nil { + m.Publickey = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Privatekey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Privatekey = append(m.Privatekey[:0], dAtA[iNdEx:postIndex]...) + if m.Privatekey == nil { + m.Privatekey = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurveType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurveType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Passphrase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Passphrase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = append(m.Message[:0], dAtA[iNdEx:postIndex]...) + if m.Message == nil { + m.Message = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &crypto.Signature{} + } + if err := m.Signature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VerifyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if m.PublicKey == nil { + m.PublicKey = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = append(m.Message[:0], dAtA[iNdEx:postIndex]...) + if m.Message == nil { + m.Message = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &crypto.Signature{} + } + if err := m.Signature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HashRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HashRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HashRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hashtype", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hashtype = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = append(m.Message[:0], dAtA[iNdEx:postIndex]...) + if m.Message == nil { + m.Message = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HashResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HashResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HashResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KeyID) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KeyID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KeyID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyName = append(m.KeyName, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key, &KeyID{}) + if err := m.Key[len(m.Key)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AddNameRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AddNameRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AddNameRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keyname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keyname = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipKeys(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowKeys + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowKeys + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowKeys + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthKeys + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupKeys + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthKeys + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group") +) diff --git a/keys/keys_grpc.pb.go b/keys/keys_grpc.pb.go new file mode 100644 index 000000000..5b50d28d2 --- /dev/null +++ b/keys/keys_grpc.pb.go @@ -0,0 +1,458 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package keys + +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. +const _ = grpc.SupportPackageIsVersion7 + +// KeysClient is the client API for Keys 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 KeysClient interface { + GenerateKey(ctx context.Context, in *GenRequest, opts ...grpc.CallOption) (*GenResponse, error) + PublicKey(ctx context.Context, in *PubRequest, opts ...grpc.CallOption) (*PubResponse, error) + Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) + Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) + Import(ctx context.Context, in *ImportRequest, opts ...grpc.CallOption) (*ImportResponse, error) + ImportJSON(ctx context.Context, in *ImportJSONRequest, opts ...grpc.CallOption) (*ImportResponse, error) + Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ExportResponse, error) + Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error) + RemoveName(ctx context.Context, in *RemoveNameRequest, opts ...grpc.CallOption) (*RemoveNameResponse, error) + List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) + AddName(ctx context.Context, in *AddNameRequest, opts ...grpc.CallOption) (*AddNameResponse, error) +} + +type keysClient struct { + cc grpc.ClientConnInterface +} + +func NewKeysClient(cc grpc.ClientConnInterface) KeysClient { + return &keysClient{cc} +} + +func (c *keysClient) GenerateKey(ctx context.Context, in *GenRequest, opts ...grpc.CallOption) (*GenResponse, error) { + out := new(GenResponse) + err := c.cc.Invoke(ctx, "/keys.Keys/GenerateKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) PublicKey(ctx context.Context, in *PubRequest, opts ...grpc.CallOption) (*PubResponse, error) { + out := new(PubResponse) + err := c.cc.Invoke(ctx, "/keys.Keys/PublicKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) { + out := new(SignResponse) + err := c.cc.Invoke(ctx, "/keys.Keys/Sign", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) { + out := new(VerifyResponse) + err := c.cc.Invoke(ctx, "/keys.Keys/Verify", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) Import(ctx context.Context, in *ImportRequest, opts ...grpc.CallOption) (*ImportResponse, error) { + out := new(ImportResponse) + err := c.cc.Invoke(ctx, "/keys.Keys/Import", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) ImportJSON(ctx context.Context, in *ImportJSONRequest, opts ...grpc.CallOption) (*ImportResponse, error) { + out := new(ImportResponse) + err := c.cc.Invoke(ctx, "/keys.Keys/ImportJSON", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ExportResponse, error) { + out := new(ExportResponse) + err := c.cc.Invoke(ctx, "/keys.Keys/Export", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error) { + out := new(HashResponse) + err := c.cc.Invoke(ctx, "/keys.Keys/Hash", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) RemoveName(ctx context.Context, in *RemoveNameRequest, opts ...grpc.CallOption) (*RemoveNameResponse, error) { + out := new(RemoveNameResponse) + err := c.cc.Invoke(ctx, "/keys.Keys/RemoveName", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { + out := new(ListResponse) + err := c.cc.Invoke(ctx, "/keys.Keys/List", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keysClient) AddName(ctx context.Context, in *AddNameRequest, opts ...grpc.CallOption) (*AddNameResponse, error) { + out := new(AddNameResponse) + err := c.cc.Invoke(ctx, "/keys.Keys/AddName", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// KeysServer is the server API for Keys service. +// All implementations must embed UnimplementedKeysServer +// for forward compatibility +type KeysServer interface { + GenerateKey(context.Context, *GenRequest) (*GenResponse, error) + PublicKey(context.Context, *PubRequest) (*PubResponse, error) + Sign(context.Context, *SignRequest) (*SignResponse, error) + Verify(context.Context, *VerifyRequest) (*VerifyResponse, error) + Import(context.Context, *ImportRequest) (*ImportResponse, error) + ImportJSON(context.Context, *ImportJSONRequest) (*ImportResponse, error) + Export(context.Context, *ExportRequest) (*ExportResponse, error) + Hash(context.Context, *HashRequest) (*HashResponse, error) + RemoveName(context.Context, *RemoveNameRequest) (*RemoveNameResponse, error) + List(context.Context, *ListRequest) (*ListResponse, error) + AddName(context.Context, *AddNameRequest) (*AddNameResponse, error) + mustEmbedUnimplementedKeysServer() +} + +// UnimplementedKeysServer must be embedded to have forward compatible implementations. +type UnimplementedKeysServer struct { +} + +func (UnimplementedKeysServer) GenerateKey(context.Context, *GenRequest) (*GenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GenerateKey not implemented") +} +func (UnimplementedKeysServer) PublicKey(context.Context, *PubRequest) (*PubResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PublicKey not implemented") +} +func (UnimplementedKeysServer) Sign(context.Context, *SignRequest) (*SignResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented") +} +func (UnimplementedKeysServer) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") +} +func (UnimplementedKeysServer) Import(context.Context, *ImportRequest) (*ImportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Import not implemented") +} +func (UnimplementedKeysServer) ImportJSON(context.Context, *ImportJSONRequest) (*ImportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportJSON not implemented") +} +func (UnimplementedKeysServer) Export(context.Context, *ExportRequest) (*ExportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") +} +func (UnimplementedKeysServer) Hash(context.Context, *HashRequest) (*HashResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Hash not implemented") +} +func (UnimplementedKeysServer) RemoveName(context.Context, *RemoveNameRequest) (*RemoveNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveName not implemented") +} +func (UnimplementedKeysServer) List(context.Context, *ListRequest) (*ListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedKeysServer) AddName(context.Context, *AddNameRequest) (*AddNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddName not implemented") +} +func (UnimplementedKeysServer) mustEmbedUnimplementedKeysServer() {} + +// UnsafeKeysServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to KeysServer will +// result in compilation errors. +type UnsafeKeysServer interface { + mustEmbedUnimplementedKeysServer() +} + +func RegisterKeysServer(s grpc.ServiceRegistrar, srv KeysServer) { + s.RegisterService(&_Keys_serviceDesc, srv) +} + +func _Keys_GenerateKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).GenerateKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keys.Keys/GenerateKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).GenerateKey(ctx, req.(*GenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_PublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PubRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).PublicKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keys.Keys/PublicKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).PublicKey(ctx, req.(*PubRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_Sign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).Sign(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keys.Keys/Sign", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).Sign(ctx, req.(*SignRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VerifyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).Verify(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keys.Keys/Verify", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).Verify(ctx, req.(*VerifyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_Import_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).Import(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keys.Keys/Import", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).Import(ctx, req.(*ImportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_ImportJSON_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportJSONRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).ImportJSON(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keys.Keys/ImportJSON", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).ImportJSON(ctx, req.(*ImportJSONRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).Export(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keys.Keys/Export", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).Export(ctx, req.(*ExportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_Hash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).Hash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keys.Keys/Hash", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).Hash(ctx, req.(*HashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_RemoveName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).RemoveName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keys.Keys/RemoveName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).RemoveName(ctx, req.(*RemoveNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keys.Keys/List", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).List(ctx, req.(*ListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Keys_AddName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeysServer).AddName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keys.Keys/AddName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeysServer).AddName(ctx, req.(*AddNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Keys_serviceDesc = grpc.ServiceDesc{ + ServiceName: "keys.Keys", + HandlerType: (*KeysServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GenerateKey", + Handler: _Keys_GenerateKey_Handler, + }, + { + MethodName: "PublicKey", + Handler: _Keys_PublicKey_Handler, + }, + { + MethodName: "Sign", + Handler: _Keys_Sign_Handler, + }, + { + MethodName: "Verify", + Handler: _Keys_Verify_Handler, + }, + { + MethodName: "Import", + Handler: _Keys_Import_Handler, + }, + { + MethodName: "ImportJSON", + Handler: _Keys_ImportJSON_Handler, + }, + { + MethodName: "Export", + Handler: _Keys_Export_Handler, + }, + { + MethodName: "Hash", + Handler: _Keys_Hash_Handler, + }, + { + MethodName: "RemoveName", + Handler: _Keys_RemoveName_Handler, + }, + { + MethodName: "List", + Handler: _Keys_List_Handler, + }, + { + MethodName: "AddName", + Handler: _Keys_AddName_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "keys.proto", +} diff --git a/permission/permission.pb.go b/permission/permission.pb.go index 73b8cb583..257e88f4b 100644 --- a/permission/permission.pb.go +++ b/permission/permission.pb.go @@ -43,16 +43,12 @@ func (m *AccountPermissions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AccountPermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountPermissions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *AccountPermissions) XXX_Merge(src proto.Message) { xxx_messageInfo_AccountPermissions.Merge(m, src) @@ -99,16 +95,12 @@ func (m *BasePermissions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *BasePermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BasePermissions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *BasePermissions) XXX_Merge(src proto.Message) { xxx_messageInfo_BasePermissions.Merge(m, src) @@ -162,16 +154,12 @@ func (m *PermArgs) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PermArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PermArgs.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *PermArgs) XXX_Merge(src proto.Message) { xxx_messageInfo_PermArgs.Merge(m, src) @@ -229,30 +217,30 @@ func init() { proto.RegisterFile("permission.proto", fileDescriptor_c837ef01cbda func init() { golang_proto.RegisterFile("permission.proto", fileDescriptor_c837ef01cbda0ad8) } var fileDescriptor_c837ef01cbda0ad8 = []byte{ - // 367 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x31, 0x4f, 0xc2, 0x40, - 0x14, 0xc7, 0x7b, 0x50, 0x48, 0x39, 0x49, 0x24, 0x17, 0x87, 0x46, 0x93, 0xb6, 0x61, 0x30, 0x1d, - 0xb0, 0x35, 0x26, 0x2e, 0x0c, 0x26, 0xed, 0x60, 0x1c, 0x4d, 0x35, 0x0e, 0x6e, 0xa5, 0x9c, 0xa5, - 0xb1, 0x70, 0xf5, 0xee, 0x1a, 0xc3, 0xb7, 0x70, 0x64, 0x54, 0x3e, 0x89, 0x23, 0x23, 0xb3, 0x03, - 0x21, 0xf0, 0x2d, 0x9c, 0xcc, 0x5d, 0x09, 0x54, 0x13, 0xdc, 0xee, 0xff, 0xfe, 0xff, 0xf7, 0x7e, - 0x7d, 0xaf, 0xb0, 0x95, 0x61, 0x3a, 0x4c, 0x18, 0x4b, 0xc8, 0xc8, 0xc9, 0x28, 0xe1, 0x04, 0xc1, - 0x5d, 0xe5, 0xf8, 0x2c, 0x4e, 0xf8, 0x20, 0xef, 0x39, 0x11, 0x19, 0xba, 0x31, 0x89, 0x89, 0x2b, - 0x23, 0xbd, 0xfc, 0x49, 0x2a, 0x29, 0xe4, 0xab, 0x68, 0x6d, 0x3f, 0x43, 0xe4, 0x45, 0x11, 0xc9, - 0x47, 0xfc, 0x76, 0x3b, 0x83, 0xa1, 0x4b, 0xa8, 0xfa, 0x21, 0xc3, 0x3a, 0xb0, 0x80, 0x7d, 0x70, - 0x71, 0xe2, 0x94, 0x88, 0xa2, 0x5e, 0x8a, 0xfa, 0xea, 0x6c, 0x61, 0x2a, 0x81, 0x8c, 0xa3, 0x23, - 0x58, 0x0b, 0x48, 0x8a, 0x99, 0x5e, 0xb1, 0xaa, 0x76, 0x23, 0x28, 0x44, 0x57, 0x7b, 0x9b, 0x9a, - 0xca, 0x64, 0x6a, 0x2a, 0xed, 0x17, 0x78, 0xf8, 0xa7, 0x1d, 0x9d, 0xc2, 0x9a, 0x90, 0x4c, 0xa2, - 0x54, 0xbf, 0x25, 0xa6, 0x7d, 0x2f, 0x4c, 0x4d, 0x14, 0xaf, 0xd3, 0x30, 0x0e, 0x0a, 0x1b, 0xd9, - 0xb0, 0x7e, 0x87, 0xb9, 0x9f, 0x70, 0xbd, 0xb2, 0x27, 0xb8, 0xf1, 0xbb, 0xcd, 0xc9, 0xbb, 0xa9, - 0x6c, 0x91, 0x4b, 0x00, 0x65, 0xc4, 0xa3, 0xb1, 0x1c, 0xe2, 0x45, 0x3c, 0x21, 0xa3, 0xbd, 0xb4, - 0x8d, 0x8f, 0x6e, 0x60, 0xfd, 0x3e, 0xa4, 0x31, 0x2e, 0x70, 0x4d, 0xff, 0xfc, 0x6b, 0x61, 0x76, - 0x4a, 0x97, 0x1d, 0x8c, 0x33, 0x4c, 0x53, 0xdc, 0x8f, 0x31, 0x75, 0x7b, 0x39, 0xa5, 0xe4, 0xd5, - 0x8d, 0xe8, 0x38, 0xe3, 0xc4, 0xf1, 0xfa, 0x7d, 0x8a, 0x19, 0x0b, 0x36, 0xfd, 0xa8, 0x03, 0xe1, - 0x6e, 0x5f, 0xbd, 0x2a, 0xb9, 0xcd, 0x5f, 0xcc, 0x92, 0x8f, 0x10, 0x54, 0xc5, 0xd1, 0x74, 0xd5, - 0x02, 0x76, 0x23, 0x90, 0x6f, 0x71, 0xd5, 0x87, 0x30, 0xcd, 0xb1, 0x5e, 0xb3, 0x80, 0xad, 0x05, - 0x85, 0xe8, 0x6a, 0x62, 0xcd, 0xf9, 0x87, 0xa9, 0xf8, 0x57, 0xb3, 0x95, 0x01, 0xe6, 0x2b, 0x03, - 0x2c, 0x57, 0x06, 0xf8, 0x5c, 0x1b, 0x60, 0xb6, 0x36, 0xc0, 0xa3, 0xfd, 0xff, 0xd7, 0xee, 0xfe, - 0xe8, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xa6, 0x3c, 0xf5, 0x50, 0x02, 0x00, 0x00, + // 363 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0xb1, 0x6e, 0xea, 0x30, + 0x14, 0x8d, 0x21, 0xa0, 0xe0, 0x87, 0xf4, 0x90, 0xc5, 0x10, 0xbd, 0x27, 0x25, 0x11, 0xc3, 0x53, + 0x06, 0x94, 0x3c, 0x55, 0xea, 0xc2, 0x96, 0x0c, 0x55, 0xc7, 0x2a, 0xad, 0x3a, 0x74, 0x0b, 0xc1, + 0x32, 0x51, 0x03, 0x4e, 0x6d, 0x47, 0x15, 0x7f, 0xd1, 0x91, 0xb1, 0xe5, 0x4b, 0x3a, 0x32, 0x32, + 0x56, 0x1d, 0x10, 0x0a, 0x7f, 0xd1, 0xa9, 0xb2, 0x83, 0x80, 0x56, 0xa2, 0xdb, 0xbd, 0xe7, 0x9c, + 0x7b, 0x8e, 0xef, 0x35, 0xec, 0xe4, 0x98, 0x4d, 0x52, 0xce, 0x53, 0x3a, 0xf5, 0x72, 0x46, 0x05, + 0x45, 0xf0, 0x80, 0xfc, 0xe9, 0x12, 0x4a, 0xa8, 0x82, 0x7d, 0x59, 0x55, 0x8a, 0xde, 0x3d, 0x44, + 0x41, 0x92, 0xd0, 0x62, 0x2a, 0xae, 0xf6, 0x52, 0x8e, 0xce, 0xa1, 0x1e, 0xc6, 0x1c, 0x9b, 0xc0, + 0x01, 0xee, 0xaf, 0xb3, 0xbf, 0xde, 0x91, 0xb1, 0xc4, 0x8f, 0xa4, 0xa1, 0xbe, 0x5c, 0xdb, 0x5a, + 0xa4, 0xe4, 0xa8, 0x0b, 0x1b, 0x11, 0xcd, 0x30, 0x37, 0x6b, 0x4e, 0xdd, 0x6d, 0x45, 0x55, 0x33, + 0x30, 0x9e, 0x16, 0xb6, 0x36, 0x5f, 0xd8, 0x5a, 0xef, 0x01, 0xfe, 0xfe, 0x36, 0x8e, 0xfe, 0xc1, + 0x86, 0x6c, 0xb9, 0x8a, 0xd2, 0xc3, 0x8e, 0x74, 0xfb, 0x58, 0xdb, 0x86, 0x04, 0x2f, 0xb2, 0x98, + 0x44, 0x15, 0x8d, 0x5c, 0xd8, 0xbc, 0xc6, 0x22, 0x4c, 0x85, 0x59, 0x3b, 0x21, 0xdc, 0xf1, 0x83, + 0xf6, 0xfc, 0xd9, 0xd6, 0xf6, 0x91, 0x1b, 0x00, 0x95, 0x24, 0x60, 0x44, 0x99, 0x04, 0x89, 0x48, + 0xe9, 0xf4, 0x64, 0xda, 0x8e, 0x47, 0x97, 0xb0, 0x79, 0x13, 0x33, 0x82, 0xab, 0xb8, 0x76, 0xf8, + 0xff, 0x7d, 0x6d, 0xf7, 0x49, 0x2a, 0xc6, 0xc5, 0xd0, 0x4b, 0xe8, 0xc4, 0x1f, 0xcf, 0x72, 0xcc, + 0x32, 0x3c, 0x22, 0x98, 0xf9, 0xc3, 0x82, 0x31, 0xfa, 0xe8, 0x27, 0x6c, 0x96, 0x0b, 0xea, 0x05, + 0xa3, 0x11, 0xc3, 0x9c, 0x47, 0xbb, 0x79, 0xd4, 0x87, 0xf0, 0xb0, 0xaf, 0x59, 0x57, 0xb9, 0xed, + 0x2f, 0x99, 0x47, 0x3c, 0x42, 0x50, 0x97, 0x47, 0x33, 0x75, 0x07, 0xb8, 0xad, 0x48, 0xd5, 0xf2, + 0xaa, 0xb7, 0x71, 0x56, 0x60, 0xb3, 0xe1, 0x00, 0xd7, 0x88, 0xaa, 0x66, 0x60, 0xc8, 0x35, 0x57, + 0x2f, 0xb6, 0x16, 0x86, 0xcb, 0xd2, 0x02, 0xab, 0xd2, 0x02, 0x6f, 0xa5, 0x05, 0x36, 0xa5, 0x05, + 0x5e, 0xb7, 0x16, 0x58, 0x6e, 0x2d, 0x70, 0xe7, 0xfe, 0xfc, 0xe2, 0xc3, 0xaf, 0x7e, 0x06, 0x00, + 0x00, 0xff, 0xff, 0x7e, 0x9f, 0xab, 0xe6, 0x3b, 0x02, 0x00, 0x00, } func (m *AccountPermissions) Marshal() (dAtA []byte, err error) { @@ -569,10 +557,7 @@ func (m *AccountPermissions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPermission - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPermission } if (iNdEx + skippy) > l { @@ -661,10 +646,7 @@ func (m *BasePermissions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPermission - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPermission } if (iNdEx + skippy) > l { @@ -843,10 +825,7 @@ func (m *PermArgs) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPermission - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPermission } if (iNdEx + skippy) > l { diff --git a/protobuf/acm.proto b/protobuf/acm.proto index cd3eac389..2cc03dc4c 100644 --- a/protobuf/acm.proto +++ b/protobuf/acm.proto @@ -4,7 +4,7 @@ package acm; option go_package = "github.com/hyperledger/burrow/acm"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; import "permission.proto"; import "crypto.proto"; diff --git a/protobuf/balance.proto b/protobuf/balance.proto index eefaf786c..565469357 100644 --- a/protobuf/balance.proto +++ b/protobuf/balance.proto @@ -2,7 +2,7 @@ syntax = 'proto3'; option go_package = "github.com/hyperledger/burrow/acm/balance"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; package balance; diff --git a/protobuf/bcm.proto b/protobuf/bcm.proto index 7c81bfb8b..1e28eac47 100644 --- a/protobuf/bcm.proto +++ b/protobuf/bcm.proto @@ -3,7 +3,7 @@ syntax = 'proto3'; option go_package = "github.com/hyperledger/burrow/bcm"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; @@ -17,7 +17,7 @@ option (gogoproto.goproto_registration) = true; option (gogoproto.messagename_all) = true; message SyncInfo { - uint64 LatestBlockHeight = 1 [(gogoproto.jsontag) = ""]; + uint64 LatestBlockHeight = 1; bytes LatestBlockHash = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; bytes LatestAppHash = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; // Timestamp of block as set by the block proposer diff --git a/protobuf/crypto.proto b/protobuf/crypto.proto index 5fb24c09c..fd041789b 100644 --- a/protobuf/crypto.proto +++ b/protobuf/crypto.proto @@ -4,7 +4,7 @@ package crypto; option go_package = "github.com/hyperledger/burrow/crypto"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; option (gogoproto.stable_marshaler_all) = true; option (gogoproto.marshaler_all) = true; diff --git a/protobuf/dump.proto b/protobuf/dump.proto index a0de7df67..e9a69306b 100644 --- a/protobuf/dump.proto +++ b/protobuf/dump.proto @@ -2,7 +2,7 @@ syntax = 'proto3'; option go_package = "github.com/hyperledger/burrow/dump"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "acm.proto"; diff --git a/protobuf/encoding.proto b/protobuf/encoding.proto index be0d97090..48dff985f 100644 --- a/protobuf/encoding.proto +++ b/protobuf/encoding.proto @@ -2,7 +2,7 @@ syntax = 'proto3'; option go_package = "github.com/hyperledger/burrow/encoding"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; package encoding; diff --git a/protobuf/errors.proto b/protobuf/errors.proto index ca5c4b3c4..8a699c6c4 100644 --- a/protobuf/errors.proto +++ b/protobuf/errors.proto @@ -4,7 +4,7 @@ package errors; option go_package = "github.com/hyperledger/burrow/execution/errors"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; option (gogoproto.stable_marshaler_all) = true; // Enable custom Marshal method. diff --git a/protobuf/exec.proto b/protobuf/exec.proto index fb74d4a50..6e16b2a24 100644 --- a/protobuf/exec.proto +++ b/protobuf/exec.proto @@ -4,8 +4,8 @@ package exec; option go_package = "github.com/hyperledger/burrow/execution/exec"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "github.com/tendermint/tendermint/abci/types/types.proto"; +import "gogoproto/gogo.proto"; +import "tendermint/types/types.proto"; import "google/protobuf/timestamp.proto"; import "errors.proto"; @@ -43,7 +43,7 @@ message BeginBlock { uint64 NumTxs = 3; // The height of the most recent block we stored in state (which is the last non-empty block in current implementation) uint64 PredecessorHeight = 4; - types.Header Header = 2; + tendermint.types.Header Header = 2; } message EndBlock { @@ -83,7 +83,7 @@ message BlockExecution { uint64 Height = 1; // The height of the most recent block we stored in state (which is the last non-empty block in current implementation) uint64 PredecessorHeight = 4; - types.Header Header = 2; + tendermint.types.Header Header = 2; repeated TxExecution TxExecutions = 3; } diff --git a/protobuf/github.com/tendermint/tendermint/abci/types/types.proto b/protobuf/github.com/tendermint/tendermint/abci/types/types.proto deleted file mode 100644 index daf2cc914..000000000 --- a/protobuf/github.com/tendermint/tendermint/abci/types/types.proto +++ /dev/null @@ -1,317 +0,0 @@ -syntax = "proto3"; -package types; - -// For more information on gogo.proto, see: -// https://github.com/gogo/protobuf/blob/master/extensions.md -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "github.com/tendermint/tendermint/libs/common/types.proto"; - -// This file is copied from http://github.com/tendermint/abci -// NOTE: When using custom types, mind the warnings. -// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues - -option (gogoproto.stable_marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.goproto_registration) = true; -// Generate tests -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.testgen_all) = true; - -//---------------------------------------- -// Request types - -message Request { - oneof value { - RequestEcho echo = 2; - RequestFlush flush = 3; - RequestInfo info = 4; - RequestSetOption set_option = 5; - RequestInitChain init_chain = 6; - RequestQuery query = 7; - RequestBeginBlock begin_block = 8; - RequestCheckTx check_tx = 9; - RequestDeliverTx deliver_tx = 19; - RequestEndBlock end_block = 11; - RequestCommit commit = 12; - } -} - -message RequestEcho { - string message = 1; -} - -message RequestFlush { -} - -message RequestInfo { - string version = 1; -} - -// nondeterministic -message RequestSetOption { - string key = 1; - string value = 2; -} - -message RequestInitChain { - google.protobuf.Timestamp time = 1 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true]; - string chain_id = 2; - ConsensusParams consensus_params = 3; - repeated ValidatorUpdate validators = 4 [(gogoproto.nullable)=false]; - bytes app_state_bytes = 5; -} - -message RequestQuery { - bytes data = 1; - string path = 2; - int64 height = 3; - bool prove = 4; -} - -// NOTE: validators here have empty pubkeys. -message RequestBeginBlock { - bytes hash = 1; - Header header = 2 [(gogoproto.nullable)=false]; - LastCommitInfo last_commit_info = 3 [(gogoproto.nullable)=false]; - repeated Evidence byzantine_validators = 4 [(gogoproto.nullable)=false]; -} - -message RequestCheckTx { - bytes tx = 1; -} - -message RequestDeliverTx { - bytes tx = 1; -} - -message RequestEndBlock { - int64 height = 1; -} - -message RequestCommit { -} - -//---------------------------------------- -// Response types - -message Response { - oneof value { - ResponseException exception = 1; - ResponseEcho echo = 2; - ResponseFlush flush = 3; - ResponseInfo info = 4; - ResponseSetOption set_option = 5; - ResponseInitChain init_chain = 6; - ResponseQuery query = 7; - ResponseBeginBlock begin_block = 8; - ResponseCheckTx check_tx = 9; - ResponseDeliverTx deliver_tx = 10; - ResponseEndBlock end_block = 11; - ResponseCommit commit = 12; - } -} - -// nondeterministic -message ResponseException { - string error = 1; -} - -message ResponseEcho { - string message = 1; -} - -message ResponseFlush { -} - -message ResponseInfo { - string data = 1; - string version = 2; - int64 last_block_height = 3; - bytes last_block_app_hash = 4; -} - -// nondeterministic -message ResponseSetOption { - uint32 code = 1; - // bytes data = 2; - string log = 3; - string info = 4; -} - -message ResponseInitChain { - ConsensusParams consensus_params = 1; - repeated ValidatorUpdate validators = 2 [(gogoproto.nullable)=false]; -} - -message ResponseQuery { - uint32 code = 1; - // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 index = 5; - bytes key = 6; - bytes value = 7; - bytes proof = 8; - int64 height = 9; -} - -message ResponseBeginBlock { - repeated common.KVPair tags = 1 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"]; -} - -message ResponseCheckTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5; - int64 gas_used = 6; - repeated common.KVPair tags = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"]; -} - -message ResponseDeliverTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5; - int64 gas_used = 6; - repeated common.KVPair tags = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"]; -} - -message ResponseEndBlock { - repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable)=false]; - ConsensusParams consensus_param_updates = 2; - repeated common.KVPair tags = 3 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"]; -} - -message ResponseCommit { - // reserve 1 - bytes data = 2; -} - -//---------------------------------------- -// Misc. - -// ConsensusParams contains all consensus-relevant parameters -// that can be adjusted by the abci app -message ConsensusParams { - BlockSize block_size = 1; - TxSize tx_size = 2; - BlockGossip block_gossip = 3; -} - -// BlockSize contains limits on the block size. -message BlockSize { - int32 max_bytes = 1; - int64 max_gas = 2; -} - -// TxSize contains limits on the tx size. -message TxSize { - int32 max_bytes = 1; - int64 max_gas = 2; -} - -// BlockGossip determine consensus critical -// elements of how blocks are gossiped -message BlockGossip { - // Note: must not be 0 - int32 block_part_size_bytes = 1; -} - -message LastCommitInfo { - int32 round = 1; - repeated VoteInfo votes = 2 [(gogoproto.nullable)=false]; -} - -//---------------------------------------- -// Blockchain Types - -message Header { - // basic block info - string chain_id = 1 [(gogoproto.customname)="ChainID"]; - int64 height = 2; - google.protobuf.Timestamp time = 3 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true]; - int64 num_txs = 4; - int64 total_txs = 5; - - // prev block info - BlockID last_block_id = 6 [(gogoproto.nullable)=false]; - - // hashes of block data - bytes last_commit_hash = 7; // commit from validators from the last block - bytes data_hash = 8; // transactions - - // hashes from the app output from the prev block - bytes validators_hash = 9; // validators for the current block - bytes next_validators_hash = 10; // validators for the next block - bytes consensus_hash = 11; // consensus params for current block - bytes app_hash = 12; // state after txs from the previous block - bytes last_results_hash = 13;// root hash of all results from the txs from the previous block - - // consensus info - bytes evidence_hash = 14; // evidence included in the block - bytes proposer_address = 15; // original proposer of the block -} - -message BlockID { - bytes hash = 1; - PartSetHeader parts_header = 2 [(gogoproto.nullable)=false]; -} - -message PartSetHeader { - int32 total = 1; - bytes hash = 2; -} - -// Validator -message Validator { - bytes address = 1; - //PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; -} - -// ValidatorUpdate -message ValidatorUpdate { - PubKey pub_key = 1 [(gogoproto.nullable)=false]; - int64 power = 2; -} - -// VoteInfo -message VoteInfo { - Validator validator = 1 [(gogoproto.nullable)=false]; - bool signed_last_block = 2; -} - -message PubKey { - string type = 1; - bytes data = 2; -} - -message Evidence { - string type = 1; - Validator validator = 2 [(gogoproto.nullable)=false]; - int64 height = 3; - google.protobuf.Timestamp time = 4 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true]; - int64 total_voting_power = 5; -} - -//---------------------------------------- -// Service Definition - -service ABCIApplication { - rpc Echo(RequestEcho) returns (ResponseEcho) ; - rpc Flush(RequestFlush) returns (ResponseFlush); - rpc Info(RequestInfo) returns (ResponseInfo); - rpc SetOption(RequestSetOption) returns (ResponseSetOption); - rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); - rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); - rpc Query(RequestQuery) returns (ResponseQuery); - rpc Commit(RequestCommit) returns (ResponseCommit); - rpc InitChain(RequestInitChain) returns (ResponseInitChain); - rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); - rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); -} diff --git a/protobuf/github.com/tendermint/tendermint/libs/common/types.proto b/protobuf/github.com/tendermint/tendermint/libs/common/types.proto deleted file mode 100644 index a8583bc9b..000000000 --- a/protobuf/github.com/tendermint/tendermint/libs/common/types.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; -package common; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.stable_marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.goproto_registration) = true; -// Generate tests -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.testgen_all) = true; - -//---------------------------------------- -// Abstract types - -// Define these here for compatibility but use tmlibs/common.KVPair. -message KVPair { - bytes key = 1; - bytes value = 2; -} - -// Define these here for compatibility but use tmlibs/common.KI64Pair. -message KI64Pair { - bytes key = 1; - int64 value = 2; -} diff --git a/protobuf/github.com/gogo/protobuf/gogoproto/gogo.proto b/protobuf/gogoproto/gogo.proto similarity index 100% rename from protobuf/github.com/gogo/protobuf/gogoproto/gogo.proto rename to protobuf/gogoproto/gogo.proto diff --git a/protobuf/keys.proto b/protobuf/keys.proto index 0e0af5f53..0c5585002 100644 --- a/protobuf/keys.proto +++ b/protobuf/keys.proto @@ -4,9 +4,11 @@ option go_package = "github.com/hyperledger/burrow/keys"; package keys; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; import "crypto.proto"; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; option (gogoproto.stable_marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.goproto_registration) = true; diff --git a/protobuf/names.proto b/protobuf/names.proto index 5607d4d7a..4fa43381e 100644 --- a/protobuf/names.proto +++ b/protobuf/names.proto @@ -4,7 +4,7 @@ package names; option go_package = "github.com/hyperledger/burrow/execution/names"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; option (gogoproto.stable_marshaler_all) = true; // Enable custom Marshal method. diff --git a/protobuf/payload.proto b/protobuf/payload.proto index 0cad9c724..041159cc5 100644 --- a/protobuf/payload.proto +++ b/protobuf/payload.proto @@ -2,7 +2,7 @@ syntax = 'proto3'; option go_package = "github.com/hyperledger/burrow/txs/payload"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; import "permission.proto"; import "registry.proto"; @@ -10,6 +10,7 @@ import "spec.proto"; package payload; +option (gogoproto.stable_marshaler_all) = true; // Enable custom Marshal method. option (gogoproto.marshaler_all) = true; // Enable custom Unmarshal method. @@ -154,7 +155,7 @@ message ProposalTx { message IdentifyTx { option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_getters) = false; - + // Senders repeated TxInput Inputs = 1; // Node to register diff --git a/protobuf/permission.proto b/protobuf/permission.proto index cdac58d38..38533c194 100644 --- a/protobuf/permission.proto +++ b/protobuf/permission.proto @@ -4,8 +4,9 @@ package permission; option go_package = "github.com/hyperledger/burrow/permission"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; +option (gogoproto.stable_marshaler_all) = true; // Enable custom Marshal method. option (gogoproto.marshaler_all) = true; // Enable custom Unmarshal method. diff --git a/protobuf/registry.proto b/protobuf/registry.proto index e80902beb..702c6cbd1 100644 --- a/protobuf/registry.proto +++ b/protobuf/registry.proto @@ -4,7 +4,7 @@ package registry; option go_package = "github.com/hyperledger/burrow/execution/registry"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; option (gogoproto.stable_marshaler_all) = true; // Enable custom Marshal method. @@ -29,7 +29,7 @@ message NodeIdentity { string NetworkAddress = 2; // The Tendermint p2p node ID bytes TendermintNodeID = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; - // The public key that this node will validate with if it becomes a validator + // The public key that this node will validate with if it becomes a validator // (use this to create a binding between p2p node ID and validator) bytes ValidatorPublicKey = 4 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.PublicKey", (gogoproto.nullable) = false]; -} \ No newline at end of file +} diff --git a/protobuf/rpc.proto b/protobuf/rpc.proto index 229754b36..a51a4ef4e 100644 --- a/protobuf/rpc.proto +++ b/protobuf/rpc.proto @@ -3,13 +3,15 @@ syntax = 'proto3'; option go_package = "github.com/hyperledger/burrow/rpc"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; import "tendermint.proto"; import "validator.proto"; import "bcm.proto"; package rpc; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; option (gogoproto.stable_marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.goproto_registration) = true; diff --git a/protobuf/rpcdump.proto b/protobuf/rpcdump.proto index d832cf062..c365c5476 100644 --- a/protobuf/rpcdump.proto +++ b/protobuf/rpcdump.proto @@ -4,10 +4,12 @@ package rpcdump; option go_package = "github.com/hyperledger/burrow/rpc/rpcdump"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; import "dump.proto"; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; option (gogoproto.stable_marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.goproto_registration) = true; diff --git a/protobuf/rpcevents.proto b/protobuf/rpcevents.proto index 673693752..c5e2fd612 100644 --- a/protobuf/rpcevents.proto +++ b/protobuf/rpcevents.proto @@ -2,16 +2,14 @@ syntax = 'proto3'; option go_package = "github.com/hyperledger/burrow/rpc/rpcevents"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; import "exec.proto"; package rpcevents; -// Enable custom Marshal method. option (gogoproto.marshaler_all) = true; -// Enable custom Unmarshal method. option (gogoproto.unmarshaler_all) = true; -// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.stable_marshaler_all) = true; option (gogoproto.sizer_all) = true; // Enable registration with golang/protobuf for the grpc-gateway. option (gogoproto.goproto_registration) = true; diff --git a/protobuf/rpcquery.proto b/protobuf/rpcquery.proto index 8ad6fbad1..e38cb6252 100644 --- a/protobuf/rpcquery.proto +++ b/protobuf/rpcquery.proto @@ -4,8 +4,8 @@ package rpcquery; option go_package = "github.com/hyperledger/burrow/rpc/rpcquery"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "github.com/tendermint/tendermint/abci/types/types.proto"; +import "gogoproto/gogo.proto"; +import "tendermint/types/types.proto"; import "names.proto"; import "acm.proto"; @@ -14,6 +14,8 @@ import "registry.proto"; import "rpc.proto"; import "payload.proto"; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; option (gogoproto.stable_marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.goproto_registration) = true; @@ -29,7 +31,7 @@ service Query { rpc GetName (GetNameParam) returns (names.Entry); rpc ListNames (ListNamesParam) returns (stream names.Entry); - + // GetNetworkRegistry returns for each validator address, the list of their identified node at the current state rpc GetNetworkRegistry (GetNetworkRegistryParam) returns (NetworkRegistry); rpc GetValidatorSet (GetValidatorSetParam) returns (ValidatorSet); @@ -40,7 +42,7 @@ service Query { rpc GetStats(GetStatsParam) returns (Stats); - rpc GetBlockHeader(GetBlockParam) returns (types.Header); + rpc GetBlockHeader(GetBlockParam) returns (tendermint.types.Header); } message StatusParam { diff --git a/protobuf/rpctransact.proto b/protobuf/rpctransact.proto index e2c26c2e4..33931a2e3 100644 --- a/protobuf/rpctransact.proto +++ b/protobuf/rpctransact.proto @@ -4,17 +4,16 @@ package rpctransact; option go_package = "github.com/hyperledger/burrow/rpc/rpctransact"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; import "exec.proto"; import "payload.proto"; import "txs.proto"; -// Enable custom Marshal method. option (gogoproto.marshaler_all) = true; -// Enable custom Unmarshal method. option (gogoproto.unmarshaler_all) = true; +option (gogoproto.stable_marshaler_all) = true; // Enable custom Size method (Required by Marshal and Unmarshal). option (gogoproto.sizer_all) = true; // Enable registration with golang/protobuf for the grpc-gateway. diff --git a/protobuf/spec.proto b/protobuf/spec.proto index 770f8183c..93f884e5c 100644 --- a/protobuf/spec.proto +++ b/protobuf/spec.proto @@ -2,7 +2,7 @@ syntax = 'proto3'; option go_package = "github.com/hyperledger/burrow/genesis/spec"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; import "crypto.proto"; import "balance.proto"; diff --git a/protobuf/storage.proto b/protobuf/storage.proto index f462b55b7..8328131f0 100644 --- a/protobuf/storage.proto +++ b/protobuf/storage.proto @@ -2,7 +2,7 @@ syntax = 'proto3'; option go_package = "github.com/hyperledger/burrow/storage"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; package storage; diff --git a/protobuf/tendermint.proto b/protobuf/tendermint.proto index 751cddde2..f0ae6a249 100644 --- a/protobuf/tendermint.proto +++ b/protobuf/tendermint.proto @@ -3,11 +3,13 @@ syntax = 'proto3'; option go_package = "github.com/hyperledger/burrow/consensus/tendermint"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; package tendermint; option (gogoproto.stable_marshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.goproto_registration) = true; option (gogoproto.messagename_all) = true; diff --git a/protobuf/txs.proto b/protobuf/txs.proto index da8638834..ebeda6bf5 100644 --- a/protobuf/txs.proto +++ b/protobuf/txs.proto @@ -2,15 +2,14 @@ syntax = 'proto3'; option go_package = "github.com/hyperledger/burrow/txs"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; import "crypto.proto"; package txs; -// Enable custom Marshal method. +option (gogoproto.stable_marshaler_all) = true; option (gogoproto.marshaler_all) = true; -// Enable custom Unmarshal method. option (gogoproto.unmarshaler_all) = true; // Enable custom Size method (Required by Marshal and Unmarshal). option (gogoproto.sizer_all) = true; diff --git a/protobuf/validator.proto b/protobuf/validator.proto index 531a380a5..34d57c58e 100644 --- a/protobuf/validator.proto +++ b/protobuf/validator.proto @@ -4,10 +4,12 @@ package validator; option go_package = "github.com/hyperledger/burrow/acm/validator"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "gogoproto/gogo.proto"; import "crypto.proto"; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; option (gogoproto.stable_marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.goproto_registration) = true; diff --git a/rpc/grpc.go b/rpc/grpc.go index c1a17233c..156306d04 100644 --- a/rpc/grpc.go +++ b/rpc/grpc.go @@ -4,6 +4,8 @@ import ( "fmt" "runtime/debug" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/structure" "golang.org/x/net/context" @@ -12,7 +14,8 @@ import ( func NewGRPCServer(logger *logging.Logger) *grpc.Server { return grpc.NewServer(grpc.UnaryInterceptor(unaryInterceptor(logger)), - grpc.StreamInterceptor(streamInterceptor(logger.WithScope("NewGRPCServer")))) + grpc.StreamInterceptor(streamInterceptor(logger.WithScope("NewGRPCServer"))), + grpc.CustomCodec(&encoding.GRPCCodec{})) } func unaryInterceptor(logger *logging.Logger) grpc.UnaryServerInterceptor { diff --git a/rpc/lib/types/types.go b/rpc/lib/types/types.go index 8ff3e6c65..67ff8a9d3 100644 --- a/rpc/lib/types/types.go +++ b/rpc/lib/types/types.go @@ -42,7 +42,7 @@ func MapToRequest(id string, method string, params map[string]interface{}) (RPCR } params_[name] = valueJSON } - payload, err := json.Marshal(params_) // NOTE: Amino doesn't handle maps yet. + payload, err := json.Marshal(params_) if err != nil { return RPCRequest{}, err } @@ -59,7 +59,7 @@ func ArrayToRequest(id string, method string, params []interface{}) (RPCRequest, } params_[i] = valueJSON } - payload, err := json.Marshal(params_) // NOTE: Amino doesn't handle maps yet. + payload, err := json.Marshal(params_) if err != nil { return RPCRequest{}, err } diff --git a/rpc/result.go b/rpc/result.go index 376b10e98..0506235e3 100644 --- a/rpc/result.go +++ b/rpc/result.go @@ -13,23 +13,12 @@ import ( "github.com/hyperledger/burrow/execution/registry" "github.com/hyperledger/burrow/genesis" "github.com/hyperledger/burrow/txs" - amino "github.com/tendermint/go-amino" - "github.com/tendermint/tendermint/consensus" ctypes "github.com/tendermint/tendermint/consensus/types" + tmjson "github.com/tendermint/tendermint/libs/json" core_types "github.com/tendermint/tendermint/rpc/core/types" tmTypes "github.com/tendermint/tendermint/types" ) -// When using Tendermint types like Block and Vote we are forced to wrap the outer object and use amino marshalling -var aminoCodec = NewAminoCodec() - -func NewAminoCodec() *amino.Codec { - aminoCodec := amino.NewCodec() - consensus.RegisterMessages(aminoCodec) - core_types.RegisterAmino(aminoCodec) - return aminoCodec -} - type ResultStorage struct { Key binary.HexBytes Value binary.HexBytes @@ -64,24 +53,24 @@ type BlockMeta struct { } func (bm BlockMeta) MarshalJSON() ([]byte, error) { - return aminoCodec.MarshalJSON(bm.BlockMeta) + return tmjson.Marshal(bm.BlockMeta) } func (bm *BlockMeta) UnmarshalJSON(data []byte) (err error) { - return aminoCodec.UnmarshalJSON(data, &bm.BlockMeta) + return tmjson.Unmarshal(data, &bm.BlockMeta) } -// Needed for go-amino handling of interface types +// TODO: this wrapper was needed for go-amino handling of interface types, it _might_ not be needed any longer type Block struct { *tmTypes.Block } func (b Block) MarshalJSON() ([]byte, error) { - return aminoCodec.MarshalJSON(b.Block) + return tmjson.Marshal(b.Block) } func (b *Block) UnmarshalJSON(data []byte) (err error) { - return aminoCodec.UnmarshalJSON(data, &b.Block) + return tmjson.Unmarshal(data, &b.Block) } type ResultChainId struct { @@ -125,11 +114,11 @@ type RoundState struct { } func (rs RoundState) MarshalJSON() ([]byte, error) { - return aminoCodec.MarshalJSON(rs.RoundState) + return tmjson.Marshal(rs.RoundState) } func (rs *RoundState) UnmarshalJSON(data []byte) (err error) { - return aminoCodec.UnmarshalJSON(data, &rs.RoundState) + return tmjson.Unmarshal(data, &rs.RoundState) } type ResultPeers struct { diff --git a/rpc/rpc.pb.go b/rpc/rpc.pb.go index 5e76a4c3f..6e1a5e631 100644 --- a/rpc/rpc.pb.go +++ b/rpc/rpc.pb.go @@ -5,6 +5,7 @@ package rpc import ( fmt "fmt" + io "io" math "math" math_bits "math/bits" @@ -51,16 +52,21 @@ func (*ResultStatus) Descriptor() ([]byte, []int) { return fileDescriptor_77a6da22d6a3feb1, []int{0} } func (m *ResultStatus) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResultStatus.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ResultStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResultStatus.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ResultStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_ResultStatus.Merge(m, src) } func (m *ResultStatus) XXX_Size() int { - return xxx_messageInfo_ResultStatus.Size(m) + return m.Size() } func (m *ResultStatus) XXX_DiscardUnknown() { xxx_messageInfo_ResultStatus.DiscardUnknown(m) @@ -129,32 +135,147 @@ func init() { proto.RegisterFile("rpc.proto", fileDescriptor_77a6da22d6a3feb1) } func init() { golang_proto.RegisterFile("rpc.proto", fileDescriptor_77a6da22d6a3feb1) } var fileDescriptor_77a6da22d6a3feb1 = []byte{ - // 364 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xbd, 0x6e, 0xe2, 0x40, - 0x14, 0x85, 0x19, 0x7e, 0xcd, 0x00, 0xda, 0xd5, 0x88, 0xc2, 0xa2, 0x30, 0xde, 0x15, 0x85, 0xb7, - 0x58, 0x7b, 0xb5, 0x68, 0x9b, 0x2d, 0xcd, 0x4a, 0x0b, 0x4d, 0x8a, 0x41, 0x21, 0x52, 0x3a, 0xff, - 0x0c, 0xf6, 0x48, 0x30, 0x63, 0x8d, 0xc7, 0x49, 0xfc, 0x76, 0x29, 0x79, 0x84, 0x28, 0x05, 0x8a, - 0xa0, 0xcb, 0x33, 0xa4, 0x88, 0x18, 0x30, 0x31, 0x4d, 0xba, 0x7b, 0xbe, 0x73, 0xef, 0x91, 0x7d, - 0x06, 0xb6, 0x45, 0x12, 0xd8, 0x89, 0xe0, 0x92, 0xa3, 0x9a, 0x48, 0x82, 0xc1, 0xcf, 0x88, 0xca, - 0x38, 0xf3, 0xed, 0x80, 0xaf, 0x9d, 0x88, 0x47, 0xdc, 0x51, 0x9e, 0x9f, 0x2d, 0x95, 0x52, 0x42, - 0x4d, 0xc7, 0x9b, 0xc1, 0x57, 0x49, 0x58, 0x48, 0xc4, 0x9a, 0x32, 0x79, 0x22, 0x5f, 0xee, 0xbc, - 0x15, 0x0d, 0x3d, 0xc9, 0xc5, 0x09, 0xb4, 0xfd, 0x60, 0x7d, 0x1c, 0xbf, 0xbf, 0x55, 0x61, 0x17, - 0x93, 0x34, 0x5b, 0xc9, 0xb9, 0xf4, 0x64, 0x96, 0x22, 0x1d, 0xb6, 0x26, 0xb1, 0x47, 0xd9, 0xec, - 0x9f, 0x0e, 0x4c, 0x60, 0xb5, 0x71, 0x21, 0x51, 0x1f, 0x36, 0x70, 0x76, 0xe0, 0x55, 0xc5, 0x8f, - 0x02, 0x8d, 0x60, 0xcf, 0xcd, 0x84, 0xe0, 0xf7, 0x0b, 0x22, 0x52, 0xca, 0x99, 0x5e, 0x53, 0xee, - 0x25, 0x44, 0x37, 0xb0, 0xf3, 0x9f, 0x30, 0x92, 0xd2, 0x74, 0xea, 0xa5, 0xb1, 0x5e, 0x37, 0x81, - 0xd5, 0x75, 0xff, 0x6c, 0xb6, 0xc3, 0xca, 0xf3, 0x76, 0x58, 0xfe, 0xc1, 0x38, 0x4f, 0x88, 0x58, - 0x91, 0x30, 0x22, 0xc2, 0xf1, 0x55, 0x84, 0xe3, 0x53, 0xe6, 0x89, 0xdc, 0x9e, 0x92, 0x07, 0x37, - 0x97, 0x24, 0xc5, 0xe5, 0x24, 0xf4, 0x0b, 0x6a, 0x57, 0x3c, 0x24, 0x33, 0xb6, 0xe4, 0x7a, 0xc3, - 0x04, 0x56, 0xe7, 0x77, 0xdf, 0x2e, 0x15, 0x50, 0x78, 0xf8, 0xbc, 0x85, 0x7e, 0x40, 0x6d, 0x9e, - 0xb3, 0x40, 0x5d, 0x34, 0xd5, 0x45, 0xcf, 0x3e, 0xf4, 0x51, 0x40, 0x7c, 0xb6, 0xd1, 0x08, 0xc2, - 0x89, 0x27, 0x83, 0x98, 0xb2, 0xe8, 0x3a, 0xd1, 0x35, 0x13, 0x58, 0x9a, 0x5b, 0x7f, 0xdd, 0x0e, - 0x2b, 0xb8, 0xc4, 0xd1, 0x5f, 0xd8, 0x5b, 0x14, 0x05, 0xab, 0xd4, 0xd6, 0xe9, 0x3b, 0x3e, 0x6a, - 0x3f, 0xfb, 0xf8, 0x72, 0xd5, 0x1d, 0x3f, 0xed, 0x0c, 0xf0, 0xb2, 0x33, 0xc0, 0xe3, 0xde, 0x00, - 0x9b, 0xbd, 0x01, 0x6e, 0xbf, 0x7d, 0x5e, 0x86, 0x48, 0x02, 0xbf, 0xa9, 0x9e, 0x6e, 0xfc, 0x1e, - 0x00, 0x00, 0xff, 0xff, 0xd7, 0x87, 0x65, 0xef, 0x29, 0x02, 0x00, 0x00, + // 365 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x3f, 0x6f, 0xe2, 0x30, + 0x18, 0xc6, 0x31, 0x7f, 0x83, 0x01, 0xdd, 0xc9, 0x62, 0x88, 0x18, 0x42, 0xee, 0xc4, 0x90, 0x1b, + 0x2e, 0x39, 0xdd, 0xe9, 0x96, 0xbb, 0x2d, 0x54, 0x2a, 0x2c, 0x1d, 0x8c, 0x4a, 0xa5, 0x6e, 0xf9, + 0xe3, 0x26, 0x96, 0xc0, 0x8e, 0x1c, 0xa7, 0x6d, 0xbe, 0x5d, 0x47, 0xc6, 0x8e, 0x55, 0x07, 0x54, + 0x85, 0xad, 0x9f, 0xa1, 0x43, 0x85, 0x21, 0x14, 0x96, 0x6e, 0xef, 0xf3, 0x7b, 0xde, 0xf7, 0x91, + 0xf5, 0x18, 0xb6, 0x45, 0x12, 0xd8, 0x89, 0xe0, 0x92, 0xa3, 0x9a, 0x48, 0x82, 0x41, 0x3f, 0xe2, + 0x11, 0x57, 0xda, 0xd9, 0x4e, 0x3b, 0x6b, 0xf0, 0x55, 0x12, 0x16, 0x12, 0xb1, 0xa4, 0x4c, 0xee, + 0xc9, 0x97, 0x5b, 0x6f, 0x41, 0x43, 0x4f, 0x72, 0xb1, 0x07, 0x6d, 0x3f, 0x58, 0xee, 0xc6, 0xef, + 0x6f, 0x55, 0xd8, 0xc5, 0x24, 0xcd, 0x16, 0x72, 0x26, 0x3d, 0x99, 0xa5, 0x48, 0x87, 0xad, 0x71, + 0xec, 0x51, 0x36, 0x3d, 0xd3, 0x81, 0x09, 0xac, 0x36, 0x2e, 0x25, 0xea, 0xc3, 0x06, 0xce, 0xb6, + 0xbc, 0xaa, 0xf8, 0x4e, 0xa0, 0x11, 0xec, 0xb9, 0x99, 0x10, 0xfc, 0x6e, 0x4e, 0x44, 0x4a, 0x39, + 0xd3, 0x6b, 0xca, 0x3d, 0x85, 0xe8, 0x0a, 0x76, 0xce, 0x09, 0x23, 0x29, 0x4d, 0x27, 0x5e, 0x1a, + 0xeb, 0x75, 0x13, 0x58, 0x5d, 0xf7, 0xef, 0x6a, 0x3d, 0xac, 0x3c, 0xaf, 0x87, 0x3f, 0x23, 0x2a, + 0xe3, 0xcc, 0xb7, 0x03, 0xbe, 0x74, 0xe2, 0x3c, 0x21, 0x62, 0x41, 0xc2, 0x88, 0x08, 0xc7, 0x57, + 0x11, 0x8e, 0x4f, 0x99, 0x27, 0x72, 0x7b, 0x42, 0xee, 0xdd, 0x5c, 0x92, 0x14, 0x1f, 0x27, 0xa1, + 0x5f, 0x50, 0xbb, 0xe0, 0x21, 0x99, 0xb2, 0x1b, 0xae, 0x37, 0x4c, 0x60, 0x75, 0x7e, 0xf7, 0xed, + 0xa3, 0x02, 0x4a, 0x0f, 0x1f, 0xb6, 0xd0, 0x0f, 0xa8, 0xcd, 0x72, 0x16, 0xa8, 0x8b, 0xa6, 0xba, + 0xe8, 0xd9, 0xdb, 0x3e, 0x4a, 0x88, 0x0f, 0x36, 0x1a, 0x41, 0x38, 0xf6, 0x64, 0x10, 0x53, 0x16, + 0x5d, 0x26, 0xba, 0x66, 0x02, 0x4b, 0x73, 0xeb, 0xaf, 0xeb, 0x61, 0x05, 0x1f, 0x71, 0xf4, 0x0f, + 0xf6, 0xe6, 0x65, 0xc1, 0x2a, 0xb5, 0xb5, 0x7f, 0xc7, 0x47, 0xed, 0x07, 0x1f, 0x9f, 0xae, 0xba, + 0xff, 0x57, 0x85, 0x01, 0x1e, 0x0b, 0x03, 0x3c, 0x15, 0x06, 0x78, 0x29, 0x0c, 0xf0, 0xb0, 0x31, + 0xc0, 0x6a, 0x63, 0x80, 0xeb, 0x6f, 0x9f, 0x97, 0x22, 0x92, 0xc0, 0x6f, 0xaa, 0x2f, 0xfc, 0xf3, + 0x1e, 0x00, 0x00, 0xff, 0xff, 0x07, 0x50, 0x46, 0x5b, 0x18, 0x02, 0x00, 0x00, +} + +func (m *ResultStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResultStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } +func (m *ResultStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.CatchingUp { + i-- + if m.CatchingUp { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.ValidatorInfo != nil { + { + size, err := m.ValidatorInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.SyncInfo != nil { + { + size, err := m.SyncInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.NodeInfo != nil { + { + size, err := m.NodeInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + { + size := m.GenesisHash.Size() + i -= size + if _, err := m.GenesisHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.BurrowVersion) > 0 { + i -= len(m.BurrowVersion) + copy(dAtA[i:], m.BurrowVersion) + i = encodeVarintRpc(dAtA, i, uint64(len(m.BurrowVersion))) + i-- + dAtA[i] = 0x1a + } + if len(m.RunID) > 0 { + i -= len(m.RunID) + copy(dAtA[i:], m.RunID) + i = encodeVarintRpc(dAtA, i, uint64(len(m.RunID))) + i-- + dAtA[i] = 0x12 + } + if len(m.ChainID) > 0 { + i -= len(m.ChainID) + copy(dAtA[i:], m.ChainID) + i = encodeVarintRpc(dAtA, i, uint64(len(m.ChainID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintRpc(dAtA []byte, offset int, v uint64) int { + offset -= sovRpc(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} func (m *ResultStatus) Size() (n int) { if m == nil { return 0 @@ -183,13 +304,13 @@ func (m *ResultStatus) Size() (n int) { l = m.SyncInfo.Size() n += 1 + l + sovRpc(uint64(l)) } - if m.CatchingUp { - n += 2 - } if m.ValidatorInfo != nil { l = m.ValidatorInfo.Size() n += 1 + l + sovRpc(uint64(l)) } + if m.CatchingUp { + n += 2 + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -202,3 +323,395 @@ func sovRpc(x uint64) (n int) { func sozRpc(x uint64) (n int) { return sovRpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *ResultStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResultStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResultStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RunID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BurrowVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BurrowVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GenesisHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.GenesisHash.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NodeInfo == nil { + m.NodeInfo = &tendermint.NodeInfo{} + } + if err := m.NodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SyncInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SyncInfo == nil { + m.SyncInfo = &bcm.SyncInfo{} + } + if err := m.SyncInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ValidatorInfo == nil { + m.ValidatorInfo = &validator.Validator{} + } + if err := m.ValidatorInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CatchingUp", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CatchingUp = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipRpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRpc(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthRpc + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRpc + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthRpc + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRpc = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRpc = fmt.Errorf("proto: unexpected end of group") +) diff --git a/rpc/rpcdump/dump_server.go b/rpc/rpcdump/dump_server.go index d72172c62..140afc02c 100644 --- a/rpc/rpcdump/dump_server.go +++ b/rpc/rpcdump/dump_server.go @@ -8,6 +8,7 @@ import ( ) type dumpServer struct { + UnimplementedDumpServer dumper *dump.Dumper } diff --git a/rpc/rpcdump/rpcdump.pb.go b/rpc/rpcdump/rpcdump.pb.go index 41dc6e561..fef839284 100644 --- a/rpc/rpcdump/rpcdump.pb.go +++ b/rpc/rpcdump/rpcdump.pb.go @@ -4,18 +4,15 @@ package rpcdump import ( - context "context" fmt "fmt" + io "io" math "math" math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" - dump "github.com/hyperledger/burrow/dump" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" + _ "github.com/hyperledger/burrow/dump" ) // Reference imports to suppress errors if they are not otherwise used. @@ -44,16 +41,21 @@ func (*GetDumpParam) Descriptor() ([]byte, []int) { return fileDescriptor_80c0fd6a8168e015, []int{0} } func (m *GetDumpParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetDumpParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetDumpParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetDumpParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GetDumpParam) XXX_Merge(src proto.Message) { xxx_messageInfo_GetDumpParam.Merge(m, src) } func (m *GetDumpParam) XXX_Size() int { - return xxx_messageInfo_GetDumpParam.Size(m) + return m.Size() } func (m *GetDumpParam) XXX_DiscardUnknown() { xxx_messageInfo_GetDumpParam.DiscardUnknown(m) @@ -80,129 +82,65 @@ func init() { proto.RegisterFile("rpcdump.proto", fileDescriptor_80c0fd6a8168e01 func init() { golang_proto.RegisterFile("rpcdump.proto", fileDescriptor_80c0fd6a8168e015) } var fileDescriptor_80c0fd6a8168e015 = []byte{ - // 194 bytes of a gzipped FileDescriptorProto + // 193 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x2a, 0x48, 0x4e, - 0x29, 0xcd, 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x74, 0xd3, - 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, - 0xf2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x49, 0x71, 0x21, 0xcc, 0x50, - 0x52, 0xe3, 0xe2, 0x71, 0x4f, 0x2d, 0x71, 0x29, 0xcd, 0x2d, 0x08, 0x48, 0x2c, 0x4a, 0xcc, 0x15, - 0x12, 0xe3, 0x62, 0xcb, 0x48, 0xcd, 0x4c, 0xcf, 0x28, 0x91, 0x60, 0x54, 0x60, 0xd4, 0x60, 0x09, - 0x82, 0xf2, 0x8c, 0xcc, 0xb8, 0x58, 0x40, 0x8a, 0x84, 0xf4, 0xb8, 0xd8, 0xa1, 0xea, 0x85, 0x44, - 0xf5, 0x60, 0xce, 0x41, 0x36, 0x41, 0x8a, 0x4b, 0x0f, 0x2c, 0x06, 0x12, 0x30, 0x60, 0x74, 0xb2, - 0xbe, 0xf1, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x03, 0x8f, 0xe5, 0x18, 0x4f, 0x3c, 0x96, - 0x63, 0x8c, 0xd2, 0x44, 0x72, 0x6c, 0x46, 0x65, 0x41, 0x6a, 0x51, 0x4e, 0x6a, 0x4a, 0x7a, 0x6a, - 0x91, 0x7e, 0x52, 0x69, 0x51, 0x51, 0x7e, 0xb9, 0x7e, 0x51, 0x41, 0xb2, 0x3e, 0xd4, 0xdc, 0x24, - 0x36, 0xb0, 0x1b, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x75, 0xfd, 0xde, 0x63, 0xf8, 0x00, - 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// 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.SupportPackageIsVersion4 - -// DumpClient is the client API for Dump service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type DumpClient interface { - GetDump(ctx context.Context, in *GetDumpParam, opts ...grpc.CallOption) (Dump_GetDumpClient, error) -} - -type dumpClient struct { - cc *grpc.ClientConn -} - -func NewDumpClient(cc *grpc.ClientConn) DumpClient { - return &dumpClient{cc} + 0x29, 0xcd, 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x44, 0xd2, + 0xf3, 0xd3, 0xf3, 0xc1, 0x62, 0xfa, 0x20, 0x16, 0x44, 0x5a, 0x8a, 0x0b, 0xa1, 0x54, 0x49, 0x8d, + 0x8b, 0xc7, 0x3d, 0xb5, 0xc4, 0xa5, 0x34, 0xb7, 0x20, 0x20, 0xb1, 0x28, 0x31, 0x57, 0x48, 0x8c, + 0x8b, 0x2d, 0x23, 0x35, 0x33, 0x3d, 0xa3, 0x44, 0x82, 0x51, 0x81, 0x51, 0x83, 0x25, 0x08, 0xca, + 0x33, 0x32, 0xe3, 0x62, 0x01, 0x29, 0x12, 0xd2, 0xe3, 0x62, 0x87, 0xaa, 0x17, 0x12, 0xd5, 0x83, + 0xd9, 0x8a, 0x6c, 0x82, 0x14, 0x97, 0x1e, 0x58, 0x0c, 0x24, 0x60, 0xc0, 0xe8, 0xe4, 0x7c, 0xe2, + 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x37, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x78, + 0xe0, 0xb1, 0x1c, 0xe3, 0x89, 0xc7, 0x72, 0x8c, 0x51, 0x9a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, + 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x19, 0x95, 0x05, 0xa9, 0x45, 0x39, 0xa9, 0x29, 0xe9, 0xa9, 0x45, + 0xfa, 0x49, 0xa5, 0x45, 0x45, 0xf9, 0xe5, 0xfa, 0x45, 0x05, 0xc9, 0xfa, 0x50, 0xf3, 0x93, 0xd8, + 0xc0, 0x6e, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x62, 0x82, 0xa1, 0xe7, 0x00, 0x00, + 0x00, } -func (c *dumpClient) GetDump(ctx context.Context, in *GetDumpParam, opts ...grpc.CallOption) (Dump_GetDumpClient, error) { - stream, err := c.cc.NewStream(ctx, &_Dump_serviceDesc.Streams[0], "/rpcdump.Dump/GetDump", opts...) +func (m *GetDumpParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - x := &dumpGetDumpClient{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 Dump_GetDumpClient interface { - Recv() (*dump.Dump, error) - grpc.ClientStream + return dAtA[:n], nil } -type dumpGetDumpClient struct { - grpc.ClientStream +func (m *GetDumpParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (x *dumpGetDumpClient) Recv() (*dump.Dump, error) { - m := new(dump.Dump) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err +func (m *GetDumpParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return m, nil -} - -// DumpServer is the server API for Dump service. -type DumpServer interface { - GetDump(*GetDumpParam, Dump_GetDumpServer) error -} - -// UnimplementedDumpServer can be embedded to have forward compatible implementations. -type UnimplementedDumpServer struct { -} - -func (*UnimplementedDumpServer) GetDump(req *GetDumpParam, srv Dump_GetDumpServer) error { - return status.Errorf(codes.Unimplemented, "method GetDump not implemented") -} - -func RegisterDumpServer(s *grpc.Server, srv DumpServer) { - s.RegisterService(&_Dump_serviceDesc, srv) -} - -func _Dump_GetDump_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(GetDumpParam) - if err := stream.RecvMsg(m); err != nil { - return err + if m.Height != 0 { + i = encodeVarintRpcdump(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return srv.(DumpServer).GetDump(m, &dumpGetDumpServer{stream}) -} - -type Dump_GetDumpServer interface { - Send(*dump.Dump) error - grpc.ServerStream -} - -type dumpGetDumpServer struct { - grpc.ServerStream + return len(dAtA) - i, nil } -func (x *dumpGetDumpServer) Send(m *dump.Dump) error { - return x.ServerStream.SendMsg(m) -} - -var _Dump_serviceDesc = grpc.ServiceDesc{ - ServiceName: "rpcdump.Dump", - HandlerType: (*DumpServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "GetDump", - Handler: _Dump_GetDump_Handler, - ServerStreams: true, - }, - }, - Metadata: "rpcdump.proto", +func encodeVarintRpcdump(dAtA []byte, offset int, v uint64) int { + offset -= sovRpcdump(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base } - func (m *GetDumpParam) Size() (n int) { if m == nil { return 0 @@ -224,3 +162,157 @@ func sovRpcdump(x uint64) (n int) { func sozRpcdump(x uint64) (n int) { return sovRpcdump(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *GetDumpParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcdump + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDumpParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDumpParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcdump + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRpcdump(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcdump + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRpcdump(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRpcdump + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRpcdump + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRpcdump + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthRpcdump + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRpcdump + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthRpcdump + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthRpcdump = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRpcdump = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRpcdump = fmt.Errorf("proto: unexpected end of group") +) diff --git a/rpc/rpcdump/rpcdump_grpc.pb.go b/rpc/rpcdump/rpcdump_grpc.pb.go new file mode 100644 index 000000000..a64c467cd --- /dev/null +++ b/rpc/rpcdump/rpcdump_grpc.pb.go @@ -0,0 +1,126 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package rpcdump + +import ( + context "context" + + dump "github.com/hyperledger/burrow/dump" + 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. +const _ = grpc.SupportPackageIsVersion7 + +// DumpClient is the client API for Dump 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 DumpClient interface { + GetDump(ctx context.Context, in *GetDumpParam, opts ...grpc.CallOption) (Dump_GetDumpClient, error) +} + +type dumpClient struct { + cc grpc.ClientConnInterface +} + +func NewDumpClient(cc grpc.ClientConnInterface) DumpClient { + return &dumpClient{cc} +} + +func (c *dumpClient) GetDump(ctx context.Context, in *GetDumpParam, opts ...grpc.CallOption) (Dump_GetDumpClient, error) { + stream, err := c.cc.NewStream(ctx, &_Dump_serviceDesc.Streams[0], "/rpcdump.Dump/GetDump", opts...) + if err != nil { + return nil, err + } + x := &dumpGetDumpClient{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 Dump_GetDumpClient interface { + Recv() (*dump.Dump, error) + grpc.ClientStream +} + +type dumpGetDumpClient struct { + grpc.ClientStream +} + +func (x *dumpGetDumpClient) Recv() (*dump.Dump, error) { + m := new(dump.Dump) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// DumpServer is the server API for Dump service. +// All implementations must embed UnimplementedDumpServer +// for forward compatibility +type DumpServer interface { + GetDump(*GetDumpParam, Dump_GetDumpServer) error + mustEmbedUnimplementedDumpServer() +} + +// UnimplementedDumpServer must be embedded to have forward compatible implementations. +type UnimplementedDumpServer struct { +} + +func (UnimplementedDumpServer) GetDump(*GetDumpParam, Dump_GetDumpServer) error { + return status.Errorf(codes.Unimplemented, "method GetDump not implemented") +} +func (UnimplementedDumpServer) mustEmbedUnimplementedDumpServer() {} + +// UnsafeDumpServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DumpServer will +// result in compilation errors. +type UnsafeDumpServer interface { + mustEmbedUnimplementedDumpServer() +} + +func RegisterDumpServer(s grpc.ServiceRegistrar, srv DumpServer) { + s.RegisterService(&_Dump_serviceDesc, srv) +} + +func _Dump_GetDump_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GetDumpParam) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(DumpServer).GetDump(m, &dumpGetDumpServer{stream}) +} + +type Dump_GetDumpServer interface { + Send(*dump.Dump) error + grpc.ServerStream +} + +type dumpGetDumpServer struct { + grpc.ServerStream +} + +func (x *dumpGetDumpServer) Send(m *dump.Dump) error { + return x.ServerStream.SendMsg(m) +} + +var _Dump_serviceDesc = grpc.ServiceDesc{ + ServiceName: "rpcdump.Dump", + HandlerType: (*DumpServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "GetDump", + Handler: _Dump_GetDump_Handler, + ServerStreams: true, + }, + }, + Metadata: "rpcdump.proto", +} diff --git a/rpc/rpcevents/execution_events_server.go b/rpc/rpcevents/execution_events_server.go index e4577544d..ceb7b13fa 100644 --- a/rpc/rpcevents/execution_events_server.go +++ b/rpc/rpcevents/execution_events_server.go @@ -24,6 +24,7 @@ type Provider interface { } type executionEventsServer struct { + UnimplementedExecutionEventsServer eventsProvider Provider emitter *event.Emitter tip bcm.BlockchainInfo diff --git a/rpc/rpcevents/rpcevents.pb.go b/rpc/rpcevents/rpcevents.pb.go index 1365d559a..de8bbe774 100644 --- a/rpc/rpcevents/rpcevents.pb.go +++ b/rpc/rpcevents/rpcevents.pb.go @@ -4,7 +4,6 @@ package rpcevents import ( - context "context" fmt "fmt" io "io" math "math" @@ -15,9 +14,6 @@ import ( golang_proto "github.com/golang/protobuf/proto" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" exec "github.com/hyperledger/burrow/execution/exec" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -91,16 +87,12 @@ func (m *GetBlockRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *GetBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetBlockRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *GetBlockRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_GetBlockRequest.Merge(m, src) @@ -152,16 +144,12 @@ func (m *TxRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *TxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *TxRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_TxRequest.Merge(m, src) @@ -239,16 +227,12 @@ func (m *BlocksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *BlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlocksRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *BlocksRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_BlocksRequest.Merge(m, src) @@ -298,16 +282,12 @@ func (m *EventsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *EventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *EventsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_EventsResponse.Merge(m, src) @@ -358,16 +338,12 @@ func (m *GetTxsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *GetTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetTxsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *GetTxsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_GetTxsRequest.Merge(m, src) @@ -424,16 +400,12 @@ func (m *GetTxsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *GetTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetTxsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *GetTxsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_GetTxsResponse.Merge(m, src) @@ -483,16 +455,12 @@ func (m *Bound) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Bound) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Bound.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *Bound) XXX_Merge(src proto.Message) { xxx_messageInfo_Bound.Merge(m, src) @@ -548,16 +516,12 @@ func (m *BlockRange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *BlockRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockRange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *BlockRange) XXX_Merge(src proto.Message) { xxx_messageInfo_BlockRange.Merge(m, src) @@ -613,259 +577,44 @@ func init() { proto.RegisterFile("rpcevents.proto", fileDescriptor_580b21d8d2fd6 func init() { golang_proto.RegisterFile("rpcevents.proto", fileDescriptor_580b21d8d2fd68e4) } var fileDescriptor_580b21d8d2fd68e4 = []byte{ - // 583 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0xed, 0xe6, 0xc3, 0xaa, 0x27, 0xfd, 0x30, 0xab, 0x82, 0x42, 0x84, 0xd2, 0xc8, 0x48, 0xa8, - 0x12, 0xaa, 0x53, 0x05, 0x55, 0x9c, 0x10, 0x8a, 0x25, 0xd3, 0x16, 0xb5, 0x42, 0xac, 0x97, 0x0f, - 0x21, 0x24, 0xe4, 0x38, 0x8b, 0x13, 0xd1, 0xda, 0xc6, 0x5e, 0x83, 0xf3, 0x53, 0xf8, 0x2b, 0x9c, - 0x38, 0xf6, 0xc8, 0x99, 0x43, 0x85, 0xd2, 0x3f, 0x82, 0xbc, 0x6b, 0x3b, 0x4e, 0x29, 0xe5, 0x12, - 0xed, 0xcc, 0x7b, 0x33, 0xf3, 0xf2, 0x76, 0xd6, 0xb0, 0x19, 0x85, 0x2e, 0xfb, 0xc2, 0x7c, 0x1e, - 0x1b, 0x61, 0x14, 0xf0, 0x00, 0xab, 0x65, 0xa2, 0xb3, 0xeb, 0x4d, 0xf9, 0x24, 0x19, 0x19, 0x6e, - 0x70, 0xd6, 0xf7, 0x02, 0x2f, 0xe8, 0x0b, 0xc6, 0x28, 0xf9, 0x28, 0x22, 0x11, 0x88, 0x93, 0xac, - 0xec, 0x00, 0x4b, 0x99, 0x2b, 0xcf, 0xfa, 0x13, 0xd8, 0x3c, 0x60, 0xdc, 0x3c, 0x0d, 0xdc, 0x4f, - 0x84, 0x7d, 0x4e, 0x58, 0xcc, 0xf1, 0x1d, 0x50, 0x0e, 0xd9, 0xd4, 0x9b, 0xf0, 0x36, 0xea, 0xa1, - 0x9d, 0x06, 0xc9, 0x23, 0x8c, 0xa1, 0xf1, 0xc6, 0x99, 0xf2, 0x76, 0xad, 0x87, 0x76, 0x56, 0x89, - 0x38, 0xeb, 0x3e, 0xa8, 0x34, 0x2d, 0x0a, 0x4f, 0x40, 0xa1, 0xe9, 0xa1, 0x13, 0x4f, 0x44, 0xe1, - 0x9a, 0xb9, 0x7f, 0x7e, 0xb1, 0xbd, 0xf2, 0xeb, 0x62, 0xbb, 0x2a, 0x6f, 0x32, 0x0b, 0x59, 0x74, - 0xca, 0xc6, 0x1e, 0x8b, 0xfa, 0xa3, 0x24, 0x8a, 0x82, 0xaf, 0xfd, 0xd1, 0xd4, 0x77, 0xa2, 0x99, - 0x71, 0xc8, 0x52, 0x73, 0xc6, 0x59, 0x4c, 0xf2, 0x26, 0xd7, 0xce, 0x7b, 0x0f, 0xeb, 0x42, 0x6b, - 0x5c, 0xcc, 0xdc, 0x07, 0x90, 0xe2, 0x1d, 0xdf, 0x63, 0x62, 0x6e, 0x6b, 0x70, 0xdb, 0x58, 0x78, - 0xb5, 0x00, 0x49, 0x85, 0x88, 0xb7, 0xa0, 0xf9, 0x32, 0x61, 0xd1, 0x4c, 0x34, 0x57, 0x89, 0x0c, - 0xf4, 0x13, 0xd8, 0xb0, 0x44, 0x19, 0x61, 0x71, 0x18, 0xf8, 0x31, 0xfb, 0xa7, 0x17, 0xf7, 0x41, - 0x91, 0xcc, 0x76, 0xad, 0x57, 0xdf, 0x69, 0x0d, 0x5a, 0x86, 0xf0, 0x54, 0xe4, 0x48, 0x0e, 0xe9, - 0x0c, 0xd6, 0x0f, 0x18, 0xa7, 0x69, 0x29, 0xb6, 0x07, 0x2d, 0x9b, 0x3b, 0x11, 0x5f, 0x6a, 0x59, - 0x4d, 0xe1, 0x7b, 0xa0, 0x5a, 0xfe, 0x38, 0xc7, 0x6b, 0x02, 0x5f, 0x24, 0x16, 0xaa, 0xeb, 0x55, - 0xd5, 0x1f, 0x60, 0xa3, 0x18, 0xf3, 0x1f, 0xd5, 0xfb, 0xb0, 0x46, 0x53, 0x2b, 0x65, 0x6e, 0xc2, - 0xa7, 0x81, 0x5f, 0x68, 0xbf, 0x25, 0xb5, 0x57, 0x10, 0xb2, 0x44, 0xd3, 0xbf, 0x21, 0x68, 0x9a, - 0x41, 0xe2, 0x8f, 0xb1, 0x01, 0x0d, 0x3a, 0x0b, 0xa5, 0xcf, 0x1b, 0x83, 0x4e, 0xd5, 0xe7, 0x0c, - 0x97, 0xbf, 0x19, 0x83, 0x08, 0x5e, 0x26, 0xf8, 0xc8, 0x1f, 0xb3, 0x34, 0xff, 0x2b, 0x32, 0xd0, - 0x9f, 0x83, 0x5a, 0x12, 0xf1, 0x1a, 0xac, 0x0e, 0x4d, 0xfb, 0xc5, 0xf1, 0x2b, 0x6a, 0x69, 0x2b, - 0x59, 0x44, 0xac, 0xe3, 0x21, 0x3d, 0x7a, 0x6d, 0x69, 0x08, 0xab, 0xd0, 0x7c, 0x76, 0x44, 0x6c, - 0xaa, 0xd5, 0x30, 0x80, 0x72, 0x3c, 0xa4, 0x96, 0x4d, 0xb5, 0x7a, 0x76, 0xb6, 0x29, 0xb1, 0x86, - 0x27, 0x5a, 0x43, 0x7f, 0x5b, 0xbd, 0x7f, 0xfc, 0x00, 0x9a, 0xc2, 0xcd, 0x7c, 0x11, 0xb4, 0xab, - 0x02, 0x89, 0x84, 0xb1, 0x0e, 0x75, 0xcb, 0x1f, 0x0b, 0x55, 0xd7, 0xb1, 0x32, 0x70, 0xf0, 0x1d, - 0xc1, 0x66, 0x69, 0x82, 0xbc, 0x51, 0xfc, 0x18, 0x14, 0x9b, 0x47, 0xcc, 0x39, 0xc3, 0xed, 0xab, - 0x3b, 0x56, 0x5c, 0x72, 0x27, 0xb7, 0x53, 0xf2, 0x44, 0xdd, 0x1e, 0xc2, 0xbb, 0x50, 0xa3, 0x29, - 0xde, 0xaa, 0x14, 0x95, 0xcf, 0xa6, 0xf3, 0xb7, 0xff, 0xf8, 0x69, 0xb1, 0x5e, 0x37, 0xcc, 0xb9, - 0x5b, 0x41, 0x96, 0xb7, 0x76, 0x0f, 0x99, 0xc3, 0xf3, 0x79, 0x17, 0xfd, 0x9c, 0x77, 0xd1, 0xef, - 0x79, 0x17, 0xfd, 0xb8, 0xec, 0xa2, 0xf3, 0xcb, 0x2e, 0x7a, 0xf7, 0xf0, 0xe6, 0x87, 0x18, 0x85, - 0x6e, 0xbf, 0xec, 0x39, 0x52, 0xc4, 0x07, 0xe2, 0xd1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x65, - 0xc9, 0x65, 0x0f, 0x79, 0x04, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// 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.SupportPackageIsVersion4 - -// ExecutionEventsClient is the client API for ExecutionEvents service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ExecutionEventsClient interface { - // Get StreamEvents (including transactions) for a range of block heights - Stream(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_StreamClient, error) - // Get a particular TxExecution by hash - Tx(ctx context.Context, in *TxRequest, opts ...grpc.CallOption) (*exec.TxExecution, error) - // GetEvents provides events streaming one block at a time - that is all events emitted in a particular block - // are guaranteed to be delivered in each GetEventsResponse - Events(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_EventsClient, error) -} - -type executionEventsClient struct { - cc *grpc.ClientConn -} - -func NewExecutionEventsClient(cc *grpc.ClientConn) ExecutionEventsClient { - return &executionEventsClient{cc} -} - -func (c *executionEventsClient) Stream(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_StreamClient, error) { - stream, err := c.cc.NewStream(ctx, &_ExecutionEvents_serviceDesc.Streams[0], "/rpcevents.ExecutionEvents/Stream", opts...) - if err != nil { - return nil, err - } - x := &executionEventsStreamClient{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 ExecutionEvents_StreamClient interface { - Recv() (*exec.StreamEvent, error) - grpc.ClientStream -} - -type executionEventsStreamClient struct { - grpc.ClientStream -} - -func (x *executionEventsStreamClient) Recv() (*exec.StreamEvent, error) { - m := new(exec.StreamEvent) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *executionEventsClient) Tx(ctx context.Context, in *TxRequest, opts ...grpc.CallOption) (*exec.TxExecution, error) { - out := new(exec.TxExecution) - err := c.cc.Invoke(ctx, "/rpcevents.ExecutionEvents/Tx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *executionEventsClient) Events(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_EventsClient, error) { - stream, err := c.cc.NewStream(ctx, &_ExecutionEvents_serviceDesc.Streams[1], "/rpcevents.ExecutionEvents/Events", opts...) - if err != nil { - return nil, err - } - x := &executionEventsEventsClient{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 ExecutionEvents_EventsClient interface { - Recv() (*EventsResponse, error) - grpc.ClientStream -} - -type executionEventsEventsClient struct { - grpc.ClientStream -} - -func (x *executionEventsEventsClient) Recv() (*EventsResponse, error) { - m := new(EventsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// ExecutionEventsServer is the server API for ExecutionEvents service. -type ExecutionEventsServer interface { - // Get StreamEvents (including transactions) for a range of block heights - Stream(*BlocksRequest, ExecutionEvents_StreamServer) error - // Get a particular TxExecution by hash - Tx(context.Context, *TxRequest) (*exec.TxExecution, error) - // GetEvents provides events streaming one block at a time - that is all events emitted in a particular block - // are guaranteed to be delivered in each GetEventsResponse - Events(*BlocksRequest, ExecutionEvents_EventsServer) error -} - -// UnimplementedExecutionEventsServer can be embedded to have forward compatible implementations. -type UnimplementedExecutionEventsServer struct { -} - -func (*UnimplementedExecutionEventsServer) Stream(req *BlocksRequest, srv ExecutionEvents_StreamServer) error { - return status.Errorf(codes.Unimplemented, "method Stream not implemented") -} -func (*UnimplementedExecutionEventsServer) Tx(ctx context.Context, req *TxRequest) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method Tx not implemented") -} -func (*UnimplementedExecutionEventsServer) Events(req *BlocksRequest, srv ExecutionEvents_EventsServer) error { - return status.Errorf(codes.Unimplemented, "method Events not implemented") -} - -func RegisterExecutionEventsServer(s *grpc.Server, srv ExecutionEventsServer) { - s.RegisterService(&_ExecutionEvents_serviceDesc, srv) -} - -func _ExecutionEvents_Stream_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(BlocksRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ExecutionEventsServer).Stream(m, &executionEventsStreamServer{stream}) -} - -type ExecutionEvents_StreamServer interface { - Send(*exec.StreamEvent) error - grpc.ServerStream -} - -type executionEventsStreamServer struct { - grpc.ServerStream -} - -func (x *executionEventsStreamServer) Send(m *exec.StreamEvent) error { - return x.ServerStream.SendMsg(m) -} - -func _ExecutionEvents_Tx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExecutionEventsServer).Tx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpcevents.ExecutionEvents/Tx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExecutionEventsServer).Tx(ctx, req.(*TxRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExecutionEvents_Events_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(BlocksRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ExecutionEventsServer).Events(m, &executionEventsEventsServer{stream}) -} - -type ExecutionEvents_EventsServer interface { - Send(*EventsResponse) error - grpc.ServerStream -} - -type executionEventsEventsServer struct { - grpc.ServerStream -} - -func (x *executionEventsEventsServer) Send(m *EventsResponse) error { - return x.ServerStream.SendMsg(m) -} - -var _ExecutionEvents_serviceDesc = grpc.ServiceDesc{ - ServiceName: "rpcevents.ExecutionEvents", - HandlerType: (*ExecutionEventsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Tx", - Handler: _ExecutionEvents_Tx_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "Stream", - Handler: _ExecutionEvents_Stream_Handler, - ServerStreams: true, - }, - { - StreamName: "Events", - Handler: _ExecutionEvents_Events_Handler, - ServerStreams: true, - }, - }, - Metadata: "rpcevents.proto", + // 580 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x5d, 0x6b, 0xd4, 0x40, + 0x14, 0xed, 0xec, 0x17, 0xcd, 0xdd, 0x7e, 0xc4, 0xa1, 0xca, 0xba, 0x48, 0xba, 0x44, 0x90, 0x82, + 0x34, 0x5b, 0x56, 0x8a, 0x4f, 0x22, 0x1b, 0x88, 0x6d, 0xa5, 0x45, 0x9c, 0x8c, 0x1f, 0x88, 0x20, + 0xd9, 0xec, 0x90, 0x5d, 0x6c, 0x93, 0x98, 0x4c, 0x34, 0xfb, 0x53, 0xfc, 0x2b, 0x3e, 0xf9, 0xd8, + 0x47, 0x1f, 0xc5, 0x87, 0x22, 0xdb, 0x3f, 0x22, 0x99, 0x49, 0xb2, 0xd9, 0x5a, 0xeb, 0xcb, 0x32, + 0xf7, 0x9e, 0x73, 0xef, 0x3d, 0x7b, 0xe6, 0x4e, 0x60, 0x33, 0x0a, 0x5d, 0xf6, 0x99, 0xf9, 0x3c, + 0x36, 0xc2, 0x28, 0xe0, 0x01, 0x56, 0xca, 0x44, 0x77, 0xcb, 0x0b, 0xbc, 0x40, 0x64, 0xfb, 0xd9, + 0x49, 0x12, 0xba, 0xc0, 0x52, 0xe6, 0xca, 0xb3, 0xfe, 0x04, 0x36, 0x0f, 0x18, 0x37, 0x4f, 0x03, + 0xf7, 0x23, 0x61, 0x9f, 0x12, 0x16, 0x73, 0x7c, 0x07, 0x5a, 0x87, 0x6c, 0xea, 0x4d, 0x78, 0x07, + 0xf5, 0xd0, 0x4e, 0x83, 0xe4, 0x11, 0xc6, 0xd0, 0x78, 0xe3, 0x4c, 0x79, 0xa7, 0xd6, 0x43, 0x3b, + 0xab, 0x44, 0x9c, 0x75, 0x1f, 0x14, 0x9a, 0x16, 0x85, 0x27, 0xd0, 0xa2, 0xe9, 0xa1, 0x13, 0x4f, + 0x44, 0xe1, 0x9a, 0xb9, 0x7f, 0x7e, 0xb1, 0xbd, 0xf2, 0xeb, 0x62, 0x7b, 0xd7, 0x9b, 0xf2, 0x49, + 0x32, 0x32, 0xdc, 0xe0, 0xac, 0x3f, 0x99, 0x85, 0x2c, 0x3a, 0x65, 0x63, 0x8f, 0x45, 0xfd, 0x51, + 0x12, 0x45, 0xc1, 0x97, 0xfe, 0x68, 0xea, 0x3b, 0xd1, 0xcc, 0x38, 0x64, 0xa9, 0x39, 0xe3, 0x2c, + 0x26, 0x79, 0x93, 0x6b, 0xe7, 0xbd, 0x87, 0x75, 0xa1, 0x35, 0x2e, 0x66, 0xee, 0x03, 0x48, 0xf1, + 0x8e, 0xef, 0x31, 0x31, 0xb7, 0x3d, 0xb8, 0x6d, 0x2c, 0x2c, 0x59, 0x80, 0xa4, 0x42, 0xc4, 0x5b, + 0xd0, 0x7c, 0x99, 0xb0, 0x68, 0x26, 0x9a, 0x2b, 0x44, 0x06, 0xfa, 0x09, 0x6c, 0x58, 0xa2, 0x8c, + 0xb0, 0x38, 0x0c, 0xfc, 0x98, 0xfd, 0xd3, 0x8b, 0xfb, 0xd0, 0x92, 0xcc, 0x4e, 0xad, 0x57, 0xdf, + 0x69, 0x0f, 0xda, 0x86, 0xf0, 0x54, 0xe4, 0x48, 0x0e, 0xe9, 0x0c, 0xd6, 0x0f, 0x18, 0xa7, 0x69, + 0x29, 0xb6, 0x07, 0x6d, 0x9b, 0x3b, 0x11, 0x5f, 0x6a, 0x59, 0x4d, 0xe1, 0x7b, 0xa0, 0x58, 0xfe, + 0x38, 0xc7, 0x6b, 0x02, 0x5f, 0x24, 0x16, 0xaa, 0xeb, 0x55, 0xd5, 0x1f, 0x60, 0xa3, 0x18, 0xf3, + 0x1f, 0xd5, 0xfb, 0xb0, 0x46, 0x53, 0x2b, 0x65, 0x6e, 0xc2, 0xa7, 0x81, 0x5f, 0x68, 0xbf, 0x25, + 0xb5, 0x57, 0x10, 0xb2, 0x44, 0xd3, 0xbf, 0x22, 0x68, 0x9a, 0x41, 0xe2, 0x8f, 0xb1, 0x01, 0x0d, + 0x3a, 0x0b, 0xa5, 0xcf, 0x1b, 0x83, 0x6e, 0xd5, 0xe7, 0x0c, 0x97, 0xbf, 0x19, 0x83, 0x08, 0x5e, + 0x26, 0xf8, 0xc8, 0x1f, 0xb3, 0x34, 0xff, 0x2b, 0x32, 0xd0, 0x9f, 0x83, 0x52, 0x12, 0xf1, 0x1a, + 0xac, 0x0e, 0x4d, 0xfb, 0xc5, 0xf1, 0x2b, 0x6a, 0xa9, 0x2b, 0x59, 0x44, 0xac, 0xe3, 0x21, 0x3d, + 0x7a, 0x6d, 0xa9, 0x08, 0x2b, 0xd0, 0x7c, 0x76, 0x44, 0x6c, 0xaa, 0xd6, 0x30, 0x40, 0xeb, 0x78, + 0x48, 0x2d, 0x9b, 0xaa, 0xf5, 0xec, 0x6c, 0x53, 0x62, 0x0d, 0x4f, 0xd4, 0x86, 0xfe, 0xb6, 0x7a, + 0xff, 0xf8, 0x01, 0x34, 0x85, 0x9b, 0xf9, 0x22, 0xa8, 0x57, 0x05, 0x12, 0x09, 0x63, 0x1d, 0xea, + 0x96, 0x3f, 0x16, 0xaa, 0xae, 0x63, 0x65, 0xe0, 0xe0, 0x1b, 0x82, 0xcd, 0xd2, 0x04, 0x79, 0xa3, + 0xf8, 0x31, 0xb4, 0x6c, 0x1e, 0x31, 0xe7, 0x0c, 0x77, 0xae, 0xee, 0x58, 0x71, 0xc9, 0xdd, 0xdc, + 0x4e, 0xc9, 0x13, 0x75, 0x7b, 0x08, 0xef, 0x42, 0x8d, 0xa6, 0x78, 0xab, 0x52, 0x54, 0x3e, 0x9b, + 0xee, 0xdf, 0xfe, 0xe3, 0xa7, 0xc5, 0x7a, 0xdd, 0x30, 0xe7, 0x6e, 0x05, 0x59, 0xde, 0xda, 0x3d, + 0x64, 0x5a, 0xe7, 0x73, 0x0d, 0xfd, 0x98, 0x6b, 0xe8, 0xe7, 0x5c, 0x43, 0xbf, 0xe7, 0x1a, 0xfa, + 0x7e, 0xa9, 0xa1, 0xf3, 0x4b, 0x0d, 0xbd, 0x7b, 0x78, 0xf3, 0x63, 0x8c, 0x42, 0xb7, 0x5f, 0xf6, + 0x1d, 0xb5, 0xc4, 0x47, 0xe2, 0xd1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x17, 0xe1, 0x08, 0x02, + 0x64, 0x04, 0x00, 0x00, } func (m *GetBlockRequest) Marshal() (dAtA []byte, err error) { @@ -1475,10 +1224,7 @@ func (m *GetBlockRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRpcevents - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRpcevents } if (iNdEx + skippy) > l { @@ -1582,10 +1328,7 @@ func (m *TxRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRpcevents - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRpcevents } if (iNdEx + skippy) > l { @@ -1704,10 +1447,7 @@ func (m *BlocksRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRpcevents - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRpcevents } if (iNdEx + skippy) > l { @@ -1811,10 +1551,7 @@ func (m *EventsResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRpcevents - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRpcevents } if (iNdEx + skippy) > l { @@ -1935,10 +1672,7 @@ func (m *GetTxsRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRpcevents - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRpcevents } if (iNdEx + skippy) > l { @@ -2042,10 +1776,7 @@ func (m *GetTxsResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRpcevents - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRpcevents } if (iNdEx + skippy) > l { @@ -2134,10 +1865,7 @@ func (m *Bound) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRpcevents - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRpcevents } if (iNdEx + skippy) > l { @@ -2260,10 +1988,7 @@ func (m *BlockRange) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRpcevents - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRpcevents } if (iNdEx + skippy) > l { diff --git a/rpc/rpcevents/rpcevents_grpc.pb.go b/rpc/rpcevents/rpcevents_grpc.pb.go new file mode 100644 index 000000000..3d7f33649 --- /dev/null +++ b/rpc/rpcevents/rpcevents_grpc.pb.go @@ -0,0 +1,234 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package rpcevents + +import ( + context "context" + + exec "github.com/hyperledger/burrow/execution/exec" + 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. +const _ = grpc.SupportPackageIsVersion7 + +// ExecutionEventsClient is the client API for ExecutionEvents 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 ExecutionEventsClient interface { + // Get StreamEvents (including transactions) for a range of block heights + Stream(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_StreamClient, error) + // Get a particular TxExecution by hash + Tx(ctx context.Context, in *TxRequest, opts ...grpc.CallOption) (*exec.TxExecution, error) + // GetEvents provides events streaming one block at a time - that is all events emitted in a particular block + // are guaranteed to be delivered in each GetEventsResponse + Events(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_EventsClient, error) +} + +type executionEventsClient struct { + cc grpc.ClientConnInterface +} + +func NewExecutionEventsClient(cc grpc.ClientConnInterface) ExecutionEventsClient { + return &executionEventsClient{cc} +} + +func (c *executionEventsClient) Stream(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_StreamClient, error) { + stream, err := c.cc.NewStream(ctx, &_ExecutionEvents_serviceDesc.Streams[0], "/rpcevents.ExecutionEvents/Stream", opts...) + if err != nil { + return nil, err + } + x := &executionEventsStreamClient{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 ExecutionEvents_StreamClient interface { + Recv() (*exec.StreamEvent, error) + grpc.ClientStream +} + +type executionEventsStreamClient struct { + grpc.ClientStream +} + +func (x *executionEventsStreamClient) Recv() (*exec.StreamEvent, error) { + m := new(exec.StreamEvent) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *executionEventsClient) Tx(ctx context.Context, in *TxRequest, opts ...grpc.CallOption) (*exec.TxExecution, error) { + out := new(exec.TxExecution) + err := c.cc.Invoke(ctx, "/rpcevents.ExecutionEvents/Tx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *executionEventsClient) Events(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_EventsClient, error) { + stream, err := c.cc.NewStream(ctx, &_ExecutionEvents_serviceDesc.Streams[1], "/rpcevents.ExecutionEvents/Events", opts...) + if err != nil { + return nil, err + } + x := &executionEventsEventsClient{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 ExecutionEvents_EventsClient interface { + Recv() (*EventsResponse, error) + grpc.ClientStream +} + +type executionEventsEventsClient struct { + grpc.ClientStream +} + +func (x *executionEventsEventsClient) Recv() (*EventsResponse, error) { + m := new(EventsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// ExecutionEventsServer is the server API for ExecutionEvents service. +// All implementations must embed UnimplementedExecutionEventsServer +// for forward compatibility +type ExecutionEventsServer interface { + // Get StreamEvents (including transactions) for a range of block heights + Stream(*BlocksRequest, ExecutionEvents_StreamServer) error + // Get a particular TxExecution by hash + Tx(context.Context, *TxRequest) (*exec.TxExecution, error) + // GetEvents provides events streaming one block at a time - that is all events emitted in a particular block + // are guaranteed to be delivered in each GetEventsResponse + Events(*BlocksRequest, ExecutionEvents_EventsServer) error + mustEmbedUnimplementedExecutionEventsServer() +} + +// UnimplementedExecutionEventsServer must be embedded to have forward compatible implementations. +type UnimplementedExecutionEventsServer struct { +} + +func (UnimplementedExecutionEventsServer) Stream(*BlocksRequest, ExecutionEvents_StreamServer) error { + return status.Errorf(codes.Unimplemented, "method Stream not implemented") +} +func (UnimplementedExecutionEventsServer) Tx(context.Context, *TxRequest) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method Tx not implemented") +} +func (UnimplementedExecutionEventsServer) Events(*BlocksRequest, ExecutionEvents_EventsServer) error { + return status.Errorf(codes.Unimplemented, "method Events not implemented") +} +func (UnimplementedExecutionEventsServer) mustEmbedUnimplementedExecutionEventsServer() {} + +// UnsafeExecutionEventsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ExecutionEventsServer will +// result in compilation errors. +type UnsafeExecutionEventsServer interface { + mustEmbedUnimplementedExecutionEventsServer() +} + +func RegisterExecutionEventsServer(s grpc.ServiceRegistrar, srv ExecutionEventsServer) { + s.RegisterService(&_ExecutionEvents_serviceDesc, srv) +} + +func _ExecutionEvents_Stream_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(BlocksRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ExecutionEventsServer).Stream(m, &executionEventsStreamServer{stream}) +} + +type ExecutionEvents_StreamServer interface { + Send(*exec.StreamEvent) error + grpc.ServerStream +} + +type executionEventsStreamServer struct { + grpc.ServerStream +} + +func (x *executionEventsStreamServer) Send(m *exec.StreamEvent) error { + return x.ServerStream.SendMsg(m) +} + +func _ExecutionEvents_Tx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExecutionEventsServer).Tx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcevents.ExecutionEvents/Tx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExecutionEventsServer).Tx(ctx, req.(*TxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExecutionEvents_Events_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(BlocksRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ExecutionEventsServer).Events(m, &executionEventsEventsServer{stream}) +} + +type ExecutionEvents_EventsServer interface { + Send(*EventsResponse) error + grpc.ServerStream +} + +type executionEventsEventsServer struct { + grpc.ServerStream +} + +func (x *executionEventsEventsServer) Send(m *EventsResponse) error { + return x.ServerStream.SendMsg(m) +} + +var _ExecutionEvents_serviceDesc = grpc.ServiceDesc{ + ServiceName: "rpcevents.ExecutionEvents", + HandlerType: (*ExecutionEventsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Tx", + Handler: _ExecutionEvents_Tx_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Stream", + Handler: _ExecutionEvents_Stream_Handler, + ServerStreams: true, + }, + { + StreamName: "Events", + Handler: _ExecutionEvents_Events_Handler, + ServerStreams: true, + }, + }, + Metadata: "rpcevents.proto", +} diff --git a/rpc/rpcquery/query_server.go b/rpc/rpcquery/query_server.go index 6226b64c0..0c2bb53b1 100644 --- a/rpc/rpcquery/query_server.go +++ b/rpc/rpcquery/query_server.go @@ -20,13 +20,14 @@ import ( "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/rpc" "github.com/hyperledger/burrow/txs/payload" - "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) type queryServer struct { + UnimplementedQueryServer state QueryState blockchain bcm.BlockchainInfo nodeView *tendermint.NodeView @@ -257,7 +258,7 @@ func (qs *queryServer) GetStats(ctx context.Context, param *GetStatsParam) (*Sta // Tendermint and blocks -func (qs *queryServer) GetBlockHeader(ctx context.Context, param *GetBlockParam) (*types.Header, error) { +func (qs *queryServer) GetBlockHeader(ctx context.Context, param *GetBlockParam) (*tmproto.Header, error) { header, err := qs.blockchain.GetBlockHeader(param.Height) if err != nil { return nil, err diff --git a/rpc/rpcquery/rpcquery.pb.go b/rpc/rpcquery/rpcquery.pb.go index a550beb51..c08224b42 100644 --- a/rpc/rpcquery/rpcquery.pb.go +++ b/rpc/rpcquery/rpcquery.pb.go @@ -4,26 +4,23 @@ package rpcquery import ( - context "context" fmt "fmt" + io "io" math "math" math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" golang_proto "github.com/golang/protobuf/proto" - acm "github.com/hyperledger/burrow/acm" + _ "github.com/hyperledger/burrow/acm" validator "github.com/hyperledger/burrow/acm/validator" github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - names "github.com/hyperledger/burrow/execution/names" + _ "github.com/hyperledger/burrow/execution/names" registry "github.com/hyperledger/burrow/execution/registry" - rpc "github.com/hyperledger/burrow/rpc" + _ "github.com/hyperledger/burrow/rpc" payload "github.com/hyperledger/burrow/txs/payload" - types "github.com/tendermint/tendermint/abci/types" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" + _ "github.com/tendermint/tendermint/proto/tendermint/types" ) // Reference imports to suppress errors if they are not otherwise used. @@ -53,16 +50,21 @@ func (*StatusParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{0} } func (m *StatusParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StatusParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *StatusParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StatusParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *StatusParam) XXX_Merge(src proto.Message) { xxx_messageInfo_StatusParam.Merge(m, src) } func (m *StatusParam) XXX_Size() int { - return xxx_messageInfo_StatusParam.Size(m) + return m.Size() } func (m *StatusParam) XXX_DiscardUnknown() { xxx_messageInfo_StatusParam.DiscardUnknown(m) @@ -102,16 +104,21 @@ func (*GetAccountParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{1} } func (m *GetAccountParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAccountParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetAccountParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAccountParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GetAccountParam) XXX_Merge(src proto.Message) { xxx_messageInfo_GetAccountParam.Merge(m, src) } func (m *GetAccountParam) XXX_Size() int { - return xxx_messageInfo_GetAccountParam.Size(m) + return m.Size() } func (m *GetAccountParam) XXX_DiscardUnknown() { xxx_messageInfo_GetAccountParam.DiscardUnknown(m) @@ -138,16 +145,21 @@ func (*GetMetadataParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{2} } func (m *GetMetadataParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetMetadataParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetMetadataParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetMetadataParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GetMetadataParam) XXX_Merge(src proto.Message) { xxx_messageInfo_GetMetadataParam.Merge(m, src) } func (m *GetMetadataParam) XXX_Size() int { - return xxx_messageInfo_GetMetadataParam.Size(m) + return m.Size() } func (m *GetMetadataParam) XXX_DiscardUnknown() { xxx_messageInfo_GetMetadataParam.DiscardUnknown(m) @@ -173,16 +185,21 @@ func (*MetadataResult) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{3} } func (m *MetadataResult) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MetadataResult.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *MetadataResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MetadataResult.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *MetadataResult) XXX_Merge(src proto.Message) { xxx_messageInfo_MetadataResult.Merge(m, src) } func (m *MetadataResult) XXX_Size() int { - return xxx_messageInfo_MetadataResult.Size(m) + return m.Size() } func (m *MetadataResult) XXX_DiscardUnknown() { xxx_messageInfo_MetadataResult.DiscardUnknown(m) @@ -216,16 +233,21 @@ func (*GetStorageParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{4} } func (m *GetStorageParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetStorageParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetStorageParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetStorageParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GetStorageParam) XXX_Merge(src proto.Message) { xxx_messageInfo_GetStorageParam.Merge(m, src) } func (m *GetStorageParam) XXX_Size() int { - return xxx_messageInfo_GetStorageParam.Size(m) + return m.Size() } func (m *GetStorageParam) XXX_DiscardUnknown() { xxx_messageInfo_GetStorageParam.DiscardUnknown(m) @@ -251,16 +273,21 @@ func (*StorageValue) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{5} } func (m *StorageValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageValue.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *StorageValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageValue.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *StorageValue) XXX_Merge(src proto.Message) { xxx_messageInfo_StorageValue.Merge(m, src) } func (m *StorageValue) XXX_Size() int { - return xxx_messageInfo_StorageValue.Size(m) + return m.Size() } func (m *StorageValue) XXX_DiscardUnknown() { xxx_messageInfo_StorageValue.DiscardUnknown(m) @@ -286,16 +313,21 @@ func (*ListAccountsParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{6} } func (m *ListAccountsParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListAccountsParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ListAccountsParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListAccountsParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ListAccountsParam) XXX_Merge(src proto.Message) { xxx_messageInfo_ListAccountsParam.Merge(m, src) } func (m *ListAccountsParam) XXX_Size() int { - return xxx_messageInfo_ListAccountsParam.Size(m) + return m.Size() } func (m *ListAccountsParam) XXX_DiscardUnknown() { xxx_messageInfo_ListAccountsParam.DiscardUnknown(m) @@ -328,16 +360,21 @@ func (*GetNameParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{7} } func (m *GetNameParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetNameParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetNameParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetNameParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GetNameParam) XXX_Merge(src proto.Message) { xxx_messageInfo_GetNameParam.Merge(m, src) } func (m *GetNameParam) XXX_Size() int { - return xxx_messageInfo_GetNameParam.Size(m) + return m.Size() } func (m *GetNameParam) XXX_DiscardUnknown() { xxx_messageInfo_GetNameParam.DiscardUnknown(m) @@ -370,16 +407,21 @@ func (*ListNamesParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{8} } func (m *ListNamesParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListNamesParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ListNamesParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListNamesParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ListNamesParam) XXX_Merge(src proto.Message) { xxx_messageInfo_ListNamesParam.Merge(m, src) } func (m *ListNamesParam) XXX_Size() int { - return xxx_messageInfo_ListNamesParam.Size(m) + return m.Size() } func (m *ListNamesParam) XXX_DiscardUnknown() { xxx_messageInfo_ListNamesParam.DiscardUnknown(m) @@ -411,16 +453,21 @@ func (*GetNetworkRegistryParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{9} } func (m *GetNetworkRegistryParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetNetworkRegistryParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetNetworkRegistryParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetNetworkRegistryParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GetNetworkRegistryParam) XXX_Merge(src proto.Message) { xxx_messageInfo_GetNetworkRegistryParam.Merge(m, src) } func (m *GetNetworkRegistryParam) XXX_Size() int { - return xxx_messageInfo_GetNetworkRegistryParam.Size(m) + return m.Size() } func (m *GetNetworkRegistryParam) XXX_DiscardUnknown() { xxx_messageInfo_GetNetworkRegistryParam.DiscardUnknown(m) @@ -445,16 +492,21 @@ func (*GetValidatorSetParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{10} } func (m *GetValidatorSetParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetValidatorSetParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetValidatorSetParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetValidatorSetParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GetValidatorSetParam) XXX_Merge(src proto.Message) { xxx_messageInfo_GetValidatorSetParam.Merge(m, src) } func (m *GetValidatorSetParam) XXX_Size() int { - return xxx_messageInfo_GetValidatorSetParam.Size(m) + return m.Size() } func (m *GetValidatorSetParam) XXX_DiscardUnknown() { xxx_messageInfo_GetValidatorSetParam.DiscardUnknown(m) @@ -481,16 +533,21 @@ func (*GetValidatorSetHistoryParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{11} } func (m *GetValidatorSetHistoryParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetValidatorSetHistoryParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetValidatorSetHistoryParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetValidatorSetHistoryParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GetValidatorSetHistoryParam) XXX_Merge(src proto.Message) { xxx_messageInfo_GetValidatorSetHistoryParam.Merge(m, src) } func (m *GetValidatorSetHistoryParam) XXX_Size() int { - return xxx_messageInfo_GetValidatorSetHistoryParam.Size(m) + return m.Size() } func (m *GetValidatorSetHistoryParam) XXX_DiscardUnknown() { xxx_messageInfo_GetValidatorSetHistoryParam.DiscardUnknown(m) @@ -523,16 +580,21 @@ func (*NetworkRegistry) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{12} } func (m *NetworkRegistry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NetworkRegistry.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *NetworkRegistry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NetworkRegistry.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *NetworkRegistry) XXX_Merge(src proto.Message) { xxx_messageInfo_NetworkRegistry.Merge(m, src) } func (m *NetworkRegistry) XXX_Size() int { - return xxx_messageInfo_NetworkRegistry.Size(m) + return m.Size() } func (m *NetworkRegistry) XXX_DiscardUnknown() { xxx_messageInfo_NetworkRegistry.DiscardUnknown(m) @@ -566,16 +628,21 @@ func (*RegisteredValidator) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{13} } func (m *RegisteredValidator) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RegisteredValidator.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *RegisteredValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RegisteredValidator.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *RegisteredValidator) XXX_Merge(src proto.Message) { xxx_messageInfo_RegisteredValidator.Merge(m, src) } func (m *RegisteredValidator) XXX_Size() int { - return xxx_messageInfo_RegisteredValidator.Size(m) + return m.Size() } func (m *RegisteredValidator) XXX_DiscardUnknown() { xxx_messageInfo_RegisteredValidator.DiscardUnknown(m) @@ -608,16 +675,21 @@ func (*ValidatorSetHistory) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{14} } func (m *ValidatorSetHistory) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidatorSetHistory.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ValidatorSetHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidatorSetHistory.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ValidatorSetHistory) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatorSetHistory.Merge(m, src) } func (m *ValidatorSetHistory) XXX_Size() int { - return xxx_messageInfo_ValidatorSetHistory.Size(m) + return m.Size() } func (m *ValidatorSetHistory) XXX_DiscardUnknown() { xxx_messageInfo_ValidatorSetHistory.DiscardUnknown(m) @@ -651,16 +723,21 @@ func (*ValidatorSet) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{15} } func (m *ValidatorSet) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidatorSet.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ValidatorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidatorSet.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ValidatorSet) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatorSet.Merge(m, src) } func (m *ValidatorSet) XXX_Size() int { - return xxx_messageInfo_ValidatorSet.Size(m) + return m.Size() } func (m *ValidatorSet) XXX_DiscardUnknown() { xxx_messageInfo_ValidatorSet.DiscardUnknown(m) @@ -700,16 +777,21 @@ func (*GetProposalParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{16} } func (m *GetProposalParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetProposalParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetProposalParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetProposalParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GetProposalParam) XXX_Merge(src proto.Message) { xxx_messageInfo_GetProposalParam.Merge(m, src) } func (m *GetProposalParam) XXX_Size() int { - return xxx_messageInfo_GetProposalParam.Size(m) + return m.Size() } func (m *GetProposalParam) XXX_DiscardUnknown() { xxx_messageInfo_GetProposalParam.DiscardUnknown(m) @@ -742,16 +824,21 @@ func (*ListProposalsParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{17} } func (m *ListProposalsParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListProposalsParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ListProposalsParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListProposalsParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ListProposalsParam) XXX_Merge(src proto.Message) { xxx_messageInfo_ListProposalsParam.Merge(m, src) } func (m *ListProposalsParam) XXX_Size() int { - return xxx_messageInfo_ListProposalsParam.Size(m) + return m.Size() } func (m *ListProposalsParam) XXX_DiscardUnknown() { xxx_messageInfo_ListProposalsParam.DiscardUnknown(m) @@ -785,16 +872,21 @@ func (*ProposalResult) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{18} } func (m *ProposalResult) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProposalResult.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ProposalResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProposalResult.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *ProposalResult) XXX_Merge(src proto.Message) { xxx_messageInfo_ProposalResult.Merge(m, src) } func (m *ProposalResult) XXX_Size() int { - return xxx_messageInfo_ProposalResult.Size(m) + return m.Size() } func (m *ProposalResult) XXX_DiscardUnknown() { xxx_messageInfo_ProposalResult.DiscardUnknown(m) @@ -833,16 +925,21 @@ func (*GetStatsParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{19} } func (m *GetStatsParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetStatsParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetStatsParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetStatsParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GetStatsParam) XXX_Merge(src proto.Message) { xxx_messageInfo_GetStatsParam.Merge(m, src) } func (m *GetStatsParam) XXX_Size() int { - return xxx_messageInfo_GetStatsParam.Size(m) + return m.Size() } func (m *GetStatsParam) XXX_DiscardUnknown() { xxx_messageInfo_GetStatsParam.DiscardUnknown(m) @@ -869,16 +966,21 @@ func (*Stats) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{20} } func (m *Stats) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Stats.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Stats.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *Stats) XXX_Merge(src proto.Message) { xxx_messageInfo_Stats.Merge(m, src) } func (m *Stats) XXX_Size() int { - return xxx_messageInfo_Stats.Size(m) + return m.Size() } func (m *Stats) XXX_DiscardUnknown() { xxx_messageInfo_Stats.DiscardUnknown(m) @@ -918,16 +1020,21 @@ func (*GetBlockParam) Descriptor() ([]byte, []int) { return fileDescriptor_88e25d9b99e39f02, []int{21} } func (m *GetBlockParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetBlockParam.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetBlockParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetBlockParam.Marshal(b, m, deterministic) + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } func (m *GetBlockParam) XXX_Merge(src proto.Message) { xxx_messageInfo_GetBlockParam.Merge(m, src) } func (m *GetBlockParam) XXX_Size() int { - return xxx_messageInfo_GetBlockParam.Size(m) + return m.Size() } func (m *GetBlockParam) XXX_DiscardUnknown() { xxx_messageInfo_GetBlockParam.DiscardUnknown(m) @@ -996,707 +1103,911 @@ func init() { proto.RegisterFile("rpcquery.proto", fileDescriptor_88e25d9b99e39f func init() { golang_proto.RegisterFile("rpcquery.proto", fileDescriptor_88e25d9b99e39f02) } var fileDescriptor_88e25d9b99e39f02 = []byte{ - // 1051 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xef, 0x6e, 0x1b, 0x45, - 0x10, 0xe7, 0x9a, 0xc4, 0x71, 0xc6, 0x8e, 0xdd, 0x6e, 0x82, 0x9b, 0x5e, 0xa9, 0x53, 0x56, 0x22, - 0x0d, 0x51, 0x7b, 0x36, 0xa6, 0x01, 0x04, 0x48, 0xa8, 0x8e, 0xc0, 0x0e, 0xa5, 0x51, 0x38, 0x43, - 0x2b, 0x81, 0x84, 0xb4, 0xbe, 0x5b, 0xec, 0x53, 0xcf, 0xb7, 0x66, 0x6f, 0xaf, 0xc5, 0x8f, 0x81, - 0x78, 0x0a, 0x1e, 0x80, 0xef, 0x7c, 0xec, 0x23, 0xa0, 0x7e, 0x88, 0x50, 0xfb, 0x22, 0xe8, 0xf6, - 0x8f, 0x7d, 0x77, 0x71, 0x23, 0x40, 0xf4, 0x8b, 0xb5, 0x33, 0x3b, 0xf3, 0x1b, 0xef, 0xec, 0xfc, - 0x7e, 0x7b, 0x50, 0xe3, 0x53, 0xef, 0xa7, 0x84, 0xf2, 0x99, 0x33, 0xe5, 0x4c, 0x30, 0x54, 0x36, - 0xb6, 0x7d, 0x67, 0x14, 0x88, 0x71, 0x32, 0x74, 0x3c, 0x36, 0x69, 0x8d, 0xd8, 0x88, 0xb5, 0x64, - 0xc0, 0x30, 0xf9, 0x51, 0x5a, 0xd2, 0x90, 0x2b, 0x95, 0x68, 0x7f, 0x98, 0x09, 0x17, 0x34, 0xf2, - 0x29, 0x9f, 0x04, 0x91, 0xc8, 0x2e, 0xc9, 0xd0, 0x0b, 0x5a, 0x62, 0x36, 0xa5, 0xb1, 0xfa, 0xd5, - 0x89, 0x95, 0x88, 0x4c, 0xe6, 0xc6, 0x06, 0xf1, 0x26, 0x7a, 0x59, 0x7f, 0x42, 0xc2, 0xc0, 0x27, - 0x82, 0x71, 0xed, 0xa8, 0x71, 0x3a, 0x0a, 0x62, 0x61, 0xfe, 0xaa, 0xbd, 0xc1, 0xa7, 0x9e, 0x5e, - 0x6e, 0x4e, 0xc9, 0x2c, 0x64, 0xc4, 0x57, 0x26, 0x0e, 0xa0, 0x32, 0x10, 0x44, 0x24, 0xf1, 0x29, - 0xe1, 0x64, 0x82, 0xf6, 0xa1, 0xde, 0x0d, 0x99, 0xf7, 0xf8, 0x9b, 0x60, 0x42, 0x1f, 0x05, 0x62, - 0x1c, 0x44, 0x3b, 0xd6, 0x4d, 0x6b, 0x7f, 0xc3, 0x2d, 0xba, 0x51, 0x1b, 0xb6, 0xa4, 0x6b, 0x40, - 0x69, 0x94, 0x89, 0xbe, 0x24, 0xa3, 0x97, 0x6d, 0x61, 0x02, 0xf5, 0x1e, 0x15, 0xf7, 0x3c, 0x8f, - 0x25, 0x91, 0x50, 0xe5, 0x4e, 0x60, 0xfd, 0x9e, 0xef, 0x73, 0x1a, 0xc7, 0xb2, 0x4c, 0xb5, 0x7b, - 0xf7, 0xd9, 0xd9, 0xee, 0x1b, 0xcf, 0xcf, 0x76, 0x6f, 0x67, 0x5a, 0x34, 0x9e, 0x4d, 0x29, 0x0f, - 0xa9, 0x3f, 0xa2, 0xbc, 0x35, 0x4c, 0x38, 0x67, 0x4f, 0x5b, 0x1e, 0x9f, 0x4d, 0x05, 0x73, 0x74, - 0xae, 0x6b, 0x40, 0xf0, 0xef, 0x16, 0x5c, 0xee, 0x51, 0xf1, 0x80, 0x0a, 0xe2, 0x13, 0x41, 0x54, - 0x91, 0x2f, 0x8b, 0x45, 0xda, 0xff, 0xb9, 0x00, 0xfa, 0x16, 0xaa, 0x06, 0xbc, 0x4f, 0xe2, 0xb1, - 0x3c, 0x6e, 0xb5, 0xfb, 0xde, 0xf3, 0xb3, 0xdd, 0x3b, 0x17, 0x03, 0x0e, 0x83, 0x88, 0xf0, 0x99, - 0xd3, 0xa7, 0x3f, 0x77, 0x67, 0x82, 0xc6, 0x6e, 0x0e, 0x06, 0xdf, 0x86, 0x9a, 0xb1, 0x5d, 0x1a, - 0x27, 0xa1, 0x40, 0x36, 0x94, 0x8d, 0x47, 0xdf, 0xc0, 0xdc, 0xc6, 0xbf, 0x59, 0xb2, 0x93, 0x03, - 0xc1, 0x38, 0x19, 0xd1, 0xd7, 0xd2, 0x49, 0xf4, 0x05, 0xac, 0xdc, 0xa7, 0x33, 0x7d, 0xbe, 0x7f, - 0x88, 0xa5, 0xcf, 0xf8, 0x88, 0x71, 0xbf, 0x73, 0xf8, 0x81, 0x9b, 0x02, 0xe0, 0xef, 0xa1, 0xaa, - 0xff, 0xe7, 0x43, 0x12, 0x26, 0x14, 0xdd, 0x87, 0x35, 0xb9, 0xd0, 0xff, 0xf2, 0x50, 0x23, 0xff, - 0xcb, 0xee, 0x29, 0x0c, 0xfc, 0x2e, 0x5c, 0xf9, 0x2a, 0x88, 0xcd, 0x48, 0xe9, 0x11, 0xde, 0x86, - 0xb5, 0xaf, 0x53, 0x56, 0xea, 0xb6, 0x29, 0x03, 0x63, 0xa8, 0xf6, 0xa8, 0x38, 0x21, 0x13, 0xdd, - 0x2f, 0x04, 0xab, 0xa9, 0xa1, 0x83, 0xe4, 0x1a, 0xef, 0x41, 0x2d, 0x85, 0x4b, 0xd7, 0x17, 0x62, - 0x5d, 0x83, 0xab, 0x29, 0x16, 0x15, 0x4f, 0x19, 0x7f, 0xec, 0x6a, 0xa6, 0xc9, 0x04, 0xdc, 0x80, - 0xed, 0x1e, 0x15, 0x0f, 0x0d, 0x1d, 0x07, 0x54, 0x0d, 0x3a, 0xee, 0xc1, 0xf5, 0x82, 0xbf, 0x1f, - 0xc4, 0x82, 0xe9, 0xb4, 0x94, 0x76, 0xc7, 0x91, 0x17, 0x26, 0x3e, 0x3d, 0xe5, 0xf4, 0x49, 0xc0, - 0x12, 0x75, 0x8b, 0x2b, 0x6e, 0xd1, 0x8d, 0xbb, 0x50, 0x2f, 0x14, 0x46, 0x2d, 0x58, 0x19, 0x50, - 0xb1, 0x63, 0xdd, 0x5c, 0xd9, 0xaf, 0x74, 0x6e, 0x38, 0x73, 0x95, 0x52, 0x01, 0x94, 0x53, 0x7f, - 0x5e, 0xd7, 0x4d, 0x23, 0xf1, 0x2f, 0x16, 0x6c, 0x2d, 0xd9, 0xfc, 0xdf, 0x67, 0xe8, 0x00, 0x56, - 0x4f, 0x98, 0x4f, 0xe5, 0x10, 0x55, 0x3a, 0x0d, 0x67, 0x2e, 0x4a, 0xa9, 0xf7, 0xd8, 0xa7, 0x91, - 0x08, 0xc4, 0xcc, 0x95, 0x31, 0xb8, 0x07, 0x5b, 0x4b, 0xba, 0x83, 0xda, 0xb0, 0xae, 0x97, 0xfa, - 0x7c, 0x8d, 0xc5, 0xf9, 0xb2, 0xf1, 0xae, 0x09, 0xc3, 0x27, 0x50, 0xcd, 0x6e, 0xa0, 0x06, 0x94, - 0xc6, 0x34, 0x18, 0x8d, 0x85, 0x3c, 0xd3, 0xaa, 0xab, 0x2d, 0xb4, 0xa7, 0xba, 0x76, 0x49, 0xa2, - 0x6e, 0x3b, 0x0b, 0x05, 0x2d, 0x34, 0x6b, 0x4f, 0x2a, 0xca, 0x29, 0x67, 0x53, 0x16, 0x93, 0x70, - 0x3e, 0x3c, 0x92, 0xfd, 0xb2, 0x4b, 0xae, 0x5c, 0xe3, 0x36, 0xa0, 0x74, 0x78, 0x4c, 0xa0, 0x1e, - 0x20, 0x1b, 0xca, 0xca, 0x43, 0x7d, 0x19, 0x5d, 0x76, 0xe7, 0x36, 0x7e, 0x00, 0x35, 0x13, 0xad, - 0x49, 0xbf, 0x04, 0x17, 0xdd, 0x82, 0x52, 0x97, 0x84, 0x21, 0x13, 0xba, 0x8d, 0x75, 0xc7, 0x08, - 0xb8, 0x72, 0xbb, 0x7a, 0x1b, 0xd7, 0x61, 0x53, 0x8a, 0x02, 0xd1, 0x44, 0xc0, 0x14, 0xd6, 0xa4, - 0x85, 0x0e, 0xe0, 0xb2, 0xa1, 0x48, 0x2a, 0xc5, 0x47, 0xe9, 0x9d, 0xa8, 0x66, 0x9c, 0xf3, 0xa7, - 0xb2, 0x9e, 0xf5, 0xb1, 0x44, 0x1c, 0x99, 0x2b, 0x5c, 0x75, 0x97, 0x6d, 0xe1, 0x5b, 0xb2, 0xae, - 0x14, 0x7c, 0x75, 0xe6, 0x06, 0x94, 0xfa, 0xb9, 0x8e, 0x2b, 0xab, 0xf3, 0xeb, 0xba, 0x66, 0x13, - 0xea, 0x40, 0x49, 0x3d, 0x3a, 0xe8, 0xcd, 0xc5, 0x75, 0x66, 0x9e, 0x21, 0xfb, 0x4a, 0xea, 0x76, - 0x54, 0x57, 0x74, 0xe4, 0x21, 0xc0, 0xe2, 0xf5, 0x40, 0xd7, 0x16, 0x79, 0x85, 0x37, 0xc5, 0xae, - 0x3a, 0xe9, 0xc3, 0x68, 0x02, 0x8f, 0xa0, 0x92, 0x79, 0x10, 0x90, 0x9d, 0xcb, 0xcb, 0xbd, 0x13, - 0xf6, 0xce, 0x62, 0xaf, 0x20, 0xc6, 0x9f, 0xc9, 0xda, 0x5a, 0xc7, 0x0a, 0xb5, 0xb3, 0x2a, 0x6c, - 0x37, 0xb2, 0xc7, 0xc9, 0xa8, 0xde, 0x27, 0x50, 0xcd, 0x0a, 0x15, 0xba, 0xbe, 0x88, 0x3b, 0x27, - 0x60, 0xf9, 0x03, 0xb4, 0x2d, 0xd4, 0x82, 0x75, 0x2d, 0x5d, 0xa8, 0x91, 0x2b, 0x3d, 0x57, 0x33, - 0xbb, 0xea, 0xa8, 0x2f, 0x83, 0xcf, 0xa3, 0x54, 0x10, 0x0e, 0x61, 0x63, 0xae, 0x63, 0x68, 0x27, - 0x5f, 0x6a, 0x21, 0x6e, 0xf9, 0xa4, 0xb6, 0x85, 0x5c, 0x40, 0xe7, 0x65, 0x0d, 0xbd, 0x9d, 0x2f, - 0xb9, 0x44, 0xf4, 0xec, 0x4c, 0x43, 0x8a, 0xd9, 0xc7, 0xf2, 0xa5, 0xca, 0x11, 0xb2, 0x99, 0x03, - 0x3c, 0x27, 0x95, 0xf6, 0x2b, 0x18, 0x8e, 0x7e, 0x80, 0xc6, 0x72, 0x09, 0x45, 0xef, 0xbc, 0x12, - 0x31, 0x2b, 0xb2, 0xf6, 0x8d, 0xe5, 0xc0, 0x06, 0xe5, 0x63, 0x39, 0x29, 0x86, 0x91, 0x85, 0x49, - 0xc9, 0xf1, 0xdf, 0x2e, 0x72, 0x10, 0x1d, 0xc3, 0x66, 0x8e, 0xfc, 0xe8, 0xad, 0x7c, 0xd7, 0xf3, - 0xaa, 0x90, 0x9d, 0xb4, 0xbc, 0x02, 0xb4, 0x2d, 0x74, 0x17, 0xca, 0x86, 0xc6, 0xe8, 0x6a, 0x61, - 0xd2, 0x0c, 0xb5, 0xed, 0x7a, 0x9e, 0x36, 0x31, 0xfa, 0x08, 0x6a, 0x86, 0x84, 0x7d, 0x4a, 0x7c, - 0xca, 0x0b, 0xb9, 0x0b, 0x7a, 0xda, 0x9b, 0x8e, 0xfa, 0xa4, 0x54, 0x71, 0xdd, 0x4f, 0xff, 0x7c, - 0xd1, 0xb4, 0xfe, 0x7a, 0xd1, 0xb4, 0xfe, 0x78, 0xd9, 0xb4, 0x9e, 0xbd, 0x6c, 0x5a, 0xdf, 0x1d, - 0x5c, 0xac, 0xf6, 0x7c, 0xea, 0xb5, 0x0c, 0xf4, 0xb0, 0x24, 0xbf, 0x22, 0xdf, 0xff, 0x3b, 0x00, - 0x00, 0xff, 0xff, 0xa9, 0x73, 0xa1, 0xad, 0x1c, 0x0b, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// 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.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - Status(ctx context.Context, in *StatusParam, opts ...grpc.CallOption) (*rpc.ResultStatus, error) - GetAccount(ctx context.Context, in *GetAccountParam, opts ...grpc.CallOption) (*acm.Account, error) - GetMetadata(ctx context.Context, in *GetMetadataParam, opts ...grpc.CallOption) (*MetadataResult, error) - GetStorage(ctx context.Context, in *GetStorageParam, opts ...grpc.CallOption) (*StorageValue, error) - ListAccounts(ctx context.Context, in *ListAccountsParam, opts ...grpc.CallOption) (Query_ListAccountsClient, error) - GetName(ctx context.Context, in *GetNameParam, opts ...grpc.CallOption) (*names.Entry, error) - ListNames(ctx context.Context, in *ListNamesParam, opts ...grpc.CallOption) (Query_ListNamesClient, error) - // GetNetworkRegistry returns for each validator address, the list of their identified node at the current state - GetNetworkRegistry(ctx context.Context, in *GetNetworkRegistryParam, opts ...grpc.CallOption) (*NetworkRegistry, error) - GetValidatorSet(ctx context.Context, in *GetValidatorSetParam, opts ...grpc.CallOption) (*ValidatorSet, error) - GetValidatorSetHistory(ctx context.Context, in *GetValidatorSetHistoryParam, opts ...grpc.CallOption) (*ValidatorSetHistory, error) - GetProposal(ctx context.Context, in *GetProposalParam, opts ...grpc.CallOption) (*payload.Ballot, error) - ListProposals(ctx context.Context, in *ListProposalsParam, opts ...grpc.CallOption) (Query_ListProposalsClient, error) - GetStats(ctx context.Context, in *GetStatsParam, opts ...grpc.CallOption) (*Stats, error) - GetBlockHeader(ctx context.Context, in *GetBlockParam, opts ...grpc.CallOption) (*types.Header, error) -} - -type queryClient struct { - cc *grpc.ClientConn -} - -func NewQueryClient(cc *grpc.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Status(ctx context.Context, in *StatusParam, opts ...grpc.CallOption) (*rpc.ResultStatus, error) { - out := new(rpc.ResultStatus) - err := c.cc.Invoke(ctx, "/rpcquery.Query/Status", in, out, opts...) + // 1048 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0x1b, 0xc5, + 0x17, 0xff, 0x6f, 0xf3, 0x7d, 0xec, 0xd8, 0xed, 0x24, 0x7f, 0xd7, 0xdd, 0xb6, 0x4e, 0x19, 0x89, + 0x34, 0x44, 0x65, 0x6d, 0x4c, 0xc3, 0x05, 0x5c, 0xa0, 0x3a, 0x80, 0x1d, 0x4a, 0xa3, 0xb0, 0x86, + 0x56, 0x02, 0x09, 0x69, 0xb2, 0x3b, 0xb2, 0x57, 0x5d, 0xef, 0x98, 0xd9, 0xd9, 0x16, 0x3f, 0x06, + 0x2f, 0xc0, 0x3d, 0x0f, 0xc0, 0x3d, 0x97, 0xb9, 0xe4, 0x12, 0xf5, 0x22, 0x42, 0xe9, 0x8b, 0xa0, + 0x9d, 0x0f, 0xef, 0x47, 0xdc, 0x08, 0x10, 0xdc, 0x58, 0x73, 0xce, 0x9c, 0x0f, 0x9f, 0x33, 0xe7, + 0xf7, 0x3b, 0x0b, 0x35, 0x3e, 0xf5, 0xbe, 0x4f, 0x28, 0x9f, 0x39, 0x53, 0xce, 0x04, 0x43, 0xeb, + 0x46, 0xb6, 0xb7, 0x47, 0x6c, 0xc4, 0xa4, 0xb2, 0x9d, 0x9e, 0xd4, 0xbd, 0x7d, 0x47, 0xd0, 0xc8, + 0xa7, 0x7c, 0x12, 0x44, 0xa2, 0x2d, 0x66, 0x53, 0x1a, 0xab, 0x5f, 0x7d, 0x5b, 0x89, 0xc8, 0x64, + 0x2e, 0x6c, 0x10, 0x6f, 0xa2, 0x8f, 0xf5, 0x17, 0x24, 0x0c, 0x7c, 0x22, 0x18, 0xd7, 0x8a, 0x1a, + 0xa7, 0xa3, 0x20, 0x16, 0x26, 0xad, 0xbd, 0xc1, 0xa7, 0x9e, 0x3e, 0x6e, 0x4e, 0xc9, 0x2c, 0x64, + 0xc4, 0x57, 0x22, 0x0e, 0xa0, 0x32, 0x14, 0x44, 0x24, 0xf1, 0x09, 0xe1, 0x64, 0x82, 0xf6, 0xa0, + 0xde, 0x0b, 0x99, 0xf7, 0xfc, 0xab, 0x60, 0x42, 0x9f, 0x05, 0x62, 0x1c, 0x44, 0x4d, 0xeb, 0x9e, + 0xb5, 0xb7, 0xe1, 0x96, 0xd5, 0xa8, 0x03, 0x5b, 0x52, 0x35, 0xa4, 0x34, 0xca, 0x59, 0x5f, 0x93, + 0xd6, 0x8b, 0xae, 0x30, 0x81, 0x7a, 0x9f, 0x8a, 0x47, 0x9e, 0xc7, 0x92, 0x48, 0xa8, 0x74, 0xc7, + 0xb0, 0xf6, 0xc8, 0xf7, 0x39, 0x8d, 0x63, 0x99, 0xa6, 0xda, 0x7b, 0x78, 0x76, 0xbe, 0xf3, 0xbf, + 0x57, 0xe7, 0x3b, 0x0f, 0x46, 0x81, 0x18, 0x27, 0xa7, 0x8e, 0xc7, 0x26, 0xed, 0xf1, 0x6c, 0x4a, + 0x79, 0x48, 0xfd, 0x11, 0xe5, 0xed, 0xd3, 0x84, 0x73, 0xf6, 0xb2, 0xed, 0xf1, 0xd9, 0x54, 0x30, + 0x47, 0xfb, 0xba, 0x26, 0x08, 0xfe, 0xc5, 0x82, 0xeb, 0x7d, 0x2a, 0x9e, 0x50, 0x41, 0x7c, 0x22, + 0x88, 0x4a, 0xf2, 0x79, 0x39, 0x49, 0xe7, 0x1f, 0x27, 0x40, 0x5f, 0x43, 0xd5, 0x04, 0x1f, 0x90, + 0x78, 0x2c, 0xcb, 0xad, 0xf6, 0xde, 0x7b, 0x75, 0xbe, 0xf3, 0xee, 0xd5, 0x01, 0x4f, 0x83, 0x88, + 0xf0, 0x99, 0x33, 0xa0, 0x3f, 0xf4, 0x66, 0x82, 0xc6, 0x6e, 0x21, 0x0c, 0x7e, 0x00, 0x35, 0x23, + 0xbb, 0x34, 0x4e, 0x42, 0x81, 0x6c, 0x58, 0x37, 0x1a, 0xfd, 0x02, 0x73, 0x19, 0xff, 0x6c, 0xc9, + 0x4e, 0x0e, 0x05, 0xe3, 0x64, 0x44, 0xff, 0x93, 0x4e, 0xa2, 0xcf, 0x60, 0xe9, 0x31, 0x9d, 0xe9, + 0xfa, 0xfe, 0x62, 0x2c, 0x5d, 0xe3, 0x33, 0xc6, 0xfd, 0xee, 0xc1, 0x07, 0x6e, 0x1a, 0x00, 0x7f, + 0x0b, 0x55, 0xfd, 0x3f, 0x9f, 0x92, 0x30, 0xa1, 0xe8, 0x31, 0xac, 0xc8, 0x83, 0xfe, 0x97, 0x07, + 0x3a, 0xf2, 0xdf, 0xec, 0x9e, 0x8a, 0x81, 0xdf, 0x81, 0x1b, 0x5f, 0x04, 0xb1, 0x19, 0x29, 0x3d, + 0xc2, 0xdb, 0xb0, 0xf2, 0x65, 0x8a, 0x30, 0xdd, 0x36, 0x25, 0x60, 0x0c, 0xd5, 0x3e, 0x15, 0xc7, + 0x64, 0xa2, 0xfb, 0x85, 0x60, 0x39, 0x15, 0xb4, 0x91, 0x3c, 0xe3, 0x5d, 0xa8, 0xa5, 0xe1, 0xd2, + 0xf3, 0x95, 0xb1, 0x6e, 0xc1, 0xcd, 0x34, 0x16, 0x15, 0x2f, 0x19, 0x7f, 0xee, 0x6a, 0xa4, 0x49, + 0x07, 0xdc, 0x80, 0xed, 0x3e, 0x15, 0x4f, 0x0d, 0x1c, 0x87, 0x54, 0x0d, 0x3a, 0xee, 0xc3, 0xed, + 0x92, 0x7e, 0x10, 0xc4, 0x82, 0x69, 0xb7, 0x14, 0x76, 0x47, 0x91, 0x17, 0x26, 0x3e, 0x3d, 0xe1, + 0xf4, 0x45, 0xc0, 0x12, 0xf5, 0x8a, 0x4b, 0x6e, 0x59, 0x8d, 0x7b, 0x50, 0x2f, 0x25, 0x46, 0x6d, + 0x58, 0x1a, 0x52, 0xd1, 0xb4, 0xee, 0x2d, 0xed, 0x55, 0xba, 0x77, 0x9d, 0x39, 0xe3, 0x28, 0x03, + 0xca, 0xa9, 0x3f, 0xcf, 0xeb, 0xa6, 0x96, 0xf8, 0x47, 0x0b, 0xb6, 0x16, 0x5c, 0xfe, 0xeb, 0x33, + 0xb4, 0x0f, 0xcb, 0xc7, 0xcc, 0xa7, 0x72, 0x88, 0x2a, 0xdd, 0x86, 0x33, 0x27, 0xa5, 0x54, 0x7b, + 0xe4, 0xd3, 0x48, 0x04, 0x62, 0xe6, 0x4a, 0x1b, 0xdc, 0x87, 0xad, 0x05, 0xdd, 0x41, 0x1d, 0x58, + 0xd3, 0x47, 0x5d, 0x5f, 0x23, 0xab, 0x2f, 0x6f, 0xef, 0x1a, 0x33, 0x7c, 0x0c, 0xd5, 0xfc, 0x05, + 0x6a, 0xc0, 0xea, 0x98, 0x06, 0xa3, 0xb1, 0x90, 0x35, 0x2d, 0xbb, 0x5a, 0x42, 0xbb, 0xaa, 0x6b, + 0xd7, 0x64, 0xd4, 0x6d, 0x27, 0x63, 0xd0, 0x52, 0xb3, 0x76, 0x25, 0xa3, 0x9c, 0x70, 0x36, 0x65, + 0x31, 0x09, 0xe7, 0xc3, 0x23, 0xd1, 0x2f, 0xbb, 0xe4, 0xca, 0x33, 0xee, 0x00, 0x4a, 0x87, 0xc7, + 0x18, 0xea, 0x01, 0xb2, 0x61, 0x5d, 0x69, 0xa8, 0x2f, 0xad, 0xd7, 0xdd, 0xb9, 0x8c, 0x9f, 0x40, + 0xcd, 0x58, 0x6b, 0xd0, 0x2f, 0x88, 0x8b, 0xee, 0xc3, 0x6a, 0x8f, 0x84, 0x21, 0x13, 0xba, 0x8d, + 0x75, 0xc7, 0x10, 0xb8, 0x52, 0xbb, 0xfa, 0x1a, 0xd7, 0x61, 0x53, 0x92, 0x02, 0xd1, 0x40, 0xc0, + 0x14, 0x56, 0xa4, 0x84, 0xf6, 0xe1, 0xba, 0x81, 0x48, 0x4a, 0xc5, 0x87, 0xe9, 0x9b, 0xa8, 0x66, + 0x5c, 0xd2, 0xa7, 0xb4, 0x9e, 0xd7, 0xb1, 0x44, 0x1c, 0x9a, 0x27, 0x5c, 0x76, 0x17, 0x5d, 0xe1, + 0xfb, 0x32, 0xaf, 0x24, 0x7c, 0x55, 0x73, 0x03, 0x56, 0x07, 0x85, 0x8e, 0x2b, 0xa9, 0xfb, 0xd3, + 0x9a, 0x46, 0x13, 0xea, 0xc2, 0xaa, 0x5a, 0x3a, 0xe8, 0xff, 0xd9, 0x73, 0xe6, 0xd6, 0x90, 0x7d, + 0x23, 0x55, 0x3b, 0xaa, 0x2b, 0xda, 0xf2, 0x00, 0x20, 0xdb, 0x1e, 0xe8, 0x56, 0xe6, 0x57, 0xda, + 0x29, 0x76, 0xd5, 0x49, 0x17, 0xa3, 0x31, 0x3c, 0x84, 0x4a, 0x6e, 0x21, 0x20, 0xbb, 0xe0, 0x57, + 0xd8, 0x13, 0x76, 0x33, 0xbb, 0x2b, 0x91, 0xf1, 0xc7, 0x32, 0xb7, 0xe6, 0xb1, 0x52, 0xee, 0x3c, + 0x0b, 0xdb, 0x8d, 0x7c, 0x39, 0x39, 0xd6, 0xfb, 0x08, 0xaa, 0x79, 0xa2, 0x42, 0xb7, 0x33, 0xbb, + 0x4b, 0x04, 0x56, 0x2c, 0xa0, 0x63, 0xa1, 0x36, 0xac, 0x69, 0xea, 0x42, 0x8d, 0x42, 0xea, 0x39, + 0x9b, 0xd9, 0x55, 0x47, 0x7d, 0x19, 0x7c, 0x1a, 0xa5, 0x84, 0x70, 0x00, 0x1b, 0x73, 0x1e, 0x43, + 0xcd, 0x62, 0xaa, 0x8c, 0xdc, 0x8a, 0x4e, 0x1d, 0x0b, 0xb9, 0x80, 0x2e, 0xd3, 0x1a, 0x7a, 0xab, + 0x98, 0x72, 0x01, 0xe9, 0xd9, 0xb9, 0x86, 0x94, 0xbd, 0x8f, 0xe4, 0xa6, 0x2a, 0x00, 0xb2, 0x55, + 0x08, 0x78, 0x89, 0x2a, 0xed, 0x37, 0x20, 0x1c, 0x7d, 0x07, 0x8d, 0xc5, 0x14, 0x8a, 0xde, 0x7e, + 0x63, 0xc4, 0x3c, 0xc9, 0xda, 0x77, 0x17, 0x07, 0x36, 0x51, 0x3e, 0x94, 0x93, 0x62, 0x10, 0x59, + 0x9a, 0x94, 0x02, 0xfe, 0xed, 0x32, 0x06, 0xd1, 0x11, 0x6c, 0x16, 0xc0, 0x8f, 0xee, 0x14, 0xbb, + 0x5e, 0x64, 0x85, 0xfc, 0xa4, 0x15, 0x19, 0xa0, 0x63, 0xa1, 0x87, 0xb0, 0x6e, 0x60, 0x8c, 0x6e, + 0x96, 0x26, 0xcd, 0x40, 0xdb, 0xae, 0x17, 0x61, 0x13, 0xa3, 0x43, 0xa8, 0x19, 0x10, 0x0e, 0x28, + 0xf1, 0x29, 0x2f, 0xf9, 0x66, 0xf0, 0xb4, 0x9b, 0x4e, 0xf6, 0x8d, 0xe9, 0xa8, 0xaf, 0x4b, 0xe5, + 0xd2, 0xfb, 0xe4, 0xec, 0xa2, 0x65, 0xfd, 0x76, 0xd1, 0xb2, 0x7e, 0xbf, 0x68, 0x59, 0x7f, 0x5c, + 0xb4, 0xac, 0x5f, 0x5f, 0xb7, 0xac, 0xb3, 0xd7, 0x2d, 0xeb, 0x9b, 0xfd, 0xab, 0x17, 0x00, 0x9f, + 0x7a, 0x6d, 0x93, 0xed, 0x74, 0x55, 0x7e, 0x58, 0xbe, 0xff, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xe6, 0xd8, 0xa5, 0xb6, 0xfb, 0x0a, 0x00, 0x00, +} + +func (m *StatusParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *queryClient) GetAccount(ctx context.Context, in *GetAccountParam, opts ...grpc.CallOption) (*acm.Account, error) { - out := new(acm.Account) - err := c.cc.Invoke(ctx, "/rpcquery.Query/GetAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *StatusParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (c *queryClient) GetMetadata(ctx context.Context, in *GetMetadataParam, opts ...grpc.CallOption) (*MetadataResult, error) { - out := new(MetadataResult) - err := c.cc.Invoke(ctx, "/rpcquery.Query/GetMetadata", in, out, opts...) +func (m *StatusParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.BlockSeenTimeWithin) > 0 { + i -= len(m.BlockSeenTimeWithin) + copy(dAtA[i:], m.BlockSeenTimeWithin) + i = encodeVarintRpcquery(dAtA, i, uint64(len(m.BlockSeenTimeWithin))) + i-- + dAtA[i] = 0x12 + } + if len(m.BlockTimeWithin) > 0 { + i -= len(m.BlockTimeWithin) + copy(dAtA[i:], m.BlockTimeWithin) + i = encodeVarintRpcquery(dAtA, i, uint64(len(m.BlockTimeWithin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetAccountParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *queryClient) GetStorage(ctx context.Context, in *GetStorageParam, opts ...grpc.CallOption) (*StorageValue, error) { - out := new(StorageValue) - err := c.cc.Invoke(ctx, "/rpcquery.Query/GetStorage", in, out, opts...) - if err != nil { - return nil, err +func (m *GetAccountParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetAccountParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpcquery(dAtA, i, uint64(size)) } - return out, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (c *queryClient) ListAccounts(ctx context.Context, in *ListAccountsParam, opts ...grpc.CallOption) (Query_ListAccountsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[0], "/rpcquery.Query/ListAccounts", opts...) +func (m *GetMetadataParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - x := &queryListAccountsClient{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 Query_ListAccountsClient interface { - Recv() (*acm.Account, error) - grpc.ClientStream + return dAtA[:n], nil } -type queryListAccountsClient struct { - grpc.ClientStream +func (m *GetMetadataParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (x *queryListAccountsClient) Recv() (*acm.Account, error) { - m := new(acm.Account) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err +func (m *GetMetadataParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.MetadataHash != nil { + { + size := m.MetadataHash.Size() + i -= size + if _, err := m.MetadataHash.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpcquery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Address != nil { + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpcquery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return m, nil + return len(dAtA) - i, nil } -func (c *queryClient) GetName(ctx context.Context, in *GetNameParam, opts ...grpc.CallOption) (*names.Entry, error) { - out := new(names.Entry) - err := c.cc.Invoke(ctx, "/rpcquery.Query/GetName", in, out, opts...) +func (m *MetadataResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *queryClient) ListNames(ctx context.Context, in *ListNamesParam, opts ...grpc.CallOption) (Query_ListNamesClient, error) { - stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[1], "/rpcquery.Query/ListNames", opts...) - if err != nil { - return nil, err - } - x := &queryListNamesClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err +func (m *MetadataResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MetadataResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintRpcquery(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0xa } - return x, nil + return len(dAtA) - i, nil } -type Query_ListNamesClient interface { - Recv() (*names.Entry, error) - grpc.ClientStream +func (m *GetStorageParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -type queryListNamesClient struct { - grpc.ClientStream +func (m *GetStorageParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (x *queryListNamesClient) Recv() (*names.Entry, error) { - m := new(names.Entry) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err +func (m *GetStorageParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size := m.Key.Size() + i -= size + if _, err := m.Key.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpcquery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpcquery(dAtA, i, uint64(size)) } - return m, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (c *queryClient) GetNetworkRegistry(ctx context.Context, in *GetNetworkRegistryParam, opts ...grpc.CallOption) (*NetworkRegistry, error) { - out := new(NetworkRegistry) - err := c.cc.Invoke(ctx, "/rpcquery.Query/GetNetworkRegistry", in, out, opts...) +func (m *StorageValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *queryClient) GetValidatorSet(ctx context.Context, in *GetValidatorSetParam, opts ...grpc.CallOption) (*ValidatorSet, error) { - out := new(ValidatorSet) - err := c.cc.Invoke(ctx, "/rpcquery.Query/GetValidatorSet", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *StorageValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (c *queryClient) GetValidatorSetHistory(ctx context.Context, in *GetValidatorSetHistoryParam, opts ...grpc.CallOption) (*ValidatorSetHistory, error) { - out := new(ValidatorSetHistory) - err := c.cc.Invoke(ctx, "/rpcquery.Query/GetValidatorSetHistory", in, out, opts...) - if err != nil { - return nil, err +func (m *StorageValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpcquery(dAtA, i, uint64(size)) } - return out, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (c *queryClient) GetProposal(ctx context.Context, in *GetProposalParam, opts ...grpc.CallOption) (*payload.Ballot, error) { - out := new(payload.Ballot) - err := c.cc.Invoke(ctx, "/rpcquery.Query/GetProposal", in, out, opts...) +func (m *ListAccountsParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *queryClient) ListProposals(ctx context.Context, in *ListProposalsParam, opts ...grpc.CallOption) (Query_ListProposalsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[2], "/rpcquery.Query/ListProposals", opts...) - if err != nil { - return nil, err +func (m *ListAccountsParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListAccountsParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - x := &queryListProposalsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = encodeVarintRpcquery(dAtA, i, uint64(len(m.Query))) + i-- + dAtA[i] = 0xa } - if err := x.ClientStream.CloseSend(); err != nil { + return len(dAtA) - i, nil +} + +func (m *GetNameParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - return x, nil + return dAtA[:n], nil } -type Query_ListProposalsClient interface { - Recv() (*ProposalResult, error) - grpc.ClientStream +func (m *GetNameParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -type queryListProposalsClient struct { - grpc.ClientStream +func (m *GetNameParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintRpcquery(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (x *queryListProposalsClient) Recv() (*ProposalResult, error) { - m := new(ProposalResult) - if err := x.ClientStream.RecvMsg(m); err != nil { +func (m *ListNamesParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - return m, nil + return dAtA[:n], nil } -func (c *queryClient) GetStats(ctx context.Context, in *GetStatsParam, opts ...grpc.CallOption) (*Stats, error) { - out := new(Stats) - err := c.cc.Invoke(ctx, "/rpcquery.Query/GetStats", in, out, opts...) - if err != nil { - return nil, err +func (m *ListNamesParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListNamesParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = encodeVarintRpcquery(dAtA, i, uint64(len(m.Query))) + i-- + dAtA[i] = 0xa } - return out, nil + return len(dAtA) - i, nil } -func (c *queryClient) GetBlockHeader(ctx context.Context, in *GetBlockParam, opts ...grpc.CallOption) (*types.Header, error) { - out := new(types.Header) - err := c.cc.Invoke(ctx, "/rpcquery.Query/GetBlockHeader", in, out, opts...) +func (m *GetNetworkRegistryParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -// QueryServer is the server API for Query service. -type QueryServer interface { - Status(context.Context, *StatusParam) (*rpc.ResultStatus, error) - GetAccount(context.Context, *GetAccountParam) (*acm.Account, error) - GetMetadata(context.Context, *GetMetadataParam) (*MetadataResult, error) - GetStorage(context.Context, *GetStorageParam) (*StorageValue, error) - ListAccounts(*ListAccountsParam, Query_ListAccountsServer) error - GetName(context.Context, *GetNameParam) (*names.Entry, error) - ListNames(*ListNamesParam, Query_ListNamesServer) error - // GetNetworkRegistry returns for each validator address, the list of their identified node at the current state - GetNetworkRegistry(context.Context, *GetNetworkRegistryParam) (*NetworkRegistry, error) - GetValidatorSet(context.Context, *GetValidatorSetParam) (*ValidatorSet, error) - GetValidatorSetHistory(context.Context, *GetValidatorSetHistoryParam) (*ValidatorSetHistory, error) - GetProposal(context.Context, *GetProposalParam) (*payload.Ballot, error) - ListProposals(*ListProposalsParam, Query_ListProposalsServer) error - GetStats(context.Context, *GetStatsParam) (*Stats, error) - GetBlockHeader(context.Context, *GetBlockParam) (*types.Header, error) +func (m *GetNetworkRegistryParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { +func (m *GetNetworkRegistryParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil } -func (*UnimplementedQueryServer) Status(ctx context.Context, req *StatusParam) (*rpc.ResultStatus, error) { - return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") -} -func (*UnimplementedQueryServer) GetAccount(ctx context.Context, req *GetAccountParam) (*acm.Account, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") -} -func (*UnimplementedQueryServer) GetMetadata(ctx context.Context, req *GetMetadataParam) (*MetadataResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented") -} -func (*UnimplementedQueryServer) GetStorage(ctx context.Context, req *GetStorageParam) (*StorageValue, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStorage not implemented") -} -func (*UnimplementedQueryServer) ListAccounts(req *ListAccountsParam, srv Query_ListAccountsServer) error { - return status.Errorf(codes.Unimplemented, "method ListAccounts not implemented") -} -func (*UnimplementedQueryServer) GetName(ctx context.Context, req *GetNameParam) (*names.Entry, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetName not implemented") -} -func (*UnimplementedQueryServer) ListNames(req *ListNamesParam, srv Query_ListNamesServer) error { - return status.Errorf(codes.Unimplemented, "method ListNames not implemented") -} -func (*UnimplementedQueryServer) GetNetworkRegistry(ctx context.Context, req *GetNetworkRegistryParam) (*NetworkRegistry, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNetworkRegistry not implemented") -} -func (*UnimplementedQueryServer) GetValidatorSet(ctx context.Context, req *GetValidatorSetParam) (*ValidatorSet, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSet not implemented") -} -func (*UnimplementedQueryServer) GetValidatorSetHistory(ctx context.Context, req *GetValidatorSetHistoryParam) (*ValidatorSetHistory, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSetHistory not implemented") -} -func (*UnimplementedQueryServer) GetProposal(ctx context.Context, req *GetProposalParam) (*payload.Ballot, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetProposal not implemented") -} -func (*UnimplementedQueryServer) ListProposals(req *ListProposalsParam, srv Query_ListProposalsServer) error { - return status.Errorf(codes.Unimplemented, "method ListProposals not implemented") -} -func (*UnimplementedQueryServer) GetStats(ctx context.Context, req *GetStatsParam) (*Stats, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") -} -func (*UnimplementedQueryServer) GetBlockHeader(ctx context.Context, req *GetBlockParam) (*types.Header, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeader not implemented") +func (m *GetValidatorSetParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func RegisterQueryServer(s *grpc.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) +func (m *GetValidatorSetParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func _Query_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatusParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Status(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpcquery.Query/Status", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Status(ctx, req.(*StatusParam)) +func (m *GetValidatorSetParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return interceptor(ctx, in, info, handler) + return len(dAtA) - i, nil } -func _Query_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAccountParam) - if err := dec(in); err != nil { +func (m *GetValidatorSetHistoryParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).GetAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpcquery.Query/GetAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetAccount(ctx, req.(*GetAccountParam)) - } - return interceptor(ctx, in, info, handler) + return dAtA[:n], nil } -func _Query_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetMetadataParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpcquery.Query/GetMetadata", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetMetadata(ctx, req.(*GetMetadataParam)) - } - return interceptor(ctx, in, info, handler) +func (m *GetValidatorSetHistoryParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func _Query_GetStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetStorageParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetStorage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpcquery.Query/GetStorage", +func (m *GetValidatorSetHistoryParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetStorage(ctx, req.(*GetStorageParam)) + if m.IncludePrevious != 0 { + i = encodeVarintRpcquery(dAtA, i, uint64(m.IncludePrevious)) + i-- + dAtA[i] = 0x8 } - return interceptor(ctx, in, info, handler) + return len(dAtA) - i, nil } -func _Query_ListAccounts_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ListAccountsParam) - if err := stream.RecvMsg(m); err != nil { - return err +func (m *NetworkRegistry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return srv.(QueryServer).ListAccounts(m, &queryListAccountsServer{stream}) -} - -type Query_ListAccountsServer interface { - Send(*acm.Account) error - grpc.ServerStream + return dAtA[:n], nil } -type queryListAccountsServer struct { - grpc.ServerStream +func (m *NetworkRegistry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (x *queryListAccountsServer) Send(m *acm.Account) error { - return x.ServerStream.SendMsg(m) +func (m *NetworkRegistry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Set) > 0 { + for iNdEx := len(m.Set) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Set[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcquery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } -func _Query_GetName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNameParam) - if err := dec(in); err != nil { +func (m *RegisteredValidator) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).GetName(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpcquery.Query/GetName", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetName(ctx, req.(*GetNameParam)) - } - return interceptor(ctx, in, info, handler) + return dAtA[:n], nil } -func _Query_ListNames_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ListNamesParam) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServer).ListNames(m, &queryListNamesServer{stream}) +func (m *RegisteredValidator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -type Query_ListNamesServer interface { - Send(*names.Entry) error - grpc.ServerStream +func (m *RegisteredValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Node != nil { + { + size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcquery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRpcquery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -type queryListNamesServer struct { - grpc.ServerStream +func (m *ValidatorSetHistory) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (x *queryListNamesServer) Send(m *names.Entry) error { - return x.ServerStream.SendMsg(m) +func (m *ValidatorSetHistory) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func _Query_GetNetworkRegistry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNetworkRegistryParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetNetworkRegistry(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpcquery.Query/GetNetworkRegistry", +func (m *ValidatorSetHistory) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetNetworkRegistry(ctx, req.(*GetNetworkRegistryParam)) + if len(m.History) > 0 { + for iNdEx := len(m.History) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.History[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcquery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return interceptor(ctx, in, info, handler) + return len(dAtA) - i, nil } -func _Query_GetValidatorSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetValidatorSetParam) - if err := dec(in); err != nil { +func (m *ValidatorSet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).GetValidatorSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpcquery.Query/GetValidatorSet", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetValidatorSet(ctx, req.(*GetValidatorSetParam)) - } - return interceptor(ctx, in, info, handler) + return dAtA[:n], nil } -func _Query_GetValidatorSetHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetValidatorSetHistoryParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetValidatorSetHistory(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpcquery.Query/GetValidatorSetHistory", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetValidatorSetHistory(ctx, req.(*GetValidatorSetHistoryParam)) - } - return interceptor(ctx, in, info, handler) +func (m *ValidatorSet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func _Query_GetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetProposalParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetProposal(ctx, in) +func (m *ValidatorSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpcquery.Query/GetProposal", + if len(m.Set) > 0 { + for iNdEx := len(m.Set) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Set[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcquery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetProposal(ctx, req.(*GetProposalParam)) + if m.Height != 0 { + i = encodeVarintRpcquery(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return interceptor(ctx, in, info, handler) + return len(dAtA) - i, nil } -func _Query_ListProposals_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ListProposalsParam) - if err := stream.RecvMsg(m); err != nil { - return err +func (m *GetProposalParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return srv.(QueryServer).ListProposals(m, &queryListProposalsServer{stream}) -} - -type Query_ListProposalsServer interface { - Send(*ProposalResult) error - grpc.ServerStream + return dAtA[:n], nil } -type queryListProposalsServer struct { - grpc.ServerStream +func (m *GetProposalParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (x *queryListProposalsServer) Send(m *ProposalResult) error { - return x.ServerStream.SendMsg(m) +func (m *GetProposalParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintRpcquery(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func _Query_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetStatsParam) - if err := dec(in); err != nil { +func (m *ListProposalsParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).GetStats(ctx, in) + return dAtA[:n], nil +} + +func (m *ListProposalsParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListProposalsParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpcquery.Query/GetStats", + if m.Proposed { + i-- + if m.Proposed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetStats(ctx, req.(*GetStatsParam)) + return len(dAtA) - i, nil +} + +func (m *ProposalResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return dAtA[:n], nil } -func _Query_GetBlockHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockParam) - if err := dec(in); err != nil { +func (m *ProposalResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProposalResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Ballot != nil { + { + size, err := m.Ballot.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpcquery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintRpcquery(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetStatsParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).GetBlockHeader(ctx, in) + return dAtA[:n], nil +} + +func (m *GetStatsParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetStatsParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + +func (m *Stats) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Stats) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Stats) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpcquery.Query/GetBlockHeader", + if m.AccountsWithoutCode != 0 { + i = encodeVarintRpcquery(dAtA, i, uint64(m.AccountsWithoutCode)) + i-- + dAtA[i] = 0x10 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetBlockHeader(ctx, req.(*GetBlockParam)) + if m.AccountsWithCode != 0 { + i = encodeVarintRpcquery(dAtA, i, uint64(m.AccountsWithCode)) + i-- + dAtA[i] = 0x8 } - return interceptor(ctx, in, info, handler) + return len(dAtA) - i, nil } -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "rpcquery.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Status", - Handler: _Query_Status_Handler, - }, - { - MethodName: "GetAccount", - Handler: _Query_GetAccount_Handler, - }, - { - MethodName: "GetMetadata", - Handler: _Query_GetMetadata_Handler, - }, - { - MethodName: "GetStorage", - Handler: _Query_GetStorage_Handler, - }, - { - MethodName: "GetName", - Handler: _Query_GetName_Handler, - }, - { - MethodName: "GetNetworkRegistry", - Handler: _Query_GetNetworkRegistry_Handler, - }, - { - MethodName: "GetValidatorSet", - Handler: _Query_GetValidatorSet_Handler, - }, - { - MethodName: "GetValidatorSetHistory", - Handler: _Query_GetValidatorSetHistory_Handler, - }, - { - MethodName: "GetProposal", - Handler: _Query_GetProposal_Handler, - }, - { - MethodName: "GetStats", - Handler: _Query_GetStats_Handler, - }, - { - MethodName: "GetBlockHeader", - Handler: _Query_GetBlockHeader_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "ListAccounts", - Handler: _Query_ListAccounts_Handler, - ServerStreams: true, - }, - { - StreamName: "ListNames", - Handler: _Query_ListNames_Handler, - ServerStreams: true, - }, - { - StreamName: "ListProposals", - Handler: _Query_ListProposals_Handler, - ServerStreams: true, - }, - }, - Metadata: "rpcquery.proto", +func (m *GetBlockParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } +func (m *GetBlockParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetBlockParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Height != 0 { + i = encodeVarintRpcquery(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintRpcquery(dAtA []byte, offset int, v uint64) int { + offset -= sovRpcquery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} func (m *StatusParam) Size() (n int) { if m == nil { return 0 @@ -2061,3 +2372,1993 @@ func sovRpcquery(x uint64) (n int) { func sozRpcquery(x uint64) (n int) { return sovRpcquery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *StatusParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockTimeWithin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockTimeWithin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockSeenTimeWithin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockSeenTimeWithin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAccountParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetMetadataParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetMetadataParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetMetadataParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_hyperledger_burrow_crypto.Address + m.Address = &v + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetadataHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_hyperledger_burrow_binary.HexBytes + m.MetadataHash = &v + if err := m.MetadataHash.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MetadataResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MetadataResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MetadataResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetStorageParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetStorageParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetStorageParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListAccountsParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListAccountsParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListAccountsParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Query = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetNameParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetNameParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetNameParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListNamesParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListNamesParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListNamesParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Query = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetNetworkRegistryParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetNetworkRegistryParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetNetworkRegistryParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetValidatorSetParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetValidatorSetParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetValidatorSetParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetValidatorSetHistoryParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetValidatorSetHistoryParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetValidatorSetHistoryParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IncludePrevious", wireType) + } + m.IncludePrevious = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IncludePrevious |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkRegistry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkRegistry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkRegistry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Set = append(m.Set, &RegisteredValidator{}) + if err := m.Set[len(m.Set)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RegisteredValidator) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RegisteredValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegisteredValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Node == nil { + m.Node = ®istry.NodeIdentity{} + } + if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorSetHistory) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorSetHistory: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorSetHistory: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field History", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.History = append(m.History, &ValidatorSet{}) + if err := m.History[len(m.History)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorSet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorSet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorSet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Set = append(m.Set, &validator.Validator{}) + if err := m.Set[len(m.Set)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetProposalParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetProposalParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetProposalParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListProposalsParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListProposalsParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListProposalsParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Proposed = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProposalResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProposalResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProposalResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ballot", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpcquery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpcquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ballot == nil { + m.Ballot = &payload.Ballot{} + } + if err := m.Ballot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetStatsParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetStatsParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetStatsParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Stats) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Stats: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Stats: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountsWithCode", wireType) + } + m.AccountsWithCode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountsWithCode |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountsWithoutCode", wireType) + } + m.AccountsWithoutCode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountsWithoutCode |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetBlockParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetBlockParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetBlockParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpcquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRpcquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpcquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRpcquery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRpcquery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRpcquery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRpcquery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthRpcquery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRpcquery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthRpcquery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthRpcquery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRpcquery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRpcquery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/rpc/rpcquery/rpcquery_grpc.pb.go b/rpc/rpcquery/rpcquery_grpc.pb.go new file mode 100644 index 000000000..76df0c644 --- /dev/null +++ b/rpc/rpcquery/rpcquery_grpc.pb.go @@ -0,0 +1,655 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package rpcquery + +import ( + context "context" + + acm "github.com/hyperledger/burrow/acm" + names "github.com/hyperledger/burrow/execution/names" + rpc "github.com/hyperledger/burrow/rpc" + payload "github.com/hyperledger/burrow/txs/payload" + types "github.com/tendermint/tendermint/proto/tendermint/types" + 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. +const _ = grpc.SupportPackageIsVersion7 + +// QueryClient is the client API for Query 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 QueryClient interface { + Status(ctx context.Context, in *StatusParam, opts ...grpc.CallOption) (*rpc.ResultStatus, error) + GetAccount(ctx context.Context, in *GetAccountParam, opts ...grpc.CallOption) (*acm.Account, error) + GetMetadata(ctx context.Context, in *GetMetadataParam, opts ...grpc.CallOption) (*MetadataResult, error) + GetStorage(ctx context.Context, in *GetStorageParam, opts ...grpc.CallOption) (*StorageValue, error) + ListAccounts(ctx context.Context, in *ListAccountsParam, opts ...grpc.CallOption) (Query_ListAccountsClient, error) + GetName(ctx context.Context, in *GetNameParam, opts ...grpc.CallOption) (*names.Entry, error) + ListNames(ctx context.Context, in *ListNamesParam, opts ...grpc.CallOption) (Query_ListNamesClient, error) + // GetNetworkRegistry returns for each validator address, the list of their identified node at the current state + GetNetworkRegistry(ctx context.Context, in *GetNetworkRegistryParam, opts ...grpc.CallOption) (*NetworkRegistry, error) + GetValidatorSet(ctx context.Context, in *GetValidatorSetParam, opts ...grpc.CallOption) (*ValidatorSet, error) + GetValidatorSetHistory(ctx context.Context, in *GetValidatorSetHistoryParam, opts ...grpc.CallOption) (*ValidatorSetHistory, error) + GetProposal(ctx context.Context, in *GetProposalParam, opts ...grpc.CallOption) (*payload.Ballot, error) + ListProposals(ctx context.Context, in *ListProposalsParam, opts ...grpc.CallOption) (Query_ListProposalsClient, error) + GetStats(ctx context.Context, in *GetStatsParam, opts ...grpc.CallOption) (*Stats, error) + GetBlockHeader(ctx context.Context, in *GetBlockParam, opts ...grpc.CallOption) (*types.Header, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Status(ctx context.Context, in *StatusParam, opts ...grpc.CallOption) (*rpc.ResultStatus, error) { + out := new(rpc.ResultStatus) + err := c.cc.Invoke(ctx, "/rpcquery.Query/Status", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetAccount(ctx context.Context, in *GetAccountParam, opts ...grpc.CallOption) (*acm.Account, error) { + out := new(acm.Account) + err := c.cc.Invoke(ctx, "/rpcquery.Query/GetAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetMetadata(ctx context.Context, in *GetMetadataParam, opts ...grpc.CallOption) (*MetadataResult, error) { + out := new(MetadataResult) + err := c.cc.Invoke(ctx, "/rpcquery.Query/GetMetadata", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetStorage(ctx context.Context, in *GetStorageParam, opts ...grpc.CallOption) (*StorageValue, error) { + out := new(StorageValue) + err := c.cc.Invoke(ctx, "/rpcquery.Query/GetStorage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ListAccounts(ctx context.Context, in *ListAccountsParam, opts ...grpc.CallOption) (Query_ListAccountsClient, error) { + stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[0], "/rpcquery.Query/ListAccounts", opts...) + if err != nil { + return nil, err + } + x := &queryListAccountsClient{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 Query_ListAccountsClient interface { + Recv() (*acm.Account, error) + grpc.ClientStream +} + +type queryListAccountsClient struct { + grpc.ClientStream +} + +func (x *queryListAccountsClient) Recv() (*acm.Account, error) { + m := new(acm.Account) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *queryClient) GetName(ctx context.Context, in *GetNameParam, opts ...grpc.CallOption) (*names.Entry, error) { + out := new(names.Entry) + err := c.cc.Invoke(ctx, "/rpcquery.Query/GetName", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ListNames(ctx context.Context, in *ListNamesParam, opts ...grpc.CallOption) (Query_ListNamesClient, error) { + stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[1], "/rpcquery.Query/ListNames", opts...) + if err != nil { + return nil, err + } + x := &queryListNamesClient{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 Query_ListNamesClient interface { + Recv() (*names.Entry, error) + grpc.ClientStream +} + +type queryListNamesClient struct { + grpc.ClientStream +} + +func (x *queryListNamesClient) Recv() (*names.Entry, error) { + m := new(names.Entry) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *queryClient) GetNetworkRegistry(ctx context.Context, in *GetNetworkRegistryParam, opts ...grpc.CallOption) (*NetworkRegistry, error) { + out := new(NetworkRegistry) + err := c.cc.Invoke(ctx, "/rpcquery.Query/GetNetworkRegistry", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetValidatorSet(ctx context.Context, in *GetValidatorSetParam, opts ...grpc.CallOption) (*ValidatorSet, error) { + out := new(ValidatorSet) + err := c.cc.Invoke(ctx, "/rpcquery.Query/GetValidatorSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetValidatorSetHistory(ctx context.Context, in *GetValidatorSetHistoryParam, opts ...grpc.CallOption) (*ValidatorSetHistory, error) { + out := new(ValidatorSetHistory) + err := c.cc.Invoke(ctx, "/rpcquery.Query/GetValidatorSetHistory", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetProposal(ctx context.Context, in *GetProposalParam, opts ...grpc.CallOption) (*payload.Ballot, error) { + out := new(payload.Ballot) + err := c.cc.Invoke(ctx, "/rpcquery.Query/GetProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ListProposals(ctx context.Context, in *ListProposalsParam, opts ...grpc.CallOption) (Query_ListProposalsClient, error) { + stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[2], "/rpcquery.Query/ListProposals", opts...) + if err != nil { + return nil, err + } + x := &queryListProposalsClient{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 Query_ListProposalsClient interface { + Recv() (*ProposalResult, error) + grpc.ClientStream +} + +type queryListProposalsClient struct { + grpc.ClientStream +} + +func (x *queryListProposalsClient) Recv() (*ProposalResult, error) { + m := new(ProposalResult) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *queryClient) GetStats(ctx context.Context, in *GetStatsParam, opts ...grpc.CallOption) (*Stats, error) { + out := new(Stats) + err := c.cc.Invoke(ctx, "/rpcquery.Query/GetStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetBlockHeader(ctx context.Context, in *GetBlockParam, opts ...grpc.CallOption) (*types.Header, error) { + out := new(types.Header) + err := c.cc.Invoke(ctx, "/rpcquery.Query/GetBlockHeader", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +type QueryServer interface { + Status(context.Context, *StatusParam) (*rpc.ResultStatus, error) + GetAccount(context.Context, *GetAccountParam) (*acm.Account, error) + GetMetadata(context.Context, *GetMetadataParam) (*MetadataResult, error) + GetStorage(context.Context, *GetStorageParam) (*StorageValue, error) + ListAccounts(*ListAccountsParam, Query_ListAccountsServer) error + GetName(context.Context, *GetNameParam) (*names.Entry, error) + ListNames(*ListNamesParam, Query_ListNamesServer) error + // GetNetworkRegistry returns for each validator address, the list of their identified node at the current state + GetNetworkRegistry(context.Context, *GetNetworkRegistryParam) (*NetworkRegistry, error) + GetValidatorSet(context.Context, *GetValidatorSetParam) (*ValidatorSet, error) + GetValidatorSetHistory(context.Context, *GetValidatorSetHistoryParam) (*ValidatorSetHistory, error) + GetProposal(context.Context, *GetProposalParam) (*payload.Ballot, error) + ListProposals(*ListProposalsParam, Query_ListProposalsServer) error + GetStats(context.Context, *GetStatsParam) (*Stats, error) + GetBlockHeader(context.Context, *GetBlockParam) (*types.Header, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Status(context.Context, *StatusParam) (*rpc.ResultStatus, error) { + return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") +} +func (UnimplementedQueryServer) GetAccount(context.Context, *GetAccountParam) (*acm.Account, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") +} +func (UnimplementedQueryServer) GetMetadata(context.Context, *GetMetadataParam) (*MetadataResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented") +} +func (UnimplementedQueryServer) GetStorage(context.Context, *GetStorageParam) (*StorageValue, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStorage not implemented") +} +func (UnimplementedQueryServer) ListAccounts(*ListAccountsParam, Query_ListAccountsServer) error { + return status.Errorf(codes.Unimplemented, "method ListAccounts not implemented") +} +func (UnimplementedQueryServer) GetName(context.Context, *GetNameParam) (*names.Entry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetName not implemented") +} +func (UnimplementedQueryServer) ListNames(*ListNamesParam, Query_ListNamesServer) error { + return status.Errorf(codes.Unimplemented, "method ListNames not implemented") +} +func (UnimplementedQueryServer) GetNetworkRegistry(context.Context, *GetNetworkRegistryParam) (*NetworkRegistry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNetworkRegistry not implemented") +} +func (UnimplementedQueryServer) GetValidatorSet(context.Context, *GetValidatorSetParam) (*ValidatorSet, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSet not implemented") +} +func (UnimplementedQueryServer) GetValidatorSetHistory(context.Context, *GetValidatorSetHistoryParam) (*ValidatorSetHistory, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSetHistory not implemented") +} +func (UnimplementedQueryServer) GetProposal(context.Context, *GetProposalParam) (*payload.Ballot, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProposal not implemented") +} +func (UnimplementedQueryServer) ListProposals(*ListProposalsParam, Query_ListProposalsServer) error { + return status.Errorf(codes.Unimplemented, "method ListProposals not implemented") +} +func (UnimplementedQueryServer) GetStats(context.Context, *GetStatsParam) (*Stats, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") +} +func (UnimplementedQueryServer) GetBlockHeader(context.Context, *GetBlockParam) (*types.Header, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeader not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatusParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Status(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcquery.Query/Status", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Status(ctx, req.(*StatusParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcquery.Query/GetAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetAccount(ctx, req.(*GetAccountParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMetadataParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcquery.Query/GetMetadata", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetMetadata(ctx, req.(*GetMetadataParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStorageParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetStorage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcquery.Query/GetStorage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetStorage(ctx, req.(*GetStorageParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ListAccounts_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ListAccountsParam) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(QueryServer).ListAccounts(m, &queryListAccountsServer{stream}) +} + +type Query_ListAccountsServer interface { + Send(*acm.Account) error + grpc.ServerStream +} + +type queryListAccountsServer struct { + grpc.ServerStream +} + +func (x *queryListAccountsServer) Send(m *acm.Account) error { + return x.ServerStream.SendMsg(m) +} + +func _Query_GetName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNameParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcquery.Query/GetName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetName(ctx, req.(*GetNameParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ListNames_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ListNamesParam) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(QueryServer).ListNames(m, &queryListNamesServer{stream}) +} + +type Query_ListNamesServer interface { + Send(*names.Entry) error + grpc.ServerStream +} + +type queryListNamesServer struct { + grpc.ServerStream +} + +func (x *queryListNamesServer) Send(m *names.Entry) error { + return x.ServerStream.SendMsg(m) +} + +func _Query_GetNetworkRegistry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNetworkRegistryParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetNetworkRegistry(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcquery.Query/GetNetworkRegistry", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetNetworkRegistry(ctx, req.(*GetNetworkRegistryParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetValidatorSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetValidatorSetParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetValidatorSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcquery.Query/GetValidatorSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetValidatorSet(ctx, req.(*GetValidatorSetParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetValidatorSetHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetValidatorSetHistoryParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetValidatorSetHistory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcquery.Query/GetValidatorSetHistory", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetValidatorSetHistory(ctx, req.(*GetValidatorSetHistoryParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProposalParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcquery.Query/GetProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetProposal(ctx, req.(*GetProposalParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ListProposals_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ListProposalsParam) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(QueryServer).ListProposals(m, &queryListProposalsServer{stream}) +} + +type Query_ListProposalsServer interface { + Send(*ProposalResult) error + grpc.ServerStream +} + +type queryListProposalsServer struct { + grpc.ServerStream +} + +func (x *queryListProposalsServer) Send(m *ProposalResult) error { + return x.ServerStream.SendMsg(m) +} + +func _Query_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStatsParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcquery.Query/GetStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetStats(ctx, req.(*GetStatsParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetBlockHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlockParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetBlockHeader(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcquery.Query/GetBlockHeader", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetBlockHeader(ctx, req.(*GetBlockParam)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "rpcquery.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Status", + Handler: _Query_Status_Handler, + }, + { + MethodName: "GetAccount", + Handler: _Query_GetAccount_Handler, + }, + { + MethodName: "GetMetadata", + Handler: _Query_GetMetadata_Handler, + }, + { + MethodName: "GetStorage", + Handler: _Query_GetStorage_Handler, + }, + { + MethodName: "GetName", + Handler: _Query_GetName_Handler, + }, + { + MethodName: "GetNetworkRegistry", + Handler: _Query_GetNetworkRegistry_Handler, + }, + { + MethodName: "GetValidatorSet", + Handler: _Query_GetValidatorSet_Handler, + }, + { + MethodName: "GetValidatorSetHistory", + Handler: _Query_GetValidatorSetHistory_Handler, + }, + { + MethodName: "GetProposal", + Handler: _Query_GetProposal_Handler, + }, + { + MethodName: "GetStats", + Handler: _Query_GetStats_Handler, + }, + { + MethodName: "GetBlockHeader", + Handler: _Query_GetBlockHeader_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "ListAccounts", + Handler: _Query_ListAccounts_Handler, + ServerStreams: true, + }, + { + StreamName: "ListNames", + Handler: _Query_ListNames_Handler, + ServerStreams: true, + }, + { + StreamName: "ListProposals", + Handler: _Query_ListProposals_Handler, + ServerStreams: true, + }, + }, + Metadata: "rpcquery.proto", +} diff --git a/rpc/rpctransact/rpctransact.pb.go b/rpc/rpctransact/rpctransact.pb.go index 996449417..40d3a1aed 100644 --- a/rpc/rpctransact/rpctransact.pb.go +++ b/rpc/rpctransact/rpctransact.pb.go @@ -4,7 +4,6 @@ package rpctransact import ( - context "context" fmt "fmt" io "io" math "math" @@ -17,13 +16,10 @@ import ( golang_proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/duration" github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" - exec "github.com/hyperledger/burrow/execution/exec" + _ "github.com/hyperledger/burrow/execution/exec" + _ "github.com/hyperledger/burrow/txs" github_com_hyperledger_burrow_txs "github.com/hyperledger/burrow/txs" - txs "github.com/hyperledger/burrow/txs" payload "github.com/hyperledger/burrow/txs/payload" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -58,16 +54,12 @@ func (m *CallCodeParam) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CallCodeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CallCodeParam.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *CallCodeParam) XXX_Merge(src proto.Message) { xxx_messageInfo_CallCodeParam.Merge(m, src) @@ -116,16 +108,12 @@ func (m *TxEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *TxEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxEnvelope.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *TxEnvelope) XXX_Merge(src proto.Message) { xxx_messageInfo_TxEnvelope.Merge(m, src) @@ -167,16 +155,12 @@ func (m *TxEnvelopeParam) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *TxEnvelopeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxEnvelopeParam.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *TxEnvelopeParam) XXX_Merge(src proto.Message) { xxx_messageInfo_TxEnvelopeParam.Merge(m, src) @@ -220,546 +204,42 @@ func init() { proto.RegisterFile("rpctransact.proto", fileDescriptor_039da6ebb58 func init() { golang_proto.RegisterFile("rpctransact.proto", fileDescriptor_039da6ebb58a8dc9) } var fileDescriptor_039da6ebb58a8dc9 = []byte{ - // 555 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0xc5, 0x7c, 0xf4, 0x63, 0xdc, 0x2a, 0x74, 0x2f, 0x84, 0x08, 0x39, 0x28, 0x07, 0x84, 0x50, - 0xbb, 0x8e, 0x42, 0x8f, 0x7c, 0x28, 0x4e, 0xdb, 0x23, 0xaa, 0x1c, 0x0b, 0x09, 0x6e, 0x1b, 0x7b, - 0x71, 0x2d, 0xd9, 0x5e, 0x6b, 0xbd, 0x06, 0xe7, 0x57, 0x70, 0xe1, 0xc0, 0xcf, 0xe1, 0x98, 0x23, - 0x12, 0xb7, 0x1e, 0x02, 0x4a, 0xff, 0x08, 0xf2, 0xae, 0xdd, 0xda, 0x49, 0xd3, 0x72, 0xe1, 0x36, - 0xfb, 0x66, 0xdf, 0xdb, 0x79, 0x33, 0xb3, 0xb0, 0xc7, 0x13, 0x57, 0x70, 0x12, 0xa7, 0xc4, 0x15, - 0x38, 0xe1, 0x4c, 0x30, 0xa4, 0xd7, 0xa0, 0xce, 0x81, 0x1f, 0x88, 0xb3, 0x6c, 0x82, 0x5d, 0x16, - 0x99, 0x3e, 0xf3, 0x99, 0x29, 0xef, 0x4c, 0xb2, 0x4f, 0xf2, 0x24, 0x0f, 0x32, 0x52, 0xdc, 0x8e, - 0xe1, 0x33, 0xe6, 0x87, 0xf4, 0xea, 0x96, 0x97, 0x71, 0x22, 0x02, 0x16, 0x97, 0x79, 0xa0, 0x39, - 0x75, 0xcb, 0x78, 0x37, 0x21, 0xd3, 0x90, 0x11, 0xaf, 0x3c, 0x6e, 0x8b, 0x3c, 0x55, 0x61, 0xef, - 0xab, 0x06, 0xbb, 0x23, 0x12, 0x86, 0x23, 0xe6, 0xd1, 0x53, 0xc2, 0x49, 0x84, 0xde, 0x83, 0x7e, - 0xc2, 0x59, 0x34, 0xf4, 0x3c, 0x4e, 0xd3, 0xb4, 0xad, 0x3d, 0xd5, 0x9e, 0xef, 0x58, 0x87, 0xb3, - 0x79, 0xf7, 0xce, 0xf9, 0xbc, 0xbb, 0x5f, 0xab, 0xf1, 0x6c, 0x9a, 0x50, 0x1e, 0x52, 0xcf, 0xa7, - 0xdc, 0x9c, 0x64, 0x9c, 0xb3, 0x2f, 0xa6, 0xcb, 0xa7, 0x89, 0x60, 0xb8, 0xe4, 0xda, 0x75, 0x21, - 0x84, 0xe0, 0x7e, 0xf1, 0x48, 0xfb, 0x6e, 0x21, 0x68, 0xcb, 0xb8, 0xc0, 0x8e, 0x88, 0x20, 0xed, - 0x7b, 0x0a, 0x2b, 0xe2, 0x9e, 0x0f, 0xe0, 0xe4, 0xc7, 0xf1, 0x67, 0x1a, 0xb2, 0x84, 0xa2, 0x0f, - 0xb0, 0x55, 0xc5, 0xb2, 0x14, 0x7d, 0xb0, 0x8b, 0x8b, 0xea, 0x2b, 0xd0, 0xc2, 0xe7, 0xf3, 0xee, - 0x8b, 0x9b, 0xab, 0xaa, 0xdf, 0xb7, 0x2f, 0xe5, 0x7a, 0xbf, 0x34, 0x68, 0x5d, 0xbd, 0xa4, 0xcc, - 0xff, 0xbf, 0xe7, 0xd0, 0x33, 0xd8, 0x3c, 0x55, 0x53, 0x90, 0x2d, 0xd0, 0x07, 0x3b, 0xb8, 0x9a, - 0xca, 0x30, 0x9e, 0xda, 0x55, 0x12, 0xbd, 0x86, 0x4d, 0x27, 0x88, 0x28, 0xcb, 0x84, 0x6c, 0x8b, - 0x3e, 0x78, 0x8c, 0xd5, 0xa4, 0x71, 0x35, 0x69, 0x7c, 0x54, 0x4e, 0xda, 0xda, 0x2a, 0xc6, 0xf2, - 0xfd, 0x77, 0x57, 0xb3, 0x2b, 0xce, 0xe0, 0xdb, 0x03, 0xd8, 0x72, 0xca, 0x95, 0x42, 0x16, 0xb4, - 0x2c, 0xce, 0x88, 0xe7, 0x92, 0x54, 0x38, 0xf9, 0x78, 0x1a, 0xbb, 0xe8, 0x09, 0xae, 0xaf, 0xe1, - 0x92, 0xff, 0xce, 0x1e, 0x96, 0x5b, 0xe3, 0xe4, 0xc7, 0x39, 0x75, 0xb3, 0xe2, 0x0d, 0xf4, 0x06, - 0x1e, 0xd6, 0x34, 0x86, 0xe9, 0xed, 0x22, 0x3b, 0xb2, 0x65, 0x36, 0x75, 0x69, 0x90, 0x08, 0xf4, - 0x16, 0x36, 0xc6, 0x81, 0x1f, 0x3b, 0xf9, 0x2d, 0xac, 0x47, 0x6b, 0xb2, 0xe8, 0x10, 0xf4, 0x13, - 0xc6, 0xa3, 0x2c, 0x24, 0x82, 0x3a, 0x39, 0x6a, 0xb4, 0x6d, 0x3d, 0xab, 0x0f, 0x50, 0xec, 0x75, - 0xe9, 0xba, 0x75, 0x49, 0x52, 0xe0, 0x75, 0x46, 0xf7, 0x41, 0x57, 0x49, 0xe5, 0x71, 0x85, 0xd2, - 0xb4, 0x65, 0xc2, 0x76, 0xa9, 0x1f, 0x44, 0xff, 0x24, 0xff, 0x4a, 0xc9, 0x17, 0x7b, 0x5f, 0x50, - 0x3a, 0x8d, 0xc2, 0x1b, 0x5f, 0xf0, 0x3a, 0x76, 0x1f, 0x60, 0x4c, 0x63, 0x6f, 0xc5, 0x8e, 0x02, - 0xd7, 0xd8, 0x51, 0xc9, 0x65, 0x3b, 0x25, 0xa5, 0x69, 0xa7, 0x0f, 0xf0, 0x8e, 0x44, 0x74, 0x45, - 0x5f, 0x81, 0x6b, 0xf4, 0x55, 0x72, 0x59, 0xbf, 0xa4, 0x34, 0xf4, 0xad, 0xd1, 0x6c, 0x61, 0x68, - 0x3f, 0x17, 0x86, 0xf6, 0x67, 0x61, 0x68, 0x3f, 0x2e, 0x0c, 0x6d, 0x76, 0x61, 0x68, 0x1f, 0x0f, - 0x6e, 0xfe, 0x49, 0x3c, 0x71, 0xcd, 0x5a, 0x97, 0x26, 0x1b, 0xf2, 0x07, 0xbc, 0xfc, 0x1b, 0x00, - 0x00, 0xff, 0xff, 0x70, 0x12, 0x34, 0xbe, 0x4a, 0x05, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// 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.SupportPackageIsVersion4 - -// TransactClient is the client API for Transact service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TransactClient interface { - // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side - // and wait for it to be included in block - BroadcastTxSync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*exec.TxExecution, error) - // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side - BroadcastTxAsync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*txs.Receipt, error) - // Sign transaction server-side - SignTx(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*TxEnvelope, error) - // Formulate a transaction from a Payload and retrun the envelop with the Tx bytes ready to sign - FormulateTx(ctx context.Context, in *payload.Any, opts ...grpc.CallOption) (*TxEnvelope, error) - // Formulate and sign a CallTx transaction signed server-side and wait for it to be included in a block, retrieving response - CallTxSync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error) - // Formulate and sign a CallTx transaction signed server-side - CallTxAsync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*txs.Receipt, error) - // Perform a 'simulated' call of a contract against the current committed EVM state without any changes been saved - // and wait for the transaction to be included in a block - CallTxSim(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error) - // Perform a 'simulated' execution of provided code against the current committed EVM state without any changes been saved - CallCodeSim(ctx context.Context, in *CallCodeParam, opts ...grpc.CallOption) (*exec.TxExecution, error) - // Formulate a SendTx transaction signed server-side and wait for it to be included in a block, retrieving response - SendTxSync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*exec.TxExecution, error) - // Formulate and SendTx transaction signed server-side - SendTxAsync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*txs.Receipt, error) - // Formulate a NameTx signed server-side and wait for it to be included in a block returning the registered name - NameTxSync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*exec.TxExecution, error) - // Formulate a NameTx signed server-side - NameTxAsync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*txs.Receipt, error) -} - -type transactClient struct { - cc *grpc.ClientConn -} - -func NewTransactClient(cc *grpc.ClientConn) TransactClient { - return &transactClient{cc} -} - -func (c *transactClient) BroadcastTxSync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*exec.TxExecution, error) { - out := new(exec.TxExecution) - err := c.cc.Invoke(ctx, "/rpctransact.Transact/BroadcastTxSync", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactClient) BroadcastTxAsync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*txs.Receipt, error) { - out := new(txs.Receipt) - err := c.cc.Invoke(ctx, "/rpctransact.Transact/BroadcastTxAsync", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactClient) SignTx(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*TxEnvelope, error) { - out := new(TxEnvelope) - err := c.cc.Invoke(ctx, "/rpctransact.Transact/SignTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactClient) FormulateTx(ctx context.Context, in *payload.Any, opts ...grpc.CallOption) (*TxEnvelope, error) { - out := new(TxEnvelope) - err := c.cc.Invoke(ctx, "/rpctransact.Transact/FormulateTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactClient) CallTxSync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error) { - out := new(exec.TxExecution) - err := c.cc.Invoke(ctx, "/rpctransact.Transact/CallTxSync", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactClient) CallTxAsync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*txs.Receipt, error) { - out := new(txs.Receipt) - err := c.cc.Invoke(ctx, "/rpctransact.Transact/CallTxAsync", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactClient) CallTxSim(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error) { - out := new(exec.TxExecution) - err := c.cc.Invoke(ctx, "/rpctransact.Transact/CallTxSim", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactClient) CallCodeSim(ctx context.Context, in *CallCodeParam, opts ...grpc.CallOption) (*exec.TxExecution, error) { - out := new(exec.TxExecution) - err := c.cc.Invoke(ctx, "/rpctransact.Transact/CallCodeSim", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactClient) SendTxSync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*exec.TxExecution, error) { - out := new(exec.TxExecution) - err := c.cc.Invoke(ctx, "/rpctransact.Transact/SendTxSync", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactClient) SendTxAsync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*txs.Receipt, error) { - out := new(txs.Receipt) - err := c.cc.Invoke(ctx, "/rpctransact.Transact/SendTxAsync", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactClient) NameTxSync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*exec.TxExecution, error) { - out := new(exec.TxExecution) - err := c.cc.Invoke(ctx, "/rpctransact.Transact/NameTxSync", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactClient) NameTxAsync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*txs.Receipt, error) { - out := new(txs.Receipt) - err := c.cc.Invoke(ctx, "/rpctransact.Transact/NameTxAsync", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TransactServer is the server API for Transact service. -type TransactServer interface { - // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side - // and wait for it to be included in block - BroadcastTxSync(context.Context, *TxEnvelopeParam) (*exec.TxExecution, error) - // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side - BroadcastTxAsync(context.Context, *TxEnvelopeParam) (*txs.Receipt, error) - // Sign transaction server-side - SignTx(context.Context, *TxEnvelopeParam) (*TxEnvelope, error) - // Formulate a transaction from a Payload and retrun the envelop with the Tx bytes ready to sign - FormulateTx(context.Context, *payload.Any) (*TxEnvelope, error) - // Formulate and sign a CallTx transaction signed server-side and wait for it to be included in a block, retrieving response - CallTxSync(context.Context, *payload.CallTx) (*exec.TxExecution, error) - // Formulate and sign a CallTx transaction signed server-side - CallTxAsync(context.Context, *payload.CallTx) (*txs.Receipt, error) - // Perform a 'simulated' call of a contract against the current committed EVM state without any changes been saved - // and wait for the transaction to be included in a block - CallTxSim(context.Context, *payload.CallTx) (*exec.TxExecution, error) - // Perform a 'simulated' execution of provided code against the current committed EVM state without any changes been saved - CallCodeSim(context.Context, *CallCodeParam) (*exec.TxExecution, error) - // Formulate a SendTx transaction signed server-side and wait for it to be included in a block, retrieving response - SendTxSync(context.Context, *payload.SendTx) (*exec.TxExecution, error) - // Formulate and SendTx transaction signed server-side - SendTxAsync(context.Context, *payload.SendTx) (*txs.Receipt, error) - // Formulate a NameTx signed server-side and wait for it to be included in a block returning the registered name - NameTxSync(context.Context, *payload.NameTx) (*exec.TxExecution, error) - // Formulate a NameTx signed server-side - NameTxAsync(context.Context, *payload.NameTx) (*txs.Receipt, error) -} - -// UnimplementedTransactServer can be embedded to have forward compatible implementations. -type UnimplementedTransactServer struct { -} - -func (*UnimplementedTransactServer) BroadcastTxSync(ctx context.Context, req *TxEnvelopeParam) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method BroadcastTxSync not implemented") -} -func (*UnimplementedTransactServer) BroadcastTxAsync(ctx context.Context, req *TxEnvelopeParam) (*txs.Receipt, error) { - return nil, status.Errorf(codes.Unimplemented, "method BroadcastTxAsync not implemented") -} -func (*UnimplementedTransactServer) SignTx(ctx context.Context, req *TxEnvelopeParam) (*TxEnvelope, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignTx not implemented") -} -func (*UnimplementedTransactServer) FormulateTx(ctx context.Context, req *payload.Any) (*TxEnvelope, error) { - return nil, status.Errorf(codes.Unimplemented, "method FormulateTx not implemented") -} -func (*UnimplementedTransactServer) CallTxSync(ctx context.Context, req *payload.CallTx) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallTxSync not implemented") -} -func (*UnimplementedTransactServer) CallTxAsync(ctx context.Context, req *payload.CallTx) (*txs.Receipt, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallTxAsync not implemented") -} -func (*UnimplementedTransactServer) CallTxSim(ctx context.Context, req *payload.CallTx) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallTxSim not implemented") -} -func (*UnimplementedTransactServer) CallCodeSim(ctx context.Context, req *CallCodeParam) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallCodeSim not implemented") -} -func (*UnimplementedTransactServer) SendTxSync(ctx context.Context, req *payload.SendTx) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendTxSync not implemented") -} -func (*UnimplementedTransactServer) SendTxAsync(ctx context.Context, req *payload.SendTx) (*txs.Receipt, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendTxAsync not implemented") -} -func (*UnimplementedTransactServer) NameTxSync(ctx context.Context, req *payload.NameTx) (*exec.TxExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method NameTxSync not implemented") -} -func (*UnimplementedTransactServer) NameTxAsync(ctx context.Context, req *payload.NameTx) (*txs.Receipt, error) { - return nil, status.Errorf(codes.Unimplemented, "method NameTxAsync not implemented") -} - -func RegisterTransactServer(s *grpc.Server, srv TransactServer) { - s.RegisterService(&_Transact_serviceDesc, srv) -} - -func _Transact_BroadcastTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TxEnvelopeParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactServer).BroadcastTxSync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpctransact.Transact/BroadcastTxSync", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactServer).BroadcastTxSync(ctx, req.(*TxEnvelopeParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transact_BroadcastTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TxEnvelopeParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactServer).BroadcastTxAsync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpctransact.Transact/BroadcastTxAsync", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactServer).BroadcastTxAsync(ctx, req.(*TxEnvelopeParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transact_SignTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TxEnvelopeParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactServer).SignTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpctransact.Transact/SignTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactServer).SignTx(ctx, req.(*TxEnvelopeParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transact_FormulateTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(payload.Any) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactServer).FormulateTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpctransact.Transact/FormulateTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactServer).FormulateTx(ctx, req.(*payload.Any)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transact_CallTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(payload.CallTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactServer).CallTxSync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpctransact.Transact/CallTxSync", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactServer).CallTxSync(ctx, req.(*payload.CallTx)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transact_CallTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(payload.CallTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactServer).CallTxAsync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpctransact.Transact/CallTxAsync", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactServer).CallTxAsync(ctx, req.(*payload.CallTx)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transact_CallTxSim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(payload.CallTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactServer).CallTxSim(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpctransact.Transact/CallTxSim", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactServer).CallTxSim(ctx, req.(*payload.CallTx)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transact_CallCodeSim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CallCodeParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactServer).CallCodeSim(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpctransact.Transact/CallCodeSim", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactServer).CallCodeSim(ctx, req.(*CallCodeParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transact_SendTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(payload.SendTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactServer).SendTxSync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpctransact.Transact/SendTxSync", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactServer).SendTxSync(ctx, req.(*payload.SendTx)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transact_SendTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(payload.SendTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactServer).SendTxAsync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpctransact.Transact/SendTxAsync", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactServer).SendTxAsync(ctx, req.(*payload.SendTx)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transact_NameTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(payload.NameTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactServer).NameTxSync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpctransact.Transact/NameTxSync", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactServer).NameTxSync(ctx, req.(*payload.NameTx)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transact_NameTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(payload.NameTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactServer).NameTxAsync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rpctransact.Transact/NameTxAsync", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactServer).NameTxAsync(ctx, req.(*payload.NameTx)) - } - return interceptor(ctx, in, info, handler) -} - -var _Transact_serviceDesc = grpc.ServiceDesc{ - ServiceName: "rpctransact.Transact", - HandlerType: (*TransactServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "BroadcastTxSync", - Handler: _Transact_BroadcastTxSync_Handler, - }, - { - MethodName: "BroadcastTxAsync", - Handler: _Transact_BroadcastTxAsync_Handler, - }, - { - MethodName: "SignTx", - Handler: _Transact_SignTx_Handler, - }, - { - MethodName: "FormulateTx", - Handler: _Transact_FormulateTx_Handler, - }, - { - MethodName: "CallTxSync", - Handler: _Transact_CallTxSync_Handler, - }, - { - MethodName: "CallTxAsync", - Handler: _Transact_CallTxAsync_Handler, - }, - { - MethodName: "CallTxSim", - Handler: _Transact_CallTxSim_Handler, - }, - { - MethodName: "CallCodeSim", - Handler: _Transact_CallCodeSim_Handler, - }, - { - MethodName: "SendTxSync", - Handler: _Transact_SendTxSync_Handler, - }, - { - MethodName: "SendTxAsync", - Handler: _Transact_SendTxAsync_Handler, - }, - { - MethodName: "NameTxSync", - Handler: _Transact_NameTxSync_Handler, - }, - { - MethodName: "NameTxAsync", - Handler: _Transact_NameTxAsync_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "rpctransact.proto", + // 557 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x4d, 0x6f, 0xd3, 0x4c, + 0x10, 0x7e, 0xfd, 0x02, 0xfd, 0x18, 0x37, 0x0a, 0x5d, 0x21, 0x11, 0x22, 0xe4, 0xa0, 0x1c, 0x10, + 0x42, 0x65, 0x1d, 0x85, 0x1e, 0xf9, 0x50, 0xdc, 0x0f, 0x6e, 0xa8, 0x72, 0x2c, 0x24, 0xb8, 0x6d, + 0xec, 0xc5, 0xb5, 0x64, 0x7b, 0xad, 0xf5, 0x1a, 0x9c, 0x5f, 0xc1, 0x85, 0x03, 0x3f, 0x87, 0x63, + 0x8e, 0x48, 0x5c, 0x50, 0x0f, 0x01, 0xa5, 0x7f, 0x04, 0xad, 0xd7, 0x2e, 0x76, 0xd2, 0xb4, 0x5c, + 0xb8, 0x8d, 0x9f, 0xf1, 0xf3, 0xcc, 0x3c, 0x33, 0xb3, 0xb0, 0xcb, 0x13, 0x57, 0x70, 0x12, 0xa7, + 0xc4, 0x15, 0x38, 0xe1, 0x4c, 0x30, 0xa4, 0xd7, 0xa0, 0xee, 0x1d, 0x9f, 0xf9, 0xac, 0xc0, 0x4d, + 0x19, 0xa9, 0x5f, 0xba, 0x86, 0xcf, 0x98, 0x1f, 0x52, 0xb3, 0xf8, 0x9a, 0x64, 0xef, 0x4d, 0x2f, + 0xe3, 0x44, 0x04, 0x2c, 0x2e, 0xf3, 0x40, 0x73, 0xea, 0x96, 0x71, 0x2b, 0x21, 0xd3, 0x90, 0x11, + 0xaf, 0xfc, 0xdc, 0x16, 0x79, 0xaa, 0xc2, 0xfe, 0x27, 0x0d, 0x5a, 0x07, 0x24, 0x0c, 0x0f, 0x98, + 0x47, 0x4f, 0x08, 0x27, 0x11, 0x7a, 0x03, 0xfa, 0x31, 0x67, 0xd1, 0xc8, 0xf3, 0x38, 0x4d, 0xd3, + 0x8e, 0xf6, 0x40, 0x7b, 0xb4, 0x63, 0xed, 0xcf, 0xe6, 0xbd, 0xff, 0xce, 0xe6, 0xbd, 0x3d, 0x3f, + 0x10, 0xa7, 0xd9, 0x04, 0xbb, 0x2c, 0x32, 0x4f, 0xa7, 0x09, 0xe5, 0x21, 0xf5, 0x7c, 0xca, 0xcd, + 0x49, 0xc6, 0x39, 0xfb, 0x68, 0xba, 0x7c, 0x9a, 0x08, 0x86, 0x4b, 0xae, 0x5d, 0x17, 0x42, 0x08, + 0x6e, 0xca, 0x22, 0x9d, 0xff, 0xa5, 0xa0, 0x5d, 0xc4, 0x12, 0x3b, 0x24, 0x82, 0x74, 0x6e, 0x28, + 0x4c, 0xc6, 0x7d, 0x1f, 0xc0, 0xc9, 0x8f, 0xe2, 0x0f, 0x34, 0x64, 0x09, 0x45, 0x6f, 0x61, 0xab, + 0x8a, 0x8b, 0x56, 0xf4, 0x61, 0x0b, 0xcb, 0xee, 0x2b, 0xd0, 0xc2, 0x67, 0xf3, 0xde, 0xe3, 0xab, + 0xbb, 0xaa, 0xff, 0x6f, 0x5f, 0xc8, 0xf5, 0xbf, 0x6b, 0xd0, 0xfe, 0x53, 0x49, 0x99, 0xff, 0x77, + 0xe5, 0xd0, 0x43, 0xd8, 0x3c, 0x51, 0x5b, 0x28, 0x46, 0xa0, 0x0f, 0x77, 0x70, 0xb5, 0x95, 0x51, + 0x3c, 0xb5, 0xab, 0x24, 0x7a, 0x0e, 0x9b, 0x4e, 0x10, 0x51, 0x96, 0x89, 0x62, 0x2c, 0xfa, 0xf0, + 0x1e, 0x56, 0x9b, 0xc6, 0xd5, 0xa6, 0xf1, 0x61, 0xb9, 0x69, 0x6b, 0x4b, 0xae, 0xe5, 0xcb, 0xcf, + 0x9e, 0x66, 0x57, 0x9c, 0xe1, 0xe7, 0x5b, 0xb0, 0xe5, 0x94, 0x97, 0x83, 0x2c, 0x68, 0x5b, 0x9c, + 0x11, 0xcf, 0x25, 0xa9, 0x70, 0xf2, 0xf1, 0x34, 0x76, 0xd1, 0x7d, 0x5c, 0xbf, 0xb6, 0x25, 0xff, + 0xdd, 0x5d, 0x5c, 0x5c, 0x8d, 0x93, 0x1f, 0xe5, 0xd4, 0xcd, 0x64, 0x0d, 0xf4, 0x02, 0x6e, 0xd7, + 0x34, 0x46, 0xe9, 0xf5, 0x22, 0x3b, 0xc5, 0xc8, 0x6c, 0xea, 0xd2, 0x20, 0x11, 0xe8, 0x25, 0x6c, + 0x8c, 0x03, 0x3f, 0x76, 0xf2, 0x6b, 0x58, 0x77, 0xd7, 0x64, 0xd1, 0x3e, 0xe8, 0xc7, 0x8c, 0x47, + 0x59, 0x48, 0x04, 0x75, 0x72, 0xd4, 0x18, 0xdb, 0x7a, 0xd6, 0x00, 0x40, 0xde, 0x75, 0xe9, 0xba, + 0x7d, 0x41, 0x52, 0xe0, 0x65, 0x46, 0xf7, 0x40, 0x57, 0x49, 0xe5, 0x71, 0x85, 0xd2, 0xb4, 0x65, + 0xc2, 0x76, 0xa9, 0x1f, 0x44, 0x7f, 0x25, 0xff, 0x4c, 0xc9, 0xcb, 0xbb, 0x97, 0x94, 0x6e, 0xa3, + 0xf1, 0xc6, 0x13, 0xbc, 0x8c, 0x3d, 0x00, 0x18, 0xd3, 0xd8, 0x5b, 0xb1, 0xa3, 0xc0, 0x35, 0x76, + 0x54, 0x72, 0xd9, 0x4e, 0x49, 0x69, 0xda, 0x19, 0x00, 0xbc, 0x26, 0x11, 0x5d, 0xd1, 0x57, 0xe0, + 0x1a, 0x7d, 0x95, 0x5c, 0xd6, 0x2f, 0x29, 0x0d, 0x7d, 0xeb, 0xd5, 0x6c, 0x61, 0x68, 0xdf, 0x16, + 0x86, 0xf6, 0x63, 0x61, 0x68, 0xbf, 0x16, 0x86, 0xf6, 0xf5, 0xdc, 0xd0, 0x66, 0xe7, 0x86, 0xf6, + 0xee, 0xc9, 0xd5, 0xaf, 0x89, 0x27, 0xae, 0x59, 0x9b, 0xd4, 0x64, 0xa3, 0x78, 0x05, 0x4f, 0x7f, + 0x07, 0x00, 0x00, 0xff, 0xff, 0x69, 0x8d, 0x35, 0xa5, 0x35, 0x05, 0x00, 0x00, } func (m *CallCodeParam) Marshal() (dAtA []byte, err error) { @@ -1124,10 +604,7 @@ func (m *CallCodeParam) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRpctransact - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRpctransact } if (iNdEx + skippy) > l { @@ -1214,10 +691,7 @@ func (m *TxEnvelope) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRpctransact - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRpctransact } if (iNdEx + skippy) > l { @@ -1373,10 +847,7 @@ func (m *TxEnvelopeParam) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRpctransact - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRpctransact } if (iNdEx + skippy) > l { diff --git a/rpc/rpctransact/rpctransact_grpc.pb.go b/rpc/rpctransact/rpctransact_grpc.pb.go new file mode 100644 index 000000000..9a70d6fb1 --- /dev/null +++ b/rpc/rpctransact/rpctransact_grpc.pb.go @@ -0,0 +1,525 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package rpctransact + +import ( + context "context" + + exec "github.com/hyperledger/burrow/execution/exec" + txs "github.com/hyperledger/burrow/txs" + payload "github.com/hyperledger/burrow/txs/payload" + 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. +const _ = grpc.SupportPackageIsVersion7 + +// TransactClient is the client API for Transact 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 TransactClient interface { + // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side + // and wait for it to be included in block + BroadcastTxSync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*exec.TxExecution, error) + // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side + BroadcastTxAsync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*txs.Receipt, error) + // Sign transaction server-side + SignTx(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*TxEnvelope, error) + // Formulate a transaction from a Payload and retrun the envelop with the Tx bytes ready to sign + FormulateTx(ctx context.Context, in *payload.Any, opts ...grpc.CallOption) (*TxEnvelope, error) + // Formulate and sign a CallTx transaction signed server-side and wait for it to be included in a block, retrieving response + CallTxSync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error) + // Formulate and sign a CallTx transaction signed server-side + CallTxAsync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*txs.Receipt, error) + // Perform a 'simulated' call of a contract against the current committed EVM state without any changes been saved + // and wait for the transaction to be included in a block + CallTxSim(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error) + // Perform a 'simulated' execution of provided code against the current committed EVM state without any changes been saved + CallCodeSim(ctx context.Context, in *CallCodeParam, opts ...grpc.CallOption) (*exec.TxExecution, error) + // Formulate a SendTx transaction signed server-side and wait for it to be included in a block, retrieving response + SendTxSync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*exec.TxExecution, error) + // Formulate and SendTx transaction signed server-side + SendTxAsync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*txs.Receipt, error) + // Formulate a NameTx signed server-side and wait for it to be included in a block returning the registered name + NameTxSync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*exec.TxExecution, error) + // Formulate a NameTx signed server-side + NameTxAsync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*txs.Receipt, error) +} + +type transactClient struct { + cc grpc.ClientConnInterface +} + +func NewTransactClient(cc grpc.ClientConnInterface) TransactClient { + return &transactClient{cc} +} + +func (c *transactClient) BroadcastTxSync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*exec.TxExecution, error) { + out := new(exec.TxExecution) + err := c.cc.Invoke(ctx, "/rpctransact.Transact/BroadcastTxSync", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactClient) BroadcastTxAsync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*txs.Receipt, error) { + out := new(txs.Receipt) + err := c.cc.Invoke(ctx, "/rpctransact.Transact/BroadcastTxAsync", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactClient) SignTx(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*TxEnvelope, error) { + out := new(TxEnvelope) + err := c.cc.Invoke(ctx, "/rpctransact.Transact/SignTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactClient) FormulateTx(ctx context.Context, in *payload.Any, opts ...grpc.CallOption) (*TxEnvelope, error) { + out := new(TxEnvelope) + err := c.cc.Invoke(ctx, "/rpctransact.Transact/FormulateTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactClient) CallTxSync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error) { + out := new(exec.TxExecution) + err := c.cc.Invoke(ctx, "/rpctransact.Transact/CallTxSync", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactClient) CallTxAsync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*txs.Receipt, error) { + out := new(txs.Receipt) + err := c.cc.Invoke(ctx, "/rpctransact.Transact/CallTxAsync", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactClient) CallTxSim(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error) { + out := new(exec.TxExecution) + err := c.cc.Invoke(ctx, "/rpctransact.Transact/CallTxSim", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactClient) CallCodeSim(ctx context.Context, in *CallCodeParam, opts ...grpc.CallOption) (*exec.TxExecution, error) { + out := new(exec.TxExecution) + err := c.cc.Invoke(ctx, "/rpctransact.Transact/CallCodeSim", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactClient) SendTxSync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*exec.TxExecution, error) { + out := new(exec.TxExecution) + err := c.cc.Invoke(ctx, "/rpctransact.Transact/SendTxSync", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactClient) SendTxAsync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*txs.Receipt, error) { + out := new(txs.Receipt) + err := c.cc.Invoke(ctx, "/rpctransact.Transact/SendTxAsync", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactClient) NameTxSync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*exec.TxExecution, error) { + out := new(exec.TxExecution) + err := c.cc.Invoke(ctx, "/rpctransact.Transact/NameTxSync", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactClient) NameTxAsync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*txs.Receipt, error) { + out := new(txs.Receipt) + err := c.cc.Invoke(ctx, "/rpctransact.Transact/NameTxAsync", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TransactServer is the server API for Transact service. +// All implementations must embed UnimplementedTransactServer +// for forward compatibility +type TransactServer interface { + // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side + // and wait for it to be included in block + BroadcastTxSync(context.Context, *TxEnvelopeParam) (*exec.TxExecution, error) + // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side + BroadcastTxAsync(context.Context, *TxEnvelopeParam) (*txs.Receipt, error) + // Sign transaction server-side + SignTx(context.Context, *TxEnvelopeParam) (*TxEnvelope, error) + // Formulate a transaction from a Payload and retrun the envelop with the Tx bytes ready to sign + FormulateTx(context.Context, *payload.Any) (*TxEnvelope, error) + // Formulate and sign a CallTx transaction signed server-side and wait for it to be included in a block, retrieving response + CallTxSync(context.Context, *payload.CallTx) (*exec.TxExecution, error) + // Formulate and sign a CallTx transaction signed server-side + CallTxAsync(context.Context, *payload.CallTx) (*txs.Receipt, error) + // Perform a 'simulated' call of a contract against the current committed EVM state without any changes been saved + // and wait for the transaction to be included in a block + CallTxSim(context.Context, *payload.CallTx) (*exec.TxExecution, error) + // Perform a 'simulated' execution of provided code against the current committed EVM state without any changes been saved + CallCodeSim(context.Context, *CallCodeParam) (*exec.TxExecution, error) + // Formulate a SendTx transaction signed server-side and wait for it to be included in a block, retrieving response + SendTxSync(context.Context, *payload.SendTx) (*exec.TxExecution, error) + // Formulate and SendTx transaction signed server-side + SendTxAsync(context.Context, *payload.SendTx) (*txs.Receipt, error) + // Formulate a NameTx signed server-side and wait for it to be included in a block returning the registered name + NameTxSync(context.Context, *payload.NameTx) (*exec.TxExecution, error) + // Formulate a NameTx signed server-side + NameTxAsync(context.Context, *payload.NameTx) (*txs.Receipt, error) + mustEmbedUnimplementedTransactServer() +} + +// UnimplementedTransactServer must be embedded to have forward compatible implementations. +type UnimplementedTransactServer struct { +} + +func (UnimplementedTransactServer) BroadcastTxSync(context.Context, *TxEnvelopeParam) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method BroadcastTxSync not implemented") +} +func (UnimplementedTransactServer) BroadcastTxAsync(context.Context, *TxEnvelopeParam) (*txs.Receipt, error) { + return nil, status.Errorf(codes.Unimplemented, "method BroadcastTxAsync not implemented") +} +func (UnimplementedTransactServer) SignTx(context.Context, *TxEnvelopeParam) (*TxEnvelope, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignTx not implemented") +} +func (UnimplementedTransactServer) FormulateTx(context.Context, *payload.Any) (*TxEnvelope, error) { + return nil, status.Errorf(codes.Unimplemented, "method FormulateTx not implemented") +} +func (UnimplementedTransactServer) CallTxSync(context.Context, *payload.CallTx) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallTxSync not implemented") +} +func (UnimplementedTransactServer) CallTxAsync(context.Context, *payload.CallTx) (*txs.Receipt, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallTxAsync not implemented") +} +func (UnimplementedTransactServer) CallTxSim(context.Context, *payload.CallTx) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallTxSim not implemented") +} +func (UnimplementedTransactServer) CallCodeSim(context.Context, *CallCodeParam) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallCodeSim not implemented") +} +func (UnimplementedTransactServer) SendTxSync(context.Context, *payload.SendTx) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendTxSync not implemented") +} +func (UnimplementedTransactServer) SendTxAsync(context.Context, *payload.SendTx) (*txs.Receipt, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendTxAsync not implemented") +} +func (UnimplementedTransactServer) NameTxSync(context.Context, *payload.NameTx) (*exec.TxExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method NameTxSync not implemented") +} +func (UnimplementedTransactServer) NameTxAsync(context.Context, *payload.NameTx) (*txs.Receipt, error) { + return nil, status.Errorf(codes.Unimplemented, "method NameTxAsync not implemented") +} +func (UnimplementedTransactServer) mustEmbedUnimplementedTransactServer() {} + +// UnsafeTransactServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TransactServer will +// result in compilation errors. +type UnsafeTransactServer interface { + mustEmbedUnimplementedTransactServer() +} + +func RegisterTransactServer(s grpc.ServiceRegistrar, srv TransactServer) { + s.RegisterService(&_Transact_serviceDesc, srv) +} + +func _Transact_BroadcastTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TxEnvelopeParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactServer).BroadcastTxSync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpctransact.Transact/BroadcastTxSync", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactServer).BroadcastTxSync(ctx, req.(*TxEnvelopeParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transact_BroadcastTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TxEnvelopeParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactServer).BroadcastTxAsync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpctransact.Transact/BroadcastTxAsync", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactServer).BroadcastTxAsync(ctx, req.(*TxEnvelopeParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transact_SignTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TxEnvelopeParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactServer).SignTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpctransact.Transact/SignTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactServer).SignTx(ctx, req.(*TxEnvelopeParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transact_FormulateTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(payload.Any) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactServer).FormulateTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpctransact.Transact/FormulateTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactServer).FormulateTx(ctx, req.(*payload.Any)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transact_CallTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(payload.CallTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactServer).CallTxSync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpctransact.Transact/CallTxSync", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactServer).CallTxSync(ctx, req.(*payload.CallTx)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transact_CallTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(payload.CallTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactServer).CallTxAsync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpctransact.Transact/CallTxAsync", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactServer).CallTxAsync(ctx, req.(*payload.CallTx)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transact_CallTxSim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(payload.CallTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactServer).CallTxSim(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpctransact.Transact/CallTxSim", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactServer).CallTxSim(ctx, req.(*payload.CallTx)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transact_CallCodeSim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CallCodeParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactServer).CallCodeSim(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpctransact.Transact/CallCodeSim", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactServer).CallCodeSim(ctx, req.(*CallCodeParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transact_SendTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(payload.SendTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactServer).SendTxSync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpctransact.Transact/SendTxSync", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactServer).SendTxSync(ctx, req.(*payload.SendTx)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transact_SendTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(payload.SendTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactServer).SendTxAsync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpctransact.Transact/SendTxAsync", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactServer).SendTxAsync(ctx, req.(*payload.SendTx)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transact_NameTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(payload.NameTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactServer).NameTxSync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpctransact.Transact/NameTxSync", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactServer).NameTxSync(ctx, req.(*payload.NameTx)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transact_NameTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(payload.NameTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactServer).NameTxAsync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpctransact.Transact/NameTxAsync", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactServer).NameTxAsync(ctx, req.(*payload.NameTx)) + } + return interceptor(ctx, in, info, handler) +} + +var _Transact_serviceDesc = grpc.ServiceDesc{ + ServiceName: "rpctransact.Transact", + HandlerType: (*TransactServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "BroadcastTxSync", + Handler: _Transact_BroadcastTxSync_Handler, + }, + { + MethodName: "BroadcastTxAsync", + Handler: _Transact_BroadcastTxAsync_Handler, + }, + { + MethodName: "SignTx", + Handler: _Transact_SignTx_Handler, + }, + { + MethodName: "FormulateTx", + Handler: _Transact_FormulateTx_Handler, + }, + { + MethodName: "CallTxSync", + Handler: _Transact_CallTxSync_Handler, + }, + { + MethodName: "CallTxAsync", + Handler: _Transact_CallTxAsync_Handler, + }, + { + MethodName: "CallTxSim", + Handler: _Transact_CallTxSim_Handler, + }, + { + MethodName: "CallCodeSim", + Handler: _Transact_CallCodeSim_Handler, + }, + { + MethodName: "SendTxSync", + Handler: _Transact_SendTxSync_Handler, + }, + { + MethodName: "SendTxAsync", + Handler: _Transact_SendTxAsync_Handler, + }, + { + MethodName: "NameTxSync", + Handler: _Transact_NameTxSync_Handler, + }, + { + MethodName: "NameTxAsync", + Handler: _Transact_NameTxAsync_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "rpctransact.proto", +} diff --git a/rpc/rpctransact/transact_server.go b/rpc/rpctransact/transact_server.go index 711bd5250..01be16671 100644 --- a/rpc/rpctransact/transact_server.go +++ b/rpc/rpctransact/transact_server.go @@ -21,6 +21,7 @@ import ( const maxBroadcastSyncTimeout = time.Hour type transactServer struct { + UnimplementedTransactServer state acmstate.Reader blockchain bcm.BlockchainInfo transactor *execution.Transactor diff --git a/rpc/service.go b/rpc/service.go index 65b4013b2..8aacdf2ba 100644 --- a/rpc/service.go +++ b/rpc/service.go @@ -402,7 +402,7 @@ func Status(blockchain bcm.BlockchainInfo, validators validator.History, nodeVie GenesisHash: blockchain.GenesisHash(), NodeInfo: nodeView.NodeInfo(), SyncInfo: bcm.GetSyncInfo(blockchain), - CatchingUp: nodeView.IsFastSyncing(), + CatchingUp: nodeView.IsSyncing(), } if nodeView != nil { address := nodeView.ValidatorAddress() diff --git a/storage/prefix.go b/storage/prefix.go index 8832077a5..1c1f9c47c 100644 --- a/storage/prefix.go +++ b/storage/prefix.go @@ -189,8 +189,8 @@ func (pi *prefixIterator) Value() []byte { return pi.source.Value() } -func (pi *prefixIterator) Close() { - pi.source.Close() +func (pi *prefixIterator) Close() error { + return pi.source.Close() } func (pi *prefixIterator) Error() error { diff --git a/storage/prefix_db.go b/storage/prefix_db.go index d11a9e587..da6a43bbb 100644 --- a/storage/prefix_db.go +++ b/storage/prefix_db.go @@ -82,12 +82,12 @@ type prefixBatch struct { batch dbm.Batch } -func (pb *prefixBatch) Set(key, value []byte) { - pb.batch.Set(pb.prefix.Key(key), value) +func (pb *prefixBatch) Set(key, value []byte) error { + return pb.batch.Set(pb.prefix.Key(key), value) } -func (pb *prefixBatch) Delete(key []byte) { - pb.batch.Delete(pb.prefix.Key(key)) +func (pb *prefixBatch) Delete(key []byte) error { + return pb.batch.Delete(pb.prefix.Key(key)) } func (pb *prefixBatch) Write() error { @@ -98,6 +98,6 @@ func (pb *prefixBatch) WriteSync() error { return pb.batch.WriteSync() } -func (pb *prefixBatch) Close() { - pb.batch.Close() +func (pb *prefixBatch) Close() error { + return pb.batch.Close() } diff --git a/storage/rwtree.go b/storage/rwtree.go index 68a71f8b6..7275f3836 100644 --- a/storage/rwtree.go +++ b/storage/rwtree.go @@ -3,7 +3,7 @@ package storage import ( "fmt" - "github.com/tendermint/iavl" + "github.com/cosmos/iavl" dbm "github.com/tendermint/tm-db" "github.com/xlab/treeprint" diff --git a/storage/rwtree_test.go b/storage/rwtree_test.go index 44cbcd7f4..6453e3cf8 100644 --- a/storage/rwtree_test.go +++ b/storage/rwtree_test.go @@ -2,6 +2,7 @@ package storage import ( "fmt" + "runtime/debug" "testing" "github.com/stretchr/testify/require" @@ -139,3 +140,69 @@ func TestMutableTree_Iterate(t *testing.T) { return false }) } + +func capturePanic(f func() error) (err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("%v: %s", r, debug.Stack()) + } + }() + err = f() + return +} + +// TODO: fix +//func TestConcurrentReadWriteSave(t *testing.T) { +// rwt, err := NewRWTree(dbm.NewMemDB(), 100) +// require.NoError(t, err) +// n := 100 +// +// doneCh := make(chan struct{}) +// errCh := make(chan interface{}) +// +// go func() { +// for b := byte(0); true; b++ { +// val := []byte{b} +// go func() { +// err := capturePanic(func() error { +// rwt.Set(val, val) +// return nil +// }) +// if err != nil { +// errCh <- err +// } +// }() +// go func() { +// err := capturePanic(func() error { +// _, err := rwt.Get(val) +// return err +// }) +// if err != nil { +// errCh <- err +// } +// }() +// +// select { +// case <-doneCh: +// return +// default: +// } +// } +// }() +// +// for i := 0; i < n/10; i++ { +// time.Sleep(time.Duration(rand.Int63n(100)) * time.Millisecond) +// err := capturePanic(func() error { +// _, _, err := rwt.Save() +// return err +// }) +// if err != nil { +// break +// } +// } +// close(doneCh) +// +// for err := range errCh { +// t.Fatal(err) +// } +//} diff --git a/storage/storage.pb.go b/storage/storage.pb.go index 088d0c947..51abeecea 100644 --- a/storage/storage.pb.go +++ b/storage/storage.pb.go @@ -90,19 +90,19 @@ func init() { proto.RegisterFile("storage.proto", fileDescriptor_0d2c4ccf1453ffd func init() { golang_proto.RegisterFile("storage.proto", fileDescriptor_0d2c4ccf1453ffdb) } var fileDescriptor_0d2c4ccf1453ffdb = []byte{ - // 186 bytes of a gzipped FileDescriptorProto + // 177 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x2e, 0xc9, 0x2f, - 0x4a, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x74, 0xd3, - 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, - 0xf2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x29, 0xd9, 0x71, 0x71, 0x38, - 0xe7, 0xe7, 0xe6, 0x66, 0x96, 0x78, 0xba, 0x08, 0x49, 0x70, 0xb1, 0x87, 0xa5, 0x16, 0x15, 0x67, - 0xe6, 0xe7, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0xc1, 0xb8, 0x42, 0x42, 0x5c, 0x2c, 0x1e, - 0x89, 0xc5, 0x19, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x60, 0xb6, 0x15, 0xcb, 0x8c, 0x05, - 0xf2, 0x0c, 0x4e, 0xf6, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0x78, 0xe3, 0x91, 0x1c, - 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x07, 0x1e, 0xcb, 0x31, 0x9e, 0x78, 0x2c, 0xc7, 0x18, 0xa5, 0x8a, - 0xe4, 0x90, 0x8c, 0xca, 0x82, 0xd4, 0xa2, 0x9c, 0xd4, 0x94, 0xf4, 0xd4, 0x22, 0xfd, 0xa4, 0xd2, - 0xa2, 0xa2, 0xfc, 0x72, 0x7d, 0xa8, 0x7b, 0x93, 0xd8, 0xc0, 0xee, 0x30, 0x06, 0x04, 0x00, 0x00, - 0xff, 0xff, 0xc6, 0xa6, 0xc1, 0x7f, 0xd0, 0x00, 0x00, 0x00, + 0x4a, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x44, 0xd2, + 0xf3, 0xd3, 0xf3, 0xc1, 0x62, 0xfa, 0x20, 0x16, 0x44, 0x5a, 0xc9, 0x8e, 0x8b, 0xc3, 0x39, 0x3f, + 0x37, 0x37, 0xb3, 0xc4, 0xd3, 0x45, 0x48, 0x82, 0x8b, 0x3d, 0x2c, 0xb5, 0xa8, 0x38, 0x33, 0x3f, + 0x4f, 0x82, 0x51, 0x81, 0x51, 0x83, 0x39, 0x08, 0xc6, 0x15, 0x12, 0xe2, 0x62, 0xf1, 0x48, 0x2c, + 0xce, 0x90, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x09, 0x02, 0xb3, 0xad, 0x58, 0x66, 0x2c, 0x90, 0x67, + 0x70, 0xb2, 0x3f, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x1b, 0x8f, 0xe4, 0x18, 0x1f, + 0x3c, 0x92, 0x63, 0x3c, 0xf0, 0x58, 0x8e, 0xf1, 0xc4, 0x63, 0x39, 0xc6, 0x28, 0xd5, 0xf4, 0xcc, + 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x8c, 0xca, 0x82, 0xd4, 0xa2, 0x9c, 0xd4, + 0x94, 0xf4, 0xd4, 0x22, 0xfd, 0xa4, 0xd2, 0xa2, 0xa2, 0xfc, 0x72, 0x7d, 0xa8, 0xb3, 0x92, 0xd8, + 0xc0, 0xee, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xff, 0x1e, 0xd4, 0x9e, 0xb7, 0x00, 0x00, + 0x00, } func (m *CommitID) Marshal() (dAtA []byte, err error) { @@ -268,10 +268,7 @@ func (m *CommitID) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthStorage - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthStorage } if (iNdEx + skippy) > l { diff --git a/storage/tree.go b/storage/tree.go index bfbead75d..0e0265a3b 100644 --- a/storage/tree.go +++ b/storage/tree.go @@ -3,7 +3,7 @@ package storage import ( "fmt" - "github.com/tendermint/iavl" + "github.com/cosmos/iavl" dbm "github.com/tendermint/tm-db" ) diff --git a/tests/test_runner.sh b/tests/test_runner.sh index bb998128c..ee426e877 100755 --- a/tests/test_runner.sh +++ b/tests/test_runner.sh @@ -37,8 +37,8 @@ fi # Constants # Ports etc must match those in burrow.toml -export BURROW_GRPC_PORT=20997 export BURROW_HOST=127.0.0.1 +export BURROW_GRPC_PORT=20123 export chain_dir="$script_dir/chain" @@ -70,12 +70,13 @@ test_setup(){ echo " $(type ${burrow_bin}) (version: $(${burrow_bin} --version))" echo # start test chain + BURROW_ADDRESS="$BURROW_HOST:$BURROW_GRPC_PORT" if [[ "$boot" = true ]]; then - echo "Starting Burrow using GRPC address: $BURROW_HOST:$BURROW_GRPC_PORT..." + echo "Starting Burrow using GRPC address: $BURROW_ADDRESS..." echo rm -rf ${burrow_root} pushd "$chain_dir" - ${burrow_bin} start -i0 2> "$burrow_log"& + ${burrow_bin} start --index 0 --grpc-address $BURROW_ADDRESS 2> "$burrow_log"& burrow_pid=$! popd else diff --git a/txs/payload/payload.go b/txs/payload/payload.go index eb80edb88..9b25466cf 100644 --- a/txs/payload/payload.go +++ b/txs/payload/payload.go @@ -2,7 +2,6 @@ package payload import ( "fmt" - "strings" ) /* @@ -104,14 +103,23 @@ func (typ *Type) Unmarshal(data []byte) error { return typ.UnmarshalText(data) } -func InputsString(inputs []*TxInput) string { - strs := make([]string, len(inputs)) - for i, in := range inputs { - strs[i] = in.Address.String() - } - return strings.Join(strs, ",") -} - +//func (tx *CallTx) ProtoReflect() protoreflect.Message { +// fd, _ := descriptor.ForMessage(tx) +// ggfd, _ := descriptor.ForMessage() +// protodesc.NewFiles(&descriptorpb.FileDescriptorSet{File: }) +// f, err := protodesc.NewFile(fd, nil) +// if err != nil { +// panic(err) +// } +// mi := &protoimpl.MessageInfo{ +// GoReflectType: reflect.TypeOf(tx), +// Desc: f.Messages().Get(0), +// } +// m := mi.MessageOf(tx) +// fmt.Sprint(fd) +// return m +//} +// func New(txType Type) (Payload, error) { switch txType { case TypeSend: diff --git a/txs/payload/payload.pb.go b/txs/payload/payload.pb.go index a41c51aa6..0923fbc57 100644 --- a/txs/payload/payload.pb.go +++ b/txs/payload/payload.pb.go @@ -87,16 +87,12 @@ func (m *Any) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Any.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *Any) XXX_Merge(src proto.Message) { xxx_messageInfo_Any.Merge(m, src) @@ -207,16 +203,12 @@ func (m *TxInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *TxInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxInput.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *TxInput) XXX_Merge(src proto.Message) { xxx_messageInfo_TxInput.Merge(m, src) @@ -268,16 +260,12 @@ func (m *TxOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *TxOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxOutput.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *TxOutput) XXX_Merge(src proto.Message) { xxx_messageInfo_TxOutput.Merge(m, src) @@ -334,16 +322,12 @@ func (m *CallTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CallTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CallTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *CallTx) XXX_Merge(src proto.Message) { xxx_messageInfo_CallTx.Merge(m, src) @@ -414,16 +398,12 @@ func (m *ContractMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ContractMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractMeta.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *ContractMeta) XXX_Merge(src proto.Message) { xxx_messageInfo_ContractMeta.Merge(m, src) @@ -468,16 +448,12 @@ func (m *SendTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SendTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SendTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *SendTx) XXX_Merge(src proto.Message) { xxx_messageInfo_SendTx.Merge(m, src) @@ -515,16 +491,12 @@ func (m *PermsTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PermsTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PermsTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *PermsTx) XXX_Merge(src proto.Message) { xxx_messageInfo_PermsTx.Merge(m, src) @@ -580,16 +552,12 @@ func (m *NameTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *NameTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NameTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *NameTx) XXX_Merge(src proto.Message) { xxx_messageInfo_NameTx.Merge(m, src) @@ -652,16 +620,12 @@ func (m *BondTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *BondTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BondTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *BondTx) XXX_Merge(src proto.Message) { xxx_messageInfo_BondTx.Merge(m, src) @@ -697,16 +661,12 @@ func (m *UnbondTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UnbondTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnbondTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *UnbondTx) XXX_Merge(src proto.Message) { xxx_messageInfo_UnbondTx.Merge(m, src) @@ -741,16 +701,12 @@ func (m *GovTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *GovTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GovTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *GovTx) XXX_Merge(src proto.Message) { xxx_messageInfo_GovTx.Merge(m, src) @@ -787,16 +743,12 @@ func (m *ProposalTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ProposalTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *ProposalTx) XXX_Merge(src proto.Message) { xxx_messageInfo_ProposalTx.Merge(m, src) @@ -833,16 +785,12 @@ func (m *IdentifyTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *IdentifyTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IdentifyTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *IdentifyTx) XXX_Merge(src proto.Message) { xxx_messageInfo_IdentifyTx.Merge(m, src) @@ -877,16 +825,12 @@ func (m *BatchTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *BatchTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *BatchTx) XXX_Merge(src proto.Message) { xxx_messageInfo_BatchTx.Merge(m, src) @@ -921,16 +865,12 @@ func (m *Vote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Vote.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *Vote) XXX_Merge(src proto.Message) { xxx_messageInfo_Vote.Merge(m, src) @@ -966,16 +906,12 @@ func (m *Proposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *Proposal) XXX_Merge(src proto.Message) { xxx_messageInfo_Proposal.Merge(m, src) @@ -1013,16 +949,12 @@ func (m *Ballot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Ballot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Ballot.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *Ballot) XXX_Merge(src proto.Message) { xxx_messageInfo_Ballot.Merge(m, src) @@ -1103,76 +1035,76 @@ func init() { proto.RegisterFile("payload.proto", fileDescriptor_678c914f1bee6d5 func init() { golang_proto.RegisterFile("payload.proto", fileDescriptor_678c914f1bee6d56) } var fileDescriptor_678c914f1bee6d56 = []byte{ - // 1099 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x66, 0x37, 0xb6, 0xfb, 0xe2, 0x04, 0x77, 0xa0, 0x95, 0x15, 0x09, 0x3b, 0x32, 0x08, - 0xd2, 0xd2, 0x38, 0x90, 0xf2, 0x47, 0xe4, 0x82, 0xfc, 0x2f, 0x69, 0x50, 0x9b, 0x98, 0xf1, 0xa6, - 0x45, 0x20, 0x0e, 0xeb, 0xf5, 0x74, 0xbd, 0x92, 0xbd, 0xb3, 0xec, 0x8e, 0xcb, 0x2e, 0x27, 0x0e, - 0x1c, 0xb8, 0x73, 0xe1, 0x98, 0x6f, 0x80, 0xf8, 0x06, 0x9c, 0x50, 0x8e, 0x9c, 0x39, 0x44, 0x28, - 0xbd, 0x20, 0x3e, 0x05, 0x9a, 0xd9, 0xd9, 0xf5, 0xd8, 0xad, 0x5a, 0x27, 0x42, 0xbd, 0xcd, 0x7b, - 0xef, 0x37, 0xef, 0xbd, 0x79, 0xef, 0x37, 0x6f, 0x06, 0xd6, 0x7c, 0x2b, 0x1e, 0x51, 0x6b, 0x50, - 0xf7, 0x03, 0xca, 0x28, 0xca, 0x4b, 0x71, 0x63, 0xdb, 0x71, 0xd9, 0x70, 0xd2, 0xaf, 0xdb, 0x74, - 0xbc, 0xe3, 0x50, 0x87, 0xee, 0x08, 0x7b, 0x7f, 0xf2, 0x58, 0x48, 0x42, 0x10, 0xab, 0x64, 0xdf, - 0x46, 0xc9, 0x27, 0xc1, 0xd8, 0x0d, 0x43, 0x97, 0x7a, 0x52, 0xb3, 0x1e, 0x10, 0xc7, 0x0d, 0x59, - 0x10, 0x4b, 0x19, 0x42, 0x9f, 0xd8, 0xc9, 0xba, 0xf6, 0x87, 0x0e, 0x7a, 0xc3, 0x8b, 0xd1, 0xbb, - 0x90, 0x6b, 0x59, 0xa3, 0x91, 0x19, 0x95, 0xb5, 0x4d, 0x6d, 0x6b, 0x75, 0xf7, 0xb5, 0x7a, 0x9a, - 0x4d, 0xa2, 0xc6, 0xd2, 0xcc, 0x81, 0x3d, 0xe2, 0x0d, 0xcc, 0xa8, 0xbc, 0x3c, 0x07, 0x4c, 0xd4, - 0x58, 0x9a, 0x39, 0xf0, 0xc8, 0x1a, 0x13, 0x33, 0x2a, 0xeb, 0x73, 0xc0, 0x44, 0x8d, 0xa5, 0x19, - 0xdd, 0x86, 0x7c, 0x97, 0x04, 0xe3, 0xd0, 0x8c, 0xca, 0x86, 0x40, 0x96, 0x32, 0xa4, 0xd4, 0xe3, - 0x14, 0x80, 0xde, 0x86, 0x95, 0x03, 0xfa, 0xc4, 0x8c, 0xca, 0x2b, 0x02, 0xb9, 0x9e, 0x21, 0x85, - 0x16, 0x27, 0x46, 0x1e, 0xba, 0x49, 0x45, 0x8e, 0xb9, 0xb9, 0xd0, 0x89, 0x1a, 0x4b, 0x33, 0xda, - 0x86, 0xc2, 0x89, 0xd7, 0x4f, 0xa0, 0x79, 0x01, 0xbd, 0x9e, 0x41, 0x53, 0x03, 0xce, 0x20, 0x3c, - 0xd3, 0xa6, 0xc5, 0xec, 0xa1, 0x19, 0x95, 0x0b, 0x73, 0x99, 0x4a, 0x3d, 0x4e, 0x01, 0xe8, 0x2e, - 0x40, 0x37, 0xa0, 0x3e, 0x0d, 0x2d, 0x5e, 0xd4, 0x6b, 0x02, 0xfe, 0xfa, 0xf4, 0x60, 0x99, 0x09, - 0x2b, 0x30, 0xbe, 0xe9, 0x70, 0x40, 0x3c, 0xe6, 0x3e, 0x8e, 0xcd, 0xa8, 0x0c, 0x73, 0x9b, 0xa6, - 0x26, 0xac, 0xc0, 0xf6, 0x8c, 0xb3, 0xd3, 0xaa, 0x56, 0xfb, 0x59, 0x83, 0xbc, 0x19, 0x1d, 0x7a, - 0xfe, 0x84, 0xa1, 0x23, 0xc8, 0x37, 0x06, 0x83, 0x80, 0x84, 0xa1, 0xe8, 0x66, 0xb1, 0xf9, 0xe1, - 0xd9, 0x79, 0x75, 0xe9, 0xaf, 0xf3, 0xea, 0x1d, 0x85, 0x4a, 0xc3, 0xd8, 0x27, 0xc1, 0x88, 0x0c, - 0x1c, 0x12, 0xec, 0xf4, 0x27, 0x41, 0x40, 0xbf, 0xdb, 0xb1, 0x83, 0xd8, 0x67, 0xb4, 0x2e, 0xf7, - 0xe2, 0xd4, 0x09, 0xba, 0x09, 0xb9, 0xc6, 0x98, 0x4e, 0x3c, 0x26, 0x7a, 0x6e, 0x60, 0x29, 0xa1, - 0x0d, 0x28, 0xf4, 0xc8, 0xb7, 0x13, 0xe2, 0xd9, 0x44, 0x34, 0xd9, 0xc0, 0x99, 0xbc, 0x67, 0xfc, - 0x72, 0x5a, 0x5d, 0xaa, 0x45, 0x50, 0x30, 0xa3, 0xe3, 0x09, 0x7b, 0x85, 0x59, 0xc9, 0xc8, 0xbf, - 0xea, 0x29, 0xa3, 0xd1, 0x3b, 0xb0, 0x22, 0xea, 0x22, 0xa9, 0x3d, 0x6d, 0x9a, 0xac, 0x17, 0x4e, - 0xcc, 0xe8, 0xf3, 0x69, 0x82, 0xcb, 0x22, 0xc1, 0xf7, 0xaf, 0x9e, 0xdc, 0x06, 0x14, 0x0e, 0xac, - 0xf0, 0xbe, 0x3b, 0x76, 0x59, 0x5a, 0x9a, 0x54, 0x46, 0x25, 0xd0, 0xf7, 0x09, 0x11, 0x64, 0x37, - 0x30, 0x5f, 0xa2, 0x43, 0x30, 0xda, 0x16, 0xb3, 0x04, 0xab, 0x8b, 0xcd, 0x8f, 0x64, 0x5d, 0xb6, - 0x5f, 0x1c, 0xba, 0xef, 0x7a, 0x56, 0x10, 0xd7, 0xef, 0x91, 0xa8, 0x19, 0x33, 0x12, 0x62, 0xe1, - 0x02, 0x7d, 0x0d, 0xc6, 0xa3, 0x46, 0xef, 0x81, 0x60, 0x7e, 0xb1, 0x79, 0x70, 0x25, 0x57, 0xff, - 0x9e, 0x57, 0xd7, 0x99, 0xe5, 0x84, 0x77, 0xe8, 0xd8, 0x65, 0x64, 0xec, 0xb3, 0x18, 0x0b, 0xa7, - 0xe8, 0x53, 0x28, 0xb6, 0xa8, 0xc7, 0x02, 0xcb, 0x66, 0x0f, 0x08, 0xb3, 0xca, 0xf9, 0x4d, 0x7d, - 0x6b, 0x75, 0xf7, 0xc6, 0x74, 0x56, 0x28, 0x46, 0x3c, 0x03, 0x95, 0x05, 0xe9, 0x06, 0xae, 0x4d, - 0xc4, 0xe5, 0x49, 0x0a, 0x22, 0x64, 0xd9, 0xb1, 0xc9, 0xac, 0x73, 0xf4, 0x05, 0x14, 0x5a, 0x74, - 0x40, 0xee, 0x59, 0xe1, 0x50, 0x12, 0xe6, 0x8a, 0x85, 0xc9, 0xdc, 0x20, 0x04, 0x86, 0xc8, 0x9b, - 0xb7, 0xf7, 0x1a, 0x16, 0xeb, 0x9a, 0x9b, 0x0e, 0x34, 0xb4, 0x05, 0x39, 0x41, 0x04, 0xce, 0x4f, - 0xfd, 0xb9, 0x44, 0x91, 0x76, 0xf4, 0x1e, 0xe4, 0x13, 0x52, 0x73, 0xa6, 0xe8, 0x33, 0x63, 0x23, - 0xa5, 0x3b, 0x4e, 0x11, 0x7b, 0x85, 0x9f, 0x4e, 0xab, 0x4b, 0xe2, 0x84, 0x34, 0x9b, 0x74, 0x0b, - 0x73, 0xf2, 0x63, 0x28, 0xf0, 0x2d, 0x8d, 0xc0, 0x09, 0xe5, 0xc0, 0x7d, 0xa3, 0xae, 0x0c, 0xf8, - 0xd4, 0xd6, 0x34, 0x78, 0x69, 0x70, 0x86, 0x95, 0x25, 0xf5, 0xd3, 0x19, 0xbc, 0x70, 0x3c, 0x04, - 0x06, 0xdf, 0x91, 0x56, 0x88, 0xaf, 0xb9, 0x4e, 0xb0, 0x53, 0x4f, 0x74, 0x82, 0x66, 0xcf, 0x70, - 0x58, 0x46, 0xdc, 0x4b, 0x47, 0xef, 0xa2, 0x11, 0x95, 0xf2, 0x38, 0xd3, 0x69, 0xbc, 0x70, 0xbe, - 0xb7, 0x20, 0x97, 0xd4, 0x59, 0x56, 0xe7, 0x39, 0x8d, 0x90, 0x00, 0x25, 0xd0, 0x0f, 0x9a, 0x7c, - 0x46, 0x2e, 0xd1, 0xf2, 0x16, 0xac, 0x37, 0x6c, 0x9b, 0x0f, 0x98, 0x13, 0x7f, 0x60, 0x31, 0x92, - 0x76, 0xfe, 0x46, 0x5d, 0xbc, 0xa6, 0x26, 0x19, 0xfb, 0x23, 0x8b, 0x11, 0x89, 0x11, 0xfd, 0xd0, - 0xf0, 0xdc, 0x16, 0x25, 0x85, 0x7f, 0x34, 0xf5, 0x7d, 0x58, 0xf8, 0xb8, 0x35, 0x28, 0x3e, 0xa4, - 0xcc, 0xf5, 0x9c, 0x47, 0xc4, 0x75, 0x86, 0xc9, 0xa1, 0x75, 0x3c, 0xa3, 0x43, 0x27, 0x50, 0x4c, - 0x3d, 0x8b, 0xbb, 0xa3, 0x8b, 0xbb, 0xf3, 0xc1, 0xe5, 0xef, 0xcd, 0x8c, 0x1b, 0xfe, 0x56, 0xa6, - 0xb2, 0x7c, 0xa7, 0xaf, 0x3f, 0xf3, 0x9c, 0xe1, 0x0c, 0xa2, 0x1c, 0x75, 0xa4, 0x3e, 0x6a, 0x97, - 0xa8, 0xf8, 0x6d, 0x30, 0x8e, 0xe8, 0x80, 0xc8, 0xc6, 0xde, 0xac, 0x67, 0xbf, 0x18, 0xae, 0x4d, - 0x3c, 0xf2, 0xc1, 0xc4, 0x25, 0x25, 0xda, 0x37, 0xd9, 0x1b, 0x7d, 0x89, 0x50, 0x15, 0xd0, 0xcd, - 0x28, 0xed, 0x68, 0x31, 0x83, 0x35, 0xbc, 0x18, 0x73, 0x83, 0xe2, 0xfe, 0x47, 0x0d, 0x8c, 0x87, - 0x94, 0x91, 0xff, 0xfd, 0x35, 0x5b, 0xa0, 0xb3, 0x4a, 0x1a, 0x4f, 0xa6, 0xcd, 0xc8, 0xae, 0xac, - 0xa6, 0x5c, 0xd9, 0x4d, 0x58, 0x6d, 0x93, 0xd0, 0x0e, 0x5c, 0x9f, 0xb9, 0xd4, 0x93, 0xb7, 0x59, - 0x55, 0xa9, 0x7f, 0x19, 0xfd, 0x25, 0x7f, 0x19, 0x25, 0xee, 0x6f, 0xcb, 0x90, 0x6b, 0x5a, 0xa3, - 0x11, 0x65, 0x33, 0x7c, 0xd0, 0x5e, 0xca, 0x07, 0xce, 0xca, 0x7d, 0xd7, 0xb3, 0x46, 0xee, 0xf7, - 0xae, 0xe7, 0xc8, 0xdf, 0xe3, 0xd5, 0x58, 0xa9, 0xba, 0x41, 0x2d, 0x58, 0xf3, 0x65, 0x88, 0x1e, - 0xb3, 0x58, 0x32, 0x91, 0xd6, 0x77, 0xdf, 0x54, 0x0e, 0xc3, 0xb3, 0xcd, 0x32, 0x12, 0x20, 0x3c, - 0xbb, 0x07, 0xbd, 0x05, 0x2b, 0xbc, 0xa7, 0x61, 0x79, 0x45, 0x10, 0x60, 0x2d, 0xdb, 0xcc, 0xb5, - 0x38, 0xb1, 0xd5, 0x3e, 0x81, 0xb5, 0x19, 0x27, 0xa8, 0x08, 0x85, 0x2e, 0x3e, 0xee, 0x1e, 0xf7, - 0x3a, 0xed, 0xd2, 0x12, 0x97, 0x3a, 0x5f, 0x76, 0x5a, 0x27, 0x66, 0xa7, 0x5d, 0xd2, 0x10, 0x40, - 0x6e, 0xbf, 0x71, 0x78, 0xbf, 0xd3, 0x2e, 0x2d, 0x37, 0x3f, 0x3b, 0xbb, 0xa8, 0x68, 0x7f, 0x5e, - 0x54, 0xb4, 0xbf, 0x2f, 0x2a, 0xda, 0xef, 0x4f, 0x2b, 0xda, 0xd9, 0xd3, 0x8a, 0xf6, 0xd5, 0xad, - 0x17, 0x9f, 0x9a, 0x45, 0xe1, 0x8e, 0xcc, 0xa2, 0x9f, 0x13, 0x5f, 0xf5, 0xbb, 0xff, 0x05, 0x00, - 0x00, 0xff, 0xff, 0x5c, 0xab, 0x20, 0xfa, 0x21, 0x0c, 0x00, 0x00, + // 1096 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0x66, 0x37, 0xb6, 0xfb, 0xe2, 0xe4, 0xeb, 0xce, 0xb7, 0xad, 0xac, 0x48, 0xd8, 0x91, + 0x41, 0x90, 0x96, 0xd6, 0x86, 0x94, 0x1f, 0x22, 0x37, 0xff, 0x4a, 0x1a, 0xd4, 0x26, 0x66, 0xbc, + 0x69, 0x11, 0x88, 0xc3, 0x7a, 0x3d, 0xac, 0x57, 0xb2, 0x77, 0x96, 0xdd, 0x71, 0xd9, 0xe5, 0xc4, + 0x81, 0x03, 0x77, 0x2e, 0x1c, 0xf3, 0x1f, 0x20, 0xfe, 0x03, 0x4e, 0x28, 0x47, 0x8e, 0x88, 0x43, + 0x84, 0xd2, 0x0b, 0xe2, 0xaf, 0x40, 0x33, 0x3b, 0xbb, 0x1e, 0xbb, 0x55, 0xeb, 0x44, 0x88, 0xdb, + 0xcc, 0x7b, 0x9f, 0x79, 0xef, 0xcd, 0x7b, 0x9f, 0x79, 0x6f, 0x60, 0xc3, 0xb7, 0xe2, 0x31, 0xb5, + 0x86, 0x75, 0x3f, 0xa0, 0x8c, 0xa2, 0xbc, 0xdc, 0x6e, 0xdd, 0x70, 0xa8, 0x43, 0x85, 0xac, 0xc1, + 0x57, 0x89, 0x7a, 0xab, 0xe4, 0x93, 0x60, 0xe2, 0x86, 0xa1, 0x4b, 0x3d, 0x29, 0xd9, 0x0c, 0x88, + 0xe3, 0x86, 0x2c, 0x88, 0xe5, 0x1e, 0x42, 0x9f, 0xd8, 0xc9, 0xba, 0xf6, 0xab, 0x0e, 0x7a, 0xd3, + 0x8b, 0xd1, 0x5b, 0x90, 0x6b, 0x5b, 0xe3, 0xb1, 0x19, 0x95, 0xb5, 0x6d, 0x6d, 0x67, 0x7d, 0xf7, + 0x7f, 0xf5, 0xd4, 0x69, 0x22, 0xc6, 0x52, 0xcd, 0x81, 0x7d, 0xe2, 0x0d, 0xcd, 0xa8, 0xbc, 0xba, + 0x00, 0x4c, 0xc4, 0x58, 0xaa, 0x39, 0xf0, 0xc8, 0x9a, 0x10, 0x33, 0x2a, 0xeb, 0x0b, 0xc0, 0x44, + 0x8c, 0xa5, 0x1a, 0xdd, 0x81, 0x7c, 0x8f, 0x04, 0x93, 0xd0, 0x8c, 0xca, 0x86, 0x40, 0x96, 0x32, + 0xa4, 0x94, 0xe3, 0x14, 0x80, 0xde, 0x80, 0xb5, 0x03, 0xfa, 0xd4, 0x8c, 0xca, 0x6b, 0x02, 0xb9, + 0x99, 0x21, 0x85, 0x14, 0x27, 0x4a, 0xee, 0xba, 0x45, 0x45, 0x8c, 0xb9, 0x05, 0xd7, 0x89, 0x18, + 0x4b, 0x35, 0xba, 0x07, 0x85, 0x13, 0x6f, 0x90, 0x40, 0xf3, 0x02, 0x7a, 0x3d, 0x83, 0xa6, 0x0a, + 0x9c, 0x41, 0x78, 0xa4, 0x2d, 0x8b, 0xd9, 0x23, 0x33, 0x2a, 0x17, 0x16, 0x22, 0x95, 0x72, 0x9c, + 0x02, 0xd0, 0x7d, 0x80, 0x5e, 0x40, 0x7d, 0x1a, 0x5a, 0x3c, 0xa9, 0xd7, 0x04, 0xfc, 0xff, 0xb3, + 0x8b, 0x65, 0x2a, 0xac, 0xc0, 0xf8, 0xa1, 0xc3, 0x21, 0xf1, 0x98, 0xfb, 0x65, 0x6c, 0x46, 0x65, + 0x58, 0x38, 0x34, 0x53, 0x61, 0x05, 0xb6, 0x67, 0x9c, 0x9d, 0x56, 0xb5, 0xda, 0x0f, 0x1a, 0xe4, + 0xcd, 0xe8, 0xd0, 0xf3, 0xa7, 0x0c, 0x1d, 0x41, 0xbe, 0x39, 0x1c, 0x06, 0x24, 0x0c, 0x45, 0x35, + 0x8b, 0xad, 0xf7, 0xce, 0xce, 0xab, 0x2b, 0x7f, 0x9c, 0x57, 0xef, 0x3a, 0x2e, 0x1b, 0x4d, 0x07, + 0x75, 0x9b, 0x4e, 0x1a, 0xa3, 0xd8, 0x27, 0xc1, 0x98, 0x0c, 0x1d, 0x12, 0x34, 0x06, 0xd3, 0x20, + 0xa0, 0x5f, 0x37, 0xec, 0x20, 0xf6, 0x19, 0xad, 0xcb, 0xb3, 0x38, 0x35, 0x82, 0x6e, 0x41, 0xae, + 0x39, 0xa1, 0x53, 0x8f, 0x89, 0x9a, 0x1b, 0x58, 0xee, 0xd0, 0x16, 0x14, 0xfa, 0xe4, 0xab, 0x29, + 0xf1, 0x6c, 0x22, 0x8a, 0x6c, 0xe0, 0x6c, 0xbf, 0x67, 0xfc, 0x78, 0x5a, 0x5d, 0xa9, 0x45, 0x50, + 0x30, 0xa3, 0xe3, 0x29, 0xfb, 0x0f, 0xa3, 0x92, 0x9e, 0x7f, 0xd2, 0x53, 0x46, 0xa3, 0x37, 0x61, + 0x4d, 0xe4, 0x45, 0x52, 0x7b, 0x56, 0x34, 0x99, 0x2f, 0x9c, 0xa8, 0xd1, 0xc7, 0xb3, 0x00, 0x57, + 0x45, 0x80, 0xef, 0x5c, 0x3d, 0xb8, 0x2d, 0x28, 0x1c, 0x58, 0xe1, 0x43, 0x77, 0xe2, 0xb2, 0x34, + 0x35, 0xe9, 0x1e, 0x95, 0x40, 0xdf, 0x27, 0x44, 0x90, 0xdd, 0xc0, 0x7c, 0x89, 0x0e, 0xc1, 0xe8, + 0x58, 0xcc, 0x12, 0xac, 0x2e, 0xb6, 0xde, 0x97, 0x79, 0xb9, 0xf7, 0x72, 0xd7, 0x03, 0xd7, 0xb3, + 0x82, 0xb8, 0xfe, 0x80, 0x44, 0xad, 0x98, 0x91, 0x10, 0x0b, 0x13, 0xe8, 0x73, 0x30, 0x9e, 0x34, + 0xfb, 0x8f, 0x04, 0xf3, 0x8b, 0xad, 0x83, 0x2b, 0x99, 0xfa, 0xfb, 0xbc, 0xba, 0xc9, 0x2c, 0x27, + 0xbc, 0x4b, 0x27, 0x2e, 0x23, 0x13, 0x9f, 0xc5, 0x58, 0x18, 0x45, 0x1f, 0x41, 0xb1, 0x4d, 0x3d, + 0x16, 0x58, 0x36, 0x7b, 0x44, 0x98, 0x55, 0xce, 0x6f, 0xeb, 0x3b, 0xeb, 0xbb, 0x37, 0x67, 0xbd, + 0x42, 0x51, 0xe2, 0x39, 0xa8, 0x4c, 0x48, 0x2f, 0x70, 0x6d, 0x22, 0x1e, 0x4f, 0x92, 0x10, 0xb1, + 0x97, 0x15, 0x9b, 0xce, 0x1b, 0x47, 0x9f, 0x40, 0xa1, 0x4d, 0x87, 0xe4, 0x81, 0x15, 0x8e, 0x24, + 0x61, 0xae, 0x98, 0x98, 0xcc, 0x0c, 0x42, 0x60, 0x88, 0xb8, 0x79, 0x79, 0xaf, 0x61, 0xb1, 0xae, + 0xb9, 0x69, 0x43, 0x43, 0x3b, 0x90, 0x13, 0x44, 0xe0, 0xfc, 0xd4, 0x5f, 0x48, 0x14, 0xa9, 0x47, + 0x6f, 0x43, 0x3e, 0x21, 0x35, 0x67, 0x8a, 0x3e, 0xd7, 0x36, 0x52, 0xba, 0xe3, 0x14, 0xb1, 0x57, + 0xf8, 0xfe, 0xb4, 0xba, 0x22, 0x6e, 0x48, 0xb3, 0x4e, 0xb7, 0x34, 0x27, 0x3f, 0x80, 0x02, 0x3f, + 0xd2, 0x0c, 0x9c, 0x50, 0x36, 0xdc, 0x1b, 0x75, 0xa5, 0xc1, 0xa7, 0xba, 0x96, 0xc1, 0x53, 0x83, + 0x33, 0xac, 0x4c, 0xa9, 0x9f, 0xf6, 0xe0, 0xa5, 0xfd, 0x21, 0x30, 0xf8, 0x89, 0x34, 0x43, 0x7c, + 0xcd, 0x65, 0x82, 0x9d, 0x7a, 0x22, 0x13, 0x34, 0x7b, 0x8e, 0xc3, 0xd2, 0xe3, 0x5e, 0xda, 0x7a, + 0x97, 0xf5, 0xa8, 0xa4, 0xc7, 0x99, 0x75, 0xe3, 0xa5, 0xe3, 0xbd, 0x0d, 0xb9, 0x24, 0xcf, 0x32, + 0x3b, 0x2f, 0x28, 0x84, 0x04, 0x28, 0x8e, 0xbe, 0xd5, 0xe4, 0x18, 0xb9, 0x44, 0xc9, 0xdb, 0xb0, + 0xd9, 0xb4, 0x6d, 0xde, 0x60, 0x4e, 0xfc, 0xa1, 0xc5, 0x48, 0x5a, 0xf9, 0x9b, 0x75, 0x31, 0x4d, + 0x4d, 0x32, 0xf1, 0xc7, 0x16, 0x23, 0x12, 0x23, 0xea, 0xa1, 0xe1, 0x85, 0x23, 0x4a, 0x08, 0x7f, + 0x69, 0xea, 0x7c, 0x58, 0xfa, 0xba, 0x35, 0x28, 0x3e, 0xa6, 0xcc, 0xf5, 0x9c, 0x27, 0xc4, 0x75, + 0x46, 0xc9, 0xa5, 0x75, 0x3c, 0x27, 0x43, 0x27, 0x50, 0x4c, 0x2d, 0x8b, 0xb7, 0xa3, 0x8b, 0xb7, + 0xf3, 0xee, 0xe5, 0xdf, 0xcd, 0x9c, 0x19, 0x3e, 0x2b, 0xd3, 0xbd, 0x9c, 0xd3, 0xd7, 0x9f, 0x1b, + 0x67, 0x38, 0x83, 0x28, 0x57, 0x1d, 0xab, 0x43, 0xed, 0x12, 0x19, 0xbf, 0x03, 0xc6, 0x11, 0x1d, + 0x12, 0x59, 0xd8, 0x5b, 0xf5, 0xec, 0x17, 0xc3, 0xa5, 0x89, 0x45, 0xde, 0x98, 0xf8, 0x4e, 0xf1, + 0xf6, 0x45, 0x36, 0xa3, 0x2f, 0xe1, 0xaa, 0x02, 0xba, 0x19, 0xa5, 0x15, 0x2d, 0x66, 0xb0, 0xa6, + 0x17, 0x63, 0xae, 0x50, 0xcc, 0x7f, 0xa7, 0x81, 0xf1, 0x98, 0x32, 0xf2, 0xaf, 0x4f, 0xb3, 0x25, + 0x2a, 0xab, 0x84, 0xf1, 0x74, 0x56, 0x8c, 0xec, 0xc9, 0x6a, 0xca, 0x93, 0xdd, 0x86, 0xf5, 0x0e, + 0x09, 0xed, 0xc0, 0xf5, 0x99, 0x4b, 0x3d, 0xf9, 0x9a, 0x55, 0x91, 0xfa, 0x97, 0xd1, 0x5f, 0xf1, + 0x97, 0x51, 0xfc, 0xfe, 0xbc, 0x0a, 0xb9, 0x96, 0x35, 0x1e, 0x53, 0x36, 0xc7, 0x07, 0xed, 0x95, + 0x7c, 0xe0, 0xac, 0xdc, 0x77, 0x3d, 0x6b, 0xec, 0x7e, 0xe3, 0x7a, 0x8e, 0xfc, 0x3d, 0x5e, 0x8d, + 0x95, 0xaa, 0x19, 0xd4, 0x86, 0x0d, 0x5f, 0xba, 0xe8, 0x33, 0x8b, 0x25, 0x1d, 0x69, 0x73, 0xf7, + 0x35, 0xe5, 0x32, 0x3c, 0xda, 0x2c, 0x22, 0x01, 0xc2, 0xf3, 0x67, 0xd0, 0xeb, 0xb0, 0xc6, 0x6b, + 0x1a, 0x96, 0xd7, 0x04, 0x01, 0x36, 0xb2, 0xc3, 0x5c, 0x8a, 0x13, 0x5d, 0xed, 0x43, 0xd8, 0x98, + 0x33, 0x82, 0x8a, 0x50, 0xe8, 0xe1, 0xe3, 0xde, 0x71, 0xbf, 0xdb, 0x29, 0xad, 0xf0, 0x5d, 0xf7, + 0xd3, 0x6e, 0xfb, 0xc4, 0xec, 0x76, 0x4a, 0x1a, 0x02, 0xc8, 0xed, 0x37, 0x0f, 0x1f, 0x76, 0x3b, + 0xa5, 0xd5, 0x56, 0xfb, 0xec, 0xa2, 0xa2, 0xfd, 0x76, 0x51, 0xd1, 0x7e, 0xbf, 0xa8, 0x68, 0x7f, + 0x5e, 0x54, 0xb4, 0x5f, 0x9e, 0x55, 0xb4, 0xb3, 0x67, 0x15, 0xed, 0xb3, 0xdb, 0x2f, 0xbf, 0x39, + 0x8b, 0xc2, 0x86, 0x8c, 0x64, 0x90, 0x13, 0xdf, 0xf5, 0xfb, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, + 0x94, 0xcd, 0x56, 0xb9, 0x0c, 0x0c, 0x00, 0x00, } func (m *Any) Marshal() (dAtA []byte, err error) { @@ -3094,10 +3026,7 @@ func (m *Any) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -3219,10 +3148,7 @@ func (m *TxInput) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -3325,10 +3251,7 @@ func (m *TxOutput) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -3607,10 +3530,7 @@ func (m *CallTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -3726,10 +3646,7 @@ func (m *ContractMeta) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -3848,10 +3765,7 @@ func (m *SendTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -3971,10 +3885,7 @@ func (m *PermsTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -4144,10 +4055,7 @@ func (m *NameTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -4234,10 +4142,7 @@ func (m *BondTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -4360,10 +4265,7 @@ func (m *UnbondTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -4482,10 +4384,7 @@ func (m *GovTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -4662,10 +4561,7 @@ func (m *ProposalTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -4786,10 +4682,7 @@ func (m *IdentifyTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -4908,10 +4801,7 @@ func (m *BatchTx) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -5014,10 +4904,7 @@ func (m *Vote) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -5168,10 +5055,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { @@ -5346,10 +5230,7 @@ func (m *Ballot) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPayload - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPayload } if (iNdEx + skippy) > l { diff --git a/txs/payload/payload_test.go b/txs/payload/payload_test.go new file mode 100644 index 000000000..4afdab78f --- /dev/null +++ b/txs/payload/payload_test.go @@ -0,0 +1,35 @@ +package payload + +import ( + "encoding/json" + "testing" + + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestCustomTypes(t *testing.T) { + address := crypto.Address{1, 2, 3} + callTx := &CallTx{ + Input: &TxInput{ + Address: crypto.Address{1, 2}, + Amount: 2, + Sequence: 0, + }, + Address: &address, + } + bs, err := encoding.Encode(callTx) + require.NoError(t, err) + callTxOut := new(CallTx) + err = encoding.Decode(bs, callTxOut) + require.NoError(t, err) + assert.Equal(t, jsonString(t, callTx), jsonString(t, callTxOut)) +} + +func jsonString(t testing.TB, conf interface{}) string { + bs, err := json.MarshalIndent(conf, "", " ") + require.NoError(t, err, "must be able to convert interface to string for comparison") + return string(bs) +} diff --git a/txs/payload/proposal_tx.go b/txs/payload/proposal_tx.go index 99c13f112..55280d8c6 100644 --- a/txs/payload/proposal_tx.go +++ b/txs/payload/proposal_tx.go @@ -1,11 +1,7 @@ package payload import ( - "crypto/sha256" "fmt" - - "github.com/golang/protobuf/proto" - "github.com/hyperledger/burrow/encoding" ) func NewProposalTx(propsal *Proposal) *ProposalTx { @@ -32,36 +28,6 @@ func (tx *ProposalTx) Any() *Any { } } -func DecodeProposal(proposalBytes []byte) (*Proposal, error) { - buf := proto.NewBuffer(proposalBytes) - proposal := new(Proposal) - err := buf.Unmarshal(proposal) - if err != nil { - return nil, err - } - return proposal, nil -} - -func (p *Proposal) Encode() ([]byte, error) { - buf := proto.NewBuffer(nil) - err := buf.Marshal(p) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} - -func (p *Proposal) Hash() []byte { - bs, err := p.Encode() - if err != nil { - panic("failed to encode Proposal") - } - - hash := sha256.Sum256(bs) - - return hash[:] -} - func (p *Proposal) String() string { return "" } @@ -69,16 +35,3 @@ func (p *Proposal) String() string { func (v *Vote) String() string { return v.Address.String() } - -func DecodeBallot(ballotBytes []byte) (*Ballot, error) { - ballot := new(Ballot) - err := encoding.Decode(ballotBytes, ballot) - if err != nil { - return nil, err - } - return ballot, nil -} - -func (p *Ballot) Encode() ([]byte, error) { - return encoding.Encode(p) -} diff --git a/txs/protobuf_codec_test.go b/txs/protobuf_codec_test.go index 07de91b3e..5a8a592ea 100644 --- a/txs/protobuf_codec_test.go +++ b/txs/protobuf_codec_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestAminoEncodeTxDecodeTx(t *testing.T) { +func TestTxEncoding(t *testing.T) { codec := NewProtobufCodec() inputAddress := crypto.Address{1, 2, 3, 4, 5} outputAddress := crypto.Address{5, 4, 3, 2, 1} @@ -37,7 +37,7 @@ func TestAminoEncodeTxDecodeTx(t *testing.T) { assert.Equal(t, txEnv, txEnvOut) } -func TestAminoEncodeTxDecodeTx_CallTx(t *testing.T) { +func TestTxEncoding_CallTx(t *testing.T) { codec := NewProtobufCodec() inputAccount := acm.GeneratePrivateAccountFromSecret("fooo") amount := uint64(2) @@ -64,7 +64,7 @@ func TestAminoEncodeTxDecodeTx_CallTx(t *testing.T) { assert.Equal(t, txEnv, txEnvOut) } -func TestAminoTxEnvelope(t *testing.T) { +func TestTxEnvelopeEncoding(t *testing.T) { codec := NewProtobufCodec() privAccFrom := acm.GeneratePrivateAccountFromSecret("foo") privAccTo := acm.GeneratePrivateAccountFromSecret("bar") diff --git a/txs/txs.pb.go b/txs/txs.pb.go index 1e51017fc..fe0f59ed5 100644 --- a/txs/txs.pb.go +++ b/txs/txs.pb.go @@ -75,16 +75,12 @@ func (m *Envelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Envelope.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *Envelope) XXX_Merge(src proto.Message) { xxx_messageInfo_Envelope.Merge(m, src) @@ -136,16 +132,12 @@ func (m *Signatory) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Signatory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Signatory.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *Signatory) XXX_Merge(src proto.Message) { xxx_messageInfo_Signatory.Merge(m, src) @@ -202,16 +194,12 @@ func (m *Receipt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Receipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Receipt.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } func (m *Receipt) XXX_Merge(src proto.Message) { xxx_messageInfo_Receipt.Merge(m, src) @@ -257,37 +245,37 @@ func init() { proto.RegisterFile("txs.proto", fileDescriptor_372ebcf753025bdc) } func init() { golang_proto.RegisterFile("txs.proto", fileDescriptor_372ebcf753025bdc) } var fileDescriptor_372ebcf753025bdc = []byte{ - // 468 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0xbb, 0x8e, 0xd3, 0x40, - 0x14, 0xcd, 0x38, 0x56, 0x1e, 0x93, 0xb0, 0xbb, 0x4c, 0x81, 0xa2, 0x14, 0x76, 0x36, 0x55, 0x0a, - 0xd6, 0x46, 0x01, 0x16, 0x89, 0x0e, 0xaf, 0x90, 0x56, 0xe1, 0xb5, 0x9a, 0x75, 0x45, 0x81, 0xe4, - 0xc7, 0xc5, 0xb1, 0x14, 0x3c, 0xd6, 0x78, 0x0c, 0xf6, 0x9f, 0x50, 0xf2, 0x05, 0xf4, 0x88, 0x86, - 0x32, 0x25, 0x75, 0x0a, 0x0b, 0x65, 0xff, 0x82, 0x0a, 0x79, 0xd6, 0xf6, 0x86, 0x2d, 0x82, 0xe8, - 0xe6, 0xce, 0x39, 0xf7, 0xcc, 0xb9, 0xf7, 0x0c, 0xee, 0x8b, 0x2c, 0x31, 0x62, 0xce, 0x04, 0x23, - 0x6d, 0x91, 0x25, 0xe3, 0x93, 0x20, 0x14, 0xcb, 0xd4, 0x35, 0x3c, 0xf6, 0xc1, 0x0c, 0x58, 0xc0, - 0x4c, 0x89, 0xb9, 0xe9, 0x7b, 0x59, 0xc9, 0x42, 0x9e, 0xae, 0x7b, 0xc6, 0x43, 0x8f, 0xe7, 0xb1, - 0xa8, 0xaa, 0xe9, 0x77, 0x84, 0x7b, 0xcf, 0xa3, 0x8f, 0xb0, 0x62, 0x31, 0x90, 0x53, 0x3c, 0xb8, - 0x0c, 0x83, 0xc8, 0x11, 0x8c, 0x87, 0x90, 0x8c, 0xd0, 0xa4, 0x3d, 0x1b, 0xcc, 0x0f, 0x8c, 0xf2, - 0xbd, 0xfa, 0x3e, 0xb7, 0xd4, 0x75, 0xa1, 0xb7, 0xe8, 0x2e, 0x91, 0xdc, 0xc3, 0x8a, 0x9d, 0x8d, - 0x94, 0x09, 0x9a, 0x0d, 0xad, 0xce, 0xa6, 0xd0, 0x15, 0x3b, 0xa3, 0x8a, 0x9d, 0x91, 0xd3, 0x52, - 0xdb, 0x63, 0x7e, 0x18, 0x05, 0xa3, 0xf6, 0x04, 0xcd, 0x0e, 0xe6, 0x63, 0x29, 0x56, 0x3f, 0x68, - 0xd4, 0xa8, 0x9d, 0xc7, 0x40, 0x1b, 0xee, 0xf4, 0x18, 0x0f, 0x77, 0x11, 0xd2, 0xc3, 0xea, 0xe2, - 0xf2, 0xcd, 0xeb, 0xa3, 0x16, 0xe9, 0xe2, 0x36, 0x7d, 0x79, 0x71, 0x84, 0x9e, 0xaa, 0x9f, 0xbf, - 0xe8, 0xad, 0xe9, 0x37, 0x84, 0xfb, 0x8d, 0x33, 0xb2, 0xc0, 0xdd, 0x67, 0xbe, 0xcf, 0x21, 0x29, - 0xad, 0x97, 0x5e, 0x1e, 0x6c, 0x0a, 0xfd, 0xfe, 0xce, 0x76, 0x96, 0x79, 0x0c, 0x7c, 0x05, 0x7e, - 0x00, 0xdc, 0x74, 0x53, 0xce, 0xd9, 0x27, 0xb3, 0x5a, 0x46, 0xd5, 0x47, 0x6b, 0x01, 0x62, 0xe2, - 0xfe, 0x45, 0xea, 0xae, 0x42, 0xef, 0x05, 0xe4, 0x72, 0xb2, 0xc1, 0xfc, 0xae, 0x51, 0x91, 0x1b, - 0x80, 0xde, 0x70, 0xca, 0x86, 0x6b, 0x27, 0x29, 0x87, 0x91, 0xfa, 0x77, 0x43, 0x03, 0xd0, 0x1b, - 0xce, 0xf4, 0xab, 0x82, 0xbb, 0x14, 0x3c, 0x08, 0x63, 0x41, 0x16, 0xb8, 0x63, 0x67, 0xe5, 0xa8, - 0xd2, 0xf8, 0x1d, 0x6b, 0xfe, 0xbb, 0xd0, 0x8d, 0xfd, 0xc6, 0x45, 0x96, 0x98, 0xb1, 0x93, 0xaf, - 0x98, 0xe3, 0x1b, 0x72, 0x7d, 0x95, 0x02, 0x79, 0x55, 0x6a, 0x9d, 0x3b, 0xc9, 0xb2, 0x0a, 0xe4, - 0x71, 0x99, 0xd7, 0xa6, 0xd0, 0x4f, 0xf6, 0xeb, 0xb9, 0x61, 0xe4, 0xf0, 0xdc, 0x38, 0x87, 0xcc, - 0xca, 0x05, 0x24, 0xb4, 0x12, 0x21, 0x33, 0x7c, 0x78, 0xc6, 0xc1, 0x11, 0x90, 0x9c, 0xb1, 0x48, - 0x70, 0xc7, 0x13, 0x32, 0xca, 0x1e, 0xbd, 0x7d, 0x4d, 0xde, 0xe1, 0xc3, 0xfa, 0x5c, 0xc7, 0xa0, - 0x4a, 0x07, 0x8f, 0x2a, 0x07, 0xff, 0x17, 0xc5, 0x6d, 0x31, 0xeb, 0xc9, 0x7a, 0xab, 0xa1, 0x9f, - 0x5b, 0x0d, 0xfd, 0xda, 0x6a, 0xe8, 0xc7, 0x95, 0x86, 0xd6, 0x57, 0x1a, 0x7a, 0x7b, 0xfc, 0xcf, - 0x35, 0xb9, 0x1d, 0xf9, 0xd5, 0x1f, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x03, 0x82, 0x5c, 0xd8, - 0x39, 0x03, 0x00, 0x00, + // 465 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x3d, 0x6f, 0xd3, 0x40, + 0x1c, 0xc6, 0x73, 0x8e, 0x95, 0x97, 0x4b, 0x68, 0xcb, 0x09, 0xa1, 0x28, 0x83, 0x9d, 0x66, 0xca, + 0x00, 0x36, 0x0a, 0xd0, 0x01, 0x26, 0x5c, 0x21, 0x55, 0xe1, 0xad, 0xba, 0x7a, 0x62, 0x40, 0xf2, + 0xcb, 0x5f, 0x8e, 0xa5, 0xe0, 0xb3, 0xce, 0x17, 0xb0, 0xbf, 0x09, 0x23, 0x9f, 0x80, 0x1d, 0xb1, + 0x30, 0x66, 0x64, 0x44, 0x19, 0x2c, 0x94, 0x7e, 0x0b, 0x26, 0x74, 0xee, 0xd9, 0x2d, 0x1d, 0x8a, + 0xd8, 0xee, 0xee, 0x79, 0xee, 0xe7, 0xe7, 0xfe, 0x8f, 0x71, 0x5f, 0xe4, 0x99, 0x95, 0x72, 0x26, + 0x18, 0x69, 0x8b, 0x3c, 0x1b, 0xdf, 0x89, 0x58, 0xc4, 0xaa, 0xbd, 0x2d, 0x57, 0x17, 0xd2, 0x78, + 0x18, 0xf0, 0x22, 0x15, 0x6a, 0x37, 0xfd, 0x86, 0x70, 0xef, 0x79, 0xf2, 0x01, 0x56, 0x2c, 0x05, + 0x72, 0x84, 0x07, 0x67, 0x71, 0x94, 0x78, 0x82, 0xf1, 0x18, 0xb2, 0x11, 0x9a, 0xb4, 0x67, 0x83, + 0xf9, 0x9e, 0x25, 0xb1, 0xf5, 0x79, 0xe1, 0xe8, 0x9b, 0xd2, 0x6c, 0xd1, 0xab, 0x46, 0x72, 0x17, + 0x6b, 0x6e, 0x3e, 0xd2, 0x26, 0x68, 0x36, 0x74, 0x3a, 0xdb, 0xd2, 0xd4, 0xdc, 0x9c, 0x6a, 0x6e, + 0x4e, 0x8e, 0x24, 0x3b, 0x60, 0x61, 0x9c, 0x44, 0xa3, 0xf6, 0x04, 0xcd, 0xf6, 0xe6, 0xe3, 0x0a, + 0x56, 0x7f, 0xd0, 0xaa, 0x55, 0xb7, 0x48, 0x81, 0x36, 0xde, 0xe9, 0x21, 0x1e, 0x5e, 0x55, 0x48, + 0x0f, 0xeb, 0x8b, 0xb3, 0x37, 0xaf, 0x0f, 0x5a, 0xa4, 0x8b, 0xdb, 0xf4, 0xe5, 0xe9, 0x01, 0x7a, + 0xa2, 0x7f, 0xfa, 0x6c, 0xb6, 0xa6, 0x5f, 0x11, 0xee, 0x37, 0xc9, 0xc8, 0x02, 0x77, 0x9f, 0x85, + 0x21, 0x87, 0x4c, 0x46, 0x97, 0x59, 0x1e, 0x6c, 0x4b, 0xf3, 0x5e, 0x14, 0x8b, 0xe5, 0xda, 0xb7, + 0x02, 0xf6, 0xde, 0x5e, 0x16, 0x29, 0xf0, 0x15, 0x84, 0x11, 0x70, 0xdb, 0x5f, 0x73, 0xce, 0x3e, + 0xda, 0x6a, 0x18, 0xea, 0x1e, 0xad, 0x01, 0xc4, 0xc6, 0xfd, 0xd3, 0xb5, 0xbf, 0x8a, 0x83, 0x17, + 0x50, 0x54, 0x2f, 0x1b, 0xcc, 0x6f, 0x5b, 0xca, 0xdc, 0x08, 0xf4, 0xd2, 0x23, 0x2f, 0x5c, 0x24, + 0x59, 0x73, 0x18, 0xe9, 0x7f, 0x5f, 0x68, 0x04, 0x7a, 0xe9, 0x99, 0x7e, 0xd1, 0x70, 0x97, 0x42, + 0x00, 0x71, 0x2a, 0xc8, 0x02, 0x77, 0xdc, 0x5c, 0x3e, 0xb5, 0x0a, 0x7e, 0xcb, 0x99, 0xff, 0x2e, + 0x4d, 0xeb, 0xe6, 0xe0, 0x22, 0xcf, 0xec, 0xd4, 0x2b, 0x56, 0xcc, 0x0b, 0xad, 0x6a, 0x7c, 0x8a, + 0x40, 0x5e, 0x49, 0xd6, 0x89, 0x97, 0x2d, 0x55, 0x21, 0x8f, 0x65, 0x5f, 0xdb, 0xd2, 0xbc, 0x7f, + 0x33, 0xcf, 0x8f, 0x13, 0x8f, 0x17, 0xd6, 0x09, 0xe4, 0x4e, 0x21, 0x20, 0xa3, 0x0a, 0x42, 0x66, + 0x78, 0xff, 0x98, 0x83, 0x27, 0x20, 0x3b, 0x66, 0x89, 0xe0, 0x5e, 0x20, 0xaa, 0x2a, 0x7b, 0xf4, + 0xfa, 0x31, 0x79, 0x87, 0xf7, 0xeb, 0x75, 0x5d, 0x83, 0x5e, 0x25, 0x78, 0xa4, 0x12, 0xfc, 0x5f, + 0x15, 0xd7, 0x61, 0xce, 0xd3, 0xcd, 0xce, 0x40, 0x3f, 0x76, 0x06, 0xfa, 0xb9, 0x33, 0xd0, 0xaf, + 0x9d, 0x81, 0xbe, 0x9f, 0x1b, 0x68, 0x73, 0x6e, 0xa0, 0xb7, 0x87, 0xff, 0x1c, 0x95, 0xdf, 0xa9, + 0x7e, 0xf7, 0x87, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x9a, 0xbd, 0xcb, 0x24, 0x03, 0x00, + 0x00, } func (m *Envelope) Marshal() (dAtA []byte, err error) { @@ -684,10 +672,7 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTxs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTxs } if (iNdEx + skippy) > l { @@ -845,10 +830,7 @@ func (m *Signatory) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTxs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTxs } if (iNdEx + skippy) > l { @@ -1004,10 +986,7 @@ func (m *Receipt) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTxs - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTxs } if (iNdEx + skippy) > l { diff --git a/vent/service/block_consumer_test.go b/vent/service/block_consumer_test.go index 217f0efb0..025a9ea8c 100644 --- a/vent/service/block_consumer_test.go +++ b/vent/service/block_consumer_test.go @@ -15,7 +15,7 @@ import ( "github.com/hyperledger/burrow/vent/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - tmTypes "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) func TestBlockConsumer(t *testing.T) { @@ -173,7 +173,7 @@ func consumeBlock(blockConsumer func(*exec.BlockExecution) error, eventCh <-chan logEvents ...*exec.LogEvent) (map[string]types.EventDataTable, error) { block := &exec.BlockExecution{ - Header: &tmTypes.Header{}, + Header: &tmproto.Header{}, } for _, logEvent := range logEvents { txe := &exec.TxExecution{ diff --git a/vent/service/consumer.go b/vent/service/consumer.go index 611ab6a1f..33f3ad887 100644 --- a/vent/service/consumer.go +++ b/vent/service/consumer.go @@ -7,6 +7,8 @@ import ( "sync" "time" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/rpc" "github.com/hyperledger/burrow/logging" @@ -60,7 +62,7 @@ func (c *Consumer) Run(projection *sqlsol.Projection, stream bool) error { c.Logger.InfoMsg("Connecting to Burrow gRPC server") - c.GRPCConnection, err = grpc.Dial(c.Config.GRPCAddr, grpc.WithInsecure()) + c.GRPCConnection, err = encoding.GRPCDial(c.Config.GRPCAddr) if err != nil { return errors.Wrapf(err, "Error connecting to Burrow gRPC server at %s", c.Config.GRPCAddr) } diff --git a/vent/test/events.go b/vent/test/events.go index 34955d697..b091681bd 100644 --- a/vent/test/events.go +++ b/vent/test/events.go @@ -4,19 +4,20 @@ import ( "context" "testing" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/rpc/rpctransact" "github.com/hyperledger/burrow/txs/payload" "github.com/stretchr/testify/require" - "google.golang.org/grpc" ) func NewTransactClient(t testing.TB, listenAddress string) rpctransact.TransactClient { t.Helper() - conn, err := grpc.Dial(listenAddress, grpc.WithInsecure()) + conn, err := encoding.GRPCDial(listenAddress) require.NoError(t, err) return rpctransact.NewTransactClient(conn) } From af6f3f075ca16d6847386e696f6e93067c1fec6b Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 27 Jan 2021 14:07:01 +0100 Subject: [PATCH 127/185] Make RWTree concurrency safe Signed-off-by: Silas Davis --- .gitattributes | 2 + rpc/rpctransact/transact_server.go | 7 - storage/key_value_store.go | 41 ++++++ ...vstore_test.go => key_value_store_test.go} | 0 storage/rwtree.go | 73 +++++++++-- storage/rwtree_test.go | 122 ++++++++++-------- storage/{kvstore.go => types.go} | 39 +----- 7 files changed, 177 insertions(+), 107 deletions(-) create mode 100644 .gitattributes create mode 100644 storage/key_value_store.go rename storage/{kvstore_test.go => key_value_store_test.go} (100%) rename storage/{kvstore.go => types.go} (70%) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..2532e5d86 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.pb.go linguist-generated +yarn.lock linguist-generated diff --git a/rpc/rpctransact/transact_server.go b/rpc/rpctransact/transact_server.go index 01be16671..493edbae1 100644 --- a/rpc/rpctransact/transact_server.go +++ b/rpc/rpctransact/transact_server.go @@ -2,7 +2,6 @@ package rpctransact import ( "fmt" - "sync" "time" "github.com/hyperledger/burrow/logging" @@ -27,7 +26,6 @@ type transactServer struct { transactor *execution.Transactor txCodec txs.Codec logger *logging.Logger - lock *sync.Mutex } func NewTransactServer(state acmstate.Reader, blockchain bcm.BlockchainInfo, transactor *execution.Transactor, @@ -38,7 +36,6 @@ func NewTransactServer(state acmstate.Reader, blockchain bcm.BlockchainInfo, tra transactor: transactor, txCodec: txCodec, logger: logger.WithScope("NewTransactServer()"), - lock: &sync.Mutex{}, } } @@ -104,14 +101,10 @@ func (ts *transactServer) CallTxSim(ctx context.Context, param *payload.CallTx) if param.Address == nil { return nil, fmt.Errorf("CallSim requires a non-nil address from which to retrieve code") } - ts.lock.Lock() - defer ts.lock.Unlock() return execution.CallSim(ts.state, ts.blockchain, param.Input.Address, *param.Address, param.Data, ts.logger) } func (ts *transactServer) CallCodeSim(ctx context.Context, param *CallCodeParam) (*exec.TxExecution, error) { - ts.lock.Lock() - defer ts.lock.Unlock() return execution.CallCodeSim(ts.state, ts.blockchain, param.FromAddress, param.FromAddress, param.Code, param.Data, ts.logger) } diff --git a/storage/key_value_store.go b/storage/key_value_store.go new file mode 100644 index 000000000..dfdf753a8 --- /dev/null +++ b/storage/key_value_store.go @@ -0,0 +1,41 @@ +package storage + +import ( + "bytes" +) + +// KeyOrder maps []byte{} -> -1, []byte(nil) -> 1, and everything else to 0. This encodes the assumptions of the +// KVIterator domain endpoints +func KeyOrder(key []byte) int { + if key == nil { + // Sup + return 1 + } + if len(key) == 0 { + // Inf + return -1 + } + // Normal key + return 0 +} + +// Sorts the keys as if they were compared lexicographically with their KeyOrder prepended +func CompareKeys(k1, k2 []byte) int { + ko1 := KeyOrder(k1) + ko2 := KeyOrder(k2) + if ko1 < ko2 { + return -1 + } + if ko1 > ko2 { + return 1 + } + return bytes.Compare(k1, k2) +} + +// NormaliseDomain encodes the assumption that when nil is used as a lower bound is interpreted as low rather than high +func NormaliseDomain(low, high []byte) ([]byte, []byte) { + if len(low) == 0 { + low = []byte{} + } + return low, high +} diff --git a/storage/kvstore_test.go b/storage/key_value_store_test.go similarity index 100% rename from storage/kvstore_test.go rename to storage/key_value_store_test.go diff --git a/storage/rwtree.go b/storage/rwtree.go index 7275f3836..d4667f9b8 100644 --- a/storage/rwtree.go +++ b/storage/rwtree.go @@ -2,9 +2,10 @@ package storage import ( "fmt" + "sync" + "sync/atomic" "github.com/cosmos/iavl" - dbm "github.com/tendermint/tm-db" "github.com/xlab/treeprint" ) @@ -13,26 +14,40 @@ import ( // recently saved version of the tree - which provides immutable access. Writes are routed to a working tree that is // mutable. On save the working tree is saved to DB, frozen, and replaces the previous immutable read tree. type RWTree struct { + // Synchronise 'write side access' - i.e. to the write tree and updated flag (which only read-locks this mutex) + sync.RWMutex // Working tree accumulating writes tree *MutableTree // Read-only tree serving previous state - *ImmutableTree + readTree atomic.Value // *ImmutableTree // Have any writes occurred since last save updated bool } +var _ KVCallbackIterableReader = &RWTree{} +var _ Versioned = &RWTree{} + // Creates a concurrency safe version of an IAVL tree whereby reads are routed to the last saved tree. // Writes must be serialised (as they are within a commit for example). func NewRWTree(db dbm.DB, cacheSize int) (*RWTree, error) { tree, err := NewMutableTree(db, cacheSize) - return &RWTree{ - tree: tree, - ImmutableTree: &ImmutableTree{iavl.NewImmutableTree(db, cacheSize)}, - }, err + if err != nil { + return nil, err + } + readTree := &ImmutableTree{iavl.NewImmutableTree(db, cacheSize)} + rwt := &RWTree{ + tree: tree, + } + rwt.readTree.Store(readTree) + return rwt, nil } +// Write-side write methods - of the mutable tree - synchronised by write-lock of RWMutex + // Tries to load the execution state from DB, returns nil with no error if no state found func (rwt *RWTree) Load(version int64, overwriting bool) error { + rwt.Lock() + defer rwt.Unlock() const errHeader = "RWTree.Load():" if version <= 0 { return fmt.Errorf("%s trying to load from non-positive version %d", errHeader, version) @@ -42,52 +57,92 @@ func (rwt *RWTree) Load(version int64, overwriting bool) error { return fmt.Errorf("%s loading version %d: %v", errHeader, version, err) } // Set readTree at commit point == tree - rwt.ImmutableTree, err = rwt.tree.GetImmutable(version) + readTree, err := rwt.tree.GetImmutable(version) if err != nil { return fmt.Errorf("%s loading version %d: %v", errHeader, version, err) } + rwt.readTree.Store(readTree) + rwt.updated = false + return nil } // Save the current write tree making writes accessible from read tree. func (rwt *RWTree) Save() ([]byte, int64, error) { + rwt.Lock() + defer rwt.Unlock() // save state at a new version may still be orphaned before we save the version against the hash hash, version, err := rwt.tree.SaveVersion() if err != nil { return nil, 0, fmt.Errorf("could not save RWTree: %v", err) } // Take an immutable reference to the tree we just saved for querying - rwt.ImmutableTree, err = rwt.tree.GetImmutable(version) + readTree, err := rwt.tree.GetImmutable(version) if err != nil { - return nil, 0, fmt.Errorf("RWTree.Save() could not obtain ImmutableTree read tree: %v", err) + return nil, 0, fmt.Errorf("RWTree.Save() could not obtain immutable read tree: %v", err) } + rwt.readTree.Store(readTree) rwt.updated = false return hash, version, nil } func (rwt *RWTree) Set(key, value []byte) bool { + rwt.Lock() + defer rwt.Unlock() rwt.updated = true return rwt.tree.Set(key, value) } func (rwt *RWTree) Delete(key []byte) ([]byte, bool) { + rwt.Lock() + defer rwt.Unlock() rwt.updated = true return rwt.tree.Remove(key) } +// Write-side read methods - of the mutable tree - synchronised by read-lock of RWMutex + // Returns true if there have been any writes since last save func (rwt *RWTree) Updated() bool { + rwt.RLock() + defer rwt.RUnlock() return rwt.updated } func (rwt *RWTree) GetImmutable(version int64) (*ImmutableTree, error) { + rwt.RLock() + defer rwt.RUnlock() return rwt.tree.GetImmutable(version) } func (rwt *RWTree) IterateWriteTree(start, end []byte, ascending bool, fn func(key []byte, value []byte) error) error { + rwt.RLock() + defer rwt.RUnlock() return rwt.tree.IterateWriteTree(start, end, ascending, fn) } +// Read-side read methods - of the immutable read tree (previous saved state) - synchronised solely via atomic.Value + +func (rwt *RWTree) Hash() []byte { + return rwt.readTree.Load().(*ImmutableTree).Hash() +} + +func (rwt *RWTree) Version() int64 { + return rwt.readTree.Load().(*ImmutableTree).Version() +} + +func (rwt *RWTree) Get(key []byte) ([]byte, error) { + return rwt.readTree.Load().(*ImmutableTree).Get(key) +} + +func (rwt *RWTree) Has(key []byte) (bool, error) { + return rwt.readTree.Load().(*ImmutableTree).Has(key) +} + +func (rwt *RWTree) Iterate(low, high []byte, ascending bool, fn func(key []byte, value []byte) error) error { + return rwt.readTree.Load().(*ImmutableTree).Iterate(low, high, ascending, fn) +} + // Tree printing func (rwt *RWTree) Dump() string { diff --git a/storage/rwtree_test.go b/storage/rwtree_test.go index 6453e3cf8..06ad750a0 100644 --- a/storage/rwtree_test.go +++ b/storage/rwtree_test.go @@ -2,8 +2,10 @@ package storage import ( "fmt" + "math/rand" "runtime/debug" "testing" + "time" "github.com/stretchr/testify/require" @@ -151,58 +153,68 @@ func capturePanic(f func() error) (err error) { return } -// TODO: fix -//func TestConcurrentReadWriteSave(t *testing.T) { -// rwt, err := NewRWTree(dbm.NewMemDB(), 100) -// require.NoError(t, err) -// n := 100 -// -// doneCh := make(chan struct{}) -// errCh := make(chan interface{}) -// -// go func() { -// for b := byte(0); true; b++ { -// val := []byte{b} -// go func() { -// err := capturePanic(func() error { -// rwt.Set(val, val) -// return nil -// }) -// if err != nil { -// errCh <- err -// } -// }() -// go func() { -// err := capturePanic(func() error { -// _, err := rwt.Get(val) -// return err -// }) -// if err != nil { -// errCh <- err -// } -// }() -// -// select { -// case <-doneCh: -// return -// default: -// } -// } -// }() -// -// for i := 0; i < n/10; i++ { -// time.Sleep(time.Duration(rand.Int63n(100)) * time.Millisecond) -// err := capturePanic(func() error { -// _, _, err := rwt.Save() -// return err -// }) -// if err != nil { -// break -// } -// } -// close(doneCh) -// -// for err := range errCh { -// t.Fatal(err) -// } -//} +func TestConcurrentReadWriteSave(t *testing.T) { + rwt, err := NewRWTree(dbm.NewMemDB(), 100) + require.NoError(t, err) + n := 100 + + doneCh := make(chan struct{}) + errCh := make(chan interface{}) + + // Saturate with concurrent reads and writes + var spin func() + spin = func() { + for i := 0; i < n; i++ { + val := []byte{byte(i)} + go func() { + err := capturePanic(func() error { + rwt.Set(val, val) + return nil + }) + if err != nil { + errCh <- err + } + }() + go func() { + err := capturePanic(func() error { + _, err := rwt.Get(val) + return err + }) + if err != nil { + errCh <- err + } + }() + + } + select { + case <-doneCh: + return + default: + // Avoid starvation + time.Sleep(time.Millisecond) + spin() + } + } + + // let's + go spin() + + // Ensure Save() is safe with concurrent read/writes + for i := 0; i < n/10; i++ { + time.Sleep(time.Duration(rand.Int63n(100)) * time.Millisecond) + err := capturePanic(func() error { + _, _, err := rwt.Save() + return err + }) + if err != nil { + break + } + } + close(doneCh) + + select { + case err := <-errCh: + t.Fatal(err) + default: + } +} diff --git a/storage/kvstore.go b/storage/types.go similarity index 70% rename from storage/kvstore.go rename to storage/types.go index 1dd788ee2..030e7b8fc 100644 --- a/storage/kvstore.go +++ b/storage/types.go @@ -1,8 +1,6 @@ package storage import ( - "bytes" - dbm "github.com/tendermint/tm-db" ) @@ -67,38 +65,7 @@ type KVStore interface { KVIterable } -// KeyOrder maps []byte{} -> -1, []byte(nil) -> 1, and everything else to 0. This encodes the assumptions of the -// KVIterator domain endpoints -func KeyOrder(key []byte) int { - if key == nil { - // Sup - return 1 - } - if len(key) == 0 { - // Inf - return -1 - } - // Normal key - return 0 -} - -// Sorts the keys as if they were compared lexicographically with their KeyOrder prepended -func CompareKeys(k1, k2 []byte) int { - ko1 := KeyOrder(k1) - ko2 := KeyOrder(k2) - if ko1 < ko2 { - return -1 - } - if ko1 > ko2 { - return 1 - } - return bytes.Compare(k1, k2) -} - -// NormaliseDomain encodes the assumption that when nil is used as a lower bound is interpreted as low rather than high -func NormaliseDomain(low, high []byte) ([]byte, []byte) { - if len(low) == 0 { - low = []byte{} - } - return low, high +type Versioned interface { + Hash() []byte + Version() int64 } From 8195890bf041b393b1fb3d3f0f74d16bafd37289 Mon Sep 17 00:00:00 2001 From: Vitali Grabovski Date: Sun, 17 Jan 2021 21:38:41 +0200 Subject: [PATCH 128/185] ecrecover function implementation + precompiles unit test implementaton Signed-off-by: Vitali Grabovski --- execution/native/precompiles.go | 37 ++++++++++++-------- execution/native/precompiles_test.go | 52 ++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 14 deletions(-) create mode 100644 execution/native/precompiles_test.go diff --git a/execution/native/precompiles.go b/execution/native/precompiles.go index ff14fb283..5b8523265 100644 --- a/execution/native/precompiles.go +++ b/execution/native/precompiles.go @@ -5,6 +5,7 @@ import ( "fmt" "math/big" + "github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/errors" @@ -13,6 +14,10 @@ import ( ) var Precompiles = New(). + MustFunction(`Recover public key/address of account that signed the data`, + leftPadAddress(1), + permission.None, + ecrecoverFunc). MustFunction(`Compute the sha256 hash of input`, leftPadAddress(2), permission.None, @@ -34,29 +39,33 @@ func leftPadAddress(bs ...byte) crypto.Address { return crypto.AddressFromWord256(binary.LeftPadWord256(bs)) } -/* Removed due to C dependency -func ecrecoverFunc(state State, caller crypto.Address, input []byte, gas *int64) (output []byte, err error) { +func ecrecoverFunc(ctx Context) (output []byte, err error) { // Deduct gas gasRequired := GasEcRecover - if *gas < gasRequired { - return nil, ErrInsufficientGas + if *ctx.Gas < gasRequired { + return nil, errors.Codes.InsufficientGas } else { - *gas -= gasRequired + *ctx.Gas -= gasRequired } - // Recover - hash := input[:32] - v := byte(input[32] - 27) // ignore input[33:64], v is small. - sig := append(input[64:], v) - recovered, err := secp256k1.RecoverPubkey(hash, sig) + // SECP256K1 Recovery + hash := ctx.Input[:32] // from 0 to 31 bytes + sig := ctx.Input[63:] // skip values in range[32:62] + + publicKey, isCompressed, err := ecdsa.RecoverCompact(sig, hash) if err != nil { return nil, err -OH NO STOCASTIC CAT CODING!!!! } - hashed := crypto.Keccak256(recovered[1:]) - return LeftPadBytes(hashed, 32), nil + + var serializedPublicKey []byte + if isCompressed == true { + serializedPublicKey = publicKey.SerializeCompressed() + } else { + serializedPublicKey = publicKey.SerializeUncompressed() + } + hashed := crypto.Keccak256(serializedPublicKey[1:]) + return binary.LeftPadBytes(hashed, 32), nil } -*/ func sha256Func(ctx Context) (output []byte, err error) { // Deduct gas diff --git a/execution/native/precompiles_test.go b/execution/native/precompiles_test.go new file mode 100644 index 000000000..3daa30852 --- /dev/null +++ b/execution/native/precompiles_test.go @@ -0,0 +1,52 @@ +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 + +package native + +import ( + "testing" + + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/exec" + "github.com/stretchr/testify/require" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/crypto" + + "github.com/hyperledger/burrow/execution/evm/asm/bc" + "github.com/stretchr/testify/assert" +) + +func TestSNativeContractDescription1a(t *testing.T) { + signatory := []byte("4fbdd7d412e5dad21d0c4add8b3cdc70ab65a5b3") + signature := []byte("e8cd78a90152a1549cfea3dcc8556e25618c67085c39e0b95e3d1ec6dbe9339525e7c61e005954fa67ce0c102cee434d1b111c4b0c52bad0fdc2663ca09451ac1b") + messageDigest := []byte("21400fb863b0ee7392af02491b6ca5fb87f68ad6af4867b104282dd8fe8b52e4") + + st := acmstate.NewMemoryState() + caller := &acm.Account{ + Address: crypto.Address{1, 1, 1}, + } + function := Precompiles.GetByAddress(leftPadAddress(1)).(*Function) + require.NotNil(t, function, "Could not get function: %s") + require.NoError(t, st.UpdateAccount(caller)) + + state := engine.State{ + CallFrame: engine.NewCallFrame(st), + EventSink: exec.NewNoopEventSink(), + } + + funcID := function.Abi().FunctionID + gas := uint64(10000) + + input := bc.MustSplice(funcID[:], messageDigest, signature) + params := engine.CallParams{ + Caller: caller.Address, + Input: input, + Gas: &gas, + } + + returnValue, err := function.Call(state, params) + require.NoError(t, err) + assert.Equal(t, signatory, returnValue) +} From fd78e37d8a0c08be88569a6cce137ba31d8ccc00 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 28 Jan 2021 20:11:08 +0100 Subject: [PATCH 129/185] Implement ecrecover using btcec - Also fix secp256k1 generation to always generate valid private keys Signed-off-by: Silas Davis --- crypto/private_key.go | 40 ++++++--------- crypto/public_key.go | 2 +- execution/evm/precompiles_test.go | 74 ++++++++++++++++++++++++++++ execution/native/precompiles.go | 62 ++++++++++++++++------- execution/native/precompiles_test.go | 52 ------------------- execution/solidity/ecrecover.sol | 9 ++++ execution/solidity/ecrecover.sol.go | 7 +++ 7 files changed, 149 insertions(+), 97 deletions(-) create mode 100644 execution/evm/precompiles_test.go delete mode 100644 execution/native/precompiles_test.go create mode 100644 execution/solidity/ecrecover.sol create mode 100644 execution/solidity/ecrecover.sol.go diff --git a/crypto/private_key.go b/crypto/private_key.go index b2ac21957..f46f55271 100644 --- a/crypto/private_key.go +++ b/crypto/private_key.go @@ -2,6 +2,7 @@ package crypto import ( "bytes" + "crypto/ecdsa" cryptoRand "crypto/rand" "crypto/sha256" "fmt" @@ -70,38 +71,26 @@ func (p PrivateKey) GetPublicKey() PublicKey { return PublicKey{CurveType: p.CurveType, PublicKey: p.PublicKey} } -// Reinitialise after serialisation -func (p *PrivateKey) Reinitialise() error { - initP, err := PrivateKeyFromRawBytes(p.RawBytes(), p.CurveType) - if err != nil { - return err - } - *p = initP - return nil -} - func (p PrivateKey) String() string { return fmt.Sprintf("PrivateKey", p.PublicKey) } -func PrivateKeyFromRawBytes(privKeyBytes []byte, curveType CurveType) (PrivateKey, error) { +func PrivateKeyFromRawBytes(privateKeyBytes []byte, curveType CurveType) (PrivateKey, error) { + const ed25519PublicKeyOffset = ed25519.PrivateKeySize - ed25519.PublicKeySize switch curveType { case CurveTypeEd25519: - if len(privKeyBytes) != ed25519.PrivateKeySize { + if len(privateKeyBytes) != ed25519.PrivateKeySize { return PrivateKey{}, fmt.Errorf("bytes passed have length %v but ed25519 private keys have %v bytes", - len(privKeyBytes), ed25519.PrivateKeySize) + len(privateKeyBytes), ed25519.PrivateKeySize) } - return PrivateKey{PrivateKey: privKeyBytes, PublicKey: privKeyBytes[32:], CurveType: CurveTypeEd25519}, nil + return PrivateKey{PrivateKey: privateKeyBytes, PublicKey: privateKeyBytes[ed25519PublicKeyOffset:], CurveType: CurveTypeEd25519}, nil case CurveTypeSecp256k1: - if len(privKeyBytes) != btcec.PrivKeyBytesLen { + if len(privateKeyBytes) != btcec.PrivKeyBytesLen { return PrivateKey{}, fmt.Errorf("bytes passed have length %v but secp256k1 private keys have %v bytes", - len(privKeyBytes), btcec.PrivKeyBytesLen) - } - privKey, pubKey := btcec.PrivKeyFromBytes(btcec.S256(), privKeyBytes) - if !bytes.Equal(privKey.Serialize(), privKeyBytes) { - return PrivateKey{}, fmt.Errorf("serialisation of Secp256k1 private key bytes does not equal") + len(privateKeyBytes), btcec.PrivKeyBytesLen) } - return PrivateKey{PrivateKey: privKeyBytes, PublicKey: pubKey.SerializeCompressed(), CurveType: CurveTypeSecp256k1}, nil + _, publicKey := btcec.PrivKeyFromBytes(btcec.S256(), privateKeyBytes) + return PrivateKey{PrivateKey: privateKeyBytes, PublicKey: publicKey.SerializeCompressed(), CurveType: CurveTypeSecp256k1}, nil default: return PrivateKey{}, ErrInvalidCurve(curveType) } @@ -113,18 +102,17 @@ func GeneratePrivateKey(random io.Reader, curveType CurveType) (PrivateKey, erro } switch curveType { case CurveTypeEd25519: - _, priv, err := ed25519.GenerateKey(random) + _, privateKey, err := ed25519.GenerateKey(random) if err != nil { return PrivateKey{}, err } - return PrivateKeyFromRawBytes(priv, CurveTypeEd25519) + return PrivateKeyFromRawBytes(privateKey, CurveTypeEd25519) case CurveTypeSecp256k1: - privKeyBytes := make([]byte, 32) - _, err := random.Read(privKeyBytes) + privateKey, err := ecdsa.GenerateKey(btcec.S256(), random) if err != nil { return PrivateKey{}, err } - return PrivateKeyFromRawBytes(privKeyBytes, CurveTypeSecp256k1) + return PrivateKeyFromRawBytes(privateKey.D.Bytes(), CurveTypeSecp256k1) default: return PrivateKey{}, ErrInvalidCurve(curveType) } diff --git a/crypto/public_key.go b/crypto/public_key.go index a2b38586a..1366e498f 100644 --- a/crypto/public_key.go +++ b/crypto/public_key.go @@ -118,7 +118,7 @@ func (p PublicKey) GetAddress() Address { return Address{} } hash := Keccak256(pub.SerializeUncompressed()[1:]) - addr, _ := AddressFromBytes(hash[len(hash)-20:]) + addr, _ := AddressFromBytes(hash[len(hash)-AddressLength:]) return addr default: panic(fmt.Sprintf("unknown CurveType %d", p.CurveType)) diff --git a/execution/evm/precompiles_test.go b/execution/evm/precompiles_test.go new file mode 100644 index 000000000..fb538772b --- /dev/null +++ b/execution/evm/precompiles_test.go @@ -0,0 +1,74 @@ +// Copyright Monax Industries Limited +// SPDX-License-Identifier: Apache-2.0 + +package evm + +import ( + "testing" + + "github.com/hyperledger/burrow/execution/evm/abi" + + "github.com/btcsuite/btcd/btcec" + "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/execution/native" + "github.com/hyperledger/burrow/execution/solidity" + + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/exec" + "github.com/stretchr/testify/require" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/crypto" + + "github.com/hyperledger/burrow/execution/evm/asm/bc" + "github.com/stretchr/testify/assert" +) + +func TestSNativeContractDescription1a(t *testing.T) { + message := []byte("THIS MESSAGE IS NOT SIGNED") + digest := crypto.Keccak256(message) + privateKey, err := btcec.NewPrivateKey(btcec.S256()) + require.NoError(t, err) + + sig, err := btcec.SignCompact(btcec.S256(), privateKey, digest, false) + require.NoError(t, err) + + st := native.NewState(native.MustDefaultNatives(), acmstate.NewMemoryState()) + caller := &acm.Account{ + Address: crypto.Address{1, 1, 1}, + } + function := native.Precompiles.GetByName("ecrecover").(*native.Function) + require.NotNil(t, function, "Could not get function: %s") + require.NoError(t, st.UpdateAccount(caller)) + + state := engine.State{ + CallFrame: engine.NewCallFrame(st), + EventSink: exec.NewNoopEventSink(), + } + + gas := uint64(10000) + + spec, err := abi.ReadSpec(solidity.Abi_ECRecover) + require.NoError(t, err) + funcId := spec.Functions["recoverSigningAddress"].FunctionID + input := bc.MustSplice(funcId, digest, binary.Int64ToWord256(int64(sig[2*binary.Word256Bytes])), sig[:2*binary.Word256Bytes]) + + params := engine.CallParams{ + Caller: caller.Address, + Input: input, + Gas: &gas, + } + + vm := New(Options{ + Natives: native.MustDefaultNatives(), + }) + returnValue, err := vm.Contract(solidity.DeployedBytecode_ECRecover).Call(state, params) + require.NoError(t, err) + priv, err := crypto.PrivateKeyFromRawBytes(privateKey.D.Bytes(), crypto.CurveTypeSecp256k1) + require.NoError(t, err) + address := priv.GetPublicKey().GetAddress() + addressOut := crypto.AddressFromWord256(binary.LeftPadWord256(returnValue)) + require.NoError(t, err) + assert.Equal(t, address, addressOut) +} diff --git a/execution/native/precompiles.go b/execution/native/precompiles.go index 5b8523265..a25054f1f 100644 --- a/execution/native/precompiles.go +++ b/execution/native/precompiles.go @@ -1,11 +1,12 @@ package native import ( - "crypto/sha256" + cryptoSha256 "crypto/sha256" "fmt" "math/big" - "github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa" + "github.com/btcsuite/btcd/btcec" + "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/errors" @@ -17,11 +18,11 @@ var Precompiles = New(). MustFunction(`Recover public key/address of account that signed the data`, leftPadAddress(1), permission.None, - ecrecoverFunc). + ecrecover). MustFunction(`Compute the sha256 hash of input`, leftPadAddress(2), permission.None, - sha256Func). + sha256). MustFunction(`Compute the ripemd160 hash of input`, leftPadAddress(3), permission.None, @@ -29,17 +30,18 @@ var Precompiles = New(). MustFunction(`Return an output identical to the input`, leftPadAddress(4), permission.None, - identityFunc). + identity). MustFunction(`Compute the operation base**exp % mod where the values are big ints`, leftPadAddress(5), permission.None, - expModFunc) + expMod) func leftPadAddress(bs ...byte) crypto.Address { return crypto.AddressFromWord256(binary.LeftPadWord256(bs)) } -func ecrecoverFunc(ctx Context) (output []byte, err error) { +// SECP256K1 Recovery +func ecrecover(ctx Context) ([]byte, error) { // Deduct gas gasRequired := GasEcRecover if *ctx.Gas < gasRequired { @@ -48,26 +50,50 @@ func ecrecoverFunc(ctx Context) (output []byte, err error) { *ctx.Gas -= gasRequired } - // SECP256K1 Recovery - hash := ctx.Input[:32] // from 0 to 31 bytes - sig := ctx.Input[63:] // skip values in range[32:62] + // layout is: + // input: [ hash | v | r | s ] + // bytes: [ 32 | 32 | 32 | 32 ] + // Where: + // hash = message digest + // v = 27 + recovery id (which of 4 possible x coords do we take as public key) (single byte but padded) + // r = encrypted random point + // s = signature proof + + // Signature layout required by btcec: + // sig: [ r | s | v ] + // bytes: [ 32 | 32 | 1 ] + hash := ctx.Input[:32] + + const compactSigLength = 2*binary.Word256Bytes + 1 + sig := make([]byte, compactSigLength) + // Copy in r, s + copy(sig, ctx.Input[2*binary.Word256Bytes:4*binary.Word256Bytes]) + // Check v is single byte + v := ctx.Input[binary.Word256Bytes : 2*binary.Word256Bytes] + if !binary.IsZeros(v[:len(v)-1]) { + return nil, fmt.Errorf("ecrecover: recovery ID is larger than one byte") + } + // Copy in v to last element of sig + sig[2*binary.Word256Bytes] = v[len(v)-1] - publicKey, isCompressed, err := ecdsa.RecoverCompact(sig, hash) + publicKey, isCompressed, err := btcec.RecoverCompact(btcec.S256(), sig, hash) if err != nil { return nil, err } var serializedPublicKey []byte - if isCompressed == true { + if isCompressed { serializedPublicKey = publicKey.SerializeCompressed() } else { serializedPublicKey = publicKey.SerializeUncompressed() } + // First byte is a length-prefix hashed := crypto.Keccak256(serializedPublicKey[1:]) - return binary.LeftPadBytes(hashed, 32), nil + hashed = hashed[len(hashed)-crypto.AddressLength:] + return binary.LeftPadBytes(hashed, binary.Word256Bytes), nil } -func sha256Func(ctx Context) (output []byte, err error) { +func sha256(ctx Context) (output []byte, err error) { // Deduct gas gasRequired := wordsIn(uint64(len(ctx.Input)))*GasSha256Word + GasSha256Base if *ctx.Gas < gasRequired { @@ -76,7 +102,7 @@ func sha256Func(ctx Context) (output []byte, err error) { *ctx.Gas -= gasRequired } // Hash - hasher := sha256.New() + hasher := cryptoSha256.New() // CONTRACT: this does not err hasher.Write(ctx.Input) return hasher.Sum(nil), nil @@ -97,7 +123,7 @@ func ripemd160Func(ctx Context) (output []byte, err error) { return binary.LeftPadBytes(hasher.Sum(nil), 32), nil } -func identityFunc(ctx Context) (output []byte, err error) { +func identity(ctx Context) (output []byte, err error) { // Deduct gas gasRequired := wordsIn(uint64(len(ctx.Input)))*GasIdentityWord + GasIdentityBase if *ctx.Gas < gasRequired { @@ -111,8 +137,8 @@ func identityFunc(ctx Context) (output []byte, err error) { // expMod: function that implements the EIP 198 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-198.md with // a fixed gas requirement) -func expModFunc(ctx Context) (output []byte, err error) { - const errHeader = "expModFunc" +func expMod(ctx Context) (output []byte, err error) { + const errHeader = "expMod" input, segments, err := cut(ctx.Input, binary.Word256Bytes, binary.Word256Bytes, binary.Word256Bytes) if err != nil { diff --git a/execution/native/precompiles_test.go b/execution/native/precompiles_test.go deleted file mode 100644 index 3daa30852..000000000 --- a/execution/native/precompiles_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright Monax Industries Limited -// SPDX-License-Identifier: Apache-2.0 - -package native - -import ( - "testing" - - "github.com/hyperledger/burrow/acm/acmstate" - "github.com/hyperledger/burrow/execution/engine" - "github.com/hyperledger/burrow/execution/exec" - "github.com/stretchr/testify/require" - - "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/crypto" - - "github.com/hyperledger/burrow/execution/evm/asm/bc" - "github.com/stretchr/testify/assert" -) - -func TestSNativeContractDescription1a(t *testing.T) { - signatory := []byte("4fbdd7d412e5dad21d0c4add8b3cdc70ab65a5b3") - signature := []byte("e8cd78a90152a1549cfea3dcc8556e25618c67085c39e0b95e3d1ec6dbe9339525e7c61e005954fa67ce0c102cee434d1b111c4b0c52bad0fdc2663ca09451ac1b") - messageDigest := []byte("21400fb863b0ee7392af02491b6ca5fb87f68ad6af4867b104282dd8fe8b52e4") - - st := acmstate.NewMemoryState() - caller := &acm.Account{ - Address: crypto.Address{1, 1, 1}, - } - function := Precompiles.GetByAddress(leftPadAddress(1)).(*Function) - require.NotNil(t, function, "Could not get function: %s") - require.NoError(t, st.UpdateAccount(caller)) - - state := engine.State{ - CallFrame: engine.NewCallFrame(st), - EventSink: exec.NewNoopEventSink(), - } - - funcID := function.Abi().FunctionID - gas := uint64(10000) - - input := bc.MustSplice(funcID[:], messageDigest, signature) - params := engine.CallParams{ - Caller: caller.Address, - Input: input, - Gas: &gas, - } - - returnValue, err := function.Call(state, params) - require.NoError(t, err) - assert.Equal(t, signatory, returnValue) -} diff --git a/execution/solidity/ecrecover.sol b/execution/solidity/ecrecover.sol new file mode 100644 index 000000000..ea2fe1063 --- /dev/null +++ b/execution/solidity/ecrecover.sol @@ -0,0 +1,9 @@ +pragma solidity ^0.5; + +contract ECRecover { + + function recoverSigningAddress(bytes32 msgDigest, uint8 v, bytes32 r, bytes32 s) pure public returns (address) { + return ecrecover(msgDigest, v, r, s); + } + +} diff --git a/execution/solidity/ecrecover.sol.go b/execution/solidity/ecrecover.sol.go new file mode 100644 index 000000000..041b4a6c8 --- /dev/null +++ b/execution/solidity/ecrecover.sol.go @@ -0,0 +1,7 @@ +package solidity + +import hex "github.com/tmthrgd/go-hex" + +var Bytecode_ECRecover = hex.MustDecodeString("608060405234801561001057600080fd5b50610167806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80636a267aeb14610030575b600080fd5b61007d6004803603608081101561004657600080fd5b8101908080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291905050506100bf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060018585858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561011e573d6000803e3d6000fd5b50505060206040510351905094935050505056fea265627a7a72315820efc8c28d65a1b0ed5069d6f88e4f1fe720663041a0c58bfa6dbb4c500babea1964736f6c63430005110032") +var DeployedBytecode_ECRecover = hex.MustDecodeString("608060405234801561001057600080fd5b506004361061002b5760003560e01c80636a267aeb14610030575b600080fd5b61007d6004803603608081101561004657600080fd5b8101908080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291905050506100bf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060018585858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561011e573d6000803e3d6000fd5b50505060206040510351905094935050505056fea265627a7a72315820efc8c28d65a1b0ed5069d6f88e4f1fe720663041a0c58bfa6dbb4c500babea1964736f6c63430005110032") +var Abi_ECRecover = []byte(`[{"constant":true,"inputs":[{"internalType":"bytes32","name":"msgDigest","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"recoverSigningAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"pure","type":"function"}]`) From a934952b79e4174427385dbe7d8a9f307c05328e Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 28 Jan 2021 20:59:44 +0100 Subject: [PATCH 130/185] Fix broken decoding on RLP Use this to fix eth tests Signed-off-by: Silas Davis --- acm/account.go | 2 +- acm/acm.pb.go | 99 ++--- acm/balance/balance.go | 3 +- acm/balance/balance_test.go | 2 +- acm/private_account.go | 10 +- acm/validator/bucket.go | 2 +- acm/validator/ring.go | 2 +- acm/validator/set.go | 6 +- acm/validator/set_test.go | 2 +- acm/validator/validator.go | 2 +- acm/validator/validator.pb.go | 51 ++- acm/validator/validators.go | 6 +- consensus/tendermint/node_view.go | 6 +- crypto/address.go | 8 +- crypto/crypto_test.go | 36 ++ crypto/doc.go | 10 + crypto/private_key.go | 88 ++-- crypto/public_key.go | 58 +-- crypto/public_key_test.go | 33 +- crypto/signature.go | 137 +++++-- crypto/tendermint.go | 5 +- deploy/def/client.go | 24 +- dump/mock.go | 2 - encoding/rlp/rlp.go | 378 +++++++++--------- encoding/rlp/rlp_test.go | 123 +++++- execution/contexts/governance_context.go | 4 +- execution/evm/precompiles_test.go | 4 +- execution/execution.go | 4 +- execution/native/precompiles.go | 2 +- execution/registry/registry.pb.go | 52 +-- execution/registry/registry_test.go | 2 +- execution/state/validators.go | 4 +- execution/state/validators_test.go | 2 +- genesis/deterministic_genesis.go | 4 +- genesis/genesis.go | 2 +- genesis/spec/template_account.go | 4 +- integration/governance/governance_test.go | 2 +- .../rpctransact/transact_server_test.go | 2 +- keys/key.go | 8 +- keys/key_client.go | 18 +- keys/keys_grpc.pb.go | 8 +- protobuf/acm.proto | 2 +- protobuf/registry.proto | 2 +- protobuf/validator.proto | 2 +- rpc/eth.go | 57 +-- rpc/eth_test.go | 37 +- rpc/result.go | 2 +- rpc/rpcdump/rpcdump_grpc.pb.go | 10 +- rpc/rpcevents/rpcevents_grpc.pb.go | 12 +- rpc/rpcquery/rpcquery_grpc.pb.go | 14 +- rpc/rpctransact/rpctransact_grpc.pb.go | 8 +- txs/envelope.go | 4 +- txs/ethereum_tx.go | 125 ++++++ txs/payload/bond_tx.go | 4 +- txs/payload/call_tx.go | 4 +- txs/payload/gov_tx.go | 2 +- txs/payload/name_tx.go | 4 +- txs/payload/perms_tx.go | 4 +- txs/payload/send_tx.go | 4 +- txs/tx.go | 44 +- 60 files changed, 946 insertions(+), 612 deletions(-) create mode 100644 crypto/doc.go create mode 100644 txs/ethereum_tx.go diff --git a/acm/account.go b/acm/account.go index bde1c375a..f47060161 100644 --- a/acm/account.go +++ b/acm/account.go @@ -18,7 +18,7 @@ import ( var GlobalPermissionsAddress = crypto.Address(binary.Zero160) -func NewAccount(pubKey crypto.PublicKey) *Account { +func NewAccount(pubKey *crypto.PublicKey) *Account { return &Account{ Address: pubKey.GetAddress(), PublicKey: pubKey, diff --git a/acm/acm.pb.go b/acm/acm.pb.go index 03f7ac130..92c5fe0d8 100644 --- a/acm/acm.pb.go +++ b/acm/acm.pb.go @@ -32,7 +32,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Account struct { Address github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address"` - PublicKey crypto.PublicKey `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey"` + PublicKey *crypto.PublicKey `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` // Sequence counts the number of transactions that have been accepted from this account Sequence uint64 `protobuf:"varint,3,opt,name=Sequence,proto3" json:"Sequence,omitempty"` // The account's current native token balance @@ -88,11 +88,11 @@ func (m *Account) XXX_DiscardUnknown() { var xxx_messageInfo_Account proto.InternalMessageInfo -func (m *Account) GetPublicKey() crypto.PublicKey { +func (m *Account) GetPublicKey() *crypto.PublicKey { if m != nil { return m.PublicKey } - return crypto.PublicKey{} + return nil } func (m *Account) GetSequence() uint64 { @@ -194,39 +194,39 @@ func init() { proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } func init() { golang_proto.RegisterFile("acm.proto", fileDescriptor_49ed775bc0a6adf6) } var fileDescriptor_49ed775bc0a6adf6 = []byte{ - // 501 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x41, 0x6f, 0xd3, 0x4c, - 0x10, 0xed, 0x36, 0x69, 0xe3, 0x6c, 0xa2, 0x4f, 0xfd, 0x56, 0x1c, 0x56, 0x39, 0xd8, 0xa6, 0xa7, - 0x08, 0xb5, 0x0e, 0x02, 0x72, 0x09, 0xa7, 0xb8, 0xa2, 0xaa, 0x04, 0x8d, 0x8a, 0x2b, 0x15, 0xc1, - 0x6d, 0xbd, 0x1e, 0x25, 0x96, 0x62, 0xaf, 0x59, 0xaf, 0x01, 0xff, 0x04, 0xfe, 0x01, 0x47, 0x7e, - 0x0a, 0xc7, 0x1c, 0x39, 0x56, 0x1c, 0x22, 0x94, 0xde, 0xfa, 0x2b, 0x90, 0x37, 0x8e, 0x71, 0x7a, - 0xa8, 0x04, 0xdc, 0x32, 0x79, 0x6f, 0xde, 0x7b, 0x33, 0x3b, 0xc6, 0x6d, 0xc6, 0x23, 0x27, 0x91, - 0x42, 0x09, 0xd2, 0x60, 0x3c, 0xea, 0x3d, 0x98, 0x8a, 0xa9, 0xd0, 0xf5, 0xa0, 0xf8, 0xb5, 0x86, - 0x7a, 0x07, 0x09, 0xc8, 0x28, 0x4c, 0xd3, 0x50, 0xc4, 0xe5, 0x3f, 0x5d, 0x2e, 0xf3, 0x44, 0x95, - 0xf8, 0xe1, 0xe7, 0x3d, 0xdc, 0x1a, 0x73, 0x2e, 0xb2, 0x58, 0x91, 0x09, 0x6e, 0x8d, 0x83, 0x40, - 0x42, 0x9a, 0x52, 0x64, 0xa3, 0x7e, 0xd7, 0x7d, 0xb6, 0x58, 0x5a, 0x3b, 0x3f, 0x96, 0xd6, 0xd1, - 0x34, 0x54, 0xb3, 0xcc, 0x77, 0xb8, 0x88, 0x06, 0xb3, 0x3c, 0x01, 0x39, 0x87, 0x60, 0x0a, 0x72, - 0xe0, 0x67, 0x52, 0x8a, 0x8f, 0x83, 0x52, 0xb0, 0xec, 0xf5, 0x36, 0x22, 0x64, 0x88, 0xdb, 0x17, - 0x99, 0x3f, 0x0f, 0xf9, 0x4b, 0xc8, 0xe9, 0xae, 0x8d, 0xfa, 0x9d, 0x27, 0xff, 0x3b, 0x25, 0xb9, - 0x02, 0xdc, 0x66, 0x61, 0xe2, 0xfd, 0x66, 0x92, 0x1e, 0x36, 0x2e, 0xe1, 0x7d, 0x06, 0x31, 0x07, - 0xda, 0xb0, 0x51, 0xbf, 0xe9, 0x55, 0x35, 0xa1, 0xb8, 0xe5, 0xb2, 0x39, 0x2b, 0xa0, 0xa6, 0x86, - 0x36, 0x25, 0x79, 0x84, 0x5b, 0x2f, 0xae, 0xce, 0x4f, 0x44, 0x00, 0x74, 0x4f, 0x87, 0x3f, 0x28, - 0xc3, 0x1b, 0x6e, 0xae, 0x80, 0x8b, 0x00, 0xbc, 0x0d, 0x81, 0x9c, 0xe2, 0xce, 0x45, 0xb5, 0x96, - 0x94, 0xee, 0xeb, 0x68, 0xa6, 0x53, 0x5b, 0x55, 0xb9, 0x92, 0x1a, 0xab, 0xcc, 0x59, 0x6f, 0x24, - 0x23, 0x6c, 0xbc, 0x19, 0x5f, 0xae, 0x4d, 0x5b, 0xda, 0xd4, 0xbc, 0x6b, 0x7a, 0xbb, 0xb4, 0xf0, - 0x91, 0x88, 0x42, 0x05, 0x51, 0xa2, 0x72, 0xaf, 0xe2, 0x13, 0x07, 0xe3, 0x09, 0x53, 0xe1, 0x07, - 0x98, 0xb0, 0x08, 0x68, 0xc7, 0x46, 0xfd, 0xb6, 0xfb, 0xdf, 0x1d, 0x76, 0x8d, 0x41, 0xae, 0xb0, - 0x51, 0xf4, 0x9d, 0xb1, 0x74, 0x46, 0x0d, 0xed, 0x35, 0x2a, 0xbd, 0x8e, 0xef, 0x7f, 0x1d, 0x3f, - 0x8c, 0x99, 0xcc, 0x9d, 0x33, 0xf8, 0x54, 0x64, 0x4a, 0x6f, 0x97, 0x16, 0x3a, 0xf6, 0x2a, 0x2d, - 0x32, 0xc4, 0xdd, 0x13, 0x11, 0x2b, 0xc9, 0xb8, 0x3a, 0x07, 0xc5, 0x68, 0xdb, 0x6e, 0xe8, 0x77, - 0x2a, 0xae, 0xab, 0x0e, 0x78, 0x5b, 0x34, 0xf2, 0x0a, 0x1b, 0xa7, 0x42, 0x82, 0x0f, 0x4c, 0x52, - 0xac, 0xe3, 0x3c, 0xfe, 0xe3, 0x43, 0xa9, 0x14, 0x46, 0xcd, 0x2f, 0x5f, 0xad, 0x9d, 0xc3, 0x6b, - 0xb4, 0x9d, 0x85, 0xbc, 0xae, 0xcd, 0xbc, 0xbe, 0xc8, 0xe1, 0x5f, 0xcd, 0x5c, 0x1b, 0xf7, 0x2d, - 0xee, 0x16, 0xd2, 0x01, 0x53, 0x4c, 0xcb, 0xee, 0xfe, 0x8b, 0xec, 0x96, 0x54, 0x71, 0xb7, 0x9b, - 0x5a, 0xdf, 0x6d, 0xdb, 0xab, 0x6a, 0xf7, 0xf9, 0x62, 0x65, 0xa2, 0xef, 0x2b, 0x13, 0x5d, 0xaf, - 0x4c, 0xf4, 0x73, 0x65, 0xa2, 0x6f, 0x37, 0x26, 0x5a, 0xdc, 0x98, 0xe8, 0xdd, 0xc3, 0xfb, 0x2d, - 0x19, 0x8f, 0xfc, 0x7d, 0xfd, 0xa9, 0x3e, 0xfd, 0x15, 0x00, 0x00, 0xff, 0xff, 0x16, 0x20, 0x3b, - 0x5c, 0xf2, 0x03, 0x00, 0x00, + // 498 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xee, 0x35, 0x69, 0xe3, 0x5c, 0x22, 0x54, 0x4e, 0x0c, 0xa7, 0x0c, 0x8e, 0xe9, 0x14, 0xa1, + 0xd6, 0x46, 0x40, 0x97, 0x30, 0xc5, 0x15, 0x55, 0x25, 0x68, 0x54, 0x5c, 0xa9, 0x08, 0xb6, 0xf3, + 0xf9, 0x29, 0xb1, 0x14, 0xfb, 0xcc, 0xf9, 0x0c, 0x78, 0xe6, 0x4f, 0x30, 0xf2, 0x53, 0x18, 0x33, + 0x32, 0x56, 0x0c, 0x11, 0x4a, 0xb7, 0xfe, 0x0a, 0xe4, 0x8b, 0x63, 0x9c, 0x0e, 0x95, 0xa0, 0x5b, + 0x5e, 0xbe, 0xef, 0x7d, 0xdf, 0xf7, 0xde, 0x3d, 0xe3, 0x36, 0xe3, 0x91, 0x9d, 0x48, 0xa1, 0x04, + 0x69, 0x30, 0x1e, 0xf5, 0x1e, 0x4d, 0xc4, 0x44, 0xe8, 0xda, 0x29, 0x7e, 0xad, 0xa0, 0xde, 0x5e, + 0x02, 0x32, 0x0a, 0xd3, 0x34, 0x14, 0x71, 0xf9, 0x4f, 0x97, 0xcb, 0x3c, 0x51, 0x25, 0xbe, 0xff, + 0x75, 0x07, 0xb7, 0x46, 0x9c, 0x8b, 0x2c, 0x56, 0x64, 0x8c, 0x5b, 0xa3, 0x20, 0x90, 0x90, 0xa6, + 0x14, 0x59, 0x68, 0xd0, 0x75, 0x5f, 0xcc, 0x17, 0xfd, 0xad, 0x5f, 0x8b, 0xfe, 0xc1, 0x24, 0x54, + 0xd3, 0xcc, 0xb7, 0xb9, 0x88, 0x9c, 0x69, 0x9e, 0x80, 0x9c, 0x41, 0x30, 0x01, 0xe9, 0xf8, 0x99, + 0x94, 0xe2, 0xb3, 0x53, 0x0a, 0x96, 0xbd, 0xde, 0x5a, 0x84, 0x38, 0xb8, 0x7d, 0x9e, 0xf9, 0xb3, + 0x90, 0xbf, 0x86, 0x9c, 0x6e, 0x5b, 0x68, 0xd0, 0x79, 0xf6, 0xd0, 0x2e, 0xc9, 0x15, 0xe0, 0xfd, + 0xe5, 0x90, 0x1e, 0x36, 0x2e, 0xe0, 0x63, 0x06, 0x31, 0x07, 0xda, 0xb0, 0xd0, 0xa0, 0xe9, 0x55, + 0x35, 0xa1, 0xb8, 0xe5, 0xb2, 0x19, 0x2b, 0xa0, 0xa6, 0x86, 0xd6, 0x25, 0x79, 0x82, 0x5b, 0xaf, + 0x2e, 0xcf, 0x8e, 0x45, 0x00, 0x74, 0x47, 0xc7, 0xde, 0x2b, 0x63, 0x1b, 0x6e, 0xae, 0x80, 0x8b, + 0x00, 0xbc, 0x35, 0x81, 0x9c, 0xe0, 0xce, 0x79, 0xb5, 0x90, 0x94, 0xee, 0xea, 0x50, 0xa6, 0x5d, + 0x5b, 0x52, 0xb9, 0x8c, 0x1a, 0xcb, 0x6d, 0x16, 0x7a, 0x5e, 0xbd, 0x91, 0x0c, 0xb1, 0xf1, 0x6e, + 0x74, 0xb1, 0x32, 0x6d, 0x69, 0x53, 0xf3, 0xb6, 0xe9, 0xcd, 0xa2, 0x8f, 0x0f, 0x44, 0x14, 0x2a, + 0x88, 0x12, 0x95, 0x7b, 0x15, 0x9f, 0xd8, 0x18, 0x8f, 0x99, 0x0a, 0x3f, 0xc1, 0x98, 0x45, 0x40, + 0x3b, 0x16, 0x1a, 0xb4, 0xdd, 0x07, 0xb7, 0xd8, 0x35, 0x06, 0xb9, 0xc4, 0x46, 0xd1, 0x77, 0xca, + 0xd2, 0x29, 0x35, 0xb4, 0xd7, 0xb0, 0xf4, 0x3a, 0xbc, 0xfb, 0x5d, 0xfc, 0x30, 0x66, 0x32, 0xb7, + 0x4f, 0xe1, 0x4b, 0x91, 0x29, 0xbd, 0x59, 0xf4, 0xd1, 0xa1, 0x57, 0x69, 0x91, 0x23, 0xdc, 0x3d, + 0x16, 0xb1, 0x92, 0x8c, 0xab, 0x33, 0x50, 0x8c, 0xb6, 0xad, 0x86, 0x7e, 0xa1, 0xe2, 0xae, 0xea, + 0x80, 0xb7, 0x41, 0x23, 0x6f, 0xb0, 0x71, 0x22, 0x24, 0xf8, 0xc0, 0x24, 0xc5, 0x3a, 0xce, 0xd3, + 0x7f, 0x3e, 0x91, 0x4a, 0x61, 0xd8, 0xfc, 0xf6, 0xbd, 0xbf, 0xb5, 0x7f, 0x85, 0x36, 0xb3, 0x90, + 0xb7, 0xb5, 0x99, 0x57, 0xb7, 0x78, 0xf4, 0x5f, 0x33, 0xd7, 0xc6, 0x7d, 0x8f, 0xbb, 0x85, 0x74, + 0xc0, 0x14, 0xd3, 0xb2, 0xdb, 0xf7, 0x91, 0xdd, 0x90, 0x2a, 0xee, 0x76, 0x5d, 0xeb, 0xbb, 0x6d, + 0x7b, 0x55, 0xed, 0xbe, 0x9c, 0x2f, 0x4d, 0xf4, 0x73, 0x69, 0xa2, 0xab, 0xa5, 0x89, 0x7e, 0x2f, + 0x4d, 0xf4, 0xe3, 0xda, 0x44, 0xf3, 0x6b, 0x13, 0x7d, 0x78, 0x7c, 0xb7, 0x25, 0xe3, 0x91, 0xbf, + 0xab, 0x3f, 0xd2, 0xe7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x37, 0xf6, 0x93, 0x98, 0xec, 0x03, + 0x00, 0x00, } func (m *Account) Marshal() (dAtA []byte, err error) { @@ -336,16 +336,18 @@ func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - { - size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.PublicKey != nil { + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAcm(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintAcm(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0x12 { size := m.Address.Size() i -= size @@ -432,8 +434,10 @@ func (m *Account) Size() (n int) { _ = l l = m.Address.Size() n += 1 + l + sovAcm(uint64(l)) - l = m.PublicKey.Size() - n += 1 + l + sovAcm(uint64(l)) + if m.PublicKey != nil { + l = m.PublicKey.Size() + n += 1 + l + sovAcm(uint64(l)) + } if m.Sequence != 0 { n += 1 + sovAcm(uint64(m.Sequence)) } @@ -585,6 +589,9 @@ func (m *Account) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.PublicKey == nil { + m.PublicKey = &crypto.PublicKey{} + } if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/acm/balance/balance.go b/acm/balance/balance.go index a5c9b422e..4a5c70b28 100644 --- a/acm/balance/balance.go +++ b/acm/balance/balance.go @@ -137,7 +137,6 @@ func NativeToWei(n uint64) *big.Int { return new(big.Int).Mul(x, eth) } -func WeiToNative(n []byte) *big.Int { - x := new(big.Int).SetBytes(n) +func WeiToNative(x *big.Int) *big.Int { return new(big.Int).Div(x, eth) } diff --git a/acm/balance/balance_test.go b/acm/balance/balance_test.go index 5f8c2dcf5..d0159fdae 100644 --- a/acm/balance/balance_test.go +++ b/acm/balance/balance_test.go @@ -24,6 +24,6 @@ func TestSort(t *testing.T) { func TestEtherConversion(t *testing.T) { wei := NativeToWei(1) assert.Equal(t, wei.String(), "1000000000000000000", "must equal one ether") - native := WeiToNative(wei.Bytes()) + native := WeiToNative(wei) assert.Equal(t, native.Uint64(), uint64(1)) } diff --git a/acm/private_account.go b/acm/private_account.go index 6b94208df..d13a88423 100644 --- a/acm/private_account.go +++ b/acm/private_account.go @@ -24,8 +24,8 @@ func (pa *PrivateAccount) GetAddress() crypto.Address { return pa.concretePrivateAccount.Address } -func (pa *PrivateAccount) GetPublicKey() crypto.PublicKey { - return pa.concretePrivateAccount.PublicKey +func (pa *PrivateAccount) GetPublicKey() *crypto.PublicKey { + return &pa.concretePrivateAccount.PublicKey } func (pa *PrivateAccount) Sign(msg []byte) (*crypto.Signature, error) { @@ -78,7 +78,7 @@ func PrivateAccountFromPrivateKey(privateKey crypto.PrivateKey) *PrivateAccount return &PrivateAccount{ concretePrivateAccount: &ConcretePrivateAccount{ PrivateKey: privateKey, - PublicKey: publicKey, + PublicKey: *publicKey, Address: publicKey.GetAddress(), }, } @@ -102,7 +102,7 @@ func GeneratePrivateAccount(ct crypto.CurveType) (*PrivateAccount, error) { publicKey := privateKey.GetPublicKey() return ConcretePrivateAccount{ Address: publicKey.GetAddress(), - PublicKey: publicKey, + PublicKey: *publicKey, PrivateKey: privateKey, }.PrivateAccount(), nil } @@ -111,7 +111,7 @@ func privateAccount(privateKey crypto.PrivateKey) *PrivateAccount { publicKey := privateKey.GetPublicKey() return ConcretePrivateAccount{ Address: publicKey.GetAddress(), - PublicKey: publicKey, + PublicKey: *publicKey, PrivateKey: privateKey, }.PrivateAccount() } diff --git a/acm/validator/bucket.go b/acm/validator/bucket.go index 81ff76b7d..c632e72c2 100644 --- a/acm/validator/bucket.go +++ b/acm/validator/bucket.go @@ -47,7 +47,7 @@ func (vc *Bucket) Power(id crypto.Address) (*big.Int, error) { } // SetPower ensures that validator power would not change too quickly in a single block -func (vc *Bucket) SetPower(id crypto.PublicKey, power *big.Int) (*big.Int, error) { +func (vc *Bucket) SetPower(id *crypto.PublicKey, power *big.Int) (*big.Int, error) { const errHeader = "Bucket.SetPower():" err := checkPower(power) if err != nil { diff --git a/acm/validator/ring.go b/acm/validator/ring.go index 33740fa01..56b37f864 100644 --- a/acm/validator/ring.go +++ b/acm/validator/ring.go @@ -63,7 +63,7 @@ func (vc *Ring) GetPower(id crypto.Address) *big.Int { return vc.Head().Previous.GetPower(id) } -func (vc *Ring) SetPower(id crypto.PublicKey, power *big.Int) (*big.Int, error) { +func (vc *Ring) SetPower(id *crypto.PublicKey, power *big.Int) (*big.Int, error) { return vc.Head().SetPower(id, power) } diff --git a/acm/validator/set.go b/acm/validator/set.go index 058151999..a6790aeea 100644 --- a/acm/validator/set.go +++ b/acm/validator/set.go @@ -44,12 +44,12 @@ func NewTrimSet() *Set { } // Implements Writer, but will never error -func (vs *Set) SetPower(id crypto.PublicKey, power *big.Int) (*big.Int, error) { +func (vs *Set) SetPower(id *crypto.PublicKey, power *big.Int) (*big.Int, error) { return vs.ChangePower(id, power), nil } // Add the power of a validator and returns the flow into that validator -func (vs *Set) ChangePower(id crypto.PublicKey, power *big.Int) *big.Int { +func (vs *Set) ChangePower(id *crypto.PublicKey, power *big.Int) *big.Int { address := id.GetAddress() // Calculate flow into this validator (positive means in, negative means out) flow := vs.Flow(id, power) @@ -78,7 +78,7 @@ func (vs *Set) MaxFlow() *big.Int { } // Returns the flow that would be induced by a validator power change -func (vs *Set) Flow(id crypto.PublicKey, power *big.Int) *big.Int { +func (vs *Set) Flow(id *crypto.PublicKey, power *big.Int) *big.Int { return new(big.Int).Sub(power, vs.GetPower(id.GetAddress())) } diff --git a/acm/validator/set_test.go b/acm/validator/set_test.go index 18a44ccba..c56baa9ab 100644 --- a/acm/validator/set_test.go +++ b/acm/validator/set_test.go @@ -20,6 +20,6 @@ func TestValidators_AlterPower(t *testing.T) { assertZero(t, vs.TotalPower()) } -func pubKey(secret interface{}) crypto.PublicKey { +func pubKey(secret interface{}) *crypto.PublicKey { return acm.NewAccountFromSecret(fmt.Sprintf("%v", secret)).PublicKey } diff --git a/acm/validator/validator.go b/acm/validator/validator.go index 0a788441f..eaa09e4a7 100644 --- a/acm/validator/validator.go +++ b/acm/validator/validator.go @@ -9,7 +9,7 @@ import ( "github.com/hyperledger/burrow/acm" ) -func New(publicKey crypto.PublicKey, power *big.Int) *Validator { +func New(publicKey *crypto.PublicKey, power *big.Int) *Validator { v := &Validator{ PublicKey: publicKey, Power: power.Uint64(), diff --git a/acm/validator/validator.pb.go b/acm/validator/validator.pb.go index 1ba583224..32610e800 100644 --- a/acm/validator/validator.pb.go +++ b/acm/validator/validator.pb.go @@ -30,7 +30,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Validator struct { Address *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address,omitempty"` - PublicKey crypto.PublicKey `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey"` + PublicKey *crypto.PublicKey `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` Power uint64 `protobuf:"varint,3,opt,name=Power,proto3" json:"Power,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -65,11 +65,11 @@ func (m *Validator) XXX_DiscardUnknown() { var xxx_messageInfo_Validator proto.InternalMessageInfo -func (m *Validator) GetPublicKey() crypto.PublicKey { +func (m *Validator) GetPublicKey() *crypto.PublicKey { if m != nil { return m.PublicKey } - return crypto.PublicKey{} + return nil } func (m *Validator) GetPower() uint64 { @@ -91,22 +91,22 @@ func init() { proto.RegisterFile("validator.proto", fileDescriptor_bf1c6ec7c0d80 func init() { golang_proto.RegisterFile("validator.proto", fileDescriptor_bf1c6ec7c0d80dd5) } var fileDescriptor_bf1c6ec7c0d80dd5 = []byte{ - // 238 bytes of a gzipped FileDescriptorProto + // 231 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x4b, 0xcc, 0xc9, 0x4c, 0x49, 0x2c, 0xc9, 0x2f, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x45, 0xf5, 0x41, 0x2c, 0x88, 0x02, 0x29, 0x9e, 0xe4, 0xa2, - 0xca, 0x82, 0x12, 0x28, 0x4f, 0x69, 0x15, 0x23, 0x17, 0x67, 0x18, 0x4c, 0x87, 0x90, 0x17, 0x17, + 0xca, 0x82, 0x12, 0x28, 0x4f, 0x69, 0x09, 0x23, 0x17, 0x67, 0x18, 0x4c, 0x87, 0x90, 0x17, 0x17, 0xbb, 0x63, 0x4a, 0x4a, 0x51, 0x6a, 0x71, 0xb1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x8f, 0x93, 0xc1, 0xad, 0x7b, 0xf2, 0x3a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x19, 0x95, 0x05, 0xa9, 0x45, 0x39, 0xa9, 0x29, 0xe9, 0xa9, 0x45, 0xfa, 0x49, 0xa5, 0x45, 0x45, 0xf9, - 0xe5, 0xfa, 0x50, 0xe3, 0xa0, 0xfa, 0x82, 0x60, 0x06, 0x08, 0x99, 0x72, 0x71, 0x06, 0x94, 0x26, + 0xe5, 0xfa, 0x50, 0xe3, 0xa0, 0xfa, 0x82, 0x60, 0x06, 0x08, 0xe9, 0x73, 0x71, 0x06, 0x94, 0x26, 0xe5, 0x64, 0x26, 0x7b, 0xa7, 0x56, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x1b, 0x09, 0xea, 0x41, - 0x15, 0xc3, 0x25, 0x9c, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x42, 0xa8, 0x14, 0x12, 0xe1, 0x62, - 0x0d, 0xc8, 0x2f, 0x4f, 0x2d, 0x92, 0x60, 0x56, 0x60, 0xd4, 0x60, 0x09, 0x82, 0x70, 0xac, 0x58, - 0x66, 0x2c, 0x90, 0x67, 0x70, 0x72, 0x3d, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x1b, - 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x3c, 0xf0, 0x58, 0x8e, 0xf1, 0xc4, 0x63, 0x39, 0xc6, - 0x28, 0x6d, 0xfc, 0x6e, 0x4c, 0x4c, 0xce, 0xd5, 0x87, 0x87, 0x4b, 0x12, 0x1b, 0xd8, 0xeb, 0xc6, - 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0xd3, 0x94, 0x44, 0x3c, 0x01, 0x00, 0x00, + 0x15, 0xc3, 0x25, 0x82, 0x10, 0x6a, 0x84, 0x44, 0xb8, 0x58, 0x03, 0xf2, 0xcb, 0x53, 0x8b, 0x24, + 0x98, 0x15, 0x18, 0x35, 0x58, 0x82, 0x20, 0x1c, 0x2b, 0x96, 0x19, 0x0b, 0xe4, 0x19, 0x9c, 0x5c, + 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc6, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, + 0x18, 0x0f, 0x3c, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x31, 0x4a, 0x1b, 0xbf, 0xeb, 0x12, 0x93, + 0x73, 0xf5, 0xe1, 0x21, 0x92, 0xc4, 0x06, 0xf6, 0xb4, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xd4, + 0x46, 0xd6, 0x6e, 0x36, 0x01, 0x00, 0x00, } func (m *Validator) Marshal() (dAtA []byte, err error) { @@ -138,16 +138,18 @@ func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - { - size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.PublicKey != nil { + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintValidator(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintValidator(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0x12 if m.Address != nil { { size := m.Address.Size() @@ -184,8 +186,10 @@ func (m *Validator) Size() (n int) { l = m.Address.Size() n += 1 + l + sovValidator(uint64(l)) } - l = m.PublicKey.Size() - n += 1 + l + sovValidator(uint64(l)) + if m.PublicKey != nil { + l = m.PublicKey.Size() + n += 1 + l + sovValidator(uint64(l)) + } if m.Power != 0 { n += 1 + sovValidator(uint64(m.Power)) } @@ -294,6 +298,9 @@ func (m *Validator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.PublicKey == nil { + m.PublicKey = &crypto.PublicKey{} + } if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/acm/validator/validators.go b/acm/validator/validators.go index ff614d910..8a3c6d796 100644 --- a/acm/validator/validators.go +++ b/acm/validator/validators.go @@ -7,7 +7,7 @@ import ( ) type Writer interface { - SetPower(id crypto.PublicKey, power *big.Int) (flow *big.Int, err error) + SetPower(id *crypto.PublicKey, power *big.Int) (flow *big.Int, err error) } type Reader interface { @@ -38,7 +38,7 @@ type History interface { Validators(blocksAgo int) IterableReader } -func AddPower(vs ReaderWriter, id crypto.PublicKey, power *big.Int) error { +func AddPower(vs ReaderWriter, id *crypto.PublicKey, power *big.Int) error { // Current power + power currentPower, err := vs.Power(id.GetAddress()) if err != nil { @@ -48,7 +48,7 @@ func AddPower(vs ReaderWriter, id crypto.PublicKey, power *big.Int) error { return err } -func SubtractPower(vs ReaderWriter, id crypto.PublicKey, power *big.Int) error { +func SubtractPower(vs ReaderWriter, id *crypto.PublicKey, power *big.Int) error { currentPower, err := vs.Power(id.GetAddress()) if err != nil { return err diff --git a/consensus/tendermint/node_view.go b/consensus/tendermint/node_view.go index ba79ebdc1..81884ba27 100644 --- a/consensus/tendermint/node_view.go +++ b/consensus/tendermint/node_view.go @@ -15,7 +15,7 @@ import ( type NodeView struct { tmNode *Node - publicKey crypto.PublicKey + publicKey *crypto.PublicKey txDecoder txs.Decoder runID simpleuuid.UUID } @@ -38,9 +38,9 @@ func NewNodeView(tmNode *Node, txDecoder txs.Decoder, runID simpleuuid.UUID) (*N }, nil } -func (nv *NodeView) ValidatorPublicKey() crypto.PublicKey { +func (nv *NodeView) ValidatorPublicKey() *crypto.PublicKey { if nv == nil { - return crypto.PublicKey{} + return nil } return nv.publicKey } diff --git a/crypto/address.go b/crypto/address.go index a5837cf8d..db235256e 100644 --- a/crypto/address.go +++ b/crypto/address.go @@ -16,10 +16,10 @@ type Addressable interface { // Get the 20 byte EVM address of this account GetAddress() Address // Public key from which the Address is derived - GetPublicKey() PublicKey + GetPublicKey() *PublicKey } -func NewAddressable(publicKey PublicKey) Addressable { +func NewAddressable(publicKey *PublicKey) Addressable { return &memoizedAddressable{ address: publicKey.GetAddress(), publicKey: publicKey, @@ -27,11 +27,11 @@ func NewAddressable(publicKey PublicKey) Addressable { } type memoizedAddressable struct { - publicKey PublicKey + publicKey *PublicKey address Address } -func (a *memoizedAddressable) GetPublicKey() PublicKey { +func (a *memoizedAddressable) GetPublicKey() *PublicKey { return a.publicKey } diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index 45e7c897d..e4400cb2c 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -2,6 +2,8 @@ package crypto import ( "bytes" + "crypto/rand" + "fmt" "testing" "github.com/stretchr/testify/assert" @@ -26,3 +28,37 @@ func TestGeneratePrivateKey(t *testing.T) { goodKey[31] = 2 assert.Error(t, EnsureEd25519PrivateKeyCorrect(badKey)) } + +func TestSigning(t *testing.T) { + for _, ct := range []CurveType{CurveTypeSecp256k1, CurveTypeEd25519} { + t.Run(fmt.Sprintf("%v signing", ct), func(t *testing.T) { + pk, err := GeneratePrivateKey(rand.Reader, ct) + require.NoError(t, err) + msg := []byte(("Flipity flobity floo")) + sig, err := pk.Sign(msg) + require.NoError(t, err) + err = pk.GetPublicKey().Verify(msg, sig) + require.NoError(t, err) + }) + + } + + t.Run("EthSignature", func(t *testing.T) { + pk := PrivateKeyFromSecret("seee", CurveTypeSecp256k1) + msg := []byte(("Flipity flobity floo")) + sig, err := pk.Sign(msg) + require.NoError(t, err) + ethSig, err := sig.GetEthSignature("floob") + require.NoError(t, err) + parity := ethSig.RecoveryIndex() + require.True(t, parity == 0 || parity == 1) + + // Now verify signature comes out intact after serialisation + compactSig, err := ethSig.ToCompactSignature() + require.NoError(t, err) + sigOut, err := SignatureFromBytes(compactSig, CurveTypeSecp256k1) + require.NoError(t, err) + err = pk.GetPublicKey().Verify(msg, sigOut) + require.NoError(t, err) + }) +} diff --git a/crypto/doc.go b/crypto/doc.go new file mode 100644 index 000000000..e1e194257 --- /dev/null +++ b/crypto/doc.go @@ -0,0 +1,10 @@ +package crypto + +/* + Burrow supports ed25519 and secp256k1 signing. The *Signature type stores the signature scheme under CurveType + and the raw bytes of each signature type are stored in Signature.Signature. + + For secp256k1 we use the btcec compact representation including magic parity byte prefix: byte(27) or byte(28) to + represent the 0 or 1 parity for the y-coordinate of the public key. + +*/ diff --git a/crypto/private_key.go b/crypto/private_key.go index f46f55271..994e08799 100644 --- a/crypto/private_key.go +++ b/crypto/private_key.go @@ -14,28 +14,28 @@ import ( // Currently this is a stub that reads the raw bytes returned by key_client and returns // an ed25519 public key. -func PublicKeyFromBytes(bs []byte, curveType CurveType) (PublicKey, error) { +func PublicKeyFromBytes(bs []byte, curveType CurveType) (*PublicKey, error) { switch curveType { case CurveTypeEd25519: if len(bs) != ed25519.PublicKeySize { - return PublicKey{}, fmt.Errorf("bytes passed have length %v but ed25519 public keys have %v bytes", + return nil, fmt.Errorf("bytes passed have length %v but ed25519 public keys have %v bytes", len(bs), ed25519.PublicKeySize) } case CurveTypeSecp256k1: - if len(bs) != btcec.PubKeyBytesLenCompressed { - return PublicKey{}, fmt.Errorf("bytes passed have length %v but secp256k1 public keys have %v bytes", - len(bs), btcec.PubKeyBytesLenCompressed) + if len(bs) != btcec.PubKeyBytesLenUncompressed { + return nil, fmt.Errorf("bytes passed have length %v but secp256k1 public keys have %v bytes", + len(bs), btcec.PubKeyBytesLenUncompressed) } case CurveTypeUnset: if len(bs) > 0 { - return PublicKey{}, fmt.Errorf("attempting to create an 'unset' PublicKey but passed non-empty key bytes: %X", bs) + return nil, fmt.Errorf("attempting to create an 'unset' PublicKey but passed non-empty key bytes: %X", bs) } - return PublicKey{}, nil + return nil, nil default: - return PublicKey{}, ErrInvalidCurve(curveType) + return nil, ErrInvalidCurve(curveType) } - return PublicKey{PublicKey: bs, CurveType: curveType}, nil + return &PublicKey{PublicKey: bs, CurveType: curveType}, nil } func (p PrivateKey) RawBytes() []byte { @@ -45,57 +45,28 @@ func (p PrivateKey) RawBytes() []byte { func (p PrivateKey) Sign(msg []byte) (*Signature, error) { switch p.CurveType { case CurveTypeEd25519: - if len(p.PrivateKey) != ed25519.PrivateKeySize { - return nil, fmt.Errorf("bytes passed have length %v but ed25519 private keys have %v bytes", - len(p.PrivateKey), ed25519.PrivateKeySize) - } privKey := ed25519.PrivateKey(p.PrivateKey) return &Signature{CurveType: CurveTypeEd25519, Signature: ed25519.Sign(privKey, msg)}, nil case CurveTypeSecp256k1: - if len(p.PrivateKey) != btcec.PrivKeyBytesLen { - return nil, fmt.Errorf("bytes passed have length %v but secp256k1 private keys have %v bytes", - len(p.PrivateKey), btcec.PrivKeyBytesLen) - } privKey, _ := btcec.PrivKeyFromBytes(btcec.S256(), p.PrivateKey) - sig, err := privKey.Sign(Keccak256(msg)) + sig, err := btcec.SignCompact(btcec.S256(), privKey, Keccak256(msg), false) if err != nil { return nil, err } - return &Signature{CurveType: CurveTypeSecp256k1, Signature: sig.Serialize()}, nil + return &Signature{CurveType: CurveTypeSecp256k1, Signature: sig}, nil default: return nil, ErrInvalidCurve(p.CurveType) } } -func (p PrivateKey) GetPublicKey() PublicKey { - return PublicKey{CurveType: p.CurveType, PublicKey: p.PublicKey} +func (p PrivateKey) GetPublicKey() *PublicKey { + return &PublicKey{CurveType: p.CurveType, PublicKey: p.PublicKey} } func (p PrivateKey) String() string { return fmt.Sprintf("PrivateKey", p.PublicKey) } -func PrivateKeyFromRawBytes(privateKeyBytes []byte, curveType CurveType) (PrivateKey, error) { - const ed25519PublicKeyOffset = ed25519.PrivateKeySize - ed25519.PublicKeySize - switch curveType { - case CurveTypeEd25519: - if len(privateKeyBytes) != ed25519.PrivateKeySize { - return PrivateKey{}, fmt.Errorf("bytes passed have length %v but ed25519 private keys have %v bytes", - len(privateKeyBytes), ed25519.PrivateKeySize) - } - return PrivateKey{PrivateKey: privateKeyBytes, PublicKey: privateKeyBytes[ed25519PublicKeyOffset:], CurveType: CurveTypeEd25519}, nil - case CurveTypeSecp256k1: - if len(privateKeyBytes) != btcec.PrivKeyBytesLen { - return PrivateKey{}, fmt.Errorf("bytes passed have length %v but secp256k1 private keys have %v bytes", - len(privateKeyBytes), btcec.PrivKeyBytesLen) - } - _, publicKey := btcec.PrivKeyFromBytes(btcec.S256(), privateKeyBytes) - return PrivateKey{PrivateKey: privateKeyBytes, PublicKey: publicKey.SerializeCompressed(), CurveType: CurveTypeSecp256k1}, nil - default: - return PrivateKey{}, ErrInvalidCurve(curveType) - } -} - func GeneratePrivateKey(random io.Reader, curveType CurveType) (PrivateKey, error) { if random == nil { random = cryptoRand.Reader @@ -112,7 +83,28 @@ func GeneratePrivateKey(random io.Reader, curveType CurveType) (PrivateKey, erro if err != nil { return PrivateKey{}, err } - return PrivateKeyFromRawBytes(privateKey.D.Bytes(), CurveTypeSecp256k1) + return PrivateKeyFromRawBytes(((*btcec.PrivateKey)(privateKey)).Serialize(), CurveTypeSecp256k1) + default: + return PrivateKey{}, ErrInvalidCurve(curveType) + } +} + +func PrivateKeyFromRawBytes(privateKeyBytes []byte, curveType CurveType) (PrivateKey, error) { + const ed25519PublicKeyOffset = ed25519.PrivateKeySize - ed25519.PublicKeySize + switch curveType { + case CurveTypeEd25519: + if len(privateKeyBytes) != ed25519.PrivateKeySize { + return PrivateKey{}, fmt.Errorf("bytes passed have length %v but ed25519 private keys have %v bytes", + len(privateKeyBytes), ed25519.PrivateKeySize) + } + return PrivateKey{PrivateKey: privateKeyBytes, PublicKey: privateKeyBytes[ed25519PublicKeyOffset:], CurveType: CurveTypeEd25519}, nil + case CurveTypeSecp256k1: + if len(privateKeyBytes) != btcec.PrivKeyBytesLen { + return PrivateKey{}, fmt.Errorf("bytes passed have length %v but secp256k1 private keys have %v bytes", + len(privateKeyBytes), btcec.PrivKeyBytesLen) + } + _, publicKey := btcec.PrivKeyFromBytes(btcec.S256(), privateKeyBytes) + return PrivateKey{PrivateKey: privateKeyBytes, PublicKey: publicKey.SerializeUncompressed(), CurveType: CurveTypeSecp256k1}, nil default: return PrivateKey{}, ErrInvalidCurve(curveType) } @@ -122,7 +114,15 @@ func PrivateKeyFromSecret(secret string, curveType CurveType) PrivateKey { hasher := sha256.New() hasher.Write(([]byte)(secret)) // No error from a buffer - privateKey, _ := GeneratePrivateKey(bytes.NewBuffer(hasher.Sum(nil)), curveType) + sum := hasher.Sum(nil) + const exp = 4 + for i := 0; i < exp; i++ { + sum = append(sum, sum...) + } + privateKey, err := GeneratePrivateKey(bytes.NewBuffer(sum), curveType) + if err != nil { + panic(fmt.Errorf("PrivateKeyFromScret: unexpected error: %w", err)) + } return privateKey } diff --git a/crypto/public_key.go b/crypto/public_key.go index 1366e498f..a2701ede6 100644 --- a/crypto/public_key.go +++ b/crypto/public_key.go @@ -10,11 +10,6 @@ import ( "golang.org/x/crypto/ed25519" ) -const ( - MaxPublicKeyLength = btcec.PubKeyBytesLenCompressed - PublicKeyFixedWidthEncodingLength = MaxPublicKeyLength + 1 -) - type PublicKeyJSON struct { CurveType string PublicKey string @@ -26,18 +21,18 @@ func PublicKeyLength(curveType CurveType) int { case CurveTypeEd25519: return ed25519.PublicKeySize case CurveTypeSecp256k1: - return btcec.PubKeyBytesLenCompressed + return btcec.PubKeyBytesLenUncompressed default: // Other functions rely on this return 0 } } -func (p PublicKey) IsSet() bool { - return p.CurveType != CurveTypeUnset && p.IsValid() +func (p *PublicKey) IsSet() bool { + return p != nil && p.CurveType != CurveTypeUnset && p.IsValid() } -func (p PublicKey) MarshalJSON() ([]byte, error) { +func (p *PublicKey) MarshalJSON() ([]byte, error) { jStruct := PublicKeyJSON{ CurveType: p.CurveType.String(), PublicKey: hex.EncodeUpperToString(p.PublicKey), @@ -46,7 +41,7 @@ func (p PublicKey) MarshalJSON() ([]byte, error) { return txt, err } -func (p PublicKey) MarshalText() ([]byte, error) { +func (p *PublicKey) MarshalText() ([]byte, error) { return p.MarshalJSON() } @@ -73,12 +68,12 @@ func (p *PublicKey) UnmarshalText(text []byte) error { return p.UnmarshalJSON(text) } -func (p PublicKey) IsValid() bool { +func (p *PublicKey) IsValid() bool { publicKeyLength := PublicKeyLength(p.CurveType) return publicKeyLength != 0 && publicKeyLength == len(p.PublicKey) } -func (p PublicKey) Verify(msg []byte, signature *Signature) error { +func (p *PublicKey) Verify(msg []byte, signature *Signature) error { switch p.CurveType { case CurveTypeUnset: return fmt.Errorf("public key is unset") @@ -89,25 +84,17 @@ func (p PublicKey) Verify(msg []byte, signature *Signature) error { return fmt.Errorf("signature '%X' is not a valid ed25519 signature for message: %s", signature.Signature, string(msg)) case CurveTypeSecp256k1: - pub, err := btcec.ParsePubKey(p.PublicKey, btcec.S256()) - if err != nil { - return fmt.Errorf("could not parse secp256k1 public key: %v", err) - } - sig, err := btcec.ParseSignature(signature.Signature, btcec.S256()) + _, _, err := btcec.RecoverCompact(btcec.S256(), signature.Signature, Keccak256(msg)) if err != nil { - return fmt.Errorf("could not parse DER signature for secp256k1 key: %v", err) - } - if sig.Verify(Keccak256(msg), pub) { - return nil + return fmt.Errorf("signature verification for secp256k1 key failed: %v", err) } - return fmt.Errorf("signature '%X' is not a valid secp256k1 signature for message: %s", - signature.Signature, string(msg)) + return nil default: return fmt.Errorf("invalid curve type") } } -func (p PublicKey) GetAddress() Address { +func (p *PublicKey) GetAddress() Address { switch p.CurveType { case CurveTypeEd25519: addr, _ := AddressFromBytes(tmhash.Sum(p.PublicKey)) @@ -125,7 +112,7 @@ func (p PublicKey) GetAddress() Address { } } -func (p PublicKey) AddressHashType() string { +func (p *PublicKey) AddressHashType() string { switch p.CurveType { case CurveTypeEd25519: return "go-crypto-0.5.0" @@ -136,25 +123,6 @@ func (p PublicKey) AddressHashType() string { } } -func (p PublicKey) String() string { +func (p *PublicKey) String() string { return hex.EncodeUpperToString(p.PublicKey) } - -// Produces a binary encoding of the CurveType byte plus -// the public key for padded to a fixed width on the right -func (p PublicKey) EncodeFixedWidth() []byte { - encoded := make([]byte, PublicKeyFixedWidthEncodingLength) - encoded[0] = p.CurveType.Byte() - copy(encoded[1:], p.PublicKey) - return encoded -} - -func DecodePublicKeyFixedWidth(bs []byte) (PublicKey, error) { - const errHeader = "DecodePublicKeyFixedWidth():" - if len(bs) != PublicKeyFixedWidthEncodingLength { - return PublicKey{}, fmt.Errorf("%s expected exactly %d bytes but got %d bytes", - errHeader, PublicKeyFixedWidthEncodingLength, len(bs)) - } - curveType := CurveType(bs[0]) - return PublicKeyFromBytes(bs[1:PublicKeyLength(curveType)+1], curveType) -} diff --git a/crypto/public_key_test.go b/crypto/public_key_test.go index ec87109b7..e3839082e 100644 --- a/crypto/public_key_test.go +++ b/crypto/public_key_test.go @@ -19,10 +19,10 @@ func TestPublicKeySerialisation(t *testing.T) { 0xfe, 0x6c, 0xb1, 0x9f, 0x6, 0x42, 0xe8, 0xa5, 0x98, 0x98, } assert.Equal(t, expectedAddress, pub.GetAddress()) - bs, err := proto.Marshal(&pub) + bs, err := proto.Marshal(pub) require.NoError(t, err) - var pubOut PublicKey - err = proto.Unmarshal(bs, &pubOut) + pubOut := new(PublicKey) + err = proto.Unmarshal(bs, pubOut) require.NoError(t, err) assert.Equal(t, pub, pubOut) @@ -32,31 +32,6 @@ func TestPublicKeySerialisation(t *testing.T) { string(bs)) } -func TestPublicKey_EncodeFixedWidth(t *testing.T) { - privEd25519 := PrivateKeyFromSecret("foo1", CurveTypeEd25519) - assertFixedWidthEncodeRoundTrip(t, privEd25519.GetPublicKey()) - - privSecp256k1 := PrivateKeyFromSecret("foo2", CurveTypeSecp256k1) - assertFixedWidthEncodeRoundTrip(t, privSecp256k1.GetPublicKey()) - - privUnset := PrivateKeyFromSecret("foo3", CurveTypeUnset) - assertFixedWidthEncodeRoundTrip(t, privUnset.GetPublicKey()) - - // Unknown CurveType - privUnset.CurveType = CurveType(5) - bs := privUnset.GetPublicKey().EncodeFixedWidth() - _, err := DecodePublicKeyFixedWidth(bs) - assert.Error(t, err, "should not decode unset") -} - -func assertFixedWidthEncodeRoundTrip(t *testing.T, p PublicKey) { - bs := p.EncodeFixedWidth() - assert.Len(t, bs, PublicKeyFixedWidthEncodingLength) - pOut, err := DecodePublicKeyFixedWidth(bs) - require.NoError(t, err) - assert.Equal(t, p, pOut) -} - func TestGetAddress(t *testing.T) { privBytes := hex.MustDecodeString(`35622dddb842c9191ca8c2ca2a2b35a6aac90362d095b32f29d8e8abd63d55a5`) privKey, err := PrivateKeyFromRawBytes(privBytes, CurveTypeSecp256k1) @@ -64,7 +39,7 @@ func TestGetAddress(t *testing.T) { require.Equal(t, "F97798DF751DEB4B6E39D4CF998EE7CD4DCB9ACC", privKey.GetPublicKey().GetAddress().String()) _, pub := btcec.PrivKeyFromBytes(btcec.S256(), privBytes) - pubKey, err := PublicKeyFromBytes(pub.SerializeCompressed(), CurveTypeSecp256k1) + pubKey, err := PublicKeyFromBytes(pub.SerializeUncompressed(), CurveTypeSecp256k1) require.NoError(t, err) require.Equal(t, "F97798DF751DEB4B6E39D4CF998EE7CD4DCB9ACC", pubKey.GetAddress().String()) diff --git a/crypto/signature.go b/crypto/signature.go index ca2aa27e1..27443c33a 100644 --- a/crypto/signature.go +++ b/crypto/signature.go @@ -2,12 +2,99 @@ package crypto import ( "fmt" + "math/big" "github.com/btcsuite/btcd/btcec" hex "github.com/tmthrgd/go-hex" "golang.org/x/crypto/ed25519" ) +// Some big constnats +var big256 = big.NewInt(256) +var big2 = big.NewInt(2) + +// https://github.com/ethereum/EIPs/blob/b3bbee93dc8a775af6a6b2525c9ac5f70a7e5710/EIPS/eip-155.md +var ethereumRecoveryIDOffset = big.NewInt(35) + +// https://github.com/btcsuite/btcd/blob/7bbd9b0284de8492ae738ad8d722772925fa5a86/btcec/signature.go#L349 +var btcecRecoveryIDOffset = big.NewInt(27) + +type Secp256k1Signature struct { + // Magic parity byte (value varies by implementation to carry additional information) + V big.Int `json:"v"` + R big.Int `json:"r"` + S big.Int `json:"s"` +} + +// Returns either 0 or 1 for the underlying parity of the public key solution +func (s *Secp256k1Signature) RecoveryIndex() uint { + // odd V => parity = 0 + // even V => parity = 1 + return s.V.Bit(0) ^ 0x01 +} + +func (s *Secp256k1Signature) BigRecoveryIndex() *big.Int { + return new(big.Int).SetInt64(int64(s.RecoveryIndex())) +} + +type EIP155Signature struct { + Secp256k1Signature +} + +// Get btcec compact signature (our standard) +func (s *EIP155Signature) ToCompactSignature() ([]byte, error) { + v := new(big.Int) + v.Add(s.BigRecoveryIndex(), btcecRecoveryIDOffset) + compactSig := &CompactSecp256k1Signature{ + Secp256k1Signature{ + V: *v, + R: s.R, + S: s.S, + }, + } + bs, err := compactSig.Marshal() + if err != nil { + return nil, err + } + return bs, nil +} + +/** + btcec layout is: + input: [ v | r | s ] + bytes: [ 1 | 32 | 32 ] + Where: + v = 27 + recovery id (which of 4 possible x coords do we take as public key) (single byte but padded) + r = encrypted random point + s = signature proof + + Signature layout required by btcec: + sig: [ r | s | v ] + bytes: [ 32 | 32 | 1 ] +*/ +type CompactSecp256k1Signature struct { + Secp256k1Signature +} + +func (s *CompactSecp256k1Signature) Marshal() ([]byte, error) { + bs := make([]byte, btcec.PubKeyBytesLenUncompressed) + bs[0] = byte(new(big.Int).Mod(&s.V, big256).Uint64()) + copy(bs[1:33], s.R.Bytes()) + copy(bs[33:], s.S.Bytes()) + return bs, nil +} + +func (s *CompactSecp256k1Signature) Unmarshal(bs []byte) error { + if len(bs) != btcec.PubKeyBytesLenUncompressed { + return fmt.Errorf("must get uncompressed compact layout signature of %v bytes but got %v bytes", + btcec.PubKeyBytesLenUncompressed, len(bs)) + } + s.V.SetBytes(bs[0:1]) + s.R.SetBytes(bs[1:33]) + s.S.SetBytes(bs[33:]) + return nil +} + func SignatureFromBytes(bs []byte, curveType CurveType) (*Signature, error) { switch curveType { case CurveTypeEd25519: @@ -30,38 +117,34 @@ func (sig *Signature) String() string { return hex.EncodeUpperToString(sig.Signature) } -func CompressedSignatureFromParams(v uint64, r, s []byte) []byte { - bitlen := (btcec.S256().BitSize + 7) / 8 - sig := make([]byte, 1+bitlen*2) - sig[0] = byte(v) - copy(sig[1:bitlen+1], r) - copy(sig[bitlen+1:], s) - return sig +func GetEthChainID(chainID string) *big.Int { + return new(big.Int).SetBytes([]byte(chainID)) } -func UncompressedSignatureFromParams(r, s []byte) []byte { - // <0x30> - // <0x02> - // <0x2> - - rr := append([]byte{0x02, byte(len(r))}, r...) - ss := append([]byte{0x2, byte(len(s))}, s...) - rrss := append(rr, ss...) - - return append([]byte{0x30, byte(len(rrss))}, rrss...) +func GetEthSignatureRecoveryID(chainID string, parity *big.Int) *big.Int { + // https://github.com/ethereum/EIPs/blob/b3bbee93dc8a775af6a6b2525c9ac5f70a7e5710/EIPS/eip-155.md + v := new(big.Int) + v.Mul(GetEthChainID(chainID), big2) + v.Add(v, parity) + v.Add(v, ethereumRecoveryIDOffset) + return v } -// PublicKeyFromSignature verifies an ethereum compact signature and returns the public key if valid -func PublicKeyFromSignature(sig, hash []byte) (*PublicKey, error) { - pub, _, err := btcec.RecoverCompact(btcec.S256(), sig, hash) - if err != nil { - return nil, err +func (sig *Signature) GetEthSignature(chainID string) (*EIP155Signature, error) { + if sig.CurveType != CurveTypeSecp256k1 { + return nil, fmt.Errorf("can only GetEthSignature for %v keys, but got %v", + CurveTypeSecp256k1, sig.CurveType) } - - publicKey, err := PublicKeyFromBytes(pub.SerializeCompressed(), CurveTypeSecp256k1) + compactSig := new(CompactSecp256k1Signature) + err := compactSig.Unmarshal(sig.Signature) if err != nil { - return nil, err + return nil, fmt.Errorf("could not unmarshal compact secp256k1 signature: %w", err) } - - return &publicKey, nil + return &EIP155Signature{ + Secp256k1Signature{ + V: *GetEthSignatureRecoveryID(chainID, compactSig.BigRecoveryIndex()), + R: compactSig.R, + S: compactSig.S, + }, + }, nil } diff --git a/crypto/tendermint.go b/crypto/tendermint.go index fc40829a2..8585dce2e 100644 --- a/crypto/tendermint.go +++ b/crypto/tendermint.go @@ -9,16 +9,15 @@ import ( tmSecp256k1 "github.com/tendermint/tendermint/crypto/secp256k1" ) -func PublicKeyFromTendermintPubKey(pubKey tmCrypto.PubKey) (PublicKey, error) { +func PublicKeyFromTendermintPubKey(pubKey tmCrypto.PubKey) (*PublicKey, error) { switch pk := pubKey.(type) { case tmEd25519.PubKey: return PublicKeyFromBytes(pk[:], CurveTypeEd25519) case tmSecp256k1.PubKey: return PublicKeyFromBytes(pk[:], CurveTypeSecp256k1) default: - return PublicKey{}, fmt.Errorf("unrecognised tendermint public key type: %v", pk) + return nil, fmt.Errorf("unrecognised tendermint public key type: %v", pk) } - } // PublicKey extensions diff --git a/deploy/def/client.go b/deploy/def/client.go index bb68718b9..6a3ac1106 100644 --- a/deploy/def/client.go +++ b/deploy/def/client.go @@ -9,6 +9,7 @@ import ( "time" "github.com/hyperledger/burrow/encoding" + "github.com/tendermint/tendermint/p2p" "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" @@ -28,7 +29,6 @@ import ( "github.com/hyperledger/burrow/rpc/rpctransact" "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" - "github.com/tendermint/tendermint/p2p" hex "github.com/tmthrgd/go-hex" ) @@ -260,25 +260,25 @@ func (c *Client) SignTx(tx payload.Payload, logger *logging.Logger) (*txs.Envelo } // Creates a keypair using attached keys service -func (c *Client) CreateKey(keyName, curveTypeString string, logger *logging.Logger) (crypto.PublicKey, error) { +func (c *Client) CreateKey(keyName, curveTypeString string, logger *logging.Logger) (*crypto.PublicKey, error) { err := c.dial(logger) if err != nil { - return crypto.PublicKey{}, err + return nil, err } if c.keyClient == nil { - return crypto.PublicKey{}, fmt.Errorf("could not create key pair since no keys service is attached, " + + return nil, fmt.Errorf("could not create key pair since no keys service is attached, " + "pass --keys flag") } curveType := crypto.CurveTypeEd25519 if curveTypeString != "" { curveType, err = crypto.CurveTypeFromString(curveTypeString) if err != nil { - return crypto.PublicKey{}, err + return nil, err } } address, err := c.keyClient.Generate(keyName, curveType) if err != nil { - return crypto.PublicKey{}, err + return nil, err } return c.keyClient.PublicKey(address) } @@ -374,7 +374,7 @@ func (c *Client) UpdateAccount(arg *GovArg, logger *logging.Logger) (*payload.Go if err != nil { return nil, fmt.Errorf("could not parse publicKey: %v", err) } - update.PublicKey = &pubKey + update.PublicKey = pubKey } else { // Attempt to get public key from connected key client if arg.Address != "" { @@ -425,13 +425,13 @@ func (c *Client) PublicKeyFromAddress(address *crypto.Address) (*crypto.PublicKe if err != nil { return nil, fmt.Errorf("could not retrieve public key from keys server: %v", err) } - return &pubKey, nil + return pubKey, nil } -func PublicKeyFromString(publicKey string) (crypto.PublicKey, error) { +func PublicKeyFromString(publicKey string) (*crypto.PublicKey, error) { bs, err := hex.DecodeString(publicKey) if err != nil { - return crypto.PublicKey{}, fmt.Errorf("could not parse public key string %s as hex: %v", publicKey, err) + return nil, fmt.Errorf("could not parse public key string %s as hex: %v", publicKey, err) } switch len(bs) { case crypto.PublicKeyLength(crypto.CurveTypeEd25519): @@ -439,8 +439,8 @@ func PublicKeyFromString(publicKey string) (crypto.PublicKey, error) { case crypto.PublicKeyLength(crypto.CurveTypeSecp256k1): return crypto.PublicKeyFromBytes(bs, crypto.CurveTypeSecp256k1) default: - return crypto.PublicKey{}, fmt.Errorf("public key string %s has byte length %d which is not the size of either "+ - "ed25519 or compressed secp256k1 keys so cannot construct public key", publicKey, len(bs)) + return nil, fmt.Errorf("public key string %s has byte length %d which is not the size of either "+ + "ed25519 or uncompressed secp256k1 keys so cannot construct public key", publicKey, len(bs)) } } diff --git a/dump/mock.go b/dump/mock.go index 06547bbc5..90d0e3198 100644 --- a/dump/mock.go +++ b/dump/mock.go @@ -53,8 +53,6 @@ func (m *MockSource) Recv() (*Dump, error) { if m.Accounts%2 > 0 { row.Account.EVMCode = make([]byte, m.rand.Intn(10000)) m.rand.Read(row.Account.EVMCode) - } else { - row.Account.PublicKey = crypto.PublicKey{} } m.Accounts-- if m.MaxStorage > 0 { diff --git a/encoding/rlp/rlp.go b/encoding/rlp/rlp.go index 916c0c4b3..2967bcca7 100644 --- a/encoding/rlp/rlp.go +++ b/encoding/rlp/rlp.go @@ -1,18 +1,26 @@ // // See https://eth.wiki/fundamentals/rlp +// package rlp import ( "bytes" "encoding/binary" "fmt" + "math/big" "math/bits" "reflect" + + binary2 "github.com/hyperledger/burrow/binary" ) +type magicOffset uint8 + const ( - EmptyString = 0x80 - EmptySlice = 0xC0 + ShortLength = 55 + StringOffset magicOffset = 0x80 // 128 - if string length is less than or equal to 55 [inclusive] + SliceOffset magicOffset = 0xC0 // 192 - if slice length is less than or equal to 55 [inclusive] + SmallByte = 0x7f // 247 - value less than or equal is itself [inclusive ) type Code uint32 @@ -23,6 +31,8 @@ const ( ErrInvalid ) +var bigIntType = reflect.TypeOf(&big.Int{}) + func (c Code) Error() string { switch c { case ErrNoInput: @@ -34,15 +44,78 @@ func (c Code) Error() string { } } +func Encode(input interface{}) ([]byte, error) { + val := reflect.ValueOf(input) + if val.Kind() == reflect.Ptr { + val = val.Elem() + } + return encode(val) +} + +func Decode(src []byte, dst interface{}) error { + fields, err := decode(src) + if err != nil { + return err + } + + val := reflect.ValueOf(dst) + typ := reflect.TypeOf(dst) + + if val.Kind() == reflect.Ptr { + val = val.Elem() + } + + switch val.Kind() { + case reflect.Slice: + switch typ.Elem().Kind() { + case reflect.Uint8: + out, ok := dst.([]byte) + if !ok { + return fmt.Errorf("cannot decode into type %s", val.Type()) + } + found := bytes.Join(fields, []byte("")) + if len(out) < len(found) { + return fmt.Errorf("cannot decode %d bytes into slice of size %d", len(found), len(out)) + } + for i, b := range found { + out[i] = b + } + default: + for i := 0; i < val.Len(); i++ { + elem := val.Index(i) + err = decodeField(elem, fields[i]) + if err != nil { + return err + } + } + } + case reflect.Struct: + if val.NumField() != len(fields) { + return fmt.Errorf("wrong number of fields; have %d, want %d", len(fields), val.NumField()) + } + for i := 0; i < val.NumField(); i++ { + err := decodeField(val.Field(i), fields[i]) + if err != nil { + return err + } + } + default: + return fmt.Errorf("cannot decode into unsupported type %v", reflect.TypeOf(dst)) + } + return nil +} + func encodeUint8(input uint8) ([]byte, error) { if input == 0 { - return []byte{EmptyString}, nil - } else if input >= 0x00 && input <= 0x7f { + // yes this makes no sense, but it does seem to be what everyone else does, apparently 'no leading zeroes'. + // It means we cannot store []byte{0} because that is indistinguishable from byte{} + return []byte{uint8(StringOffset)}, nil + } else if input <= SmallByte { return []byte{input}, nil - } else if input >= 0x80 && input <= 0xff { + } else if input >= uint8(StringOffset) { return []byte{0x81, input}, nil } - return []byte{EmptyString}, nil + return []byte{uint8(StringOffset)}, nil } func encodeUint64(i uint64) ([]byte, error) { @@ -55,41 +128,51 @@ func encodeUint64(i uint64) ([]byte, error) { return encodeString(b[8-size:]) } -func encodeLength(n, offset int) []byte { +func encodeBigInt(b *big.Int) ([]byte, error) { + if b.Sign() == -1 { + return nil, fmt.Errorf("cannot RLP encode negative number") + } + if b.IsUint64() { + return encodeUint64(b.Uint64()) + } + bs := b.Bytes() + length := encodeLength(len(bs), StringOffset) + return append(length, bs...), nil +} + +func encodeLength(n int, offset magicOffset) []byte { // > if a string is 0-55 bytes long, the RLP encoding consists of a single byte with value 0x80 plus // > the length of the string followed by the string. - if n <= 55 { - return []uint8{uint8(n + offset)} + if n <= ShortLength { + return []uint8{uint8(offset) + uint8(n)} } i := uint64(n) b := make([]byte, 8) binary.BigEndian.PutUint64(b, i) - size := bits.Len64(i)/8 + 1 + byteLengthOfLength := bits.Len64(i)/8 + 1 // > If a string is more than 55 bytes long, the RLP encoding consists of a single byte with value 0xb7 // > plus the length in bytes of the length of the string in binary form, followed by the length of the string, // > followed by the string - return append([]byte{uint8(0xb7 + size)}, b[8-size:]...) + return append([]byte{uint8(offset) + ShortLength + uint8(byteLengthOfLength)}, b[8-byteLengthOfLength:]...) } func encodeString(input []byte) ([]byte, error) { - if len(input) == 0 { - return []byte{EmptyString}, nil - } else if len(input) == 1 { + if len(input) == 1 && input[0] <= SmallByte { return encodeUint8(input[0]) } else { - return append(encodeLength(len(input), EmptyString), []byte(input)...), nil + return append(encodeLength(len(input), StringOffset), input...), nil } } func encodeList(val reflect.Value) ([]byte, error) { if val.Len() == 0 { - return []byte{EmptySlice}, nil + return []byte{uint8(SliceOffset)}, nil } out := make([][]byte, 0) for i := 0; i < val.Len(); i++ { - data, err := encode(val.Index(i).Interface()) + data, err := encode(val.Index(i)) if err != nil { return nil, err } @@ -97,28 +180,35 @@ func encodeList(val reflect.Value) ([]byte, error) { } sum := bytes.Join(out, []byte{}) - return append(encodeLength(len(sum), EmptySlice), sum...), nil + return append(encodeLength(len(sum), SliceOffset), sum...), nil } func encodeStruct(val reflect.Value) ([]byte, error) { out := make([][]byte, 0) for i := 0; i < val.NumField(); i++ { - data, err := encode(val.Field(i).Interface()) + data, err := encode(val.Field(i)) if err != nil { return nil, err } out = append(out, data) } sum := bytes.Join(out, []byte{}) - return append(encodeLength(len(sum), EmptySlice), sum...), nil + length := encodeLength(len(sum), SliceOffset) + return append(length, sum...), nil } -func encode(input interface{}) ([]byte, error) { - val := reflect.ValueOf(input) - typ := reflect.TypeOf(input) +func encode(val reflect.Value) ([]byte, error) { + if val.Kind() == reflect.Interface { + val = val.Elem() + } switch val.Kind() { + case reflect.Ptr: + if !val.Type().AssignableTo(bigIntType) { + return nil, fmt.Errorf("cannot encode pointer type %v", val.Type()) + } + return encodeBigInt(val.Interface().(*big.Int)) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: i := val.Int() if i < 0 { @@ -131,211 +221,125 @@ func encode(input interface{}) ([]byte, error) { if val.Bool() { return []byte{0x01}, nil } - return []byte{EmptyString}, nil + return []byte{uint8(StringOffset)}, nil case reflect.String: - return encodeString([]byte(reflect.ValueOf(input).String())) + return encodeString([]byte(val.String())) case reflect.Slice: - switch typ.Elem().Kind() { + switch val.Type().Elem().Kind() { case reflect.Uint8: - return encodeString(reflect.ValueOf(input).Bytes()) + i, err := encodeString(val.Bytes()) + return i, err default: return encodeList(val) } case reflect.Struct: return encodeStruct(val) default: - return []byte{EmptyString}, nil + return []byte{uint8(StringOffset)}, nil } } -func Encode(input interface{}) ([]byte, error) { - return encode(input) -} - -type fields struct { - fields [][]byte -} +// Split into RLP fields by reading length prefixes and consuming chunks +func decode(in []byte) ([][]byte, error) { + if len(in) == 0 { + return nil, nil + } -func (f *fields) add(element []byte) { - f.fields = append(f.fields, element) -} + offset, length, typ := decodeLength(in) + end := offset + length -func decode(in []byte, out *fields) error { - if len(in) == 0 { - return nil + if end > uint64(len(in)) { + return nil, fmt.Errorf("read length prefix of %d but there is only %d bytes of unconsumed input", + length, uint64(len(in))-offset) } - offset, length, typ, err := decodeLength(in) + suffix, err := decode(in[end:]) if err != nil { - return err + return nil, err } - switch typ { case reflect.String: - out.add(in[offset:length]) + return append([][]byte{in[offset:end]}, suffix...), nil case reflect.Slice: - err = decode(in[offset:length], out) + prefix, err := decode(in[offset:end]) if err != nil { - return err + return nil, err } + return append(prefix, suffix...), nil } - return decode(in[length:], out) + return suffix, nil } -func decodeLength(input []byte) (uint8, uint8, reflect.Kind, error) { - length := len(input) +func decodeLength(input []byte) (uint64, uint64, reflect.Kind) { + magicByte := magicOffset(input[0]) - if length == 0 { - return 0, 0, reflect.Invalid, ErrNoInput - } + switch { + case magicByte <= SmallByte: + // small byte: sufficiently small single byte + return 0, 1, reflect.String - prefix := input[0] + case magicByte <= StringOffset+ShortLength: + // short string: length less than or equal to 55 bytes + length := uint64(magicByte - StringOffset) + return 1, length, reflect.String - if prefix <= 0x7f { - // single byte - return 0, 1, reflect.String, nil + case magicByte < SliceOffset: + // long string: length described by magic = 0xb7 + + byteLengthOfLength := magicByte - StringOffset - ShortLength + length := getUint64(input[1:byteLengthOfLength]) + offset := uint64(byteLengthOfLength + 1) + return offset, length, reflect.String - } else if length > int(prefix-0x80) && prefix <= 0xb7 { - // short string - strLen := prefix - 0x80 - if strLen == 1 && uint8(input[1]) <= 0x7f { - return 0, 0, reflect.Invalid, fmt.Errorf("single byte below 128 must be encoded as itself") - } - return 1, strLen + 1, reflect.String, nil + case magicByte <= SliceOffset+ShortLength: + // short slice: length less than or equal to 55 bytes + length := uint64(magicByte - SliceOffset) + return 1, length, reflect.Slice - } else if length > int(prefix-0xb7) && prefix <= 0xbf { - // long string - next, err := getLength(input[1 : (prefix-0xb7)+1]) - if err != nil { - return 0, 0, reflect.Invalid, err - } else if length > int(prefix-0xb7+next) { - lenOfStrLen := prefix - 0xb7 - if input[1] == 0 { - return 0, 0, reflect.Invalid, fmt.Errorf("multi-byte length must have no leading zero") - } - strLen, err := getLength(input[1 : lenOfStrLen+1]) - if err != nil { - return 0, 0, reflect.Invalid, err - } else if strLen < 56 { - return 0, 0, reflect.Invalid, fmt.Errorf("length below 56 must be encoded in one byte") - } - return lenOfStrLen + 1, lenOfStrLen + strLen, reflect.String, nil - } - - } else if length > int(prefix-0xc0) && prefix <= 0xf7 { - // short list - lenOfList := prefix - 0xc0 - return 1, lenOfList + 1, reflect.Slice, nil - - } else if prefix <= 0xff && length > int(prefix-0xf7) { - // long list - lenOfListLen := (prefix - 0xf7) + 1 - next, err := getLength(input[1:lenOfListLen]) - if err != nil { - return 0, 0, reflect.Invalid, err - } else if length > int(prefix-0xf7+next) { - if input[1] == 0 { - return 0, 0, reflect.Invalid, fmt.Errorf("multi-byte length must have no leading zero") - } - listLen, err := getLength(input[1:lenOfListLen]) - if err != nil { - return 0, 0, reflect.Invalid, err - } else if listLen < 56 { - return 0, 0, reflect.Invalid, fmt.Errorf("length below 56 must be encoded in one byte") - } - return lenOfListLen, lenOfListLen + listLen, reflect.Slice, nil - } + // Note this takes us all the way up to <= 255 so this switch is exhaustive + default: + // long string: length described by magic = 0xf7 + + byteLengthOfLength := magicByte - SliceOffset - ShortLength + length := getUint64(input[1:byteLengthOfLength]) + offset := uint64(byteLengthOfLength + 1) + return offset, length, reflect.Slice } - - return 0, 0, reflect.Invalid, ErrInvalid } -func getLength(data []byte) (uint8, error) { - length := len(data) - if length == 0 { - return 0, ErrNoInput - } else if length == 1 { - return uint8(data[0]), nil - } else { - next, err := getLength(data[0 : len(data)-1]) - return uint8(data[len(data)-1]) + next, err - } +func getUint64(bs []byte) uint64 { + bs = binary2.LeftPadBytes(bs, 8) + return binary.BigEndian.Uint64(bs) } -func decodeStruct(in reflect.Value, fields [][]byte) error { - if in.NumField() != len(fields) { - return fmt.Errorf("wrong number of fields; have %d, want %d", len(fields), in.NumField()) - } - for i := 0; i < in.NumField(); i++ { - val := in.Field(i) - typ := in.Field(i).Type() - switch val.Kind() { - case reflect.String: - val.SetString(string(fields[i])) - case reflect.Uint64: - out := make([]byte, 8) - for j := range fields[i] { - out[len(out)-(len(fields[i])-j)] = fields[i][j] - } - val.SetUint(binary.BigEndian.Uint64(out)) - case reflect.Slice: - if typ.Elem().Kind() != reflect.Uint8 { - continue - } - out := make([]byte, len(fields[i])) - for i, b := range fields[i] { - out[i] = b - } - val.SetBytes(out) - } - } - return nil -} - -func Decode(src []byte, dst interface{}) error { - dec := new(fields) - err := decode(src, dec) - if err != nil { - return err - } - - val := reflect.ValueOf(dst) - typ := reflect.TypeOf(dst) - - if val.Kind() == reflect.Ptr { - val = val.Elem() - } +func decodeField(val reflect.Value, field []byte) error { + typ := val.Type() switch val.Kind() { + case reflect.Ptr: + if !typ.AssignableTo(bigIntType) { + return fmt.Errorf("cannot decode into pointer type %v", typ) + } + bi := new(big.Int).SetBytes(field) + val.Set(reflect.ValueOf(bi)) + + case reflect.String: + val.SetString(string(field)) + case reflect.Uint64: + out := make([]byte, 8) + for j := range field { + out[len(out)-(len(field)-j)] = field[j] + } + val.SetUint(binary.BigEndian.Uint64(out)) case reflect.Slice: - switch typ.Elem().Kind() { - case reflect.Uint8: - out, ok := dst.([]byte) - if !ok { - return fmt.Errorf("cannot decode into type %s", val.Type()) - } - found := bytes.Join(dec.fields, []byte("")) - if len(out) < len(found) { - return fmt.Errorf("cannot decode %d bytes into slice of size %d", len(found), len(out)) - } - for i, b := range found { - out[i] = b - } - return nil - case reflect.Slice: - out, ok := dst.([][]byte) - if !ok { - return fmt.Errorf("cannot decode into type %s", val.Type()) - } - for i := range out { - out[i] = dec.fields[i] - } + if typ.Elem().Kind() != reflect.Uint8 { + // skip return nil } - case reflect.Struct: - return decodeStruct(val, dec.fields) + out := make([]byte, len(field)) + for i, b := range field { + out[i] = b + } + val.SetBytes(out) } - - return fmt.Errorf("cannot decode into unsupported type %v", reflect.TypeOf(dst)) + return nil } diff --git a/encoding/rlp/rlp_test.go b/encoding/rlp/rlp_test.go index 705fd3862..a9e7c4adc 100644 --- a/encoding/rlp/rlp_test.go +++ b/encoding/rlp/rlp_test.go @@ -1,8 +1,11 @@ package rlp import ( + "math/big" "testing" + "github.com/hyperledger/burrow/crypto" + "github.com/test-go/testify/require" ) @@ -23,22 +26,22 @@ func TestEncoding(t *testing.T) { var tests = []testCase{ { []byte{}, - []byte{EmptyString}, + []byte{uint8(StringOffset)}, []byte{}, }, { "", - []byte{EmptyString}, + []byte{uint8(StringOffset)}, []byte{}, }, { 0, - []byte{EmptyString}, + []byte{uint8(StringOffset)}, []byte{}, }, { []string{}, - []byte{EmptySlice}, + []byte{uint8(SliceOffset)}, []byte{}, }, } @@ -55,7 +58,7 @@ func TestEncoding(t *testing.T) { }, { false, - []byte{EmptyString}, + []byte{uint8(StringOffset)}, []byte{0}, }, } @@ -65,6 +68,11 @@ func TestEncoding(t *testing.T) { t.Run("String", func(t *testing.T) { var tests = []testCase{ + { + []byte{0, 0}, + []byte{uint8(StringOffset) + 2, 0, 0}, + []byte{0, 0}, + }, { []byte{0x64, 0x6f, 0x67}, []byte{0x83, 100, 111, 103}, @@ -134,7 +142,7 @@ func trial(t *testing.T, tests []testCase) { for _, tt := range tests { enc, err := Encode(tt.in) require.NoError(t, err) - require.Equal(t, tt.enc, enc) + require.Equal(t, tt.enc, enc, "encoding must match") var dec interface{} @@ -151,7 +159,7 @@ func trial(t *testing.T, tests []testCase) { err = Decode(enc, dec) require.NoError(t, err) - require.Equal(t, tt.dec, dec) + require.Equal(t, tt.dec, dec, "decoding must match") } } @@ -163,9 +171,9 @@ type RawTx struct { Value uint64 `json:"value"` Input []byte `json:"input"` - V []byte `json:"v"` - R []byte `json:"r"` - S []byte `json:"s"` + V *big.Int `json:"v"` + R []byte `json:"r"` + S []byte `json:"s"` } func TestEthTransaction(t *testing.T) { @@ -173,13 +181,104 @@ func TestEthTransaction(t *testing.T) { // data, err := hex.DecodeString(raw) // require.NoError(t, err) - data, err := Encode([]interface{}{uint64(6), uint64(10000000000000), uint64(196608), []byte{250, 60, 170, 188, 142, 239, 236, 43, 94, 40, 149, 229, 175, 191, 121, 55, 158, 114, 104, 167}, uint64(0), []byte{}, uint64(1), uint(0), uint(0)}) + //input := []interface{}{ + // uint64(6), // Nonce + // uint64(10000000000000), // GasPrice + // uint64(196608), // Gas + // []byte{250, 60, 170, 188, 142, 239, 236, 43, 94, 40, 149, 229, 175, 191, 121, 55, 158, 114, 104, 167}, // To + // uint64(0), // Value + // []byte{}, // Input + // uint64(1), // V + // uint(0), // R + // uint(0), // S + //} + input := &RawTx{ + uint64(6), // Nonce + uint64(10000000000000), // GasPrice + uint64(196608), // Gas + []byte{250, 60, 170, 188, 142, 239, 236, 43, 94, 40, 149, 229, 175, 191, 121, 55, 158, 114, 104, 167}, // To + uint64(0), // Value + []byte{}, // Input + big.NewInt(1), // V + []byte{1}, // R + []byte{1}, // S + } + data, err := Encode(input) require.NoError(t, err) - exp := []byte{230, 6, 134, 9, 24, 78, 114, 160, 0, 131, 3, 0, 0, 148, 250, 60, 170, 188, 142, 239, 236, 43, 94, 40, 149, 229, 175, 191, 121, 55, 158, 114, 104, 167, 128, 128, 1, 128, 128} + exp := []byte{230, 6, 134, 9, 24, 78, 114, 160, 0, 131, 3, 0, 0, 148, 250, 60, 170, 188, 142, 239, 236, 43, 94, 40, 149, 229, 175, 191, 121, 55, 158, 114, 104, 167, 128, 128, 1, 1, 1} require.Equal(t, exp, data) tx := new(RawTx) err = Decode(data, tx) require.NoError(t, err) + + require.Equal(t, input, tx) +} + +func TestBigInts(t *testing.T) { + type foo struct { + A *big.Int + B *big.Int + } + + biggun, ok := new(big.Int).SetString("234234238947234789234789234789234", 10) + require.True(t, ok) + input := &foo{ + A: biggun, + B: big.NewInt(34), + } + + bs, err := Encode(input) + require.NoError(t, err) + + output := new(foo) + err = Decode(bs, output) + require.NoError(t, err) + + require.Equal(t, input, output) +} + +// Order matters for serialisation +type EthRawTx struct { + Sequence uint64 `json:"nonce"` + GasPrice uint64 `json:"gasPrice"` + GasLimit uint64 `json:"gasLimit"` + To []byte `json:"to"` + Amount *big.Int `json:"value"` + Data []byte `json:"data"` + ChainID *big.Int `json:"chainID"` + + V *big.Int + R *big.Int + S *big.Int +} + +func TestEthRawTx(t *testing.T) { + bigly, ok := new(big.Int).SetString("234589034578907683457689234545678235789003476899", 10) + require.True(t, ok) + + to := crypto.Address{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20} + + rawTx := &EthRawTx{ + Sequence: 1, + GasPrice: 1, + GasLimit: 1, + To: to[:], + Amount: big.NewInt(232), + Data: []byte{1, 3, 4}, + ChainID: crypto.GetEthChainID("flgoo"), + V: big.NewInt(272), + R: bigly, + S: bigly, + } + + bs, err := Encode(rawTx) + require.NoError(t, err) + + rawTxOut := new(EthRawTx) + err = Decode(bs, rawTxOut) + require.NoError(t, err) + + require.Equal(t, rawTx, rawTxOut) } diff --git a/execution/contexts/governance_context.go b/execution/contexts/governance_context.go index 35f4f8578..940d49dbc 100644 --- a/execution/contexts/governance_context.go +++ b/execution/contexts/governance_context.go @@ -82,7 +82,7 @@ func (ctx *GovernanceContext) UpdateAccount(account *acm.Account, update *spec.T return } power := new(big.Int).SetUint64(update.Balances().GetPower(0)) - _, err := ctx.ValidatorSet.SetPower(*update.PublicKey, power) + _, err := ctx.ValidatorSet.SetPower(update.PublicKey, power) if err != nil { return ev, err } @@ -146,7 +146,7 @@ func MaybeGetPublicKey(sw acmstate.ReaderWriter, address crypto.Address) (*crypt } if acc != nil && acc.PublicKey.IsSet() { publicKey := acc.PublicKey - return &publicKey, nil + return publicKey, nil } return nil, nil } diff --git a/execution/evm/precompiles_test.go b/execution/evm/precompiles_test.go index fb538772b..fbc3c51b1 100644 --- a/execution/evm/precompiles_test.go +++ b/execution/evm/precompiles_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/assert" ) -func TestSNativeContractDescription1a(t *testing.T) { +func TestECRecover(t *testing.T) { message := []byte("THIS MESSAGE IS NOT SIGNED") digest := crypto.Keccak256(message) privateKey, err := btcec.NewPrivateKey(btcec.S256()) @@ -65,7 +65,7 @@ func TestSNativeContractDescription1a(t *testing.T) { }) returnValue, err := vm.Contract(solidity.DeployedBytecode_ECRecover).Call(state, params) require.NoError(t, err) - priv, err := crypto.PrivateKeyFromRawBytes(privateKey.D.Bytes(), crypto.CurveTypeSecp256k1) + priv, err := crypto.PrivateKeyFromRawBytes(privateKey.Serialize(), crypto.CurveTypeSecp256k1) require.NoError(t, err) address := priv.GetPublicKey().GetAddress() addressOut := crypto.AddressFromWord256(binary.LeftPadWord256(returnValue)) diff --git a/execution/execution.go b/execution/execution.go index 93b2738b8..121e9f8b8 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -282,7 +282,7 @@ func (exe *executor) validateInputsAndStorePublicKeys(txEnv *txs.Envelope) error for s, in := range txEnv.Tx.GetInputs() { err := exe.updateSignatory(txEnv.Signatories[s]) if err != nil { - return fmt.Errorf("failed to update public key for input %X: %v", in.Address, err) + return fmt.Errorf("failed to update public key for input %v: %v", in.Address, err) } acc, err := exe.stateCache.GetAccount(in.Address) if err != nil { @@ -335,7 +335,7 @@ func (exe *executor) updateSignatory(sig txs.Signatory) error { return fmt.Errorf("unexpected mismatch between address %v and supplied public key %v", acc.Address, sig.PublicKey) } - acc.PublicKey = *sig.PublicKey + acc.PublicKey = sig.PublicKey return exe.stateCache.UpdateAccount(acc) } diff --git a/execution/native/precompiles.go b/execution/native/precompiles.go index a25054f1f..f9cd27bb6 100644 --- a/execution/native/precompiles.go +++ b/execution/native/precompiles.go @@ -59,7 +59,7 @@ func ecrecover(ctx Context) ([]byte, error) { // r = encrypted random point // s = signature proof - // Signature layout required by btcec: + // Signature layout required by ethereum: // sig: [ r | s | v ] // bytes: [ 32 | 32 | 1 ] hash := ctx.Input[:32] diff --git a/execution/registry/registry.pb.go b/execution/registry/registry.pb.go index 26b582c43..8f219d73d 100644 --- a/execution/registry/registry.pb.go +++ b/execution/registry/registry.pb.go @@ -39,10 +39,10 @@ type NodeIdentity struct { TendermintNodeID github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,3,opt,name=TendermintNodeID,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"TendermintNodeID"` // The public key that this node will validate with if it becomes a validator // (use this to create a binding between p2p node ID and validator) - ValidatorPublicKey github_com_hyperledger_burrow_crypto.PublicKey `protobuf:"bytes,4,opt,name=ValidatorPublicKey,proto3,customtype=github.com/hyperledger/burrow/crypto.PublicKey" json:"ValidatorPublicKey"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ValidatorPublicKey *github_com_hyperledger_burrow_crypto.PublicKey `protobuf:"bytes,4,opt,name=ValidatorPublicKey,proto3,customtype=github.com/hyperledger/burrow/crypto.PublicKey" json:"ValidatorPublicKey,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *NodeIdentity) Reset() { *m = NodeIdentity{} } @@ -99,10 +99,10 @@ func init() { proto.RegisterFile("registry.proto", fileDescriptor_41af05d40a6155 func init() { golang_proto.RegisterFile("registry.proto", fileDescriptor_41af05d40a615591) } var fileDescriptor_41af05d40a615591 = []byte{ - // 287 bytes of a gzipped FileDescriptorProto + // 288 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0x4a, 0x4d, 0xcf, 0x2c, 0x2e, 0x29, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x44, - 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x82, 0xfa, 0x20, 0x16, 0x44, 0x5e, 0x69, 0x01, 0x13, 0x17, 0x8f, + 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x82, 0xfa, 0x20, 0x16, 0x44, 0x5e, 0x69, 0x0e, 0x13, 0x17, 0x8f, 0x5f, 0x7e, 0x4a, 0xaa, 0x67, 0x4a, 0x6a, 0x5e, 0x49, 0x66, 0x49, 0xa5, 0x90, 0x04, 0x17, 0xbb, 0x6f, 0x7e, 0x5e, 0x66, 0x76, 0x6a, 0x91, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x8c, 0x2b, 0xa4, 0xc6, 0xc5, 0xe7, 0x97, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0xed, 0x98, 0x92, 0x52, 0x94, 0x5a, @@ -111,13 +111,13 @@ var fileDescriptor_41af05d40a615591 = []byte{ 0xe4, 0xc4, 0x3d, 0x79, 0x86, 0x5b, 0xf7, 0xe4, 0x75, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x33, 0x2a, 0x0b, 0x52, 0x8b, 0x72, 0x52, 0x53, 0xd2, 0x53, 0x8b, 0xf4, 0x93, 0x4a, 0x8b, 0x8a, 0xf2, 0xcb, 0xf5, 0x93, 0x8b, 0x2a, 0x0b, 0x4a, 0xf2, 0xf5, 0xa0, 0xe6, - 0x05, 0x61, 0x98, 0x26, 0x94, 0xc6, 0x25, 0x14, 0x96, 0x98, 0x93, 0x99, 0x92, 0x58, 0x92, 0x5f, - 0x14, 0x50, 0x9a, 0x94, 0x93, 0x99, 0xec, 0x9d, 0x5a, 0x29, 0xc1, 0x02, 0xb6, 0xc3, 0x0c, 0x6a, - 0x87, 0x1e, 0x51, 0x76, 0xc0, 0x75, 0x07, 0x61, 0x31, 0xd1, 0x8a, 0x65, 0xc6, 0x02, 0x79, 0x06, - 0x27, 0xaf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0xbc, 0xf1, 0x48, 0x8e, 0xf1, 0xc1, - 0x23, 0x39, 0xc6, 0x03, 0x8f, 0xe5, 0x18, 0x4f, 0x3c, 0x96, 0x63, 0x8c, 0x32, 0xc0, 0x6f, 0x47, - 0x6a, 0x45, 0x6a, 0x72, 0x69, 0x49, 0x66, 0x7e, 0x9e, 0x3e, 0x2c, 0x12, 0x92, 0xd8, 0xc0, 0xa1, - 0x6e, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x64, 0x98, 0x22, 0xa9, 0xa7, 0x01, 0x00, 0x00, + 0x05, 0x61, 0x98, 0x26, 0x94, 0xc4, 0x25, 0x14, 0x96, 0x98, 0x93, 0x99, 0x92, 0x58, 0x92, 0x5f, + 0x14, 0x50, 0x9a, 0x94, 0x93, 0x99, 0xec, 0x9d, 0x5a, 0x29, 0xc1, 0x02, 0xb6, 0xc3, 0xe8, 0xd6, + 0x3d, 0x79, 0x3d, 0xa2, 0xcc, 0x87, 0xeb, 0x0c, 0xc2, 0x62, 0x9a, 0x15, 0xcb, 0x8c, 0x05, 0xf2, + 0x0c, 0x4e, 0x5e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0x78, 0xe3, 0x91, 0x1c, 0xe3, + 0x83, 0x47, 0x72, 0x8c, 0x07, 0x1e, 0xcb, 0x31, 0x9e, 0x78, 0x2c, 0xc7, 0x18, 0x65, 0x80, 0xdf, + 0x8e, 0xd4, 0x8a, 0xd4, 0xe4, 0xd2, 0x92, 0xcc, 0xfc, 0x3c, 0x7d, 0x58, 0x04, 0x24, 0xb1, 0x81, + 0x43, 0xdc, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x64, 0xf6, 0x36, 0xa3, 0x01, 0x00, 0x00, } func (m *NodeIdentity) Marshal() (dAtA []byte, err error) { @@ -144,16 +144,18 @@ func (m *NodeIdentity) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - { - size := m.ValidatorPublicKey.Size() - i -= size - if _, err := m.ValidatorPublicKey.MarshalTo(dAtA[i:]); err != nil { - return 0, err + if m.ValidatorPublicKey != nil { + { + size := m.ValidatorPublicKey.Size() + i -= size + if _, err := m.ValidatorPublicKey.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRegistry(dAtA, i, uint64(size)) } - i = encodeVarintRegistry(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x22 { size := m.TendermintNodeID.Size() i -= size @@ -208,8 +210,10 @@ func (m *NodeIdentity) Size() (n int) { } l = m.TendermintNodeID.Size() n += 1 + l + sovRegistry(uint64(l)) - l = m.ValidatorPublicKey.Size() - n += 1 + l + sovRegistry(uint64(l)) + if m.ValidatorPublicKey != nil { + l = m.ValidatorPublicKey.Size() + n += 1 + l + sovRegistry(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -377,6 +381,8 @@ func (m *NodeIdentity) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + var v github_com_hyperledger_burrow_crypto.PublicKey + m.ValidatorPublicKey = &v if err := m.ValidatorPublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/execution/registry/registry_test.go b/execution/registry/registry_test.go index 3fe5a5eb8..12313b461 100644 --- a/execution/registry/registry_test.go +++ b/execution/registry/registry_test.go @@ -14,7 +14,7 @@ func TestEncodeProtobuf(t *testing.T) { entry := &NodeIdentity{ Moniker: "test", TendermintNodeID: crypto.Address{}, - ValidatorPublicKey: crypto.PublicKey{ + ValidatorPublicKey: &crypto.PublicKey{ CurveType: crypto.CurveTypeEd25519, PublicKey: binary.HexBytes{1, 2, 3, 4, 5}, }, diff --git a/execution/state/validators.go b/execution/state/validators.go index 8fe5aee83..d0f4461a1 100644 --- a/execution/state/validators.go +++ b/execution/state/validators.go @@ -124,7 +124,7 @@ func (s *ReadState) IterateValidators(fn func(id crypto.Addressable, power *big. }) } -func (ws *writeState) SetPower(id crypto.PublicKey, power *big.Int) (*big.Int, error) { +func (ws *writeState) SetPower(id *crypto.PublicKey, power *big.Int) (*big.Int, error) { // SetPower in ring flow, err := ws.ring.SetPower(id, power) if err != nil { @@ -134,7 +134,7 @@ func (ws *writeState) SetPower(id crypto.PublicKey, power *big.Int) (*big.Int, e return flow, ws.setPower(id, power) } -func (ws *writeState) setPower(id crypto.PublicKey, power *big.Int) error { +func (ws *writeState) setPower(id *crypto.PublicKey, power *big.Int) error { tree, err := ws.forest.Writer(keys.Validator.Prefix()) if err != nil { return err diff --git a/execution/state/validators_test.go b/execution/state/validators_test.go index 184c7d030..6073ef12b 100644 --- a/execution/state/validators_test.go +++ b/execution/state/validators_test.go @@ -85,6 +85,6 @@ func pow(p int) *big.Int { return big.NewInt(int64(p)) } -func pub(secret interface{}) crypto.PublicKey { +func pub(secret interface{}) *crypto.PublicKey { return acm.NewAccountFromSecret(fmt.Sprintf("%v", secret)).PublicKey } diff --git a/genesis/deterministic_genesis.go b/genesis/deterministic_genesis.go index 2e0e666ce..6689894a4 100644 --- a/genesis/deterministic_genesis.go +++ b/genesis/deterministic_genesis.go @@ -79,14 +79,14 @@ func (dg *deterministicGenesis) Account(minBalance uint64) (*acm.Account, *acm.P panic(fmt.Errorf("could not generate private key deterministically")) } privAccount := &acm.ConcretePrivateAccount{ - PublicKey: privateKey.GetPublicKey(), + PublicKey: *privateKey.GetPublicKey(), PrivateKey: privateKey, Address: privateKey.GetPublicKey().GetAddress(), } perms := permission.DefaultAccountPermissions acc := &acm.Account{ Address: privAccount.Address, - PublicKey: privAccount.PublicKey, + PublicKey: &privAccount.PublicKey, Sequence: uint64(dg.random.Int()), Balance: minBalance, Permissions: perms, diff --git a/genesis/genesis.go b/genesis/genesis.go index fcd11a751..8255ff1b6 100644 --- a/genesis/genesis.go +++ b/genesis/genesis.go @@ -29,7 +29,7 @@ const ShortHashSuffixBytes = 3 type BasicAccount struct { // Address is convenient to have in file for reference, but otherwise ignored since derived from PublicKey Address crypto.Address - PublicKey crypto.PublicKey + PublicKey *crypto.PublicKey Amount uint64 } diff --git a/genesis/spec/template_account.go b/genesis/spec/template_account.go index 7a9b75ddd..e1f318048 100644 --- a/genesis/spec/template_account.go +++ b/genesis/spec/template_account.go @@ -69,7 +69,7 @@ func (ta TemplateAccount) GenesisAccount(keyClient keys.KeyClient, index int, cu // Adds a public key and address to the template. If PublicKey will try to fetch it by Address. // If both PublicKey and Address are not set will use the keyClient to generate a new keypair -func (ta TemplateAccount) RealisePublicKeyAndAddress(keyClient keys.KeyClient, curve crypto.CurveType) (pubKey crypto.PublicKey, address crypto.Address, err error) { +func (ta TemplateAccount) RealisePublicKeyAndAddress(keyClient keys.KeyClient, curve crypto.CurveType) (pubKey *crypto.PublicKey, address crypto.Address, err error) { if ta.PublicKey == nil { if ta.Address == nil { // If neither PublicKey or Address set then generate a new one @@ -91,7 +91,7 @@ func (ta TemplateAccount) RealisePublicKeyAndAddress(keyClient keys.KeyClient, c err = fmt.Errorf("template address %s does not match public key derived address %s", ta.Address, ta.PublicKey) } - pubKey = *ta.PublicKey + pubKey = ta.PublicKey } return } diff --git a/integration/governance/governance_test.go b/integration/governance/governance_test.go index 78d3ef26a..c33975feb 100644 --- a/integration/governance/governance_test.go +++ b/integration/governance/governance_test.go @@ -221,7 +221,7 @@ func TestGovernance(t *testing.T) { power := uint64(2445) tx := payload.UpdateAccountTx(inputAddress, &spec.TemplateAccount{ Address: &address, - PublicKey: &publicKey, + PublicKey: publicKey, Amounts: balance.New().Power(power), }) diff --git a/integration/rpctransact/transact_server_test.go b/integration/rpctransact/transact_server_test.go index 74bb07998..be0eb04fc 100644 --- a/integration/rpctransact/transact_server_test.go +++ b/integration/rpctransact/transact_server_test.go @@ -42,7 +42,7 @@ func TestTransactServer(t *testing.T) { require.NoError(t, err) // Account PublicKey should be initially unset - assert.False(t, acc.PublicKey.IsSet()) + assert.False(t, acc.GetPublicKey().IsSet()) // Sign with this account - should set public key _, err = rpctest.CreateContract(tcli, input.GetAddress(), solidity.Bytecode_StrangeLoop, nil) diff --git a/keys/key.go b/keys/key.go index 415ed9e3f..bd67629fe 100644 --- a/keys/key.go +++ b/keys/key.go @@ -40,7 +40,7 @@ func NewKey(typ crypto.CurveType) (*Key, error) { pubKey := privKey.GetPublicKey() return &Key{ CurveType: typ, - PublicKey: pubKey, + PublicKey: *pubKey, Address: pubKey.GetAddress(), PrivateKey: privKey, }, nil @@ -54,7 +54,7 @@ func NewKeyFromPub(curveType crypto.CurveType, PubKeyBytes []byte) (*Key, error) return &Key{ CurveType: curveType, - PublicKey: pubKey, + PublicKey: *pubKey, Address: pubKey.GetAddress(), }, nil } @@ -71,7 +71,7 @@ func NewKeyFromPriv(curveType crypto.CurveType, PrivKeyBytes []byte) (*Key, erro return &Key{ CurveType: curveType, Address: pubKey.GetAddress(), - PublicKey: pubKey, + PublicKey: *pubKey, PrivateKey: privKey, }, nil } @@ -116,7 +116,7 @@ func (k *Key) UnmarshalJSON(j []byte) (err error) { k.Address = k2.Address k.CurveType = curveType - k.PublicKey = k2.PrivateKey.GetPublicKey() + k.PublicKey = *k2.PrivateKey.GetPublicKey() k.PrivateKey = k2.PrivateKey return nil diff --git a/keys/key_client.go b/keys/key_client.go index ab7c10974..715f4b952 100644 --- a/keys/key_client.go +++ b/keys/key_client.go @@ -19,7 +19,7 @@ type KeyClient interface { Sign(signAddress crypto.Address, message []byte) (*crypto.Signature, error) // PublicKey returns the public key associated with a given address - PublicKey(address crypto.Address) (publicKey crypto.PublicKey, err error) + PublicKey(address crypto.Address) (publicKey *crypto.PublicKey, err error) // Generate requests that a key be generate within the keys instance and returns the address Generate(keyName string, keyType crypto.CurveType) (keyAddress crypto.Address, err error) @@ -53,14 +53,14 @@ func (l *localKeyClient) Sign(signAddress crypto.Address, message []byte) (*cryp return resp.GetSignature(), nil } -func (l *localKeyClient) PublicKey(address crypto.Address) (publicKey crypto.PublicKey, err error) { +func (l *localKeyClient) PublicKey(address crypto.Address) (publicKey *crypto.PublicKey, err error) { resp, err := l.ks.PublicKey(context.Background(), &PubRequest{Address: address.String()}) if err != nil { - return crypto.PublicKey{}, err + return nil, err } curveType, err := crypto.CurveTypeFromString(resp.GetCurveType()) if err != nil { - return crypto.PublicKey{}, err + return nil, err } return crypto.PublicKeyFromBytes(resp.GetPublicKey(), curveType) } @@ -101,7 +101,7 @@ func (l *remoteKeyClient) Sign(signAddress crypto.Address, message []byte) (*cry return resp.GetSignature(), nil } -func (l *remoteKeyClient) PublicKey(address crypto.Address) (publicKey crypto.PublicKey, err error) { +func (l *remoteKeyClient) PublicKey(address crypto.Address) (publicKey *crypto.PublicKey, err error) { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() req := PubRequest{Address: address.String()} @@ -109,11 +109,11 @@ func (l *remoteKeyClient) PublicKey(address crypto.Address) (publicKey crypto.Pu resp, err := l.kc.PublicKey(ctx, &req) if err != nil { l.logger.TraceMsg("Received PublicKey error response: ", err) - return crypto.PublicKey{}, err + return nil, err } curveType, err := crypto.CurveTypeFromString(resp.GetCurveType()) if err != nil { - return crypto.PublicKey{}, err + return nil, err } l.logger.TraceMsg("Received PublicKey response to remote key server: ", fmt.Sprintf("%v", resp)) return crypto.PublicKeyFromBytes(resp.GetPublicKey(), curveType) @@ -182,7 +182,7 @@ func NewLocalKeyClient(ks KeyStore, logger *logging.Logger) KeyClient { type Signer struct { keyClient KeyClient address crypto.Address - publicKey crypto.PublicKey + publicKey *crypto.PublicKey } // AddressableSigner creates a signer that assumes the address holds an Ed25519 key @@ -203,7 +203,7 @@ func (ms *Signer) GetAddress() crypto.Address { return ms.address } -func (ms *Signer) GetPublicKey() crypto.PublicKey { +func (ms *Signer) GetPublicKey() *crypto.PublicKey { return ms.publicKey } diff --git a/keys/keys_grpc.pb.go b/keys/keys_grpc.pb.go index 5b50d28d2..00f2d1450 100644 --- a/keys/keys_grpc.pb.go +++ b/keys/keys_grpc.pb.go @@ -12,6 +12,7 @@ import ( // 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 // KeysClient is the client API for Keys service. @@ -203,7 +204,7 @@ type UnsafeKeysServer interface { } func RegisterKeysServer(s grpc.ServiceRegistrar, srv KeysServer) { - s.RegisterService(&_Keys_serviceDesc, srv) + s.RegisterService(&Keys_ServiceDesc, srv) } func _Keys_GenerateKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -404,7 +405,10 @@ func _Keys_AddName_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -var _Keys_serviceDesc = grpc.ServiceDesc{ +// Keys_ServiceDesc is the grpc.ServiceDesc for Keys service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Keys_ServiceDesc = grpc.ServiceDesc{ ServiceName: "keys.Keys", HandlerType: (*KeysServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/protobuf/acm.proto b/protobuf/acm.proto index 2cc03dc4c..869db69f0 100644 --- a/protobuf/acm.proto +++ b/protobuf/acm.proto @@ -19,7 +19,7 @@ option (gogoproto.messagename_all) = true; message Account { option (gogoproto.goproto_stringer) = false; bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; - crypto.PublicKey PublicKey = 2 [(gogoproto.nullable) = false]; + crypto.PublicKey PublicKey = 2; // Sequence counts the number of transactions that have been accepted from this account uint64 Sequence = 3; // The account's current native token balance diff --git a/protobuf/registry.proto b/protobuf/registry.proto index 702c6cbd1..124ab2900 100644 --- a/protobuf/registry.proto +++ b/protobuf/registry.proto @@ -31,5 +31,5 @@ message NodeIdentity { bytes TendermintNodeID = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; // The public key that this node will validate with if it becomes a validator // (use this to create a binding between p2p node ID and validator) - bytes ValidatorPublicKey = 4 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.PublicKey", (gogoproto.nullable) = false]; + bytes ValidatorPublicKey = 4 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.PublicKey"]; } diff --git a/protobuf/validator.proto b/protobuf/validator.proto index 34d57c58e..28e383c93 100644 --- a/protobuf/validator.proto +++ b/protobuf/validator.proto @@ -18,6 +18,6 @@ option (gogoproto.messagename_all) = true; message Validator { option (gogoproto.goproto_stringer) = false; bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"]; - crypto.PublicKey PublicKey = 2 [(gogoproto.nullable) = false]; + crypto.PublicKey PublicKey = 2; uint64 Power = 3; } diff --git a/rpc/eth.go b/rpc/eth.go index f907c92c2..dfeb18274 100644 --- a/rpc/eth.go +++ b/rpc/eth.go @@ -7,6 +7,8 @@ import ( "math/big" "strconv" + "github.com/hyperledger/burrow/encoding/rlp" + "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/acm/balance" "github.com/hyperledger/burrow/acm/validator" @@ -14,7 +16,6 @@ import ( "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/crypto" x "github.com/hyperledger/burrow/encoding/hex" - "github.com/hyperledger/burrow/encoding/rlp" "github.com/hyperledger/burrow/execution" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/state" @@ -29,7 +30,6 @@ import ( ) const ( - chainID = 1 maxGasLimit = 2<<52 - 1 hexZero = "0x0" hexZeroNonce = "0x0000000000000000" @@ -51,11 +51,16 @@ type EthService struct { } // NewEthService returns our web3 provider -func NewEthService(accounts acmstate.IterableStatsReader, - events EventsReader, blockchain bcm.BlockchainInfo, - validators validator.History, nodeView *tendermint.NodeView, - trans *execution.Transactor, keyStore *keys.FilesystemKeyStore, - logger *logging.Logger) *EthService { +func NewEthService( + accounts acmstate.IterableStatsReader, + events EventsReader, + blockchain bcm.BlockchainInfo, + validators validator.History, + nodeView *tendermint.NodeView, + trans *execution.Transactor, + keyStore *keys.FilesystemKeyStore, + logger *logging.Logger, +) *EthService { keyClient := keys.NewLocalKeyClient(keyStore, logger) @@ -119,7 +124,7 @@ func (srv *EthService) NetPeerCount() (*web3.NetPeerCountResult, error) { // this is typically a small int (where 1 == Ethereum mainnet) func (srv *EthService) NetVersion() (*web3.NetVersionResult, error) { return &web3.NetVersionResult{ - ChainID: x.EncodeNumber(uint64(chainID)), + ChainID: crypto.GetEthChainID(srv.blockchain.ChainID()).String(), }, nil } @@ -548,19 +553,6 @@ func (srv *EthService) EthGasPrice() (*web3.EthGasPriceResult, error) { }, nil } -type RawTx struct { - Nonce uint64 `json:"nonce"` - GasPrice uint64 `json:"gasPrice"` - GasLimit uint64 `json:"gasLimit"` - To []byte `json:"to"` - Value []byte `json:"value"` - Data []byte `json:"data"` - - V uint64 `json:"v"` - R []byte `json:"r"` - S []byte `json:"s"` -} - func (srv *EthService) EthGetRawTransactionByHash(req *web3.EthGetRawTransactionByHashParams) (*web3.EthGetRawTransactionByHashResult, error) { // TODO return nil, web3.ErrNotFound @@ -582,42 +574,31 @@ func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionPara return nil, err } - rawTx := new(RawTx) + rawTx := new(txs.EthRawTx) err = rlp.Decode(data, rawTx) if err != nil { return nil, err } - net := uint64(chainID) - enc, err := txs.RLPEncode(rawTx.Nonce, rawTx.GasPrice, rawTx.GasLimit, rawTx.To, rawTx.Value, rawTx.Data) + publicKey, signature, err := rawTx.RecoverPublicKey() if err != nil { return nil, err } - sig := crypto.CompressedSignatureFromParams(rawTx.V-net-8-1, rawTx.R, rawTx.S) - pub, err := crypto.PublicKeyFromSignature(sig, crypto.Keccak256(enc)) - if err != nil { - return nil, err - } - from := pub.GetAddress() - unc := crypto.UncompressedSignatureFromParams(rawTx.R, rawTx.S) - signature, err := crypto.SignatureFromBytes(unc, crypto.CurveTypeSecp256k1) - if err != nil { - return nil, err - } + from := publicKey.GetAddress() to, err := crypto.AddressFromBytes(rawTx.To) if err != nil { return nil, err } - amount := balance.WeiToNative(rawTx.Value).Uint64() + amount := balance.WeiToNative(rawTx.Amount).Uint64() txEnv := &txs.Envelope{ Signatories: []txs.Signatory{ { Address: &from, - PublicKey: pub, + PublicKey: publicKey, Signature: signature, }, }, @@ -630,7 +611,7 @@ func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionPara Amount: amount, // first tx sequence should be 1, // but metamask starts at 0 - Sequence: rawTx.Nonce + 1, + Sequence: rawTx.Sequence + 1, }, Address: &to, GasLimit: rawTx.GasLimit, diff --git a/rpc/eth_test.go b/rpc/eth_test.go index c4fdb2411..82d5368eb 100644 --- a/rpc/eth_test.go +++ b/rpc/eth_test.go @@ -8,6 +8,9 @@ import ( "testing" "time" + "github.com/hyperledger/burrow/txs" + "github.com/hyperledger/burrow/txs/payload" + "github.com/hyperledger/burrow/acm/balance" "github.com/hyperledger/burrow/crypto" x "github.com/hyperledger/burrow/encoding/hex" @@ -43,7 +46,7 @@ func TestWeb3Service(t *testing.T) { err = store.StoreKeyPlain(&keys.Key{ CurveType: acc.PrivateKey().CurveType, Address: acc.GetAddress(), - PublicKey: acc.GetPublicKey(), + PublicKey: *acc.GetPublicKey(), PrivateKey: acc.PrivateKey(), }) require.NoError(t, err) @@ -87,7 +90,7 @@ func TestWeb3Service(t *testing.T) { t.Run("NetVersion", func(t *testing.T) { result, err := eth.NetVersion() require.NoError(t, err) - require.Equal(t, x.EncodeNumber(1), result.ChainID) + require.Equal(t, crypto.GetEthChainID(genesisDoc.ChainID()).String(), result.ChainID) }) t.Run("EthProtocolVersion", func(t *testing.T) { @@ -107,14 +110,34 @@ func TestWeb3Service(t *testing.T) { t.Run("EthTransactions", func(t *testing.T) { var txHash, contractAddress string + sender := genesisAccounts[1] receivee := genesisAccounts[2].GetPublicKey().GetAddress() acc, err := kern.State.GetAccount(receivee) require.NoError(t, err) before := acc.GetBalance() t.Run("EthSendRawTransaction", func(t *testing.T) { - // see: https://github.com/ethereumjs/ethereumjs-tx/blob/master/examples/transactions.ts#L9 - raw := `0xf867808082520894f97798df751deb4b6e39d4cf998ee7cd4dcb9acc880de0b6b3a76400008025a0f0d2396973296cd6a71141c974d4a851f5eae8f08a8fba2dc36a0fef9bd6440ca0171995aa750d3f9f8e4d0eac93ff67634274f3c5acf422723f49ff09a6885422` + txEnv := txs.Enclose(genesisDoc.ChainID(), &payload.CallTx{ + Input: &payload.TxInput{ + Address: sender.GetAddress(), + Amount: 1, + Sequence: 0, + }, + Address: &receivee, + Data: nil, + }) + txEnv.Encoding = txs.Envelope_RLP + err = txEnv.Sign(sender) + require.NoError(t, err) + + rawTx, err := txs.RawTxFromEnvelope(txEnv) + require.NoError(t, err) + + bs, err := rawTx.Marshal() + require.NoError(t, err) + + raw := x.EncodeBytes(bs) + _, err = eth.EthSendRawTransaction(&web3.EthSendRawTransactionParams{ SignedTransactionData: raw, }) @@ -129,7 +152,7 @@ func TestWeb3Service(t *testing.T) { require.NoError(t, err) after, err := x.DecodeToBigInt(result.GetBalanceResult) require.NoError(t, err) - after = balance.WeiToNative(after.Bytes()) + after = balance.WeiToNative(after) require.Equal(t, after.Uint64(), before+1) }) @@ -245,11 +268,11 @@ func TestWeb3Service(t *testing.T) { t.Run("EthSign", func(t *testing.T) { result, err := eth.EthSign(&web3.EthSignParams{ - Address: "0x2c2d14a9a3f0d078ac8b38e3043d78ca8bc11029", + Address: "0x" + genesisAccounts[1].GetAddress().String(), Bytes: "0xdeadbeaf", }) require.NoError(t, err) - require.Equal(t, `0x30440220345d17225ac03a575f467cea3a8d5cc2dea42fc89030c42ea175fd5140c542eb02200307004fc21ea592ce5ca013705959292c2de85b71d0fa0c84ebd8b541f505d5`, result.Signature) + require.Equal(t, `0x1ba96f3dd6cbbc27aaaafe9d68a5368653f72a5677e365e2505ad207a5e8741949717cfc1cc107583142bfe54b9ba4840f5ad7cb12b224dd97b2fb6a735b93c57a`, result.Signature) }) t.Run("EthGetBlock", func(t *testing.T) { diff --git a/rpc/result.go b/rpc/result.go index 0506235e3..b9cddda88 100644 --- a/rpc/result.go +++ b/rpc/result.go @@ -140,7 +140,7 @@ type ResultAccount struct { type AccountHumanReadable struct { Address crypto.Address - PublicKey crypto.PublicKey + PublicKey *crypto.PublicKey Sequence uint64 Balance uint64 Code []string diff --git a/rpc/rpcdump/rpcdump_grpc.pb.go b/rpc/rpcdump/rpcdump_grpc.pb.go index a64c467cd..a764fc6ea 100644 --- a/rpc/rpcdump/rpcdump_grpc.pb.go +++ b/rpc/rpcdump/rpcdump_grpc.pb.go @@ -13,6 +13,7 @@ import ( // 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 // DumpClient is the client API for Dump service. @@ -31,7 +32,7 @@ func NewDumpClient(cc grpc.ClientConnInterface) DumpClient { } func (c *dumpClient) GetDump(ctx context.Context, in *GetDumpParam, opts ...grpc.CallOption) (Dump_GetDumpClient, error) { - stream, err := c.cc.NewStream(ctx, &_Dump_serviceDesc.Streams[0], "/rpcdump.Dump/GetDump", opts...) + stream, err := c.cc.NewStream(ctx, &Dump_ServiceDesc.Streams[0], "/rpcdump.Dump/GetDump", opts...) if err != nil { return nil, err } @@ -87,7 +88,7 @@ type UnsafeDumpServer interface { } func RegisterDumpServer(s grpc.ServiceRegistrar, srv DumpServer) { - s.RegisterService(&_Dump_serviceDesc, srv) + s.RegisterService(&Dump_ServiceDesc, srv) } func _Dump_GetDump_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -111,7 +112,10 @@ func (x *dumpGetDumpServer) Send(m *dump.Dump) error { return x.ServerStream.SendMsg(m) } -var _Dump_serviceDesc = grpc.ServiceDesc{ +// Dump_ServiceDesc is the grpc.ServiceDesc for Dump service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Dump_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rpcdump.Dump", HandlerType: (*DumpServer)(nil), Methods: []grpc.MethodDesc{}, diff --git a/rpc/rpcevents/rpcevents_grpc.pb.go b/rpc/rpcevents/rpcevents_grpc.pb.go index 3d7f33649..2be3c15e7 100644 --- a/rpc/rpcevents/rpcevents_grpc.pb.go +++ b/rpc/rpcevents/rpcevents_grpc.pb.go @@ -13,6 +13,7 @@ import ( // 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 // ExecutionEventsClient is the client API for ExecutionEvents service. @@ -37,7 +38,7 @@ func NewExecutionEventsClient(cc grpc.ClientConnInterface) ExecutionEventsClient } func (c *executionEventsClient) Stream(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_StreamClient, error) { - stream, err := c.cc.NewStream(ctx, &_ExecutionEvents_serviceDesc.Streams[0], "/rpcevents.ExecutionEvents/Stream", opts...) + stream, err := c.cc.NewStream(ctx, &ExecutionEvents_ServiceDesc.Streams[0], "/rpcevents.ExecutionEvents/Stream", opts...) if err != nil { return nil, err } @@ -78,7 +79,7 @@ func (c *executionEventsClient) Tx(ctx context.Context, in *TxRequest, opts ...g } func (c *executionEventsClient) Events(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_EventsClient, error) { - stream, err := c.cc.NewStream(ctx, &_ExecutionEvents_serviceDesc.Streams[1], "/rpcevents.ExecutionEvents/Events", opts...) + stream, err := c.cc.NewStream(ctx, &ExecutionEvents_ServiceDesc.Streams[1], "/rpcevents.ExecutionEvents/Events", opts...) if err != nil { return nil, err } @@ -146,7 +147,7 @@ type UnsafeExecutionEventsServer interface { } func RegisterExecutionEventsServer(s grpc.ServiceRegistrar, srv ExecutionEventsServer) { - s.RegisterService(&_ExecutionEvents_serviceDesc, srv) + s.RegisterService(&ExecutionEvents_ServiceDesc, srv) } func _ExecutionEvents_Stream_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -209,7 +210,10 @@ func (x *executionEventsEventsServer) Send(m *EventsResponse) error { return x.ServerStream.SendMsg(m) } -var _ExecutionEvents_serviceDesc = grpc.ServiceDesc{ +// ExecutionEvents_ServiceDesc is the grpc.ServiceDesc for ExecutionEvents service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ExecutionEvents_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rpcevents.ExecutionEvents", HandlerType: (*ExecutionEventsServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/rpc/rpcquery/rpcquery_grpc.pb.go b/rpc/rpcquery/rpcquery_grpc.pb.go index 76df0c644..5058f27be 100644 --- a/rpc/rpcquery/rpcquery_grpc.pb.go +++ b/rpc/rpcquery/rpcquery_grpc.pb.go @@ -17,6 +17,7 @@ import ( // 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 // QueryClient is the client API for Query service. @@ -85,7 +86,7 @@ func (c *queryClient) GetStorage(ctx context.Context, in *GetStorageParam, opts } func (c *queryClient) ListAccounts(ctx context.Context, in *ListAccountsParam, opts ...grpc.CallOption) (Query_ListAccountsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[0], "/rpcquery.Query/ListAccounts", opts...) + stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[0], "/rpcquery.Query/ListAccounts", opts...) if err != nil { return nil, err } @@ -126,7 +127,7 @@ func (c *queryClient) GetName(ctx context.Context, in *GetNameParam, opts ...grp } func (c *queryClient) ListNames(ctx context.Context, in *ListNamesParam, opts ...grpc.CallOption) (Query_ListNamesClient, error) { - stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[1], "/rpcquery.Query/ListNames", opts...) + stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[1], "/rpcquery.Query/ListNames", opts...) if err != nil { return nil, err } @@ -194,7 +195,7 @@ func (c *queryClient) GetProposal(ctx context.Context, in *GetProposalParam, opt } func (c *queryClient) ListProposals(ctx context.Context, in *ListProposalsParam, opts ...grpc.CallOption) (Query_ListProposalsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[2], "/rpcquery.Query/ListProposals", opts...) + stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[2], "/rpcquery.Query/ListProposals", opts...) if err != nil { return nil, err } @@ -321,7 +322,7 @@ type UnsafeQueryServer interface { } func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) + s.RegisterService(&Query_ServiceDesc, srv) } func _Query_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -585,7 +586,10 @@ func _Query_GetBlockHeader_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -var _Query_serviceDesc = grpc.ServiceDesc{ +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rpcquery.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/rpc/rpctransact/rpctransact_grpc.pb.go b/rpc/rpctransact/rpctransact_grpc.pb.go index 9a70d6fb1..124ee37c0 100644 --- a/rpc/rpctransact/rpctransact_grpc.pb.go +++ b/rpc/rpctransact/rpctransact_grpc.pb.go @@ -15,6 +15,7 @@ import ( // 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 // TransactClient is the client API for Transact service. @@ -248,7 +249,7 @@ type UnsafeTransactServer interface { } func RegisterTransactServer(s grpc.ServiceRegistrar, srv TransactServer) { - s.RegisterService(&_Transact_serviceDesc, srv) + s.RegisterService(&Transact_ServiceDesc, srv) } func _Transact_BroadcastTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -467,7 +468,10 @@ func _Transact_NameTxAsync_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -var _Transact_serviceDesc = grpc.ServiceDesc{ +// Transact_ServiceDesc is the grpc.ServiceDesc for Transact service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Transact_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rpctransact.Transact", HandlerType: (*TransactServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/txs/envelope.go b/txs/envelope.go index be89d5049..ae4e20065 100644 --- a/txs/envelope.go +++ b/txs/envelope.go @@ -50,7 +50,7 @@ func (s *Signatory) RealisePublicKey(getter acmstate.AccountGetter) error { return fmt.Errorf("%s: could not get account %v: %v", errPrefix, *s.Address, err) } publicKey := acc.PublicKey - s.PublicKey = &publicKey + s.PublicKey = publicKey } if !s.PublicKey.IsValid() { return fmt.Errorf("%s: public key %v is invalid", errPrefix, *s.PublicKey) @@ -154,7 +154,7 @@ func (txEnv *Envelope) Sign(signingAccounts ...acm.AddressableSigner) error { publicKey := sa.GetPublicKey() txEnv.Signatories = append(txEnv.Signatories, Signatory{ Address: &address, - PublicKey: &publicKey, + PublicKey: publicKey, Signature: sig, }) } diff --git a/txs/ethereum_tx.go b/txs/ethereum_tx.go new file mode 100644 index 000000000..cee57370c --- /dev/null +++ b/txs/ethereum_tx.go @@ -0,0 +1,125 @@ +package txs + +import ( + "fmt" + "math/big" + + "github.com/tmthrgd/go-hex" + + "github.com/btcsuite/btcd/btcec" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding/rlp" +) + +// Order matters for serialisation +type EthRawTx struct { + Sequence uint64 `json:"nonce"` + GasPrice uint64 `json:"gasPrice"` + GasLimit uint64 `json:"gasLimit"` + To []byte `json:"to"` + Amount *big.Int `json:"value"` + Data []byte `json:"data"` + ChainID *big.Int `json:"chainID"` + + V *big.Int + R *big.Int + S *big.Int +} + +func RawTxFromEnvelope(txEnv *Envelope) (*EthRawTx, error) { + if txEnv.GetEncoding() != Envelope_RLP { + return nil, fmt.Errorf("can only form EthRawTx from RLP-encoded Envelope") + } + rawTx, err := txEnv.Tx.RLPRawTx() + if err != nil { + return nil, err + } + if len(txEnv.Signatories) == 0 { + return rawTx, nil + } + if len(txEnv.Signatories) > 1 { + return nil, fmt.Errorf("can only form EthRawTx from Envelope with a zero or one signatories") + } + sig, err := txEnv.Signatories[0].Signature.GetEthSignature(txEnv.Tx.ChainID) + if err != nil { + return nil, err + } + // Link signature values into EthRawTx + rawTx.V = &sig.V + rawTx.R = &sig.R + rawTx.S = &sig.S + return rawTx, nil +} + +func (tx *EthRawTx) RecoverPublicKey() (*crypto.PublicKey, *crypto.Signature, error) { + hash, err := tx.Hash() + if err != nil { + return nil, nil, err + } + if tx.R.Sign() == 0 || tx.S.Sign() == 0 { + return nil, nil, fmt.Errorf("EthRawTx does not appear to be signed") + } + ethSig := crypto.EIP155Signature{ + crypto.Secp256k1Signature{ + V: *tx.V, + R: *tx.R, + S: *tx.S, + }, + } + compactSig, err := ethSig.ToCompactSignature() + if err != nil { + return nil, nil, err + } + pubKey, compressed, err := btcec.RecoverCompact(btcec.S256(), compactSig, hash) + if err != nil { + return nil, nil, err + } + var pubKeyBytes []byte + if compressed { + pubKeyBytes = pubKey.SerializeCompressed() + } else { + pubKeyBytes = pubKey.SerializeUncompressed() + } + publicKey, err := crypto.PublicKeyFromBytes(pubKeyBytes, crypto.CurveTypeSecp256k1) + if err != nil { + return nil, nil, err + } + signature, err := crypto.SignatureFromBytes(compactSig, crypto.CurveTypeSecp256k1) + if err != nil { + return nil, nil, err + } + return publicKey, signature, nil +} + +func (tx *EthRawTx) SignBytes() ([]byte, error) { + return rlp.Encode([]interface{}{ + tx.Sequence, + tx.GasPrice, + tx.GasLimit, + tx.To, + tx.Amount, + tx.Data, + tx.ChainID, + uint(0), uint(0), + }) +} + +func (tx *EthRawTx) Hash() ([]byte, error) { + enc, err := tx.SignBytes() + if err != nil { + return nil, err + } + return crypto.Keccak256(enc), nil +} + +func (tx *EthRawTx) Marshal() ([]byte, error) { + return rlp.Encode(tx) +} + +func (tx *EthRawTx) MarshalString() (string, error) { + bs, err := tx.Marshal() + if err != nil { + return "", err + } + return "0x" + hex.EncodeToString(bs), nil +} diff --git a/txs/payload/bond_tx.go b/txs/payload/bond_tx.go index d42c0722d..1c8750a4a 100644 --- a/txs/payload/bond_tx.go +++ b/txs/payload/bond_tx.go @@ -28,7 +28,7 @@ func (tx *BondTx) String() string { return fmt.Sprintf("BondTx{%v}", tx.Input) } -func (tx *BondTx) AddInput(st acmstate.AccountGetter, pubkey crypto.PublicKey, amt uint64) error { +func (tx *BondTx) AddInput(st acmstate.AccountGetter, pubkey *crypto.PublicKey, amt uint64) error { addr := pubkey.GetAddress() acc, err := st.GetAccount(addr) if err != nil { @@ -40,7 +40,7 @@ func (tx *BondTx) AddInput(st acmstate.AccountGetter, pubkey crypto.PublicKey, a return tx.AddInputWithSequence(pubkey, amt, acc.Sequence+uint64(1)) } -func (tx *BondTx) AddInputWithSequence(pubkey crypto.PublicKey, amt uint64, sequence uint64) error { +func (tx *BondTx) AddInputWithSequence(pubkey *crypto.PublicKey, amt uint64, sequence uint64) error { tx.Input = &TxInput{ Address: pubkey.GetAddress(), Amount: amt, diff --git a/txs/payload/call_tx.go b/txs/payload/call_tx.go index 2806d5996..7827ec3f4 100644 --- a/txs/payload/call_tx.go +++ b/txs/payload/call_tx.go @@ -7,7 +7,7 @@ import ( "github.com/hyperledger/burrow/crypto" ) -func NewCallTx(st acmstate.AccountGetter, from crypto.PublicKey, to *crypto.Address, data []byte, +func NewCallTx(st acmstate.AccountGetter, from *crypto.PublicKey, to *crypto.Address, data []byte, amt, gasLimit, fee uint64) (*CallTx, error) { addr := from.GetAddress() @@ -23,7 +23,7 @@ func NewCallTx(st acmstate.AccountGetter, from crypto.PublicKey, to *crypto.Addr return NewCallTxWithSequence(from, to, data, amt, gasLimit, fee, sequence), nil } -func NewCallTxWithSequence(from crypto.PublicKey, to *crypto.Address, data []byte, +func NewCallTxWithSequence(from *crypto.PublicKey, to *crypto.Address, data []byte, amt, gasLimit, fee, sequence uint64) *CallTx { input := &TxInput{ Address: from.GetAddress(), diff --git a/txs/payload/gov_tx.go b/txs/payload/gov_tx.go index e19ac7268..b68a65bd9 100644 --- a/txs/payload/gov_tx.go +++ b/txs/payload/gov_tx.go @@ -52,7 +52,7 @@ func AlterPowerTx(inputAddress crypto.Address, id crypto.Addressable, power uint func AlterBalanceTx(inputAddress crypto.Address, id crypto.Addressable, bal balance.Balances) *GovTx { publicKey := id.GetPublicKey() return UpdateAccountTx(inputAddress, &spec.TemplateAccount{ - PublicKey: &publicKey, + PublicKey: publicKey, Amounts: bal, }) } diff --git a/txs/payload/name_tx.go b/txs/payload/name_tx.go index 9a8076fee..6bef57506 100644 --- a/txs/payload/name_tx.go +++ b/txs/payload/name_tx.go @@ -7,7 +7,7 @@ import ( "github.com/hyperledger/burrow/crypto" ) -func NewNameTx(st acmstate.AccountGetter, from crypto.PublicKey, name, data string, amt, fee uint64) (*NameTx, error) { +func NewNameTx(st acmstate.AccountGetter, from *crypto.PublicKey, name, data string, amt, fee uint64) (*NameTx, error) { addr := from.GetAddress() acc, err := st.GetAccount(addr) if err != nil { @@ -21,7 +21,7 @@ func NewNameTx(st acmstate.AccountGetter, from crypto.PublicKey, name, data stri return NewNameTxWithSequence(from, name, data, amt, fee, sequence), nil } -func NewNameTxWithSequence(from crypto.PublicKey, name, data string, amt, fee, sequence uint64) *NameTx { +func NewNameTxWithSequence(from *crypto.PublicKey, name, data string, amt, fee, sequence uint64) *NameTx { input := &TxInput{ Address: from.GetAddress(), Amount: amt, diff --git a/txs/payload/perms_tx.go b/txs/payload/perms_tx.go index 010b407ee..d21fc99d7 100644 --- a/txs/payload/perms_tx.go +++ b/txs/payload/perms_tx.go @@ -8,7 +8,7 @@ import ( "github.com/hyperledger/burrow/permission" ) -func NewPermsTx(st acmstate.AccountGetter, from crypto.PublicKey, args permission.PermArgs) (*PermsTx, error) { +func NewPermsTx(st acmstate.AccountGetter, from *crypto.PublicKey, args permission.PermArgs) (*PermsTx, error) { addr := from.GetAddress() acc, err := st.GetAccount(addr) if err != nil { @@ -22,7 +22,7 @@ func NewPermsTx(st acmstate.AccountGetter, from crypto.PublicKey, args permissio return NewPermsTxWithSequence(from, args, sequence), nil } -func NewPermsTxWithSequence(from crypto.PublicKey, args permission.PermArgs, sequence uint64) *PermsTx { +func NewPermsTxWithSequence(from *crypto.PublicKey, args permission.PermArgs, sequence uint64) *PermsTx { input := &TxInput{ Address: from.GetAddress(), Amount: 1, // NOTE: amounts can't be 0 ... diff --git a/txs/payload/send_tx.go b/txs/payload/send_tx.go index 8e5848e2e..a6747e9c1 100644 --- a/txs/payload/send_tx.go +++ b/txs/payload/send_tx.go @@ -26,7 +26,7 @@ func (tx *SendTx) String() string { return fmt.Sprintf("SendTx{%v -> %v}", tx.Inputs, tx.Outputs) } -func (tx *SendTx) AddInput(st acmstate.AccountGetter, pubkey crypto.PublicKey, amt uint64) error { +func (tx *SendTx) AddInput(st acmstate.AccountGetter, pubkey *crypto.PublicKey, amt uint64) error { addr := pubkey.GetAddress() acc, err := st.GetAccount(addr) if err != nil { @@ -38,7 +38,7 @@ func (tx *SendTx) AddInput(st acmstate.AccountGetter, pubkey crypto.PublicKey, a return tx.AddInputWithSequence(pubkey, amt, acc.Sequence+1) } -func (tx *SendTx) AddInputWithSequence(pubkey crypto.PublicKey, amt uint64, sequence uint64) error { +func (tx *SendTx) AddInputWithSequence(pubkey *crypto.PublicKey, amt uint64, sequence uint64) error { addr := pubkey.GetAddress() tx.Inputs = append(tx.Inputs, &TxInput{ Address: addr, diff --git a/txs/tx.go b/txs/tx.go index 00d6573a2..146489b90 100644 --- a/txs/tx.go +++ b/txs/tx.go @@ -14,7 +14,6 @@ import ( "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/encoding" - "github.com/hyperledger/burrow/encoding/rlp" "github.com/hyperledger/burrow/event/query" "github.com/hyperledger/burrow/txs/payload" ) @@ -75,36 +74,31 @@ func (tx *Tx) SignBytes(enc Envelope_EncodingType) ([]byte, error) { } return bs, nil case Envelope_RLP: - switch pay := tx.Payload.(type) { - case *payload.CallTx: - input := pay.Input - return RLPEncode( - input.Sequence-1, - pay.GasPrice, - pay.GasLimit, - pay.Address.Bytes(), - balance.NativeToWei(input.Amount).Bytes(), - pay.Data.Bytes(), - ) - default: - return nil, fmt.Errorf("tx type %v not supported for rlp encoding", tx.Payload.Type()) + rawTx, err := tx.RLPRawTx() + if err != nil { + return nil, err } + return rawTx.SignBytes() default: return nil, fmt.Errorf("encoding type %s not supported", enc.String()) } } -func RLPEncode(seq, gasPrice, gasLimit uint64, address, amount, data []byte) ([]byte, error) { - return rlp.Encode([]interface{}{ - seq, // nonce - gasPrice, // gasPrice - gasLimit, // gasLimit - address, // to - amount, // value - data, // data - uint64(1), // chainID - uint(0), uint(0), - }) +func (tx *Tx) RLPRawTx() (*EthRawTx, error) { + switch payload := tx.Payload.(type) { + case *payload.CallTx: + return &EthRawTx{ + Sequence: payload.Input.Sequence, + GasPrice: payload.GasPrice, + GasLimit: payload.GasLimit, + To: payload.Address.Bytes(), + Amount: balance.NativeToWei(payload.Input.Amount), + Data: payload.Data.Bytes(), + ChainID: crypto.GetEthChainID(tx.ChainID), + }, nil + default: + return nil, fmt.Errorf("tx type %v not supported for rlp encoding", tx.Payload.Type()) + } } // Serialisation intermediate for switching on type From 0afe5409d1d53a1e2776d4f5741e3c3e5decc49a Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Mon, 1 Feb 2021 17:48:20 +0100 Subject: [PATCH 131/185] Implement cross-engine call dispatch for eWASM - Implement the eWASM `call` syscall to support calling contracts - Wire up WASM VM as a Disptacher so it can call EVM and Natives (including Precompiles) as well as other WASM contracts. - To support 128-bit wide (and 256-bit wide EVM!) values use big.Int for Value and Gas. Note the Account model currently still uses uint64 so outside of the execution machinery we still throw an error if a balance would overflow uint64. This paves the way for relaxing this requirement and making account balances etc. - exec.CallData `Value` and `Gas` are now the big-endian big.Int bytes rather than uint64 to support the above. - EVM and WASM now share calling and some other code. EVM now more strictly throws errors that are not ExecutionReverted becuase it probably always should have and makes it more consistent with WASM. WASM uses panics to transmit its errors. If we have errors that should not halt execution (AKA 'non-trapping') we should probably explicitly encode this fact into the coded errors and act accordingly and consistenly in WASM and EVM Signed-off-by: Silas Davis --- binary/integer.go | 18 ++ binary/integer_test.go | 7 + execution/config.go | 4 +- execution/contexts/call_context.go | 23 +- execution/{native => engine}/account.go | 46 ++- execution/{native => engine}/account_test.go | 9 +- execution/engine/accounts.go | 98 ++++++ execution/engine/blockchain.go | 30 ++ execution/engine/call.go | 157 ++++++++++ execution/engine/call_frame.go | 10 + execution/engine/callable.go | 6 +- execution/engine/dispatcher.go | 26 ++ execution/{native => engine}/gas.go | 20 +- execution/{evm => engine}/memory.go | 7 +- execution/{evm => engine}/memory_test.go | 2 +- execution/evm/contract.go | 280 ++++------------- execution/evm/evm.go | 14 +- execution/evm/evm_test.go | 300 ++++++++----------- execution/evm/precompiles_test.go | 5 +- execution/evm/stack.go | 21 +- execution/evm/stack_test.go | 25 +- execution/exec/call_event.go | 2 + execution/exec/exec.pb.go | 106 ++++--- execution/execution_test.go | 4 +- execution/native/call.go | 39 --- execution/native/contract.go | 8 +- execution/native/function.go | 4 +- execution/native/permissions.go | 43 +-- execution/native/permissions_test.go | 11 +- execution/native/precompiles.go | 48 ++- execution/wasm/contract.go | 280 +++++++++++++++++ execution/wasm/wasm.go | 264 ++++------------ execution/wasm/wasm_test.go | 21 +- js/proto/exec_pb.d.ts | 16 +- js/proto/exec_pb.js | 88 ++++-- keys/keys_grpc.pb.go | 8 +- protobuf/exec.proto | 5 +- rpc/rpcdump/rpcdump_grpc.pb.go | 10 +- rpc/rpcevents/rpcevents_grpc.pb.go | 12 +- rpc/rpcquery/rpcquery_grpc.pb.go | 14 +- rpc/rpctransact/rpctransact_grpc.pb.go | 8 +- 41 files changed, 1205 insertions(+), 894 deletions(-) rename execution/{native => engine}/account.go (83%) rename execution/{native => engine}/account_test.go (91%) create mode 100644 execution/engine/accounts.go create mode 100644 execution/engine/blockchain.go create mode 100644 execution/engine/call.go rename execution/{native => engine}/gas.go (55%) rename execution/{evm => engine}/memory.go (98%) rename execution/{evm => engine}/memory_test.go (99%) delete mode 100644 execution/native/call.go create mode 100644 execution/wasm/contract.go diff --git a/binary/integer.go b/binary/integer.go index 396d6f151..443ac59a7 100644 --- a/binary/integer.go +++ b/binary/integer.go @@ -67,6 +67,24 @@ func SignExtend(x *big.Int, n uint) *big.Int { } } +// Reverse bytes in-place +func reverse(bs []byte) []byte { + n := len(bs) - 1 + for i := 0; i < len(bs)/2; i++ { + bs[i], bs[n-i] = bs[n-i], bs[i] + } + return bs +} + +// Note: this function destructively reverses its input slice - pass a copy if the original is used elsewhere +func BigIntFromLittleEndianBytes(bs []byte) *big.Int { + return new(big.Int).SetBytes(reverse(bs)) +} + +func BigIntToLittleEndianBytes(x *big.Int) []byte { + return reverse(x.Bytes()) +} + func andMask(n uint) *big.Int { x := new(big.Int) return x.Sub(x.Lsh(big1, n), big1) diff --git a/binary/integer_test.go b/binary/integer_test.go index 07abb7fff..2655ff381 100644 --- a/binary/integer_test.go +++ b/binary/integer_test.go @@ -133,6 +133,13 @@ func TestSignExtend(t *testing.T) { "0000 0000 0000 0000 0000 0000 0000 0000 0001 0000 1000 0000 1101 0011 1001 0000") } +func TestLittleEndian(t *testing.T) { + x, ok := new(big.Int).SetString("234890234579042368982348972347234789897", 10) + require.True(t, ok) + y := BigIntFromLittleEndianBytes(BigIntToLittleEndianBytes(x)) + require.Equal(t, x.Cmp(y), 0) +} + func assertSignExtend(t *testing.T, extendedBits int, embeddedBits uint, inputString, expectedString string) bool { input := intFromString(t, extendedBits, inputString) expected := intFromString(t, extendedBits, expectedString) diff --git a/execution/config.go b/execution/config.go index 09717d7de..dfecfca25 100644 --- a/execution/config.go +++ b/execution/config.go @@ -3,6 +3,8 @@ package execution import ( "fmt" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/evm" ) @@ -45,7 +47,7 @@ func VMOptions(vmOptions evm.Options) func(*executor) { func (ec *ExecutionConfig) ExecutionOptions() ([]Option, error) { var exeOptions []Option vmOptions := evm.Options{ - MemoryProvider: evm.DefaultDynamicMemoryProvider, + MemoryProvider: engine.DefaultDynamicMemoryProvider, CallStackMaxDepth: ec.CallStackMaxDepth, DataStackInitialCapacity: ec.DataStackInitialCapacity, DataStackMaxDepth: ec.DataStackMaxDepth, diff --git a/execution/contexts/call_context.go b/execution/contexts/call_context.go index 178c92753..048d7d522 100644 --- a/execution/contexts/call_context.go +++ b/execution/contexts/call_context.go @@ -2,6 +2,7 @@ package contexts import ( "fmt" + "math/big" "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" @@ -10,7 +11,6 @@ import ( "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm" "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/execution/native" "github.com/hyperledger/burrow/execution/wasm" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/structure" @@ -135,7 +135,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error callee = crypto.NewContractAddress(caller, ctx.txe.TxHash) code = ctx.tx.Data wcode = ctx.tx.WASM - err := native.CreateAccount(txCache, callee) + err := engine.CreateAccount(txCache, callee) if err != nil { return err } @@ -144,7 +144,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error "init_code", code) // store abis - err = native.UpdateContractMeta(txCache, metaCache, callee, ctx.tx.ContractMeta) + err = engine.UpdateContractMeta(txCache, metaCache, callee, ctx.tx.ContractMeta) if err != nil { return err } @@ -184,19 +184,21 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error var ret []byte var err error txHash := ctx.txe.Envelope.Tx.Hash() - gas := ctx.tx.GasLimit + gas := new(big.Int).SetUint64(ctx.tx.GasLimit) params := engine.CallParams{ Origin: caller, Caller: caller, Callee: callee, Input: ctx.tx.Data, - Value: value, - Gas: &gas, + Value: *new(big.Int).SetUint64(value), + Gas: gas, } if len(wcode) != 0 { - ret, err = wasm.RunWASM(txCache, params, wcode) + // TODO: accept options + vm := wasm.Default() + ret, err = vm.Execute(txCache, ctx.Blockchain, ctx.txe, params, wcode) if err != nil { // Failure. Charge the gas fee. The 'value' was otherwise not transferred. ctx.Logger.InfoMsg("Error on WASM execution", @@ -206,7 +208,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error } else { ctx.Logger.TraceMsg("Successful execution") if createContract { - err := native.InitWASMCode(txCache, callee, ret) + err := engine.InitWASMCode(txCache, callee, ret) if err != nil { return err } @@ -233,7 +235,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error } else { ctx.Logger.TraceMsg("Successful execution") if createContract { - err := native.InitEVMCode(txCache, callee, ret) + err := engine.InitEVMCode(txCache, callee, ret) if err != nil { return err } @@ -245,7 +247,8 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error } ctx.CallEvents(err) } - ctx.txe.Return(ret, ctx.tx.GasLimit-gas) + // Gas starts life as a uint64 and should only been reduced (used up) over a transaction so .Uint64() is safe + ctx.txe.Return(ret, ctx.tx.GasLimit-gas.Uint64()) // Create a receipt from the ret and whether it erred. ctx.Logger.TraceMsg("VM Call complete", "caller", caller, diff --git a/execution/native/account.go b/execution/engine/account.go similarity index 83% rename from execution/native/account.go rename to execution/engine/account.go index ac57f4b6a..31ffd5905 100644 --- a/execution/native/account.go +++ b/execution/engine/account.go @@ -1,7 +1,8 @@ -package native +package engine import ( "bytes" + "math/big" "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" @@ -12,23 +13,6 @@ import ( "golang.org/x/crypto/sha3" ) -func CreateAccount(st acmstate.ReaderWriter, address crypto.Address) error { - acc, err := st.GetAccount(address) - if err != nil { - return err - } - if acc != nil { - if acc.NativeName != "" { - return errors.Errorf(errors.Codes.ReservedAddress, - "cannot create account at %v because that address is reserved for a native contract '%s'", - address, acc.NativeName) - } - return errors.Errorf(errors.Codes.DuplicateAddress, - "tried to create an account at an address that already exists: %v", address) - } - return st.UpdateAccount(&acm.Account{Address: address}) -} - func InitEVMCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) error { return initEVMCode(st, address, nil, code) } @@ -38,7 +22,7 @@ func InitChildCode(st acmstate.ReaderWriter, address crypto.Address, parent cryp } func initEVMCode(st acmstate.ReaderWriter, address crypto.Address, parent *crypto.Address, code []byte) error { - acc, err := mustAccount(st, address) + acc, err := MustAccount(st, address) if err != nil { return err } @@ -116,7 +100,7 @@ func codehashPermitted(codehash []byte, metamap []*acm.ContractMeta) bool { } func InitWASMCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) error { - acc, err := mustAccount(st, address) + acc, err := MustAccount(st, address) if err != nil { return err } @@ -133,25 +117,29 @@ func InitWASMCode(st acmstate.ReaderWriter, address crypto.Address, code []byte) return st.UpdateAccount(acc) } -func Transfer(st acmstate.ReaderWriter, from, to crypto.Address, amount uint64) error { - if amount == 0 { +// TODO: consider pushing big.Int usage all the way to account balance +func Transfer(st acmstate.ReaderWriter, from, to crypto.Address, amount *big.Int) error { + if !amount.IsInt64() { + return errors.Errorf(errors.Codes.IntegerOverflow, "transfer amount %v overflows int64", amount) + } + if amount.Sign() == 0 { return nil } - acc, err := mustAccount(st, from) + acc, err := MustAccount(st, from) if err != nil { return err } - if acc.Balance < amount { + if new(big.Int).SetUint64(acc.Balance).Cmp(amount) < 0 { return errors.Codes.InsufficientBalance } err = UpdateAccount(st, from, func(account *acm.Account) error { - return account.SubtractFromBalance(amount) + return account.SubtractFromBalance(amount.Uint64()) }) if err != nil { return err } return UpdateAccount(st, to, func(account *acm.Account) error { - return account.AddToBalance(amount) + return account.AddToBalance(amount.Uint64()) }) } @@ -159,7 +147,7 @@ func UpdateContractMeta(st acmstate.ReaderWriter, metaSt acmstate.MetadataWriter if len(payloadMeta) == 0 { return nil } - acc, err := mustAccount(st, address) + acc, err := MustAccount(st, address) if err != nil { return err } @@ -194,7 +182,7 @@ func RemoveAccount(st acmstate.ReaderWriter, address crypto.Address) error { } func UpdateAccount(st acmstate.ReaderWriter, address crypto.Address, updater func(acc *acm.Account) error) error { - acc, err := mustAccount(st, address) + acc, err := MustAccount(st, address) if err != nil { return err } @@ -205,7 +193,7 @@ func UpdateAccount(st acmstate.ReaderWriter, address crypto.Address, updater fun return st.UpdateAccount(acc) } -func mustAccount(st acmstate.Reader, address crypto.Address) (*acm.Account, error) { +func MustAccount(st acmstate.Reader, address crypto.Address) (*acm.Account, error) { acc, err := st.GetAccount(address) if err != nil { return nil, err diff --git a/execution/native/account_test.go b/execution/engine/account_test.go similarity index 91% rename from execution/native/account_test.go rename to execution/engine/account_test.go index 1510e4519..5e28cbb36 100644 --- a/execution/native/account_test.go +++ b/execution/engine/account_test.go @@ -1,4 +1,4 @@ -package native +package engine import ( "testing" @@ -6,7 +6,6 @@ import ( "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -30,7 +29,7 @@ func TestState_CreateAccount(t *testing.T) { func TestState_Sync(t *testing.T) { backend := acmstate.NewCache(acmstate.NewMemoryState()) - st := engine.NewCallFrame(backend) + st := NewCallFrame(backend) address := AddressFromName("frogs") err := CreateAccount(st, address) @@ -46,7 +45,7 @@ func TestState_Sync(t *testing.T) { } func TestState_NewCache(t *testing.T) { - st := engine.NewCallFrame(acmstate.NewMemoryState()) + st := NewCallFrame(acmstate.NewMemoryState()) address := AddressFromName("frogs") cache, err := st.NewFrame() @@ -64,7 +63,7 @@ func TestState_NewCache(t *testing.T) { err = cache.Sync() require.NoError(t, err) - acc, err = mustAccount(cache, address) + acc, err = MustAccount(cache, address) require.NoError(t, err) assert.Equal(t, amt, acc.Balance) diff --git a/execution/engine/accounts.go b/execution/engine/accounts.go new file mode 100644 index 000000000..6faeee0d5 --- /dev/null +++ b/execution/engine/accounts.go @@ -0,0 +1,98 @@ +package engine + +import ( + "fmt" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/permission" +) + +type Maybe interface { + PushError(err error) bool + Error() error +} + +func GetAccount(st acmstate.Reader, m Maybe, address crypto.Address) *acm.Account { + acc, err := st.GetAccount(address) + if err != nil { + m.PushError(err) + return nil + } + return acc +} + +// Guaranteed to return a non-nil account, if the account does not exist returns a pointer to the zero-value of Account +// and pushes an error. +func MustGetAccount(st acmstate.Reader, m Maybe, address crypto.Address) *acm.Account { + acc := GetAccount(st, m, address) + if acc == nil { + m.PushError(errors.Errorf(errors.Codes.NonExistentAccount, "account %v does not exist", address)) + return &acm.Account{} + } + return acc +} + +func EnsurePermission(callFrame *CallFrame, address crypto.Address, perm permission.PermFlag) error { + hasPermission, err := HasPermission(callFrame, address, perm) + if err != nil { + return err + } else if !hasPermission { + return errors.PermissionDenied{ + Address: address, + Perm: perm, + } + } + return nil +} + +// CONTRACT: it is the duty of the contract writer to call known permissions +// we do not convey if a permission is not set +// (unlike in state/execution, where we guarantee HasPermission is called +// on known permissions and panics else) +// If the perm is not defined in the acc nor set by default in GlobalPermissions, +// this function returns false. +func HasPermission(st acmstate.Reader, address crypto.Address, perm permission.PermFlag) (bool, error) { + acc, err := st.GetAccount(address) + if err != nil { + return false, err + } + if acc == nil { + return false, fmt.Errorf("account %v does not exist", address) + } + globalPerms, err := acmstate.GlobalAccountPermissions(st) + if err != nil { + return false, err + } + perms := acc.Permissions.Base.Compose(globalPerms.Base) + value, err := perms.Get(perm) + if err != nil { + return false, err + } + return value, nil +} + +func CreateAccount(st acmstate.ReaderWriter, address crypto.Address) error { + acc, err := st.GetAccount(address) + if err != nil { + return err + } + if acc != nil { + if acc.NativeName != "" { + return errors.Errorf(errors.Codes.ReservedAddress, + "cannot create account at %v because that address is reserved for a native contract '%s'", + address, acc.NativeName) + } + return errors.Errorf(errors.Codes.DuplicateAddress, + "tried to create an account at an address that already exists: %v", address) + } + return st.UpdateAccount(&acm.Account{Address: address}) +} + +func AddressFromName(name string) (address crypto.Address) { + hash := crypto.Keccak256([]byte(name)) + copy(address[:], hash[len(hash)-crypto.AddressLength:]) + return +} diff --git a/execution/engine/blockchain.go b/execution/engine/blockchain.go new file mode 100644 index 000000000..292f9c58f --- /dev/null +++ b/execution/engine/blockchain.go @@ -0,0 +1,30 @@ +package engine + +import ( + "encoding/binary" + "time" + + "github.com/hyperledger/burrow/execution/errors" +) + +type TestBlockchain struct { + BlockHeight uint64 + BlockTime time.Time +} + +func (b *TestBlockchain) LastBlockHeight() uint64 { + return b.BlockHeight +} + +func (b *TestBlockchain) LastBlockTime() time.Time { + return b.BlockTime +} + +func (b *TestBlockchain) BlockHash(height uint64) ([]byte, error) { + if height > b.BlockHeight { + return nil, errors.Codes.InvalidBlockNumber + } + bs := make([]byte, 32) + binary.BigEndian.PutUint64(bs[24:], height) + return bs, nil +} diff --git a/execution/engine/call.go b/execution/engine/call.go new file mode 100644 index 000000000..3898ae6cf --- /dev/null +++ b/execution/engine/call.go @@ -0,0 +1,157 @@ +package engine + +import ( + "fmt" + "math/big" + + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/permission" +) + +var big64 = big.NewInt(64) + +// Call provides a standard wrapper for implementing Callable.Call with appropriate error handling and event firing. +func Call(state State, params CallParams, execute func(State, CallParams) ([]byte, error)) ([]byte, error) { + maybe := new(errors.Maybe) + if params.CallType == exec.CallTypeCall || params.CallType == exec.CallTypeCode { + // NOTE: Delegate and Static CallTypes do not transfer the value to the callee. + maybe.PushError(Transfer(state.CallFrame, params.Caller, params.Callee, ¶ms.Value)) + } + + output := maybe.Bytes(execute(state, params)) + // fire the post call event (including exception if applicable) and make sure we return the accumulated call error + maybe.PushError(FireCallEvent(state.CallFrame, maybe.Error(), state.EventSink, output, params)) + return output, maybe.Error() +} + +func FireCallEvent(callFrame *CallFrame, callErr error, eventSink exec.EventSink, output []byte, + params CallParams) error { + // fire the post call event (including exception if applicable) + return eventSink.Call(&exec.CallEvent{ + CallType: params.CallType, + CallData: &exec.CallData{ + Caller: params.Caller, + Callee: params.Callee, + Data: params.Input, + Value: params.Value.Bytes(), + Gas: params.Gas.Bytes(), + }, + Origin: params.Origin, + StackDepth: callFrame.CallStackDepth(), + Return: output, + }, errors.AsException(callErr)) +} + +func CallFromSite(st State, dispatcher Dispatcher, site CallParams, target CallParams) ([]byte, error) { + err := EnsurePermission(st.CallFrame, site.Callee, permission.Call) + if err != nil { + return nil, err + } + // Get the arguments from the memory + // EVM contract + err = UseGasNegative(site.Gas, GasGetAccount) + if err != nil { + return nil, err + } + // since CALL is used also for sending funds, + // acc may not exist yet. This is an errors.CodedError for + // CALLCODE, but not for CALL, though I don't think + // ethereum actually cares + acc, err := st.CallFrame.GetAccount(target.Callee) + if err != nil { + return nil, err + } + if acc == nil { + if target.CallType != exec.CallTypeCall { + return nil, errors.Codes.UnknownAddress + } + // We're sending funds to a new account so we must create it first + err := st.CallFrame.CreateAccount(site.Callee, target.Callee) + if err != nil { + return nil, err + } + acc, err = st.CallFrame.GetAccount(target.Callee) + if err != nil { + return nil, err + } + } + + // Establish a stack frame and perform the call + childCallFrame, err := st.CallFrame.NewFrame() + if err != nil { + return nil, err + } + childState := State{ + CallFrame: childCallFrame, + Blockchain: st.Blockchain, + EventSink: st.EventSink, + } + // Ensure that gasLimit is reasonable + if site.Gas.Cmp(target.Gas) < 0 { + // EIP150 - the 63/64 rule - rather than errors.CodedError we pass this specified fraction of the total available gas + gas := new(big.Int) + target.Gas.Sub(site.Gas, gas.Div(site.Gas, big64)) + } + // NOTE: we will return any used gas later. + site.Gas.Sub(site.Gas, target.Gas) + + // Setup callee params for call type + target.Origin = site.Origin + + // Set up the caller/callee context + switch target.CallType { + case exec.CallTypeCall: + // Calls contract at target from this contract normally + // Value: transferred + // Caller: this contract + // Storage: target + // Code: from target + target.Caller = site.Callee + + case exec.CallTypeStatic: + // Calls contract at target from this contract with no state mutation + // Value: not transferred + // Caller: this contract + // Storage: target (read-only) + // Code: from target + target.Caller = site.Callee + + childState.CallFrame.ReadOnly() + childState.EventSink = exec.NewLogFreeEventSink(childState.EventSink) + + case exec.CallTypeCode: + // Calling this contract from itself as if it had the code at target + // Value: transferred + // Caller: this contract + // Storage: this contract + // Code: from target + + target.Caller = site.Callee + target.Callee = site.Callee + + case exec.CallTypeDelegate: + // Calling this contract from the original caller as if it had the code at target + // Value: not transferred + // Caller: original caller + // Storage: this contract + // Code: from target + + target.Caller = site.Caller + target.Callee = site.Callee + + default: + panic(fmt.Errorf("switch statement should be exhaustive so this should not have been reached")) + } + + returnData, err := dispatcher.Dispatch(acc).Call(childState, target) + + if err == nil { + // Sync error is a hard stop + err = childState.CallFrame.Sync() + } + + // Handle remaining gas. + //site.Gas.Add(site.Gas, target.Gas) + return returnData, err +} diff --git a/execution/engine/call_frame.go b/execution/engine/call_frame.go index b565dd511..602fb1a30 100644 --- a/execution/engine/call_frame.go +++ b/execution/engine/call_frame.go @@ -2,7 +2,9 @@ package engine import ( "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/permission" ) type CallFrame struct { @@ -63,3 +65,11 @@ func (st *CallFrame) Sync() error { func (st *CallFrame) CallStackDepth() uint64 { return st.callStackDepth } + +func (st *CallFrame) CreateAccount(creator, address crypto.Address) error { + err := EnsurePermission(st, creator, permission.CreateAccount) + if err != nil { + return err + } + return CreateAccount(st, address) +} diff --git a/execution/engine/callable.go b/execution/engine/callable.go index 219d19257..6d2a492f9 100644 --- a/execution/engine/callable.go +++ b/execution/engine/callable.go @@ -1,6 +1,7 @@ package engine import ( + "math/big" "time" "github.com/hyperledger/burrow/crypto" @@ -19,14 +20,13 @@ type CallParams struct { Caller crypto.Address Callee crypto.Address Input []byte - Value uint64 - Gas *uint64 + Value big.Int + Gas *big.Int } // Effectively a contract, but can either represent a single function or a contract with multiple functions and a selector type Callable interface { Call(state State, params CallParams) (output []byte, err error) - // Fully qualified name of the callable, including any contract qualification } type CallableFunc func(st State, params CallParams) (output []byte, err error) diff --git a/execution/engine/dispatcher.go b/execution/engine/dispatcher.go index f0b74cf8c..793a31bd5 100644 --- a/execution/engine/dispatcher.go +++ b/execution/engine/dispatcher.go @@ -10,12 +10,35 @@ type Dispatcher interface { Dispatch(acc *acm.Account) Callable } +type DispatcherFunc func(acc *acm.Account) Callable + +func (d DispatcherFunc) Dispatch(acc *acm.Account) Callable { + return d(acc) +} + // An ExternalDispatcher is able to Dispatch accounts to external engines as well as Dispatch to itself type ExternalDispatcher interface { Dispatcher SetExternals(externals Dispatcher) } +// An ExternalDispatcher is able to Dispatch accounts to external engines as well as Dispatch to itself +type Externals struct { + // Provide any foreign dispatchers to allow calls between VMs + externals Dispatcher +} + +var _ ExternalDispatcher = (*Externals)(nil) + +func (ed *Externals) Dispatch(acc *acm.Account) Callable { + // Try external calls then fallback to EVM + return ed.externals.Dispatch(acc) +} + +func (ed *Externals) SetExternals(externals Dispatcher) { + ed.externals = externals +} + type Dispatchers []Dispatcher func NewDispatchers(dispatchers ...Dispatcher) Dispatchers { @@ -59,3 +82,6 @@ func (ds Dispatchers) Dispatch(acc *acm.Account) Callable { } return nil } + +type ExternalsStorage struct { +} diff --git a/execution/native/gas.go b/execution/engine/gas.go similarity index 55% rename from execution/native/gas.go rename to execution/engine/gas.go index cf50672dc..332c458e1 100644 --- a/execution/native/gas.go +++ b/execution/engine/gas.go @@ -1,7 +1,13 @@ // Copyright Monax Industries Limited // SPDX-License-Identifier: Apache-2.0 -package native +package engine + +import ( + "math/big" + + "github.com/hyperledger/burrow/execution/errors" +) const ( GasSha3 uint64 = 1 @@ -22,3 +28,15 @@ const ( GasIdentityWord uint64 = 1 GasIdentityBase uint64 = 1 ) + +// Try to deduct gasToUse from gasLeft. If ok return false, otherwise +// set err and return true. +func UseGasNegative(gasLeft *big.Int, gasToUse uint64) errors.CodedError { + delta := new(big.Int).SetUint64(gasToUse) + if gasLeft.Cmp(delta) >= 0 { + gasLeft.Sub(gasLeft, delta) + } else { + return errors.Codes.InsufficientGas + } + return nil +} diff --git a/execution/evm/memory.go b/execution/engine/memory.go similarity index 98% rename from execution/evm/memory.go rename to execution/engine/memory.go index 07a185ca5..9df1add22 100644 --- a/execution/evm/memory.go +++ b/execution/engine/memory.go @@ -1,4 +1,4 @@ -package evm +package engine import ( "fmt" @@ -159,3 +159,8 @@ func (mem *dynamicMemory) ensureCapacity(newCapacity uint64) error { mem.slice = mem.slice[:newCapacity] return nil } + +type fixedMemory struct { + slice []byte + errSink errors.Sink +} diff --git a/execution/evm/memory_test.go b/execution/engine/memory_test.go similarity index 99% rename from execution/evm/memory_test.go rename to execution/engine/memory_test.go index b88bf7388..32c8499a1 100644 --- a/execution/evm/memory_test.go +++ b/execution/engine/memory_test.go @@ -1,4 +1,4 @@ -package evm +package engine import ( "testing" diff --git a/execution/evm/contract.go b/execution/evm/contract.go index b5d1b3f98..65c5f354a 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -9,16 +9,13 @@ import ( "strings" "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/acm/acmstate" . "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm/abi" . "github.com/hyperledger/burrow/execution/evm/asm" "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/execution/native" "github.com/hyperledger/burrow/permission" "github.com/hyperledger/burrow/txs" ) @@ -29,7 +26,7 @@ type Contract struct { } func (c *Contract) Call(state engine.State, params engine.CallParams) ([]byte, error) { - return native.Call(state, params, c.execute) + return engine.Call(state, params, c.execute) } // Executes the EVM code passed in the appropriate context @@ -65,9 +62,9 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e } var op = c.GetSymbol(pc) - c.debugf("(pc) %-3d (op) %-14s (st) %-4d (gas) %d", pc, op.String(), stack.Len(), *params.Gas) + c.debugf("(pc) %-3d (op) %-14s (st) %-4d (gas) %d", pc, op.String(), stack.Len(), params.Gas) // Use BaseOp gas. - maybe.PushError(useGasNegative(params.Gas, native.GasBaseOp)) + maybe.PushError(engine.UseGasNegative(params.Gas, engine.GasBaseOp)) switch op { @@ -321,7 +318,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e } case SHA3: // 0x20 - maybe.PushError(useGasNegative(params.Gas, native.GasSha3)) + maybe.PushError(engine.UseGasNegative(params.Gas, engine.GasSha3)) offset, size := stack.PopBigInt(), stack.PopBigInt() data := memory.Read(offset, size) data = crypto.Keccak256(data) @@ -334,8 +331,8 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case BALANCE: // 0x31 address := stack.PopAddress() - maybe.PushError(useGasNegative(params.Gas, native.GasGetAccount)) - balance := mustGetAccount(st.CallFrame, maybe, address).Balance + maybe.PushError(engine.UseGasNegative(params.Gas, engine.GasGetAccount)) + balance := engine.MustGetAccount(st.CallFrame, maybe, address).Balance stack.Push64(balance) c.debugf(" => %v (%v)\n", balance, address) @@ -348,7 +345,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e c.debugf(" => %v\n", params.Caller) case CALLVALUE: // 0x34 - stack.Push64(params.Value) + stack.PushBigInt(¶ms.Value) c.debugf(" => %v\n", params.Value) case CALLDATALOAD: // 0x35 @@ -389,8 +386,8 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case EXTCODESIZE: // 0x3B address := stack.PopAddress() - maybe.PushError(useGasNegative(params.Gas, native.GasGetAccount)) - acc := mustGetAccount(st.CallFrame, maybe, address) + maybe.PushError(engine.UseGasNegative(params.Gas, engine.GasGetAccount)) + acc := engine.MustGetAccount(st.CallFrame, maybe, address) if acc == nil { stack.Push(Zero256) c.debugf(" => 0\n") @@ -401,8 +398,8 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e } case EXTCODECOPY: // 0x3C address := stack.PopAddress() - maybe.PushError(useGasNegative(params.Gas, native.GasGetAccount)) - acc := mustGetAccount(st.CallFrame, maybe, address) + maybe.PushError(engine.UseGasNegative(params.Gas, engine.GasGetAccount)) + acc := engine.MustGetAccount(st.CallFrame, maybe, address) if acc == nil { maybe.PushError(errors.Codes.UnknownAddress) } else { @@ -434,7 +431,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case EXTCODEHASH: // 0x3F address := stack.PopAddress() - acc := getAccount(st.CallFrame, maybe, address) + acc := engine.GetAccount(st.CallFrame, maybe, address) if acc == nil { // In case the account does not exist 0 is pushed to the stack. stack.Push64(0) @@ -482,7 +479,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e c.debugf(" => %d\n", number) case GASLIMIT: // 0x45 - stack.Push64(*params.Gas) + stack.PushBigInt(params.Gas) c.debugf(" => %v\n", *params.Gas) case POP: // 0x50 @@ -515,7 +512,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case SSTORE: // 0x55 loc, data := stack.Pop(), stack.Pop() - maybe.PushError(useGasNegative(params.Gas, native.GasStorageUpdate)) + maybe.PushError(engine.UseGasNegative(params.Gas, engine.GasStorageUpdate)) maybe.PushError(st.CallFrame.SetStorage(params.Callee, loc, data.Bytes())) c.debugf("%v {%v := %v}\n", params.Callee, loc, data) @@ -546,8 +543,8 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e c.debugf(" => 0x%X\n", capacity) case GAS: // 0x5A - stack.Push64(*params.Gas) - c.debugf(" => %X\n", *params.Gas) + stack.PushBigInt(params.Gas) + c.debugf(" => %X\n", params.Gas) case JUMPDEST: // 0x5B c.debugf("\n") @@ -588,12 +585,12 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case CREATE, CREATE2: // 0xF0, 0xFB returnData = nil - contractValue := stack.Pop64() + contractValue := stack.PopBigInt() offset, size := stack.PopBigInt(), stack.PopBigInt() input := memory.Read(offset, size) // TODO charge for gas to create account _ the code length * GasCreateByte - maybe.PushError(useGasNegative(params.Gas, native.GasCreateAccount)) + maybe.PushError(engine.UseGasNegative(params.Gas, engine.GasCreateAccount)) var newAccountAddress crypto.Address if op == CREATE { @@ -604,19 +601,19 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e newAccountAddress = crypto.NewContractAddress(params.Callee, nonce) } else if op == CREATE2 { salt := stack.Pop() - code := mustGetAccount(st.CallFrame, maybe, params.Callee).EVMCode + code := engine.MustGetAccount(st.CallFrame, maybe, params.Callee).EVMCode newAccountAddress = crypto.NewContractAddress2(params.Callee, salt, code) } // Check the CreateContract permission for this account - if maybe.PushError(ensurePermission(st.CallFrame, params.Callee, permission.CreateContract)) { + if maybe.PushError(engine.EnsurePermission(st.CallFrame, params.Callee, permission.CreateContract)) { continue } // Establish a frame in which the putative account exists childCallFrame, err := st.CallFrame.NewFrame() maybe.PushError(err) - maybe.PushError(native.CreateAccount(childCallFrame, newAccountAddress)) + maybe.PushError(engine.CreateAccount(childCallFrame, newAccountAddress)) // Run the input to get the contract code. // NOTE: no need to copy 'input' as per Call contract. @@ -631,7 +628,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e Caller: params.Callee, Callee: newAccountAddress, Input: input, - Value: contractValue, + Value: *contractValue, Gas: params.Gas, }) if callErr != nil { @@ -641,7 +638,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e returnData = ret } else { // Update the account with its initialised contract code - maybe.PushError(native.InitChildCode(childCallFrame, newAccountAddress, params.Callee, ret)) + maybe.PushError(engine.InitChildCode(childCallFrame, newAccountAddress, params.Callee, ret)) maybe.PushError(childCallFrame.Sync()) stack.PushAddress(newAccountAddress) } @@ -649,11 +646,11 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case CALL, CALLCODE, DELEGATECALL, STATICCALL: // 0xF1, 0xF2, 0xF4, 0xFA returnData = nil - if maybe.PushError(ensurePermission(st.CallFrame, params.Callee, permission.Call)) { + if maybe.PushError(engine.EnsurePermission(st.CallFrame, params.Callee, permission.Call)) { continue } // Pull arguments off stack: - gasLimit := stack.Pop64() + gasLimit := stack.PopBigInt() target := stack.PopAddress() value := params.Value // NOTE: for DELEGATECALL value is preserved from the original @@ -662,7 +659,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e // caller value is used. for CALL and CALLCODE value is stored // on stack and needs to be overwritten from the given value. if op != DELEGATECALL && op != STATICCALL { - value = stack.Pop64() + value = *stack.PopBigInt() } // inputs inOffset, inSize := stack.PopBigInt(), stack.PopBigInt() @@ -671,134 +668,34 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e retSize := stack.Pop64() c.debugf(" => %v\n", target) - // Get the arguments from the memory - // EVM contract - maybe.PushError(useGasNegative(params.Gas, native.GasGetAccount)) - // since CALL is used also for sending funds, - // acc may not exist yet. This is an errors.CodedError for - // CALLCODE, but not for CALL, though I don't think - // ethereum actually cares - acc := getAccount(st.CallFrame, maybe, target) - if acc == nil { - if op != CALL { - maybe.PushError(errors.Codes.UnknownAddress) - continue - } - // We're sending funds to a new account so we must create it first - if maybe.PushError(createAccount(st.CallFrame, params.Callee, target)) { - continue - } - acc = mustGetAccount(st.CallFrame, maybe, target) - } - - // Establish a stack frame and perform the call - childCallFrame, err := st.CallFrame.NewFrame() - if maybe.PushError(err) { - continue - } - childState := engine.State{ - CallFrame: childCallFrame, - Blockchain: st.Blockchain, - EventSink: st.EventSink, - } - // Ensure that gasLimit is reasonable - if *params.Gas < gasLimit { - // EIP150 - the 63/64 rule - rather than errors.CodedError we pass this specified fraction of the total available gas - gasLimit = *params.Gas - *params.Gas/64 - } - // NOTE: we will return any used gas later. - *params.Gas -= gasLimit - - // Setup callee params for call type - - calleeParams := engine.CallParams{ - Origin: params.Origin, - Input: memory.Read(inOffset, inSize), - Value: value, - Gas: &gasLimit, - } - - // Set up the caller/callee context - switch op { - case CALL: - // Calls contract at target from this contract normally - // Value: transferred - // Caller: this contract - // Storage: target - // Code: from target - - calleeParams.CallType = exec.CallTypeCall - calleeParams.Caller = params.Callee - calleeParams.Callee = target - - case STATICCALL: - // Calls contract at target from this contract with no state mutation - // Value: not transferred - // Caller: this contract - // Storage: target (read-only) - // Code: from target - - calleeParams.CallType = exec.CallTypeStatic - calleeParams.Caller = params.Callee - calleeParams.Callee = target - - childState.CallFrame.ReadOnly() - childState.EventSink = exec.NewLogFreeEventSink(childState.EventSink) - - case CALLCODE: - // Calling this contract from itself as if it had the code at target - // Value: transferred - // Caller: this contract - // Storage: this contract - // Code: from target - - calleeParams.CallType = exec.CallTypeCode - calleeParams.Caller = params.Callee - calleeParams.Callee = params.Callee - - case DELEGATECALL: - // Calling this contract from the original caller as if it had the code at target - // Value: not transferred - // Caller: original caller - // Storage: this contract - // Code: from target - - calleeParams.CallType = exec.CallTypeDelegate - calleeParams.Caller = params.Caller - calleeParams.Callee = params.Callee - - default: - panic(fmt.Errorf("switch statement should be exhaustive so this should not have been reached")) - } - - var callErr error - returnData, callErr = c.Dispatch(acc).Call(childState, calleeParams) - - if callErr == nil { - // Sync error is a hard stop - maybe.PushError(childState.CallFrame.Sync()) - } - + var err error + returnData, err = engine.CallFromSite(st, c, params, engine.CallParams{ + CallType: callTypeFromOpCode(op), + Callee: target, + Input: memory.Read(inOffset, inSize), + Value: value, + Gas: gasLimit, + }) // Push result - if callErr != nil { - c.debugf("error from nested sub-call (depth: %v): %s\n", st.CallFrame.CallStackDepth(), callErr.Error()) + if err != nil { + c.debugf("error from nested sub-call (depth: %v): %s\n", st.CallFrame.CallStackDepth(), err) // So we can return nested errors.CodedError if the top level return is an errors.CodedError stack.Push(Zero256) - if errors.GetCode(callErr) == errors.Codes.ExecutionReverted { - memory.Write(retOffset, RightPadBytes(returnData, int(retSize))) - } } else { stack.Push(One256) + } - // Should probably only be necessary when there is no return value and - // returnData is empty, but since EVM expects retSize to be respected this will - // defensively pad or truncate the portion of returnData to be returned. + code := errors.GetCode(err) + if code == errors.Codes.None || code == errors.Codes.ExecutionReverted { memory.Write(retOffset, RightPadBytes(returnData, int(retSize))) + } else { + maybe.PushError(err) } - // Handle remaining gas. - *params.Gas += *calleeParams.Gas + // TODO: decide how to handle this + // Apply refund of any unused gas + params.Gas.Add(params.Gas, gasLimit) c.debugf("resume %s (%v)\n", params.Callee, params.Gas) @@ -821,19 +718,19 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e case SELFDESTRUCT: // 0xFF receiver := stack.PopAddress() - maybe.PushError(useGasNegative(params.Gas, native.GasGetAccount)) - if getAccount(st.CallFrame, maybe, receiver) == nil { + maybe.PushError(engine.UseGasNegative(params.Gas, engine.GasGetAccount)) + if engine.GetAccount(st.CallFrame, maybe, receiver) == nil { // If receiver address doesn't exist, try to create it - maybe.PushError(useGasNegative(params.Gas, native.GasCreateAccount)) - if maybe.PushError(createAccount(st.CallFrame, params.Callee, receiver)) { + maybe.PushError(engine.UseGasNegative(params.Gas, engine.GasCreateAccount)) + if maybe.PushError(st.CallFrame.CreateAccount(params.Callee, receiver)) { continue } } - balance := mustGetAccount(st.CallFrame, maybe, params.Callee).Balance - maybe.PushError(native.UpdateAccount(st.CallFrame, receiver, func(account *acm.Account) error { + balance := engine.MustGetAccount(st.CallFrame, maybe, params.Callee).Balance + maybe.PushError(engine.UpdateAccount(st.CallFrame, receiver, func(account *acm.Account) error { return account.AddToBalance(balance) })) - maybe.PushError(native.RemoveAccount(st.CallFrame, params.Callee)) + maybe.PushError(engine.RemoveAccount(st.CallFrame, params.Callee)) c.debugf(" => (%X) %v\n", receiver[:4], balance) return nil, maybe.Error() @@ -862,58 +759,6 @@ func (c *Contract) jump(to uint64, pc *uint64) error { return nil } -func createAccount(callFrame *engine.CallFrame, creator, address crypto.Address) error { - err := ensurePermission(callFrame, creator, permission.CreateAccount) - if err != nil { - return err - } - return native.CreateAccount(callFrame, address) -} - -func getAccount(st acmstate.Reader, m *errors.Maybe, address crypto.Address) *acm.Account { - acc, err := st.GetAccount(address) - if err != nil { - m.PushError(err) - return nil - } - return acc -} - -// Guaranteed to return a non-nil account, if the account does not exist returns a pointer to the zero-value of Account -// and pushes an error. -func mustGetAccount(st acmstate.Reader, m *errors.Maybe, address crypto.Address) *acm.Account { - acc := getAccount(st, m, address) - if acc == nil { - m.PushError(errors.Errorf(errors.Codes.NonExistentAccount, "account %v does not exist", address)) - return &acm.Account{} - } - return acc -} - -func ensurePermission(callFrame *engine.CallFrame, address crypto.Address, perm permission.PermFlag) error { - hasPermission, err := native.HasPermission(callFrame, address, perm) - if err != nil { - return err - } else if !hasPermission { - return errors.PermissionDenied{ - Address: address, - Perm: perm, - } - } - return nil -} - -// Try to deduct gasToUse from gasLeft. If ok return false, otherwise -// set err and return true. -func useGasNegative(gasLeft *uint64, gasToUse uint64) error { - if *gasLeft >= gasToUse { - *gasLeft -= gasToUse - } else { - return errors.Codes.InsufficientGas - } - return nil -} - // Returns a subslice from offset of length length and a bool // (true iff slice was possible). If the subslice // extends past the end of data it returns A COPY of the segment at the end of @@ -934,14 +779,6 @@ func subslice(data []byte, offset, length uint64) ([]byte, error) { return data[offset : offset+length], nil } -func codeGetOp(code []byte, n uint64) OpCode { - if uint64(len(code)) <= n { - return OpCode(0) // stop - } else { - return OpCode(code[n]) - } -} - // Dump the bytecode being sent to the EVM in the current working directory func dumpTokens(nonce []byte, caller, callee crypto.Address, code []byte) { var tokensString string @@ -978,3 +815,18 @@ func newRevertException(ret []byte) errors.CodedError { } return code } + +func callTypeFromOpCode(o OpCode) exec.CallType { + switch o { + case CALL: + return exec.CallTypeCall + case CALLCODE: + return exec.CallTypeCode + case STATICCALL: + return exec.CallTypeStatic + case DELEGATECALL: + return exec.CallTypeDelegate + default: + return exec.CallTypeInvalid + } +} diff --git a/execution/evm/evm.go b/execution/evm/evm.go index c8b28d4b9..ee569b522 100644 --- a/execution/evm/evm.go +++ b/execution/evm/evm.go @@ -25,7 +25,7 @@ type EVM struct { options Options sequence uint64 // Provide any foreign dispatchers to allow calls between VMs - externals engine.Dispatcher + engine.Externals // User dispatcher.CallableProvider to get access to other VMs logger *logging.Logger } @@ -33,7 +33,7 @@ type EVM struct { // Options are parameters that are generally stable across a burrow configuration. // Defaults will be used for any zero values. type Options struct { - MemoryProvider func(errors.Sink) Memory + MemoryProvider func(errors.Sink) engine.Memory Natives *native.Natives Nonce []byte DebugOpcodes bool @@ -47,7 +47,7 @@ type Options struct { func New(options Options) *EVM { // Set defaults if options.MemoryProvider == nil { - options.MemoryProvider = DefaultDynamicMemoryProvider + options.MemoryProvider = engine.DefaultDynamicMemoryProvider } if options.Logger == nil { options.Logger = logging.NewNoopLogger() @@ -105,19 +105,13 @@ func (vm *EVM) SetLogger(logger *logging.Logger) { } func (vm *EVM) Dispatch(acc *acm.Account) engine.Callable { - // Try external calls then fallback to EVM - callable := vm.externals.Dispatch(acc) + callable := vm.Externals.Dispatch(acc) if callable != nil { return callable } - // This supports empty code calls return vm.Contract(acc.EVMCode) } -func (vm *EVM) SetExternals(externals engine.Dispatcher) { - vm.externals = externals -} - func (vm *EVM) Contract(code []byte) *Contract { return &Contract{ EVM: vm, diff --git a/execution/evm/evm_test.go b/execution/evm/evm_test.go index aba3643c7..342cc1855 100644 --- a/execution/evm/evm_test.go +++ b/execution/evm/evm_test.go @@ -40,15 +40,13 @@ func TestEVM(t *testing.T) { t.Run("BasicLoop", func(t *testing.T) { st := acmstate.NewMemoryState() - blockchain := new(blockchain) + blockchain := new(engine.TestBlockchain) eventSink := exec.NewNoopEventSink() // Create accounts account1 := newAccount(t, st, "1") account2 := newAccount(t, st, "101") - var gas uint64 = 100000 - bytecode := MustSplice(PUSH1, 0x00, PUSH1, 0x20, MSTORE, JUMPDEST, PUSH2, 0x0F, 0x0F, PUSH1, 0x20, MLOAD, SLT, ISZERO, PUSH1, 0x1D, JUMPI, PUSH1, 0x01, PUSH1, 0x20, MLOAD, ADD, PUSH1, 0x20, MSTORE, PUSH1, 0x05, JUMP, JUMPDEST) @@ -57,7 +55,7 @@ func TestEVM(t *testing.T) { output, err := vm.Execute(st, blockchain, eventSink, engine.CallParams{ Caller: account1, Callee: account2, - Gas: &gas, + Gas: big.NewInt(100000), }, bytecode) t.Logf("Output: %v Error: %v\n", output, err) t.Logf("Call took: %v", time.Since(start)) @@ -69,11 +67,11 @@ func TestEVM(t *testing.T) { account1 := newAccount(t, st, "1") account2 := newAccount(t, st, "101") - var gas uint64 = 100000 + gas := big.NewInt(100000) //Shift left 0 bytecode := MustSplice(PUSH1, 0x01, PUSH1, 0x00, SHL, return1()) - output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + output, err := call(vm, st, account1, account2, bytecode, nil, gas) value := []byte{0x1} expected := LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -87,7 +85,7 @@ func TestEVM(t *testing.T) { //Alternative shift left 0 bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x00, SHL, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} @@ -101,7 +99,7 @@ func TestEVM(t *testing.T) { //Shift left 1 bytecode = MustSplice(PUSH1, 0x01, PUSH1, 0x01, SHL, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x2} expected = LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -115,7 +113,7 @@ func TestEVM(t *testing.T) { //Alternative shift left 1 bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x01, SHL, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x2} expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE} @@ -131,7 +129,7 @@ func TestEVM(t *testing.T) { //Alternative shift left 1 bytecode = MustSplice(PUSH32, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x01, SHL, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE} @@ -145,7 +143,7 @@ func TestEVM(t *testing.T) { //Shift left 255 bytecode = MustSplice(PUSH1, 0x01, PUSH1, 0xFF, SHL, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x80} expected = RightPadBytes(value, 32) assert.Equal(t, expected, output) @@ -159,7 +157,7 @@ func TestEVM(t *testing.T) { //Alternative shift left 255 bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0xFF, SHL, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x80} expected = RightPadBytes(value, 32) assert.Equal(t, expected, output) @@ -172,7 +170,7 @@ func TestEVM(t *testing.T) { //Shift left 256 (overflow) bytecode = MustSplice(PUSH1, 0x01, PUSH2, 0x01, 0x00, SHL, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x00} expected = LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -187,7 +185,7 @@ func TestEVM(t *testing.T) { bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH2, 0x01, 0x00, SHL, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x00} expected = LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -200,7 +198,7 @@ func TestEVM(t *testing.T) { //Shift left 257 (overflow) bytecode = MustSplice(PUSH1, 0x01, PUSH2, 0x01, 0x01, SHL, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x00} expected = LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -217,11 +215,11 @@ func TestEVM(t *testing.T) { account1 := newAccount(t, st, "1") account2 := newAccount(t, st, "101") - var gas uint64 = 100000 + gas := big.NewInt(100000) //Shift right 0 bytecode := MustSplice(PUSH1, 0x01, PUSH1, 0x00, SHR, return1()) - output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + output, err := call(vm, st, account1, account2, bytecode, nil, gas) value := []byte{0x1} expected := LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -235,7 +233,7 @@ func TestEVM(t *testing.T) { //Alternative shift right 0 bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x00, SHR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} @@ -249,7 +247,7 @@ func TestEVM(t *testing.T) { //Shift right 1 bytecode = MustSplice(PUSH1, 0x01, PUSH1, 0x01, SHR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x00} expected = LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -263,7 +261,7 @@ func TestEVM(t *testing.T) { //Alternative shift right 1 bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0x01, SHR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x40} expected = RightPadBytes(value, 32) assert.Equal(t, expected, output) @@ -277,7 +275,7 @@ func TestEVM(t *testing.T) { //Alternative shift right 1 bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x01, SHR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) expected = []byte{0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} @@ -292,7 +290,7 @@ func TestEVM(t *testing.T) { //Shift right 255 bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0xFF, SHR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x1} expected = LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -306,7 +304,7 @@ func TestEVM(t *testing.T) { //Alternative shift right 255 bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0xFF, SHR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x1} expected = LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -321,7 +319,7 @@ func TestEVM(t *testing.T) { bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH2, 0x01, 0x00, SHR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x00} expected = LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -336,7 +334,7 @@ func TestEVM(t *testing.T) { bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH2, 0x01, 0x00, SHR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x00} expected = LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -351,7 +349,7 @@ func TestEVM(t *testing.T) { bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH2, 0x01, 0x01, SHR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x00} expected = LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -368,11 +366,11 @@ func TestEVM(t *testing.T) { account1 := newAccount(t, st, "1") account2 := newAccount(t, st, "101") - var gas uint64 = 100000 + gas := big.NewInt(100000) //Shift arith right 0 bytecode := MustSplice(PUSH1, 0x01, PUSH1, 0x00, SAR, return1()) - output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + output, err := call(vm, st, account1, account2, bytecode, nil, gas) value := []byte{0x1} expected := LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -386,7 +384,7 @@ func TestEVM(t *testing.T) { //Alternative arith shift right 0 bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x00, SAR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} @@ -400,7 +398,7 @@ func TestEVM(t *testing.T) { //Shift arith right 1 bytecode = MustSplice(PUSH1, 0x01, PUSH1, 0x01, SAR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x00} expected = LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -414,7 +412,7 @@ func TestEVM(t *testing.T) { //Alternative shift arith right 1 bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0x01, SAR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0xc0} expected = RightPadBytes(value, 32) assert.Equal(t, expected, output) @@ -428,7 +426,7 @@ func TestEVM(t *testing.T) { //Alternative shift arith right 1 bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0x01, SAR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} @@ -443,7 +441,7 @@ func TestEVM(t *testing.T) { //Shift arith right 255 bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0xFF, SAR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} @@ -458,7 +456,7 @@ func TestEVM(t *testing.T) { //Alternative shift arith right 255 bytecode = MustSplice(PUSH32, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0xFF, SAR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} @@ -473,7 +471,7 @@ func TestEVM(t *testing.T) { //Alternative shift arith right 255 bytecode = MustSplice(PUSH32, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH1, 0xFF, SAR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []uint8([]byte{0x00}) expected = RightPadBytes(value, 32) assert.Equal(t, expected, output) @@ -488,7 +486,7 @@ func TestEVM(t *testing.T) { bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH2, 0x01, 0x00, SAR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) expected = []uint8([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}) @@ -504,7 +502,7 @@ func TestEVM(t *testing.T) { bytecode = MustSplice(PUSH32, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, PUSH2, 0x01, 0x00, SAR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) value = []byte{0x00} expected = LeftPadBytes(value, 32) assert.Equal(t, expected, output) @@ -519,7 +517,7 @@ func TestEVM(t *testing.T) { bytecode = MustSplice(PUSH32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH2, 0x01, 0x01, SAR, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) expected = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} @@ -540,14 +538,14 @@ func TestEVM(t *testing.T) { account1 := newAccount(t, st, "1") account2 := newAccount(t, st, "2") - var gas uint64 = 100000 + gas := big.NewInt(100000) bytecode := MustSplice(PUSH1, 0x10, JUMP) var err error ch := make(chan struct{}) go func() { - _, err = call(vm, st, account1, account2, bytecode, nil, &gas) + _, err = call(vm, st, account1, account2, bytecode, nil, gas) ch <- struct{}{} }() tick := time.NewTicker(time.Second * 2) @@ -568,7 +566,7 @@ func TestEVM(t *testing.T) { account1 := newAccount(t, st, "1, 2, 3") account2 := newAccount(t, st, "3, 2, 1") - var gas uint64 = 1000 + gas := big.NewInt(1000) bytecode := MustSplice(PUSH3, 0x0F, 0x42, 0x40, CALLER, SSTORE, PUSH29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -585,7 +583,7 @@ func TestEVM(t *testing.T) { JUMPDEST, POP, JUMPDEST, PUSH1, 0x00, PUSH1, 0x00, RETURN) data := hex.MustDecodeString("693200CE0000000000000000000000004B4363CDE27C2EB05E66357DB05BC5C88F850C1A0000000000000000000000000000000000000000000000000000000000000005") - output, err := call(vm, st, account1, account2, bytecode, data, &gas) + output, err := call(vm, st, account1, account2, bytecode, data, gas) t.Logf("Output: %v Error: %v\n", output, err) if err != nil { t.Fatal(err) @@ -606,7 +604,7 @@ func TestEVM(t *testing.T) { err := st.SetStorage(account1, LeftPadWord256(key), value) require.NoError(t, err) - var gas uint64 = 100000 + gas := big.NewInt(100000) bytecode := MustSplice(PUSH13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x64, 0x61, 0x74, 0x61, PUSH1, 0x00, SSTORE, PUSH32, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6D, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, @@ -617,7 +615,7 @@ func TestEVM(t *testing.T) { 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0x00, MSTORE, PUSH1, 0x0E, PUSH1, 0x00, REVERT)*/ - output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + output, err := call(vm, st, account1, account2, bytecode, nil, gas) assert.Error(t, err, "Expected execution reverted error") storageVal, err := st.GetStorage(account1, LeftPadWord256(key)) @@ -642,20 +640,20 @@ func TestEVM(t *testing.T) { //---------------------------------------------- // account2 has insufficient balance, should fail - txe := runVM(st, account1, account2, contractCode, 100000) - exCalls := txe.ExceptionalCalls() - require.Len(t, exCalls, 1) - require.Equal(t, errors.Codes.InsufficientBalance, errors.GetCode(exCalls[0].Header.Exception)) + //txe := runVM(st, account1, account2, contractCode, 100000) + //exCalls := txe.ExceptionalCalls() + //require.Len(t, exCalls, 1) + //require.Equal(t, errors.Codes.InsufficientBalance, errors.GetCode(exCalls[0].Header.Exception)) //---------------------------------------------- // give account2 sufficient balance, should pass addToBalance(t, st, account2, 100000) - txe = runVM(st, account1, account2, contractCode, 1000) - assert.Nil(t, txe.Exception, "Should have sufficient balance") + //txe = runVM(st, account1, account2, contractCode, 1000) + //assert.Nil(t, txe.Exception, "Should have sufficient balance") //---------------------------------------------- // insufficient gas, should fail - txe = runVM(st, account1, account2, contractCode, 100) + txe := runVM(st, account1, account2, contractCode, 19) assert.NotNil(t, txe.Exception, "Expected insufficient gas error") }) @@ -667,7 +665,7 @@ func TestEVM(t *testing.T) { var inOff, inSize, retOff, retSize byte logDefault := MustSplice(PUSH1, inSize, PUSH1, inOff) - testRecipient := native.AddressFromName("1") + testRecipient := engine.AddressFromName("1") // check all illegal state modifications in child staticcall frame for _, illegalContractCode := range []acm.Bytecode{ MustSplice(PUSH9, "arbitrary", PUSH1, 0x00, SSTORE), @@ -761,9 +759,9 @@ func TestEVM(t *testing.T) { binary.BigEndian.PutUint64(nonce[txs.HashLength:], 1) addr := crypto.NewContractAddress(callee, nonce) - var gas uint64 = 100000 + gas := big.NewInt(100000) caller := newAccount(t, st, "1, 2, 3") - output, err := call(vm, st, caller, callee, code, nil, &gas) + output, err := call(vm, st, caller, callee, code, nil, gas) assert.NoError(t, err, "Should return new address without error") assert.Equal(t, addr.Bytes(), output, "Addresses should be equal") }) @@ -778,9 +776,9 @@ func TestEVM(t *testing.T) { callee := makeAccountWithCode(t, st, "callee", code) addr := crypto.NewContractAddress2(callee, salt, code) - var gas uint64 = 100000 + gas := big.NewInt(100000) caller := newAccount(t, st, "1, 2, 3") - output, err := call(vm, st, caller, callee, code, nil, &gas) + output, err := call(vm, st, caller, callee, code, nil, gas) assert.NoError(t, err, "Should return new address without error") assert.Equal(t, addr.Bytes(), output, "Returned value not equal to create2 address") }) @@ -802,16 +800,13 @@ func TestEVM(t *testing.T) { callee := makeAccountWithCode(t, st, "callee", MustSplice(PUSH1, calleeReturnValue, PUSH1, 0, MSTORE, PUSH1, 32, PUSH1, 0, RETURN)) // 6 op codes total - baseOpsCost := native.GasBaseOp * 6 + baseOpsCost := engine.GasBaseOp * 6 // 4 pushes - pushCost := native.GasStackOp * 4 + pushCost := engine.GasStackOp * 4 // 2 pushes 2 pops - returnCost := native.GasStackOp * 4 - // To push success/failure - resumeCost := native.GasStackOp + returnCost := engine.GasStackOp * 4 - // Gas is not allowed to drop to 0 so we add resumecost - delegateCallCost := baseOpsCost + pushCost + returnCost + resumeCost + delegateCallCost := baseOpsCost + pushCost + returnCost // Here we split up the caller code so we can make a DELEGATE call with // different amounts of gas. The value we sandwich in the middle is the amount @@ -823,15 +818,14 @@ func TestEVM(t *testing.T) { callerCodeSuffix := MustSplice(DELEGATECALL, returnWord()) // Perform a delegate call - //callerCode := MustSplice(callerCodePrefix, - // Give just enough gas to make the DELEGATECALL - //delegateCallCost, callerCodeSuffix) - //caller := makeAccountWithCode(t, st, "caller", callerCode) - + //Give just enough gas to make the DELEGATECALL + callerCode := MustSplice(callerCodePrefix, + delegateCallCost, callerCodeSuffix) + caller := makeAccountWithCode(t, st, "caller", callerCode) // Should pass - //txe := runVM(st, caller, callee, callerCode, 100) - //assert.Nil(t, txe.Exception, "Should have sufficient funds for call") - //assert.Equal(t, Int64ToWord256(calleeReturnValue).Bytes(), txe.Result.Return) + txe := runVM(st, caller, callee, callerCode, 100) + assert.Nil(t, txe.Exception, "Should have sufficient funds for call") + assert.Equal(t, Int64ToWord256(calleeReturnValue).Bytes(), txe.Result.Return) callerCode2 := MustSplice(callerCodePrefix, // Shouldn't be enough gas to make call @@ -839,26 +833,25 @@ func TestEVM(t *testing.T) { caller2 := makeAccountWithCode(t, st, "caller2", callerCode2) // Should fail - txe := runVM(st, caller2, callee, callerCode2, 100) + txe = runVM(st, caller2, callee, callerCode2, 100) assert.NotNil(t, txe.Exception, "Should have insufficient gas for call") }) t.Run("MemoryBounds", func(t *testing.T) { st := acmstate.NewMemoryState() - blockchain := new(blockchain) + blockchain := new(engine.TestBlockchain) eventSink := exec.NewNoopEventSink() vm := New(Options{ - MemoryProvider: func(err errors.Sink) Memory { - return NewDynamicMemory(1024, 2048, err) + MemoryProvider: func(err errors.Sink) engine.Memory { + return engine.NewDynamicMemory(1024, 2048, err) }, }) caller := makeAccountWithCode(t, st, "caller", nil) callee := makeAccountWithCode(t, st, "callee", nil) - gas := uint64(100000) word := One256 // This attempts to store a value at the memory boundary and return it params := engine.CallParams{ - Gas: &gas, + Gas: big.NewInt(100000), Caller: caller, Callee: callee, } @@ -899,7 +892,7 @@ func TestEVM(t *testing.T) { st := acmstate.NewMemoryState() account1 := newAccount(t, st, "1, 2, 3") account2 := newAccount(t, st, "3, 2, 1") - var gas uint64 = 100000 + gas := big.NewInt(100000) /* pragma solidity ^0.5.4; @@ -920,18 +913,18 @@ func TestEVM(t *testing.T) { var err error // Run the contract initialisation code to obtain the contract code that would be mounted at account2 - contractCode, err := call(vm, st, account1, account2, code, code, &gas) + contractCode, err := call(vm, st, account1, account2, code, code, gas) require.NoError(t, err) // Not needed for this test (since contract code is passed as argument to vm), but this is what an execution // framework must do - err = native.InitEVMCode(st, account2, contractCode) + err = engine.InitEVMCode(st, account2, contractCode) require.NoError(t, err) // Input is the function hash of `get()` input := hex.MustDecodeString("6d4ce63c") - output, err := call(vm, st, account1, account2, contractCode, input, &gas) + output, err := call(vm, st, account1, account2, contractCode, input, gas) require.NoError(t, err) assert.Equal(t, account1.Word256().Bytes(), output) @@ -944,13 +937,13 @@ func TestEVM(t *testing.T) { account1 := newAccount(t, st, "1") account2 := newAccount(t, st, "1, 0, 1") - var gas uint64 = 100000 + gas := big.NewInt(100000) bytecode := MustSplice(PUSH32, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x20, 0x6D, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, PUSH1, 0x00, MSTORE, PUSH1, 0x0E, PUSH1, 0x00, INVALID) - output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + output, err := call(vm, st, account1, account2, bytecode, nil, gas) assert.Equal(t, errors.Codes.ExecutionAborted, errors.GetCode(err)) t.Logf("Output: %v Error: %v\n", output, err) }) @@ -967,7 +960,7 @@ func TestEVM(t *testing.T) { account1 := newAccount(t, st, "1") account2 := makeAccountWithCode(t, st, accountName, callcode) - var gas uint64 = 100000 + gas := big.NewInt(100000) gas1, gas2 := byte(0x1), byte(0x1) value := byte(0x69) @@ -980,7 +973,7 @@ func TestEVM(t *testing.T) { expected := Uint64ToWord256(uint64(len(ret))).Bytes() - output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + output, err := call(vm, st, account1, account2, bytecode, nil, gas) require.NoError(t, err) assert.Equal(t, expected, output) @@ -1003,7 +996,7 @@ func TestEVM(t *testing.T) { account1 := newAccount(t, st, "1") account2 := makeAccountWithCode(t, st, accountName, callcode) - var gas uint64 = 100000 + gas := big.NewInt(100000) gas1, gas2 := byte(0x1), byte(0x1) value := byte(0x69) @@ -1016,7 +1009,7 @@ func TestEVM(t *testing.T) { expected := []byte(ret) - output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + output, err := call(vm, st, account1, account2, bytecode, nil, gas) require.NoError(t, err) assert.Equal(t, expected, output) @@ -1025,18 +1018,17 @@ func TestEVM(t *testing.T) { t.Run("CallNonExistent", func(t *testing.T) { st := acmstate.NewMemoryState() - blockchain := new(blockchain) + blockchain := new(engine.TestBlockchain) eventSink := exec.NewNoopEventSink() account1 := newAccount(t, st, "1") addToBalance(t, st, account1, 100000) - unknownAddress := native.AddressFromName("nonexistent") - var gas uint64 - amt := uint64(100) + unknownAddress := engine.AddressFromName("nonexistent") + params := engine.CallParams{ Caller: account1, Callee: unknownAddress, - Value: amt, - Gas: &gas, + Value: *big.NewInt(100), + Gas: big.NewInt(100000), } _, ex := vm.Execute(st, blockchain, eventSink, params, nil) require.Equal(t, errors.Codes.NonExistentAccount, errors.GetCode(ex), @@ -1048,30 +1040,30 @@ func TestEVM(t *testing.T) { t.Run("GetBlockHash", func(t *testing.T) { st := acmstate.NewMemoryState() - blockchain := new(blockchain) + blockchain := new(engine.TestBlockchain) eventSink := exec.NewNoopEventSink() // Create accounts account1 := newAccount(t, st, "1") account2 := newAccount(t, st, "101") - var gas uint64 = 100000 + var gas = big.NewInt(100000) bytecode := MustSplice(PUSH1, 2, BLOCKHASH) params := engine.CallParams{ Caller: account1, Callee: account2, - Gas: &gas, + Gas: gas, } // Non existing block - blockchain.blockHeight = 1 + blockchain.BlockHeight = 1 _, err := vm.Execute(st, blockchain, eventSink, params, bytecode) require.Equal(t, errors.Codes.InvalidBlockNumber, errors.GetCode(err), "attempt to get block hash of a non-existent block") // Excessive old block - blockchain.blockHeight = 258 + blockchain.BlockHeight = 258 bytecode = MustSplice(PUSH1, 1, BLOCKHASH) _, err = vm.Execute(st, blockchain, eventSink, params, bytecode) @@ -1079,7 +1071,7 @@ func TestEVM(t *testing.T) { "attempt to get block hash of a block outside of allowed range") // Get block hash - blockchain.blockHeight = 257 + blockchain.BlockHeight = 257 bytecode = MustSplice(PUSH1, 2, BLOCKHASH, return1()) output, err := vm.Execute(st, blockchain, eventSink, params, bytecode) @@ -1087,7 +1079,7 @@ func TestEVM(t *testing.T) { assert.Equal(t, LeftPadWord256([]byte{2}), LeftPadWord256(output)) // Get block hash fail - blockchain.blockHeight = 3 + blockchain.BlockHeight = 3 bytecode = MustSplice(PUSH1, 4, BLOCKHASH, return1()) _, err = vm.Execute(st, blockchain, eventSink, params, bytecode) @@ -1176,13 +1168,11 @@ func TestEVM(t *testing.T) { t.Run("DataStackOverflow", func(t *testing.T) { st := acmstate.NewMemoryState() - blockchain := new(blockchain) + blockchain := new(engine.TestBlockchain) eventSink := exec.NewNoopEventSink() account1 := newAccount(t, st, "1, 2, 3") account2 := newAccount(t, st, "3, 2, 1") - var gas uint64 = 100000 - /* pragma solidity ^0.5.4; @@ -1207,7 +1197,7 @@ func TestEVM(t *testing.T) { Caller: account1, Callee: account2, Input: code, - Gas: &gas, + Gas: big.NewInt(1000000), } vm := New(Options{ DataStackMaxDepth: 4, @@ -1226,7 +1216,7 @@ func TestEVM(t *testing.T) { t.Run("CallStackOverflow", func(t *testing.T) { st := acmstate.NewMemoryState() - blockchain := new(blockchain) + blockchain := new(engine.TestBlockchain) eventSink := exec.NewNoopEventSink() txe := new(exec.TxExecution) @@ -1234,7 +1224,6 @@ func TestEVM(t *testing.T) { account2 := newAccount(t, st, "3, 2, 1") // Sender accepts lot of gaz but we run on a caped call stack node - var gas uint64 = 100000 /* pragma solidity ^0.5.4; @@ -1263,7 +1252,7 @@ func TestEVM(t *testing.T) { Caller: account1, Callee: account2, Input: code, - Gas: &gas, + Gas: big.NewInt(1000000), } options := Options{ CallStackMaxDepth: 2, @@ -1273,9 +1262,9 @@ func TestEVM(t *testing.T) { contractCode, err := vm.Execute(st, blockchain, eventSink, params, code) require.NoError(t, err) - err = native.InitEVMCode(st, account1, contractCode) + err = engine.InitEVMCode(st, account1, contractCode) require.NoError(t, err) - err = native.InitEVMCode(st, account2, contractCode) + err = engine.InitEVMCode(st, account2, contractCode) require.NoError(t, err) // keccak256 hash of 'callMeBack()' @@ -1288,7 +1277,7 @@ func TestEVM(t *testing.T) { require.Error(t, err) callError := txe.CallError() require.Error(t, callError) - require.Equal(t, errors.Codes.ExecutionReverted, errors.GetCode(callError)) + require.Equal(t, errors.Codes.CallStackOverflow, errors.GetCode(callError)) // Errors are post-order so first is deepest require.True(t, len(callError.NestedErrors) > 0) deepestErr := callError.NestedErrors[0] @@ -1303,31 +1292,31 @@ func TestEVM(t *testing.T) { account1 := newAccount(t, st, "1") account2 := newAccount(t, st, "101") - var gas uint64 = 100000 + gas := big.NewInt(100000) // The EXTCODEHASH of the account without code is c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 // what is the keccack256 hash of empty data. bytecode := MustSplice(PUSH20, account1, EXTCODEHASH, return1()) - output, err := call(vm, st, account1, account2, bytecode, nil, &gas) + output, err := call(vm, st, account1, account2, bytecode, nil, gas) assert.NoError(t, err) assert.Equal(t, hex.MustDecodeString("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"), output) // The EXTCODEHASH of a native account is hash of its name. bytecode = MustSplice(PUSH1, 0x03, EXTCODEHASH, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) assert.NoError(t, err) assert.Equal(t, crypto.Keccak256([]byte("ripemd160Func")), output) // EXTCODEHASH of non-existent account should be 0 bytecode = MustSplice(PUSH1, 0xff, EXTCODEHASH, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) assert.NoError(t, err) assert.Equal(t, Zero256[:], output) // EXTCODEHASH is the hash of an account code acc := makeAccountWithCode(t, st, "trustedCode", MustSplice(BLOCKHASH, return1())) bytecode = MustSplice(PUSH20, acc, EXTCODEHASH, return1()) - output, err = call(vm, st, account1, account2, bytecode, nil, &gas) + output, err = call(vm, st, account1, account2, bytecode, nil, gas) assert.NoError(t, err) assert.Equal(t, hex.MustDecodeString("010da270094b5199d3e54f89afe4c66cdd658dd8111a41998714227e14e171bd"), output) }) @@ -1343,18 +1332,16 @@ func TestEVM(t *testing.T) { Int64ToWord256(4)} st := acmstate.NewMemoryState() - blockchain := new(blockchain) + blockchain := new(engine.TestBlockchain) // Create accounts address1 := crypto.Address{1, 3, 5, 7, 9} address2 := crypto.Address{2, 4, 6, 8, 10} - err := native.CreateAccount(st, address1) + err := engine.CreateAccount(st, address1) require.NoError(t, err) - err = native.CreateAccount(st, address2) + err = engine.CreateAccount(st, address2) require.NoError(t, err) - var gas uint64 = 100000 - mstore8 := byte(MSTORE8) push1 := byte(PUSH1) log4 := byte(LOG4) @@ -1379,7 +1366,7 @@ func TestEVM(t *testing.T) { params := engine.CallParams{ Caller: address1, Callee: address2, - Gas: &gas, + Gas: big.NewInt(1000000), } _, err = vm.Execute(st, blockchain, txe, params, code) require.NoError(t, err) @@ -1432,8 +1419,8 @@ func TestEVM(t *testing.T) { BigIntToWord256(b), BigIntToWord256(e), BigIntToWord256(m), // base^exp % mod BigIntToWord256(v)) // == expected - gas := uint64(10000000) - out, err := call(vm, st, account1, account2, bytecode, input, &gas) + gas := big.NewInt(10000000) + out, err := call(vm, st, account1, account2, bytecode, input, gas) require.NoError(t, err) @@ -1446,12 +1433,11 @@ func TestEVM(t *testing.T) { t.Run("SDIV", func(t *testing.T) { st := acmstate.NewMemoryState() - blockchain := new(blockchain) + blockchain := new(engine.TestBlockchain) eventSink := exec.NewNoopEventSink() account1 := newAccount(t, st, "1") account2 := newAccount(t, st, "101") - var gas uint64 = 100000 tests := []struct { name string @@ -1499,7 +1485,7 @@ func TestEVM(t *testing.T) { params := engine.CallParams{ Caller: account1, Callee: account2, - Gas: &gas, + Gas: big.NewInt(1000000), } if output, err := vm.Execute(st, blockchain, eventSink, params, tt.bytecode); err != nil || !bytes.Equal(output, tt.expected) { t.Errorf("Reported error in %v.", tt.name) @@ -1511,12 +1497,11 @@ func TestEVM(t *testing.T) { t.Run("SMOD", func(t *testing.T) { st := acmstate.NewMemoryState() - blockchain := new(blockchain) + blockchain := new(engine.TestBlockchain) eventSink := exec.NewNoopEventSink() account1 := newAccount(t, st, "1") account2 := newAccount(t, st, "101") - var gas uint64 = 100000 tests := []struct { name string @@ -1564,7 +1549,7 @@ func TestEVM(t *testing.T) { params := engine.CallParams{ Caller: account1, Callee: account2, - Gas: &gas, + Gas: big.NewInt(1000000), } if output, err := vm.Execute(st, blockchain, eventSink, params, tt.bytecode); err != nil || !bytes.Equal(output, tt.expected) { t.Errorf("Reported error in %v.", tt.name) @@ -1576,12 +1561,11 @@ func TestEVM(t *testing.T) { t.Run("SIGNEXTEND and MSTORE8", func(t *testing.T) { st := acmstate.NewMemoryState() - blockchain := new(blockchain) + blockchain := new(engine.TestBlockchain) eventSink := exec.NewNoopEventSink() account1 := newAccount(t, st, "1") account2 := newAccount(t, st, "101") - var gas uint64 = 100000 tests := []struct { name string @@ -1629,7 +1613,7 @@ func TestEVM(t *testing.T) { params := engine.CallParams{ Caller: account1, Callee: account2, - Gas: &gas, + Gas: big.NewInt(1000000), } if output, err := vm.Execute(st, blockchain, eventSink, params, tt.bytecode); err != nil || !bytes.Equal(output, tt.expected) { t.Errorf("Reported error in %v.", tt.name) @@ -1641,12 +1625,11 @@ func TestEVM(t *testing.T) { t.Run("JUMPDEST", func(t *testing.T) { st := acmstate.NewMemoryState() - blockchain := new(blockchain) + blockchain := new(engine.TestBlockchain) eventSink := exec.NewNoopEventSink() account1 := newAccount(t, st, "1") account2 := newAccount(t, st, "101") - var gas uint64 = 100000 tests := []struct { name string @@ -1671,7 +1654,7 @@ func TestEVM(t *testing.T) { params := engine.CallParams{ Caller: account1, Callee: account2, - Gas: &gas, + Gas: big.NewInt(1000000), } if output, err := vm.Execute(st, blockchain, eventSink, params, tt.bytecode); errors.GetCode(err) != tt.expected_err { t.Errorf("FAIL: %v.", tt.name) @@ -1684,59 +1667,37 @@ func TestEVM(t *testing.T) { }) } -type blockchain struct { - blockHeight uint64 - blockTime time.Time -} - -func (b *blockchain) LastBlockHeight() uint64 { - return b.blockHeight -} - -func (b *blockchain) LastBlockTime() time.Time { - return b.blockTime -} - -func (b *blockchain) BlockHash(height uint64) ([]byte, error) { - if height > b.blockHeight { - return nil, errors.Codes.InvalidBlockNumber - } - bs := make([]byte, 32) - binary.BigEndian.PutUint64(bs[24:], height) - return bs, nil -} - // helpers func newAccount(t testing.TB, st acmstate.ReaderWriter, name string) crypto.Address { - address := native.AddressFromName(name) - err := native.CreateAccount(st, address) + address := engine.AddressFromName(name) + err := engine.CreateAccount(st, address) require.NoError(t, err) return address } func makeAccountWithCode(t testing.TB, st acmstate.ReaderWriter, name string, code []byte) crypto.Address { - address := native.AddressFromName(name) - err := native.CreateAccount(st, address) + address := engine.AddressFromName(name) + err := engine.CreateAccount(st, address) require.NoError(t, err) - err = native.InitEVMCode(st, address, code) + err = engine.InitEVMCode(st, address, code) require.NoError(t, err) addToBalance(t, st, address, 9999999) return address } func addToBalance(t testing.TB, st acmstate.ReaderWriter, address crypto.Address, amount uint64) { - err := native.UpdateAccount(st, address, func(account *acm.Account) error { + err := engine.UpdateAccount(st, address, func(account *acm.Account) error { return account.AddToBalance(amount) }) require.NoError(t, err) } func call(vm *EVM, st acmstate.ReaderWriter, origin, callee crypto.Address, code []byte, input []byte, - gas *uint64) ([]byte, error) { + gas *big.Int) ([]byte, error) { evs := new(exec.Events) - out, err := vm.Execute(st, new(blockchain), evs, engine.CallParams{ + out, err := vm.Execute(st, new(engine.TestBlockchain), evs, engine.CallParams{ Caller: origin, Callee: callee, Input: input, @@ -1783,22 +1744,23 @@ func returnWord() []byte { // event (in the case of no direct error from call we will block waiting for // at least 1 AccCall event) func runVM(st acmstate.ReaderWriter, caller, callee crypto.Address, code []byte, gas uint64) *exec.TxExecution { - gasBefore := gas + gasBefore := new(big.Int).SetUint64(gas) txe := new(exec.TxExecution) vm := New(Options{ DebugOpcodes: true, }) + bigGas := new(big.Int).SetUint64(gas) params := engine.CallParams{ Caller: caller, Callee: callee, - Gas: &gas, + Gas: bigGas, } - output, err := vm.Execute(st, new(blockchain), txe, params, code) + output, err := vm.Execute(st, new(engine.TestBlockchain), txe, params, code) txe.PushError(err) for _, ev := range txe.ExceptionalCalls() { txe.PushError(ev.Header.Exception) } - txe.Return(output, gasBefore-gas) + txe.Return(output, gasBefore.Sub(gasBefore, bigGas).Uint64()) return txe } diff --git a/execution/evm/precompiles_test.go b/execution/evm/precompiles_test.go index fbc3c51b1..180ead428 100644 --- a/execution/evm/precompiles_test.go +++ b/execution/evm/precompiles_test.go @@ -4,6 +4,7 @@ package evm import ( + "math/big" "testing" "github.com/hyperledger/burrow/execution/evm/abi" @@ -47,8 +48,6 @@ func TestECRecover(t *testing.T) { EventSink: exec.NewNoopEventSink(), } - gas := uint64(10000) - spec, err := abi.ReadSpec(solidity.Abi_ECRecover) require.NoError(t, err) funcId := spec.Functions["recoverSigningAddress"].FunctionID @@ -57,7 +56,7 @@ func TestECRecover(t *testing.T) { params := engine.CallParams{ Caller: caller.Address, Input: input, - Gas: &gas, + Gas: big.NewInt(10000), } vm := New(Options{ diff --git a/execution/evm/stack.go b/execution/evm/stack.go index 55c5baf6a..a8e29ff35 100644 --- a/execution/evm/stack.go +++ b/execution/evm/stack.go @@ -8,10 +8,11 @@ import ( "math" "math/big" + "github.com/hyperledger/burrow/execution/engine" + . "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/execution/native" ) // Not goroutine safe @@ -20,11 +21,11 @@ type Stack struct { maxCapacity uint64 ptr int - gas *uint64 + gas *big.Int errSink errors.Sink } -func NewStack(errSink errors.Sink, initialCapacity uint64, maxCapacity uint64, gas *uint64) *Stack { +func NewStack(errSink errors.Sink, initialCapacity uint64, maxCapacity uint64, gas *big.Int) *Stack { return &Stack{ slice: make([]Word256, initialCapacity), ptr: 0, @@ -35,7 +36,7 @@ func NewStack(errSink errors.Sink, initialCapacity uint64, maxCapacity uint64, g } func (st *Stack) Push(d Word256) { - st.useGas(native.GasStackOp) + st.useGas(engine.GasStackOp) err := st.ensureCapacity(uint64(st.ptr) + 1) if err != nil { st.pushErr(errors.Codes.DataStackOverflow) @@ -46,7 +47,7 @@ func (st *Stack) Push(d Word256) { } func (st *Stack) Pop() Word256 { - st.useGas(native.GasStackOp) + st.useGas(engine.GasStackOp) if st.ptr == 0 { st.pushErr(errors.Codes.DataStackUnderflow) return Zero256 @@ -109,7 +110,7 @@ func (st *Stack) Len() int { } func (st *Stack) Swap(n int) { - st.useGas(native.GasStackOp) + st.useGas(engine.GasStackOp) if st.ptr < n { st.pushErr(errors.Codes.DataStackUnderflow) return @@ -118,7 +119,7 @@ func (st *Stack) Swap(n int) { } func (st *Stack) Dup(n int) { - st.useGas(native.GasStackOp) + st.useGas(engine.GasStackOp) if st.ptr < n { st.pushErr(errors.Codes.DataStackUnderflow) return @@ -197,11 +198,7 @@ func (st *Stack) ensureCapacity(newCapacity uint64) error { } func (st *Stack) useGas(gasToUse uint64) { - if *st.gas > gasToUse { - *st.gas -= gasToUse - } else { - st.pushErr(errors.Codes.InsufficientGas) - } + st.pushErr(engine.UseGasNegative(st.gas, gasToUse)) } func (st *Stack) pushErr(err errors.CodedError) { diff --git a/execution/evm/stack_test.go b/execution/evm/stack_test.go index f184f00b7..abd673758 100644 --- a/execution/evm/stack_test.go +++ b/execution/evm/stack_test.go @@ -2,6 +2,7 @@ package evm import ( "math" + "math/big" "testing" "github.com/hyperledger/burrow/binary" @@ -10,9 +11,10 @@ import ( "github.com/stretchr/testify/require" ) +var maxUint64 = big.NewInt(math.MaxInt64) + func TestStack_MaxDepthInt32(t *testing.T) { - var gaz uint64 = math.MaxUint64 - st := NewStack(new(errors.Maybe), 0, 0, &gaz) + st := NewStack(new(errors.Maybe), 0, 0, maxUint64) err := st.ensureCapacity(math.MaxInt32 + 1) assert.Error(t, err) @@ -21,8 +23,7 @@ func TestStack_MaxDepthInt32(t *testing.T) { // Test static memory allocation with unlimited depth - memory should grow func TestStack_UnlimitedAllocation(t *testing.T) { err := new(errors.Maybe) - var gaz uint64 = math.MaxUint64 - st := NewStack(err, 0, 0, &gaz) + st := NewStack(err, 0, 0, maxUint64) st.Push64(math.MaxInt64) require.NoError(t, err.Error()) @@ -33,8 +34,8 @@ func TestStack_UnlimitedAllocation(t *testing.T) { // Test static memory allocation with maximum == initial capacity - memory should not grow func TestStack_StaticAllocation(t *testing.T) { err := new(errors.Maybe) - var gaz uint64 = math.MaxUint64 - st := NewStack(err, 4, 4, &gaz) + + st := NewStack(err, 4, 4, maxUint64) for i := 0; i < 4; i++ { st.Push64(math.MaxInt64) @@ -47,8 +48,8 @@ func TestStack_StaticAllocation(t *testing.T) { // Test writing beyond the current capacity - memory should grow func TestDynamicMemory_PushAhead(t *testing.T) { err := new(errors.Maybe) - var gaz uint64 = math.MaxUint64 - st := NewStack(err, 2, 4, &gaz) + + st := NewStack(err, 2, 4, maxUint64) for i := 0; i < 4; i++ { st.Push64(math.MaxInt64) @@ -61,16 +62,16 @@ func TestDynamicMemory_PushAhead(t *testing.T) { func TestStack_ZeroInitialCapacity(t *testing.T) { err := new(errors.Maybe) - var gaz uint64 = math.MaxUint64 - st := NewStack(err, 0, 16, &gaz) + + st := NewStack(err, 0, 16, maxUint64) require.NoError(t, err.Error()) st.Push64(math.MaxInt64) assert.Equal(t, []binary.Word256{binary.Int64ToWord256(math.MaxInt64)}, st.slice) } func TestStack_ensureCapacity(t *testing.T) { - var gaz uint64 = math.MaxUint64 - st := NewStack(new(errors.Maybe), 4, 16, &gaz) + + st := NewStack(new(errors.Maybe), 4, 16, maxUint64) // Check we can grow within bounds err := st.ensureCapacity(8) assert.NoError(t, err) diff --git a/execution/exec/call_event.go b/execution/exec/call_event.go index 64b721810..63ab6eba2 100644 --- a/execution/exec/call_event.go +++ b/execution/exec/call_event.go @@ -3,6 +3,7 @@ package exec type CallType uint32 const ( + CallTypeInvalid = CallType(1<<32 - 1) CallTypeCall = CallType(0x00) CallTypeCode = CallType(0x01) CallTypeDelegate = CallType(0x02) @@ -10,6 +11,7 @@ const ( ) var nameFromCallType = map[CallType]string{ + CallTypeInvalid: "InvalidCall", CallTypeCall: "Call", CallTypeCode: "CallCode", CallTypeDelegate: "DelegateCall", diff --git a/execution/exec/exec.pb.go b/execution/exec/exec.pb.go index 94721a277..fc390f79d 100644 --- a/execution/exec/exec.pb.go +++ b/execution/exec/exec.pb.go @@ -1264,14 +1264,15 @@ func (*OutputEvent) XXX_MessageName() string { } type CallData struct { - Caller github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Caller,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Caller"` - Callee github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,2,opt,name=Callee,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Callee"` - Data github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,3,opt,name=Data,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"Data"` - Value uint64 `protobuf:"varint,4,opt,name=Value,proto3" json:"Value,omitempty"` - Gas uint64 `protobuf:"varint,5,opt,name=Gas,proto3" json:"Gas,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Caller github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Caller,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Caller"` + Callee github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,2,opt,name=Callee,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Callee"` + Data github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,3,opt,name=Data,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"Data"` + // Bytes of a big integer value + Value []byte `protobuf:"bytes,4,opt,name=Value,proto3" json:"Value,omitempty"` + Gas []byte `protobuf:"bytes,5,opt,name=Gas,proto3" json:"Gas,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CallData) Reset() { *m = CallData{} } @@ -1303,18 +1304,18 @@ func (m *CallData) XXX_DiscardUnknown() { var xxx_messageInfo_CallData proto.InternalMessageInfo -func (m *CallData) GetValue() uint64 { +func (m *CallData) GetValue() []byte { if m != nil { return m.Value } - return 0 + return nil } -func (m *CallData) GetGas() uint64 { +func (m *CallData) GetGas() []byte { if m != nil { return m.Gas } - return 0 + return nil } func (*CallData) XXX_MessageName() string { @@ -1367,7 +1368,7 @@ func init() { proto.RegisterFile("exec.proto", fileDescriptor_4d737c7315c25422) func init() { golang_proto.RegisterFile("exec.proto", fileDescriptor_4d737c7315c25422) } var fileDescriptor_4d737c7315c25422 = []byte{ - // 1311 bytes of a gzipped FileDescriptorProto + // 1314 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, 0x17, 0xef, 0xda, 0x6b, 0xc7, 0x7e, 0x76, 0xfa, 0x6d, 0x47, 0xf9, 0x22, 0xab, 0xaa, 0xec, 0xb2, 0x45, 0xa5, 0x94, 0xb2, 0xae, 0x02, 0x45, 0xa8, 0x48, 0x88, 0xba, 0x09, 0x6d, 0xa0, 0xa4, 0x65, @@ -1445,11 +1446,12 @@ var fileDescriptor_4d737c7315c25422 = []byte{ 0xff, 0x9f, 0x0c, 0xd9, 0x24, 0x1a, 0x3b, 0x9c, 0x21, 0x84, 0x96, 0xb1, 0xd6, 0x67, 0x00, 0xf3, 0xa9, 0x3e, 0x6c, 0xaa, 0x59, 0x9f, 0x43, 0xab, 0xb0, 0x0a, 0x0e, 0xdd, 0xfd, 0x37, 0x15, 0x28, 0x75, 0x56, 0x9c, 0x71, 0xb1, 0xfd, 0xe3, 0xce, 0x2a, 0x1f, 0xb9, 0x37, 0x76, 0x30, 0x9e, 0x28, - 0x1f, 0xf9, 0xc8, 0x55, 0x0f, 0x3e, 0x72, 0x4b, 0x50, 0xbb, 0xe3, 0x8c, 0x53, 0xa6, 0x1f, 0x97, - 0x52, 0x20, 0xc7, 0xa0, 0x7a, 0xd5, 0xd1, 0x2f, 0x7f, 0x71, 0x1c, 0xbc, 0xb7, 0xb5, 0xdd, 0x35, - 0x1e, 0x6d, 0x77, 0x8d, 0x5f, 0xb6, 0xbb, 0xc6, 0x6f, 0xdb, 0x5d, 0xe3, 0xa7, 0x27, 0x5d, 0x63, - 0xeb, 0x49, 0xd7, 0xf8, 0x74, 0x9f, 0x14, 0x98, 0x7e, 0x14, 0xc8, 0xd3, 0x46, 0x5d, 0xde, 0xd7, - 0xaf, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, 0xf2, 0xc4, 0xac, 0x30, 0x8d, 0x0f, 0x00, 0x00, + 0x1f, 0xf9, 0xc8, 0x55, 0x0f, 0x3e, 0x72, 0x4b, 0x50, 0xbb, 0xe3, 0x8c, 0x53, 0x75, 0xad, 0xb6, + 0xa9, 0x12, 0xc8, 0x31, 0xa8, 0x5e, 0x75, 0xd4, 0xcb, 0xbf, 0x4d, 0xc5, 0x71, 0xf0, 0xde, 0xd6, + 0x76, 0xd7, 0x78, 0xb4, 0xdd, 0x35, 0x7e, 0xd9, 0xee, 0x1a, 0xbf, 0x6d, 0x77, 0x8d, 0x9f, 0x9e, + 0x74, 0x8d, 0xad, 0x27, 0x5d, 0xe3, 0xd3, 0x7d, 0x52, 0x60, 0xfa, 0x51, 0x20, 0x4f, 0x1b, 0x75, + 0x79, 0x5f, 0xbf, 0xfe, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xde, 0x53, 0x6b, 0x0d, 0x8d, 0x0f, + 0x00, 0x00, } func (m *StreamEvents) Marshal() (dAtA []byte, err error) { @@ -2619,15 +2621,19 @@ func (m *CallData) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.Gas != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Gas)) + if len(m.Gas) > 0 { + i -= len(m.Gas) + copy(dAtA[i:], m.Gas) + i = encodeVarintExec(dAtA, i, uint64(len(m.Gas))) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x2a } - if m.Value != 0 { - i = encodeVarintExec(dAtA, i, uint64(m.Value)) + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintExec(dAtA, i, uint64(len(m.Value))) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x22 } { size := m.Data.Size() @@ -3150,11 +3156,13 @@ func (m *CallData) Size() (n int) { n += 1 + l + sovExec(uint64(l)) l = m.Data.Size() n += 1 + l + sovExec(uint64(l)) - if m.Value != 0 { - n += 1 + sovExec(uint64(m.Value)) + l = len(m.Value) + if l > 0 { + n += 1 + l + sovExec(uint64(l)) } - if m.Gas != 0 { - n += 1 + sovExec(uint64(m.Gas)) + l = len(m.Gas) + if l > 0 { + n += 1 + l + sovExec(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -6359,10 +6367,10 @@ func (m *CallData) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 4: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - m.Value = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowExec @@ -6372,16 +6380,31 @@ func (m *CallData) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Value |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } + if byteLen < 0 { + return ErrInvalidLengthExec + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExec + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex case 5: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Gas", wireType) } - m.Gas = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowExec @@ -6391,11 +6414,26 @@ func (m *CallData) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Gas |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } + if byteLen < 0 { + return ErrInvalidLengthExec + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExec + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Gas = append(m.Gas[:0], dAtA[iNdEx:postIndex]...) + if m.Gas == nil { + m.Gas = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipExec(dAtA[iNdEx:]) diff --git a/execution/execution_test.go b/execution/execution_test.go index 3fc66a543..3902d9bcf 100644 --- a/execution/execution_test.go +++ b/execution/execution_test.go @@ -11,6 +11,8 @@ import ( "testing" "time" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/bcm" @@ -1255,7 +1257,7 @@ func TestOrigin(t *testing.T) { // Set a contract that stores the origin address in storage at loc loc := []byte{3} - err := native.UpdateAccount(exe.stateCache, calleeAddress, func(acc *acm.Account) error { + err := engine.UpdateAccount(exe.stateCache, calleeAddress, func(acc *acm.Account) error { acc.EVMCode = bc.MustSplice(ORIGIN, PUSH1, loc, SSTORE) return nil }) diff --git a/execution/native/call.go b/execution/native/call.go deleted file mode 100644 index ed23ce17a..000000000 --- a/execution/native/call.go +++ /dev/null @@ -1,39 +0,0 @@ -package native - -import ( - "github.com/hyperledger/burrow/execution/engine" - "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/execution/exec" -) - -// Call provides a standard wrapper for implementing Callable.Call with appropriate error handling and event firing. -func Call(state engine.State, params engine.CallParams, execute func(engine.State, engine.CallParams) ([]byte, error)) ([]byte, error) { - maybe := new(errors.Maybe) - if params.CallType == exec.CallTypeCall || params.CallType == exec.CallTypeCode { - // NOTE: Delegate and Static CallTypes do not transfer the value to the callee. - maybe.PushError(Transfer(state.CallFrame, params.Caller, params.Callee, params.Value)) - } - - output := maybe.Bytes(execute(state, params)) - // fire the post call event (including exception if applicable) and make sure we return the accumulated call error - maybe.PushError(FireCallEvent(state.CallFrame, maybe.Error(), state.EventSink, output, params)) - return output, maybe.Error() -} - -func FireCallEvent(callFrame *engine.CallFrame, callErr error, eventSink exec.EventSink, output []byte, - params engine.CallParams) error { - // fire the post call event (including exception if applicable) - return eventSink.Call(&exec.CallEvent{ - CallType: params.CallType, - CallData: &exec.CallData{ - Caller: params.Caller, - Callee: params.Callee, - Data: params.Input, - Value: params.Value, - Gas: *params.Gas, - }, - Origin: params.Origin, - StackDepth: callFrame.CallStackDepth(), - Return: output, - }, errors.AsException(callErr)) -} diff --git a/execution/native/contract.go b/execution/native/contract.go index cc5779e40..bc91db387 100644 --- a/execution/native/contract.go +++ b/execution/native/contract.go @@ -58,7 +58,7 @@ var _ Native = &Contract{} // Create a new native contract description object by passing a comment, name // and a list of member functions descriptions func NewContract(name string, comment string, logger *logging.Logger, fs ...Function) (*Contract, error) { - address := AddressFromName(name) + address := engine.AddressFromName(name) functionsByID := make(map[abi.FunctionID]*Function, len(fs)) functions := make([]*Function, len(fs)) logger = logger.WithScope("NativeContract") @@ -168,9 +168,3 @@ func (c *Contract) ContractMeta() []*acm.ContractMeta { }, } } - -func AddressFromName(name string) (address crypto.Address) { - hash := crypto.Keccak256([]byte(name)) - copy(address[:], hash[len(hash)-crypto.AddressLength:]) - return -} diff --git a/execution/native/function.go b/execution/native/function.go index c9108323c..f8f9f367f 100644 --- a/execution/native/function.go +++ b/execution/native/function.go @@ -72,12 +72,12 @@ func (f *Function) SetExternals(externals engine.Dispatcher) { } func (f *Function) Call(state engine.State, params engine.CallParams) ([]byte, error) { - return Call(state, params, f.execute) + return engine.Call(state, params, f.execute) } func (f *Function) execute(state engine.State, params engine.CallParams) ([]byte, error) { // check if we have permission to call this function - hasPermission, err := HasPermission(state.CallFrame, params.Caller, f.PermFlag) + hasPermission, err := engine.HasPermission(state.CallFrame, params.Caller, f.PermFlag) if err != nil { return nil, err } diff --git a/execution/native/permissions.go b/execution/native/permissions.go index cfb87d04b..98aa29d69 100644 --- a/execution/native/permissions.go +++ b/execution/native/permissions.go @@ -3,8 +3,9 @@ package native import ( "fmt" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/permission" ) @@ -85,32 +86,6 @@ var Permissions = New().MustContract("Permissions", }, ) -// CONTRACT: it is the duty of the contract writer to call known permissions -// we do not convey if a permission is not set -// (unlike in state/execution, where we guarantee HasPermission is called -// on known permissions and panics else) -// If the perm is not defined in the acc nor set by default in GlobalPermissions, -// this function returns false. -func HasPermission(st acmstate.Reader, address crypto.Address, perm permission.PermFlag) (bool, error) { - acc, err := st.GetAccount(address) - if err != nil { - return false, err - } - if acc == nil { - return false, fmt.Errorf("account %v does not exist", address) - } - globalPerms, err := acmstate.GlobalAccountPermissions(st) - if err != nil { - return false, err - } - perms := acc.Permissions.Base.Compose(globalPerms.Base) - value, err := perms.Get(perm) - if err != nil { - return false, err - } - return value, nil -} - type hasBaseArgs struct { Account crypto.Address Permission uint64 @@ -125,7 +100,7 @@ func hasBase(ctx Context, args hasBaseArgs) (hasBaseRets, error) { if !permN.IsValid() { return hasBaseRets{}, permission.ErrInvalidPermission(permN) } - hasPermission, err := HasPermission(ctx.State, args.Account, permN) + hasPermission, err := engine.HasPermission(ctx.State, args.Account, permN) if err != nil { return hasBaseRets{}, err } @@ -151,7 +126,7 @@ func setBase(ctx Context, args setBaseArgs) (setBaseRets, error) { if !permFlag.IsValid() { return setBaseRets{}, permission.ErrInvalidPermission(permFlag) } - err := UpdateAccount(ctx.State, args.Account, func(acc *acm.Account) error { + err := engine.UpdateAccount(ctx.State, args.Account, func(acc *acm.Account) error { err := acc.Permissions.Base.Set(permFlag, args.Set) return err }) @@ -178,7 +153,7 @@ func unsetBase(ctx Context, args unsetBaseArgs) (unsetBaseRets, error) { if !permFlag.IsValid() { return unsetBaseRets{}, permission.ErrInvalidPermission(permFlag) } - err := UpdateAccount(ctx.State, args.Account, func(acc *acm.Account) error { + err := engine.UpdateAccount(ctx.State, args.Account, func(acc *acm.Account) error { return acc.Permissions.Base.Unset(permFlag) }) if err != nil { @@ -205,7 +180,7 @@ func setGlobal(ctx Context, args setGlobalArgs) (setGlobalRets, error) { if !permFlag.IsValid() { return setGlobalRets{}, permission.ErrInvalidPermission(permFlag) } - err := UpdateAccount(ctx.State, acm.GlobalPermissionsAddress, func(acc *acm.Account) error { + err := engine.UpdateAccount(ctx.State, acm.GlobalPermissionsAddress, func(acc *acm.Account) error { return acc.Permissions.Base.Set(permFlag, args.Set) }) if err != nil { @@ -227,7 +202,7 @@ type hasRoleRets struct { } func hasRole(ctx Context, args hasRoleArgs) (hasRoleRets, error) { - acc, err := mustAccount(ctx.State, args.Account) + acc, err := engine.MustAccount(ctx.State, args.Account) if err != nil { return hasRoleRets{}, err } @@ -249,7 +224,7 @@ type addRoleRets struct { func addRole(ctx Context, args addRoleArgs) (addRoleRets, error) { ret := addRoleRets{} - err := UpdateAccount(ctx.State, args.Account, func(account *acm.Account) error { + err := engine.UpdateAccount(ctx.State, args.Account, func(account *acm.Account) error { ret.Result = account.Permissions.AddRole(args.Role) return nil }) @@ -273,7 +248,7 @@ type removeRoleRets struct { func removeRole(ctx Context, args removeRoleArgs) (removeRoleRets, error) { ret := removeRoleRets{} - err := UpdateAccount(ctx.State, args.Account, func(account *acm.Account) error { + err := engine.UpdateAccount(ctx.State, args.Account, func(account *acm.Account) error { ret.Result = account.Permissions.RemoveRole(args.Role) return nil }) diff --git a/execution/native/permissions_test.go b/execution/native/permissions_test.go index 269f2884e..ebe38fa96 100644 --- a/execution/native/permissions_test.go +++ b/execution/native/permissions_test.go @@ -5,6 +5,7 @@ package native import ( "encoding/hex" + "math/big" "strconv" "strings" "testing" @@ -79,14 +80,12 @@ func TestSNativeContractDescription_Dispatch(t *testing.T) { function := contract.FunctionByName("setBase") require.NotNil(t, function, "Could not get function: %s") funcID := function.Abi().FunctionID - gas := uint64(1000) - // Should fail since we have no permissions input := bc.MustSplice(funcID[:], grantee.Address, permFlagToWord256(permission.CreateAccount)) params := engine.CallParams{ Caller: caller.Address, Input: input, - Gas: &gas, + Gas: big.NewInt(1000), } _, err := contract.Call(state, params) if !assert.Error(t, err, "Should fail due to lack of permissions") { @@ -95,7 +94,7 @@ func TestSNativeContractDescription_Dispatch(t *testing.T) { assert.Equal(t, errors.Codes.NativeFunction, errors.GetCode(err)) // Grant all permissions and dispatch should success - err = UpdateAccount(state, caller.Address, func(acc *acm.Account) error { + err = engine.UpdateAccount(state, caller.Address, func(acc *acm.Account) error { return acc.Permissions.Base.Set(permission.SetBase, true) }) require.NoError(t, err) @@ -120,7 +119,7 @@ func TestHasPermission(t *testing.T) { require.NoError(t, err) acc := &acm.Account{ - Address: AddressFromName("frog"), + Address: engine.AddressFromName("frog"), Permissions: permission.AccountPermissions{ Base: base, }, @@ -130,7 +129,7 @@ func TestHasPermission(t *testing.T) { // Ensure we are falling through to global permissions on those bits not set flag := permission.Send | permission.Call | permission.Name | permission.HasRole - hasPermission, err := HasPermission(cache, acc.Address, flag) + hasPermission, err := engine.HasPermission(cache, acc.Address, flag) require.NoError(t, err) assert.True(t, hasPermission) } diff --git a/execution/native/precompiles.go b/execution/native/precompiles.go index f9cd27bb6..d9cc7b93d 100644 --- a/execution/native/precompiles.go +++ b/execution/native/precompiles.go @@ -5,11 +5,12 @@ import ( "fmt" "math/big" + "github.com/hyperledger/burrow/execution/engine" + "github.com/btcsuite/btcd/btcec" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/permission" "golang.org/x/crypto/ripemd160" ) @@ -43,11 +44,10 @@ func leftPadAddress(bs ...byte) crypto.Address { // SECP256K1 Recovery func ecrecover(ctx Context) ([]byte, error) { // Deduct gas - gasRequired := GasEcRecover - if *ctx.Gas < gasRequired { - return nil, errors.Codes.InsufficientGas - } else { - *ctx.Gas -= gasRequired + gasRequired := engine.GasEcRecover + var err error = engine.UseGasNegative(ctx.Gas, gasRequired) + if err != nil { + return nil, err } // layout is: @@ -95,11 +95,10 @@ func ecrecover(ctx Context) ([]byte, error) { func sha256(ctx Context) (output []byte, err error) { // Deduct gas - gasRequired := wordsIn(uint64(len(ctx.Input)))*GasSha256Word + GasSha256Base - if *ctx.Gas < gasRequired { - return nil, errors.Codes.InsufficientGas - } else { - *ctx.Gas -= gasRequired + gasRequired := wordsIn(uint64(len(ctx.Input)))*engine.GasSha256Word + engine.GasSha256Base + err = engine.UseGasNegative(ctx.Gas, gasRequired) + if err != nil { + return nil, err } // Hash hasher := cryptoSha256.New() @@ -110,11 +109,10 @@ func sha256(ctx Context) (output []byte, err error) { func ripemd160Func(ctx Context) (output []byte, err error) { // Deduct gas - gasRequired := wordsIn(uint64(len(ctx.Input)))*GasRipemd160Word + GasRipemd160Base - if *ctx.Gas < gasRequired { - return nil, errors.Codes.InsufficientGas - } else { - *ctx.Gas -= gasRequired + gasRequired := wordsIn(uint64(len(ctx.Input)))*engine.GasRipemd160Word + engine.GasRipemd160Base + err = engine.UseGasNegative(ctx.Gas, gasRequired) + if err != nil { + return nil, err } // Hash hasher := ripemd160.New() @@ -125,11 +123,10 @@ func ripemd160Func(ctx Context) (output []byte, err error) { func identity(ctx Context) (output []byte, err error) { // Deduct gas - gasRequired := wordsIn(uint64(len(ctx.Input)))*GasIdentityWord + GasIdentityBase - if *ctx.Gas < gasRequired { - return nil, errors.Codes.InsufficientGas - } else { - *ctx.Gas -= gasRequired + gasRequired := wordsIn(uint64(len(ctx.Input)))*engine.GasIdentityWord + engine.GasIdentityBase + err = engine.UseGasNegative(ctx.Gas, gasRequired) + if err != nil { + return nil, err } // Return identity return ctx.Input, nil @@ -152,14 +149,13 @@ func expMod(ctx Context) (output []byte, err error) { // TODO: implement non-trivial gas schedule for this operation. Probably a parameterised version of the one // described in EIP though that one seems like a bit of a complicated fudge - gasRequired := GasExpModBase + GasExpModWord*(wordsIn(baseLength)*wordsIn(expLength)*wordsIn(modLength)) + gasRequired := engine.GasExpModBase + engine.GasExpModWord*(wordsIn(baseLength)*wordsIn(expLength)*wordsIn(modLength)) - if *ctx.Gas < gasRequired { - return nil, errors.Codes.InsufficientGas + err = engine.UseGasNegative(ctx.Gas, gasRequired) + if err != nil { + return nil, err } - *ctx.Gas -= gasRequired - input, segments, err = cut(input, baseLength, expLength, modLength) if err != nil { return nil, fmt.Errorf("%s: %v", errHeader, err) diff --git a/execution/wasm/contract.go b/execution/wasm/contract.go new file mode 100644 index 000000000..c01d56cbe --- /dev/null +++ b/execution/wasm/contract.go @@ -0,0 +1,280 @@ +package wasm + +import ( + "encoding/binary" + "fmt" + "math/big" + + "github.com/hyperledger/burrow/execution/exec" + + bin "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/errors" + lifeExec "github.com/perlin-network/life/exec" +) + +type Contract struct { + vm *WVM + code []byte +} + +const Success = 0 +const Error = 1 +const Revert = 2 + +const ValueByteSize = 16 + +func (c *Contract) Call(state engine.State, params engine.CallParams) (output []byte, err error) { + return engine.Call(state, params, c.execute) +} + +func (c *Contract) execute(state engine.State, params engine.CallParams) ([]byte, error) { + const errHeader = "ewasm" + + // Since Life runs the execution for us we push the arguments into the import resolver state + ctx := &context{ + Contract: c, + state: state, + params: params, + code: c.code, + } + // panics in ResolveFunc() will be recovered for us, no need for our own + vm, err := lifeExec.NewVirtualMachine(c.code, c.vm.vmConfig, ctx, nil) + if err != nil { + return nil, errors.Errorf(errors.Codes.InvalidContract, "%s: %v", errHeader, err) + } + + entryID, ok := vm.GetFunctionExport("main") + if !ok { + return nil, errors.Codes.UnresolvedSymbols + } + + _, err = vm.Run(entryID) + if err != nil && errors.GetCode(err) != errors.Codes.None { + return nil, errors.Errorf(errors.Codes.ExecutionAborted, "%s: %v", errHeader, err) + } + + return ctx.output, nil +} + +type context struct { + *Contract + state engine.State + params engine.CallParams + code []byte + output []byte + returnData []byte +} + +var _ lifeExec.ImportResolver = (*context)(nil) + +func (ctx *context) ResolveGlobal(module, field string) int64 { + panic(fmt.Sprintf("global %s module %s not found", field, module)) +} + +func (ctx *context) ResolveFunc(module, field string) lifeExec.FunctionImport { + if module != "ethereum" { + panic(fmt.Sprintf("unknown module %s", module)) + } + + switch field { + case "call": + return func(vm *lifeExec.VirtualMachine) int64 { + gasLimit := big.NewInt(vm.GetCurrentFrame().Locals[0]) + addressPtr := uint32(vm.GetCurrentFrame().Locals[1]) + valuePtr := int(uint32(vm.GetCurrentFrame().Locals[2])) + dataPtr := uint32(vm.GetCurrentFrame().Locals[3]) + dataLen := uint32(vm.GetCurrentFrame().Locals[4]) + + // TODO: avoid panic? Or at least panic with coded out-of-bounds + target := crypto.MustAddressFromBytes(vm.Memory[addressPtr : addressPtr+crypto.AddressLength]) + + // TODO: is this guaranteed to be okay? Should be avoid panic here if out of bounds? + value := bin.BigIntFromLittleEndianBytes(vm.Memory[valuePtr : valuePtr+ValueByteSize]) + + var err error + ctx.returnData, err = engine.CallFromSite(ctx.state, ctx.vm, ctx.params, engine.CallParams{ + CallType: exec.CallTypeCall, + Callee: target, + Input: vm.Memory[dataPtr : dataPtr+dataLen], + Value: *value, + Gas: gasLimit, + }) + + // Refund any remaining gas to be used on subsequent calls + ctx.params.Gas.Add(ctx.params.Gas, gasLimit) + + // TODO[Silas]: we may need to consider trapping and non-trapping errors here in a bit more of a principled way + // (e.g. we may be currently handling things that should abort execution, it might be better to clasify + // all of our coded errors as trapping (fatal abort WASM) or non-trapping (return error to WASM caller) + // I'm not sure this is consistent in EVM either. + if err != nil { + if errors.GetCode(err) == errors.Codes.ExecutionReverted { + return Revert + } + // Spec says return 1 for error, but not sure when to do that (as opposed to abort): + // https://github.com/ewasm/design/blob/master/eth_interface.md#call + panic(err) + return Error + } + return Success + } + + case "getCallDataSize": + return func(vm *lifeExec.VirtualMachine) int64 { + return int64(len(ctx.params.Input)) + } + + case "callDataCopy": + return func(vm *lifeExec.VirtualMachine) int64 { + destPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataOffset := int(uint32(vm.GetCurrentFrame().Locals[1])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[2])) + + if dataLen > 0 { + copy(vm.Memory[destPtr:], ctx.params.Input[dataOffset:dataOffset+dataLen]) + } + + return Success + } + + case "getReturnDataSize": + return func(vm *lifeExec.VirtualMachine) int64 { + return int64(len(ctx.returnData)) + } + + case "returnDataCopy": + return func(vm *lifeExec.VirtualMachine) int64 { + destPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataOffset := int(uint32(vm.GetCurrentFrame().Locals[1])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[2])) + + if dataLen > 0 { + copy(vm.Memory[destPtr:], ctx.returnData[dataOffset:dataOffset+dataLen]) + } + + return Success + } + + case "getCodeSize": + return func(vm *lifeExec.VirtualMachine) int64 { + return int64(len(ctx.code)) + } + + case "codeCopy": + return func(vm *lifeExec.VirtualMachine) int64 { + destPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataOffset := int(uint32(vm.GetCurrentFrame().Locals[1])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[2])) + + if dataLen > 0 { + copy(vm.Memory[destPtr:], ctx.code[dataOffset:dataOffset+dataLen]) + } + + return Success + } + + case "storageStore": + return func(vm *lifeExec.VirtualMachine) int64 { + keyPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataPtr := int(uint32(vm.GetCurrentFrame().Locals[1])) + + key := bin.Word256{} + value := make([]byte, 32) + + copy(key[:], vm.Memory[keyPtr:keyPtr+32]) + copy(value, vm.Memory[dataPtr:dataPtr+32]) + + err := ctx.state.SetStorage(ctx.params.Callee, key, value) + if err != nil { + panic(err) + } + return Success + } + + case "storageLoad": + return func(vm *lifeExec.VirtualMachine) int64 { + + keyPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataPtr := int(uint32(vm.GetCurrentFrame().Locals[1])) + + key := bin.Word256{} + + copy(key[:], vm.Memory[keyPtr:keyPtr+32]) + + val, err := ctx.state.GetStorage(ctx.params.Callee, key) + if err != nil { + panic(err) + } + copy(vm.Memory[dataPtr:], val) + + return Success + } + + case "finish": + return func(vm *lifeExec.VirtualMachine) int64 { + dataPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[1])) + + ctx.output = vm.Memory[dataPtr : dataPtr+dataLen] + + panic(errors.Codes.None) + } + + case "revert": + return func(vm *lifeExec.VirtualMachine) int64 { + + dataPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[1])) + + ctx.output = vm.Memory[dataPtr : dataPtr+dataLen] + + panic(errors.Codes.ExecutionReverted) + } + + case "getAddress": + return func(vm *lifeExec.VirtualMachine) int64 { + addressPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + + copy(vm.Memory[addressPtr:], ctx.params.Callee.Bytes()) + + return Success + } + + case "getCallValue": + return func(vm *lifeExec.VirtualMachine) int64 { + valuePtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + + // ewasm value is little endian 128 bit value + copy(vm.Memory[valuePtr:], bin.BigIntToLittleEndianBytes(&ctx.params.Value)) + + return Success + } + + case "getExternalBalance": + return func(vm *lifeExec.VirtualMachine) int64 { + addressPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + balancePtr := int(uint32(vm.GetCurrentFrame().Locals[1])) + + address := crypto.Address{} + + copy(address[:], vm.Memory[addressPtr:addressPtr+crypto.AddressLength]) + acc, err := ctx.state.GetAccount(address) + if err != nil { + panic(errors.Codes.InvalidAddress) + } + + // ewasm value is little endian 128 bit value + bs := make([]byte, 16) + binary.LittleEndian.PutUint64(bs, acc.Balance) + + copy(vm.Memory[balancePtr:], bs) + + return Success + } + + default: + panic(fmt.Sprintf("unknown function %s", field)) + } +} diff --git a/execution/wasm/wasm.go b/execution/wasm/wasm.go index 2720d6123..eeb2868c1 100644 --- a/execution/wasm/wasm.go +++ b/execution/wasm/wasm.go @@ -1,232 +1,92 @@ package wasm import ( - "encoding/binary" - "fmt" + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/execution/native" + "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/acm/acmstate" - burrow_binary "github.com/hyperledger/burrow/binary" - "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" - "github.com/perlin-network/life/exec" + lifeExec "github.com/perlin-network/life/exec" ) -type execContext struct { - errors.Maybe - code []byte - output []byte - returnData []byte - params engine.CallParams - state acmstate.ReaderWriter +// Implements ewasm, see https://github.com/ewasm/design +// WASM +var DefaultVMConfig = lifeExec.VMConfig{ + DisableFloatingPoint: true, + MaxMemoryPages: 16, + DefaultMemoryPages: 16, } -// Implements ewasm, see https://github.com/ewasm/design +type WVM struct { + engine.Externals + options Options + vmConfig lifeExec.VMConfig +} + +type Options struct { + Natives *native.Natives + CallStackMaxDepth uint64 + Logger *logging.Logger +} + +func New(options Options) *WVM { + if options.Natives == nil { + options.Natives = native.MustDefaultNatives() + } + if options.Logger == nil { + options.Logger = logging.NewNoopLogger() + } + return &WVM{ + options: options, + vmConfig: DefaultVMConfig, + } +} + +func Default() *WVM { + return New(Options{}) +} // RunWASM creates a WASM VM, and executes the given WASM contract code -func RunWASM(state acmstate.ReaderWriter, params engine.CallParams, wasm []byte) (output []byte, cerr error) { - const errHeader = "ewasm" +func (vm *WVM) Execute(st acmstate.ReaderWriter, blockchain engine.Blockchain, eventSink exec.EventSink, + params engine.CallParams, code []byte) (output []byte, cerr error) { defer func() { if r := recover(); r != nil { cerr = errors.Codes.ExecutionAborted } }() - // WASM - config := exec.VMConfig{ - DisableFloatingPoint: true, - MaxMemoryPages: 16, - DefaultMemoryPages: 16, - } - - execContext := execContext{ - params: params, - code: wasm, - state: state, - } + st = native.NewState(vm.options.Natives, st) - // panics in ResolveFunc() will be recovered for us, no need for our own - vm, err := exec.NewVirtualMachine(wasm, config, &execContext, nil) - if err != nil { - return nil, errors.Errorf(errors.Codes.InvalidContract, "%s: %v", errHeader, err) - } - if execContext.Error() != nil { - return nil, execContext.Error() + state := engine.State{ + CallFrame: engine.NewCallFrame(st).WithMaxCallStackDepth(vm.options.CallStackMaxDepth), + Blockchain: blockchain, + EventSink: eventSink, } - entryID, ok := vm.GetFunctionExport("main") - if !ok { - return nil, errors.Codes.UnresolvedSymbols - } + output, err := vm.Contract(code).Call(state, params) - _, err = vm.Run(entryID) - if err != nil && errors.GetCode(err) != errors.Codes.None { - return nil, errors.Errorf(errors.Codes.ExecutionAborted, "%s: %v", errHeader, err) + if err == nil { + // Only sync back when there was no exception + err = state.CallFrame.Sync() } - - return execContext.output, nil + // Always return output - we may have a reverted exception for which the return is meaningful + return output, err } -func (e *execContext) ResolveFunc(module, field string) exec.FunctionImport { - if module != "ethereum" { - panic(fmt.Sprintf("unknown module %s", module)) - } - - switch field { - case "getCallDataSize": - return func(vm *exec.VirtualMachine) int64 { - return int64(len(e.params.Input)) - } - - case "callDataCopy": - return func(vm *exec.VirtualMachine) int64 { - destPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) - dataOffset := int(uint32(vm.GetCurrentFrame().Locals[1])) - dataLen := int(uint32(vm.GetCurrentFrame().Locals[2])) - - if dataLen > 0 { - copy(vm.Memory[destPtr:], e.params.Input[dataOffset:dataOffset+dataLen]) - } - - return 0 - } - - case "getReturnDataSize": - return func(vm *exec.VirtualMachine) int64 { - return int64(len(e.returnData)) - } - - case "returnDataCopy": - return func(vm *exec.VirtualMachine) int64 { - destPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) - dataOffset := int(uint32(vm.GetCurrentFrame().Locals[1])) - dataLen := int(uint32(vm.GetCurrentFrame().Locals[2])) - - if dataLen > 0 { - copy(vm.Memory[destPtr:], e.returnData[dataOffset:dataOffset+dataLen]) - } - - return 0 - } - - case "getCodeSize": - return func(vm *exec.VirtualMachine) int64 { - return int64(len(e.code)) - } - - case "codeCopy": - return func(vm *exec.VirtualMachine) int64 { - destPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) - dataOffset := int(uint32(vm.GetCurrentFrame().Locals[1])) - dataLen := int(uint32(vm.GetCurrentFrame().Locals[2])) - - if dataLen > 0 { - copy(vm.Memory[destPtr:], e.code[dataOffset:dataOffset+dataLen]) - } - - return 0 - } - - case "storageStore": - return func(vm *exec.VirtualMachine) int64 { - keyPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) - dataPtr := int(uint32(vm.GetCurrentFrame().Locals[1])) - - key := burrow_binary.Word256{} - - copy(key[:], vm.Memory[keyPtr:keyPtr+32]) - - e.Void(e.state.SetStorage(e.params.Callee, key, vm.Memory[dataPtr:dataPtr+32])) - return 0 - } - - case "storageLoad": - return func(vm *exec.VirtualMachine) int64 { - - keyPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) - dataPtr := int(uint32(vm.GetCurrentFrame().Locals[1])) - - key := burrow_binary.Word256{} - - copy(key[:], vm.Memory[keyPtr:keyPtr+32]) - - val := e.Bytes(e.state.GetStorage(e.params.Callee, key)) - copy(vm.Memory[dataPtr:], val) - - return 0 - } - - case "finish": - return func(vm *exec.VirtualMachine) int64 { - dataPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) - dataLen := int(uint32(vm.GetCurrentFrame().Locals[1])) - - e.output = vm.Memory[dataPtr : dataPtr+dataLen] - - panic(errors.Codes.None) - } - - case "revert": - return func(vm *exec.VirtualMachine) int64 { - - dataPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) - dataLen := int(uint32(vm.GetCurrentFrame().Locals[1])) - - e.output = vm.Memory[dataPtr : dataPtr+dataLen] - - panic(errors.Codes.ExecutionReverted) - } - - case "getAddress": - return func(vm *exec.VirtualMachine) int64 { - addressPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) - - copy(vm.Memory[addressPtr:], e.params.Callee.Bytes()) - - return 0 - } - - case "getCallValue": - return func(vm *exec.VirtualMachine) int64 { - - valuePtr := int(uint32(vm.GetCurrentFrame().Locals[0])) - - // ewasm value is little endian 128 bit value - bs := make([]byte, 16) - binary.LittleEndian.PutUint64(bs, e.params.Value) - - copy(vm.Memory[valuePtr:], bs) - - return 0 - } - - case "getExternalBalance": - return func(vm *exec.VirtualMachine) int64 { - addressPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) - balancePtr := int(uint32(vm.GetCurrentFrame().Locals[1])) - - address := crypto.Address{} - - copy(address[:], vm.Memory[addressPtr:addressPtr+crypto.AddressLength]) - acc, err := e.state.GetAccount(address) - if err != nil { - panic(errors.Codes.InvalidAddress) - } - - // ewasm value is little endian 128 bit value - bs := make([]byte, 16) - binary.LittleEndian.PutUint64(bs, acc.Balance) - - copy(vm.Memory[balancePtr:], bs) - - return 0 - } - - default: - panic(fmt.Sprintf("unknown function %s", field)) +func (vm *WVM) Dispatch(acc *acm.Account) engine.Callable { + callable := vm.Externals.Dispatch(acc) + if callable != nil { + return callable } + return vm.Contract(acc.WASMCode) } -func (e *execContext) ResolveGlobal(module, field string) int64 { - panic(fmt.Sprintf("global %s module %s not found", field, module)) +func (vm *WVM) Contract(code []byte) *Contract { + return &Contract{ + vm: vm, + code: code, + } } diff --git a/execution/wasm/wasm_test.go b/execution/wasm/wasm_test.go index ff9ac1744..e9f59494a 100644 --- a/execution/wasm/wasm_test.go +++ b/execution/wasm/wasm_test.go @@ -2,8 +2,11 @@ package wasm import ( "fmt" + "math/big" "testing" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/execution/engine" @@ -16,19 +19,21 @@ import ( func TestStaticCallWithValue(t *testing.T) { cache := acmstate.NewMemoryState() - gas := uint64(0) - params := engine.CallParams{ Origin: crypto.ZeroAddress, Caller: crypto.ZeroAddress, Callee: crypto.ZeroAddress, Input: []byte{}, - Value: 0, - Gas: &gas, + Value: *big.NewInt(0), + Gas: big.NewInt(1000), } + vm := Default() + blockchain := new(engine.TestBlockchain) + eventSink := exec.NewNoopEventSink() + // run constructor - runtime, cerr := RunWASM(cache, params, Bytecode_storage_test) + runtime, cerr := vm.Execute(cache, blockchain, eventSink, params, Bytecode_storage_test) require.NoError(t, cerr) // run getFooPlus2 @@ -38,7 +43,7 @@ func TestStaticCallWithValue(t *testing.T) { params.Input = calldata - returndata, cerr := RunWASM(cache, params, runtime) + returndata, cerr := vm.Execute(cache, blockchain, eventSink, params, runtime) require.NoError(t, cerr) data := abi.GetPackingTypes(spec.Functions["getFooPlus2"].Outputs) @@ -55,7 +60,7 @@ func TestStaticCallWithValue(t *testing.T) { params.Input = calldata - returndata, cerr = RunWASM(cache, params, runtime) + returndata, cerr = vm.Execute(cache, blockchain, eventSink, params, runtime) require.NoError(t, cerr) require.Equal(t, returndata, []byte{}) @@ -66,7 +71,7 @@ func TestStaticCallWithValue(t *testing.T) { params.Input = calldata - returndata, cerr = RunWASM(cache, params, runtime) + returndata, cerr = vm.Execute(cache, blockchain, eventSink, params, runtime) require.NoError(t, cerr) spec.Unpack(returndata, "getFooPlus2", data...) diff --git a/js/proto/exec_pb.d.ts b/js/proto/exec_pb.d.ts index 2bd02ece7..02ad26ba7 100644 --- a/js/proto/exec_pb.d.ts +++ b/js/proto/exec_pb.d.ts @@ -740,11 +740,15 @@ export class CallData extends jspb.Message { getData_asB64(): string; setData(value: Uint8Array | string): CallData; - getValue(): number; - setValue(value: number): CallData; + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): CallData; - getGas(): number; - setGas(value: number): CallData; + getGas(): Uint8Array | string; + getGas_asU8(): Uint8Array; + getGas_asB64(): string; + setGas(value: Uint8Array | string): CallData; serializeBinary(): Uint8Array; @@ -762,7 +766,7 @@ export namespace CallData { caller: Uint8Array | string, callee: Uint8Array | string, data: Uint8Array | string, - value: number, - gas: number, + value: Uint8Array | string, + gas: Uint8Array | string, } } diff --git a/js/proto/exec_pb.js b/js/proto/exec_pb.js index a49aca83c..9056d28f2 100644 --- a/js/proto/exec_pb.js +++ b/js/proto/exec_pb.js @@ -5427,8 +5427,8 @@ proto.exec.CallData.toObject = function(includeInstance, msg) { caller: msg.getCaller_asB64(), callee: msg.getCallee_asB64(), data: msg.getData_asB64(), - value: jspb.Message.getFieldWithDefault(msg, 4, 0), - gas: jspb.Message.getFieldWithDefault(msg, 5, 0) + value: msg.getValue_asB64(), + gas: msg.getGas_asB64() }; if (includeInstance) { @@ -5478,11 +5478,11 @@ proto.exec.CallData.deserializeBinaryFromReader = function(msg, reader) { msg.setData(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setValue(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setGas(value); break; default: @@ -5535,16 +5535,16 @@ proto.exec.CallData.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getValue(); - if (f !== 0) { - writer.writeUint64( + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( 4, f ); } - f = message.getGas(); - if (f !== 0) { - writer.writeUint64( + f = message.getGas_asU8(); + if (f.length > 0) { + writer.writeBytes( 5, f ); @@ -5679,38 +5679,86 @@ proto.exec.CallData.prototype.setData = function(value) { /** - * optional uint64 Value = 4; - * @return {number} + * optional bytes Value = 4; + * @return {!(string|Uint8Array)} */ proto.exec.CallData.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * @param {number} value + * optional bytes Value = 4; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.exec.CallData.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes Value = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.exec.CallData.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value * @return {!proto.exec.CallData} returns this */ proto.exec.CallData.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3BytesField(this, 4, value); }; /** - * optional uint64 Gas = 5; - * @return {number} + * optional bytes Gas = 5; + * @return {!(string|Uint8Array)} */ proto.exec.CallData.prototype.getGas = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * @param {number} value + * optional bytes Gas = 5; + * This is a type-conversion wrapper around `getGas()` + * @return {string} + */ +proto.exec.CallData.prototype.getGas_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getGas())); +}; + + +/** + * optional bytes Gas = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getGas()` + * @return {!Uint8Array} + */ +proto.exec.CallData.prototype.getGas_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getGas())); +}; + + +/** + * @param {!(string|Uint8Array)} value * @return {!proto.exec.CallData} returns this */ proto.exec.CallData.prototype.setGas = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3BytesField(this, 5, value); }; diff --git a/keys/keys_grpc.pb.go b/keys/keys_grpc.pb.go index 00f2d1450..5b50d28d2 100644 --- a/keys/keys_grpc.pb.go +++ b/keys/keys_grpc.pb.go @@ -12,7 +12,6 @@ import ( // 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 // KeysClient is the client API for Keys service. @@ -204,7 +203,7 @@ type UnsafeKeysServer interface { } func RegisterKeysServer(s grpc.ServiceRegistrar, srv KeysServer) { - s.RegisterService(&Keys_ServiceDesc, srv) + s.RegisterService(&_Keys_serviceDesc, srv) } func _Keys_GenerateKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -405,10 +404,7 @@ func _Keys_AddName_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -// Keys_ServiceDesc is the grpc.ServiceDesc for Keys service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Keys_ServiceDesc = grpc.ServiceDesc{ +var _Keys_serviceDesc = grpc.ServiceDesc{ ServiceName: "keys.Keys", HandlerType: (*KeysServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/protobuf/exec.proto b/protobuf/exec.proto index 6e16b2a24..fec8be865 100644 --- a/protobuf/exec.proto +++ b/protobuf/exec.proto @@ -192,6 +192,7 @@ message CallData { bytes Caller = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; bytes Callee = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; bytes Data = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; - uint64 Value = 4; - uint64 Gas = 5; + // Bytes of a big integer value + bytes Value = 4; + bytes Gas = 5; } diff --git a/rpc/rpcdump/rpcdump_grpc.pb.go b/rpc/rpcdump/rpcdump_grpc.pb.go index a764fc6ea..a64c467cd 100644 --- a/rpc/rpcdump/rpcdump_grpc.pb.go +++ b/rpc/rpcdump/rpcdump_grpc.pb.go @@ -13,7 +13,6 @@ import ( // 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 // DumpClient is the client API for Dump service. @@ -32,7 +31,7 @@ func NewDumpClient(cc grpc.ClientConnInterface) DumpClient { } func (c *dumpClient) GetDump(ctx context.Context, in *GetDumpParam, opts ...grpc.CallOption) (Dump_GetDumpClient, error) { - stream, err := c.cc.NewStream(ctx, &Dump_ServiceDesc.Streams[0], "/rpcdump.Dump/GetDump", opts...) + stream, err := c.cc.NewStream(ctx, &_Dump_serviceDesc.Streams[0], "/rpcdump.Dump/GetDump", opts...) if err != nil { return nil, err } @@ -88,7 +87,7 @@ type UnsafeDumpServer interface { } func RegisterDumpServer(s grpc.ServiceRegistrar, srv DumpServer) { - s.RegisterService(&Dump_ServiceDesc, srv) + s.RegisterService(&_Dump_serviceDesc, srv) } func _Dump_GetDump_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -112,10 +111,7 @@ func (x *dumpGetDumpServer) Send(m *dump.Dump) error { return x.ServerStream.SendMsg(m) } -// Dump_ServiceDesc is the grpc.ServiceDesc for Dump service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Dump_ServiceDesc = grpc.ServiceDesc{ +var _Dump_serviceDesc = grpc.ServiceDesc{ ServiceName: "rpcdump.Dump", HandlerType: (*DumpServer)(nil), Methods: []grpc.MethodDesc{}, diff --git a/rpc/rpcevents/rpcevents_grpc.pb.go b/rpc/rpcevents/rpcevents_grpc.pb.go index 2be3c15e7..3d7f33649 100644 --- a/rpc/rpcevents/rpcevents_grpc.pb.go +++ b/rpc/rpcevents/rpcevents_grpc.pb.go @@ -13,7 +13,6 @@ import ( // 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 // ExecutionEventsClient is the client API for ExecutionEvents service. @@ -38,7 +37,7 @@ func NewExecutionEventsClient(cc grpc.ClientConnInterface) ExecutionEventsClient } func (c *executionEventsClient) Stream(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_StreamClient, error) { - stream, err := c.cc.NewStream(ctx, &ExecutionEvents_ServiceDesc.Streams[0], "/rpcevents.ExecutionEvents/Stream", opts...) + stream, err := c.cc.NewStream(ctx, &_ExecutionEvents_serviceDesc.Streams[0], "/rpcevents.ExecutionEvents/Stream", opts...) if err != nil { return nil, err } @@ -79,7 +78,7 @@ func (c *executionEventsClient) Tx(ctx context.Context, in *TxRequest, opts ...g } func (c *executionEventsClient) Events(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_EventsClient, error) { - stream, err := c.cc.NewStream(ctx, &ExecutionEvents_ServiceDesc.Streams[1], "/rpcevents.ExecutionEvents/Events", opts...) + stream, err := c.cc.NewStream(ctx, &_ExecutionEvents_serviceDesc.Streams[1], "/rpcevents.ExecutionEvents/Events", opts...) if err != nil { return nil, err } @@ -147,7 +146,7 @@ type UnsafeExecutionEventsServer interface { } func RegisterExecutionEventsServer(s grpc.ServiceRegistrar, srv ExecutionEventsServer) { - s.RegisterService(&ExecutionEvents_ServiceDesc, srv) + s.RegisterService(&_ExecutionEvents_serviceDesc, srv) } func _ExecutionEvents_Stream_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -210,10 +209,7 @@ func (x *executionEventsEventsServer) Send(m *EventsResponse) error { return x.ServerStream.SendMsg(m) } -// ExecutionEvents_ServiceDesc is the grpc.ServiceDesc for ExecutionEvents service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ExecutionEvents_ServiceDesc = grpc.ServiceDesc{ +var _ExecutionEvents_serviceDesc = grpc.ServiceDesc{ ServiceName: "rpcevents.ExecutionEvents", HandlerType: (*ExecutionEventsServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/rpc/rpcquery/rpcquery_grpc.pb.go b/rpc/rpcquery/rpcquery_grpc.pb.go index 5058f27be..76df0c644 100644 --- a/rpc/rpcquery/rpcquery_grpc.pb.go +++ b/rpc/rpcquery/rpcquery_grpc.pb.go @@ -17,7 +17,6 @@ import ( // 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 // QueryClient is the client API for Query service. @@ -86,7 +85,7 @@ func (c *queryClient) GetStorage(ctx context.Context, in *GetStorageParam, opts } func (c *queryClient) ListAccounts(ctx context.Context, in *ListAccountsParam, opts ...grpc.CallOption) (Query_ListAccountsClient, error) { - stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[0], "/rpcquery.Query/ListAccounts", opts...) + stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[0], "/rpcquery.Query/ListAccounts", opts...) if err != nil { return nil, err } @@ -127,7 +126,7 @@ func (c *queryClient) GetName(ctx context.Context, in *GetNameParam, opts ...grp } func (c *queryClient) ListNames(ctx context.Context, in *ListNamesParam, opts ...grpc.CallOption) (Query_ListNamesClient, error) { - stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[1], "/rpcquery.Query/ListNames", opts...) + stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[1], "/rpcquery.Query/ListNames", opts...) if err != nil { return nil, err } @@ -195,7 +194,7 @@ func (c *queryClient) GetProposal(ctx context.Context, in *GetProposalParam, opt } func (c *queryClient) ListProposals(ctx context.Context, in *ListProposalsParam, opts ...grpc.CallOption) (Query_ListProposalsClient, error) { - stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[2], "/rpcquery.Query/ListProposals", opts...) + stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[2], "/rpcquery.Query/ListProposals", opts...) if err != nil { return nil, err } @@ -322,7 +321,7 @@ type UnsafeQueryServer interface { } func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) + s.RegisterService(&_Query_serviceDesc, srv) } func _Query_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -586,10 +585,7 @@ func _Query_GetBlockHeader_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ +var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "rpcquery.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/rpc/rpctransact/rpctransact_grpc.pb.go b/rpc/rpctransact/rpctransact_grpc.pb.go index 124ee37c0..9a70d6fb1 100644 --- a/rpc/rpctransact/rpctransact_grpc.pb.go +++ b/rpc/rpctransact/rpctransact_grpc.pb.go @@ -15,7 +15,6 @@ import ( // 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 // TransactClient is the client API for Transact service. @@ -249,7 +248,7 @@ type UnsafeTransactServer interface { } func RegisterTransactServer(s grpc.ServiceRegistrar, srv TransactServer) { - s.RegisterService(&Transact_ServiceDesc, srv) + s.RegisterService(&_Transact_serviceDesc, srv) } func _Transact_BroadcastTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -468,10 +467,7 @@ func _Transact_NameTxAsync_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -// Transact_ServiceDesc is the grpc.ServiceDesc for Transact service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Transact_ServiceDesc = grpc.ServiceDesc{ +var _Transact_serviceDesc = grpc.ServiceDesc{ ServiceName: "rpctransact.Transact", HandlerType: (*TransactServer)(nil), Methods: []grpc.MethodDesc{ From 0e1d5d87f6b86e3fd9c2c3b8cff458b5a23165c7 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 3 Feb 2021 14:11:58 +0100 Subject: [PATCH 132/185] Actually connect VMs :) Lift dispatcher plumbing to vms package (to avoid dependency cycles) and restructure internal/external dispatching to avoid infinite trampoline. Signed-off-by: Silas Davis --- execution/config.go | 4 +-- execution/contexts/call_context.go | 15 +++++------ execution/defaults/options.go | 21 +++++++++++++++ execution/engine/natives.go | 19 +++++++++++++ execution/engine/options.go | 20 ++++++++++++++ execution/evm/contract.go | 2 +- execution/evm/evm.go | 43 +++++++----------------------- execution/evm/evm_test.go | 10 +++---- execution/evm/precompiles_test.go | 2 +- execution/execution.go | 8 +++--- execution/native/contract.go | 2 +- execution/native/function.go | 2 +- execution/native/native.go | 14 ---------- execution/native/natives.go | 14 +++++----- execution/native/state.go | 7 ++--- execution/simulated_call.go | 5 ++-- execution/vms/vms.go | 25 +++++++++++++++++ execution/wasm/contract.go | 15 ++++++----- execution/wasm/wasm.go | 39 ++++++++++----------------- 19 files changed, 153 insertions(+), 114 deletions(-) create mode 100644 execution/defaults/options.go create mode 100644 execution/engine/natives.go create mode 100644 execution/engine/options.go create mode 100644 execution/vms/vms.go diff --git a/execution/config.go b/execution/config.go index dfecfca25..d62dee83e 100644 --- a/execution/config.go +++ b/execution/config.go @@ -38,7 +38,7 @@ func DefaultExecutionConfig() *ExecutionConfig { type Option func(*executor) -func VMOptions(vmOptions evm.Options) func(*executor) { +func VMOptions(vmOptions engine.Options) func(*executor) { return func(exe *executor) { exe.vmOptions = vmOptions } @@ -46,7 +46,7 @@ func VMOptions(vmOptions evm.Options) func(*executor) { func (ec *ExecutionConfig) ExecutionOptions() ([]Option, error) { var exeOptions []Option - vmOptions := evm.Options{ + vmOptions := engine.Options{ MemoryProvider: engine.DefaultDynamicMemoryProvider, CallStackMaxDepth: ec.CallStackMaxDepth, DataStackInitialCapacity: ec.DataStackInitialCapacity, diff --git a/execution/contexts/call_context.go b/execution/contexts/call_context.go index 048d7d522..b18d7d39e 100644 --- a/execution/contexts/call_context.go +++ b/execution/contexts/call_context.go @@ -4,14 +4,14 @@ import ( "fmt" "math/big" + "github.com/hyperledger/burrow/execution/vms" + "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/execution/evm" "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/execution/wasm" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/structure" "github.com/hyperledger/burrow/txs/payload" @@ -21,7 +21,7 @@ import ( const GasLimit = uint64(1000000) type CallContext struct { - EVM *evm.EVM + VMS *vms.VirtualMachines State acmstate.ReaderWriter MetadataState acmstate.MetadataReaderWriter Blockchain engine.Blockchain @@ -197,8 +197,7 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error if len(wcode) != 0 { // TODO: accept options - vm := wasm.Default() - ret, err = vm.Execute(txCache, ctx.Blockchain, ctx.txe, params, wcode) + ret, err = ctx.VMS.WVM.Execute(txCache, ctx.Blockchain, ctx.txe, params, wcode) if err != nil { // Failure. Charge the gas fee. The 'value' was otherwise not transferred. ctx.Logger.InfoMsg("Error on WASM execution", @@ -220,10 +219,10 @@ func (ctx *CallContext) Deliver(inAcc, outAcc *acm.Account, value uint64) error } } else { // EVM - ctx.EVM.SetNonce(txHash) - ctx.EVM.SetLogger(ctx.Logger.With(structure.TxHashKey, txHash)) + ctx.VMS.EVM.SetNonce(txHash) + ctx.VMS.EVM.SetLogger(ctx.Logger.With(structure.TxHashKey, txHash)) - ret, err = ctx.EVM.Execute(txCache, ctx.Blockchain, ctx.txe, params, code) + ret, err = ctx.VMS.EVM.Execute(txCache, ctx.Blockchain, ctx.txe, params, code) if err != nil { // Failure. Charge the gas fee. The 'value' was otherwise not transferred. diff --git a/execution/defaults/options.go b/execution/defaults/options.go new file mode 100644 index 000000000..71782bf80 --- /dev/null +++ b/execution/defaults/options.go @@ -0,0 +1,21 @@ +package defaults + +import ( + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/native" + "github.com/hyperledger/burrow/logging" +) + +func CompleteOptions(options engine.Options) engine.Options { + // Set defaults + if options.MemoryProvider == nil { + options.MemoryProvider = engine.DefaultDynamicMemoryProvider + } + if options.Logger == nil { + options.Logger = logging.NewNoopLogger() + } + if options.Natives == nil { + options.Natives = native.MustDefaultNatives() + } + return options +} diff --git a/execution/engine/natives.go b/execution/engine/natives.go new file mode 100644 index 000000000..54de6017b --- /dev/null +++ b/execution/engine/natives.go @@ -0,0 +1,19 @@ +package engine + +import ( + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/crypto" +) + +type Native interface { + Callable + SetExternals(externals Dispatcher) + ContractMeta() []*acm.ContractMeta + FullName() string + Address() crypto.Address +} + +type Natives interface { + ExternalDispatcher + GetByAddress(address crypto.Address) Native +} diff --git a/execution/engine/options.go b/execution/engine/options.go new file mode 100644 index 000000000..34dec2d79 --- /dev/null +++ b/execution/engine/options.go @@ -0,0 +1,20 @@ +package engine + +import ( + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/logging" +) + +// Options are parameters that are generally stable across a burrow configuration. +// Defaults will be used for any zero values. +type Options struct { + MemoryProvider func(errors.Sink) Memory + Natives Natives + Nonce []byte + DebugOpcodes bool + DumpTokens bool + CallStackMaxDepth uint64 + DataStackInitialCapacity uint64 + DataStackMaxDepth uint64 + Logger *logging.Logger +} diff --git a/execution/evm/contract.go b/execution/evm/contract.go index 65c5f354a..39d504cb9 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -669,7 +669,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e c.debugf(" => %v\n", target) var err error - returnData, err = engine.CallFromSite(st, c, params, engine.CallParams{ + returnData, err = engine.CallFromSite(st, c.externalDispatcher, params, engine.CallParams{ CallType: callTypeFromOpCode(op), Callee: target, Input: memory.Read(inOffset, inSize), diff --git a/execution/evm/evm.go b/execution/evm/evm.go index ee569b522..9467f4c23 100644 --- a/execution/evm/evm.go +++ b/execution/evm/evm.go @@ -8,8 +8,8 @@ import ( "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/execution/defaults" "github.com/hyperledger/burrow/execution/engine" - "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/native" "github.com/hyperledger/burrow/logging" @@ -22,51 +22,27 @@ const ( ) type EVM struct { - options Options + options engine.Options sequence uint64 // Provide any foreign dispatchers to allow calls between VMs engine.Externals + externalDispatcher engine.Dispatcher // User dispatcher.CallableProvider to get access to other VMs logger *logging.Logger } -// Options are parameters that are generally stable across a burrow configuration. -// Defaults will be used for any zero values. -type Options struct { - MemoryProvider func(errors.Sink) engine.Memory - Natives *native.Natives - Nonce []byte - DebugOpcodes bool - DumpTokens bool - CallStackMaxDepth uint64 - DataStackInitialCapacity uint64 - DataStackMaxDepth uint64 - Logger *logging.Logger -} - -func New(options Options) *EVM { - // Set defaults - if options.MemoryProvider == nil { - options.MemoryProvider = engine.DefaultDynamicMemoryProvider - } - if options.Logger == nil { - options.Logger = logging.NewNoopLogger() - } - if options.Natives == nil { - options.Natives = native.MustDefaultNatives() - } +func New(options engine.Options) *EVM { + options = defaults.CompleteOptions(options) vm := &EVM{ options: options, } - // TODO: ultimately this wiring belongs a level up, but for the time being it is convenient to handle it here - // since we need to both intercept backend state to serve up natives AND connect the external dispatchers - engine.Connect(vm, options.Natives) vm.logger = options.Logger.WithScope("NewVM").With("evm_nonce", options.Nonce) + vm.externalDispatcher = engine.Dispatchers{&vm.Externals, vm} return vm } func Default() *EVM { - return New(Options{}) + return New(engine.Options{}) } // Initiate an EVM call against the provided state pushing events to eventSink. code should contain the EVM bytecode, @@ -105,9 +81,8 @@ func (vm *EVM) SetLogger(logger *logging.Logger) { } func (vm *EVM) Dispatch(acc *acm.Account) engine.Callable { - callable := vm.Externals.Dispatch(acc) - if callable != nil { - return callable + if len(acc.EVMCode) == 0 { + return nil } return vm.Contract(acc.EVMCode) } diff --git a/execution/evm/evm_test.go b/execution/evm/evm_test.go index 342cc1855..3bac3785f 100644 --- a/execution/evm/evm_test.go +++ b/execution/evm/evm_test.go @@ -34,7 +34,7 @@ import ( // Runs a basic loop func TestEVM(t *testing.T) { - vm := New(Options{ + vm := New(engine.Options{ Natives: native.MustDefaultNatives(), }) @@ -841,7 +841,7 @@ func TestEVM(t *testing.T) { st := acmstate.NewMemoryState() blockchain := new(engine.TestBlockchain) eventSink := exec.NewNoopEventSink() - vm := New(Options{ + vm := New(engine.Options{ MemoryProvider: func(err errors.Sink) engine.Memory { return engine.NewDynamicMemory(1024, 2048, err) }, @@ -1199,7 +1199,7 @@ func TestEVM(t *testing.T) { Input: code, Gas: big.NewInt(1000000), } - vm := New(Options{ + vm := New(engine.Options{ DataStackMaxDepth: 4, }) @@ -1254,7 +1254,7 @@ func TestEVM(t *testing.T) { Input: code, Gas: big.NewInt(1000000), } - options := Options{ + options := engine.Options{ CallStackMaxDepth: 2, } vm := New(options) @@ -1746,7 +1746,7 @@ func returnWord() []byte { func runVM(st acmstate.ReaderWriter, caller, callee crypto.Address, code []byte, gas uint64) *exec.TxExecution { gasBefore := new(big.Int).SetUint64(gas) txe := new(exec.TxExecution) - vm := New(Options{ + vm := New(engine.Options{ DebugOpcodes: true, }) bigGas := new(big.Int).SetUint64(gas) diff --git a/execution/evm/precompiles_test.go b/execution/evm/precompiles_test.go index 180ead428..4175858a0 100644 --- a/execution/evm/precompiles_test.go +++ b/execution/evm/precompiles_test.go @@ -59,7 +59,7 @@ func TestECRecover(t *testing.T) { Gas: big.NewInt(10000), } - vm := New(Options{ + vm := New(engine.Options{ Natives: native.MustDefaultNatives(), }) returnValue, err := vm.Contract(solidity.DeployedBytecode_ECRecover).Call(state, params) diff --git a/execution/execution.go b/execution/execution.go index 121e9f8b8..ff1023603 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -9,6 +9,8 @@ import ( "runtime/debug" "sync" + "github.com/hyperledger/burrow/execution/vms" + "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/acm/validator" @@ -18,7 +20,6 @@ import ( "github.com/hyperledger/burrow/execution/contexts" "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" - "github.com/hyperledger/burrow/execution/evm" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/names" "github.com/hyperledger/burrow/execution/proposal" @@ -85,7 +86,7 @@ type executor struct { emitter *event.Emitter block *exec.BlockExecution logger *logging.Logger - vmOptions evm.Options + vmOptions engine.Options contexts map[payload.Type]contexts.Context } @@ -149,7 +150,8 @@ func newExecutor(name string, runCall bool, params Params, backend ExecutorState baseContexts := map[payload.Type]contexts.Context{ payload.TypeCall: &contexts.CallContext{ - EVM: evm.New(exe.vmOptions), + // TODO: expose WASM options to config + VMS: vms.NewConnectedVirtualMachines(exe.vmOptions), Blockchain: blockchain, State: exe.stateCache, MetadataState: exe.metadataCache, diff --git a/execution/native/contract.go b/execution/native/contract.go index bc91db387..a4e2320e9 100644 --- a/execution/native/contract.go +++ b/execution/native/contract.go @@ -53,7 +53,7 @@ type Contract struct { logger *logging.Logger } -var _ Native = &Contract{} +var _ engine.Native = &Contract{} // Create a new native contract description object by passing a comment, name // and a list of member functions descriptions diff --git a/execution/native/function.go b/execution/native/function.go index f8f9f367f..4b40dfca6 100644 --- a/execution/native/function.go +++ b/execution/native/function.go @@ -40,7 +40,7 @@ type Function struct { logger *logging.Logger } -var _ Native = &Function{} +var _ engine.Native = &Function{} // Context is the first argument to any native function. This struct carries // all the context an native needs to access e.g. state in burrow. diff --git a/execution/native/native.go b/execution/native/native.go index 1c36ec1b8..babba8f3e 100644 --- a/execution/native/native.go +++ b/execution/native/native.go @@ -1,19 +1,5 @@ package native -import ( - "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/execution/engine" -) - -type Native interface { - engine.Callable - SetExternals(externals engine.Dispatcher) - ContractMeta() []*acm.ContractMeta - FullName() string - Address() crypto.Address -} - func MustDefaultNatives() *Natives { ns, err := DefaultNatives() if err != nil { diff --git a/execution/native/natives.go b/execution/native/natives.go index f5389567d..c9d4e99e3 100644 --- a/execution/native/natives.go +++ b/execution/native/natives.go @@ -14,15 +14,15 @@ import ( ) type Natives struct { - callableByAddress map[crypto.Address]Native - callableByName map[string]Native + callableByAddress map[crypto.Address]engine.Native + callableByName map[string]engine.Native logger *logging.Logger } func New() *Natives { return &Natives{ - callableByAddress: make(map[crypto.Address]Native), - callableByName: make(map[string]Native), + callableByAddress: make(map[crypto.Address]engine.Native), + callableByName: make(map[string]engine.Native), logger: logging.NewNoopLogger(), } } @@ -63,7 +63,7 @@ func (ns *Natives) Callables() []engine.Callable { return callables } -func (ns *Natives) GetByName(name string) Native { +func (ns *Natives) GetByName(name string) engine.Native { return ns.callableByName[name] } @@ -77,7 +77,7 @@ func (ns *Natives) GetFunction(name string) *Function { return f } -func (ns *Natives) GetByAddress(address crypto.Address) Native { +func (ns *Natives) GetByAddress(address crypto.Address) engine.Native { return ns.callableByAddress[address] } @@ -126,7 +126,7 @@ func (ns *Natives) Function(comment string, address crypto.Address, permFlag per return ns, nil } -func (ns *Natives) register(callable Native) error { +func (ns *Natives) register(callable engine.Native) error { name := callable.FullName() address := callable.Address() _, ok := ns.callableByName[name] diff --git a/execution/native/state.go b/execution/native/state.go index 96d2dc3a7..1e52762bf 100644 --- a/execution/native/state.go +++ b/execution/native/state.go @@ -5,19 +5,20 @@ import ( "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" ) // This wrapper provides a state that behaves 'as if' the natives were stored directly in state. // TODO: we may want to actually store native account sentinel values (and their metadata) in on-disk state down the line type State struct { - natives *Natives + natives engine.Natives backend acmstate.ReaderWriter } // Get a new state that wraps the backend but intercepts any calls to natives returning appropriate errors message // or an Account sentinel for the particular native -func NewState(natives *Natives, backend acmstate.ReaderWriter) *State { +func NewState(natives engine.Natives, backend acmstate.ReaderWriter) *State { return &State{ natives: natives, backend: backend, @@ -74,7 +75,7 @@ func (s *State) ensureNonNative(address crypto.Address, action string) error { return nil } -func account(callable Native) *acm.Account { +func account(callable engine.Native) *acm.Account { return &acm.Account{ Address: callable.Address(), NativeName: callable.FullName(), diff --git a/execution/simulated_call.go b/execution/simulated_call.go index 4b78985b1..0f5e25971 100644 --- a/execution/simulated_call.go +++ b/execution/simulated_call.go @@ -6,8 +6,9 @@ import ( "github.com/hyperledger/burrow/bcm" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/contexts" - "github.com/hyperledger/burrow/execution/evm" + "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/execution/vms" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" @@ -20,7 +21,7 @@ func CallSim(reader acmstate.Reader, blockchain bcm.BlockchainInfo, fromAddress, cache := acmstate.NewCache(reader) exe := contexts.CallContext{ - EVM: evm.Default(), + VMS: vms.NewConnectedVirtualMachines(engine.Options{}), RunCall: true, State: cache, MetadataState: acmstate.NewMemoryState(), diff --git a/execution/vms/vms.go b/execution/vms/vms.go new file mode 100644 index 000000000..f3883e812 --- /dev/null +++ b/execution/vms/vms.go @@ -0,0 +1,25 @@ +package vms + +import ( + "github.com/hyperledger/burrow/execution/defaults" + "github.com/hyperledger/burrow/execution/engine" + "github.com/hyperledger/burrow/execution/evm" + "github.com/hyperledger/burrow/execution/wasm" +) + +type VirtualMachines struct { + *evm.EVM + *wasm.WVM +} + +func NewConnectedVirtualMachines(options engine.Options) *VirtualMachines { + options = defaults.CompleteOptions(options) + evm := evm.New(options) + wvm := wasm.New(options) + // Allow the virtual machines to call each other + engine.Connect(evm, wvm, options.Natives) + return &VirtualMachines{ + EVM: evm, + WVM: wvm, + } +} diff --git a/execution/wasm/contract.go b/execution/wasm/contract.go index c01d56cbe..c1b2b7851 100644 --- a/execution/wasm/contract.go +++ b/execution/wasm/contract.go @@ -94,13 +94,14 @@ func (ctx *context) ResolveFunc(module, field string) lifeExec.FunctionImport { value := bin.BigIntFromLittleEndianBytes(vm.Memory[valuePtr : valuePtr+ValueByteSize]) var err error - ctx.returnData, err = engine.CallFromSite(ctx.state, ctx.vm, ctx.params, engine.CallParams{ - CallType: exec.CallTypeCall, - Callee: target, - Input: vm.Memory[dataPtr : dataPtr+dataLen], - Value: *value, - Gas: gasLimit, - }) + ctx.returnData, err = engine.CallFromSite(ctx.state, ctx.vm.externalDispatcher, ctx.params, + engine.CallParams{ + CallType: exec.CallTypeCall, + Callee: target, + Input: vm.Memory[dataPtr : dataPtr+dataLen], + Value: *value, + Gas: gasLimit, + }) // Refund any remaining gas to be used on subsequent calls ctx.params.Gas.Add(ctx.params.Gas, gasLimit) diff --git a/execution/wasm/wasm.go b/execution/wasm/wasm.go index eeb2868c1..f67940cf8 100644 --- a/execution/wasm/wasm.go +++ b/execution/wasm/wasm.go @@ -2,13 +2,12 @@ package wasm import ( "github.com/hyperledger/burrow/acm" - "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/execution/native" - "github.com/hyperledger/burrow/logging" - "github.com/hyperledger/burrow/acm/acmstate" + "github.com/hyperledger/burrow/execution/defaults" "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/execution/native" lifeExec "github.com/perlin-network/life/exec" ) @@ -22,31 +21,22 @@ var DefaultVMConfig = lifeExec.VMConfig{ type WVM struct { engine.Externals - options Options - vmConfig lifeExec.VMConfig + options engine.Options + vmConfig lifeExec.VMConfig + externalDispatcher engine.Dispatcher } -type Options struct { - Natives *native.Natives - CallStackMaxDepth uint64 - Logger *logging.Logger -} - -func New(options Options) *WVM { - if options.Natives == nil { - options.Natives = native.MustDefaultNatives() - } - if options.Logger == nil { - options.Logger = logging.NewNoopLogger() - } - return &WVM{ - options: options, +func New(options engine.Options) *WVM { + vm := &WVM{ + options: defaults.CompleteOptions(options), vmConfig: DefaultVMConfig, } + vm.externalDispatcher = engine.Dispatchers{&vm.Externals, vm} + return vm } func Default() *WVM { - return New(Options{}) + return New(engine.Options{}) } // RunWASM creates a WASM VM, and executes the given WASM contract code @@ -77,9 +67,8 @@ func (vm *WVM) Execute(st acmstate.ReaderWriter, blockchain engine.Blockchain, e } func (vm *WVM) Dispatch(acc *acm.Account) engine.Callable { - callable := vm.Externals.Dispatch(acc) - if callable != nil { - return callable + if len(acc.WASMCode) == 0 { + return nil } return vm.Contract(acc.WASMCode) } From 4444787f9f7749d1e08278136234b9d0865db8d3 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 3 Feb 2021 17:57:20 +0100 Subject: [PATCH 133/185] Fix dispatch for code-less contracts and natives Let each VM handle adding its natives to the dispatcher (if we move to an in-state sentinel for natives we can change this) Signed-off-by: Silas Davis --- execution/engine/call.go | 10 +++++++--- execution/engine/dispatcher.go | 3 +++ execution/errors/codes.go | 1 + execution/errors/errors.go | 1 + execution/evm/evm.go | 5 +++-- execution/vms/vms.go | 2 +- execution/wasm/wasm.go | 2 +- 7 files changed, 17 insertions(+), 7 deletions(-) diff --git a/execution/engine/call.go b/execution/engine/call.go index 3898ae6cf..1b1a3e850 100644 --- a/execution/engine/call.go +++ b/execution/engine/call.go @@ -1,7 +1,6 @@ package engine import ( - "fmt" "math/big" "github.com/hyperledger/burrow/execution/errors" @@ -141,10 +140,15 @@ func CallFromSite(st State, dispatcher Dispatcher, site CallParams, target CallP target.Callee = site.Callee default: - panic(fmt.Errorf("switch statement should be exhaustive so this should not have been reached")) + // Switch should be exhaustive so we should reach this + panic("invalid call type") } - returnData, err := dispatcher.Dispatch(acc).Call(childState, target) + dispatch := dispatcher.Dispatch(acc) + if dispatch == nil { + return nil, errors.Errorf(errors.Codes.NotCallable, "cannot call: %v", acc.Address) + } + returnData, err := dispatch.Call(childState, target) if err == nil { // Sync error is a hard stop diff --git a/execution/engine/dispatcher.go b/execution/engine/dispatcher.go index 793a31bd5..e05713778 100644 --- a/execution/engine/dispatcher.go +++ b/execution/engine/dispatcher.go @@ -32,6 +32,9 @@ var _ ExternalDispatcher = (*Externals)(nil) func (ed *Externals) Dispatch(acc *acm.Account) Callable { // Try external calls then fallback to EVM + if ed.externals == nil { + return nil + } return ed.externals.Dispatch(acc) } diff --git a/execution/errors/codes.go b/execution/errors/codes.go index 9d3595016..2106f68f9 100644 --- a/execution/errors/codes.go +++ b/execution/errors/codes.go @@ -49,6 +49,7 @@ type codes struct { UnresolvedSymbols *Code InvalidContractCode *Code NonExistentAccount *Code + NotCallable *Code // For lookup codes []*Code diff --git a/execution/errors/errors.go b/execution/errors/errors.go index 838621ac2..4b327391b 100644 --- a/execution/errors/errors.go +++ b/execution/errors/errors.go @@ -64,6 +64,7 @@ var Codes = codes{ UnresolvedSymbols: code("code has unresolved symbols"), InvalidContractCode: code("contract being created with unexpected code"), NonExistentAccount: code("account does not exist"), + NotCallable: code("cannot dispatch call"), } func init() { diff --git a/execution/evm/evm.go b/execution/evm/evm.go index 9467f4c23..b23c28c4e 100644 --- a/execution/evm/evm.go +++ b/execution/evm/evm.go @@ -37,7 +37,7 @@ func New(options engine.Options) *EVM { options: options, } vm.logger = options.Logger.WithScope("NewVM").With("evm_nonce", options.Nonce) - vm.externalDispatcher = engine.Dispatchers{&vm.Externals, vm} + vm.externalDispatcher = engine.Dispatchers{&vm.Externals, options.Natives, vm} return vm } @@ -81,7 +81,8 @@ func (vm *EVM) SetLogger(logger *logging.Logger) { } func (vm *EVM) Dispatch(acc *acm.Account) engine.Callable { - if len(acc.EVMCode) == 0 { + // Let the EVM handle code-less (e.g. those created by a call) contracts (so only return nil if there is _other_ non-EVM code) + if len(acc.EVMCode) == 0 && len(acc.Code()) != 0 { return nil } return vm.Contract(acc.EVMCode) diff --git a/execution/vms/vms.go b/execution/vms/vms.go index f3883e812..ad1e3a12f 100644 --- a/execution/vms/vms.go +++ b/execution/vms/vms.go @@ -17,7 +17,7 @@ func NewConnectedVirtualMachines(options engine.Options) *VirtualMachines { evm := evm.New(options) wvm := wasm.New(options) // Allow the virtual machines to call each other - engine.Connect(evm, wvm, options.Natives) + engine.Connect(evm, wvm) return &VirtualMachines{ EVM: evm, WVM: wvm, diff --git a/execution/wasm/wasm.go b/execution/wasm/wasm.go index f67940cf8..81da984b0 100644 --- a/execution/wasm/wasm.go +++ b/execution/wasm/wasm.go @@ -31,7 +31,7 @@ func New(options engine.Options) *WVM { options: defaults.CompleteOptions(options), vmConfig: DefaultVMConfig, } - vm.externalDispatcher = engine.Dispatchers{&vm.Externals, vm} + vm.externalDispatcher = engine.Dispatchers{&vm.Externals, options.Natives, vm} return vm } From b6ec056480bddee76b8ce77e0ea37c43f3bcb8b0 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Thu, 4 Feb 2021 11:04:49 +0000 Subject: [PATCH 134/185] Add keccak256 precompile Signed-off-by: Sean Young --- execution/native/precompiles.go | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/execution/native/precompiles.go b/execution/native/precompiles.go index d9cc7b93d..f4951bdf9 100644 --- a/execution/native/precompiles.go +++ b/execution/native/precompiles.go @@ -13,6 +13,7 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/permission" "golang.org/x/crypto/ripemd160" + "golang.org/x/crypto/sha3" ) var Precompiles = New(). @@ -35,7 +36,11 @@ var Precompiles = New(). MustFunction(`Compute the operation base**exp % mod where the values are big ints`, leftPadAddress(5), permission.None, - expMod) + expMod). + MustFunction(`Compute the keccak256 hash of input`, + leftPadAddress(20), + permission.None, + keccak256Func) func leftPadAddress(bs ...byte) crypto.Address { return crypto.AddressFromWord256(binary.LeftPadWord256(bs)) @@ -121,6 +126,20 @@ func ripemd160Func(ctx Context) (output []byte, err error) { return binary.LeftPadBytes(hasher.Sum(nil), 32), nil } +func keccak256Func(ctx Context) (output []byte, err error) { + // Deduct gas + gasRequired := wordsIn(uint64(len(ctx.Input)))*engine.GasRipemd160Word + engine.GasRipemd160Base + err = engine.UseGasNegative(ctx.Gas, gasRequired) + if err != nil { + return nil, err + } + // Hash + hasher := sha3.NewLegacyKeccak256() + // CONTRACT: this does not err + hasher.Write(ctx.Input) + return binary.LeftPadBytes(hasher.Sum(nil), 32), nil +} + func identity(ctx Context) (output []byte, err error) { // Deduct gas gasRequired := wordsIn(uint64(len(ctx.Input)))*engine.GasIdentityWord + engine.GasIdentityBase From 4413dcf0f36dccbb2975f47c0fdea6e1259997de Mon Sep 17 00:00:00 2001 From: Sean Young Date: Tue, 2 Feb 2021 17:30:44 +0000 Subject: [PATCH 135/185] Download the latest solang Signed-off-by: Sean Young --- Makefile | 7 ++++++- cmd/burrow/commands/compile.go | 2 +- execution/wasm/storage_test.solang.go | 2 +- tests/scripts/deps/solang.sh | 8 ++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100755 tests/scripts/deps/solang.sh diff --git a/Makefile b/Makefile index da5c66163..96d8a6332 100644 --- a/Makefile +++ b/Makefile @@ -210,7 +210,7 @@ test_js: @cd ${BURROW_TS_PATH} && yarn test .PHONY: test -test: check bin/solc +test: check bin/solc bin/solang @tests/scripts/bin_wrapper.sh go test ./... ${GO_TEST_ARGS} .PHONY: test_keys @@ -255,6 +255,11 @@ bin/solc: ./tests/scripts/deps/solc.sh @tests/scripts/deps/solc.sh bin/solc @touch bin/solc +bin/solang: ./tests/scripts/deps/solang.sh + @mkdir -p bin + @tests/scripts/deps/solang.sh bin/solang + @touch bin/solang + # test burrow with checks for race conditions .PHONY: test_race test_race: build_race diff --git a/cmd/burrow/commands/compile.go b/cmd/burrow/commands/compile.go index 4fa2ab18d..a66ffecee 100644 --- a/cmd/burrow/commands/compile.go +++ b/cmd/burrow/commands/compile.go @@ -40,7 +40,7 @@ func Compile(output Output) func(cmd *cli.Cmd) { } if resp.Warning != "" { - output.Fatalf(resp.Warning) + output.Printf(resp.Warning) } f, err := os.Create(solfile + ".go") diff --git a/execution/wasm/storage_test.solang.go b/execution/wasm/storage_test.solang.go index c5514373e..4926872c6 100644 --- a/execution/wasm/storage_test.solang.go +++ b/execution/wasm/storage_test.solang.go @@ -2,5 +2,5 @@ package wasm import hex "github.com/tmthrgd/go-hex" -var Bytecode_storage_test = hex.MustDecodeString("0061736D0100000001230760027F7F0060000060017F017F60047F7E7E7F006000017F60017F0060037F7F7F000294010708657468657265756D0C73746F7261676553746F7265000008657468657265756D0C67657443616C6C56616C7565000508657468657265756D06726576657274000008657468657265756D0B676574436F646553697A65000408657468657265756D08636F6465436F7079000608657468657265756D0666696E697368000008657468657265756D066D656D6F727902010202030807000102030304010608017F01418080040B070801046D61696E000C0AB704071C00034020004200370300200041086A21002001417F6A22010D000B0B2B00410041003602808004410041003602848004410041003A008C800441003F0041F0FF7B6A36028880040BA90101047F41808004210102400340024020012D000C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A360208200041003A000C2000200136020420012000360200200141086A20033602000B200141013A000C200141106A0B5201017E02402003450D000240200341C000710D00200141C00020036BAD8820022003AD220486842102200120048621010C010B20012003413F71AD862102420021010B20002002370308200020013703000B5201017E02402003450D000240200341C000710D00200241C00020036BAD8620012003AD220488842101200220048821020C010B20022003413F71AD882101420021020B20002002370308200020013703000B4E01017F230041C0006B22002400200041386A4200370300200042003703302000420037032820004200370320200041041006200042E600370300200041206A20001000200041C0006A240041000B4C01017F230041106B220024002000100102402000290300200041086A290300844200510D00410041001002000B10071003419E716A2200100841E20E20001004100B1A410041BC081005000B0BC308010041000BBC080061736D0100000001230760027F7F0060000060017F017F60037F7F7F0060047F7E7E7F0060017F006000017F02B3010808657468657265756D0C67657443616C6C56616C7565000508657468657265756D06726576657274000008657468657265756D0F67657443616C6C4461746153697A65000608657468657265756D0C63616C6C44617461436F7079000308657468657265756D0B73746F726167654C6F6164000008657468657265756D0666696E697368000008657468657265756D0C73746F7261676553746F7265000008657468657265756D066D656D6F727902010202030807000102030404010608017F01418080040B070801046D61696E000D0AB806071C00034020004200370300200041086A21002001417F6A22010D000B0B2B00410041003602808004410041003602848004410041003A008C800441003F0041F0FF7B6A36028880040BA90101047F41808004210102400340024020012D000C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A360208200041003A000C2000200136020420012000360200200141086A20033602000B200141013A000C200141106A0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0B5201017E02402003450D000240200341C000710D00200141C00020036BAD8820022003AD220486842102200120048621010C010B20012003413F71AD862102420021010B20002002370308200020013703000B5201017E02402003450D000240200341C000710D00200241C00020036BAD8620012003AD220488842101200220048821020C010B20022003413F71AD882101420021020B20002002370308200020013703000BED0202047F017E23004190016B2200240020002201100002402001290300200141086A290300844200510D00410041001001000B100810022202100922034100200210030240024002400240200241034D0D002003280200220241DE9AB88F79460D01200241A298B6BE01470D00200041706A2200240020014188016A420037030020014200370380012001420037037820014200370370200141F0006A200141D0006A10042000200129035042027C37030041000D0241201009220141041007200020014108100A200141201005000B410041001001000B200141F0006A41186A420037030020014200370380012001420037037820014200370370200141F0006A200141D0006A1004200141306A41186A420037030020014200370340200142003703382001420037033020012903502104200141106A410410072001200442017C370310200141306A200141106A100641000D01410041001005000B410041001001000B410041001001000B") +var Bytecode_storage_test = hex.MustDecodeString("0061736D01000000011C0660027F7F0060017F006000017F60037F7F7F0060017F017F6000000280010608657468657265756D0C73746F7261676553746F7265000008657468657265756D0C67657443616C6C56616C7565000108657468657265756D0B676574436F646553697A65000208657468657265756D08636F6465436F7079000308657468657265756D0666696E697368000008657468657265756D06726576657274000003060500040502050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E000A0AAB0305240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B4E01017F230041C0006B22002400200041386A4200370300200042003703302000420037032820004200370320200041041006200042E600370300200041206A20001000200041C0006A240041000B5E01027F230041106B220024002000100102402000290300200041086A290300844200520D0010084100100241C0736A22003602B00741002000100722013602B407200141C00C2000100310091A410041AE071004000B410041001005000B0BB507010041000BAE070061736D01000000011C0660017F006000017F60037F7F7F0060027F7F0060017F017F600000029F010708657468657265756D0C67657443616C6C56616C7565000008657468657265756D0F67657443616C6C4461746153697A65000108657468657265756D0C63616C6C44617461436F7079000208657468657265756D0B73746F726167654C6F6164000308657468657265756D0C73746F7261676553746F7265000308657468657265756D06726576657274000308657468657265756D0666696E697368000303060503020405050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E000B0AB20505240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B850302037F017E230041A0016B22002400200041086A100002400240024002402000290308200041106A290300844200520D00100A41001001220136020441002001100922023602082002410020011002200141034D0D014100200228020022013602000240200141A298B6BE01460D00200141DE9AB88F79470D0220004180016A41186A420037030020004200370390012000420037038801200042003703800120004180016A200041E0006A1003200041C0006A41186A420037030020004200370350200042003703482000420037034020002903602103200041206A410410072000200342017C370320200041C0006A200041206A10044100450D03410041001005000B20004198016A420037030020004200370390012000420037038801200042003703800120004180016A200041E0006A10032000200029036042027C3703184100450D03410041001005000B410041001005000B410041001005000B410041001006000B41201009220141041007200041186A200141081008200141201006000B") var Abi_storage_test = []byte(`[{"type":"constructor","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"getFooPlus2","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"name":"incFoo","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"}]`) diff --git a/tests/scripts/deps/solang.sh b/tests/scripts/deps/solang.sh new file mode 100755 index 000000000..4db93801d --- /dev/null +++ b/tests/scripts/deps/solang.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -e +SOLANG_URL="https://github.com/hyperledger-labs/solang/releases/download/v0.1.7/solang-linux" +SOLANG_BIN="$1" + +wget -O "$SOLANG_BIN" "$SOLANG_URL" + +chmod +x "$SOLANG_BIN" From bceb323be400e05c5b67c5c88bb0a3bdd6d4c798 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Thu, 4 Feb 2021 11:53:39 +0000 Subject: [PATCH 136/185] Allow playbook to specify wasm Signed-off-by: Sean Young --- deploy/def/jobs.go | 4 ++++ deploy/jobs/job_manager.go | 44 ++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/deploy/def/jobs.go b/deploy/def/jobs.go index 82794ec34..77b47379e 100644 --- a/deploy/def/jobs.go +++ b/deploy/def/jobs.go @@ -317,6 +317,8 @@ type Build struct { Instance string `mapstructure:"instance" json:"instance" yaml:"instance" toml:"instance"` // (Optional) Path to store an extra copy of the bin file Store string `mapstructure:"store" json:"store" yaml:"store" toml:"store"` + // (Optional) Use solang to compile to wasm + Wasm bool `mapstructure:"wasm" json:"wasm" yaml:"wasm" toml:"wasm"` } func (job *Build) Validate() error { @@ -361,6 +363,8 @@ type Deploy struct { Variables []*abi.Variable // (Optional) Path to store an extra copy of the bin file Store string `mapstructure:"store" json:"store" yaml:"store" toml:"store"` + // (Optional) Use solang to compile to wasm + Wasm bool `mapstructure:"wasm" json:"wasm" yaml:"wasm" toml:"wasm"` } func (job *Deploy) Validate() error { diff --git a/deploy/jobs/job_manager.go b/deploy/jobs/job_manager.go index 791bd5e22..71e6cfe90 100644 --- a/deploy/jobs/job_manager.go +++ b/deploy/jobs/job_manager.go @@ -22,6 +22,7 @@ const ( type solidityCompilerWork struct { contractName string workDir string + wasm bool } type compilerJob struct { @@ -31,33 +32,28 @@ type compilerJob struct { done chan struct{} } -func solcRunner(jobs chan *compilerJob, logger *logging.Logger) { +func solidityRunner(jobs chan *compilerJob, logger *logging.Logger) { for { job, ok := <-jobs if !ok { - break + return } - resp, err := compilers.EVM(job.work.contractName, false, job.work.workDir, nil, logger) - (*job).compilerResp = resp - (*job).err = err - close(job.done) - } -} + if job.work.wasm { + resp, err := compilers.WASM(job.work.contractName, job.work.workDir, logger) + (*job).compilerResp = resp + (*job).err = err + + } else { + resp, err := compilers.EVM(job.work.contractName, false, job.work.workDir, nil, logger) + (*job).compilerResp = resp + (*job).err = err -func solangRunner(jobs chan *compilerJob, logger *logging.Logger) { - for { - job, ok := <-jobs - if !ok { - return } - resp, err := compilers.WASM(job.work.contractName, job.work.workDir, logger) - (*job).compilerResp = resp - (*job).err = err close(job.done) } } -func queueCompilerWork(job *def.Job, playbook *def.Playbook, jobs chan *compilerJob) error { +func queueCompilerWork(job *def.Job, playbook *def.Playbook, jobs chan *compilerJob, forceWasm bool) error { payload, err := job.Payload() if err != nil { return fmt.Errorf("could not get Job payload: %v", payload) @@ -71,6 +67,7 @@ func queueCompilerWork(job *def.Job, playbook *def.Playbook, jobs chan *compiler work: solidityCompilerWork{ contractName: job.Build.Contract, workDir: playbook.Path, + wasm: job.Build.Wasm || forceWasm, }, } job.Intermediate = &intermediate @@ -82,6 +79,7 @@ func queueCompilerWork(job *def.Job, playbook *def.Playbook, jobs chan *compiler work: solidityCompilerWork{ contractName: job.Deploy.Contract, workDir: playbook.Path, + wasm: job.Deploy.Wasm || forceWasm, }, } job.Intermediate = &intermediate @@ -89,14 +87,14 @@ func queueCompilerWork(job *def.Job, playbook *def.Playbook, jobs chan *compiler } case *def.Proposal: for _, job := range job.Proposal.Jobs { - err = queueCompilerWork(job, playbook, jobs) + err = queueCompilerWork(job, playbook, jobs, forceWasm) if err != nil { return err } } case *def.Meta: for _, job := range job.Meta.Playbook.Jobs { - err = queueCompilerWork(job, playbook, jobs) + err = queueCompilerWork(job, playbook, jobs, forceWasm) if err != nil { return err } @@ -318,15 +316,11 @@ func ExecutePlaybook(args *def.DeployArgs, playbook *def.Playbook, client *def.C defer close(jobs) for i := 0; i < concurrentSolc; i++ { - if args.Wasm { - go solangRunner(jobs, logger) - } else { - go solcRunner(jobs, logger) - } + go solidityRunner(jobs, logger) } for _, job := range playbook.Jobs { - queueCompilerWork(job, playbook, jobs) + queueCompilerWork(job, playbook, jobs, args.Wasm) } err = doJobs(playbook, args, client, logger) From 3ec7682aa556dd3206d9ac779e597afa92ca3273 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Thu, 4 Feb 2021 10:31:01 +0000 Subject: [PATCH 137/185] Add tests for evm calling wasm and wasm calling evm Signed-off-by: Sean Young --- Makefile | 2 +- execution/solidity/evm.sol | 22 ++++ execution/solidity/evm.sol.go | 9 ++ execution/solidity/ewasm.solang | 41 +++++++ execution/solidity/ewasm.solang.go | 6 + execution/wasm/contract.go | 4 + .../rpcevents/execution_events_server_test.go | 2 +- integration/rpctest/helpers.go | 33 +++++- integration/rpctransact/call_test.go | 106 ++++++++++++++++-- .../rpctransact/transact_server_test.go | 2 +- 10 files changed, 215 insertions(+), 12 deletions(-) create mode 100644 execution/solidity/evm.sol create mode 100644 execution/solidity/evm.sol.go create mode 100644 execution/solidity/ewasm.solang create mode 100644 execution/solidity/ewasm.solang.go diff --git a/Makefile b/Makefile index 96d8a6332..21bfacd0a 100644 --- a/Makefile +++ b/Makefile @@ -193,7 +193,7 @@ solidity: $(patsubst %.sol, %.sol.go, $(wildcard ./execution/solidity/*.sol)) bu # Solang fixtures .PHONY: solang -solang: $(patsubst %.solang, %.solang.go, $(wildcard ./execution/wasm/*.solang)) build_burrow +solang: $(patsubst %.solang, %.solang.go, $(wildcard ./execution/solidity/*.solang) $(wildcard ./execution/wasm/*.solang)) build_burrow %.solang.go: %.solang @burrow compile --wasm $^ diff --git a/execution/solidity/evm.sol b/execution/solidity/evm.sol new file mode 100644 index 000000000..56f073a7a --- /dev/null +++ b/execution/solidity/evm.sol @@ -0,0 +1,22 @@ +interface E { + function get_vm() external returns (string memory); + function get_number() external returns (int); +} + +contract evm is E { + function get_vm() public returns (string memory) { + return "evm"; + } + + function get_number() public returns (int) { + return 102; + } + + function call_get_vm(E e) public returns (string memory) { + return string(abi.encodePacked("evm called ", e.get_vm())); + } + + function call_get_number(E e) public returns (int) { + return e.get_number(); + } +} diff --git a/execution/solidity/evm.sol.go b/execution/solidity/evm.sol.go new file mode 100644 index 000000000..e056cbaf7 --- /dev/null +++ b/execution/solidity/evm.sol.go @@ -0,0 +1,9 @@ +package solidity + +import hex "github.com/tmthrgd/go-hex" + +var Bytecode_E = hex.MustDecodeString("") +var Abi_E = []byte(`[{"constant":false,"inputs":[],"name":"get_number","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"get_vm","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]`) +var Bytecode_evm = hex.MustDecodeString("608060405234801561001057600080fd5b506104ea806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806364418e791461005157806397cb92681461010e5780639bbc114014610191578063eeb4e367146101e9575b600080fd5b6100936004803603602081101561006757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610207565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100d35780820151818401526020810190506100b8565b50505050905090810190601f1680156101005780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101166103e3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561015657808201518184015260208101905061013b565b50505050905090810190601f1680156101835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d3600480360360208110156101a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610420565b6040518082815260200191505060405180910390f35b6101f16104ac565b6040518082815260200191505060405180910390f35b60608173ffffffffffffffffffffffffffffffffffffffff166397cb92686040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561025157600080fd5b505af1158015610265573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561028f57600080fd5b81019080805160405193929190846401000000008211156102af57600080fd5b838201915060208201858111156102c557600080fd5b82518660018202830111640100000000821117156102e257600080fd5b8083526020830192505050908051906020019080838360005b838110156103165780820151818401526020810190506102fb565b50505050905090810190601f1680156103435780820380516001836020036101000a031916815260200191505b5060405250505060405160200180807f65766d2063616c6c656420000000000000000000000000000000000000000000815250600b0182805190602001908083835b602083106103a85780518252602082019150602081019050602083039250610385565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040529050919050565b60606040518060400160405280600381526020017f65766d0000000000000000000000000000000000000000000000000000000000815250905090565b60008173ffffffffffffffffffffffffffffffffffffffff1663eeb4e3676040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561046a57600080fd5b505af115801561047e573d6000803e3d6000fd5b505050506040513d602081101561049457600080fd5b81019080805190602001909291905050509050919050565b6000606690509056fea265627a7a72315820d711eff257c8b2cf7fb13a13f3dd7d3a9d66c8fbee3941a68b343b42d31bb7de64736f6c634300050c0032") +var DeployedBytecode_evm = hex.MustDecodeString("608060405234801561001057600080fd5b506004361061004c5760003560e01c806364418e791461005157806397cb92681461010e5780639bbc114014610191578063eeb4e367146101e9575b600080fd5b6100936004803603602081101561006757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610207565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100d35780820151818401526020810190506100b8565b50505050905090810190601f1680156101005780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101166103e3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561015657808201518184015260208101905061013b565b50505050905090810190601f1680156101835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d3600480360360208110156101a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610420565b6040518082815260200191505060405180910390f35b6101f16104ac565b6040518082815260200191505060405180910390f35b60608173ffffffffffffffffffffffffffffffffffffffff166397cb92686040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561025157600080fd5b505af1158015610265573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561028f57600080fd5b81019080805160405193929190846401000000008211156102af57600080fd5b838201915060208201858111156102c557600080fd5b82518660018202830111640100000000821117156102e257600080fd5b8083526020830192505050908051906020019080838360005b838110156103165780820151818401526020810190506102fb565b50505050905090810190601f1680156103435780820380516001836020036101000a031916815260200191505b5060405250505060405160200180807f65766d2063616c6c656420000000000000000000000000000000000000000000815250600b0182805190602001908083835b602083106103a85780518252602082019150602081019050602083039250610385565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040529050919050565b60606040518060400160405280600381526020017f65766d0000000000000000000000000000000000000000000000000000000000815250905090565b60008173ffffffffffffffffffffffffffffffffffffffff1663eeb4e3676040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561046a57600080fd5b505af115801561047e573d6000803e3d6000fd5b505050506040513d602081101561049457600080fd5b81019080805190602001909291905050509050919050565b6000606690509056fea265627a7a72315820d711eff257c8b2cf7fb13a13f3dd7d3a9d66c8fbee3941a68b343b42d31bb7de64736f6c634300050c0032") +var Abi_evm = []byte(`[{"constant":false,"inputs":[{"internalType":"contract E","name":"e","type":"address"}],"name":"call_get_number","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract E","name":"e","type":"address"}],"name":"call_get_vm","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"get_number","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"get_vm","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]`) diff --git a/execution/solidity/ewasm.solang b/execution/solidity/ewasm.solang new file mode 100644 index 000000000..c9419e9ca --- /dev/null +++ b/execution/solidity/ewasm.solang @@ -0,0 +1,41 @@ +interface E { + function get_vm() external returns (string memory); + function get_number() external returns (int); +} + +contract ewasm is E { + function get_vm() public override returns (string memory) { + return "ewasm"; + } + + function get_number() public override returns (int) { + return 54321; + } + + function call_get_vm(E e) public returns (string memory) { + // solc can't do this + return "ewasm called " + e.get_vm(); + } + + function call_get_number(E e) public returns (int) { + return e.get_number(); + } + + function try_revert() public pure { + revert(); + } + + function hash_tests() public pure { + bytes32 hash1 = keccak256("Hello, World!"); + + assert(hash1 == hex"acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f"); + + bytes32 hash2 = sha256("Hello, World!"); + + assert(hash2 == hex"dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f"); + + bytes20 hash3 = ripemd160("Hello, World!"); + + assert(hash3 == hex"527a6a4b9a6da75607546842e0e00105350b1aaf"); + } +} diff --git a/execution/solidity/ewasm.solang.go b/execution/solidity/ewasm.solang.go new file mode 100644 index 000000000..a0f62ed70 --- /dev/null +++ b/execution/solidity/ewasm.solang.go @@ -0,0 +1,6 @@ +package solidity + +import hex "github.com/tmthrgd/go-hex" + +var Bytecode_ewasm = hex.MustDecodeString("0061736D01000000011C0660017F006000017F60037F7F7F0060027F7F0060017F017F60000002680508657468657265756D0C67657443616C6C56616C7565000008657468657265756D0B676574436F646553697A65000108657468657265756D08636F6465436F7079000208657468657265756D0666696E697368000308657468657265756D0672657665727400030304030405050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E00070AB40203A60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B5B01027F230041106B220024002000100002402000290300200041086A290300844200520D0010064100100141BE696A22003602C41241002000100522013602C812200141C21620001002410041C2121003000B410041001004000B0BC912010041000BC2120061736D0100000001340960017F006000017F60037F7F7F0060027F7F0060057E7F7F7F7F017F60037F7F7F017F60017F017F60047F7F7F7F017F60000002B7010808657468657265756D0C67657443616C6C56616C7565000008657468657265756D0F67657443616C6C4461746153697A65000108657468657265756D0C63616C6C44617461436F7079000208657468657265756D06726576657274000308657468657265756D0463616C6C000408657468657265756D1167657452657475726E4461746153697A65000108657468657265756D0E72657475726E44617461436F7079000208657468657265756D0666696E6973680003030B0A020302020205060708080405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E00110AF70F0A2E0002402002450D000340200020012D00003A0000200041016A2100200141016A21012002417F6A22020D000B0B0B240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0B2D002000411F6A21000340200120002D00003A0000200141016A21012000417F6A21002002417F6A22020D000B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0B29002001417F6A21010340200120026A20002D00003A0000200041016A21002002417F6A22020D000B0B7E01017F200120006C220141086A100E2203200036020420032000360200200341086A2100024002402002417F460D002001450D010340200020022D00003A0000200041016A2100200241016A21022001417F6A22010D000C020B0B2001450D000340200041003A0000200041016A21002001417F6A22010D000B0B20030BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B7F01027F200320016A220441086A100E2205200436020420052004360200200541086A210402402001450D000340200420002D00003A0000200441016A2104200041016A21002001417F6A22010D000B0B02402003450D000340200420022D00003A0000200441016A2104200241016A21022003417F6A22030D000B0B20050B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040BC40A03057F037E017F230041F0016B22002400200022011000024002400240024002400240024002402001290300200141086A290300844200520D00101041001001220236021841002002100E220336021C2003410020021002024002400240024002400240200241034D0D004100200328020022043602142002417C6A2102200341046A21030240200441EDE98EBF064A0D002004419BF9C68004460D062004419DB3A4957D460D02200441A0BFE9E605470D0141004100100300000B200441E482B9CC07460D03200441EEE98EBF06460D022004419797CBC406460D040B410041001003000B4100450D05410041001003000B200141286A42003703002001420037032020014200370318200142B1A8033703104100450D05410041001003000B024002400240024020024120490D002003200141306A4118100A200141C0006A3502002105200141306A41086A2903002106200129033021074108100E1A4108100E1A4104100E2202419797CBC406360200200241046A41001009200142003703C001200142003703B80120012006370398012001200737039001200120053E02A00120014190016A200141D0016A4114100C42FFFFFFFFFFFFFFFFFF00200141D0016A200141B8016A2002410410040D091005220241086A100E22032002360200200341046A2002360200200341086A220441002002100620033502002205421F580D0120042001418C016A4104100A200135028C01220742207C22062005560D0220042007A76A200141A8016A4104100A0240200620012802A8012202AD7C2005560D0020014100410D2002410120042006A76A100D220241086A2002280200100F3602484100450D0E0C040B4102450D0D0C030B200141F0016A240041020F0B41020D010C0B0B4102450D0A0B410041001003000B4108100E1A200141054101410D100D36024C4100450D05410041001003000B02400240024020024120490D002003200141D0006A4118100A200141E0006A3502002105200141D0006A41086A2903002106200129035021074104100E220241EEE98EBF06360200200241046A41001009200142003703B001200142003703A801200120063703C001200120073703B801200120053E02C801200141B8016A20014190016A4114100C42FFFFFFFFFFFFFFFFFF0020014190016A200141A8016A2002410410040D081005220241086A100E22032002360200200341046A2002360200200341086A22044100200210062003280200411F4D0D012004200141D0016A4120100A200141E8006A41186A200141D0016A41186A2903003703002001200141E0016A2903003703782001200141D8016A290300370370200120012903D00137036841000D020C090B200141F0016A240041020F0B4102450D070B410041001003000B410041001003000B410041001007000B4120100E220241041009200141106A20024120100B200241201007000B410041001003000B200128024C280200413F6A41607141206A2203100E220220034103761009200041706A22042200240020044120360200200420024104100B200128024C22082802002101200041706A22042400200420013602002004200241206A4104100B200241C0006A200841086A20011008200220031007000B410041001003000B4120100E220241041009200141E8006A20024120100B200241201007000B2001280248280200413F6A41607141206A2203100E220220034103761009200041706A22042200240020044120360200200420024104100B200128024822082802002101200041706A22042400200420013602002004200241206A4104100B200241C0006A200841086A20011008200220031007000B0B18010041000B12657761736D2063616C6C656420657761736D") +var Abi_ewasm = []byte(`[{"name":"get_vm","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"nonpayable"},{"name":"get_number","type":"function","inputs":[],"outputs":[{"name":"","type":"int256","internalType":"int256"}],"stateMutability":"nonpayable"},{"name":"call_get_vm","type":"function","inputs":[{"name":"e","type":"address","internalType":"contract E"}],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"nonpayable"},{"name":"call_get_number","type":"function","inputs":[{"name":"e","type":"address","internalType":"contract E"}],"outputs":[{"name":"","type":"int256","internalType":"int256"}],"stateMutability":"nonpayable"},{"name":"try_revert","type":"function","inputs":[],"outputs":[],"stateMutability":"pure"},{"name":"hash_tests","type":"function","inputs":[],"outputs":[],"stateMutability":"pure"}]`) diff --git a/execution/wasm/contract.go b/execution/wasm/contract.go index c1b2b7851..e72965648 100644 --- a/execution/wasm/contract.go +++ b/execution/wasm/contract.go @@ -51,6 +51,10 @@ func (c *Contract) execute(state engine.State, params engine.CallParams) ([]byte } _, err = vm.Run(entryID) + if err != nil && errors.GetCode(err) == errors.Codes.ExecutionReverted { + return nil, err + } + if err != nil && errors.GetCode(err) != errors.Codes.None { return nil, errors.Errorf(errors.Codes.ExecutionAborted, "%s: %v", errHeader, err) } diff --git a/integration/rpcevents/execution_events_server_test.go b/integration/rpcevents/execution_events_server_test.go index 76e089957..470c9c0ae 100644 --- a/integration/rpcevents/execution_events_server_test.go +++ b/integration/rpcevents/execution_events_server_test.go @@ -165,7 +165,7 @@ func TestExecutionEventsTest(t *testing.T) { }) t.Run("Revert", func(t *testing.T) { - txe, err := rpctest.CreateContract(tcli, inputAddress0, solidity.Bytecode_Revert, nil) + txe, err := rpctest.CreateEVMContract(tcli, inputAddress0, solidity.Bytecode_Revert, nil) require.NoError(t, err) spec, err := abi.ReadSpec(solidity.Abi_Revert) require.NoError(t, err) diff --git a/integration/rpctest/helpers.go b/integration/rpctest/helpers.go index a7ec5d69b..6e0932938 100644 --- a/integration/rpctest/helpers.go +++ b/integration/rpctest/helpers.go @@ -55,7 +55,7 @@ type MetadataMap struct { Abi []byte } -func CreateContract(cli rpctransact.TransactClient, inputAddress crypto.Address, bytecode []byte, metamap []MetadataMap) (*exec.TxExecution, error) { +func CreateEVMContract(cli rpctransact.TransactClient, inputAddress crypto.Address, bytecode []byte, metamap []MetadataMap) (*exec.TxExecution, error) { var meta []*payload.ContractMeta if metamap != nil { meta = make([]*payload.ContractMeta, len(metamap)) @@ -86,6 +86,37 @@ func CreateContract(cli rpctransact.TransactClient, inputAddress crypto.Address, return txe, nil } +func CreateWASMContract(cli rpctransact.TransactClient, inputAddress crypto.Address, bytecode []byte, metamap []MetadataMap) (*exec.TxExecution, error) { + var meta []*payload.ContractMeta + if metamap != nil { + meta = make([]*payload.ContractMeta, len(metamap)) + for i, m := range metamap { + hash := sha3.NewLegacyKeccak256() + hash.Write(m.DeployedCode) + meta[i] = &payload.ContractMeta{ + CodeHash: hash.Sum(nil), + Meta: string(m.Abi), + } + } + } + + txe, err := cli.CallTxSync(context.Background(), &payload.CallTx{ + Input: &payload.TxInput{ + Address: inputAddress, + Amount: 2, + }, + Address: nil, + WASM: bytecode, + Fee: 2, + GasLimit: 10000, + ContractMeta: meta, + }) + if err != nil { + return nil, err + } + return txe, nil +} + func CallContract(cli rpctransact.TransactClient, inputAddress, contractAddress crypto.Address, data []byte) (*exec.TxExecution, error) { txe, err := cli.CallTxSync(context.Background(), &payload.CallTx{ Input: &payload.TxInput{ diff --git a/integration/rpctransact/call_test.go b/integration/rpctransact/call_test.go index 8778d1e7b..59c0b5bdd 100644 --- a/integration/rpctransact/call_test.go +++ b/integration/rpctransact/call_test.go @@ -140,7 +140,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) go func() { defer wg.Done() for j := 0; j < numRuns; j++ { - createTxe, err := rpctest.CreateContract(cli, inputAddress, solidity.Bytecode_StrangeLoop, nil) + createTxe, err := rpctest.CreateEVMContract(cli, inputAddress, solidity.Bytecode_StrangeLoop, nil) if err != nil { errCh <- err return @@ -280,7 +280,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) t.Run("CallEvents", func(t *testing.T) { t.Parallel() - createTxe, err := rpctest.CreateContract(cli, inputAddress, solidity.Bytecode_StrangeLoop, nil) + createTxe, err := rpctest.CreateEVMContract(cli, inputAddress, solidity.Bytecode_StrangeLoop, nil) require.NoError(t, err) address := lastCall(createTxe.Events).CallData.Callee spec, err := abi.ReadSpec(solidity.Abi_StrangeLoop) @@ -299,7 +299,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) t.Run("DeployAbis", func(t *testing.T) { t.Parallel() - createTxe, err := rpctest.CreateContract(cli, inputAddress, solidity.Bytecode_A, []rpctest.MetadataMap{ + createTxe, err := rpctest.CreateEVMContract(cli, inputAddress, solidity.Bytecode_A, []rpctest.MetadataMap{ {DeployedCode: solidity.DeployedBytecode_A, Abi: solidity.Abi_A}, {DeployedCode: solidity.DeployedBytecode_B, Abi: solidity.Abi_B}, {DeployedCode: solidity.DeployedBytecode_C, Abi: solidity.Abi_C}, @@ -342,7 +342,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) t.Run("LogEvents", func(t *testing.T) { t.Parallel() - createTxe, err := rpctest.CreateContract(cli, inputAddress, solidity.Bytecode_StrangeLoop, nil) + createTxe, err := rpctest.CreateEVMContract(cli, inputAddress, solidity.Bytecode_StrangeLoop, nil) require.NoError(t, err) address := lastCall(createTxe.Events).CallData.Callee spec, err := abi.ReadSpec(solidity.Abi_StrangeLoop) @@ -367,7 +367,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) t.Run("EventEmitter", func(t *testing.T) { t.Parallel() - createTxe, err := rpctest.CreateContract(cli, inputAddress, solidity.Bytecode_EventEmitter, nil) + createTxe, err := rpctest.CreateEVMContract(cli, inputAddress, solidity.Bytecode_EventEmitter, nil) require.NoError(t, err) address := lastCall(createTxe.Events).CallData.Callee spec, err := abi.ReadSpec(solidity.Abi_EventEmitter) @@ -406,7 +406,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) * Any indexed string (or dynamic array) will be hashed, so we might want to store strings * in bytes32. This shows how we would automatically map this to string */ - createTxe, err := rpctest.CreateContract(cli, inputAddress, solidity.Bytecode_EventEmitter, nil) + createTxe, err := rpctest.CreateEVMContract(cli, inputAddress, solidity.Bytecode_EventEmitter, nil) require.NoError(t, err) address := lastCall(createTxe.Events).CallData.Callee spec, err := abi.ReadSpec(solidity.Abi_EventEmitter) @@ -442,7 +442,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) t.Run("Revert", func(t *testing.T) { t.Parallel() - txe, err := rpctest.CreateContract(cli, inputAddress, solidity.Bytecode_Revert, nil) + txe, err := rpctest.CreateEVMContract(cli, inputAddress, solidity.Bytecode_Revert, nil) require.NoError(t, err) spec, err := abi.ReadSpec(solidity.Abi_Revert) require.NoError(t, err) @@ -460,7 +460,7 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) t.Run("RevertWithoutReason", func(t *testing.T) { t.Parallel() - txe, err := rpctest.CreateContract(cli, inputAddress, solidity.Bytecode_Revert, nil) + txe, err := rpctest.CreateEVMContract(cli, inputAddress, solidity.Bytecode_Revert, nil) require.NoError(t, err) spec, err := abi.ReadSpec(solidity.Abi_Revert) require.NoError(t, err) @@ -474,6 +474,96 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) assert.Nil(t, revertReason) return }) + + t.Run("SimpleWasm", func(t *testing.T) { + t.Parallel() + txe, err := rpctest.CreateWASMContract(cli, inputAddress, solidity.Bytecode_ewasm, nil) + require.NoError(t, err) + spec, err := abi.ReadSpec(solidity.Abi_ewasm) + require.NoError(t, err) + data, _, err := spec.Pack("get_number") + require.NoError(t, err) + txe, err = rpctest.CallContract(cli, inputAddress, txe.Receipt.ContractAddress, data) + require.NoError(t, err) + var number int64 + err = spec.Unpack(txe.Result.Return, "get_number", &number) + require.NoError(t, err) + assert.Equal(t, number, int64(54321)) + return + }) + + t.Run("WasmRevertWithoutReason", func(t *testing.T) { + t.Parallel() + txe, err := rpctest.CreateWASMContract(cli, inputAddress, solidity.Bytecode_ewasm, nil) + require.NoError(t, err) + spec, err := abi.ReadSpec(solidity.Abi_ewasm) + require.NoError(t, err) + data, _, err := spec.Pack("try_revert") + require.NoError(t, err) + txe, err = rpctest.CallContract(cli, inputAddress, txe.Receipt.ContractAddress, data) + require.NoError(t, err) + assert.Equal(t, errors.Codes.ExecutionReverted, errors.GetCode(txe.Exception)) + revertReason, err := abi.UnpackRevert(txe.Result.Return) + require.NoError(t, err) + assert.Nil(t, revertReason) + return + }) + + t.Run("WasmCallEvm", func(t *testing.T) { + t.Parallel() + txe, err := rpctest.CreateWASMContract(cli, inputAddress, solidity.Bytecode_ewasm, nil) + require.NoError(t, err) + wasmContract := txe.Receipt.ContractAddress + txe, err = rpctest.CreateEVMContract(cli, inputAddress, solidity.Bytecode_evm, nil) + require.NoError(t, err) + evmContract := txe.Receipt.ContractAddress + spec, err := abi.ReadSpec(solidity.Abi_ewasm) + require.NoError(t, err) + data, _, err := spec.Pack("call_get_vm", evmContract) + require.NoError(t, err) + txe, err = rpctest.CallContract(cli, inputAddress, wasmContract, data) + require.NoError(t, err) + var res string + err = spec.Unpack(txe.Result.Return, "call_get_vm", &res) + require.NoError(t, err) + assert.Equal(t, res, "ewasm called evm") + return + }) + + t.Run("EvmCallWasm", func(t *testing.T) { + t.Parallel() + txe, err := rpctest.CreateWASMContract(cli, inputAddress, solidity.Bytecode_ewasm, nil) + require.NoError(t, err) + wasmContract := txe.Receipt.ContractAddress + txe, err = rpctest.CreateEVMContract(cli, inputAddress, solidity.Bytecode_evm, nil) + require.NoError(t, err) + evmContract := txe.Receipt.ContractAddress + spec, err := abi.ReadSpec(solidity.Abi_evm) + require.NoError(t, err) + data, _, err := spec.Pack("call_get_vm", wasmContract) + require.NoError(t, err) + txe, err = rpctest.CallContract(cli, inputAddress, evmContract, data) + require.NoError(t, err) + var res string + err = spec.Unpack(txe.Result.Return, "call_get_vm", &res) + require.NoError(t, err) + assert.Equal(t, res, "evm called ewasm") + return + }) + + t.Run("WasmHashPrecompiles", func(t *testing.T) { + t.Parallel() + txe, err := rpctest.CreateWASMContract(cli, inputAddress, solidity.Bytecode_ewasm, nil) + require.NoError(t, err) + wasmContract := txe.Receipt.ContractAddress + spec, err := abi.ReadSpec(solidity.Abi_ewasm) + require.NoError(t, err) + data, _, err := spec.Pack("hash_tests", wasmContract) + require.NoError(t, err) + txe, err = rpctest.CallContract(cli, inputAddress, wasmContract, data) + require.NoError(t, err) + return + }) }) } diff --git a/integration/rpctransact/transact_server_test.go b/integration/rpctransact/transact_server_test.go index be0eb04fc..a66d77c13 100644 --- a/integration/rpctransact/transact_server_test.go +++ b/integration/rpctransact/transact_server_test.go @@ -45,7 +45,7 @@ func TestTransactServer(t *testing.T) { assert.False(t, acc.GetPublicKey().IsSet()) // Sign with this account - should set public key - _, err = rpctest.CreateContract(tcli, input.GetAddress(), solidity.Bytecode_StrangeLoop, nil) + _, err = rpctest.CreateEVMContract(tcli, input.GetAddress(), solidity.Bytecode_StrangeLoop, nil) require.NoError(t, err) acc, err = qcli.GetAccount(context.Background(), &rpcquery.GetAccountParam{Address: input.GetAddress()}) From 77822616b48d39d819a25859aa9055d94e395487 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Thu, 4 Feb 2021 14:12:45 +0000 Subject: [PATCH 138/185] Implement some more ewasm functions Signed-off-by: Sean Young --- execution/solidity/ewasm.solang | 14 ++- execution/solidity/ewasm.solang.go | 4 +- execution/wasm/contract.go | 130 ++++++++++++++++++++++++++- integration/rpctransact/call_test.go | 27 ++++++ 4 files changed, 169 insertions(+), 6 deletions(-) diff --git a/execution/solidity/ewasm.solang b/execution/solidity/ewasm.solang index c9419e9ca..1eaf266b7 100644 --- a/execution/solidity/ewasm.solang +++ b/execution/solidity/ewasm.solang @@ -3,12 +3,18 @@ interface E { function get_number() external returns (int); } +event L ( + int indexed f1, + string f2, + bool f3 +); + contract ewasm is E { - function get_vm() public override returns (string memory) { + function get_vm() public override pure returns (string memory) { return "ewasm"; } - function get_number() public override returns (int) { + function get_number() public pure override returns (int) { return 54321; } @@ -38,4 +44,8 @@ contract ewasm is E { assert(hash3 == hex"527a6a4b9a6da75607546842e0e00105350b1aaf"); } + + function test_events() public { + emit L(102, "Hello from wasm", true); + } } diff --git a/execution/solidity/ewasm.solang.go b/execution/solidity/ewasm.solang.go index a0f62ed70..9bc43ef32 100644 --- a/execution/solidity/ewasm.solang.go +++ b/execution/solidity/ewasm.solang.go @@ -2,5 +2,5 @@ package solidity import hex "github.com/tmthrgd/go-hex" -var Bytecode_ewasm = hex.MustDecodeString("0061736D01000000011C0660017F006000017F60037F7F7F0060027F7F0060017F017F60000002680508657468657265756D0C67657443616C6C56616C7565000008657468657265756D0B676574436F646553697A65000108657468657265756D08636F6465436F7079000208657468657265756D0666696E697368000308657468657265756D0672657665727400030304030405050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E00070AB40203A60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B5B01027F230041106B220024002000100002402000290300200041086A290300844200520D0010064100100141BE696A22003602C41241002000100522013602C812200141C21620001002410041C2121003000B410041001004000B0BC912010041000BC2120061736D0100000001340960017F006000017F60037F7F7F0060027F7F0060057E7F7F7F7F017F60037F7F7F017F60017F017F60047F7F7F7F017F60000002B7010808657468657265756D0C67657443616C6C56616C7565000008657468657265756D0F67657443616C6C4461746153697A65000108657468657265756D0C63616C6C44617461436F7079000208657468657265756D06726576657274000308657468657265756D0463616C6C000408657468657265756D1167657452657475726E4461746153697A65000108657468657265756D0E72657475726E44617461436F7079000208657468657265756D0666696E6973680003030B0A020302020205060708080405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E00110AF70F0A2E0002402002450D000340200020012D00003A0000200041016A2100200141016A21012002417F6A22020D000B0B0B240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0B2D002000411F6A21000340200120002D00003A0000200141016A21012000417F6A21002002417F6A22020D000B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0B29002001417F6A21010340200120026A20002D00003A0000200041016A21002002417F6A22020D000B0B7E01017F200120006C220141086A100E2203200036020420032000360200200341086A2100024002402002417F460D002001450D010340200020022D00003A0000200041016A2100200241016A21022001417F6A22010D000C020B0B2001450D000340200041003A0000200041016A21002001417F6A22010D000B0B20030BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B7F01027F200320016A220441086A100E2205200436020420052004360200200541086A210402402001450D000340200420002D00003A0000200441016A2104200041016A21002001417F6A22010D000B0B02402003450D000340200420022D00003A0000200441016A2104200241016A21022003417F6A22030D000B0B20050B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040BC40A03057F037E017F230041F0016B22002400200022011000024002400240024002400240024002402001290300200141086A290300844200520D00101041001001220236021841002002100E220336021C2003410020021002024002400240024002400240200241034D0D004100200328020022043602142002417C6A2102200341046A21030240200441EDE98EBF064A0D002004419BF9C68004460D062004419DB3A4957D460D02200441A0BFE9E605470D0141004100100300000B200441E482B9CC07460D03200441EEE98EBF06460D022004419797CBC406460D040B410041001003000B4100450D05410041001003000B200141286A42003703002001420037032020014200370318200142B1A8033703104100450D05410041001003000B024002400240024020024120490D002003200141306A4118100A200141C0006A3502002105200141306A41086A2903002106200129033021074108100E1A4108100E1A4104100E2202419797CBC406360200200241046A41001009200142003703C001200142003703B80120012006370398012001200737039001200120053E02A00120014190016A200141D0016A4114100C42FFFFFFFFFFFFFFFFFF00200141D0016A200141B8016A2002410410040D091005220241086A100E22032002360200200341046A2002360200200341086A220441002002100620033502002205421F580D0120042001418C016A4104100A200135028C01220742207C22062005560D0220042007A76A200141A8016A4104100A0240200620012802A8012202AD7C2005560D0020014100410D2002410120042006A76A100D220241086A2002280200100F3602484100450D0E0C040B4102450D0D0C030B200141F0016A240041020F0B41020D010C0B0B4102450D0A0B410041001003000B4108100E1A200141054101410D100D36024C4100450D05410041001003000B02400240024020024120490D002003200141D0006A4118100A200141E0006A3502002105200141D0006A41086A2903002106200129035021074104100E220241EEE98EBF06360200200241046A41001009200142003703B001200142003703A801200120063703C001200120073703B801200120053E02C801200141B8016A20014190016A4114100C42FFFFFFFFFFFFFFFFFF0020014190016A200141A8016A2002410410040D081005220241086A100E22032002360200200341046A2002360200200341086A22044100200210062003280200411F4D0D012004200141D0016A4120100A200141E8006A41186A200141D0016A41186A2903003703002001200141E0016A2903003703782001200141D8016A290300370370200120012903D00137036841000D020C090B200141F0016A240041020F0B4102450D070B410041001003000B410041001003000B410041001007000B4120100E220241041009200141106A20024120100B200241201007000B410041001003000B200128024C280200413F6A41607141206A2203100E220220034103761009200041706A22042200240020044120360200200420024104100B200128024C22082802002101200041706A22042400200420013602002004200241206A4104100B200241C0006A200841086A20011008200220031007000B410041001003000B4120100E220241041009200141E8006A20024120100B200241201007000B2001280248280200413F6A41607141206A2203100E220220034103761009200041706A22042200240020044120360200200420024104100B200128024822082802002101200041706A22042400200420013602002004200241206A4104100B200241C0006A200841086A20011008200220031007000B0B18010041000B12657761736D2063616C6C656420657761736D") -var Abi_ewasm = []byte(`[{"name":"get_vm","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"nonpayable"},{"name":"get_number","type":"function","inputs":[],"outputs":[{"name":"","type":"int256","internalType":"int256"}],"stateMutability":"nonpayable"},{"name":"call_get_vm","type":"function","inputs":[{"name":"e","type":"address","internalType":"contract E"}],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"nonpayable"},{"name":"call_get_number","type":"function","inputs":[{"name":"e","type":"address","internalType":"contract E"}],"outputs":[{"name":"","type":"int256","internalType":"int256"}],"stateMutability":"nonpayable"},{"name":"try_revert","type":"function","inputs":[],"outputs":[],"stateMutability":"pure"},{"name":"hash_tests","type":"function","inputs":[],"outputs":[],"stateMutability":"pure"}]`) +var Bytecode_ewasm = hex.MustDecodeString("0061736D01000000011C0660017F006000017F60037F7F7F0060027F7F0060017F017F60000002680508657468657265756D0C67657443616C6C56616C7565000008657468657265756D0B676574436F646553697A65000108657468657265756D08636F6465436F7079000208657468657265756D0666696E697368000308657468657265756D0672657665727400030304030405050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E00070AB40203A60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B5B01027F230041106B220024002000100002402000290300200041086A290300844200520D001006410010014188676A22003602F81441002000100522013602FC14200141F81820001002410041F8141003000B410041001004000B0BFF14010041000BF8140061736D01000000013E0A60017F006000017F60037F7F7F0060027F7F0060077F7F7F7F7F7F7F0060057E7F7F7F7F017F60037F7F7F017F60017F017F60047F7F7F7F017F60000002C6010908657468657265756D0C67657443616C6C56616C7565000008657468657265756D0F67657443616C6C4461746153697A65000108657468657265756D0C63616C6C44617461436F7079000208657468657265756D06726576657274000308657468657265756D036C6F67000408657468657265756D0463616C6C000508657468657265756D1167657452657475726E4461746153697A65000108657468657265756D0E72657475726E44617461436F7079000208657468657265756D0666696E6973680003030B0A020302020206070809090405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E00120AE4110A2E0002402002450D000340200020012D00003A0000200041016A2100200141016A21012002417F6A22020D000B0B0B240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0B2D002000411F6A21000340200120002D00003A0000200141016A21012000417F6A21002002417F6A22020D000B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0B29002001417F6A21010340200120026A20002D00003A0000200041016A21002002417F6A22020D000B0B7E01017F200120006C220141086A100F2203200036020420032000360200200341086A2100024002402002417F460D002001450D010340200020022D00003A0000200041016A2100200241016A21022001417F6A22010D000C020B0B2001450D000340200041003A0000200041016A21002001417F6A22010D000B0B20030BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B7F01027F200320016A220441086A100F2205200436020420052004360200200541086A210402402001450D000340200420002D00003A0000200441016A2104200041016A21002001417F6A22010D000B0B02402003450D000340200420022D00003A0000200441016A2104200241016A21022003417F6A22030D000B0B20050B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040BB10C03057F037E017F230041F0016B2200240020002201100002400240024002400240024002400240024002402001290300200141086A290300844200520D00101141001001220236024841002002100F220336024C2003410020021002200241034D0D094100200328020022043602442002417C6A2102200341046A210302400240024002400240024002402004419FBFE9E6054A0D002004419BF9C68004460D04200441A89B8AAA7A460D012004419DB3A4957D470D104100450D0C410041001003000B200441E382B9CC074A0D02200441A0BFE9E605460D04200441EEE98EBF06460D012004419797CBC406460D050C0F0B410F41014100100E2203280200413F6A41607141C0006A2204100F22022004410376100A200141C0003602900120014190016A20024104100C2001200328020022003602B801200141B8016A200241C0006A4104100C200241E0006A200341086A200010092002413F6A41013A00004120100F22034104100A200141E8016A4200370300200142003703E001200142003703D801200142E6003703D001200141D0016A20034120100C200220044102411020034100410010044100450D06410041001003000B200141286A42003703002001420037032020014200370318200142B1A8033703104100450D06410041001003000B200441E482B9CC07470D0C024002400240024020024120490D002003200141306A4118100B200141C0006A3502002105200141306A41086A2903002106200129033021074108100F1A4108100F1A4104100F2202419797CBC406360200200241046A4100100A200142003703C001200142003703B80120012006370398012001200737039001200120053E02A00120014190016A200141D0016A4114100D42FFFFFFFFFFFFFFFFFF00200141D0016A200141B8016A2002410410050D0A1006220241086A100F22032002360200200341046A2002360200200341086A220441002002100720033502002205421F580D0120042001418C016A4104100B200135028C01220742207C22062005560D0220042007A76A200141A8016A4104100B0240200620012802A8012202AD7C2005560D0020014130410D2002410120042006A76A100E220241086A2002280200101036024C4100450D100C040B4102450D0F0C030B200141F0016A240041020F0B41020D010C0D0B4102450D0C0B410041001003000B02400240024020024120490D002003200141D0006A4118100B200141E0006A3502002105200141D0006A41086A2903002106200129035021074104100F220241EEE98EBF06360200200241046A4100100A200142003703B001200142003703A801200120063703C001200120073703B801200120053E02C801200141B8016A20014190016A4114100D42FFFFFFFFFFFFFFFFFF0020014190016A200141A8016A2002410410050D091006220241086A100F22032002360200200341046A2002360200200341086A22044100200210072003280200411F4D0D012004200141D0016A4120100B200141E8006A41186A200141D0016A41186A2903003703002001200141E0016A2903003703782001200141D8016A290300370370200120012903D00137036841000D020C0C0B200141F0016A240041020F0B4102450D0A0B410041001003000B41004100100300000B4108100F1A200141054101413D100E360288014100450D06410041001003000B410041001003000B410041001008000B4120100F22024104100A200141106A20024120100C200241201008000B410041001003000B410041001003000B410041001008000B200128028801280200413F6A41607141206A2203100F22022003410376100A200041706A22042200240020044120360200200420024104100C20012802880122082802002101200041706A22042400200420013602002004200241206A4104100C200241C0006A200841086A20011009200220031008000B4120100F22024104100A200141E8006A20024120100C200241201008000B200128024C280200413F6A41607141206A2203100F22022003410376100A200041706A22042200240020044120360200200420024104100C200128024C22082802002101200041706A22042400200420013602002004200241206A4104100C200241C0006A200841086A20011009200220031008000B410041001003000B0B48010041000B4248656C6C6F2066726F6D207761736D007177213B393C76BAF374B5A91F5A8E4A972270CEFDDA6375DF53FB1A3CAC11C9657761736D2063616C6C656420657761736D") +var Abi_ewasm = []byte(`[{"name":"get_vm","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"name":"get_number","type":"function","inputs":[],"outputs":[{"name":"","type":"int256","internalType":"int256"}],"stateMutability":"pure"},{"name":"call_get_vm","type":"function","inputs":[{"name":"e","type":"address","internalType":"contract E"}],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"nonpayable"},{"name":"call_get_number","type":"function","inputs":[{"name":"e","type":"address","internalType":"contract E"}],"outputs":[{"name":"","type":"int256","internalType":"int256"}],"stateMutability":"nonpayable"},{"name":"try_revert","type":"function","inputs":[],"outputs":[],"stateMutability":"pure"},{"name":"hash_tests","type":"function","inputs":[],"outputs":[],"stateMutability":"pure"},{"name":"test_events","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"L","type":"event","inputs":[{"name":"f1","type":"int256","internalType":"int256","indexed":true},{"name":"f2","type":"string","internalType":"string"},{"name":"f3","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":""}]`) diff --git a/execution/wasm/contract.go b/execution/wasm/contract.go index e72965648..e5e511832 100644 --- a/execution/wasm/contract.go +++ b/execution/wasm/contract.go @@ -5,6 +5,7 @@ import ( "fmt" "math/big" + "github.com/hyperledger/burrow/execution/evm" "github.com/hyperledger/burrow/execution/exec" bin "github.com/hyperledger/burrow/binary" @@ -84,6 +85,12 @@ func (ctx *context) ResolveFunc(module, field string) lifeExec.FunctionImport { switch field { case "call": + fallthrough + case "callCode": + fallthrough + case "callDelegate": + fallthrough + case "callStatic": return func(vm *lifeExec.VirtualMachine) int64 { gasLimit := big.NewInt(vm.GetCurrentFrame().Locals[0]) addressPtr := uint32(vm.GetCurrentFrame().Locals[1]) @@ -97,10 +104,25 @@ func (ctx *context) ResolveFunc(module, field string) lifeExec.FunctionImport { // TODO: is this guaranteed to be okay? Should be avoid panic here if out of bounds? value := bin.BigIntFromLittleEndianBytes(vm.Memory[valuePtr : valuePtr+ValueByteSize]) + var callType exec.CallType + + switch field { + case "call": + callType = exec.CallTypeCall + case "callCode": + callType = exec.CallTypeCode + case "callStatic": + callType = exec.CallTypeStatic + case "callDeletegate": + callType = exec.CallTypeDelegate + default: + panic("should not happen") + } + var err error ctx.returnData, err = engine.CallFromSite(ctx.state, ctx.vm.externalDispatcher, ctx.params, engine.CallParams{ - CallType: exec.CallTypeCall, + CallType: callType, Callee: target, Input: vm.Memory[dataPtr : dataPtr+dataLen], Value: *value, @@ -121,7 +143,6 @@ func (ctx *context) ResolveFunc(module, field string) lifeExec.FunctionImport { // Spec says return 1 for error, but not sure when to do that (as opposed to abort): // https://github.com/ewasm/design/blob/master/eth_interface.md#call panic(err) - return Error } return Success } @@ -279,6 +300,111 @@ func (ctx *context) ResolveFunc(module, field string) lifeExec.FunctionImport { return Success } + case "getBlockTimestamp": + return func(vm *lifeExec.VirtualMachine) int64 { + return int64(ctx.state.Blockchain.LastBlockTime().Unix()) + } + + case "getBlockNumber": + return func(vm *lifeExec.VirtualMachine) int64 { + return int64(ctx.state.Blockchain.LastBlockHeight()) + } + + case "getTxOrigin": + return func(vm *lifeExec.VirtualMachine) int64 { + addressPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + + copy(vm.Memory[addressPtr:addressPtr+crypto.AddressLength], ctx.params.Origin.Bytes()) + + return Success + } + + case "getCaller": + return func(vm *lifeExec.VirtualMachine) int64 { + addressPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + + copy(vm.Memory[addressPtr:addressPtr+crypto.AddressLength], ctx.params.Caller.Bytes()) + + return Success + } + + case "getBlockGasLimit": + return func(vm *lifeExec.VirtualMachine) int64 { + return ctx.params.Gas.Int64() + } + + case "getGasLeft": + return func(vm *lifeExec.VirtualMachine) int64 { + // do the same as EVM + return ctx.params.Gas.Int64() + } + + case "getBlockCoinbase": + return func(vm *lifeExec.VirtualMachine) int64 { + // do the same as EVM + addressPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + + copy(vm.Memory[addressPtr:addressPtr+crypto.AddressLength], crypto.ZeroAddress.Bytes()) + + return Success + } + + case "getBlockHash": + return func(vm *lifeExec.VirtualMachine) int64 { + blockNumber := uint64(vm.GetCurrentFrame().Locals[0]) + hashPtr := int(vm.GetCurrentFrame().Locals[1]) + + lastBlockHeight := ctx.state.Blockchain.LastBlockHeight() + if blockNumber >= lastBlockHeight { + panic(fmt.Sprintf(" => attempted to get block hash of a non-existent block: %v", blockNumber)) + } else if lastBlockHeight-blockNumber > evm.MaximumAllowedBlockLookBack { + panic(fmt.Sprintf(" => attempted to get block hash of a block %d outside of the allowed range "+ + "(must be within %d blocks)", blockNumber, evm.MaximumAllowedBlockLookBack)) + } else { + hash, err := ctx.state.Blockchain.BlockHash(blockNumber) + if err != nil { + panic(fmt.Sprintf(" => blockhash failed: %v", err)) + } + + copy(vm.Memory[hashPtr:hashPtr+len(hash)], hash) + } + + return Success + } + + case "log": + return func(vm *lifeExec.VirtualMachine) int64 { + dataPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[1])) + + data := vm.Memory[dataPtr : dataPtr+dataLen] + + topicCount := uint32(vm.GetCurrentFrame().Locals[2]) + topics := make([]bin.Word256, topicCount) + + if topicCount > 4 { + panic(fmt.Sprintf("%d topics not permitted", topicCount)) + } + + for i := uint32(0); i < topicCount; i++ { + topicPtr := int(uint32(vm.GetCurrentFrame().Locals[3+i])) + topicData := vm.Memory[topicPtr : topicPtr+bin.Word256Bytes] + topics[i] = bin.RightPadWord256(topicData) + } + + err := ctx.state.EventSink.Log(&exec.LogEvent{ + Address: ctx.params.Callee, + Topics: topics, + Data: data, + }) + + if err != nil { + panic(fmt.Sprintf(" => log failed: %v", err)) + } + + return Success + } + default: panic(fmt.Sprintf("unknown function %s", field)) } diff --git a/integration/rpctransact/call_test.go b/integration/rpctransact/call_test.go index 59c0b5bdd..73a0503db 100644 --- a/integration/rpctransact/call_test.go +++ b/integration/rpctransact/call_test.go @@ -564,6 +564,33 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) require.NoError(t, err) return }) + + t.Run("WasmLogEvents", func(t *testing.T) { + t.Parallel() + createTxe, err := rpctest.CreateWASMContract(cli, inputAddress, solidity.Bytecode_ewasm, nil) + require.NoError(t, err) + address := lastCall(createTxe.Events).CallData.Callee + spec, err := abi.ReadSpec(solidity.Abi_ewasm) + require.NoError(t, err) + data, _, err := spec.Pack("test_events") + require.NoError(t, err) + callTxe, err := rpctest.CallContract(cli, inputAddress, address, data) + require.NoError(t, err) + evs := filterLogs(callTxe.Events) + require.Len(t, evs, 1) + log := evs[0] + var f1 int64 + var f2 string + var f3 bool + evAbi := spec.EventsByName["L"] + err = abi.UnpackEvent(evAbi, log.Topics, log.Data, &f1, &f2, &f3) + require.NoError(t, err) + assert.Equal(t, evAbi.ID.Bytes(), log.Topics[0].Bytes()) + assert.Equal(t, int64(102), f1) + assert.Equal(t, "Hello from wasm", f2) + assert.Equal(t, true, f3) + return + }) }) } From a1bec44b7b5f4aedf4140cb15bd4b21c573a224c Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 4 Feb 2021 15:46:20 +0100 Subject: [PATCH 139/185] Implement CHAINID and DIFFICULTY opcodes We have to adopt our own convention for CHAINID, which is now Keccak(ChainID). DIFFICULTY, which doesn't really make sense for Tendermint, is fixed to one to represent 'no hashing misses' when proposing. Signed-off-by: Silas Davis --- crypto/signature.go | 2 +- execution/engine/blockchain.go | 6 ++++++ execution/engine/callable.go | 1 + execution/evm/asm/opcodes.go | 16 +++++++++------- execution/evm/contract.go | 10 ++++++++++ execution/wasm/contract.go | 8 +------- 6 files changed, 28 insertions(+), 15 deletions(-) diff --git a/crypto/signature.go b/crypto/signature.go index 27443c33a..6bac7d074 100644 --- a/crypto/signature.go +++ b/crypto/signature.go @@ -118,7 +118,7 @@ func (sig *Signature) String() string { } func GetEthChainID(chainID string) *big.Int { - return new(big.Int).SetBytes([]byte(chainID)) + return new(big.Int).SetBytes(Keccak256([]byte(chainID))) } func GetEthSignatureRecoveryID(chainID string, parity *big.Int) *big.Int { diff --git a/execution/engine/blockchain.go b/execution/engine/blockchain.go index 292f9c58f..fd59d8d81 100644 --- a/execution/engine/blockchain.go +++ b/execution/engine/blockchain.go @@ -12,6 +12,8 @@ type TestBlockchain struct { BlockTime time.Time } +var _ Blockchain = (*TestBlockchain)(nil) + func (b *TestBlockchain) LastBlockHeight() uint64 { return b.BlockHeight } @@ -28,3 +30,7 @@ func (b *TestBlockchain) BlockHash(height uint64) ([]byte, error) { binary.BigEndian.PutUint64(bs[24:], height) return bs, nil } + +func (V *TestBlockchain) ChainID() string { + return "TestChain" +} diff --git a/execution/engine/callable.go b/execution/engine/callable.go index 6d2a492f9..273c06646 100644 --- a/execution/engine/callable.go +++ b/execution/engine/callable.go @@ -12,6 +12,7 @@ type Blockchain interface { LastBlockHeight() uint64 LastBlockTime() time.Time BlockHash(height uint64) ([]byte, error) + ChainID() string } type CallParams struct { diff --git a/execution/evm/asm/opcodes.go b/execution/evm/asm/opcodes.go index 30357af06..6f8b78b35 100644 --- a/execution/evm/asm/opcodes.go +++ b/execution/evm/asm/opcodes.go @@ -71,8 +71,9 @@ const ( COINBASE TIMESTAMP BLOCKHEIGHT - DIFFICULTY_DEPRECATED + DIFFICULTY GASLIMIT + CHAINID ) const ( @@ -236,12 +237,13 @@ var opCodeNames = map[OpCode]string{ EXTCODEHASH: "EXTCODEHASH", // 0x40 range - block operations - BLOCKHASH: "BLOCKHASH", - COINBASE: "COINBASE", - TIMESTAMP: "TIMESTAMP", - BLOCKHEIGHT: "BLOCKHEIGHT", - DIFFICULTY_DEPRECATED: "DIFFICULTY_DEPRECATED", - GASLIMIT: "GASLIMIT", + BLOCKHASH: "BLOCKHASH", + COINBASE: "COINBASE", + TIMESTAMP: "TIMESTAMP", + BLOCKHEIGHT: "BLOCKHEIGHT", + DIFFICULTY: "DIFFICULTY", + GASLIMIT: "GASLIMIT", + CHAINID: "CHAINID", // 0x50 range - 'storage' and execution POP: "POP", diff --git a/execution/evm/contract.go b/execution/evm/contract.go index 39d504cb9..c7b8b9cd1 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -478,10 +478,20 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e stack.Push64(number) c.debugf(" => %d\n", number) + case DIFFICULTY: // 0x44 + // ~ hashes per solution - by convention we'll use unity since there are no misses if you are proposer + stack.Push(One256) + c.debugf(" => %v\n", One256) + case GASLIMIT: // 0x45 stack.PushBigInt(params.Gas) c.debugf(" => %v\n", *params.Gas) + case CHAINID: // 0x46 + id := crypto.GetEthChainID(st.Blockchain.ChainID()) + stack.PushBigInt(id) + c.debugf(" => %X\n", id) + case POP: // 0x50 popped := stack.Pop() c.debugf(" => 0x%v\n", popped) diff --git a/execution/wasm/contract.go b/execution/wasm/contract.go index e5e511832..20ad6d7bb 100644 --- a/execution/wasm/contract.go +++ b/execution/wasm/contract.go @@ -84,13 +84,7 @@ func (ctx *context) ResolveFunc(module, field string) lifeExec.FunctionImport { } switch field { - case "call": - fallthrough - case "callCode": - fallthrough - case "callDelegate": - fallthrough - case "callStatic": + case "call", "callCode", "callDelegate", "callStatic": return func(vm *lifeExec.VirtualMachine) int64 { gasLimit := big.NewInt(vm.GetCurrentFrame().Locals[0]) addressPtr := uint32(vm.GetCurrentFrame().Locals[1]) From dbfe3c61202906f968a37d0eb000fa5b6fd241d8 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Fri, 5 Feb 2021 11:01:00 +0000 Subject: [PATCH 140/185] Add wasm printMem and other debug functions Signed-off-by: Sean Young --- deploy/jobs/jobs_contracts.go | 13 +- deploy/jobs/jobs_test_jobs.go | 2 + execution/exec/event.go | 1 + execution/exec/event_sink.go | 5 + execution/exec/events.go | 11 + execution/exec/exec.pb.go | 459 ++++++++++++++++++++----- execution/exec/stream_event.go | 2 + execution/exec/tx_execution.go | 8 + execution/solidity/ewasm.solang | 4 + execution/solidity/ewasm.solang.go | 4 +- execution/wasm/contract.go | 136 ++++++++ execution/wasm/storage_test.solang.go | 2 +- go.mod | 1 + go.sum | 2 + integration/rpctransact/call_test.go | 27 ++ js/proto/exec_pb.d.ts | 36 ++ js/proto/exec_pb.js | 283 ++++++++++++++- keys/keys_grpc.pb.go | 8 +- protobuf/exec.proto | 6 + rpc/rpcdump/rpcdump_grpc.pb.go | 10 +- rpc/rpcevents/rpcevents_grpc.pb.go | 12 +- rpc/rpcquery/rpcquery_grpc.pb.go | 14 +- rpc/rpctransact/rpctransact_grpc.pb.go | 8 +- 23 files changed, 944 insertions(+), 110 deletions(-) diff --git a/deploy/jobs/jobs_contracts.go b/deploy/jobs/jobs_contracts.go index 2916f7818..ae1d6a72d 100644 --- a/deploy/jobs/jobs_contracts.go +++ b/deploy/jobs/jobs_contracts.go @@ -574,14 +574,17 @@ func deployFinalize(client *def.Client, tx payload.Payload, logger *logging.Logg } func logEvents(txe *exec.TxExecution, client *def.Client, logger *logging.Logger) { - if client.AllSpecs == nil { - return - } - for _, event := range txe.Events { + print := event.GetPrint() + + if print != nil { + logger.InfoMsg("print", "address", print.Address.String(), "msg", string(print.Data)) + continue + } + eventLog := event.GetLog() - if eventLog == nil { + if eventLog == nil || client.AllSpecs == nil { continue } diff --git a/deploy/jobs/jobs_test_jobs.go b/deploy/jobs/jobs_test_jobs.go index 6f44c3656..33ead2c65 100644 --- a/deploy/jobs/jobs_test_jobs.go +++ b/deploy/jobs/jobs_test_jobs.go @@ -69,6 +69,8 @@ func QueryContractJob(query *def.QueryContract, do *def.DeployArgs, script *def. return "", nil, err } + logEvents(txe, client, logger) + result2 := util.GetReturnValue(query.Variables, logger) // Finalize if result2 != "" { diff --git a/execution/exec/event.go b/execution/exec/event.go index 824e45dec..82687f75a 100644 --- a/execution/exec/event.go +++ b/execution/exec/event.go @@ -24,6 +24,7 @@ const ( TypeEnvelope TypeEndTx TypeEndBlock + TypePrint ) var nameFromType = map[EventType]string{ diff --git a/execution/exec/event_sink.go b/execution/exec/event_sink.go index 194573797..ef5e4bde9 100644 --- a/execution/exec/event_sink.go +++ b/execution/exec/event_sink.go @@ -7,6 +7,7 @@ import ( type EventSink interface { Call(call *CallEvent, exception *errors.Exception) error Log(log *LogEvent) error + Print(print *PrintEvent) error } type noopEventSink struct { @@ -24,6 +25,10 @@ func (es *noopEventSink) Log(log *LogEvent) error { return nil } +func (es *noopEventSink) Print(print *PrintEvent) error { + return nil +} + type logFreeEventSink struct { EventSink } diff --git a/execution/exec/events.go b/execution/exec/events.go index 5961e4137..3f396aa3a 100644 --- a/execution/exec/events.go +++ b/execution/exec/events.go @@ -44,6 +44,17 @@ func (evs *Events) Log(log *LogEvent) error { return nil } +func (evs *Events) Print(print *PrintEvent) error { + evs.Append(&Event{ + Header: &Header{ + EventType: TypePrint, + EventID: EventStringLogEvent(print.Address), + }, + Print: print, + }) + return nil +} + func (evs Events) CallTrace() string { var calls []string for _, ev := range evs { diff --git a/execution/exec/exec.pb.go b/execution/exec/exec.pb.go index fc390f79d..a28c5e588 100644 --- a/execution/exec/exec.pb.go +++ b/execution/exec/exec.pb.go @@ -874,6 +874,7 @@ type Event struct { Call *CallEvent `protobuf:"bytes,4,opt,name=Call,proto3" json:"Call,omitempty"` Log *LogEvent `protobuf:"bytes,5,opt,name=Log,proto3" json:"Log,omitempty"` GovernAccount *GovernAccountEvent `protobuf:"bytes,6,opt,name=GovernAccount,proto3" json:"GovernAccount,omitempty"` + Print *PrintEvent `protobuf:"bytes,7,opt,name=Print,proto3" json:"Print,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -949,6 +950,13 @@ func (m *Event) GetGovernAccount() *GovernAccountEvent { return nil } +func (m *Event) GetPrint() *PrintEvent { + if m != nil { + return m.Print + } + return nil +} + func (*Event) XXX_MessageName() string { return "exec.Event" } @@ -1136,6 +1144,47 @@ func (*CallEvent) XXX_MessageName() string { return "exec.CallEvent" } +type PrintEvent struct { + Address github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address"` + Data github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,2,opt,name=Data,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"Data"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PrintEvent) Reset() { *m = PrintEvent{} } +func (m *PrintEvent) String() string { return proto.CompactTextString(m) } +func (*PrintEvent) ProtoMessage() {} +func (*PrintEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_4d737c7315c25422, []int{16} +} +func (m *PrintEvent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PrintEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *PrintEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_PrintEvent.Merge(m, src) +} +func (m *PrintEvent) XXX_Size() int { + return m.Size() +} +func (m *PrintEvent) XXX_DiscardUnknown() { + xxx_messageInfo_PrintEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_PrintEvent proto.InternalMessageInfo + +func (*PrintEvent) XXX_MessageName() string { + return "exec.PrintEvent" +} + type GovernAccountEvent struct { AccountUpdate *spec.TemplateAccount `protobuf:"bytes,1,opt,name=AccountUpdate,proto3" json:"AccountUpdate,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1147,7 +1196,7 @@ func (m *GovernAccountEvent) Reset() { *m = GovernAccountEvent{} } func (m *GovernAccountEvent) String() string { return proto.CompactTextString(m) } func (*GovernAccountEvent) ProtoMessage() {} func (*GovernAccountEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_4d737c7315c25422, []int{16} + return fileDescriptor_4d737c7315c25422, []int{17} } func (m *GovernAccountEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1194,7 +1243,7 @@ func (m *InputEvent) Reset() { *m = InputEvent{} } func (m *InputEvent) String() string { return proto.CompactTextString(m) } func (*InputEvent) ProtoMessage() {} func (*InputEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_4d737c7315c25422, []int{17} + return fileDescriptor_4d737c7315c25422, []int{18} } func (m *InputEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1234,7 +1283,7 @@ func (m *OutputEvent) Reset() { *m = OutputEvent{} } func (m *OutputEvent) String() string { return proto.CompactTextString(m) } func (*OutputEvent) ProtoMessage() {} func (*OutputEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_4d737c7315c25422, []int{18} + return fileDescriptor_4d737c7315c25422, []int{19} } func (m *OutputEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1279,7 +1328,7 @@ func (m *CallData) Reset() { *m = CallData{} } func (m *CallData) String() string { return proto.CompactTextString(m) } func (*CallData) ProtoMessage() {} func (*CallData) Descriptor() ([]byte, []int) { - return fileDescriptor_4d737c7315c25422, []int{19} + return fileDescriptor_4d737c7315c25422, []int{20} } func (m *CallData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1354,6 +1403,8 @@ func init() { golang_proto.RegisterType((*LogEvent)(nil), "exec.LogEvent") proto.RegisterType((*CallEvent)(nil), "exec.CallEvent") golang_proto.RegisterType((*CallEvent)(nil), "exec.CallEvent") + proto.RegisterType((*PrintEvent)(nil), "exec.PrintEvent") + golang_proto.RegisterType((*PrintEvent)(nil), "exec.PrintEvent") proto.RegisterType((*GovernAccountEvent)(nil), "exec.GovernAccountEvent") golang_proto.RegisterType((*GovernAccountEvent)(nil), "exec.GovernAccountEvent") proto.RegisterType((*InputEvent)(nil), "exec.InputEvent") @@ -1368,90 +1419,91 @@ func init() { proto.RegisterFile("exec.proto", fileDescriptor_4d737c7315c25422) func init() { golang_proto.RegisterFile("exec.proto", fileDescriptor_4d737c7315c25422) } var fileDescriptor_4d737c7315c25422 = []byte{ - // 1314 bytes of a gzipped FileDescriptorProto + // 1340 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, 0x17, 0xef, 0xda, 0x6b, 0xc7, 0x7e, 0x76, 0xfa, 0x6d, 0x47, 0xf9, 0x22, 0xab, 0xaa, 0xec, 0xb2, 0x45, 0xa5, 0x94, 0xb2, 0xae, 0x02, 0x45, 0xa8, 0x48, 0x88, 0xba, 0x09, 0x6d, 0xa0, 0xa4, 0x65, - 0xea, 0x16, 0x81, 0xe0, 0xb0, 0xf1, 0x4e, 0x37, 0xab, 0xda, 0xbb, 0xab, 0xdd, 0xd9, 0xb2, 0xfe, - 0x17, 0x38, 0xc1, 0xad, 0x48, 0x08, 0xf5, 0xcc, 0xbf, 0xc0, 0x01, 0x8e, 0xb9, 0xd1, 0x23, 0xea, - 0xc1, 0xa0, 0xf4, 0x2f, 0x40, 0x9c, 0xe8, 0x09, 0xcd, 0xcc, 0x9b, 0xf5, 0x2e, 0x49, 0x93, 0x8a, - 0x04, 0x89, 0x4b, 0x34, 0xef, 0xbd, 0xcf, 0x3e, 0xbf, 0x1f, 0x9f, 0xf7, 0x66, 0x02, 0xc0, 0x32, - 0x36, 0xb2, 0xa3, 0x38, 0xe4, 0x21, 0x31, 0xc5, 0xf9, 0xc4, 0x92, 0x17, 0x7a, 0xa1, 0x54, 0xf4, - 0xc5, 0x49, 0xd9, 0x4e, 0x9c, 0xe4, 0x2c, 0x70, 0x59, 0x3c, 0xf1, 0x03, 0xde, 0xe7, 0xd3, 0x88, - 0x25, 0xea, 0x2f, 0x5a, 0x7b, 0x5e, 0x18, 0x7a, 0x63, 0xd6, 0x97, 0xd2, 0x46, 0x7a, 0xb7, 0xcf, - 0xfd, 0x09, 0x4b, 0xb8, 0x33, 0x89, 0x10, 0xd0, 0x66, 0x71, 0x1c, 0xc6, 0x1a, 0xde, 0x0a, 0x9c, - 0x49, 0xfe, 0x6d, 0x93, 0x67, 0xfa, 0x78, 0x2c, 0x12, 0xbf, 0x90, 0x24, 0x7e, 0x18, 0xa0, 0x06, - 0x92, 0x48, 0x87, 0x67, 0xad, 0x42, 0xfb, 0x16, 0x8f, 0x99, 0x33, 0x59, 0xbd, 0xcf, 0x02, 0x9e, - 0x90, 0x8b, 0x65, 0xb9, 0x63, 0x9c, 0xaa, 0x9e, 0x6d, 0x2d, 0x1f, 0xb7, 0x65, 0x46, 0x05, 0x0b, - 0x2d, 0xc1, 0xac, 0x1f, 0x2a, 0xd0, 0x2a, 0x28, 0xc8, 0x05, 0x80, 0x01, 0xf3, 0xfc, 0x60, 0x30, - 0x0e, 0x47, 0xf7, 0x3a, 0xc6, 0x29, 0xe3, 0x6c, 0x6b, 0xf9, 0x98, 0x72, 0x32, 0xd7, 0xd3, 0x02, - 0x86, 0xbc, 0x0c, 0x0b, 0x52, 0x1a, 0x66, 0x9d, 0x8a, 0x84, 0x2f, 0x16, 0xe0, 0xc3, 0x8c, 0x6a, - 0x2b, 0xf9, 0x04, 0x1a, 0xab, 0xc1, 0x7d, 0x36, 0x0e, 0x23, 0xd6, 0xa9, 0x22, 0x52, 0x64, 0xab, - 0x95, 0x03, 0xfb, 0xf1, 0xac, 0x77, 0xce, 0xf3, 0xf9, 0x66, 0xba, 0x61, 0x8f, 0xc2, 0x49, 0x7f, - 0x73, 0x1a, 0xb1, 0x78, 0xcc, 0x5c, 0x8f, 0xc5, 0xfd, 0x8d, 0x34, 0x8e, 0xc3, 0x2f, 0xfa, 0x45, - 0x3c, 0xcd, 0xdd, 0x91, 0x17, 0xa1, 0x26, 0xc3, 0xef, 0x98, 0xd2, 0x6f, 0x4b, 0x45, 0xa0, 0xf2, - 0x55, 0x16, 0x09, 0x09, 0xdc, 0x61, 0xd6, 0xa9, 0x95, 0x20, 0x42, 0x45, 0x95, 0x85, 0x9c, 0x13, - 0x01, 0xba, 0x2a, 0xf3, 0xba, 0x44, 0x1d, 0xcd, 0x51, 0x2a, 0xef, 0xdc, 0x7e, 0xc9, 0xdc, 0x7a, - 0xd8, 0x33, 0xac, 0x6f, 0x8d, 0x62, 0xb9, 0xc8, 0x0b, 0x50, 0xbf, 0xc6, 0x7c, 0x6f, 0x93, 0xcb, - 0xc2, 0x99, 0x14, 0x25, 0xa1, 0x5f, 0x4f, 0x27, 0xc3, 0x2c, 0x91, 0x79, 0x9b, 0x14, 0x25, 0x72, - 0x1e, 0x8e, 0xdf, 0x8c, 0x99, 0xcb, 0x46, 0x2c, 0x49, 0xc2, 0x18, 0x3f, 0x35, 0x25, 0x64, 0xa7, - 0x81, 0x5c, 0x10, 0xde, 0x1d, 0x97, 0xc5, 0x58, 0xe7, 0x8e, 0x3d, 0x67, 0xa1, 0xad, 0xf8, 0xa7, - 0xec, 0x14, 0x71, 0x96, 0x35, 0x4f, 0xe8, 0x59, 0xb1, 0x59, 0xdf, 0x1b, 0x79, 0xff, 0x44, 0x01, - 0x86, 0x19, 0xfe, 0x86, 0x51, 0x2c, 0x80, 0xd6, 0xd2, 0xdc, 0x4e, 0x4e, 0x42, 0x73, 0x3d, 0xd5, - 0x64, 0xab, 0x49, 0x97, 0x73, 0x05, 0x79, 0x09, 0xea, 0x94, 0x25, 0xe9, 0x98, 0x63, 0xac, 0x6d, - 0xe5, 0x47, 0xe9, 0x28, 0xda, 0x48, 0x1f, 0x9a, 0xab, 0xd9, 0x88, 0x45, 0xdc, 0x0f, 0x03, 0x6c, - 0xdd, 0x71, 0x1b, 0x67, 0x23, 0x37, 0xd0, 0x39, 0xc6, 0xba, 0x83, 0x4d, 0x24, 0x1f, 0x42, 0x7d, - 0x98, 0x5d, 0x73, 0x92, 0x4d, 0x59, 0xd1, 0xf6, 0xe0, 0xe2, 0xd6, 0xac, 0x77, 0xe4, 0xf1, 0xac, - 0xf7, 0xda, 0xde, 0xf4, 0xd9, 0xf0, 0x03, 0x27, 0x9e, 0xda, 0xd7, 0x58, 0x36, 0x98, 0x72, 0x96, - 0x50, 0x74, 0x62, 0xfd, 0x69, 0xcc, 0x33, 0x27, 0xef, 0x0b, 0xdf, 0xc3, 0x69, 0xc4, 0x64, 0x0d, - 0x16, 0x07, 0xcb, 0x4f, 0x67, 0x3d, 0x7b, 0x5f, 0x5a, 0xf6, 0x23, 0x67, 0x3a, 0x0e, 0x1d, 0xd7, - 0x16, 0x5f, 0x52, 0xf4, 0x50, 0x88, 0xb3, 0x72, 0x08, 0x71, 0x16, 0x9a, 0x58, 0x2d, 0x11, 0x6c, - 0x09, 0x6a, 0x6b, 0x81, 0xcb, 0x32, 0x24, 0x8f, 0x12, 0x44, 0x13, 0x6e, 0xc4, 0xbe, 0xe7, 0x07, - 0xc8, 0x79, 0x6c, 0x82, 0xd2, 0x51, 0xb4, 0x59, 0x3f, 0x1a, 0x70, 0x54, 0x52, 0x64, 0x35, 0x63, - 0xa3, 0x54, 0x94, 0xf9, 0x99, 0x3c, 0xfe, 0x97, 0xf9, 0x2a, 0x76, 0xd8, 0x30, 0xcb, 0xc3, 0x10, - 0xd3, 0x52, 0xd8, 0x61, 0x05, 0x0b, 0x2d, 0xc1, 0xac, 0x77, 0xe1, 0x68, 0x41, 0xfe, 0x80, 0x4d, - 0xf7, 0x1a, 0xc4, 0x1b, 0x77, 0xef, 0x26, 0x4c, 0xd1, 0xd2, 0xa4, 0x28, 0x59, 0xbf, 0x57, 0xa0, - 0x55, 0x70, 0x41, 0xce, 0xe7, 0xa1, 0xef, 0x3a, 0x06, 0x03, 0xf3, 0xd1, 0xac, 0x67, 0xe4, 0x61, - 0x17, 0x17, 0x5b, 0xfd, 0x70, 0x17, 0xdb, 0x69, 0xa8, 0xe3, 0x88, 0x2d, 0xc8, 0x5a, 0x94, 0x36, - 0x5b, 0x7d, 0xc7, 0xb0, 0x35, 0xf6, 0x18, 0xb6, 0x33, 0xb0, 0x40, 0xd9, 0x88, 0xf9, 0x11, 0xef, - 0x34, 0x11, 0x26, 0x7e, 0x14, 0x75, 0x54, 0x1b, 0xcb, 0x43, 0x09, 0xfb, 0x0f, 0xe5, 0x8e, 0xae, - 0xb5, 0x9e, 0xaf, 0x6b, 0x5f, 0x1a, 0x9a, 0x9e, 0xa4, 0x03, 0x0b, 0x57, 0x36, 0x1d, 0x3f, 0x58, - 0x5b, 0x91, 0xf5, 0x6e, 0x52, 0x2d, 0x16, 0x1a, 0x59, 0xd9, 0x9d, 0xf0, 0xd5, 0x22, 0xe1, 0xdf, - 0x02, 0x73, 0xe8, 0x4f, 0x18, 0xae, 0x92, 0x13, 0xb6, 0xba, 0x87, 0x6d, 0x7d, 0x0f, 0xdb, 0x43, - 0x7d, 0x0f, 0x0f, 0x1a, 0x62, 0x0e, 0xbf, 0xfa, 0xb5, 0x67, 0x50, 0xf9, 0x85, 0xf5, 0x73, 0x45, - 0x77, 0xfc, 0xbf, 0x3c, 0xfe, 0xaf, 0x42, 0x53, 0xb6, 0x5c, 0x46, 0x57, 0x95, 0xd1, 0x2d, 0x3e, - 0x9d, 0xf5, 0xe6, 0x4a, 0x3a, 0x3f, 0x8a, 0xa2, 0x4a, 0x61, 0x6d, 0x45, 0xd6, 0xa3, 0x49, 0xb5, - 0x58, 0x28, 0x6a, 0x6d, 0xf7, 0xa2, 0xd6, 0x8b, 0x45, 0x2d, 0xf1, 0x61, 0x61, 0x7f, 0x3e, 0x5c, - 0x32, 0x1f, 0x3c, 0xec, 0x1d, 0xb1, 0xbe, 0xae, 0xe0, 0x9d, 0x2c, 0xe8, 0x59, 0x1a, 0x26, 0xa4, - 0xe7, 0xdf, 0x66, 0xff, 0x8c, 0xf8, 0xf1, 0x28, 0xd5, 0x17, 0x06, 0xbe, 0x39, 0xa4, 0x0a, 0xef, - 0x71, 0x79, 0x26, 0xaf, 0x40, 0xfd, 0x46, 0xca, 0x05, 0xb0, 0xaa, 0x63, 0x91, 0x4b, 0x4d, 0xea, - 0x70, 0x2e, 0x94, 0x40, 0x4e, 0x83, 0x79, 0xc5, 0x19, 0x8f, 0x91, 0x0e, 0xff, 0x53, 0x40, 0xa1, - 0x51, 0x30, 0x69, 0x24, 0xa7, 0xa0, 0x7a, 0x3d, 0xf4, 0x70, 0x43, 0xe2, 0x9c, 0x5f, 0x0f, 0x3d, - 0x05, 0x11, 0x26, 0xf2, 0x0e, 0x2c, 0x5e, 0x0d, 0xef, 0xb3, 0x38, 0xb8, 0x3c, 0x1a, 0x85, 0x69, - 0xc0, 0x71, 0xc6, 0x3b, 0x0a, 0x5b, 0x32, 0xa9, 0xaf, 0xca, 0xf0, 0x4b, 0x0d, 0x51, 0x0f, 0xf9, - 0x5c, 0x78, 0x60, 0xe8, 0x49, 0x15, 0x3d, 0xa0, 0x8c, 0xa7, 0x71, 0x20, 0x8b, 0xd2, 0xa6, 0x28, - 0x89, 0xae, 0x5d, 0x75, 0x92, 0xdb, 0x09, 0x73, 0x91, 0xf1, 0x5a, 0x24, 0xe7, 0xa0, 0xb9, 0xee, - 0x4c, 0xd8, 0x6a, 0xc0, 0xe3, 0x29, 0xe6, 0xde, 0xb6, 0xd5, 0xd3, 0x51, 0xea, 0xe8, 0xdc, 0x4c, - 0x2e, 0x40, 0xe3, 0x26, 0x8b, 0x27, 0x97, 0x63, 0x2f, 0xc1, 0xec, 0x97, 0xec, 0xc2, 0x6b, 0x52, - 0xdb, 0x68, 0x8e, 0xb2, 0xfe, 0x30, 0xa0, 0xa1, 0xd3, 0x26, 0xeb, 0xb0, 0x70, 0xd9, 0x75, 0x63, - 0x96, 0x24, 0x2a, 0xba, 0xc1, 0x1b, 0xc8, 0xdb, 0xf3, 0x7b, 0xf3, 0x76, 0x14, 0x4f, 0x23, 0x1e, - 0xda, 0xf8, 0x2d, 0xd5, 0x4e, 0xc8, 0x1a, 0x98, 0x2b, 0x0e, 0x77, 0x0e, 0x36, 0x04, 0xd2, 0x05, - 0xb9, 0x0e, 0xf5, 0x61, 0x18, 0xf9, 0x23, 0x75, 0x39, 0x3c, 0x77, 0x64, 0xe8, 0xec, 0xe3, 0x30, - 0x76, 0x97, 0x2f, 0xbe, 0x49, 0xd1, 0x87, 0xf5, 0x5d, 0x05, 0x9a, 0x39, 0x21, 0xc8, 0x59, 0x68, - 0x08, 0x41, 0x4e, 0x57, 0x4d, 0x4e, 0x57, 0xfb, 0xe9, 0xac, 0x97, 0xeb, 0x68, 0x7e, 0x12, 0x0f, - 0x25, 0x71, 0x96, 0x49, 0x95, 0x6e, 0x08, 0xad, 0xa5, 0xb9, 0x5d, 0x44, 0x8c, 0xb7, 0x70, 0xe5, - 0x00, 0xb5, 0xd4, 0xab, 0xb2, 0x0b, 0x70, 0x8b, 0x3b, 0xa3, 0x7b, 0x2b, 0x2c, 0xe2, 0x9b, 0xb8, - 0xfd, 0x0a, 0x1a, 0xb1, 0x71, 0x90, 0x57, 0xe6, 0x81, 0x36, 0x8e, 0x72, 0x62, 0x7d, 0x04, 0x64, - 0x27, 0xc1, 0xc9, 0xdb, 0xb0, 0x88, 0xf2, 0xed, 0xc8, 0x75, 0x38, 0xc3, 0x1a, 0xfc, 0xdf, 0x96, - 0xff, 0x9f, 0x0c, 0xd9, 0x24, 0x1a, 0x3b, 0x9c, 0x21, 0x84, 0x96, 0xb1, 0xd6, 0x67, 0x00, 0xf3, - 0xa9, 0x3e, 0x6c, 0xaa, 0x59, 0x9f, 0x43, 0xab, 0xb0, 0x0a, 0x0e, 0xdd, 0xfd, 0x37, 0x15, 0x28, - 0x75, 0x56, 0x9c, 0x71, 0xb1, 0xfd, 0xe3, 0xce, 0x2a, 0x1f, 0xb9, 0x37, 0x76, 0x30, 0x9e, 0x28, - 0x1f, 0xf9, 0xc8, 0x55, 0x0f, 0x3e, 0x72, 0x4b, 0x50, 0xbb, 0xe3, 0x8c, 0x53, 0x75, 0xad, 0xb6, - 0xa9, 0x12, 0xc8, 0x31, 0xa8, 0x5e, 0x75, 0xd4, 0xcb, 0xbf, 0x4d, 0xc5, 0x71, 0xf0, 0xde, 0xd6, - 0x76, 0xd7, 0x78, 0xb4, 0xdd, 0x35, 0x7e, 0xd9, 0xee, 0x1a, 0xbf, 0x6d, 0x77, 0x8d, 0x9f, 0x9e, - 0x74, 0x8d, 0xad, 0x27, 0x5d, 0xe3, 0xd3, 0x7d, 0x52, 0x60, 0xfa, 0x51, 0x20, 0x4f, 0x1b, 0x75, - 0x79, 0x5f, 0xbf, 0xfe, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xde, 0x53, 0x6b, 0x0d, 0x8d, 0x0f, - 0x00, 0x00, + 0xea, 0x16, 0x81, 0xe0, 0xb0, 0xf1, 0x4e, 0x9d, 0x55, 0xed, 0xdd, 0xd5, 0xec, 0xb8, 0xac, 0xff, + 0x05, 0x4e, 0x1c, 0x8b, 0x84, 0x50, 0x6f, 0x48, 0xfc, 0x07, 0x88, 0x03, 0x1c, 0x73, 0xa3, 0x47, + 0xd4, 0x83, 0x41, 0xe9, 0x5f, 0x80, 0x38, 0xd1, 0x13, 0x9a, 0x99, 0x37, 0xeb, 0x5d, 0xd2, 0x26, + 0x15, 0x09, 0x52, 0x2f, 0xd1, 0xbc, 0xf7, 0x3e, 0xfb, 0xfc, 0x7e, 0x7c, 0xde, 0x9b, 0x09, 0x00, + 0x4b, 0xd9, 0xc0, 0x8d, 0x79, 0x24, 0x22, 0x62, 0xcb, 0xf3, 0xb1, 0xa5, 0x61, 0x34, 0x8c, 0x94, + 0xa2, 0x2b, 0x4f, 0xda, 0x76, 0xec, 0xb8, 0x60, 0xa1, 0xcf, 0xf8, 0x38, 0x08, 0x45, 0x57, 0x4c, + 0x63, 0x96, 0xe8, 0xbf, 0x68, 0xed, 0x0c, 0xa3, 0x68, 0x38, 0x62, 0x5d, 0x25, 0x6d, 0x4c, 0x6e, + 0x77, 0x45, 0x30, 0x66, 0x89, 0xf0, 0xc6, 0x31, 0x02, 0x9a, 0x8c, 0xf3, 0x88, 0x1b, 0x78, 0x23, + 0xf4, 0xc6, 0xd9, 0xb7, 0x75, 0x91, 0x9a, 0xe3, 0x91, 0x58, 0xfe, 0x42, 0x92, 0x04, 0x51, 0x88, + 0x1a, 0x48, 0x62, 0x13, 0x9e, 0xb3, 0x0a, 0xcd, 0x1b, 0x82, 0x33, 0x6f, 0xbc, 0x7a, 0x97, 0x85, + 0x22, 0x21, 0xe7, 0x8b, 0x72, 0xcb, 0x3a, 0x51, 0x3e, 0xdd, 0x58, 0x3e, 0xea, 0xaa, 0x8c, 0x72, + 0x16, 0x5a, 0x80, 0x39, 0x3f, 0x96, 0xa0, 0x91, 0x53, 0x90, 0x73, 0x00, 0x3d, 0x36, 0x0c, 0xc2, + 0xde, 0x28, 0x1a, 0xdc, 0x69, 0x59, 0x27, 0xac, 0xd3, 0x8d, 0xe5, 0x23, 0xda, 0xc9, 0x5c, 0x4f, + 0x73, 0x18, 0xf2, 0x32, 0x2c, 0x28, 0xa9, 0x9f, 0xb6, 0x4a, 0x0a, 0xbe, 0x98, 0x83, 0xf7, 0x53, + 0x6a, 0xac, 0xe4, 0x13, 0xa8, 0xad, 0x86, 0x77, 0xd9, 0x28, 0x8a, 0x59, 0xab, 0x8c, 0x48, 0x99, + 0xad, 0x51, 0xf6, 0xdc, 0x87, 0xb3, 0xce, 0x99, 0x61, 0x20, 0x36, 0x27, 0x1b, 0xee, 0x20, 0x1a, + 0x77, 0x37, 0xa7, 0x31, 0xe3, 0x23, 0xe6, 0x0f, 0x19, 0xef, 0x6e, 0x4c, 0x38, 0x8f, 0xbe, 0xe8, + 0xe6, 0xf1, 0x34, 0x73, 0x47, 0x5e, 0x84, 0x8a, 0x0a, 0xbf, 0x65, 0x2b, 0xbf, 0x0d, 0x1d, 0x81, + 0xce, 0x57, 0x5b, 0x14, 0x24, 0xf4, 0xfb, 0x69, 0xab, 0x52, 0x80, 0x48, 0x15, 0xd5, 0x16, 0x72, + 0x46, 0x06, 0xe8, 0xeb, 0xcc, 0xab, 0x0a, 0x75, 0x38, 0x43, 0xe9, 0xbc, 0x33, 0xfb, 0x05, 0x7b, + 0xeb, 0x7e, 0xc7, 0x72, 0xbe, 0xb1, 0xf2, 0xe5, 0x22, 0x2f, 0x40, 0xf5, 0x0a, 0x0b, 0x86, 0x9b, + 0x42, 0x15, 0xce, 0xa6, 0x28, 0x49, 0xfd, 0xfa, 0x64, 0xdc, 0x4f, 0x13, 0x95, 0xb7, 0x4d, 0x51, + 0x22, 0x67, 0xe1, 0xe8, 0x75, 0xce, 0x7c, 0x36, 0x60, 0x49, 0x12, 0x71, 0xfc, 0xd4, 0x56, 0x90, + 0x9d, 0x06, 0x72, 0x4e, 0x7a, 0xf7, 0x7c, 0xc6, 0xb1, 0xce, 0x2d, 0x77, 0xce, 0x42, 0x57, 0xf3, + 0x4f, 0xdb, 0x29, 0xe2, 0x1c, 0x67, 0x9e, 0xd0, 0xd3, 0x62, 0x73, 0xbe, 0xb7, 0xb2, 0xfe, 0xc9, + 0x02, 0xf4, 0x53, 0xfc, 0x0d, 0x2b, 0x5f, 0x00, 0xa3, 0xa5, 0x99, 0x9d, 0x1c, 0x87, 0xfa, 0xfa, + 0xc4, 0x90, 0xad, 0xa2, 0x5c, 0xce, 0x15, 0xe4, 0x25, 0xa8, 0x52, 0x96, 0x4c, 0x46, 0x02, 0x63, + 0x6d, 0x6a, 0x3f, 0x5a, 0x47, 0xd1, 0x46, 0xba, 0x50, 0x5f, 0x4d, 0x07, 0x2c, 0x16, 0x41, 0x14, + 0x62, 0xeb, 0x8e, 0xba, 0x38, 0x1b, 0x99, 0x81, 0xce, 0x31, 0xce, 0x2d, 0x6c, 0x22, 0xf9, 0x10, + 0xaa, 0xfd, 0xf4, 0x8a, 0x97, 0x6c, 0xaa, 0x8a, 0x36, 0x7b, 0xe7, 0xb7, 0x66, 0x9d, 0x43, 0x0f, + 0x67, 0x9d, 0xd7, 0x76, 0xa7, 0xcf, 0x46, 0x10, 0x7a, 0x7c, 0xea, 0x5e, 0x61, 0x69, 0x6f, 0x2a, + 0x58, 0x42, 0xd1, 0x89, 0xf3, 0x97, 0x35, 0xcf, 0x9c, 0xbc, 0x2f, 0x7d, 0xf7, 0xa7, 0x31, 0x53, + 0x35, 0x58, 0xec, 0x2d, 0x3f, 0x9e, 0x75, 0xdc, 0x3d, 0x69, 0xd9, 0x8d, 0xbd, 0xe9, 0x28, 0xf2, + 0x7c, 0x57, 0x7e, 0x49, 0xd1, 0x43, 0x2e, 0xce, 0xd2, 0x01, 0xc4, 0x99, 0x6b, 0x62, 0xb9, 0x40, + 0xb0, 0x25, 0xa8, 0xac, 0x85, 0x3e, 0x4b, 0x91, 0x3c, 0x5a, 0x90, 0x4d, 0xb8, 0xc6, 0x83, 0x61, + 0x10, 0x22, 0xe7, 0xb1, 0x09, 0x5a, 0x47, 0xd1, 0xe6, 0xfc, 0x64, 0xc1, 0x61, 0x45, 0x91, 0xd5, + 0x94, 0x0d, 0x26, 0xb2, 0xcc, 0x4f, 0xe5, 0xf1, 0x7f, 0xcc, 0x57, 0xb9, 0xc3, 0xfa, 0x69, 0x16, + 0x86, 0x9c, 0x96, 0xdc, 0x0e, 0xcb, 0x59, 0x68, 0x01, 0xe6, 0xbc, 0x0b, 0x87, 0x73, 0xf2, 0x07, + 0x6c, 0xba, 0xdb, 0x20, 0x5e, 0xbb, 0x7d, 0x3b, 0x61, 0x9a, 0x96, 0x36, 0x45, 0xc9, 0xf9, 0xa3, + 0x04, 0x8d, 0x9c, 0x0b, 0x72, 0x36, 0x0b, 0xfd, 0x89, 0x63, 0xd0, 0xb3, 0x1f, 0xcc, 0x3a, 0x56, + 0x16, 0x76, 0x7e, 0xb1, 0x55, 0x0f, 0x76, 0xb1, 0x9d, 0x84, 0x2a, 0x8e, 0xd8, 0x82, 0xaa, 0x45, + 0x61, 0xb3, 0x55, 0x77, 0x0c, 0x5b, 0x6d, 0x97, 0x61, 0x3b, 0x05, 0x0b, 0x94, 0x0d, 0x58, 0x10, + 0x8b, 0x56, 0x1d, 0x61, 0xf2, 0x47, 0x51, 0x47, 0x8d, 0xb1, 0x38, 0x94, 0xb0, 0xf7, 0x50, 0xee, + 0xe8, 0x5a, 0xe3, 0xd9, 0xba, 0xf6, 0xa5, 0x65, 0xe8, 0x49, 0x5a, 0xb0, 0x70, 0x69, 0xd3, 0x0b, + 0xc2, 0xb5, 0x15, 0x55, 0xef, 0x3a, 0x35, 0x62, 0xae, 0x91, 0xa5, 0x27, 0x13, 0xbe, 0x9c, 0x27, + 0xfc, 0x5b, 0x60, 0xf7, 0x83, 0x31, 0xc3, 0x55, 0x72, 0xcc, 0xd5, 0xf7, 0xb0, 0x6b, 0xee, 0x61, + 0xb7, 0x6f, 0xee, 0xe1, 0x5e, 0x4d, 0xce, 0xe1, 0x57, 0xbf, 0x75, 0x2c, 0xaa, 0xbe, 0x70, 0x7e, + 0x29, 0x99, 0x8e, 0x3f, 0xcf, 0xe3, 0xff, 0x2a, 0xd4, 0x55, 0xcb, 0x55, 0x74, 0x65, 0x15, 0xdd, + 0xe2, 0xe3, 0x59, 0x67, 0xae, 0xa4, 0xf3, 0xa3, 0x2c, 0xaa, 0x12, 0xd6, 0x56, 0x54, 0x3d, 0xea, + 0xd4, 0x88, 0xb9, 0xa2, 0x56, 0x9e, 0x5c, 0xd4, 0x6a, 0xbe, 0xa8, 0x05, 0x3e, 0x2c, 0xec, 0xcd, + 0x87, 0x0b, 0xf6, 0xbd, 0xfb, 0x9d, 0x43, 0xce, 0x0f, 0x25, 0xbc, 0x93, 0x25, 0x3d, 0x0b, 0xc3, + 0x84, 0xf4, 0xfc, 0xc7, 0xec, 0x9f, 0x92, 0x3f, 0x1e, 0x4f, 0xcc, 0x85, 0x81, 0x6f, 0x0e, 0xa5, + 0xc2, 0x7b, 0x5c, 0x9d, 0xc9, 0x2b, 0x50, 0xbd, 0x36, 0x11, 0x12, 0x58, 0x36, 0xb1, 0xa8, 0xa5, + 0xa6, 0x74, 0x38, 0x17, 0x5a, 0x20, 0x27, 0xc1, 0xbe, 0xe4, 0x8d, 0x46, 0x48, 0x87, 0xff, 0x69, + 0xa0, 0xd4, 0x68, 0x98, 0x32, 0x92, 0x13, 0x50, 0xbe, 0x1a, 0x0d, 0x71, 0x43, 0xe2, 0x9c, 0x5f, + 0x8d, 0x86, 0x1a, 0x22, 0x4d, 0xe4, 0x1d, 0x58, 0xbc, 0x1c, 0xdd, 0x65, 0x3c, 0xbc, 0x38, 0x18, + 0x44, 0x93, 0x50, 0xe0, 0x8c, 0xb7, 0x34, 0xb6, 0x60, 0xd2, 0x5f, 0x15, 0xe1, 0x32, 0xb3, 0xeb, + 0x3c, 0x08, 0x05, 0x16, 0x0f, 0x33, 0x53, 0x2a, 0xcc, 0x4c, 0x9d, 0x2f, 0xd4, 0x64, 0xdd, 0xd4, + 0xb3, 0xe2, 0x9e, 0x65, 0x26, 0x5a, 0xf6, 0x8a, 0x32, 0x31, 0xe1, 0xa1, 0x2a, 0x5e, 0x93, 0xa2, + 0x24, 0xbb, 0x7b, 0xd9, 0x4b, 0x6e, 0x26, 0xcc, 0xc7, 0xc9, 0x30, 0x22, 0x39, 0x03, 0xf5, 0x75, + 0x6f, 0xcc, 0x56, 0x43, 0xc1, 0xa7, 0x58, 0xa3, 0xa6, 0xab, 0x9f, 0x98, 0x4a, 0x47, 0xe7, 0x66, + 0x72, 0x0e, 0x6a, 0xd7, 0x19, 0x1f, 0x5f, 0xe4, 0xc3, 0x04, 0xab, 0xb4, 0xe4, 0xe6, 0x5e, 0x9d, + 0xc6, 0x46, 0x33, 0x94, 0xf3, 0xa7, 0x05, 0x35, 0x53, 0x1e, 0xb2, 0x0e, 0x0b, 0x17, 0x7d, 0x9f, + 0xb3, 0x24, 0xd1, 0xd1, 0xf5, 0xde, 0x40, 0x7e, 0x9f, 0xdd, 0x9d, 0xdf, 0x03, 0x3e, 0x8d, 0x45, + 0xe4, 0xe2, 0xb7, 0xd4, 0x38, 0x21, 0x6b, 0x60, 0xaf, 0x78, 0xc2, 0xdb, 0xdf, 0xb0, 0x28, 0x17, + 0xe4, 0x2a, 0x54, 0xfb, 0x51, 0x1c, 0x0c, 0xf4, 0x25, 0xf2, 0xcc, 0x91, 0xa1, 0xb3, 0x8f, 0x23, + 0xee, 0x2f, 0x9f, 0x7f, 0x93, 0xa2, 0x0f, 0xe7, 0xdb, 0x12, 0xd4, 0x33, 0xe2, 0x90, 0xd3, 0x50, + 0x93, 0x82, 0x9a, 0xc2, 0x8a, 0x9a, 0xc2, 0xe6, 0xe3, 0x59, 0x27, 0xd3, 0xd1, 0xec, 0x24, 0x1f, + 0x54, 0xf2, 0xac, 0x92, 0x2a, 0xdc, 0x24, 0x46, 0x4b, 0x33, 0xbb, 0x8c, 0x18, 0x6f, 0xeb, 0xd2, + 0x3e, 0x6a, 0x69, 0x56, 0x6a, 0x1b, 0xe0, 0x86, 0xf0, 0x06, 0x77, 0x56, 0x58, 0x2c, 0x36, 0x71, + 0x4b, 0xe6, 0x34, 0x72, 0x33, 0x21, 0xaf, 0xec, 0x7d, 0x6d, 0x26, 0xed, 0xc4, 0xf9, 0xce, 0x02, + 0x98, 0x33, 0xfa, 0x39, 0x26, 0x86, 0xf3, 0x11, 0x90, 0x9d, 0x23, 0x4b, 0xde, 0x86, 0x45, 0x94, + 0x6f, 0xc6, 0xbe, 0x27, 0x18, 0x76, 0xeb, 0xff, 0xae, 0xfa, 0x8f, 0xab, 0xcf, 0xc6, 0xf1, 0xc8, + 0x13, 0x0c, 0x21, 0xb4, 0x88, 0x75, 0x3e, 0x03, 0x98, 0xef, 0xa9, 0x83, 0xce, 0xdd, 0xf9, 0x1c, + 0x1a, 0xb9, 0xe5, 0x76, 0xe0, 0xee, 0xbf, 0x2e, 0x41, 0x81, 0x83, 0xf2, 0x8c, 0xab, 0xfa, 0x5f, + 0x73, 0x50, 0xfb, 0xc8, 0xbc, 0xb1, 0xfd, 0x31, 0x5a, 0xfb, 0xc8, 0x38, 0x50, 0xde, 0xff, 0x72, + 0x58, 0x82, 0xca, 0x2d, 0x6f, 0x34, 0xd1, 0x0f, 0x85, 0x26, 0xd5, 0x02, 0x39, 0x02, 0xe5, 0xcb, + 0x9e, 0xfe, 0x5f, 0xa6, 0x49, 0xe5, 0xb1, 0xf7, 0xde, 0xd6, 0x76, 0xdb, 0x7a, 0xb0, 0xdd, 0xb6, + 0x7e, 0xdd, 0x6e, 0x5b, 0xbf, 0x6f, 0xb7, 0xad, 0x9f, 0x1f, 0xb5, 0xad, 0xad, 0x47, 0x6d, 0xeb, + 0xd3, 0x3d, 0x52, 0x60, 0xe6, 0x99, 0xa3, 0x4e, 0x1b, 0x55, 0xf5, 0x02, 0x79, 0xfd, 0xef, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x10, 0x3f, 0xdf, 0xac, 0x5f, 0x10, 0x00, 0x00, } func (m *StreamEvents) Marshal() (dAtA []byte, err error) { @@ -2216,6 +2268,18 @@ func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.Print != nil { + { + size, err := m.Print.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } if m.GovernAccount != nil { { size, err := m.GovernAccount.MarshalToSizedBuffer(dAtA[:i]) @@ -2484,6 +2548,53 @@ func (m *CallEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *PrintEvent) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PrintEvent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PrintEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size := m.Data.Size() + i -= size + if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Address.Size() + i -= size + if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *GovernAccountEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3019,6 +3130,10 @@ func (m *Event) Size() (n int) { l = m.GovernAccount.Size() n += 1 + l + sovExec(uint64(l)) } + if m.Print != nil { + l = m.Print.Size() + n += 1 + l + sovExec(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -3100,6 +3215,22 @@ func (m *CallEvent) Size() (n int) { return n } +func (m *PrintEvent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Address.Size() + n += 1 + l + sovExec(uint64(l)) + l = m.Data.Size() + n += 1 + l + sovExec(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *GovernAccountEvent) Size() (n int) { if m == nil { return 0 @@ -3241,6 +3372,9 @@ func (this *Event) GetValue() interface{} { if this.GovernAccount != nil { return this.GovernAccount } + if this.Print != nil { + return this.Print + } return nil } @@ -3258,6 +3392,8 @@ func (this *Event) SetValue(value interface{}) bool { this.Log = vt case *GovernAccountEvent: this.GovernAccount = vt + case *PrintEvent: + this.Print = vt default: return false } @@ -5442,6 +5578,42 @@ func (m *Event) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Print", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExec + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExec + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExec + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Print == nil { + m.Print = &PrintEvent{} + } + if err := m.Print.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipExec(dAtA[iNdEx:]) @@ -5983,6 +6155,123 @@ func (m *CallEvent) Unmarshal(dAtA []byte) error { } return nil } +func (m *PrintEvent) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExec + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PrintEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PrintEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExec + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExec + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExec + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExec + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExec + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExec + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExec(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExec + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *GovernAccountEvent) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/execution/exec/stream_event.go b/execution/exec/stream_event.go index 79d0f8eb4..05675ca38 100644 --- a/execution/exec/stream_event.go +++ b/execution/exec/stream_event.go @@ -35,6 +35,8 @@ func (ev *StreamEvent) EventType() EventType { return TypeEndTx case ev.EndBlock != nil: return TypeEndBlock + case ev.Event.Print != nil: + return TypePrint } return TypeUnknown } diff --git a/execution/exec/tx_execution.go b/execution/exec/tx_execution.go index b5da6ec35..284266492 100644 --- a/execution/exec/tx_execution.go +++ b/execution/exec/tx_execution.go @@ -128,6 +128,14 @@ func (txe *TxExecution) GovernAccount(governAccount *GovernAccountEvent, excepti }) } +func (txe *TxExecution) Print(print *PrintEvent) error { + txe.Append(&Event{ + Header: txe.Header(TypePrint, EventStringLogEvent(print.Address), nil), + Print: print, + }) + return nil +} + // Errors pushed to TxExecutions end up in merkle state so it is essential that they are deterministic and independent // of the code path taken to execution (e.g. replay takes a different path to that of normal consensus reactor so stack // traces may differ - as they may across architectures) diff --git a/execution/solidity/ewasm.solang b/execution/solidity/ewasm.solang index 1eaf266b7..33ec2f25f 100644 --- a/execution/solidity/ewasm.solang +++ b/execution/solidity/ewasm.solang @@ -48,4 +48,8 @@ contract ewasm is E { function test_events() public { emit L(102, "Hello from wasm", true); } + + function test_print(int64 arg1, string arg2) public { + print("arg1:{} arg2:{}".format(arg1, arg2)); + } } diff --git a/execution/solidity/ewasm.solang.go b/execution/solidity/ewasm.solang.go index 9bc43ef32..5ce8f0932 100644 --- a/execution/solidity/ewasm.solang.go +++ b/execution/solidity/ewasm.solang.go @@ -2,5 +2,5 @@ package solidity import hex "github.com/tmthrgd/go-hex" -var Bytecode_ewasm = hex.MustDecodeString("0061736D01000000011C0660017F006000017F60037F7F7F0060027F7F0060017F017F60000002680508657468657265756D0C67657443616C6C56616C7565000008657468657265756D0B676574436F646553697A65000108657468657265756D08636F6465436F7079000208657468657265756D0666696E697368000308657468657265756D0672657665727400030304030405050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E00070AB40203A60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B5B01027F230041106B220024002000100002402000290300200041086A290300844200520D001006410010014188676A22003602F81441002000100522013602FC14200141F81820001002410041F8141003000B410041001004000B0BFF14010041000BF8140061736D01000000013E0A60017F006000017F60037F7F7F0060027F7F0060077F7F7F7F7F7F7F0060057E7F7F7F7F017F60037F7F7F017F60017F017F60047F7F7F7F017F60000002C6010908657468657265756D0C67657443616C6C56616C7565000008657468657265756D0F67657443616C6C4461746153697A65000108657468657265756D0C63616C6C44617461436F7079000208657468657265756D06726576657274000308657468657265756D036C6F67000408657468657265756D0463616C6C000508657468657265756D1167657452657475726E4461746153697A65000108657468657265756D0E72657475726E44617461436F7079000208657468657265756D0666696E6973680003030B0A020302020206070809090405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E00120AE4110A2E0002402002450D000340200020012D00003A0000200041016A2100200141016A21012002417F6A22020D000B0B0B240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0B2D002000411F6A21000340200120002D00003A0000200141016A21012000417F6A21002002417F6A22020D000B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0B29002001417F6A21010340200120026A20002D00003A0000200041016A21002002417F6A22020D000B0B7E01017F200120006C220141086A100F2203200036020420032000360200200341086A2100024002402002417F460D002001450D010340200020022D00003A0000200041016A2100200241016A21022001417F6A22010D000C020B0B2001450D000340200041003A0000200041016A21002001417F6A22010D000B0B20030BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B7F01027F200320016A220441086A100F2205200436020420052004360200200541086A210402402001450D000340200420002D00003A0000200441016A2104200041016A21002001417F6A22010D000B0B02402003450D000340200420022D00003A0000200441016A2104200241016A21022003417F6A22030D000B0B20050B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040BB10C03057F037E017F230041F0016B2200240020002201100002400240024002400240024002400240024002402001290300200141086A290300844200520D00101141001001220236024841002002100F220336024C2003410020021002200241034D0D094100200328020022043602442002417C6A2102200341046A210302400240024002400240024002402004419FBFE9E6054A0D002004419BF9C68004460D04200441A89B8AAA7A460D012004419DB3A4957D470D104100450D0C410041001003000B200441E382B9CC074A0D02200441A0BFE9E605460D04200441EEE98EBF06460D012004419797CBC406460D050C0F0B410F41014100100E2203280200413F6A41607141C0006A2204100F22022004410376100A200141C0003602900120014190016A20024104100C2001200328020022003602B801200141B8016A200241C0006A4104100C200241E0006A200341086A200010092002413F6A41013A00004120100F22034104100A200141E8016A4200370300200142003703E001200142003703D801200142E6003703D001200141D0016A20034120100C200220044102411020034100410010044100450D06410041001003000B200141286A42003703002001420037032020014200370318200142B1A8033703104100450D06410041001003000B200441E482B9CC07470D0C024002400240024020024120490D002003200141306A4118100B200141C0006A3502002105200141306A41086A2903002106200129033021074108100F1A4108100F1A4104100F2202419797CBC406360200200241046A4100100A200142003703C001200142003703B80120012006370398012001200737039001200120053E02A00120014190016A200141D0016A4114100D42FFFFFFFFFFFFFFFFFF00200141D0016A200141B8016A2002410410050D0A1006220241086A100F22032002360200200341046A2002360200200341086A220441002002100720033502002205421F580D0120042001418C016A4104100B200135028C01220742207C22062005560D0220042007A76A200141A8016A4104100B0240200620012802A8012202AD7C2005560D0020014130410D2002410120042006A76A100E220241086A2002280200101036024C4100450D100C040B4102450D0F0C030B200141F0016A240041020F0B41020D010C0D0B4102450D0C0B410041001003000B02400240024020024120490D002003200141D0006A4118100B200141E0006A3502002105200141D0006A41086A2903002106200129035021074104100F220241EEE98EBF06360200200241046A4100100A200142003703B001200142003703A801200120063703C001200120073703B801200120053E02C801200141B8016A20014190016A4114100D42FFFFFFFFFFFFFFFFFF0020014190016A200141A8016A2002410410050D091006220241086A100F22032002360200200341046A2002360200200341086A22044100200210072003280200411F4D0D012004200141D0016A4120100B200141E8006A41186A200141D0016A41186A2903003703002001200141E0016A2903003703782001200141D8016A290300370370200120012903D00137036841000D020C0C0B200141F0016A240041020F0B4102450D0A0B410041001003000B41004100100300000B4108100F1A200141054101413D100E360288014100450D06410041001003000B410041001003000B410041001008000B4120100F22024104100A200141106A20024120100C200241201008000B410041001003000B410041001003000B410041001008000B200128028801280200413F6A41607141206A2203100F22022003410376100A200041706A22042200240020044120360200200420024104100C20012802880122082802002101200041706A22042400200420013602002004200241206A4104100C200241C0006A200841086A20011009200220031008000B4120100F22024104100A200141E8006A20024120100C200241201008000B200128024C280200413F6A41607141206A2203100F22022003410376100A200041706A22042200240020044120360200200420024104100C200128024C22082802002101200041706A22042400200420013602002004200241206A4104100C200241C0006A200841086A20011009200220031008000B410041001003000B0B48010041000B4248656C6C6F2066726F6D207761736D007177213B393C76BAF374B5A91F5A8E4A972270CEFDDA6375DF53FB1A3CAC11C9657761736D2063616C6C656420657761736D") -var Abi_ewasm = []byte(`[{"name":"get_vm","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"name":"get_number","type":"function","inputs":[],"outputs":[{"name":"","type":"int256","internalType":"int256"}],"stateMutability":"pure"},{"name":"call_get_vm","type":"function","inputs":[{"name":"e","type":"address","internalType":"contract E"}],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"nonpayable"},{"name":"call_get_number","type":"function","inputs":[{"name":"e","type":"address","internalType":"contract E"}],"outputs":[{"name":"","type":"int256","internalType":"int256"}],"stateMutability":"nonpayable"},{"name":"try_revert","type":"function","inputs":[],"outputs":[],"stateMutability":"pure"},{"name":"hash_tests","type":"function","inputs":[],"outputs":[],"stateMutability":"pure"},{"name":"test_events","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"L","type":"event","inputs":[{"name":"f1","type":"int256","internalType":"int256","indexed":true},{"name":"f2","type":"string","internalType":"string"},{"name":"f3","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":""}]`) +var Bytecode_ewasm = hex.MustDecodeString("0061736D01000000011C0660017F006000017F60037F7F7F0060027F7F0060017F017F60000002680508657468657265756D0C67657443616C6C56616C7565000008657468657265756D0B676574436F646553697A65000108657468657265756D08636F6465436F7079000208657468657265756D0666696E697368000308657468657265756D0672657665727400030304030405050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E00070AB40203A60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B5B01027F230041106B220024002000100002402000290300200041086A290300844200520D0010064100100141F7626A220036028C19410020001005220136029019200141891D2000100241004189191003000B410041001004000B0B9019010041000B89190061736D0100000001440B60017F006000017F60037F7F7F0060077F7F7F7F7F7F7F0060027F7F0060057E7F7F7F7F017F60037F7F7F017F60017F017F60047F7F7F7F017F60000060027F7E017F02D7010A08657468657265756D0C67657443616C6C56616C7565000008657468657265756D0F67657443616C6C4461746153697A65000108657468657265756D0C63616C6C44617461436F7079000208657468657265756D036C6F67000308657468657265756D06726576657274000408657468657265756D0463616C6C000508657468657265756D1167657452657475726E4461746153697A65000108657468657265756D0E72657475726E44617461436F70790002056465627567087072696E744D656D000408657468657265756D0666696E6973680004030C0B0204020202060708090A090405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E00140ACF150B2E0002402002450D000340200020012D00003A0000200041016A2100200141016A21012002417F6A22020D000B0B0B240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0B2D002000411F6A21000340200120002D00003A0000200141016A21012000417F6A21002002417F6A22020D000B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0B29002001417F6A21010340200120026A20002D00003A0000200041016A21002002417F6A22020D000B0B7E01017F200120006C220141086A10102203200036020420032000360200200341086A2100024002402002417F460D002001450D010340200020022D00003A0000200041016A2100200241016A21022001417F6A22010D000C020B0B2001450D000340200041003A0000200041016A21002001417F6A22010D000B0B20030BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B7F01027F200320016A220441086A10102205200436020420052004360200200541086A210402402001450D000340200420002D00003A0000200441016A2104200041016A21002001417F6A22010D000B0B02402003450D000340200420022D00003A0000200441016A2104200241016A21022003417F6A22030D000B0B20050B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B8E0103027F017E027F230041206B2102410021030340200220036A20012001420A802204420A7E7DA722053A0000200341016A2103200142095621062004210120060D000B200020054130723A0000200041016A2106024020034101460D002002417E6A210203402006200220036A2D000041306A3A0000200641016A21062003417F6A22034101470D000B0B20060B8C0F03057F047E017F23004180026B220024002000220110000240024002400240024002400240024002400240024002400240024002402001290300200141086A290300844200520D00101241001001220236025441002002101022033602582003410020021002200241034D0D0E4100200328020022043602502002417C6A2102200341046A210302400240024002402004419FBFE9E6054A0D0002402004419CB3A4957D4A0D00200441C99B8FF079460D02200441A89B8AAA7A470D13410F4101410D100F2203280200413F6A41607141C0006A2204101022022004410376100B200141C0003602A001200141A0016A20024104100D2001200328020022003602C801200141C8016A200241C0006A4104100D200241E0006A200341086A2000100A2002413F6A41013A00004120101022034104100B200141F8016A4200370300200142003703F001200142003703E801200142E6003703E001200141E0016A20034120100D200220044102412020034100410010034100450D07410041001004000B2004419BF9C68004460D022004419DB3A4957D470D124100450D0E410041001004000B024002400240200441E382B9CC074A0D00200441A0BFE9E605460D01200441EEE98EBF06460D022004419797CBC406460D050C140B200441E482B9CC07470D13024002400240024020024120490D002003200141106A4118100C200141206A3502002105200141106A41086A290300210620012903102107410810101A410810101A410410102202419797CBC406360200200241046A4100100B200142003703D001200142003703C801200120063703A801200120073703A001200120053E02B001200141A0016A200141E0016A4114100E42FFFFFFFFFFFFFFFFFF00200141E0016A200141C8016A2002410410050D0A1006220241086A101022032002360200200341046A2002360200200341086A220441002002100720033502002205421F580D0120042001419C016A4104100C200135029C01220742207C22062005560D0220042007A76A200141B8016A4104100C0240200620012802B8012202AD7C2005560D0020014100410D2002410120042006A76A100F220241086A2002280200101136022C4100450D170C040B4102450D160C030B20014180026A240041020F0B41020D010C140B4102450D130B410041001004000B41004100100400000B200141C8006A42003703002001420037034020014200370338200142B1A8033703304100450D06410041001004000B20024120490D062003200141D0006A4108100C2002AD2205423F580D0720012903502108200341206A200141D8006A4104100C2001350258220642207C22072005560D0820032006A76A200141DC006A4104100C2007200135025C22067C2005560D092006A7410120032007A76A100F2102410810101A200228020041216A4101417F100F220341086A220441C0004105100A2003410D6A210102402008427F550D002001412D3A0000420020087D2108200141016A21010B200120081013220141C5004106100A200141066A2201200241086A20022802002202100A2003200120026A20046B220236020020042002100841010D0A410041001004000B02400240024020024120490D002003200141E0006A4118100C200141F0006A3502002105200141E0006A41086A29030021062001290360210741041010220241EEE98EBF06360200200241046A4100100B200142003703C001200142003703B801200120063703D001200120073703C801200120053E02D801200141C8016A200141A0016A4114100E42FFFFFFFFFFFFFFFFFF00200141A0016A200141B8016A2002410410050D0D1006220241086A101022032002360200200341046A2002360200200341086A22044100200210072003280200411F4D0D012004200141E0016A4120100C200141F8006A41186A200141E0016A41186A2903003703002001200141F0016A290300370388012001200141E8016A29030037038001200120012903E00137037841000D020C100B20014180026A240041020F0B4102450D0E0B410041001004000B410810101A20014105410141CB00100F360298014100450D0B410041001004000B410041001004000B410041001004000B410041001009000B4120101022024104100B200141306A20024120100D200241201009000B20014180026A240041020F0B20014180026A240041020F0B20014180026A240041020F0B20014180026A240041020F0B410041001009000B410041001004000B410041001009000B200128029801280200413F6A41607141206A2203101022022003410376100B200041706A22042200240020044120360200200420024104100D20012802980122092802002101200041706A22042400200420013602002004200241206A4104100D200241C0006A200941086A2001100A200220031009000B4120101022024104100B200141F8006A20024120100D200241201009000B200128022C280200413F6A41607141206A2203101022022003410376100B200041706A22042200240020044120360200200420024104100D200128022C22092802002101200041706A22042400200420013602002004200241206A4104100D200241C0006A200941086A2001100A200220031009000B410041001004000B0B56010041000B50657761736D2063616C6C65642048656C6C6F2066726F6D207761736D000000007177213B393C76BAF374B5A91F5A8E4A972270CEFDDA6375DF53FB1A3CAC11C9617267313A20617267323A657761736D") +var Abi_ewasm = []byte(`[{"name":"get_vm","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"name":"get_number","type":"function","inputs":[],"outputs":[{"name":"","type":"int256","internalType":"int256"}],"stateMutability":"pure"},{"name":"call_get_vm","type":"function","inputs":[{"name":"e","type":"address","internalType":"contract E"}],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"nonpayable"},{"name":"call_get_number","type":"function","inputs":[{"name":"e","type":"address","internalType":"contract E"}],"outputs":[{"name":"","type":"int256","internalType":"int256"}],"stateMutability":"nonpayable"},{"name":"try_revert","type":"function","inputs":[],"outputs":[],"stateMutability":"pure"},{"name":"hash_tests","type":"function","inputs":[],"outputs":[],"stateMutability":"pure"},{"name":"test_events","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"test_print","type":"function","inputs":[{"name":"arg1","type":"int64","internalType":"int64"},{"name":"arg2","type":"string","internalType":"string"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"L","type":"event","inputs":[{"name":"f1","type":"int256","internalType":"int256","indexed":true},{"name":"f2","type":"string","internalType":"string"},{"name":"f3","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":""}]`) diff --git a/execution/wasm/contract.go b/execution/wasm/contract.go index 20ad6d7bb..8e99ebbe1 100644 --- a/execution/wasm/contract.go +++ b/execution/wasm/contract.go @@ -5,6 +5,8 @@ import ( "fmt" "math/big" + hex "github.com/tmthrgd/go-hex" + "github.com/hyperledger/burrow/execution/evm" "github.com/hyperledger/burrow/execution/exec" @@ -79,6 +81,140 @@ func (ctx *context) ResolveGlobal(module, field string) int64 { } func (ctx *context) ResolveFunc(module, field string) lifeExec.FunctionImport { + if module == "debug" { + // See https://github.com/ewasm/hera#interfaces + switch field { + case "print32": + return func(vm *lifeExec.VirtualMachine) int64 { + n := int32(vm.GetCurrentFrame().Locals[0]) + + s := fmt.Sprintf("%d", n) + + err := ctx.state.EventSink.Print(&exec.PrintEvent{ + Address: ctx.params.Callee, + Data: []byte(s), + }) + + if err != nil { + panic(fmt.Sprintf(" => print32 failed: %v", err)) + } + + return Success + } + + case "print64": + return func(vm *lifeExec.VirtualMachine) int64 { + n := int64(vm.GetCurrentFrame().Locals[0]) + + s := fmt.Sprintf("%d", n) + + err := ctx.state.EventSink.Print(&exec.PrintEvent{ + Address: ctx.params.Callee, + Data: []byte(s), + }) + + if err != nil { + panic(fmt.Sprintf(" => print32 failed: %v", err)) + } + + return Success + } + + case "printMem": + return func(vm *lifeExec.VirtualMachine) int64 { + dataPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[1])) + + s := vm.Memory[dataPtr : dataPtr+dataLen] + + err := ctx.state.EventSink.Print(&exec.PrintEvent{ + Address: ctx.params.Callee, + Data: s, + }) + + if err != nil { + panic(fmt.Sprintf(" => printMem failed: %v", err)) + } + + return Success + } + + case "printMemHex": + return func(vm *lifeExec.VirtualMachine) int64 { + dataPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataLen := int(uint32(vm.GetCurrentFrame().Locals[1])) + + s := hex.EncodeToString(vm.Memory[dataPtr : dataPtr+dataLen]) + + err := ctx.state.EventSink.Print(&exec.PrintEvent{ + Address: ctx.params.Callee, + Data: []byte(s), + }) + + if err != nil { + panic(fmt.Sprintf(" => printMemHex failed: %v", err)) + } + + return Success + } + + case "printStorage": + return func(vm *lifeExec.VirtualMachine) int64 { + keyPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + + key := bin.Word256{} + + copy(key[:], vm.Memory[keyPtr:keyPtr+32]) + + val, err := ctx.state.GetStorage(ctx.params.Callee, key) + if err != nil { + panic(err) + } + + err = ctx.state.EventSink.Print(&exec.PrintEvent{ + Address: ctx.params.Callee, + Data: val, + }) + + if err != nil { + panic(fmt.Sprintf(" => printStorage failed: %v", err)) + } + + return Success + } + + case "printStorageHex": + return func(vm *lifeExec.VirtualMachine) int64 { + keyPtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + + key := bin.Word256{} + + copy(key[:], vm.Memory[keyPtr:keyPtr+32]) + + val, err := ctx.state.GetStorage(ctx.params.Callee, key) + if err != nil { + panic(err) + } + + s := hex.EncodeToString(val) + + err = ctx.state.EventSink.Print(&exec.PrintEvent{ + Address: ctx.params.Callee, + Data: []byte(s), + }) + + if err != nil { + panic(fmt.Sprintf(" => printStorage failed: %v", err)) + } + + return Success + } + + default: + panic(fmt.Sprintf("function %s unknown for debug module", field)) + } + } + if module != "ethereum" { panic(fmt.Sprintf("unknown module %s", module)) } diff --git a/execution/wasm/storage_test.solang.go b/execution/wasm/storage_test.solang.go index 4926872c6..b4548ef47 100644 --- a/execution/wasm/storage_test.solang.go +++ b/execution/wasm/storage_test.solang.go @@ -2,5 +2,5 @@ package wasm import hex "github.com/tmthrgd/go-hex" -var Bytecode_storage_test = hex.MustDecodeString("0061736D01000000011C0660027F7F0060017F006000017F60037F7F7F0060017F017F6000000280010608657468657265756D0C73746F7261676553746F7265000008657468657265756D0C67657443616C6C56616C7565000108657468657265756D0B676574436F646553697A65000208657468657265756D08636F6465436F7079000308657468657265756D0666696E697368000008657468657265756D06726576657274000003060500040502050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E000A0AAB0305240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B4E01017F230041C0006B22002400200041386A4200370300200042003703302000420037032820004200370320200041041006200042E600370300200041206A20001000200041C0006A240041000B5E01027F230041106B220024002000100102402000290300200041086A290300844200520D0010084100100241C0736A22003602B00741002000100722013602B407200141C00C2000100310091A410041AE071004000B410041001005000B0BB507010041000BAE070061736D01000000011C0660017F006000017F60037F7F7F0060027F7F0060017F017F600000029F010708657468657265756D0C67657443616C6C56616C7565000008657468657265756D0F67657443616C6C4461746153697A65000108657468657265756D0C63616C6C44617461436F7079000208657468657265756D0B73746F726167654C6F6164000308657468657265756D0C73746F7261676553746F7265000308657468657265756D06726576657274000308657468657265756D0666696E697368000303060503020405050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E000B0AB20505240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B850302037F017E230041A0016B22002400200041086A100002400240024002402000290308200041106A290300844200520D00100A41001001220136020441002001100922023602082002410020011002200141034D0D014100200228020022013602000240200141A298B6BE01460D00200141DE9AB88F79470D0220004180016A41186A420037030020004200370390012000420037038801200042003703800120004180016A200041E0006A1003200041C0006A41186A420037030020004200370350200042003703482000420037034020002903602103200041206A410410072000200342017C370320200041C0006A200041206A10044100450D03410041001005000B20004198016A420037030020004200370390012000420037038801200042003703800120004180016A200041E0006A10032000200029036042027C3703184100450D03410041001005000B410041001005000B410041001005000B410041001006000B41201009220141041007200041186A200141081008200141201006000B") +var Bytecode_storage_test = hex.MustDecodeString("0061736D01000000011C0660027F7F0060017F006000017F60037F7F7F0060017F017F6000000280010608657468657265756D0C73746F7261676553746F7265000008657468657265756D0C67657443616C6C56616C7565000108657468657265756D0B676574436F646553697A65000208657468657265756D08636F6465436F7079000308657468657265756D0666696E697368000008657468657265756D06726576657274000003060500040502050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E000A0AAB0305240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B4E01017F230041C0006B22002400200041386A4200370300200042003703302000420037032820004200370320200041041006200042E600370300200041206A20001000200041C0006A240041000B5E01027F230041106B220024002000100102402000290300200041086A290300844200520D0010084100100241C0736A22003602B00741002000100722013602B407200141C00C2000100310091A410041AE071004000B410041001005000B0BB507010041000BAE070061736D01000000011C0660017F006000017F60037F7F7F0060027F7F0060017F017F600000029F010708657468657265756D0C67657443616C6C56616C7565000008657468657265756D0F67657443616C6C4461746153697A65000108657468657265756D0C63616C6C44617461436F7079000208657468657265756D0B73746F726167654C6F6164000308657468657265756D06726576657274000308657468657265756D0C73746F7261676553746F7265000308657468657265756D0666696E697368000303060503020405050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E000B0AB20505240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B850302037F017E230041A0016B22002400200041086A100002400240024002402000290308200041106A290300844200520D00100A41001001220136020441002001100922023602082002410020011002200141034D0D014100200228020022013602000240200141DE9AB88F79460D00200141A298B6BE01470D0220004198016A420037030020004200370390012000420037038801200042003703800120004180016A200041E0006A10032000200029036042027C3703184100450D03410041001004000B20004180016A41186A420037030020004200370390012000420037038801200042003703800120004180016A200041E0006A1003200041C0006A41186A420037030020004200370350200042003703482000420037034020002903602103200041206A410410072000200342017C370320200041C0006A200041206A10054100450D03410041001004000B410041001004000B410041001004000B41201009220141041007200041186A200141081008200141201006000B410041001006000B") var Abi_storage_test = []byte(`[{"type":"constructor","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"getFooPlus2","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"name":"incFoo","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"}]`) diff --git a/go.mod b/go.mod index fde9be15e..460e27daf 100644 --- a/go.mod +++ b/go.mod @@ -53,5 +53,6 @@ require ( golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad golang.org/x/net v0.0.0-20210119194325-5f4716e94777 google.golang.org/grpc v1.35.0 + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 // indirect gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 03b5108ca..af3ebe66a 100644 --- a/go.sum +++ b/go.sum @@ -834,6 +834,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= 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= diff --git a/integration/rpctransact/call_test.go b/integration/rpctransact/call_test.go index 73a0503db..9323785e7 100644 --- a/integration/rpctransact/call_test.go +++ b/integration/rpctransact/call_test.go @@ -591,6 +591,23 @@ func testCallTx(t *testing.T, kern *core.Kernel, cli rpctransact.TransactClient) assert.Equal(t, true, f3) return }) + + t.Run("WasmPrint", func(t *testing.T) { + t.Parallel() + createTxe, err := rpctest.CreateWASMContract(cli, inputAddress, solidity.Bytecode_ewasm, nil) + require.NoError(t, err) + address := lastCall(createTxe.Events).CallData.Callee + spec, err := abi.ReadSpec(solidity.Abi_ewasm) + require.NoError(t, err) + data, _, err := spec.Pack("test_print", 102, "Fishy") + require.NoError(t, err) + callTxe, err := rpctest.CallContract(cli, inputAddress, address, data) + require.NoError(t, err) + evs := filterPrint(callTxe.Events) + require.Len(t, evs, 1) + assert.Equal(t, string(evs[0].Data), "arg1:102 arg2:Fishy") + return + }) }) } @@ -634,6 +651,16 @@ func filterLogs(evs []*exec.Event) []*exec.LogEvent { return logEvs } +func filterPrint(evs []*exec.Event) []*exec.PrintEvent { + var printEvs []*exec.PrintEvent + for _, ev := range evs { + if ev.Print != nil { + printEvs = append(printEvs, ev.Print) + } + } + return printEvs +} + func lastCall(evs []*exec.Event) *exec.CallEvent { callEvs := filterCalls(evs) return callEvs[len(callEvs)-1] diff --git a/js/proto/exec_pb.d.ts b/js/proto/exec_pb.d.ts index 02ad26ba7..bc1f87597 100644 --- a/js/proto/exec_pb.d.ts +++ b/js/proto/exec_pb.d.ts @@ -511,6 +511,12 @@ export class Event extends jspb.Message { setGovernaccount(value?: GovernAccountEvent): Event; + hasPrint(): boolean; + clearPrint(): void; + getPrint(): PrintEvent | undefined; + setPrint(value?: PrintEvent): Event; + + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Event.AsObject; static toObject(includeInstance: boolean, msg: Event): Event.AsObject; @@ -529,6 +535,7 @@ export namespace Event { call?: CallEvent.AsObject, log?: LogEvent.AsObject, governaccount?: GovernAccountEvent.AsObject, + print?: PrintEvent.AsObject, } } @@ -654,6 +661,35 @@ export namespace CallEvent { } } +export class PrintEvent extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): PrintEvent; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): PrintEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PrintEvent.AsObject; + static toObject(includeInstance: boolean, msg: PrintEvent): PrintEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PrintEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PrintEvent; + static deserializeBinaryFromReader(message: PrintEvent, reader: jspb.BinaryReader): PrintEvent; +} + +export namespace PrintEvent { + export type AsObject = { + address: Uint8Array | string, + data: Uint8Array | string, + } +} + export class GovernAccountEvent extends jspb.Message { hasAccountupdate(): boolean; diff --git a/js/proto/exec_pb.js b/js/proto/exec_pb.js index 9056d28f2..cf5598c15 100644 --- a/js/proto/exec_pb.js +++ b/js/proto/exec_pb.js @@ -44,6 +44,7 @@ goog.exportSymbol('proto.exec.InputEvent', null, global); goog.exportSymbol('proto.exec.LogEvent', null, global); goog.exportSymbol('proto.exec.Origin', null, global); goog.exportSymbol('proto.exec.OutputEvent', null, global); +goog.exportSymbol('proto.exec.PrintEvent', null, global); goog.exportSymbol('proto.exec.Result', null, global); goog.exportSymbol('proto.exec.StreamEvent', null, global); goog.exportSymbol('proto.exec.StreamEvents', null, global); @@ -386,6 +387,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.exec.CallEvent.displayName = 'proto.exec.CallEvent'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.exec.PrintEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.exec.PrintEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.exec.PrintEvent.displayName = 'proto.exec.PrintEvent'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -3671,7 +3693,8 @@ proto.exec.Event.toObject = function(includeInstance, msg) { output: (f = msg.getOutput()) && proto.exec.OutputEvent.toObject(includeInstance, f), call: (f = msg.getCall()) && proto.exec.CallEvent.toObject(includeInstance, f), log: (f = msg.getLog()) && proto.exec.LogEvent.toObject(includeInstance, f), - governaccount: (f = msg.getGovernaccount()) && proto.exec.GovernAccountEvent.toObject(includeInstance, f) + governaccount: (f = msg.getGovernaccount()) && proto.exec.GovernAccountEvent.toObject(includeInstance, f), + print: (f = msg.getPrint()) && proto.exec.PrintEvent.toObject(includeInstance, f) }; if (includeInstance) { @@ -3738,6 +3761,11 @@ proto.exec.Event.deserializeBinaryFromReader = function(msg, reader) { reader.readMessage(value,proto.exec.GovernAccountEvent.deserializeBinaryFromReader); msg.setGovernaccount(value); break; + case 7: + var value = new proto.exec.PrintEvent; + reader.readMessage(value,proto.exec.PrintEvent.deserializeBinaryFromReader); + msg.setPrint(value); + break; default: reader.skipField(); break; @@ -3815,6 +3843,14 @@ proto.exec.Event.serializeBinaryToWriter = function(message, writer) { proto.exec.GovernAccountEvent.serializeBinaryToWriter ); } + f = message.getPrint(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.exec.PrintEvent.serializeBinaryToWriter + ); + } }; @@ -4040,6 +4076,43 @@ proto.exec.Event.prototype.hasGovernaccount = function() { }; +/** + * optional PrintEvent Print = 7; + * @return {?proto.exec.PrintEvent} + */ +proto.exec.Event.prototype.getPrint = function() { + return /** @type{?proto.exec.PrintEvent} */ ( + jspb.Message.getWrapperField(this, proto.exec.PrintEvent, 7)); +}; + + +/** + * @param {?proto.exec.PrintEvent|undefined} value + * @return {!proto.exec.Event} returns this +*/ +proto.exec.Event.prototype.setPrint = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.exec.Event} returns this + */ +proto.exec.Event.prototype.clearPrint = function() { + return this.setPrint(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.exec.Event.prototype.hasPrint = function() { + return jspb.Message.getField(this, 7) != null; +}; + + @@ -4936,6 +5009,214 @@ proto.exec.CallEvent.prototype.setReturn = function(value) { +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.exec.PrintEvent.prototype.toObject = function(opt_includeInstance) { + return proto.exec.PrintEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.exec.PrintEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.PrintEvent.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.exec.PrintEvent} + */ +proto.exec.PrintEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.exec.PrintEvent; + return proto.exec.PrintEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.exec.PrintEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.exec.PrintEvent} + */ +proto.exec.PrintEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.exec.PrintEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.exec.PrintEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.exec.PrintEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.exec.PrintEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes Address = 1; + * @return {!(string|Uint8Array)} + */ +proto.exec.PrintEvent.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes Address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.exec.PrintEvent.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes Address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.exec.PrintEvent.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.PrintEvent} returns this + */ +proto.exec.PrintEvent.prototype.setAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes Data = 2; + * @return {!(string|Uint8Array)} + */ +proto.exec.PrintEvent.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes Data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.exec.PrintEvent.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes Data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.exec.PrintEvent.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.exec.PrintEvent} returns this + */ +proto.exec.PrintEvent.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. diff --git a/keys/keys_grpc.pb.go b/keys/keys_grpc.pb.go index 5b50d28d2..00f2d1450 100644 --- a/keys/keys_grpc.pb.go +++ b/keys/keys_grpc.pb.go @@ -12,6 +12,7 @@ import ( // 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 // KeysClient is the client API for Keys service. @@ -203,7 +204,7 @@ type UnsafeKeysServer interface { } func RegisterKeysServer(s grpc.ServiceRegistrar, srv KeysServer) { - s.RegisterService(&_Keys_serviceDesc, srv) + s.RegisterService(&Keys_ServiceDesc, srv) } func _Keys_GenerateKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -404,7 +405,10 @@ func _Keys_AddName_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -var _Keys_serviceDesc = grpc.ServiceDesc{ +// Keys_ServiceDesc is the grpc.ServiceDesc for Keys service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Keys_ServiceDesc = grpc.ServiceDesc{ ServiceName: "keys.Keys", HandlerType: (*KeysServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/protobuf/exec.proto b/protobuf/exec.proto index fec8be865..7d9106b6b 100644 --- a/protobuf/exec.proto +++ b/protobuf/exec.proto @@ -148,6 +148,7 @@ message Event { CallEvent Call = 4; LogEvent Log = 5; GovernAccountEvent GovernAccount = 6; + PrintEvent Print = 7; } // Could structure this further if needed - sum type of various results relevant to different transaction types @@ -176,6 +177,11 @@ message CallEvent { bytes Return = 4 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; } +message PrintEvent { + bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; + bytes Data = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; +} + message GovernAccountEvent { spec.TemplateAccount AccountUpdate = 1; } diff --git a/rpc/rpcdump/rpcdump_grpc.pb.go b/rpc/rpcdump/rpcdump_grpc.pb.go index a64c467cd..a764fc6ea 100644 --- a/rpc/rpcdump/rpcdump_grpc.pb.go +++ b/rpc/rpcdump/rpcdump_grpc.pb.go @@ -13,6 +13,7 @@ import ( // 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 // DumpClient is the client API for Dump service. @@ -31,7 +32,7 @@ func NewDumpClient(cc grpc.ClientConnInterface) DumpClient { } func (c *dumpClient) GetDump(ctx context.Context, in *GetDumpParam, opts ...grpc.CallOption) (Dump_GetDumpClient, error) { - stream, err := c.cc.NewStream(ctx, &_Dump_serviceDesc.Streams[0], "/rpcdump.Dump/GetDump", opts...) + stream, err := c.cc.NewStream(ctx, &Dump_ServiceDesc.Streams[0], "/rpcdump.Dump/GetDump", opts...) if err != nil { return nil, err } @@ -87,7 +88,7 @@ type UnsafeDumpServer interface { } func RegisterDumpServer(s grpc.ServiceRegistrar, srv DumpServer) { - s.RegisterService(&_Dump_serviceDesc, srv) + s.RegisterService(&Dump_ServiceDesc, srv) } func _Dump_GetDump_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -111,7 +112,10 @@ func (x *dumpGetDumpServer) Send(m *dump.Dump) error { return x.ServerStream.SendMsg(m) } -var _Dump_serviceDesc = grpc.ServiceDesc{ +// Dump_ServiceDesc is the grpc.ServiceDesc for Dump service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Dump_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rpcdump.Dump", HandlerType: (*DumpServer)(nil), Methods: []grpc.MethodDesc{}, diff --git a/rpc/rpcevents/rpcevents_grpc.pb.go b/rpc/rpcevents/rpcevents_grpc.pb.go index 3d7f33649..2be3c15e7 100644 --- a/rpc/rpcevents/rpcevents_grpc.pb.go +++ b/rpc/rpcevents/rpcevents_grpc.pb.go @@ -13,6 +13,7 @@ import ( // 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 // ExecutionEventsClient is the client API for ExecutionEvents service. @@ -37,7 +38,7 @@ func NewExecutionEventsClient(cc grpc.ClientConnInterface) ExecutionEventsClient } func (c *executionEventsClient) Stream(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_StreamClient, error) { - stream, err := c.cc.NewStream(ctx, &_ExecutionEvents_serviceDesc.Streams[0], "/rpcevents.ExecutionEvents/Stream", opts...) + stream, err := c.cc.NewStream(ctx, &ExecutionEvents_ServiceDesc.Streams[0], "/rpcevents.ExecutionEvents/Stream", opts...) if err != nil { return nil, err } @@ -78,7 +79,7 @@ func (c *executionEventsClient) Tx(ctx context.Context, in *TxRequest, opts ...g } func (c *executionEventsClient) Events(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (ExecutionEvents_EventsClient, error) { - stream, err := c.cc.NewStream(ctx, &_ExecutionEvents_serviceDesc.Streams[1], "/rpcevents.ExecutionEvents/Events", opts...) + stream, err := c.cc.NewStream(ctx, &ExecutionEvents_ServiceDesc.Streams[1], "/rpcevents.ExecutionEvents/Events", opts...) if err != nil { return nil, err } @@ -146,7 +147,7 @@ type UnsafeExecutionEventsServer interface { } func RegisterExecutionEventsServer(s grpc.ServiceRegistrar, srv ExecutionEventsServer) { - s.RegisterService(&_ExecutionEvents_serviceDesc, srv) + s.RegisterService(&ExecutionEvents_ServiceDesc, srv) } func _ExecutionEvents_Stream_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -209,7 +210,10 @@ func (x *executionEventsEventsServer) Send(m *EventsResponse) error { return x.ServerStream.SendMsg(m) } -var _ExecutionEvents_serviceDesc = grpc.ServiceDesc{ +// ExecutionEvents_ServiceDesc is the grpc.ServiceDesc for ExecutionEvents service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ExecutionEvents_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rpcevents.ExecutionEvents", HandlerType: (*ExecutionEventsServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/rpc/rpcquery/rpcquery_grpc.pb.go b/rpc/rpcquery/rpcquery_grpc.pb.go index 76df0c644..5058f27be 100644 --- a/rpc/rpcquery/rpcquery_grpc.pb.go +++ b/rpc/rpcquery/rpcquery_grpc.pb.go @@ -17,6 +17,7 @@ import ( // 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 // QueryClient is the client API for Query service. @@ -85,7 +86,7 @@ func (c *queryClient) GetStorage(ctx context.Context, in *GetStorageParam, opts } func (c *queryClient) ListAccounts(ctx context.Context, in *ListAccountsParam, opts ...grpc.CallOption) (Query_ListAccountsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[0], "/rpcquery.Query/ListAccounts", opts...) + stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[0], "/rpcquery.Query/ListAccounts", opts...) if err != nil { return nil, err } @@ -126,7 +127,7 @@ func (c *queryClient) GetName(ctx context.Context, in *GetNameParam, opts ...grp } func (c *queryClient) ListNames(ctx context.Context, in *ListNamesParam, opts ...grpc.CallOption) (Query_ListNamesClient, error) { - stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[1], "/rpcquery.Query/ListNames", opts...) + stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[1], "/rpcquery.Query/ListNames", opts...) if err != nil { return nil, err } @@ -194,7 +195,7 @@ func (c *queryClient) GetProposal(ctx context.Context, in *GetProposalParam, opt } func (c *queryClient) ListProposals(ctx context.Context, in *ListProposalsParam, opts ...grpc.CallOption) (Query_ListProposalsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[2], "/rpcquery.Query/ListProposals", opts...) + stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[2], "/rpcquery.Query/ListProposals", opts...) if err != nil { return nil, err } @@ -321,7 +322,7 @@ type UnsafeQueryServer interface { } func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) + s.RegisterService(&Query_ServiceDesc, srv) } func _Query_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -585,7 +586,10 @@ func _Query_GetBlockHeader_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -var _Query_serviceDesc = grpc.ServiceDesc{ +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rpcquery.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/rpc/rpctransact/rpctransact_grpc.pb.go b/rpc/rpctransact/rpctransact_grpc.pb.go index 9a70d6fb1..124ee37c0 100644 --- a/rpc/rpctransact/rpctransact_grpc.pb.go +++ b/rpc/rpctransact/rpctransact_grpc.pb.go @@ -15,6 +15,7 @@ import ( // 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 // TransactClient is the client API for Transact service. @@ -248,7 +249,7 @@ type UnsafeTransactServer interface { } func RegisterTransactServer(s grpc.ServiceRegistrar, srv TransactServer) { - s.RegisterService(&_Transact_serviceDesc, srv) + s.RegisterService(&Transact_ServiceDesc, srv) } func _Transact_BroadcastTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -467,7 +468,10 @@ func _Transact_NameTxAsync_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -var _Transact_serviceDesc = grpc.ServiceDesc{ +// Transact_ServiceDesc is the grpc.ServiceDesc for Transact service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Transact_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rpctransact.Transact", HandlerType: (*TransactServer)(nil), Methods: []grpc.MethodDesc{ From 04aee156d9063e10c754aa2169993bd7debad6e6 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Fri, 5 Feb 2021 17:30:34 +0000 Subject: [PATCH 141/185] Docker image should start testnet by default Signed-off-by: Sean Young --- Dockerfile | 2 + testnet/genesis.json | 111 ++++++++++++++++++ ...D5025216A47B37F4C611BD0494F4025704331.json | 1 + ...F766B60461EA787B35FA0352BA4F1449CAEC3.json | 1 + ...96EE39F92CCFC91EB8185D8AADCBE8321A687.json | 1 + ...4BFF202E3C5ED2998DCF210E1D9F84705287D.json | 1 + ...2314B5D38BE9EA2BEDB8E58345C62FA6636BA.json | 1 + testnet/keys/names/Participant_0 | 1 + testnet/keys/names/Participant_1 | 1 + testnet/keys/names/Root_0 | 1 + testnet/keys/names/Root_1 | 1 + testnet/keys/names/Validator_0 | 1 + 12 files changed, 123 insertions(+) create mode 100644 testnet/genesis.json create mode 100644 testnet/keys/data/545D5025216A47B37F4C611BD0494F4025704331.json create mode 100644 testnet/keys/data/7D2F766B60461EA787B35FA0352BA4F1449CAEC3.json create mode 100644 testnet/keys/data/83896EE39F92CCFC91EB8185D8AADCBE8321A687.json create mode 100644 testnet/keys/data/A094BFF202E3C5ED2998DCF210E1D9F84705287D.json create mode 100644 testnet/keys/data/ABE2314B5D38BE9EA2BEDB8E58345C62FA6636BA.json create mode 100644 testnet/keys/names/Participant_0 create mode 100644 testnet/keys/names/Participant_1 create mode 100644 testnet/keys/names/Root_0 create mode 100644 testnet/keys/names/Root_1 create mode 100644 testnet/keys/names/Validator_0 diff --git a/Dockerfile b/Dockerfile index 9843ab2b9..559cb5030 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,7 @@ LABEL org.label-schema.vcs-url="https://github.com/hyperledger/burrow" ENV BURROW_PATH /home/$USER RUN addgroup -g 101 -S $USER && adduser -S -D -u 1000 $USER $USER WORKDIR $BURROW_PATH +ADD --chown=$USER /testnet/ $BURROW_PATH # Copy binaries built in previous stage COPY --from=builder /src/burrow/bin/burrow $INSTALL_BASE/ @@ -44,3 +45,4 @@ EXPOSE 10997 USER $USER:$USER ENTRYPOINT [ "burrow" ] +CMD [ "start" ] diff --git a/testnet/genesis.json b/testnet/genesis.json new file mode 100644 index 000000000..f7111b51f --- /dev/null +++ b/testnet/genesis.json @@ -0,0 +1,111 @@ +{ + "GenesisTime": "2021-02-05T17:29:45.612487942Z", + "ChainName": "Burrow Testnet", + "Params": { + "ProposalThreshold": 3 + }, + "GlobalPermissions": { + "Base": { + "Perms": "send | call | createContract | createAccount | bond | name | proposal | input | batch | hasBase | hasRole", + "SetBit": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole" + } + }, + "Accounts": [ + { + "Address": "83896EE39F92CCFC91EB8185D8AADCBE8321A687", + "PublicKey": { + "CurveType": "ed25519", + "PublicKey": "94E1542E21C9DDF6796F21B5B29A136FB7553123F9C9960DD8DFB2610FD7D02C" + }, + "Amount": 9999999999, + "Name": "Validator_0", + "Permissions": { + "Base": { + "Perms": "bond", + "SetBit": "bond" + } + } + }, + { + "Address": "7D2F766B60461EA787B35FA0352BA4F1449CAEC3", + "PublicKey": { + "CurveType": "ed25519", + "PublicKey": "F3E03123373B4089022A9E94D9D5628795F6F59BDD87DD1940A68E539DD602C1" + }, + "Amount": 99999999999999, + "Name": "Root_0", + "Permissions": { + "Base": { + "Perms": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole", + "SetBit": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole" + } + } + }, + { + "Address": "545D5025216A47B37F4C611BD0494F4025704331", + "PublicKey": { + "CurveType": "ed25519", + "PublicKey": "49BDE104BD224137D39FE8CE7BB1DCEF7F72A9387CDEC9E3749597B234032730" + }, + "Amount": 99999999999999, + "Name": "Root_1", + "Permissions": { + "Base": { + "Perms": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole", + "SetBit": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole" + } + } + }, + { + "Address": "ABE2314B5D38BE9EA2BEDB8E58345C62FA6636BA", + "PublicKey": { + "CurveType": "ed25519", + "PublicKey": "9348C950DD9986E3347455BC82EA796C1B9AF6062A2A4E13B9D706C38A7757F4" + }, + "Amount": 9999999999, + "Name": "Participant_0", + "Permissions": { + "Base": { + "Perms": "send | call | name | proposal | input | hasRole", + "SetBit": "send | call | name | proposal | input | hasRole" + } + } + }, + { + "Address": "A094BFF202E3C5ED2998DCF210E1D9F84705287D", + "PublicKey": { + "CurveType": "ed25519", + "PublicKey": "85D4EF470CA14D3C1490EFF2DBC21B97D97D6D2BC2D6C3FE21E4289AECC2E0B1" + }, + "Amount": 9999999999, + "Name": "Participant_1", + "Permissions": { + "Base": { + "Perms": "send | call | name | proposal | input | hasRole", + "SetBit": "send | call | name | proposal | input | hasRole" + } + } + } + ], + "Validators": [ + { + "Address": "83896EE39F92CCFC91EB8185D8AADCBE8321A687", + "PublicKey": { + "CurveType": "ed25519", + "PublicKey": "94E1542E21C9DDF6796F21B5B29A136FB7553123F9C9960DD8DFB2610FD7D02C" + }, + "Amount": 9999999998, + "Name": "Validator_0", + "UnbondTo": [ + { + "Address": "83896EE39F92CCFC91EB8185D8AADCBE8321A687", + "PublicKey": { + "CurveType": "ed25519", + "PublicKey": "94E1542E21C9DDF6796F21B5B29A136FB7553123F9C9960DD8DFB2610FD7D02C" + }, + "Amount": 9999999998 + } + ] + } + ] +} \ No newline at end of file diff --git a/testnet/keys/data/545D5025216A47B37F4C611BD0494F4025704331.json b/testnet/keys/data/545D5025216A47B37F4C611BD0494F4025704331.json new file mode 100644 index 000000000..19d60587d --- /dev/null +++ b/testnet/keys/data/545D5025216A47B37F4C611BD0494F4025704331.json @@ -0,0 +1 @@ +{"CurveType":"ed25519","Address":"545D5025216A47B37F4C611BD0494F4025704331","PublicKey":"49BDE104BD224137D39FE8CE7BB1DCEF7F72A9387CDEC9E3749597B234032730","AddressHash":"go-crypto-0.5.0","PrivateKey":{"Crypto":"none","Plain":"FD003063B619409634B7EACD5A354A9C239522E0A7E182C866E25CB0F3FB6FAB49BDE104BD224137D39FE8CE7BB1DCEF7F72A9387CDEC9E3749597B234032730"}} \ No newline at end of file diff --git a/testnet/keys/data/7D2F766B60461EA787B35FA0352BA4F1449CAEC3.json b/testnet/keys/data/7D2F766B60461EA787B35FA0352BA4F1449CAEC3.json new file mode 100644 index 000000000..66c01d517 --- /dev/null +++ b/testnet/keys/data/7D2F766B60461EA787B35FA0352BA4F1449CAEC3.json @@ -0,0 +1 @@ +{"CurveType":"ed25519","Address":"7D2F766B60461EA787B35FA0352BA4F1449CAEC3","PublicKey":"F3E03123373B4089022A9E94D9D5628795F6F59BDD87DD1940A68E539DD602C1","AddressHash":"go-crypto-0.5.0","PrivateKey":{"Crypto":"none","Plain":"862F94EDF894FA8E7E366A91F3974EC5D286FC9EB9A9D39DE4FF0B9FF32C79E8F3E03123373B4089022A9E94D9D5628795F6F59BDD87DD1940A68E539DD602C1"}} \ No newline at end of file diff --git a/testnet/keys/data/83896EE39F92CCFC91EB8185D8AADCBE8321A687.json b/testnet/keys/data/83896EE39F92CCFC91EB8185D8AADCBE8321A687.json new file mode 100644 index 000000000..7cb6cbf09 --- /dev/null +++ b/testnet/keys/data/83896EE39F92CCFC91EB8185D8AADCBE8321A687.json @@ -0,0 +1 @@ +{"CurveType":"ed25519","Address":"83896EE39F92CCFC91EB8185D8AADCBE8321A687","PublicKey":"94E1542E21C9DDF6796F21B5B29A136FB7553123F9C9960DD8DFB2610FD7D02C","AddressHash":"go-crypto-0.5.0","PrivateKey":{"Crypto":"none","Plain":"AFBEDADEA32C2F94D78FB1023ED0ACAF2FD92711627A036237B1C8256275C44294E1542E21C9DDF6796F21B5B29A136FB7553123F9C9960DD8DFB2610FD7D02C"}} \ No newline at end of file diff --git a/testnet/keys/data/A094BFF202E3C5ED2998DCF210E1D9F84705287D.json b/testnet/keys/data/A094BFF202E3C5ED2998DCF210E1D9F84705287D.json new file mode 100644 index 000000000..0afd0fde0 --- /dev/null +++ b/testnet/keys/data/A094BFF202E3C5ED2998DCF210E1D9F84705287D.json @@ -0,0 +1 @@ +{"CurveType":"ed25519","Address":"A094BFF202E3C5ED2998DCF210E1D9F84705287D","PublicKey":"85D4EF470CA14D3C1490EFF2DBC21B97D97D6D2BC2D6C3FE21E4289AECC2E0B1","AddressHash":"go-crypto-0.5.0","PrivateKey":{"Crypto":"none","Plain":"F40244D46AAFA9648959AD9F4B2F5E026F37E6D7E9D664AA963E915B1F2F671B85D4EF470CA14D3C1490EFF2DBC21B97D97D6D2BC2D6C3FE21E4289AECC2E0B1"}} \ No newline at end of file diff --git a/testnet/keys/data/ABE2314B5D38BE9EA2BEDB8E58345C62FA6636BA.json b/testnet/keys/data/ABE2314B5D38BE9EA2BEDB8E58345C62FA6636BA.json new file mode 100644 index 000000000..3cdd9aa1f --- /dev/null +++ b/testnet/keys/data/ABE2314B5D38BE9EA2BEDB8E58345C62FA6636BA.json @@ -0,0 +1 @@ +{"CurveType":"ed25519","Address":"ABE2314B5D38BE9EA2BEDB8E58345C62FA6636BA","PublicKey":"9348C950DD9986E3347455BC82EA796C1B9AF6062A2A4E13B9D706C38A7757F4","AddressHash":"go-crypto-0.5.0","PrivateKey":{"Crypto":"none","Plain":"2D04310BCDD502B930D027F65B27ABE81F32144058CA5FFE20BCEB4E868CA0DE9348C950DD9986E3347455BC82EA796C1B9AF6062A2A4E13B9D706C38A7757F4"}} \ No newline at end of file diff --git a/testnet/keys/names/Participant_0 b/testnet/keys/names/Participant_0 new file mode 100644 index 000000000..2431c00a2 --- /dev/null +++ b/testnet/keys/names/Participant_0 @@ -0,0 +1 @@ +ABE2314B5D38BE9EA2BEDB8E58345C62FA6636BA \ No newline at end of file diff --git a/testnet/keys/names/Participant_1 b/testnet/keys/names/Participant_1 new file mode 100644 index 000000000..f65bdbd1e --- /dev/null +++ b/testnet/keys/names/Participant_1 @@ -0,0 +1 @@ +A094BFF202E3C5ED2998DCF210E1D9F84705287D \ No newline at end of file diff --git a/testnet/keys/names/Root_0 b/testnet/keys/names/Root_0 new file mode 100644 index 000000000..e57187ad0 --- /dev/null +++ b/testnet/keys/names/Root_0 @@ -0,0 +1 @@ +7D2F766B60461EA787B35FA0352BA4F1449CAEC3 \ No newline at end of file diff --git a/testnet/keys/names/Root_1 b/testnet/keys/names/Root_1 new file mode 100644 index 000000000..1559fa2d5 --- /dev/null +++ b/testnet/keys/names/Root_1 @@ -0,0 +1 @@ +545D5025216A47B37F4C611BD0494F4025704331 \ No newline at end of file diff --git a/testnet/keys/names/Validator_0 b/testnet/keys/names/Validator_0 new file mode 100644 index 000000000..0848c7f71 --- /dev/null +++ b/testnet/keys/names/Validator_0 @@ -0,0 +1 @@ +83896EE39F92CCFC91EB8185D8AADCBE8321A687 \ No newline at end of file From 64f78b4229b0030ab53973ae91522ca57043b103 Mon Sep 17 00:00:00 2001 From: yoongbok lee Date: Fri, 5 Feb 2021 18:47:54 -0500 Subject: [PATCH 142/185] implement CREATE, GETTXGASPRICE, GETBLOCKDIFFICULTY, SELFDESTRUCT Signed-off-by: yoongbok lee --- execution/wasm/child.sol | 10 ++ execution/wasm/contract.go | 133 ++++++++++++++++++++++++-- execution/wasm/parent.sol | 37 +++++++ execution/wasm/storage_test.solang.go | 3 + execution/wasm/wasm_test.go | 132 +++++++++++++++++++++++++ 5 files changed, 308 insertions(+), 7 deletions(-) create mode 100644 execution/wasm/child.sol create mode 100644 execution/wasm/parent.sol diff --git a/execution/wasm/child.sol b/execution/wasm/child.sol new file mode 100644 index 000000000..5dc47879a --- /dev/null +++ b/execution/wasm/child.sol @@ -0,0 +1,10 @@ +pragma solidity >0.6.3; + +contract Child { + + address public owner; // public, so you can see it when you find the child + + constructor() public { + owner = msg.sender; + } +} diff --git a/execution/wasm/contract.go b/execution/wasm/contract.go index 8e99ebbe1..8fb174c67 100644 --- a/execution/wasm/contract.go +++ b/execution/wasm/contract.go @@ -5,16 +5,17 @@ import ( "fmt" "math/big" + lifeExec "github.com/perlin-network/life/exec" hex "github.com/tmthrgd/go-hex" - "github.com/hyperledger/burrow/execution/evm" - "github.com/hyperledger/burrow/execution/exec" - bin "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" - lifeExec "github.com/perlin-network/life/exec" + "github.com/hyperledger/burrow/execution/evm" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/permission" + "github.com/hyperledger/burrow/txs" ) type Contract struct { @@ -72,6 +73,7 @@ type context struct { code []byte output []byte returnData []byte + sequence uint64 } var _ lifeExec.ImportResolver = (*context)(nil) @@ -220,13 +222,130 @@ func (ctx *context) ResolveFunc(module, field string) lifeExec.FunctionImport { } switch field { + case "create": + return func(vm *lifeExec.VirtualMachine) int64 { + valuePtr := int(uint32(vm.GetCurrentFrame().Locals[0])) + dataPtr := uint32(vm.GetCurrentFrame().Locals[1]) + dataLen := uint32(vm.GetCurrentFrame().Locals[2]) + resultPtr := uint32(vm.GetCurrentFrame().Locals[3]) + + // TODO: is this guaranteed to be okay? Should be avoid panic here if out of bounds? + value := bin.BigIntFromLittleEndianBytes(vm.Memory[valuePtr : valuePtr+ValueByteSize]) + + var data []byte + copy(data, vm.Memory[dataPtr:dataPtr+dataLen]) + + ctx.sequence++ + nonce := make([]byte, txs.HashLength+8) + copy(nonce, ctx.vm.options.Nonce) + binary.BigEndian.PutUint64(nonce[txs.HashLength:], ctx.sequence) + newAccountAddress := crypto.NewContractAddress(ctx.params.Callee, nonce) + + err := engine.EnsurePermission(ctx.state.CallFrame, ctx.params.Callee, permission.CreateContract) + if err != nil { + return Error + } + + err = ctx.state.CallFrame.CreateAccount(ctx.params.Caller, newAccountAddress) + if err != nil { + return Error + } + + res, err := ctx.vm.Contract(vm.Memory[dataPtr:dataPtr+dataLen]).Call(ctx.state, engine.CallParams{ + Caller: ctx.params.Caller, + Callee: newAccountAddress, + Input: nil, + Value: *value, + Gas: ctx.params.Gas, + }) + + if err != nil { + if errors.GetCode(err) == errors.Codes.ExecutionReverted { + return Revert + } + panic(err) + } + err = engine.InitWASMCode(ctx.state, newAccountAddress, res) + if err != nil { + if errors.GetCode(err) == errors.Codes.ExecutionReverted { + return Revert + } + panic(err) + } + + copy(vm.Memory[resultPtr:], newAccountAddress.Bytes()) + + return Success + } + + case "getBlockDifficulty": + return func(vm *lifeExec.VirtualMachine) int64 { + resultPtr := int(vm.GetCurrentFrame().Locals[0]) + + // set it to 1 + copy(vm.Memory[resultPtr:resultPtr+32], bin.RightPadBytes([]byte{1}, 32)) + return Success + } + + case "getTxGasPrice": + return func(vm *lifeExec.VirtualMachine) int64 { + resultPtr := int(vm.GetCurrentFrame().Locals[0]) + + // set it to 1 + copy(vm.Memory[resultPtr:resultPtr+16], bin.RightPadBytes([]byte{1}, 16)) + return Success + } + + case "selfDestruct": + return func(vm *lifeExec.VirtualMachine) int64 { + receiverPtr := int(vm.GetCurrentFrame().Locals[0]) + + var receiver crypto.Address + copy(receiver[:], vm.Memory[receiverPtr:receiverPtr+crypto.AddressLength]) + + receiverAcc, err := ctx.state.GetAccount(receiver) + if err != nil { + panic(err) + } + if receiverAcc == nil { + err := ctx.state.CallFrame.CreateAccount(ctx.params.Callee, receiver) + if err != nil { + panic(err) + } + } + acc, err := ctx.state.GetAccount(ctx.params.Callee) + if err != nil { + panic(err) + } + balance := acc.Balance + err = acc.AddToBalance(balance) + if err != nil { + panic(err) + } + + err = ctx.state.CallFrame.UpdateAccount(acc) + if err != nil { + panic(err) + } + err = ctx.state.CallFrame.RemoveAccount(ctx.params.Callee) + if err != nil { + panic(err) + } + panic(errors.Codes.None) + } + case "call", "callCode", "callDelegate", "callStatic": return func(vm *lifeExec.VirtualMachine) int64 { gasLimit := big.NewInt(vm.GetCurrentFrame().Locals[0]) addressPtr := uint32(vm.GetCurrentFrame().Locals[1]) - valuePtr := int(uint32(vm.GetCurrentFrame().Locals[2])) - dataPtr := uint32(vm.GetCurrentFrame().Locals[3]) - dataLen := uint32(vm.GetCurrentFrame().Locals[4]) + i := 2 + var valuePtr int + if field == "call" || field == "callCode" { + valuePtr = int(uint32(vm.GetCurrentFrame().Locals[i])) + i++ + } + dataPtr := uint32(vm.GetCurrentFrame().Locals[i]) + dataLen := uint32(vm.GetCurrentFrame().Locals[i+1]) // TODO: avoid panic? Or at least panic with coded out-of-bounds target := crypto.MustAddressFromBytes(vm.Memory[addressPtr : addressPtr+crypto.AddressLength]) diff --git a/execution/wasm/parent.sol b/execution/wasm/parent.sol new file mode 100644 index 000000000..a20d470ed --- /dev/null +++ b/execution/wasm/parent.sol @@ -0,0 +1,37 @@ +pragma solidity >0.6.3; + +import "./child.sol"; + +contract Parent { + + + address payable owner; + address[] public children; // public, list, get a child address at row # + + + constructor () public payable{ + owner = msg.sender; + } + + + function createChild() public { + Child child = new Child(); + children.push(address(child)); // you can use the getter to fetch child addresses + } + + function getChild(uint256 index) public returns (address) { + return children[index]; + } + + function close() public { + selfdestruct(owner); + } + + function txPrice() public returns (uint) { + return tx.gasprice; + } + + function blockDifficulty() public returns (uint256) { + return block.difficulty; + } +} diff --git a/execution/wasm/storage_test.solang.go b/execution/wasm/storage_test.solang.go index b4548ef47..663699ab6 100644 --- a/execution/wasm/storage_test.solang.go +++ b/execution/wasm/storage_test.solang.go @@ -4,3 +4,6 @@ import hex "github.com/tmthrgd/go-hex" var Bytecode_storage_test = hex.MustDecodeString("0061736D01000000011C0660027F7F0060017F006000017F60037F7F7F0060017F017F6000000280010608657468657265756D0C73746F7261676553746F7265000008657468657265756D0C67657443616C6C56616C7565000108657468657265756D0B676574436F646553697A65000208657468657265756D08636F6465436F7079000308657468657265756D0666696E697368000008657468657265756D06726576657274000003060500040502050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E000A0AAB0305240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B4E01017F230041C0006B22002400200041386A4200370300200042003703302000420037032820004200370320200041041006200042E600370300200041206A20001000200041C0006A240041000B5E01027F230041106B220024002000100102402000290300200041086A290300844200520D0010084100100241C0736A22003602B00741002000100722013602B407200141C00C2000100310091A410041AE071004000B410041001005000B0BB507010041000BAE070061736D01000000011C0660017F006000017F60037F7F7F0060027F7F0060017F017F600000029F010708657468657265756D0C67657443616C6C56616C7565000008657468657265756D0F67657443616C6C4461746153697A65000108657468657265756D0C63616C6C44617461436F7079000208657468657265756D0B73746F726167654C6F6164000308657468657265756D06726576657274000308657468657265756D0C73746F7261676553746F7265000308657468657265756D0666696E697368000303060503020405050405017001010105030100020608017F01418080040B071102066D656D6F72790200046D61696E000B0AB20505240002402001450D00034020004200370300200041086A21002001417F6A22010D000B0B0B2D002001411F6A21010340200120002D00003A00002001417F6A2101200041016A21002002417F6A22020D000B0BA60101047F418080042101024003400240200128020C0D002001280208220220004F0D020B200128020022010D000B41002101410028020821020B02402002200041076A41787122036B22024118490D00200120036A41106A22002001280200220436020002402004450D00200420003602040B2000200241706A3602082000410036020C2000200136020420012000360200200120033602080B2001410136020C200141106A0B2E004100410036028080044100410036028480044100410036028C800441003F0041107441F0FF7B6A36028880040B850302037F017E230041A0016B22002400200041086A100002400240024002402000290308200041106A290300844200520D00100A41001001220136020441002001100922023602082002410020011002200141034D0D014100200228020022013602000240200141DE9AB88F79460D00200141A298B6BE01470D0220004198016A420037030020004200370390012000420037038801200042003703800120004180016A200041E0006A10032000200029036042027C3703184100450D03410041001004000B20004180016A41186A420037030020004200370390012000420037038801200042003703800120004180016A200041E0006A1003200041C0006A41186A420037030020004200370350200042003703482000420037034020002903602103200041206A410410072000200342017C370320200041C0006A200041206A10054100450D03410041001004000B410041001004000B410041001004000B41201009220141041007200041186A200141081008200141201006000B410041001006000B") var Abi_storage_test = []byte(`[{"type":"constructor","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"getFooPlus2","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"name":"incFoo","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"}]`) + +var CREATETest = hex.MustDecodeString("0061736d01000000011c0660017f0060027f7f006000017f60037f7f7f0060017f017f600000026b0508657468657265756d0967657443616c6c6572000008657468657265756d0c73746f7261676553746f7265000108657468657265756d0b676574436f646553697a65000208657468657265756d08636f6465436f7079000308657468657265756d0666696e697368000103060501040502050405017001010105030100020608017f01418080040b071102066d656d6f72790200046d61696e00090abd0305240002402001450d00034020004200370300200041086a21002001417f6a22010d000b0b0ba60101047f418080042101024003400240200128020c0d002001280208220220004f0d020b200128020022010d000b41002101410028020821020b02402002200041076a41787122036b22024118490d00200120036a41106a22002001280200220436020002402004450d00200420003602040b2000200241706a3602082000410036020c2000200136020420012000360200200120033602080b2001410136020c200141106a0b2e004100410036028080044100410036028480044100410036028c800441003f0041107441f0ff7b6a36028880040b890102017f037e230041e0006b22002400200041c8006a1000200041c0006a4200370300200042003703382000420037033020004200370328200041d8006a3502002101200041d0006a290300210220002903482103200041086a410410052000200237031020002003370308200020013e0218200041286a200041086a1001200041e0006a240041000b3401027f10074100100241b35e6a22003602c01c41002000100622013602c41c200141cd212000100310081a410041bf1c1004000b0bc61c010041000bbf1c0061736d01000000012d0860047f7f7f7f017f60027f7f0060017f006000017f60037f7f7f0060017f017f60000060057e7e7e7e7f017f0280020b08657468657265756d06637265617465000008657468657265756d0b73746f726167654c6f6164000108657468657265756d0c73746f7261676553746f7265000108657468657265756d06726576657274000108657468657265756d0c67657443616c6c56616c7565000208657468657265756d0f67657443616c6c4461746153697a65000308657468657265756d0c63616c6c44617461436f7079000408657468657265756d12676574426c6f636b446966666963756c7479000208657468657265756d0d67657454784761735072696365000208657468657265756d0c73656c664465737472756374000208657468657265756d0666696e6973680001030b0a040104040405060307060405017001010105030100020608017f01418080040b071102066d656d6f72790200046d61696e00140ae70f0a2e0002402002450d000340200020012d00003a0000200041016a2100200141016a21012002417f6a22020d000b0b0b240002402001450d00034020004200370300200041086a21002001417f6a22010d000b0b0b2d002000411f6a21000340200120002d00003a0000200141016a21012000417f6a21002002417f6a22020d000b0b29002000417f6a210003402001200020026a2d00003a0000200141016a21012002417f6a22020d000b0b2d002001411f6a21010340200120002d00003a00002001417f6a2101200041016a21002002417f6a22020d000b0ba60101047f418080042101024003400240200128020c0d002001280208220220004f0d020b200128020022010d000b41002101410028020821020b02402002200041076a41787122036b22024118490d00200120036a41106a22002001280200220436020002402004450d00200420003602040b2000200241706a3602082000410036020c2000200136020420012000360200200120033602080b2001410136020c200141106a0b2e004100410036028080044100410036028480044100410036028c800441003f0041107441f0ff7b6a36028880040bcf0405037f037e017f067e017f230041c0006b2200240041db0910102201410041db09100b200141db096a419b01100c20002202420037032020024200370318200241186a200141db092002100021012002200241286a4114100e024020010d00200241286a41106a3502002103200241286a41086a290300210420022903282105200041606a220022012400200041186a4200370300200042003703102000420037030820004201370300200141606a22012206240020002001100120012903002107200141086a2903002108200141186a2903002109200141106a290300210a200641606a22012200240020012008200742c88eb0f4dffad89c6a7c220b2007542206ad7c42d4acba91b798dfbfd8007c220c3703082001200b3703002001200a428f89e3afcef7859c277c220b2006200c200854200c2008511bad7c220c370310200141186a2009200b200a54ad7c200c200b54ad7c42baebad86e1d48ecba57f7c370300200041606a2200220624002000200437030820002005370300200020033e0210200641606a2206220d240020064104100c2006200029030837030820062000290300370300200620003502103e0210200120061002200d41606a220022012400200041186a4200370300200042003703102000420037030820004201370300200141606a22012400200141186a2009200a200742017c220c200754220620082006ad7c220b200854200c20075a1bad7c2207200a54ad7c370300200120073703102001200b3703082001200c370300200020011002200241c0006a240041000f0b410041001003000bd60203027f027e027f230041c0006b220524002005220641206a41186a4200370300200642003703302006420037032820064201370320200641206a20061001024020002006290300542001200641086a29030022075420012007511b2002200641106a2903002208542003200641186a29030022075420032007511b2002200885200320078584501b0d00410041001003000b200541606a2205220924002005200042c88eb0f4dffad89c6a7c2207370300200520012007200054220aad7c42d4acba91b798dfbfd8007c220037030820052002428f89e3afcef7859c277c2207200a200020015420002001511bad7c2201370310200541186a20032007200254ad7c2001200754ad7c42baebad86e1d48ecba57f7c370300200941606a220924002005200910012004200941086a290300370308200420092903003703002004200941106a3502003e0210200641c0006a240041000b8a0502047f027e230041e0016b220024002000100402400240024002400240024002402000290300200041086a290300844200520d0010114100100522013602e00941002001101022023602e4092002410020011006200141034d0d064100200228020022033602dc09024002400240200341c993a89704460d000240200341a2c9ea8d034a0d00200341c3ae9bb17d460d03200341d688adbb01460d020c0a0b0240200341a3c9ea8d03460d00200341d8dfd3d007470d0a200041c0016a1007200041106a41186a200041c0016a41186a2903003703002000200041d0016a2903003703202000200041c8016a290300370318200020002903c0013703104100450d05410041001003000b1012450d05410041001003000b2001417c6a4120490d05200241046a200041306a4120100d2000290330200041386a290300200041c0006a290300200041c8006a290300200041d0006a1013450d06410041001003000b200041c0016a100820004180016a200041c8016a2903002204423f87220537030020002004370370200020002903c001370368200020053703784100450d06410041001003000b200041d8016a4200370300200042003703d001200042003703c801200042003703c001200041c0016a200041a0016a10012000200041a8016a29030037039001200020002903a001370388012000200041b0016a3502003e02980120004188016a1009000b410041001003000b4120101022014104100c200041106a20014120100f20014120100a000b41004100100a000b200041e0016a240041020f0b4120101022014104100c200041d0006a20014114100f20014120100a000b4120101022014104100c200041e8006a20014120100f20014120100a000b410041001003000b0be209010041000bdb090061736d01000000011c0660017f0060027f7f006000017f60037f7f7f0060017f017f6000000295010708657468657265756d0967657443616c6c6572000008657468657265756d0c73746f7261676553746f7265000108657468657265756d0c67657443616c6c56616c7565000008657468657265756d0b676574436f646553697a65000208657468657265756d08636f6465436f7079000308657468657265756d0666696e697368000108657468657265756d06726576657274000103060501040502050405017001010105030100020608017f01418080040b071102066d656d6f72790200046d61696e000b0ae70305240002402001450d00034020004200370300200041086a21002001417f6a22010d000b0b0ba60101047f418080042101024003400240200128020c0d002001280208220220004f0d020b200128020022010d000b41002101410028020821020b02402002200041076a41787122036b22024118490d00200120036a41106a22002001280200220436020002402004450d00200420003602040b2000200241706a3602082000410036020c2000200136020420012000360200200120033602080b2001410136020c200141106a0b2e004100410036028080044100410036028480044100410036028c800441003f0041107441f0ff7b6a36028880040b890102017f037e230041e0006b22002400200041c8006a1000200041c0006a4200370300200042003703382000420037033020004200370328200041d8006a3502002101200041d0006a290300210220002903482103200041086a410410072000200237031020002003370308200020013e0218200041286a200041086a1001200041e0006a240041000b5e01027f230041106b220024002000100202402000290300200041086a290300844200520d0010094100100341a5766a22003602f80341002000100822013602fc03200141db0920001004100a1a410041f8031005000b410041001006000b0bff03010041000bf8030061736d01000000011c0660017f006000017f60037f7f7f0060027f7f0060017f017f600000025e0408657468657265756d0c67657443616c6c56616c7565000008657468657265756d0f67657443616c6c4461746153697a65000108657468657265756d0c63616c6c44617461436f7079000208657468657265756d0672657665727400030304030405050405017001010105030100020608017f01418080040b071102066d656d6f72790200046d61696e00060ac00203a60101047f418080042101024003400240200128020c0d002001280208220220004f0d020b200128020022010d000b41002101410028020821020b02402002200041076a41787122036b22024118490d00200120036a41106a22002001280200220436020002402004450d00200420003602040b2000200241706a3602082000410036020c2000200136020420012000360200200120033602080b2001410136020c200141106a0b2e004100410036028080044100410036028480044100410036028c800441003f0041107441f0ff7b6a36028880040b6701027f230041106b220024002000100002402000290300200041086a290300844200520d001005410010012200360204410020001004220136020820014100200010020240200041034d0d00410020012802003602000b410041001003000b410041001003000b") +var Abi_CREATETest = []byte(`[{"type":"constructor","inputs":[],"outputs":[],"stateMutability":"payable"},{"name":"createChild","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"getChild","type":"function","inputs":[{"name":"index","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"name":"close","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"txPrice","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"blockDifficulty","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"}]`) diff --git a/execution/wasm/wasm_test.go b/execution/wasm/wasm_test.go index e9f59494a..70396edab 100644 --- a/execution/wasm/wasm_test.go +++ b/execution/wasm/wasm_test.go @@ -1,10 +1,13 @@ package wasm import ( + "encoding/hex" "fmt" "math/big" "testing" + "github.com/hyperledger/burrow/execution/native" + "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/acm/acmstate" @@ -81,6 +84,135 @@ func TestStaticCallWithValue(t *testing.T) { require.Equal(t, expected, returnValue) } +func TestCREATE(t *testing.T) { + cache := acmstate.NewMemoryState() + + params := engine.CallParams{ + Origin: crypto.ZeroAddress, + Caller: crypto.ZeroAddress, + Callee: crypto.ZeroAddress, + Input: []byte{}, + Value: *big.NewInt(0), + Gas: big.NewInt(1000), + } + + vm := New(engine.Options{Natives: native.MustDefaultNatives()}) + blockchain := new(engine.TestBlockchain) + eventSink := exec.NewNoopEventSink() + + // run constructor + runtime, cerr := vm.Execute(cache, blockchain, eventSink, params, CREATETest) + require.NoError(t, cerr) + + // run createChild + spec, err := abi.ReadSpec(Abi_CREATETest) + require.NoError(t, err) + calldata, _, err := spec.Pack("createChild") + + params.Input = calldata + + _, rerr := vm.Execute(cache, blockchain, eventSink, params, runtime) + vm.options.Nonce = []byte{0xff} + _, rerr = vm.Execute(cache, blockchain, eventSink, params, runtime) + require.NoError(t, rerr) + + // get created child + calldata, _, err = spec.Pack("getChild", "0") + require.NoError(t, err) + + params.Input = calldata + + res, rerr := vm.Execute(cache, blockchain, eventSink, params, runtime) + require.NoError(t, rerr) + require.Equal(t, "000000000000000000000000ef2fb521372225b89169ba60500142f68ebd82d3", hex.EncodeToString(res)) + + calldata, _, err = spec.Pack("getChild", "1") + require.NoError(t, err) + + params.Input = calldata + + res, rerr = vm.Execute(cache, blockchain, eventSink, params, runtime) + require.NoError(t, rerr) + require.Equal(t, "00000000000000000000000089686394a7cf94be0aa48ae593fe3cad5cbdbace", hex.EncodeToString(res)) +} + +func TestSelfDestruct(t *testing.T) { + cache := acmstate.NewMemoryState() + + params := engine.CallParams{ + Origin: crypto.ZeroAddress, + Caller: crypto.ZeroAddress, + Callee: crypto.ZeroAddress, + Input: []byte{}, + Value: *big.NewInt(0), + Gas: big.NewInt(1000), + } + + vm := New(engine.Options{Natives: native.MustDefaultNatives()}) + blockchain := new(engine.TestBlockchain) + eventSink := exec.NewNoopEventSink() + + // run constructor + runtime, cerr := vm.Execute(cache, blockchain, eventSink, params, CREATETest) + require.NoError(t, cerr) + require.Equal(t, 1, len(cache.Accounts)) + + // run selfdestruct + spec, err := abi.ReadSpec(Abi_CREATETest) + require.NoError(t, err) + calldata, _, err := spec.Pack("close") + + params.Input = calldata + + _, rerr := vm.Execute(cache, blockchain, eventSink, params, runtime) + require.NoError(t, rerr) + + require.Equal(t, 0, len(cache.Accounts)) +} + +func TestMisc(t *testing.T) { + cache := acmstate.NewMemoryState() + + params := engine.CallParams{ + Origin: crypto.ZeroAddress, + Caller: crypto.ZeroAddress, + Callee: crypto.ZeroAddress, + Input: []byte{}, + Value: *big.NewInt(0), + Gas: big.NewInt(1000), + } + + vm := New(engine.Options{Natives: native.MustDefaultNatives()}) + blockchain := new(engine.TestBlockchain) + eventSink := exec.NewNoopEventSink() + + // run constructor + runtime, cerr := vm.Execute(cache, blockchain, eventSink, params, CREATETest) + require.NoError(t, cerr) + + // run txGasPrice + spec, err := abi.ReadSpec(Abi_CREATETest) + require.NoError(t, err) + calldata, _, err := spec.Pack("txPrice") + + params.Input = calldata + + res, rerr := vm.Execute(cache, blockchain, eventSink, params, runtime) + require.NoError(t, rerr) + require.Equal(t, "0000000000000000000000000000000000000000000000000000000000000001", hex.EncodeToString(res)) + + // run blockDifficulty + spec, err = abi.ReadSpec(Abi_CREATETest) + require.NoError(t, err) + calldata, _, err = spec.Pack("blockDifficulty") + + params.Input = calldata + + res, rerr = vm.Execute(cache, blockchain, eventSink, params, runtime) + require.NoError(t, rerr) + require.Equal(t, "0000000000000000000000000000000000000000000000000000000000000001", hex.EncodeToString(res)) +} + func blockHashGetter(height uint64) []byte { return binary.LeftPadWord256([]byte(fmt.Sprintf("block_hash_%d", height))).Bytes() } From adea0415bd48da76b85879c126d069d3b7bb2554 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Sat, 6 Feb 2021 01:13:20 +0000 Subject: [PATCH 143/185] Fix constructor arguments to wasm contracts Signed-off-by: Sean Young --- execution/wasm/contract.go | 35 +++++++++++++++++++++++++++++++++-- go.mod | 1 + 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/execution/wasm/contract.go b/execution/wasm/contract.go index 8fb174c67..9ca73a8f0 100644 --- a/execution/wasm/contract.go +++ b/execution/wasm/contract.go @@ -1,10 +1,12 @@ package wasm import ( + "bytes" "encoding/binary" "fmt" "math/big" + "github.com/go-interpreter/wagon/wasm/leb128" lifeExec "github.com/perlin-network/life/exec" hex "github.com/tmthrgd/go-hex" @@ -43,10 +45,11 @@ func (c *Contract) execute(state engine.State, params engine.CallParams) ([]byte params: params, code: c.code, } + // panics in ResolveFunc() will be recovered for us, no need for our own - vm, err := lifeExec.NewVirtualMachine(c.code, c.vm.vmConfig, ctx, nil) + vm, err := lifeExec.NewVirtualMachine(c.code[0:int(wasmSize(c.code))], c.vm.vmConfig, ctx, nil) if err != nil { - return nil, errors.Errorf(errors.Codes.InvalidContract, "%s: %v", errHeader, err) + return nil, errors.Errorf(errors.Codes.InvalidContract, "%s: motherfucker %v", errHeader, err) } entryID, ok := vm.GetFunctionExport("main") @@ -658,3 +661,31 @@ func (ctx *context) ResolveFunc(module, field string) lifeExec.FunctionImport { panic(fmt.Sprintf("unknown function %s", field)) } } + +// When deploying wasm code, the abi encoded arguments to the constructor are added to the code. Wagon +// does not like seeing this data, so strip this off. We have to walk the wasm format to the last section + +// There might be a better solution to this. +func wasmSize(code []byte) int64 { + reader := bytes.NewReader(code) + top := int64(8) + for { + reader.Seek(top, 0) + id, err := reader.ReadByte() + if err != nil || id == 0 || id > 11 { + // invalid section id + break + } + size, err := leb128.ReadVarUint32(reader) + if err != nil { + break + } + pos, _ := reader.Seek(0, 1) + if pos+int64(size) > int64(len(code)) { + break + } + top = pos + int64(size) + } + + return top +} diff --git a/go.mod b/go.mod index 460e27daf..ee39f75a5 100644 --- a/go.mod +++ b/go.mod @@ -14,6 +14,7 @@ require ( github.com/elgs/gojq v0.0.0-20201120033525-b5293fef2759 github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8 // indirect github.com/fatih/color v1.10.0 + github.com/go-interpreter/wagon v0.6.0 github.com/go-kit/kit v0.10.0 github.com/go-ozzo/ozzo-validation v3.6.0+incompatible github.com/gogo/protobuf v1.3.2 From fb74f61bd8b8be7bd24362c46193606d766e4dfd Mon Sep 17 00:00:00 2001 From: Sean Young Date: Fri, 5 Feb 2021 23:36:57 +0000 Subject: [PATCH 144/185] Support deploying wasm via npm package Signed-off-by: Sean Young --- js/package.json | 2 +- js/src/lib/contracts/function.ts | 36 +++++++++++++++++++------------ js/src/test/flipper.abi | 1 + js/src/test/flipper.sol | 20 +++++++++++++++++ js/src/test/flipper.test.ts | 21 ++++++++++++++++++ js/src/test/flipper.wasm | Bin 0 -> 1589 bytes tests/test_runner.sh | 2 ++ 7 files changed, 67 insertions(+), 15 deletions(-) create mode 100644 js/src/test/flipper.abi create mode 100644 js/src/test/flipper.sol create mode 100644 js/src/test/flipper.test.ts create mode 100644 js/src/test/flipper.wasm diff --git a/js/package.json b/js/package.json index 4a9a1307c..9735fdfe1 100644 --- a/js/package.json +++ b/js/package.json @@ -53,7 +53,7 @@ }, { "name": "Sean Young", - "email": "sean.young@monax.io" + "email": "sean@mess.org" }, { "name": "Greg Hill", diff --git a/js/src/lib/contracts/function.ts b/js/src/lib/contracts/function.ts index cf9df415c..7e95a06da 100644 --- a/js/src/lib/contracts/function.ts +++ b/js/src/lib/contracts/function.ts @@ -1,17 +1,17 @@ -import {Metadata} from "@grpc/grpc-js"; -import {callErrorFromStatus} from "@grpc/grpc-js/build/src/call"; -import {Keccak} from "sha3"; +import { Metadata } from "@grpc/grpc-js"; +import { callErrorFromStatus } from "@grpc/grpc-js/build/src/call"; +import { Keccak } from "sha3"; import * as utils from '../utils/utils'; import * as coder from 'ethereumjs-abi'; import * as convert from '../utils/convert'; import * as grpc from '@grpc/grpc-js'; import sha3 from '../utils/sha3'; -import {TxInput, CallTx, ContractMeta} from '../../../proto/payload_pb'; -import {TxExecution, Result} from '../../../proto/exec_pb'; -import {Burrow, Error} from '../burrow'; -import {Envelope} from '../../../proto/txs_pb'; -import {Function, FunctionInput, FunctionOutput} from 'solc'; -import {ABI, Contract} from "./contract"; +import { TxInput, CallTx, ContractMeta } from '../../../proto/payload_pb'; +import { TxExecution, Result } from '../../../proto/exec_pb'; +import { Burrow, Error } from '../burrow'; +import { Envelope } from '../../../proto/txs_pb'; +import { Function, FunctionInput, FunctionOutput } from 'solc'; +import { ABI, Contract } from "./contract"; type FunctionIO = FunctionInput & FunctionOutput; @@ -52,12 +52,20 @@ function txPayload(data: string, account: string, address: string, contract?: Co if (address) payload.setAddress(Buffer.from(address, 'hex')); payload.setGaslimit(DEFAULT_GAS); payload.setFee(0); - payload.setData(Buffer.from(data, 'hex')); + const code = Buffer.from(data, 'hex'); + // if we are deploying and it looks like wasm, it must be wasm. Note that + // evm opcode 0 is stop, so this would not make any sense. + const wasm_magic = Buffer.from('\0asm'); + if (!address && !Buffer.compare(code.slice(0, 4), wasm_magic)) { + payload.setWasm(code); + } else { + payload.setData(code); + } // If address is null then we are creating a new contract, if we have the deployedBytecode then send it with the ABI if (!address && contract.code.deployedBytecode) { const meta = new ContractMeta() // TODO: document/formalise the expected structure of the contract metadata - meta.setMeta(JSON.stringify({Abi: contract.abi})) + meta.setMeta(JSON.stringify({ Abi: contract.abi })) const codeHash = (new Keccak(256)).update(contract.code.deployedBytecode, "hex").digest() meta.setCodehash(codeHash) payload.setContractmetaList([meta]) @@ -91,7 +99,7 @@ const decodeF = function (abi: Function, output: Uint8Array): DecodedResult { // Decode raw bytes to arguments let raw = convert.abiToBurrow(outputTypes, coder.rawDecode(outputTypes, Buffer.from(output))); - let result: DecodedResult = {raw: raw.slice()} + let result: DecodedResult = { raw: raw.slice() } result.values = outputs.reduce(function (acc, current) { let value = raw.shift(); @@ -187,7 +195,7 @@ export const SolidityFunction = function (abi: Function, burrow: Burrow) { // Unpack return arguments if (!isConstructor) { try { - let {raw, values} = decodeF(abi, result.getResult().getReturn_asU8()); + let { raw, values } = decodeF(abi, result.getResult().getReturn_asU8()); returnObj.raw = raw; returnObj.values = values; } catch (e) { @@ -217,5 +225,5 @@ export const SolidityFunction = function (abi: Function, burrow: Burrow) { return handler(result); } - return {displayName, typeName, call, encode, decode} + return { displayName, typeName, call, encode, decode } } diff --git a/js/src/test/flipper.abi b/js/src/test/flipper.abi new file mode 100644 index 000000000..0f77bd51a --- /dev/null +++ b/js/src/test/flipper.abi @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"initvalue","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"flip","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"get","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"}] \ No newline at end of file diff --git a/js/src/test/flipper.sol b/js/src/test/flipper.sol new file mode 100644 index 000000000..4a3336e87 --- /dev/null +++ b/js/src/test/flipper.sol @@ -0,0 +1,20 @@ +contract flipper { + bool private value; + + /// Constructor that initializes the `bool` value to the given `init_value`. + constructor(bool initvalue) { + value = initvalue; + } + + /// A message that can be called on instantiated contracts. + /// This one flips the value of the stored `bool` from `true` + /// to `false` and vice versa. + function flip() public { + value = !value; + } + + /// Simply returns the current value of our `bool`. + function get() public view returns (bool) { + return value; + } +} diff --git a/js/src/test/flipper.test.ts b/js/src/test/flipper.test.ts new file mode 100644 index 000000000..cefd87bef --- /dev/null +++ b/js/src/test/flipper.test.ts @@ -0,0 +1,21 @@ +import * as assert from "assert"; +import { burrow } from "../test"; +import fs from 'fs'; + +describe('Wasm flipper:', function () { + let TestContract + + before(async () => { + const abi: any[] = JSON.parse(fs.readFileSync('src/test/flipper.abi', 'utf-8')) + const wasm: string = fs.readFileSync('src/test/flipper.wasm').toString('hex') + TestContract = await burrow.contracts.deploy(abi, wasm, null, true) + }) + + it('Flip', async () => { + let output = await TestContract.get() + assert.strictEqual(output[0], true) + await TestContract.flip() + output = await TestContract.get() + assert.strictEqual(output[0], false) + }) +}) diff --git a/js/src/test/flipper.wasm b/js/src/test/flipper.wasm new file mode 100644 index 0000000000000000000000000000000000000000..029e7f31a47458c37f87ad707dde0ce832ad1c77 GIT binary patch literal 1589 zcmd^<%T5$Q6o${K>ggWn=~(WFF`=eqfeVZ)G;X9oyhM#e64y+i1saBdnZXFg^n{Rz zi3^vw(v@%ETDC@wui(y=iEp6)>25BgE7oQ*bE;0&`Rg*@U)1O{nTYtjKc}*c<``e% zY))rI4^1M~W51eomy&j}*{pTCt#)HEnMFv5j`NF2cdD_v`lzwGnGhf4L&>)mlG)|$ zgw#>GI*;5`YkiCKQO<8CPm*@`gsA^`d2P9~M5O%+c@_EaIx|-^lk%&avFr7`FgUCH zX3}i6w-kBJ#_}2s4t~*<5mFPDrz6r6mL} z;b9-vvox-}(2`YdJsnq7lp|9^f-!(n^l}A^VO5804Z)=0CCrq$*lE$&J#4&^#&vS0 z>wf)y2Gu=W$qaLLf!qPD#5@8;cQq|;fF)eEc^EB%#jt05S>5r*HInHzwQQtuK=RK6h}z<7zi>5HUflu&n^6{($2c4c+0p zk*sG#U7ZQ#Ova-SQ-)HALCXxBLv|-H75q;x1D0Lv1atz~ep*X_3uNDNaKu%u56xp_ z&y@Kajcy~y^O)M&JW!T=j_5JAVM+hJR%77=x&5a2m*^9jl4z|fp7tuI0QyD6`=5c{ z(*=O!*+3wr@pZ@gAqZvV1}$yau}x_sZBqlv()wPALEv>-|+TQ8{o1|?m%1A=VJ!jpN@2H5I6z3eLme*@|AMk;XbKD$-d}Q=qxTvo`gVriZhMT KaQP}24F3VE%^u?b literal 0 HcmV?d00001 diff --git a/tests/test_runner.sh b/tests/test_runner.sh index ee426e877..d92c30521 100755 --- a/tests/test_runner.sh +++ b/tests/test_runner.sh @@ -19,6 +19,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export burrow_bin=${burrow_bin:-burrow} export solc_bin=${solc_bin:-solc} +export solang_bin=${solang_bin:-solang} # If false we will not try to start Burrow and expect them to be running export boot=${boot:-true} @@ -67,6 +68,7 @@ test_setup(){ echo echo "Using binaries:" echo " $(type ${solc_bin}) (version: $(${solc_bin} --version))" + echo " $(type ${solang_bin}) (version: $(${solang_bin} --version))" echo " $(type ${burrow_bin}) (version: $(${burrow_bin} --version))" echo # start test chain From 4c731229b56fde8003f3551e2cc776fe8e638afd Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Thu, 18 Feb 2021 17:05:40 +0000 Subject: [PATCH 145/185] update maintainer email Signed-off-by: Gregory Hill --- MAINTAINERS.md | 2 +- helm/burrow/Chart.yaml | 2 +- js/package.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MAINTAINERS.md b/MAINTAINERS.md index c44282f21..7b2d7bdce 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -5,7 +5,7 @@ Maintainers | Name | GitHub | email |------|--------|------------------- -| Greg Hill | gregdhill | +| Greg Hill | gregdhill | | Sean Young | seanyoung | | Casey Kuhlman | compleatang | | Silas Davis | silasdavis | diff --git a/helm/burrow/Chart.yaml b/helm/burrow/Chart.yaml index 8d7c9ca73..4b970d4a9 100644 --- a/helm/burrow/Chart.yaml +++ b/helm/burrow/Chart.yaml @@ -13,7 +13,7 @@ keywords: maintainers: - email: casey@monax.io name: compleatang -- email: greg.hill@monax.io +- email: gregorydhill@outlook.com name: gregdhill name: burrow sources: diff --git a/js/package.json b/js/package.json index 9735fdfe1..d3dd073d3 100644 --- a/js/package.json +++ b/js/package.json @@ -57,11 +57,11 @@ }, { "name": "Greg Hill", - "email": "greg.hill@monax.io" + "email": "gregorydhill@outlook.com" } ], "repository": { "type": "git", "url": "git+https://github.com/hyperledger/burrow.git" } -} +} \ No newline at end of file From 0b66ef981c8a1299d57d444139690c16c1666d34 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Tue, 9 Mar 2021 16:57:52 +0000 Subject: [PATCH 146/185] Solidity 0.8 fails to compile with "no binary code found in contract" evm.bytecode.object should be requested, else we might not receive it. Signed-off-by: Sean Young --- deploy/compile/compilers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/compile/compilers.go b/deploy/compile/compilers.go index 9409749ed..d25e6ba0b 100644 --- a/deploy/compile/compilers.go +++ b/deploy/compile/compilers.go @@ -237,7 +237,7 @@ func EVM(file string, optimize bool, workDir string, libraries map[string]string input.Sources[file] = SolidityInputSource{Urls: []string{file}} input.Settings.Optimizer.Enabled = optimize - input.Settings.OutputSelection.File.OutputType = []string{"abi", "evm.deployedBytecode.object", "evm.bytecode.linkReferences", "metadata", "bin", "devdoc"} + input.Settings.OutputSelection.File.OutputType = []string{"abi", "evm.bytecode.object", "evm.deployedBytecode.object", "evm.bytecode.linkReferences", "metadata", "bin", "devdoc"} input.Settings.Libraries = make(map[string]map[string]string) input.Settings.Libraries[""] = make(map[string]string) From 8643a2660bc783dcd7b120ab6bfce1336c325fb7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Mar 2021 18:46:58 +0000 Subject: [PATCH 147/185] Bump elliptic from 6.5.3 to 6.5.4 in /docs/example/basic-app Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] --- docs/example/basic-app/package-lock.json | 30 +++++++++++++++++------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/docs/example/basic-app/package-lock.json b/docs/example/basic-app/package-lock.json index 8b8e56f70..c707e3195 100644 --- a/docs/example/basic-app/package-lock.json +++ b/docs/example/basic-app/package-lock.json @@ -347,17 +347,29 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", + "bn.js": "^4.11.9", + "brorand": "^1.1.0", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + } } }, "encodeurl": { From 0042941ab5efd241256ae036d188a87c8c41edc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Mar 2021 19:06:04 +0000 Subject: [PATCH 148/185] Bump elliptic from 6.5.3 to 6.5.4 in /docs/example/basic-app-website Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] --- .../basic-app-website/package-lock.json | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/docs/example/basic-app-website/package-lock.json b/docs/example/basic-app-website/package-lock.json index 0e50b768a..273ad76ee 100644 --- a/docs/example/basic-app-website/package-lock.json +++ b/docs/example/basic-app-website/package-lock.json @@ -352,17 +352,29 @@ "integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q==" }, "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", + "bn.js": "^4.11.9", + "brorand": "^1.1.0", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + } } }, "encodeurl": { From 5d6230d3fdd83573af4401f2184ec64dadaae4e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Mar 2021 19:44:38 +0000 Subject: [PATCH 149/185] Bump elliptic from 6.5.3 to 6.5.4 in /js Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] --- js/yarn.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/js/yarn.lock b/js/yarn.lock index 1cd8a0d36..ed506e073 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -454,10 +454,10 @@ bip66@^1.1.5: dependencies: safe-buffer "^5.0.1" -bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.8, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== +bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.8, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== bn.js@^5.1.3: version "5.1.3" @@ -495,7 +495,7 @@ braces@~3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.0.1: +brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= @@ -865,17 +865,17 @@ ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: safe-buffer "^5.0.1" elliptic@^6.5.2: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" + bn.js "^4.11.9" + brorand "^1.1.0" hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" emoji-regex@^7.0.1: version "7.0.3" @@ -1401,7 +1401,7 @@ highlight.js@^9.12.0: resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.5.tgz#d18a359867f378c138d6819edfc2a8acd5f29825" integrity sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA== -hmac-drbg@^1.0.0: +hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= @@ -1891,7 +1891,7 @@ minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: +minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= From 93b81bdb1a908de161985f1364827e6f1f238921 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 3 Mar 2021 20:03:10 +0100 Subject: [PATCH 150/185] Support Vent consuming events from Ethereum web3 JSONRPC Provided an interface for Vent chain connection o abstract over Burrow and web3-supporting Ethereum chains and implemented for Burrow and web3 Also fix: - Non-minimal size encoding in RLP (leading zeros) - Eth-compliant hex strings - EthRawTx hash and payload where incorrect (ChainID not in payload only in digest) - ChainID handling for mainline Ethereum Added: - NotEqual and Not operators to query grammar Signed-off-by: Silas Davis --- .github/workflows/master.yaml | 1 + .github/workflows/test.yaml | 3 +- .gitignore | 2 + Makefile | 38 +- acm/balance/balance.go | 6 +- cmd/burrow/commands/vent.go | 26 +- core/kernel.go | 3 +- core/processes.go | 2 +- crypto/crypto.go | 4 + crypto/signature.go | 7 +- deploy/compile/compilers_test.go | 4 +- encoding/hex/hex.go | 53 - encoding/hex/hex_test.go | 26 - encoding/rlp/rlp.go | 37 +- encoding/rlp/rlp_test.go | 51 +- event/query/builder.go | 47 +- event/query/builder_test.go | 7 +- event/query/empty.go | 2 +- event/query/expression.go | 39 +- event/query/query.go | 11 +- event/query/query.peg | 7 +- event/query/query.peg.go | 1973 ++-- event/query/query_test.go | 9 + execution/errors/maybe.go | 9 + execution/evm/abi/primitives.go | 38 +- execution/exec/event.go | 22 + execution/exec/events.go | 21 - execution/exec/log_event.go | 4 +- execution/exec/stream_event.go | 7 +- go.mod | 3 + go.sum | 6 + integration/rpcinfo/info_server_test.go | 13 +- integration/rpctest/helpers.go | 10 +- rpc/client.go | 5 + rpc/lib/client/http_client.go | 195 - rpc/lib/client/ws_client.go | 483 - rpc/lib/jsonrpc/client.go | 138 + rpc/lib/rpc_test.go | 207 +- rpc/lib/server/handlers.go | 389 - rpc/lib/server/handlers_test.go | 2 +- rpc/lib/types/error_codes.go | 17 +- rpc/lib/types/types.go | 101 +- rpc/lib/types/types_test.go | 16 +- rpc/rpcinfo/info_server.go | 2 - rpc/rpcinfo/infoclient/client.go | 56 +- rpc/rpcinfo/infoclient/client_test.go | 8 +- rpc/{eth.go => web3/eth_service.go} | 466 +- rpc/{eth_test.go => web3/eth_service_test.go} | 45 +- rpc/web3/ethclient/client.go | 181 + rpc/web3/ethclient/client_test.go | 104 + rpc/web3/ethclient/transact_client.go | 191 + rpc/web3/ethclient/transact_client_test.go | 35 + rpc/web3/ethclient/types.go | 109 + rpc/web3/hex.go | 113 + tests/web3/web3test/web3test.go | 50 + txs/ethereum_tx.go | 18 +- txs/tx.go | 8 +- vent/chain/burrow/burrow.go | 292 + vent/chain/chain.go | 63 + vent/chain/ethereum/consumer.go | 205 + vent/chain/ethereum/consumer_test.go | 115 + vent/chain/ethereum/ethereum.go | 247 + vent/config/config.go | 32 +- vent/service/abi_provider.go | 18 +- vent/service/block_consumer.go | 53 +- vent/service/block_consumer_test.go | 19 +- vent/service/consumer.go | 146 +- vent/service/consumer_ethereum_test.go | 20 + vent/service/consumer_integration_test.go | 18 +- vent/service/consumer_postgres_test.go | 6 +- vent/service/consumer_sqlite_test.go | 4 +- vent/service/decoder.go | 15 +- vent/service/rowbuilder.go | 78 +- vent/service/server.go | 6 +- vent/service/server_test.go | 2 +- vent/sqldb/adapters/postgres_adapter.go | 17 +- vent/sqldb/adapters/sqlite_adapter.go | 12 +- vent/sqldb/sqldb.go | 4 +- vent/sqldb/sqldb_integration_test.go | 10 +- vent/sqldb/sqldb_sqlite_test.go | 2 +- vent/test/EventsTest.sol.go | 6 +- vent/test/db.go | 8 +- vent/test/eth/.eslintrc.js | 19 + vent/test/eth/contracts/EventEmitter.sol | 28 + vent/test/eth/contracts/Migrations.sol | 19 + .../1614708961_deploy_event_emitter.js | 5 + .../eth/migrations/1_initial_migration.js | 5 + vent/test/eth/package.json | 21 + vent/test/eth/test/.gitkeep | 0 vent/test/eth/test/event-emitter.js | 11 + vent/test/eth/truffle-config.js | 106 + vent/test/eth/yarn.lock | 9852 +++++++++++++++++ vent/test/events.go | 30 +- vent/test/test.sh | 23 - 94 files changed, 14011 insertions(+), 2936 deletions(-) delete mode 100644 encoding/hex/hex.go delete mode 100644 encoding/hex/hex_test.go create mode 100644 rpc/client.go delete mode 100644 rpc/lib/client/http_client.go delete mode 100644 rpc/lib/client/ws_client.go create mode 100644 rpc/lib/jsonrpc/client.go rename rpc/{eth.go => web3/eth_service.go} (57%) rename rpc/{eth_test.go => web3/eth_service_test.go} (86%) create mode 100644 rpc/web3/ethclient/client.go create mode 100644 rpc/web3/ethclient/client_test.go create mode 100644 rpc/web3/ethclient/transact_client.go create mode 100644 rpc/web3/ethclient/transact_client_test.go create mode 100644 rpc/web3/ethclient/types.go create mode 100644 rpc/web3/hex.go create mode 100644 tests/web3/web3test/web3test.go create mode 100644 vent/chain/burrow/burrow.go create mode 100644 vent/chain/chain.go create mode 100644 vent/chain/ethereum/consumer.go create mode 100644 vent/chain/ethereum/consumer_test.go create mode 100644 vent/chain/ethereum/ethereum.go create mode 100644 vent/service/consumer_ethereum_test.go create mode 100644 vent/test/eth/.eslintrc.js create mode 100644 vent/test/eth/contracts/EventEmitter.sol create mode 100644 vent/test/eth/contracts/Migrations.sol create mode 100644 vent/test/eth/migrations/1614708961_deploy_event_emitter.js create mode 100644 vent/test/eth/migrations/1_initial_migration.js create mode 100644 vent/test/eth/package.json create mode 100644 vent/test/eth/test/.gitkeep create mode 100644 vent/test/eth/test/event-emitter.js create mode 100644 vent/test/eth/truffle-config.js create mode 100644 vent/test/eth/yarn.lock delete mode 100755 vent/test/test.sh diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index c156dfc5e..263716dd7 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -3,6 +3,7 @@ on: push: branches: - master + - release jobs: cover: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c92911b1d..9d5283f3a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -36,7 +36,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: make test_integration_vent_postgres + - run: make test_integration_ethereum + - run: make test_integration_vent_complete docker: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 2dfd393e0..7af90816d 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ node_modules js/dist helm/package +build/ +.pid diff --git a/Makefile b/Makefile index 21bfacd0a..ba5adfa84 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,7 @@ BIN_PATH?=$(GOPATH)/bin HELM_PATH?=helm/package HELM_PACKAGE=$(HELM_PATH)/burrow-$(VERSION).tgz ARCH?=linux-amd64 +PID_DIR=.pid export GO111MODULE=on @@ -226,9 +227,38 @@ test_integration_vent: # Include sqlite adapter with tests - will build with CGO but that's probably fine go test -count=1 -v -tags 'integration sqlite' ./vent/... -.PHONY: test_integration_vent_postgres -test_integration_vent_postgres: - docker-compose run burrow make test_integration_vent +.PHONY: test_integration_vent_complete +test_integration_vent_complete: + docker-compose run burrow make test_integration_vent test_integration_vent_ethereum + +.PHONY: test_integration_vent_ethereum +test_integration_vent_ethereum: start_ganache + go test -count=1 -v -tags 'integration !sqlite ethereum' ./vent/... + $(MAKE) stop_ganache + +.PHONY: test_integration_ethereum +test_integration_ethereum: start_ganache + go test -v -tags 'integration ethereum' ./rpc/... + $(MAKE) stop_ganache + +$(PID_DIR)/ganache.pid: + mkdir -p $(PID_DIR) + yarn --cwd vent/test/eth install + @echo "Starting ganache in background..." + { yarn --cwd vent/test/eth ganache & echo $$! > $@; } + @sleep 3 + @echo "Ganache process started (pid at $@)" + +.PHONY: start_ganache +start_ganache: $(PID_DIR)/ganache.pid + +.PHONY: stop_ganache +stop_ganache: $(PID_DIR)/ganache.pid + @kill $(shell cat $<) && echo "Ganache process stopped." && rm $< || rm $< + +.PHONY: postgres +postgres: + docker-compose up .PHONY: test_restore test_restore: @@ -241,7 +271,7 @@ test_integration: @go test -count=1 -v -tags integration ./integration/... .PHONY: test_integration_all -test_integration_all: test_keys test_deploy test_integration_vent_postgres test_restore test_truffle test_integration +test_integration_all: test_keys test_deploy test_integration_vent_complete test_restore test_truffle test_integration .PHONY: test_integration_all_no_postgres test_integration_all_no_postgres: test_keys test_deploy test_integration_vent test_restore test_truffle test_integration diff --git a/acm/balance/balance.go b/acm/balance/balance.go index 4a5c70b28..f7ad844e1 100644 --- a/acm/balance/balance.go +++ b/acm/balance/balance.go @@ -7,7 +7,7 @@ import ( ) var ( - eth = new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil) + ethInWei = new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil) ) type Balances []Balance @@ -134,9 +134,9 @@ func (bs Balances) HasPower() bool { func NativeToWei(n uint64) *big.Int { // 1 native unit to 1 ether (wei) x := new(big.Int).SetUint64(n) - return new(big.Int).Mul(x, eth) + return new(big.Int).Mul(x, ethInWei) } func WeiToNative(x *big.Int) *big.Int { - return new(big.Int).Div(x, eth) + return new(big.Int).Div(x, ethInWei) } diff --git a/cmd/burrow/commands/vent.go b/cmd/burrow/commands/vent.go index 9e1ca819b..5d91e803a 100644 --- a/cmd/burrow/commands/vent.go +++ b/cmd/burrow/commands/vent.go @@ -10,6 +10,7 @@ import ( "time" "github.com/hyperledger/burrow/config/source" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/logging/logconfig" "github.com/hyperledger/burrow/vent/config" @@ -29,9 +30,11 @@ func Vent(output Output) func(cmd *cli.Cmd) { cfg := config.DefaultVentConfig() dbOpts := sqlDBOpts(cmd, cfg) - grpcAddrOpt := cmd.StringOpt("grpc-addr", cfg.GRPCAddr, "Address to connect to the Hyperledger Burrow gRPC server") - httpAddrOpt := cmd.StringOpt("http-addr", cfg.HTTPAddr, "Address to bind the HTTP server") + grpcAddrOpt := cmd.StringOpt("chain-addr", cfg.ChainAddress, "Address to connect to the Hyperledger Burrow gRPC server") + httpAddrOpt := cmd.StringOpt("http-addr", cfg.HTTPListenAddress, "Address to bind the HTTP server") logLevelOpt := cmd.StringOpt("log-level", cfg.LogLevel, "Logging level (error, warn, info, debug)") + watchAddressesOpt := cmd.StringsOpt("watch", nil, "Add contract address to global watch filter") + minimumHeightOpt := cmd.IntOpt("minimum-height", 0, "Add contract address to global watch filter") abiFileOpt := cmd.StringsOpt("abi", cfg.AbiFileOrDirs, "EVM Contract ABI file or folder") specFileOrDirOpt := cmd.StringsOpt("spec", cfg.SpecFileOrDirs, "SQLSol specification file or folder") dbBlockOpt := cmd.BoolOpt("blocks", false, "Create block tables and persist related data") @@ -44,9 +47,18 @@ func Vent(output Output) func(cmd *cli.Cmd) { cfg.DBAdapter = *dbOpts.adapter cfg.DBURL = *dbOpts.url cfg.DBSchema = *dbOpts.schema - cfg.GRPCAddr = *grpcAddrOpt - cfg.HTTPAddr = *httpAddrOpt + cfg.ChainAddress = *grpcAddrOpt + cfg.HTTPListenAddress = *httpAddrOpt cfg.LogLevel = *logLevelOpt + cfg.WatchAddresses = make([]crypto.Address, len(*watchAddressesOpt)) + cfg.MinimumHeight = uint64(*minimumHeightOpt) + var err error + for i, wa := range *watchAddressesOpt { + cfg.WatchAddresses[i], err = crypto.AddressFromHexString(wa) + if err != nil { + output.Fatalf("could not parse watch address: %w", err) + } + } cfg.AbiFileOrDirs = *abiFileOpt cfg.SpecFileOrDirs = *specFileOrDirOpt if *dbBlockOpt { @@ -65,8 +77,10 @@ func Vent(output Output) func(cmd *cli.Cmd) { } } - cmd.Spec = "--spec= [--abi=] [--db-adapter] [--db-url] [--db-schema] " + - "[--blocks] [--txs] [--grpc-addr] [--http-addr] [--log-level] [--announce-every=]" + cmd.Spec = "--spec=... [--abi=...] " + + "[--watch=...] [--minimum-height=] " + + "[--db-adapter] [--db-url] [--db-schema] [--blocks] [--txs] [--chain-addr] [--http-addr] " + + "[--log-level] [--announce-every=]" cmd.Action = func() { log, err := logconfig.New().NewLogger() diff --git a/core/kernel.go b/core/kernel.go index ebe2c0cc7..fd9414637 100644 --- a/core/kernel.go +++ b/core/kernel.go @@ -20,6 +20,7 @@ import ( "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/dump" + "github.com/hyperledger/burrow/rpc/web3" // GRPC Codec _ "github.com/hyperledger/burrow/encoding" @@ -52,7 +53,7 @@ type Kernel struct { // Expose these public-facing interfaces to allow programmatic extension of the Kernel by other projects Emitter *event.Emitter Service *rpc.Service - EthService *rpc.EthService + EthService *web3.EthService Launchers []process.Launcher State *state.State Blockchain *bcm.Blockchain diff --git a/core/processes.go b/core/processes.go index 76cc58362..c262efa72 100644 --- a/core/processes.go +++ b/core/processes.go @@ -143,7 +143,7 @@ func TendermintLauncher(kern *Kernel) process.Launcher { nodeRegState := kern.State validatorState := kern.State kern.Service = rpc.NewService(accountState, nameRegState, nodeRegState, kern.Blockchain, validatorState, nodeView, kern.Logger) - kern.EthService = rpc.NewEthService(accountState, eventsState, kern.Blockchain, validatorState, nodeView, kern.Transactor, kern.keyStore, kern.Logger) + kern.EthService = web3.NewEthService(accountState, eventsState, kern.Blockchain, validatorState, nodeView, kern.Transactor, kern.keyStore, kern.Logger) if err := kern.Node.Start(); err != nil { return nil, fmt.Errorf("%s error starting Tendermint node: %v", errHeader, err) diff --git a/crypto/crypto.go b/crypto/crypto.go index 080696f46..b236849fd 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -74,3 +74,7 @@ type Signer interface { type Signable interface { SignBytes(chainID string) ([]byte, error) } + +func (pk *PrivateKey) GetAddress() Address { + return pk.GetPublicKey().GetAddress() +} diff --git a/crypto/signature.go b/crypto/signature.go index 6bac7d074..afc85d27a 100644 --- a/crypto/signature.go +++ b/crypto/signature.go @@ -118,7 +118,12 @@ func (sig *Signature) String() string { } func GetEthChainID(chainID string) *big.Int { - return new(big.Int).SetBytes(Keccak256([]byte(chainID))) + b := new(big.Int) + id, ok := b.SetString(chainID, 10) + if ok { + return id + } + return b.SetBytes([]byte(chainID)) } func GetEthSignatureRecoveryID(chainID string, parity *big.Int) *big.Int { diff --git a/deploy/compile/compilers_test.go b/deploy/compile/compilers_test.go index a8aa6cb6c..39236ef3d 100644 --- a/deploy/compile/compilers_test.go +++ b/deploy/compile/compilers_test.go @@ -40,7 +40,7 @@ func TestLocalMulti(t *testing.T) { expectedSolcResponse := BlankSolcResponse() actualOutput, err := exec.Command("solc", "--combined-json", "bin,abi", "contractImport1.sol").CombinedOutput() if err != nil { - t.Fatal(err) + t.Fatalf("solc failed %v: %s", err, actualOutput) } warning, responseJSON := extractWarningJSON(strings.TrimSpace(string(actualOutput))) @@ -85,7 +85,7 @@ func TestLocalSingle(t *testing.T) { shellCmd := exec.Command("solc", "--combined-json", "bin,abi", "simpleContract.sol") actualOutput, err := shellCmd.CombinedOutput() if err != nil { - t.Fatal(err) + t.Fatalf("solc failed %v: %s", err, actualOutput) } warning, responseJSON := extractWarningJSON(strings.TrimSpace(string(actualOutput))) diff --git a/encoding/hex/hex.go b/encoding/hex/hex.go deleted file mode 100644 index ace72752e..000000000 --- a/encoding/hex/hex.go +++ /dev/null @@ -1,53 +0,0 @@ -package encoding - -import ( - "fmt" - "math/big" - "strconv" - "strings" - - "github.com/hyperledger/burrow/crypto" - "github.com/tmthrgd/go-hex" -) - -const ( - HexPrefix = `0x` -) - -func AddPrefix(input string) string { - return fmt.Sprintf("%s%s", HexPrefix, input) -} - -func RemovePrefix(input string) string { - return strings.Replace(input, HexPrefix, "", -1) -} - -func EncodeBytes(data []byte) string { - return AddPrefix(hex.EncodeToString(data)) -} - -func EncodeNumber(i uint64) string { - return AddPrefix(strconv.FormatUint(i, 16)) -} - -func DecodeToBytes(input string) ([]byte, error) { - input = RemovePrefix(input) - return hex.DecodeString(input) -} - -func DecodeToNumber(i string) (uint64, error) { - return strconv.ParseUint(i, 0, 64) -} - -func DecodeToBigInt(input string) (*big.Int, error) { - data, err := DecodeToBytes(input) - if err != nil { - return nil, err - } - return new(big.Int).SetBytes(data), nil -} - -func DecodeToAddress(input string) (crypto.Address, error) { - input = RemovePrefix(input) - return crypto.AddressFromHexString(input) -} diff --git a/encoding/hex/hex_test.go b/encoding/hex/hex_test.go deleted file mode 100644 index 234874e51..000000000 --- a/encoding/hex/hex_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package encoding - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestEncodeNumber(t *testing.T) { - require.Equal(t, "0x0", EncodeNumber(0)) - i, err := DecodeToNumber("0x0") - require.NoError(t, err) - require.Equal(t, uint64(0), i) - - require.Equal(t, "0x5208", EncodeNumber(21000)) - i, err = DecodeToNumber("0x5208") - require.NoError(t, err) - require.Equal(t, uint64(21000), i) -} - -func TestEncodeBytes(t *testing.T) { - require.Equal(t, "0x68656c6c6f2c20776f726c64", EncodeBytes([]byte("hello, world"))) - b, err := DecodeToBytes("0x68656c6c6f2c20776f726c64") - require.NoError(t, err) - require.Equal(t, []byte("hello, world"), b) -} diff --git a/encoding/rlp/rlp.go b/encoding/rlp/rlp.go index 2967bcca7..953e54dc3 100644 --- a/encoding/rlp/rlp.go +++ b/encoding/rlp/rlp.go @@ -90,15 +90,22 @@ func Decode(src []byte, dst interface{}) error { } } case reflect.Struct: - if val.NumField() != len(fields) { - return fmt.Errorf("wrong number of fields; have %d, want %d", len(fields), val.NumField()) - } + rt := val.Type() + numExportedFields := 0 for i := 0; i < val.NumField(); i++ { - err := decodeField(val.Field(i), fields[i]) - if err != nil { - return err + // Skip unexported fields + if rt.Field(i).PkgPath == "" { + err := decodeField(val.Field(i), fields[numExportedFields]) + if err != nil { + return err + } + numExportedFields++ } } + if numExportedFields != len(fields) { + return fmt.Errorf("wrong number of fields; have %d, want %d", len(fields), numExportedFields) + } + default: return fmt.Errorf("cannot decode into unsupported type %v", reflect.TypeOf(dst)) } @@ -146,11 +153,11 @@ func encodeLength(n int, offset magicOffset) []byte { if n <= ShortLength { return []uint8{uint8(offset) + uint8(n)} } - i := uint64(n) b := make([]byte, 8) binary.BigEndian.PutUint64(b, i) - byteLengthOfLength := bits.Len64(i)/8 + 1 + // Byte-wise ceiling + byteLengthOfLength := (bits.Len64(i) + 7) / 8 // > If a string is more than 55 bytes long, the RLP encoding consists of a single byte with value 0xb7 // > plus the length in bytes of the length of the string in binary form, followed by the length of the string, // > followed by the string @@ -186,12 +193,18 @@ func encodeList(val reflect.Value) ([]byte, error) { func encodeStruct(val reflect.Value) ([]byte, error) { out := make([][]byte, 0) + rt := val.Type() + for i := 0; i < val.NumField(); i++ { - data, err := encode(val.Field(i)) - if err != nil { - return nil, err + field := val.Field(i) + // Skip unexported fields + if rt.Field(i).PkgPath == "" { + data, err := encode(field) + if err != nil { + return nil, err + } + out = append(out, data) } - out = append(out, data) } sum := bytes.Join(out, []byte{}) length := encodeLength(len(sum), SliceOffset) diff --git a/encoding/rlp/rlp_test.go b/encoding/rlp/rlp_test.go index a9e7c4adc..715849061 100644 --- a/encoding/rlp/rlp_test.go +++ b/encoding/rlp/rlp_test.go @@ -116,7 +116,7 @@ func TestEncoding(t *testing.T) { [][]byte{[]byte("cat"), []byte("dog")}, }, { - [][]string{[]string{"cat", "dog"}, []string{"owl"}}, + [][]string{{"cat", "dog"}, {"owl"}}, []byte{0xce, 0xc8, 0x83, byte('c'), byte('a'), byte('t'), 0x83, byte('d'), byte('o'), byte('g'), 0xc4, 0x83, byte('o'), byte('w'), byte('l')}, [][]byte{[]byte("cat"), []byte("dog"), []byte("owl")}, }, @@ -125,6 +125,23 @@ func TestEncoding(t *testing.T) { trial(t, tests) }) + t.Run("Integers", func(t *testing.T) { + var tests = []testCase{ + { + []uint64{23, 30400}, + []byte{0xc4, 0x17, 0x82, 0x76, 0xc0}, + [][]byte{{23}, {0x76, 0xc0}}, + }, + { + []*big.Int{big.NewInt(23), big.NewInt(30400)}, + []byte{0xc4, 0x17, 0x82, 0x76, 0xc0}, + [][]byte{{23}, {0x76, 0xc0}}, + }, + } + + trial(t, tests) + }) + t.Run("Struct", func(t *testing.T) { var tests = []testCase{ { @@ -163,7 +180,7 @@ func trial(t *testing.T, tests []testCase) { } } -type RawTx struct { +type pretendTx struct { Nonce uint64 `json:"nonce"` GasPrice uint64 `json:"gasPrice"` Gas uint64 `json:"gas"` @@ -192,7 +209,7 @@ func TestEthTransaction(t *testing.T) { // uint(0), // R // uint(0), // S //} - input := &RawTx{ + input := &pretendTx{ uint64(6), // Nonce uint64(10000000000000), // GasPrice uint64(196608), // Gas @@ -209,7 +226,7 @@ func TestEthTransaction(t *testing.T) { exp := []byte{230, 6, 134, 9, 24, 78, 114, 160, 0, 131, 3, 0, 0, 148, 250, 60, 170, 188, 142, 239, 236, 43, 94, 40, 149, 229, 175, 191, 121, 55, 158, 114, 104, 167, 128, 128, 1, 1, 1} require.Equal(t, exp, data) - tx := new(RawTx) + tx := new(pretendTx) err = Decode(data, tx) require.NoError(t, err) @@ -240,14 +257,15 @@ func TestBigInts(t *testing.T) { } // Order matters for serialisation -type EthRawTx struct { - Sequence uint64 `json:"nonce"` - GasPrice uint64 `json:"gasPrice"` - GasLimit uint64 `json:"gasLimit"` - To []byte `json:"to"` - Amount *big.Int `json:"value"` - Data []byte `json:"data"` - ChainID *big.Int `json:"chainID"` +type TestRawTx struct { + Sequence uint64 `json:"nonce"` + GasPrice uint64 `json:"gasPrice"` + GasLimit uint64 `json:"gasLimit"` + dontSerialiseUnexported uint64 + To []byte `json:"to"` + Amount *big.Int `json:"value"` + Data []byte `json:"data"` + ChainID *big.Int `json:"chainID"` V *big.Int R *big.Int @@ -260,7 +278,7 @@ func TestEthRawTx(t *testing.T) { to := crypto.Address{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20} - rawTx := &EthRawTx{ + rawTx := &TestRawTx{ Sequence: 1, GasPrice: 1, GasLimit: 1, @@ -276,9 +294,14 @@ func TestEthRawTx(t *testing.T) { bs, err := Encode(rawTx) require.NoError(t, err) - rawTxOut := new(EthRawTx) + rawTxOut := new(TestRawTx) err = Decode(bs, rawTxOut) require.NoError(t, err) require.Equal(t, rawTx, rawTxOut) } + +func TestEncodeLength(t *testing.T) { + // Ensure we have the minimal encoding (no leading zeros) + require.Equal(t, []byte{0xb8, 0xff}, encodeLength(0xff, StringOffset)) +} diff --git a/event/query/builder.go b/event/query/builder.go index 7931b4964..1757e4b16 100644 --- a/event/query/builder.go +++ b/event/query/builder.go @@ -16,17 +16,19 @@ const ( // Operators equalString = "=" + notEqualString = "!=" greaterThanString = ">" lessThanString = "<" greaterOrEqualString = ">=" lessOrEqualString = "<=" containsString = "CONTAINS" andString = "AND" + orString = "OR" + notString = "NOT" // Values trueString = "true" falseString = "false" - emptyString = "empty" timeString = "TIME" dateString = "DATE" ) @@ -89,7 +91,7 @@ var conditionTemplate = template.Must(template.New("condition").Parse("{{.Tag}} // Creates a new query builder with a base query that is the conjunction of all queries passed func NewBuilder(queries ...string) *Builder { qb := new(Builder) - qb.queryString = qb.and(stringIterator(queries...)) + qb.queryString = qb.binary(stringIterator(queries...), andString) return qb } @@ -113,7 +115,21 @@ func NewOrEmpty(queryString string) (Query, error) { // Creates the conjunction of Builder and rightQuery func (qb *Builder) And(queryBuilders ...*Builder) *Builder { - return NewBuilder(qb.and(queryBuilderIterator(queryBuilders...))) + return NewBuilder(qb.binary(queryBuilderIterator(queryBuilders...), andString)) +} + +func (qb *Builder) Or(queryBuilders ...*Builder) *Builder { + return NewBuilder(qb.binary(queryBuilderIterator(queryBuilders...), orString)) +} + +func (qb *Builder) Not() *Builder { + defer qb.Buffer.Reset() + qb.Buffer.WriteString(notString) + qb.Buffer.WriteByte(' ') + qb.Buffer.WriteByte('(') + qb.Buffer.WriteString(qb.queryString) + qb.Buffer.WriteByte(')') + return NewBuilder(qb.Buffer.String()) } // Creates the conjunction of Builder and tag = operand @@ -121,52 +137,59 @@ func (qb *Builder) AndEquals(tag string, operand interface{}) *Builder { qb.condition.Tag = tag qb.condition.Op = equalString qb.condition.Operand = operandString(operand) - return NewBuilder(qb.and(stringIterator(qb.conditionString()))) + return NewBuilder(qb.binary(stringIterator(qb.conditionString()), andString)) +} + +func (qb *Builder) AndNotEquals(tag string, operand interface{}) *Builder { + qb.condition.Tag = tag + qb.condition.Op = notEqualString + qb.condition.Operand = operandString(operand) + return NewBuilder(qb.binary(stringIterator(qb.conditionString()), andString)) } func (qb *Builder) AndGreaterThanOrEqual(tag string, operand interface{}) *Builder { qb.condition.Tag = tag qb.condition.Op = greaterOrEqualString qb.condition.Operand = operandString(operand) - return NewBuilder(qb.and(stringIterator(qb.conditionString()))) + return NewBuilder(qb.binary(stringIterator(qb.conditionString()), andString)) } func (qb *Builder) AndLessThanOrEqual(tag string, operand interface{}) *Builder { qb.condition.Tag = tag qb.condition.Op = lessOrEqualString qb.condition.Operand = operandString(operand) - return NewBuilder(qb.and(stringIterator(qb.conditionString()))) + return NewBuilder(qb.binary(stringIterator(qb.conditionString()), andString)) } func (qb *Builder) AndStrictlyGreaterThan(tag string, operand interface{}) *Builder { qb.condition.Tag = tag qb.condition.Op = greaterThanString qb.condition.Operand = operandString(operand) - return NewBuilder(qb.and(stringIterator(qb.conditionString()))) + return NewBuilder(qb.binary(stringIterator(qb.conditionString()), andString)) } func (qb *Builder) AndStrictlyLessThan(tag string, operand interface{}) *Builder { qb.condition.Tag = tag qb.condition.Op = lessThanString qb.condition.Operand = operandString(operand) - return NewBuilder(qb.and(stringIterator(qb.conditionString()))) + return NewBuilder(qb.binary(stringIterator(qb.conditionString()), andString)) } func (qb *Builder) AndContains(tag string, operand interface{}) *Builder { qb.condition.Tag = tag qb.condition.Op = containsString qb.condition.Operand = operandString(operand) - return NewBuilder(qb.and(stringIterator(qb.conditionString()))) + return NewBuilder(qb.binary(stringIterator(qb.conditionString()), andString)) } -func (qb *Builder) and(queryIterator func(func(string))) string { +func (qb *Builder) binary(queryIterator func(func(string)), operator string) string { defer qb.Buffer.Reset() qb.Buffer.WriteString(qb.queryString) queryIterator(func(q string) { if !isEmpty(q) { if qb.Buffer.Len() > 0 { qb.Buffer.WriteByte(' ') - qb.Buffer.WriteString(andString) + qb.Buffer.WriteString(operator) qb.Buffer.WriteByte(' ') } qb.Buffer.WriteString(q) @@ -248,7 +271,7 @@ func (qb *Builder) conditionString() string { } func isEmpty(queryString string) bool { - return queryString == "" || queryString == emptyString + return queryString == "" } // Iterators over some strings diff --git a/event/query/builder_test.go b/event/query/builder_test.go index 6acbbd3b9..b77c03434 100644 --- a/event/query/builder_test.go +++ b/event/query/builder_test.go @@ -12,7 +12,7 @@ func TestQueryBuilder(t *testing.T) { qb := NewBuilder() qry, err := qb.Query() require.NoError(t, err) - assert.Equal(t, emptyString, qry.String()) + assert.Equal(t, "", qry.String()) qb = qb.AndGreaterThanOrEqual("foo.size", 45) qry, err = qb.Query() @@ -41,6 +41,11 @@ func TestQueryBuilder(t *testing.T) { qry, err = qb.Query() require.NoError(t, err) assert.Equal(t, "foo = 'bar' AND frogs >= 4", qry.String()) + + qb = qb.Not() + qry, err = qb.Query() + require.NoError(t, err) + assert.Equal(t, "NOT (foo = 'bar' AND frogs >= 4)", qry.String()) } func makeTagMap(keyvals ...interface{}) TagMap { diff --git a/event/query/empty.go b/event/query/empty.go index 91d2195e5..c771b331a 100644 --- a/event/query/empty.go +++ b/event/query/empty.go @@ -13,7 +13,7 @@ func (Empty) Matches(tags Tagged) bool { } func (Empty) String() string { - return "empty" + return "" } func (Empty) Query() (Query, error) { diff --git a/event/query/expression.go b/event/query/expression.go index d19222261..64a88ce6a 100644 --- a/event/query/expression.go +++ b/event/query/expression.go @@ -30,6 +30,8 @@ const ( OpGreater OpEqual OpContains + OpNotEqual + OpNot ) var opNames = map[Operator]string{ @@ -41,12 +43,21 @@ var opNames = map[Operator]string{ OpGreater: ">", OpEqual: "=", OpContains: "CONTAINS", + OpNotEqual: "!=", + OpNot: "Not", } func (op Operator) String() string { return opNames[op] } +func (op Operator) Arity() int { + if op == OpNot { + return 1 + } + return 2 +} + // Instruction is a container suitable for the code tape and the stack to hold values an operations type instruction struct { op Operator @@ -93,6 +104,7 @@ func (e *Expression) Evaluate(getTagValue func(tag string) (interface{}, bool)) } var left, right *instruction stack := make([]*instruction, 0, len(e.code)) + var err error for _, in := range e.code { if in.op == OpTerminal { // just push terminals on to the stack @@ -100,13 +112,14 @@ func (e *Expression) Evaluate(getTagValue func(tag string) (interface{}, bool)) continue } - if len(stack) < 2 { - return false, fmt.Errorf("cannot pop from stack for query expression [%v] because stack has "+ - "fewer than 2 elements", e) + stack, left, right, err = pop(stack, in.op) + if err != nil { + return false, fmt.Errorf("cannot process instruction %v in expression [%v]: %w", in, e, err) } - stack, left, right = pop(stack) ins := &instruction{} switch in.op { + case OpNot: + ins.match = !right.match case OpAnd: ins.match = left.match && right.match case OpOr: @@ -147,8 +160,16 @@ func (e *Expression) explainf(fmt string, args ...interface{}) { } } -func pop(stack []*instruction) ([]*instruction, *instruction, *instruction) { - return stack[:len(stack)-2], stack[len(stack)-2], stack[len(stack)-1] +func pop(stack []*instruction, op Operator) ([]*instruction, *instruction, *instruction, error) { + arity := op.Arity() + if len(stack) < arity { + return stack, nil, nil, fmt.Errorf("cannot pop arguments for arity %d operator %v from stack "+ + "because stack has fewer than %d elements", arity, op, arity) + } + if arity == 1 { + return stack[:len(stack)-1], nil, stack[len(stack)-1], nil + } + return stack[:len(stack)-2], stack[len(stack)-2], stack[len(stack)-1], nil } func compareString(op Operator, tagValue interface{}, value string) bool { @@ -158,6 +179,8 @@ func compareString(op Operator, tagValue interface{}, value string) bool { return strings.Contains(tagString, value) case OpEqual: return tagString == value + case OpNotEqual: + return tagString != value } return false } @@ -206,6 +229,8 @@ func compareNumber(op Operator, tagValue interface{}, value *big.Float) bool { return cmp == 1 case OpEqual: return cmp == 0 + case OpNotEqual: + return cmp != 0 } return false } @@ -241,6 +266,8 @@ func compareTime(op Operator, tagValue interface{}, value time.Time) bool { return tagTime.After(value) case OpEqual: return tagTime.Equal(value) + case OpNotEqual: + return !tagTime.Equal(value) } return false } diff --git a/event/query/query.go b/event/query/query.go index e9c5b4807..eb2bdf740 100644 --- a/event/query/query.go +++ b/event/query/query.go @@ -37,6 +37,10 @@ func (m *MatchError) Error() string { return fmt.Sprintf("matching error occurred with tagged: %v", m.Cause) } +func IsEmpty(query Query) bool { + return query.String() == "" +} + // Condition represents a single condition within a query and consists of tag // (e.g. "tx.gas"), operator (e.g. "=") and operand (e.g. "7"). type Condition struct { @@ -54,11 +58,8 @@ func New(s string) (*PegQuery, error) { p.Expression.explainer = func(format string, args ...interface{}) { fmt.Printf(format, args...) } - err := p.Init() - if err != nil { - return nil, err - } - err = p.Parse() + p.Init() + err := p.Parse() if err != nil { return nil, err } diff --git a/event/query/query.peg b/event/query/query.peg index 7363a6a57..be2120322 100644 --- a/event/query/query.peg +++ b/event/query/query.peg @@ -14,13 +14,16 @@ e <- eor !. eor <- eand ( or eand { p.Operator(OpOr) })* -eand <- condition ( and condition { p.Operator(OpAnd) })* +eand <- enot ( and enot { p.Operator(OpAnd) })* + +enot <- not condition { p.Operator(OpNot) } / condition condition <- tag sp (le (number / time / date) { p.Operator(OpLessEqual) } / ge (number / time / date) { p.Operator(OpGreaterEqual) } / l (number / time / date) { p.Operator(OpLess) } / g (number / time / date) { p.Operator(OpGreater) } / equal (number / time / date / qvalue) { p.Operator(OpEqual) } + / ne (number / time / date / qvalue) { p.Operator(OpNotEqual) } / contains qvalue { p.Operator(OpContains) } ) sp / open eor close @@ -45,7 +48,9 @@ day <- ('0' / '1' / '2' / '3') digit and <- "AND" sp or <- "OR" sp +not <- "NOT" sp equal <- "=" sp +ne <- "!=" sp contains <- "CONTAINS" sp le <- "<=" sp ge <- ">=" sp diff --git a/event/query/query.peg.go b/event/query/query.peg.go index d9a83190b..49eefe9c0 100644 --- a/event/query/query.peg.go +++ b/event/query/query.peg.go @@ -1,11 +1,8 @@ package query -// Code generated by peg event/query/query.peg DO NOT EDIT. - import ( "fmt" - "io" - "os" + "math" "sort" "strconv" ) @@ -20,6 +17,7 @@ const ( rulee ruleeor ruleeand + ruleenot rulecondition ruletag ruleqvalue @@ -33,7 +31,9 @@ const ( ruleday ruleand ruleor + rulenot ruleequal + rulene rulecontains rulele rulege @@ -50,12 +50,18 @@ const ( ruleAction5 ruleAction6 ruleAction7 - rulePegText ruleAction8 ruleAction9 + rulePegText ruleAction10 ruleAction11 ruleAction12 + ruleAction13 + ruleAction14 + + rulePre + ruleIn + ruleSuf ) var rul3s = [...]string{ @@ -63,6 +69,7 @@ var rul3s = [...]string{ "e", "eor", "eand", + "enot", "condition", "tag", "qvalue", @@ -76,7 +83,9 @@ var rul3s = [...]string{ "day", "and", "or", + "not", "equal", + "ne", "contains", "le", "ge", @@ -93,21 +102,18 @@ var rul3s = [...]string{ "Action5", "Action6", "Action7", - "PegText", "Action8", "Action9", + "PegText", "Action10", "Action11", "Action12", -} + "Action13", + "Action14", -type token32 struct { - pegRule - begin, end uint32 -} - -func (t *token32) String() string { - return fmt.Sprintf("\x1B[34m%v\x1B[m %v %v", rul3s[t.pegRule], t.begin, t.end) + "Pre_", + "_In_", + "_Suf", } type node32 struct { @@ -115,43 +121,57 @@ type node32 struct { up, next *node32 } -func (node *node32) print(w io.Writer, pretty bool, buffer string) { - var print func(node *node32, depth int) - print = func(node *node32, depth int) { - for node != nil { - for c := 0; c < depth; c++ { - fmt.Fprintf(w, " ") - } - rule := rul3s[node.pegRule] - quote := strconv.Quote(string(([]rune(buffer)[node.begin:node.end]))) - if !pretty { - fmt.Fprintf(w, "%v %v\n", rule, quote) - } else { - fmt.Fprintf(w, "\x1B[34m%v\x1B[m %v\n", rule, quote) - } - if node.up != nil { - print(node.up, depth+1) - } - node = node.next +func (node *node32) print(depth int, buffer string) { + for node != nil { + for c := 0; c < depth; c++ { + fmt.Printf(" ") + } + fmt.Printf("\x1B[34m%v\x1B[m %v\n", rul3s[node.pegRule], strconv.Quote(string(([]rune(buffer)[node.begin:node.end])))) + if node.up != nil { + node.up.print(depth+1, buffer) } + node = node.next } - print(node, 0) } -func (node *node32) Print(w io.Writer, buffer string) { - node.print(w, false, buffer) +func (node *node32) Print(buffer string) { + node.print(0, buffer) +} + +type element struct { + node *node32 + down *element +} + +/* ${@} bit structure for abstract syntax tree */ +type token32 struct { + pegRule + begin, end, next uint32 +} + +func (t *token32) isZero() bool { + return t.pegRule == ruleUnknown && t.begin == 0 && t.end == 0 && t.next == 0 } -func (node *node32) PrettyPrint(w io.Writer, buffer string) { - node.print(w, true, buffer) +func (t *token32) isParentOf(u token32) bool { + return t.begin <= u.begin && t.end >= u.end && t.next > u.next +} + +func (t *token32) getToken32() token32 { + return token32{pegRule: t.pegRule, begin: uint32(t.begin), end: uint32(t.end), next: uint32(t.next)} +} + +func (t *token32) String() string { + return fmt.Sprintf("\x1B[34m%v\x1B[m %v %v %v", rul3s[t.pegRule], t.begin, t.end, t.next) } type tokens32 struct { - tree []token32 + tree []token32 + ordered [][]token32 } -func (t *tokens32) Trim(length uint32) { - t.tree = t.tree[:length] +func (t *tokens32) trim(length int) { + t.tree = t.tree[0:length] } func (t *tokens32) Print() { @@ -160,14 +180,51 @@ func (t *tokens32) Print() { } } -func (t *tokens32) AST() *node32 { - type element struct { - node *node32 - down *element +func (t *tokens32) Order() [][]token32 { + if t.ordered != nil { + return t.ordered + } + + depths := make([]int32, 1, math.MaxInt16) + for i, token := range t.tree { + if token.pegRule == ruleUnknown { + t.tree = t.tree[:i] + break + } + depth := int(token.next) + if length := len(depths); depth >= length { + depths = depths[:depth+1] + } + depths[depth]++ + } + depths = append(depths, 0) + + ordered, pool := make([][]token32, len(depths)), make([]token32, len(t.tree)+len(depths)) + for i, depth := range depths { + depth++ + ordered[i], pool, depths[i] = pool[:depth], pool[depth:], 0 + } + + for i, token := range t.tree { + depth := token.next + token.next = uint32(i) + ordered[depth][depths[depth]] = token + depths[depth]++ } + t.ordered = ordered + return ordered +} + +type state32 struct { + token32 + depths []int32 + leaf bool +} + +func (t *tokens32) AST() *node32 { tokens := t.Tokens() - var stack *element - for _, token := range tokens { + stack := &element{node: &node32{token32: <-tokens}} + for token := range tokens { if token.begin == token.end { continue } @@ -179,35 +236,168 @@ func (t *tokens32) AST() *node32 { } stack = &element{node: node, down: stack} } - if stack != nil { - return stack.node + return stack.node +} + +func (t *tokens32) PreOrder() (<-chan state32, [][]token32) { + s, ordered := make(chan state32, 6), t.Order() + go func() { + var states [8]state32 + for i := range states { + states[i].depths = make([]int32, len(ordered)) + } + depths, state, depth := make([]int32, len(ordered)), 0, 1 + write := func(t token32, leaf bool) { + S := states[state] + state, S.pegRule, S.begin, S.end, S.next, S.leaf = (state+1)%8, t.pegRule, t.begin, t.end, uint32(depth), leaf + copy(S.depths, depths) + s <- S + } + + states[state].token32 = ordered[0][0] + depths[0]++ + state++ + a, b := ordered[depth-1][depths[depth-1]-1], ordered[depth][depths[depth]] + depthFirstSearch: + for { + for { + if i := depths[depth]; i > 0 { + if c, j := ordered[depth][i-1], depths[depth-1]; a.isParentOf(c) && + (j < 2 || !ordered[depth-1][j-2].isParentOf(c)) { + if c.end != b.begin { + write(token32{pegRule: ruleIn, begin: c.end, end: b.begin}, true) + } + break + } + } + + if a.begin < b.begin { + write(token32{pegRule: rulePre, begin: a.begin, end: b.begin}, true) + } + break + } + + next := depth + 1 + if c := ordered[next][depths[next]]; c.pegRule != ruleUnknown && b.isParentOf(c) { + write(b, false) + depths[depth]++ + depth, a, b = next, b, c + continue + } + + write(b, true) + depths[depth]++ + c, parent := ordered[depth][depths[depth]], true + for { + if c.pegRule != ruleUnknown && a.isParentOf(c) { + b = c + continue depthFirstSearch + } else if parent && b.end != a.end { + write(token32{pegRule: ruleSuf, begin: b.end, end: a.end}, true) + } + + depth-- + if depth > 0 { + a, b, c = ordered[depth-1][depths[depth-1]-1], a, ordered[depth][depths[depth]] + parent = a.isParentOf(b) + continue + } + + break depthFirstSearch + } + } + + close(s) + }() + return s, ordered +} + +func (t *tokens32) PrintSyntax() { + tokens, ordered := t.PreOrder() + max := -1 + for token := range tokens { + if !token.leaf { + fmt.Printf("%v", token.begin) + for i, leaf, depths := 0, int(token.next), token.depths; i < leaf; i++ { + fmt.Printf(" \x1B[36m%v\x1B[m", rul3s[ordered[i][depths[i]-1].pegRule]) + } + fmt.Printf(" \x1B[36m%v\x1B[m\n", rul3s[token.pegRule]) + } else if token.begin == token.end { + fmt.Printf("%v", token.begin) + for i, leaf, depths := 0, int(token.next), token.depths; i < leaf; i++ { + fmt.Printf(" \x1B[31m%v\x1B[m", rul3s[ordered[i][depths[i]-1].pegRule]) + } + fmt.Printf(" \x1B[31m%v\x1B[m\n", rul3s[token.pegRule]) + } else { + for c, end := token.begin, token.end; c < end; c++ { + if i := int(c); max+1 < i { + for j := max; j < i; j++ { + fmt.Printf("skip %v %v\n", j, token.String()) + } + max = i + } else if i := int(c); i <= max { + for j := i; j <= max; j++ { + fmt.Printf("dupe %v %v\n", j, token.String()) + } + } else { + max = int(c) + } + fmt.Printf("%v", c) + for i, leaf, depths := 0, int(token.next), token.depths; i < leaf; i++ { + fmt.Printf(" \x1B[34m%v\x1B[m", rul3s[ordered[i][depths[i]-1].pegRule]) + } + fmt.Printf(" \x1B[34m%v\x1B[m\n", rul3s[token.pegRule]) + } + fmt.Printf("\n") + } } - return nil } func (t *tokens32) PrintSyntaxTree(buffer string) { - t.AST().Print(os.Stdout, buffer) + tokens, _ := t.PreOrder() + for token := range tokens { + for c := 0; c < int(token.next); c++ { + fmt.Printf(" ") + } + fmt.Printf("\x1B[34m%v\x1B[m %v\n", rul3s[token.pegRule], strconv.Quote(string(([]rune(buffer)[token.begin:token.end])))) + } } -func (t *tokens32) WriteSyntaxTree(w io.Writer, buffer string) { - t.AST().Print(w, buffer) +func (t *tokens32) Add(rule pegRule, begin, end, depth uint32, index int) { + t.tree[index] = token32{pegRule: rule, begin: uint32(begin), end: uint32(end), next: uint32(depth)} } -func (t *tokens32) PrettyPrintSyntaxTree(buffer string) { - t.AST().PrettyPrint(os.Stdout, buffer) +func (t *tokens32) Tokens() <-chan token32 { + s := make(chan token32, 16) + go func() { + for _, v := range t.tree { + s <- v.getToken32() + } + close(s) + }() + return s } -func (t *tokens32) Add(rule pegRule, begin, end, index uint32) { - tree, i := t.tree, int(index) - if i >= len(tree) { - t.tree = append(tree, token32{pegRule: rule, begin: begin, end: end}) - return +func (t *tokens32) Error() []token32 { + ordered := t.Order() + length := len(ordered) + tokens, length := make([]token32, length), length-1 + for i := range tokens { + o := ordered[length-i] + if len(o) > 1 { + tokens[i] = o[len(o)-2].getToken32() + } } - tree[i] = token32{pegRule: rule, begin: begin, end: end} + return tokens } -func (t *tokens32) Tokens() []token32 { - return t.tree +func (t *tokens32) Expand(index int) { + tree := t.tree + if index >= len(tree) { + expanded := make([]token32, 2*len(tree)) + copy(expanded, tree) + t.tree = expanded + } } type QueryParser struct { @@ -215,21 +405,13 @@ type QueryParser struct { Buffer string buffer []rune - rules [40]func() bool - parse func(rule ...int) error - reset func() + rules [45]func() bool + Parse func(rule ...int) error + Reset func() Pretty bool tokens32 } -func (p *QueryParser) Parse(rule ...int) error { - return p.parse(rule...) -} - -func (p *QueryParser) Reset() { - p.reset() -} - type textPosition struct { line, symbol int } @@ -267,7 +449,7 @@ type parseError struct { } func (e *parseError) Error() string { - tokens, err := []token32{e.max}, "\n" + tokens, error := []token32{e.max}, "\n" positions, p := make([]int, 2*len(tokens)), 0 for _, token := range tokens { positions[p], p = int(token.begin), p+1 @@ -280,31 +462,27 @@ func (e *parseError) Error() string { } for _, token := range tokens { begin, end := int(token.begin), int(token.end) - err += fmt.Sprintf(format, + error += fmt.Sprintf(format, rul3s[token.pegRule], translations[begin].line, translations[begin].symbol, translations[end].line, translations[end].symbol, strconv.Quote(string(e.p.buffer[begin:end]))) } - return err + return error } func (p *QueryParser) PrintSyntaxTree() { - if p.Pretty { - p.tokens32.PrettyPrintSyntaxTree(p.Buffer) - } else { - p.tokens32.PrintSyntaxTree(p.Buffer) - } + p.tokens32.PrintSyntaxTree(p.Buffer) } -func (p *QueryParser) WriteSyntaxTree(w io.Writer) { - p.tokens32.WriteSyntaxTree(w, p.Buffer) +func (p *QueryParser) Highlighter() { + p.PrintSyntax() } func (p *QueryParser) Execute() { buffer, _buffer, text, begin, end := p.Buffer, p.buffer, "", 0, 0 - for _, token := range p.Tokens() { + for token := range p.Tokens() { switch token.pegRule { case rulePegText: @@ -316,26 +494,30 @@ func (p *QueryParser) Execute() { case ruleAction1: p.Operator(OpAnd) case ruleAction2: - p.Operator(OpLessEqual) + p.Operator(OpNot) case ruleAction3: - p.Operator(OpGreaterEqual) + p.Operator(OpLessEqual) case ruleAction4: - p.Operator(OpLess) + p.Operator(OpGreaterEqual) case ruleAction5: - p.Operator(OpGreater) + p.Operator(OpLess) case ruleAction6: - p.Operator(OpEqual) + p.Operator(OpGreater) case ruleAction7: - p.Operator(OpContains) + p.Operator(OpEqual) case ruleAction8: - p.Tag(buffer[begin:end]) + p.Operator(OpNotEqual) case ruleAction9: - p.Value(buffer[begin:end]) + p.Operator(OpContains) case ruleAction10: - p.Number(buffer[begin:end]) + p.Tag(buffer[begin:end]) case ruleAction11: - p.Time(buffer[begin:end]) + p.Value(buffer[begin:end]) case ruleAction12: + p.Number(buffer[begin:end]) + case ruleAction13: + p.Time(buffer[begin:end]) + case ruleAction14: p.Date(buffer[begin:end]) } @@ -343,46 +525,17 @@ func (p *QueryParser) Execute() { _, _, _, _, _ = buffer, _buffer, text, begin, end } -func Pretty(pretty bool) func(*QueryParser) error { - return func(p *QueryParser) error { - p.Pretty = pretty - return nil - } -} - -func Size(size int) func(*QueryParser) error { - return func(p *QueryParser) error { - p.tokens32 = tokens32{tree: make([]token32, 0, size)} - return nil - } -} -func (p *QueryParser) Init(options ...func(*QueryParser) error) error { - var ( - max token32 - position, tokenIndex uint32 - buffer []rune - ) - for _, option := range options { - err := option(p) - if err != nil { - return err - } +func (p *QueryParser) Init() { + p.buffer = []rune(p.Buffer) + if len(p.buffer) == 0 || p.buffer[len(p.buffer)-1] != endSymbol { + p.buffer = append(p.buffer, endSymbol) } - p.reset = func() { - max = token32{} - position, tokenIndex = 0, 0 - p.buffer = []rune(p.Buffer) - if len(p.buffer) == 0 || p.buffer[len(p.buffer)-1] != endSymbol { - p.buffer = append(p.buffer, endSymbol) - } - buffer = p.buffer - } - p.reset() + tree := tokens32{tree: make([]token32, math.MaxInt16)} + var max token32 + position, depth, tokenIndex, buffer, _rules := uint32(0), uint32(0), 0, p.buffer, p.rules - _rules := p.rules - tree := p.tokens32 - p.parse = func(rule ...int) error { + p.Parse = func(rule ...int) error { r := 1 if len(rule) > 0 { r = rule[0] @@ -390,17 +543,22 @@ func (p *QueryParser) Init(options ...func(*QueryParser) error) error { matches := p.rules[r]() p.tokens32 = tree if matches { - p.Trim(tokenIndex) + p.trim(tokenIndex) return nil } return &parseError{p, max} } + p.Reset = func() { + position, tokenIndex, depth = 0, 0, 0 + } + add := func(rule pegRule, begin uint32) { - tree.Add(rule, begin, position, tokenIndex) + tree.Expand(tokenIndex) + tree.Add(rule, begin, position, depth, tokenIndex) tokenIndex++ if begin != position && position > max.end { - max = token32{rule, begin, position} + max = token32{rule, begin, position, depth} } } @@ -432,39 +590,42 @@ func (p *QueryParser) Init(options ...func(*QueryParser) error) error { nil, /* 0 e <- <(eor !.)> */ func() bool { - position0, tokenIndex0 := position, tokenIndex + position0, tokenIndex0, depth0 := position, tokenIndex, depth { position1 := position + depth++ if !_rules[ruleeor]() { goto l0 } { - position2, tokenIndex2 := position, tokenIndex + position2, tokenIndex2, depth2 := position, tokenIndex, depth if !matchDot() { goto l2 } goto l0 l2: - position, tokenIndex = position2, tokenIndex2 + position, tokenIndex, depth = position2, tokenIndex2, depth2 } + depth-- add(rulee, position1) } return true l0: - position, tokenIndex = position0, tokenIndex0 + position, tokenIndex, depth = position0, tokenIndex0, depth0 return false }, /* 1 eor <- <(eand (or eand Action0)*)> */ func() bool { - position3, tokenIndex3 := position, tokenIndex + position3, tokenIndex3, depth3 := position, tokenIndex, depth { position4 := position + depth++ if !_rules[ruleeand]() { goto l3 } l5: { - position6, tokenIndex6 := position, tokenIndex + position6, tokenIndex6, depth6 := position, tokenIndex, depth if !_rules[ruleor]() { goto l6 } @@ -476,30 +637,32 @@ func (p *QueryParser) Init(options ...func(*QueryParser) error) error { } goto l5 l6: - position, tokenIndex = position6, tokenIndex6 + position, tokenIndex, depth = position6, tokenIndex6, depth6 } + depth-- add(ruleeor, position4) } return true l3: - position, tokenIndex = position3, tokenIndex3 + position, tokenIndex, depth = position3, tokenIndex3, depth3 return false }, - /* 2 eand <- <(condition (and condition Action1)*)> */ + /* 2 eand <- <(enot (and enot Action1)*)> */ func() bool { - position7, tokenIndex7 := position, tokenIndex + position7, tokenIndex7, depth7 := position, tokenIndex, depth { position8 := position - if !_rules[rulecondition]() { + depth++ + if !_rules[ruleenot]() { goto l7 } l9: { - position10, tokenIndex10 := position, tokenIndex + position10, tokenIndex10, depth10 := position, tokenIndex, depth if !_rules[ruleand]() { goto l10 } - if !_rules[rulecondition]() { + if !_rules[ruleenot]() { goto l10 } if !_rules[ruleAction1]() { @@ -507,75 +670,82 @@ func (p *QueryParser) Init(options ...func(*QueryParser) error) error { } goto l9 l10: - position, tokenIndex = position10, tokenIndex10 + position, tokenIndex, depth = position10, tokenIndex10, depth10 } + depth-- add(ruleeand, position8) } return true l7: - position, tokenIndex = position7, tokenIndex7 + position, tokenIndex, depth = position7, tokenIndex7, depth7 return false }, - /* 3 condition <- <((tag sp ((le (number / time / date) Action2) / (ge (number / time / date) Action3) / (l (number / time / date) Action4) / (g (number / time / date) Action5) / (equal (number / time / date / qvalue) Action6) / (contains qvalue Action7)) sp) / (open eor close))> */ + /* 3 enot <- <((not condition Action2) / condition)> */ func() bool { - position11, tokenIndex11 := position, tokenIndex + position11, tokenIndex11, depth11 := position, tokenIndex, depth { position12 := position + depth++ { - position13, tokenIndex13 := position, tokenIndex - if !_rules[ruletag]() { + position13, tokenIndex13, depth13 := position, tokenIndex, depth + if !_rules[rulenot]() { goto l14 } - if !_rules[rulesp]() { + if !_rules[rulecondition]() { + goto l14 + } + if !_rules[ruleAction2]() { goto l14 } + goto l13 + l14: + position, tokenIndex, depth = position13, tokenIndex13, depth13 + if !_rules[rulecondition]() { + goto l11 + } + } + l13: + depth-- + add(ruleenot, position12) + } + return true + l11: + position, tokenIndex, depth = position11, tokenIndex11, depth11 + return false + }, + /* 4 condition <- <((tag sp ((le (number / time / date) Action3) / (ge (number / time / date) Action4) / (l (number / time / date) Action5) / (g (number / time / date) Action6) / (equal (number / time / date / qvalue) Action7) / (ne (number / time / date / qvalue) Action8) / (contains qvalue Action9)) sp) / (open eor close))> */ + func() bool { + position15, tokenIndex15, depth15 := position, tokenIndex, depth + { + position16 := position + depth++ + { + position17, tokenIndex17, depth17 := position, tokenIndex, depth + if !_rules[ruletag]() { + goto l18 + } + if !_rules[rulesp]() { + goto l18 + } { - position15, tokenIndex15 := position, tokenIndex + position19, tokenIndex19, depth19 := position, tokenIndex, depth if !_rules[rulele]() { - goto l16 - } - { - position17, tokenIndex17 := position, tokenIndex - if !_rules[rulenumber]() { - goto l18 - } - goto l17 - l18: - position, tokenIndex = position17, tokenIndex17 - if !_rules[ruletime]() { - goto l19 - } - goto l17 - l19: - position, tokenIndex = position17, tokenIndex17 - if !_rules[ruledate]() { - goto l16 - } - } - l17: - if !_rules[ruleAction2]() { - goto l16 - } - goto l15 - l16: - position, tokenIndex = position15, tokenIndex15 - if !_rules[rulege]() { goto l20 } { - position21, tokenIndex21 := position, tokenIndex + position21, tokenIndex21, depth21 := position, tokenIndex, depth if !_rules[rulenumber]() { goto l22 } goto l21 l22: - position, tokenIndex = position21, tokenIndex21 + position, tokenIndex, depth = position21, tokenIndex21, depth21 if !_rules[ruletime]() { goto l23 } goto l21 l23: - position, tokenIndex = position21, tokenIndex21 + position, tokenIndex, depth = position21, tokenIndex21, depth21 if !_rules[ruledate]() { goto l20 } @@ -584,26 +754,26 @@ func (p *QueryParser) Init(options ...func(*QueryParser) error) error { if !_rules[ruleAction3]() { goto l20 } - goto l15 + goto l19 l20: - position, tokenIndex = position15, tokenIndex15 - if !_rules[rulel]() { + position, tokenIndex, depth = position19, tokenIndex19, depth19 + if !_rules[rulege]() { goto l24 } { - position25, tokenIndex25 := position, tokenIndex + position25, tokenIndex25, depth25 := position, tokenIndex, depth if !_rules[rulenumber]() { goto l26 } goto l25 l26: - position, tokenIndex = position25, tokenIndex25 + position, tokenIndex, depth = position25, tokenIndex25, depth25 if !_rules[ruletime]() { goto l27 } goto l25 l27: - position, tokenIndex = position25, tokenIndex25 + position, tokenIndex, depth = position25, tokenIndex25, depth25 if !_rules[ruledate]() { goto l24 } @@ -612,26 +782,26 @@ func (p *QueryParser) Init(options ...func(*QueryParser) error) error { if !_rules[ruleAction4]() { goto l24 } - goto l15 + goto l19 l24: - position, tokenIndex = position15, tokenIndex15 - if !_rules[ruleg]() { + position, tokenIndex, depth = position19, tokenIndex19, depth19 + if !_rules[rulel]() { goto l28 } { - position29, tokenIndex29 := position, tokenIndex + position29, tokenIndex29, depth29 := position, tokenIndex, depth if !_rules[rulenumber]() { goto l30 } goto l29 l30: - position, tokenIndex = position29, tokenIndex29 + position, tokenIndex, depth = position29, tokenIndex29, depth29 if !_rules[ruletime]() { goto l31 } goto l29 l31: - position, tokenIndex = position29, tokenIndex29 + position, tokenIndex, depth = position29, tokenIndex29, depth29 if !_rules[ruledate]() { goto l28 } @@ -640,33 +810,27 @@ func (p *QueryParser) Init(options ...func(*QueryParser) error) error { if !_rules[ruleAction5]() { goto l28 } - goto l15 + goto l19 l28: - position, tokenIndex = position15, tokenIndex15 - if !_rules[ruleequal]() { + position, tokenIndex, depth = position19, tokenIndex19, depth19 + if !_rules[ruleg]() { goto l32 } { - position33, tokenIndex33 := position, tokenIndex + position33, tokenIndex33, depth33 := position, tokenIndex, depth if !_rules[rulenumber]() { goto l34 } goto l33 l34: - position, tokenIndex = position33, tokenIndex33 + position, tokenIndex, depth = position33, tokenIndex33, depth33 if !_rules[ruletime]() { goto l35 } goto l33 l35: - position, tokenIndex = position33, tokenIndex33 + position, tokenIndex, depth = position33, tokenIndex33, depth33 if !_rules[ruledate]() { - goto l36 - } - goto l33 - l36: - position, tokenIndex = position33, tokenIndex33 - if !_rules[ruleqvalue]() { goto l32 } } @@ -674,1304 +838,1525 @@ func (p *QueryParser) Init(options ...func(*QueryParser) error) error { if !_rules[ruleAction6]() { goto l32 } - goto l15 + goto l19 l32: - position, tokenIndex = position15, tokenIndex15 + position, tokenIndex, depth = position19, tokenIndex19, depth19 + if !_rules[ruleequal]() { + goto l36 + } + { + position37, tokenIndex37, depth37 := position, tokenIndex, depth + if !_rules[rulenumber]() { + goto l38 + } + goto l37 + l38: + position, tokenIndex, depth = position37, tokenIndex37, depth37 + if !_rules[ruletime]() { + goto l39 + } + goto l37 + l39: + position, tokenIndex, depth = position37, tokenIndex37, depth37 + if !_rules[ruledate]() { + goto l40 + } + goto l37 + l40: + position, tokenIndex, depth = position37, tokenIndex37, depth37 + if !_rules[ruleqvalue]() { + goto l36 + } + } + l37: + if !_rules[ruleAction7]() { + goto l36 + } + goto l19 + l36: + position, tokenIndex, depth = position19, tokenIndex19, depth19 + if !_rules[rulene]() { + goto l41 + } + { + position42, tokenIndex42, depth42 := position, tokenIndex, depth + if !_rules[rulenumber]() { + goto l43 + } + goto l42 + l43: + position, tokenIndex, depth = position42, tokenIndex42, depth42 + if !_rules[ruletime]() { + goto l44 + } + goto l42 + l44: + position, tokenIndex, depth = position42, tokenIndex42, depth42 + if !_rules[ruledate]() { + goto l45 + } + goto l42 + l45: + position, tokenIndex, depth = position42, tokenIndex42, depth42 + if !_rules[ruleqvalue]() { + goto l41 + } + } + l42: + if !_rules[ruleAction8]() { + goto l41 + } + goto l19 + l41: + position, tokenIndex, depth = position19, tokenIndex19, depth19 if !_rules[rulecontains]() { - goto l14 + goto l18 } if !_rules[ruleqvalue]() { - goto l14 + goto l18 } - if !_rules[ruleAction7]() { - goto l14 + if !_rules[ruleAction9]() { + goto l18 } } - l15: + l19: if !_rules[rulesp]() { - goto l14 + goto l18 } - goto l13 - l14: - position, tokenIndex = position13, tokenIndex13 + goto l17 + l18: + position, tokenIndex, depth = position17, tokenIndex17, depth17 if !_rules[ruleopen]() { - goto l11 + goto l15 } if !_rules[ruleeor]() { - goto l11 + goto l15 } if !_rules[ruleclose]() { - goto l11 + goto l15 } } - l13: - add(rulecondition, position12) + l17: + depth-- + add(rulecondition, position16) } return true - l11: - position, tokenIndex = position11, tokenIndex11 + l15: + position, tokenIndex, depth = position15, tokenIndex15, depth15 return false }, - /* 4 tag <- <(<(!(' ' / '\t' / '\n' / '\r' / '\\' / '(' / ')' / '"' / '\'' / '=' / '>' / '<') .)+> sp Action8)> */ + /* 5 tag <- <(<(!(' ' / '\t' / '\n' / '\r' / '\\' / '(' / ')' / '"' / '\'' / '=' / '>' / '<') .)+> sp Action10)> */ func() bool { - position37, tokenIndex37 := position, tokenIndex + position46, tokenIndex46, depth46 := position, tokenIndex, depth { - position38 := position + position47 := position + depth++ { - position39 := position + position48 := position + depth++ { - position42, tokenIndex42 := position, tokenIndex + position51, tokenIndex51, depth51 := position, tokenIndex, depth { - position43, tokenIndex43 := position, tokenIndex + position52, tokenIndex52, depth52 := position, tokenIndex, depth if buffer[position] != rune(' ') { - goto l44 + goto l53 } position++ - goto l43 - l44: - position, tokenIndex = position43, tokenIndex43 + goto l52 + l53: + position, tokenIndex, depth = position52, tokenIndex52, depth52 if buffer[position] != rune('\t') { - goto l45 + goto l54 } position++ - goto l43 - l45: - position, tokenIndex = position43, tokenIndex43 + goto l52 + l54: + position, tokenIndex, depth = position52, tokenIndex52, depth52 if buffer[position] != rune('\n') { - goto l46 + goto l55 } position++ - goto l43 - l46: - position, tokenIndex = position43, tokenIndex43 + goto l52 + l55: + position, tokenIndex, depth = position52, tokenIndex52, depth52 if buffer[position] != rune('\r') { - goto l47 + goto l56 } position++ - goto l43 - l47: - position, tokenIndex = position43, tokenIndex43 + goto l52 + l56: + position, tokenIndex, depth = position52, tokenIndex52, depth52 if buffer[position] != rune('\\') { - goto l48 + goto l57 } position++ - goto l43 - l48: - position, tokenIndex = position43, tokenIndex43 + goto l52 + l57: + position, tokenIndex, depth = position52, tokenIndex52, depth52 if buffer[position] != rune('(') { - goto l49 + goto l58 } position++ - goto l43 - l49: - position, tokenIndex = position43, tokenIndex43 + goto l52 + l58: + position, tokenIndex, depth = position52, tokenIndex52, depth52 if buffer[position] != rune(')') { - goto l50 + goto l59 } position++ - goto l43 - l50: - position, tokenIndex = position43, tokenIndex43 + goto l52 + l59: + position, tokenIndex, depth = position52, tokenIndex52, depth52 if buffer[position] != rune('"') { - goto l51 + goto l60 } position++ - goto l43 - l51: - position, tokenIndex = position43, tokenIndex43 + goto l52 + l60: + position, tokenIndex, depth = position52, tokenIndex52, depth52 if buffer[position] != rune('\'') { - goto l52 + goto l61 } position++ - goto l43 - l52: - position, tokenIndex = position43, tokenIndex43 + goto l52 + l61: + position, tokenIndex, depth = position52, tokenIndex52, depth52 if buffer[position] != rune('=') { - goto l53 + goto l62 } position++ - goto l43 - l53: - position, tokenIndex = position43, tokenIndex43 + goto l52 + l62: + position, tokenIndex, depth = position52, tokenIndex52, depth52 if buffer[position] != rune('>') { - goto l54 + goto l63 } position++ - goto l43 - l54: - position, tokenIndex = position43, tokenIndex43 + goto l52 + l63: + position, tokenIndex, depth = position52, tokenIndex52, depth52 if buffer[position] != rune('<') { - goto l42 + goto l51 } position++ } - l43: - goto l37 - l42: - position, tokenIndex = position42, tokenIndex42 + l52: + goto l46 + l51: + position, tokenIndex, depth = position51, tokenIndex51, depth51 } if !matchDot() { - goto l37 + goto l46 } - l40: + l49: { - position41, tokenIndex41 := position, tokenIndex + position50, tokenIndex50, depth50 := position, tokenIndex, depth { - position55, tokenIndex55 := position, tokenIndex + position64, tokenIndex64, depth64 := position, tokenIndex, depth { - position56, tokenIndex56 := position, tokenIndex + position65, tokenIndex65, depth65 := position, tokenIndex, depth if buffer[position] != rune(' ') { - goto l57 + goto l66 } position++ - goto l56 - l57: - position, tokenIndex = position56, tokenIndex56 + goto l65 + l66: + position, tokenIndex, depth = position65, tokenIndex65, depth65 if buffer[position] != rune('\t') { - goto l58 + goto l67 } position++ - goto l56 - l58: - position, tokenIndex = position56, tokenIndex56 + goto l65 + l67: + position, tokenIndex, depth = position65, tokenIndex65, depth65 if buffer[position] != rune('\n') { - goto l59 + goto l68 } position++ - goto l56 - l59: - position, tokenIndex = position56, tokenIndex56 + goto l65 + l68: + position, tokenIndex, depth = position65, tokenIndex65, depth65 if buffer[position] != rune('\r') { - goto l60 + goto l69 } position++ - goto l56 - l60: - position, tokenIndex = position56, tokenIndex56 + goto l65 + l69: + position, tokenIndex, depth = position65, tokenIndex65, depth65 if buffer[position] != rune('\\') { - goto l61 + goto l70 } position++ - goto l56 - l61: - position, tokenIndex = position56, tokenIndex56 + goto l65 + l70: + position, tokenIndex, depth = position65, tokenIndex65, depth65 if buffer[position] != rune('(') { - goto l62 + goto l71 } position++ - goto l56 - l62: - position, tokenIndex = position56, tokenIndex56 + goto l65 + l71: + position, tokenIndex, depth = position65, tokenIndex65, depth65 if buffer[position] != rune(')') { - goto l63 + goto l72 } position++ - goto l56 - l63: - position, tokenIndex = position56, tokenIndex56 + goto l65 + l72: + position, tokenIndex, depth = position65, tokenIndex65, depth65 if buffer[position] != rune('"') { - goto l64 + goto l73 } position++ - goto l56 - l64: - position, tokenIndex = position56, tokenIndex56 + goto l65 + l73: + position, tokenIndex, depth = position65, tokenIndex65, depth65 if buffer[position] != rune('\'') { - goto l65 + goto l74 } position++ - goto l56 - l65: - position, tokenIndex = position56, tokenIndex56 + goto l65 + l74: + position, tokenIndex, depth = position65, tokenIndex65, depth65 if buffer[position] != rune('=') { - goto l66 + goto l75 } position++ - goto l56 - l66: - position, tokenIndex = position56, tokenIndex56 + goto l65 + l75: + position, tokenIndex, depth = position65, tokenIndex65, depth65 if buffer[position] != rune('>') { - goto l67 + goto l76 } position++ - goto l56 - l67: - position, tokenIndex = position56, tokenIndex56 + goto l65 + l76: + position, tokenIndex, depth = position65, tokenIndex65, depth65 if buffer[position] != rune('<') { - goto l55 + goto l64 } position++ } - l56: - goto l41 - l55: - position, tokenIndex = position55, tokenIndex55 + l65: + goto l50 + l64: + position, tokenIndex, depth = position64, tokenIndex64, depth64 } if !matchDot() { - goto l41 + goto l50 } - goto l40 - l41: - position, tokenIndex = position41, tokenIndex41 + goto l49 + l50: + position, tokenIndex, depth = position50, tokenIndex50, depth50 } - add(rulePegText, position39) + depth-- + add(rulePegText, position48) } if !_rules[rulesp]() { - goto l37 + goto l46 } - if !_rules[ruleAction8]() { - goto l37 + if !_rules[ruleAction10]() { + goto l46 } - add(ruletag, position38) + depth-- + add(ruletag, position47) } return true - l37: - position, tokenIndex = position37, tokenIndex37 + l46: + position, tokenIndex, depth = position46, tokenIndex46, depth46 return false }, - /* 5 qvalue <- <('\'' value '\'' sp)> */ + /* 6 qvalue <- <('\'' value '\'' sp)> */ func() bool { - position68, tokenIndex68 := position, tokenIndex + position77, tokenIndex77, depth77 := position, tokenIndex, depth { - position69 := position + position78 := position + depth++ if buffer[position] != rune('\'') { - goto l68 + goto l77 } position++ if !_rules[rulevalue]() { - goto l68 + goto l77 } if buffer[position] != rune('\'') { - goto l68 + goto l77 } position++ if !_rules[rulesp]() { - goto l68 + goto l77 } - add(ruleqvalue, position69) + depth-- + add(ruleqvalue, position78) } return true - l68: - position, tokenIndex = position68, tokenIndex68 + l77: + position, tokenIndex, depth = position77, tokenIndex77, depth77 return false }, - /* 6 value <- <(<(!('"' / '\'') .)*> Action9)> */ + /* 7 value <- <(<(!('"' / '\'') .)*> Action11)> */ func() bool { - position70, tokenIndex70 := position, tokenIndex + position79, tokenIndex79, depth79 := position, tokenIndex, depth { - position71 := position + position80 := position + depth++ { - position72 := position - l73: + position81 := position + depth++ + l82: { - position74, tokenIndex74 := position, tokenIndex + position83, tokenIndex83, depth83 := position, tokenIndex, depth { - position75, tokenIndex75 := position, tokenIndex + position84, tokenIndex84, depth84 := position, tokenIndex, depth { - position76, tokenIndex76 := position, tokenIndex + position85, tokenIndex85, depth85 := position, tokenIndex, depth if buffer[position] != rune('"') { - goto l77 + goto l86 } position++ - goto l76 - l77: - position, tokenIndex = position76, tokenIndex76 + goto l85 + l86: + position, tokenIndex, depth = position85, tokenIndex85, depth85 if buffer[position] != rune('\'') { - goto l75 + goto l84 } position++ } - l76: - goto l74 - l75: - position, tokenIndex = position75, tokenIndex75 + l85: + goto l83 + l84: + position, tokenIndex, depth = position84, tokenIndex84, depth84 } if !matchDot() { - goto l74 + goto l83 } - goto l73 - l74: - position, tokenIndex = position74, tokenIndex74 + goto l82 + l83: + position, tokenIndex, depth = position83, tokenIndex83, depth83 } - add(rulePegText, position72) + depth-- + add(rulePegText, position81) } - if !_rules[ruleAction9]() { - goto l70 + if !_rules[ruleAction11]() { + goto l79 } - add(rulevalue, position71) + depth-- + add(rulevalue, position80) } return true - l70: - position, tokenIndex = position70, tokenIndex70 + l79: + position, tokenIndex, depth = position79, tokenIndex79, depth79 return false }, - /* 7 number <- <(<('0' / ([1-9] digit* ('.' digit*)?))> Action10)> */ + /* 8 number <- <(<('0' / ([1-9] digit* ('.' digit*)?))> Action12)> */ func() bool { - position78, tokenIndex78 := position, tokenIndex + position87, tokenIndex87, depth87 := position, tokenIndex, depth { - position79 := position + position88 := position + depth++ { - position80 := position + position89 := position + depth++ { - position81, tokenIndex81 := position, tokenIndex + position90, tokenIndex90, depth90 := position, tokenIndex, depth if buffer[position] != rune('0') { - goto l82 + goto l91 } position++ - goto l81 - l82: - position, tokenIndex = position81, tokenIndex81 + goto l90 + l91: + position, tokenIndex, depth = position90, tokenIndex90, depth90 if c := buffer[position]; c < rune('1') || c > rune('9') { - goto l78 + goto l87 } position++ - l83: + l92: { - position84, tokenIndex84 := position, tokenIndex + position93, tokenIndex93, depth93 := position, tokenIndex, depth if !_rules[ruledigit]() { - goto l84 + goto l93 } - goto l83 - l84: - position, tokenIndex = position84, tokenIndex84 + goto l92 + l93: + position, tokenIndex, depth = position93, tokenIndex93, depth93 } { - position85, tokenIndex85 := position, tokenIndex + position94, tokenIndex94, depth94 := position, tokenIndex, depth if buffer[position] != rune('.') { - goto l85 + goto l94 } position++ - l87: + l96: { - position88, tokenIndex88 := position, tokenIndex + position97, tokenIndex97, depth97 := position, tokenIndex, depth if !_rules[ruledigit]() { - goto l88 + goto l97 } - goto l87 - l88: - position, tokenIndex = position88, tokenIndex88 + goto l96 + l97: + position, tokenIndex, depth = position97, tokenIndex97, depth97 } - goto l86 - l85: - position, tokenIndex = position85, tokenIndex85 + goto l95 + l94: + position, tokenIndex, depth = position94, tokenIndex94, depth94 } - l86: + l95: } - l81: - add(rulePegText, position80) + l90: + depth-- + add(rulePegText, position89) } - if !_rules[ruleAction10]() { - goto l78 + if !_rules[ruleAction12]() { + goto l87 } - add(rulenumber, position79) + depth-- + add(rulenumber, position88) } return true - l78: - position, tokenIndex = position78, tokenIndex78 + l87: + position, tokenIndex, depth = position87, tokenIndex87, depth87 return false }, - /* 8 digit <- <[0-9]> */ + /* 9 digit <- <[0-9]> */ func() bool { - position89, tokenIndex89 := position, tokenIndex + position98, tokenIndex98, depth98 := position, tokenIndex, depth { - position90 := position + position99 := position + depth++ if c := buffer[position]; c < rune('0') || c > rune('9') { - goto l89 + goto l98 } position++ - add(ruledigit, position90) + depth-- + add(ruledigit, position99) } return true - l89: - position, tokenIndex = position89, tokenIndex89 + l98: + position, tokenIndex, depth = position98, tokenIndex98, depth98 return false }, - /* 9 time <- <(('t' / 'T') ('i' / 'I') ('m' / 'M') ('e' / 'E') ' ' <(year '-' month '-' day 'T' digit digit ':' digit digit ':' digit digit ((('-' / '+') digit digit ':' digit digit) / 'Z'))> Action11)> */ + /* 10 time <- <(('t' / 'T') ('i' / 'I') ('m' / 'M') ('e' / 'E') ' ' <(year '-' month '-' day 'T' digit digit ':' digit digit ':' digit digit ((('-' / '+') digit digit ':' digit digit) / 'Z'))> Action13)> */ func() bool { - position91, tokenIndex91 := position, tokenIndex + position100, tokenIndex100, depth100 := position, tokenIndex, depth { - position92 := position + position101 := position + depth++ { - position93, tokenIndex93 := position, tokenIndex + position102, tokenIndex102, depth102 := position, tokenIndex, depth if buffer[position] != rune('t') { - goto l94 + goto l103 } position++ - goto l93 - l94: - position, tokenIndex = position93, tokenIndex93 + goto l102 + l103: + position, tokenIndex, depth = position102, tokenIndex102, depth102 if buffer[position] != rune('T') { - goto l91 + goto l100 } position++ } - l93: + l102: { - position95, tokenIndex95 := position, tokenIndex + position104, tokenIndex104, depth104 := position, tokenIndex, depth if buffer[position] != rune('i') { - goto l96 + goto l105 } position++ - goto l95 - l96: - position, tokenIndex = position95, tokenIndex95 + goto l104 + l105: + position, tokenIndex, depth = position104, tokenIndex104, depth104 if buffer[position] != rune('I') { - goto l91 + goto l100 } position++ } - l95: + l104: { - position97, tokenIndex97 := position, tokenIndex + position106, tokenIndex106, depth106 := position, tokenIndex, depth if buffer[position] != rune('m') { - goto l98 + goto l107 } position++ - goto l97 - l98: - position, tokenIndex = position97, tokenIndex97 + goto l106 + l107: + position, tokenIndex, depth = position106, tokenIndex106, depth106 if buffer[position] != rune('M') { - goto l91 + goto l100 } position++ } - l97: + l106: { - position99, tokenIndex99 := position, tokenIndex + position108, tokenIndex108, depth108 := position, tokenIndex, depth if buffer[position] != rune('e') { - goto l100 + goto l109 } position++ - goto l99 - l100: - position, tokenIndex = position99, tokenIndex99 + goto l108 + l109: + position, tokenIndex, depth = position108, tokenIndex108, depth108 if buffer[position] != rune('E') { - goto l91 + goto l100 } position++ } - l99: + l108: if buffer[position] != rune(' ') { - goto l91 + goto l100 } position++ { - position101 := position + position110 := position + depth++ if !_rules[ruleyear]() { - goto l91 + goto l100 } if buffer[position] != rune('-') { - goto l91 + goto l100 } position++ if !_rules[rulemonth]() { - goto l91 + goto l100 } if buffer[position] != rune('-') { - goto l91 + goto l100 } position++ if !_rules[ruleday]() { - goto l91 + goto l100 } if buffer[position] != rune('T') { - goto l91 + goto l100 } position++ if !_rules[ruledigit]() { - goto l91 + goto l100 } if !_rules[ruledigit]() { - goto l91 + goto l100 } if buffer[position] != rune(':') { - goto l91 + goto l100 } position++ if !_rules[ruledigit]() { - goto l91 + goto l100 } if !_rules[ruledigit]() { - goto l91 + goto l100 } if buffer[position] != rune(':') { - goto l91 + goto l100 } position++ if !_rules[ruledigit]() { - goto l91 + goto l100 } if !_rules[ruledigit]() { - goto l91 + goto l100 } { - position102, tokenIndex102 := position, tokenIndex + position111, tokenIndex111, depth111 := position, tokenIndex, depth { - position104, tokenIndex104 := position, tokenIndex + position113, tokenIndex113, depth113 := position, tokenIndex, depth if buffer[position] != rune('-') { - goto l105 + goto l114 } position++ - goto l104 - l105: - position, tokenIndex = position104, tokenIndex104 + goto l113 + l114: + position, tokenIndex, depth = position113, tokenIndex113, depth113 if buffer[position] != rune('+') { - goto l103 + goto l112 } position++ } - l104: + l113: if !_rules[ruledigit]() { - goto l103 + goto l112 } if !_rules[ruledigit]() { - goto l103 + goto l112 } if buffer[position] != rune(':') { - goto l103 + goto l112 } position++ if !_rules[ruledigit]() { - goto l103 + goto l112 } if !_rules[ruledigit]() { - goto l103 + goto l112 } - goto l102 - l103: - position, tokenIndex = position102, tokenIndex102 + goto l111 + l112: + position, tokenIndex, depth = position111, tokenIndex111, depth111 if buffer[position] != rune('Z') { - goto l91 + goto l100 } position++ } - l102: - add(rulePegText, position101) + l111: + depth-- + add(rulePegText, position110) } - if !_rules[ruleAction11]() { - goto l91 + if !_rules[ruleAction13]() { + goto l100 } - add(ruletime, position92) + depth-- + add(ruletime, position101) } return true - l91: - position, tokenIndex = position91, tokenIndex91 + l100: + position, tokenIndex, depth = position100, tokenIndex100, depth100 return false }, - /* 10 date <- <(('d' / 'D') ('a' / 'A') ('t' / 'T') ('e' / 'E') ' ' <(year '-' month '-' day)> Action12)> */ + /* 11 date <- <(('d' / 'D') ('a' / 'A') ('t' / 'T') ('e' / 'E') ' ' <(year '-' month '-' day)> Action14)> */ func() bool { - position106, tokenIndex106 := position, tokenIndex + position115, tokenIndex115, depth115 := position, tokenIndex, depth { - position107 := position + position116 := position + depth++ { - position108, tokenIndex108 := position, tokenIndex + position117, tokenIndex117, depth117 := position, tokenIndex, depth if buffer[position] != rune('d') { - goto l109 + goto l118 } position++ - goto l108 - l109: - position, tokenIndex = position108, tokenIndex108 + goto l117 + l118: + position, tokenIndex, depth = position117, tokenIndex117, depth117 if buffer[position] != rune('D') { - goto l106 + goto l115 } position++ } - l108: + l117: { - position110, tokenIndex110 := position, tokenIndex + position119, tokenIndex119, depth119 := position, tokenIndex, depth if buffer[position] != rune('a') { - goto l111 + goto l120 } position++ - goto l110 - l111: - position, tokenIndex = position110, tokenIndex110 + goto l119 + l120: + position, tokenIndex, depth = position119, tokenIndex119, depth119 if buffer[position] != rune('A') { - goto l106 + goto l115 } position++ } - l110: + l119: { - position112, tokenIndex112 := position, tokenIndex + position121, tokenIndex121, depth121 := position, tokenIndex, depth if buffer[position] != rune('t') { - goto l113 + goto l122 } position++ - goto l112 - l113: - position, tokenIndex = position112, tokenIndex112 + goto l121 + l122: + position, tokenIndex, depth = position121, tokenIndex121, depth121 if buffer[position] != rune('T') { - goto l106 + goto l115 } position++ } - l112: + l121: { - position114, tokenIndex114 := position, tokenIndex + position123, tokenIndex123, depth123 := position, tokenIndex, depth if buffer[position] != rune('e') { - goto l115 + goto l124 } position++ - goto l114 - l115: - position, tokenIndex = position114, tokenIndex114 + goto l123 + l124: + position, tokenIndex, depth = position123, tokenIndex123, depth123 if buffer[position] != rune('E') { - goto l106 + goto l115 } position++ } - l114: + l123: if buffer[position] != rune(' ') { - goto l106 + goto l115 } position++ { - position116 := position + position125 := position + depth++ if !_rules[ruleyear]() { - goto l106 + goto l115 } if buffer[position] != rune('-') { - goto l106 + goto l115 } position++ if !_rules[rulemonth]() { - goto l106 + goto l115 } if buffer[position] != rune('-') { - goto l106 + goto l115 } position++ if !_rules[ruleday]() { - goto l106 + goto l115 } - add(rulePegText, position116) + depth-- + add(rulePegText, position125) } - if !_rules[ruleAction12]() { - goto l106 + if !_rules[ruleAction14]() { + goto l115 } - add(ruledate, position107) + depth-- + add(ruledate, position116) } return true - l106: - position, tokenIndex = position106, tokenIndex106 + l115: + position, tokenIndex, depth = position115, tokenIndex115, depth115 return false }, - /* 11 year <- <(('1' / '2') digit digit digit)> */ + /* 12 year <- <(('1' / '2') digit digit digit)> */ func() bool { - position117, tokenIndex117 := position, tokenIndex + position126, tokenIndex126, depth126 := position, tokenIndex, depth { - position118 := position + position127 := position + depth++ { - position119, tokenIndex119 := position, tokenIndex + position128, tokenIndex128, depth128 := position, tokenIndex, depth if buffer[position] != rune('1') { - goto l120 + goto l129 } position++ - goto l119 - l120: - position, tokenIndex = position119, tokenIndex119 + goto l128 + l129: + position, tokenIndex, depth = position128, tokenIndex128, depth128 if buffer[position] != rune('2') { - goto l117 + goto l126 } position++ } - l119: + l128: if !_rules[ruledigit]() { - goto l117 + goto l126 } if !_rules[ruledigit]() { - goto l117 + goto l126 } if !_rules[ruledigit]() { - goto l117 + goto l126 } - add(ruleyear, position118) + depth-- + add(ruleyear, position127) } return true - l117: - position, tokenIndex = position117, tokenIndex117 + l126: + position, tokenIndex, depth = position126, tokenIndex126, depth126 return false }, - /* 12 month <- <(('0' / '1') digit)> */ + /* 13 month <- <(('0' / '1') digit)> */ func() bool { - position121, tokenIndex121 := position, tokenIndex + position130, tokenIndex130, depth130 := position, tokenIndex, depth { - position122 := position + position131 := position + depth++ { - position123, tokenIndex123 := position, tokenIndex + position132, tokenIndex132, depth132 := position, tokenIndex, depth if buffer[position] != rune('0') { - goto l124 + goto l133 } position++ - goto l123 - l124: - position, tokenIndex = position123, tokenIndex123 + goto l132 + l133: + position, tokenIndex, depth = position132, tokenIndex132, depth132 if buffer[position] != rune('1') { - goto l121 + goto l130 } position++ } - l123: + l132: if !_rules[ruledigit]() { - goto l121 + goto l130 } - add(rulemonth, position122) + depth-- + add(rulemonth, position131) } return true - l121: - position, tokenIndex = position121, tokenIndex121 + l130: + position, tokenIndex, depth = position130, tokenIndex130, depth130 return false }, - /* 13 day <- <(('0' / '1' / '2' / '3') digit)> */ + /* 14 day <- <(('0' / '1' / '2' / '3') digit)> */ func() bool { - position125, tokenIndex125 := position, tokenIndex + position134, tokenIndex134, depth134 := position, tokenIndex, depth { - position126 := position + position135 := position + depth++ { - position127, tokenIndex127 := position, tokenIndex + position136, tokenIndex136, depth136 := position, tokenIndex, depth if buffer[position] != rune('0') { - goto l128 + goto l137 } position++ - goto l127 - l128: - position, tokenIndex = position127, tokenIndex127 + goto l136 + l137: + position, tokenIndex, depth = position136, tokenIndex136, depth136 if buffer[position] != rune('1') { - goto l129 + goto l138 } position++ - goto l127 - l129: - position, tokenIndex = position127, tokenIndex127 + goto l136 + l138: + position, tokenIndex, depth = position136, tokenIndex136, depth136 if buffer[position] != rune('2') { - goto l130 + goto l139 } position++ - goto l127 - l130: - position, tokenIndex = position127, tokenIndex127 + goto l136 + l139: + position, tokenIndex, depth = position136, tokenIndex136, depth136 if buffer[position] != rune('3') { - goto l125 + goto l134 } position++ } - l127: + l136: if !_rules[ruledigit]() { - goto l125 + goto l134 } - add(ruleday, position126) + depth-- + add(ruleday, position135) } return true - l125: - position, tokenIndex = position125, tokenIndex125 + l134: + position, tokenIndex, depth = position134, tokenIndex134, depth134 return false }, - /* 14 and <- <(('a' / 'A') ('n' / 'N') ('d' / 'D') sp)> */ + /* 15 and <- <(('a' / 'A') ('n' / 'N') ('d' / 'D') sp)> */ func() bool { - position131, tokenIndex131 := position, tokenIndex + position140, tokenIndex140, depth140 := position, tokenIndex, depth { - position132 := position + position141 := position + depth++ { - position133, tokenIndex133 := position, tokenIndex + position142, tokenIndex142, depth142 := position, tokenIndex, depth if buffer[position] != rune('a') { - goto l134 + goto l143 } position++ - goto l133 - l134: - position, tokenIndex = position133, tokenIndex133 + goto l142 + l143: + position, tokenIndex, depth = position142, tokenIndex142, depth142 if buffer[position] != rune('A') { - goto l131 + goto l140 } position++ } - l133: + l142: { - position135, tokenIndex135 := position, tokenIndex + position144, tokenIndex144, depth144 := position, tokenIndex, depth if buffer[position] != rune('n') { - goto l136 + goto l145 } position++ - goto l135 - l136: - position, tokenIndex = position135, tokenIndex135 + goto l144 + l145: + position, tokenIndex, depth = position144, tokenIndex144, depth144 if buffer[position] != rune('N') { - goto l131 + goto l140 } position++ } - l135: + l144: { - position137, tokenIndex137 := position, tokenIndex + position146, tokenIndex146, depth146 := position, tokenIndex, depth if buffer[position] != rune('d') { - goto l138 + goto l147 } position++ - goto l137 - l138: - position, tokenIndex = position137, tokenIndex137 + goto l146 + l147: + position, tokenIndex, depth = position146, tokenIndex146, depth146 if buffer[position] != rune('D') { - goto l131 + goto l140 } position++ } - l137: + l146: if !_rules[rulesp]() { - goto l131 + goto l140 } - add(ruleand, position132) + depth-- + add(ruleand, position141) } return true - l131: - position, tokenIndex = position131, tokenIndex131 + l140: + position, tokenIndex, depth = position140, tokenIndex140, depth140 return false }, - /* 15 or <- <(('o' / 'O') ('r' / 'R') sp)> */ + /* 16 or <- <(('o' / 'O') ('r' / 'R') sp)> */ func() bool { - position139, tokenIndex139 := position, tokenIndex + position148, tokenIndex148, depth148 := position, tokenIndex, depth { - position140 := position + position149 := position + depth++ { - position141, tokenIndex141 := position, tokenIndex + position150, tokenIndex150, depth150 := position, tokenIndex, depth if buffer[position] != rune('o') { - goto l142 + goto l151 } position++ - goto l141 - l142: - position, tokenIndex = position141, tokenIndex141 + goto l150 + l151: + position, tokenIndex, depth = position150, tokenIndex150, depth150 if buffer[position] != rune('O') { - goto l139 + goto l148 } position++ } - l141: + l150: { - position143, tokenIndex143 := position, tokenIndex + position152, tokenIndex152, depth152 := position, tokenIndex, depth if buffer[position] != rune('r') { - goto l144 + goto l153 } position++ - goto l143 - l144: - position, tokenIndex = position143, tokenIndex143 + goto l152 + l153: + position, tokenIndex, depth = position152, tokenIndex152, depth152 if buffer[position] != rune('R') { - goto l139 + goto l148 + } + position++ + } + l152: + if !_rules[rulesp]() { + goto l148 + } + depth-- + add(ruleor, position149) + } + return true + l148: + position, tokenIndex, depth = position148, tokenIndex148, depth148 + return false + }, + /* 17 not <- <(('n' / 'N') ('o' / 'O') ('t' / 'T') sp)> */ + func() bool { + position154, tokenIndex154, depth154 := position, tokenIndex, depth + { + position155 := position + depth++ + { + position156, tokenIndex156, depth156 := position, tokenIndex, depth + if buffer[position] != rune('n') { + goto l157 + } + position++ + goto l156 + l157: + position, tokenIndex, depth = position156, tokenIndex156, depth156 + if buffer[position] != rune('N') { + goto l154 + } + position++ + } + l156: + { + position158, tokenIndex158, depth158 := position, tokenIndex, depth + if buffer[position] != rune('o') { + goto l159 + } + position++ + goto l158 + l159: + position, tokenIndex, depth = position158, tokenIndex158, depth158 + if buffer[position] != rune('O') { + goto l154 } position++ } - l143: + l158: + { + position160, tokenIndex160, depth160 := position, tokenIndex, depth + if buffer[position] != rune('t') { + goto l161 + } + position++ + goto l160 + l161: + position, tokenIndex, depth = position160, tokenIndex160, depth160 + if buffer[position] != rune('T') { + goto l154 + } + position++ + } + l160: + if !_rules[rulesp]() { + goto l154 + } + depth-- + add(rulenot, position155) + } + return true + l154: + position, tokenIndex, depth = position154, tokenIndex154, depth154 + return false + }, + /* 18 equal <- <('=' sp)> */ + func() bool { + position162, tokenIndex162, depth162 := position, tokenIndex, depth + { + position163 := position + depth++ + if buffer[position] != rune('=') { + goto l162 + } + position++ if !_rules[rulesp]() { - goto l139 + goto l162 } - add(ruleor, position140) + depth-- + add(ruleequal, position163) } return true - l139: - position, tokenIndex = position139, tokenIndex139 + l162: + position, tokenIndex, depth = position162, tokenIndex162, depth162 return false }, - /* 16 equal <- <('=' sp)> */ + /* 19 ne <- <('!' '=' sp)> */ func() bool { - position145, tokenIndex145 := position, tokenIndex + position164, tokenIndex164, depth164 := position, tokenIndex, depth { - position146 := position + position165 := position + depth++ + if buffer[position] != rune('!') { + goto l164 + } + position++ if buffer[position] != rune('=') { - goto l145 + goto l164 } position++ if !_rules[rulesp]() { - goto l145 + goto l164 } - add(ruleequal, position146) + depth-- + add(rulene, position165) } return true - l145: - position, tokenIndex = position145, tokenIndex145 + l164: + position, tokenIndex, depth = position164, tokenIndex164, depth164 return false }, - /* 17 contains <- <(('c' / 'C') ('o' / 'O') ('n' / 'N') ('t' / 'T') ('a' / 'A') ('i' / 'I') ('n' / 'N') ('s' / 'S') sp)> */ + /* 20 contains <- <(('c' / 'C') ('o' / 'O') ('n' / 'N') ('t' / 'T') ('a' / 'A') ('i' / 'I') ('n' / 'N') ('s' / 'S') sp)> */ func() bool { - position147, tokenIndex147 := position, tokenIndex + position166, tokenIndex166, depth166 := position, tokenIndex, depth { - position148 := position + position167 := position + depth++ { - position149, tokenIndex149 := position, tokenIndex + position168, tokenIndex168, depth168 := position, tokenIndex, depth if buffer[position] != rune('c') { - goto l150 + goto l169 } position++ - goto l149 - l150: - position, tokenIndex = position149, tokenIndex149 + goto l168 + l169: + position, tokenIndex, depth = position168, tokenIndex168, depth168 if buffer[position] != rune('C') { - goto l147 + goto l166 } position++ } - l149: + l168: { - position151, tokenIndex151 := position, tokenIndex + position170, tokenIndex170, depth170 := position, tokenIndex, depth if buffer[position] != rune('o') { - goto l152 + goto l171 } position++ - goto l151 - l152: - position, tokenIndex = position151, tokenIndex151 + goto l170 + l171: + position, tokenIndex, depth = position170, tokenIndex170, depth170 if buffer[position] != rune('O') { - goto l147 + goto l166 } position++ } - l151: + l170: { - position153, tokenIndex153 := position, tokenIndex + position172, tokenIndex172, depth172 := position, tokenIndex, depth if buffer[position] != rune('n') { - goto l154 + goto l173 } position++ - goto l153 - l154: - position, tokenIndex = position153, tokenIndex153 + goto l172 + l173: + position, tokenIndex, depth = position172, tokenIndex172, depth172 if buffer[position] != rune('N') { - goto l147 + goto l166 } position++ } - l153: + l172: { - position155, tokenIndex155 := position, tokenIndex + position174, tokenIndex174, depth174 := position, tokenIndex, depth if buffer[position] != rune('t') { - goto l156 + goto l175 } position++ - goto l155 - l156: - position, tokenIndex = position155, tokenIndex155 + goto l174 + l175: + position, tokenIndex, depth = position174, tokenIndex174, depth174 if buffer[position] != rune('T') { - goto l147 + goto l166 } position++ } - l155: + l174: { - position157, tokenIndex157 := position, tokenIndex + position176, tokenIndex176, depth176 := position, tokenIndex, depth if buffer[position] != rune('a') { - goto l158 + goto l177 } position++ - goto l157 - l158: - position, tokenIndex = position157, tokenIndex157 + goto l176 + l177: + position, tokenIndex, depth = position176, tokenIndex176, depth176 if buffer[position] != rune('A') { - goto l147 + goto l166 } position++ } - l157: + l176: { - position159, tokenIndex159 := position, tokenIndex + position178, tokenIndex178, depth178 := position, tokenIndex, depth if buffer[position] != rune('i') { - goto l160 + goto l179 } position++ - goto l159 - l160: - position, tokenIndex = position159, tokenIndex159 + goto l178 + l179: + position, tokenIndex, depth = position178, tokenIndex178, depth178 if buffer[position] != rune('I') { - goto l147 + goto l166 } position++ } - l159: + l178: { - position161, tokenIndex161 := position, tokenIndex + position180, tokenIndex180, depth180 := position, tokenIndex, depth if buffer[position] != rune('n') { - goto l162 + goto l181 } position++ - goto l161 - l162: - position, tokenIndex = position161, tokenIndex161 + goto l180 + l181: + position, tokenIndex, depth = position180, tokenIndex180, depth180 if buffer[position] != rune('N') { - goto l147 + goto l166 } position++ } - l161: + l180: { - position163, tokenIndex163 := position, tokenIndex + position182, tokenIndex182, depth182 := position, tokenIndex, depth if buffer[position] != rune('s') { - goto l164 + goto l183 } position++ - goto l163 - l164: - position, tokenIndex = position163, tokenIndex163 + goto l182 + l183: + position, tokenIndex, depth = position182, tokenIndex182, depth182 if buffer[position] != rune('S') { - goto l147 + goto l166 } position++ } - l163: + l182: if !_rules[rulesp]() { - goto l147 + goto l166 } - add(rulecontains, position148) + depth-- + add(rulecontains, position167) } return true - l147: - position, tokenIndex = position147, tokenIndex147 + l166: + position, tokenIndex, depth = position166, tokenIndex166, depth166 return false }, - /* 18 le <- <('<' '=' sp)> */ + /* 21 le <- <('<' '=' sp)> */ func() bool { - position165, tokenIndex165 := position, tokenIndex + position184, tokenIndex184, depth184 := position, tokenIndex, depth { - position166 := position + position185 := position + depth++ if buffer[position] != rune('<') { - goto l165 + goto l184 } position++ if buffer[position] != rune('=') { - goto l165 + goto l184 } position++ if !_rules[rulesp]() { - goto l165 + goto l184 } - add(rulele, position166) + depth-- + add(rulele, position185) } return true - l165: - position, tokenIndex = position165, tokenIndex165 + l184: + position, tokenIndex, depth = position184, tokenIndex184, depth184 return false }, - /* 19 ge <- <('>' '=' sp)> */ + /* 22 ge <- <('>' '=' sp)> */ func() bool { - position167, tokenIndex167 := position, tokenIndex + position186, tokenIndex186, depth186 := position, tokenIndex, depth { - position168 := position + position187 := position + depth++ if buffer[position] != rune('>') { - goto l167 + goto l186 } position++ if buffer[position] != rune('=') { - goto l167 + goto l186 } position++ if !_rules[rulesp]() { - goto l167 + goto l186 } - add(rulege, position168) + depth-- + add(rulege, position187) } return true - l167: - position, tokenIndex = position167, tokenIndex167 + l186: + position, tokenIndex, depth = position186, tokenIndex186, depth186 return false }, - /* 20 l <- <('<' sp)> */ + /* 23 l <- <('<' sp)> */ func() bool { - position169, tokenIndex169 := position, tokenIndex + position188, tokenIndex188, depth188 := position, tokenIndex, depth { - position170 := position + position189 := position + depth++ if buffer[position] != rune('<') { - goto l169 + goto l188 } position++ if !_rules[rulesp]() { - goto l169 + goto l188 } - add(rulel, position170) + depth-- + add(rulel, position189) } return true - l169: - position, tokenIndex = position169, tokenIndex169 + l188: + position, tokenIndex, depth = position188, tokenIndex188, depth188 return false }, - /* 21 g <- <('>' sp)> */ + /* 24 g <- <('>' sp)> */ func() bool { - position171, tokenIndex171 := position, tokenIndex + position190, tokenIndex190, depth190 := position, tokenIndex, depth { - position172 := position + position191 := position + depth++ if buffer[position] != rune('>') { - goto l171 + goto l190 } position++ if !_rules[rulesp]() { - goto l171 + goto l190 } - add(ruleg, position172) + depth-- + add(ruleg, position191) } return true - l171: - position, tokenIndex = position171, tokenIndex171 + l190: + position, tokenIndex, depth = position190, tokenIndex190, depth190 return false }, - /* 22 open <- <('(' sp)> */ + /* 25 open <- <('(' sp)> */ func() bool { - position173, tokenIndex173 := position, tokenIndex + position192, tokenIndex192, depth192 := position, tokenIndex, depth { - position174 := position + position193 := position + depth++ if buffer[position] != rune('(') { - goto l173 + goto l192 } position++ if !_rules[rulesp]() { - goto l173 + goto l192 } - add(ruleopen, position174) + depth-- + add(ruleopen, position193) } return true - l173: - position, tokenIndex = position173, tokenIndex173 + l192: + position, tokenIndex, depth = position192, tokenIndex192, depth192 return false }, - /* 23 close <- <(')' sp)> */ + /* 26 close <- <(')' sp)> */ func() bool { - position175, tokenIndex175 := position, tokenIndex + position194, tokenIndex194, depth194 := position, tokenIndex, depth { - position176 := position + position195 := position + depth++ if buffer[position] != rune(')') { - goto l175 + goto l194 } position++ if !_rules[rulesp]() { - goto l175 + goto l194 } - add(ruleclose, position176) + depth-- + add(ruleclose, position195) } return true - l175: - position, tokenIndex = position175, tokenIndex175 + l194: + position, tokenIndex, depth = position194, tokenIndex194, depth194 return false }, - /* 24 sp <- <(' ' / '\t')*> */ + /* 27 sp <- <(' ' / '\t')*> */ func() bool { { - position178 := position - l179: + position197 := position + depth++ + l198: { - position180, tokenIndex180 := position, tokenIndex + position199, tokenIndex199, depth199 := position, tokenIndex, depth { - position181, tokenIndex181 := position, tokenIndex + position200, tokenIndex200, depth200 := position, tokenIndex, depth if buffer[position] != rune(' ') { - goto l182 + goto l201 } position++ - goto l181 - l182: - position, tokenIndex = position181, tokenIndex181 + goto l200 + l201: + position, tokenIndex, depth = position200, tokenIndex200, depth200 if buffer[position] != rune('\t') { - goto l180 + goto l199 } position++ } - l181: - goto l179 - l180: - position, tokenIndex = position180, tokenIndex180 + l200: + goto l198 + l199: + position, tokenIndex, depth = position199, tokenIndex199, depth199 } - add(rulesp, position178) + depth-- + add(rulesp, position197) } return true }, - /* 26 Action0 <- <{ p.Operator(OpOr) }> */ + /* 29 Action0 <- <{ p.Operator(OpOr) }> */ func() bool { { add(ruleAction0, position) } return true }, - /* 27 Action1 <- <{ p.Operator(OpAnd) }> */ + /* 30 Action1 <- <{ p.Operator(OpAnd) }> */ func() bool { { add(ruleAction1, position) } return true }, - /* 28 Action2 <- <{ p.Operator(OpLessEqual) }> */ + /* 31 Action2 <- <{ p.Operator(OpNot) }> */ func() bool { { add(ruleAction2, position) } return true }, - /* 29 Action3 <- <{ p.Operator(OpGreaterEqual) }> */ + /* 32 Action3 <- <{ p.Operator(OpLessEqual) }> */ func() bool { { add(ruleAction3, position) } return true }, - /* 30 Action4 <- <{ p.Operator(OpLess) }> */ + /* 33 Action4 <- <{ p.Operator(OpGreaterEqual) }> */ func() bool { { add(ruleAction4, position) } return true }, - /* 31 Action5 <- <{ p.Operator(OpGreater) }> */ + /* 34 Action5 <- <{ p.Operator(OpLess) }> */ func() bool { { add(ruleAction5, position) } return true }, - /* 32 Action6 <- <{ p.Operator(OpEqual) }> */ + /* 35 Action6 <- <{ p.Operator(OpGreater) }> */ func() bool { { add(ruleAction6, position) } return true }, - /* 33 Action7 <- <{ p.Operator(OpContains) }> */ + /* 36 Action7 <- <{ p.Operator(OpEqual) }> */ func() bool { { add(ruleAction7, position) } return true }, - nil, - /* 35 Action8 <- <{ p.Tag(buffer[begin:end]) }> */ + /* 37 Action8 <- <{ p.Operator(OpNotEqual) }> */ func() bool { { add(ruleAction8, position) } return true }, - /* 36 Action9 <- <{ p.Value(buffer[begin:end]) }> */ + /* 38 Action9 <- <{ p.Operator(OpContains) }> */ func() bool { { add(ruleAction9, position) } return true }, - /* 37 Action10 <- <{ p.Number(buffer[begin:end]) }> */ + nil, + /* 40 Action10 <- <{ p.Tag(buffer[begin:end]) }> */ func() bool { { add(ruleAction10, position) } return true }, - /* 38 Action11 <- <{ p.Time(buffer[begin:end]) }> */ + /* 41 Action11 <- <{ p.Value(buffer[begin:end]) }> */ func() bool { { add(ruleAction11, position) } return true }, - /* 39 Action12 <- <{ p.Date(buffer[begin:end]) }> */ + /* 42 Action12 <- <{ p.Number(buffer[begin:end]) }> */ func() bool { { add(ruleAction12, position) } return true }, + /* 43 Action13 <- <{ p.Time(buffer[begin:end]) }> */ + func() bool { + { + add(ruleAction13, position) + } + return true + }, + /* 44 Action14 <- <{ p.Date(buffer[begin:end]) }> */ + func() bool { + { + add(ruleAction14, position) + } + return true + }, } p.rules = _rules - return nil } diff --git a/event/query/query_test.go b/event/query/query_test.go index b91344e52..86b195b09 100644 --- a/event/query/query_test.go +++ b/event/query/query_test.go @@ -23,6 +23,15 @@ func TestMatches(t *testing.T) { err bool matches bool }{ + // This one is debatable, we could match != 1, but it's likely to be a mistake so we will have nil matches nothing for now + {"Address = '12345' OR Height != 1", map[string]interface{}{"Height": nil, "Address": "54321"}, false, false}, + {"Address = '12345' OR Height != 1", map[string]interface{}{"Height": 1, "Address": "54321"}, false, false}, + {"Address = '12345' OR Height != 1", map[string]interface{}{"Height": 2, "Address": "54321"}, false, true}, + {"Address = '12345' OR Height != 1", map[string]interface{}{"Height": 1, "Address": "12345"}, false, true}, + {"(NOT (Height < 4)) OR Height = 1", map[string]interface{}{"Height": 1}, false, true}, + {"(NOT (Height < 4)) OR Height = 1", map[string]interface{}{"Height": 3}, false, false}, + {"NOT (Height = 4)", map[string]interface{}{"Height": 3}, false, true}, + {"Height != 4", map[string]interface{}{"Height": 3}, false, true}, {"Height CONTAINS '2'", map[string]interface{}{"Height": uint64(12)}, false, true}, {"Height CONTAINS '2'", map[string]interface{}{"Height": uint64(11)}, false, false}, {"foo > 10", map[string]interface{}{"foo": 11}, false, true}, diff --git a/execution/errors/maybe.go b/execution/errors/maybe.go index 9ac9d1086..24da47686 100644 --- a/execution/errors/maybe.go +++ b/execution/errors/maybe.go @@ -1,6 +1,8 @@ package errors import ( + "math/big" + "github.com/hyperledger/burrow/crypto" ) @@ -61,6 +63,13 @@ func (m *Maybe) Address(value crypto.Address, err error) crypto.Address { return value } +func (m *Maybe) BigInt(value *big.Int, err error) *big.Int { + if err != nil { + m.PushError(err) + } + return value +} + func (m *Maybe) Void(err error) { m.PushError(err) } diff --git a/execution/evm/abi/primitives.go b/execution/evm/abi/primitives.go index f3014f656..1982613fa 100644 --- a/execution/evm/abi/primitives.go +++ b/execution/evm/abi/primitives.go @@ -188,7 +188,7 @@ func (e EVMUint) pack(v interface{}) ([]byte, error) { b := n.Bytes() if uint64(len(b)) > e.M { - return nil, fmt.Errorf("value to large for int%d", e.M) + return nil, fmt.Errorf("value too large for int%d", e.M) } return pad(b, ElementSize, true), nil } @@ -219,49 +219,49 @@ func (e EVMUint) unpack(data []byte, offset int, v interface{}) (int, error) { case *uint64: maxLen := int(unsafe.Sizeof(*v)) if length > maxLen { - return 0, fmt.Errorf("value to large for uint64") + return 0, fmt.Errorf("value too large for uint64") } *v = binary.BigEndian.Uint64(data[ElementSize-maxLen : ElementSize]) case *uint32: maxLen := int(unsafe.Sizeof(*v)) if length > maxLen { - return 0, fmt.Errorf("value to large for uint64") + return 0, fmt.Errorf("value too large for uint64") } *v = binary.BigEndian.Uint32(data[ElementSize-maxLen : ElementSize]) case *uint16: maxLen := int(unsafe.Sizeof(*v)) if length > maxLen { - return 0, fmt.Errorf("value to large for uint16") + return 0, fmt.Errorf("value too large for uint16") } *v = binary.BigEndian.Uint16(data[ElementSize-maxLen : ElementSize]) case *uint8: maxLen := 1 if length > maxLen { - return 0, fmt.Errorf("value to large for uint8") + return 0, fmt.Errorf("value too large for uint8") } *v = uint8(data[31]) case *int64: maxLen := int(unsafe.Sizeof(*v)) if length > maxLen || (data[ElementSize-maxLen]&0x80) != 0 { - return 0, fmt.Errorf("value to large for int64") + return 0, fmt.Errorf("value too large for int64") } *v = int64(binary.BigEndian.Uint64(data[ElementSize-maxLen : ElementSize])) case *int32: maxLen := int(unsafe.Sizeof(*v)) if length > maxLen || (data[ElementSize-maxLen]&0x80) != 0 { - return 0, fmt.Errorf("value to large for int64") + return 0, fmt.Errorf("value too large for int32") } *v = int32(binary.BigEndian.Uint32(data[ElementSize-maxLen : ElementSize])) case *int16: maxLen := int(unsafe.Sizeof(*v)) if length > maxLen || (data[ElementSize-maxLen]&0x80) != 0 { - return 0, fmt.Errorf("value to large for int16") + return 0, fmt.Errorf("value too large for int16") } *v = int16(binary.BigEndian.Uint16(data[ElementSize-maxLen : ElementSize])) case *int8: maxLen := 1 if length > maxLen || (data[ElementSize-maxLen]&0x80) != 0 { - return 0, fmt.Errorf("value to large for int8") + return 0, fmt.Errorf("value too large for int8") } *v = int8(data[ElementSize-1]) default: @@ -355,11 +355,11 @@ func (e EVMInt) pack(v interface{}) ([]byte, error) { b := n.Bytes() if uint64(len(b)) > e.M { - return nil, fmt.Errorf("value to large for int%d", e.M) + return nil, fmt.Errorf("value too large for int%d", e.M) } res := pad(b, ElementSize, true) if (res[0] & 0x80) != 0 { - return nil, fmt.Errorf("value to large for int%d", e.M) + return nil, fmt.Errorf("value too large for int%d", e.M) } if n.Sign() < 0 { // One's complement; i.e. 0xffff is -1, not 0. @@ -428,7 +428,7 @@ func (e EVMInt) unpack(data []byte, offset int, v interface{}) (int, error) { } maxLen := int(unsafe.Sizeof(*v)) if length > maxLen { - return 0, fmt.Errorf("value to large for %T", *v) + return 0, fmt.Errorf("value too large for %T", *v) } *v = binary.BigEndian.Uint64(data[ElementSize-maxLen : ElementSize]) case *uint32: @@ -437,7 +437,7 @@ func (e EVMInt) unpack(data []byte, offset int, v interface{}) (int, error) { } maxLen := int(unsafe.Sizeof(*v)) if length > maxLen { - return 0, fmt.Errorf("value to large for %T", *v) + return 0, fmt.Errorf("value too large for %T", *v) } *v = binary.BigEndian.Uint32(data[ElementSize-maxLen : ElementSize]) case *uint16: @@ -446,7 +446,7 @@ func (e EVMInt) unpack(data []byte, offset int, v interface{}) (int, error) { } maxLen := int(unsafe.Sizeof(*v)) if length > maxLen { - return 0, fmt.Errorf("value to large for %T", *v) + return 0, fmt.Errorf("value too large for %T", *v) } *v = binary.BigEndian.Uint16(data[ElementSize-maxLen : ElementSize]) case *uint8: @@ -454,30 +454,30 @@ func (e EVMInt) unpack(data []byte, offset int, v interface{}) (int, error) { return 0, fmt.Errorf("cannot convert negative EVM int to %T", *v) } if length > 1 { - return 0, fmt.Errorf("value to large for %T", *v) + return 0, fmt.Errorf("value too large for %T", *v) } *v = data[ElementSize-1] case *int64: maxLen := int(unsafe.Sizeof(*v)) if length > maxLen || (inv[ElementSize-maxLen]&0x80) != 0 { - return 0, fmt.Errorf("value to large for %T", *v) + return 0, fmt.Errorf("value too large for %T", *v) } *v = int64(binary.BigEndian.Uint64(data[ElementSize-maxLen : ElementSize])) case *int32: maxLen := int(unsafe.Sizeof(*v)) if length > maxLen || (inv[ElementSize-maxLen]&0x80) != 0 { - return 0, fmt.Errorf("value to large for %T", *v) + return 0, fmt.Errorf("value too large for %T", *v) } *v = int32(binary.BigEndian.Uint32(data[ElementSize-maxLen : ElementSize])) case *int16: maxLen := int(unsafe.Sizeof(*v)) if length > maxLen || (inv[ElementSize-maxLen]&0x80) != 0 { - return 0, fmt.Errorf("value to large for %T", *v) + return 0, fmt.Errorf("value too large for %T", *v) } *v = int16(binary.BigEndian.Uint16(data[ElementSize-maxLen : ElementSize])) case *int8: if length > 1 || (inv[ElementSize-1]&0x80) != 0 { - return 0, fmt.Errorf("value to large for %T", *v) + return 0, fmt.Errorf("value too large for %T", *v) } *v = int8(data[ElementSize-1]) default: diff --git a/execution/exec/event.go b/execution/exec/event.go index 82687f75a..153f38c3c 100644 --- a/execution/exec/event.go +++ b/execution/exec/event.go @@ -3,6 +3,9 @@ package exec import ( "fmt" "reflect" + + "github.com/hyperledger/burrow/event" + "github.com/hyperledger/burrow/event/query" ) var eventMessageType = reflect.TypeOf(&Event{}).String() @@ -94,3 +97,22 @@ func (ev *Event) Body() string { } return "" } + +func (ev *Event) Get(key string) (value interface{}, ok bool) { + switch key { + case event.MessageTypeKey: + return eventMessageType, true + } + if ev == nil { + return nil, false + } + v, ok := ev.Log.Get(key) + if ok { + return v, true + } + v, ok = query.GetReflect(reflect.ValueOf(ev.Header), key) + if ok { + return v, true + } + return query.GetReflect(reflect.ValueOf(ev), key) +} diff --git a/execution/exec/events.go b/execution/exec/events.go index 3f396aa3a..6c5be8f6a 100644 --- a/execution/exec/events.go +++ b/execution/exec/events.go @@ -2,10 +2,8 @@ package exec import ( "fmt" - "reflect" "strings" - "github.com/hyperledger/burrow/event" "github.com/hyperledger/burrow/event/query" "github.com/hyperledger/burrow/execution/errors" ) @@ -104,22 +102,3 @@ func (evs Events) Filter(qry query.Query) Events { } return filtered } - -func (ev *Event) Get(key string) (value interface{}, ok bool) { - switch key { - case event.MessageTypeKey: - return eventMessageType, true - } - if ev == nil { - return nil, false - } - v, ok := ev.Log.Get(key) - if ok { - return v, true - } - v, ok = query.GetReflect(reflect.ValueOf(ev.Header), key) - if ok { - return v, true - } - return query.GetReflect(reflect.ValueOf(ev), key) -} diff --git a/execution/exec/log_event.go b/execution/exec/log_event.go index 5d457cfdf..403793c4a 100644 --- a/execution/exec/log_event.go +++ b/execution/exec/log_event.go @@ -67,8 +67,8 @@ func (log *LogEvent) GetTopic(i int) Word256 { return Word256{} } -func (log *LogEvent) SolidityEventID() abi.EventID { +func SolidityEventID(topics []Word256) abi.EventID { var eventID abi.EventID - copy(eventID[:], log.Topics[0].Bytes()) + copy(eventID[:], topics[0].Bytes()) return eventID } diff --git a/execution/exec/stream_event.go b/execution/exec/stream_event.go index 05675ca38..5fb5d336c 100644 --- a/execution/exec/stream_event.go +++ b/execution/exec/stream_event.go @@ -90,11 +90,16 @@ type BlockAccumulator struct { continuity ContinuityOpt } -func NewBlockAccumulator(continuityOptions ...ContinuityOpt) *BlockAccumulator { +func GetContinuity(continuityOptions ...ContinuityOpt) ContinuityOpt { continuity := Continuous for _, opt := range continuityOptions { continuity |= opt } + return continuity +} + +func NewBlockAccumulator(continuityOptions ...ContinuityOpt) *BlockAccumulator { + continuity := GetContinuity(continuityOptions...) return &BlockAccumulator{ continuity: continuity, stack: TxStack{ diff --git a/go.mod b/go.mod index ee39f75a5..f4fec39d1 100644 --- a/go.mod +++ b/go.mod @@ -31,6 +31,9 @@ require ( github.com/monax/relic v2.0.0+incompatible github.com/perlin-network/life v0.0.0-20191203030451-05c0e0f7eaea github.com/pkg/errors v0.9.1 + github.com/pointlander/compress v1.1.0 // indirect + github.com/pointlander/jetset v1.0.0 // indirect + github.com/pointlander/peg v1.0.0 // indirect github.com/prometheus/client_golang v1.9.0 github.com/prometheus/client_model v0.2.0 github.com/prometheus/common v0.15.0 diff --git a/go.sum b/go.sum index af3ebe66a..4b825ac58 100644 --- a/go.sum +++ b/go.sum @@ -436,6 +436,12 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= 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/pointlander/compress v1.1.0 h1:5fUcQV2qEHvk0OpILH6eltwluN5VnwiYrkc1wjGUHnU= +github.com/pointlander/compress v1.1.0/go.mod h1:q5NXNGzqj5uPnVuhGkZfmgHqNUhf15VLi6L9kW0VEc0= +github.com/pointlander/jetset v1.0.0 h1:bNlaNAX7cDPID9SlcogmXlDWq0KcRJSpKwHXaAM3bGQ= +github.com/pointlander/jetset v1.0.0/go.mod h1:zY6+WHRPB10uzTajloHtybSicLW1bf6Rz0eSaU9Deng= +github.com/pointlander/peg v1.0.0 h1:rtCtA6Fu6xJpILX8WJfU+cvrcKmXgTfG/v+bkLP8NYY= +github.com/pointlander/peg v1.0.0/go.mod h1:WJTMcgeWYr6fZz4CwHnY1oWZCXew8GWCF93FaAxPrh4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= diff --git a/integration/rpcinfo/info_server_test.go b/integration/rpcinfo/info_server_test.go index 1d56e6c1e..de6051f35 100644 --- a/integration/rpcinfo/info_server_test.go +++ b/integration/rpcinfo/info_server_test.go @@ -13,6 +13,9 @@ import ( "testing" "time" + "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/rpc/lib/jsonrpc" + tmjson "github.com/tendermint/tendermint/libs/json" "github.com/hyperledger/burrow/integration" @@ -20,8 +23,6 @@ import ( "github.com/hyperledger/burrow/core" - "github.com/hyperledger/burrow/rpc/lib/client" - "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/event" "github.com/hyperledger/burrow/execution/exec" @@ -40,10 +41,10 @@ func TestInfoServer(t *testing.T) { kern, shutdown := integration.RunNode(t, rpctest.GenesisDoc, rpctest.PrivateAccounts) defer shutdown() inputAddress := rpctest.PrivateAccounts[0].GetAddress() - infoAddress := kern.InfoListenAddress().String() - var clients = map[string]infoclient.RPCClient{ - "JSON RPC": client.NewJSONRPCClient(infoAddress), - "URI": client.NewURIClient(infoAddress), + infoAddress := "http://" + kern.InfoListenAddress().String() + var clients = map[string]rpc.Client{ + "JSON RPC": jsonrpc.NewClient(infoAddress), + "URI": jsonrpc.NewURIClient(infoAddress), } cli := rpctest.NewTransactClient(t, kern.GRPCListenAddress().String()) for clientName, rpcClient := range clients { diff --git a/integration/rpctest/helpers.go b/integration/rpctest/helpers.go index 6e0932938..d25f4a260 100644 --- a/integration/rpctest/helpers.go +++ b/integration/rpctest/helpers.go @@ -150,7 +150,7 @@ func UpdateName(cli rpctransact.TransactClient, inputAddress crypto.Address, nam //------------------------------------------------------------------------------- // some default transaction functions -func MakeDefaultCallTx(t *testing.T, client infoclient.RPCClient, addr *crypto.Address, code []byte, amt, gasLim, +func MakeDefaultCallTx(t *testing.T, client rpc.Client, addr *crypto.Address, code []byte, amt, gasLim, fee uint64) *txs.Envelope { sequence := GetSequence(t, client, PrivateAccounts[0].GetAddress()) tx := payload.NewCallTxWithSequence(PrivateAccounts[0].GetPublicKey(), addr, code, amt, gasLim, fee, sequence+1) @@ -163,7 +163,7 @@ func MakeDefaultCallTx(t *testing.T, client infoclient.RPCClient, addr *crypto.A // rpc call wrappers (fail on err) // get an account's sequence number -func GetSequence(t *testing.T, client infoclient.RPCClient, addr crypto.Address) uint64 { +func GetSequence(t *testing.T, client rpc.Client, addr crypto.Address) uint64 { acc, err := infoclient.Account(client, addr) if err != nil { t.Fatal(err) @@ -175,7 +175,7 @@ func GetSequence(t *testing.T, client infoclient.RPCClient, addr crypto.Address) } // get the account -func GetAccount(t *testing.T, client infoclient.RPCClient, addr crypto.Address) *acm.Account { +func GetAccount(t *testing.T, client rpc.Client, addr crypto.Address) *acm.Account { ac, err := infoclient.Account(client, addr) if err != nil { t.Fatal(err) @@ -184,7 +184,7 @@ func GetAccount(t *testing.T, client infoclient.RPCClient, addr crypto.Address) } // dump all storage for an account. currently unused -func DumpStorage(t *testing.T, client infoclient.RPCClient, addr crypto.Address) *rpc.ResultDumpStorage { +func DumpStorage(t *testing.T, client rpc.Client, addr crypto.Address) *rpc.ResultDumpStorage { resp, err := infoclient.DumpStorage(client, addr) if err != nil { t.Fatal(err) @@ -192,7 +192,7 @@ func DumpStorage(t *testing.T, client infoclient.RPCClient, addr crypto.Address) return resp } -func GetStorage(t *testing.T, client infoclient.RPCClient, addr crypto.Address, key []byte) []byte { +func GetStorage(t *testing.T, client rpc.Client, addr crypto.Address, key []byte) []byte { resp, err := infoclient.Storage(client, addr, key) if err != nil { t.Fatal(err) diff --git a/rpc/client.go b/rpc/client.go new file mode 100644 index 000000000..02c3c2fe9 --- /dev/null +++ b/rpc/client.go @@ -0,0 +1,5 @@ +package rpc + +type Client interface { + Call(method string, params interface{}, result interface{}) error +} diff --git a/rpc/lib/client/http_client.go b/rpc/lib/client/http_client.go deleted file mode 100644 index 58aa4f495..000000000 --- a/rpc/lib/client/http_client.go +++ /dev/null @@ -1,195 +0,0 @@ -package client - -import ( - "bytes" - "encoding/json" - "fmt" - "io/ioutil" - "net" - "net/http" - "net/url" - "reflect" - "strings" - - "github.com/hyperledger/burrow/rpc/lib/types" - "github.com/pkg/errors" -) - -// HTTPClient is a common interface for JSONRPCClient and URIClient. -type HTTPClient interface { - Call(method string, params map[string]interface{}, result interface{}) (interface{}, error) -} - -// TODO: Deprecate support for IP:PORT or /path/to/socket -func makeHTTPDialer(remoteAddr string) (string, func(string, string) (net.Conn, error)) { - parts := strings.SplitN(remoteAddr, "://", 2) - var protocol, address string - if len(parts) == 1 { - // default to tcp if nothing specified - protocol, address = "tcp", remoteAddr - } else if len(parts) == 2 { - protocol, address = parts[0], parts[1] - } else { - // return a invalid message - msg := fmt.Sprintf("Invalid addr: %s", remoteAddr) - return msg, func(_ string, _ string) (net.Conn, error) { - return nil, errors.New(msg) - } - } - // accept http as an alias for tcp - if protocol == "http" { - protocol = "tcp" - } - - // replace / with . for http requests (kvstore domain) - trimmedAddress := strings.Replace(address, "/", ".", -1) - return trimmedAddress, func(proto, addr string) (net.Conn, error) { - return net.Dial(protocol, address) - } -} - -// We overwrite the http.Client.Dial so we can do http over tcp or unix. -// remoteAddr should be fully featured (eg. with tcp:// or unix://) -func makeHTTPClient(remoteAddr string) (string, *http.Client) { - address, dialer := makeHTTPDialer(remoteAddr) - return "http://" + address, &http.Client{ - Transport: &http.Transport{ - Dial: dialer, - }, - } -} - -//------------------------------------------------------------------------------------ - -// JSONRPCClient takes params as a slice -type JSONRPCClient struct { - address string - client *http.Client -} - -// NewJSONRPCClient returns a JSONRPCClient pointed at the given address. -func NewJSONRPCClient(remote string) *JSONRPCClient { - address, client := makeHTTPClient(remote) - return &JSONRPCClient{ - address: address, - client: client, - } -} - -func (c *JSONRPCClient) Call(method string, params map[string]interface{}, result interface{}) (interface{}, error) { - request, err := types.MapToRequest("jsonrpc-client", method, params) - if err != nil { - return nil, err - } - requestBytes, err := json.Marshal(request) - if err != nil { - return nil, err - } - // log.Info(string(requestBytes)) - requestBuf := bytes.NewBuffer(requestBytes) - // log.Info(Fmt("RPC request to %v (%v): %v", c.remote, method, string(requestBytes))) - httpResponse, err := c.client.Post(c.address, "text/json", requestBuf) - if err != nil { - return nil, err - } - defer httpResponse.Body.Close() // nolint: errcheck - - responseBytes, err := ioutil.ReadAll(httpResponse.Body) - if err != nil { - return nil, err - } - // log.Info(Fmt("RPC response: %v", string(responseBytes))) - return unmarshalResponseBytes(responseBytes, result) -} - -//------------------------------------------------------------- - -// URI takes params as a map -type URIClient struct { - address string - client *http.Client -} - -func NewURIClient(remote string) *URIClient { - address, client := makeHTTPClient(remote) - return &URIClient{ - address: address, - client: client, - } -} - -func (c *URIClient) Call(method string, params map[string]interface{}, result interface{}) (interface{}, error) { - values, err := argsToURLValues(params) - if err != nil { - return nil, err - } - // log.Info(Fmt("URI request to %v (%v): %v", c.address, method, values)) - resp, err := c.client.PostForm(c.address+"/"+method, values) - if err != nil { - return nil, err - } - defer resp.Body.Close() // nolint: errcheck - - responseBytes, err := ioutil.ReadAll(resp.Body) - if err != nil { - return nil, err - } - return unmarshalResponseBytes(responseBytes, result) -} - -//------------------------------------------------ - -func unmarshalResponseBytes(responseBytes []byte, result interface{}) (interface{}, error) { - // Read response. If rpc/core/types is imported, the result will unmarshal - // into the correct type. - // log.Notice("response", "response", string(responseBytes)) - var err error - response := &types.RPCResponse{} - err = json.Unmarshal(responseBytes, response) - if err != nil { - return nil, errors.Errorf("Error unmarshalling rpc response: %v", err) - } - if response.Error != nil { - return nil, errors.Errorf("Response error: %v", response.Error) - } - // Unmarshal the RawMessage into the result. - err = json.Unmarshal(response.Result, result) - if err != nil { - return nil, errors.Errorf("Error unmarshalling rpc response result: %v", err) - } - return result, nil -} - -func argsToURLValues(args map[string]interface{}) (url.Values, error) { - values := make(url.Values) - if len(args) == 0 { - return values, nil - } - err := argsToJSON(args) - if err != nil { - return nil, err - } - for key, val := range args { - values.Set(key, val.(string)) - } - return values, nil -} - -func argsToJSON(args map[string]interface{}) error { - for k, v := range args { - rt := reflect.TypeOf(v) - isByteSlice := rt.Kind() == reflect.Slice && rt.Elem().Kind() == reflect.Uint8 - if isByteSlice { - bs := reflect.ValueOf(v).Bytes() - args[k] = fmt.Sprintf("0x%X", bs) - continue - } - - data, err := json.Marshal(v) - if err != nil { - return err - } - args[k] = string(data) - } - return nil -} diff --git a/rpc/lib/client/ws_client.go b/rpc/lib/client/ws_client.go deleted file mode 100644 index c46ad8901..000000000 --- a/rpc/lib/client/ws_client.go +++ /dev/null @@ -1,483 +0,0 @@ -package client - -import ( - "context" - "encoding/json" - "fmt" - "net" - "net/http" - "sync" - "time" - - "github.com/gorilla/websocket" - "github.com/hyperledger/burrow/rpc/lib/types" - "github.com/pkg/errors" - metrics "github.com/rcrowley/go-metrics" - "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/libs/service" -) - -const ( - defaultMaxReconnectAttempts = 25 - defaultWriteWait = 0 - defaultReadWait = 0 - defaultPingPeriod = 0 -) - -// WSClient is a WebSocket client. The methods of WSClient are safe for use by -// multiple goroutines. -type WSClient struct { - service.BaseService - - conn *websocket.Conn - - Address string // IP:PORT or /path/to/socket - Endpoint string // /websocket/url/endpoint - Dialer func(string, string) (net.Conn, error) - - // Time between sending a ping and receiving a pong. See - // https://godoc.org/github.com/rcrowley/go-metrics#Timer. - PingPongLatencyTimer metrics.Timer - - // Single user facing channel to read RPCResponses from, closed only when the client is being stopped. - ResponsesCh chan types.RPCResponse - - // Callback, which will be called each time after successful reconnect. - onReconnect func() - - // internal channels - send chan types.RPCRequest // user requests - backlog chan types.RPCRequest // stores a single user request received during a conn failure - reconnectAfter chan error // reconnect requests - readRoutineQuit chan struct{} // a way for readRoutine to close writeRoutine - - wg sync.WaitGroup - - mtx sync.RWMutex - sentLastPingAt time.Time - reconnecting bool - - // Maximum reconnect attempts (0 or greater; default: 25). - maxReconnectAttempts int - - // Time allowed to write a message to the server. 0 means block until operation succeeds. - writeWait time.Duration - - // Time allowed to read the next message from the server. 0 means block until operation succeeds. - readWait time.Duration - - // Send pings to server with this period. Must be less than readWait. If 0, no pings will be sent. - pingPeriod time.Duration -} - -// NewWSClient returns a new client. See the commentary on the func(*WSClient) -// functions for a detailed description of how to configure ping period and -// pong wait time. The endpoint argument must begin with a `/`. -func NewWSClient(remoteAddr, endpoint string, options ...func(*WSClient)) *WSClient { - addr, dialer := makeHTTPDialer(remoteAddr) - c := &WSClient{ - Address: addr, - Dialer: dialer, - Endpoint: endpoint, - PingPongLatencyTimer: metrics.NewTimer(), - - maxReconnectAttempts: defaultMaxReconnectAttempts, - readWait: defaultReadWait, - writeWait: defaultWriteWait, - pingPeriod: defaultPingPeriod, - } - c.BaseService = *service.NewBaseService(nil, "WSClient", c) - for _, option := range options { - option(c) - } - return c -} - -// MaxReconnectAttempts sets the maximum number of reconnect attempts before returning an error. -// It should only be used in the constructor and is not Goroutine-safe. -func MaxReconnectAttempts(max int) func(*WSClient) { - return func(c *WSClient) { - c.maxReconnectAttempts = max - } -} - -// ReadWait sets the amount of time to wait before a websocket read times out. -// It should only be used in the constructor and is not Goroutine-safe. -func ReadWait(readWait time.Duration) func(*WSClient) { - return func(c *WSClient) { - c.readWait = readWait - } -} - -// WriteWait sets the amount of time to wait before a websocket write times out. -// It should only be used in the constructor and is not Goroutine-safe. -func WriteWait(writeWait time.Duration) func(*WSClient) { - return func(c *WSClient) { - c.writeWait = writeWait - } -} - -// PingPeriod sets the duration for sending websocket pings. -// It should only be used in the constructor - not Goroutine-safe. -func PingPeriod(pingPeriod time.Duration) func(*WSClient) { - return func(c *WSClient) { - c.pingPeriod = pingPeriod - } -} - -// OnReconnect sets the callback, which will be called every time after -// successful reconnect. -func OnReconnect(cb func()) func(*WSClient) { - return func(c *WSClient) { - c.onReconnect = cb - } -} - -// String returns WS client full address. -func (c *WSClient) String() string { - return fmt.Sprintf("%s (%s)", c.Address, c.Endpoint) -} - -// OnStart implements cmn.Service by dialing a server and creating read and -// write routines. -func (c *WSClient) OnStart() error { - err := c.dial() - if err != nil { - return err - } - - c.ResponsesCh = make(chan types.RPCResponse) - - c.send = make(chan types.RPCRequest) - // 1 additional error may come from the read/write - // goroutine depending on which failed first. - c.reconnectAfter = make(chan error, 1) - // capacity for 1 request. a user won't be able to send more because the send - // channel is unbuffered. - c.backlog = make(chan types.RPCRequest, 1) - - c.startReadWriteRoutines() - go c.reconnectRoutine() - - return nil -} - -// OnStop implements cmn.Service. -func (c *WSClient) OnStop() {} - -// Stop overrides cmn.Service#Stop. There is no other way to wait until Quit -// channel is closed. -func (c *WSClient) Stop() error { - if err := c.BaseService.Stop(); err != nil { - return err - } - // only close user-facing channels when we can't write to them - c.wg.Wait() - close(c.ResponsesCh) - - return nil -} - -// IsReconnecting returns true if the client is reconnecting right now. -func (c *WSClient) IsReconnecting() bool { - c.mtx.RLock() - defer c.mtx.RUnlock() - return c.reconnecting -} - -// IsActive returns true if the client is running and not reconnecting. -func (c *WSClient) IsActive() bool { - return c.IsRunning() && !c.IsReconnecting() -} - -// Send the given RPC request to the server. Results will be available on -// ResponsesCh, errors, if any, on ErrorsCh. Will block until send succeeds or -// ctx.Done is closed. -func (c *WSClient) Send(ctx context.Context, request types.RPCRequest) error { - select { - case c.send <- request: - c.Logger.Info("sent a request", "req", request) - return nil - case <-ctx.Done(): - return ctx.Err() - } -} - -// Call the given method. See Send description. -func (c *WSClient) Call(ctx context.Context, method string, params map[string]interface{}) error { - request, err := types.MapToRequest("ws-client", method, params) - if err != nil { - return err - } - return c.Send(ctx, request) -} - -// CallWithArrayParams the given method with params in a form of array. See -// Send description. -func (c *WSClient) CallWithArrayParams(ctx context.Context, method string, params []interface{}) error { - request, err := types.ArrayToRequest("ws-client", method, params) - if err != nil { - return err - } - return c.Send(ctx, request) -} - -/////////////////////////////////////////////////////////////////////////////// -// Private methods - -func (c *WSClient) dial() error { - dialer := &websocket.Dialer{ - NetDial: c.Dialer, - Proxy: http.ProxyFromEnvironment, - } - rHeader := http.Header{} - conn, _, err := dialer.Dial("ws://"+c.Address+c.Endpoint, rHeader) - if err != nil { - return err - } - c.conn = conn - return nil -} - -// reconnect tries to redial up to maxReconnectAttempts with exponential -// backoff. -func (c *WSClient) reconnect() error { - attempt := 0 - - c.mtx.Lock() - c.reconnecting = true - c.mtx.Unlock() - defer func() { - c.mtx.Lock() - c.reconnecting = false - c.mtx.Unlock() - }() - - for { - jitterSeconds := time.Duration(rand.Float64() * float64(time.Second)) // 1s == (1e9 ns) - backoffDuration := jitterSeconds + ((1 << uint(attempt)) * time.Second) - - c.Logger.Info("reconnecting", "attempt", attempt+1, "backoff_duration", backoffDuration) - time.Sleep(backoffDuration) - - err := c.dial() - if err != nil { - c.Logger.Error("failed to redial", "err", err) - } else { - c.Logger.Info("reconnected") - if c.onReconnect != nil { - go c.onReconnect() - } - return nil - } - - attempt++ - - if attempt > c.maxReconnectAttempts { - return errors.Wrap(err, "reached maximum reconnect attempts") - } - } -} - -func (c *WSClient) startReadWriteRoutines() { - c.wg.Add(2) - c.readRoutineQuit = make(chan struct{}) - go c.readRoutine() - go c.writeRoutine() -} - -func (c *WSClient) processBacklog() error { - select { - case request := <-c.backlog: - if c.writeWait > 0 { - if err := c.conn.SetWriteDeadline(time.Now().Add(c.writeWait)); err != nil { - c.Logger.Error("failed to set write deadline", "err", err) - } - } - if err := c.conn.WriteJSON(request); err != nil { - c.Logger.Error("failed to resend request", "err", err) - c.reconnectAfter <- err - // requeue request - c.backlog <- request - return err - } - c.Logger.Info("resend a request", "req", request) - default: - } - return nil -} - -func (c *WSClient) reconnectRoutine() { - for { - select { - case originalError := <-c.reconnectAfter: - // wait until writeRoutine and readRoutine finish - c.wg.Wait() - if err := c.reconnect(); err != nil { - c.Logger.Error("failed to reconnect", "err", err, "original_err", originalError) - c.Stop() - return - } - // drain reconnectAfter - LOOP: - for { - select { - case <-c.reconnectAfter: - default: - break LOOP - } - } - err := c.processBacklog() - if err == nil { - c.startReadWriteRoutines() - } - - case <-c.Quit(): - return - } - } -} - -// The client ensures that there is at most one writer to a connection by -// executing all writes from this goroutine. -func (c *WSClient) writeRoutine() { - var ticker *time.Ticker - if c.pingPeriod > 0 { - // ticker with a predefined period - ticker = time.NewTicker(c.pingPeriod) - } else { - // ticker that never fires - ticker = &time.Ticker{C: make(<-chan time.Time)} - } - - defer func() { - ticker.Stop() - if err := c.conn.Close(); err != nil { - // ignore error; it will trigger in tests - // likely because it's closing an already closed connection - } - c.wg.Done() - }() - - for { - select { - case request := <-c.send: - if c.writeWait > 0 { - if err := c.conn.SetWriteDeadline(time.Now().Add(c.writeWait)); err != nil { - c.Logger.Error("failed to set write deadline", "err", err) - } - } - if err := c.conn.WriteJSON(request); err != nil { - c.Logger.Error("failed to send request", "err", err) - c.reconnectAfter <- err - // add request to the backlog, so we don't lose it - c.backlog <- request - return - } - case <-ticker.C: - if c.writeWait > 0 { - if err := c.conn.SetWriteDeadline(time.Now().Add(c.writeWait)); err != nil { - c.Logger.Error("failed to set write deadline", "err", err) - } - } - if err := c.conn.WriteMessage(websocket.PingMessage, []byte{}); err != nil { - c.Logger.Error("failed to write ping", "err", err) - c.reconnectAfter <- err - return - } - c.mtx.Lock() - c.sentLastPingAt = time.Now() - c.mtx.Unlock() - c.Logger.Debug("sent ping") - case <-c.readRoutineQuit: - return - case <-c.Quit(): - if err := c.conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")); err != nil { - c.Logger.Error("failed to write message", "err", err) - } - return - } - } -} - -// The client ensures that there is at most one reader to a connection by -// executing all reads from this goroutine. -func (c *WSClient) readRoutine() { - defer func() { - if err := c.conn.Close(); err != nil { - // ignore error; it will trigger in tests - // likely because it's closing an already closed connection - } - c.wg.Done() - }() - - c.conn.SetPongHandler(func(string) error { - // gather latency stats - c.mtx.RLock() - t := c.sentLastPingAt - c.mtx.RUnlock() - c.PingPongLatencyTimer.UpdateSince(t) - - c.Logger.Debug("got pong") - return nil - }) - - for { - // reset deadline for every message type (control or data) - if c.readWait > 0 { - if err := c.conn.SetReadDeadline(time.Now().Add(c.readWait)); err != nil { - c.Logger.Error("failed to set read deadline", "err", err) - } - } - _, data, err := c.conn.ReadMessage() - if err != nil { - if !websocket.IsUnexpectedCloseError(err, websocket.CloseNormalClosure) { - return - } - - c.Logger.Error("failed to read response", "err", err) - close(c.readRoutineQuit) - c.reconnectAfter <- err - return - } - - var response types.RPCResponse - err = json.Unmarshal(data, &response) - if err != nil { - c.Logger.Error("failed to parse response", "err", err, "data", string(data)) - continue - } - c.Logger.Info("got response", "resp", response.Result) - // Combine a non-blocking read on BaseService.Quit with a non-blocking write on ResponsesCh to avoid blocking - // c.wg.Wait() in c.Stop(). Note we rely on Quit being closed so that it sends unlimited Quit signals to stop - // both readRoutine and writeRoutine - select { - case <-c.Quit(): - case c.ResponsesCh <- response: - } - } -} - -/////////////////////////////////////////////////////////////////////////////// -// Predefined methods - -// Subscribe to a query. Note the server must have a "subscribe" route -// defined. -func (c *WSClient) Subscribe(ctx context.Context, query string) error { - params := map[string]interface{}{"query": query} - return c.Call(ctx, "subscribe", params) -} - -// Unsubscribe from a query. Note the server must have a "unsubscribe" route -// defined. -func (c *WSClient) Unsubscribe(ctx context.Context, query string) error { - params := map[string]interface{}{"query": query} - return c.Call(ctx, "unsubscribe", params) -} - -// UnsubscribeAll from all. Note the server must have a "unsubscribe_all" route -// defined. -func (c *WSClient) UnsubscribeAll(ctx context.Context) error { - params := map[string]interface{}{} - return c.Call(ctx, "unsubscribe_all", params) -} diff --git a/rpc/lib/jsonrpc/client.go b/rpc/lib/jsonrpc/client.go new file mode 100644 index 000000000..dbb8e9d5d --- /dev/null +++ b/rpc/lib/jsonrpc/client.go @@ -0,0 +1,138 @@ +package jsonrpc + +import ( + "bytes" + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "reflect" + + "github.com/hyperledger/burrow/rpc/lib/types" + "github.com/pkg/errors" +) + +// HTTPClient is a common interface for Client and URIClient. +type HTTPClient interface { + Call(method string, params interface{}, result interface{}) error +} + +// Client takes params as a slice +type Client struct { + address string + client http.Client +} + +// NewClient returns a Client pointed at the given address. +func NewClient(remote string) *Client { + return &Client{ + address: remote, + } +} + +func (c *Client) Call(method string, params interface{}, result interface{}) error { + request, err := types.NewRequest("jsonrpc-client", method, params) + if err != nil { + return err + } + bs, err := json.Marshal(request) + if err != nil { + return err + } + buf := bytes.NewBuffer(bs) + response, err := c.client.Post(c.address, "application/json", buf) + if err != nil { + return err + } + defer response.Body.Close() + + bs, err = ioutil.ReadAll(response.Body) + if err != nil { + return err + } + return unmarshalResponseBytes(bs, result) +} + +// URI takes params as a map +type URIClient struct { + address string + client http.Client +} + +func NewURIClient(remote string) *URIClient { + return &URIClient{ + address: remote, + } +} + +func (c *URIClient) Call(method string, params interface{}, result interface{}) error { + values, err := argsToURLValues(params.(map[string]interface{})) + if err != nil { + return err + } + // log.Info(Fmt("URI request to %v (%v): %v", c.address, method, values)) + resp, err := c.client.PostForm(c.address+"/"+method, values) + if err != nil { + return err + } + defer resp.Body.Close() // nolint: errcheck + + responseBytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + return unmarshalResponseBytes(responseBytes, result) +} + +func unmarshalResponseBytes(responseBytes []byte, result interface{}) error { + var err error + response := &types.RPCResponse{} + err = json.Unmarshal(responseBytes, response) + if err != nil { + return errors.Errorf("Error unmarshalling rpc response: %v", err) + } + if response.Error != nil { + return response.Error + } + // Unmarshal the RawMessage into the result. + err = json.Unmarshal(response.Result, result) + if err != nil { + return errors.Errorf("error unmarshalling rpc response result: %v", err) + } + return nil +} + +func argsToURLValues(args map[string]interface{}) (url.Values, error) { + values := make(url.Values) + if len(args) == 0 { + return values, nil + } + err := argsToJSON(args) + if err != nil { + return nil, err + } + for key, val := range args { + values.Set(key, val.(string)) + } + return values, nil +} + +func argsToJSON(args map[string]interface{}) error { + for k, v := range args { + rt := reflect.TypeOf(v) + isByteSlice := rt.Kind() == reflect.Slice && rt.Elem().Kind() == reflect.Uint8 + if isByteSlice { + bs := reflect.ValueOf(v).Bytes() + args[k] = fmt.Sprintf("0x%X", bs) + continue + } + + data, err := json.Marshal(v) + if err != nil { + return err + } + args[k] = string(data) + } + return nil +} diff --git a/rpc/lib/rpc_test.go b/rpc/lib/rpc_test.go index f3f60f2c2..43b206123 100644 --- a/rpc/lib/rpc_test.go +++ b/rpc/lib/rpc_test.go @@ -2,37 +2,32 @@ package lib import ( "bytes" - "context" crand "crypto/rand" "encoding/json" "fmt" "math/rand" "net/http" "os" - "os/exec" "testing" "time" + "github.com/hyperledger/burrow/rpc/lib/jsonrpc" + "github.com/hyperledger/burrow/logging/logconfig" "github.com/hyperledger/burrow/process" - "github.com/hyperledger/burrow/rpc/lib/client" "github.com/hyperledger/burrow/rpc/lib/server" "github.com/hyperledger/burrow/rpc/lib/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" cmn "github.com/tendermint/tendermint/libs/bytes" - "github.com/tendermint/tendermint/libs/log" ) // Client and Server should work over tcp or unix sockets const ( - tcpAddr = "tcp://0.0.0.0:47768" - - unixSocket = "/tmp/rpc_test.sock" - unixAddr = "unix://" + unixSocket - - websocketEndpoint = "/websocket/endpoint" + host = "0.0.0.0:47768" + httpAddress = "http://" + host + tcpAddress = "tcp://" + host ) type ResultEcho struct { @@ -54,7 +49,6 @@ type ResultEchoDataBytes struct { // Define some routes var Routes = map[string]*server.RPCFunc{ "echo": server.NewRPCFunc(EchoResult, "arg"), - "echo_ws": server.NewWSRPCFunc(EchoWSResult, "arg"), "echo_bytes": server.NewRPCFunc(EchoBytesResult, "arg"), "echo_data_bytes": server.NewRPCFunc(EchoDataBytesResult, "arg"), "echo_int": server.NewRPCFunc(EchoIntResult, "arg"), @@ -64,10 +58,6 @@ func EchoResult(v string) (*ResultEcho, error) { return &ResultEcho{v}, nil } -func EchoWSResult(wsCtx types.WSRPCContext, v string) (*ResultEcho, error) { - return &ResultEcho{v}, nil -} - func EchoIntResult(v int) (*ResultEchoInt, error) { return &ResultEchoInt{v}, nil } @@ -93,22 +83,11 @@ func setup() { panic(err) } - cmd := exec.Command("rm", "-f", unixSocket) - err = cmd.Start() - if err != nil { - panic(err) - } - if err = cmd.Wait(); err != nil { - panic(err) - } - tcpLogger := logger.With("socket", "tcp") mux := http.NewServeMux() server.RegisterRPCFuncs(mux, Routes, tcpLogger) - wm := server.NewWebsocketManager(Routes, logger, server.ReadWait(5*time.Second), server.PingPeriod(1*time.Second)) - mux.HandleFunc(websocketEndpoint, wm.WebsocketHandler) go func() { - l, err := process.ListenerFromAddress(tcpAddr) + l, err := process.ListenerFromAddress(tcpAddress) if err != nil { panic(err) } @@ -118,74 +97,58 @@ func setup() { } }() - unixLogger := logger.With("socket", "unix") - mux2 := http.NewServeMux() - server.RegisterRPCFuncs(mux2, Routes, unixLogger) - wm = server.NewWebsocketManager(Routes, logger) - mux2.HandleFunc(websocketEndpoint, wm.WebsocketHandler) - go func() { - l, err := process.ListenerFromAddress(unixAddr) - if err != nil { - panic(err) - } - _, err = server.StartHTTPServer(l, mux2, unixLogger) - if err != nil { - panic(err) - } - }() - // wait for servers to start time.Sleep(time.Second * 2) } -func echoViaHTTP(cl client.HTTPClient, val string) (string, error) { +func echoViaHTTP(cl jsonrpc.HTTPClient, val string) (string, error) { params := map[string]interface{}{ "arg": val, } result := new(ResultEcho) - if _, err := cl.Call("echo", params, result); err != nil { + if err := cl.Call("echo", params, result); err != nil { return "", err } return result.Value, nil } -func echoIntViaHTTP(cl client.HTTPClient, val int) (int, error) { +func echoIntViaHTTP(cl jsonrpc.HTTPClient, val int) (int, error) { params := map[string]interface{}{ "arg": val, } result := new(ResultEchoInt) - if _, err := cl.Call("echo_int", params, result); err != nil { + if err := cl.Call("echo_int", params, result); err != nil { return 0, err } return result.Value, nil } -func echoBytesViaHTTP(cl client.HTTPClient, bytes []byte) ([]byte, error) { +func echoBytesViaHTTP(cl jsonrpc.HTTPClient, bytes []byte) ([]byte, error) { params := map[string]interface{}{ "arg": bytes, } result := new(ResultEchoBytes) - if _, err := cl.Call("echo_bytes", params, result); err != nil { + if err := cl.Call("echo_bytes", params, result); err != nil { return []byte{}, err } return result.Value, nil } -func echoDataBytesViaHTTP(cl client.HTTPClient, bytes cmn.HexBytes) (cmn.HexBytes, error) { +func echoDataBytesViaHTTP(cl jsonrpc.HTTPClient, bytes cmn.HexBytes) (cmn.HexBytes, error) { params := map[string]interface{}{ "arg": bytes, } result := new(ResultEchoDataBytes) - if _, err := cl.Call("echo_data_bytes", params, result); err != nil { + if err := cl.Call("echo_data_bytes", params, result); err != nil { return []byte{}, err } return result.Value, nil } -func testWithHTTPClient(t *testing.T, cl client.HTTPClient) { +func testWithHTTPClient(t *testing.T, cl jsonrpc.HTTPClient) { val := "acbd" got, err := echoViaHTTP(cl, val) - require.Nil(t, err) + require.NoError(t, err) assert.Equal(t, val, got) val2 := randBytes(t) @@ -204,87 +167,21 @@ func testWithHTTPClient(t *testing.T, cl client.HTTPClient) { assert.Equal(t, val4, got4) } -func echoViaWS(cl *client.WSClient, val string) (string, error) { - params := map[string]interface{}{ - "arg": val, - } - err := cl.Call(context.Background(), "echo", params) - if err != nil { - return "", err - } - - msg := <-cl.ResponsesCh - if msg.Error != nil { - return "", err - - } - result := new(ResultEcho) - err = json.Unmarshal(msg.Result, result) - if err != nil { - return "", nil - } - return result.Value, nil -} - -func echoBytesViaWS(cl *client.WSClient, bytes []byte) ([]byte, error) { - params := map[string]interface{}{ - "arg": bytes, - } - err := cl.Call(context.Background(), "echo_bytes", params) - if err != nil { - return []byte{}, err - } - - msg := <-cl.ResponsesCh - if msg.Error != nil { - return []byte{}, msg.Error - - } - result := new(ResultEchoBytes) - err = json.Unmarshal(msg.Result, result) - if err != nil { - return []byte{}, nil - } - return result.Value, nil -} - -func testWithWSClient(t *testing.T, cl *client.WSClient) { - val := "acbd" - got, err := echoViaWS(cl, val) - require.Nil(t, err) - assert.Equal(t, got, val) - - val2 := randBytes(t) - got2, err := echoBytesViaWS(cl, val2) - require.Nil(t, err) - assert.Equal(t, got2, val2) -} - -//------------- - func TestServersAndClientsBasic(t *testing.T) { - serverAddrs := [...]string{tcpAddr, unixAddr} + serverAddrs := [...]string{httpAddress} for _, addr := range serverAddrs { - cl1 := client.NewURIClient(addr) + cl1 := jsonrpc.NewURIClient(addr) fmt.Printf("=== testing server on %s using %v client", addr, cl1) testWithHTTPClient(t, cl1) - cl2 := client.NewJSONRPCClient(addr) + cl2 := jsonrpc.NewClient(addr) fmt.Printf("=== testing server on %s using %v client", addr, cl2) testWithHTTPClient(t, cl2) - - cl3 := client.NewWSClient(addr, websocketEndpoint) - cl3.SetLogger(log.TestingLogger()) - err := cl3.Start() - require.Nil(t, err) - fmt.Printf("=== testing server on %s using %v client", addr, cl3) - testWithWSClient(t, cl3) - cl3.Stop() } } func TestHexStringArg(t *testing.T) { - cl := client.NewURIClient(tcpAddr) + cl := jsonrpc.NewURIClient(httpAddress) // should NOT be handled as hex val := "0xabc" got, err := echoViaHTTP(cl, val) @@ -293,7 +190,7 @@ func TestHexStringArg(t *testing.T) { } func TestQuotedStringArg(t *testing.T) { - cl := client.NewURIClient(tcpAddr) + cl := jsonrpc.NewURIClient(httpAddress) // should NOT be unquoted val := "\"abc\"" got, err := echoViaHTTP(cl, val) @@ -301,64 +198,12 @@ func TestQuotedStringArg(t *testing.T) { assert.Equal(t, got, val) } -func TestWSNewWSRPCFunc(t *testing.T) { - cl := client.NewWSClient(tcpAddr, websocketEndpoint) - cl.SetLogger(log.TestingLogger()) - err := cl.Start() - require.Nil(t, err) - defer cl.Stop() - - val := "acbd" - params := map[string]interface{}{ - "arg": val, - } - err = cl.Call(context.Background(), "echo_ws", params) - require.Nil(t, err) - - msg := <-cl.ResponsesCh - if msg.Error != nil { - t.Fatal(err) - } - result := new(ResultEcho) - err = json.Unmarshal(msg.Result, result) - require.Nil(t, err) - got := result.Value - assert.Equal(t, got, val) -} - -func TestWSHandlesArrayParams(t *testing.T) { - cl := client.NewWSClient(tcpAddr, websocketEndpoint) - cl.SetLogger(log.TestingLogger()) - err := cl.Start() - require.Nil(t, err) - defer cl.Stop() - - val := "acbd" - params := []interface{}{val} - err = cl.CallWithArrayParams(context.Background(), "echo_ws", params) - require.Nil(t, err) - - msg := <-cl.ResponsesCh - if msg.Error != nil { - t.Fatalf("%+v", err) - } - result := new(ResultEcho) - err = json.Unmarshal(msg.Result, result) - require.Nil(t, err) - got := result.Value - assert.Equal(t, got, val) -} - -// TestWSClientPingPong checks that a client & server exchange pings -// & pongs so connection stays alive. -func TestWSClientPingPong(t *testing.T) { - cl := client.NewWSClient(tcpAddr, websocketEndpoint) - cl.SetLogger(log.TestingLogger()) - err := cl.Start() - require.Nil(t, err) - defer cl.Stop() +func TestUnmarshalError(t *testing.T) { + respString := `{"id":"jsonrpc-client","jsonrpc":"2.0","error":{"message":"Method status not supported.","code":-32000,"data":{"stack":"Error: Method status not supported.\n at GethApiDouble.handleRequest (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/ganache-core/lib/subproviders/geth_api_double.js:70:1)\n at next (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/web3-provider-engine/index.js:136:1)\n at GethDefaults.handleRequest (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/ganache-core/lib/subproviders/gethdefaults.js:15:1)\n at next (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/web3-provider-engine/index.js:136:1)\n at SubscriptionSubprovider.FilterSubprovider.handleRequest (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/web3-provider-engine/subproviders/filters.js:89:1)\n at SubscriptionSubprovider.handleRequest (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/web3-provider-engine/subproviders/subscriptions.js:137:1)\n at next (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/web3-provider-engine/index.js:136:1)\n at DelayedBlockFilter.handleRequest (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/ganache-core/lib/subproviders/delayedblockfilter.js:32:1)\n at next (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/web3-provider-engine/index.js:136:1)\n at RequestFunnel.handleRequest (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/ganache-core/lib/subproviders/requestfunnel.js:32:1)\n at next (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/web3-provider-engine/index.js:136:1)\n at Web3ProviderEngine._handleAsync (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/web3-provider-engine/index.js:123:1)\n at Timeout._onTimeout (/home/silas/code/go/src/github.com/hyperledger/burrow/tests/vent/eth/node_modules/truffle/build/webpack:/node_modules/web3-provider-engine/index.js:107:1)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)","name":"Error"}}}` - time.Sleep(6 * time.Second) + response := &types.RPCResponse{} + err := json.Unmarshal([]byte(respString), response) + require.NoError(t, err) } func randBytes(t *testing.T) []byte { diff --git a/rpc/lib/server/handlers.go b/rpc/lib/server/handlers.go index 996bba786..a391c6f21 100644 --- a/rpc/lib/server/handlers.go +++ b/rpc/lib/server/handlers.go @@ -2,25 +2,18 @@ package server import ( "bytes" - "context" "encoding/hex" "encoding/json" "fmt" "io/ioutil" "net/http" "reflect" - "runtime/debug" "sort" "strings" - "time" - "github.com/gorilla/websocket" - "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/logging" - "github.com/hyperledger/burrow/logging/structure" "github.com/hyperledger/burrow/rpc/lib/types" "github.com/pkg/errors" - "github.com/tendermint/tendermint/libs/service" ) // RegisterRPCFuncs adds a route for each function in the funcMap, as well as general jsonrpc and websocket handlers for all functions. @@ -224,19 +217,6 @@ func jsonParamsToArgsRPC(rpcFunc *RPCFunc, params json.RawMessage) ([]reflect.Va return jsonParamsToArgs(rpcFunc, params, 0) } -// Same as above, but with the first param the websocket connection -func jsonParamsToArgsWS(rpcFunc *RPCFunc, params json.RawMessage, wsCtx types.WSRPCContext) ([]reflect.Value, error) { - values, err := jsonParamsToArgs(rpcFunc, params, 1) - if err != nil { - return nil, err - } - return append([]reflect.Value{reflect.ValueOf(wsCtx)}, values...), nil -} - -// rpc.json -//----------------------------------------------------------------------------- -// rpc.http - // convert from a function name to the http handler func makeHTTPHandler(rpcFunc *RPCFunc, logger *logging.Logger) func(http.ResponseWriter, *http.Request) { // Exception for websocket endpoints @@ -350,375 +330,6 @@ func nonJSONToArg(ty reflect.Type, arg string) (reflect.Value, bool, error) { return reflect.ValueOf(nil), false, nil } -// rpc.http -//----------------------------------------------------------------------------- -// rpc.websocket - -const ( - defaultWSWriteChanCapacity = 1000 - defaultWSWriteWait = 10 * time.Second - defaultWSReadWait = 30 * time.Second - defaultWSPingPeriod = (defaultWSReadWait * 9) / 10 -) - -// A single websocket connection contains listener id, underlying ws -// connection, and the event switch for subscribing to events. -// -// In case of an error, the connection is stopped. -type wsConnection struct { - service.BaseService - - remoteAddr string - baseConn *websocket.Conn - writeChan chan types.RPCResponse - - funcMap map[string]*RPCFunc - - // write channel capacity - writeChanCapacity int - - // each write times out after this. - writeWait time.Duration - - // Connection times out if we haven't received *anything* in this long, not even pings. - readWait time.Duration - - // Send pings to server with this period. Must be less than readWait, but greater than zero. - pingPeriod time.Duration - - // object that is used to subscribe / unsubscribe from events - eventSub types.EventSubscriber -} - -// NewWSConnection wraps websocket.Conn. -// -// See the commentary on the func(*wsConnection) functions for a detailed -// description of how to configure ping period and pong wait time. NOTE: if the -// write buffer is full, pongs may be dropped, which may cause clients to -// disconnect. see https://github.com/gorilla/websocket/issues/97 -func NewWSConnection(baseConn *websocket.Conn, funcMap map[string]*RPCFunc, - logger *logging.Logger, options ...func(*wsConnection)) *wsConnection { - wsc := &wsConnection{ - remoteAddr: baseConn.RemoteAddr().String(), - baseConn: baseConn, - funcMap: funcMap, - writeWait: defaultWSWriteWait, - writeChanCapacity: defaultWSWriteChanCapacity, - readWait: defaultWSReadWait, - pingPeriod: defaultWSPingPeriod, - } - for _, option := range options { - option(wsc) - } - - wsc.BaseService = *service.NewBaseService(tendermint.NewLogger(logger.With("remote", baseConn.RemoteAddr())), - "wsConnection", wsc) - return wsc -} - -// EventSubscriber sets object that is used to subscribe / unsubscribe from -// events - not Goroutine-safe. If none given, default node's eventBus will be -// used. -func EventSubscriber(eventSub types.EventSubscriber) func(*wsConnection) { - return func(wsc *wsConnection) { - wsc.eventSub = eventSub - } -} - -// WriteWait sets the amount of time to wait before a websocket write times out. -// It should only be used in the constructor - not Goroutine-safe. -func WriteWait(writeWait time.Duration) func(*wsConnection) { - return func(wsc *wsConnection) { - wsc.writeWait = writeWait - } -} - -// WriteChanCapacity sets the capacity of the websocket write channel. -// It should only be used in the constructor - not Goroutine-safe. -func WriteChanCapacity(cap int) func(*wsConnection) { - return func(wsc *wsConnection) { - wsc.writeChanCapacity = cap - } -} - -// ReadWait sets the amount of time to wait before a websocket read times out. -// It should only be used in the constructor - not Goroutine-safe. -func ReadWait(readWait time.Duration) func(*wsConnection) { - return func(wsc *wsConnection) { - wsc.readWait = readWait - } -} - -// PingPeriod sets the duration for sending websocket pings. -// It should only be used in the constructor - not Goroutine-safe. -func PingPeriod(pingPeriod time.Duration) func(*wsConnection) { - return func(wsc *wsConnection) { - wsc.pingPeriod = pingPeriod - } -} - -// OnStart implements service.Service by starting the read and write routines. It -// blocks until the connection closes. -func (wsc *wsConnection) OnStart() error { - wsc.writeChan = make(chan types.RPCResponse, wsc.writeChanCapacity) - - // Read subscriptions/unsubscriptions to events - go wsc.readRoutine() - // Write responses, BLOCKING. - wsc.writeRoutine() - - return nil -} - -// OnStop implements service.Service by unsubscribing remoteAddr from all subscriptions. -func (wsc *wsConnection) OnStop() { - // Both read and write loops close the websocket connection when they exit their loops. - // The writeChan is never closed, to allow WriteRPCResponse() to fail. - if wsc.eventSub != nil { - wsc.eventSub.UnsubscribeAll(context.TODO(), wsc.remoteAddr) - } -} - -// GetRemoteAddr returns the remote address of the underlying connection. -// It implements WSRPCConnection -func (wsc *wsConnection) GetRemoteAddr() string { - return wsc.remoteAddr -} - -// GetEventSubscriber implements WSRPCConnection by returning event subscriber. -func (wsc *wsConnection) GetEventSubscriber() types.EventSubscriber { - return wsc.eventSub -} - -// WriteRPCResponse pushes a response to the writeChan, and blocks until it is accepted. -// It implements WSRPCConnection. It is Goroutine-safe. -func (wsc *wsConnection) WriteRPCResponse(resp types.RPCResponse) { - select { - case <-wsc.Quit(): - return - case wsc.writeChan <- resp: - } -} - -// TryWriteRPCResponse attempts to push a response to the writeChan, but does not block. -// It implements WSRPCConnection. It is Goroutine-safe -func (wsc *wsConnection) TryWriteRPCResponse(resp types.RPCResponse) bool { - select { - case <-wsc.Quit(): - return false - case wsc.writeChan <- resp: - return true - default: - return false - } -} - -// Read from the socket and subscribe to or unsubscribe from events -func (wsc *wsConnection) readRoutine() { - defer func() { - if r := recover(); r != nil { - err, ok := r.(error) - if !ok { - err = fmt.Errorf("WSJSONRPC: %v", r) - } - wsc.Logger.Error("Panic in WSJSONRPC handler", "err", err, "stack", string(debug.Stack())) - wsc.WriteRPCResponse(types.RPCInternalError("unknown", err)) - go wsc.readRoutine() - } else { - wsc.baseConn.Close() // nolint: errcheck - } - }() - - wsc.baseConn.SetPongHandler(func(m string) error { - return wsc.baseConn.SetReadDeadline(time.Now().Add(wsc.readWait)) - }) - - for { - select { - case <-wsc.Quit(): - return - default: - // reset deadline for every type of message (control or data) - if err := wsc.baseConn.SetReadDeadline(time.Now().Add(wsc.readWait)); err != nil { - wsc.Logger.Error("failed to set read deadline", "err", err) - } - var in []byte - _, in, err := wsc.baseConn.ReadMessage() - if err != nil { - if websocket.IsCloseError(err, websocket.CloseNormalClosure) { - wsc.Logger.Info("Client closed the connection") - } else { - wsc.Logger.Error("Failed to read request", "err", err) - } - wsc.Stop() - return - } - - var request types.RPCRequest - err = json.Unmarshal(in, &request) - if err != nil { - wsc.WriteRPCResponse(types.RPCParseError("", errors.Wrap(err, "Error unmarshaling request"))) - continue - } - - // A Notification is a Request object without an "id" member. - // The Server MUST NOT reply to a Notification, including those that are within a batch request. - if request.ID == "" { - wsc.Logger.Debug("WSJSONRPC received a notification, skipping... (please send a non-empty ID if you want to call a method)") - continue - } - - // Now, fetch the RPCFunc and execute it. - - rpcFunc := wsc.funcMap[request.Method] - if rpcFunc == nil { - wsc.WriteRPCResponse(types.RPCMethodNotFoundError(request.ID)) - continue - } - var args []reflect.Value - if rpcFunc.ws { - wsCtx := types.WSRPCContext{Request: request, WSRPCConnection: wsc} - if len(request.Params) > 0 { - args, err = jsonParamsToArgsWS(rpcFunc, request.Params, wsCtx) - } - } else { - if len(request.Params) > 0 { - args, err = jsonParamsToArgsRPC(rpcFunc, request.Params) - } - } - if err != nil { - wsc.WriteRPCResponse(types.RPCInternalError(request.ID, errors.Wrap(err, "Error converting json params to arguments"))) - continue - } - returns := rpcFunc.f.Call(args) - - // TODO: Need to encode args/returns to string if we want to log them - wsc.Logger.Info("WSJSONRPC", "method", request.Method) - - result, err := unreflectResult(returns) - if err != nil { - wsc.WriteRPCResponse(types.RPCInternalError(request.ID, err)) - continue - } else { - wsc.WriteRPCResponse(types.NewRPCSuccessResponse(request.ID, result)) - continue - } - - } - } -} - -// receives on a write channel and writes out on the socket -func (wsc *wsConnection) writeRoutine() { - pingTicker := time.NewTicker(wsc.pingPeriod) - defer func() { - pingTicker.Stop() - if err := wsc.baseConn.Close(); err != nil { - wsc.Logger.Error("Error closing connection", "err", err) - } - }() - - // https://github.com/gorilla/websocket/issues/97 - pongs := make(chan string, 1) - wsc.baseConn.SetPingHandler(func(m string) error { - select { - case pongs <- m: - default: - } - return nil - }) - - for { - select { - case m := <-pongs: - err := wsc.writeMessageWithDeadline(websocket.PongMessage, []byte(m)) - if err != nil { - wsc.Logger.Info("Failed to write pong (client may disconnect)", "err", err) - } - case <-pingTicker.C: - err := wsc.writeMessageWithDeadline(websocket.PingMessage, []byte{}) - if err != nil { - wsc.Logger.Error("Failed to write ping", "err", err) - wsc.Stop() - return - } - case msg := <-wsc.writeChan: - jsonBytes, err := json.MarshalIndent(msg, "", " ") - if err != nil { - wsc.Logger.Error("Failed to marshal RPCResponse to JSON", "err", err) - } else { - if err = wsc.writeMessageWithDeadline(websocket.TextMessage, jsonBytes); err != nil { - wsc.Logger.Error("Failed to write response", "err", err) - wsc.Stop() - return - } - } - case <-wsc.Quit(): - return - } - } -} - -// All writes to the websocket must (re)set the write deadline. -// If some writes don't set it while others do, they may timeout incorrectly (https://github.com/tendermint/tendermint/issues/553) -func (wsc *wsConnection) writeMessageWithDeadline(msgType int, msg []byte) error { - if err := wsc.baseConn.SetWriteDeadline(time.Now().Add(wsc.writeWait)); err != nil { - return err - } - return wsc.baseConn.WriteMessage(msgType, msg) -} - -//---------------------------------------- - -// WebsocketManager is the main manager for all websocket connections. -// It holds the event switch and a map of functions for routing. -// NOTE: The websocket path is defined externally, e.g. in node/node.go -type WebsocketManager struct { - websocket.Upgrader - funcMap map[string]*RPCFunc - logger *logging.Logger - wsConnOptions []func(*wsConnection) -} - -// NewWebsocketManager returns a new WebsocketManager that routes according to -// the given funcMap and connects to the server with the given connection -// options. -func NewWebsocketManager(funcMap map[string]*RPCFunc, logger *logging.Logger, - wsConnOptions ...func(*wsConnection)) *WebsocketManager { - return &WebsocketManager{ - funcMap: funcMap, - Upgrader: websocket.Upgrader{ - CheckOrigin: func(r *http.Request) bool { - // TODO ??? - return true - }, - }, - logger: logger, - wsConnOptions: wsConnOptions, - } -} - -// WebsocketHandler upgrades the request/response (via http.Hijack) and starts the wsConnection. -func (wm *WebsocketManager) WebsocketHandler(w http.ResponseWriter, r *http.Request) { - wsConn, err := wm.Upgrade(w, r, nil) - if err != nil { - // TODO - return http error - wm.logger.TraceMsg("Failed to upgrade to websocket connection", structure.ErrorKey, err) - return - } - - // register connection - con := NewWSConnection(wsConn, wm.funcMap, wm.logger, wm.wsConnOptions...) - wm.logger.InfoMsg("New websocket connection", "remote_address", con.remoteAddr) - err = con.Start() // Blocking - if err != nil { - wm.logger.TraceMsg("Error starting connection", structure.ErrorKey, err) - } -} - -// rpc.websocket -//----------------------------------------------------------------------------- - // NOTE: assume returns is result struct and error. If error is not nil, return it func unreflectResult(returns []reflect.Value) (interface{}, error) { errV := returns[1] diff --git a/rpc/lib/server/handlers_test.go b/rpc/lib/server/handlers_test.go index 1c7ce3857..20e0bb5be 100644 --- a/rpc/lib/server/handlers_test.go +++ b/rpc/lib/server/handlers_test.go @@ -71,7 +71,7 @@ func TestRPCParams(t *testing.T) { } else { assert.True(t, recv.Error.Code < 0, "#%d: not expecting a positive JSONRPC code", i) // The wanted error is either in the message or the data - assert.Contains(t, recv.Error.Message+recv.Error.Data, tt.wantErr, "#%d: expected substring", i) + assert.Contains(t, recv.Error.Message+string(recv.Error.Data), tt.wantErr, "#%d: expected substring", i) } } } diff --git a/rpc/lib/types/error_codes.go b/rpc/lib/types/error_codes.go index 4ef91dd26..052919e20 100644 --- a/rpc/lib/types/error_codes.go +++ b/rpc/lib/types/error_codes.go @@ -1,8 +1,8 @@ package types import ( + "fmt" "net/http" - "strconv" ) // From JSONRPC 2.0 spec @@ -14,7 +14,9 @@ const ( RPCErrorCodeMethodNotFound RPCErrorCode = -32601 RPCErrorCodeInvalidParams RPCErrorCode = -32602 RPCErrorCodeInternalError RPCErrorCode = -32603 - RPCErrorCodeServerError RPCErrorCode = -32000 + // Available for custom server-defined errors + RPCErrorCodeServerErrorStart RPCErrorCode = -32000 + RPCErrorCodeServerErrorEnd RPCErrorCode = -32099 ) func (code RPCErrorCode) String() string { @@ -29,13 +31,18 @@ func (code RPCErrorCode) String() string { return "Invalid Params" case RPCErrorCodeInternalError: return "Internal Error" - case RPCErrorCodeServerError: - return "Server Error" default: - return strconv.FormatInt(int64(code), 10) + if code.IsServerError() { + return fmt.Sprintf("Server Error %d", code) + } + return fmt.Sprintf("Unknown Error %d", code) } } +func (code RPCErrorCode) IsServerError() bool { + return code >= RPCErrorCodeServerErrorStart && code <= RPCErrorCodeServerErrorEnd +} + func (code RPCErrorCode) HTTPStatusCode() int { switch code { case RPCErrorCodeInvalidRequest: diff --git a/rpc/lib/types/types.go b/rpc/lib/types/types.go index 67ff8a9d3..4124043d9 100644 --- a/rpc/lib/types/types.go +++ b/rpc/lib/types/types.go @@ -4,15 +4,11 @@ import ( "context" "encoding/json" "fmt" - "strings" "github.com/pkg/errors" tmpubsub "github.com/tendermint/tendermint/libs/pubsub" ) -//---------------------------------------- -// REQUEST - type RPCRequest struct { JSONRPC string `json:"jsonrpc"` ID string `json:"id"` @@ -33,52 +29,32 @@ func (req RPCRequest) String() string { return fmt.Sprintf("[%s %s]", req.ID, req.Method) } -func MapToRequest(id string, method string, params map[string]interface{}) (RPCRequest, error) { - var params_ = make(map[string]json.RawMessage, len(params)) - for name, value := range params { - valueJSON, err := json.Marshal(value) +func NewRequest(id string, method string, params interface{}) (RPCRequest, error) { + var payload json.RawMessage + var err error + if params != nil { + payload, err = json.Marshal(params) if err != nil { return RPCRequest{}, err } - params_[name] = valueJSON - } - payload, err := json.Marshal(params_) - if err != nil { - return RPCRequest{}, err } request := NewRPCRequest(id, method, payload) return request, nil } -func ArrayToRequest(id string, method string, params []interface{}) (RPCRequest, error) { - var params_ = make([]json.RawMessage, len(params)) - for i, value := range params { - valueJSON, err := json.Marshal(value) - if err != nil { - return RPCRequest{}, err - } - params_[i] = valueJSON - } - payload, err := json.Marshal(params_) - if err != nil { - return RPCRequest{}, err - } - request := NewRPCRequest(id, method, payload) - return request, nil +type RPCError struct { + Code RPCErrorCode `json:"code"` + Message string `json:"message"` + Data json.RawMessage `json:"data,omitempty"` } -//---------------------------------------- -// RESPONSE - -type RPCError struct { - Code RPCErrorCode `json:"code"` - Message string `json:"message"` - Data string `json:"data,omitempty"` +func (err *RPCError) IsServerError() bool { + return err.Code.IsServerError() } -func (err RPCError) Error() string { - const baseFormat = "RPC error %v - %s" - if err.Data != "" { +func (err *RPCError) Error() string { + const baseFormat = "%v - %s" + if len(err.Data) > 0 { return fmt.Sprintf(baseFormat+": %s", err.Code, err.Message, err.Data) } return fmt.Sprintf(baseFormat, err.Code, err.Message) @@ -102,22 +78,29 @@ func NewRPCSuccessResponse(id string, res interface{}) RPCResponse { var rawMsg json.RawMessage if res != nil { - var js []byte - js, err := json.Marshal(res) + var err error + rawMsg, err = json.Marshal(res) if err != nil { return RPCInternalError(id, errors.Wrap(err, "Error marshalling response")) } - rawMsg = json.RawMessage(js) } return RPCResponse{JSONRPC: "2.0", ID: id, Result: rawMsg} } func NewRPCErrorResponse(id string, code RPCErrorCode, data string) RPCResponse { + var bs []byte + if data != "" { + var err error + bs, err = json.Marshal(data) + if err != nil { + panic(fmt.Errorf("unexpected error JSON marshalling string: %w", err)) + } + } return RPCResponse{ JSONRPC: "2.0", ID: id, - Error: &RPCError{Code: code, Message: code.String(), Data: data}, + Error: &RPCError{Code: code, Message: code.String(), Data: bs}, } } @@ -148,43 +131,9 @@ func RPCInternalError(id string, err error) RPCResponse { return NewRPCErrorResponse(id, RPCErrorCodeInternalError, err.Error()) } -func RPCServerError(id string, err error) RPCResponse { - return NewRPCErrorResponse(id, RPCErrorCodeServerError, err.Error()) -} - -//---------------------------------------- - -// *wsConnection implements this interface. -type WSRPCConnection interface { - GetRemoteAddr() string - WriteRPCResponse(resp RPCResponse) - TryWriteRPCResponse(resp RPCResponse) bool - GetEventSubscriber() EventSubscriber -} - // EventSubscriber mirros tendermint/tendermint/types.EventBusSubscriber type EventSubscriber interface { Subscribe(ctx context.Context, subscriber string, query tmpubsub.Query, out chan<- interface{}) error Unsubscribe(ctx context.Context, subscriber string, query tmpubsub.Query) error UnsubscribeAll(ctx context.Context, subscriber string) error } - -// websocket-only RPCFuncs take this as the first parameter. -type WSRPCContext struct { - Request RPCRequest - WSRPCConnection -} - -//---------------------------------------- -// SOCKETS -// -// Determine if its a unix or tcp socket. -// If tcp, must specify the port; `0.0.0.0` will return incorrectly as "unix" since there's no port -// TODO: deprecate -func SocketType(listenAddr string) string { - socketType := "unix" - if len(strings.Split(listenAddr, ":")) >= 2 { - socketType = "tcp" - } - return socketType -} diff --git a/rpc/lib/types/types_test.go b/rpc/lib/types/types_test.go index dd0e0316d..8bff93138 100644 --- a/rpc/lib/types/types_test.go +++ b/rpc/lib/types/types_test.go @@ -29,20 +29,28 @@ func TestResponses(t *testing.T) { g := RPCMethodNotFoundError("2") h, _ := json.Marshal(g) i := `{"jsonrpc":"2.0","id":"2","error":{"code":-32601,"message":"Method Not Found"}}` - assert.Equal(string(h), string(i)) + assert.Equal(i, string(h)) } func TestRPCError(t *testing.T) { - assert.Equal(t, "RPC error 12 - Badness: One worse than a code 11", + assert.Equal(t, `Unknown Error 12 - Badness: "One worse than a code 11"`, fmt.Sprintf("%v", &RPCError{ Code: 12, Message: "Badness", - Data: "One worse than a code 11", + Data: raw("One worse than a code 11"), })) - assert.Equal(t, "RPC error 12 - Badness", + assert.Equal(t, "Unknown Error 12 - Badness", fmt.Sprintf("%v", &RPCError{ Code: 12, Message: "Badness", })) } + +func raw(v interface{}) json.RawMessage { + bs, err := json.MarshalIndent(v, "", "\t") + if err != nil { + panic(err) + } + return bs +} diff --git a/rpc/rpcinfo/info_server.go b/rpc/rpcinfo/info_server.go index b009c901f..d8edf5a4c 100644 --- a/rpc/rpcinfo/info_server.go +++ b/rpc/rpcinfo/info_server.go @@ -17,8 +17,6 @@ func StartServer(service *rpc.Service, pattern string, listener net.Listener, lo logger = logger.With(structure.ComponentKey, "RPC_Info") routes := GetRoutes(service) mux := http.NewServeMux() - wm := server.NewWebsocketManager(routes, logger) - mux.HandleFunc(pattern, wm.WebsocketHandler) server.RegisterRPCFuncs(mux, routes, logger) srv, err := server.StartHTTPServer(listener, mux, logger) if err != nil { diff --git a/rpc/rpcinfo/infoclient/client.go b/rpc/rpcinfo/infoclient/client.go index 3e21683d8..38a56e603 100644 --- a/rpc/rpcinfo/infoclient/client.go +++ b/rpc/rpcinfo/infoclient/client.go @@ -14,94 +14,90 @@ import ( "github.com/hyperledger/burrow/rpc/rpcinfo" ) -type RPCClient interface { - Call(method string, params map[string]interface{}, result interface{}) (interface{}, error) -} - -func Status(client RPCClient) (*rpc.ResultStatus, error) { +func Status(client rpc.Client) (*rpc.ResultStatus, error) { res := new(rpc.ResultStatus) - _, err := client.Call(rpcinfo.Status, pmap(), res) + err := client.Call(rpcinfo.Status, pmap(), res) if err != nil { return nil, err } return res, nil } -func ChainId(client RPCClient) (*rpc.ResultChainId, error) { +func ChainId(client rpc.Client) (*rpc.ResultChainId, error) { res := new(rpc.ResultChainId) - _, err := client.Call(rpcinfo.ChainID, pmap(), &res) + err := client.Call(rpcinfo.ChainID, pmap(), &res) if err != nil { return nil, err } return res, nil } -func Account(client RPCClient, address crypto.Address) (*acm.Account, error) { +func Account(client rpc.Client, address crypto.Address) (*acm.Account, error) { res := new(rpc.ResultAccount) - _, err := client.Call(rpcinfo.Account, pmap("address", address), res) + err := client.Call(rpcinfo.Account, pmap("address", address), res) if err != nil { return nil, err } return res.Account, nil } -func DumpStorage(client RPCClient, address crypto.Address) (*rpc.ResultDumpStorage, error) { +func DumpStorage(client rpc.Client, address crypto.Address) (*rpc.ResultDumpStorage, error) { res := new(rpc.ResultDumpStorage) - _, err := client.Call(rpcinfo.DumpStorage, pmap("address", address), res) + err := client.Call(rpcinfo.DumpStorage, pmap("address", address), res) if err != nil { return nil, err } return res, nil } -func Storage(client RPCClient, address crypto.Address, key []byte) ([]byte, error) { +func Storage(client rpc.Client, address crypto.Address, key []byte) ([]byte, error) { res := new(rpc.ResultStorage) - _, err := client.Call(rpcinfo.Storage, pmap("address", address, "key", key), res) + err := client.Call(rpcinfo.Storage, pmap("address", address, "key", key), res) if err != nil { return nil, err } return res.Value, nil } -func Name(client RPCClient, name string) (*names.Entry, error) { +func Name(client rpc.Client, name string) (*names.Entry, error) { res := new(rpc.ResultName) - _, err := client.Call(rpcinfo.Name, pmap("name", name), res) + err := client.Call(rpcinfo.Name, pmap("name", name), res) if err != nil { return nil, err } return res.Entry, nil } -func Names(client RPCClient, regex string) ([]*names.Entry, error) { +func Names(client rpc.Client, regex string) ([]*names.Entry, error) { res := new(rpc.ResultNames) - _, err := client.Call(rpcinfo.Names, pmap("regex", regex), res) + err := client.Call(rpcinfo.Names, pmap("regex", regex), res) if err != nil { return nil, err } return res.Names, nil } -func Blocks(client RPCClient, minHeight, maxHeight int) (*rpc.ResultBlocks, error) { +func Blocks(client rpc.Client, minHeight, maxHeight int) (*rpc.ResultBlocks, error) { res := new(rpc.ResultBlocks) - _, err := client.Call(rpcinfo.Blocks, pmap("minHeight", minHeight, "maxHeight", maxHeight), res) + err := client.Call(rpcinfo.Blocks, pmap("minHeight", minHeight, "maxHeight", maxHeight), res) if err != nil { return nil, err } return res, nil } -func Block(client RPCClient, height int) (*rpc.ResultBlock, error) { +func Block(client rpc.Client, height int) (*rpc.ResultBlock, error) { res := new(rpc.ResultBlock) - _, err := client.Call(rpcinfo.Block, pmap("height", height), res) + err := client.Call(rpcinfo.Block, pmap("height", height), res) if err != nil { return nil, err } return res, nil } -func UnconfirmedTxs(client RPCClient, maxTxs int) (*rpc.ResultUnconfirmedTxs, error) { +func UnconfirmedTxs(client rpc.Client, maxTxs int) (*rpc.ResultUnconfirmedTxs, error) { res := new(rpc.ResultUnconfirmedTxs) - _, err := client.Call(rpcinfo.UnconfirmedTxs, pmap("maxTxs", maxTxs), res) + err := client.Call(rpcinfo.UnconfirmedTxs, pmap("maxTxs", maxTxs), res) if err != nil { return nil, err } @@ -109,18 +105,18 @@ func UnconfirmedTxs(client RPCClient, maxTxs int) (*rpc.ResultUnconfirmedTxs, er return resCon, nil } -func Validators(client RPCClient) (*rpc.ResultValidators, error) { +func Validators(client rpc.Client) (*rpc.ResultValidators, error) { res := new(rpc.ResultValidators) - _, err := client.Call(rpcinfo.Validators, pmap(), res) + err := client.Call(rpcinfo.Validators, pmap(), res) if err != nil { return nil, err } return res, nil } -func Consensus(client RPCClient) (*rpc.ResultConsensusState, error) { +func Consensus(client rpc.Client) (*rpc.ResultConsensusState, error) { res := new(rpc.ResultConsensusState) - _, err := client.Call(rpcinfo.Consensus, pmap(), res) + err := client.Call(rpcinfo.Consensus, pmap(), res) if err != nil { return nil, err } @@ -128,14 +124,14 @@ func Consensus(client RPCClient) (*rpc.ResultConsensusState, error) { } func pmap(keyvals ...interface{}) map[string]interface{} { - pm, err := paramsMap(keyvals...) + pm, err := ParamsToMap(keyvals...) if err != nil { panic(err) } return pm } -func paramsMap(orderedKeyVals ...interface{}) (map[string]interface{}, error) { +func ParamsToMap(orderedKeyVals ...interface{}) (map[string]interface{}, error) { if len(orderedKeyVals)%2 != 0 { return nil, fmt.Errorf("mapAndValues requires a even length list of"+ " keys and values but got: %v (length %v)", diff --git a/rpc/rpcinfo/infoclient/client_test.go b/rpc/rpcinfo/infoclient/client_test.go index afcacee00..b15913e86 100644 --- a/rpc/rpcinfo/infoclient/client_test.go +++ b/rpc/rpcinfo/infoclient/client_test.go @@ -10,7 +10,7 @@ func TestParamsMap(t *testing.T) { type aStruct struct { Baz int } - dict, err := paramsMap("Foo", aStruct{5}, + dict, err := ParamsToMap("Foo", aStruct{5}, "Bar", "Nibbles") assert.NoError(t, err, "Should not be a paramsMaperror") assert.Equal(t, map[string]interface{}{ @@ -19,15 +19,15 @@ func TestParamsMap(t *testing.T) { }, dict) // Empty map - dict, err = paramsMap() + dict, err = ParamsToMap() assert.Equal(t, map[string]interface{}{}, dict) assert.NoError(t, err, "Empty mapsAndValues call should be fine") // Invalid maps assert.NoError(t, err, "Empty mapsAndValues call should be fine") - _, err = paramsMap("Foo", 4, "Bar") + _, err = ParamsToMap("Foo", 4, "Bar") assert.Error(t, err, "Should be an error to get an odd number of arguments") - _, err = paramsMap("Foo", 4, 4, "Bar") + _, err = ParamsToMap("Foo", 4, 4, "Bar") assert.Error(t, err, "Should be an error to provide non-string keys") } diff --git a/rpc/eth.go b/rpc/web3/eth_service.go similarity index 57% rename from rpc/eth.go rename to rpc/web3/eth_service.go index dfeb18274..5ae15e8d3 100644 --- a/rpc/eth.go +++ b/rpc/web3/eth_service.go @@ -1,4 +1,4 @@ -package rpc +package web3 import ( "context" @@ -15,14 +15,12 @@ import ( bcm "github.com/hyperledger/burrow/bcm" "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/crypto" - x "github.com/hyperledger/burrow/encoding/hex" "github.com/hyperledger/burrow/execution" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/state" "github.com/hyperledger/burrow/keys" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/project" - "github.com/hyperledger/burrow/rpc/web3" "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" tmConfig "github.com/tendermint/tendermint/config" @@ -78,7 +76,7 @@ func NewEthService( } } -var _ web3.Service = &EthService{} +var _ Service = &EthService{} type EventsReader interface { TxsAtHeight(height uint64) ([]*exec.TxExecution, error) @@ -88,91 +86,75 @@ type EventsReader interface { var _ EventsReader = &state.State{} // Web3ClientVersion returns the version of burrow -func (srv *EthService) Web3ClientVersion() (*web3.Web3ClientVersionResult, error) { - return &web3.Web3ClientVersionResult{ +func (srv *EthService) Web3ClientVersion() (*Web3ClientVersionResult, error) { + return &Web3ClientVersionResult{ ClientVersion: project.FullVersion(), }, nil } // Web3Sha3 returns Keccak-256 (not the standardized SHA3-256) of the given data -func (srv *EthService) Web3Sha3(req *web3.Web3Sha3Params) (*web3.Web3Sha3Result, error) { - data, err := x.DecodeToBytes(req.Data) - if err != nil { - return nil, err - } - - return &web3.Web3Sha3Result{ - HashedData: x.EncodeBytes(crypto.Keccak256(data)), - }, nil +func (srv *EthService) Web3Sha3(req *Web3Sha3Params) (*Web3Sha3Result, error) { + d := new(HexDecoder) + return &Web3Sha3Result{ + HashedData: HexEncoder.Bytes(crypto.Keccak256(d.Bytes(req.Data))), + }, d.Err() } // NetListening returns true if the peer is running -func (srv *EthService) NetListening() (*web3.NetListeningResult, error) { - return &web3.NetListeningResult{ +func (srv *EthService) NetListening() (*NetListeningResult, error) { + return &NetListeningResult{ IsNetListening: srv.nodeView.NodeInfo().GetListenAddress() != "", }, nil } // NetPeerCount returns the number of connected peers -func (srv *EthService) NetPeerCount() (*web3.NetPeerCountResult, error) { - return &web3.NetPeerCountResult{ - NumConnectedPeers: x.EncodeNumber(uint64(srv.nodeView.Peers().Size())), +func (srv *EthService) NetPeerCount() (*NetPeerCountResult, error) { + s := HexEncoder.Uint64(uint64(srv.nodeView.Peers().Size())) + return &NetPeerCountResult{ + s, }, nil } // NetVersion returns the hex encoding of the network id, // this is typically a small int (where 1 == Ethereum mainnet) -func (srv *EthService) NetVersion() (*web3.NetVersionResult, error) { - return &web3.NetVersionResult{ +func (srv *EthService) NetVersion() (*NetVersionResult, error) { + return &NetVersionResult{ ChainID: crypto.GetEthChainID(srv.blockchain.ChainID()).String(), }, nil } // EthProtocolVersion returns the version of tendermint -func (srv *EthService) EthProtocolVersion() (*web3.EthProtocolVersionResult, error) { - return &web3.EthProtocolVersionResult{ +func (srv *EthService) EthProtocolVersion() (*EthProtocolVersionResult, error) { + return &EthProtocolVersionResult{ ProtocolVersion: srv.nodeView.NodeInfo().Version, }, nil } // EthChainId returns the chainID -func (srv *EthService) EthChainId() (*web3.EthChainIdResult, error) { - return &web3.EthChainIdResult{ +func (srv *EthService) EthChainId() (*EthChainIdResult, error) { + return &EthChainIdResult{ ChainId: srv.blockchain.ChainID(), }, nil } // EthBlockNumber returns the latest height -func (srv *EthService) EthBlockNumber() (*web3.EthBlockNumberResult, error) { - return &web3.EthBlockNumberResult{ - BlockNumber: x.EncodeNumber(srv.blockchain.LastBlockHeight()), +func (srv *EthService) EthBlockNumber() (*EthBlockNumberResult, error) { + return &EthBlockNumberResult{ + BlockNumber: HexEncoder.Uint64(srv.blockchain.LastBlockHeight()), }, nil } // EthCall executes a new message call immediately without creating a transaction -func (srv *EthService) EthCall(req *web3.EthCallParams) (*web3.EthCallResult, error) { - var to, from crypto.Address - var err error +func (srv *EthService) EthCall(req *EthCallParams) (*EthCallResult, error) { + d := new(HexDecoder) - if addr := req.Transaction.To; addr != "" { - to, err = x.DecodeToAddress(addr) - if err != nil { - return nil, err - } - } - - if addr := req.Transaction.From; addr != "" { - from, err = x.DecodeToAddress(addr) - if err != nil { - return nil, err - } - } + from := d.Address(req.Transaction.From) + to := d.Address(req.Transaction.To) + data := d.Bytes(req.Transaction.Data) - data, err := x.DecodeToBytes(req.Transaction.Data) - if err != nil { - return nil, err + if d.Err() != nil { + return nil, d.Err() } - txe, err := execution.CallSim(srv.accounts, srv.blockchain, from, to, data, srv.logger) if err != nil { return nil, err @@ -182,19 +164,20 @@ func (srv *EthService) EthCall(req *web3.EthCallParams) (*web3.EthCallResult, er var result string if r := txe.GetResult(); r != nil { - result = x.EncodeBytes(r.GetReturn()) + result = HexEncoder.Bytes(r.GetReturn()) } - return &web3.EthCallResult{ + return &EthCallResult{ ReturnValue: result, }, nil } // EthGetBalance returns an accounts balance, or an error if it does not exist -func (srv *EthService) EthGetBalance(req *web3.EthGetBalanceParams) (*web3.EthGetBalanceResult, error) { - addr, err := x.DecodeToAddress(req.Address) - if err != nil { - return nil, err +func (srv *EthService) EthGetBalance(req *EthGetBalanceParams) (*EthGetBalanceResult, error) { + d := new(HexDecoder) + addr := d.Address(req.Address) + if d.Err() != nil { + return nil, d.Err() } // TODO: read account state at height @@ -205,13 +188,13 @@ func (srv *EthService) EthGetBalance(req *web3.EthGetBalanceParams) (*web3.EthGe return nil, fmt.Errorf("account not found at address %s", req.Address) } - return &web3.EthGetBalanceResult{ - GetBalanceResult: x.EncodeBytes(balance.NativeToWei(acc.Balance).Bytes()), + return &EthGetBalanceResult{ + GetBalanceResult: HexEncoder.Bytes(balance.NativeToWei(acc.Balance).Bytes()), }, nil } // EthGetBlockByHash iterates through all headers to find a matching block height for a given hash -func (srv *EthService) EthGetBlockByHash(req *web3.EthGetBlockByHashParams) (*web3.EthGetBlockByHashResult, error) { +func (srv *EthService) EthGetBlockByHash(req *EthGetBlockByHashParams) (*EthGetBlockByHashResult, error) { height, err := srv.getBlockHeightByHash(req.BlockHash) if err != nil { return nil, err @@ -222,13 +205,13 @@ func (srv *EthService) EthGetBlockByHash(req *web3.EthGetBlockByHashParams) (*we return nil, err } - return &web3.EthGetBlockByHashResult{ + return &EthGetBlockByHashResult{ GetBlockByHashResult: block, }, nil } // EthGetBlockByNumber returns block info at the given height -func (srv *EthService) EthGetBlockByNumber(req *web3.EthGetBlockByNumberParams) (*web3.EthGetBlockByNumberResult, error) { +func (srv *EthService) EthGetBlockByNumber(req *EthGetBlockByNumberParams) (*EthGetBlockByNumberResult, error) { height, err := srv.getHeightByWordOrNumber(req.BlockNumber) if err != nil { return nil, err @@ -239,13 +222,13 @@ func (srv *EthService) EthGetBlockByNumber(req *web3.EthGetBlockByNumberParams) return nil, err } - return &web3.EthGetBlockByNumberResult{ + return &EthGetBlockByNumberResult{ GetBlockByNumberResult: block, }, nil } // EthGetBlockTransactionCountByHash returns the number of transactions in a block matching a given hash -func (srv *EthService) EthGetBlockTransactionCountByHash(req *web3.EthGetBlockTransactionCountByHashParams) (*web3.EthGetBlockTransactionCountByHashResult, error) { +func (srv *EthService) EthGetBlockTransactionCountByHash(req *EthGetBlockTransactionCountByHashParams) (*EthGetBlockTransactionCountByHashResult, error) { height, err := srv.getBlockHeightByHash(req.BlockHash) if err != nil { return nil, err @@ -256,13 +239,13 @@ func (srv *EthService) EthGetBlockTransactionCountByHash(req *web3.EthGetBlockTr return nil, err } - return &web3.EthGetBlockTransactionCountByHashResult{ - BlockTransactionCountByHash: x.EncodeNumber(uint64(numTxs)), + return &EthGetBlockTransactionCountByHashResult{ + BlockTransactionCountByHash: HexEncoder.Uint64(uint64(numTxs)), }, nil } // EthGetBlockTransactionCountByNumber returns the number of transactions in a block matching a given height -func (srv *EthService) EthGetBlockTransactionCountByNumber(req *web3.EthGetBlockTransactionCountByNumberParams) (*web3.EthGetBlockTransactionCountByNumberResult, error) { +func (srv *EthService) EthGetBlockTransactionCountByNumber(req *EthGetBlockTransactionCountByNumberParams) (*EthGetBlockTransactionCountByNumberResult, error) { height, err := srv.getHeightByWordOrNumber(req.BlockNumber) if err != nil { return nil, err @@ -273,16 +256,17 @@ func (srv *EthService) EthGetBlockTransactionCountByNumber(req *web3.EthGetBlock return nil, err } - return &web3.EthGetBlockTransactionCountByNumberResult{ - BlockTransactionCountByHash: x.EncodeNumber(uint64(numTxs)), + return &EthGetBlockTransactionCountByNumberResult{ + BlockTransactionCountByHash: HexEncoder.Uint64(uint64(numTxs)), }, nil } // EthGetCode returns the EVM bytecode at an address -func (srv *EthService) EthGetCode(req *web3.EthGetCodeParams) (*web3.EthGetCodeResult, error) { - addr, err := x.DecodeToAddress(req.Address) - if err != nil { - return nil, err +func (srv *EthService) EthGetCode(req *EthGetCodeParams) (*EthGetCodeResult, error) { + d := new(HexDecoder) + addr := d.Address(req.Address) + if d.Err() != nil { + return nil, d.Err() } acc, err := srv.accounts.GetAccount(addr) @@ -292,17 +276,17 @@ func (srv *EthService) EthGetCode(req *web3.EthGetCodeParams) (*web3.EthGetCodeR return nil, fmt.Errorf("account not found at address %s", req.Address) } - return &web3.EthGetCodeResult{ - Bytes: x.EncodeBytes(acc.EVMCode), + return &EthGetCodeResult{ + Bytes: HexEncoder.Bytes(acc.EVMCode), }, nil } -func (srv *EthService) EthGetStorageAt(req *web3.EthGetStorageAtParams) (*web3.EthGetStorageAtResult, error) { +func (srv *EthService) EthGetStorageAt(req *EthGetStorageAtParams) (*EthGetStorageAtResult, error) { // TODO - return nil, web3.ErrNotFound + return nil, ErrNotFound } -func (srv *EthService) EthGetTransactionByBlockHashAndIndex(req *web3.EthGetTransactionByBlockHashAndIndexParams) (*web3.EthGetTransactionByBlockHashAndIndexResult, error) { +func (srv *EthService) EthGetTransactionByBlockHashAndIndex(req *EthGetTransactionByBlockHashAndIndexParams) (*EthGetTransactionByBlockHashAndIndexResult, error) { height, err := srv.getBlockHeightByHash(req.BlockHash) if err != nil { return nil, err @@ -318,9 +302,12 @@ func (srv *EthService) EthGetTransactionByBlockHashAndIndex(req *web3.EthGetTran return nil, err } - index, err := x.DecodeToNumber(req.Index) - if err != nil { - return nil, err + d := new(HexDecoder) + + index := d.Uint64(req.Index) + + if d.Err() != nil { + return nil, d.Err() } for _, txe := range txes { @@ -329,7 +316,7 @@ func (srv *EthService) EthGetTransactionByBlockHashAndIndex(req *web3.EthGetTran if err != nil { return nil, err } - return &web3.EthGetTransactionByBlockHashAndIndexResult{ + return &EthGetTransactionByBlockHashAndIndexResult{ TransactionResult: getTransaction(head, hash, tx), }, nil } @@ -338,7 +325,7 @@ func (srv *EthService) EthGetTransactionByBlockHashAndIndex(req *web3.EthGetTran return nil, fmt.Errorf("tx not found at hash %s, index %d", req.BlockHash, index) } -func (srv *EthService) EthGetTransactionByBlockNumberAndIndex(req *web3.EthGetTransactionByBlockNumberAndIndexParams) (*web3.EthGetTransactionByBlockNumberAndIndexResult, error) { +func (srv *EthService) EthGetTransactionByBlockNumberAndIndex(req *EthGetTransactionByBlockNumberAndIndexParams) (*EthGetTransactionByBlockNumberAndIndexResult, error) { height, err := srv.getHeightByWordOrNumber(req.BlockNumber) if err != nil { return nil, err @@ -353,10 +340,10 @@ func (srv *EthService) EthGetTransactionByBlockNumberAndIndex(req *web3.EthGetTr if err != nil { return nil, err } - - index, err := x.DecodeToNumber(req.Index) - if err != nil { - return nil, err + d := new(HexDecoder) + index := d.Uint64(req.Index) + if d.Err() != nil { + return nil, d.Err() } for _, txe := range txes { @@ -365,7 +352,7 @@ func (srv *EthService) EthGetTransactionByBlockNumberAndIndex(req *web3.EthGetTr if err != nil { return nil, err } - return &web3.EthGetTransactionByBlockNumberAndIndexResult{ + return &EthGetTransactionByBlockNumberAndIndexResult{ TransactionResult: getTransaction(head, hash, tx), }, nil } @@ -375,12 +362,13 @@ func (srv *EthService) EthGetTransactionByBlockNumberAndIndex(req *web3.EthGetTr } // EthGetTransactionByHash finds a tx by the given hash -func (srv *EthService) EthGetTransactionByHash(req *web3.EthGetTransactionByHashParams) (*web3.EthGetTransactionByHashResult, error) { - hash, err := x.DecodeToBytes(req.TransactionHash) - if err != nil { - return nil, err - } +func (srv *EthService) EthGetTransactionByHash(req *EthGetTransactionByHashParams) (*EthGetTransactionByHashResult, error) { + d := new(HexDecoder) + hash := d.Bytes(req.TransactionHash) + if d.Err() != nil { + return nil, d.Err() + } txe, err := srv.events.TxByHash(hash) if err != nil { return nil, err @@ -396,16 +384,17 @@ func (srv *EthService) EthGetTransactionByHash(req *web3.EthGetTransactionByHash return nil, err } - return &web3.EthGetTransactionByHashResult{ + return &EthGetTransactionByHashResult{ Transaction: getTransaction(head, hash, tx), }, nil } // EthGetTransactionCount returns the number of transactions sent from an address -func (srv *EthService) EthGetTransactionCount(req *web3.EthGetTransactionCountParams) (*web3.EthGetTransactionCountResult, error) { - addr, err := x.DecodeToAddress(req.Address) - if err != nil { - return nil, err +func (srv *EthService) EthGetTransactionCount(req *EthGetTransactionCountParams) (*EthGetTransactionCountResult, error) { + d := new(HexDecoder) + addr := d.Address(req.Address) + if d.Err() != nil { + return nil, d.Err() } // TODO: get tx count at height @@ -415,8 +404,8 @@ func (srv *EthService) EthGetTransactionCount(req *web3.EthGetTransactionCountPa } // TODO: sequence may not always be accurate, is there a better way? - return &web3.EthGetTransactionCountResult{ - NonceOrNull: x.EncodeNumber(acc.GetSequence()), + return &EthGetTransactionCountResult{ + NonceOrNull: HexEncoder.Uint64(acc.GetSequence()), }, nil } @@ -437,10 +426,12 @@ func getHashAndCallTxFromExecution(txe *exec.TxExecution) ([]byte, *payload.Call } // EthGetTransactionReceipt returns the receipt of a previously committed tx -func (srv *EthService) EthGetTransactionReceipt(req *web3.EthGetTransactionReceiptParams) (*web3.EthGetTransactionReceiptResult, error) { - data, err := x.DecodeToBytes(req.TransactionHash) - if err != nil { - return nil, err +func (srv *EthService) EthGetTransactionReceipt(req *EthGetTransactionReceiptParams) (*EthGetTransactionReceiptResult, error) { + d := new(HexDecoder) + + data := d.Bytes(req.TransactionHash) + if d.Err() != nil { + return nil, d.Err() } txe, err := srv.events.TxByHash(data) @@ -460,45 +451,45 @@ func (srv *EthService) EthGetTransactionReceipt(req *web3.EthGetTransactionRecei return nil, err } - status := x.EncodeNumber(1) + status := HexEncoder.Uint64(1) if err := txe.Exception.AsError(); err != nil { - status = x.EncodeNumber(0) + status = HexEncoder.Uint64(0) } - result := &web3.EthGetTransactionReceiptResult{ - Receipt: web3.Receipt{ + result := &EthGetTransactionReceiptResult{ + Receipt: Receipt{ Status: status, - TransactionIndex: x.EncodeNumber(txe.GetIndex()), - BlockNumber: x.EncodeNumber(uint64(block.Height)), - BlockHash: x.EncodeBytes(block.Hash()), - From: x.EncodeBytes(tx.GetInput().Address.Bytes()), - GasUsed: x.EncodeNumber(txe.Result.GetGasUsed()), - TransactionHash: x.EncodeBytes(hash), + TransactionIndex: HexEncoder.Uint64(txe.GetIndex()), + BlockNumber: HexEncoder.Uint64(uint64(block.Height)), + BlockHash: HexEncoder.Bytes(block.Hash()), + From: HexEncoder.Bytes(tx.GetInput().Address.Bytes()), + GasUsed: HexEncoder.Uint64(txe.Result.GetGasUsed()), + TransactionHash: HexEncoder.Bytes(hash), CumulativeGasUsed: hexZero, LogsBloom: hexZero, - Logs: []web3.Logs{}, + Logs: []Logs{}, }, } if txe.Receipt != nil { - result.Receipt.ContractAddress = x.EncodeBytes(txe.Receipt.ContractAddress.Bytes()) + result.Receipt.ContractAddress = HexEncoder.Bytes(txe.Receipt.ContractAddress.Bytes()) result.Receipt.To = pending } else if tx.Address != nil { - result.Receipt.To = x.EncodeBytes(tx.Address.Bytes()) + result.Receipt.To = HexEncoder.Bytes(tx.Address.Bytes()) } return result, nil } // EthHashrate returns the configured tendermint commit timeout -func (srv *EthService) EthHashrate() (*web3.EthHashrateResult, error) { - return &web3.EthHashrateResult{ +func (srv *EthService) EthHashrate() (*EthHashrateResult, error) { + return &EthHashrateResult{ HashesPerSecond: srv.config.Consensus.TimeoutCommit.String(), }, nil } // EthMining returns true if client is a validator -func (srv *EthService) EthMining() (*web3.EthMiningResult, error) { +func (srv *EthService) EthMining() (*EthMiningResult, error) { var isVal bool addr := srv.nodeView.ValidatorAddress() val := srv.validators.Validators(1) @@ -511,14 +502,14 @@ func (srv *EthService) EthMining() (*web3.EthMiningResult, error) { if err != nil { return nil, err } - return &web3.EthMiningResult{ + return &EthMiningResult{ Mining: isVal, }, nil } // EthPendingTransactions returns all txs in the mempool -func (srv *EthService) EthPendingTransactions() (*web3.EthPendingTransactionsResult, error) { - pending := make([]web3.PendingTransactions, 0) +func (srv *EthService) EthPendingTransactions() (*EthPendingTransactionsResult, error) { + pending := make([]PendingTransactions, 0) envelopes, err := srv.nodeView.MempoolTransactions(-1) if err != nil { return nil, err @@ -529,53 +520,56 @@ func (srv *EthService) EthPendingTransactions() (*web3.EthPendingTransactionsRes if err != nil { continue } - pending = append(pending, web3.PendingTransactions{ + pending = append(pending, PendingTransactions{ Transaction: getTransaction(nil, hash, tx), }) } - return &web3.EthPendingTransactionsResult{ + return &EthPendingTransactionsResult{ PendingTransactions: pending, }, nil } -func (srv *EthService) EthEstimateGas(req *web3.EthEstimateGasParams) (*web3.EthEstimateGasResult, error) { +func (srv *EthService) EthEstimateGas(req *EthEstimateGasParams) (*EthEstimateGasResult, error) { // TODO - return &web3.EthEstimateGasResult{ + return &EthEstimateGasResult{ GasUsed: hexZero, }, nil } -func (srv *EthService) EthGasPrice() (*web3.EthGasPriceResult, error) { +func (srv *EthService) EthGasPrice() (*EthGasPriceResult, error) { // TODO - return &web3.EthGasPriceResult{ + return &EthGasPriceResult{ GasPrice: hexZero, }, nil } -func (srv *EthService) EthGetRawTransactionByHash(req *web3.EthGetRawTransactionByHashParams) (*web3.EthGetRawTransactionByHashResult, error) { +func (srv *EthService) EthGetRawTransactionByHash(req *EthGetRawTransactionByHashParams) (*EthGetRawTransactionByHashResult, error) { // TODO - return nil, web3.ErrNotFound + return nil, ErrNotFound } -func (srv *EthService) EthGetRawTransactionByBlockHashAndIndex(req *web3.EthGetRawTransactionByBlockHashAndIndexParams) (*web3.EthGetRawTransactionByBlockHashAndIndexResult, error) { +func (srv *EthService) EthGetRawTransactionByBlockHashAndIndex(req *EthGetRawTransactionByBlockHashAndIndexParams) (*EthGetRawTransactionByBlockHashAndIndexResult, error) { // TODO - return nil, web3.ErrNotFound + return nil, ErrNotFound } -func (srv *EthService) EthGetRawTransactionByBlockNumberAndIndex(req *web3.EthGetRawTransactionByBlockNumberAndIndexParams) (*web3.EthGetRawTransactionByBlockNumberAndIndexResult, error) { +func (srv *EthService) EthGetRawTransactionByBlockNumberAndIndex(req *EthGetRawTransactionByBlockNumberAndIndexParams) (*EthGetRawTransactionByBlockNumberAndIndexResult, error) { // TODO - return nil, web3.ErrNotFound + return nil, ErrNotFound } -func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionParams) (*web3.EthSendRawTransactionResult, error) { - data, err := x.DecodeToBytes(req.SignedTransactionData) - if err != nil { - return nil, err +func (srv *EthService) EthSendRawTransaction(req *EthSendRawTransactionParams) (*EthSendRawTransactionResult, error) { + d := new(HexDecoder) + + data := d.Bytes(req.SignedTransactionData) + + if d.Err() != nil { + return nil, d.Err() } - rawTx := new(txs.EthRawTx) - err = rlp.Decode(data, rawTx) + rawTx := txs.NewEthRawTx(srv.blockchain.ChainID()) + err := rlp.Decode(data, rawTx) if err != nil { return nil, err } @@ -629,17 +623,17 @@ func (srv *EthService) EthSendRawTransaction(req *web3.EthSendRawTransactionPara return nil, txe.Exception.AsError() } - return &web3.EthSendRawTransactionResult{ - TransactionHash: x.EncodeBytes(txe.GetTxHash().Bytes()), + return &EthSendRawTransactionResult{ + TransactionHash: HexEncoder.Bytes(txe.GetTxHash().Bytes()), }, nil } // EthSyncing returns this nodes syncing status (i.e. whether it has caught up) -func (srv *EthService) EthSyncing() (*web3.EthSyncingResult, error) { +func (srv *EthService) EthSyncing() (*EthSyncingResult, error) { // TODO: remaining sync fields - return &web3.EthSyncingResult{ - Syncing: web3.SyncStatus{ - CurrentBlock: x.EncodeNumber(srv.blockchain.LastBlockHeight()), + return &EthSyncingResult{ + Syncing: SyncStatus{ + CurrentBlock: HexEncoder.Uint64(srv.blockchain.LastBlockHeight()), }, }, nil } @@ -653,7 +647,7 @@ func (srv *EthService) getBlockHeightByHash(hash string) (uint64, error) { return i, nil } } - return 0, web3.ErrNotFound + return 0, ErrNotFound } func (srv *EthService) getBlockHeaderAtHeight(height uint64) (*types.Header, error) { @@ -661,28 +655,28 @@ func (srv *EthService) getBlockHeaderAtHeight(height uint64) (*types.Header, err } func hexKeccak(data []byte) string { - return x.EncodeBytes(crypto.Keccak256(data)) + return HexEncoder.Bytes(crypto.Keccak256(data)) } func hexKeccakAddress(data []byte) string { addr := crypto.Keccak256(data) - return x.EncodeBytes(addr[len(addr)-20:]) + return HexEncoder.Bytes(addr[len(addr)-20:]) } -func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (web3.Block, error) { +func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (Block, error) { doc := srv.blockchain.GenesisDoc() if height == 0 { // genesis - return web3.Block{ - Transactions: make([]web3.Transactions, 0), + return Block{ + Transactions: make([]Transactions, 0), Uncles: make([]string, 0), Nonce: hexZeroNonce, Hash: hexKeccak(doc.AppHash.Bytes()), ParentHash: hexKeccak(doc.AppHash.Bytes()), ReceiptsRoot: hexKeccak(doc.AppHash.Bytes()), StateRoot: hexKeccak(doc.AppHash.Bytes()), - Miner: x.EncodeBytes(doc.Validators[0].Address.Bytes()), - Timestamp: x.EncodeNumber(uint64(doc.GenesisTime.Unix())), + Miner: HexEncoder.Bytes(doc.Validators[0].Address.Bytes()), + Timestamp: HexEncoder.Uint64(uint64(doc.GenesisTime.Unix())), Number: hexZero, Size: hexZero, ExtraData: hexZero, @@ -694,80 +688,80 @@ func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (web } block, err := srv.getBlockHeaderAtHeight(height) if err != nil { - return web3.Block{}, err + return Block{}, err } else if block == nil { - return web3.Block{}, fmt.Errorf("block at height %d does not exist", height) + return Block{}, fmt.Errorf("block at height %d does not exist", height) } numTxs, err := srv.blockchain.GetNumTxs(height) if err != nil { - return web3.Block{}, err + return Block{}, err } - transactions := make([]web3.Transactions, 0) + transactions := make([]Transactions, 0) if includeTxs { txes, err := srv.events.TxsAtHeight(height) if err != nil { - return web3.Block{}, err + return Block{}, err } for _, txe := range txes { hash, tx, err := getHashAndCallTxFromExecution(txe) if err != nil { continue } - transactions = append(transactions, web3.Transactions{ + transactions = append(transactions, Transactions{ getTransaction(block, hash, tx), }) } } - return web3.Block{ + return Block{ Hash: hexKeccak(block.Hash().Bytes()), ParentHash: hexKeccak(block.Hash().Bytes()), TransactionsRoot: hexKeccak(block.Hash().Bytes()), StateRoot: hexKeccak(block.Hash().Bytes()), ReceiptsRoot: hexKeccak(block.Hash().Bytes()), Nonce: hexZeroNonce, - Size: x.EncodeNumber(uint64(numTxs)), - Number: x.EncodeNumber(uint64(block.Height)), - Miner: x.EncodeBytes(block.ProposerAddress.Bytes()), + Size: HexEncoder.Uint64(uint64(numTxs)), + Number: HexEncoder.Uint64(uint64(block.Height)), + Miner: HexEncoder.Bytes(block.ProposerAddress.Bytes()), Sha3Uncles: hexZero, LogsBloom: hexZero, ExtraData: hexZero, Difficulty: hexZero, TotalDifficulty: hexZero, GasUsed: hexZero, - GasLimit: x.EncodeNumber(maxGasLimit), - Timestamp: x.EncodeNumber(uint64(block.Time.Unix())), + GasLimit: HexEncoder.Uint64(maxGasLimit), + Timestamp: HexEncoder.Uint64(uint64(block.Time.Unix())), Transactions: transactions, Uncles: []string{}, }, nil } -func getTransaction(block *types.Header, hash []byte, tx *payload.CallTx) web3.Transaction { +func getTransaction(block *types.Header, hash []byte, tx *payload.CallTx) Transaction { // TODO: sensible defaults for non-call - transaction := web3.Transaction{ + transaction := Transaction{ V: hexZero, R: hexZero, S: hexZero, - From: x.EncodeBytes(tx.Input.Address.Bytes()), - Value: x.EncodeNumber(tx.Input.Amount), - Nonce: x.EncodeNumber(tx.Input.Sequence), - Gas: x.EncodeNumber(tx.GasLimit), - GasPrice: x.EncodeNumber(tx.GasPrice), - Data: x.EncodeBytes(tx.Data), + From: HexEncoder.Bytes(tx.Input.Address.Bytes()), + Value: HexEncoder.Uint64(tx.Input.Amount), + Nonce: HexEncoder.Uint64(tx.Input.Sequence), + Gas: HexEncoder.Uint64(tx.GasLimit), + GasPrice: HexEncoder.Uint64(tx.GasPrice), + Data: HexEncoder.Bytes(tx.Data), } if block != nil { // may be pending transaction.BlockHash = hexKeccak(block.Hash().Bytes()) - transaction.Hash = x.EncodeBytes(hash) - transaction.BlockNumber = x.EncodeNumber(uint64(block.Height)) + transaction.Hash = HexEncoder.Bytes(hash) + transaction.BlockNumber = HexEncoder.Uint64(uint64(block.Height)) transaction.TransactionIndex = hexZero } if tx.Address != nil { - transaction.To = x.EncodeBytes(tx.Address.Bytes()) + transaction.To = HexEncoder.Bytes(tx.Address.Bytes()) } else { transaction.To = pending } @@ -788,7 +782,8 @@ func (srv *EthService) getHeightByWord(height string) (uint64, bool) { } func getHeightByNumber(height string) (uint64, error) { - return x.DecodeToNumber(height) + d := new(HexDecoder) + return d.Uint64(height), d.Err() } func (srv *EthService) getHeightByWordOrNumber(i string) (uint64, error) { @@ -805,16 +800,17 @@ func (srv *EthService) getHeightByWordOrNumber(i string) (uint64, error) { // EthSendTransaction constructs, signs and broadcasts a tx from the local node // Note: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1767.md#rationale -func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (*web3.EthSendTransactionResult, error) { +func (srv *EthService) EthSendTransaction(req *EthSendTransactionParams) (*EthSendTransactionResult, error) { tx := &payload.CallTx{ Input: new(payload.TxInput), } var err error + d := new(HexDecoder) if from := req.Transaction.From; from != "" { - tx.Input.Address, err = x.DecodeToAddress(from) - if err != nil { - return nil, fmt.Errorf("failed to parse from address: %v", err) + tx.Input.Address = d.Address(from) + if d.Err() != nil { + return nil, fmt.Errorf("failed to parse from address: %v", d.Err()) } } else { return nil, fmt.Errorf("no from address specified") @@ -828,9 +824,9 @@ func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (* } if to := req.Transaction.To; to != "" { - addr, err := x.DecodeToAddress(to) - if err != nil { - return nil, fmt.Errorf("failed to parse to address: %v", err) + addr := d.Address(to) + if d.Err() != nil { + return nil, fmt.Errorf("failed to parse to address: %v", d.Err()) } tx.Address = &addr } @@ -851,9 +847,9 @@ func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (* } if data := req.Transaction.Data; data != "" { - bs, err := x.DecodeToBytes(data) - if err != nil { - return nil, fmt.Errorf("failed to parse data: %v", err) + bs := d.Bytes(data) + if d.Err() != nil { + return nil, fmt.Errorf("failed to parse data: %v", d.Err()) } tx.Data = bs } @@ -868,13 +864,13 @@ func (srv *EthService) EthSendTransaction(req *web3.EthSendTransactionParams) (* return nil, txe.Exception.AsError() } - return &web3.EthSendTransactionResult{ - TransactionHash: x.EncodeBytes(txe.GetTxHash().Bytes()), + return &EthSendTransactionResult{ + TransactionHash: HexEncoder.Bytes(txe.GetTxHash().Bytes()), }, nil } // EthAccounts returns all accounts signable from the local node -func (srv *EthService) EthAccounts() (*web3.EthAccountsResult, error) { +func (srv *EthService) EthAccounts() (*EthAccountsResult, error) { addresses, err := srv.keyStore.GetAllAddresses() if err != nil { return nil, err @@ -894,32 +890,26 @@ func (srv *EthService) EthAccounts() (*web3.EthAccountsResult, error) { continue } // TODO: only return accounts that exist in current chain - addrs = append(addrs, x.EncodeBytes(key.Address.Bytes())) + addrs = append(addrs, HexEncoder.Bytes(key.Address.Bytes())) } - return &web3.EthAccountsResult{ + return &EthAccountsResult{ Addresses: addrs, }, nil } // EthSign: https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign -func (srv *EthService) EthSign(req *web3.EthSignParams) (*web3.EthSignResult, error) { - addr, err := x.DecodeToBytes(req.Address) - if err != nil { - return nil, err - } - to, err := crypto.AddressFromBytes(addr) - if err != nil { - return nil, err - } +func (srv *EthService) EthSign(req *EthSignParams) (*EthSignResult, error) { + d := new(HexDecoder) + to := d.Address(req.Address) signer, err := keys.AddressableSigner(srv.keyClient, to) if err != nil { return nil, err } - data, err := x.DecodeToBytes(req.Bytes) - if err != nil { - return nil, err + data := d.Bytes(req.Bytes) + if d.Err() != nil { + return nil, d.Err() } msg := append([]byte{0x19}, []byte("Ethereum Signed Message:\n")...) @@ -931,73 +921,73 @@ func (srv *EthService) EthSign(req *web3.EthSignParams) (*web3.EthSignResult, er return nil, err } - return &web3.EthSignResult{ - Signature: x.EncodeBytes(sig.RawBytes()), + return &EthSignResult{ + Signature: HexEncoder.Bytes(sig.RawBytes()), }, nil } // N / A -func (srv *EthService) EthUninstallFilter(*web3.EthUninstallFilterParams) (*web3.EthUninstallFilterResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthUninstallFilter(*EthUninstallFilterParams) (*EthUninstallFilterResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthSubmitHashrate(req *web3.EthSubmitHashrateParams) (*web3.EthSubmitHashrateResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthSubmitHashrate(req *EthSubmitHashrateParams) (*EthSubmitHashrateResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthSubmitWork(*web3.EthSubmitWorkParams) (*web3.EthSubmitWorkResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthSubmitWork(*EthSubmitWorkParams) (*EthSubmitWorkResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthNewBlockFilter() (*web3.EthNewBlockFilterResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthNewBlockFilter() (*EthNewBlockFilterResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthNewFilter(req *web3.EthNewFilterParams) (*web3.EthNewFilterResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthNewFilter(req *EthNewFilterParams) (*EthNewFilterResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthNewPendingTransactionFilter() (*web3.EthNewPendingTransactionFilterResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthNewPendingTransactionFilter() (*EthNewPendingTransactionFilterResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthGetUncleByBlockHashAndIndex(req *web3.EthGetUncleByBlockHashAndIndexParams) (*web3.EthGetUncleByBlockHashAndIndexResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthGetUncleByBlockHashAndIndex(req *EthGetUncleByBlockHashAndIndexParams) (*EthGetUncleByBlockHashAndIndexResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthGetUncleByBlockNumberAndIndex(req *web3.EthGetUncleByBlockNumberAndIndexParams) (*web3.EthGetUncleByBlockNumberAndIndexResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthGetUncleByBlockNumberAndIndex(req *EthGetUncleByBlockNumberAndIndexParams) (*EthGetUncleByBlockNumberAndIndexResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthGetUncleCountByBlockHash(req *web3.EthGetUncleCountByBlockHashParams) (*web3.EthGetUncleCountByBlockHashResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthGetUncleCountByBlockHash(req *EthGetUncleCountByBlockHashParams) (*EthGetUncleCountByBlockHashResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthGetUncleCountByBlockNumber(req *web3.EthGetUncleCountByBlockNumberParams) (*web3.EthGetUncleCountByBlockNumberResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthGetUncleCountByBlockNumber(req *EthGetUncleCountByBlockNumberParams) (*EthGetUncleCountByBlockNumberResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthGetProof(req *web3.EthGetProofParams) (*web3.EthGetProofResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthGetProof(req *EthGetProofParams) (*EthGetProofResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthGetWork() (*web3.EthGetWorkResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthGetWork() (*EthGetWorkResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthGetFilterChanges(req *web3.EthGetFilterChangesParams) (*web3.EthGetFilterChangesResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthGetFilterChanges(req *EthGetFilterChangesParams) (*EthGetFilterChangesResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthGetFilterLogs(req *web3.EthGetFilterLogsParams) (*web3.EthGetFilterLogsResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthGetFilterLogs(req *EthGetFilterLogsParams) (*EthGetFilterLogsResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthCoinbase() (*web3.EthCoinbaseResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthCoinbase() (*EthCoinbaseResult, error) { + return nil, ErrNotFound } -func (srv *EthService) EthGetLogs(req *web3.EthGetLogsParams) (*web3.EthGetLogsResult, error) { - return nil, web3.ErrNotFound +func (srv *EthService) EthGetLogs(req *EthGetLogsParams) (*EthGetLogsResult, error) { + return nil, ErrNotFound } diff --git a/rpc/eth_test.go b/rpc/web3/eth_service_test.go similarity index 86% rename from rpc/eth_test.go rename to rpc/web3/eth_service_test.go index 82d5368eb..e8bd75c2b 100644 --- a/rpc/eth_test.go +++ b/rpc/web3/eth_service_test.go @@ -1,4 +1,4 @@ -package rpc_test +package web3_test import ( "context" @@ -8,22 +8,23 @@ import ( "testing" "time" + "github.com/hyperledger/burrow/rpc/web3" "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" "github.com/hyperledger/burrow/acm/balance" "github.com/hyperledger/burrow/crypto" - x "github.com/hyperledger/burrow/encoding/hex" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/integration" "github.com/hyperledger/burrow/keys" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/project" "github.com/hyperledger/burrow/rpc" - "github.com/hyperledger/burrow/rpc/web3" "github.com/stretchr/testify/require" ) +var d = new(web3.HexDecoder).Must() + func TestWeb3Service(t *testing.T) { ctx := context.Background() genesisAccounts := integration.MakePrivateAccounts("burrow", 1) @@ -58,7 +59,7 @@ func TestWeb3Service(t *testing.T) { accountState := kern.State eventsState := kern.State validatorState := kern.State - eth := rpc.NewEthService(accountState, eventsState, kern.Blockchain, validatorState, + eth := web3.NewEthService(accountState, eventsState, kern.Blockchain, validatorState, nodeView, kern.Transactor, store, kern.Logger) t.Run("Web3Sha3", func(t *testing.T) { @@ -130,13 +131,13 @@ func TestWeb3Service(t *testing.T) { err = txEnv.Sign(sender) require.NoError(t, err) - rawTx, err := txs.RawTxFromEnvelope(txEnv) + rawTx, err := txs.EthRawTxFromEnvelope(txEnv) require.NoError(t, err) bs, err := rawTx.Marshal() require.NoError(t, err) - raw := x.EncodeBytes(bs) + raw := web3.HexEncoder.BytesTrim(bs) _, err = eth.EthSendRawTransaction(&web3.EthSendRawTransactionParams{ SignedTransactionData: raw, @@ -146,12 +147,11 @@ func TestWeb3Service(t *testing.T) { t.Run("EthGetBalance", func(t *testing.T) { result, err := eth.EthGetBalance(&web3.EthGetBalanceParams{ - Address: x.EncodeBytes(receivee.Bytes()), + Address: web3.HexEncoder.BytesTrim(receivee.Bytes()), BlockNumber: "latest", }) require.NoError(t, err) - after, err := x.DecodeToBigInt(result.GetBalanceResult) - require.NoError(t, err) + after := d.BigInt(result.GetBalanceResult) after = balance.WeiToNative(after) require.Equal(t, after.Uint64(), before+1) }) @@ -161,7 +161,7 @@ func TestWeb3Service(t *testing.T) { Address: genesisAccounts[1].GetAddress().String(), }) require.NoError(t, err) - require.Equal(t, x.EncodeNumber(1), result.NonceOrNull) + require.Equal(t, web3.HexEncoder.Uint64(1), result.NonceOrNull) }) // create contract on chain @@ -177,9 +177,9 @@ func TestWeb3Service(t *testing.T) { go func() { tx := &web3.EthSendTransactionParams{ Transaction: web3.Transaction{ - From: x.EncodeBytes(genesisAccounts[3].GetAddress().Bytes()), - Gas: x.EncodeNumber(uint64(40 + idx)), // make tx unique in mempool - Data: x.EncodeBytes(rpc.Bytecode_HelloWorld), + From: web3.HexEncoder.BytesTrim(genesisAccounts[3].GetAddress().Bytes()), + Gas: web3.HexEncoder.Uint64(uint64(40 + idx)), // make tx unique in mempool + Data: web3.HexEncoder.BytesTrim(rpc.Bytecode_HelloWorld), }, } result, err := eth.EthSendTransaction(tx) @@ -200,9 +200,9 @@ func TestWeb3Service(t *testing.T) { t.Run("EthGetTransactionReceipt", func(t *testing.T) { sendResult, err := eth.EthSendTransaction(&web3.EthSendTransactionParams{ Transaction: web3.Transaction{ - From: x.EncodeBytes(genesisAccounts[3].GetAddress().Bytes()), - Gas: x.EncodeNumber(40), - Data: x.EncodeBytes(rpc.Bytecode_HelloWorld), + From: web3.HexEncoder.BytesTrim(genesisAccounts[3].GetAddress().Bytes()), + Gas: web3.HexEncoder.Uint64(40), + Data: web3.HexEncoder.BytesTrim(rpc.Bytecode_HelloWorld), }, }) require.NoError(t, err) @@ -224,15 +224,14 @@ func TestWeb3Service(t *testing.T) { result, err := eth.EthCall(&web3.EthCallParams{ Transaction: web3.Transaction{ - From: x.EncodeBytes(genesisAccounts[1].GetAddress().Bytes()), + From: web3.HexEncoder.BytesTrim(genesisAccounts[1].GetAddress().Bytes()), To: contractAddress, - Data: x.EncodeBytes(packed), + Data: web3.HexEncoder.BytesTrim(packed), }, }) require.NoError(t, err) - value, err := x.DecodeToBytes(result.ReturnValue) - require.NoError(t, err) + value := d.Bytes(result.ReturnValue) vars, err := abi.DecodeFunctionReturn(string(rpc.Abi_HelloWorld), "Hello", value) require.NoError(t, err) require.Len(t, vars, 1) @@ -245,7 +244,7 @@ func TestWeb3Service(t *testing.T) { Address: contractAddress, }) require.NoError(t, err) - require.Equal(t, x.EncodeBytes(rpc.DeployedBytecode_HelloWorld), strings.ToLower(result.Bytes)) + require.Equal(t, web3.HexEncoder.BytesTrim(rpc.DeployedBytecode_HelloWorld), strings.ToLower(result.Bytes)) }) }) @@ -261,7 +260,7 @@ func TestWeb3Service(t *testing.T) { require.Len(t, result.Addresses, len(genesisAccounts)-1) for _, acc := range genesisAccounts { if acc.PrivateKey().CurveType == crypto.CurveTypeSecp256k1 { - require.Contains(t, result.Addresses, x.EncodeBytes(acc.GetAddress().Bytes())) + require.Contains(t, result.Addresses, web3.HexEncoder.BytesTrim(acc.GetAddress().Bytes())) } } }) @@ -276,7 +275,7 @@ func TestWeb3Service(t *testing.T) { }) t.Run("EthGetBlock", func(t *testing.T) { - numberResult, err := eth.EthGetBlockByNumber(&web3.EthGetBlockByNumberParams{BlockNumber: x.EncodeNumber(1)}) + numberResult, err := eth.EthGetBlockByNumber(&web3.EthGetBlockByNumberParams{BlockNumber: web3.HexEncoder.Uint64(1)}) require.NoError(t, err) hashResult, err := eth.EthGetBlockByHash(&web3.EthGetBlockByHashParams{BlockHash: numberResult.GetBlockByNumberResult.Hash}) require.NoError(t, err) diff --git a/rpc/web3/ethclient/client.go b/rpc/web3/ethclient/client.go new file mode 100644 index 000000000..3ed6ee5fa --- /dev/null +++ b/rpc/web3/ethclient/client.go @@ -0,0 +1,181 @@ +package ethclient + +import ( + "context" + "fmt" + "time" + + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/rpc/rpcevents" + "github.com/hyperledger/burrow/rpc/web3" +) + +const ( + EthGetLogsMethod = "eth_getLogs" + EthSyncingMethod = "eth_syncing" + EthBlockNumberMethod = "eth_blockNumber" + EthSendTransactionMethod = "eth_sendTransaction" + EthSendRawTransactionMethod = "eth_sendRawTransaction" + EthGetTransactionCountMethod = "eth_getTransactionCount" + EthAccountsMethod = "eth_accounts" + EthGetTransactionByHashMethod = "eth_getTransactionByHash" + EthGetTransactionReceiptMethod = "eth_getTransactionReceipt" + EthGasPriceMethod = "eth_gasPrice" + NetVersionMethod = "net_version" + Web3ClientVersionMethod = "web3_clientVersion" +) + +// Adjust the polling frequency of AwaitTransaction +const awaitTransactionSleep = 200 * time.Millisecond + +func EthSendTransaction(client rpc.Client, tx *EthSendTransactionParam) (string, error) { + hash := new(string) + err := client.Call(EthSendTransactionMethod, []*EthSendTransactionParam{tx}, &hash) + if err != nil { + return "", err + } + return *hash, nil +} + +func EthSendRawTransaction(client rpc.Client, txHex string) (string, error) { + hash := new(string) + err := client.Call(EthSendRawTransactionMethod, []string{txHex}, &hash) + if err != nil { + return "", err + } + return *hash, nil +} + +func EthGetTransactionCount(client rpc.Client, address crypto.Address) (string, error) { + var count string + err := client.Call(EthGetTransactionCountMethod, []string{web3.HexEncoder.Address(address), "latest"}, &count) + if err != nil { + return "", err + } + return count, nil +} + +func EthGetLogs(client rpc.Client, filter *Filter) ([]*EthLog, error) { + var logs []*EthLog + err := client.Call(EthGetLogsMethod, []*EthFilter{filter.EthFilter()}, &logs) + if err != nil { + return nil, err + } + return logs, nil +} + +func EthAccounts(client rpc.Client) ([]string, error) { + var accounts []string + err := client.Call(EthAccountsMethod, nil, &accounts) + if err != nil { + return nil, err + } + return accounts, nil +} + +func EthGetTransactionByHash(client rpc.Client, txHash string) (*web3.Transaction, error) { + tx := new(web3.Transaction) + err := client.Call(EthGetTransactionByHashMethod, []string{txHash}, tx) + if err != nil { + return nil, err + } + return tx, nil +} + +func EthGetTransactionReceipt(client rpc.Client, txHash string) (*Receipt, error) { + tx := new(Receipt) + err := client.Call(EthGetTransactionReceiptMethod, []string{txHash}, tx) + if err != nil { + return nil, err + } + return tx, nil +} + +func EthSyncing(client rpc.Client) (bool, error) { + syncing := new(bool) + err := client.Call(EthSyncingMethod, nil, syncing) + if err != nil { + return false, err + } + return *syncing, nil +} + +func EthBlockNumber(client rpc.Client) (uint64, error) { + latestBlock := new(string) + err := client.Call(EthBlockNumberMethod, nil, latestBlock) + if err != nil { + return 0, err + } + d := new(web3.HexDecoder) + return d.Uint64(*latestBlock), d.Err() +} + +func EthGasPrice(client rpc.Client) (string, error) { + gasPrice := new(string) + err := client.Call(EthGasPriceMethod, nil, gasPrice) + if err != nil { + return "", err + } + return *gasPrice, nil +} + +// AKA ChainID +func NetVersion(client rpc.Client) (string, error) { + version := new(string) + err := client.Call(NetVersionMethod, nil, version) + if err != nil { + return "", err + } + return *version, nil +} + +func Web3ClientVersion(client rpc.Client) (string, error) { + version := new(string) + err := client.Call(Web3ClientVersionMethod, nil, version) + if err != nil { + return "", err + } + return *version, nil +} + +// Wait for a transaction to be mined/confirmed +func AwaitTransaction(ctx context.Context, client rpc.Client, txHash string) (*Receipt, error) { + for { + tx, err := EthGetTransactionReceipt(client, txHash) + if err != nil { + return nil, fmt.Errorf("AwaitTransaction failed to get ethereum transaction: %w", err) + } + if tx.BlockNumber != "" { + if tx.BlockHash == "" { + return nil, fmt.Errorf("expected Blockhash to be non-empty when BlockNumber is non-empty (%s)", + tx.BlockNumber) + } + // Transaction has been confirmed (is included in a block) + return tx, nil + } + time.Sleep(awaitTransactionSleep) + select { + case <-ctx.Done(): + return nil, fmt.Errorf("AwaitTransaction interrupted: %w", ctx.Err()) + default: + + } + } +} + +func ethLogBound(bound *rpcevents.Bound) string { + if bound == nil { + return "" + } + switch bound.Type { + case rpcevents.Bound_FIRST: + return "earliest" + case rpcevents.Bound_LATEST: + return "latest" + case rpcevents.Bound_ABSOLUTE: + return web3.HexEncoder.Uint64(bound.Index) + default: + return "" + } +} diff --git a/rpc/web3/ethclient/client_test.go b/rpc/web3/ethclient/client_test.go new file mode 100644 index 000000000..cd6ef2206 --- /dev/null +++ b/rpc/web3/ethclient/client_test.go @@ -0,0 +1,104 @@ +// +build integration,ethereum + +package ethclient + +import ( + "encoding/json" + "fmt" + "testing" + + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/solidity" + "github.com/hyperledger/burrow/rpc/rpcevents" + "github.com/hyperledger/burrow/rpc/web3" + "github.com/hyperledger/burrow/tests/web3/web3test" + "github.com/stretchr/testify/assert" + + "github.com/stretchr/testify/require" +) + +var client = web3test.GetChainRPCClient() + +func TestEthAccounts(t *testing.T) { + accounts, err := EthAccounts(client) + require.NoError(t, err) + fmt.Println(accounts) +} + +func TestEthSendTransaction(t *testing.T) { + pk := web3test.GetPrivateKey(t) + + d := new(web3.HexDecoder) + param := &EthSendTransactionParam{ + From: web3.HexEncoder.Address(pk.GetAddress()), + Gas: web3.HexEncoder.Uint64(999999), + Data: web3.HexEncoder.BytesTrim(solidity.Bytecode_EventEmitter), + } + txHash, err := EthSendTransaction(client, param) + require.NoError(t, err) + require.NotEmpty(t, txHash) + + tx, err := EthGetTransactionByHash(client, txHash) + require.NoError(t, err) + assert.Greater(t, d.Uint64(tx.BlockNumber), uint64(0)) + + receipt, err := EthGetTransactionReceipt(client, txHash) + require.NoError(t, err) + assert.Equal(t, txHash, receipt.TransactionHash) + + require.NoError(t, d.Err()) +} + +func TestNonExistentTransaction(t *testing.T) { + txHash := "0x990258f47aba0cf913c14cc101ddf5b589c04765429d5709f643c891442bfcf7" + receipt, err := EthGetTransactionReceipt(client, txHash) + require.NoError(t, err) + require.Equal(t, "", receipt.TransactionHash) + require.Equal(t, "", receipt.BlockNumber) + require.Equal(t, "", receipt.BlockHash) + tx, err := EthGetTransactionByHash(client, txHash) + require.NoError(t, err) + require.Equal(t, "", tx.Hash) + require.Equal(t, "", tx.BlockNumber) + require.Equal(t, "", tx.BlockHash) +} + +func TestEthGetLogs(t *testing.T) { + // TODO: make this test generate its own fixutres + filter := &Filter{ + BlockRange: rpcevents.AbsoluteRange(1, 34340), + Addresses: []crypto.Address{ + crypto.MustAddressFromHexString("a1e378f122fec6aa8c841397042e21bc19368768"), + crypto.MustAddressFromHexString("f73aaa468496a87675d27638878a1600b0db3c71"), + }, + } + result, err := EthGetLogs(client, filter) + require.NoError(t, err) + bs, err := json.Marshal(result) + require.NoError(t, err) + fmt.Printf("%s\n", string(bs)) +} + +func TestNetVersion(t *testing.T) { + chainID, err := NetVersion(client) + require.NoError(t, err) + require.NotEmpty(t, chainID) +} + +func TestWeb3ClientVersion(t *testing.T) { + version, err := Web3ClientVersion(client) + require.NoError(t, err) + require.NotEmpty(t, version) +} + +func TestEthSyncing(t *testing.T) { + result, err := EthSyncing(client) + require.NoError(t, err) + fmt.Printf("%#v\n", result) +} + +func TestEthBlockNumber(t *testing.T) { + height, err := EthBlockNumber(client) + require.NoError(t, err) + require.Greater(t, height, uint64(0)) +} diff --git a/rpc/web3/ethclient/transact_client.go b/rpc/web3/ethclient/transact_client.go new file mode 100644 index 000000000..2976e67cc --- /dev/null +++ b/rpc/web3/ethclient/transact_client.go @@ -0,0 +1,191 @@ +package ethclient + +import ( + "context" + "fmt" + + "github.com/hyperledger/burrow/acm" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/rpc/web3" + "github.com/hyperledger/burrow/txs" + "github.com/hyperledger/burrow/txs/payload" + "google.golang.org/grpc" +) + +const BasicGasLimit = 21000 + +// Provides a partial implementation of the GRPC-generated TransactClient suitable for testing Vent on Ethereum +type TransactClient struct { + client rpc.Client + chainID string + accounts []acm.AddressableSigner +} + +func NewTransactClient(client rpc.Client) *TransactClient { + return &TransactClient{ + client: client, + } +} + +func (cli *TransactClient) WithAccounts(signers ...acm.AddressableSigner) *TransactClient { + return &TransactClient{ + client: cli.client, + accounts: append(cli.accounts, signers...), + } +} + +func (cli *TransactClient) CallTxSync(ctx context.Context, tx *payload.CallTx, + opts ...grpc.CallOption) (*exec.TxExecution, error) { + + var signer acm.AddressableSigner + + for _, sa := range cli.accounts { + if sa.GetAddress() == tx.Input.Address { + signer = sa + break + } + } + + err := cli.completeTx(tx) + if err != nil { + return nil, fmt.Errorf("could not set values on transaction") + } + + var txHash string + if signer == nil { + txHash, err = cli.SendTransaction(tx) + } else { + txHash, err = cli.SendRawTransaction(tx, signer) + } + if err != nil { + return nil, fmt.Errorf("could not send ethereum transaction: %w", err) + } + + fmt.Printf("Waiting for tranasaction %s to be confirmed...\n", txHash) + receipt, err := AwaitTransaction(ctx, cli.client, txHash) + if err != nil { + return nil, err + } + + d := new(web3.HexDecoder) + + header := &exec.TxHeader{ + TxType: payload.TypeCall, + TxHash: d.Bytes(receipt.TransactionHash), + Height: d.Uint64(receipt.BlockNumber), + Index: d.Uint64(receipt.TransactionIndex), + } + + // Attempt to provide sufficient return values to satisfy Vent's needs. + return &exec.TxExecution{ + TxHeader: header, + Receipt: &txs.Receipt{ + TxType: header.TxType, + TxHash: header.TxHash, + CreatesContract: receipt.ContractAddress != "", + ContractAddress: d.Address(receipt.ContractAddress), + }, + }, d.Err() +} + +func (cli *TransactClient) SendTransaction(tx *payload.CallTx) (string, error) { + var to string + if tx.Address != nil { + to = web3.HexEncoder.Address(*tx.Address) + } + + var nonce string + if tx.Input.Sequence != 0 { + nonce = web3.HexEncoder.Uint64OmitEmpty(tx.Input.Sequence) + } + + param := &EthSendTransactionParam{ + From: web3.HexEncoder.Address(tx.Input.Address), + To: to, + Gas: web3.HexEncoder.Uint64OmitEmpty(tx.GasLimit), + GasPrice: web3.HexEncoder.Uint64OmitEmpty(tx.GasPrice), + Value: web3.HexEncoder.Uint64OmitEmpty(tx.Input.Amount), + Data: web3.HexEncoder.BytesTrim(tx.Data), + Nonce: nonce, + } + + return EthSendTransaction(cli.client, param) +} + +func (cli *TransactClient) SendRawTransaction(tx *payload.CallTx, signer acm.AddressableSigner) (string, error) { + chainID, err := cli.GetChainID() + if err != nil { + return "", err + } + txEnv := txs.Enclose(chainID, tx) + + txEnv.Encoding = txs.Envelope_RLP + + err = txEnv.Sign(signer) + if err != nil { + return "", fmt.Errorf("could not sign Ethereum transaction: %w", err) + } + + rawTx, err := txs.EthRawTxFromEnvelope(txEnv) + if err != nil { + return "", fmt.Errorf("could not generate Ethereum raw transaction: %w", err) + } + + bs, err := rawTx.Marshal() + if err != nil { + return "", fmt.Errorf("could not marshal Ethereum raw transaction: %w", err) + } + + return EthSendRawTransaction(cli.client, web3.HexEncoder.BytesTrim(bs)) +} + +func (cli *TransactClient) GetChainID() (string, error) { + if cli.chainID == "" { + var err error + cli.chainID, err = NetVersion(cli.client) + if err != nil { + return "", fmt.Errorf("TransactClient could not get ChainID: %w", err) + } + } + return cli.chainID, nil +} + +func (cli *TransactClient) GetGasPrice() (uint64, error) { + gasPrice, err := EthGasPrice(cli.client) + if err != nil { + return 0, fmt.Errorf("could not get gas price: %w", err) + } + d := new(web3.HexDecoder) + return d.Uint64(gasPrice), d.Err() +} + +func (cli *TransactClient) GetTransactionCount(address crypto.Address) (uint64, error) { + count, err := EthGetTransactionCount(cli.client, address) + if err != nil { + return 0, fmt.Errorf("could not get transaction acount for address %s: %w", address, err) + } + d := new(web3.HexDecoder) + return d.Uint64(count), d.Err() +} + +func (cli *TransactClient) completeTx(tx *payload.CallTx) error { + if tx.GasLimit == 0 { + tx.GasLimit = BasicGasLimit + } + var err error + if tx.GasPrice == 0 { + tx.GasPrice, err = cli.GetGasPrice() + if err != nil { + return err + } + } + if tx.Input.Sequence == 0 { + tx.Input.Sequence, err = cli.GetTransactionCount(tx.Input.Address) + if err != nil { + return err + } + } + return nil +} diff --git a/rpc/web3/ethclient/transact_client_test.go b/rpc/web3/ethclient/transact_client_test.go new file mode 100644 index 000000000..b3f3db8e0 --- /dev/null +++ b/rpc/web3/ethclient/transact_client_test.go @@ -0,0 +1,35 @@ +// +build ethereum,integration + +package ethclient + +import ( + "context" + "fmt" + "testing" + + "github.com/hyperledger/burrow/execution/solidity" + "github.com/hyperledger/burrow/tests/web3/web3test" + "github.com/hyperledger/burrow/txs/payload" + "github.com/stretchr/testify/require" +) + +func TestEthTransactClient_CallTxSync(t *testing.T) { + pk := web3test.GetPrivateKey(t) + cli := NewTransactClient(web3test.GetChainRPCClient()).WithAccounts(pk) + input := pk.GetAddress() + gasPrice, err := cli.GetGasPrice() + require.NoError(t, err) + nonce, err := cli.GetTransactionCount(input) + require.NoError(t, err) + txe, err := cli.CallTxSync(context.Background(), &payload.CallTx{ + Input: &payload.TxInput{ + Address: input, + Sequence: nonce, + }, + GasPrice: gasPrice, + GasLimit: BasicGasLimit * 10, + Data: solidity.Bytecode_EventEmitter, + }) + require.NoError(t, err) + fmt.Println(txe) +} diff --git a/rpc/web3/ethclient/types.go b/rpc/web3/ethclient/types.go new file mode 100644 index 000000000..6458c5935 --- /dev/null +++ b/rpc/web3/ethclient/types.go @@ -0,0 +1,109 @@ +package ethclient + +import ( + "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/rpc/rpcevents" + "github.com/hyperledger/burrow/rpc/web3" +) + +// These types partially duplicate some of those web3/types.go, the should probably be unified at some point but +// the types in web3/types.go are generated and some are incorrect so adding ones used by client here + +type EthLog struct { + Topics []string `json:"topics"` + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` + // Sender of the transaction + Address string `json:"address"` + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` + // Hex representation of a variable length byte array + Data string `json:"data"` + // Hex representation of the integer + LogIndex string `json:"logIndex"` + // Hex representation of the integer + TransactionIndex string `json:"transactionIndex"` +} + +// This is wrong in web3/types.go +type EthSendTransactionParam struct { + // Address of the sender + From string `json:"from"` + // address of the receiver. null when its a contract creation transaction + To string `json:"to,omitempty"` + // The data field sent with the transaction + Gas string `json:"gas,omitempty"` + // The gas price willing to be paid by the sender in Wei + GasPrice string `json:"gasPrice,omitempty"` + // The gas limit provided by the sender in Wei + Value string `json:"value,omitempty"` + // Hex representation of a Keccak 256 hash + Data string `json:"data"` + // A number only to be used once + Nonce string `json:"nonce,omitempty"` +} + +type Filter struct { + *rpcevents.BlockRange + Addresses []crypto.Address + Topics []binary.Word256 +} + +func (f *Filter) EthFilter() *EthFilter { + topics := make([]string, len(f.Topics)) + for i, t := range f.Topics { + topics[i] = web3.HexEncoder.BytesTrim(t[:]) + } + addresses := make([]string, len(f.Addresses)) + for i, a := range f.Addresses { + addresses[i] = web3.HexEncoder.Address(a) + } + return &EthFilter{ + FromBlock: ethLogBound(f.GetStart()), + ToBlock: ethLogBound(f.GetEnd()), + Addresses: addresses, + Topics: topics, + } +} + +type Receipt struct { + // The hex representation of the block's height + BlockNumber string `json:"blockNumber"` + // Hex representation of the integer + CumulativeGasUsed string `json:"cumulativeGasUsed"` + // Hex representation of the integer + GasUsed string `json:"gasUsed"` + // An array of all the logs triggered during the transaction + Logs []EthLog `json:"logs"` + // A 2048 bit bloom filter from the logs of the transaction. Each log sets 3 bits though taking the low-order 11 bits of each of the first three pairs of bytes in a Keccak 256 hash of the log's byte series + TransactionIndex string `json:"transactionIndex"` + // Whether or not the transaction threw an error. + Status string `json:"status"` + // The hex representation of the Keccak 256 of the RLP encoded block + BlockHash string `json:"blockHash"` + // The contract address created, if the transaction was a contract creation, otherwise null + ContractAddress string `json:"contractAddress"` + // The sender of the transaction + From string `json:"from"` + // A 2048 bit bloom filter from the logs of the transaction. Each log sets 3 bits though taking the low-order 11 bits of each of the first three pairs of bytes in a Keccak 256 hash of the log's byte series + LogsBloom string `json:"logsBloom"` + // Destination address of the transaction + To string `json:"to"` + // Hex representation of a Keccak 256 hash + TransactionHash string `json:"transactionHash"` +} + +// Duplicated here to allow for arrays of addresses +type EthFilter struct { + // The hex representation of the block's height + FromBlock string `json:"fromBlock,omitempty"` + // The hex representation of the block's height + ToBlock string `json:"toBlock,omitempty"` + // Yes this is JSON address since allowed to be singular + Addresses []string `json:"address,omitempty"` + // Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with 'or' options + Topics []string `json:"topics,omitempty"` +} diff --git a/rpc/web3/hex.go b/rpc/web3/hex.go new file mode 100644 index 000000000..2e7163090 --- /dev/null +++ b/rpc/web3/hex.go @@ -0,0 +1,113 @@ +package web3 + +import ( + "bytes" + bin "encoding/binary" + "fmt" + "math/big" + "strings" + + "github.com/hyperledger/burrow/crypto" + "github.com/tmthrgd/go-hex" +) + +type HexDecoder struct { + error + must bool +} + +func (d *HexDecoder) Must() *HexDecoder { + return &HexDecoder{must: true} +} + +func (d *HexDecoder) Err() error { + return d.error +} + +func (d *HexDecoder) pushErr(err error) { + if d.must { + panic(err) + } + if d.error == nil { + d.error = err + } +} + +func (d *HexDecoder) Bytes(hs string) []byte { + hexString := strings.TrimPrefix(hs, "0x") + // Ethereum returns odd-length hexString strings when it removes leading zeros + if len(hexString)%2 == 1 { + hexString = "0" + hexString + } + bs, err := hex.DecodeString(hexString) + if err != nil { + d.pushErr(fmt.Errorf("could not decode bytes from '%s': %w", hs, err)) + } + return bs +} + +func (d *HexDecoder) Address(hs string) crypto.Address { + if hs == "" { + return crypto.Address{} + } + address, err := crypto.AddressFromBytes(d.Bytes(hs)) + if err != nil { + d.pushErr(fmt.Errorf("could not decode address from '%s': %w", hs, err)) + } + return address +} + +func (d *HexDecoder) BigInt(hs string) *big.Int { + return new(big.Int).SetBytes(d.Bytes(hs)) +} + +func (d *HexDecoder) Uint64(hs string) uint64 { + bi := d.BigInt(hs) + if !bi.IsUint64() { + d.pushErr(fmt.Errorf("%v is not uint64", bi)) + } + return bi.Uint64() +} + +type hexEncoder struct { +} + +var HexEncoder = new(hexEncoder) + +func (e *hexEncoder) Bytes(bs []byte) string { + return "0x" + hex.EncodeToString(bs) +} + +func (e *hexEncoder) BytesTrim(bs []byte) string { + if len(bs) == 0 { + return "" + } + // Ethereum expects leading zeros to be removed from RLP encodings (SMH) + bs = bytes.TrimLeft(bs, "\x00") + if len(bs) == 0 { + // Special case for zero + return "0x0" + } + return e.Bytes(bs) +} + +func (e *hexEncoder) BigInt(x big.Int) string { + return e.BytesTrim(x.Bytes()) +} + +func (e *hexEncoder) Uint64OmitEmpty(x uint64) string { + if x == 0 { + return "" + } + return e.Uint64(x) +} + +func (e *hexEncoder) Uint64(x uint64) string { + bs := make([]byte, 8) + bin.BigEndian.PutUint64(bs, x) + return e.BytesTrim(bs) +} + +func (e *hexEncoder) Address(address crypto.Address) string { + return e.BytesTrim(address.Bytes()) +} diff --git a/tests/web3/web3test/web3test.go b/tests/web3/web3test/web3test.go new file mode 100644 index 000000000..8b6913b0a --- /dev/null +++ b/tests/web3/web3test/web3test.go @@ -0,0 +1,50 @@ +package web3test + +import ( + "fmt" + "os" + "testing" + + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/rpc/lib/jsonrpc" + "github.com/stretchr/testify/require" + "github.com/tmthrgd/go-hex" +) + +const ganacheRemote = "http://127.0.0.1:8545" + +// Configured in the "ganache" yarn script in vent/test/eth/package.json +var ganachePrivateKey = hex.MustDecodeString("cfad15e9e8f24b5b5608cac150293fe971d23cd9168206b231c859b7974d4295") + +// Set INFURA_SECRET to the basic auth password to use infura remote +var infuraRemote = fmt.Sprintf("https://:%s@ropsten.infura.io/v3/7ed3059377654803a190fa44560d528f", + os.Getenv("INFURA_SECRET")) + +// Toggle below to switch to an infura test +var remote = ganacheRemote + +//var remote = infuraRemote + +var client = jsonrpc.NewClient(remote) + +func GetChainRemote() string { + return remote +} + +func GetChainRPCClient() *jsonrpc.Client { + return client +} + +func GetPrivateKey(t testing.TB) *crypto.PrivateKey { + if remote == ganacheRemote { + pk, err := crypto.PrivateKeyFromRawBytes(ganachePrivateKey, crypto.CurveTypeSecp256k1) + require.NoError(t, err) + return &pk + } + // This account (5DA093B66C2D373E4CBB6081312BE5DFCFF66189) had some test ether on Ropsten at some point: + // https://ropsten.etherscan.io/address/0x5DA093B66C2D373E4CBB6081312BE5DFCFF66189 + // https://faucet.dimensions.network/ seems to be less trigger happy on banning you to top up eth supply + pk := crypto.PrivateKeyFromSecret("fooooo", crypto.CurveTypeSecp256k1) + fmt.Println(pk.GetAddress()) + return &pk +} diff --git a/txs/ethereum_tx.go b/txs/ethereum_tx.go index cee57370c..070a22929 100644 --- a/txs/ethereum_tx.go +++ b/txs/ethereum_tx.go @@ -4,11 +4,10 @@ import ( "fmt" "math/big" - "github.com/tmthrgd/go-hex" - "github.com/btcsuite/btcd/btcec" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/encoding/rlp" + "github.com/tmthrgd/go-hex" ) // Order matters for serialisation @@ -19,14 +18,19 @@ type EthRawTx struct { To []byte `json:"to"` Amount *big.Int `json:"value"` Data []byte `json:"data"` - ChainID *big.Int `json:"chainID"` - + // Signature V *big.Int R *big.Int S *big.Int + // Included in hash but not part of serialised message + chainID *big.Int +} + +func NewEthRawTx(chainID string) *EthRawTx { + return &EthRawTx{chainID: crypto.GetEthChainID(chainID)} } -func RawTxFromEnvelope(txEnv *Envelope) (*EthRawTx, error) { +func EthRawTxFromEnvelope(txEnv *Envelope) (*EthRawTx, error) { if txEnv.GetEncoding() != Envelope_RLP { return nil, fmt.Errorf("can only form EthRawTx from RLP-encoded Envelope") } @@ -60,7 +64,7 @@ func (tx *EthRawTx) RecoverPublicKey() (*crypto.PublicKey, *crypto.Signature, er return nil, nil, fmt.Errorf("EthRawTx does not appear to be signed") } ethSig := crypto.EIP155Signature{ - crypto.Secp256k1Signature{ + Secp256k1Signature: crypto.Secp256k1Signature{ V: *tx.V, R: *tx.R, S: *tx.S, @@ -99,7 +103,7 @@ func (tx *EthRawTx) SignBytes() ([]byte, error) { tx.To, tx.Amount, tx.Data, - tx.ChainID, + tx.chainID, uint(0), uint(0), }) } diff --git a/txs/tx.go b/txs/tx.go index 146489b90..8d03fac98 100644 --- a/txs/tx.go +++ b/txs/tx.go @@ -87,14 +87,18 @@ func (tx *Tx) SignBytes(enc Envelope_EncodingType) ([]byte, error) { func (tx *Tx) RLPRawTx() (*EthRawTx, error) { switch payload := tx.Payload.(type) { case *payload.CallTx: + var to []byte + if payload.Address != nil { + to = payload.Address.Bytes() + } return &EthRawTx{ Sequence: payload.Input.Sequence, GasPrice: payload.GasPrice, GasLimit: payload.GasLimit, - To: payload.Address.Bytes(), + To: to, Amount: balance.NativeToWei(payload.Input.Amount), Data: payload.Data.Bytes(), - ChainID: crypto.GetEthChainID(tx.ChainID), + chainID: crypto.GetEthChainID(tx.ChainID), }, nil default: return nil, fmt.Errorf("tx type %v not supported for rlp encoding", tx.Payload.Type()) diff --git a/vent/chain/burrow/burrow.go b/vent/chain/burrow/burrow.go new file mode 100644 index 000000000..463ff3ed9 --- /dev/null +++ b/vent/chain/burrow/burrow.go @@ -0,0 +1,292 @@ +package burrow + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/hyperledger/burrow/event" + "github.com/hyperledger/burrow/event/query" + "github.com/hyperledger/burrow/vent/chain" + + "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/rpc/rpcevents" + "github.com/hyperledger/burrow/rpc/rpcquery" + "github.com/hyperledger/burrow/vent/types" + "google.golang.org/grpc" + "google.golang.org/grpc/connectivity" +) + +type Chain struct { + conn *grpc.ClientConn + filter query.Query + query rpcquery.QueryClient + exec rpcevents.ExecutionEventsClient + chainID string + version string + continuity exec.ContinuityOpt +} + +var _ chain.Chain = (*Chain)(nil) + +func New(grpcAddr string, filter *chain.Filter) (*Chain, error) { + conn, err := encoding.GRPCDial(grpcAddr) + if err != nil { + return nil, err + } + client := rpcquery.NewQueryClient(conn) + status, err := client.Status(context.Background(), &rpcquery.StatusParam{}) + if err != nil { + return nil, fmt.Errorf("could not get initial status from Burrow: %w", err) + } + filterQuery, err := queryFromFilter(filter) + if err != nil { + return nil, fmt.Errorf("could not build Vent filter query: %w", err) + } + continuity := exec.Continuous + if !query.IsEmpty(filterQuery) { + // Since we may skip some events + continuity = exec.NonConsecutiveEvents + } + return &Chain{ + conn: conn, + query: client, + filter: filterQuery, + exec: rpcevents.NewExecutionEventsClient(conn), + chainID: status.ChainID, + version: status.BurrowVersion, + continuity: continuity, + }, nil +} + +func (b *Chain) GetChainID() string { + return b.chainID +} + +func (b *Chain) GetVersion() string { + return b.version +} + +func (b *Chain) StatusMessage(ctx context.Context, lastProcessedHeight uint64) []interface{} { + var catchUpRatio float64 + status, err := b.query.Status(ctx, &rpcquery.StatusParam{}) + if err != nil { + err = fmt.Errorf("could not get Burrow chain status: %w", err) + return []interface{}{ + "msg", "status", + "error", err.Error(), + } + } + if status.SyncInfo.LatestBlockHeight > 0 { + catchUpRatio = float64(lastProcessedHeight) / float64(status.SyncInfo.LatestBlockHeight) + } + return []interface{}{ + "msg", "status", + "chain_type", "Burrow", + "last_processed_height", lastProcessedHeight, + "fraction_caught_up", catchUpRatio, + "burrow_latest_block_height", status.SyncInfo.LatestBlockHeight, + "burrow_latest_block_duration", status.SyncInfo.LatestBlockDuration, + "burrow_latest_block_hash", status.SyncInfo.LatestBlockHash, + "burrow_latest_app_hash", status.SyncInfo.LatestAppHash, + "burrow_latest_block_time", status.SyncInfo.LatestBlockTime, + "burrow_latest_block_seen_time", status.SyncInfo.LatestBlockSeenTime, + "burrow_node_info", status.NodeInfo, + "burrow_catching_up", status.CatchingUp, + } +} + +func (b *Chain) ConsumeBlocks(ctx context.Context, in *rpcevents.BlockRange, consumer func(chain.Block) error) error { + stream, err := b.exec.Stream(ctx, &rpcevents.BlocksRequest{ + BlockRange: in, + Query: b.filter.String(), + }) + if err != nil { + return fmt.Errorf("could not connect to block stream: %w", err) + } + + return rpcevents.ConsumeBlockExecutions(stream, func(blockExecution *exec.BlockExecution) error { + return consumer((*Block)(blockExecution)) + }, exec.Continuous) +} + +func (b *Chain) Connectivity() connectivity.State { + return b.conn.GetState() +} + +func (b *Chain) GetABI(ctx context.Context, address crypto.Address) (string, error) { + result, err := b.query.GetMetadata(ctx, &rpcquery.GetMetadataParam{ + Address: &address, + }) + if err != nil { + return "", err + } + return result.Metadata, nil +} + +func (b *Chain) Close() error { + return b.conn.Close() +} + +type Block exec.BlockExecution + +func NewBurrowBlock(block *exec.BlockExecution) *Block { + return (*Block)(block) +} + +func (b *Block) GetMetadata(columns types.SQLColumnNames) (map[string]interface{}, error) { + blockHeader, err := json.Marshal(b.Header) + if err != nil { + return nil, fmt.Errorf("could not marshal block header: %w", err) + } + + return map[string]interface{}{ + columns.Height: fmt.Sprintf("%v", b.Height), + columns.TimeStamp: b.Header.GetTime(), + columns.BlockHeader: string(blockHeader), + }, nil +} + +var _ chain.Block = (*Block)(nil) + +func (b *Block) GetHeight() uint64 { + return b.Height +} + +func (b *Block) GetTxs() []chain.Transaction { + txs := make([]chain.Transaction, len(b.TxExecutions)) + for i, tx := range b.TxExecutions { + txs[i] = (*Transaction)(tx) + } + return txs +} + +type Transaction exec.TxExecution + +var _ chain.Transaction = (*Transaction)(nil) + +func (tx *Transaction) GetOrigin() *chain.Origin { + origin := (*exec.TxExecution)(tx).GetOrigin() + if origin == nil { + return nil + } + return &chain.Origin{ + ChainID: origin.ChainID, + Height: origin.Height, + Index: origin.Index, + } +} + +func (tx *Transaction) GetException() *errors.Exception { + return tx.Exception +} + +func (tx *Transaction) GetMetadata(columns types.SQLColumnNames) (map[string]interface{}, error) { + // transaction raw data + envelope, err := json.Marshal(tx.Envelope) + if err != nil { + return nil, fmt.Errorf("couldn't marshal envelope in tx %v: %v", tx, err) + } + + events, err := json.Marshal(tx.Events) + if err != nil { + return nil, fmt.Errorf("couldn't marshal events in tx %v: %v", tx, err) + } + + result, err := json.Marshal(tx.Result) + if err != nil { + return nil, fmt.Errorf("couldn't marshal result in tx %v: %v", tx, err) + } + + receipt, err := json.Marshal(tx.Receipt) + if err != nil { + return nil, fmt.Errorf("couldn't marshal receipt in tx %v: %v", tx, err) + } + + exception, err := json.Marshal(tx.Exception) + if err != nil { + return nil, fmt.Errorf("couldn't marshal exception in tx %v: %v", tx, err) + } + + origin, err := json.Marshal(tx.Origin) + if err != nil { + return nil, fmt.Errorf("couldn't marshal origin in tx %v: %v", tx, err) + } + + return map[string]interface{}{ + columns.Height: tx.Height, + columns.TxHash: tx.TxHash.String(), + columns.TxIndex: tx.Index, + columns.TxType: tx.TxType.String(), + columns.Envelope: string(envelope), + columns.Events: string(events), + columns.Result: string(result), + columns.Receipt: string(receipt), + columns.Origin: string(origin), + columns.Exception: string(exception), + }, nil +} + +func (tx *Transaction) GetHash() binary.HexBytes { + return tx.TxHash +} + +func (tx *Transaction) GetEvents() []chain.Event { + // All txs have events, but not all have LogEvents + var events []chain.Event + for _, ev := range tx.Events { + if ev.Log != nil { + events = append(events, (*Event)(ev)) + } + } + return events +} + +type Event exec.Event + +var _ chain.Event = (*Event)(nil) + +func (ev *Event) GetTransactionHash() binary.HexBytes { + return ev.Header.TxHash +} + +func (ev *Event) GetIndex() uint64 { + return ev.Header.Index +} + +func (ev *Event) GetTopics() []binary.Word256 { + return ev.Log.Topics +} + +func (ev *Event) GetData() []byte { + return ev.Log.Data +} + +func (ev *Event) GetAddress() crypto.Address { + return ev.Log.Address +} + +// Tags +func (ev *Event) Get(key string) (value interface{}, ok bool) { + return (*exec.Event)(ev).Get(key) +} + +func queryFromFilter(filter *chain.Filter) (query.Query, error) { + if filter == nil || (len(filter.Topics) == 0 && len(filter.Addresses) == 0) { + return new(query.Empty), nil + } + matchesFilter := query.NewBuilder() + for _, address := range filter.Addresses { + matchesFilter = matchesFilter.AndEquals("Address", address) + } + for i, topic := range filter.Topics { + matchesFilter = matchesFilter.AndEquals(exec.LogNKey(i), topic) + } + // Note label vent's own EventTypeLabel has different casing! + notLog := query.NewBuilder().AndNotEquals(event.EventTypeKey, exec.TypeLog) + return matchesFilter.Or(notLog).Query() +} diff --git a/vent/chain/chain.go b/vent/chain/chain.go new file mode 100644 index 000000000..b461484c7 --- /dev/null +++ b/vent/chain/chain.go @@ -0,0 +1,63 @@ +// Abstracts over a Burrow GRPC connection and Ethereum json-rpc web3 connection for the purposes of vent + +package chain + +import ( + "context" + + "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/event/query" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/rpc/rpcevents" + "github.com/hyperledger/burrow/vent/types" + "google.golang.org/grpc/connectivity" +) + +type Chain interface { + GetChainID() string + GetVersion() string + ConsumeBlocks(ctx context.Context, in *rpcevents.BlockRange, consumer func(Block) error) error + StatusMessage(ctx context.Context, lastProcessedHeight uint64) []interface{} + Connectivity() connectivity.State + GetABI(ctx context.Context, address crypto.Address) (string, error) + Close() error +} + +type Block interface { + GetHeight() uint64 + GetTxs() []Transaction + GetMetadata(columns types.SQLColumnNames) (map[string]interface{}, error) +} + +type Transaction interface { + GetHash() binary.HexBytes + GetIndex() uint64 + GetEvents() []Event + GetException() *errors.Exception + GetOrigin() *Origin + GetMetadata(columns types.SQLColumnNames) (map[string]interface{}, error) +} + +type Event interface { + query.Tagged + GetIndex() uint64 + GetTransactionHash() binary.HexBytes + GetAddress() crypto.Address + GetTopics() []binary.Word256 + GetData() []byte +} + +type Filter struct { + Addresses []crypto.Address + Topics []binary.Word256 +} + +type Origin struct { + // The original ChainID from for this transaction + ChainID string + // The original height at which this transaction was committed + Height uint64 + // The original index in the block + Index uint64 +} diff --git a/vent/chain/ethereum/consumer.go b/vent/chain/ethereum/consumer.go new file mode 100644 index 000000000..5bc17a5d3 --- /dev/null +++ b/vent/chain/ethereum/consumer.go @@ -0,0 +1,205 @@ +package ethereum + +import ( + "bytes" + "fmt" + "time" + + "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/logging/structure" + "github.com/hyperledger/burrow/rpc/lib/types" + "github.com/pkg/errors" + + "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/rpc/rpcevents" + "github.com/hyperledger/burrow/rpc/web3/ethclient" + "github.com/hyperledger/burrow/vent/chain" +) + +const ( + defaultMaxRetires = 5 + defaultMaxBlocks = 1000 + backoffBase = 10 * time.Millisecond +) + +type consumer struct { + client rpc.Client + filter *chain.Filter + blockRange *rpcevents.BlockRange + logger *logging.Logger + consumer func(block chain.Block) error + // Next unconsumed height + nextBlockHeight uint64 + retries uint64 + backoffDuration time.Duration + maxRetries uint64 + maxBlockBatchSize uint64 + blockBatchSize uint64 +} + +func Consume(client rpc.Client, filter *chain.Filter, blockRange *rpcevents.BlockRange, logger *logging.Logger, + consume func(block chain.Block) error) error { + c := consumer{ + client: client, + filter: filter, + blockRange: blockRange, + logger: logger, + consumer: consume, + backoffDuration: backoffBase, + maxRetries: defaultMaxRetires, + maxBlockBatchSize: defaultMaxBlocks, + blockBatchSize: defaultMaxBlocks, + } + return c.Consume() +} + +func (c *consumer) Consume() error { + start, end, streaming, err := c.bounds() + if err != nil { + return err + } + + for c.nextBlockHeight <= end || streaming { + err = c.ConsumeInBatches(start, end) + if err != nil { + return err + } + start, end, streaming, err = c.bounds() + if err != nil { + return err + } + } + + return nil +} + +func (c *consumer) ConsumeInBatches(start, end uint64) error { + for batchStart := start; batchStart < end; batchStart += c.blockBatchSize { + batchEnd := batchStart + c.blockBatchSize + if batchEnd > end { + batchEnd = end + } + logs, err := ethclient.EthGetLogs(c.client, ðclient.Filter{ + BlockRange: rpcevents.AbsoluteRange(batchStart, batchEnd), + Addresses: c.filter.Addresses, + Topics: c.filter.Topics, + }) + if err != nil { + err = c.handleError(end, err) + if err != nil { + return err + } + // We managed to handle the error (a retry was successful) + return nil + } + // Request was successful + c.recover() + lastBlock, err := consumeBlocksFromLogs(logs, c.consumer) + if err != nil { + return fmt.Errorf("could not consume ethereum logs: %w", err) + } + if lastBlock != nil { + c.nextBlockHeight = lastBlock.GetHeight() + 1 + } + } + return nil +} + +func (c *consumer) bounds() (start uint64, end uint64, streaming bool, err error) { + var latestHeight uint64 + + latestHeight, err = ethclient.EthBlockNumber(c.client) + if err != nil { + err = fmt.Errorf("could not get latest height: %w", err) + return + } + start, end, streaming = c.blockRange.Bounds(latestHeight) + + if start < c.nextBlockHeight { + start = c.nextBlockHeight + } + return +} + +func (c *consumer) handleError(end uint64, err error) error { + var rpcError *types.RPCError + if errors.As(err, &rpcError) { + // If we have a custom server error maybe our batch size is too large or maybe we should wait + if rpcError.IsServerError() { + c.retries++ + if c.retries <= c.maxRetries { + // Server may throw if batch too large or request takes too long + c.backoff() + c.logger.InfoMsg("Ethereum block consumer retrying after Ethereum Server Error", structure.ErrorKey, rpcError) + return c.ConsumeInBatches(c.nextBlockHeight, end) + } + } + } + return err +} + +// Asymptotic decrease to single block +func (c *consumer) backoff() { + c.blockBatchSize /= 2 + if c.blockBatchSize == 0 { + c.blockBatchSize = 1 + } + time.Sleep(c.backoffDuration) + c.backoffDuration *= 2 +} + +// Asymptotic increase to max blocks +func (c *consumer) recover() { + delta := (c.maxBlockBatchSize - c.blockBatchSize) / 2 + if delta == 0 { + c.blockBatchSize = c.maxBlockBatchSize + } else { + c.blockBatchSize += delta + } + // Reset retries and backoff + c.backoffDuration = backoffBase + c.retries = 0 +} + +func consumeBlocksFromLogs(logs []*ethclient.EthLog, consumer func(block chain.Block) error) (chain.Block, error) { + if len(logs) == 0 { + return nil, nil + } + log, err := NewEthereumEvent(logs[0]) + if err != nil { + return nil, fmt.Errorf("could not deserialise ethereum event: %w", err) + } + block := NewEthereumBlock(log) + txHash := log.TransactionHash + indexInBlock := log.IndexInBlock + + for i := 1; i < len(logs); i++ { + log, err = NewEthereumEvent(logs[i]) + if err != nil { + return nil, fmt.Errorf("could not deserialise ethereum event: %w", err) + } + if log.Height > block.Height { + // New block + err = consumer(block) + if err != nil { + return nil, err + } + // Establish new block + block = NewEthereumBlock(log) + } else { + if log.IndexInBlock <= indexInBlock { + return nil, fmt.Errorf("event LogIndex is non-increasing within block, "+ + "previous LogIndex was %d but current is %d (at height %d)", indexInBlock, log.IndexInBlock, block.Height) + } + if !bytes.Equal(txHash, log.TransactionHash) { + // New Tx + block.appendTransaction(log) + } else { + block.appendEvent(log) + } + } + txHash = log.TransactionHash + indexInBlock = log.IndexInBlock + } + return block, consumer(block) +} diff --git a/vent/chain/ethereum/consumer_test.go b/vent/chain/ethereum/consumer_test.go new file mode 100644 index 000000000..4201839b0 --- /dev/null +++ b/vent/chain/ethereum/consumer_test.go @@ -0,0 +1,115 @@ +package ethereum + +import ( + "encoding/json" + "testing" + + "github.com/hyperledger/burrow/rpc/web3/ethclient" + "github.com/hyperledger/burrow/vent/chain" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestConsumeBlocks(t *testing.T) { + var logs []*ethclient.EthLog + err := json.Unmarshal([]byte(ethLogsJSON), &logs) + require.NoError(t, err) + var blocks []chain.Block + lastBlock, err := consumeBlocksFromLogs(logs, func(block chain.Block) error { + blocks = append(blocks, block) + return nil + }) + require.NoError(t, err) + assert.Equal(t, uint64(24), lastBlock.GetHeight()) + assert.Len(t, blocks, 3) + txs0 := blocks[0].GetTxs() + assert.Len(t, txs0, 2) + assert.Len(t, txs0[0].GetEvents(), 1) + assert.Len(t, txs0[1].GetEvents(), 2) + assert.Len(t, blocks[1].GetTxs(), 1) + assert.Len(t, blocks[2].GetTxs(), 1) +} + +func TestConsumer_ConsumeInBatches(t *testing.T) { + // TODO +} + +// From running TestGetEthLogs over in ethclient tests against truffle in vent/test/eth (and subsequently fiddled with) +// language=JSON +const ethLogsJSON = `[ + { + "topics": [ + "0x2d989eca8871e173291c8e287f34adebef09917027f9e904c22ce459a2cff0ca", + "0x446f776e73696521000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000066", + "0x33027547537d35728a741470df1ccf65de10b454ca0def7c5c20b257b7b8d161" + ], + "transactionHash": "0x22d1cbba63e3577a5a35b02945289711e1e21a8e3d69dd2f3b05fd4619eb6b20", + "address": "0xa1e378f122fec6aa8c841397042e21bc19368768", + "blockHash": "0x434520f95c0ca8ad4b1853b6aeb748593b4e8603d923199c44c753133fa66b7b", + "blockNumber": "0x9", + "data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000051446f6e617564616d7066736368696666666168727473656c656b7472697a6974c3a474656e686175707462657472696562737765726b626175756e7465726265616d74656e676573656c6c736368616674000000000000000000000000000000", + "logIndex": "0x0", + "transactionIndex": "0x0" + }, + { + "topics": [ + "0x2d989eca8871e173291c8e287f34adebef09917027f9e904c22ce459a2cff0ca", + "0x446f776e73696521000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000066", + "0x33027547537d35728a741470df1ccf65de10b454ca0def7c5c20b257b7b8d161" + ], + "transactionHash": "0xf1869bff3273e8a31076be06754c8d1ae2bbd38d9faf32cfeb411750878c7ee5", + "address": "0xf73aaa468496a87675d27638878a1600b0db3c71", + "blockHash": "0x9fe9d2eb6b309330c48a77793dbb98bf01faf5d3aea8e0fde60c7d548330ae74", + "blockNumber": "0x9", + "data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000051446f6e617564616d7066736368696666666168727473656c656b7472697a6974c3a474656e686175707462657472696562737765726b626175756e7465726265616d74656e676573656c6c736368616674000000000000000000000000000000", + "logIndex": "0x1", + "transactionIndex": "0x0" + }, + { + "topics": [ + "0x2d989eca8871e173291c8e287f34adebef09917027f9e904c22ce459a2cff0ca", + "0x446f776e73696521000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000066", + "0x33027547537d35728a741470df1ccf65de10b454ca0def7c5c20b257b7b8d161" + ], + "transactionHash": "0xf1869bff3273e8a31076be06754c8d1ae2bbd38d9faf32cfeb411750878c7ee5", + "address": "0xf73aaa468496a87675d27638878a1600b0db3c71", + "blockHash": "0x9fe9d2eb6b309330c48a77793dbb98bf01faf5d3aea8e0fde60c7d548330ae74", + "blockNumber": "0x9", + "data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000051446f6e617564616d7066736368696666666168727473656c656b7472697a6974c3a474656e686175707462657472696562737765726b626175756e7465726265616d74656e676573656c6c736368616674000000000000000000000000000000", + "logIndex": "0x4", + "transactionIndex": "0x0" + }, + { + "topics": [ + "0x2d989eca8871e173291c8e287f34adebef09917027f9e904c22ce459a2cff0ca", + "0x446f776e73696521000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000066", + "0x33027547537d35728a741470df1ccf65de10b454ca0def7c5c20b257b7b8d161" + ], + "transactionHash": "0x919b7ca6cd104bbb9cef2a5199ba8515968494474874894e426227766759d442", + "address": "0xc0eec83d13999827902ad7f2ebba38e4ce457c88", + "blockHash": "0x099fa767303fd80ae83a82d383a87c92662f5e59cf1ed87b55cf1b9c4aea9f6b", + "blockNumber": "0x13", + "data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000051446f6e617564616d7066736368696666666168727473656c656b7472697a6974c3a474656e686175707462657472696562737765726b626175756e7465726265616d74656e676573656c6c736368616674000000000000000000000000000000", + "logIndex": "0x0", + "transactionIndex": "0x0" + }, + { + "topics": [ + "0x2d989eca8871e173291c8e287f34adebef09917027f9e904c22ce459a2cff0ca", + "0x446f776e73696521000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000066", + "0x33027547537d35728a741470df1ccf65de10b454ca0def7c5c20b257b7b8d161" + ], + "transactionHash": "0x6979538ef67d056b72f62d711dc63de0b06c8d4c31e1788bed973d07719f7ee5", + "address": "0xbe6cea7a6cc115ed2c0863dc2df6b883769b2ec5", + "blockHash": "0x3f9a059783e476eea8f723179431498ad62c584c6ea02c4b3cb5b541cd3435b4", + "blockNumber": "0x18", + "data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000051446f6e617564616d7066736368696666666168727473656c656b7472697a6974c3a474656e686175707462657472696562737765726b626175756e7465726265616d74656e676573656c6c736368616674000000000000000000000000000000", + "logIndex": "0x0", + "transactionIndex": "0x0" + } +]` diff --git a/vent/chain/ethereum/ethereum.go b/vent/chain/ethereum/ethereum.go new file mode 100644 index 000000000..763157e95 --- /dev/null +++ b/vent/chain/ethereum/ethereum.go @@ -0,0 +1,247 @@ +package ethereum + +import ( + "context" + "fmt" + "reflect" + + "github.com/hyperledger/burrow/event" + "github.com/hyperledger/burrow/event/query" + "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/rpc/web3" + "github.com/hyperledger/burrow/vent/chain" + + "github.com/hyperledger/burrow/rpc/web3/ethclient" + + "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/errors" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/rpc/rpcevents" + "github.com/hyperledger/burrow/vent/types" + "google.golang.org/grpc/connectivity" +) + +type Chain struct { + client rpc.Client + filter *chain.Filter + chainID string + version string + logger *logging.Logger +} + +var _ chain.Chain = (*Chain)(nil) + +// We rely on this failing if the chain is not an Ethereum Chain +func New(client rpc.Client, filter *chain.Filter, logger *logging.Logger) (*Chain, error) { + chainID, err := ethclient.NetVersion(client) + if err != nil { + return nil, fmt.Errorf("could not get Ethereum ChainID: %w", err) + } + version, err := ethclient.Web3ClientVersion(client) + if err != nil { + return nil, fmt.Errorf("could not get Ethereum node version: %w", err) + } + return &Chain{ + client: client, + filter: filter, + chainID: chainID, + version: version, + logger: logger, + }, nil +} + +func (c *Chain) StatusMessage(ctx context.Context, lastProcessedHeight uint64) []interface{} { + // TODO: more info is available from web3 + return []interface{}{ + "msg", "status", + "chain_type", "Ethereum", + "last_processed_height", lastProcessedHeight, + } +} + +func (c *Chain) GetABI(ctx context.Context, address crypto.Address) (string, error) { + // Unsupported by Ethereum + return "", nil +} + +func (c *Chain) GetVersion() string { + return c.version +} + +func (c *Chain) GetChainID() string { + return c.chainID +} + +func (c *Chain) ConsumeBlocks(ctx context.Context, in *rpcevents.BlockRange, consumer func(chain.Block) error) error { + return Consume(c.client, c.filter, in, c.logger, consumer) +} + +func (c *Chain) Connectivity() connectivity.State { + // TODO: better connectivity information + _, err := ethclient.EthSyncing(c.client) + if err != nil { + return connectivity.TransientFailure + } + return connectivity.Ready +} + +func (c *Chain) Close() error { + // just a http.Client - nothing to free + return nil +} + +type Block struct { + Height uint64 + Transactions []chain.Transaction +} + +func NewEthereumBlock(log *Event) *Block { + return &Block{ + Height: log.Height, + Transactions: []chain.Transaction{NewEthereumTransaction(log)}, + } +} + +var _ chain.Block = (*Block)(nil) + +func (b *Block) GetHeight() uint64 { + return b.Height +} + +func (b *Block) GetTxs() []chain.Transaction { + return b.Transactions +} + +func (b *Block) GetMetadata(columns types.SQLColumnNames) (map[string]interface{}, error) { + return map[string]interface{}{ + columns.Height: fmt.Sprintf("%v", b.Height), + }, nil +} + +func (b *Block) appendTransaction(log *Event) { + b.Transactions = append(b.Transactions, &Transaction{ + Index: uint64(len(b.Transactions)), + Hash: log.TransactionHash, + Events: []chain.Event{log}, + }) +} + +func (b *Block) appendEvent(log *Event) { + tx := b.Transactions[len(b.Transactions)-1].(*Transaction) + log.Index = uint64(len(tx.Events)) + tx.Events = append(tx.Events, log) +} + +type Transaction struct { + Height uint64 + Index uint64 + Hash binary.HexBytes + Events []chain.Event +} + +func NewEthereumTransaction(log *Event) *Transaction { + return &Transaction{ + Height: log.Height, + Index: 0, + Hash: log.TransactionHash, + Events: []chain.Event{log}, + } +} + +func (tx *Transaction) GetHash() binary.HexBytes { + return tx.Hash +} + +func (tx *Transaction) GetIndex() uint64 { + return tx.Index +} + +func (tx *Transaction) GetEvents() []chain.Event { + return tx.Events +} + +func (tx *Transaction) GetException() *errors.Exception { + // Ethereum does not retain an log from reverted transactions + return nil +} + +func (tx *Transaction) GetOrigin() *chain.Origin { + // Origin refers to a previous dumped chain which is not a concept in Ethereum + return nil +} + +func (tx *Transaction) GetMetadata(columns types.SQLColumnNames) (map[string]interface{}, error) { + return map[string]interface{}{ + columns.Height: tx.Height, + columns.TxHash: tx.Hash.String(), + columns.TxIndex: tx.Index, + columns.TxType: exec.TypeLog.String(), + }, nil +} + +var _ chain.Transaction = (*Transaction)(nil) + +type Event struct { + exec.LogEvent + Height uint64 + // Index of event in entire block (what ethereum provides us with + IndexInBlock uint64 + // Index of event in transaction + Index uint64 + TransactionHash binary.HexBytes +} + +var _ chain.Event = (*Event)(nil) + +func NewEthereumEvent(log *ethclient.EthLog) (*Event, error) { + d := new(web3.HexDecoder) + topics := make([]binary.Word256, len(log.Topics)) + for i, t := range log.Topics { + topics[i] = binary.LeftPadWord256(d.Bytes(t)) + } + txHash := d.Bytes(log.TransactionHash) + return &Event{ + LogEvent: exec.LogEvent{ + Topics: topics, + Address: d.Address(log.Address), + Data: d.Bytes(log.Data), + }, + Height: d.Uint64(log.BlockNumber), + IndexInBlock: d.Uint64(log.LogIndex), + TransactionHash: txHash, + }, d.Err() +} + +func (ev *Event) GetIndex() uint64 { + return ev.Index +} + +func (ev *Event) GetTransactionHash() binary.HexBytes { + return ev.TransactionHash +} + +func (ev *Event) GetAddress() crypto.Address { + return ev.Address +} + +func (ev *Event) GetTopics() []binary.Word256 { + return ev.Topics +} + +func (ev *Event) GetData() []byte { + return ev.Data +} + +func (ev *Event) Get(key string) (value interface{}, ok bool) { + switch key { + case event.EventTypeKey: + return exec.TypeLog, true + } + v, ok := ev.LogEvent.Get(key) + if ok { + return v, ok + } + return query.GetReflect(reflect.ValueOf(ev), key) +} diff --git a/vent/config/config.go b/vent/config/config.go index f99b967d5..f35340b44 100644 --- a/vent/config/config.go +++ b/vent/config/config.go @@ -3,6 +3,7 @@ package config import ( "time" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/vent/sqlsol" "github.com/hyperledger/burrow/vent/types" ) @@ -11,12 +12,15 @@ const DefaultPostgresDBURL = "postgres://postgres@localhost:5432/postgres?sslmod // VentConfig is a set of configuration parameters type VentConfig struct { - DBAdapter string - DBURL string - DBSchema string - GRPCAddr string - HTTPAddr string - LogLevel string + DBAdapter string + DBURL string + DBSchema string + ChainAddress string + HTTPListenAddress string + LogLevel string + // Global contracts to watch specified as hex + WatchAddresses []crypto.Address + MinimumHeight uint64 SpecFileOrDirs []string AbiFileOrDirs []string SpecOpt sqlsol.SpecOpt @@ -27,13 +31,13 @@ type VentConfig struct { // DefaultFlags returns a configuration with default values func DefaultVentConfig() *VentConfig { return &VentConfig{ - DBAdapter: types.PostgresDB, - DBURL: DefaultPostgresDBURL, - DBSchema: "vent", - GRPCAddr: "localhost:10997", - HTTPAddr: "0.0.0.0:8080", - LogLevel: "debug", - SpecOpt: sqlsol.None, - AnnounceEvery: time.Second * 5, + DBAdapter: types.PostgresDB, + DBURL: DefaultPostgresDBURL, + DBSchema: "vent", + ChainAddress: "localhost:10997", + HTTPListenAddress: "0.0.0.0:8080", + LogLevel: "debug", + SpecOpt: sqlsol.None, + AnnounceEvery: time.Second * 5, } } diff --git a/vent/service/abi_provider.go b/vent/service/abi_provider.go index 3b08d478a..fa5b997a2 100644 --- a/vent/service/abi_provider.go +++ b/vent/service/abi_provider.go @@ -7,7 +7,7 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/logging" - "github.com/hyperledger/burrow/rpc/rpcquery" + "github.com/hyperledger/burrow/vent/chain" ) type EventSpecGetter func(abi.EventID, crypto.Address) (*abi.EventSpec, error) @@ -15,13 +15,13 @@ type EventSpecGetter func(abi.EventID, crypto.Address) (*abi.EventSpec, error) // AbiProvider provides a method for loading ABIs from disk, and retrieving them from burrow on-demand type AbiProvider struct { abiSpec *abi.Spec - cli rpcquery.QueryClient + chain chain.Chain logger *logging.Logger } // NewAbiProvider loads ABIs from the filesystem. A set of zero or more files or directories can be passed in the path // argument. If an event is encountered for which no ABI is known, it is retrieved from burrow -func NewAbiProvider(paths []string, cli rpcquery.QueryClient, logger *logging.Logger) (provider *AbiProvider, err error) { +func NewAbiProvider(paths []string, chain chain.Chain, logger *logging.Logger) (provider *AbiProvider, err error) { abiSpec := abi.NewSpec() if len(paths) > 0 { abiSpec, err = abi.LoadPath(paths...) @@ -32,7 +32,7 @@ func NewAbiProvider(paths []string, cli rpcquery.QueryClient, logger *logging.Lo provider = &AbiProvider{ abiSpec: abiSpec, - cli: cli, + chain: chain, logger: logger.WithScope("NewAbiProvider"), } return @@ -43,23 +43,23 @@ func NewAbiProvider(paths []string, cli rpcquery.QueryClient, logger *logging.Lo func (p *AbiProvider) GetEventAbi(eventID abi.EventID, address crypto.Address) (*abi.EventSpec, error) { evAbi, ok := p.abiSpec.EventsByID[eventID] if !ok { - resp, err := p.cli.GetMetadata(context.Background(), &rpcquery.GetMetadataParam{Address: &address}) + metadata, err := p.chain.GetABI(context.Background(), address) if err != nil { p.logger.InfoMsg("Error retrieving abi for event", "address", address.String(), "eventid", eventID.String(), "error", err) return nil, err } - if resp == nil || resp.Metadata == "" { + if metadata == "" { p.logger.InfoMsg("ABI not found for contract", "address", address.String(), "eventid", eventID.String()) return nil, fmt.Errorf("No ABI present for contract at address %v", address) } - a, err := abi.ReadSpec([]byte(resp.Metadata)) + a, err := abi.ReadSpec([]byte(metadata)) if err != nil { - p.logger.InfoMsg("Failed to parse abi", "address", address.String(), "eventid", eventID.String(), "abi", resp.Metadata) + p.logger.InfoMsg("Failed to parse abi", "address", address.String(), "eventid", eventID.String(), "abi", metadata) return nil, err } evAbi, ok = a.EventsByID[eventID] if !ok { - p.logger.InfoMsg("Event missing from ABI spec for contract", "address", address.String(), "eventid", eventID.String(), "abi", resp.Metadata) + p.logger.InfoMsg("Event missing from ABI spec for contract", "address", address.String(), "eventid", eventID.String(), "abi", metadata) return nil, fmt.Errorf("Event missing from ABI spec for contract") } diff --git a/vent/service/block_consumer.go b/vent/service/block_consumer.go index 7003784e7..96425b5b3 100644 --- a/vent/service/block_consumer.go +++ b/vent/service/block_consumer.go @@ -7,36 +7,37 @@ import ( "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/structure" + "github.com/hyperledger/burrow/vent/chain" "github.com/hyperledger/burrow/vent/sqlsol" "github.com/hyperledger/burrow/vent/types" "github.com/pkg/errors" ) -func NewBlockConsumer(projection *sqlsol.Projection, opt sqlsol.SpecOpt, getEventSpec EventSpecGetter, - eventCh chan<- types.EventData, doneCh chan struct{}, - logger *logging.Logger) func(blockExecution *exec.BlockExecution) error { +func NewBlockConsumer(chainID string, projection *sqlsol.Projection, opt sqlsol.SpecOpt, getEventSpec EventSpecGetter, + eventCh chan<- types.EventData, doneCh chan struct{}, logger *logging.Logger) func(block chain.Block) error { logger = logger.WithScope("makeBlockConsumer") var blockHeight uint64 - return func(blockExecution *exec.BlockExecution) error { + return func(block chain.Block) error { if finished(doneCh) { return io.EOF } // set new block number - blockHeight = blockExecution.Height + blockHeight = block.GetHeight() + txs := block.GetTxs() logger.TraceMsg("Block received", - "height", blockExecution.Height, - "num_txs", len(blockExecution.TxExecutions)) + "height", blockHeight, + "num_txs", len(txs)) // create a fresh new structure to store block data at this height blockData := sqlsol.NewBlockData(blockHeight) if opt.Enabled(sqlsol.Block) { - blkRawData, err := buildBlkData(projection.Tables, blockExecution) + blkRawData, err := buildBlkData(projection.Tables, block) if err != nil { return errors.Wrapf(err, "Error building block raw data") } @@ -44,9 +45,9 @@ func NewBlockConsumer(projection *sqlsol.Projection, opt sqlsol.SpecOpt, getEven blockData.AddRow(tables.Block, blkRawData) } - // get transactions for a given block - for _, txe := range blockExecution.TxExecutions { - logger.TraceMsg("Getting transaction", "TxHash", txe.TxHash, "num_events", len(txe.Events)) + for _, txe := range txs { + events := txe.GetEvents() + logger.TraceMsg("Getting transaction", "TxHash", txe.GetHash(), "num_events", len(events)) if opt.Enabled(sqlsol.Tx) { txRawData, err := buildTxData(txe) @@ -59,33 +60,26 @@ func NewBlockConsumer(projection *sqlsol.Projection, opt sqlsol.SpecOpt, getEven // reverted transactions don't have to update event data tables // so check that condition to filter them - if txe.Exception == nil { - txOrigin := txe.Origin + if txe.GetException() == nil { + txOrigin := txe.GetOrigin() if txOrigin == nil { // This is an original transaction from the current chain so we build its origin from context - txOrigin = &exec.Origin{ - Time: blockExecution.GetHeader().GetTime(), - ChainID: blockExecution.GetHeader().GetChainID(), - Height: txe.GetHeight(), + txOrigin = &chain.Origin{ + ChainID: chainID, + Height: block.GetHeight(), Index: txe.GetIndex(), } } - // get events for a given transaction - for _, event := range txe.Events { - if event.Log == nil { - // Only EVM events are of interest - continue - } - + for _, event := range events { var tagged query.Tagged = event - eventID := event.Log.SolidityEventID() - eventSpec, eventSpecErr := getEventSpec(eventID, event.Log.Address) + eventID := exec.SolidityEventID(event.GetTopics()) + eventSpec, eventSpecErr := getEventSpec(eventID, event.GetAddress()) if eventSpecErr != nil { logger.InfoMsg("could not get ABI for solidity event", structure.ErrorKey, eventSpecErr, "event_id", eventID, - "address", event.Log.Address) + "address", event.GetAddress()) } else { // Since we have the event ABI we will allow matching on ABI fields tagged = query.TagsFor(event, query.TaggedPrefix("Event", eventSpec)) @@ -104,11 +98,10 @@ func NewBlockConsumer(projection *sqlsol.Projection, opt sqlsol.SpecOpt, getEven if eventSpecErr != nil { return errors.Wrapf(eventSpecErr, "could not get ABI for solidity event matching "+ "projection filter \"%s\" with id %v at address %v", - eventClass.Filter, eventID, event.Log.Address) + eventClass.Filter, eventID, event.GetAddress()) } - logger.InfoMsg("Matched event", "header", event.Header, - "filter", eventClass.Filter) + logger.InfoMsg("Matched event", "event_id", eventID, "filter", eventClass.Filter) // unpack, decode & build event data eventData, err := buildEventData(projection, eventClass, event, txOrigin, eventSpec, logger) diff --git a/vent/service/block_consumer_test.go b/vent/service/block_consumer_test.go index 025a9ea8c..f98e75e5c 100644 --- a/vent/service/block_consumer_test.go +++ b/vent/service/block_consumer_test.go @@ -6,11 +6,14 @@ import ( "testing" "time" + "github.com/hyperledger/burrow/vent/chain/burrow" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/execution/solidity" "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/vent/chain" "github.com/hyperledger/burrow/vent/sqlsol" "github.com/hyperledger/burrow/vent/types" "github.com/stretchr/testify/assert" @@ -18,6 +21,8 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) +const chainID = "TestChainID" + func TestBlockConsumer(t *testing.T) { doneCh := make(chan struct{}) eventCh := make(chan types.EventData, 100) @@ -78,7 +83,7 @@ func TestBlockConsumer(t *testing.T) { }, }) require.NoError(t, err) - blockConsumer := NewBlockConsumer(projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) + blockConsumer := NewBlockConsumer(chainID, projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) tables, err := consumeBlock(blockConsumer, eventCh, log) require.NoError(t, err) rows := tables[tableName] @@ -103,7 +108,7 @@ func TestBlockConsumer(t *testing.T) { }, }) require.NoError(t, err) - blockConsumer := NewBlockConsumer(projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) + blockConsumer := NewBlockConsumer(chainID, projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) _, err = consumeBlock(blockConsumer, eventCh, log) require.Error(t, err) require.Contains(t, err.Error(), "could not find ABI") @@ -126,7 +131,7 @@ func TestBlockConsumer(t *testing.T) { }, }) require.NoError(t, err) - blockConsumer := NewBlockConsumer(projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) + blockConsumer := NewBlockConsumer(chainID, projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) table, err := consumeBlock(blockConsumer, eventCh, log) require.Len(t, table, 0, "should match no event") }) @@ -150,7 +155,7 @@ func TestBlockConsumer(t *testing.T) { spec, err := abi.ReadSpec(solidity.Abi_EventEmitter) require.NoError(t, err) - blockConsumer := NewBlockConsumer(projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) + blockConsumer := NewBlockConsumer(chainID, projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) table, err := consumeBlock(blockConsumer, eventCh, log) // Check matches require.NoError(t, err) @@ -158,7 +163,7 @@ func TestBlockConsumer(t *testing.T) { require.Len(t, table[tableName], 1) // Now Remove the ABI - should not match the event delete(spec.EventsByID, manyTypesEventSpec.ID) - blockConsumer = NewBlockConsumer(projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) + blockConsumer = NewBlockConsumer(chainID, projection, sqlsol.None, spec.GetEventAbi, eventCh, doneCh, logger) table, err = consumeBlock(blockConsumer, eventCh, log) require.NoError(t, err) require.Len(t, table, 0, "should match no events") @@ -169,7 +174,7 @@ const timeout = time.Second var errTimeout = fmt.Errorf("timed out after %s waiting for consumer to emit block event", timeout) -func consumeBlock(blockConsumer func(*exec.BlockExecution) error, eventCh <-chan types.EventData, +func consumeBlock(blockConsumer func(block chain.Block) error, eventCh <-chan types.EventData, logEvents ...*exec.LogEvent) (map[string]types.EventDataTable, error) { block := &exec.BlockExecution{ @@ -185,7 +190,7 @@ func consumeBlock(blockConsumer func(*exec.BlockExecution) error, eventCh <-chan } block.AppendTxs(txe) } - err := blockConsumer(block) + err := blockConsumer(burrow.NewBurrowBlock(block)) if err != nil { return nil, err } diff --git a/vent/service/consumer.go b/vent/service/consumer.go index 33f3ad887..9e8fcfb75 100644 --- a/vent/service/consumer.go +++ b/vent/service/consumer.go @@ -7,39 +7,33 @@ import ( "sync" "time" - "github.com/hyperledger/burrow/encoding" - - "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/rpc/lib/jsonrpc" + "github.com/hyperledger/burrow/vent/chain/burrow" + "github.com/hyperledger/burrow/vent/chain/ethereum" "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/logging/structure" "github.com/hyperledger/burrow/rpc/rpcevents" - "github.com/hyperledger/burrow/rpc/rpcquery" + "github.com/hyperledger/burrow/vent/chain" "github.com/hyperledger/burrow/vent/config" "github.com/hyperledger/burrow/vent/sqldb" "github.com/hyperledger/burrow/vent/sqlsol" "github.com/hyperledger/burrow/vent/types" "github.com/pkg/errors" - "google.golang.org/grpc" "google.golang.org/grpc/connectivity" ) // Consumer contains basic configuration for consumer to run type Consumer struct { - Config *config.VentConfig - Logger *logging.Logger - DB *sqldb.SQLDB - GRPCConnection *grpc.ClientConn + Config *config.VentConfig + Logger *logging.Logger + DB *sqldb.SQLDB + Chain chain.Chain // external events channel used for when vent is leveraged as a library - EventsChannel chan types.EventData - Done chan struct{} - shutdownOnce sync.Once - Status -} - -// Status announcement -type Status struct { + EventsChannel chan types.EventData + Done chan struct{} + shutdownOnce sync.Once LastProcessedHeight uint64 - Burrow *rpc.ResultStatus } // NewConsumer constructs a new consumer configuration. @@ -62,21 +56,14 @@ func (c *Consumer) Run(projection *sqlsol.Projection, stream bool) error { c.Logger.InfoMsg("Connecting to Burrow gRPC server") - c.GRPCConnection, err = encoding.GRPCDial(c.Config.GRPCAddr) + c.Chain, err = c.connectToChain() if err != nil { - return errors.Wrapf(err, "Error connecting to Burrow gRPC server at %s", c.Config.GRPCAddr) + return errors.Wrapf(err, "Error connecting to Burrow gRPC server at %s", c.Config.ChainAddress) } - defer c.GRPCConnection.Close() + defer c.Chain.Close() defer close(c.EventsChannel) - // get the chain ID to compare with the one stored in the db - qCli := rpcquery.NewQueryClient(c.GRPCConnection) - c.Status.Burrow, err = qCli.Status(context.Background(), &rpcquery.StatusParam{}) - if err != nil { - return errors.Wrapf(err, "Error getting chain status") - } - - abiProvider, err := NewAbiProvider(c.Config.AbiFileOrDirs, rpcquery.NewQueryClient(c.GRPCConnection), c.Logger) + abiProvider, err := NewAbiProvider(c.Config.AbiFileOrDirs, c.Chain, c.Logger) if err != nil { return errors.Wrapf(err, "Error loading ABIs") } @@ -101,14 +88,14 @@ func (c *Consumer) Run(projection *sqlsol.Projection, stream bool) error { } defer c.DB.Close() - err = c.DB.Init(c.Burrow.ChainID, c.Burrow.BurrowVersion) + err = c.DB.Init(c.Chain.GetChainID(), c.Chain.GetVersion()) if err != nil { return fmt.Errorf("could not clean tables after ChainID change: %v", err) } c.Logger.InfoMsg("Synchronizing config and database projection structures") - err = c.DB.SynchronizeDB(c.Burrow.ChainID, projection.Tables) + err = c.DB.SynchronizeDB(c.Chain.GetChainID(), projection.Tables) if err != nil { return errors.Wrap(err, "Error trying to synchronize database") } @@ -126,17 +113,7 @@ func (c *Consumer) Run(projection *sqlsol.Projection, stream bool) error { c.Logger.InfoMsg("Getting last processed block number from SQL log table") - // NOTE [Silas]: I am preserving the comment below that dates from the early days of Vent. I have looked at the - // bosmarmot git history and I cannot see why the original author thought that it was the case that there was - // no way of knowing if the last block of events was committed since the block and its associated log is - // committed atomically in a transaction and this is a core part of he design of Vent - in order that it does not - // repeat - - // [ORIGINAL COMMENT] - // right now there is no way to know if the last block of events was completely read - // so we have to begin processing from the last block number stored in database - // and update event data if already present - fromBlock, err := c.DB.LastBlockHeight(c.Burrow.ChainID) + fromBlock, err := c.DB.LastBlockHeight(c.Chain.GetChainID()) if err != nil { errCh <- errors.Wrapf(err, "Error trying to get last processed block number") return @@ -149,8 +126,12 @@ func (c *Consumer) Run(projection *sqlsol.Projection, stream bool) error { startingBlock++ } + // Allows us skip historical/checkpointed state + if startingBlock < c.Config.MinimumHeight { + startingBlock = c.Config.MinimumHeight + } + // setup block range to get needed blocks server side - cli := rpcevents.NewExecutionEventsClient(c.GRPCConnection) var end *rpcevents.Bound if stream { end = rpcevents.StreamBound() @@ -162,19 +143,13 @@ func (c *Consumer) Run(projection *sqlsol.Projection, stream bool) error { BlockRange: rpcevents.NewBlockRange(rpcevents.AbsoluteBound(startingBlock), end), } - // gets blocks in given range based on last processed block taken from database - stream, err := cli.Stream(context.Background(), request) - if err != nil { - errCh <- errors.Wrapf(err, "Error connecting to block stream") - return - } - - // get blocks - c.Logger.TraceMsg("Waiting for blocks...") - err = rpcevents.ConsumeBlockExecutions(stream, - NewBlockConsumer(projection, c.Config.SpecOpt, abiProvider.GetEventAbi, eventCh, c.Done, c.Logger)) + // gets blocks in given range based on last processed block taken from database + consumer := NewBlockConsumer(c.Chain.GetChainID(), projection, c.Config.SpecOpt, abiProvider.GetEventAbi, + eventCh, c.Done, c.Logger) + + err = c.Chain.ConsumeBlocks(context.Background(), request.BlockRange, consumer) if err != nil { if err == io.EOF { @@ -194,7 +169,7 @@ func (c *Consumer) Run(projection *sqlsol.Projection, stream bool) error { select { // Process block events case blk := <-eventCh: - c.Status.LastProcessedHeight = blk.BlockHeight + c.LastProcessedHeight = blk.BlockHeight err := c.commitBlock(projection, blk) if err != nil { c.Logger.InfoMsg("error committing block", "err", err) @@ -221,7 +196,7 @@ func (c *Consumer) Run(projection *sqlsol.Projection, stream bool) error { func (c *Consumer) commitBlock(projection *sqlsol.Projection, blockEvents types.EventData) error { // upsert rows in specific SQL event tables and update block number - if err := c.DB.SetBlock(c.Burrow.ChainID, projection.Tables, blockEvents); err != nil { + if err := c.DB.SetBlock(c.Chain.GetChainID(), projection.Tables, blockEvents); err != nil { return fmt.Errorf("error upserting rows in database: %v", err) } @@ -249,11 +224,11 @@ func (c *Consumer) Health() error { } // check grpc connection status - if c.GRPCConnection == nil { + if c.Chain == nil { return errors.New("grpc disconnected") } - if grpcState := c.GRPCConnection.GetState(); grpcState != connectivity.Ready { + if grpcState := c.Chain.Connectivity(); grpcState != connectivity.Ready { return errors.New("grpc connection not ready") } @@ -265,48 +240,24 @@ func (c *Consumer) Shutdown() { c.shutdownOnce.Do(func() { c.Logger.InfoMsg("Shutting down vent consumer...") close(c.Done) - c.GRPCConnection.Close() + err := c.Chain.Close() + if err != nil { + c.Logger.InfoMsg("Could not close Chain connection", structure.ErrorKey, err) + } }) } -func (c *Consumer) updateStatus(qcli rpcquery.QueryClient) { - stat, err := qcli.Status(context.Background(), &rpcquery.StatusParam{}) - if err != nil { - c.Logger.InfoMsg("could not get blockchain status", "err", err) - return - } - c.Status.Burrow = stat -} - -func (c *Consumer) statusMessage() []interface{} { - var catchUpRatio float64 - if c.Burrow.SyncInfo.LatestBlockHeight > 0 { - catchUpRatio = float64(c.LastProcessedHeight) / float64(c.Burrow.SyncInfo.LatestBlockHeight) - } - return []interface{}{ - "msg", "status", - "last_processed_height", c.LastProcessedHeight, - "fraction_caught_up", catchUpRatio, - "burrow_latest_block_height", c.Burrow.SyncInfo.LatestBlockHeight, - "burrow_latest_block_duration", c.Burrow.SyncInfo.LatestBlockDuration, - "burrow_latest_block_hash", c.Burrow.SyncInfo.LatestBlockHash, - "burrow_latest_app_hash", c.Burrow.SyncInfo.LatestAppHash, - "burrow_latest_block_time", c.Burrow.SyncInfo.LatestBlockTime, - "burrow_latest_block_seen_time", c.Burrow.SyncInfo.LatestBlockSeenTime, - "burrow_node_info", c.Burrow.NodeInfo, - "burrow_catching_up", c.Burrow.CatchingUp, - } +func (c *Consumer) StatusMessage(ctx context.Context) []interface{} { + return c.Chain.StatusMessage(context.Background(), c.LastProcessedHeight) } func (c *Consumer) announceEvery(doneCh <-chan struct{}) { if c.Config.AnnounceEvery != 0 { - qcli := rpcquery.NewQueryClient(c.GRPCConnection) ticker := time.NewTicker(c.Config.AnnounceEvery) for { select { case <-ticker.C: - c.updateStatus(qcli) - c.Logger.InfoMsg("Announcement", c.statusMessage()...) + c.Logger.InfoMsg("Announcement", c.StatusMessage(context.Background())...) case <-doneCh: ticker.Stop() return @@ -323,3 +274,20 @@ func finished(doneCh chan struct{}) bool { return false } } + +func (c *Consumer) connectToChain() (chain.Chain, error) { + filter := &chain.Filter{ + Addresses: c.Config.WatchAddresses, + } + c.Logger.InfoMsg("Attempting to detect chain type running on %s", c.Config.ChainAddress) + burrowChain, burrowErr := burrow.New(c.Config.ChainAddress, filter) + if burrowErr != nil { + ethereumChain, ethErr := ethereum.New(jsonrpc.NewClient(c.Config.ChainAddress), filter, c.Logger) + if ethErr != nil { + return nil, fmt.Errorf("could not connect to either Burrow or Ethereum chain, "+ + "Burrow error: %v, Ethereum error: %v", burrowErr, ethErr) + } + return ethereumChain, nil + } + return burrowChain, nil +} diff --git a/vent/service/consumer_ethereum_test.go b/vent/service/consumer_ethereum_test.go new file mode 100644 index 000000000..54dd50c46 --- /dev/null +++ b/vent/service/consumer_ethereum_test.go @@ -0,0 +1,20 @@ +// +build integration,ethereum + +package service_test + +import ( + "testing" + + "github.com/hyperledger/burrow/rpc/web3/ethclient" + "github.com/hyperledger/burrow/tests/web3/web3test" + "github.com/hyperledger/burrow/vent/test" + "github.com/stretchr/testify/require" +) + +func TestEthereumConsumer(t *testing.T) { + pk := web3test.GetPrivateKey(t) + tcli := ethclient.NewTransactClient(web3test.GetChainRPCClient()) + chainID, err := tcli.GetChainID() + require.NoError(t, err) + testConsumer(t, chainID, test.PostgresVentConfig(web3test.GetChainRemote()), tcli, pk.GetAddress()) +} diff --git a/vent/service/consumer_integration_test.go b/vent/service/consumer_integration_test.go index d426deb97..67974fe7e 100644 --- a/vent/service/consumer_integration_test.go +++ b/vent/service/consumer_integration_test.go @@ -30,9 +30,13 @@ const ( var tables = types.DefaultSQLTableNames -func testConsumer(t *testing.T, chainID string, cfg *config.VentConfig, tcli rpctransact.TransactClient, inputAddress crypto.Address) { +func testConsumer(t *testing.T, chainID string, cfg *config.VentConfig, tcli test.TransactClient, + inputAddress crypto.Address) { + create := test.CreateContract(t, tcli, inputAddress) - eventColumnName := "EventTest" + eventTestTableName := "EventTest" + require.True(t, create.Receipt.CreatesContract) + cfg.WatchAddresses = []crypto.Address{create.Receipt.ContractAddress} t.Run("view mode", func(t *testing.T) { // create test db @@ -61,8 +65,8 @@ func testConsumer(t *testing.T, chainID string, cfg *config.VentConfig, tcli rpc runConsumer(t, cfg) // test data stored in database for two different block ids - ensureEvents(t, db, chainID, eventColumnName, txeA.Height, 1) - eventData := ensureEvents(t, db, chainID, eventColumnName, txeB.Height, 1) + ensureEvents(t, db, chainID, eventTestTableName, txeA.Height, 1) + eventData := ensureEvents(t, db, chainID, eventTestTableName, txeB.Height, 1) // block & tx raw data also persisted if cfg.SpecOpt&sqlsol.Block > 0 { @@ -90,7 +94,7 @@ func testConsumer(t *testing.T, chainID string, cfg *config.VentConfig, tcli rpc description := "Description of TestEvent5" txeC := test.CallAddEvents(t, tcli, inputAddress, create.Receipt.ContractAddress, name, description) runConsumer(t, cfg) - ensureEvents(t, db, chainID, eventColumnName, txeC.Height, 2) + ensureEvents(t, db, chainID, eventTestTableName, txeC.Height, 2) }) } @@ -126,14 +130,14 @@ func testDeleteEvent(t *testing.T, chainID string, cfg *config.VentConfig, tcli // delete not allowed on log mode } -func ensureEvents(t *testing.T, db *sqldb.SQLDB, chainID, column string, height, numEvents uint64) types.EventData { +func ensureEvents(t *testing.T, db *sqldb.SQLDB, chainID, table string, height, numEvents uint64) types.EventData { eventData, err := db.GetBlock(chainID, height) require.NoError(t, err) require.Equal(t, height, eventData.BlockHeight) require.Equal(t, 3, len(eventData.Tables)) // Check the number of rows - tblData := eventData.Tables[column] + tblData := eventData.Tables[table] require.Equal(t, numEvents, uint64(len(tblData))) if numEvents > 0 && len(tblData) > 0 { diff --git a/vent/service/consumer_postgres_test.go b/vent/service/consumer_postgres_test.go index a929ac752..8bba31513 100644 --- a/vent/service/consumer_postgres_test.go +++ b/vent/service/consumer_postgres_test.go @@ -1,4 +1,4 @@ -// +build integration +// +build integration,!ethereum package service_test @@ -25,7 +25,7 @@ func TestPostgresConsumer(t *testing.T) { defer shutdown() inputAddress := privateAccounts[0].GetAddress() grpcAddress := kern.GRPCListenAddress().String() - tcli := test.NewTransactClient(t, grpcAddress) + tcli := test.NewBurrowTransactClient(t, grpcAddress) t.Parallel() time.Sleep(2 * time.Second) @@ -48,7 +48,7 @@ func TestPostgresConsumer(t *testing.T) { }) t.Run("PostgresTriggers", func(t *testing.T) { - tCli := test.NewTransactClient(t, kern.GRPCListenAddress().String()) + tCli := test.NewBurrowTransactClient(t, kern.GRPCListenAddress().String()) create := test.CreateContract(t, tCli, inputAddress) // generate events diff --git a/vent/service/consumer_sqlite_test.go b/vent/service/consumer_sqlite_test.go index 67553f35d..de6c0d2b6 100644 --- a/vent/service/consumer_sqlite_test.go +++ b/vent/service/consumer_sqlite_test.go @@ -1,4 +1,4 @@ -// +build integration sqlite +// +build integration,sqlite package service_test @@ -18,7 +18,7 @@ func TestSqliteConsumer(t *testing.T) { defer shutdown() inputAddress := privateAccounts[0].GetAddress() grpcAddress := kern.GRPCListenAddress().String() - tcli := test.NewTransactClient(t, grpcAddress) + tcli := test.NewBurrowTransactClient(t, grpcAddress) t.Parallel() time.Sleep(2 * time.Second) diff --git a/vent/service/decoder.go b/vent/service/decoder.go index 91ad9d83a..24b1b4be4 100644 --- a/vent/service/decoder.go +++ b/vent/service/decoder.go @@ -7,29 +7,30 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/vent/chain" "github.com/hyperledger/burrow/vent/types" "github.com/pkg/errors" ) // decodeEvent unpacks & decodes event data -func decodeEvent(eventHeader *exec.Header, log *exec.LogEvent, txOrigin *exec.Origin, evAbi *abi.EventSpec) (map[string]interface{}, error) { +func decodeEvent(log chain.Event, txOrigin *chain.Origin, evAbi *abi.EventSpec) (map[string]interface{}, error) { // to prepare decoded data and map to event item name data := make(map[string]interface{}) // decode header to get context data for each event data[types.EventNameLabel] = evAbi.Name data[types.ChainIDLabel] = txOrigin.ChainID - data[types.BlockHeightLabel] = strconv.FormatUint(txOrigin.GetHeight(), 10) - data[types.TxIndexLabel] = strconv.FormatUint(txOrigin.GetIndex(), 10) - data[types.EventIndexLabel] = strconv.FormatUint(eventHeader.GetIndex(), 10) - data[types.EventTypeLabel] = eventHeader.GetEventType().String() - data[types.TxTxHashLabel] = eventHeader.TxHash.String() + data[types.BlockHeightLabel] = strconv.FormatUint(txOrigin.Height, 10) + data[types.TxIndexLabel] = strconv.FormatUint(txOrigin.Index, 10) + data[types.EventIndexLabel] = strconv.FormatUint(log.GetIndex(), 10) + data[types.EventTypeLabel] = exec.TypeLog.String() + data[types.TxTxHashLabel] = log.GetTransactionHash().String() // build expected interface type array to get log event values unpackedData := abi.GetPackingTypes(evAbi.Inputs) // unpack event data (topics & data part) - if err := abi.UnpackEvent(evAbi, log.Topics, log.Data, unpackedData...); err != nil { + if err := abi.UnpackEvent(evAbi, log.GetTopics(), log.GetData(), unpackedData...); err != nil { return nil, errors.Wrap(err, "Could not unpack event data") } diff --git a/vent/service/rowbuilder.go b/vent/service/rowbuilder.go index d369d4e1e..03e89b861 100644 --- a/vent/service/rowbuilder.go +++ b/vent/service/rowbuilder.go @@ -2,14 +2,13 @@ package service import ( "bytes" - "encoding/json" "fmt" "strings" "unicode/utf8" "github.com/hyperledger/burrow/execution/evm/abi" - "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/vent/chain" "github.com/hyperledger/burrow/vent/sqlsol" "github.com/hyperledger/burrow/vent/types" "github.com/pkg/errors" @@ -17,18 +16,14 @@ import ( ) // buildEventData builds event data from transactions -func buildEventData(projection *sqlsol.Projection, eventClass *types.EventClass, event *exec.Event, - txOrigin *exec.Origin, evAbi *abi.EventSpec, logger *logging.Logger) (types.EventDataRow, error) { +func buildEventData(projection *sqlsol.Projection, eventClass *types.EventClass, event chain.Event, + txOrigin *chain.Origin, evAbi *abi.EventSpec, logger *logging.Logger) (types.EventDataRow, error) { // a fresh new row to store column/value data row := make(map[string]interface{}) - // get header & log data for the given event - eventHeader := event.GetHeader() - eventLog := event.GetLog() - // decode event data using the provided abi specification - decodedData, err := decodeEvent(eventHeader, eventLog, txOrigin, evAbi) + decodedData, err := decodeEvent(event, txOrigin, evAbi) if err != nil { return types.EventDataRow{}, errors.Wrapf(err, "Error decoding event (filter: %s)", eventClass.Filter) } @@ -68,74 +63,29 @@ func buildEventData(projection *sqlsol.Projection, eventClass *types.EventClass, return types.EventDataRow{Action: rowAction, RowData: row, EventClass: eventClass}, nil } -// buildBlkData builds block data from block stream -func buildBlkData(tbls types.EventTables, block *exec.BlockExecution) (types.EventDataRow, error) { - // a fresh new row to store column/value data - row := make(map[string]interface{}) - +func buildBlkData(tbls types.EventTables, block chain.Block) (types.EventDataRow, error) { // block raw data if _, ok := tbls[tables.Block]; ok { - blockHeader, err := json.Marshal(block.Header) + row, err := block.GetMetadata(columns) if err != nil { - return types.EventDataRow{}, fmt.Errorf("could not marshal BlockHeader in block %v", block) + return types.EventDataRow{}, err } - - row[columns.Height] = fmt.Sprintf("%v", block.Height) - row[columns.BlockHeader] = string(blockHeader) - } else { - return types.EventDataRow{}, fmt.Errorf("table: %s not found in table structure %v", tables.Block, tbls) + return types.EventDataRow{Action: types.ActionUpsert, RowData: row}, nil } + return types.EventDataRow{}, fmt.Errorf("table: %s not found in table structure %v", tables.Block, tbls) - return types.EventDataRow{Action: types.ActionUpsert, RowData: row}, nil } // buildTxData builds transaction data from tx stream -func buildTxData(txe *exec.TxExecution) (types.EventDataRow, error) { - // transaction raw data - envelope, err := json.Marshal(txe.Envelope) - if err != nil { - return types.EventDataRow{}, fmt.Errorf("couldn't marshal envelope in tx %v: %v", txe, err) - } - - events, err := json.Marshal(txe.Events) - if err != nil { - return types.EventDataRow{}, fmt.Errorf("couldn't marshal events in tx %v: %v", txe, err) - } - - result, err := json.Marshal(txe.Result) - if err != nil { - return types.EventDataRow{}, fmt.Errorf("couldn't marshal result in tx %v: %v", txe, err) - } - - receipt, err := json.Marshal(txe.Receipt) - if err != nil { - return types.EventDataRow{}, fmt.Errorf("couldn't marshal receipt in tx %v: %v", txe, err) - } - - exception, err := json.Marshal(txe.Exception) - if err != nil { - return types.EventDataRow{}, fmt.Errorf("couldn't marshal exception in tx %v: %v", txe, err) - } - - origin, err := json.Marshal(txe.Origin) +func buildTxData(txe chain.Transaction) (types.EventDataRow, error) { + row, err := txe.GetMetadata(columns) if err != nil { - return types.EventDataRow{}, fmt.Errorf("couldn't marshal origin in tx %v: %v", txe, err) + return types.EventDataRow{}, fmt.Errorf("could not get transaction metadata: %w", err) } return types.EventDataRow{ - Action: types.ActionUpsert, - RowData: map[string]interface{}{ - columns.Height: txe.Height, - columns.TxHash: txe.TxHash.String(), - columns.TxIndex: txe.Index, - columns.TxType: txe.TxType.String(), - columns.Envelope: string(envelope), - columns.Events: string(events), - columns.Result: string(result), - columns.Receipt: string(receipt), - columns.Origin: string(origin), - columns.Exception: string(exception), - }, + Action: types.ActionUpsert, + RowData: row, }, nil } diff --git a/vent/service/server.go b/vent/service/server.go index b4b176293..0ba0153c2 100644 --- a/vent/service/server.go +++ b/vent/service/server.go @@ -39,10 +39,10 @@ func (s *Server) Run() { s.Log.InfoMsg("Starting HTTP Server") // start http server - httpServer := &http.Server{Addr: s.Config.HTTPAddr, Handler: s} + httpServer := &http.Server{Addr: s.Config.HTTPListenAddress, Handler: s} go func() { - s.Log.InfoMsg("HTTP Server listening", "address", s.Config.HTTPAddr) + s.Log.InfoMsg("HTTP Server listening", "address", s.Config.HTTPListenAddress) httpServer.ListenAndServe() }() @@ -71,7 +71,7 @@ func healthHandler(consumer *Consumer) func(resp http.ResponseWriter, req *http. resp.WriteHeader(http.StatusServiceUnavailable) } else { resp.WriteHeader(http.StatusOK) - bs, err := json.Marshal(consumer.statusMessage()) + bs, err := json.Marshal(consumer.StatusMessage(req.Context())) if err == nil { resp.Header().Set("Content-Type", "application/json") resp.Write(bs) diff --git a/vent/service/server_test.go b/vent/service/server_test.go index e50df96e4..27d00b2d9 100644 --- a/vent/service/server_test.go +++ b/vent/service/server_test.go @@ -38,7 +38,7 @@ func TestServer(t *testing.T) { cfg.SpecFileOrDirs = []string{os.Getenv("GOPATH") + "/src/github.com/hyperledger/burrow/vent/test/sqlsol_view.json"} cfg.AbiFileOrDirs = []string{os.Getenv("GOPATH") + "/src/github.com/hyperledger/burrow/vent/test/EventsTest.abi"} - cfg.GRPCAddr = kern.GRPCListenAddress().String() + cfg.ChainAddress = kern.GRPCListenAddress().String() log := logging.NewNoopLogger() consumer := service.NewConsumer(cfg, log, make(chan types.EventData)) diff --git a/vent/sqldb/adapters/postgres_adapter.go b/vent/sqldb/adapters/postgres_adapter.go index 7599f958e..d97e8d269 100644 --- a/vent/sqldb/adapters/postgres_adapter.go +++ b/vent/sqldb/adapters/postgres_adapter.go @@ -5,6 +5,7 @@ import ( "strings" "github.com/lib/pq" + "github.com/pkg/errors" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/vent/types" @@ -265,22 +266,24 @@ func (pa *PostgresAdapter) ErrorEquals(err error, sqlErrorType types.SQLErrorTyp } func errorEquals(err error, sqlErrorType types.SQLErrorType) bool { - if err, ok := err.(*pq.Error); ok { + pqErr := new(pq.Error) + + if errors.As(err, &pqErr) { switch sqlErrorType { case types.SQLErrorTypeGeneric: return true case types.SQLErrorTypeDuplicatedColumn: - return err.Code == "42701" + return pqErr.Code == "42701" case types.SQLErrorTypeDuplicatedTable: - return err.Code == "42P07" + return pqErr.Code == "42P07" case types.SQLErrorTypeDuplicatedSchema: - return err.Code == "42P06" + return pqErr.Code == "42P06" case types.SQLErrorTypeUndefinedTable: - return err.Code == "42P01" + return pqErr.Code == "42P01" case types.SQLErrorTypeUndefinedColumn: - return err.Code == "42703" + return pqErr.Code == "42703" case types.SQLErrorTypeInvalidType: - return err.Code == "42704" + return pqErr.Code == "42704" } } diff --git a/vent/sqldb/adapters/sqlite_adapter.go b/vent/sqldb/adapters/sqlite_adapter.go index 5a56137d4..449af08fb 100644 --- a/vent/sqldb/adapters/sqlite_adapter.go +++ b/vent/sqldb/adapters/sqlite_adapter.go @@ -11,6 +11,7 @@ import ( "github.com/hyperledger/burrow/vent/types" "github.com/jmoiron/sqlx" sqlite3 "github.com/mattn/go-sqlite3" + "github.com/pkg/errors" ) var sqliteDataTypes = map[types.SQLColumnType]string{ @@ -225,20 +226,21 @@ func (sla *SQLiteAdapter) InsertLogQuery() string { // ErrorEquals verify if an error is of a given SQL type func (sla *SQLiteAdapter) ErrorEquals(err error, sqlErrorType types.SQLErrorType) bool { - if err, ok := err.(sqlite3.Error); ok { + slErr := new(sqlite3.Error) + if errors.As(err, slErr) { errDescription := err.Error() switch sqlErrorType { case types.SQLErrorTypeGeneric: return true case types.SQLErrorTypeDuplicatedColumn: - return err.Code == 1 && strings.Contains(errDescription, "duplicate column") + return slErr.Code == 1 && strings.Contains(errDescription, "duplicate column") case types.SQLErrorTypeDuplicatedTable: - return err.Code == 1 && strings.Contains(errDescription, "table") && strings.Contains(errDescription, "already exists") + return slErr.Code == 1 && strings.Contains(errDescription, "table") && strings.Contains(errDescription, "already exists") case types.SQLErrorTypeUndefinedTable: - return err.Code == 1 && strings.Contains(errDescription, "no such table") + return slErr.Code == 1 && strings.Contains(errDescription, "no such table") case types.SQLErrorTypeUndefinedColumn: - return err.Code == 1 && strings.Contains(errDescription, "table") && strings.Contains(errDescription, "has no column named") + return slErr.Code == 1 && strings.Contains(errDescription, "table") && strings.Contains(errDescription, "has no column named") case types.SQLErrorTypeInvalidType: // NOT SUPPORTED return false diff --git a/vent/sqldb/sqldb.go b/vent/sqldb/sqldb.go index 063fba6ad..287bd32de 100644 --- a/vent/sqldb/sqldb.go +++ b/vent/sqldb/sqldb.go @@ -353,7 +353,9 @@ loop: // Perform row action db.Log.InfoMsg("msg", "action", row.Action, "query", sqlQuery, "value", queryVal.Values) - if _, err = tx.Exec(sqlQuery, queryVal.Pointers...); err != nil { + _, err = tx.Exec(sqlQuery, queryVal.Pointers...) + if err != nil { + err = fmt.Errorf("could not execute query '%s': %w", sqlQuery, err) db.Log.InfoMsg(fmt.Sprintf("error performing %s on row", row.Action), "err", err, "value", queryVal.Values) break loop // exits from all loops -> continue in close log stmt } diff --git a/vent/sqldb/sqldb_integration_test.go b/vent/sqldb/sqldb_integration_test.go index 11bf5fa8c..1b8441cff 100644 --- a/vent/sqldb/sqldb_integration_test.go +++ b/vent/sqldb/sqldb_integration_test.go @@ -108,20 +108,20 @@ func testSetBlock(t *testing.T, cfg *config.VentConfig) { require.NoError(t, err) // new - str, dat := getBlock() - err = db.SetBlock(test.ChainID, str, dat) + eventTables, eventData := getBlock() + err = db.SetBlock(test.ChainID, eventTables, eventData) require.NoError(t, err) // read _, err = db.LastBlockHeight(test.ChainID) require.NoError(t, err) - _, err = db.GetBlock(test.ChainID, dat.BlockHeight) + _, err = db.GetBlock(test.ChainID, eventData.BlockHeight) require.NoError(t, err) // alter - str, dat = getAlterBlock() - err = db.SetBlock(test.ChainID, str, dat) + eventTables, eventData = getAlterBlock() + err = db.SetBlock(test.ChainID, eventTables, eventData) require.NoError(t, err) //restore diff --git a/vent/sqldb/sqldb_sqlite_test.go b/vent/sqldb/sqldb_sqlite_test.go index 2ea180970..a1dd43789 100644 --- a/vent/sqldb/sqldb_sqlite_test.go +++ b/vent/sqldb/sqldb_sqlite_test.go @@ -1,4 +1,4 @@ -// +build integration sqlite +// +build integration,sqlite package sqldb_test diff --git a/vent/test/EventsTest.sol.go b/vent/test/EventsTest.sol.go index 37b406173..7edfd2b52 100644 --- a/vent/test/EventsTest.sol.go +++ b/vent/test/EventsTest.sol.go @@ -2,6 +2,6 @@ package test import hex "github.com/tmthrgd/go-hex" -var Bytecode_EventsTest = hex.MustDecodeString("608060405234801561001057600080fd5b50610d60806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806306661abd146100675780632cda56b01461008557806388255199146100fe578063c1de9c6d146101f0578063d4a0c25314610269578063dc667a6214610337575b600080fd5b61006f610405565b6040518082815260200191505060405180910390f35b6100fc6004803603602081101561009b57600080fd5b81019080803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460018302840111640100000000831117156100ec57600080fd5b909192939192939050505061040e565b005b6101756004803603602081101561011457600080fd5b810190808035906020019064010000000081111561013157600080fd5b82018360208201111561014357600080fd5b8035906020019184600183028401116401000000008311171561016557600080fd5b9091929391929390505050610612565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101b557808201518184015260208101905061019a565b50505050905090810190601f1680156101e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102676004803603602081101561020657600080fd5b810190808035906020019064010000000081111561022357600080fd5b82018360208201111561023557600080fd5b8035906020019184600183028401116401000000008311171561025757600080fd5b90919293919293905050506106df565b005b6103356004803603604081101561027f57600080fd5b810190808035906020019064010000000081111561029c57600080fd5b8201836020820111156102ae57600080fd5b803590602001918460018302840111640100000000831117156102d057600080fd5b9091929391929390803590602001906401000000008111156102f157600080fd5b82018360208201111561030357600080fd5b8035906020019184600183028401116401000000008311171561032557600080fd5b909192939192939050505061083d565b005b6104036004803603604081101561034d57600080fd5b810190808035906020019064010000000081111561036a57600080fd5b82018360208201111561037c57600080fd5b8035906020019184600183028401116401000000008311171561039e57600080fd5b9091929391929390803590602001906401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460018302840111640100000000831117156103f357600080fd5b9091929391929390505050610aaa565b005b60008054905090565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff161561060d576000808154809291906001900391905055506001838360405180838380828437808301925050509250505090815260200160405180910390206000808201600061049a9190610c3e565b6001820160006104aa9190610c3e565b6002820160006101000a81549060ff021916905550507f544553545f4556454e545300000000000000000000000000000000000000000061052e84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a37f544553545f4556454e54530000000000000000000000000000000000000000006105d484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b60606001838360405180838380828437808301925050509250505090815260200160405180910390206001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106d25780601f106106a7576101008083540402835291602001916106d2565b820191906000526020600020905b8154815290600101906020018083116106b557829003601f168201915b5050505050905092915050565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff1615610838576000808154809291906001900391905055506001838360405180838380828437808301925050509250505090815260200160405180910390206000808201600061076b9190610c3e565b60018201600061077b9190610c3e565b6002820160006101000a81549060ff021916905550507f544553545f4556454e54530000000000000000000000000000000000000000006107ff84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff166108905760008081548092919060010191905055505b84848260000191906108a3929190610c86565b5082828260010191906108b7929190610c86565b5060018160020160006101000a81548160ff02191690831515021790555061092283838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e545300000000000000000000000000000000000000000061099087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a4610a0983838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e5453000000000000000000000000000000000000000000610a7787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff16610afd5760008081548092919060010191905055505b8484826000019190610b10929190610c86565b508282826001019190610b24929190610c86565b5060018160020160006101000a81548160ff021916908315150217905550610b8f83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e5453000000000000000000000000000000000000000000610bfd87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060208201519050919050565b50805460018160011615610100020316600290046000825580601f10610c645750610c83565b601f016020900490600052602060002090810190610c829190610d06565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610cc757803560ff1916838001178555610cf5565b82800160010185558215610cf5579182015b82811115610cf4578235825591602001919060010190610cd9565b5b509050610d029190610d06565b5090565b610d2891905b80821115610d24576000816000905550600101610d0c565b5090565b9056fea265627a7a72305820429a1b2031fb00f9be80be95e568f9aabac617b6b634c5d23aa72693e9ec1cbb64736f6c634300050a0032") -var DeployedBytecode_EventsTest = hex.MustDecodeString("608060405234801561001057600080fd5b50600436106100625760003560e01c806306661abd146100675780632cda56b01461008557806388255199146100fe578063c1de9c6d146101f0578063d4a0c25314610269578063dc667a6214610337575b600080fd5b61006f610405565b6040518082815260200191505060405180910390f35b6100fc6004803603602081101561009b57600080fd5b81019080803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460018302840111640100000000831117156100ec57600080fd5b909192939192939050505061040e565b005b6101756004803603602081101561011457600080fd5b810190808035906020019064010000000081111561013157600080fd5b82018360208201111561014357600080fd5b8035906020019184600183028401116401000000008311171561016557600080fd5b9091929391929390505050610612565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101b557808201518184015260208101905061019a565b50505050905090810190601f1680156101e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102676004803603602081101561020657600080fd5b810190808035906020019064010000000081111561022357600080fd5b82018360208201111561023557600080fd5b8035906020019184600183028401116401000000008311171561025757600080fd5b90919293919293905050506106df565b005b6103356004803603604081101561027f57600080fd5b810190808035906020019064010000000081111561029c57600080fd5b8201836020820111156102ae57600080fd5b803590602001918460018302840111640100000000831117156102d057600080fd5b9091929391929390803590602001906401000000008111156102f157600080fd5b82018360208201111561030357600080fd5b8035906020019184600183028401116401000000008311171561032557600080fd5b909192939192939050505061083d565b005b6104036004803603604081101561034d57600080fd5b810190808035906020019064010000000081111561036a57600080fd5b82018360208201111561037c57600080fd5b8035906020019184600183028401116401000000008311171561039e57600080fd5b9091929391929390803590602001906401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460018302840111640100000000831117156103f357600080fd5b9091929391929390505050610aaa565b005b60008054905090565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff161561060d576000808154809291906001900391905055506001838360405180838380828437808301925050509250505090815260200160405180910390206000808201600061049a9190610c3e565b6001820160006104aa9190610c3e565b6002820160006101000a81549060ff021916905550507f544553545f4556454e545300000000000000000000000000000000000000000061052e84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a37f544553545f4556454e54530000000000000000000000000000000000000000006105d484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b60606001838360405180838380828437808301925050509250505090815260200160405180910390206001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106d25780601f106106a7576101008083540402835291602001916106d2565b820191906000526020600020905b8154815290600101906020018083116106b557829003601f168201915b5050505050905092915050565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff1615610838576000808154809291906001900391905055506001838360405180838380828437808301925050509250505090815260200160405180910390206000808201600061076b9190610c3e565b60018201600061077b9190610c3e565b6002820160006101000a81549060ff021916905550507f544553545f4556454e54530000000000000000000000000000000000000000006107ff84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff166108905760008081548092919060010191905055505b84848260000191906108a3929190610c86565b5082828260010191906108b7929190610c86565b5060018160020160006101000a81548160ff02191690831515021790555061092283838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e545300000000000000000000000000000000000000000061099087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a4610a0983838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e5453000000000000000000000000000000000000000000610a7787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff16610afd5760008081548092919060010191905055505b8484826000019190610b10929190610c86565b508282826001019190610b24929190610c86565b5060018160020160006101000a81548160ff021916908315150217905550610b8f83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e5453000000000000000000000000000000000000000000610bfd87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060208201519050919050565b50805460018160011615610100020316600290046000825580601f10610c645750610c83565b601f016020900490600052602060002090810190610c829190610d06565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610cc757803560ff1916838001178555610cf5565b82800160010185558215610cf5579182015b82811115610cf4578235825591602001919060010190610cd9565b5b509050610d029190610d06565b5090565b610d2891905b80821115610d24576000816000905550600101610d0c565b5090565b9056fea265627a7a72305820429a1b2031fb00f9be80be95e568f9aabac617b6b634c5d23aa72693e9ec1cbb64736f6c634300050a0032") -var Abi_EventsTest = []byte(`[{"constant":true,"inputs":[],"name":"count","outputs":[{"name":"size","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"removeThings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"string"}],"name":"description","outputs":[{"name":"_description","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"removeThing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_description","type":"string"}],"name":"addThings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_description","type":"string"}],"name":"addThing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"key","type":"bytes32"},{"indexed":true,"name":"description","type":"bytes32"}],"name":"UpdateTestEvents","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"key","type":"bytes32"},{"indexed":false,"name":"__DELETE__","type":"int256"}],"name":"DeleteTestEvents","type":"event"}]`) +var Bytecode_EventsTest = hex.MustDecodeString("608060405234801561001057600080fd5b50610d60806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806306661abd146100675780632cda56b01461008557806388255199146100fe578063c1de9c6d146101f0578063d4a0c25314610269578063dc667a6214610337575b600080fd5b61006f610405565b6040518082815260200191505060405180910390f35b6100fc6004803603602081101561009b57600080fd5b81019080803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460018302840111640100000000831117156100ec57600080fd5b909192939192939050505061040e565b005b6101756004803603602081101561011457600080fd5b810190808035906020019064010000000081111561013157600080fd5b82018360208201111561014357600080fd5b8035906020019184600183028401116401000000008311171561016557600080fd5b9091929391929390505050610612565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101b557808201518184015260208101905061019a565b50505050905090810190601f1680156101e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102676004803603602081101561020657600080fd5b810190808035906020019064010000000081111561022357600080fd5b82018360208201111561023557600080fd5b8035906020019184600183028401116401000000008311171561025757600080fd5b90919293919293905050506106df565b005b6103356004803603604081101561027f57600080fd5b810190808035906020019064010000000081111561029c57600080fd5b8201836020820111156102ae57600080fd5b803590602001918460018302840111640100000000831117156102d057600080fd5b9091929391929390803590602001906401000000008111156102f157600080fd5b82018360208201111561030357600080fd5b8035906020019184600183028401116401000000008311171561032557600080fd5b909192939192939050505061083d565b005b6104036004803603604081101561034d57600080fd5b810190808035906020019064010000000081111561036a57600080fd5b82018360208201111561037c57600080fd5b8035906020019184600183028401116401000000008311171561039e57600080fd5b9091929391929390803590602001906401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460018302840111640100000000831117156103f357600080fd5b9091929391929390505050610aaa565b005b60008054905090565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff161561060d576000808154809291906001900391905055506001838360405180838380828437808301925050509250505090815260200160405180910390206000808201600061049a9190610c3e565b6001820160006104aa9190610c3e565b6002820160006101000a81549060ff021916905550507f544553545f4556454e545300000000000000000000000000000000000000000061052e84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a37f544553545f4556454e54530000000000000000000000000000000000000000006105d484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b60606001838360405180838380828437808301925050509250505090815260200160405180910390206001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106d25780601f106106a7576101008083540402835291602001916106d2565b820191906000526020600020905b8154815290600101906020018083116106b557829003601f168201915b5050505050905092915050565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff1615610838576000808154809291906001900391905055506001838360405180838380828437808301925050509250505090815260200160405180910390206000808201600061076b9190610c3e565b60018201600061077b9190610c3e565b6002820160006101000a81549060ff021916905550507f544553545f4556454e54530000000000000000000000000000000000000000006107ff84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff166108905760008081548092919060010191905055505b84848260000191906108a3929190610c86565b5082828260010191906108b7929190610c86565b5060018160020160006101000a81548160ff02191690831515021790555061092283838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e545300000000000000000000000000000000000000000061099087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a4610a0983838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e5453000000000000000000000000000000000000000000610a7787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff16610afd5760008081548092919060010191905055505b8484826000019190610b10929190610c86565b508282826001019190610b24929190610c86565b5060018160020160006101000a81548160ff021916908315150217905550610b8f83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e5453000000000000000000000000000000000000000000610bfd87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060208201519050919050565b50805460018160011615610100020316600290046000825580601f10610c645750610c83565b601f016020900490600052602060002090810190610c829190610d06565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610cc757803560ff1916838001178555610cf5565b82800160010185558215610cf5579182015b82811115610cf4578235825591602001919060010190610cd9565b5b509050610d029190610d06565b5090565b610d2891905b80821115610d24576000816000905550600101610d0c565b5090565b9056fea265627a7a7231582037a3c7c8ba676a276ddc3da8ddd95f44bd6f991d5f52bb69c956d60c2eafffeb64736f6c634300050f0032") +var DeployedBytecode_EventsTest = hex.MustDecodeString("608060405234801561001057600080fd5b50600436106100625760003560e01c806306661abd146100675780632cda56b01461008557806388255199146100fe578063c1de9c6d146101f0578063d4a0c25314610269578063dc667a6214610337575b600080fd5b61006f610405565b6040518082815260200191505060405180910390f35b6100fc6004803603602081101561009b57600080fd5b81019080803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460018302840111640100000000831117156100ec57600080fd5b909192939192939050505061040e565b005b6101756004803603602081101561011457600080fd5b810190808035906020019064010000000081111561013157600080fd5b82018360208201111561014357600080fd5b8035906020019184600183028401116401000000008311171561016557600080fd5b9091929391929390505050610612565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101b557808201518184015260208101905061019a565b50505050905090810190601f1680156101e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102676004803603602081101561020657600080fd5b810190808035906020019064010000000081111561022357600080fd5b82018360208201111561023557600080fd5b8035906020019184600183028401116401000000008311171561025757600080fd5b90919293919293905050506106df565b005b6103356004803603604081101561027f57600080fd5b810190808035906020019064010000000081111561029c57600080fd5b8201836020820111156102ae57600080fd5b803590602001918460018302840111640100000000831117156102d057600080fd5b9091929391929390803590602001906401000000008111156102f157600080fd5b82018360208201111561030357600080fd5b8035906020019184600183028401116401000000008311171561032557600080fd5b909192939192939050505061083d565b005b6104036004803603604081101561034d57600080fd5b810190808035906020019064010000000081111561036a57600080fd5b82018360208201111561037c57600080fd5b8035906020019184600183028401116401000000008311171561039e57600080fd5b9091929391929390803590602001906401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460018302840111640100000000831117156103f357600080fd5b9091929391929390505050610aaa565b005b60008054905090565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff161561060d576000808154809291906001900391905055506001838360405180838380828437808301925050509250505090815260200160405180910390206000808201600061049a9190610c3e565b6001820160006104aa9190610c3e565b6002820160006101000a81549060ff021916905550507f544553545f4556454e545300000000000000000000000000000000000000000061052e84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a37f544553545f4556454e54530000000000000000000000000000000000000000006105d484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b60606001838360405180838380828437808301925050509250505090815260200160405180910390206001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106d25780601f106106a7576101008083540402835291602001916106d2565b820191906000526020600020905b8154815290600101906020018083116106b557829003601f168201915b5050505050905092915050565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff1615610838576000808154809291906001900391905055506001838360405180838380828437808301925050509250505090815260200160405180910390206000808201600061076b9190610c3e565b60018201600061077b9190610c3e565b6002820160006101000a81549060ff021916905550507f544553545f4556454e54530000000000000000000000000000000000000000006107ff84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff166108905760008081548092919060010191905055505b84848260000191906108a3929190610c86565b5082828260010191906108b7929190610c86565b5060018160020160006101000a81548160ff02191690831515021790555061092283838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e545300000000000000000000000000000000000000000061099087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a4610a0983838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e5453000000000000000000000000000000000000000000610a7787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff16610afd5760008081548092919060010191905055505b8484826000019190610b10929190610c86565b508282826001019190610b24929190610c86565b5060018160020160006101000a81548160ff021916908315150217905550610b8f83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e5453000000000000000000000000000000000000000000610bfd87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060208201519050919050565b50805460018160011615610100020316600290046000825580601f10610c645750610c83565b601f016020900490600052602060002090810190610c829190610d06565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610cc757803560ff1916838001178555610cf5565b82800160010185558215610cf5579182015b82811115610cf4578235825591602001919060010190610cd9565b5b509050610d029190610d06565b5090565b610d2891905b80821115610d24576000816000905550600101610d0c565b5090565b9056fea265627a7a7231582037a3c7c8ba676a276ddc3da8ddd95f44bd6f991d5f52bb69c956d60c2eafffeb64736f6c634300050f0032") +var Abi_EventsTest = []byte(`[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":false,"internalType":"int256","name":"__DELETE__","type":"int256"}],"name":"DeleteTestEvents","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"description","type":"bytes32"}],"name":"UpdateTestEvents","type":"event"},{"constant":false,"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_description","type":"string"}],"name":"addThing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_description","type":"string"}],"name":"addThings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"count","outputs":[{"internalType":"int256","name":"size","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"description","outputs":[{"internalType":"string","name":"_description","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"removeThing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"removeThings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]`) diff --git a/vent/test/db.go b/vent/test/db.go index 20dc7a195..bb0d105f2 100644 --- a/vent/test/db.go +++ b/vent/test/db.go @@ -78,16 +78,16 @@ func SqliteVentConfig(grpcAddress string) *config.VentConfig { cfg.DBURL = file.Name() cfg.DBAdapter = types.SQLiteDB - cfg.GRPCAddr = grpcAddress + cfg.ChainAddress = grpcAddress return cfg } -func PostgresVentConfig(grpcAddress string) *config.VentConfig { +func PostgresVentConfig(chainAddress string) *config.VentConfig { cfg := config.DefaultVentConfig() - cfg.DBSchema = fmt.Sprintf("test_%s", randString(10)) + cfg.DBSchema = fmt.Sprintf("test_%d_%s", time.Now().Unix(), randString(10)) cfg.DBAdapter = types.PostgresDB cfg.DBURL = config.DefaultPostgresDBURL - cfg.GRPCAddr = grpcAddress + cfg.ChainAddress = chainAddress cfg.AnnounceEvery = time.Millisecond * 100 return cfg } diff --git a/vent/test/eth/.eslintrc.js b/vent/test/eth/.eslintrc.js new file mode 100644 index 000000000..d1d499b0f --- /dev/null +++ b/vent/test/eth/.eslintrc.js @@ -0,0 +1,19 @@ +module.exports = { + env: { + browser: true, + commonjs: true, + es2021: true, + mocha: true, + 'truffle/globals': true, + }, + plugins: ['prettier', 'truffle'], + extends: [ + 'airbnb-base', + ], + parserOptions: { + ecmaVersion: 12, + }, + rules: { + 'no-unused-vars': 'warn', + }, +}; diff --git a/vent/test/eth/contracts/EventEmitter.sol b/vent/test/eth/contracts/EventEmitter.sol new file mode 100644 index 000000000..f187a4f4b --- /dev/null +++ b/vent/test/eth/contracts/EventEmitter.sol @@ -0,0 +1,28 @@ +pragma solidity ^0.5; + +contract EventEmitter { + // indexed puts it in topic + event ManyTypes( + bytes32 indexed direction, + bool trueism, + string german , + int64 indexed newDepth, + int bignum, + string indexed hash); + + event ManyTypes2( + bytes32 indexed direction, + bool trueism, + string german , + int128 indexed newDepth, + int8 bignum, + string indexed hash); + + function emitOne() public { + emit ManyTypes("Downsie!", true, "Donaudampfschifffahrtselektrizitätenhauptbetriebswerkbauunterbeamtengesellschaft", 102, 42, "hash"); + } + + function emitTwo() public { + emit ManyTypes2("Downsie!", true, "Donaudampfschifffahrtselektrizitätenhauptbetriebswerkbauunterbeamtengesellschaft", 102, 42, "hash"); + } +} diff --git a/vent/test/eth/contracts/Migrations.sol b/vent/test/eth/contracts/Migrations.sol new file mode 100644 index 000000000..9aac9750f --- /dev/null +++ b/vent/test/eth/contracts/Migrations.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.4.22 <0.9.0; + +contract Migrations { + address public owner = msg.sender; + uint public last_completed_migration; + + modifier restricted() { + require( + msg.sender == owner, + "This function is restricted to the contract's owner" + ); + _; + } + + function setCompleted(uint completed) public restricted { + last_completed_migration = completed; + } +} diff --git a/vent/test/eth/migrations/1614708961_deploy_event_emitter.js b/vent/test/eth/migrations/1614708961_deploy_event_emitter.js new file mode 100644 index 000000000..c3706dffb --- /dev/null +++ b/vent/test/eth/migrations/1614708961_deploy_event_emitter.js @@ -0,0 +1,5 @@ +const EventEmitter = artifacts.require('EventEmitter'); + +module.exports = function (deployer) { + deployer.deploy(EventEmitter); +}; diff --git a/vent/test/eth/migrations/1_initial_migration.js b/vent/test/eth/migrations/1_initial_migration.js new file mode 100644 index 000000000..5ec88e464 --- /dev/null +++ b/vent/test/eth/migrations/1_initial_migration.js @@ -0,0 +1,5 @@ +const Migrations = artifacts.require('Migrations'); + +module.exports = function (deployer) { + deployer.deploy(Migrations); +}; diff --git a/vent/test/eth/package.json b/vent/test/eth/package.json new file mode 100644 index 000000000..5295931a2 --- /dev/null +++ b/vent/test/eth/package.json @@ -0,0 +1,21 @@ +{ + "name": "eth", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "scripts": { + "ganache": "ganache-cli --account=\"0xcfad15e9e8f24b5b5608cac150293fe971d23cd9168206b231c859b7974d4295,0xad78ebc5ac6200000\"" + }, + "devDependencies": { + "@types/mocha": "^8.2.1", + "eslint": "^7.21.0", + "eslint-config-airbnb-base": "^14.2.1", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-truffle": "^0.3.1", + "ganache-cli": "^6.12.2", + "ganache": "^6.4.4", + "prettier": "^2.2.1", + "truffle": "^5.2.2" + } +} diff --git a/vent/test/eth/test/.gitkeep b/vent/test/eth/test/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/vent/test/eth/test/event-emitter.js b/vent/test/eth/test/event-emitter.js new file mode 100644 index 000000000..0dc7efc8d --- /dev/null +++ b/vent/test/eth/test/event-emitter.js @@ -0,0 +1,11 @@ +const EventEmitter = artifacts.require('EventEmitter'); + +contract('EventEmitter', (accounts) => { + it('emits events', async () => { + const eventEmitter = await EventEmitter.deployed(); + const { + logs: [{ args }], + } = await eventEmitter.emitTwo(); + assert.equal(args[2], 'Donaudampfschifffahrtselektrizitätenhauptbetriebswerkbauunterbeamtengesellschaft'); + }); +}); diff --git a/vent/test/eth/truffle-config.js b/vent/test/eth/truffle-config.js new file mode 100644 index 000000000..a70737728 --- /dev/null +++ b/vent/test/eth/truffle-config.js @@ -0,0 +1,106 @@ +/** + * Use this file to configure your truffle project. It's seeded with some + * common settings for different networks and features like migrations, + * compilation and testing. Uncomment the ones you need or modify + * them to suit your project as necessary. + * + * More information about configuration can be found at: + * + * trufflesuite.com/docs/advanced/configuration + * + * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) + * to sign your transactions before they're sent to a remote public node. Infura accounts + * are available for free at: infura.io/register. + * + * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate + * public/private key pairs. If you're publishing your code to GitHub make sure you load this + * phrase from a file you've .gitignored so it doesn't accidentally become public. + * + */ + +// const HDWalletProvider = require('@truffle/hdwallet-provider'); +// const infuraKey = "fj4jll3k....."; +// +// const fs = require('fs'); +// const mnemonic = fs.readFileSync(".secret").toString().trim(); + +module.exports = { + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a development blockchain for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ + + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache-cli, geth or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + // development: { + // host: "127.0.0.1", // Localhost (default: none) + // port: 8545, // Standard Ethereum port (default: none) + // network_id: "*", // Any network (default: none) + // }, + // Another network with more advanced options... + // advanced: { + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websocket: true // Enable EventEmitter interface for web3 (default: false) + // }, + // Useful for deploying to a public network. + // NB: It's important to wrap the provider as a function. + // ropsten: { + // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), + // network_id: 3, // Ropsten's id + // gas: 5500000, // Ropsten has a lower block limit than mainnet + // confirmations: 2, // # of confs to wait between deployments. (default: 0) + // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + // }, + // Useful for private networks + // private: { + // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), + // network_id: 2111, // This network is yours, in the cloud. + // production: true // Treats this network as if it was a public net. (default: false) + // } + }, + + // Set default mocha options here, use special reporters etc. + mocha: { + // timeout: 100000 + }, + + // Configure your compilers + compilers: { + solc: { + // version: "0.5.1", // Fetch exact version from solc-bin (default: truffle's version) + // docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + // settings: { // See the solidity docs for advice about optimization and evmVersion + // optimizer: { + // enabled: false, + // runs: 200 + // }, + // evmVersion: "byzantium" + // } + } + }, + + // Truffle DB is currently disabled by default; to enable it, change enabled: false to enabled: true + // + // Note: if you migrated your contracts prior to enabling this field in your Truffle project and want + // those previously migrated contracts available in the .db directory, you will need to run the following: + // $ truffle migrate --reset --compile-all + + db: { + enabled: false + } +}; diff --git a/vent/test/eth/yarn.lock b/vent/test/eth/yarn.lock new file mode 100644 index 000000000..fc1f5137f --- /dev/null +++ b/vent/test/eth/yarn.lock @@ -0,0 +1,9852 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@apollo/client@^3.1.5": + version "3.3.11" + resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.3.11.tgz" + integrity sha512-54+D5FB6RJlQ+g37f432gaexnyvDsG5X6L9VO5kqN54HJlbF8hCf/8CXtAQEHCWodAwZhy6kOLp2RM96829q3A== + dependencies: + "@graphql-typed-document-node/core" "^3.0.0" + "@types/zen-observable" "^0.8.0" + "@wry/context" "^0.5.2" + "@wry/equality" "^0.3.0" + fast-json-stable-stringify "^2.0.0" + graphql-tag "^2.12.0" + hoist-non-react-statics "^3.3.2" + optimism "^0.14.0" + prop-types "^15.7.2" + symbol-observable "^2.0.0" + ts-invariant "^0.6.0" + tslib "^1.10.0" + zen-observable "^0.8.14" + +"@apollo/protobufjs@^1.0.3": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@apollo/protobufjs/-/protobufjs-1.0.5.tgz" + integrity sha512-ZtyaBH1icCgqwIGb3zrtopV2D5Q8yxibkJzlaViM08eOhTQc7rACdYu0pfORFfhllvdMZ3aq69vifYHszY4gNA== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^4.0.0" + "@types/node" "^10.1.0" + long "^4.0.0" + +"@apollographql/apollo-tools@^0.4.3": + version "0.4.9" + resolved "https://registry.yarnpkg.com/@apollographql/apollo-tools/-/apollo-tools-0.4.9.tgz" + integrity sha512-M50pk8oo3CGTu4waGOklIX3YtTZoPfWG9K/G9WB8NpyQGA1OwYTiBFv94XqUtKElTDoFwoMXpMQd3Wy5dINvxA== + dependencies: + apollo-env "^0.6.6" + +"@apollographql/graphql-playground-html@1.6.26": + version "1.6.26" + resolved "https://registry.yarnpkg.com/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.26.tgz" + integrity sha512-XAwXOIab51QyhBxnxySdK3nuMEUohhDsHQ5Rbco/V1vjlP75zZ0ZLHD9dTpXTN8uxKxopb2lUvJTq+M4g2Q0HQ== + dependencies: + xss "^1.0.6" + +"@apollographql/graphql-upload-8-fork@^8.1.3": + version "8.1.3" + resolved "https://registry.yarnpkg.com/@apollographql/graphql-upload-8-fork/-/graphql-upload-8-fork-8.1.3.tgz" + integrity sha512-ssOPUT7euLqDXcdVv3Qs4LoL4BPtfermW1IOouaqEmj36TpHYDmYDIbKoSQxikd9vtMumFnP87OybH7sC9fJ6g== + dependencies: + "@types/express" "*" + "@types/fs-capacitor" "*" + "@types/koa" "*" + busboy "^0.3.1" + fs-capacitor "^2.0.4" + http-errors "^1.7.3" + object-path "^0.11.4" + +"@ardatan/aggregate-error@0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@ardatan/aggregate-error/-/aggregate-error-0.0.6.tgz" + integrity sha512-vyrkEHG1jrukmzTPtyWB4NLPauUw5bQeg4uhn8f+1SSynmrOcyvlb1GKQjjgoBzElLdfXCRYX8UnBlhklOHYRQ== + dependencies: + tslib "~2.0.1" + +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/code-frame@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz" + integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== + dependencies: + "@babel/highlight" "^7.12.13" + +"@babel/compat-data@^7.13.8": + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.8.tgz" + integrity sha512-EaI33z19T4qN3xLXsGf48M2cDqa6ei9tPZlfLdb2HC+e/cFtREiRd8hdSqDbwdLB0/+gLwqJmCYASH0z2bUdog== + +"@babel/core@^7.0.0": + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.8.tgz" + integrity sha512-oYapIySGw1zGhEFRd6lzWNLWFX2s5dA/jm+Pw/+59ZdXtjyIuwlXbrId22Md0rgZVop+aVoqow2riXhBLNyuQg== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.0" + "@babel/helper-compilation-targets" "^7.13.8" + "@babel/helper-module-transforms" "^7.13.0" + "@babel/helpers" "^7.13.0" + "@babel/parser" "^7.13.4" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + lodash "^4.17.19" + semver "^6.3.0" + source-map "^0.5.0" + +"@babel/generator@^7.12.13", "@babel/generator@^7.13.0", "@babel/generator@^7.5.0": + version "7.13.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.9.tgz" + integrity sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw== + dependencies: + "@babel/types" "^7.13.0" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz" + integrity sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-compilation-targets@^7.13.8": + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.8.tgz" + integrity sha512-pBljUGC1y3xKLn1nrx2eAhurLMA8OqBtBP/JwG4U8skN7kf8/aqwwxpV1N6T0e7r6+7uNitIa/fUxPFagSXp3A== + dependencies: + "@babel/compat-data" "^7.13.8" + "@babel/helper-validator-option" "^7.12.17" + browserslist "^4.14.5" + semver "^6.3.0" + +"@babel/helper-create-class-features-plugin@^7.13.0": + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.8.tgz" + integrity sha512-qioaRrKHQbn4hkRKDHbnuQ6kAxmmOF+kzKGnIfxPK4j2rckSJCpKzr/SSTlohSCiE3uAQpNDJ9FIh4baeE8W+w== + dependencies: + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-member-expression-to-functions" "^7.13.0" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/helper-replace-supers" "^7.13.0" + "@babel/helper-split-export-declaration" "^7.12.13" + +"@babel/helper-function-name@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz" + integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== + dependencies: + "@babel/helper-get-function-arity" "^7.12.13" + "@babel/template" "^7.12.13" + "@babel/types" "^7.12.13" + +"@babel/helper-get-function-arity@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz" + integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-member-expression-to-functions@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.0.tgz" + integrity sha512-yvRf8Ivk62JwisqV1rFRMxiSMDGnN6KH1/mDMmIrij4jztpQNRoHqqMG3U6apYbGRPJpgPalhva9Yd06HlUxJQ== + dependencies: + "@babel/types" "^7.13.0" + +"@babel/helper-module-imports@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz" + integrity sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-module-transforms@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.13.0.tgz" + integrity sha512-Ls8/VBwH577+pw7Ku1QkUWIyRRNHpYlts7+qSqBBFCW3I8QteB9DxfcZ5YJpOwH6Ihe/wn8ch7fMGOP1OhEIvw== + dependencies: + "@babel/helper-module-imports" "^7.12.13" + "@babel/helper-replace-supers" "^7.13.0" + "@babel/helper-simple-access" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/helper-validator-identifier" "^7.12.11" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" + lodash "^4.17.19" + +"@babel/helper-optimise-call-expression@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz" + integrity sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.8.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz" + integrity sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ== + +"@babel/helper-replace-supers@^7.12.13", "@babel/helper-replace-supers@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz" + integrity sha512-Segd5me1+Pz+rmN/NFBOplMbZG3SqRJOBlY+mA0SxAv6rjj7zJqr1AVr3SfzUVTLCv7ZLU5FycOM/SBGuLPbZw== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.13.0" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" + +"@babel/helper-simple-access@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz" + integrity sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-skip-transparent-expression-wrappers@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz" + integrity sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA== + dependencies: + "@babel/types" "^7.12.1" + +"@babel/helper-split-export-declaration@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz" + integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-validator-identifier@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz" + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== + +"@babel/helper-validator-option@^7.12.17": + version "7.12.17" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz" + integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== + +"@babel/helpers@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.13.0.tgz" + integrity sha512-aan1MeFPxFacZeSz6Ld7YZo5aPuqnKlD7+HZY75xQsueczFccP9A7V05+oe0XpLwHK3oLorPe9eaAUljL7WEaQ== + dependencies: + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" + +"@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.13.8.tgz" + integrity sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@7.12.16": + version "7.12.16" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.16.tgz" + integrity sha512-c/+u9cqV6F0+4Hpq01jnJO+GLp2DdT63ppz9Xa+6cHaajM9VFzK/iDXiKK65YtpeVwu+ctfS6iqlMqRgQRzeCw== + +"@babel/parser@^7.0.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.4": + version "7.13.9" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.9.tgz" + integrity sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw== + +"@babel/plugin-proposal-class-properties@^7.0.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.13.0.tgz" + integrity sha512-KnTDjFNC1g+45ka0myZNvSBFLhNCLN+GeGYLDEA8Oq7MZ6yMgfLoIRh86GRT0FjtJhZw8JyUskP9uvj5pHM9Zg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.13.0" + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/plugin-proposal-object-rest-spread@^7.0.0": + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.13.8.tgz" + integrity sha512-DhB2EuB1Ih7S3/IRX5AFVgZ16k3EzfRbq97CxAVI1KSYcW+lexV8VZb7G7L8zuPVSdQMRn0kiBpf/Yzu9ZKH0g== + dependencies: + "@babel/compat-data" "^7.13.8" + "@babel/helper-compilation-targets" "^7.13.8" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.13.0" + +"@babel/plugin-syntax-class-properties@^7.0.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.12.13.tgz" + integrity sha512-J/RYxnlSLXZLVR7wTRsozxKT8qbsx1mNKJzXEEjQ0Kjx1ZACcyHgbanNWNCFtc36IzuWhYWPpvJFFoexoOWFmA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.13.tgz" + integrity sha512-d4HM23Q1K7oq/SLNmG6mRt85l2csmQ0cHRaxRXjKW0YFdEXqlZ5kzFQKH5Uc3rDJECgu+yCRgPkG04Mm98R/1g== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-transform-arrow-functions@^7.0.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.13.0.tgz" + integrity sha512-96lgJagobeVmazXFaDrbmCLQxBysKu7U6Do3mLsx27gf5Dk85ezysrs2BZUpXD703U/Su1xTBDxxar2oa4jAGg== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/plugin-transform-block-scoped-functions@^7.0.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.13.tgz" + integrity sha512-zNyFqbc3kI/fVpqwfqkg6RvBgFpC4J18aKKMmv7KdQ/1GgREapSJAykLMVNwfRGO3BtHj3YQZl8kxCXPcVMVeg== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-block-scoping@^7.0.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz" + integrity sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-classes@^7.0.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.13.0.tgz" + integrity sha512-9BtHCPUARyVH1oXGcSJD3YpsqRLROJx5ZNP6tN5vnk17N0SVf9WCtf8Nuh1CFmgByKKAIMstitKduoCmsaDK5g== + dependencies: + "@babel/helper-annotate-as-pure" "^7.12.13" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/helper-replace-supers" "^7.13.0" + "@babel/helper-split-export-declaration" "^7.12.13" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.0.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.13.0.tgz" + integrity sha512-RRqTYTeZkZAz8WbieLTvKUEUxZlUTdmL5KGMyZj7FnMfLNKV4+r5549aORG/mgojRmFlQMJDUupwAMiF2Q7OUg== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/plugin-transform-destructuring@^7.0.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.0.tgz" + integrity sha512-zym5em7tePoNT9s964c0/KU3JPPnuq7VhIxPRefJ4/s82cD+q1mgKfuGRDMCPL0HTyKz4dISuQlCusfgCJ86HA== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/plugin-transform-flow-strip-types@^7.0.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.13.0.tgz" + integrity sha512-EXAGFMJgSX8gxWD7PZtW/P6M+z74jpx3wm/+9pn+c2dOawPpBkUX7BrfyPvo6ZpXbgRIEuwgwDb/MGlKvu2pOg== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/plugin-syntax-flow" "^7.12.13" + +"@babel/plugin-transform-for-of@^7.0.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.13.0.tgz" + integrity sha512-IHKT00mwUVYE0zzbkDgNRP6SRzvfGCYsOxIRz8KsiaaHCcT9BWIkO+H9QRJseHBLOGBZkHUdHiqj6r0POsdytg== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/plugin-transform-function-name@^7.0.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.13.tgz" + integrity sha512-6K7gZycG0cmIwwF7uMK/ZqeCikCGVBdyP2J5SKNCXO5EOHcqi+z7Jwf8AmyDNcBgxET8DrEtCt/mPKPyAzXyqQ== + dependencies: + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-literals@^7.0.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.13.tgz" + integrity sha512-FW+WPjSR7hiUxMcKqyNjP05tQ2kmBCdpEpZHY1ARm96tGQCCBvXKnpjILtDplUnJ/eHZ0lALLM+d2lMFSpYJrQ== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-member-expression-literals@^7.0.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.13.tgz" + integrity sha512-kxLkOsg8yir4YeEPHLuO2tXP9R/gTjpuTOjshqSpELUN3ZAg2jfDnKUvzzJxObun38sw3wm4Uu69sX/zA7iRvg== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-modules-commonjs@^7.0.0": + version "7.13.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.13.8.tgz" + integrity sha512-9QiOx4MEGglfYZ4XOnU79OHr6vIWUakIj9b4mioN8eQIoEh+pf5p/zEB36JpDFWA12nNMiRf7bfoRvl9Rn79Bw== + dependencies: + "@babel/helper-module-transforms" "^7.13.0" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/helper-simple-access" "^7.12.13" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-object-super@^7.0.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.13.tgz" + integrity sha512-JzYIcj3XtYspZDV8j9ulnoMPZZnF/Cj0LUxPOjR89BdBVx+zYJI9MdMIlUZjbXDX+6YVeS6I3e8op+qQ3BYBoQ== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + "@babel/helper-replace-supers" "^7.12.13" + +"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.13.0.tgz" + integrity sha512-Jt8k/h/mIwE2JFEOb3lURoY5C85ETcYPnbuAJ96zRBzh1XHtQZfs62ChZ6EP22QlC8c7Xqr9q+e1SU5qttwwjw== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/plugin-transform-property-literals@^7.0.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.13.tgz" + integrity sha512-nqVigwVan+lR+g8Fj8Exl0UQX2kymtjcWfMOYM1vTYEKujeyv2SkMgazf2qNcK7l4SDiKyTA/nHCPqL4e2zo1A== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-react-display-name@^7.0.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.13.tgz" + integrity sha512-MprESJzI9O5VnJZrL7gg1MpdqmiFcUv41Jc7SahxYsNP2kDkFqClxxTZq+1Qv4AFCamm+GXMRDQINNn+qrxmiA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-react-jsx@^7.0.0": + version "7.12.17" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.17.tgz" + integrity sha512-mwaVNcXV+l6qJOuRhpdTEj8sT/Z0owAVWf9QujTZ0d2ye9X/K+MTOTSizcgKOj18PGnTc/7g1I4+cIUjsKhBcw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.12.13" + "@babel/helper-module-imports" "^7.12.13" + "@babel/helper-plugin-utils" "^7.12.13" + "@babel/plugin-syntax-jsx" "^7.12.13" + "@babel/types" "^7.12.17" + +"@babel/plugin-transform-shorthand-properties@^7.0.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.13.tgz" + integrity sha512-xpL49pqPnLtf0tVluuqvzWIgLEhuPpZzvs2yabUHSKRNlN7ScYU7aMlmavOeyXJZKgZKQRBlh8rHbKiJDraTSw== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-spread@^7.0.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.13.0.tgz" + integrity sha512-V6vkiXijjzYeFmQTr3dBxPtZYLPcUfY34DebOU27jIl2M/Y8Egm52Hw82CSjjPqd54GTlJs5x+CR7HeNr24ckg== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" + +"@babel/plugin-transform-template-literals@^7.0.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.13.0.tgz" + integrity sha512-d67umW6nlfmr1iehCcBv69eSUSySk1EsIS8aTDX4Xo9qajAh6mYtcl4kJrBkGXuxZPEgVr7RVfAvNW6YQkd4Mw== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/runtime@^7.0.0", "@babel/runtime@^7.11.2", "@babel/runtime@^7.6.3": + version "7.13.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.9.tgz" + integrity sha512-aY2kU+xgJ3dJ1eU6FMB9EH8dIe8dmusF1xEku52joLvw6eAFN0AI+WxCLDnpev2LEejWBAy2sBvBOBAjI3zmvA== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/template@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz" + integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/types" "^7.12.13" + +"@babel/traverse@7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.13.tgz" + integrity sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.12.13" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/types" "^7.12.13" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + +"@babel/traverse@^7.0.0", "@babel/traverse@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.0.tgz" + integrity sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.0" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.13.0" + "@babel/types" "^7.13.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + +"@babel/types@7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.13.tgz" + integrity sha512-oKrdZTld2im1z8bDwTOQvUbxKwE+854zc16qWZQlcTqMN00pWxHQ4ZeOq0yDMnisOpRykH2/5Qqcrk/OlbAjiQ== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + +"@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.12.13", "@babel/types@^7.12.17", "@babel/types@^7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.0.tgz" + integrity sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + +"@eslint/eslintrc@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.0.tgz" + integrity sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + +"@ethersproject/abi@5.0.0-beta.153": + version "5.0.0-beta.153" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz" + integrity sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg== + dependencies: + "@ethersproject/address" ">=5.0.0-beta.128" + "@ethersproject/bignumber" ">=5.0.0-beta.130" + "@ethersproject/bytes" ">=5.0.0-beta.129" + "@ethersproject/constants" ">=5.0.0-beta.128" + "@ethersproject/hash" ">=5.0.0-beta.128" + "@ethersproject/keccak256" ">=5.0.0-beta.127" + "@ethersproject/logger" ">=5.0.0-beta.129" + "@ethersproject/properties" ">=5.0.0-beta.131" + "@ethersproject/strings" ">=5.0.0-beta.130" + +"@ethersproject/abstract-provider@^5.0.8": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.0.9.tgz" + integrity sha512-X9fMkqpeu9ayC3JyBkeeZhn35P4xQkpGX/l+FrxDtEW9tybf/UWXSMi8bGThpPtfJ6q6U2LDetXSpSwK4TfYQQ== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/networks" "^5.0.7" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/transactions" "^5.0.9" + "@ethersproject/web" "^5.0.12" + +"@ethersproject/abstract-signer@^5.0.10": + version "5.0.13" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.0.13.tgz" + integrity sha512-VBIZEI5OK0TURoCYyw0t3w+TEO4kdwnI9wvt4kqUwyxSn3YCRpXYVl0Xoe7XBR/e5+nYOi2MyFGJ3tsFwONecQ== + dependencies: + "@ethersproject/abstract-provider" "^5.0.8" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + +"@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.9": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.10.tgz" + integrity sha512-70vqESmW5Srua1kMDIN6uVfdneZMaMyRYH4qPvkAXGkbicrCOsA9m01vIloA4wYiiF+HLEfL1ENKdn5jb9xiAw== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/rlp" "^5.0.7" + +"@ethersproject/base64@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.0.8.tgz" + integrity sha512-PNbpHOMgZpZ1skvQl119pV2YkCPXmZTxw+T92qX0z7zaMFPypXWTZBzim+hUceb//zx4DFjeGT4aSjZRTOYThg== + dependencies: + "@ethersproject/bytes" "^5.0.9" + +"@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.0.13": + version "5.0.14" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.14.tgz" + integrity sha512-Q4TjMq9Gg3Xzj0aeJWqJgI3tdEiPiET7Y5OtNtjTAODZ2kp4y9jMNg97zVcvPedFvGROdpGDyCI77JDFodUzOw== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + bn.js "^4.4.0" + +"@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.0.9": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.10.tgz" + integrity sha512-vpu0v1LZ1j1s9kERQIMnVU69MyHEzUff7nqK9XuCU4vx+AM8n9lU2gj7jtJIvGSt9HzatK/6I6bWusI5nyuaTA== + dependencies: + "@ethersproject/logger" "^5.0.8" + +"@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.0.8": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.9.tgz" + integrity sha512-2uAKH89UcaJP/Sc+54u92BtJtZ4cPgcS1p0YbB1L3tlkavwNvth+kNCUplIB1Becqs7BOZr0B/3dMNjhJDy4Dg== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + +"@ethersproject/hash@>=5.0.0-beta.128": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.0.11.tgz" + integrity sha512-H3KJ9fk33XWJ2djAW03IL7fg3DsDMYjO1XijiUb1hJ85vYfhvxu0OmsU7d3tg2Uv1H1kFSo8ghr3WFQ8c+NL3g== + dependencies: + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + +"@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.8.tgz" + integrity sha512-zoGbwXcWWs9MX4NOAZ7N0hhgIRl4Q/IO/u9c/RHRY4WqDy3Ywm0OLamEV53QDwhjwn3YiiVwU1Ve5j7yJ0a/KQ== + dependencies: + "@ethersproject/bytes" "^5.0.9" + js-sha3 "0.5.7" + +"@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.0.8": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.9.tgz" + integrity sha512-kV3Uamv3XOH99Xf3kpIG3ZkS7mBNYcLDM00JSDtNgNB4BihuyxpQzIZPRIDmRi+95Z/R1Bb0X2kUNHa/kJoVrw== + +"@ethersproject/networks@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.0.8.tgz" + integrity sha512-PYpptlO2Tu5f/JEBI5hdlMds5k1DY1QwVbh3LKPb3un9dQA2bC51vd2/gRWAgSBpF3kkmZOj4FhD7ATLX4H+DA== + dependencies: + "@ethersproject/logger" "^5.0.8" + +"@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.8.tgz" + integrity sha512-zEnLMze2Eu2VDPj/05QwCwMKHh506gpT9PP9KPVd4dDB+5d6AcROUYVLoIIQgBYK7X/Gw0UJmG3oVtnxOQafAw== + dependencies: + "@ethersproject/logger" "^5.0.8" + +"@ethersproject/rlp@^5.0.7": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.8.tgz" + integrity sha512-E4wdFs8xRNJfzNHmnkC8w5fPeT4Wd1U2cust3YeT16/46iSkLT8nn8ilidC6KhR7hfuSZE4UqSPzyk76p7cdZg== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + +"@ethersproject/signing-key@^5.0.8": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.10.tgz" + integrity sha512-w5it3GbFOvN6e0mTd5gDNj+bwSe6L9jqqYjU+uaYS8/hAEp4qYLk5p8ZjbJJkNn7u1p0iwocp8X9oH/OdK8apA== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + elliptic "6.5.4" + +"@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.0.8": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.9.tgz" + integrity sha512-ogxBpcUpdO524CYs841MoJHgHxEPUy0bJFDS4Ezg8My+WYVMfVAOlZSLss0Rurbeeam8CpUVDzM4zUn09SU66Q== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/logger" "^5.0.8" + +"@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.0.9": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.10.tgz" + integrity sha512-Tqpp+vKYQyQdJQQk4M73tDzO7ODf2D42/sJOcKlDAAbdSni13v6a+31hUdo02qYXhVYwIs+ZjHnO4zKv5BNk8w== + dependencies: + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/rlp" "^5.0.7" + "@ethersproject/signing-key" "^5.0.8" + +"@ethersproject/web@^5.0.12": + version "5.0.13" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.0.13.tgz" + integrity sha512-G3x/Ns7pQm21ALnWLbdBI5XkW/jrsbXXffI9hKNPHqf59mTxHYtlNiSwxdoTSwCef3Hn7uvGZpaSgTyxs7IufQ== + dependencies: + "@ethersproject/base64" "^5.0.7" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + +"@graphql-tools/batch-delegate@^6.2.4", "@graphql-tools/batch-delegate@^6.2.6": + version "6.2.6" + resolved "https://registry.yarnpkg.com/@graphql-tools/batch-delegate/-/batch-delegate-6.2.6.tgz" + integrity sha512-QUoE9pQtkdNPFdJHSnBhZtUfr3M7pIRoXoMR+TG7DK2Y62ISKbT/bKtZEUU1/2v5uqd5WVIvw9dF8gHDSJAsSA== + dependencies: + "@graphql-tools/delegate" "^6.2.4" + dataloader "2.0.0" + tslib "~2.0.1" + +"@graphql-tools/batch-execute@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/batch-execute/-/batch-execute-7.0.0.tgz" + integrity sha512-+ywPfK6N2Ddna6oOa5Qb1Mv7EA8LOwRNOAPP9dL37FEhksJM9pYqPSceUcqMqg7S9b0+Cgr78s408rgvurV3/Q== + dependencies: + "@graphql-tools/utils" "^7.0.0" + dataloader "2.0.0" + is-promise "4.0.0" + tslib "~2.0.1" + +"@graphql-tools/code-file-loader@^6.2.4": + version "6.3.1" + resolved "https://registry.yarnpkg.com/@graphql-tools/code-file-loader/-/code-file-loader-6.3.1.tgz" + integrity sha512-ZJimcm2ig+avgsEOWWVvAaxZrXXhiiSZyYYOJi0hk9wh5BxZcLUNKkTp6EFnZE/jmGUwuos3pIjUD3Hwi3Bwhg== + dependencies: + "@graphql-tools/graphql-tag-pluck" "^6.5.1" + "@graphql-tools/utils" "^7.0.0" + tslib "~2.1.0" + +"@graphql-tools/delegate@^6.2.4": + version "6.2.4" + resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-6.2.4.tgz" + integrity sha512-mXe6DfoWmq49kPcDrpKHgC2DSWcD5q0YCaHHoXYPAOlnLH8VMTY8BxcE8y/Do2eyg+GLcwAcrpffVszWMwqw0w== + dependencies: + "@ardatan/aggregate-error" "0.0.6" + "@graphql-tools/schema" "^6.2.4" + "@graphql-tools/utils" "^6.2.4" + dataloader "2.0.0" + is-promise "4.0.0" + tslib "~2.0.1" + +"@graphql-tools/delegate@^7.0.1", "@graphql-tools/delegate@^7.0.7": + version "7.0.10" + resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-7.0.10.tgz" + integrity sha512-6Di9ia5ohoDvrHuhj2cak1nJGhIefJmUsd3WKZcJ2nu2yZAFawWMxGvQImqv3N7iyaWKiVhrrK8Roi/JrYhdKg== + dependencies: + "@ardatan/aggregate-error" "0.0.6" + "@graphql-tools/batch-execute" "^7.0.0" + "@graphql-tools/schema" "^7.0.0" + "@graphql-tools/utils" "^7.1.6" + dataloader "2.0.0" + is-promise "4.0.0" + tslib "~2.1.0" + +"@graphql-tools/git-loader@^6.2.4": + version "6.2.6" + resolved "https://registry.yarnpkg.com/@graphql-tools/git-loader/-/git-loader-6.2.6.tgz" + integrity sha512-ooQTt2CaG47vEYPP3CPD+nbA0F+FYQXfzrB1Y1ABN9K3d3O2RK3g8qwslzZaI8VJQthvKwt0A95ZeE4XxteYfw== + dependencies: + "@graphql-tools/graphql-tag-pluck" "^6.2.6" + "@graphql-tools/utils" "^7.0.0" + tslib "~2.1.0" + +"@graphql-tools/github-loader@^6.2.4": + version "6.2.5" + resolved "https://registry.yarnpkg.com/@graphql-tools/github-loader/-/github-loader-6.2.5.tgz" + integrity sha512-DLuQmYeNNdPo8oWus8EePxWCfCAyUXPZ/p1PWqjrX/NGPyH2ZObdqtDAfRHztljt0F/qkBHbGHCEk2TKbRZTRw== + dependencies: + "@graphql-tools/graphql-tag-pluck" "^6.2.6" + "@graphql-tools/utils" "^7.0.0" + cross-fetch "3.0.6" + tslib "~2.0.1" + +"@graphql-tools/graphql-file-loader@^6.2.4": + version "6.2.7" + resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-file-loader/-/graphql-file-loader-6.2.7.tgz" + integrity sha512-5k2SNz0W87tDcymhEMZMkd6/vs6QawDyjQXWtqkuLTBF3vxjxPD1I4dwHoxgWPIjjANhXybvulD7E+St/7s9TQ== + dependencies: + "@graphql-tools/import" "^6.2.6" + "@graphql-tools/utils" "^7.0.0" + tslib "~2.1.0" + +"@graphql-tools/graphql-tag-pluck@^6.2.4", "@graphql-tools/graphql-tag-pluck@^6.2.6", "@graphql-tools/graphql-tag-pluck@^6.5.1": + version "6.5.1" + resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-6.5.1.tgz" + integrity sha512-7qkm82iFmcpb8M6/yRgzjShtW6Qu2OlCSZp8uatA3J0eMl87TxyJoUmL3M3UMMOSundAK8GmoyNVFUrueueV5Q== + dependencies: + "@babel/parser" "7.12.16" + "@babel/traverse" "7.12.13" + "@babel/types" "7.12.13" + "@graphql-tools/utils" "^7.0.0" + tslib "~2.1.0" + +"@graphql-tools/import@^6.2.4", "@graphql-tools/import@^6.2.6": + version "6.3.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.3.0.tgz" + integrity sha512-zmaVhJ3UPjzJSb005Pjn2iWvH+9AYRXI4IUiTi14uPupiXppJP3s7S25Si3+DbHpFwurDF2nWRxBLiFPWudCqw== + dependencies: + resolve-from "5.0.0" + tslib "~2.1.0" + +"@graphql-tools/json-file-loader@^6.2.4": + version "6.2.6" + resolved "https://registry.yarnpkg.com/@graphql-tools/json-file-loader/-/json-file-loader-6.2.6.tgz" + integrity sha512-CnfwBSY5926zyb6fkDBHnlTblHnHI4hoBALFYXnrg0Ev4yWU8B04DZl/pBRUc459VNgO2x8/mxGIZj2hPJG1EA== + dependencies: + "@graphql-tools/utils" "^7.0.0" + tslib "~2.0.1" + +"@graphql-tools/links@^6.2.4": + version "6.2.5" + resolved "https://registry.yarnpkg.com/@graphql-tools/links/-/links-6.2.5.tgz" + integrity sha512-XeGDioW7F+HK6HHD/zCeF0HRC9s12NfOXAKv1HC0J7D50F4qqMvhdS/OkjzLoBqsgh/Gm8icRc36B5s0rOA9ig== + dependencies: + "@graphql-tools/utils" "^7.0.0" + apollo-link "1.2.14" + apollo-upload-client "14.1.2" + cross-fetch "3.0.6" + form-data "3.0.0" + is-promise "4.0.0" + tslib "~2.0.1" + +"@graphql-tools/load-files@^6.2.4": + version "6.2.7" + resolved "https://registry.yarnpkg.com/@graphql-tools/load-files/-/load-files-6.2.7.tgz" + integrity sha512-6L0d+F1jJkamiUNPjmxVDRMrauaD/Jp9aSzmp9zxeeZhIuG6V/jbhBBgMbNscMviYJfwDbHvnOJ3fmYpZyM9kg== + dependencies: + globby "11.0.2" + tslib "~2.1.0" + unixify "1.0.0" + +"@graphql-tools/load@^6.2.4": + version "6.2.7" + resolved "https://registry.yarnpkg.com/@graphql-tools/load/-/load-6.2.7.tgz" + integrity sha512-b1qWjki1y/QvGtoqW3x8bcwget7xmMfLGsvGFWOB6m38tDbzVT3GlJViAC0nGPDks9OCoJzAdi5IYEkBaqH5GQ== + dependencies: + "@graphql-tools/merge" "^6.2.9" + "@graphql-tools/utils" "^7.5.0" + globby "11.0.2" + import-from "3.0.0" + is-glob "4.0.1" + p-limit "3.1.0" + tslib "~2.1.0" + unixify "1.0.0" + valid-url "1.0.9" + +"@graphql-tools/merge@^6.2.4", "@graphql-tools/merge@^6.2.9": + version "6.2.10" + resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-6.2.10.tgz" + integrity sha512-dM3n37PcslvhOAkCz7Cwk0BfoiSVKXGmCX+VMZkATbXk/0vlxUfNEpVfA5yF4IkP27F04SzFQSaNrbD0W2Rszw== + dependencies: + "@graphql-tools/schema" "^7.0.0" + "@graphql-tools/utils" "^7.5.0" + tslib "~2.1.0" + +"@graphql-tools/mock@^6.2.4": + version "6.2.4" + resolved "https://registry.yarnpkg.com/@graphql-tools/mock/-/mock-6.2.4.tgz" + integrity sha512-O5Zvq/mcDZ7Ptky0IZ4EK9USmxV6FEVYq0Jxv2TI80kvxbCjt0tbEpZ+r1vIt1gZOXlAvadSHYyzWnUPh+1vkQ== + dependencies: + "@graphql-tools/schema" "^6.2.4" + "@graphql-tools/utils" "^6.2.4" + tslib "~2.0.1" + +"@graphql-tools/module-loader@^6.2.4": + version "6.2.7" + resolved "https://registry.yarnpkg.com/@graphql-tools/module-loader/-/module-loader-6.2.7.tgz" + integrity sha512-ItAAbHvwfznY9h1H9FwHYDstTcm22Dr5R9GZtrWlpwqj0jaJGcBxsMB9jnK9kFqkbtFYEe4E/NsSnxsS4/vViQ== + dependencies: + "@graphql-tools/utils" "^7.5.0" + tslib "~2.1.0" + +"@graphql-tools/relay-operation-optimizer@^6.2.4": + version "6.3.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.3.0.tgz" + integrity sha512-Or3UgRvkY9Fq1AAx7q38oPqFmTepLz7kp6wDHKyR0ceG7AvHv5En22R12mAeISInbhff4Rpwgf6cE8zHRu6bCw== + dependencies: + "@graphql-tools/utils" "^7.1.0" + relay-compiler "10.1.0" + tslib "~2.0.1" + +"@graphql-tools/resolvers-composition@^6.2.4": + version "6.2.6" + resolved "https://registry.yarnpkg.com/@graphql-tools/resolvers-composition/-/resolvers-composition-6.2.6.tgz" + integrity sha512-QO0PC5RG0SolOksupOuB4B0tuzEsQFwQrwD9xLHCrJmjaLi66lOKMFzN40IBY5rqg0k/zqPyjII8rtzcNobvIg== + dependencies: + "@graphql-tools/utils" "^7.0.0" + lodash "4.17.21" + tslib "~2.1.0" + +"@graphql-tools/schema@^6.2.4": + version "6.2.4" + resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-6.2.4.tgz" + integrity sha512-rh+14lSY1q8IPbEv2J9x8UBFJ5NrDX9W5asXEUlPp+7vraLp/Tiox4GXdgyA92JhwpYco3nTf5Bo2JDMt1KnAQ== + dependencies: + "@graphql-tools/utils" "^6.2.4" + tslib "~2.0.1" + +"@graphql-tools/schema@^7.0.0", "@graphql-tools/schema@^7.1.2": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-7.1.3.tgz" + integrity sha512-ZY76hmcJlF1iyg3Im0sQ3ASRkiShjgv102vLTVcH22lEGJeCaCyyS/GF1eUHom418S60bS8Th6+autRUxfBiBg== + dependencies: + "@graphql-tools/utils" "^7.1.2" + tslib "~2.1.0" + +"@graphql-tools/stitch@^6.2.4": + version "6.2.4" + resolved "https://registry.yarnpkg.com/@graphql-tools/stitch/-/stitch-6.2.4.tgz" + integrity sha512-0C7PNkS7v7iAc001m7c1LPm5FUB0/DYw+s3OyCii6YYYHY8NwdI0roeOyeDGFJkFubWBQfjc3hoSyueKtU73mw== + dependencies: + "@graphql-tools/batch-delegate" "^6.2.4" + "@graphql-tools/delegate" "^6.2.4" + "@graphql-tools/merge" "^6.2.4" + "@graphql-tools/schema" "^6.2.4" + "@graphql-tools/utils" "^6.2.4" + "@graphql-tools/wrap" "^6.2.4" + is-promise "4.0.0" + tslib "~2.0.1" + +"@graphql-tools/url-loader@^6.2.4": + version "6.8.1" + resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-6.8.1.tgz" + integrity sha512-iE/y9IAu0cZYL7o9IIDdGm5WjxacN25nGgVqjZINYlisW/wyuBxng7DMJBAp6yM6gkxkCpMno1ljA/52MXzVPQ== + dependencies: + "@graphql-tools/delegate" "^7.0.1" + "@graphql-tools/utils" "^7.1.5" + "@graphql-tools/wrap" "^7.0.4" + "@types/websocket" "1.0.1" + cross-fetch "3.0.6" + eventsource "1.0.7" + extract-files "9.0.0" + form-data "4.0.0" + graphql-upload "^11.0.0" + graphql-ws "4.1.5" + is-promise "4.0.0" + isomorphic-ws "4.0.1" + sse-z "0.3.0" + sync-fetch "0.3.0" + tslib "~2.1.0" + valid-url "1.0.9" + ws "7.4.3" + +"@graphql-tools/utils@^6.2.4": + version "6.2.4" + resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-6.2.4.tgz" + integrity sha512-ybgZ9EIJE3JMOtTrTd2VcIpTXtDrn2q6eiYkeYMKRVh3K41+LZa6YnR2zKERTXqTWqhobROwLt4BZbw2O3Aeeg== + dependencies: + "@ardatan/aggregate-error" "0.0.6" + camel-case "4.1.1" + tslib "~2.0.1" + +"@graphql-tools/utils@^7.0.0", "@graphql-tools/utils@^7.1.0", "@graphql-tools/utils@^7.1.2", "@graphql-tools/utils@^7.1.5", "@graphql-tools/utils@^7.1.6", "@graphql-tools/utils@^7.2.1", "@graphql-tools/utils@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-7.5.0.tgz" + integrity sha512-8f//RSqHmKRdg9A3GHlZdxzlVfF/938ZD9edXLW7EriSABg1BXu3veru9W02VqORypArb2S/Tyeyvsk2gForqA== + dependencies: + "@ardatan/aggregate-error" "0.0.6" + camel-case "4.1.2" + tslib "~2.1.0" + +"@graphql-tools/wrap@^6.2.4": + version "6.2.4" + resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-6.2.4.tgz" + integrity sha512-cyQgpybolF9DjL2QNOvTS1WDCT/epgYoiA8/8b3nwv5xmMBQ6/6nYnZwityCZ7njb7MMyk7HBEDNNlP9qNJDcA== + dependencies: + "@graphql-tools/delegate" "^6.2.4" + "@graphql-tools/schema" "^6.2.4" + "@graphql-tools/utils" "^6.2.4" + is-promise "4.0.0" + tslib "~2.0.1" + +"@graphql-tools/wrap@^7.0.4": + version "7.0.5" + resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-7.0.5.tgz" + integrity sha512-KCWBXsDfvG46GNUawRltJL4j9BMGoOG7oo3WEyCQP+SByWXiTe5cBF45SLDVQgdjljGNZhZ4Lq/7avIkF7/zDQ== + dependencies: + "@graphql-tools/delegate" "^7.0.7" + "@graphql-tools/schema" "^7.1.2" + "@graphql-tools/utils" "^7.2.1" + is-promise "4.0.0" + tslib "~2.0.1" + +"@graphql-typed-document-node/core@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.0.tgz" + integrity sha512-wYn6r8zVZyQJ6rQaALBEln5B1pzxb9shV5Ef97kTvn6yVGrqyXVnDqnU24MXnFubR+rZjBY9NWuxX3FB2sTsjg== + +"@gulp-sourcemaps/map-sources@1.X": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz" + integrity sha1-iQrnxdjId/bThIYCFazp1+yUW9o= + dependencies: + normalize-path "^2.0.1" + through2 "^2.0.3" + +"@nodelib/fs.scandir@2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz" + integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== + dependencies: + "@nodelib/fs.stat" "2.0.4" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz" + integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz" + integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== + dependencies: + "@nodelib/fs.scandir" "2.1.4" + fastq "^1.6.0" + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz" + integrity sha1-m4sMxmPWaafY9vXQiToU00jzD78= + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz" + integrity sha1-NVy8mLr61ZePntCV85diHx0Ga3A= + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz" + integrity sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU= + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz" + integrity sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E= + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz" + integrity sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik= + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz" + integrity sha1-bMKyDFya1q0NzP0hynZz2Nf79o0= + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz" + integrity sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q= + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz" + integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= + +"@redux-saga/core@^1.0.0": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@redux-saga/core/-/core-1.1.3.tgz" + integrity sha512-8tInBftak8TPzE6X13ABmEtRJGjtK17w7VUs7qV17S8hCO5S3+aUTWZ/DBsBJPdE8Z5jOPwYALyvofgq1Ws+kg== + dependencies: + "@babel/runtime" "^7.6.3" + "@redux-saga/deferred" "^1.1.2" + "@redux-saga/delay-p" "^1.1.2" + "@redux-saga/is" "^1.1.2" + "@redux-saga/symbols" "^1.1.2" + "@redux-saga/types" "^1.1.0" + redux "^4.0.4" + typescript-tuple "^2.2.1" + +"@redux-saga/deferred@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@redux-saga/deferred/-/deferred-1.1.2.tgz" + integrity sha512-908rDLHFN2UUzt2jb4uOzj6afpjgJe3MjICaUNO3bvkV/kN/cNeI9PMr8BsFXB/MR8WTAZQq/PlTq8Kww3TBSQ== + +"@redux-saga/delay-p@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@redux-saga/delay-p/-/delay-p-1.1.2.tgz" + integrity sha512-ojc+1IoC6OP65Ts5+ZHbEYdrohmIw1j9P7HS9MOJezqMYtCDgpkoqB5enAAZrNtnbSL6gVCWPHaoaTY5KeO0/g== + dependencies: + "@redux-saga/symbols" "^1.1.2" + +"@redux-saga/is@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@redux-saga/is/-/is-1.1.2.tgz" + integrity sha512-OLbunKVsCVNTKEf2cH4TYyNbbPgvmZ52iaxBD4I1fTif4+MTXMa4/Z07L83zW/hTCXwpSZvXogqMqLfex2Tg6w== + dependencies: + "@redux-saga/symbols" "^1.1.2" + "@redux-saga/types" "^1.1.0" + +"@redux-saga/symbols@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@redux-saga/symbols/-/symbols-1.1.2.tgz" + integrity sha512-EfdGnF423glv3uMwLsGAtE6bg+R9MdqlHEzExnfagXPrIiuxwr3bdiAwz3gi+PsrQ3yBlaBpfGLtDG8rf3LgQQ== + +"@redux-saga/types@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@redux-saga/types/-/types-1.1.0.tgz" + integrity sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg== + +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + +"@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" + +"@truffle/abi-utils@^0.1.4", "@truffle/abi-utils@^0.1.5": + version "0.1.5" + resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-0.1.5.tgz" + integrity sha512-PvCN/qebM0boK2YycX3sMe6CwoLtB7cpYj2ugHPtcQ+Zpg1hQRGS+GRLeBuQg3RR5X8IxzLb4YPZh5dnJxMZYA== + dependencies: + change-case "3.0.2" + faker "^5.3.1" + fast-check "^2.12.1" + source-map-support "^0.5.19" + +"@truffle/code-utils@^1.2.23", "@truffle/code-utils@^1.2.24": + version "1.2.24" + resolved "https://registry.yarnpkg.com/@truffle/code-utils/-/code-utils-1.2.24.tgz" + integrity sha512-IqpbTh4uNQueadv96GBWBaGTYTyOsLKE9Dui1wpiijON6xq2iIcTArej1vMh+nkAd5/AsP+enbBY8mksm6rFBg== + dependencies: + cbor "^5.1.0" + source-map-support "^0.5.19" + +"@truffle/codec@^0.10.1": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.10.1.tgz" + integrity sha512-c1lC9Wcp+Z1DLvEYH3dkEtMKnUJx72CirO3kmi0OgFSA5QqTDCtfrVOhAugcb/iMLgqUK05/pexp2whb4oASKA== + dependencies: + big.js "^5.2.2" + bn.js "^5.1.3" + cbor "^5.1.0" + debug "^4.3.1" + lodash.clonedeep "^4.5.0" + lodash.escaperegexp "^4.1.2" + lodash.partition "^4.6.0" + lodash.sum "^4.0.2" + semver "^7.3.4" + source-map-support "^0.5.19" + utf8 "^3.0.0" + web3-utils "1.2.9" + +"@truffle/config@^1.2.35": + version "1.2.35" + resolved "https://registry.yarnpkg.com/@truffle/config/-/config-1.2.35.tgz" + integrity sha512-ULTS9t3ldqEV1VBVNWlS9tdWJ0r637ANspzBoQd6S/Ab7CfueQhcIfp29oz6Ahcgjkl4NX+Gu/dG6/Jiys81vg== + dependencies: + "@truffle/error" "^0.0.12" + "@truffle/events" "^0.0.9" + "@truffle/provider" "^0.2.26" + configstore "^4.0.0" + find-up "^2.1.0" + lodash.assignin "^4.2.0" + lodash.merge "^4.6.2" + module "^1.2.5" + original-require "^1.0.1" + source-map-support "^0.5.19" + +"@truffle/db@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@truffle/db/-/db-0.5.2.tgz" + integrity sha512-bp9/WkB8coWF1Ctqgt+hshAMNrKWi2+VILAqKpAjgr3FkUcFO05OkguT0zwH4J0uHeGMCN0+dQ2ulXhORbmXNg== + dependencies: + "@truffle/abi-utils" "^0.1.4" + "@truffle/code-utils" "^1.2.23" + "@truffle/config" "^1.2.35" + apollo-server "^2.18.2" + debug "^4.3.1" + fs-extra "^9.1.0" + graphql "^15.3.0" + graphql-tag "^2.11.0" + graphql-tools "^6.2.4" + json-stable-stringify "^1.0.1" + jsondown "^1.0.0" + pascal-case "^2.0.1" + pluralize "^8.0.0" + pouchdb "7.1.1" + pouchdb-adapter-memory "^7.1.1" + pouchdb-adapter-node-websql "^7.0.0" + pouchdb-debug "^7.1.1" + pouchdb-find "^7.0.0" + source-map-support "^0.5.19" + web3-utils "1.2.9" + +"@truffle/debugger@^8.0.16": + version "8.0.16" + resolved "https://registry.yarnpkg.com/@truffle/debugger/-/debugger-8.0.16.tgz" + integrity sha512-+NpsF92yrKBnArGx+RUq2uQPex4E4QPN68/w/+8Z4fYjpi2xQwLZ6HwYaTNWQ3g5XOKiQQOs50mp2pbuMTQeLw== + dependencies: + "@truffle/abi-utils" "^0.1.5" + "@truffle/codec" "^0.10.1" + "@truffle/source-map-utils" "^1.3.35" + bn.js "^5.1.3" + debug "^4.3.1" + json-pointer "^0.6.0" + json-stable-stringify "^1.0.1" + lodash.flatten "^4.4.0" + lodash.merge "^4.6.2" + lodash.sum "^4.0.2" + lodash.zipwith "^4.2.0" + redux "^3.7.2" + redux-cli-logger "^2.0.1" + redux-saga "1.0.0" + remote-redux-devtools "^0.5.12" + reselect-tree "^1.3.4" + semver "^7.3.4" + source-map-support "^0.5.19" + web3 "1.2.9" + web3-eth-abi "1.2.9" + +"@truffle/error@^0.0.12": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.12.tgz" + integrity sha512-kZqqnPR9YDJG7KCDOcN1qH16Qs0oz1PzF0Y93AWdhXuL9S9HYo/RUUeqGKbPpRBEZldQUS8aa4EzfK08u5pu6g== + +"@truffle/events@^0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@truffle/events/-/events-0.0.9.tgz" + integrity sha512-o0rS8zkjCzg2vDJymSZyyq1eKdkRbxIFnsnYQl6Bc2StK89C/ZISenxrUe2fbdeq3L9Zq+ds1mSKH/MFK0Ejkg== + dependencies: + emittery "^0.4.1" + ora "^3.4.0" + +"@truffle/interface-adapter@^0.4.19": + version "0.4.19" + resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.4.19.tgz" + integrity sha512-+Zz6Fr8+I2wYSS8RM3WBOMzf22QffMQTnlsYsRgRHzv3gYoRA9ZDLb84lFRfmWyw+IdXTo90tjRHEb5krC6uxg== + dependencies: + bn.js "^5.1.3" + ethers "^4.0.32" + source-map-support "^0.5.19" + web3 "1.2.9" + +"@truffle/provider@^0.2.26": + version "0.2.26" + resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.2.26.tgz" + integrity sha512-YKPmhB9S9AQkT2ePGtadwjDduxU23DXXy+5zyM5fevw5GCbXSnf+jG6rICXjPkVFjuKBlXuq5JbuERZn43522Q== + dependencies: + "@truffle/error" "^0.0.12" + "@truffle/interface-adapter" "^0.4.19" + web3 "1.2.9" + +"@truffle/source-map-utils@^1.3.35": + version "1.3.35" + resolved "https://registry.yarnpkg.com/@truffle/source-map-utils/-/source-map-utils-1.3.35.tgz" + integrity sha512-j3PHac4g/yQwxSB899lkal/YMuIXLNNlDGfCog2QrWqdtK7HJhx6X2tftwqrZzO4JTKc1Cs8KOCPOndx9W2xeQ== + dependencies: + "@truffle/code-utils" "^1.2.24" + "@truffle/codec" "^0.10.1" + debug "^4.3.1" + json-pointer "^0.6.0" + node-interval-tree "^1.3.3" + web3-utils "1.2.9" + +"@types/accepts@*", "@types/accepts@^1.3.5": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/accepts/-/accepts-1.3.5.tgz" + integrity sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ== + dependencies: + "@types/node" "*" + +"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.4": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/body-parser@*", "@types/body-parser@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.0.tgz" + integrity sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.34" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.34.tgz" + integrity sha512-ePPA/JuI+X0vb+gSWlPKOY0NdNAie/rPUqX2GUPpbZwiKTkSPhjXWuee47E4MtE54QVzGCQMQkAL6JhV2E1+cQ== + dependencies: + "@types/node" "*" + +"@types/content-disposition@*": + version "0.5.3" + resolved "https://registry.yarnpkg.com/@types/content-disposition/-/content-disposition-0.5.3.tgz" + integrity sha512-P1bffQfhD3O4LW0ioENXUhZ9OIa0Zn+P7M+pWgkCKaT53wVLSq0mrKksCID/FGHpFhRSxRGhgrQmfhRuzwtKdg== + +"@types/cookies@*": + version "0.7.6" + resolved "https://registry.yarnpkg.com/@types/cookies/-/cookies-0.7.6.tgz" + integrity sha512-FK4U5Qyn7/Sc5ih233OuHO0qAkOpEcD/eG6584yEiLKizTFRny86qHLe/rej3HFQrkBuUjF4whFliAdODbVN/w== + dependencies: + "@types/connect" "*" + "@types/express" "*" + "@types/keygrip" "*" + "@types/node" "*" + +"@types/cors@2.8.8": + version "2.8.8" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.8.tgz" + integrity sha512-fO3gf3DxU2Trcbr75O7obVndW/X5k8rJNZkLXlQWStTHhP71PkRqjwPIEI0yMnJdg9R9OasjU+Bsr+Hr1xy/0w== + dependencies: + "@types/express" "*" + +"@types/express-serve-static-core@*", "@types/express-serve-static-core@4.17.18", "@types/express-serve-static-core@^4.17.18": + version "4.17.18" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.18.tgz" + integrity sha512-m4JTwx5RUBNZvky/JJ8swEJPKFd8si08pPF2PfizYjGZOKr/svUWPcoUmLow6MmPzhasphB7gSTINY67xn3JNA== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + +"@types/express@*": + version "4.17.11" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.11.tgz" + integrity sha512-no+R6rW60JEc59977wIxreQVsIEOAYwgCqldrA/vkpCnbD7MqTefO97lmoBe4WE0F156bC4uLSP1XHDOySnChg== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.18" + "@types/qs" "*" + "@types/serve-static" "*" + +"@types/express@4.17.7": + version "4.17.7" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.7.tgz" + integrity sha512-dCOT5lcmV/uC2J9k0rPafATeeyz+99xTt54ReX11/LObZgfzJqZNcW27zGhYyX+9iSEGXGt5qLPwRSvBZcLvtQ== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "*" + "@types/qs" "*" + "@types/serve-static" "*" + +"@types/fs-capacitor@*": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/fs-capacitor/-/fs-capacitor-2.0.0.tgz" + integrity sha512-FKVPOCFbhCvZxpVAMhdBdTfVfXUpsh15wFHgqOKxh9N9vzWZVuWCSijZ5T4U34XYNnuj2oduh6xcs1i+LPI+BQ== + dependencies: + "@types/node" "*" + +"@types/http-assert@*": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@types/http-assert/-/http-assert-1.5.1.tgz" + integrity sha512-PGAK759pxyfXE78NbKxyfRcWYA/KwW17X290cNev/qAsn9eQIxkH4shoNBafH37wewhDG/0p1cHPbK6+SzZjWQ== + +"@types/http-errors@*": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-1.8.0.tgz" + integrity sha512-2aoSC4UUbHDj2uCsCxcG/vRMXey/m17bC7UwitVm5hn22nI8O8Y9iDpA76Orc+DWkQ4zZrOKEshCqR/jSuXAHA== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + +"@types/keygrip@*": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@types/keygrip/-/keygrip-1.0.2.tgz" + integrity sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw== + +"@types/koa-compose@*": + version "3.2.5" + resolved "https://registry.yarnpkg.com/@types/koa-compose/-/koa-compose-3.2.5.tgz" + integrity sha512-B8nG/OoE1ORZqCkBVsup/AKcvjdgoHnfi4pZMn5UwAPCbhk/96xyv284eBYW8JlQbQ7zDmnpFr68I/40mFoIBQ== + dependencies: + "@types/koa" "*" + +"@types/koa@*": + version "2.13.0" + resolved "https://registry.yarnpkg.com/@types/koa/-/koa-2.13.0.tgz" + integrity sha512-hNs1Z2lX+R5sZroIy/WIGbPlH/719s/Nd5uIjSIAdHn9q+g7z6mxOnhwMjK1urE4/NUP0SOoYUOD4MnvD9FRNw== + dependencies: + "@types/accepts" "*" + "@types/content-disposition" "*" + "@types/cookies" "*" + "@types/http-assert" "*" + "@types/http-errors" "*" + "@types/keygrip" "*" + "@types/koa-compose" "*" + "@types/node" "*" + +"@types/long@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz" + integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== + +"@types/mime@^1": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz" + integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== + +"@types/mocha@^8.2.1": + version "8.2.1" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.1.tgz#f3f3ae4590c5386fc7c543aae9b78d4cf30ffee9" + integrity sha512-NysN+bNqj6E0Hv4CTGWSlPzMW6vTKjDpOteycDkV4IWBsO+PU48JonrPzV9ODjiI2XrjmA05KInLgF5ivZ/YGQ== + +"@types/node-fetch@2.5.7": + version "2.5.7" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz" + integrity sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + +"@types/node@*": + version "14.14.31" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.31.tgz" + integrity sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g== + +"@types/node@^10.1.0", "@types/node@^10.12.18": + version "10.17.54" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.54.tgz" + integrity sha512-c8Lm7+hXdSPmWH4B9z/P/xIXhFK3mCQin4yCYMd2p1qpMG5AfgyJuYZ+3q2dT7qLiMMMGMd5dnkFpdqJARlvtQ== + +"@types/node@^12.6.1": + version "12.20.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.4.tgz" + integrity sha512-xRCgeE0Q4pT5UZ189TJ3SpYuX/QGl6QIAOAIeDSbAVAd2gX1NxSZup4jNVK7cxIeP8KDSbJgcckun495isP1jQ== + +"@types/pbkdf2@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz" + integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + dependencies: + "@types/node" "*" + +"@types/qs@*": + version "6.9.5" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.5.tgz" + integrity sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ== + +"@types/range-parser@*": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz" + integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== + +"@types/secp256k1@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.1.tgz" + integrity sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog== + dependencies: + "@types/node" "*" + +"@types/serve-static@*": + version "1.13.9" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.9.tgz" + integrity sha512-ZFqF6qa48XsPdjXV5Gsz0Zqmux2PerNd3a/ktL45mHpa19cuMi/cL8tcxdAx497yRh+QtYPuofjT9oWw9P7nkA== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + +"@types/ungap__global-this@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@types/ungap__global-this/-/ungap__global-this-0.3.1.tgz" + integrity sha512-+/DsiV4CxXl6ZWefwHZDXSe1Slitz21tom38qPCaG0DYCS1NnDPIQDTKcmQ/tvK/edJUKkmuIDBJbmKDiB0r/g== + +"@types/websocket@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-1.0.1.tgz" + integrity sha512-f5WLMpezwVxCLm1xQe/kdPpQIOmL0TXYx2O15VYfYzc7hTIdxiOoOvez+McSIw3b7z/1zGovew9YSL7+h4h7/Q== + dependencies: + "@types/node" "*" + +"@types/ws@^7.0.0": + version "7.4.0" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.0.tgz" + integrity sha512-Y29uQ3Uy+58bZrFLhX36hcI3Np37nqWE7ky5tjiDoy1GDZnIwVxS0CgF+s+1bXMzjKBFy+fqaRfb708iNzdinw== + dependencies: + "@types/node" "*" + +"@types/zen-observable@^0.8.0": + version "0.8.2" + resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.2.tgz" + integrity sha512-HrCIVMLjE1MOozVoD86622S7aunluLb2PJdPfb3nYiEtohm8mIB/vyv0Fd37AdeMFrTUQXEunw78YloMA3Qilg== + +"@ungap/global-this@^0.4.2": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@ungap/global-this/-/global-this-0.4.4.tgz" + integrity sha512-mHkm6FvepJECMNthFuIgpAEFmPOk71UyXuIxYfjytvFTnSDBIz7jmViO+LfHI/AjrazWije0PnSP3+/NlwzqtA== + +"@wry/context@^0.5.2": + version "0.5.4" + resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.5.4.tgz" + integrity sha512-/pktJKHUXDr4D6TJqWgudOPJW2Z+Nb+bqk40jufA3uTkLbnCRKdJPiYDIa/c7mfcPH8Hr6O8zjCERpg5Sq04Zg== + dependencies: + tslib "^1.14.1" + +"@wry/equality@^0.1.2": + version "0.1.11" + resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.11.tgz" + integrity sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA== + dependencies: + tslib "^1.9.3" + +"@wry/equality@^0.3.0": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.3.3.tgz" + integrity sha512-pMrKHIgDAWxLDTGsbaVag+USmwZ2+gGrSBrtyGUxp2pxRg1Cad70lI/hd0NTPtJ4zJxN16EQ679U1Rts83AF5g== + dependencies: + tslib "^1.14.1" + +"@wry/trie@^0.2.1": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@wry/trie/-/trie-0.2.2.tgz" + integrity sha512-OxqBB39x6MfHaa2HpMiRMfhuUnQTddD32Ko020eBeJXq87ivX6xnSSnzKHVbA21p7iqBASz8n/07b6W5wW1BVQ== + dependencies: + tslib "^1.14.1" + +abab@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz" + integrity sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4= + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +abort-controller@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +abstract-leveldown@^6.2.1: + version "6.3.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz" + integrity sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +abstract-leveldown@~2.7.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz" + integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@~6.0.0, abstract-leveldown@~6.0.1: + version "6.0.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.0.3.tgz" + integrity sha512-jzewKKpZbaYUa6HTThnrl+GrJhzjEAeuc7hTVpZdzg7kupXZFoqQDFwyOwLNbmJKJlmzw8yiipMPkDiuKkT06Q== + dependencies: + level-concat-iterator "~2.0.0" + xtend "~4.0.0" + +abstract-leveldown@~6.2.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz" + integrity sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +accepts@^1.3.5, accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +acorn-globals@^1.0.4: + version "1.0.9" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-1.0.9.tgz" + integrity sha1-VbtemGkVB7dFedBRNBMhfDgMVM8= + dependencies: + acorn "^2.1.0" + +acorn-jsx@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz" + integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== + +acorn@4.X: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz" + integrity sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c= + +acorn@^2.1.0, acorn@^2.4.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz" + integrity sha1-q259nYhqrKiwhbwzEreaGYQz8Oc= + +acorn@^7.4.0: + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz" + integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= + +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^7.0.2: + version "7.1.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-7.1.1.tgz" + integrity sha512-ga/aqDYnUy/o7vbsRTFhhTsNeXiYb5JWDIcRIeZfwRNCefwjNTVYCGdGSUrEmiu3yDK3vFvNbgJxvrQW4JXrYQ== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ansi-colors@4.1.1, ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +apollo-cache-control@^0.11.6: + version "0.11.6" + resolved "https://registry.yarnpkg.com/apollo-cache-control/-/apollo-cache-control-0.11.6.tgz" + integrity sha512-YZ+uuIG+fPy+mkpBS2qKF0v1qlzZ3PW6xZVaDukeK3ed3iAs4L/2YnkTqau3OmoF/VPzX2FmSkocX/OVd59YSw== + dependencies: + apollo-server-env "^3.0.0" + apollo-server-plugin-base "^0.10.4" + +apollo-datasource@^0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/apollo-datasource/-/apollo-datasource-0.7.3.tgz" + integrity sha512-PE0ucdZYjHjUyXrFWRwT02yLcx2DACsZ0jm1Mp/0m/I9nZu/fEkvJxfsryXB6JndpmQO77gQHixf/xGCN976kA== + dependencies: + apollo-server-caching "^0.5.3" + apollo-server-env "^3.0.0" + +apollo-env@^0.6.6: + version "0.6.6" + resolved "https://registry.yarnpkg.com/apollo-env/-/apollo-env-0.6.6.tgz" + integrity sha512-hXI9PjJtzmD34XviBU+4sPMOxnifYrHVmxpjykqI/dUD2G3yTiuRaiQqwRwB2RCdwC1Ug/jBfoQ/NHDTnnjndQ== + dependencies: + "@types/node-fetch" "2.5.7" + core-js "^3.0.1" + node-fetch "^2.2.0" + sha.js "^2.4.11" + +apollo-graphql@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/apollo-graphql/-/apollo-graphql-0.6.1.tgz" + integrity sha512-ZRXAV+k+hboCVS+FW86FW/QgnDR7gm/xMUwJPGXEbV53OLGuQQdIT0NCYK7AzzVkCfsbb7NJ3mmEclkZY9uuxQ== + dependencies: + apollo-env "^0.6.6" + lodash.sortby "^4.7.0" + +apollo-link@1.2.14, apollo-link@^1.2.14: + version "1.2.14" + resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.14.tgz" + integrity sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg== + dependencies: + apollo-utilities "^1.3.0" + ts-invariant "^0.4.0" + tslib "^1.9.3" + zen-observable-ts "^0.8.21" + +apollo-reporting-protobuf@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/apollo-reporting-protobuf/-/apollo-reporting-protobuf-0.6.2.tgz" + integrity sha512-WJTJxLM+MRHNUxt1RTl4zD0HrLdH44F2mDzMweBj1yHL0kSt8I1WwoiF/wiGVSpnG48LZrBegCaOJeuVbJTbtw== + dependencies: + "@apollo/protobufjs" "^1.0.3" + +apollo-server-caching@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/apollo-server-caching/-/apollo-server-caching-0.5.3.tgz" + integrity sha512-iMi3087iphDAI0U2iSBE9qtx9kQoMMEWr6w+LwXruBD95ek9DWyj7OeC2U/ngLjRsXM43DoBDXlu7R+uMjahrQ== + dependencies: + lru-cache "^6.0.0" + +apollo-server-core@^2.21.0: + version "2.21.0" + resolved "https://registry.yarnpkg.com/apollo-server-core/-/apollo-server-core-2.21.0.tgz" + integrity sha512-GtIiq2F0dVDLzzIuO5+dK/pGq/sGxYlKCqAuQQqzYg0fvZ7fukyluXtcTe0tMI+FJZjU0j0WnKgiLsboCoAlPQ== + dependencies: + "@apollographql/apollo-tools" "^0.4.3" + "@apollographql/graphql-playground-html" "1.6.26" + "@apollographql/graphql-upload-8-fork" "^8.1.3" + "@types/ws" "^7.0.0" + apollo-cache-control "^0.11.6" + apollo-datasource "^0.7.3" + apollo-graphql "^0.6.0" + apollo-reporting-protobuf "^0.6.2" + apollo-server-caching "^0.5.3" + apollo-server-env "^3.0.0" + apollo-server-errors "^2.4.2" + apollo-server-plugin-base "^0.10.4" + apollo-server-types "^0.6.3" + apollo-tracing "^0.12.2" + async-retry "^1.2.1" + fast-json-stable-stringify "^2.0.0" + graphql-extensions "^0.12.8" + graphql-tag "^2.11.0" + graphql-tools "^4.0.8" + loglevel "^1.6.7" + lru-cache "^6.0.0" + sha.js "^2.4.11" + subscriptions-transport-ws "^0.9.11" + uuid "^8.0.0" + ws "^6.0.0" + +apollo-server-env@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/apollo-server-env/-/apollo-server-env-3.0.0.tgz" + integrity sha512-tPSN+VttnPsoQAl/SBVUpGbLA97MXG990XIwq6YUnJyAixrrsjW1xYG7RlaOqetxm80y5mBZKLrRDiiSsW/vog== + dependencies: + node-fetch "^2.1.2" + util.promisify "^1.0.0" + +apollo-server-errors@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/apollo-server-errors/-/apollo-server-errors-2.4.2.tgz" + integrity sha512-FeGxW3Batn6sUtX3OVVUm7o56EgjxDlmgpTLNyWcLb0j6P8mw9oLNyAm3B+deHA4KNdNHO5BmHS2g1SJYjqPCQ== + +apollo-server-express@^2.21.0: + version "2.21.0" + resolved "https://registry.yarnpkg.com/apollo-server-express/-/apollo-server-express-2.21.0.tgz" + integrity sha512-zbOSNGuxUjlOFZnRrbMpga3pKDEroitF4NAqoVxgBivx7v2hGsE7rljct3PucTx2cMN90AyYe3cU4oA8jBxZIQ== + dependencies: + "@apollographql/graphql-playground-html" "1.6.26" + "@types/accepts" "^1.3.5" + "@types/body-parser" "1.19.0" + "@types/cors" "2.8.8" + "@types/express" "4.17.7" + "@types/express-serve-static-core" "4.17.18" + accepts "^1.3.5" + apollo-server-core "^2.21.0" + apollo-server-types "^0.6.3" + body-parser "^1.18.3" + cors "^2.8.4" + express "^4.17.1" + graphql-subscriptions "^1.0.0" + graphql-tools "^4.0.8" + parseurl "^1.3.2" + subscriptions-transport-ws "^0.9.16" + type-is "^1.6.16" + +apollo-server-plugin-base@^0.10.4: + version "0.10.4" + resolved "https://registry.yarnpkg.com/apollo-server-plugin-base/-/apollo-server-plugin-base-0.10.4.tgz" + integrity sha512-HRhbyHgHFTLP0ImubQObYhSgpmVH4Rk1BinnceZmwudIVLKrqayIVOELdyext/QnSmmzg5W7vF3NLGBcVGMqDg== + dependencies: + apollo-server-types "^0.6.3" + +apollo-server-types@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/apollo-server-types/-/apollo-server-types-0.6.3.tgz" + integrity sha512-aVR7SlSGGY41E1f11YYz5bvwA89uGmkVUtzMiklDhZ7IgRJhysT5Dflt5IuwDxp+NdQkIhVCErUXakopocFLAg== + dependencies: + apollo-reporting-protobuf "^0.6.2" + apollo-server-caching "^0.5.3" + apollo-server-env "^3.0.0" + +apollo-server@^2.18.2: + version "2.21.0" + resolved "https://registry.yarnpkg.com/apollo-server/-/apollo-server-2.21.0.tgz" + integrity sha512-OqngjOSB0MEH6VKGWHcrqt4y39HlhYh9CrMvn4PhadTt53IPYRmBglk5qSRA8xMorGqy60iKrOReqj5YfCjTOg== + dependencies: + apollo-server-core "^2.21.0" + apollo-server-express "^2.21.0" + express "^4.0.0" + graphql-subscriptions "^1.0.0" + graphql-tools "^4.0.8" + stoppable "^1.1.0" + +apollo-tracing@^0.12.2: + version "0.12.2" + resolved "https://registry.yarnpkg.com/apollo-tracing/-/apollo-tracing-0.12.2.tgz" + integrity sha512-SYN4o0C0wR1fyS3+P0FthyvsQVHFopdmN3IU64IaspR/RZScPxZ3Ae8uu++fTvkQflAkglnFM0aX6DkZERBp6w== + dependencies: + apollo-server-env "^3.0.0" + apollo-server-plugin-base "^0.10.4" + +apollo-upload-client@14.1.2: + version "14.1.2" + resolved "https://registry.yarnpkg.com/apollo-upload-client/-/apollo-upload-client-14.1.2.tgz" + integrity sha512-ozaW+4tnVz1rpfwiQwG3RCdCcZ93RV/37ZQbRnObcQ9mjb+zur58sGDPVg9Ef3fiujLmiE/Fe9kdgvIMA3VOjA== + dependencies: + "@apollo/client" "^3.1.5" + "@babel/runtime" "^7.11.2" + extract-files "^9.0.0" + +apollo-utilities@^1.0.1, apollo-utilities@^1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.4.tgz" + integrity sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig== + dependencies: + "@wry/equality" "^0.1.2" + fast-json-stable-stringify "^2.0.0" + ts-invariant "^0.4.0" + tslib "^1.10.0" + +app-module-path@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/app-module-path/-/app-module-path-2.2.0.tgz" + integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argsarray@0.0.1, argsarray@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/argsarray/-/argsarray-0.0.1.tgz" + integrity sha1-bnIHtOzbObCviDA/pa4ivajfYcs= + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz" + integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +array-includes@^3.1.1: + version "3.1.3" + resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz" + integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + get-intrinsic "^1.1.1" + is-string "^1.0.5" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz" + integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= + +array.prototype.flat@^1.2.3: + version "1.2.4" + resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz" + integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + +array.prototype.map@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array.prototype.map/-/array.prototype.map-1.0.3.tgz" + integrity sha512-nNcb30v0wfDyIe26Yif3PcV1JXQp4zEeEfupG7L4SRjnD6HLbO5b2a7eVSba53bOx4YCHYMBHt+Fp4vYstneRA== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + es-array-method-boxes-properly "^1.0.0" + is-string "^1.0.5" + +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz" + integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= + +asn1.js@^5.2.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz" + integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + safer-buffer "^2.1.0" + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async-limiter@^1.0.0, async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + +async-retry@^1.2.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.1.tgz" + integrity sha512-aiieFW/7h3hY0Bq5d+ktDBejxuwR78vRu9hDUdR8rNhSaQ29VzPL4AoIRG7D/c7tdenwOcKvgPM6tIxB3cB6HA== + dependencies: + retry "0.12.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-generator@6.26.1: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz" + integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz" + integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== + dependencies: + object.assign "^4.1.0" + +babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: + version "7.0.0-beta.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz" + integrity sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ== + +babel-preset-fbjs@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.3.0.tgz" + integrity sha512-7QTLTCd2gwB2qGoi5epSULMHugSVgpcVt5YAeiFO9ABLrutDQzKfGwzxgZHLpugq8qMdg/DhRZDZ5CLKxBkEbw== + dependencies: + "@babel/plugin-proposal-class-properties" "^7.0.0" + "@babel/plugin-proposal-object-rest-spread" "^7.0.0" + "@babel/plugin-syntax-class-properties" "^7.0.0" + "@babel/plugin-syntax-flow" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + "@babel/plugin-transform-arrow-functions" "^7.0.0" + "@babel/plugin-transform-block-scoped-functions" "^7.0.0" + "@babel/plugin-transform-block-scoping" "^7.0.0" + "@babel/plugin-transform-classes" "^7.0.0" + "@babel/plugin-transform-computed-properties" "^7.0.0" + "@babel/plugin-transform-destructuring" "^7.0.0" + "@babel/plugin-transform-flow-strip-types" "^7.0.0" + "@babel/plugin-transform-for-of" "^7.0.0" + "@babel/plugin-transform-function-name" "^7.0.0" + "@babel/plugin-transform-literals" "^7.0.0" + "@babel/plugin-transform-member-expression-literals" "^7.0.0" + "@babel/plugin-transform-modules-commonjs" "^7.0.0" + "@babel/plugin-transform-object-super" "^7.0.0" + "@babel/plugin-transform-parameters" "^7.0.0" + "@babel/plugin-transform-property-literals" "^7.0.0" + "@babel/plugin-transform-react-display-name" "^7.0.0" + "@babel/plugin-transform-react-jsx" "^7.0.0" + "@babel/plugin-transform-shorthand-properties" "^7.0.0" + "@babel/plugin-transform-spread" "^7.0.0" + "@babel/plugin-transform-template-literals" "^7.0.0" + babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" + +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-traverse@6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz" + integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz" + integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@6.18.0, babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== + +backo2@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz" + integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base-x@^3.0.2, base-x@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz" + integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + +bignumber.js@^9.0.0, bignumber.js@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz" + integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +blakejs@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz" + integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= + +bluebird@^3.5.0: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bn.js@4.11.6: + version "4.11.6" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz" + integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= + +bn.js@4.11.8: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.9, bn.js@^4.4.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.3: + version "5.2.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz" + integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== + +body-parser@1.19.0, body-parser@^1.16.0, body-parser@^1.18.3: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz" + integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +braces@^3.0.1, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.0.1, brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz" + integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== + dependencies: + bn.js "^5.0.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz" + integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.3" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +browserslist@^4.14.5: + version "4.16.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.3.tgz" + integrity sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw== + dependencies: + caniuse-lite "^1.0.30001181" + colorette "^1.2.1" + electron-to-chromium "^1.3.649" + escalade "^3.1.1" + node-releases "^1.1.70" + +bs58@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz" + integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= + dependencies: + base-x "^3.0.2" + +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-from@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz" + integrity sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ== + +buffer-from@1.1.1, buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +buffer-to-arraybuffer@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz" + integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo= + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + +buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0, buffer@^5.7.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +bufferutil@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.3.tgz" + integrity sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw== + dependencies: + node-gyp-build "^4.2.0" + +busboy@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/busboy/-/busboy-0.3.1.tgz" + integrity sha512-y7tTxhGKXcyBxRKAni+awqx8uqaJKrSFSNFSeRG5CsWNdmy2BIK+6VGWEW7TZnIO/533mtMEA4rOevQV815YJw== + dependencies: + dicer "0.3.0" + +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + +cacheable-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz" + integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^1.0.2" + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camel-case@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.1.tgz" + integrity sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q== + dependencies: + pascal-case "^3.1.1" + tslib "^1.10.0" + +camel-case@4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz" + integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== + dependencies: + pascal-case "^3.1.2" + tslib "^2.0.3" + +camel-case@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz" + integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M= + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz" + integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz" + integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= + +camelcase@^5.0.0, camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +caniuse-lite@^1.0.30001181: + version "1.0.30001194" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001194.tgz" + integrity sha512-iDUOH+oFeBYk5XawYsPtsx/8fFpndAPUQJC7gBTfxHM8xw5nOZv7ceAD4frS1MKCLUac7QL5wdAJiFQlDRjXlA== + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +cbor@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz" + integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== + dependencies: + bignumber.js "^9.0.1" + nofilter "^1.0.4" + +chalk@1.1.3, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +change-case@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz" + integrity sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA== + dependencies: + camel-case "^3.0.0" + constant-case "^2.0.0" + dot-case "^2.1.0" + header-case "^1.0.0" + is-lower-case "^1.1.0" + is-upper-case "^1.1.0" + lower-case "^1.1.1" + lower-case-first "^1.0.0" + no-case "^2.3.2" + param-case "^2.1.0" + pascal-case "^2.0.0" + path-case "^2.1.0" + sentence-case "^2.1.0" + snake-case "^2.1.0" + swap-case "^1.1.0" + title-case "^2.1.0" + upper-case "^1.1.1" + upper-case-first "^1.1.0" + +cheerio@0.20.0: + version "0.20.0" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.20.0.tgz" + integrity sha1-XHEPK6uVZTJyhCugHG6mGzVF7DU= + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "~3.8.1" + lodash "^4.1.0" + optionalDependencies: + jsdom "^7.0.2" + +cheerio@1.0.0-rc.2: + version "1.0.0-rc.2" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz" + integrity sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs= + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash "^4.15.0" + parse5 "^3.0.1" + +chokidar@3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.2.tgz" + integrity sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.4.0" + optionalDependencies: + fsevents "~2.1.2" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +cids@^0.7.1: + version "0.7.5" + resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz" + integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== + dependencies: + buffer "^5.5.0" + class-is "^1.1.0" + multibase "~0.6.0" + multicodec "^1.0.0" + multihashes "~0.4.15" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-is@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz" + integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + +cli-spinners@^2.0.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.5.0.tgz" + integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ== + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + +clone-buffer@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz" + integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg= + +clone-response@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz" + integrity sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE= + +clone@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz" + integrity sha1-0hfR6WERjjrJpLi7oyhVU79kfNs= + +clone@^1.0.0, clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-logger@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/color-logger/-/color-logger-0.0.3.tgz" + integrity sha1-2bIt0dlz4Waxi/MT+fSBu6TfIBg= + +color-logger@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/color-logger/-/color-logger-0.0.6.tgz" + integrity sha1-5WJF7ymCJlcRDHy3WpzXhstp7Rs= + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz" + integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== + +colors@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@^2.20.3: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +component-emitter@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz" + integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-stream@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.1.tgz" + integrity sha1-87gKz54fSOOHXAaItBtsMWAu6hw= + dependencies: + inherits "~2.0.1" + readable-stream "~2.0.0" + typedarray "~0.0.5" + +configstore@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/configstore/-/configstore-4.0.0.tgz" + integrity sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ== + dependencies: + dot-prop "^4.1.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + unique-string "^1.0.0" + write-file-atomic "^2.0.0" + xdg-basedir "^3.0.0" + +confusing-browser-globals@^1.0.10: + version "1.0.10" + resolved "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz" + integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +constant-case@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz" + integrity sha1-QXV2TTidP6nI7NKRhu1gBSQ7akY= + dependencies: + snake-case "^2.1.0" + upper-case "^1.1.1" + +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz" + integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= + +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + +content-hash@^2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz" + integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== + dependencies: + cids "^0.7.1" + multicodec "^0.5.5" + multihashes "^0.4.15" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +convert-source-map@1.X, convert-source-map@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + dependencies: + safe-buffer "~5.1.1" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + +cookiejar@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz" + integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== + +core-js@^2.4.0: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + +core-js@^3.0.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.9.1.tgz" + integrity sha512-gSjRvzkxQc1zjM/5paAmL4idJBFzuJoo+jDjF1tStYFMV2ERfD02HhahhCGXUyHxQRG4yFKVSdO6g62eoRMcDg== + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cors@^2.8.1, cors@^2.8.4: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +create-ecdh@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz" + integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== + dependencies: + bn.js "^4.1.0" + elliptic "^6.5.3" + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-fetch@3.0.6, cross-fetch@^3.0.4: + version "3.0.6" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.6.tgz" + integrity sha512-KBPUbqgFjzWlVcURG+Svp9TlhA5uliYtiNx/0r8nv0pdypeQCRJ9IaSIc3q/x3q8t3F75cHuwxVql1HFGHCNJQ== + dependencies: + node-fetch "2.6.1" + +cross-spawn@^6.0.0: + version "6.0.5" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +crypto-browserify@3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +crypto-random-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz" + integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= + +css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz" + integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-what@2.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz" + integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== + +css@2.X: + version "2.2.4" + resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz" + integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw== + dependencies: + inherits "^2.0.3" + source-map "^0.6.1" + source-map-resolve "^0.5.2" + urix "^0.1.0" + +cssfilter@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/cssfilter/-/cssfilter-0.0.10.tgz" + integrity sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4= + +cssom@0.3.x, "cssom@>= 0.3.0 < 0.4.0": + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +"cssstyle@>= 0.2.29 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz" + integrity sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ= + dependencies: + cssom "0.3.x" + +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +dataloader@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-2.0.0.tgz" + integrity sha512-YzhyDAwA4TaQIhM5go+vCLmU0UikghC/t9DTQYZR2M/UvZ1MdOhPezSDZcjj9uqQJOMqjLcpWtyW2iNINdlatQ== + +debug-fabulous@0.0.X: + version "0.0.4" + resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-0.0.4.tgz" + integrity sha1-+gccXYdIRoVCSAdCHKSxawsaB2M= + dependencies: + debug "2.X" + lazy-debug-legacy "0.0.X" + object-assign "4.1.0" + +debug@2.6.9, debug@2.X, debug@^2.2.0, debug@^2.6.8, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +debug@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +debug@^3.1.0, debug@^3.2.6: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + +decamelize@^1.1.1, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +decompress-response@^3.2.0, decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + dependencies: + mimic-response "^1.0.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@^0.1.3, deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + +defer-to-connect@^1.0.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz" + integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== + +deferred-leveldown@~5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.0.1.tgz" + integrity sha512-BXohsvTedWOLkj2n/TY+yqVlrCWa2Zs8LSxh3uCAgFOru7/pjxKyZAexGa1j83BaKloER4PqUyQ9rGPJLt9bqA== + dependencies: + abstract-leveldown "~6.0.0" + inherits "^2.0.3" + +deferred-leveldown@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz" + integrity sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw== + dependencies: + abstract-leveldown "~6.2.1" + inherits "^2.0.3" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +deprecated-decorator@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz" + integrity sha1-AJZjF7ehL+kvPMgx91g68ym4bDc= + +des.js@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz" + integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= + dependencies: + repeating "^2.0.0" + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + +detect-newline@2.X: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz" + integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= + +dicer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/dicer/-/dicer-0.3.0.tgz" + integrity sha512-MdceRRWqltEG2dZqO769g27N/3PXfcKl04VhYnBlo2YhH7zPi88VebsjTKclaOyiuMaGU72hTfw3VkUitGcVCA== + dependencies: + streamsearch "0.1.2" + +diff@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz" + integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +dom-serializer@0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz" + integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +dom-serializer@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz" + integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== + dependencies: + domelementtype "^1.3.0" + entities "^1.1.1" + +dom-walk@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== + +domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + +domelementtype@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.1.0.tgz" + integrity sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w== + +domhandler@2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz" + integrity sha1-LeWaCCLVAn+r/28DLCsloqir5zg= + dependencies: + domelementtype "1" + +domhandler@^2.3.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== + dependencies: + domelementtype "1" + +domutils@1.5, domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= + dependencies: + dom-serializer "0" + domelementtype "1" + +domutils@^1.5.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== + dependencies: + dom-serializer "0" + domelementtype "1" + +dot-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz" + integrity sha1-NNzzf1Co6TwrO8qLt/uRVcfaO+4= + dependencies: + no-case "^2.2.0" + +dot-prop@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz" + integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ== + dependencies: + is-obj "^1.0.0" + +double-ended-queue@2.1.0-0: + version "2.1.0-0" + resolved "https://registry.yarnpkg.com/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz" + integrity sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw= + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + +duplexify@^3.2.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +electron-to-chromium@^1.3.649: + version "1.3.677" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.677.tgz" + integrity sha512-Tcmk+oKQgpjcM+KYanlkd76ZtpzalkpUULnlJDP6vjHtR7UU564IM9Qv5DxqHZNBQjzXm6mkn7Y8bw2OoE3FmQ== + +elliptic@6.5.3: + version "6.5.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz" + integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emittery@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.4.1.tgz" + integrity sha512-r4eRSeStEGf6M5SKdrQhhLK5bOwOBxQhIE3YSTnZE3GpKiLfnnhE+tPtrJE79+eDJgm39BM6LSoI8SCx4HbwlQ== + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +encoding-down@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-6.3.0.tgz" + integrity sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw== + dependencies: + abstract-leveldown "^6.2.1" + inherits "^2.0.3" + level-codec "^9.0.0" + level-errors "^2.0.0" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +end-stream@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/end-stream/-/end-stream-0.1.0.tgz" + integrity sha1-MgA/P0OKKwFDFoE3+PpumGbIHtU= + dependencies: + write-stream "~0.4.3" + +enquirer@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +entities@1.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz" + integrity sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY= + +entities@^1.1.1, entities@~1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + +errno@~0.1.1: + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + +error-ex@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.17.0-next.1: + version "1.17.7" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz" + integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.2.2" + is-regex "^1.1.1" + object-inspect "^1.8.0" + object-keys "^1.1.1" + object.assign "^4.1.1" + string.prototype.trimend "^1.0.1" + string.prototype.trimstart "^1.0.1" + +es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: + version "1.18.0-next.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.3.tgz" + integrity sha512-VMzHx/Bczjg59E6jZOQjHeN3DEoptdhejpARgflAViidlqSpjdq9zA6lKwlhRRs/lOw1gHJv2xkkSFRgvEwbQg== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.2" + is-callable "^1.2.3" + is-negative-zero "^2.0.1" + is-regex "^1.1.2" + is-string "^1.0.5" + object-inspect "^1.9.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.0" + +es-array-method-boxes-properly@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz" + integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== + +es-get-iterator@^1.0.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.2.tgz" + integrity sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.0" + has-symbols "^1.0.1" + is-arguments "^1.1.0" + is-map "^2.0.2" + is-set "^2.0.2" + is-string "^1.0.5" + isarray "^2.0.5" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.53" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.3" + next-tick "~1.0.0" + +es6-denodeify@^0.1.1: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-denodeify/-/es6-denodeify-0.1.5.tgz" + integrity sha1-MdTV/pxVA+ElRgQ5MQ4WoqPznB8= + +es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@1.0.3, escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escodegen@^1.6.1: + version "1.14.3" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz" + integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== + dependencies: + esprima "^4.0.1" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +esdoc@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/esdoc/-/esdoc-1.1.0.tgz" + integrity sha512-vsUcp52XJkOWg9m1vDYplGZN2iDzvmjDL5M/Mp8qkoDG3p2s0yIQCIjKR5wfPBaM3eV14a6zhQNYiNTCVzPnxA== + dependencies: + babel-generator "6.26.1" + babel-traverse "6.26.0" + babylon "6.18.0" + cheerio "1.0.0-rc.2" + color-logger "0.0.6" + escape-html "1.0.3" + fs-extra "5.0.0" + ice-cap "0.0.4" + marked "0.3.19" + minimist "1.2.0" + taffydb "2.7.3" + +eslint-config-airbnb-base@^14.2.1: + version "14.2.1" + resolved "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz" + integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== + dependencies: + confusing-browser-globals "^1.0.10" + object.assign "^4.1.2" + object.entries "^1.1.2" + +eslint-import-resolver-node@^0.3.4: + version "0.3.4" + resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz" + integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== + dependencies: + debug "^2.6.9" + resolve "^1.13.1" + +eslint-module-utils@^2.6.0: + version "2.6.0" + resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz" + integrity sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA== + dependencies: + debug "^2.6.9" + pkg-dir "^2.0.0" + +eslint-plugin-import@^2.22.1: + version "2.22.1" + resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz" + integrity sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw== + dependencies: + array-includes "^3.1.1" + array.prototype.flat "^1.2.3" + contains-path "^0.1.0" + debug "^2.6.9" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.4" + eslint-module-utils "^2.6.0" + has "^1.0.3" + minimatch "^3.0.4" + object.values "^1.1.1" + read-pkg-up "^2.0.0" + resolve "^1.17.0" + tsconfig-paths "^3.9.0" + +eslint-plugin-prettier@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz" + integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-plugin-truffle@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-truffle/-/eslint-plugin-truffle-0.3.1.tgz#78207a015c0ffa660794907748792b5f9301d3d9" + integrity sha512-mjDM1gD96UknBUSEufgdx5m1x3jkWL3Xn/npSZhOVoTbKk/nkBL7dCcH7xsO6GyAjmjvzdev5o5IA4lKWf9b4g== + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz" + integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== + +eslint@^7.21.0: + version "7.21.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.21.0.tgz" + integrity sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash "^4.17.20" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.4" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" + +esprima@^4.0.0, esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1, estraverse@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +eth-ens-namehash@2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz" + integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= + dependencies: + idna-uts46-hx "^2.3.1" + js-sha3 "^0.5.7" + +eth-lib@0.2.7: + version "0.2.7" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.7.tgz" + integrity sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco= + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +eth-lib@^0.1.26: + version "0.1.29" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz" + integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + nano-json-stream-parser "^0.1.2" + servify "^0.1.12" + ws "^3.0.0" + xhr-request-promise "^0.1.2" + +eth-lib@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz" + integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +ethereum-bloom-filters@^1.0.6: + version "1.0.9" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.9.tgz" + integrity sha512-GiK/RQkAkcVaEdxKVkPcG07PQ5vD7v2MFSHgZmBJSfMzNRHimntdBithsHAT89tAXnIpzVDWt8iaCD1DvkaxGg== + dependencies: + js-sha3 "^0.8.0" + +ethereum-cryptography@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz" + integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + dependencies: + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^4.0.1" + blakejs "^1.1.0" + browserify-aes "^1.2.0" + bs58check "^2.1.2" + create-hash "^1.2.0" + create-hmac "^1.1.7" + hash.js "^1.1.7" + keccak "^3.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + safe-buffer "^5.1.2" + scrypt-js "^3.0.0" + secp256k1 "^4.0.1" + setimmediate "^1.0.5" + +ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz" + integrity sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA== + +ethereumjs-tx@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz" + integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== + dependencies: + ethereumjs-common "^1.5.0" + ethereumjs-util "^6.0.0" + +ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + +ethers@^4.0.32: + version "4.0.48" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.48.tgz" + integrity sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g== + dependencies: + aes-js "3.0.0" + bn.js "^4.4.0" + elliptic "6.5.3" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.4" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" + +ethjs-unit@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz" + integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= + dependencies: + bn.js "4.11.6" + number-to-bn "1.7.0" + +ethjs-util@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +eventemitter3@3.1.2, eventemitter3@^3.1.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== + +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +eventsource@1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz" + integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ== + dependencies: + original "^1.0.0" + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz" + integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz" + integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= + dependencies: + fill-range "^2.1.0" + +express@^4.0.0, express@^4.14.0, express@^4.17.1: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +ext@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz" + integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + dependencies: + type "^2.0.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend@^3.0.0, extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz" + integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= + dependencies: + is-extglob "^1.0.0" + +extract-files@9.0.0, extract-files@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz" + integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +faker@^5.3.1: + version "5.4.0" + resolved "https://registry.yarnpkg.com/faker/-/faker-5.4.0.tgz" + integrity sha512-Y9n/Ky/xZx/Bj8DePvXspUYRtHl/rGQytoIT5LaxmNwSe3wWyOeOXb3lT6Dpipq240PVpeFaGKzScz/5fvff2g== + +fast-check@^2.12.1: + version "2.13.0" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.13.0.tgz" + integrity sha512-IOfzKm/SCA+jpUEgAfqAuxHYPmgtmpnnwljQmYPRGrqYczcTKApXKHza/SNxFxYkecWfZilYa0DJdBvqz1bcSw== + dependencies: + pure-rand "^4.1.1" + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + +fast-future@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/fast-future/-/fast-future-1.0.2.tgz" + integrity sha1-hDWpqqAteSSNF9cE52JZMB2ZKAo= + +fast-glob@^3.1.1: + version "3.2.5" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz" + integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + picomatch "^2.2.1" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +fastq@^1.6.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz" + integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g== + dependencies: + reusify "^1.0.4" + +fb-watchman@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz" + integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== + dependencies: + bser "2.1.1" + +fbjs-css-vars@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz" + integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ== + +fbjs@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.0.tgz" + integrity sha512-dJd4PiDOFuhe7vk4F80Mba83Vr2QuK86FoxtgPmzBqEJahncp+13YCmfoa53KHCo6OnlXLG7eeMWPfB5CrpVKg== + dependencies: + cross-fetch "^3.0.4" + fbjs-css-vars "^1.0.0" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.18" + +fetch-cookie@0.10.1: + version "0.10.1" + resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-0.10.1.tgz" + integrity sha512-beB+VEd4cNeVG1PY+ee74+PkuCQnik78pgLi5Ah/7qdUfov8IctU0vLUbBT8/10Ma5GMBeI4wtxhGrEfKNYs2g== + dependencies: + tough-cookie "^2.3.3 || ^3.0.1 || ^4.0.0" + +fetch-cookie@0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-0.7.0.tgz" + integrity sha512-Mm5pGlT3agW6t71xVM7vMZPIvI7T4FaTuFW4jari6dVzYHFDb3WZZsGpN22r/o3XMdkM0E7sPd1EGeyVbH2Tgg== + dependencies: + es6-denodeify "^0.1.1" + tough-cookie "^2.3.1" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz" + integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz" + integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +first-chunk-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz" + integrity sha1-Wb+1DNkF9g18OUzT2ayqtOatk04= + +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flat@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz" + integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== + dependencies: + is-buffer "~2.0.3" + +flatted@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz" + integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz" + integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= + dependencies: + for-in "^1.0.1" + +foreach@^2.0.4: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz" + integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz" + integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +fs-capacitor@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/fs-capacitor/-/fs-capacitor-2.0.4.tgz" + integrity sha512-8S4f4WsCryNw2mJJchi46YgB6CR5Ze+4L1h8ewl9tEpL4SJ3ZO+c/bS4BWhB8bK+O3TMqhuZarTitd0S0eh2pA== + +fs-capacitor@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/fs-capacitor/-/fs-capacitor-6.2.0.tgz" + integrity sha512-nKcE1UduoSKX27NSZlg879LdQc94OtbOsEmKMN2MBNudXREvijRKx2GEBsTMTfws+BrbkJoEuynbGSVRSpauvw== + +fs-extra@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz" + integrity sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@~2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +ganache-cli@^6.12.2: + version "6.12.2" + resolved "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.12.2.tgz#c0920f7db0d4ac062ffe2375cb004089806f627a" + integrity sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw== + dependencies: + ethereumjs-util "6.2.1" + source-map-support "0.5.12" + yargs "13.2.4" + +ganache@^6.4.4: + version "6.4.4" + resolved "https://registry.npmjs.org/ganache/-/ganache-6.4.4.tgz#efb3eb5157b8987e5213584f24090322827c3521" + integrity sha512-uBCxKuyj1SSjz/iONMk1ZiHr1wf0bPG5E+qSO2lxyDq+dtZ5d/VvW6iKtg9bWikhG8hd1jU7kRkoS5f4q7FrWQ== + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + +get-params@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/get-params/-/get-params-0.1.2.tgz" + integrity sha1-uuDfq6WIoMYNeDTA2Nwv9g7u8v4= + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-stream@^4.0.0, get-stream@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz" + integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz" + integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= + dependencies: + is-glob "^2.0.0" + +glob-parent@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" + +glob-stream@^5.3.2: + version "5.3.5" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-5.3.5.tgz" + integrity sha1-pVZlqajM3EGRWofHAeMtTgFvrSI= + dependencies: + extend "^3.0.0" + glob "^5.0.3" + glob-parent "^3.0.0" + micromatch "^2.3.7" + ordered-read-streams "^0.3.0" + through2 "^0.6.0" + to-absolute-glob "^0.1.1" + unique-stream "^2.0.2" + +glob@7.1.6, glob@^7.1.1, glob@^7.1.3: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^5.0.3: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz" + integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global@~4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== + dependencies: + min-document "^2.19.0" + process "^0.11.10" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globals@^12.1.0: + version "12.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz" + integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== + dependencies: + type-fest "^0.8.1" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== + +globby@11.0.2: + version "11.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz" + integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" + +got@9.6.0: + version "9.6.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" + url-parse-lax "^3.0.0" + +got@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz" + integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== + dependencies: + decompress-response "^3.2.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + is-plain-obj "^1.1.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + p-cancelable "^0.3.0" + p-timeout "^1.1.1" + safe-buffer "^5.0.1" + timed-out "^4.0.0" + url-parse-lax "^1.0.0" + url-to-options "^1.0.1" + +graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.6" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz" + integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== + +graphql-extensions@^0.12.8: + version "0.12.8" + resolved "https://registry.yarnpkg.com/graphql-extensions/-/graphql-extensions-0.12.8.tgz" + integrity sha512-xjsSaB6yKt9jarFNNdivl2VOx52WySYhxPgf8Y16g6GKZyAzBoIFiwyGw5PJDlOSUa6cpmzn6o7z8fVMbSAbkg== + dependencies: + "@apollographql/apollo-tools" "^0.4.3" + apollo-server-env "^3.0.0" + apollo-server-types "^0.6.3" + +graphql-subscriptions@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/graphql-subscriptions/-/graphql-subscriptions-1.2.0.tgz" + integrity sha512-uXvp729fztqwa7HFUFaAqKwNMwwOfsvu4HwOu7/35Cd44bNrMPCn97mNGN0ybuuZE36CPXBTaW/4U/xyOS4D9w== + dependencies: + iterall "^1.3.0" + +graphql-tag@^2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.11.0.tgz" + integrity sha512-VmsD5pJqWJnQZMUeRwrDhfgoyqcfwEkvtpANqcoUG8/tOLkwNgU9mzub/Mc78OJMhHjx7gfAMTxzdG43VGg3bA== + +graphql-tag@^2.12.0: + version "2.12.1" + resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.1.tgz" + integrity sha512-LPewEE1vzGkHnCO8zdOGogKsHHBdtpGyihow1UuMwp6RnZa0lAS7NcbvltLOuo4pi5diQCPASAXZkQq44ffixA== + dependencies: + tslib "^1.14.1" + +graphql-tools@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-4.0.8.tgz" + integrity sha512-MW+ioleBrwhRjalKjYaLQbr+920pHBgy9vM/n47sswtns8+96sRn5M/G+J1eu7IMeKWiN/9p6tmwCHU7552VJg== + dependencies: + apollo-link "^1.2.14" + apollo-utilities "^1.0.1" + deprecated-decorator "^0.1.6" + iterall "^1.1.3" + uuid "^3.1.0" + +graphql-tools@^6.2.4: + version "6.2.6" + resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-6.2.6.tgz" + integrity sha512-OyhSvK5ALVVD6bFiWjAqv2+lRyvjIRfb6Br5Tkjrv++rxnXDodPH/zhMbDGRw+W3SD5ioGEEz84yO48iPiN7jA== + dependencies: + "@graphql-tools/batch-delegate" "^6.2.6" + "@graphql-tools/code-file-loader" "^6.2.4" + "@graphql-tools/delegate" "^6.2.4" + "@graphql-tools/git-loader" "^6.2.4" + "@graphql-tools/github-loader" "^6.2.4" + "@graphql-tools/graphql-file-loader" "^6.2.4" + "@graphql-tools/graphql-tag-pluck" "^6.2.4" + "@graphql-tools/import" "^6.2.4" + "@graphql-tools/json-file-loader" "^6.2.4" + "@graphql-tools/links" "^6.2.4" + "@graphql-tools/load" "^6.2.4" + "@graphql-tools/load-files" "^6.2.4" + "@graphql-tools/merge" "^6.2.4" + "@graphql-tools/mock" "^6.2.4" + "@graphql-tools/module-loader" "^6.2.4" + "@graphql-tools/relay-operation-optimizer" "^6.2.4" + "@graphql-tools/resolvers-composition" "^6.2.4" + "@graphql-tools/schema" "^6.2.4" + "@graphql-tools/stitch" "^6.2.4" + "@graphql-tools/url-loader" "^6.2.4" + "@graphql-tools/utils" "^6.2.4" + "@graphql-tools/wrap" "^6.2.4" + tslib "~2.0.1" + +graphql-upload@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/graphql-upload/-/graphql-upload-11.0.0.tgz" + integrity sha512-zsrDtu5gCbQFDWsNa5bMB4nf1LpKX9KDgh+f8oL1288ijV4RxeckhVozAjqjXAfRpxOHD1xOESsh6zq8SjdgjA== + dependencies: + busboy "^0.3.1" + fs-capacitor "^6.1.0" + http-errors "^1.7.3" + isobject "^4.0.0" + object-path "^0.11.4" + +graphql-ws@4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-4.1.5.tgz" + integrity sha512-yUQ1AjegD1Y9jDS699kyw7Mw+9H+rILm2HoS8N5a5B5YTH93xy3yifFhAJpKGc2wb/8yGdlVy8gTcud0TPqi6Q== + +graphql@^15.3.0: + version "15.5.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.5.0.tgz" + integrity sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA== + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +gulp-sourcemaps@^1.5.2: + version "1.12.1" + resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.12.1.tgz" + integrity sha1-tDfR89mAzyboEYSCNxjOFa5ll7Y= + dependencies: + "@gulp-sourcemaps/map-sources" "1.X" + acorn "4.X" + convert-source-map "1.X" + css "2.X" + debug-fabulous "0.0.X" + detect-newline "2.X" + graceful-fs "4.X" + source-map "~0.6.0" + strip-bom "2.X" + through2 "2.X" + vinyl "1.X" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + +has-bigints@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbol-support-x@^1.4.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz" + integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== + +has-symbols@^1.0.0, has-symbols@^1.0.1, has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + +has-to-string-tag-x@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz" + integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== + dependencies: + has-symbol-support-x "^1.4.1" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz" + integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +header-case@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz" + integrity sha1-lTWXMZfBRLCWE81l0xfvGZY70C0= + dependencies: + no-case "^2.2.0" + upper-case "^1.1.3" + +hmac-drbg@^1.0.0, hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoist-non-react-statics@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + +hosted-git-info@^2.1.4: + version "2.8.8" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz" + integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== + +htmlparser2@^3.9.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz" + integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== + dependencies: + domelementtype "^1.3.1" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^3.1.1" + +htmlparser2@~3.8.1: + version "3.8.3" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz" + integrity sha1-mWwosZFRaovoZQGn15dX5ccMEGg= + dependencies: + domelementtype "1" + domhandler "2.3" + domutils "1.5" + entities "1.0" + readable-stream "1.1" + +http-cache-semantics@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz" + integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@^1.7.3: + version "1.8.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.0.tgz" + integrity sha512-4I8r0C5JDhT5VkvI47QktDW75rNlGVsUf/8hzjCC/wkWI/jdTRmBb9aI7erSG82r1bjKY3F6k28WnsVxB1C73A== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-https@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz" + integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +ice-cap@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/ice-cap/-/ice-cap-0.0.4.tgz" + integrity sha1-im0xq0ysjUtW3k+pRt8zUlYbbhg= + dependencies: + cheerio "0.20.0" + color-logger "0.0.3" + +iconv-lite@0.4.24, iconv-lite@^0.4.4: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +idna-uts46-hx@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz" + integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== + dependencies: + punycode "2.1.0" + +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore-walk@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz" + integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== + dependencies: + minimatch "^3.0.4" + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +ignore@^5.1.4: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== + +immediate@3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz" + integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= + +immediate@3.3.0, immediate@^3.2.2, immediate@^3.2.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz" + integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== + +immediate@~3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz" + integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= + +immutable@~3.7.6: + version "3.7.6" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.7.6.tgz" + integrity sha1-E7TTyxK++hVIKib+Gy665kAHHks= + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +import-from@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz" + integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ== + dependencies: + resolve-from "^5.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ini@~1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-arguments@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz" + integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + dependencies: + call-bind "^1.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-bigint@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.1.tgz" + integrity sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.0.tgz" + integrity sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA== + dependencies: + call-bind "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-buffer@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.2, is-callable@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz" + integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== + +is-core-module@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + dependencies: + has "^1.0.3" + +is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz" + integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" + integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz" + integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-finite@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz" + integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-function@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== + +is-glob@4.0.1, is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz" + integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= + dependencies: + is-extglob "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz" + integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= + +is-lower-case@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz" + integrity sha1-fhR75HaNxGbbO/shzGCzHmrWk5M= + dependencies: + lower-case "^1.1.0" + +is-map@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz" + integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== + +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + +is-number-object@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz" + integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz" + integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= + +is-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz" + integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== + +is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz" + integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz" + integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= + +is-promise@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-4.0.0.tgz" + integrity sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ== + +is-regex@^1.1.1, is-regex@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz" + integrity sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg== + dependencies: + call-bind "^1.0.2" + has-symbols "^1.0.1" + +is-retry-allowed@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + +is-set@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz" + integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== + +is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz" + integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + +is-typedarray@^1.0.0, is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-upper-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz" + integrity sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8= + dependencies: + upper-case "^1.1.0" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + +is-valid-glob@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-0.3.0.tgz" + integrity sha1-1LVcafUYhvm2XHDWwmItN+KfSP4= + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz" + integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== + +isomorphic-ws@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz" + integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +isurl@^1.0.0-alpha5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz" + integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== + dependencies: + has-to-string-tag-x "^1.2.0" + is-object "^1.0.1" + +iterall@^1.1.3, iterall@^1.2.1, iterall@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz" + integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== + +iterate-iterator@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/iterate-iterator/-/iterate-iterator-1.0.1.tgz" + integrity sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw== + +iterate-value@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/iterate-value/-/iterate-value-1.0.2.tgz" + integrity sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ== + dependencies: + es-get-iterator "^1.0.2" + iterate-iterator "^1.0.1" + +js-sha3@0.5.7, js-sha3@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz" + integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= + +js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + +js-yaml@3.14.0: + version "3.14.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsan@^3.1.13: + version "3.1.13" + resolved "https://registry.yarnpkg.com/jsan/-/jsan-3.1.13.tgz" + integrity sha512-9kGpCsGHifmw6oJet+y8HaCl14y7qgAsxVdV3pCHDySNR3BfDC30zgkssd7x5LRVAT22dnpbe9JdzzmXZnq9/g== + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsdom@^7.0.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-7.2.2.tgz" + integrity sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4= + dependencies: + abab "^1.0.0" + acorn "^2.4.0" + acorn-globals "^1.0.4" + cssom ">= 0.3.0 < 0.4.0" + cssstyle ">= 0.2.29 < 0.3.0" + escodegen "^1.6.1" + nwmatcher ">= 1.3.7 < 2.0.0" + parse5 "^1.5.1" + request "^2.55.0" + sax "^1.1.4" + symbol-tree ">= 3.1.0 < 4.0.0" + tough-cookie "^2.2.0" + webidl-conversions "^2.0.0" + whatwg-url-compat "~0.6.5" + xml-name-validator ">= 2.0.1 < 3.0.0" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + +json-pointer@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/json-pointer/-/json-pointer-0.6.1.tgz" + integrity sha512-3OvjqKdCBvH41DLpV4iSt6v2XhZXV1bPB4OROuknvUXI7ZQNofieCPkmE26stEJ9zdQuvIxDHCuYhfgxFAAs+Q== + dependencies: + foreach "^2.0.4" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +json5@^2.1.2: + version "2.2.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz" + integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== + dependencies: + minimist "^1.2.5" + +jsondown@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/jsondown/-/jsondown-1.0.0.tgz" + integrity sha512-p6XxPaq59aXwcdDQV3ISMA5xk+1z6fJuctcwwSdR9iQgbYOcIrnknNrhcMGG+0FaUfKHGkdDpQNaZrovfBoyOw== + dependencies: + memdown "1.4.1" + mkdirp "0.5.1" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +keccak@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz" + integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +keyv@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + dependencies: + json-buffer "3.0.0" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^6.0.0: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +lazy-debug-legacy@0.0.X: + version "0.0.3" + resolved "https://registry.npmjs.org/lazy-debug/-/lazy-debug-0.0.3.tgz" + +lazystream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz" + integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= + dependencies: + readable-stream "^2.0.5" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + dependencies: + invert-kv "^1.0.0" + +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + +level-codec@9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.1.tgz" + integrity sha512-ajFP0kJ+nyq4i6kptSM+mAvJKLOg1X5FiFPtLG9M5gCEZyBmgDi3FkDrvlMkEzrUn1cWxtvVmrvoS4ASyO/q+Q== + +level-codec@9.0.2, level-codec@^9.0.0: + version "9.0.2" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.2.tgz" + integrity sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ== + dependencies: + buffer "^5.6.0" + +level-concat-iterator@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz" + integrity sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw== + +level-errors@^2.0.0, level-errors@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz" + integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== + dependencies: + errno "~0.1.1" + +level-iterator-stream@~4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz" + integrity sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q== + dependencies: + inherits "^2.0.4" + readable-stream "^3.4.0" + xtend "^4.0.2" + +level-js@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/level-js/-/level-js-4.0.2.tgz" + integrity sha512-PeGjZsyMG4O89KHiez1zoMJxStnkM+oBIqgACjoo5PJqFiSUUm3GNod/KcbqN5ktyZa8jkG7I1T0P2u6HN9lIg== + dependencies: + abstract-leveldown "~6.0.1" + immediate "~3.2.3" + inherits "^2.0.3" + ltgt "^2.1.2" + typedarray-to-buffer "~3.1.5" + +level-packager@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-5.1.1.tgz" + integrity sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ== + dependencies: + encoding-down "^6.3.0" + levelup "^4.3.2" + +level-supports@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-1.0.1.tgz" + integrity sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg== + dependencies: + xtend "^4.0.2" + +level-write-stream@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/level-write-stream/-/level-write-stream-1.0.0.tgz" + integrity sha1-P3+7Z5pVE3wP6zA97nZuEu4Twdw= + dependencies: + end-stream "~0.1.0" + +level@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/level/-/level-5.0.1.tgz" + integrity sha512-wcak5OQeA4rURGacqS62R/xNHjCYnJSQDBOlm4KNUGJVE9bWv2B04TclqReYejN+oD65PzD4FsqeWoI5wNC5Lg== + dependencies: + level-js "^4.0.0" + level-packager "^5.0.0" + leveldown "^5.0.0" + opencollective-postinstall "^2.0.0" + +leveldown@5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.0.2.tgz" + integrity sha512-Ib6ygFYBleS8x2gh3C1AkVsdrUShqXpe6jSTnZ6sRycEXKhqVf+xOSkhgSnjidpPzyv0d95LJVFrYQ4NuXAqHA== + dependencies: + abstract-leveldown "~6.0.0" + fast-future "~1.0.2" + napi-macros "~1.8.1" + node-gyp-build "~3.8.0" + +leveldown@^5.0.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.6.0.tgz" + integrity sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ== + dependencies: + abstract-leveldown "~6.2.1" + napi-macros "~2.0.0" + node-gyp-build "~4.1.0" + +levelup@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.0.2.tgz" + integrity sha512-cx9PmLENwbGA3svWBEbeO2HazpOSOYSXH4VA+ahVpYyurvD+SDSfURl29VBY2qgyk+Vfy2dJd71SBRckj/EZVA== + dependencies: + deferred-leveldown "~5.0.0" + level-errors "~2.0.0" + level-iterator-stream "~4.0.0" + xtend "~4.0.0" + +levelup@4.4.0, levelup@^4.3.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.4.0.tgz" + integrity sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ== + dependencies: + deferred-leveldown "~5.3.0" + level-errors "~2.0.0" + level-iterator-stream "~4.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +linked-list@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/linked-list/-/linked-list-0.1.0.tgz" + integrity sha1-eYsP+X0bkqT9CEgPVa6k6dSdN78= + +load-json-file@^1.0.0, load-json-file@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash-es@^4.2.1: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz" + integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== + +lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= + +lodash.assign@^4.0.3, lodash.assign@^4.0.6: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz" + integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= + +lodash.assignin@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz" + integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= + +lodash.assigninwith@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assigninwith/-/lodash.assigninwith-4.2.0.tgz" + integrity sha1-rwLJhDKshtk9ppW0voAUAZcXNq8= + +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= + +lodash.escaperegexp@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz" + integrity sha1-ZHYsSGGAglGKw99Mz11YhtriA0c= + +lodash.flatten@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz" + integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= + +lodash.isequal@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + +lodash.keys@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.2.0.tgz" + integrity sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU= + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.partition@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.partition/-/lodash.partition-4.6.0.tgz" + integrity sha1-o45GtzRp4EILDaEhLmbUFL42S6Q= + +lodash.rest@^4.0.0: + version "4.0.5" + resolved "https://registry.yarnpkg.com/lodash.rest/-/lodash.rest-4.0.5.tgz" + integrity sha1-lU73UEkmIDjJbR/Jiyj9r58Hcqo= + +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + +lodash.sum@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/lodash.sum/-/lodash.sum-4.0.2.tgz" + integrity sha1-rZDjl5ZdgD1PH/eqWy0Bl/O0Y3s= + +lodash.template@4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.2.4.tgz" + integrity sha1-0FPBno50442WW/T7SV2A8Qnn96Q= + dependencies: + lodash._reinterpolate "~3.0.0" + lodash.assigninwith "^4.0.0" + lodash.keys "^4.0.0" + lodash.rest "^4.0.0" + lodash.templatesettings "^4.0.0" + lodash.tostring "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + +lodash.tostring@^4.0.0: + version "4.1.4" + resolved "https://registry.yarnpkg.com/lodash.tostring/-/lodash.tostring-4.1.4.tgz" + integrity sha1-Vgwn0fjq3eA8LM4Zj+9cAx2CmPs= + +lodash.zipwith@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.zipwith/-/lodash.zipwith-4.2.0.tgz" + integrity sha1-r6zwP9LzhK8p4mPDxr2juA4/Uf0= + +lodash@4.17.21, lodash@^4.1.0, lodash@^4.15.0, lodash@^4.17.11, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.4, lodash@^4.2.1: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz" + integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== + dependencies: + chalk "^4.0.0" + +log-symbols@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== + dependencies: + chalk "^2.0.1" + +loglevel@^1.6.7: + version "1.7.1" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.1.tgz" + integrity sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw== + +long@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz" + integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== + +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lower-case-first@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz" + integrity sha1-5dp8JvKacHO+AtUrrJmA5ZIq36E= + dependencies: + lower-case "^1.1.2" + +lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz" + integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= + +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + +lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +ltgt@2.2.1, ltgt@^2.1.2, ltgt@~2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz" + integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + +make-dir@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== + dependencies: + pify "^3.0.0" + +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + +map-stream@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.0.6.tgz" + integrity sha1-0u9OuBGihkTHqJiZhcacL91JaCc= + +marked@0.3.19: + version "0.3.19" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz" + integrity sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg== + +math-random@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz" + integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + +memdown@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz" + integrity sha1-tOThkhdGZP+65BNhqlAPMRnv4hU= + dependencies: + abstract-leveldown "~2.7.1" + functional-red-black-tree "^1.0.1" + immediate "^3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.1.1" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +merge-stream@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz" + integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= + dependencies: + readable-stream "^2.0.1" + +merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@^2.3.7: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz" + integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.46.0: + version "1.46.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz" + integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ== + +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.29" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.29.tgz" + integrity sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ== + dependencies: + mime-db "1.46.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +mimic-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +mimic-response@^1.0.0, mimic-response@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz" + integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= + dependencies: + dom-walk "^0.1.0" + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +mkdirp-promise@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz" + integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= + dependencies: + mkdirp "*" + +mkdirp@*: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mkdirp@0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mocha@8.1.2: + version "8.1.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.1.2.tgz" + integrity sha512-I8FRAcuACNMLQn3lS4qeWLxXqLvGf6r2CaLstDpZmMUUSmvW6Cnm1AuHxgbc7ctZVRcfwspCRbDHymPsi3dkJw== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.4.2" + debug "4.1.1" + diff "4.0.2" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.1.6" + growl "1.10.5" + he "1.2.0" + js-yaml "3.14.0" + log-symbols "4.0.0" + minimatch "3.0.4" + ms "2.1.2" + object.assign "4.1.0" + promise.allsettled "1.0.2" + serialize-javascript "4.0.0" + strip-json-comments "3.0.1" + supports-color "7.1.0" + which "2.0.2" + wide-align "1.1.3" + workerpool "6.0.0" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.1" + +mock-fs@^4.1.0: + version "4.13.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.13.0.tgz" + integrity sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA== + +module@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/module/-/module-1.2.5.tgz" + integrity sha1-tQPrBs3BNHP1aBhCaXTN5+xZvxU= + dependencies: + chalk "1.1.3" + concat-stream "1.5.1" + lodash.template "4.2.4" + map-stream "0.0.6" + tildify "1.2.0" + vinyl-fs "2.4.3" + yargs "4.6.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multibase@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz" + integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multibase@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz" + integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multicodec@^0.5.5: + version "0.5.7" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz" + integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== + dependencies: + varint "^5.0.0" + +multicodec@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz" + integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== + dependencies: + buffer "^5.6.0" + varint "^5.0.0" + +multihashes@^0.4.15, multihashes@~0.4.15: + version "0.4.21" + resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz" + integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== + dependencies: + buffer "^5.5.0" + multibase "^0.7.0" + varint "^5.0.0" + +nan@^2.12.1: + version "2.14.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz" + integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== + +nano-json-stream-parser@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz" + integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= + +nanoid@^2.0.0: + version "2.1.11" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz" + integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== + +napi-macros@~1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-1.8.2.tgz" + integrity sha512-Tr0DNY4RzTaBG2W2m3l7ZtFuJChTH6VZhXVhkGGjF/4cZTt+i8GcM9ozD+30Lmr4mDoZ5Xx34t2o4GJqYWDGcg== + +napi-macros@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz" + integrity sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +needle@^2.2.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.6.0.tgz" + integrity sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg== + dependencies: + debug "^3.2.6" + iconv-lite "^0.4.4" + sax "^1.2.4" + +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +next-tick@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +no-case@^2.2.0, no-case@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz" + integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== + dependencies: + lower-case "^1.1.1" + +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" + +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-fetch@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.4.1.tgz" + integrity sha512-P9UbpFK87NyqBZzUuDBDz4f6Yiys8xm8j7ACDbi6usvFm6KItklQUKjeoqTrYS/S1k6I8oaOC2YLLDr/gg26Mw== + +node-fetch@2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz" + integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== + +node-fetch@2.6.1, node-fetch@^2.1.2, node-fetch@^2.2.0, node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + +node-gyp-build@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz" + integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== + +node-gyp-build@~3.8.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-3.8.0.tgz" + integrity sha512-bYbpIHyRqZ7sVWXxGpz8QIRug5JZc/hzZH4GbdT9HTZi6WmKCZ8GLvP8OZ9TTiIBvwPFKgtGrlWQSXDAvYdsPw== + +node-gyp-build@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.1.1.tgz" + integrity sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ== + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz" + integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= + +node-interval-tree@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/node-interval-tree/-/node-interval-tree-1.3.3.tgz" + integrity sha512-K9vk96HdTK5fEipJwxSvIIqwTqr4e3HRJeJrNxBSeVMNSC/JWARRaX7etOLOuTmrRMeOI/K5TCJu3aWIwZiNTw== + dependencies: + shallowequal "^1.0.2" + +node-pre-gyp@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz" + integrity sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +node-releases@^1.1.70: + version "1.1.71" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz" + integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg== + +nofilter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz" + integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== + +noop-fn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/noop-fn/-/noop-fn-1.0.0.tgz" + integrity sha1-XzPUfxPSFQ35PgywNmmemC94/78= + +nopt@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz" + integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1, normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +normalize-url@^4.1.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz" + integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== + +npm-bundled@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz" + integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== + dependencies: + npm-normalize-package-bin "^1.0.1" + +npm-normalize-package-bin@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz" + integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== + +npm-packlist@^1.1.6: + version "1.4.8" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz" + integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-normalize-package-bin "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +nth-check@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz" + integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== + dependencies: + boolbase "~1.0.0" + +nullthrows@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz" + integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +number-to-bn@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz" + integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA= + dependencies: + bn.js "4.11.6" + strip-hex-prefix "1.0.0" + +"nwmatcher@>= 1.3.7 < 2.0.0": + version "1.4.4" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz" + integrity sha512-3iuY4N5dhgMpCUrOVnuAdGrgxVqV2cJpM+XNccjR2DKOB1RUP0aA+wGXEiNziG/UKboFyGBIoKOaNlJxx8bciQ== + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz" + integrity sha1-ejs9DpgGPUP0wD8uiubNUahog6A= + +object-assign@^4, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-inspect@^1.8.0, object-inspect@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz" + integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-path@^0.11.4: + version "0.11.5" + resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.5.tgz" + integrity sha512-jgSbThcoR/s+XumvGMTMf81QVBmah+/Q7K7YduKeKVWL7N111unR2d6pZZarSk6kY/caeNxUDyxOvMWyzoU2eg== + +object.assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.assign@^4.1.0, object.assign@^4.1.1, object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + +object.entries@^1.1.2: + version "1.1.3" + resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.3.tgz" + integrity sha512-ym7h7OZebNS96hn5IJeyUmaWhaSM4SVtAPPfNLQEI2MYWCO2egsITb9nab2+i/Pwibx+R0mtn+ltKJXRSeTMGg== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + has "^1.0.3" + +object.getownpropertydescriptors@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz" + integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz" + integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.values@^1.1.1: + version "1.1.3" + resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.3.tgz" + integrity sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + has "^1.0.3" + +oboe@2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz" + integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= + dependencies: + http-https "^1.0.0" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + +opencollective-postinstall@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz" + integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== + +optimism@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.14.0.tgz" + integrity sha512-ygbNt8n4DOCVpkwiLF+IrKKeNHOjtr9aXLWGP9HNJGoblSGsnVbJLstcH6/nE9Xy5ZQtlkSioFQNnthmENW6FQ== + dependencies: + "@wry/context" "^0.5.2" + "@wry/trie" "^0.2.1" + +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + +ora@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-3.4.0.tgz" + integrity sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg== + dependencies: + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-spinners "^2.0.0" + log-symbols "^2.2.0" + strip-ansi "^5.2.0" + wcwidth "^1.0.1" + +ordered-read-streams@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz" + integrity sha1-cTfmmzKYuzQiR6G77jiByA4v14s= + dependencies: + is-stream "^1.0.1" + readable-stream "^2.0.1" + +original-require@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/original-require/-/original-require-1.0.1.tgz" + integrity sha1-DxMEcVhM0zURxew4yNWSE/msXiA= + +original@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz" + integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== + dependencies: + url-parse "^1.4.3" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz" + integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= + dependencies: + lcid "^1.0.0" + +os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-cancelable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz" + integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== + +p-cancelable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + +p-limit@3.1.0, p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-timeout@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz" + integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= + dependencies: + p-finally "^1.0.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +param-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz" + integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc= + dependencies: + no-case "^2.2.0" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-asn1@^5.0.0, parse-asn1@^5.1.5: + version "5.1.6" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz" + integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== + dependencies: + asn1.js "^5.2.0" + browserify-aes "^1.0.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz" + integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-headers@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz" + integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz" + integrity sha1-m387DeMr543CQBsXVzzK8Pb1nZQ= + +parse5@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz" + integrity sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA== + dependencies: + "@types/node" "*" + +parseurl@^1.3.2, parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +pascal-case@^2.0.0, pascal-case@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.1.tgz" + integrity sha1-LVeNNFX2YNpl7KGO+VtODekSdh4= + dependencies: + camel-case "^3.0.0" + upper-case-first "^1.1.0" + +pascal-case@^3.1.1, pascal-case@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz" + integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + +path-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.1.tgz" + integrity sha1-lLgDfDctP+KQbkZbtF4l0ibo7qU= + dependencies: + no-case "^2.2.0" + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + dependencies: + pify "^2.0.0" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pbkdf2@^3.0.17, pbkdf2@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz" + integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +pkg-conf@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-1.1.3.tgz" + integrity sha1-N45W1v0T6Iv7b0ol33qD+qvduls= + dependencies: + find-up "^1.0.0" + load-json-file "^1.1.0" + object-assign "^4.0.1" + symbol "^0.2.1" + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + +pluralize@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz" + integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== + +pouchdb-abstract-mapreduce@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-7.2.2.tgz" + integrity sha512-7HWN/2yV2JkwMnGnlp84lGvFtnm0Q55NiBUdbBcaT810+clCGKvhssBCrXnmwShD1SXTwT83aszsgiSfW+SnBA== + dependencies: + pouchdb-binary-utils "7.2.2" + pouchdb-collate "7.2.2" + pouchdb-collections "7.2.2" + pouchdb-errors "7.2.2" + pouchdb-fetch "7.2.2" + pouchdb-mapreduce-utils "7.2.2" + pouchdb-md5 "7.2.2" + pouchdb-utils "7.2.2" + +pouchdb-adapter-leveldb-core@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-adapter-leveldb-core/-/pouchdb-adapter-leveldb-core-7.2.2.tgz" + integrity sha512-K9UGf1Ivwe87mjrMqN+1D07tO/DfU7ariVDrGffuOjvl+3BcvUF25IWrxsBObd4iPOYCH7NVQWRpojhBgxULtQ== + dependencies: + argsarray "0.0.1" + buffer-from "1.1.1" + double-ended-queue "2.1.0-0" + levelup "4.4.0" + pouchdb-adapter-utils "7.2.2" + pouchdb-binary-utils "7.2.2" + pouchdb-collections "7.2.2" + pouchdb-errors "7.2.2" + pouchdb-json "7.2.2" + pouchdb-md5 "7.2.2" + pouchdb-merge "7.2.2" + pouchdb-utils "7.2.2" + sublevel-pouchdb "7.2.2" + through2 "3.0.2" + +pouchdb-adapter-memory@^7.1.1: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-adapter-memory/-/pouchdb-adapter-memory-7.2.2.tgz" + integrity sha512-9o+zdItPEq7rIrxdkUxgsLNaZkDJAGEqqoYgeYdrHidOCZnlhxhX3g7/R/HcpDKC513iEPqJWDJQSfeT6nVKkw== + dependencies: + memdown "1.4.1" + pouchdb-adapter-leveldb-core "7.2.2" + pouchdb-utils "7.2.2" + +pouchdb-adapter-node-websql@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pouchdb-adapter-node-websql/-/pouchdb-adapter-node-websql-7.0.0.tgz" + integrity sha512-fNaOMO8bvMrRTSfmH4RSLSpgnKahRcCA7Z0jg732PwRbGvvMdGbreZwvKPPD1fg2tm2ZwwiXWK2G3+oXyoqZYw== + dependencies: + pouchdb-adapter-websql-core "7.0.0" + pouchdb-utils "7.0.0" + websql "1.0.0" + +pouchdb-adapter-utils@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pouchdb-adapter-utils/-/pouchdb-adapter-utils-7.0.0.tgz" + integrity sha512-UWKPC6jkz6mHUzZefrU7P5X8ZGvBC8LSNZ7BIp0hWvJE6c20cnpDwedTVDpZORcCbVJpDmFOHBYnOqEIblPtbA== + dependencies: + pouchdb-binary-utils "7.0.0" + pouchdb-collections "7.0.0" + pouchdb-errors "7.0.0" + pouchdb-md5 "7.0.0" + pouchdb-merge "7.0.0" + pouchdb-utils "7.0.0" + +pouchdb-adapter-utils@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-adapter-utils/-/pouchdb-adapter-utils-7.2.2.tgz" + integrity sha512-2CzZkTyTyHZkr3ePiWFMTiD5+56lnembMjaTl8ohwegM0+hYhRyJux0biAZafVxgIL4gnCUC4w2xf6WVztzKdg== + dependencies: + pouchdb-binary-utils "7.2.2" + pouchdb-collections "7.2.2" + pouchdb-errors "7.2.2" + pouchdb-md5 "7.2.2" + pouchdb-merge "7.2.2" + pouchdb-utils "7.2.2" + +pouchdb-adapter-websql-core@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pouchdb-adapter-websql-core/-/pouchdb-adapter-websql-core-7.0.0.tgz" + integrity sha512-NyMaH0bl20SdJdOCzd+fwXo8JZ15a48/MAwMcIbXzsRHE4DjFNlRcWAcjUP6uN4Ezc+Gx+r2tkBBMf71mIz1Aw== + dependencies: + pouchdb-adapter-utils "7.0.0" + pouchdb-binary-utils "7.0.0" + pouchdb-collections "7.0.0" + pouchdb-errors "7.0.0" + pouchdb-json "7.0.0" + pouchdb-merge "7.0.0" + pouchdb-utils "7.0.0" + +pouchdb-binary-utils@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pouchdb-binary-utils/-/pouchdb-binary-utils-7.0.0.tgz" + integrity sha512-yUktdOPIPvOVouCjJN3uop+bCcpdPwePrLm9eUAZNgEYnUFu0njdx7Q0WRsZ7UJ6l75HinL5ZHk4bnvEt86FLw== + dependencies: + buffer-from "1.1.0" + +pouchdb-binary-utils@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-binary-utils/-/pouchdb-binary-utils-7.2.2.tgz" + integrity sha512-shacxlmyHbUrNfE6FGYpfyAJx7Q0m91lDdEAaPoKZM3SzAmbtB1i+OaDNtYFztXjJl16yeudkDb3xOeokVL3Qw== + dependencies: + buffer-from "1.1.1" + +pouchdb-collate@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-collate/-/pouchdb-collate-7.2.2.tgz" + integrity sha512-/SMY9GGasslknivWlCVwXMRMnQ8myKHs4WryQ5535nq1Wj/ehpqWloMwxEQGvZE1Sda3LOm7/5HwLTcB8Our+w== + +pouchdb-collections@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pouchdb-collections/-/pouchdb-collections-7.0.0.tgz" + integrity sha512-DaoUr/vU24Q3gM6ghj0va9j/oBanPwkbhkvnqSyC3Dm5dgf5pculNxueLF9PKMo3ycApoWzHMh6N2N8KJbDU2Q== + +pouchdb-collections@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-collections/-/pouchdb-collections-7.2.2.tgz" + integrity sha512-6O9zyAYlp3UdtfneiMYuOCWdUCQNo2bgdjvNsMSacQX+3g8WvIoFQCYJjZZCpTttQGb+MHeRMr8m2U95lhJTew== + +pouchdb-debug@^7.1.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/pouchdb-debug/-/pouchdb-debug-7.2.1.tgz" + integrity sha512-eP3ht/AKavLF2RjTzBM6S9gaI2/apcW6xvaKRQhEdOfiANqerFuksFqHCal3aikVQuDO+cB/cw+a4RyJn/glBw== + dependencies: + debug "3.1.0" + +pouchdb-errors@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pouchdb-errors/-/pouchdb-errors-7.0.0.tgz" + integrity sha512-dTusY8nnTw4HIztCrNl7AoGgwvS1bVf/3/97hDaGc4ytn72V9/4dK8kTqlimi3UpaurohYRnqac0SGXYP8vgXA== + dependencies: + inherits "2.0.3" + +pouchdb-errors@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-errors/-/pouchdb-errors-7.2.2.tgz" + integrity sha512-6GQsiWc+7uPfgEHeavG+7wuzH3JZW29Dnrvz8eVbDFE50kVFxNDVm3EkYHskvo5isG7/IkOx7PV7RPTA3keG3g== + dependencies: + inherits "2.0.4" + +pouchdb-fetch@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-fetch/-/pouchdb-fetch-7.2.2.tgz" + integrity sha512-lUHmaG6U3zjdMkh8Vob9GvEiRGwJfXKE02aZfjiVQgew+9SLkuOxNw3y2q4d1B6mBd273y1k2Lm0IAziRNxQnA== + dependencies: + abort-controller "3.0.0" + fetch-cookie "0.10.1" + node-fetch "2.6.0" + +pouchdb-find@^7.0.0: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-find/-/pouchdb-find-7.2.2.tgz" + integrity sha512-BmFeFVQ0kHmDehvJxNZl9OmIztCjPlZlVSdpijuFbk/Fi1EFPU1BAv3kLC+6DhZuOqU/BCoaUBY9sn66pPY2ag== + dependencies: + pouchdb-abstract-mapreduce "7.2.2" + pouchdb-collate "7.2.2" + pouchdb-errors "7.2.2" + pouchdb-fetch "7.2.2" + pouchdb-md5 "7.2.2" + pouchdb-selector-core "7.2.2" + pouchdb-utils "7.2.2" + +pouchdb-json@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pouchdb-json/-/pouchdb-json-7.0.0.tgz" + integrity sha512-w0bNRu/7VmmCrFWMYAm62n30wvJJUT2SokyzeTyj3hRohj4GFwTRg1mSZ+iAmxgRKOFE8nzZstLG/WAB4Ymjew== + dependencies: + vuvuzela "1.0.3" + +pouchdb-json@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-json/-/pouchdb-json-7.2.2.tgz" + integrity sha512-3b2S2ynN+aoB7aCNyDZc/4c0IAdx/ir3nsHB+/RrKE9cM3QkQYbnnE3r/RvOD1Xvr6ji/KOCBie+Pz/6sxoaug== + dependencies: + vuvuzela "1.0.3" + +pouchdb-mapreduce-utils@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-7.2.2.tgz" + integrity sha512-rAllb73hIkU8rU2LJNbzlcj91KuulpwQu804/F6xF3fhZKC/4JQMClahk+N/+VATkpmLxp1zWmvmgdlwVU4HtQ== + dependencies: + argsarray "0.0.1" + inherits "2.0.4" + pouchdb-collections "7.2.2" + pouchdb-utils "7.2.2" + +pouchdb-md5@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pouchdb-md5/-/pouchdb-md5-7.0.0.tgz" + integrity sha512-yaSJKhLA3QlgloKUQeb2hLdT3KmUmPfoYdryfwHZuPTpXIRKTnMQTR9qCIRUszc0ruBpDe53DRslCgNUhAyTNQ== + dependencies: + pouchdb-binary-utils "7.0.0" + spark-md5 "3.0.0" + +pouchdb-md5@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-md5/-/pouchdb-md5-7.2.2.tgz" + integrity sha512-c/RvLp2oSh8PLAWU5vFBnp6ejJABIdKqboZwRRUrWcfGDf+oyX8RgmJFlYlzMMOh4XQLUT1IoaDV8cwlsuryZw== + dependencies: + pouchdb-binary-utils "7.2.2" + spark-md5 "3.0.1" + +pouchdb-merge@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pouchdb-merge/-/pouchdb-merge-7.0.0.tgz" + integrity sha512-tci5u6NpznQhGcPv4ho1h0miky9rs+ds/T9zQ9meQeDZbUojXNaX1Jxsb0uYEQQ+HMqdcQs3Akdl0/u0mgwPGg== + +pouchdb-merge@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-merge/-/pouchdb-merge-7.2.2.tgz" + integrity sha512-6yzKJfjIchBaS7Tusuk8280WJdESzFfQ0sb4jeMUNnrqs4Cx3b0DIEOYTRRD9EJDM+je7D3AZZ4AT0tFw8gb4A== + +pouchdb-selector-core@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-selector-core/-/pouchdb-selector-core-7.2.2.tgz" + integrity sha512-XYKCNv9oiNmSXV5+CgR9pkEkTFqxQGWplnVhO3W9P154H08lU0ZoNH02+uf+NjZ2kjse7Q1fxV4r401LEcGMMg== + dependencies: + pouchdb-collate "7.2.2" + pouchdb-utils "7.2.2" + +pouchdb-utils@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pouchdb-utils/-/pouchdb-utils-7.0.0.tgz" + integrity sha512-1bnoX1KdZYHv9wicDIFdO0PLiVIMzNDUBUZ/yOJZ+6LW6niQCB8aCv09ZztmKfSQcU5nnN3fe656tScBgP6dOQ== + dependencies: + argsarray "0.0.1" + clone-buffer "1.0.0" + immediate "3.0.6" + inherits "2.0.3" + pouchdb-collections "7.0.0" + pouchdb-errors "7.0.0" + pouchdb-md5 "7.0.0" + uuid "3.2.1" + +pouchdb-utils@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/pouchdb-utils/-/pouchdb-utils-7.2.2.tgz" + integrity sha512-XmeM5ioB4KCfyB2MGZXu1Bb2xkElNwF1qG+zVFbQsKQij0zvepdOUfGuWvLRHxTOmt4muIuSOmWZObZa3NOgzQ== + dependencies: + argsarray "0.0.1" + clone-buffer "1.0.0" + immediate "3.3.0" + inherits "2.0.4" + pouchdb-collections "7.2.2" + pouchdb-errors "7.2.2" + pouchdb-md5 "7.2.2" + uuid "8.1.0" + +pouchdb@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/pouchdb/-/pouchdb-7.1.1.tgz" + integrity sha512-8bXWclixNJZqokvxGHRsG19zehSJiaZaz4dVYlhXhhUctz7gMcNTElHjPBzBdZlKKvt9aFDndmXN1VVE53Co8g== + dependencies: + argsarray "0.0.1" + buffer-from "1.1.0" + clone-buffer "1.0.0" + double-ended-queue "2.1.0-0" + fetch-cookie "0.7.0" + immediate "3.0.6" + inherits "2.0.3" + level "5.0.1" + level-codec "9.0.1" + level-write-stream "1.0.0" + leveldown "5.0.2" + levelup "4.0.2" + ltgt "2.2.1" + node-fetch "2.4.1" + readable-stream "1.0.33" + spark-md5 "3.0.0" + through2 "3.0.1" + uuid "3.2.1" + vuvuzela "1.0.3" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + +prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz" + integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= + +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prettier@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz" + integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +promise.allsettled@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/promise.allsettled/-/promise.allsettled-1.0.2.tgz" + integrity sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg== + dependencies: + array.prototype.map "^1.0.1" + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + iterate-value "^1.0.0" + +promise@^7.1.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz" + integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== + dependencies: + asap "~2.0.3" + +prop-types@^15.7.2: + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" + +proxy-addr@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz" + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.1" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + +psl@^1.1.28, psl@^1.1.33: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz" + integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +pure-rand@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-4.1.2.tgz" + integrity sha512-uLzZpQWfroIqyFWmX/pl0OL2JHJdoU3dbh0dvZ25fChHFJJi56J5oQZhW6QgbT2Llwh1upki84LnTwlZvsungA== + +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +query-string@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + +querystring@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz" + integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== + +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + +queue-microtask@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.2.tgz" + integrity sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg== + +randomatic@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz" + integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-is@^16.7.0, react-is@^16.8.1: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +readable-stream@1.0.33: + version "1.0.33" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.33.tgz" + integrity sha1-OjYN1mwbHX/UcFOJhg7aHQ9hEmw= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@1.1: + version "1.1.13" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz" + integrity sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@1.1.14: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +"readable-stream@2 || 3", readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +"readable-stream@>=1.0.33-1 <1.1.0-0": + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz" + integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@~0.0.2: + version "0.0.4" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-0.0.4.tgz" + integrity sha1-8y124/uGM0SlSNeZIwBxc2ZbO40= + +readable-stream@~2.0.0: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz" + integrity sha1-j5A0HmilPMySh4jaz80Rs265t44= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readdirp@~3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz" + integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== + dependencies: + picomatch "^2.2.1" + +redux-cli-logger@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/redux-cli-logger/-/redux-cli-logger-2.1.0.tgz" + integrity sha512-75mVsggAJRSykWy2qxdGI7osocDWvc3RCMeN93hlvS/FxgdRww12NaXslez+W6gBOrSJKO7W16V0IzuISSfCxg== + dependencies: + colors "^1.1.2" + +redux-devtools-core@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/redux-devtools-core/-/redux-devtools-core-0.2.1.tgz" + integrity sha512-RAGOxtUFdr/1USAvxrWd+Gq/Euzgw7quCZlO5TgFpDfG7rB5tMhZUrNyBjpzgzL2yMk0eHnPYIGm7NkIfRzHxQ== + dependencies: + get-params "^0.1.2" + jsan "^3.1.13" + lodash "^4.17.11" + nanoid "^2.0.0" + remotedev-serialize "^0.1.8" + +redux-devtools-instrument@^1.9.4: + version "1.10.0" + resolved "https://registry.yarnpkg.com/redux-devtools-instrument/-/redux-devtools-instrument-1.10.0.tgz" + integrity sha512-X8JRBCzX2ADSMp+iiV7YQ8uoTNyEm0VPFPd4T854coz6lvRiBrFSqAr9YAS2n8Kzxx8CJQotR0QF9wsMM+3DvA== + dependencies: + lodash "^4.17.19" + symbol-observable "^1.2.0" + +redux-saga@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redux-saga/-/redux-saga-1.0.0.tgz" + integrity sha512-GvJWs/SzMvEQgeaw6sRMXnS2FghlvEGsHiEtTLpJqc/FHF3I5EE/B+Hq5lyHZ8LSoT2r/X/46uWvkdCnK9WgHA== + dependencies: + "@redux-saga/core" "^1.0.0" + +redux@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz" + integrity sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A== + dependencies: + lodash "^4.2.1" + lodash-es "^4.2.1" + loose-envify "^1.1.0" + symbol-observable "^1.0.3" + +redux@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.5.tgz" + integrity sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w== + dependencies: + loose-envify "^1.4.0" + symbol-observable "^1.2.0" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + +regenerator-runtime@^0.13.4: + version "0.13.7" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz" + integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz" + integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== + dependencies: + is-equal-shallow "^0.1.3" + +regexpp@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz" + integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== + +relay-compiler@10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/relay-compiler/-/relay-compiler-10.1.0.tgz" + integrity sha512-HPqc3N3tNgEgUH5+lTr5lnLbgnsZMt+MRiyS0uAVNhuPY2It0X1ZJG+9qdA3L9IqKFUNwVn6zTO7RArjMZbARQ== + dependencies: + "@babel/core" "^7.0.0" + "@babel/generator" "^7.5.0" + "@babel/parser" "^7.0.0" + "@babel/runtime" "^7.0.0" + "@babel/traverse" "^7.0.0" + "@babel/types" "^7.0.0" + babel-preset-fbjs "^3.3.0" + chalk "^4.0.0" + fb-watchman "^2.0.0" + fbjs "^3.0.0" + glob "^7.1.1" + immutable "~3.7.6" + nullthrows "^1.1.1" + relay-runtime "10.1.0" + signedsource "^1.0.0" + yargs "^15.3.1" + +relay-runtime@10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/relay-runtime/-/relay-runtime-10.1.0.tgz" + integrity sha512-bxznLnQ1ST6APN/cFi7l0FpjbZVchWQjjhj9mAuJBuUqNNCh9uV+UTRhpQF7Q8ycsPp19LHTpVyGhYb0ustuRQ== + dependencies: + "@babel/runtime" "^7.0.0" + fbjs "^3.0.0" + +remote-redux-devtools@^0.5.12: + version "0.5.16" + resolved "https://registry.yarnpkg.com/remote-redux-devtools/-/remote-redux-devtools-0.5.16.tgz" + integrity sha512-xZ2D1VRIWzat5nsvcraT6fKEX9Cfi+HbQBCwzNnUAM8Uicm/anOc60XGalcaDPrVmLug7nhDl2nimEa3bL3K9w== + dependencies: + jsan "^3.1.13" + querystring "^0.2.0" + redux-devtools-core "^0.2.1" + redux-devtools-instrument "^1.9.4" + rn-host-detect "^1.1.5" + socketcluster-client "^14.2.1" + +remotedev-serialize@^0.1.8: + version "0.1.9" + resolved "https://registry.yarnpkg.com/remotedev-serialize/-/remotedev-serialize-0.1.9.tgz" + integrity sha512-5tFdZg9mSaAWTv6xmQ7HtHjKMLSFQFExEZOtJe10PLsv1wb7cy7kYHtBvTYRro27/3fRGEcQBRNKSaixOpb69w== + dependencies: + jsan "^3.1.13" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" + +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz" + integrity sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ= + +request@^2.55.0, request@^2.79.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz" + integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= + +reselect-tree@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/reselect-tree/-/reselect-tree-1.3.4.tgz" + integrity sha512-1OgNq1IStyJFqIqOoD3k3Ge4SsYCMP9W88VQOfvgyLniVKLfvbYO1Vrl92SyEK5021MkoBX6tWb381VxTDyPBQ== + dependencies: + debug "^3.1.0" + esdoc "^1.0.4" + json-pointer "^0.6.0" + reselect "^4.0.0" + source-map-support "^0.5.3" + +reselect@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.0.0.tgz" + integrity sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA== + +resolve-from@5.0.0, resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + +responselike@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +retry@0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz" + integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^2.6.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.2.3: + version "2.2.6" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.6.tgz" + integrity sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg== + dependencies: + bn.js "^4.11.1" + +rn-host-detect@^1.1.5: + version "1.2.0" + resolved "https://registry.yarnpkg.com/rn-host-detect/-/rn-host-detect-1.2.0.tgz" + integrity sha512-btNg5kzHcjZZ7t7mvvV/4wNJ9e3MPgrWivkRgWURzXL0JJ0pwWlU4zrbmdlz3HHzHOxhBhHB4D+/dbMFfu4/4A== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@^1.1.4, sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +sc-channel@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/sc-channel/-/sc-channel-1.2.0.tgz" + integrity sha512-M3gdq8PlKg0zWJSisWqAsMmTVxYRTpVRqw4CWAdKBgAfVKumFcTjoCV0hYu7lgUXccCtCD8Wk9VkkE+IXCxmZA== + dependencies: + component-emitter "1.2.1" + +sc-errors@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/sc-errors/-/sc-errors-2.0.1.tgz" + integrity sha512-JoVhq3Ud+3Ujv2SIG7W0XtjRHsrNgl6iXuHHsh0s+Kdt5NwI6N2EGAZD4iteitdDv68ENBkpjtSvN597/wxPSQ== + +sc-formatter@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/sc-formatter/-/sc-formatter-3.0.2.tgz" + integrity sha512-9PbqYBpCq+OoEeRQ3QfFIGE6qwjjBcd2j7UjgDlhnZbtSnuGgHdcRklPKYGuYFH82V/dwd+AIpu8XvA1zqTd+A== + +scrypt-js@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz" + integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== + +scrypt-js@^3.0.0, scrypt-js@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +secp256k1@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz" + integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg== + dependencies: + elliptic "^6.5.2" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.2.1, semver@^7.3.4: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + +send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +sentence-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz" + integrity sha1-H24t2jnBaL+S0T+G1KkYkz9mftQ= + dependencies: + no-case "^2.2.0" + upper-case-first "^1.1.2" + +serialize-javascript@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz" + integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== + dependencies: + randombytes "^2.1.0" + +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +servify@^0.1.12: + version "0.1.12" + resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz" + integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== + dependencies: + body-parser "^1.16.0" + cors "^2.8.1" + express "^4.14.0" + request "^2.79.0" + xhr "^2.3.3" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +setimmediate@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz" + integrity sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48= + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shallowequal@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz" + integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +signedsource@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/signedsource/-/signedsource-1.0.0.tgz" + integrity sha1-HdrOSYF5j5O9gzlzgD2A1S6TrWo= + +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^2.7.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz" + integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== + dependencies: + decompress-response "^3.3.0" + once "^1.3.1" + simple-concat "^1.0.0" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +snake-case@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz" + integrity sha1-Qb2xtz8w7GagTU4srRt2OH1NbZ8= + dependencies: + no-case "^2.2.0" + +socketcluster-client@^14.2.1: + version "14.3.1" + resolved "https://registry.yarnpkg.com/socketcluster-client/-/socketcluster-client-14.3.1.tgz" + integrity sha512-Sd/T0K/9UlqTfz+HUuFq90dshA5OBJPQbdkRzGtcKIOm52fkdsBTt0FYpiuzzxv5VrU7PWpRm6KIfNXyPwlLpw== + dependencies: + buffer "^5.2.1" + clone "2.1.1" + component-emitter "1.2.1" + linked-list "0.1.0" + querystring "0.2.0" + sc-channel "^1.2.0" + sc-errors "^2.0.1" + sc-formatter "^3.0.1" + uuid "3.2.1" + ws "7.1.0" + +source-map-resolve@^0.5.2: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@0.5.12: + version "0.5.12" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" + integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@^0.5.19, source-map-support@^0.5.3: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== + +source-map@^0.5.0, source-map@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spark-md5@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spark-md5/-/spark-md5-3.0.0.tgz" + integrity sha1-NyIifFTi+vJLHcbZM8wUTm9xv+8= + +spark-md5@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spark-md5/-/spark-md5-3.0.1.tgz" + integrity sha512-0tF3AGSD1ppQeuffsLDIOWlKUd3lS92tFxcsrh5Pe3ZphhnoK+oXIBTzOAThZCiuINZLvpiLH/1VS1/ANEJVig== + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.7" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz" + integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +sqlite3@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-4.2.0.tgz" + integrity sha512-roEOz41hxui2Q7uYnWsjMOTry6TcNUNmp8audCx18gF10P2NknwdpF+E+HKvz/F2NvPKGGBF4NGc+ZPQ+AABwg== + dependencies: + nan "^2.12.1" + node-pre-gyp "^0.11.0" + +sse-z@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/sse-z/-/sse-z-0.3.0.tgz" + integrity sha512-jfcXynl9oAOS9YJ7iqS2JMUEHOlvrRAD+54CENiWnc4xsuVLQVSgmwf7cwOTcBd/uq3XkQKBGojgvEtVXcJ/8w== + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +stoppable@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/stoppable/-/stoppable-1.1.0.tgz" + integrity sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw== + +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + +streamsearch@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz" + integrity sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo= + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trimend@^1.0.1, string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz" + integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string.prototype.trimstart@^1.0.1, string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz" + integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-bom-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz" + integrity sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4= + dependencies: + first-chunk-stream "^1.0.0" + strip-bom "^2.0.0" + +strip-bom@2.X, strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz" + integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= + dependencies: + is-hex-prefixed "1.0.0" + +strip-json-comments@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +sublevel-pouchdb@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/sublevel-pouchdb/-/sublevel-pouchdb-7.2.2.tgz" + integrity sha512-y5uYgwKDgXVyPZceTDGWsSFAhpSddY29l9PJbXqMJLfREdPmQTY8InpatohlEfCXX7s1LGcrfYAhxPFZaJOLnQ== + dependencies: + inherits "2.0.4" + level-codec "9.0.2" + ltgt "2.2.1" + readable-stream "1.1.14" + +subscriptions-transport-ws@^0.9.11, subscriptions-transport-ws@^0.9.16: + version "0.9.18" + resolved "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.18.tgz" + integrity sha512-tztzcBTNoEbuErsVQpTN2xUNN/efAZXyCyL5m3x4t6SKrEiTL2N8SaKWBFWM4u56pL79ULif3zjyeq+oV+nOaA== + dependencies: + backo2 "^1.0.2" + eventemitter3 "^3.1.0" + iterall "^1.2.1" + symbol-observable "^1.0.4" + ws "^5.2.0" + +supports-color@7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +swap-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz" + integrity sha1-w5IDpFhzhfrTyFCgvRvK+ggZdOM= + dependencies: + lower-case "^1.1.1" + upper-case "^1.1.1" + +swarm-js@^0.1.40: + version "0.1.40" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz" + integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^7.1.0" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request "^1.0.1" + +symbol-observable@^1.0.3, symbol-observable@^1.0.4, symbol-observable@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz" + integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== + +symbol-observable@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-2.0.3.tgz" + integrity sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA== + +"symbol-tree@>= 3.1.0 < 4.0.0": + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + +symbol@^0.2.1: + version "0.2.3" + resolved "https://registry.yarnpkg.com/symbol/-/symbol-0.2.3.tgz" + integrity sha1-O5hzuKkB5Hxu/iFSajrDcu8ou8c= + +sync-fetch@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/sync-fetch/-/sync-fetch-0.3.0.tgz" + integrity sha512-dJp4qg+x4JwSEW1HibAuMi0IIrBI3wuQr2GimmqB7OXR50wmwzfdusG+p39R9w3R6aFtZ2mzvxvWKQ3Bd/vx3g== + dependencies: + buffer "^5.7.0" + node-fetch "^2.6.1" + +table@^6.0.4: + version "6.0.7" + resolved "https://registry.yarnpkg.com/table/-/table-6.0.7.tgz" + integrity sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g== + dependencies: + ajv "^7.0.2" + lodash "^4.17.20" + slice-ansi "^4.0.0" + string-width "^4.2.0" + +taffydb@2.7.3: + version "2.7.3" + resolved "https://registry.yarnpkg.com/taffydb/-/taffydb-2.7.3.tgz" + integrity sha1-KtNxaWKUmPylvIQkMJbTzeDsOjQ= + +tar@^4, tar@^4.0.2: + version "4.4.13" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.8.6" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +through2-filter@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz" + integrity sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw= + dependencies: + through2 "~2.0.0" + xtend "~4.0.0" + +through2-filter@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz" + integrity sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA== + dependencies: + through2 "~2.0.0" + xtend "~4.0.0" + +through2@2.X, through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +through2@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz" + integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== + dependencies: + readable-stream "2 || 3" + +through2@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz" + integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== + dependencies: + inherits "^2.0.4" + readable-stream "2 || 3" + +through2@^0.6.0: + version "0.6.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz" + integrity sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg= + dependencies: + readable-stream ">=1.0.33-1 <1.1.0-0" + xtend ">=4.0.0 <4.1.0-0" + +tildify@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz" + integrity sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo= + dependencies: + os-homedir "^1.0.0" + +timed-out@^4.0.0, timed-out@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= + +tiny-queue@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tiny-queue/-/tiny-queue-0.2.1.tgz" + integrity sha1-JaZ/LG4lOyypQZd7XvdELvl6YEY= + +title-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz" + integrity sha1-PhJyFtpY0rxb7PE3q5Ha46fNj6o= + dependencies: + no-case "^2.2.0" + upper-case "^1.0.3" + +to-absolute-glob@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz" + integrity sha1-HN+kcqnvUMI57maZm2YsoOs5k38= + dependencies: + extend-shallow "^2.0.1" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + +tough-cookie@^2.2.0, tough-cookie@^2.3.1, tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +"tough-cookie@^2.3.3 || ^3.0.1 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz" + integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.1.2" + +tr46@~0.0.1: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + +truffle@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.2.2.tgz" + integrity sha512-66wAdFM/n1Mf1o227hhOteAJCgF9pIPKywbQ0u21qyD2LahU4VZsOjci6GY0Iv/5nDWm57GM+GNhikSdSTKvRQ== + dependencies: + "@truffle/debugger" "^8.0.16" + app-module-path "^2.2.0" + mocha "8.1.2" + original-require "^1.0.1" + optionalDependencies: + "@truffle/db" "^0.5.2" + +ts-invariant@^0.4.0: + version "0.4.4" + resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz" + integrity sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA== + dependencies: + tslib "^1.9.3" + +ts-invariant@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.6.1.tgz" + integrity sha512-QQgN33g8E8yrdDuH29HASveLtbzMnRRgWh0i/JNTW4+zcLsdIOnfsgEDi/NKx4UckQyuMFt9Ujm6TWLWQ58Kvg== + dependencies: + "@types/ungap__global-this" "^0.3.1" + "@ungap/global-this" "^0.4.2" + tslib "^1.9.3" + +tsconfig-paths@^3.9.0: + version "3.9.0" + resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz" + integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + +tslib@^1.10.0, tslib@^1.14.1, tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.0.3, tslib@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz" + integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== + +tslib@~2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz" + integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + +type-is@^1.6.16, type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.3.0.tgz" + integrity sha512-rgPIqOdfK/4J9FhiVrZ3cveAjRRo5rsQBAIhnylX874y1DX/kEKSVdLsnuHB6l1KTjHyU01VjiMBHgU2adejyg== + +typedarray-to-buffer@^3.1.5, typedarray-to-buffer@~3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typedarray@~0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +typescript-compare@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/typescript-compare/-/typescript-compare-0.0.2.tgz" + integrity sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA== + dependencies: + typescript-logic "^0.0.0" + +typescript-logic@^0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/typescript-logic/-/typescript-logic-0.0.0.tgz" + integrity sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q== + +typescript-tuple@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/typescript-tuple/-/typescript-tuple-2.2.1.tgz" + integrity sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q== + dependencies: + typescript-compare "^0.0.2" + +ua-parser-js@^0.7.18: + version "0.7.24" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.24.tgz" + integrity sha512-yo+miGzQx5gakzVK3QFfN0/L9uVhosXBBO7qmnk7c2iw1IhL212wfA3zbnI54B0obGwC/5NWub/iT9sReMx+Fw== + +ultron@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz" + integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== + +unbox-primitive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.0.tgz" + integrity sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA== + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.0" + has-symbols "^1.0.0" + which-boxed-primitive "^1.0.1" + +underscore@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz" + integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== + +unique-stream@^2.0.2: + version "2.3.1" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz" + integrity sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A== + dependencies: + json-stable-stringify-without-jsonify "^1.0.1" + through2-filter "^3.0.0" + +unique-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz" + integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= + dependencies: + crypto-random-string "^1.0.0" + +universalify@^0.1.0, universalify@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +unixify@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unixify/-/unixify-1.0.0.tgz" + integrity sha1-OmQcjC/7zk2mg6XHDwOkYpQMIJA= + dependencies: + normalize-path "^2.1.1" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +upper-case-first@^1.1.0, upper-case-first@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz" + integrity sha1-XXm+3P8UQZUY/S7bCgUHybaFkRU= + dependencies: + upper-case "^1.1.1" + +upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz" + integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= + dependencies: + prepend-http "^1.0.1" + +url-parse-lax@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + dependencies: + prepend-http "^2.0.0" + +url-parse@^1.4.3: + version "1.5.1" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz" + integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + +url-set-query@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz" + integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk= + +url-to-options@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz" + integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= + +utf-8-validate@^5.0.2: + version "5.0.4" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.4.tgz" + integrity sha512-MEF05cPSq3AwJ2C7B7sHAA6i53vONoZbMGX8My5auEVm6W+dJ2Jd/TZPyGJ5CH42V2XtbI5FD28HeHeqlPzZ3Q== + dependencies: + node-gyp-build "^4.2.0" + +utf8@3.0.0, utf8@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz" + integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util.promisify@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.1.1.tgz" + integrity sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + for-each "^0.3.3" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.1" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz" + integrity sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w= + +uuid@3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz" + integrity sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA== + +uuid@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + +uuid@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.1.0.tgz" + integrity sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg== + +uuid@^3.1.0, uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +uuid@^8.0.0: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +v8-compile-cache@^2.0.3: + version "2.2.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz" + integrity sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q== + +vali-date@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/vali-date/-/vali-date-1.0.0.tgz" + integrity sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY= + +valid-url@1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz" + integrity sha1-HBRHm0DxOXp1eC8RXkCGRHQzogA= + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +varint@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz" + integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vinyl-fs@2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-2.4.3.tgz" + integrity sha1-PZflYuv91LZpId6nBia4S96dLQc= + dependencies: + duplexify "^3.2.0" + glob-stream "^5.3.2" + graceful-fs "^4.0.0" + gulp-sourcemaps "^1.5.2" + is-valid-glob "^0.3.0" + lazystream "^1.0.0" + lodash.isequal "^4.0.0" + merge-stream "^1.0.0" + mkdirp "^0.5.0" + object-assign "^4.0.0" + readable-stream "^2.0.4" + strip-bom "^2.0.0" + strip-bom-stream "^1.0.0" + through2 "^2.0.0" + through2-filter "^2.0.0" + vali-date "^1.0.0" + vinyl "^1.0.0" + +vinyl@1.X, vinyl@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz" + integrity sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ= + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vuvuzela@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/vuvuzela/-/vuvuzela-1.0.3.tgz" + integrity sha1-O+FF5YJxxzylUnndhR8SpoIRSws= + +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + +web3-bzz@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.9.tgz" + integrity sha512-ogVQr9jHodu9HobARtvUSmWG22cv2EUQzlPeejGWZ7j5h20HX40EDuWyomGY5VclIj5DdLY76Tmq88RTf/6nxA== + dependencies: + "@types/node" "^10.12.18" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.9.1" + +web3-core-helpers@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.9.tgz" + integrity sha512-t0WAG3orLCE3lqi77ZoSRNFok3VQWZXTniZigDQjyOJYMAX7BU3F3js8HKbjVnAxlX3tiKoDxI0KBk9F3AxYuw== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.9" + web3-utils "1.2.9" + +web3-core-method@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.9.tgz" + integrity sha512-bjsIoqP3gs7A/gP8+QeLUCyOKJ8bopteCSNbCX36Pxk6TYfYWNuC6hP+2GzUuqdP3xaZNe+XEElQFUNpR3oyAg== + dependencies: + "@ethersproject/transactions" "^5.0.0-beta.135" + underscore "1.9.1" + web3-core-helpers "1.2.9" + web3-core-promievent "1.2.9" + web3-core-subscriptions "1.2.9" + web3-utils "1.2.9" + +web3-core-promievent@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.9.tgz" + integrity sha512-0eAUA2zjgXTleSrnc1wdoKQPPIHU6KHf4fAscu4W9kKrR+mqP1KsjYrxY9wUyjNnXxfQ+5M29ipvbiaK8OqdOw== + dependencies: + eventemitter3 "3.1.2" + +web3-core-requestmanager@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.9.tgz" + integrity sha512-1PwKV2m46ALUnIN5VPPgjOj8yMLJhhqZYvYJE34hTN5SErOkwhzx5zScvo5MN7v7KyQGFnpVCZKKGCiEnDmtFA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.9" + web3-providers-http "1.2.9" + web3-providers-ipc "1.2.9" + web3-providers-ws "1.2.9" + +web3-core-subscriptions@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.9.tgz" + integrity sha512-Y48TvXPSPxEM33OmXjGVDMzTd0j8X0t2+sDw66haeBS8eYnrEzasWuBZZXDq0zNUsqyxItgBGDn+cszkgEnFqg== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.9" + +web3-core@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.9.tgz" + integrity sha512-fSYv21IP658Ty2wAuU9iqmW7V+75DOYMVZsDH/c14jcF/1VXnedOcxzxSj3vArsCvXZNe6XC5/wAuGZyQwR9RA== + dependencies: + "@types/bn.js" "^4.11.4" + "@types/node" "^12.6.1" + bignumber.js "^9.0.0" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-core-requestmanager "1.2.9" + web3-utils "1.2.9" + +web3-eth-abi@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.9.tgz" + integrity sha512-3YwUYbh/DMfDbhMWEebAdjSd5bj3ZQieOjLzWFHU23CaLEqT34sUix1lba+hgUH/EN6A7bKAuKOhR3p0OvTn7Q== + dependencies: + "@ethersproject/abi" "5.0.0-beta.153" + underscore "1.9.1" + web3-utils "1.2.9" + +web3-eth-accounts@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.9.tgz" + integrity sha512-jkbDCZoA1qv53mFcRHCinoCsgg8WH+M0YUO1awxmqWXRmCRws1wW0TsuSQ14UThih5Dxolgl+e+aGWxG58LMwg== + dependencies: + crypto-browserify "3.12.0" + eth-lib "^0.2.8" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + scrypt-js "^3.0.1" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-utils "1.2.9" + +web3-eth-contract@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.9.tgz" + integrity sha512-PYMvJf7EG/HyssUZa+pXrc8IB06K/YFfWYyW4R7ed3sab+9wWUys1TlWxBCBuiBXOokSAyM6H6P6/cKEx8FT8Q== + dependencies: + "@types/bn.js" "^4.11.4" + underscore "1.9.1" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-core-promievent "1.2.9" + web3-core-subscriptions "1.2.9" + web3-eth-abi "1.2.9" + web3-utils "1.2.9" + +web3-eth-ens@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.9.tgz" + integrity sha512-kG4+ZRgZ8I1WYyOBGI8QVRHfUSbbJjvJAGA1AF/NOW7JXQ+x7gBGeJw6taDWJhSshMoEKWcsgvsiuoG4870YxQ== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-promievent "1.2.9" + web3-eth-abi "1.2.9" + web3-eth-contract "1.2.9" + web3-utils "1.2.9" + +web3-eth-iban@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.9.tgz" + integrity sha512-RtdVvJE0pyg9dHLy0GzDiqgnLnssSzfz/JYguhC1wsj9+Gnq1M6Diy3NixACWUAp6ty/zafyOaZnNQ+JuH9TjQ== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.9" + +web3-eth-personal@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.9.tgz" + integrity sha512-cFiNrktxZ1C/rIdJFzQTvFn3/0zcsR3a+Jf8Y3KxeQDHszQtosjLWptP7bsUmDwEh4hzh0Cy3KpOxlYBWB8bJQ== + dependencies: + "@types/node" "^12.6.1" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-net "1.2.9" + web3-utils "1.2.9" + +web3-eth@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.9.tgz" + integrity sha512-sIKO4iE9FEBa/CYUd6GdPd7GXt/wISqxUd8PlIld6+hvMJj02lgO7Z7p5T9mZIJcIZJGvZX81ogx8oJ9yif+Ag== + dependencies: + underscore "1.9.1" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-core-subscriptions "1.2.9" + web3-eth-abi "1.2.9" + web3-eth-accounts "1.2.9" + web3-eth-contract "1.2.9" + web3-eth-ens "1.2.9" + web3-eth-iban "1.2.9" + web3-eth-personal "1.2.9" + web3-net "1.2.9" + web3-utils "1.2.9" + +web3-net@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.9.tgz" + integrity sha512-d2mTn8jPlg+SI2hTj2b32Qan6DmtU9ap/IUlJTeQbZQSkTLf0u9suW8Vjwyr4poJYXTurdSshE7OZsPNn30/ZA== + dependencies: + web3-core "1.2.9" + web3-core-method "1.2.9" + web3-utils "1.2.9" + +web3-providers-http@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.9.tgz" + integrity sha512-F956tCIj60Ttr0UvEHWFIhx+be3He8msoPzyA44/kfzzYoMAsCFRn5cf0zQG6al0znE75g6HlWVSN6s3yAh51A== + dependencies: + web3-core-helpers "1.2.9" + xhr2-cookies "1.1.0" + +web3-providers-ipc@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.9.tgz" + integrity sha512-NQ8QnBleoHA2qTJlqoWu7EJAD/FR5uimf7Ielzk4Z2z+m+6UAuJdJMSuQNj+Umhz9L/Ys6vpS1vHx9NizFl+aQ== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.9" + +web3-providers-ws@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.9.tgz" + integrity sha512-6+UpvINeI//dglZoAKStUXqxDOXJy6Iitv2z3dbgInG4zb8tkYl/VBDL80UjUg3ZvzWG0g7EKY2nRPEpON2TFA== + dependencies: + eventemitter3 "^4.0.0" + underscore "1.9.1" + web3-core-helpers "1.2.9" + websocket "^1.0.31" + +web3-shh@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.9.tgz" + integrity sha512-PWa8b/EaxaMinFaxy6cV0i0EOi2M7a/ST+9k9nhyhCjVa2vzXuNoBNo2IUOmeZ0WP2UQB8ByJ2+p4htlJaDOjA== + dependencies: + web3-core "1.2.9" + web3-core-method "1.2.9" + web3-core-subscriptions "1.2.9" + web3-net "1.2.9" + +web3-utils@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.9.tgz" + integrity sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + +web3@1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.9.tgz" + integrity sha512-Mo5aBRm0JrcNpN/g4VOrDzudymfOnHRC3s2VarhYxRA8aWgF5rnhQ0ziySaugpic1gksbXPe105pUWyRqw8HUA== + dependencies: + web3-bzz "1.2.9" + web3-core "1.2.9" + web3-eth "1.2.9" + web3-eth-personal "1.2.9" + web3-net "1.2.9" + web3-shh "1.2.9" + web3-utils "1.2.9" + +webidl-conversions@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-2.0.1.tgz" + integrity sha1-O/glj30xjHRDw28uFpQCoaZwNQY= + +websocket@^1.0.31: + version "1.0.33" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.33.tgz" + integrity sha512-XwNqM2rN5eh3G2CUQE3OHZj+0xfdH42+OFK6LdC2yqiC0YU8e5UK0nYre220T0IyyN031V/XOvtHvXozvJYFWA== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + +websql@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/websql/-/websql-1.0.0.tgz" + integrity sha512-7iZ+u28Ljw5hCnMiq0BCOeSYf0vCFQe/ORY0HgscTiKjQed8WqugpBUggJ2NTnB9fahn1kEnPRX2jf8Px5PhJw== + dependencies: + argsarray "^0.0.1" + immediate "^3.2.2" + noop-fn "^1.0.0" + sqlite3 "^4.0.0" + tiny-queue "^0.2.1" + +whatwg-url-compat@~0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/whatwg-url-compat/-/whatwg-url-compat-0.6.5.tgz" + integrity sha1-AImBEa9om7CXVBzVpFymyHmERb8= + dependencies: + tr46 "~0.0.1" + +which-boxed-primitive@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@2.0.2, which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3, wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz" + integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= + +word-wrap@^1.2.3, word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +workerpool@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.0.tgz" + integrity sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA== + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write-file-atomic@^2.0.0: + version "2.4.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz" + integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write-stream@~0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/write-stream/-/write-stream-0.4.3.tgz" + integrity sha1-g8yMA0fQr2BXqThitOOuAd5cgcE= + dependencies: + readable-stream "~0.0.2" + +ws@7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.1.0.tgz" + integrity sha512-Swie2C4fs7CkwlHu1glMePLYJJsWjzhl1vm3ZaLplD0h7OMkZyZ6kLTB/OagiU923bZrPFXuDTeEqaEN4NWG4g== + dependencies: + async-limiter "^1.0.0" + +ws@7.4.3: + version "7.4.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.3.tgz" + integrity sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA== + +ws@^3.0.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz" + integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== + dependencies: + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" + +ws@^5.2.0: + version "5.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz" + integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== + dependencies: + async-limiter "~1.0.0" + +ws@^6.0.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz" + integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== + dependencies: + async-limiter "~1.0.0" + +xdg-basedir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz" + integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ= + +xhr-request-promise@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz" + integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== + dependencies: + xhr-request "^1.1.0" + +xhr-request@^1.0.1, xhr-request@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz" + integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== + dependencies: + buffer-to-arraybuffer "^0.0.5" + object-assign "^4.1.1" + query-string "^5.0.1" + simple-get "^2.7.0" + timed-out "^4.0.1" + url-set-query "^1.0.0" + xhr "^2.0.4" + +xhr2-cookies@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz" + integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg= + dependencies: + cookiejar "^2.1.1" + +xhr@^2.0.4, xhr@^2.3.3: + version "2.6.0" + resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz" + integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== + dependencies: + global "~4.4.0" + is-function "^1.0.1" + parse-headers "^2.0.0" + xtend "^4.0.0" + +"xml-name-validator@>= 2.0.1 < 3.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz" + integrity sha1-TYuPHszTQZqjYgYb7O9RXh5VljU= + +xmlhttprequest@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz" + integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= + +xss@^1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/xss/-/xss-1.0.8.tgz" + integrity sha512-3MgPdaXV8rfQ/pNn16Eio6VXYPTkqwa0vc7GkiymmY/DqR1SE/7VPAAVZz1GJsJFrllMYO3RHfEaiUGjab6TNw== + dependencies: + commander "^2.20.3" + cssfilter "0.0.10" + +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== + +y18n@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz" + integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== + +yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz" + integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= + +yallist@^3.0.0, yallist@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^15.0.1: + version "15.0.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz" + integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz" + integrity sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ= + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + +yargs-unparser@1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.1.tgz" + integrity sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA== + dependencies: + camelcase "^5.3.1" + decamelize "^1.2.0" + flat "^4.1.0" + is-plain-obj "^1.1.0" + yargs "^14.2.3" + +yargs@13.2.4: + version "13.2.4" + resolved "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + +yargs@13.3.2: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yargs@4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.6.0.tgz" + integrity sha1-y0BQwBWb+2u2ScD0r1UFJqhGGdw= + dependencies: + camelcase "^2.0.1" + cliui "^3.2.0" + decamelize "^1.1.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + pkg-conf "^1.1.2" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + string-width "^1.0.1" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.0" + +yargs@^14.2.3: + version "14.2.3" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz" + integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== + dependencies: + cliui "^5.0.0" + decamelize "^1.2.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^15.0.1" + +yargs@^15.3.1: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +zen-observable-ts@^0.8.21: + version "0.8.21" + resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz" + integrity sha512-Yj3yXweRc8LdRMrCC8nIc4kkjWecPAUVh0TI0OUrWXx6aX790vLcDlWca6I4vsyCGH3LpWxq0dJRcMOFoVqmeg== + dependencies: + tslib "^1.9.3" + zen-observable "^0.8.0" + +zen-observable@^0.8.0, zen-observable@^0.8.14: + version "0.8.15" + resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz" + integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== diff --git a/vent/test/events.go b/vent/test/events.go index b091681bd..ab9a65df3 100644 --- a/vent/test/events.go +++ b/vent/test/events.go @@ -5,6 +5,8 @@ import ( "testing" "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/rpc/web3/ethclient" + "google.golang.org/grpc" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/evm/abi" @@ -14,7 +16,13 @@ import ( "github.com/stretchr/testify/require" ) -func NewTransactClient(t testing.TB, listenAddress string) rpctransact.TransactClient { +const gasLimit = ethclient.BasicGasLimit * 100 + +type TransactClient interface { + CallTxSync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error) +} + +func NewBurrowTransactClient(t testing.TB, listenAddress string) rpctransact.TransactClient { t.Helper() conn, err := encoding.GRPCDial(listenAddress) @@ -22,18 +30,16 @@ func NewTransactClient(t testing.TB, listenAddress string) rpctransact.TransactC return rpctransact.NewTransactClient(conn) } -func CreateContract(t testing.TB, cli rpctransact.TransactClient, inputAddress crypto.Address) *exec.TxExecution { +func CreateContract(t testing.TB, cli TransactClient, inputAddress crypto.Address) *exec.TxExecution { t.Helper() txe, err := cli.CallTxSync(context.Background(), &payload.CallTx{ Input: &payload.TxInput{ Address: inputAddress, - Amount: 2, }, Address: nil, Data: Bytecode_EventsTest, - Fee: 2, - GasLimit: 10000, + GasLimit: gasLimit, }) require.NoError(t, err) @@ -44,27 +50,27 @@ func CreateContract(t testing.TB, cli rpctransact.TransactClient, inputAddress c return txe } -func CallRemoveEvent(t testing.TB, cli rpctransact.TransactClient, inputAddress, contractAddress crypto.Address, +func CallRemoveEvent(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, name string) *exec.TxExecution { return Call(t, cli, inputAddress, contractAddress, "removeThing", name) } -func CallRemoveEvents(t testing.TB, cli rpctransact.TransactClient, inputAddress, contractAddress crypto.Address, +func CallRemoveEvents(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, name string) *exec.TxExecution { return Call(t, cli, inputAddress, contractAddress, "removeThings", name) } -func CallAddEvent(t testing.TB, cli rpctransact.TransactClient, inputAddress, contractAddress crypto.Address, +func CallAddEvent(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, name, description string) *exec.TxExecution { return Call(t, cli, inputAddress, contractAddress, "addThing", name, description) } -func CallAddEvents(t testing.TB, cli rpctransact.TransactClient, inputAddress, contractAddress crypto.Address, +func CallAddEvents(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, name, description string) *exec.TxExecution { return Call(t, cli, inputAddress, contractAddress, "addThings", name, description) } -func Call(t testing.TB, cli rpctransact.TransactClient, inputAddress, contractAddress crypto.Address, +func Call(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, functionName string, args ...interface{}) *exec.TxExecution { t.Helper() @@ -77,12 +83,10 @@ func Call(t testing.TB, cli rpctransact.TransactClient, inputAddress, contractAd txe, err := cli.CallTxSync(context.Background(), &payload.CallTx{ Input: &payload.TxInput{ Address: inputAddress, - Amount: 2, }, Address: &contractAddress, Data: data, - Fee: 2, - GasLimit: 1000000, + GasLimit: gasLimit, }) require.NoError(t, err) diff --git a/vent/test/test.sh b/vent/test/test.sh deleted file mode 100755 index 30bb06989..000000000 --- a/vent/test/test.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# This script provides a simple running test chain that will generate height notification events -# Run postgres in background with: docker run -p 5432:5432 postgres - -REPO=${REPO:-"$PWD"} -vent_test_dir="$REPO/vent/test" -[[ ! -f burrow.toml ]] && burrow spec -f1 | burrow configure -s- > burrow.toml && rm -rf .burrow -burrow start -v0 &> burrow.log & -sleep 2s -burrow vent start --db-block --abi "$vent_test_dir/EventsTest.abi" --spec "$vent_test_dir/sqlsol_view.json" -# Now: -# psql -h 127.0.0.1 -p 5432 -U postgres -# LISTEN height; -# -- run any command to see notifications: -# SELECT true; -# -- run it some more - -# Generate some other events (on channels meta and keyed_meta) with: -# addr=$(curl -s localhost:26658/validators | jq -r '.result.BondedValidators[0].Address') -# burrow deploy -a $addr - -trap "killall burrow" EXIT From b3036112c3317e95f5194c1c5cb74db4c35be6a3 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 3 Mar 2021 20:03:10 +0100 Subject: [PATCH 151/185] Fix docker publicsh, fix logging in consumer, add changelog Signed-off-by: Silas Davis --- .../workflows/{master.yaml => develop.yaml} | 4 +-- .github/workflows/release.yaml | 2 +- CHANGELOG.md | 36 +++++++++++++++++++ project/history.go | 34 ++++++++++++++++++ vent/service/consumer.go | 2 +- 5 files changed, 74 insertions(+), 4 deletions(-) rename .github/workflows/{master.yaml => develop.yaml} (94%) diff --git a/.github/workflows/master.yaml b/.github/workflows/develop.yaml similarity index 94% rename from .github/workflows/master.yaml rename to .github/workflows/develop.yaml index 263716dd7..16b694fcb 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/develop.yaml @@ -1,4 +1,4 @@ -name: master +name: develop on: push: branches: @@ -39,4 +39,4 @@ jobs: version=$(./scripts/local_version.sh) echo ${DOCKER_PASS_DEV} | docker login --username ${DOCKER_USER_DEV} ${DOCKER_REPO_DEV} --password-stdin docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO_DEV}:${version} - docker push ${DOCKER_REPO_DEV} + docker push --all-tags ${DOCKER_REPO_DEV} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a98a27c21..8e2e6cf94 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -61,7 +61,7 @@ jobs: export tag=$(git tag --points-at HEAD) echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} --password-stdin docker tag ${DOCKER_REPO}:${tag#v} ${DOCKER_REPO}:latest - docker push ${DOCKER_REPO} + docker push --all-tags ${DOCKER_REPO} charts: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 2579add06..981f5c3dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,39 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [Unreleased] +### Changed +- [Tendermint] Upgraded to Tendermint 0.34.3 +- [Docker] Image will now start testnet by default + +### Added +- [Vent] Added support for building Vent SQL tables from Ethereum web3 JSONRPC chains (useful for oracles/state channels with layer 1) +- [Vent] Added Status to healthcheck endpoint on Vent +- [Natives] Implemented ecrecover using btcec (revised key handling) +- [Engine] Implement cross-engine dispatch +- [WASM] Implement cross-engine calls and calls to precompiles +- [WASM] Significantly extend eWASM support and implement functions +- [WASM] Add printing debug functions +- [WASM] Implement CREATE, GETTXGASPRICE, GETBLOCKDIFFICULTY, SELFDESTRUCT eWASM functions (thanks Yoongbok Lee!) +- [WASM/JS] JS library supports deploying WASM code +- [Deploy] Can specify WASM in playbook +- [EVM] Implement CHAINID and DIFFICULTY opcodes +- [Query] PEG query grammar now supports Not ("NOT") and NotEqual ("!=") operators + +### Fixed +- [Deploy] Fix flaky parallel tests +- [EVM] Use correct opcode for create2 (thanks Vitali Grabovski!) +- [ABI] Check length of input before decoding (thanks Tri-stone!) +- [WASM] Constructor argument handling +- [RLP] Incorrect use of offsets for longer bytes strings +- [RLP] Use minimal encoding for length prefixes (no leading zeros) +- [Web3] Generate correct encoding hash for RawTx (ChainID in hash digest but not payload) +- [Web3] Generate canonical weird Ethereum hex +- [State] Fix read concurrency in RWTree (on which state is based) removing need for CallSim lock workaround + +### Security +- Updated elliptic JS dep to 6.5.3 +- Updated lodash to 4.17.19 + + ## [0.30.5] - 2020-07-09 ### Added - [Vent] Add BytesToHex flag on projection field mappings that causes bytes fields (e.g. bytes32) solidity fields to be hex-encoded and mapped to varchar(64) rather than bytea/blob columns in postgres/sqlite @@ -666,6 +701,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[Unreleased]: https://github.com/hyperledger/burrow/compare/v0.30.5...HEAD [0.30.5]: https://github.com/hyperledger/burrow/compare/v0.30.4...v0.30.5 [0.30.4]: https://github.com/hyperledger/burrow/compare/v0.30.3...v0.30.4 [0.30.3]: https://github.com/hyperledger/burrow/compare/v0.30.2...v0.30.3 diff --git a/project/history.go b/project/history.go index 0155b54c0..af09da3cc 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,40 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "", + `### Changed +- [Tendermint] Upgraded to Tendermint 0.34.3 +- [Docker] Image will now start testnet by default + +### Added +- [Vent] Added support for building Vent SQL tables from Ethereum web3 JSONRPC chains (useful for oracles/state channels with layer 1) +- [Vent] Added Status to healthcheck endpoint on Vent +- [Natives] Implemented ecrecover using btcec (revised key handling) +- [Engine] Implement cross-engine dispatch +- [WASM] Implement cross-engine calls and calls to precompiles +- [WASM] Significantly extend eWASM support and implement functions +- [WASM] Add printing debug functions +- [WASM] Implement CREATE, GETTXGASPRICE, GETBLOCKDIFFICULTY, SELFDESTRUCT eWASM functions (thanks Yoongbok Lee!) +- [WASM/JS] JS library supports deploying WASM code +- [Deploy] Can specify WASM in playbook +- [EVM] Implement CHAINID and DIFFICULTY opcodes +- [Query] PEG query grammar now supports Not ("NOT") and NotEqual ("!=") operators + +### Fixed +- [Deploy] Fix flaky parallel tests +- [EVM] Use correct opcode for create2 (thanks Vitali Grabovski!) +- [ABI] Check length of input before decoding (thanks Tri-stone!) +- [WASM] Constructor argument handling +- [RLP] Incorrect use of offsets for longer bytes strings +- [RLP] Use minimal encoding for length prefixes (no leading zeros) +- [Web3] Generate correct encoding hash for RawTx (ChainID in hash digest but not payload) +- [Web3] Generate canonical weird Ethereum hex +- [State] Fix read concurrency in RWTree (on which state is based) removing need for CallSim lock workaround + +### Security +- Updated elliptic JS dep to 6.5.3 +- Updated lodash to 4.17.19 +`, "0.30.5 - 2020-07-09", `### Added - [Vent] Add BytesToHex flag on projection field mappings that causes bytes fields (e.g. bytes32) solidity fields to be hex-encoded and mapped to varchar(64) rather than bytea/blob columns in postgres/sqlite diff --git a/vent/service/consumer.go b/vent/service/consumer.go index 9e8fcfb75..784fc540d 100644 --- a/vent/service/consumer.go +++ b/vent/service/consumer.go @@ -279,7 +279,7 @@ func (c *Consumer) connectToChain() (chain.Chain, error) { filter := &chain.Filter{ Addresses: c.Config.WatchAddresses, } - c.Logger.InfoMsg("Attempting to detect chain type running on %s", c.Config.ChainAddress) + c.Logger.InfoMsg("Attempting to detect chain type", "chain_address", c.Config.ChainAddress) burrowChain, burrowErr := burrow.New(c.Config.ChainAddress, filter) if burrowErr != nil { ethereumChain, ethErr := ethereum.New(jsonrpc.NewClient(c.Config.ChainAddress), filter, c.Logger) From 384f9cf5b5fb40d5ec74c15257cbea0c96d65087 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Wed, 10 Mar 2021 12:51:01 +0000 Subject: [PATCH 152/185] Work around issue of integration tests failing in github actions Signed-off-by: Sean Young --- integration/governance/governance_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/governance/governance_test.go b/integration/governance/governance_test.go index c33975feb..a0fdca0cb 100644 --- a/integration/governance/governance_test.go +++ b/integration/governance/governance_test.go @@ -252,5 +252,5 @@ func TestGovernance(t *testing.T) { // created by github.com/hyperledger/burrow/vendor/github.com/tendermint/tendermint/consensus.(*ConsensusReactor).AddPeer // /home/sean/go/src/github.com/hyperledger/burrow/vendor/github.com/tendermint/tendermint/consensus/reactor.go:171 +0x23a - time.Sleep(4 * time.Second) + time.Sleep(20 * time.Second) } From 4ff958edca5459d04d6e1d2b7ad8154fbe3a7099 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Wed, 10 Mar 2021 12:51:07 +0000 Subject: [PATCH 153/185] Remove yarn.lock for vent tests Vulnerable packages are listed, which trips dependabot Signed-off-by: Sean Young --- vent/test/eth/yarn.lock | 9852 --------------------------------------- 1 file changed, 9852 deletions(-) delete mode 100644 vent/test/eth/yarn.lock diff --git a/vent/test/eth/yarn.lock b/vent/test/eth/yarn.lock deleted file mode 100644 index fc1f5137f..000000000 --- a/vent/test/eth/yarn.lock +++ /dev/null @@ -1,9852 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@apollo/client@^3.1.5": - version "3.3.11" - resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.3.11.tgz" - integrity sha512-54+D5FB6RJlQ+g37f432gaexnyvDsG5X6L9VO5kqN54HJlbF8hCf/8CXtAQEHCWodAwZhy6kOLp2RM96829q3A== - dependencies: - "@graphql-typed-document-node/core" "^3.0.0" - "@types/zen-observable" "^0.8.0" - "@wry/context" "^0.5.2" - "@wry/equality" "^0.3.0" - fast-json-stable-stringify "^2.0.0" - graphql-tag "^2.12.0" - hoist-non-react-statics "^3.3.2" - optimism "^0.14.0" - prop-types "^15.7.2" - symbol-observable "^2.0.0" - ts-invariant "^0.6.0" - tslib "^1.10.0" - zen-observable "^0.8.14" - -"@apollo/protobufjs@^1.0.3": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@apollo/protobufjs/-/protobufjs-1.0.5.tgz" - integrity sha512-ZtyaBH1icCgqwIGb3zrtopV2D5Q8yxibkJzlaViM08eOhTQc7rACdYu0pfORFfhllvdMZ3aq69vifYHszY4gNA== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.0" - "@types/node" "^10.1.0" - long "^4.0.0" - -"@apollographql/apollo-tools@^0.4.3": - version "0.4.9" - resolved "https://registry.yarnpkg.com/@apollographql/apollo-tools/-/apollo-tools-0.4.9.tgz" - integrity sha512-M50pk8oo3CGTu4waGOklIX3YtTZoPfWG9K/G9WB8NpyQGA1OwYTiBFv94XqUtKElTDoFwoMXpMQd3Wy5dINvxA== - dependencies: - apollo-env "^0.6.6" - -"@apollographql/graphql-playground-html@1.6.26": - version "1.6.26" - resolved "https://registry.yarnpkg.com/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.26.tgz" - integrity sha512-XAwXOIab51QyhBxnxySdK3nuMEUohhDsHQ5Rbco/V1vjlP75zZ0ZLHD9dTpXTN8uxKxopb2lUvJTq+M4g2Q0HQ== - dependencies: - xss "^1.0.6" - -"@apollographql/graphql-upload-8-fork@^8.1.3": - version "8.1.3" - resolved "https://registry.yarnpkg.com/@apollographql/graphql-upload-8-fork/-/graphql-upload-8-fork-8.1.3.tgz" - integrity sha512-ssOPUT7euLqDXcdVv3Qs4LoL4BPtfermW1IOouaqEmj36TpHYDmYDIbKoSQxikd9vtMumFnP87OybH7sC9fJ6g== - dependencies: - "@types/express" "*" - "@types/fs-capacitor" "*" - "@types/koa" "*" - busboy "^0.3.1" - fs-capacitor "^2.0.4" - http-errors "^1.7.3" - object-path "^0.11.4" - -"@ardatan/aggregate-error@0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/@ardatan/aggregate-error/-/aggregate-error-0.0.6.tgz" - integrity sha512-vyrkEHG1jrukmzTPtyWB4NLPauUw5bQeg4uhn8f+1SSynmrOcyvlb1GKQjjgoBzElLdfXCRYX8UnBlhklOHYRQ== - dependencies: - tslib "~2.0.1" - -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/code-frame@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz" - integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== - dependencies: - "@babel/highlight" "^7.12.13" - -"@babel/compat-data@^7.13.8": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.8.tgz" - integrity sha512-EaI33z19T4qN3xLXsGf48M2cDqa6ei9tPZlfLdb2HC+e/cFtREiRd8hdSqDbwdLB0/+gLwqJmCYASH0z2bUdog== - -"@babel/core@^7.0.0": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.8.tgz" - integrity sha512-oYapIySGw1zGhEFRd6lzWNLWFX2s5dA/jm+Pw/+59ZdXtjyIuwlXbrId22Md0rgZVop+aVoqow2riXhBLNyuQg== - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.13.0" - "@babel/helper-compilation-targets" "^7.13.8" - "@babel/helper-module-transforms" "^7.13.0" - "@babel/helpers" "^7.13.0" - "@babel/parser" "^7.13.4" - "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.0" - "@babel/types" "^7.13.0" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.1.2" - lodash "^4.17.19" - semver "^6.3.0" - source-map "^0.5.0" - -"@babel/generator@^7.12.13", "@babel/generator@^7.13.0", "@babel/generator@^7.5.0": - version "7.13.9" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.9.tgz" - integrity sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw== - dependencies: - "@babel/types" "^7.13.0" - jsesc "^2.5.1" - source-map "^0.5.0" - -"@babel/helper-annotate-as-pure@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz" - integrity sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw== - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-compilation-targets@^7.13.8": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.8.tgz" - integrity sha512-pBljUGC1y3xKLn1nrx2eAhurLMA8OqBtBP/JwG4U8skN7kf8/aqwwxpV1N6T0e7r6+7uNitIa/fUxPFagSXp3A== - dependencies: - "@babel/compat-data" "^7.13.8" - "@babel/helper-validator-option" "^7.12.17" - browserslist "^4.14.5" - semver "^6.3.0" - -"@babel/helper-create-class-features-plugin@^7.13.0": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.8.tgz" - integrity sha512-qioaRrKHQbn4hkRKDHbnuQ6kAxmmOF+kzKGnIfxPK4j2rckSJCpKzr/SSTlohSCiE3uAQpNDJ9FIh4baeE8W+w== - dependencies: - "@babel/helper-function-name" "^7.12.13" - "@babel/helper-member-expression-to-functions" "^7.13.0" - "@babel/helper-optimise-call-expression" "^7.12.13" - "@babel/helper-replace-supers" "^7.13.0" - "@babel/helper-split-export-declaration" "^7.12.13" - -"@babel/helper-function-name@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz" - integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== - dependencies: - "@babel/helper-get-function-arity" "^7.12.13" - "@babel/template" "^7.12.13" - "@babel/types" "^7.12.13" - -"@babel/helper-get-function-arity@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz" - integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-member-expression-to-functions@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.0.tgz" - integrity sha512-yvRf8Ivk62JwisqV1rFRMxiSMDGnN6KH1/mDMmIrij4jztpQNRoHqqMG3U6apYbGRPJpgPalhva9Yd06HlUxJQ== - dependencies: - "@babel/types" "^7.13.0" - -"@babel/helper-module-imports@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz" - integrity sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g== - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-module-transforms@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.13.0.tgz" - integrity sha512-Ls8/VBwH577+pw7Ku1QkUWIyRRNHpYlts7+qSqBBFCW3I8QteB9DxfcZ5YJpOwH6Ihe/wn8ch7fMGOP1OhEIvw== - dependencies: - "@babel/helper-module-imports" "^7.12.13" - "@babel/helper-replace-supers" "^7.13.0" - "@babel/helper-simple-access" "^7.12.13" - "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/helper-validator-identifier" "^7.12.11" - "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.0" - "@babel/types" "^7.13.0" - lodash "^4.17.19" - -"@babel/helper-optimise-call-expression@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz" - integrity sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA== - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.8.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz" - integrity sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ== - -"@babel/helper-replace-supers@^7.12.13", "@babel/helper-replace-supers@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz" - integrity sha512-Segd5me1+Pz+rmN/NFBOplMbZG3SqRJOBlY+mA0SxAv6rjj7zJqr1AVr3SfzUVTLCv7ZLU5FycOM/SBGuLPbZw== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.13.0" - "@babel/helper-optimise-call-expression" "^7.12.13" - "@babel/traverse" "^7.13.0" - "@babel/types" "^7.13.0" - -"@babel/helper-simple-access@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz" - integrity sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA== - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-skip-transparent-expression-wrappers@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz" - integrity sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA== - dependencies: - "@babel/types" "^7.12.1" - -"@babel/helper-split-export-declaration@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz" - integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-validator-identifier@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz" - integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== - -"@babel/helper-validator-option@^7.12.17": - version "7.12.17" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz" - integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== - -"@babel/helpers@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.13.0.tgz" - integrity sha512-aan1MeFPxFacZeSz6Ld7YZo5aPuqnKlD7+HZY75xQsueczFccP9A7V05+oe0XpLwHK3oLorPe9eaAUljL7WEaQ== - dependencies: - "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.0" - "@babel/types" "^7.13.0" - -"@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.13.8.tgz" - integrity sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw== - dependencies: - "@babel/helper-validator-identifier" "^7.12.11" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@7.12.16": - version "7.12.16" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.16.tgz" - integrity sha512-c/+u9cqV6F0+4Hpq01jnJO+GLp2DdT63ppz9Xa+6cHaajM9VFzK/iDXiKK65YtpeVwu+ctfS6iqlMqRgQRzeCw== - -"@babel/parser@^7.0.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.4": - version "7.13.9" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.9.tgz" - integrity sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw== - -"@babel/plugin-proposal-class-properties@^7.0.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.13.0.tgz" - integrity sha512-KnTDjFNC1g+45ka0myZNvSBFLhNCLN+GeGYLDEA8Oq7MZ6yMgfLoIRh86GRT0FjtJhZw8JyUskP9uvj5pHM9Zg== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.13.0" - "@babel/helper-plugin-utils" "^7.13.0" - -"@babel/plugin-proposal-object-rest-spread@^7.0.0": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.13.8.tgz" - integrity sha512-DhB2EuB1Ih7S3/IRX5AFVgZ16k3EzfRbq97CxAVI1KSYcW+lexV8VZb7G7L8zuPVSdQMRn0kiBpf/Yzu9ZKH0g== - dependencies: - "@babel/compat-data" "^7.13.8" - "@babel/helper-compilation-targets" "^7.13.8" - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.13.0" - -"@babel/plugin-syntax-class-properties@^7.0.0": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.12.13.tgz" - integrity sha512-J/RYxnlSLXZLVR7wTRsozxKT8qbsx1mNKJzXEEjQ0Kjx1ZACcyHgbanNWNCFtc36IzuWhYWPpvJFFoexoOWFmA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.13.tgz" - integrity sha512-d4HM23Q1K7oq/SLNmG6mRt85l2csmQ0cHRaxRXjKW0YFdEXqlZ5kzFQKH5Uc3rDJECgu+yCRgPkG04Mm98R/1g== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-transform-arrow-functions@^7.0.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.13.0.tgz" - integrity sha512-96lgJagobeVmazXFaDrbmCLQxBysKu7U6Do3mLsx27gf5Dk85ezysrs2BZUpXD703U/Su1xTBDxxar2oa4jAGg== - dependencies: - "@babel/helper-plugin-utils" "^7.13.0" - -"@babel/plugin-transform-block-scoped-functions@^7.0.0": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.13.tgz" - integrity sha512-zNyFqbc3kI/fVpqwfqkg6RvBgFpC4J18aKKMmv7KdQ/1GgREapSJAykLMVNwfRGO3BtHj3YQZl8kxCXPcVMVeg== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-transform-block-scoping@^7.0.0": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz" - integrity sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-transform-classes@^7.0.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.13.0.tgz" - integrity sha512-9BtHCPUARyVH1oXGcSJD3YpsqRLROJx5ZNP6tN5vnk17N0SVf9WCtf8Nuh1CFmgByKKAIMstitKduoCmsaDK5g== - dependencies: - "@babel/helper-annotate-as-pure" "^7.12.13" - "@babel/helper-function-name" "^7.12.13" - "@babel/helper-optimise-call-expression" "^7.12.13" - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/helper-replace-supers" "^7.13.0" - "@babel/helper-split-export-declaration" "^7.12.13" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.0.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.13.0.tgz" - integrity sha512-RRqTYTeZkZAz8WbieLTvKUEUxZlUTdmL5KGMyZj7FnMfLNKV4+r5549aORG/mgojRmFlQMJDUupwAMiF2Q7OUg== - dependencies: - "@babel/helper-plugin-utils" "^7.13.0" - -"@babel/plugin-transform-destructuring@^7.0.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.0.tgz" - integrity sha512-zym5em7tePoNT9s964c0/KU3JPPnuq7VhIxPRefJ4/s82cD+q1mgKfuGRDMCPL0HTyKz4dISuQlCusfgCJ86HA== - dependencies: - "@babel/helper-plugin-utils" "^7.13.0" - -"@babel/plugin-transform-flow-strip-types@^7.0.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.13.0.tgz" - integrity sha512-EXAGFMJgSX8gxWD7PZtW/P6M+z74jpx3wm/+9pn+c2dOawPpBkUX7BrfyPvo6ZpXbgRIEuwgwDb/MGlKvu2pOg== - dependencies: - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/plugin-syntax-flow" "^7.12.13" - -"@babel/plugin-transform-for-of@^7.0.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.13.0.tgz" - integrity sha512-IHKT00mwUVYE0zzbkDgNRP6SRzvfGCYsOxIRz8KsiaaHCcT9BWIkO+H9QRJseHBLOGBZkHUdHiqj6r0POsdytg== - dependencies: - "@babel/helper-plugin-utils" "^7.13.0" - -"@babel/plugin-transform-function-name@^7.0.0": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.13.tgz" - integrity sha512-6K7gZycG0cmIwwF7uMK/ZqeCikCGVBdyP2J5SKNCXO5EOHcqi+z7Jwf8AmyDNcBgxET8DrEtCt/mPKPyAzXyqQ== - dependencies: - "@babel/helper-function-name" "^7.12.13" - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-transform-literals@^7.0.0": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.13.tgz" - integrity sha512-FW+WPjSR7hiUxMcKqyNjP05tQ2kmBCdpEpZHY1ARm96tGQCCBvXKnpjILtDplUnJ/eHZ0lALLM+d2lMFSpYJrQ== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-transform-member-expression-literals@^7.0.0": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.13.tgz" - integrity sha512-kxLkOsg8yir4YeEPHLuO2tXP9R/gTjpuTOjshqSpELUN3ZAg2jfDnKUvzzJxObun38sw3wm4Uu69sX/zA7iRvg== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-transform-modules-commonjs@^7.0.0": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.13.8.tgz" - integrity sha512-9QiOx4MEGglfYZ4XOnU79OHr6vIWUakIj9b4mioN8eQIoEh+pf5p/zEB36JpDFWA12nNMiRf7bfoRvl9Rn79Bw== - dependencies: - "@babel/helper-module-transforms" "^7.13.0" - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/helper-simple-access" "^7.12.13" - babel-plugin-dynamic-import-node "^2.3.3" - -"@babel/plugin-transform-object-super@^7.0.0": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.13.tgz" - integrity sha512-JzYIcj3XtYspZDV8j9ulnoMPZZnF/Cj0LUxPOjR89BdBVx+zYJI9MdMIlUZjbXDX+6YVeS6I3e8op+qQ3BYBoQ== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - "@babel/helper-replace-supers" "^7.12.13" - -"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.13.0.tgz" - integrity sha512-Jt8k/h/mIwE2JFEOb3lURoY5C85ETcYPnbuAJ96zRBzh1XHtQZfs62ChZ6EP22QlC8c7Xqr9q+e1SU5qttwwjw== - dependencies: - "@babel/helper-plugin-utils" "^7.13.0" - -"@babel/plugin-transform-property-literals@^7.0.0": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.13.tgz" - integrity sha512-nqVigwVan+lR+g8Fj8Exl0UQX2kymtjcWfMOYM1vTYEKujeyv2SkMgazf2qNcK7l4SDiKyTA/nHCPqL4e2zo1A== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-transform-react-display-name@^7.0.0": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.13.tgz" - integrity sha512-MprESJzI9O5VnJZrL7gg1MpdqmiFcUv41Jc7SahxYsNP2kDkFqClxxTZq+1Qv4AFCamm+GXMRDQINNn+qrxmiA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-transform-react-jsx@^7.0.0": - version "7.12.17" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.17.tgz" - integrity sha512-mwaVNcXV+l6qJOuRhpdTEj8sT/Z0owAVWf9QujTZ0d2ye9X/K+MTOTSizcgKOj18PGnTc/7g1I4+cIUjsKhBcw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.12.13" - "@babel/helper-module-imports" "^7.12.13" - "@babel/helper-plugin-utils" "^7.12.13" - "@babel/plugin-syntax-jsx" "^7.12.13" - "@babel/types" "^7.12.17" - -"@babel/plugin-transform-shorthand-properties@^7.0.0": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.13.tgz" - integrity sha512-xpL49pqPnLtf0tVluuqvzWIgLEhuPpZzvs2yabUHSKRNlN7ScYU7aMlmavOeyXJZKgZKQRBlh8rHbKiJDraTSw== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-transform-spread@^7.0.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.13.0.tgz" - integrity sha512-V6vkiXijjzYeFmQTr3dBxPtZYLPcUfY34DebOU27jIl2M/Y8Egm52Hw82CSjjPqd54GTlJs5x+CR7HeNr24ckg== - dependencies: - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" - -"@babel/plugin-transform-template-literals@^7.0.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.13.0.tgz" - integrity sha512-d67umW6nlfmr1iehCcBv69eSUSySk1EsIS8aTDX4Xo9qajAh6mYtcl4kJrBkGXuxZPEgVr7RVfAvNW6YQkd4Mw== - dependencies: - "@babel/helper-plugin-utils" "^7.13.0" - -"@babel/runtime@^7.0.0", "@babel/runtime@^7.11.2", "@babel/runtime@^7.6.3": - version "7.13.9" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.9.tgz" - integrity sha512-aY2kU+xgJ3dJ1eU6FMB9EH8dIe8dmusF1xEku52joLvw6eAFN0AI+WxCLDnpev2LEejWBAy2sBvBOBAjI3zmvA== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/template@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz" - integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA== - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/parser" "^7.12.13" - "@babel/types" "^7.12.13" - -"@babel/traverse@7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.13.tgz" - integrity sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA== - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.12.13" - "@babel/helper-function-name" "^7.12.13" - "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/parser" "^7.12.13" - "@babel/types" "^7.12.13" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.19" - -"@babel/traverse@^7.0.0", "@babel/traverse@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.0.tgz" - integrity sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ== - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.13.0" - "@babel/helper-function-name" "^7.12.13" - "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/parser" "^7.13.0" - "@babel/types" "^7.13.0" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.19" - -"@babel/types@7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.13.tgz" - integrity sha512-oKrdZTld2im1z8bDwTOQvUbxKwE+854zc16qWZQlcTqMN00pWxHQ4ZeOq0yDMnisOpRykH2/5Qqcrk/OlbAjiQ== - dependencies: - "@babel/helper-validator-identifier" "^7.12.11" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.12.13", "@babel/types@^7.12.17", "@babel/types@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.0.tgz" - integrity sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA== - dependencies: - "@babel/helper-validator-identifier" "^7.12.11" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@eslint/eslintrc@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.0.tgz" - integrity sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog== - dependencies: - ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^12.1.0" - ignore "^4.0.6" - import-fresh "^3.2.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" - strip-json-comments "^3.1.1" - -"@ethersproject/abi@5.0.0-beta.153": - version "5.0.0-beta.153" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz" - integrity sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg== - dependencies: - "@ethersproject/address" ">=5.0.0-beta.128" - "@ethersproject/bignumber" ">=5.0.0-beta.130" - "@ethersproject/bytes" ">=5.0.0-beta.129" - "@ethersproject/constants" ">=5.0.0-beta.128" - "@ethersproject/hash" ">=5.0.0-beta.128" - "@ethersproject/keccak256" ">=5.0.0-beta.127" - "@ethersproject/logger" ">=5.0.0-beta.129" - "@ethersproject/properties" ">=5.0.0-beta.131" - "@ethersproject/strings" ">=5.0.0-beta.130" - -"@ethersproject/abstract-provider@^5.0.8": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.0.9.tgz" - integrity sha512-X9fMkqpeu9ayC3JyBkeeZhn35P4xQkpGX/l+FrxDtEW9tybf/UWXSMi8bGThpPtfJ6q6U2LDetXSpSwK4TfYQQ== - dependencies: - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/networks" "^5.0.7" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/transactions" "^5.0.9" - "@ethersproject/web" "^5.0.12" - -"@ethersproject/abstract-signer@^5.0.10": - version "5.0.13" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.0.13.tgz" - integrity sha512-VBIZEI5OK0TURoCYyw0t3w+TEO4kdwnI9wvt4kqUwyxSn3YCRpXYVl0Xoe7XBR/e5+nYOi2MyFGJ3tsFwONecQ== - dependencies: - "@ethersproject/abstract-provider" "^5.0.8" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - -"@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.9": - version "5.0.10" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.10.tgz" - integrity sha512-70vqESmW5Srua1kMDIN6uVfdneZMaMyRYH4qPvkAXGkbicrCOsA9m01vIloA4wYiiF+HLEfL1ENKdn5jb9xiAw== - dependencies: - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/rlp" "^5.0.7" - -"@ethersproject/base64@^5.0.7": - version "5.0.8" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.0.8.tgz" - integrity sha512-PNbpHOMgZpZ1skvQl119pV2YkCPXmZTxw+T92qX0z7zaMFPypXWTZBzim+hUceb//zx4DFjeGT4aSjZRTOYThg== - dependencies: - "@ethersproject/bytes" "^5.0.9" - -"@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.0.13": - version "5.0.14" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.14.tgz" - integrity sha512-Q4TjMq9Gg3Xzj0aeJWqJgI3tdEiPiET7Y5OtNtjTAODZ2kp4y9jMNg97zVcvPedFvGROdpGDyCI77JDFodUzOw== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - bn.js "^4.4.0" - -"@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.0.9": - version "5.0.10" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.10.tgz" - integrity sha512-vpu0v1LZ1j1s9kERQIMnVU69MyHEzUff7nqK9XuCU4vx+AM8n9lU2gj7jtJIvGSt9HzatK/6I6bWusI5nyuaTA== - dependencies: - "@ethersproject/logger" "^5.0.8" - -"@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.0.8": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.9.tgz" - integrity sha512-2uAKH89UcaJP/Sc+54u92BtJtZ4cPgcS1p0YbB1L3tlkavwNvth+kNCUplIB1Becqs7BOZr0B/3dMNjhJDy4Dg== - dependencies: - "@ethersproject/bignumber" "^5.0.13" - -"@ethersproject/hash@>=5.0.0-beta.128": - version "5.0.11" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.0.11.tgz" - integrity sha512-H3KJ9fk33XWJ2djAW03IL7fg3DsDMYjO1XijiUb1hJ85vYfhvxu0OmsU7d3tg2Uv1H1kFSo8ghr3WFQ8c+NL3g== - dependencies: - "@ethersproject/abstract-signer" "^5.0.10" - "@ethersproject/address" "^5.0.9" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/strings" "^5.0.8" - -"@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.0.7": - version "5.0.8" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.8.tgz" - integrity sha512-zoGbwXcWWs9MX4NOAZ7N0hhgIRl4Q/IO/u9c/RHRY4WqDy3Ywm0OLamEV53QDwhjwn3YiiVwU1Ve5j7yJ0a/KQ== - dependencies: - "@ethersproject/bytes" "^5.0.9" - js-sha3 "0.5.7" - -"@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.0.8": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.9.tgz" - integrity sha512-kV3Uamv3XOH99Xf3kpIG3ZkS7mBNYcLDM00JSDtNgNB4BihuyxpQzIZPRIDmRi+95Z/R1Bb0X2kUNHa/kJoVrw== - -"@ethersproject/networks@^5.0.7": - version "5.0.8" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.0.8.tgz" - integrity sha512-PYpptlO2Tu5f/JEBI5hdlMds5k1DY1QwVbh3LKPb3un9dQA2bC51vd2/gRWAgSBpF3kkmZOj4FhD7ATLX4H+DA== - dependencies: - "@ethersproject/logger" "^5.0.8" - -"@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.0.7": - version "5.0.8" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.8.tgz" - integrity sha512-zEnLMze2Eu2VDPj/05QwCwMKHh506gpT9PP9KPVd4dDB+5d6AcROUYVLoIIQgBYK7X/Gw0UJmG3oVtnxOQafAw== - dependencies: - "@ethersproject/logger" "^5.0.8" - -"@ethersproject/rlp@^5.0.7": - version "5.0.8" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.8.tgz" - integrity sha512-E4wdFs8xRNJfzNHmnkC8w5fPeT4Wd1U2cust3YeT16/46iSkLT8nn8ilidC6KhR7hfuSZE4UqSPzyk76p7cdZg== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - -"@ethersproject/signing-key@^5.0.8": - version "5.0.10" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.10.tgz" - integrity sha512-w5it3GbFOvN6e0mTd5gDNj+bwSe6L9jqqYjU+uaYS8/hAEp4qYLk5p8ZjbJJkNn7u1p0iwocp8X9oH/OdK8apA== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - elliptic "6.5.4" - -"@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.0.8": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.9.tgz" - integrity sha512-ogxBpcUpdO524CYs841MoJHgHxEPUy0bJFDS4Ezg8My+WYVMfVAOlZSLss0Rurbeeam8CpUVDzM4zUn09SU66Q== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/constants" "^5.0.8" - "@ethersproject/logger" "^5.0.8" - -"@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.0.9": - version "5.0.10" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.10.tgz" - integrity sha512-Tqpp+vKYQyQdJQQk4M73tDzO7ODf2D42/sJOcKlDAAbdSni13v6a+31hUdo02qYXhVYwIs+ZjHnO4zKv5BNk8w== - dependencies: - "@ethersproject/address" "^5.0.9" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/constants" "^5.0.8" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/rlp" "^5.0.7" - "@ethersproject/signing-key" "^5.0.8" - -"@ethersproject/web@^5.0.12": - version "5.0.13" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.0.13.tgz" - integrity sha512-G3x/Ns7pQm21ALnWLbdBI5XkW/jrsbXXffI9hKNPHqf59mTxHYtlNiSwxdoTSwCef3Hn7uvGZpaSgTyxs7IufQ== - dependencies: - "@ethersproject/base64" "^5.0.7" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/strings" "^5.0.8" - -"@graphql-tools/batch-delegate@^6.2.4", "@graphql-tools/batch-delegate@^6.2.6": - version "6.2.6" - resolved "https://registry.yarnpkg.com/@graphql-tools/batch-delegate/-/batch-delegate-6.2.6.tgz" - integrity sha512-QUoE9pQtkdNPFdJHSnBhZtUfr3M7pIRoXoMR+TG7DK2Y62ISKbT/bKtZEUU1/2v5uqd5WVIvw9dF8gHDSJAsSA== - dependencies: - "@graphql-tools/delegate" "^6.2.4" - dataloader "2.0.0" - tslib "~2.0.1" - -"@graphql-tools/batch-execute@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/batch-execute/-/batch-execute-7.0.0.tgz" - integrity sha512-+ywPfK6N2Ddna6oOa5Qb1Mv7EA8LOwRNOAPP9dL37FEhksJM9pYqPSceUcqMqg7S9b0+Cgr78s408rgvurV3/Q== - dependencies: - "@graphql-tools/utils" "^7.0.0" - dataloader "2.0.0" - is-promise "4.0.0" - tslib "~2.0.1" - -"@graphql-tools/code-file-loader@^6.2.4": - version "6.3.1" - resolved "https://registry.yarnpkg.com/@graphql-tools/code-file-loader/-/code-file-loader-6.3.1.tgz" - integrity sha512-ZJimcm2ig+avgsEOWWVvAaxZrXXhiiSZyYYOJi0hk9wh5BxZcLUNKkTp6EFnZE/jmGUwuos3pIjUD3Hwi3Bwhg== - dependencies: - "@graphql-tools/graphql-tag-pluck" "^6.5.1" - "@graphql-tools/utils" "^7.0.0" - tslib "~2.1.0" - -"@graphql-tools/delegate@^6.2.4": - version "6.2.4" - resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-6.2.4.tgz" - integrity sha512-mXe6DfoWmq49kPcDrpKHgC2DSWcD5q0YCaHHoXYPAOlnLH8VMTY8BxcE8y/Do2eyg+GLcwAcrpffVszWMwqw0w== - dependencies: - "@ardatan/aggregate-error" "0.0.6" - "@graphql-tools/schema" "^6.2.4" - "@graphql-tools/utils" "^6.2.4" - dataloader "2.0.0" - is-promise "4.0.0" - tslib "~2.0.1" - -"@graphql-tools/delegate@^7.0.1", "@graphql-tools/delegate@^7.0.7": - version "7.0.10" - resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-7.0.10.tgz" - integrity sha512-6Di9ia5ohoDvrHuhj2cak1nJGhIefJmUsd3WKZcJ2nu2yZAFawWMxGvQImqv3N7iyaWKiVhrrK8Roi/JrYhdKg== - dependencies: - "@ardatan/aggregate-error" "0.0.6" - "@graphql-tools/batch-execute" "^7.0.0" - "@graphql-tools/schema" "^7.0.0" - "@graphql-tools/utils" "^7.1.6" - dataloader "2.0.0" - is-promise "4.0.0" - tslib "~2.1.0" - -"@graphql-tools/git-loader@^6.2.4": - version "6.2.6" - resolved "https://registry.yarnpkg.com/@graphql-tools/git-loader/-/git-loader-6.2.6.tgz" - integrity sha512-ooQTt2CaG47vEYPP3CPD+nbA0F+FYQXfzrB1Y1ABN9K3d3O2RK3g8qwslzZaI8VJQthvKwt0A95ZeE4XxteYfw== - dependencies: - "@graphql-tools/graphql-tag-pluck" "^6.2.6" - "@graphql-tools/utils" "^7.0.0" - tslib "~2.1.0" - -"@graphql-tools/github-loader@^6.2.4": - version "6.2.5" - resolved "https://registry.yarnpkg.com/@graphql-tools/github-loader/-/github-loader-6.2.5.tgz" - integrity sha512-DLuQmYeNNdPo8oWus8EePxWCfCAyUXPZ/p1PWqjrX/NGPyH2ZObdqtDAfRHztljt0F/qkBHbGHCEk2TKbRZTRw== - dependencies: - "@graphql-tools/graphql-tag-pluck" "^6.2.6" - "@graphql-tools/utils" "^7.0.0" - cross-fetch "3.0.6" - tslib "~2.0.1" - -"@graphql-tools/graphql-file-loader@^6.2.4": - version "6.2.7" - resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-file-loader/-/graphql-file-loader-6.2.7.tgz" - integrity sha512-5k2SNz0W87tDcymhEMZMkd6/vs6QawDyjQXWtqkuLTBF3vxjxPD1I4dwHoxgWPIjjANhXybvulD7E+St/7s9TQ== - dependencies: - "@graphql-tools/import" "^6.2.6" - "@graphql-tools/utils" "^7.0.0" - tslib "~2.1.0" - -"@graphql-tools/graphql-tag-pluck@^6.2.4", "@graphql-tools/graphql-tag-pluck@^6.2.6", "@graphql-tools/graphql-tag-pluck@^6.5.1": - version "6.5.1" - resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-6.5.1.tgz" - integrity sha512-7qkm82iFmcpb8M6/yRgzjShtW6Qu2OlCSZp8uatA3J0eMl87TxyJoUmL3M3UMMOSundAK8GmoyNVFUrueueV5Q== - dependencies: - "@babel/parser" "7.12.16" - "@babel/traverse" "7.12.13" - "@babel/types" "7.12.13" - "@graphql-tools/utils" "^7.0.0" - tslib "~2.1.0" - -"@graphql-tools/import@^6.2.4", "@graphql-tools/import@^6.2.6": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.3.0.tgz" - integrity sha512-zmaVhJ3UPjzJSb005Pjn2iWvH+9AYRXI4IUiTi14uPupiXppJP3s7S25Si3+DbHpFwurDF2nWRxBLiFPWudCqw== - dependencies: - resolve-from "5.0.0" - tslib "~2.1.0" - -"@graphql-tools/json-file-loader@^6.2.4": - version "6.2.6" - resolved "https://registry.yarnpkg.com/@graphql-tools/json-file-loader/-/json-file-loader-6.2.6.tgz" - integrity sha512-CnfwBSY5926zyb6fkDBHnlTblHnHI4hoBALFYXnrg0Ev4yWU8B04DZl/pBRUc459VNgO2x8/mxGIZj2hPJG1EA== - dependencies: - "@graphql-tools/utils" "^7.0.0" - tslib "~2.0.1" - -"@graphql-tools/links@^6.2.4": - version "6.2.5" - resolved "https://registry.yarnpkg.com/@graphql-tools/links/-/links-6.2.5.tgz" - integrity sha512-XeGDioW7F+HK6HHD/zCeF0HRC9s12NfOXAKv1HC0J7D50F4qqMvhdS/OkjzLoBqsgh/Gm8icRc36B5s0rOA9ig== - dependencies: - "@graphql-tools/utils" "^7.0.0" - apollo-link "1.2.14" - apollo-upload-client "14.1.2" - cross-fetch "3.0.6" - form-data "3.0.0" - is-promise "4.0.0" - tslib "~2.0.1" - -"@graphql-tools/load-files@^6.2.4": - version "6.2.7" - resolved "https://registry.yarnpkg.com/@graphql-tools/load-files/-/load-files-6.2.7.tgz" - integrity sha512-6L0d+F1jJkamiUNPjmxVDRMrauaD/Jp9aSzmp9zxeeZhIuG6V/jbhBBgMbNscMviYJfwDbHvnOJ3fmYpZyM9kg== - dependencies: - globby "11.0.2" - tslib "~2.1.0" - unixify "1.0.0" - -"@graphql-tools/load@^6.2.4": - version "6.2.7" - resolved "https://registry.yarnpkg.com/@graphql-tools/load/-/load-6.2.7.tgz" - integrity sha512-b1qWjki1y/QvGtoqW3x8bcwget7xmMfLGsvGFWOB6m38tDbzVT3GlJViAC0nGPDks9OCoJzAdi5IYEkBaqH5GQ== - dependencies: - "@graphql-tools/merge" "^6.2.9" - "@graphql-tools/utils" "^7.5.0" - globby "11.0.2" - import-from "3.0.0" - is-glob "4.0.1" - p-limit "3.1.0" - tslib "~2.1.0" - unixify "1.0.0" - valid-url "1.0.9" - -"@graphql-tools/merge@^6.2.4", "@graphql-tools/merge@^6.2.9": - version "6.2.10" - resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-6.2.10.tgz" - integrity sha512-dM3n37PcslvhOAkCz7Cwk0BfoiSVKXGmCX+VMZkATbXk/0vlxUfNEpVfA5yF4IkP27F04SzFQSaNrbD0W2Rszw== - dependencies: - "@graphql-tools/schema" "^7.0.0" - "@graphql-tools/utils" "^7.5.0" - tslib "~2.1.0" - -"@graphql-tools/mock@^6.2.4": - version "6.2.4" - resolved "https://registry.yarnpkg.com/@graphql-tools/mock/-/mock-6.2.4.tgz" - integrity sha512-O5Zvq/mcDZ7Ptky0IZ4EK9USmxV6FEVYq0Jxv2TI80kvxbCjt0tbEpZ+r1vIt1gZOXlAvadSHYyzWnUPh+1vkQ== - dependencies: - "@graphql-tools/schema" "^6.2.4" - "@graphql-tools/utils" "^6.2.4" - tslib "~2.0.1" - -"@graphql-tools/module-loader@^6.2.4": - version "6.2.7" - resolved "https://registry.yarnpkg.com/@graphql-tools/module-loader/-/module-loader-6.2.7.tgz" - integrity sha512-ItAAbHvwfznY9h1H9FwHYDstTcm22Dr5R9GZtrWlpwqj0jaJGcBxsMB9jnK9kFqkbtFYEe4E/NsSnxsS4/vViQ== - dependencies: - "@graphql-tools/utils" "^7.5.0" - tslib "~2.1.0" - -"@graphql-tools/relay-operation-optimizer@^6.2.4": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.3.0.tgz" - integrity sha512-Or3UgRvkY9Fq1AAx7q38oPqFmTepLz7kp6wDHKyR0ceG7AvHv5En22R12mAeISInbhff4Rpwgf6cE8zHRu6bCw== - dependencies: - "@graphql-tools/utils" "^7.1.0" - relay-compiler "10.1.0" - tslib "~2.0.1" - -"@graphql-tools/resolvers-composition@^6.2.4": - version "6.2.6" - resolved "https://registry.yarnpkg.com/@graphql-tools/resolvers-composition/-/resolvers-composition-6.2.6.tgz" - integrity sha512-QO0PC5RG0SolOksupOuB4B0tuzEsQFwQrwD9xLHCrJmjaLi66lOKMFzN40IBY5rqg0k/zqPyjII8rtzcNobvIg== - dependencies: - "@graphql-tools/utils" "^7.0.0" - lodash "4.17.21" - tslib "~2.1.0" - -"@graphql-tools/schema@^6.2.4": - version "6.2.4" - resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-6.2.4.tgz" - integrity sha512-rh+14lSY1q8IPbEv2J9x8UBFJ5NrDX9W5asXEUlPp+7vraLp/Tiox4GXdgyA92JhwpYco3nTf5Bo2JDMt1KnAQ== - dependencies: - "@graphql-tools/utils" "^6.2.4" - tslib "~2.0.1" - -"@graphql-tools/schema@^7.0.0", "@graphql-tools/schema@^7.1.2": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-7.1.3.tgz" - integrity sha512-ZY76hmcJlF1iyg3Im0sQ3ASRkiShjgv102vLTVcH22lEGJeCaCyyS/GF1eUHom418S60bS8Th6+autRUxfBiBg== - dependencies: - "@graphql-tools/utils" "^7.1.2" - tslib "~2.1.0" - -"@graphql-tools/stitch@^6.2.4": - version "6.2.4" - resolved "https://registry.yarnpkg.com/@graphql-tools/stitch/-/stitch-6.2.4.tgz" - integrity sha512-0C7PNkS7v7iAc001m7c1LPm5FUB0/DYw+s3OyCii6YYYHY8NwdI0roeOyeDGFJkFubWBQfjc3hoSyueKtU73mw== - dependencies: - "@graphql-tools/batch-delegate" "^6.2.4" - "@graphql-tools/delegate" "^6.2.4" - "@graphql-tools/merge" "^6.2.4" - "@graphql-tools/schema" "^6.2.4" - "@graphql-tools/utils" "^6.2.4" - "@graphql-tools/wrap" "^6.2.4" - is-promise "4.0.0" - tslib "~2.0.1" - -"@graphql-tools/url-loader@^6.2.4": - version "6.8.1" - resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-6.8.1.tgz" - integrity sha512-iE/y9IAu0cZYL7o9IIDdGm5WjxacN25nGgVqjZINYlisW/wyuBxng7DMJBAp6yM6gkxkCpMno1ljA/52MXzVPQ== - dependencies: - "@graphql-tools/delegate" "^7.0.1" - "@graphql-tools/utils" "^7.1.5" - "@graphql-tools/wrap" "^7.0.4" - "@types/websocket" "1.0.1" - cross-fetch "3.0.6" - eventsource "1.0.7" - extract-files "9.0.0" - form-data "4.0.0" - graphql-upload "^11.0.0" - graphql-ws "4.1.5" - is-promise "4.0.0" - isomorphic-ws "4.0.1" - sse-z "0.3.0" - sync-fetch "0.3.0" - tslib "~2.1.0" - valid-url "1.0.9" - ws "7.4.3" - -"@graphql-tools/utils@^6.2.4": - version "6.2.4" - resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-6.2.4.tgz" - integrity sha512-ybgZ9EIJE3JMOtTrTd2VcIpTXtDrn2q6eiYkeYMKRVh3K41+LZa6YnR2zKERTXqTWqhobROwLt4BZbw2O3Aeeg== - dependencies: - "@ardatan/aggregate-error" "0.0.6" - camel-case "4.1.1" - tslib "~2.0.1" - -"@graphql-tools/utils@^7.0.0", "@graphql-tools/utils@^7.1.0", "@graphql-tools/utils@^7.1.2", "@graphql-tools/utils@^7.1.5", "@graphql-tools/utils@^7.1.6", "@graphql-tools/utils@^7.2.1", "@graphql-tools/utils@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-7.5.0.tgz" - integrity sha512-8f//RSqHmKRdg9A3GHlZdxzlVfF/938ZD9edXLW7EriSABg1BXu3veru9W02VqORypArb2S/Tyeyvsk2gForqA== - dependencies: - "@ardatan/aggregate-error" "0.0.6" - camel-case "4.1.2" - tslib "~2.1.0" - -"@graphql-tools/wrap@^6.2.4": - version "6.2.4" - resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-6.2.4.tgz" - integrity sha512-cyQgpybolF9DjL2QNOvTS1WDCT/epgYoiA8/8b3nwv5xmMBQ6/6nYnZwityCZ7njb7MMyk7HBEDNNlP9qNJDcA== - dependencies: - "@graphql-tools/delegate" "^6.2.4" - "@graphql-tools/schema" "^6.2.4" - "@graphql-tools/utils" "^6.2.4" - is-promise "4.0.0" - tslib "~2.0.1" - -"@graphql-tools/wrap@^7.0.4": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-7.0.5.tgz" - integrity sha512-KCWBXsDfvG46GNUawRltJL4j9BMGoOG7oo3WEyCQP+SByWXiTe5cBF45SLDVQgdjljGNZhZ4Lq/7avIkF7/zDQ== - dependencies: - "@graphql-tools/delegate" "^7.0.7" - "@graphql-tools/schema" "^7.1.2" - "@graphql-tools/utils" "^7.2.1" - is-promise "4.0.0" - tslib "~2.0.1" - -"@graphql-typed-document-node/core@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.0.tgz" - integrity sha512-wYn6r8zVZyQJ6rQaALBEln5B1pzxb9shV5Ef97kTvn6yVGrqyXVnDqnU24MXnFubR+rZjBY9NWuxX3FB2sTsjg== - -"@gulp-sourcemaps/map-sources@1.X": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz" - integrity sha1-iQrnxdjId/bThIYCFazp1+yUW9o= - dependencies: - normalize-path "^2.0.1" - through2 "^2.0.3" - -"@nodelib/fs.scandir@2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz" - integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== - dependencies: - "@nodelib/fs.stat" "2.0.4" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz" - integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz" - integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== - dependencies: - "@nodelib/fs.scandir" "2.1.4" - fastq "^1.6.0" - -"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz" - integrity sha1-m4sMxmPWaafY9vXQiToU00jzD78= - -"@protobufjs/base64@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz" - integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== - -"@protobufjs/codegen@^2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz" - integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== - -"@protobufjs/eventemitter@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz" - integrity sha1-NVy8mLr61ZePntCV85diHx0Ga3A= - -"@protobufjs/fetch@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz" - integrity sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU= - dependencies: - "@protobufjs/aspromise" "^1.1.1" - "@protobufjs/inquire" "^1.1.0" - -"@protobufjs/float@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz" - integrity sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E= - -"@protobufjs/inquire@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz" - integrity sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik= - -"@protobufjs/path@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz" - integrity sha1-bMKyDFya1q0NzP0hynZz2Nf79o0= - -"@protobufjs/pool@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz" - integrity sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q= - -"@protobufjs/utf8@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz" - integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= - -"@redux-saga/core@^1.0.0": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@redux-saga/core/-/core-1.1.3.tgz" - integrity sha512-8tInBftak8TPzE6X13ABmEtRJGjtK17w7VUs7qV17S8hCO5S3+aUTWZ/DBsBJPdE8Z5jOPwYALyvofgq1Ws+kg== - dependencies: - "@babel/runtime" "^7.6.3" - "@redux-saga/deferred" "^1.1.2" - "@redux-saga/delay-p" "^1.1.2" - "@redux-saga/is" "^1.1.2" - "@redux-saga/symbols" "^1.1.2" - "@redux-saga/types" "^1.1.0" - redux "^4.0.4" - typescript-tuple "^2.2.1" - -"@redux-saga/deferred@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@redux-saga/deferred/-/deferred-1.1.2.tgz" - integrity sha512-908rDLHFN2UUzt2jb4uOzj6afpjgJe3MjICaUNO3bvkV/kN/cNeI9PMr8BsFXB/MR8WTAZQq/PlTq8Kww3TBSQ== - -"@redux-saga/delay-p@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@redux-saga/delay-p/-/delay-p-1.1.2.tgz" - integrity sha512-ojc+1IoC6OP65Ts5+ZHbEYdrohmIw1j9P7HS9MOJezqMYtCDgpkoqB5enAAZrNtnbSL6gVCWPHaoaTY5KeO0/g== - dependencies: - "@redux-saga/symbols" "^1.1.2" - -"@redux-saga/is@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@redux-saga/is/-/is-1.1.2.tgz" - integrity sha512-OLbunKVsCVNTKEf2cH4TYyNbbPgvmZ52iaxBD4I1fTif4+MTXMa4/Z07L83zW/hTCXwpSZvXogqMqLfex2Tg6w== - dependencies: - "@redux-saga/symbols" "^1.1.2" - "@redux-saga/types" "^1.1.0" - -"@redux-saga/symbols@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@redux-saga/symbols/-/symbols-1.1.2.tgz" - integrity sha512-EfdGnF423glv3uMwLsGAtE6bg+R9MdqlHEzExnfagXPrIiuxwr3bdiAwz3gi+PsrQ3yBlaBpfGLtDG8rf3LgQQ== - -"@redux-saga/types@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@redux-saga/types/-/types-1.1.0.tgz" - integrity sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg== - -"@sindresorhus/is@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz" - integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== - -"@szmarczak/http-timer@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz" - integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== - dependencies: - defer-to-connect "^1.0.1" - -"@truffle/abi-utils@^0.1.4", "@truffle/abi-utils@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-0.1.5.tgz" - integrity sha512-PvCN/qebM0boK2YycX3sMe6CwoLtB7cpYj2ugHPtcQ+Zpg1hQRGS+GRLeBuQg3RR5X8IxzLb4YPZh5dnJxMZYA== - dependencies: - change-case "3.0.2" - faker "^5.3.1" - fast-check "^2.12.1" - source-map-support "^0.5.19" - -"@truffle/code-utils@^1.2.23", "@truffle/code-utils@^1.2.24": - version "1.2.24" - resolved "https://registry.yarnpkg.com/@truffle/code-utils/-/code-utils-1.2.24.tgz" - integrity sha512-IqpbTh4uNQueadv96GBWBaGTYTyOsLKE9Dui1wpiijON6xq2iIcTArej1vMh+nkAd5/AsP+enbBY8mksm6rFBg== - dependencies: - cbor "^5.1.0" - source-map-support "^0.5.19" - -"@truffle/codec@^0.10.1": - version "0.10.1" - resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.10.1.tgz" - integrity sha512-c1lC9Wcp+Z1DLvEYH3dkEtMKnUJx72CirO3kmi0OgFSA5QqTDCtfrVOhAugcb/iMLgqUK05/pexp2whb4oASKA== - dependencies: - big.js "^5.2.2" - bn.js "^5.1.3" - cbor "^5.1.0" - debug "^4.3.1" - lodash.clonedeep "^4.5.0" - lodash.escaperegexp "^4.1.2" - lodash.partition "^4.6.0" - lodash.sum "^4.0.2" - semver "^7.3.4" - source-map-support "^0.5.19" - utf8 "^3.0.0" - web3-utils "1.2.9" - -"@truffle/config@^1.2.35": - version "1.2.35" - resolved "https://registry.yarnpkg.com/@truffle/config/-/config-1.2.35.tgz" - integrity sha512-ULTS9t3ldqEV1VBVNWlS9tdWJ0r637ANspzBoQd6S/Ab7CfueQhcIfp29oz6Ahcgjkl4NX+Gu/dG6/Jiys81vg== - dependencies: - "@truffle/error" "^0.0.12" - "@truffle/events" "^0.0.9" - "@truffle/provider" "^0.2.26" - configstore "^4.0.0" - find-up "^2.1.0" - lodash.assignin "^4.2.0" - lodash.merge "^4.6.2" - module "^1.2.5" - original-require "^1.0.1" - source-map-support "^0.5.19" - -"@truffle/db@^0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@truffle/db/-/db-0.5.2.tgz" - integrity sha512-bp9/WkB8coWF1Ctqgt+hshAMNrKWi2+VILAqKpAjgr3FkUcFO05OkguT0zwH4J0uHeGMCN0+dQ2ulXhORbmXNg== - dependencies: - "@truffle/abi-utils" "^0.1.4" - "@truffle/code-utils" "^1.2.23" - "@truffle/config" "^1.2.35" - apollo-server "^2.18.2" - debug "^4.3.1" - fs-extra "^9.1.0" - graphql "^15.3.0" - graphql-tag "^2.11.0" - graphql-tools "^6.2.4" - json-stable-stringify "^1.0.1" - jsondown "^1.0.0" - pascal-case "^2.0.1" - pluralize "^8.0.0" - pouchdb "7.1.1" - pouchdb-adapter-memory "^7.1.1" - pouchdb-adapter-node-websql "^7.0.0" - pouchdb-debug "^7.1.1" - pouchdb-find "^7.0.0" - source-map-support "^0.5.19" - web3-utils "1.2.9" - -"@truffle/debugger@^8.0.16": - version "8.0.16" - resolved "https://registry.yarnpkg.com/@truffle/debugger/-/debugger-8.0.16.tgz" - integrity sha512-+NpsF92yrKBnArGx+RUq2uQPex4E4QPN68/w/+8Z4fYjpi2xQwLZ6HwYaTNWQ3g5XOKiQQOs50mp2pbuMTQeLw== - dependencies: - "@truffle/abi-utils" "^0.1.5" - "@truffle/codec" "^0.10.1" - "@truffle/source-map-utils" "^1.3.35" - bn.js "^5.1.3" - debug "^4.3.1" - json-pointer "^0.6.0" - json-stable-stringify "^1.0.1" - lodash.flatten "^4.4.0" - lodash.merge "^4.6.2" - lodash.sum "^4.0.2" - lodash.zipwith "^4.2.0" - redux "^3.7.2" - redux-cli-logger "^2.0.1" - redux-saga "1.0.0" - remote-redux-devtools "^0.5.12" - reselect-tree "^1.3.4" - semver "^7.3.4" - source-map-support "^0.5.19" - web3 "1.2.9" - web3-eth-abi "1.2.9" - -"@truffle/error@^0.0.12": - version "0.0.12" - resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.12.tgz" - integrity sha512-kZqqnPR9YDJG7KCDOcN1qH16Qs0oz1PzF0Y93AWdhXuL9S9HYo/RUUeqGKbPpRBEZldQUS8aa4EzfK08u5pu6g== - -"@truffle/events@^0.0.9": - version "0.0.9" - resolved "https://registry.yarnpkg.com/@truffle/events/-/events-0.0.9.tgz" - integrity sha512-o0rS8zkjCzg2vDJymSZyyq1eKdkRbxIFnsnYQl6Bc2StK89C/ZISenxrUe2fbdeq3L9Zq+ds1mSKH/MFK0Ejkg== - dependencies: - emittery "^0.4.1" - ora "^3.4.0" - -"@truffle/interface-adapter@^0.4.19": - version "0.4.19" - resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.4.19.tgz" - integrity sha512-+Zz6Fr8+I2wYSS8RM3WBOMzf22QffMQTnlsYsRgRHzv3gYoRA9ZDLb84lFRfmWyw+IdXTo90tjRHEb5krC6uxg== - dependencies: - bn.js "^5.1.3" - ethers "^4.0.32" - source-map-support "^0.5.19" - web3 "1.2.9" - -"@truffle/provider@^0.2.26": - version "0.2.26" - resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.2.26.tgz" - integrity sha512-YKPmhB9S9AQkT2ePGtadwjDduxU23DXXy+5zyM5fevw5GCbXSnf+jG6rICXjPkVFjuKBlXuq5JbuERZn43522Q== - dependencies: - "@truffle/error" "^0.0.12" - "@truffle/interface-adapter" "^0.4.19" - web3 "1.2.9" - -"@truffle/source-map-utils@^1.3.35": - version "1.3.35" - resolved "https://registry.yarnpkg.com/@truffle/source-map-utils/-/source-map-utils-1.3.35.tgz" - integrity sha512-j3PHac4g/yQwxSB899lkal/YMuIXLNNlDGfCog2QrWqdtK7HJhx6X2tftwqrZzO4JTKc1Cs8KOCPOndx9W2xeQ== - dependencies: - "@truffle/code-utils" "^1.2.24" - "@truffle/codec" "^0.10.1" - debug "^4.3.1" - json-pointer "^0.6.0" - node-interval-tree "^1.3.3" - web3-utils "1.2.9" - -"@types/accepts@*", "@types/accepts@^1.3.5": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@types/accepts/-/accepts-1.3.5.tgz" - integrity sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ== - dependencies: - "@types/node" "*" - -"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.4": - version "4.11.6" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz" - integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== - dependencies: - "@types/node" "*" - -"@types/body-parser@*", "@types/body-parser@1.19.0": - version "1.19.0" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.0.tgz" - integrity sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ== - dependencies: - "@types/connect" "*" - "@types/node" "*" - -"@types/connect@*": - version "3.4.34" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.34.tgz" - integrity sha512-ePPA/JuI+X0vb+gSWlPKOY0NdNAie/rPUqX2GUPpbZwiKTkSPhjXWuee47E4MtE54QVzGCQMQkAL6JhV2E1+cQ== - dependencies: - "@types/node" "*" - -"@types/content-disposition@*": - version "0.5.3" - resolved "https://registry.yarnpkg.com/@types/content-disposition/-/content-disposition-0.5.3.tgz" - integrity sha512-P1bffQfhD3O4LW0ioENXUhZ9OIa0Zn+P7M+pWgkCKaT53wVLSq0mrKksCID/FGHpFhRSxRGhgrQmfhRuzwtKdg== - -"@types/cookies@*": - version "0.7.6" - resolved "https://registry.yarnpkg.com/@types/cookies/-/cookies-0.7.6.tgz" - integrity sha512-FK4U5Qyn7/Sc5ih233OuHO0qAkOpEcD/eG6584yEiLKizTFRny86qHLe/rej3HFQrkBuUjF4whFliAdODbVN/w== - dependencies: - "@types/connect" "*" - "@types/express" "*" - "@types/keygrip" "*" - "@types/node" "*" - -"@types/cors@2.8.8": - version "2.8.8" - resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.8.tgz" - integrity sha512-fO3gf3DxU2Trcbr75O7obVndW/X5k8rJNZkLXlQWStTHhP71PkRqjwPIEI0yMnJdg9R9OasjU+Bsr+Hr1xy/0w== - dependencies: - "@types/express" "*" - -"@types/express-serve-static-core@*", "@types/express-serve-static-core@4.17.18", "@types/express-serve-static-core@^4.17.18": - version "4.17.18" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.18.tgz" - integrity sha512-m4JTwx5RUBNZvky/JJ8swEJPKFd8si08pPF2PfizYjGZOKr/svUWPcoUmLow6MmPzhasphB7gSTINY67xn3JNA== - dependencies: - "@types/node" "*" - "@types/qs" "*" - "@types/range-parser" "*" - -"@types/express@*": - version "4.17.11" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.11.tgz" - integrity sha512-no+R6rW60JEc59977wIxreQVsIEOAYwgCqldrA/vkpCnbD7MqTefO97lmoBe4WE0F156bC4uLSP1XHDOySnChg== - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "^4.17.18" - "@types/qs" "*" - "@types/serve-static" "*" - -"@types/express@4.17.7": - version "4.17.7" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.7.tgz" - integrity sha512-dCOT5lcmV/uC2J9k0rPafATeeyz+99xTt54ReX11/LObZgfzJqZNcW27zGhYyX+9iSEGXGt5qLPwRSvBZcLvtQ== - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "*" - "@types/qs" "*" - "@types/serve-static" "*" - -"@types/fs-capacitor@*": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/fs-capacitor/-/fs-capacitor-2.0.0.tgz" - integrity sha512-FKVPOCFbhCvZxpVAMhdBdTfVfXUpsh15wFHgqOKxh9N9vzWZVuWCSijZ5T4U34XYNnuj2oduh6xcs1i+LPI+BQ== - dependencies: - "@types/node" "*" - -"@types/http-assert@*": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@types/http-assert/-/http-assert-1.5.1.tgz" - integrity sha512-PGAK759pxyfXE78NbKxyfRcWYA/KwW17X290cNev/qAsn9eQIxkH4shoNBafH37wewhDG/0p1cHPbK6+SzZjWQ== - -"@types/http-errors@*": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-1.8.0.tgz" - integrity sha512-2aoSC4UUbHDj2uCsCxcG/vRMXey/m17bC7UwitVm5hn22nI8O8Y9iDpA76Orc+DWkQ4zZrOKEshCqR/jSuXAHA== - -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" - integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= - -"@types/keygrip@*": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@types/keygrip/-/keygrip-1.0.2.tgz" - integrity sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw== - -"@types/koa-compose@*": - version "3.2.5" - resolved "https://registry.yarnpkg.com/@types/koa-compose/-/koa-compose-3.2.5.tgz" - integrity sha512-B8nG/OoE1ORZqCkBVsup/AKcvjdgoHnfi4pZMn5UwAPCbhk/96xyv284eBYW8JlQbQ7zDmnpFr68I/40mFoIBQ== - dependencies: - "@types/koa" "*" - -"@types/koa@*": - version "2.13.0" - resolved "https://registry.yarnpkg.com/@types/koa/-/koa-2.13.0.tgz" - integrity sha512-hNs1Z2lX+R5sZroIy/WIGbPlH/719s/Nd5uIjSIAdHn9q+g7z6mxOnhwMjK1urE4/NUP0SOoYUOD4MnvD9FRNw== - dependencies: - "@types/accepts" "*" - "@types/content-disposition" "*" - "@types/cookies" "*" - "@types/http-assert" "*" - "@types/http-errors" "*" - "@types/keygrip" "*" - "@types/koa-compose" "*" - "@types/node" "*" - -"@types/long@^4.0.0": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz" - integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== - -"@types/mime@^1": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz" - integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== - -"@types/mocha@^8.2.1": - version "8.2.1" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.1.tgz#f3f3ae4590c5386fc7c543aae9b78d4cf30ffee9" - integrity sha512-NysN+bNqj6E0Hv4CTGWSlPzMW6vTKjDpOteycDkV4IWBsO+PU48JonrPzV9ODjiI2XrjmA05KInLgF5ivZ/YGQ== - -"@types/node-fetch@2.5.7": - version "2.5.7" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz" - integrity sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw== - dependencies: - "@types/node" "*" - form-data "^3.0.0" - -"@types/node@*": - version "14.14.31" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.31.tgz" - integrity sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g== - -"@types/node@^10.1.0", "@types/node@^10.12.18": - version "10.17.54" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.54.tgz" - integrity sha512-c8Lm7+hXdSPmWH4B9z/P/xIXhFK3mCQin4yCYMd2p1qpMG5AfgyJuYZ+3q2dT7qLiMMMGMd5dnkFpdqJARlvtQ== - -"@types/node@^12.6.1": - version "12.20.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.4.tgz" - integrity sha512-xRCgeE0Q4pT5UZ189TJ3SpYuX/QGl6QIAOAIeDSbAVAd2gX1NxSZup4jNVK7cxIeP8KDSbJgcckun495isP1jQ== - -"@types/pbkdf2@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz" - integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== - dependencies: - "@types/node" "*" - -"@types/qs@*": - version "6.9.5" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.5.tgz" - integrity sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ== - -"@types/range-parser@*": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz" - integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== - -"@types/secp256k1@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.1.tgz" - integrity sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog== - dependencies: - "@types/node" "*" - -"@types/serve-static@*": - version "1.13.9" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.9.tgz" - integrity sha512-ZFqF6qa48XsPdjXV5Gsz0Zqmux2PerNd3a/ktL45mHpa19cuMi/cL8tcxdAx497yRh+QtYPuofjT9oWw9P7nkA== - dependencies: - "@types/mime" "^1" - "@types/node" "*" - -"@types/ungap__global-this@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@types/ungap__global-this/-/ungap__global-this-0.3.1.tgz" - integrity sha512-+/DsiV4CxXl6ZWefwHZDXSe1Slitz21tom38qPCaG0DYCS1NnDPIQDTKcmQ/tvK/edJUKkmuIDBJbmKDiB0r/g== - -"@types/websocket@1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-1.0.1.tgz" - integrity sha512-f5WLMpezwVxCLm1xQe/kdPpQIOmL0TXYx2O15VYfYzc7hTIdxiOoOvez+McSIw3b7z/1zGovew9YSL7+h4h7/Q== - dependencies: - "@types/node" "*" - -"@types/ws@^7.0.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.0.tgz" - integrity sha512-Y29uQ3Uy+58bZrFLhX36hcI3Np37nqWE7ky5tjiDoy1GDZnIwVxS0CgF+s+1bXMzjKBFy+fqaRfb708iNzdinw== - dependencies: - "@types/node" "*" - -"@types/zen-observable@^0.8.0": - version "0.8.2" - resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.2.tgz" - integrity sha512-HrCIVMLjE1MOozVoD86622S7aunluLb2PJdPfb3nYiEtohm8mIB/vyv0Fd37AdeMFrTUQXEunw78YloMA3Qilg== - -"@ungap/global-this@^0.4.2": - version "0.4.4" - resolved "https://registry.yarnpkg.com/@ungap/global-this/-/global-this-0.4.4.tgz" - integrity sha512-mHkm6FvepJECMNthFuIgpAEFmPOk71UyXuIxYfjytvFTnSDBIz7jmViO+LfHI/AjrazWije0PnSP3+/NlwzqtA== - -"@wry/context@^0.5.2": - version "0.5.4" - resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.5.4.tgz" - integrity sha512-/pktJKHUXDr4D6TJqWgudOPJW2Z+Nb+bqk40jufA3uTkLbnCRKdJPiYDIa/c7mfcPH8Hr6O8zjCERpg5Sq04Zg== - dependencies: - tslib "^1.14.1" - -"@wry/equality@^0.1.2": - version "0.1.11" - resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.11.tgz" - integrity sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA== - dependencies: - tslib "^1.9.3" - -"@wry/equality@^0.3.0": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.3.3.tgz" - integrity sha512-pMrKHIgDAWxLDTGsbaVag+USmwZ2+gGrSBrtyGUxp2pxRg1Cad70lI/hd0NTPtJ4zJxN16EQ679U1Rts83AF5g== - dependencies: - tslib "^1.14.1" - -"@wry/trie@^0.2.1": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@wry/trie/-/trie-0.2.2.tgz" - integrity sha512-OxqBB39x6MfHaa2HpMiRMfhuUnQTddD32Ko020eBeJXq87ivX6xnSSnzKHVbA21p7iqBASz8n/07b6W5wW1BVQ== - dependencies: - tslib "^1.14.1" - -abab@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz" - integrity sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4= - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -abort-controller@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - -abstract-leveldown@^6.2.1: - version "6.3.0" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz" - integrity sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ== - dependencies: - buffer "^5.5.0" - immediate "^3.2.3" - level-concat-iterator "~2.0.0" - level-supports "~1.0.0" - xtend "~4.0.0" - -abstract-leveldown@~2.7.1: - version "2.7.2" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz" - integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== - dependencies: - xtend "~4.0.0" - -abstract-leveldown@~6.0.0, abstract-leveldown@~6.0.1: - version "6.0.3" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.0.3.tgz" - integrity sha512-jzewKKpZbaYUa6HTThnrl+GrJhzjEAeuc7hTVpZdzg7kupXZFoqQDFwyOwLNbmJKJlmzw8yiipMPkDiuKkT06Q== - dependencies: - level-concat-iterator "~2.0.0" - xtend "~4.0.0" - -abstract-leveldown@~6.2.1: - version "6.2.3" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz" - integrity sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ== - dependencies: - buffer "^5.5.0" - immediate "^3.2.3" - level-concat-iterator "~2.0.0" - level-supports "~1.0.0" - xtend "~4.0.0" - -accepts@^1.3.5, accepts@~1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - -acorn-globals@^1.0.4: - version "1.0.9" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-1.0.9.tgz" - integrity sha1-VbtemGkVB7dFedBRNBMhfDgMVM8= - dependencies: - acorn "^2.1.0" - -acorn-jsx@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz" - integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== - -acorn@4.X: - version "4.0.13" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz" - integrity sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c= - -acorn@^2.1.0, acorn@^2.4.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz" - integrity sha1-q259nYhqrKiwhbwzEreaGYQz8Oc= - -acorn@^7.4.0: - version "7.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== - -aes-js@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz" - integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= - -ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^7.0.2: - version "7.1.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-7.1.1.tgz" - integrity sha512-ga/aqDYnUy/o7vbsRTFhhTsNeXiYb5JWDIcRIeZfwRNCefwjNTVYCGdGSUrEmiu3yDK3vFvNbgJxvrQW4JXrYQ== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ansi-colors@4.1.1, ansi-colors@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.0, ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -anymatch@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -apollo-cache-control@^0.11.6: - version "0.11.6" - resolved "https://registry.yarnpkg.com/apollo-cache-control/-/apollo-cache-control-0.11.6.tgz" - integrity sha512-YZ+uuIG+fPy+mkpBS2qKF0v1qlzZ3PW6xZVaDukeK3ed3iAs4L/2YnkTqau3OmoF/VPzX2FmSkocX/OVd59YSw== - dependencies: - apollo-server-env "^3.0.0" - apollo-server-plugin-base "^0.10.4" - -apollo-datasource@^0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/apollo-datasource/-/apollo-datasource-0.7.3.tgz" - integrity sha512-PE0ucdZYjHjUyXrFWRwT02yLcx2DACsZ0jm1Mp/0m/I9nZu/fEkvJxfsryXB6JndpmQO77gQHixf/xGCN976kA== - dependencies: - apollo-server-caching "^0.5.3" - apollo-server-env "^3.0.0" - -apollo-env@^0.6.6: - version "0.6.6" - resolved "https://registry.yarnpkg.com/apollo-env/-/apollo-env-0.6.6.tgz" - integrity sha512-hXI9PjJtzmD34XviBU+4sPMOxnifYrHVmxpjykqI/dUD2G3yTiuRaiQqwRwB2RCdwC1Ug/jBfoQ/NHDTnnjndQ== - dependencies: - "@types/node-fetch" "2.5.7" - core-js "^3.0.1" - node-fetch "^2.2.0" - sha.js "^2.4.11" - -apollo-graphql@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/apollo-graphql/-/apollo-graphql-0.6.1.tgz" - integrity sha512-ZRXAV+k+hboCVS+FW86FW/QgnDR7gm/xMUwJPGXEbV53OLGuQQdIT0NCYK7AzzVkCfsbb7NJ3mmEclkZY9uuxQ== - dependencies: - apollo-env "^0.6.6" - lodash.sortby "^4.7.0" - -apollo-link@1.2.14, apollo-link@^1.2.14: - version "1.2.14" - resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.14.tgz" - integrity sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg== - dependencies: - apollo-utilities "^1.3.0" - ts-invariant "^0.4.0" - tslib "^1.9.3" - zen-observable-ts "^0.8.21" - -apollo-reporting-protobuf@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/apollo-reporting-protobuf/-/apollo-reporting-protobuf-0.6.2.tgz" - integrity sha512-WJTJxLM+MRHNUxt1RTl4zD0HrLdH44F2mDzMweBj1yHL0kSt8I1WwoiF/wiGVSpnG48LZrBegCaOJeuVbJTbtw== - dependencies: - "@apollo/protobufjs" "^1.0.3" - -apollo-server-caching@^0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/apollo-server-caching/-/apollo-server-caching-0.5.3.tgz" - integrity sha512-iMi3087iphDAI0U2iSBE9qtx9kQoMMEWr6w+LwXruBD95ek9DWyj7OeC2U/ngLjRsXM43DoBDXlu7R+uMjahrQ== - dependencies: - lru-cache "^6.0.0" - -apollo-server-core@^2.21.0: - version "2.21.0" - resolved "https://registry.yarnpkg.com/apollo-server-core/-/apollo-server-core-2.21.0.tgz" - integrity sha512-GtIiq2F0dVDLzzIuO5+dK/pGq/sGxYlKCqAuQQqzYg0fvZ7fukyluXtcTe0tMI+FJZjU0j0WnKgiLsboCoAlPQ== - dependencies: - "@apollographql/apollo-tools" "^0.4.3" - "@apollographql/graphql-playground-html" "1.6.26" - "@apollographql/graphql-upload-8-fork" "^8.1.3" - "@types/ws" "^7.0.0" - apollo-cache-control "^0.11.6" - apollo-datasource "^0.7.3" - apollo-graphql "^0.6.0" - apollo-reporting-protobuf "^0.6.2" - apollo-server-caching "^0.5.3" - apollo-server-env "^3.0.0" - apollo-server-errors "^2.4.2" - apollo-server-plugin-base "^0.10.4" - apollo-server-types "^0.6.3" - apollo-tracing "^0.12.2" - async-retry "^1.2.1" - fast-json-stable-stringify "^2.0.0" - graphql-extensions "^0.12.8" - graphql-tag "^2.11.0" - graphql-tools "^4.0.8" - loglevel "^1.6.7" - lru-cache "^6.0.0" - sha.js "^2.4.11" - subscriptions-transport-ws "^0.9.11" - uuid "^8.0.0" - ws "^6.0.0" - -apollo-server-env@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/apollo-server-env/-/apollo-server-env-3.0.0.tgz" - integrity sha512-tPSN+VttnPsoQAl/SBVUpGbLA97MXG990XIwq6YUnJyAixrrsjW1xYG7RlaOqetxm80y5mBZKLrRDiiSsW/vog== - dependencies: - node-fetch "^2.1.2" - util.promisify "^1.0.0" - -apollo-server-errors@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/apollo-server-errors/-/apollo-server-errors-2.4.2.tgz" - integrity sha512-FeGxW3Batn6sUtX3OVVUm7o56EgjxDlmgpTLNyWcLb0j6P8mw9oLNyAm3B+deHA4KNdNHO5BmHS2g1SJYjqPCQ== - -apollo-server-express@^2.21.0: - version "2.21.0" - resolved "https://registry.yarnpkg.com/apollo-server-express/-/apollo-server-express-2.21.0.tgz" - integrity sha512-zbOSNGuxUjlOFZnRrbMpga3pKDEroitF4NAqoVxgBivx7v2hGsE7rljct3PucTx2cMN90AyYe3cU4oA8jBxZIQ== - dependencies: - "@apollographql/graphql-playground-html" "1.6.26" - "@types/accepts" "^1.3.5" - "@types/body-parser" "1.19.0" - "@types/cors" "2.8.8" - "@types/express" "4.17.7" - "@types/express-serve-static-core" "4.17.18" - accepts "^1.3.5" - apollo-server-core "^2.21.0" - apollo-server-types "^0.6.3" - body-parser "^1.18.3" - cors "^2.8.4" - express "^4.17.1" - graphql-subscriptions "^1.0.0" - graphql-tools "^4.0.8" - parseurl "^1.3.2" - subscriptions-transport-ws "^0.9.16" - type-is "^1.6.16" - -apollo-server-plugin-base@^0.10.4: - version "0.10.4" - resolved "https://registry.yarnpkg.com/apollo-server-plugin-base/-/apollo-server-plugin-base-0.10.4.tgz" - integrity sha512-HRhbyHgHFTLP0ImubQObYhSgpmVH4Rk1BinnceZmwudIVLKrqayIVOELdyext/QnSmmzg5W7vF3NLGBcVGMqDg== - dependencies: - apollo-server-types "^0.6.3" - -apollo-server-types@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/apollo-server-types/-/apollo-server-types-0.6.3.tgz" - integrity sha512-aVR7SlSGGY41E1f11YYz5bvwA89uGmkVUtzMiklDhZ7IgRJhysT5Dflt5IuwDxp+NdQkIhVCErUXakopocFLAg== - dependencies: - apollo-reporting-protobuf "^0.6.2" - apollo-server-caching "^0.5.3" - apollo-server-env "^3.0.0" - -apollo-server@^2.18.2: - version "2.21.0" - resolved "https://registry.yarnpkg.com/apollo-server/-/apollo-server-2.21.0.tgz" - integrity sha512-OqngjOSB0MEH6VKGWHcrqt4y39HlhYh9CrMvn4PhadTt53IPYRmBglk5qSRA8xMorGqy60iKrOReqj5YfCjTOg== - dependencies: - apollo-server-core "^2.21.0" - apollo-server-express "^2.21.0" - express "^4.0.0" - graphql-subscriptions "^1.0.0" - graphql-tools "^4.0.8" - stoppable "^1.1.0" - -apollo-tracing@^0.12.2: - version "0.12.2" - resolved "https://registry.yarnpkg.com/apollo-tracing/-/apollo-tracing-0.12.2.tgz" - integrity sha512-SYN4o0C0wR1fyS3+P0FthyvsQVHFopdmN3IU64IaspR/RZScPxZ3Ae8uu++fTvkQflAkglnFM0aX6DkZERBp6w== - dependencies: - apollo-server-env "^3.0.0" - apollo-server-plugin-base "^0.10.4" - -apollo-upload-client@14.1.2: - version "14.1.2" - resolved "https://registry.yarnpkg.com/apollo-upload-client/-/apollo-upload-client-14.1.2.tgz" - integrity sha512-ozaW+4tnVz1rpfwiQwG3RCdCcZ93RV/37ZQbRnObcQ9mjb+zur58sGDPVg9Ef3fiujLmiE/Fe9kdgvIMA3VOjA== - dependencies: - "@apollo/client" "^3.1.5" - "@babel/runtime" "^7.11.2" - extract-files "^9.0.0" - -apollo-utilities@^1.0.1, apollo-utilities@^1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.4.tgz" - integrity sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig== - dependencies: - "@wry/equality" "^0.1.2" - fast-json-stable-stringify "^2.0.0" - ts-invariant "^0.4.0" - tslib "^1.10.0" - -app-module-path@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/app-module-path/-/app-module-path-2.2.0.tgz" - integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argsarray@0.0.1, argsarray@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/argsarray/-/argsarray-0.0.1.tgz" - integrity sha1-bnIHtOzbObCviDA/pa4ivajfYcs= - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz" - integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= - dependencies: - arr-flatten "^1.0.1" - -arr-flatten@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-includes@^3.1.1: - version "3.1.3" - resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz" - integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - get-intrinsic "^1.1.1" - is-string "^1.0.5" - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz" - integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= - -array.prototype.flat@^1.2.3: - version "1.2.4" - resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz" - integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - -array.prototype.map@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array.prototype.map/-/array.prototype.map-1.0.3.tgz" - integrity sha512-nNcb30v0wfDyIe26Yif3PcV1JXQp4zEeEfupG7L4SRjnD6HLbO5b2a7eVSba53bOx4YCHYMBHt+Fp4vYstneRA== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.5" - -asap@~2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz" - integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= - -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - -async-limiter@^1.0.0, async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - -async-retry@^1.2.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.1.tgz" - integrity sha512-aiieFW/7h3hY0Bq5d+ktDBejxuwR78vRu9hDUdR8rNhSaQ29VzPL4AoIRG7D/c7tdenwOcKvgPM6tIxB3cB6HA== - dependencies: - retry "0.12.0" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz" - integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== - -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-generator@6.26.1: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-dynamic-import-node@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz" - integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== - dependencies: - object.assign "^4.1.0" - -babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: - version "7.0.0-beta.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz" - integrity sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ== - -babel-preset-fbjs@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.3.0.tgz" - integrity sha512-7QTLTCd2gwB2qGoi5epSULMHugSVgpcVt5YAeiFO9ABLrutDQzKfGwzxgZHLpugq8qMdg/DhRZDZ5CLKxBkEbw== - dependencies: - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-syntax-class-properties" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-block-scoped-functions" "^7.0.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.0.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-for-of" "^7.0.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-member-expression-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-property-literals" "^7.0.0" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-template-literals" "^7.0.0" - babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" - -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-traverse@6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@6.18.0, babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -backo2@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz" - integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base-x@^3.0.2, base-x@^3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz" - integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== - dependencies: - safe-buffer "^5.0.1" - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -bignumber.js@^9.0.0, bignumber.js@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz" - integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -blakejs@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz" - integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= - -bluebird@^3.5.0: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -bn.js@4.11.6: - version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz" - integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= - -bn.js@4.11.8: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.9, bn.js@^4.4.0: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.3: - version "5.2.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz" - integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== - -body-parser@1.19.0, body-parser@^1.16.0, body-parser@^1.18.3: - version "1.19.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz" - integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== - dependencies: - bytes "3.1.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" - iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.7.0" - raw-body "2.4.0" - type-is "~1.6.17" - -boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz" - integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz" - integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^3.0.1, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -brorand@^1.0.1, brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== - dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz" - integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - dependencies: - bn.js "^5.1.1" - browserify-rsa "^4.0.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.3" - inherits "^2.0.4" - parse-asn1 "^5.1.5" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -browserslist@^4.14.5: - version "4.16.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.3.tgz" - integrity sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw== - dependencies: - caniuse-lite "^1.0.30001181" - colorette "^1.2.1" - electron-to-chromium "^1.3.649" - escalade "^3.1.1" - node-releases "^1.1.70" - -bs58@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz" - integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= - dependencies: - base-x "^3.0.2" - -bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz" - integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - -bser@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -buffer-from@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz" - integrity sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ== - -buffer-from@1.1.1, buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -buffer-to-arraybuffer@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz" - integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo= - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0, buffer@^5.7.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -bufferutil@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.3.tgz" - integrity sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw== - dependencies: - node-gyp-build "^4.2.0" - -busboy@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-0.3.1.tgz" - integrity sha512-y7tTxhGKXcyBxRKAni+awqx8uqaJKrSFSNFSeRG5CsWNdmy2BIK+6VGWEW7TZnIO/533mtMEA4rOevQV815YJw== - dependencies: - dicer "0.3.0" - -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz" - integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - -cacheable-request@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz" - integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^3.0.0" - lowercase-keys "^2.0.0" - normalize-url "^4.1.0" - responselike "^1.0.2" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camel-case@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.1.tgz" - integrity sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q== - dependencies: - pascal-case "^3.1.1" - tslib "^1.10.0" - -camel-case@4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz" - integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== - dependencies: - pascal-case "^3.1.2" - tslib "^2.0.3" - -camel-case@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz" - integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M= - dependencies: - no-case "^2.2.0" - upper-case "^1.1.1" - -camelcase@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz" - integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz" - integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= - -camelcase@^5.0.0, camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -caniuse-lite@^1.0.30001181: - version "1.0.30001194" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001194.tgz" - integrity sha512-iDUOH+oFeBYk5XawYsPtsx/8fFpndAPUQJC7gBTfxHM8xw5nOZv7ceAD4frS1MKCLUac7QL5wdAJiFQlDRjXlA== - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -cbor@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz" - integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== - dependencies: - bignumber.js "^9.0.1" - nofilter "^1.0.4" - -chalk@1.1.3, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -change-case@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz" - integrity sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA== - dependencies: - camel-case "^3.0.0" - constant-case "^2.0.0" - dot-case "^2.1.0" - header-case "^1.0.0" - is-lower-case "^1.1.0" - is-upper-case "^1.1.0" - lower-case "^1.1.1" - lower-case-first "^1.0.0" - no-case "^2.3.2" - param-case "^2.1.0" - pascal-case "^2.0.0" - path-case "^2.1.0" - sentence-case "^2.1.0" - snake-case "^2.1.0" - swap-case "^1.1.0" - title-case "^2.1.0" - upper-case "^1.1.1" - upper-case-first "^1.1.0" - -cheerio@0.20.0: - version "0.20.0" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.20.0.tgz" - integrity sha1-XHEPK6uVZTJyhCugHG6mGzVF7DU= - dependencies: - css-select "~1.2.0" - dom-serializer "~0.1.0" - entities "~1.1.1" - htmlparser2 "~3.8.1" - lodash "^4.1.0" - optionalDependencies: - jsdom "^7.0.2" - -cheerio@1.0.0-rc.2: - version "1.0.0-rc.2" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz" - integrity sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs= - dependencies: - css-select "~1.2.0" - dom-serializer "~0.1.0" - entities "~1.1.1" - htmlparser2 "^3.9.1" - lodash "^4.15.0" - parse5 "^3.0.1" - -chokidar@3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.2.tgz" - integrity sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.4.0" - optionalDependencies: - fsevents "~2.1.2" - -chownr@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -cids@^0.7.1: - version "0.7.5" - resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz" - integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== - dependencies: - buffer "^5.5.0" - class-is "^1.1.0" - multibase "~0.6.0" - multicodec "^1.0.0" - multihashes "~0.4.15" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -class-is@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz" - integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== - -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= - dependencies: - restore-cursor "^2.0.0" - -cli-spinners@^2.0.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.5.0.tgz" - integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ== - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" - -clone-buffer@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz" - integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg= - -clone-response@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - dependencies: - mimic-response "^1.0.0" - -clone-stats@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz" - integrity sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE= - -clone@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz" - integrity sha1-0hfR6WERjjrJpLi7oyhVU79kfNs= - -clone@^1.0.0, clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz" - integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-logger@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/color-logger/-/color-logger-0.0.3.tgz" - integrity sha1-2bIt0dlz4Waxi/MT+fSBu6TfIBg= - -color-logger@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/color-logger/-/color-logger-0.0.6.tgz" - integrity sha1-5WJF7ymCJlcRDHy3WpzXhstp7Rs= - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -colorette@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz" - integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== - -colors@^1.1.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== - -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.20.3: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -component-emitter@1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz" - integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -concat-stream@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.1.tgz" - integrity sha1-87gKz54fSOOHXAaItBtsMWAu6hw= - dependencies: - inherits "~2.0.1" - readable-stream "~2.0.0" - typedarray "~0.0.5" - -configstore@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-4.0.0.tgz" - integrity sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ== - dependencies: - dot-prop "^4.1.0" - graceful-fs "^4.1.2" - make-dir "^1.0.0" - unique-string "^1.0.0" - write-file-atomic "^2.0.0" - xdg-basedir "^3.0.0" - -confusing-browser-globals@^1.0.10: - version "1.0.10" - resolved "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz" - integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -constant-case@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz" - integrity sha1-QXV2TTidP6nI7NKRhu1gBSQ7akY= - dependencies: - snake-case "^2.1.0" - upper-case "^1.1.1" - -contains-path@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz" - integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= - -content-disposition@0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz" - integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== - dependencies: - safe-buffer "5.1.2" - -content-hash@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz" - integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== - dependencies: - cids "^0.7.1" - multicodec "^0.5.5" - multihashes "^0.4.15" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -convert-source-map@1.X, convert-source-map@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - dependencies: - safe-buffer "~5.1.1" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz" - integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== - -cookiejar@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz" - integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== - -core-js@^2.4.0: - version "2.6.12" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz" - integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== - -core-js@^3.0.1: - version "3.9.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.9.1.tgz" - integrity sha512-gSjRvzkxQc1zjM/5paAmL4idJBFzuJoo+jDjF1tStYFMV2ERfD02HhahhCGXUyHxQRG4yFKVSdO6g62eoRMcDg== - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cors@^2.8.1, cors@^2.8.4: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cross-fetch@3.0.6, cross-fetch@^3.0.4: - version "3.0.6" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.6.tgz" - integrity sha512-KBPUbqgFjzWlVcURG+Svp9TlhA5uliYtiNx/0r8nv0pdypeQCRJ9IaSIc3q/x3q8t3F75cHuwxVql1HFGHCNJQ== - dependencies: - node-fetch "2.6.1" - -cross-spawn@^6.0.0: - version "6.0.5" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^7.0.2: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -crypto-browserify@3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -crypto-random-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz" - integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= - -css-select@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz" - integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= - dependencies: - boolbase "~1.0.0" - css-what "2.1" - domutils "1.5.1" - nth-check "~1.0.1" - -css-what@2.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz" - integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== - -css@2.X: - version "2.2.4" - resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz" - integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw== - dependencies: - inherits "^2.0.3" - source-map "^0.6.1" - source-map-resolve "^0.5.2" - urix "^0.1.0" - -cssfilter@0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/cssfilter/-/cssfilter-0.0.10.tgz" - integrity sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4= - -cssom@0.3.x, "cssom@>= 0.3.0 < 0.4.0": - version "0.3.8" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - -"cssstyle@>= 0.2.29 < 0.3.0": - version "0.2.37" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz" - integrity sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ= - dependencies: - cssom "0.3.x" - -d@1, d@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz" - integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== - dependencies: - es5-ext "^0.10.50" - type "^1.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -dataloader@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-2.0.0.tgz" - integrity sha512-YzhyDAwA4TaQIhM5go+vCLmU0UikghC/t9DTQYZR2M/UvZ1MdOhPezSDZcjj9uqQJOMqjLcpWtyW2iNINdlatQ== - -debug-fabulous@0.0.X: - version "0.0.4" - resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-0.0.4.tgz" - integrity sha1-+gccXYdIRoVCSAdCHKSxawsaB2M= - dependencies: - debug "2.X" - lazy-debug-legacy "0.0.X" - object-assign "4.1.0" - -debug@2.6.9, debug@2.X, debug@^2.2.0, debug@^2.6.8, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - -debug@^3.1.0, debug@^3.2.6: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - -decamelize@^1.1.1, decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -decompress-response@^3.2.0, decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= - dependencies: - mimic-response "^1.0.0" - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-is@^0.1.3, deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - -defaults@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz" - integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= - dependencies: - clone "^1.0.2" - -defer-to-connect@^1.0.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz" - integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== - -deferred-leveldown@~5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.0.1.tgz" - integrity sha512-BXohsvTedWOLkj2n/TY+yqVlrCWa2Zs8LSxh3uCAgFOru7/pjxKyZAexGa1j83BaKloER4PqUyQ9rGPJLt9bqA== - dependencies: - abstract-leveldown "~6.0.0" - inherits "^2.0.3" - -deferred-leveldown@~5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz" - integrity sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw== - dependencies: - abstract-leveldown "~6.2.1" - inherits "^2.0.3" - -define-properties@^1.1.2, define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -deprecated-decorator@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz" - integrity sha1-AJZjF7ehL+kvPMgx91g68ym4bDc= - -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - -detect-newline@2.X: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz" - integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= - -dicer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/dicer/-/dicer-0.3.0.tgz" - integrity sha512-MdceRRWqltEG2dZqO769g27N/3PXfcKl04VhYnBlo2YhH7zPi88VebsjTKclaOyiuMaGU72hTfw3VkUitGcVCA== - dependencies: - streamsearch "0.1.2" - -diff@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -doctrine@1.5.0: - version "1.5.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz" - integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= - dependencies: - esutils "^2.0.2" - isarray "^1.0.0" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -dom-serializer@0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz" - integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== - dependencies: - domelementtype "^2.0.1" - entities "^2.0.0" - -dom-serializer@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz" - integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== - dependencies: - domelementtype "^1.3.0" - entities "^1.1.1" - -dom-walk@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz" - integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== - -domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz" - integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== - -domelementtype@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.1.0.tgz" - integrity sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w== - -domhandler@2.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz" - integrity sha1-LeWaCCLVAn+r/28DLCsloqir5zg= - dependencies: - domelementtype "1" - -domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz" - integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - dependencies: - domelementtype "1" - -domutils@1.5, domutils@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz" - integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^1.5.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz" - integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== - dependencies: - dom-serializer "0" - domelementtype "1" - -dot-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz" - integrity sha1-NNzzf1Co6TwrO8qLt/uRVcfaO+4= - dependencies: - no-case "^2.2.0" - -dot-prop@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz" - integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ== - dependencies: - is-obj "^1.0.0" - -double-ended-queue@2.1.0-0: - version "2.1.0-0" - resolved "https://registry.yarnpkg.com/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz" - integrity sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw= - -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - -duplexify@^3.2.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -electron-to-chromium@^1.3.649: - version "1.3.677" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.677.tgz" - integrity sha512-Tcmk+oKQgpjcM+KYanlkd76ZtpzalkpUULnlJDP6vjHtR7UU564IM9Qv5DxqHZNBQjzXm6mkn7Y8bw2OoE3FmQ== - -elliptic@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -emittery@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.4.1.tgz" - integrity sha512-r4eRSeStEGf6M5SKdrQhhLK5bOwOBxQhIE3YSTnZE3GpKiLfnnhE+tPtrJE79+eDJgm39BM6LSoI8SCx4HbwlQ== - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -encoding-down@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-6.3.0.tgz" - integrity sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw== - dependencies: - abstract-leveldown "^6.2.1" - inherits "^2.0.3" - level-codec "^9.0.0" - level-errors "^2.0.0" - -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -end-stream@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/end-stream/-/end-stream-0.1.0.tgz" - integrity sha1-MgA/P0OKKwFDFoE3+PpumGbIHtU= - dependencies: - write-stream "~0.4.3" - -enquirer@^2.3.5: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - -entities@1.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz" - integrity sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY= - -entities@^1.1.1, entities@~1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - -entities@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz" - integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== - -errno@~0.1.1: - version "0.1.8" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz" - integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - dependencies: - prr "~1.0.1" - -error-ex@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.17.0-next.1: - version "1.17.7" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz" - integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: - version "1.18.0-next.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.3.tgz" - integrity sha512-VMzHx/Bczjg59E6jZOQjHeN3DEoptdhejpARgflAViidlqSpjdq9zA6lKwlhRRs/lOw1gHJv2xkkSFRgvEwbQg== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - get-intrinsic "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.2" - is-callable "^1.2.3" - is-negative-zero "^2.0.1" - is-regex "^1.1.2" - is-string "^1.0.5" - object-inspect "^1.9.0" - object-keys "^1.1.1" - object.assign "^4.1.2" - string.prototype.trimend "^1.0.4" - string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.0" - -es-array-method-boxes-properly@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz" - integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== - -es-get-iterator@^1.0.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.2.tgz" - integrity sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.0" - has-symbols "^1.0.1" - is-arguments "^1.1.0" - is-map "^2.0.2" - is-set "^2.0.2" - is-string "^1.0.5" - isarray "^2.0.5" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es5-ext@^0.10.35, es5-ext@^0.10.50: - version "0.10.53" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz" - integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== - dependencies: - es6-iterator "~2.0.3" - es6-symbol "~3.1.3" - next-tick "~1.0.0" - -es6-denodeify@^0.1.1: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-denodeify/-/es6-denodeify-0.1.5.tgz" - integrity sha1-MdTV/pxVA+ElRgQ5MQ4WoqPznB8= - -es6-iterator@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz" - integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - -es6-symbol@^3.1.1, es6-symbol@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz" - integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== - dependencies: - d "^1.0.1" - ext "^1.1.2" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@1.0.3, escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -escodegen@^1.6.1: - version "1.14.3" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz" - integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== - dependencies: - esprima "^4.0.1" - estraverse "^4.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -esdoc@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/esdoc/-/esdoc-1.1.0.tgz" - integrity sha512-vsUcp52XJkOWg9m1vDYplGZN2iDzvmjDL5M/Mp8qkoDG3p2s0yIQCIjKR5wfPBaM3eV14a6zhQNYiNTCVzPnxA== - dependencies: - babel-generator "6.26.1" - babel-traverse "6.26.0" - babylon "6.18.0" - cheerio "1.0.0-rc.2" - color-logger "0.0.6" - escape-html "1.0.3" - fs-extra "5.0.0" - ice-cap "0.0.4" - marked "0.3.19" - minimist "1.2.0" - taffydb "2.7.3" - -eslint-config-airbnb-base@^14.2.1: - version "14.2.1" - resolved "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz" - integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== - dependencies: - confusing-browser-globals "^1.0.10" - object.assign "^4.1.2" - object.entries "^1.1.2" - -eslint-import-resolver-node@^0.3.4: - version "0.3.4" - resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz" - integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== - dependencies: - debug "^2.6.9" - resolve "^1.13.1" - -eslint-module-utils@^2.6.0: - version "2.6.0" - resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz" - integrity sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA== - dependencies: - debug "^2.6.9" - pkg-dir "^2.0.0" - -eslint-plugin-import@^2.22.1: - version "2.22.1" - resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz" - integrity sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw== - dependencies: - array-includes "^3.1.1" - array.prototype.flat "^1.2.3" - contains-path "^0.1.0" - debug "^2.6.9" - doctrine "1.5.0" - eslint-import-resolver-node "^0.3.4" - eslint-module-utils "^2.6.0" - has "^1.0.3" - minimatch "^3.0.4" - object.values "^1.1.1" - read-pkg-up "^2.0.0" - resolve "^1.17.0" - tsconfig-paths "^3.9.0" - -eslint-plugin-prettier@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz" - integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ== - dependencies: - prettier-linter-helpers "^1.0.0" - -eslint-plugin-truffle@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-truffle/-/eslint-plugin-truffle-0.3.1.tgz#78207a015c0ffa660794907748792b5f9301d3d9" - integrity sha512-mjDM1gD96UknBUSEufgdx5m1x3jkWL3Xn/npSZhOVoTbKk/nkBL7dCcH7xsO6GyAjmjvzdev5o5IA4lKWf9b4g== - -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - -eslint-visitor-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz" - integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== - -eslint@^7.21.0: - version "7.21.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.21.0.tgz" - integrity sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg== - dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.0" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.0.1" - doctrine "^3.0.0" - enquirer "^2.3.5" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" - esquery "^1.4.0" - esutils "^2.0.2" - file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^5.0.0" - globals "^12.1.0" - ignore "^4.0.6" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - js-yaml "^3.13.1" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash "^4.17.20" - minimatch "^3.0.4" - natural-compare "^1.4.0" - optionator "^0.9.1" - progress "^2.0.0" - regexpp "^3.1.0" - semver "^7.2.1" - strip-ansi "^6.0.0" - strip-json-comments "^3.1.0" - table "^6.0.4" - text-table "^0.2.0" - v8-compile-cache "^2.0.3" - -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== - dependencies: - acorn "^7.4.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" - -esprima@^4.0.0, esprima@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1, estraverse@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -eth-ens-namehash@2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz" - integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= - dependencies: - idna-uts46-hx "^2.3.1" - js-sha3 "^0.5.7" - -eth-lib@0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.7.tgz" - integrity sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco= - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - -eth-lib@^0.1.26: - version "0.1.29" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz" - integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - nano-json-stream-parser "^0.1.2" - servify "^0.1.12" - ws "^3.0.0" - xhr-request-promise "^0.1.2" - -eth-lib@^0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz" - integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - -ethereum-bloom-filters@^1.0.6: - version "1.0.9" - resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.9.tgz" - integrity sha512-GiK/RQkAkcVaEdxKVkPcG07PQ5vD7v2MFSHgZmBJSfMzNRHimntdBithsHAT89tAXnIpzVDWt8iaCD1DvkaxGg== - dependencies: - js-sha3 "^0.8.0" - -ethereum-cryptography@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz" - integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== - dependencies: - "@types/pbkdf2" "^3.0.0" - "@types/secp256k1" "^4.0.1" - blakejs "^1.1.0" - browserify-aes "^1.2.0" - bs58check "^2.1.2" - create-hash "^1.2.0" - create-hmac "^1.1.7" - hash.js "^1.1.7" - keccak "^3.0.0" - pbkdf2 "^3.0.17" - randombytes "^2.1.0" - safe-buffer "^5.1.2" - scrypt-js "^3.0.0" - secp256k1 "^4.0.1" - setimmediate "^1.0.5" - -ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz" - integrity sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA== - -ethereumjs-tx@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz" - integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== - dependencies: - ethereumjs-common "^1.5.0" - ethereumjs-util "^6.0.0" - -ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz" - integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== - dependencies: - "@types/bn.js" "^4.11.3" - bn.js "^4.11.0" - create-hash "^1.1.2" - elliptic "^6.5.2" - ethereum-cryptography "^0.1.3" - ethjs-util "0.1.6" - rlp "^2.2.3" - -ethers@^4.0.32: - version "4.0.48" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.48.tgz" - integrity sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g== - dependencies: - aes-js "3.0.0" - bn.js "^4.4.0" - elliptic "6.5.3" - hash.js "1.1.3" - js-sha3 "0.5.7" - scrypt-js "2.0.4" - setimmediate "1.0.4" - uuid "2.0.1" - xmlhttprequest "1.8.0" - -ethjs-unit@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz" - integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= - dependencies: - bn.js "4.11.6" - number-to-bn "1.7.0" - -ethjs-util@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz" - integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== - dependencies: - is-hex-prefixed "1.0.0" - strip-hex-prefix "1.0.0" - -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - -eventemitter3@3.1.2, eventemitter3@^3.1.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz" - integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== - -eventemitter3@^4.0.0: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - -eventsource@1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz" - integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ== - dependencies: - original "^1.0.0" - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz" - integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= - dependencies: - is-posix-bracket "^0.1.0" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz" - integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= - dependencies: - fill-range "^2.1.0" - -express@^4.0.0, express@^4.14.0, express@^4.17.1: - version "4.17.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz" - integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== - dependencies: - accepts "~1.3.7" - array-flatten "1.1.1" - body-parser "1.19.0" - content-disposition "0.5.3" - content-type "~1.0.4" - cookie "0.4.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "~1.1.2" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.5" - qs "6.7.0" - range-parser "~1.2.1" - safe-buffer "5.1.2" - send "0.17.1" - serve-static "1.14.1" - setprototypeof "1.1.1" - statuses "~1.5.0" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -ext@^1.1.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz" - integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== - dependencies: - type "^2.0.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend@^3.0.0, extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz" - integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= - dependencies: - is-extglob "^1.0.0" - -extract-files@9.0.0, extract-files@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz" - integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -faker@^5.3.1: - version "5.4.0" - resolved "https://registry.yarnpkg.com/faker/-/faker-5.4.0.tgz" - integrity sha512-Y9n/Ky/xZx/Bj8DePvXspUYRtHl/rGQytoIT5LaxmNwSe3wWyOeOXb3lT6Dpipq240PVpeFaGKzScz/5fvff2g== - -fast-check@^2.12.1: - version "2.13.0" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.13.0.tgz" - integrity sha512-IOfzKm/SCA+jpUEgAfqAuxHYPmgtmpnnwljQmYPRGrqYczcTKApXKHza/SNxFxYkecWfZilYa0DJdBvqz1bcSw== - dependencies: - pure-rand "^4.1.1" - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== - -fast-future@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/fast-future/-/fast-future-1.0.2.tgz" - integrity sha1-hDWpqqAteSSNF9cE52JZMB2ZKAo= - -fast-glob@^3.1.1: - version "3.2.5" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz" - integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.0" - merge2 "^1.3.0" - micromatch "^4.0.2" - picomatch "^2.2.1" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - -fastq@^1.6.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz" - integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g== - dependencies: - reusify "^1.0.4" - -fb-watchman@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz" - integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== - dependencies: - bser "2.1.1" - -fbjs-css-vars@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz" - integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ== - -fbjs@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.0.tgz" - integrity sha512-dJd4PiDOFuhe7vk4F80Mba83Vr2QuK86FoxtgPmzBqEJahncp+13YCmfoa53KHCo6OnlXLG7eeMWPfB5CrpVKg== - dependencies: - cross-fetch "^3.0.4" - fbjs-css-vars "^1.0.0" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.18" - -fetch-cookie@0.10.1: - version "0.10.1" - resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-0.10.1.tgz" - integrity sha512-beB+VEd4cNeVG1PY+ee74+PkuCQnik78pgLi5Ah/7qdUfov8IctU0vLUbBT8/10Ma5GMBeI4wtxhGrEfKNYs2g== - dependencies: - tough-cookie "^2.3.3 || ^3.0.1 || ^4.0.0" - -fetch-cookie@0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-0.7.0.tgz" - integrity sha512-Mm5pGlT3agW6t71xVM7vMZPIvI7T4FaTuFW4jari6dVzYHFDb3WZZsGpN22r/o3XMdkM0E7sPd1EGeyVbH2Tgg== - dependencies: - es6-denodeify "^0.1.1" - tough-cookie "^2.3.1" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz" - integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= - -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz" - integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - -find-up@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.0.0, find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -first-chunk-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz" - integrity sha1-Wb+1DNkF9g18OUzT2ayqtOatk04= - -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flat@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz" - integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== - dependencies: - is-buffer "~2.0.3" - -flatted@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz" - integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== - -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -for-in@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz" - integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= - dependencies: - for-in "^1.0.1" - -foreach@^2.0.4: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz" - integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz" - integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -form-data@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -fs-capacitor@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/fs-capacitor/-/fs-capacitor-2.0.4.tgz" - integrity sha512-8S4f4WsCryNw2mJJchi46YgB6CR5Ze+4L1h8ewl9tEpL4SJ3ZO+c/bS4BWhB8bK+O3TMqhuZarTitd0S0eh2pA== - -fs-capacitor@^6.1.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/fs-capacitor/-/fs-capacitor-6.2.0.tgz" - integrity sha512-nKcE1UduoSKX27NSZlg879LdQc94OtbOsEmKMN2MBNudXREvijRKx2GEBsTMTfws+BrbkJoEuynbGSVRSpauvw== - -fs-extra@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz" - integrity sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-minipass@^1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@~2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" - integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= - -ganache-cli@^6.12.2: - version "6.12.2" - resolved "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.12.2.tgz#c0920f7db0d4ac062ffe2375cb004089806f627a" - integrity sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw== - dependencies: - ethereumjs-util "6.2.1" - source-map-support "0.5.12" - yargs "13.2.4" - -ganache@^6.4.4: - version "6.4.4" - resolved "https://registry.npmjs.org/ganache/-/ganache-6.4.4.tgz#efb3eb5157b8987e5213584f24090322827c3521" - integrity sha512-uBCxKuyj1SSjz/iONMk1ZiHr1wf0bPG5E+qSO2lxyDq+dtZ5d/VvW6iKtg9bWikhG8hd1jU7kRkoS5f4q7FrWQ== - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.1: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz" - integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - -get-params@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/get-params/-/get-params-0.1.2.tgz" - integrity sha1-uuDfq6WIoMYNeDTA2Nwv9g7u8v4= - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-stream@^4.0.0, get-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz" - integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz" - integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= - dependencies: - is-glob "^2.0.0" - -glob-parent@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz" - integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== - dependencies: - is-glob "^4.0.1" - -glob-stream@^5.3.2: - version "5.3.5" - resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-5.3.5.tgz" - integrity sha1-pVZlqajM3EGRWofHAeMtTgFvrSI= - dependencies: - extend "^3.0.0" - glob "^5.0.3" - glob-parent "^3.0.0" - micromatch "^2.3.7" - ordered-read-streams "^0.3.0" - through2 "^0.6.0" - to-absolute-glob "^0.1.1" - unique-stream "^2.0.2" - -glob@7.1.6, glob@^7.1.1, glob@^7.1.3: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^5.0.3: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz" - integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global@~4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz" - integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== - dependencies: - min-document "^2.19.0" - process "^0.11.10" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^12.1.0: - version "12.4.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz" - integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== - dependencies: - type-fest "^0.8.1" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -globby@11.0.2: - version "11.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz" - integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.1.1" - ignore "^5.1.4" - merge2 "^1.3.0" - slash "^3.0.0" - -got@9.6.0: - version "9.6.0" - resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz" - integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== - dependencies: - "@sindresorhus/is" "^0.14.0" - "@szmarczak/http-timer" "^1.1.2" - cacheable-request "^6.0.0" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^4.1.0" - lowercase-keys "^1.0.1" - mimic-response "^1.0.1" - p-cancelable "^1.0.0" - to-readable-stream "^1.0.0" - url-parse-lax "^3.0.0" - -got@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz" - integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== - dependencies: - decompress-response "^3.2.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-plain-obj "^1.1.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - p-cancelable "^0.3.0" - p-timeout "^1.1.1" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - url-parse-lax "^1.0.0" - url-to-options "^1.0.1" - -graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.6" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz" - integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== - -graphql-extensions@^0.12.8: - version "0.12.8" - resolved "https://registry.yarnpkg.com/graphql-extensions/-/graphql-extensions-0.12.8.tgz" - integrity sha512-xjsSaB6yKt9jarFNNdivl2VOx52WySYhxPgf8Y16g6GKZyAzBoIFiwyGw5PJDlOSUa6cpmzn6o7z8fVMbSAbkg== - dependencies: - "@apollographql/apollo-tools" "^0.4.3" - apollo-server-env "^3.0.0" - apollo-server-types "^0.6.3" - -graphql-subscriptions@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/graphql-subscriptions/-/graphql-subscriptions-1.2.0.tgz" - integrity sha512-uXvp729fztqwa7HFUFaAqKwNMwwOfsvu4HwOu7/35Cd44bNrMPCn97mNGN0ybuuZE36CPXBTaW/4U/xyOS4D9w== - dependencies: - iterall "^1.3.0" - -graphql-tag@^2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.11.0.tgz" - integrity sha512-VmsD5pJqWJnQZMUeRwrDhfgoyqcfwEkvtpANqcoUG8/tOLkwNgU9mzub/Mc78OJMhHjx7gfAMTxzdG43VGg3bA== - -graphql-tag@^2.12.0: - version "2.12.1" - resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.1.tgz" - integrity sha512-LPewEE1vzGkHnCO8zdOGogKsHHBdtpGyihow1UuMwp6RnZa0lAS7NcbvltLOuo4pi5diQCPASAXZkQq44ffixA== - dependencies: - tslib "^1.14.1" - -graphql-tools@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-4.0.8.tgz" - integrity sha512-MW+ioleBrwhRjalKjYaLQbr+920pHBgy9vM/n47sswtns8+96sRn5M/G+J1eu7IMeKWiN/9p6tmwCHU7552VJg== - dependencies: - apollo-link "^1.2.14" - apollo-utilities "^1.0.1" - deprecated-decorator "^0.1.6" - iterall "^1.1.3" - uuid "^3.1.0" - -graphql-tools@^6.2.4: - version "6.2.6" - resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-6.2.6.tgz" - integrity sha512-OyhSvK5ALVVD6bFiWjAqv2+lRyvjIRfb6Br5Tkjrv++rxnXDodPH/zhMbDGRw+W3SD5ioGEEz84yO48iPiN7jA== - dependencies: - "@graphql-tools/batch-delegate" "^6.2.6" - "@graphql-tools/code-file-loader" "^6.2.4" - "@graphql-tools/delegate" "^6.2.4" - "@graphql-tools/git-loader" "^6.2.4" - "@graphql-tools/github-loader" "^6.2.4" - "@graphql-tools/graphql-file-loader" "^6.2.4" - "@graphql-tools/graphql-tag-pluck" "^6.2.4" - "@graphql-tools/import" "^6.2.4" - "@graphql-tools/json-file-loader" "^6.2.4" - "@graphql-tools/links" "^6.2.4" - "@graphql-tools/load" "^6.2.4" - "@graphql-tools/load-files" "^6.2.4" - "@graphql-tools/merge" "^6.2.4" - "@graphql-tools/mock" "^6.2.4" - "@graphql-tools/module-loader" "^6.2.4" - "@graphql-tools/relay-operation-optimizer" "^6.2.4" - "@graphql-tools/resolvers-composition" "^6.2.4" - "@graphql-tools/schema" "^6.2.4" - "@graphql-tools/stitch" "^6.2.4" - "@graphql-tools/url-loader" "^6.2.4" - "@graphql-tools/utils" "^6.2.4" - "@graphql-tools/wrap" "^6.2.4" - tslib "~2.0.1" - -graphql-upload@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/graphql-upload/-/graphql-upload-11.0.0.tgz" - integrity sha512-zsrDtu5gCbQFDWsNa5bMB4nf1LpKX9KDgh+f8oL1288ijV4RxeckhVozAjqjXAfRpxOHD1xOESsh6zq8SjdgjA== - dependencies: - busboy "^0.3.1" - fs-capacitor "^6.1.0" - http-errors "^1.7.3" - isobject "^4.0.0" - object-path "^0.11.4" - -graphql-ws@4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-4.1.5.tgz" - integrity sha512-yUQ1AjegD1Y9jDS699kyw7Mw+9H+rILm2HoS8N5a5B5YTH93xy3yifFhAJpKGc2wb/8yGdlVy8gTcud0TPqi6Q== - -graphql@^15.3.0: - version "15.5.0" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.5.0.tgz" - integrity sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA== - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -gulp-sourcemaps@^1.5.2: - version "1.12.1" - resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.12.1.tgz" - integrity sha1-tDfR89mAzyboEYSCNxjOFa5ll7Y= - dependencies: - "@gulp-sourcemaps/map-sources" "1.X" - acorn "4.X" - convert-source-map "1.X" - css "2.X" - debug-fabulous "0.0.X" - detect-newline "2.X" - graceful-fs "4.X" - source-map "~0.6.0" - strip-bom "2.X" - through2 "2.X" - vinyl "1.X" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-bigints@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz" - integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz" - integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== - -has-symbols@^1.0.0, has-symbols@^1.0.1, has-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz" - integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== - -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz" - integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== - dependencies: - has-symbol-support-x "^1.4.1" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz" - integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.0" - -hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -header-case@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz" - integrity sha1-lTWXMZfBRLCWE81l0xfvGZY70C0= - dependencies: - no-case "^2.2.0" - upper-case "^1.1.3" - -hmac-drbg@^1.0.0, hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hoist-non-react-statics@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" - integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== - dependencies: - react-is "^16.7.0" - -hosted-git-info@^2.1.4: - version "2.8.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz" - integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== - -htmlparser2@^3.9.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz" - integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== - dependencies: - domelementtype "^1.3.1" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.1.1" - -htmlparser2@~3.8.1: - version "3.8.3" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz" - integrity sha1-mWwosZFRaovoZQGn15dX5ccMEGg= - dependencies: - domelementtype "1" - domhandler "2.3" - domutils "1.5" - entities "1.0" - readable-stream "1.1" - -http-cache-semantics@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - -http-errors@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz" - integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-errors@^1.7.3: - version "1.8.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.0.tgz" - integrity sha512-4I8r0C5JDhT5VkvI47QktDW75rNlGVsUf/8hzjCC/wkWI/jdTRmBb9aI7erSG82r1bjKY3F6k28WnsVxB1C73A== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-errors@~1.7.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz" - integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-https@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz" - integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -ice-cap@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/ice-cap/-/ice-cap-0.0.4.tgz" - integrity sha1-im0xq0ysjUtW3k+pRt8zUlYbbhg= - dependencies: - cheerio "0.20.0" - color-logger "0.0.3" - -iconv-lite@0.4.24, iconv-lite@^0.4.4: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -idna-uts46-hx@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz" - integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== - dependencies: - punycode "2.1.0" - -ieee754@^1.1.13: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore-walk@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz" - integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== - dependencies: - minimatch "^3.0.4" - -ignore@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - -ignore@^5.1.4: - version "5.1.8" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz" - integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== - -immediate@3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz" - integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= - -immediate@3.3.0, immediate@^3.2.2, immediate@^3.2.3: - version "3.3.0" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz" - integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== - -immediate@~3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz" - integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= - -immutable@~3.7.6: - version "3.7.6" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.7.6.tgz" - integrity sha1-E7TTyxK++hVIKib+Gy665kAHHks= - -import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-from@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz" - integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ== - dependencies: - resolve-from "^5.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ini@~1.3.0: - version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - -invert-kv@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" - integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-arguments@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz" - integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== - dependencies: - call-bind "^1.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-bigint@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.1.tgz" - integrity sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg== - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-boolean-object@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.0.tgz" - integrity sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA== - dependencies: - call-bind "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-buffer@~2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz" - integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== - -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.2, is-callable@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz" - integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== - -is-core-module@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz" - integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== - dependencies: - has "^1.0.3" - -is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz" - integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" - integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz" - integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz" - integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-function@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz" - integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== - -is-glob@4.0.1, is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz" - integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= - dependencies: - is-extglob "^1.0.0" - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - -is-hex-prefixed@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz" - integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= - -is-lower-case@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz" - integrity sha1-fhR75HaNxGbbO/shzGCzHmrWk5M= - dependencies: - lower-case "^1.1.0" - -is-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz" - integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== - -is-negative-zero@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz" - integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== - -is-number-object@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz" - integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz" - integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz" - integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= - -is-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz" - integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== - -is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz" - integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz" - integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= - -is-promise@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-4.0.0.tgz" - integrity sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ== - -is-regex@^1.1.1, is-regex@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz" - integrity sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg== - dependencies: - call-bind "^1.0.2" - has-symbols "^1.0.1" - -is-retry-allowed@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz" - integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== - -is-set@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz" - integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== - -is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-string@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz" - integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== - dependencies: - has-symbols "^1.0.1" - -is-typedarray@^1.0.0, is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -is-upper-case@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz" - integrity sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8= - dependencies: - upper-case "^1.1.0" - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-valid-glob@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-0.3.0.tgz" - integrity sha1-1LVcafUYhvm2XHDWwmItN+KfSP4= - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz" - integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== - -isomorphic-ws@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz" - integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz" - integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - -iterall@^1.1.3, iterall@^1.2.1, iterall@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz" - integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== - -iterate-iterator@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/iterate-iterator/-/iterate-iterator-1.0.1.tgz" - integrity sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw== - -iterate-value@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/iterate-value/-/iterate-value-1.0.2.tgz" - integrity sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ== - dependencies: - es-get-iterator "^1.0.2" - iterate-iterator "^1.0.1" - -js-sha3@0.5.7, js-sha3@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz" - integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= - -js-sha3@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@3.14.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsan@^3.1.13: - version "3.1.13" - resolved "https://registry.yarnpkg.com/jsan/-/jsan-3.1.13.tgz" - integrity sha512-9kGpCsGHifmw6oJet+y8HaCl14y7qgAsxVdV3pCHDySNR3BfDC30zgkssd7x5LRVAT22dnpbe9JdzzmXZnq9/g== - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -jsdom@^7.0.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-7.2.2.tgz" - integrity sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4= - dependencies: - abab "^1.0.0" - acorn "^2.4.0" - acorn-globals "^1.0.4" - cssom ">= 0.3.0 < 0.4.0" - cssstyle ">= 0.2.29 < 0.3.0" - escodegen "^1.6.1" - nwmatcher ">= 1.3.7 < 2.0.0" - parse5 "^1.5.1" - request "^2.55.0" - sax "^1.1.4" - symbol-tree ">= 3.1.0 < 4.0.0" - tough-cookie "^2.2.0" - webidl-conversions "^2.0.0" - whatwg-url-compat "~0.6.5" - xml-name-validator ">= 2.0.1 < 3.0.0" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= - -json-pointer@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/json-pointer/-/json-pointer-0.6.1.tgz" - integrity sha512-3OvjqKdCBvH41DLpV4iSt6v2XhZXV1bPB4OROuknvUXI7ZQNofieCPkmE26stEJ9zdQuvIxDHCuYhfgxFAAs+Q== - dependencies: - foreach "^2.0.4" - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz" - integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -json5@^2.1.2: - version "2.2.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz" - integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== - dependencies: - minimist "^1.2.5" - -jsondown@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/jsondown/-/jsondown-1.0.0.tgz" - integrity sha512-p6XxPaq59aXwcdDQV3ISMA5xk+1z6fJuctcwwSdR9iQgbYOcIrnknNrhcMGG+0FaUfKHGkdDpQNaZrovfBoyOw== - dependencies: - memdown "1.4.1" - mkdirp "0.5.1" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -keccak@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz" - integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== - dependencies: - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - -keyv@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz" - integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== - dependencies: - json-buffer "3.0.0" - -kind-of@^3.0.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^6.0.0: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -lazy-debug-legacy@0.0.X: - version "0.0.3" - resolved "https://registry.npmjs.org/lazy-debug/-/lazy-debug-0.0.3.tgz" - -lazystream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz" - integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= - dependencies: - readable-stream "^2.0.5" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - -lcid@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" - integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== - dependencies: - invert-kv "^2.0.0" - -level-codec@9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.1.tgz" - integrity sha512-ajFP0kJ+nyq4i6kptSM+mAvJKLOg1X5FiFPtLG9M5gCEZyBmgDi3FkDrvlMkEzrUn1cWxtvVmrvoS4ASyO/q+Q== - -level-codec@9.0.2, level-codec@^9.0.0: - version "9.0.2" - resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.2.tgz" - integrity sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ== - dependencies: - buffer "^5.6.0" - -level-concat-iterator@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz" - integrity sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw== - -level-errors@^2.0.0, level-errors@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz" - integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== - dependencies: - errno "~0.1.1" - -level-iterator-stream@~4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz" - integrity sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q== - dependencies: - inherits "^2.0.4" - readable-stream "^3.4.0" - xtend "^4.0.2" - -level-js@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/level-js/-/level-js-4.0.2.tgz" - integrity sha512-PeGjZsyMG4O89KHiez1zoMJxStnkM+oBIqgACjoo5PJqFiSUUm3GNod/KcbqN5ktyZa8jkG7I1T0P2u6HN9lIg== - dependencies: - abstract-leveldown "~6.0.1" - immediate "~3.2.3" - inherits "^2.0.3" - ltgt "^2.1.2" - typedarray-to-buffer "~3.1.5" - -level-packager@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-5.1.1.tgz" - integrity sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ== - dependencies: - encoding-down "^6.3.0" - levelup "^4.3.2" - -level-supports@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-1.0.1.tgz" - integrity sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg== - dependencies: - xtend "^4.0.2" - -level-write-stream@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/level-write-stream/-/level-write-stream-1.0.0.tgz" - integrity sha1-P3+7Z5pVE3wP6zA97nZuEu4Twdw= - dependencies: - end-stream "~0.1.0" - -level@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/level/-/level-5.0.1.tgz" - integrity sha512-wcak5OQeA4rURGacqS62R/xNHjCYnJSQDBOlm4KNUGJVE9bWv2B04TclqReYejN+oD65PzD4FsqeWoI5wNC5Lg== - dependencies: - level-js "^4.0.0" - level-packager "^5.0.0" - leveldown "^5.0.0" - opencollective-postinstall "^2.0.0" - -leveldown@5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.0.2.tgz" - integrity sha512-Ib6ygFYBleS8x2gh3C1AkVsdrUShqXpe6jSTnZ6sRycEXKhqVf+xOSkhgSnjidpPzyv0d95LJVFrYQ4NuXAqHA== - dependencies: - abstract-leveldown "~6.0.0" - fast-future "~1.0.2" - napi-macros "~1.8.1" - node-gyp-build "~3.8.0" - -leveldown@^5.0.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.6.0.tgz" - integrity sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ== - dependencies: - abstract-leveldown "~6.2.1" - napi-macros "~2.0.0" - node-gyp-build "~4.1.0" - -levelup@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.0.2.tgz" - integrity sha512-cx9PmLENwbGA3svWBEbeO2HazpOSOYSXH4VA+ahVpYyurvD+SDSfURl29VBY2qgyk+Vfy2dJd71SBRckj/EZVA== - dependencies: - deferred-leveldown "~5.0.0" - level-errors "~2.0.0" - level-iterator-stream "~4.0.0" - xtend "~4.0.0" - -levelup@4.4.0, levelup@^4.3.2: - version "4.4.0" - resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.4.0.tgz" - integrity sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ== - dependencies: - deferred-leveldown "~5.3.0" - level-errors "~2.0.0" - level-iterator-stream "~4.0.0" - level-supports "~1.0.0" - xtend "~4.0.0" - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -linked-list@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/linked-list/-/linked-list-0.1.0.tgz" - integrity sha1-eYsP+X0bkqT9CEgPVa6k6dSdN78= - -load-json-file@^1.0.0, load-json-file@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz" - integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - strip-bom "^3.0.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash-es@^4.2.1: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz" - integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== - -lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" - integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= - -lodash.assign@^4.0.3, lodash.assign@^4.0.6: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz" - integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= - -lodash.assignin@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz" - integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= - -lodash.assigninwith@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assigninwith/-/lodash.assigninwith-4.2.0.tgz" - integrity sha1-rwLJhDKshtk9ppW0voAUAZcXNq8= - -lodash.clonedeep@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz" - integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= - -lodash.escaperegexp@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz" - integrity sha1-ZHYsSGGAglGKw99Mz11YhtriA0c= - -lodash.flatten@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz" - integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= - -lodash.isequal@^4.0.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz" - integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= - -lodash.keys@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.2.0.tgz" - integrity sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU= - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash.partition@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.partition/-/lodash.partition-4.6.0.tgz" - integrity sha1-o45GtzRp4EILDaEhLmbUFL42S6Q= - -lodash.rest@^4.0.0: - version "4.0.5" - resolved "https://registry.yarnpkg.com/lodash.rest/-/lodash.rest-4.0.5.tgz" - integrity sha1-lU73UEkmIDjJbR/Jiyj9r58Hcqo= - -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz" - integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= - -lodash.sum@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/lodash.sum/-/lodash.sum-4.0.2.tgz" - integrity sha1-rZDjl5ZdgD1PH/eqWy0Bl/O0Y3s= - -lodash.template@4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.2.4.tgz" - integrity sha1-0FPBno50442WW/T7SV2A8Qnn96Q= - dependencies: - lodash._reinterpolate "~3.0.0" - lodash.assigninwith "^4.0.0" - lodash.keys "^4.0.0" - lodash.rest "^4.0.0" - lodash.templatesettings "^4.0.0" - lodash.tostring "^4.0.0" - -lodash.templatesettings@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz" - integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== - dependencies: - lodash._reinterpolate "^3.0.0" - -lodash.tostring@^4.0.0: - version "4.1.4" - resolved "https://registry.yarnpkg.com/lodash.tostring/-/lodash.tostring-4.1.4.tgz" - integrity sha1-Vgwn0fjq3eA8LM4Zj+9cAx2CmPs= - -lodash.zipwith@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.zipwith/-/lodash.zipwith-4.2.0.tgz" - integrity sha1-r6zwP9LzhK8p4mPDxr2juA4/Uf0= - -lodash@4.17.21, lodash@^4.1.0, lodash@^4.15.0, lodash@^4.17.11, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.4, lodash@^4.2.1: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz" - integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== - dependencies: - chalk "^4.0.0" - -log-symbols@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz" - integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== - dependencies: - chalk "^2.0.1" - -loglevel@^1.6.7: - version "1.7.1" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.1.tgz" - integrity sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw== - -long@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz" - integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== - -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lower-case-first@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz" - integrity sha1-5dp8JvKacHO+AtUrrJmA5ZIq36E= - dependencies: - lower-case "^1.1.2" - -lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz" - integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= - -lower-case@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz" - integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== - dependencies: - tslib "^2.0.3" - -lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -ltgt@2.2.1, ltgt@^2.1.2, ltgt@~2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz" - integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= - -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - -map-age-cleaner@^0.1.1: - version "0.1.3" - resolved "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" - integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== - dependencies: - p-defer "^1.0.0" - -map-stream@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.0.6.tgz" - integrity sha1-0u9OuBGihkTHqJiZhcacL91JaCc= - -marked@0.3.19: - version "0.3.19" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz" - integrity sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg== - -math-random@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz" - integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -mem@^4.0.0: - version "4.3.0" - resolved "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" - integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== - dependencies: - map-age-cleaner "^0.1.1" - mimic-fn "^2.0.0" - p-is-promise "^2.0.0" - -memdown@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz" - integrity sha1-tOThkhdGZP+65BNhqlAPMRnv4hU= - dependencies: - abstract-leveldown "~2.7.1" - functional-red-black-tree "^1.0.1" - immediate "^3.2.3" - inherits "~2.0.1" - ltgt "~2.2.0" - safe-buffer "~5.1.1" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -merge-stream@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz" - integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= - dependencies: - readable-stream "^2.0.1" - -merge2@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -micromatch@^2.3.7: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz" - integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -micromatch@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== - dependencies: - braces "^3.0.1" - picomatch "^2.0.5" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@1.46.0: - version "1.46.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz" - integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ== - -mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.29" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.29.tgz" - integrity sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ== - dependencies: - mime-db "1.46.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -mimic-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -mimic-response@^1.0.0, mimic-response@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz" - integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= - dependencies: - dom-walk "^0.1.0" - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - -mkdirp-promise@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz" - integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= - dependencies: - mkdirp "*" - -mkdirp@*: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mkdirp@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - -mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mocha@8.1.2: - version "8.1.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.1.2.tgz" - integrity sha512-I8FRAcuACNMLQn3lS4qeWLxXqLvGf6r2CaLstDpZmMUUSmvW6Cnm1AuHxgbc7ctZVRcfwspCRbDHymPsi3dkJw== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.4.2" - debug "4.1.1" - diff "4.0.2" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.1.6" - growl "1.10.5" - he "1.2.0" - js-yaml "3.14.0" - log-symbols "4.0.0" - minimatch "3.0.4" - ms "2.1.2" - object.assign "4.1.0" - promise.allsettled "1.0.2" - serialize-javascript "4.0.0" - strip-json-comments "3.0.1" - supports-color "7.1.0" - which "2.0.2" - wide-align "1.1.3" - workerpool "6.0.0" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.1" - -mock-fs@^4.1.0: - version "4.13.0" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.13.0.tgz" - integrity sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA== - -module@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/module/-/module-1.2.5.tgz" - integrity sha1-tQPrBs3BNHP1aBhCaXTN5+xZvxU= - dependencies: - chalk "1.1.3" - concat-stream "1.5.1" - lodash.template "4.2.4" - map-stream "0.0.6" - tildify "1.2.0" - vinyl-fs "2.4.3" - yargs "4.6.0" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -multibase@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz" - integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multibase@~0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz" - integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multicodec@^0.5.5: - version "0.5.7" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz" - integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== - dependencies: - varint "^5.0.0" - -multicodec@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz" - integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== - dependencies: - buffer "^5.6.0" - varint "^5.0.0" - -multihashes@^0.4.15, multihashes@~0.4.15: - version "0.4.21" - resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz" - integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== - dependencies: - buffer "^5.5.0" - multibase "^0.7.0" - varint "^5.0.0" - -nan@^2.12.1: - version "2.14.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz" - integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== - -nano-json-stream-parser@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz" - integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= - -nanoid@^2.0.0: - version "2.1.11" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz" - integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== - -napi-macros@~1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-1.8.2.tgz" - integrity sha512-Tr0DNY4RzTaBG2W2m3l7ZtFuJChTH6VZhXVhkGGjF/4cZTt+i8GcM9ozD+30Lmr4mDoZ5Xx34t2o4GJqYWDGcg== - -napi-macros@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz" - integrity sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - -needle@^2.2.1: - version "2.6.0" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.6.0.tgz" - integrity sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg== - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - -next-tick@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz" - integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -no-case@^2.2.0, no-case@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz" - integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== - dependencies: - lower-case "^1.1.1" - -no-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz" - integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== - dependencies: - lower-case "^2.0.2" - tslib "^2.0.3" - -node-addon-api@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz" - integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== - -node-fetch@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.4.1.tgz" - integrity sha512-P9UbpFK87NyqBZzUuDBDz4f6Yiys8xm8j7ACDbi6usvFm6KItklQUKjeoqTrYS/S1k6I8oaOC2YLLDr/gg26Mw== - -node-fetch@2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz" - integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== - -node-fetch@2.6.1, node-fetch@^2.1.2, node-fetch@^2.2.0, node-fetch@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -node-gyp-build@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz" - integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== - -node-gyp-build@~3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-3.8.0.tgz" - integrity sha512-bYbpIHyRqZ7sVWXxGpz8QIRug5JZc/hzZH4GbdT9HTZi6WmKCZ8GLvP8OZ9TTiIBvwPFKgtGrlWQSXDAvYdsPw== - -node-gyp-build@~4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.1.1.tgz" - integrity sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ== - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz" - integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= - -node-interval-tree@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/node-interval-tree/-/node-interval-tree-1.3.3.tgz" - integrity sha512-K9vk96HdTK5fEipJwxSvIIqwTqr4e3HRJeJrNxBSeVMNSC/JWARRaX7etOLOuTmrRMeOI/K5TCJu3aWIwZiNTw== - dependencies: - shallowequal "^1.0.2" - -node-pre-gyp@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz" - integrity sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - -node-releases@^1.1.70: - version "1.1.71" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz" - integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg== - -nofilter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz" - integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== - -noop-fn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/noop-fn/-/noop-fn-1.0.0.tgz" - integrity sha1-XzPUfxPSFQ35PgywNmmemC94/78= - -nopt@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz" - integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-package-data@^2.3.2: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.0.1, normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-url@^4.1.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz" - integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== - -npm-bundled@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz" - integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== - dependencies: - npm-normalize-package-bin "^1.0.1" - -npm-normalize-package-bin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz" - integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== - -npm-packlist@^1.1.6: - version "1.4.8" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz" - integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - npm-normalize-package-bin "^1.0.1" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -nth-check@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz" - integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - dependencies: - boolbase "~1.0.0" - -nullthrows@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz" - integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -number-to-bn@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz" - integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA= - dependencies: - bn.js "4.11.6" - strip-hex-prefix "1.0.0" - -"nwmatcher@>= 1.3.7 < 2.0.0": - version "1.4.4" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz" - integrity sha512-3iuY4N5dhgMpCUrOVnuAdGrgxVqV2cJpM+XNccjR2DKOB1RUP0aA+wGXEiNziG/UKboFyGBIoKOaNlJxx8bciQ== - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz" - integrity sha1-ejs9DpgGPUP0wD8uiubNUahog6A= - -object-assign@^4, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-inspect@^1.8.0, object-inspect@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz" - integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== - -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object-path@^0.11.4: - version "0.11.5" - resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.5.tgz" - integrity sha512-jgSbThcoR/s+XumvGMTMf81QVBmah+/Q7K7YduKeKVWL7N111unR2d6pZZarSk6kY/caeNxUDyxOvMWyzoU2eg== - -object.assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - -object.assign@^4.1.0, object.assign@^4.1.1, object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - -object.entries@^1.1.2: - version "1.1.3" - resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.3.tgz" - integrity sha512-ym7h7OZebNS96hn5IJeyUmaWhaSM4SVtAPPfNLQEI2MYWCO2egsITb9nab2+i/Pwibx+R0mtn+ltKJXRSeTMGg== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - has "^1.0.3" - -object.getownpropertydescriptors@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz" - integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz" - integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -object.values@^1.1.1: - version "1.1.3" - resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.3.tgz" - integrity sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - has "^1.0.3" - -oboe@2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz" - integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= - dependencies: - http-https "^1.0.0" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - dependencies: - mimic-fn "^1.0.0" - -opencollective-postinstall@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz" - integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== - -optimism@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.14.0.tgz" - integrity sha512-ygbNt8n4DOCVpkwiLF+IrKKeNHOjtr9aXLWGP9HNJGoblSGsnVbJLstcH6/nE9Xy5ZQtlkSioFQNnthmENW6FQ== - dependencies: - "@wry/context" "^0.5.2" - "@wry/trie" "^0.2.1" - -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.3" - -ora@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-3.4.0.tgz" - integrity sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg== - dependencies: - chalk "^2.4.2" - cli-cursor "^2.1.0" - cli-spinners "^2.0.0" - log-symbols "^2.2.0" - strip-ansi "^5.2.0" - wcwidth "^1.0.1" - -ordered-read-streams@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz" - integrity sha1-cTfmmzKYuzQiR6G77jiByA4v14s= - dependencies: - is-stream "^1.0.1" - readable-stream "^2.0.1" - -original-require@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/original-require/-/original-require-1.0.1.tgz" - integrity sha1-DxMEcVhM0zURxew4yNWSE/msXiA= - -original@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz" - integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== - dependencies: - url-parse "^1.4.3" - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz" - integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= - dependencies: - lcid "^1.0.0" - -os-locale@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" - integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== - dependencies: - execa "^1.0.0" - lcid "^2.0.0" - mem "^4.0.0" - -os-tmpdir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -p-cancelable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz" - integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== - -p-cancelable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz" - integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== - -p-defer@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" - integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-is-promise@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" - integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== - -p-limit@3.1.0, p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-limit@^2.0.0, p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-timeout@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz" - integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= - dependencies: - p-finally "^1.0.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -param-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz" - integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc= - dependencies: - no-case "^2.2.0" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse-asn1@^5.0.0, parse-asn1@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz" - integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -parse-headers@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz" - integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - -parse5@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz" - integrity sha1-m387DeMr543CQBsXVzzK8Pb1nZQ= - -parse5@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz" - integrity sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA== - dependencies: - "@types/node" "*" - -parseurl@^1.3.2, parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascal-case@^2.0.0, pascal-case@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.1.tgz" - integrity sha1-LVeNNFX2YNpl7KGO+VtODekSdh4= - dependencies: - camel-case "^3.0.0" - upper-case-first "^1.1.0" - -pascal-case@^3.1.1, pascal-case@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz" - integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - -path-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.1.tgz" - integrity sha1-lLgDfDctP+KQbkZbtF4l0ibo7qU= - dependencies: - no-case "^2.2.0" - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz" - integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= - dependencies: - pify "^2.0.0" - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pbkdf2@^3.0.17, pbkdf2@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz" - integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pkg-conf@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-1.1.3.tgz" - integrity sha1-N45W1v0T6Iv7b0ol33qD+qvduls= - dependencies: - find-up "^1.0.0" - load-json-file "^1.1.0" - object-assign "^4.0.1" - symbol "^0.2.1" - -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= - dependencies: - find-up "^2.1.0" - -pluralize@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz" - integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== - -pouchdb-abstract-mapreduce@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-7.2.2.tgz" - integrity sha512-7HWN/2yV2JkwMnGnlp84lGvFtnm0Q55NiBUdbBcaT810+clCGKvhssBCrXnmwShD1SXTwT83aszsgiSfW+SnBA== - dependencies: - pouchdb-binary-utils "7.2.2" - pouchdb-collate "7.2.2" - pouchdb-collections "7.2.2" - pouchdb-errors "7.2.2" - pouchdb-fetch "7.2.2" - pouchdb-mapreduce-utils "7.2.2" - pouchdb-md5 "7.2.2" - pouchdb-utils "7.2.2" - -pouchdb-adapter-leveldb-core@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-adapter-leveldb-core/-/pouchdb-adapter-leveldb-core-7.2.2.tgz" - integrity sha512-K9UGf1Ivwe87mjrMqN+1D07tO/DfU7ariVDrGffuOjvl+3BcvUF25IWrxsBObd4iPOYCH7NVQWRpojhBgxULtQ== - dependencies: - argsarray "0.0.1" - buffer-from "1.1.1" - double-ended-queue "2.1.0-0" - levelup "4.4.0" - pouchdb-adapter-utils "7.2.2" - pouchdb-binary-utils "7.2.2" - pouchdb-collections "7.2.2" - pouchdb-errors "7.2.2" - pouchdb-json "7.2.2" - pouchdb-md5 "7.2.2" - pouchdb-merge "7.2.2" - pouchdb-utils "7.2.2" - sublevel-pouchdb "7.2.2" - through2 "3.0.2" - -pouchdb-adapter-memory@^7.1.1: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-adapter-memory/-/pouchdb-adapter-memory-7.2.2.tgz" - integrity sha512-9o+zdItPEq7rIrxdkUxgsLNaZkDJAGEqqoYgeYdrHidOCZnlhxhX3g7/R/HcpDKC513iEPqJWDJQSfeT6nVKkw== - dependencies: - memdown "1.4.1" - pouchdb-adapter-leveldb-core "7.2.2" - pouchdb-utils "7.2.2" - -pouchdb-adapter-node-websql@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pouchdb-adapter-node-websql/-/pouchdb-adapter-node-websql-7.0.0.tgz" - integrity sha512-fNaOMO8bvMrRTSfmH4RSLSpgnKahRcCA7Z0jg732PwRbGvvMdGbreZwvKPPD1fg2tm2ZwwiXWK2G3+oXyoqZYw== - dependencies: - pouchdb-adapter-websql-core "7.0.0" - pouchdb-utils "7.0.0" - websql "1.0.0" - -pouchdb-adapter-utils@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pouchdb-adapter-utils/-/pouchdb-adapter-utils-7.0.0.tgz" - integrity sha512-UWKPC6jkz6mHUzZefrU7P5X8ZGvBC8LSNZ7BIp0hWvJE6c20cnpDwedTVDpZORcCbVJpDmFOHBYnOqEIblPtbA== - dependencies: - pouchdb-binary-utils "7.0.0" - pouchdb-collections "7.0.0" - pouchdb-errors "7.0.0" - pouchdb-md5 "7.0.0" - pouchdb-merge "7.0.0" - pouchdb-utils "7.0.0" - -pouchdb-adapter-utils@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-adapter-utils/-/pouchdb-adapter-utils-7.2.2.tgz" - integrity sha512-2CzZkTyTyHZkr3ePiWFMTiD5+56lnembMjaTl8ohwegM0+hYhRyJux0biAZafVxgIL4gnCUC4w2xf6WVztzKdg== - dependencies: - pouchdb-binary-utils "7.2.2" - pouchdb-collections "7.2.2" - pouchdb-errors "7.2.2" - pouchdb-md5 "7.2.2" - pouchdb-merge "7.2.2" - pouchdb-utils "7.2.2" - -pouchdb-adapter-websql-core@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pouchdb-adapter-websql-core/-/pouchdb-adapter-websql-core-7.0.0.tgz" - integrity sha512-NyMaH0bl20SdJdOCzd+fwXo8JZ15a48/MAwMcIbXzsRHE4DjFNlRcWAcjUP6uN4Ezc+Gx+r2tkBBMf71mIz1Aw== - dependencies: - pouchdb-adapter-utils "7.0.0" - pouchdb-binary-utils "7.0.0" - pouchdb-collections "7.0.0" - pouchdb-errors "7.0.0" - pouchdb-json "7.0.0" - pouchdb-merge "7.0.0" - pouchdb-utils "7.0.0" - -pouchdb-binary-utils@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pouchdb-binary-utils/-/pouchdb-binary-utils-7.0.0.tgz" - integrity sha512-yUktdOPIPvOVouCjJN3uop+bCcpdPwePrLm9eUAZNgEYnUFu0njdx7Q0WRsZ7UJ6l75HinL5ZHk4bnvEt86FLw== - dependencies: - buffer-from "1.1.0" - -pouchdb-binary-utils@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-binary-utils/-/pouchdb-binary-utils-7.2.2.tgz" - integrity sha512-shacxlmyHbUrNfE6FGYpfyAJx7Q0m91lDdEAaPoKZM3SzAmbtB1i+OaDNtYFztXjJl16yeudkDb3xOeokVL3Qw== - dependencies: - buffer-from "1.1.1" - -pouchdb-collate@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-collate/-/pouchdb-collate-7.2.2.tgz" - integrity sha512-/SMY9GGasslknivWlCVwXMRMnQ8myKHs4WryQ5535nq1Wj/ehpqWloMwxEQGvZE1Sda3LOm7/5HwLTcB8Our+w== - -pouchdb-collections@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pouchdb-collections/-/pouchdb-collections-7.0.0.tgz" - integrity sha512-DaoUr/vU24Q3gM6ghj0va9j/oBanPwkbhkvnqSyC3Dm5dgf5pculNxueLF9PKMo3ycApoWzHMh6N2N8KJbDU2Q== - -pouchdb-collections@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-collections/-/pouchdb-collections-7.2.2.tgz" - integrity sha512-6O9zyAYlp3UdtfneiMYuOCWdUCQNo2bgdjvNsMSacQX+3g8WvIoFQCYJjZZCpTttQGb+MHeRMr8m2U95lhJTew== - -pouchdb-debug@^7.1.1: - version "7.2.1" - resolved "https://registry.yarnpkg.com/pouchdb-debug/-/pouchdb-debug-7.2.1.tgz" - integrity sha512-eP3ht/AKavLF2RjTzBM6S9gaI2/apcW6xvaKRQhEdOfiANqerFuksFqHCal3aikVQuDO+cB/cw+a4RyJn/glBw== - dependencies: - debug "3.1.0" - -pouchdb-errors@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pouchdb-errors/-/pouchdb-errors-7.0.0.tgz" - integrity sha512-dTusY8nnTw4HIztCrNl7AoGgwvS1bVf/3/97hDaGc4ytn72V9/4dK8kTqlimi3UpaurohYRnqac0SGXYP8vgXA== - dependencies: - inherits "2.0.3" - -pouchdb-errors@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-errors/-/pouchdb-errors-7.2.2.tgz" - integrity sha512-6GQsiWc+7uPfgEHeavG+7wuzH3JZW29Dnrvz8eVbDFE50kVFxNDVm3EkYHskvo5isG7/IkOx7PV7RPTA3keG3g== - dependencies: - inherits "2.0.4" - -pouchdb-fetch@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-fetch/-/pouchdb-fetch-7.2.2.tgz" - integrity sha512-lUHmaG6U3zjdMkh8Vob9GvEiRGwJfXKE02aZfjiVQgew+9SLkuOxNw3y2q4d1B6mBd273y1k2Lm0IAziRNxQnA== - dependencies: - abort-controller "3.0.0" - fetch-cookie "0.10.1" - node-fetch "2.6.0" - -pouchdb-find@^7.0.0: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-find/-/pouchdb-find-7.2.2.tgz" - integrity sha512-BmFeFVQ0kHmDehvJxNZl9OmIztCjPlZlVSdpijuFbk/Fi1EFPU1BAv3kLC+6DhZuOqU/BCoaUBY9sn66pPY2ag== - dependencies: - pouchdb-abstract-mapreduce "7.2.2" - pouchdb-collate "7.2.2" - pouchdb-errors "7.2.2" - pouchdb-fetch "7.2.2" - pouchdb-md5 "7.2.2" - pouchdb-selector-core "7.2.2" - pouchdb-utils "7.2.2" - -pouchdb-json@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pouchdb-json/-/pouchdb-json-7.0.0.tgz" - integrity sha512-w0bNRu/7VmmCrFWMYAm62n30wvJJUT2SokyzeTyj3hRohj4GFwTRg1mSZ+iAmxgRKOFE8nzZstLG/WAB4Ymjew== - dependencies: - vuvuzela "1.0.3" - -pouchdb-json@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-json/-/pouchdb-json-7.2.2.tgz" - integrity sha512-3b2S2ynN+aoB7aCNyDZc/4c0IAdx/ir3nsHB+/RrKE9cM3QkQYbnnE3r/RvOD1Xvr6ji/KOCBie+Pz/6sxoaug== - dependencies: - vuvuzela "1.0.3" - -pouchdb-mapreduce-utils@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-7.2.2.tgz" - integrity sha512-rAllb73hIkU8rU2LJNbzlcj91KuulpwQu804/F6xF3fhZKC/4JQMClahk+N/+VATkpmLxp1zWmvmgdlwVU4HtQ== - dependencies: - argsarray "0.0.1" - inherits "2.0.4" - pouchdb-collections "7.2.2" - pouchdb-utils "7.2.2" - -pouchdb-md5@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pouchdb-md5/-/pouchdb-md5-7.0.0.tgz" - integrity sha512-yaSJKhLA3QlgloKUQeb2hLdT3KmUmPfoYdryfwHZuPTpXIRKTnMQTR9qCIRUszc0ruBpDe53DRslCgNUhAyTNQ== - dependencies: - pouchdb-binary-utils "7.0.0" - spark-md5 "3.0.0" - -pouchdb-md5@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-md5/-/pouchdb-md5-7.2.2.tgz" - integrity sha512-c/RvLp2oSh8PLAWU5vFBnp6ejJABIdKqboZwRRUrWcfGDf+oyX8RgmJFlYlzMMOh4XQLUT1IoaDV8cwlsuryZw== - dependencies: - pouchdb-binary-utils "7.2.2" - spark-md5 "3.0.1" - -pouchdb-merge@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pouchdb-merge/-/pouchdb-merge-7.0.0.tgz" - integrity sha512-tci5u6NpznQhGcPv4ho1h0miky9rs+ds/T9zQ9meQeDZbUojXNaX1Jxsb0uYEQQ+HMqdcQs3Akdl0/u0mgwPGg== - -pouchdb-merge@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-merge/-/pouchdb-merge-7.2.2.tgz" - integrity sha512-6yzKJfjIchBaS7Tusuk8280WJdESzFfQ0sb4jeMUNnrqs4Cx3b0DIEOYTRRD9EJDM+je7D3AZZ4AT0tFw8gb4A== - -pouchdb-selector-core@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-selector-core/-/pouchdb-selector-core-7.2.2.tgz" - integrity sha512-XYKCNv9oiNmSXV5+CgR9pkEkTFqxQGWplnVhO3W9P154H08lU0ZoNH02+uf+NjZ2kjse7Q1fxV4r401LEcGMMg== - dependencies: - pouchdb-collate "7.2.2" - pouchdb-utils "7.2.2" - -pouchdb-utils@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pouchdb-utils/-/pouchdb-utils-7.0.0.tgz" - integrity sha512-1bnoX1KdZYHv9wicDIFdO0PLiVIMzNDUBUZ/yOJZ+6LW6niQCB8aCv09ZztmKfSQcU5nnN3fe656tScBgP6dOQ== - dependencies: - argsarray "0.0.1" - clone-buffer "1.0.0" - immediate "3.0.6" - inherits "2.0.3" - pouchdb-collections "7.0.0" - pouchdb-errors "7.0.0" - pouchdb-md5 "7.0.0" - uuid "3.2.1" - -pouchdb-utils@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/pouchdb-utils/-/pouchdb-utils-7.2.2.tgz" - integrity sha512-XmeM5ioB4KCfyB2MGZXu1Bb2xkElNwF1qG+zVFbQsKQij0zvepdOUfGuWvLRHxTOmt4muIuSOmWZObZa3NOgzQ== - dependencies: - argsarray "0.0.1" - clone-buffer "1.0.0" - immediate "3.3.0" - inherits "2.0.4" - pouchdb-collections "7.2.2" - pouchdb-errors "7.2.2" - pouchdb-md5 "7.2.2" - uuid "8.1.0" - -pouchdb@7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/pouchdb/-/pouchdb-7.1.1.tgz" - integrity sha512-8bXWclixNJZqokvxGHRsG19zehSJiaZaz4dVYlhXhhUctz7gMcNTElHjPBzBdZlKKvt9aFDndmXN1VVE53Co8g== - dependencies: - argsarray "0.0.1" - buffer-from "1.1.0" - clone-buffer "1.0.0" - double-ended-queue "2.1.0-0" - fetch-cookie "0.7.0" - immediate "3.0.6" - inherits "2.0.3" - level "5.0.1" - level-codec "9.0.1" - level-write-stream "1.0.0" - leveldown "5.0.2" - levelup "4.0.2" - ltgt "2.2.1" - node-fetch "2.4.1" - readable-stream "1.0.33" - spark-md5 "3.0.0" - through2 "3.0.1" - uuid "3.2.1" - vuvuzela "1.0.3" - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= - -prepend-http@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz" - integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= - -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz" - integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= - -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - -prettier@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz" - integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz" - integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - -promise.allsettled@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/promise.allsettled/-/promise.allsettled-1.0.2.tgz" - integrity sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg== - dependencies: - array.prototype.map "^1.0.1" - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" - iterate-value "^1.0.0" - -promise@^7.1.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz" - integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== - dependencies: - asap "~2.0.3" - -prop-types@^15.7.2: - version "15.7.2" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz" - integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.8.1" - -proxy-addr@~2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz" - integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.9.1" - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= - -psl@^1.1.28, psl@^1.1.33: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz" - integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -pure-rand@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-4.1.2.tgz" - integrity sha512-uLzZpQWfroIqyFWmX/pl0OL2JHJdoU3dbh0dvZ25fChHFJJi56J5oQZhW6QgbT2Llwh1upki84LnTwlZvsungA== - -qs@6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz" - integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -querystring@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz" - integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== - -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - -queue-microtask@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.2.tgz" - integrity sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg== - -randomatic@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz" - integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz" - integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== - dependencies: - bytes "3.1.0" - http-errors "1.7.2" - iconv-lite "0.4.24" - unpipe "1.0.0" - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -react-is@^16.7.0, react-is@^16.8.1: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz" - integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= - dependencies: - find-up "^2.0.0" - read-pkg "^2.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -read-pkg@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz" - integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= - dependencies: - load-json-file "^2.0.0" - normalize-package-data "^2.3.2" - path-type "^2.0.0" - -readable-stream@1.0.33: - version "1.0.33" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.33.tgz" - integrity sha1-OjYN1mwbHX/UcFOJhg7aHQ9hEmw= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@1.1: - version "1.1.13" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz" - integrity sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@1.1.14: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -"readable-stream@2 || 3", readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -"readable-stream@>=1.0.33-1 <1.1.0-0": - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz" - integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@~2.3.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@~0.0.2: - version "0.0.4" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-0.0.4.tgz" - integrity sha1-8y124/uGM0SlSNeZIwBxc2ZbO40= - -readable-stream@~2.0.0: - version "2.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz" - integrity sha1-j5A0HmilPMySh4jaz80Rs265t44= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - -readdirp@~3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz" - integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== - dependencies: - picomatch "^2.2.1" - -redux-cli-logger@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/redux-cli-logger/-/redux-cli-logger-2.1.0.tgz" - integrity sha512-75mVsggAJRSykWy2qxdGI7osocDWvc3RCMeN93hlvS/FxgdRww12NaXslez+W6gBOrSJKO7W16V0IzuISSfCxg== - dependencies: - colors "^1.1.2" - -redux-devtools-core@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/redux-devtools-core/-/redux-devtools-core-0.2.1.tgz" - integrity sha512-RAGOxtUFdr/1USAvxrWd+Gq/Euzgw7quCZlO5TgFpDfG7rB5tMhZUrNyBjpzgzL2yMk0eHnPYIGm7NkIfRzHxQ== - dependencies: - get-params "^0.1.2" - jsan "^3.1.13" - lodash "^4.17.11" - nanoid "^2.0.0" - remotedev-serialize "^0.1.8" - -redux-devtools-instrument@^1.9.4: - version "1.10.0" - resolved "https://registry.yarnpkg.com/redux-devtools-instrument/-/redux-devtools-instrument-1.10.0.tgz" - integrity sha512-X8JRBCzX2ADSMp+iiV7YQ8uoTNyEm0VPFPd4T854coz6lvRiBrFSqAr9YAS2n8Kzxx8CJQotR0QF9wsMM+3DvA== - dependencies: - lodash "^4.17.19" - symbol-observable "^1.2.0" - -redux-saga@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/redux-saga/-/redux-saga-1.0.0.tgz" - integrity sha512-GvJWs/SzMvEQgeaw6sRMXnS2FghlvEGsHiEtTLpJqc/FHF3I5EE/B+Hq5lyHZ8LSoT2r/X/46uWvkdCnK9WgHA== - dependencies: - "@redux-saga/core" "^1.0.0" - -redux@^3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz" - integrity sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A== - dependencies: - lodash "^4.2.1" - lodash-es "^4.2.1" - loose-envify "^1.1.0" - symbol-observable "^1.0.3" - -redux@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.5.tgz" - integrity sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w== - dependencies: - loose-envify "^1.4.0" - symbol-observable "^1.2.0" - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regenerator-runtime@^0.13.4: - version "0.13.7" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz" - integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz" - integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== - dependencies: - is-equal-shallow "^0.1.3" - -regexpp@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz" - integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== - -relay-compiler@10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/relay-compiler/-/relay-compiler-10.1.0.tgz" - integrity sha512-HPqc3N3tNgEgUH5+lTr5lnLbgnsZMt+MRiyS0uAVNhuPY2It0X1ZJG+9qdA3L9IqKFUNwVn6zTO7RArjMZbARQ== - dependencies: - "@babel/core" "^7.0.0" - "@babel/generator" "^7.5.0" - "@babel/parser" "^7.0.0" - "@babel/runtime" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.0.0" - babel-preset-fbjs "^3.3.0" - chalk "^4.0.0" - fb-watchman "^2.0.0" - fbjs "^3.0.0" - glob "^7.1.1" - immutable "~3.7.6" - nullthrows "^1.1.1" - relay-runtime "10.1.0" - signedsource "^1.0.0" - yargs "^15.3.1" - -relay-runtime@10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/relay-runtime/-/relay-runtime-10.1.0.tgz" - integrity sha512-bxznLnQ1ST6APN/cFi7l0FpjbZVchWQjjhj9mAuJBuUqNNCh9uV+UTRhpQF7Q8ycsPp19LHTpVyGhYb0ustuRQ== - dependencies: - "@babel/runtime" "^7.0.0" - fbjs "^3.0.0" - -remote-redux-devtools@^0.5.12: - version "0.5.16" - resolved "https://registry.yarnpkg.com/remote-redux-devtools/-/remote-redux-devtools-0.5.16.tgz" - integrity sha512-xZ2D1VRIWzat5nsvcraT6fKEX9Cfi+HbQBCwzNnUAM8Uicm/anOc60XGalcaDPrVmLug7nhDl2nimEa3bL3K9w== - dependencies: - jsan "^3.1.13" - querystring "^0.2.0" - redux-devtools-core "^0.2.1" - redux-devtools-instrument "^1.9.4" - rn-host-detect "^1.1.5" - socketcluster-client "^14.2.1" - -remotedev-serialize@^0.1.8: - version "0.1.9" - resolved "https://registry.yarnpkg.com/remotedev-serialize/-/remotedev-serialize-0.1.9.tgz" - integrity sha512-5tFdZg9mSaAWTv6xmQ7HtHjKMLSFQFExEZOtJe10PLsv1wb7cy7kYHtBvTYRro27/3fRGEcQBRNKSaixOpb69w== - dependencies: - jsan "^3.1.13" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -replace-ext@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz" - integrity sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ= - -request@^2.55.0, request@^2.79.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - -reselect-tree@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/reselect-tree/-/reselect-tree-1.3.4.tgz" - integrity sha512-1OgNq1IStyJFqIqOoD3k3Ge4SsYCMP9W88VQOfvgyLniVKLfvbYO1Vrl92SyEK5021MkoBX6tWb381VxTDyPBQ== - dependencies: - debug "^3.1.0" - esdoc "^1.0.4" - json-pointer "^0.6.0" - reselect "^4.0.0" - source-map-support "^0.5.3" - -reselect@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.0.0.tgz" - integrity sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA== - -resolve-from@5.0.0, resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0: - version "1.20.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz" - integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== - dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" - -responselike@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - dependencies: - lowercase-keys "^1.0.0" - -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - -retry@0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz" - integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^2.6.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -rlp@^2.2.3: - version "2.2.6" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.6.tgz" - integrity sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg== - dependencies: - bn.js "^4.11.1" - -rn-host-detect@^1.1.5: - version "1.2.0" - resolved "https://registry.yarnpkg.com/rn-host-detect/-/rn-host-detect-1.2.0.tgz" - integrity sha512-btNg5kzHcjZZ7t7mvvV/4wNJ9e3MPgrWivkRgWURzXL0JJ0pwWlU4zrbmdlz3HHzHOxhBhHB4D+/dbMFfu4/4A== - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sax@^1.1.4, sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -sc-channel@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/sc-channel/-/sc-channel-1.2.0.tgz" - integrity sha512-M3gdq8PlKg0zWJSisWqAsMmTVxYRTpVRqw4CWAdKBgAfVKumFcTjoCV0hYu7lgUXccCtCD8Wk9VkkE+IXCxmZA== - dependencies: - component-emitter "1.2.1" - -sc-errors@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/sc-errors/-/sc-errors-2.0.1.tgz" - integrity sha512-JoVhq3Ud+3Ujv2SIG7W0XtjRHsrNgl6iXuHHsh0s+Kdt5NwI6N2EGAZD4iteitdDv68ENBkpjtSvN597/wxPSQ== - -sc-formatter@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/sc-formatter/-/sc-formatter-3.0.2.tgz" - integrity sha512-9PbqYBpCq+OoEeRQ3QfFIGE6qwjjBcd2j7UjgDlhnZbtSnuGgHdcRklPKYGuYFH82V/dwd+AIpu8XvA1zqTd+A== - -scrypt-js@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz" - integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== - -scrypt-js@^3.0.0, scrypt-js@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz" - integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== - -secp256k1@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz" - integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg== - dependencies: - elliptic "^6.5.2" - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.2.1, semver@^7.3.4: - version "7.3.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== - dependencies: - lru-cache "^6.0.0" - -send@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz" - integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.7.2" - mime "1.6.0" - ms "2.1.1" - on-finished "~2.3.0" - range-parser "~1.2.1" - statuses "~1.5.0" - -sentence-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz" - integrity sha1-H24t2jnBaL+S0T+G1KkYkz9mftQ= - dependencies: - no-case "^2.2.0" - upper-case-first "^1.1.2" - -serialize-javascript@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz" - integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== - dependencies: - randombytes "^2.1.0" - -serve-static@1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz" - integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.17.1" - -servify@^0.1.12: - version "0.1.12" - resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz" - integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== - dependencies: - body-parser "^1.16.0" - cors "^2.8.1" - express "^4.14.0" - request "^2.79.0" - xhr "^2.3.3" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -setimmediate@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz" - integrity sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48= - -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz" - integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shallowequal@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz" - integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - -signedsource@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/signedsource/-/signedsource-1.0.0.tgz" - integrity sha1-HdrOSYF5j5O9gzlzgD2A1S6TrWo= - -simple-concat@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz" - integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - -simple-get@^2.7.0: - version "2.8.1" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz" - integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== - dependencies: - decompress-response "^3.3.0" - once "^1.3.1" - simple-concat "^1.0.0" - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -snake-case@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz" - integrity sha1-Qb2xtz8w7GagTU4srRt2OH1NbZ8= - dependencies: - no-case "^2.2.0" - -socketcluster-client@^14.2.1: - version "14.3.1" - resolved "https://registry.yarnpkg.com/socketcluster-client/-/socketcluster-client-14.3.1.tgz" - integrity sha512-Sd/T0K/9UlqTfz+HUuFq90dshA5OBJPQbdkRzGtcKIOm52fkdsBTt0FYpiuzzxv5VrU7PWpRm6KIfNXyPwlLpw== - dependencies: - buffer "^5.2.1" - clone "2.1.1" - component-emitter "1.2.1" - linked-list "0.1.0" - querystring "0.2.0" - sc-channel "^1.2.0" - sc-errors "^2.0.1" - sc-formatter "^3.0.1" - uuid "3.2.1" - ws "7.1.0" - -source-map-resolve@^0.5.2: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@0.5.12: - version "0.5.12" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" - integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-support@^0.5.19, source-map-support@^0.5.3: - version "0.5.19" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz" - integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz" - integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== - -source-map@^0.5.0, source-map@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -spark-md5@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spark-md5/-/spark-md5-3.0.0.tgz" - integrity sha1-NyIifFTi+vJLHcbZM8wUTm9xv+8= - -spark-md5@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spark-md5/-/spark-md5-3.0.1.tgz" - integrity sha512-0tF3AGSD1ppQeuffsLDIOWlKUd3lS92tFxcsrh5Pe3ZphhnoK+oXIBTzOAThZCiuINZLvpiLH/1VS1/ANEJVig== - -spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.7" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz" - integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -sqlite3@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-4.2.0.tgz" - integrity sha512-roEOz41hxui2Q7uYnWsjMOTry6TcNUNmp8audCx18gF10P2NknwdpF+E+HKvz/F2NvPKGGBF4NGc+ZPQ+AABwg== - dependencies: - nan "^2.12.1" - node-pre-gyp "^0.11.0" - -sse-z@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/sse-z/-/sse-z-0.3.0.tgz" - integrity sha512-jfcXynl9oAOS9YJ7iqS2JMUEHOlvrRAD+54CENiWnc4xsuVLQVSgmwf7cwOTcBd/uq3XkQKBGojgvEtVXcJ/8w== - -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -stoppable@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/stoppable/-/stoppable-1.1.0.tgz" - integrity sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw== - -stream-shift@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz" - integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== - -streamsearch@0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz" - integrity sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo= - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz" - integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz" - integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" - -string.prototype.trimend@^1.0.1, string.prototype.trimend@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz" - integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -string.prototype.trimstart@^1.0.1, string.prototype.trimstart@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz" - integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== - dependencies: - ansi-regex "^5.0.0" - -strip-bom-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz" - integrity sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4= - dependencies: - first-chunk-stream "^1.0.0" - strip-bom "^2.0.0" - -strip-bom@2.X, strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-hex-prefix@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz" - integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= - dependencies: - is-hex-prefixed "1.0.0" - -strip-json-comments@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz" - integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== - -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -sublevel-pouchdb@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/sublevel-pouchdb/-/sublevel-pouchdb-7.2.2.tgz" - integrity sha512-y5uYgwKDgXVyPZceTDGWsSFAhpSddY29l9PJbXqMJLfREdPmQTY8InpatohlEfCXX7s1LGcrfYAhxPFZaJOLnQ== - dependencies: - inherits "2.0.4" - level-codec "9.0.2" - ltgt "2.2.1" - readable-stream "1.1.14" - -subscriptions-transport-ws@^0.9.11, subscriptions-transport-ws@^0.9.16: - version "0.9.18" - resolved "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.18.tgz" - integrity sha512-tztzcBTNoEbuErsVQpTN2xUNN/efAZXyCyL5m3x4t6SKrEiTL2N8SaKWBFWM4u56pL79ULif3zjyeq+oV+nOaA== - dependencies: - backo2 "^1.0.2" - eventemitter3 "^3.1.0" - iterall "^1.2.1" - symbol-observable "^1.0.4" - ws "^5.2.0" - -supports-color@7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz" - integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== - dependencies: - has-flag "^4.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -swap-case@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz" - integrity sha1-w5IDpFhzhfrTyFCgvRvK+ggZdOM= - dependencies: - lower-case "^1.1.1" - upper-case "^1.1.1" - -swarm-js@^0.1.40: - version "0.1.40" - resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz" - integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== - dependencies: - bluebird "^3.5.0" - buffer "^5.0.5" - eth-lib "^0.1.26" - fs-extra "^4.0.2" - got "^7.1.0" - mime-types "^2.1.16" - mkdirp-promise "^5.0.1" - mock-fs "^4.1.0" - setimmediate "^1.0.5" - tar "^4.0.2" - xhr-request "^1.0.1" - -symbol-observable@^1.0.3, symbol-observable@^1.0.4, symbol-observable@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz" - integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== - -symbol-observable@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-2.0.3.tgz" - integrity sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA== - -"symbol-tree@>= 3.1.0 < 4.0.0": - version "3.2.4" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - -symbol@^0.2.1: - version "0.2.3" - resolved "https://registry.yarnpkg.com/symbol/-/symbol-0.2.3.tgz" - integrity sha1-O5hzuKkB5Hxu/iFSajrDcu8ou8c= - -sync-fetch@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/sync-fetch/-/sync-fetch-0.3.0.tgz" - integrity sha512-dJp4qg+x4JwSEW1HibAuMi0IIrBI3wuQr2GimmqB7OXR50wmwzfdusG+p39R9w3R6aFtZ2mzvxvWKQ3Bd/vx3g== - dependencies: - buffer "^5.7.0" - node-fetch "^2.6.1" - -table@^6.0.4: - version "6.0.7" - resolved "https://registry.yarnpkg.com/table/-/table-6.0.7.tgz" - integrity sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g== - dependencies: - ajv "^7.0.2" - lodash "^4.17.20" - slice-ansi "^4.0.0" - string-width "^4.2.0" - -taffydb@2.7.3: - version "2.7.3" - resolved "https://registry.yarnpkg.com/taffydb/-/taffydb-2.7.3.tgz" - integrity sha1-KtNxaWKUmPylvIQkMJbTzeDsOjQ= - -tar@^4, tar@^4.0.2: - version "4.4.13" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz" - integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - -through2-filter@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz" - integrity sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw= - dependencies: - through2 "~2.0.0" - xtend "~4.0.0" - -through2-filter@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz" - integrity sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA== - dependencies: - through2 "~2.0.0" - xtend "~4.0.0" - -through2@2.X, through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through2@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz" - integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== - dependencies: - readable-stream "2 || 3" - -through2@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz" - integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== - dependencies: - inherits "^2.0.4" - readable-stream "2 || 3" - -through2@^0.6.0: - version "0.6.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz" - integrity sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg= - dependencies: - readable-stream ">=1.0.33-1 <1.1.0-0" - xtend ">=4.0.0 <4.1.0-0" - -tildify@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz" - integrity sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo= - dependencies: - os-homedir "^1.0.0" - -timed-out@^4.0.0, timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= - -tiny-queue@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/tiny-queue/-/tiny-queue-0.2.1.tgz" - integrity sha1-JaZ/LG4lOyypQZd7XvdELvl6YEY= - -title-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz" - integrity sha1-PhJyFtpY0rxb7PE3q5Ha46fNj6o= - dependencies: - no-case "^2.2.0" - upper-case "^1.0.3" - -to-absolute-glob@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz" - integrity sha1-HN+kcqnvUMI57maZm2YsoOs5k38= - dependencies: - extend-shallow "^2.0.1" - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-readable-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz" - integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== - -tough-cookie@^2.2.0, tough-cookie@^2.3.1, tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -"tough-cookie@^2.3.3 || ^3.0.1 || ^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz" - integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.1.2" - -tr46@~0.0.1: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz" - integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -truffle@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.2.2.tgz" - integrity sha512-66wAdFM/n1Mf1o227hhOteAJCgF9pIPKywbQ0u21qyD2LahU4VZsOjci6GY0Iv/5nDWm57GM+GNhikSdSTKvRQ== - dependencies: - "@truffle/debugger" "^8.0.16" - app-module-path "^2.2.0" - mocha "8.1.2" - original-require "^1.0.1" - optionalDependencies: - "@truffle/db" "^0.5.2" - -ts-invariant@^0.4.0: - version "0.4.4" - resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz" - integrity sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA== - dependencies: - tslib "^1.9.3" - -ts-invariant@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.6.1.tgz" - integrity sha512-QQgN33g8E8yrdDuH29HASveLtbzMnRRgWh0i/JNTW4+zcLsdIOnfsgEDi/NKx4UckQyuMFt9Ujm6TWLWQ58Kvg== - dependencies: - "@types/ungap__global-this" "^0.3.1" - "@ungap/global-this" "^0.4.2" - tslib "^1.9.3" - -tsconfig-paths@^3.9.0: - version "3.9.0" - resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz" - integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.1" - minimist "^1.2.0" - strip-bom "^3.0.0" - -tslib@^1.10.0, tslib@^1.14.1, tslib@^1.9.3: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslib@^2.0.3, tslib@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz" - integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== - -tslib@~2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz" - integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - dependencies: - prelude-ls "~1.1.2" - -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - -type-is@^1.6.16, type-is@~1.6.17, type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -type@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz" - integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== - -type@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/type/-/type-2.3.0.tgz" - integrity sha512-rgPIqOdfK/4J9FhiVrZ3cveAjRRo5rsQBAIhnylX874y1DX/kEKSVdLsnuHB6l1KTjHyU01VjiMBHgU2adejyg== - -typedarray-to-buffer@^3.1.5, typedarray-to-buffer@~3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -typedarray@~0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -typescript-compare@^0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/typescript-compare/-/typescript-compare-0.0.2.tgz" - integrity sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA== - dependencies: - typescript-logic "^0.0.0" - -typescript-logic@^0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/typescript-logic/-/typescript-logic-0.0.0.tgz" - integrity sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q== - -typescript-tuple@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/typescript-tuple/-/typescript-tuple-2.2.1.tgz" - integrity sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q== - dependencies: - typescript-compare "^0.0.2" - -ua-parser-js@^0.7.18: - version "0.7.24" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.24.tgz" - integrity sha512-yo+miGzQx5gakzVK3QFfN0/L9uVhosXBBO7qmnk7c2iw1IhL212wfA3zbnI54B0obGwC/5NWub/iT9sReMx+Fw== - -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz" - integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== - -unbox-primitive@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.0.tgz" - integrity sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA== - dependencies: - function-bind "^1.1.1" - has-bigints "^1.0.0" - has-symbols "^1.0.0" - which-boxed-primitive "^1.0.1" - -underscore@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== - -unique-stream@^2.0.2: - version "2.3.1" - resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz" - integrity sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A== - dependencies: - json-stable-stringify-without-jsonify "^1.0.1" - through2-filter "^3.0.0" - -unique-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz" - integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= - dependencies: - crypto-random-string "^1.0.0" - -universalify@^0.1.0, universalify@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - -unixify@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unixify/-/unixify-1.0.0.tgz" - integrity sha1-OmQcjC/7zk2mg6XHDwOkYpQMIJA= - dependencies: - normalize-path "^2.1.1" - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -upper-case-first@^1.1.0, upper-case-first@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz" - integrity sha1-XXm+3P8UQZUY/S7bCgUHybaFkRU= - dependencies: - upper-case "^1.1.1" - -upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz" - integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -url-parse-lax@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz" - integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= - dependencies: - prepend-http "^1.0.1" - -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= - dependencies: - prepend-http "^2.0.0" - -url-parse@^1.4.3: - version "1.5.1" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz" - integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - -url-set-query@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz" - integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk= - -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz" - integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= - -utf-8-validate@^5.0.2: - version "5.0.4" - resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.4.tgz" - integrity sha512-MEF05cPSq3AwJ2C7B7sHAA6i53vONoZbMGX8My5auEVm6W+dJ2Jd/TZPyGJ5CH42V2XtbI5FD28HeHeqlPzZ3Q== - dependencies: - node-gyp-build "^4.2.0" - -utf8@3.0.0, utf8@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz" - integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util.promisify@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.1.1.tgz" - integrity sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - for-each "^0.3.3" - has-symbols "^1.0.1" - object.getownpropertydescriptors "^2.1.1" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz" - integrity sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w= - -uuid@3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz" - integrity sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA== - -uuid@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -uuid@8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.1.0.tgz" - integrity sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg== - -uuid@^3.1.0, uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -uuid@^8.0.0: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -v8-compile-cache@^2.0.3: - version "2.2.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz" - integrity sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q== - -vali-date@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/vali-date/-/vali-date-1.0.0.tgz" - integrity sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY= - -valid-url@1.0.9: - version "1.0.9" - resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz" - integrity sha1-HBRHm0DxOXp1eC8RXkCGRHQzogA= - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -varint@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz" - integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== - -vary@^1, vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vinyl-fs@2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-2.4.3.tgz" - integrity sha1-PZflYuv91LZpId6nBia4S96dLQc= - dependencies: - duplexify "^3.2.0" - glob-stream "^5.3.2" - graceful-fs "^4.0.0" - gulp-sourcemaps "^1.5.2" - is-valid-glob "^0.3.0" - lazystream "^1.0.0" - lodash.isequal "^4.0.0" - merge-stream "^1.0.0" - mkdirp "^0.5.0" - object-assign "^4.0.0" - readable-stream "^2.0.4" - strip-bom "^2.0.0" - strip-bom-stream "^1.0.0" - through2 "^2.0.0" - through2-filter "^2.0.0" - vali-date "^1.0.0" - vinyl "^1.0.0" - -vinyl@1.X, vinyl@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz" - integrity sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ= - dependencies: - clone "^1.0.0" - clone-stats "^0.0.1" - replace-ext "0.0.1" - -vuvuzela@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/vuvuzela/-/vuvuzela-1.0.3.tgz" - integrity sha1-O+FF5YJxxzylUnndhR8SpoIRSws= - -wcwidth@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz" - integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= - dependencies: - defaults "^1.0.3" - -web3-bzz@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.9.tgz" - integrity sha512-ogVQr9jHodu9HobARtvUSmWG22cv2EUQzlPeejGWZ7j5h20HX40EDuWyomGY5VclIj5DdLY76Tmq88RTf/6nxA== - dependencies: - "@types/node" "^10.12.18" - got "9.6.0" - swarm-js "^0.1.40" - underscore "1.9.1" - -web3-core-helpers@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.9.tgz" - integrity sha512-t0WAG3orLCE3lqi77ZoSRNFok3VQWZXTniZigDQjyOJYMAX7BU3F3js8HKbjVnAxlX3tiKoDxI0KBk9F3AxYuw== - dependencies: - underscore "1.9.1" - web3-eth-iban "1.2.9" - web3-utils "1.2.9" - -web3-core-method@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.9.tgz" - integrity sha512-bjsIoqP3gs7A/gP8+QeLUCyOKJ8bopteCSNbCX36Pxk6TYfYWNuC6hP+2GzUuqdP3xaZNe+XEElQFUNpR3oyAg== - dependencies: - "@ethersproject/transactions" "^5.0.0-beta.135" - underscore "1.9.1" - web3-core-helpers "1.2.9" - web3-core-promievent "1.2.9" - web3-core-subscriptions "1.2.9" - web3-utils "1.2.9" - -web3-core-promievent@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.9.tgz" - integrity sha512-0eAUA2zjgXTleSrnc1wdoKQPPIHU6KHf4fAscu4W9kKrR+mqP1KsjYrxY9wUyjNnXxfQ+5M29ipvbiaK8OqdOw== - dependencies: - eventemitter3 "3.1.2" - -web3-core-requestmanager@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.9.tgz" - integrity sha512-1PwKV2m46ALUnIN5VPPgjOj8yMLJhhqZYvYJE34hTN5SErOkwhzx5zScvo5MN7v7KyQGFnpVCZKKGCiEnDmtFA== - dependencies: - underscore "1.9.1" - web3-core-helpers "1.2.9" - web3-providers-http "1.2.9" - web3-providers-ipc "1.2.9" - web3-providers-ws "1.2.9" - -web3-core-subscriptions@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.9.tgz" - integrity sha512-Y48TvXPSPxEM33OmXjGVDMzTd0j8X0t2+sDw66haeBS8eYnrEzasWuBZZXDq0zNUsqyxItgBGDn+cszkgEnFqg== - dependencies: - eventemitter3 "3.1.2" - underscore "1.9.1" - web3-core-helpers "1.2.9" - -web3-core@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.9.tgz" - integrity sha512-fSYv21IP658Ty2wAuU9iqmW7V+75DOYMVZsDH/c14jcF/1VXnedOcxzxSj3vArsCvXZNe6XC5/wAuGZyQwR9RA== - dependencies: - "@types/bn.js" "^4.11.4" - "@types/node" "^12.6.1" - bignumber.js "^9.0.0" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-core-requestmanager "1.2.9" - web3-utils "1.2.9" - -web3-eth-abi@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.9.tgz" - integrity sha512-3YwUYbh/DMfDbhMWEebAdjSd5bj3ZQieOjLzWFHU23CaLEqT34sUix1lba+hgUH/EN6A7bKAuKOhR3p0OvTn7Q== - dependencies: - "@ethersproject/abi" "5.0.0-beta.153" - underscore "1.9.1" - web3-utils "1.2.9" - -web3-eth-accounts@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.9.tgz" - integrity sha512-jkbDCZoA1qv53mFcRHCinoCsgg8WH+M0YUO1awxmqWXRmCRws1wW0TsuSQ14UThih5Dxolgl+e+aGWxG58LMwg== - dependencies: - crypto-browserify "3.12.0" - eth-lib "^0.2.8" - ethereumjs-common "^1.3.2" - ethereumjs-tx "^2.1.1" - scrypt-js "^3.0.1" - underscore "1.9.1" - uuid "3.3.2" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-utils "1.2.9" - -web3-eth-contract@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.9.tgz" - integrity sha512-PYMvJf7EG/HyssUZa+pXrc8IB06K/YFfWYyW4R7ed3sab+9wWUys1TlWxBCBuiBXOokSAyM6H6P6/cKEx8FT8Q== - dependencies: - "@types/bn.js" "^4.11.4" - underscore "1.9.1" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-core-promievent "1.2.9" - web3-core-subscriptions "1.2.9" - web3-eth-abi "1.2.9" - web3-utils "1.2.9" - -web3-eth-ens@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.9.tgz" - integrity sha512-kG4+ZRgZ8I1WYyOBGI8QVRHfUSbbJjvJAGA1AF/NOW7JXQ+x7gBGeJw6taDWJhSshMoEKWcsgvsiuoG4870YxQ== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - underscore "1.9.1" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-promievent "1.2.9" - web3-eth-abi "1.2.9" - web3-eth-contract "1.2.9" - web3-utils "1.2.9" - -web3-eth-iban@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.9.tgz" - integrity sha512-RtdVvJE0pyg9dHLy0GzDiqgnLnssSzfz/JYguhC1wsj9+Gnq1M6Diy3NixACWUAp6ty/zafyOaZnNQ+JuH9TjQ== - dependencies: - bn.js "4.11.8" - web3-utils "1.2.9" - -web3-eth-personal@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.9.tgz" - integrity sha512-cFiNrktxZ1C/rIdJFzQTvFn3/0zcsR3a+Jf8Y3KxeQDHszQtosjLWptP7bsUmDwEh4hzh0Cy3KpOxlYBWB8bJQ== - dependencies: - "@types/node" "^12.6.1" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-net "1.2.9" - web3-utils "1.2.9" - -web3-eth@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.9.tgz" - integrity sha512-sIKO4iE9FEBa/CYUd6GdPd7GXt/wISqxUd8PlIld6+hvMJj02lgO7Z7p5T9mZIJcIZJGvZX81ogx8oJ9yif+Ag== - dependencies: - underscore "1.9.1" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-core-subscriptions "1.2.9" - web3-eth-abi "1.2.9" - web3-eth-accounts "1.2.9" - web3-eth-contract "1.2.9" - web3-eth-ens "1.2.9" - web3-eth-iban "1.2.9" - web3-eth-personal "1.2.9" - web3-net "1.2.9" - web3-utils "1.2.9" - -web3-net@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.9.tgz" - integrity sha512-d2mTn8jPlg+SI2hTj2b32Qan6DmtU9ap/IUlJTeQbZQSkTLf0u9suW8Vjwyr4poJYXTurdSshE7OZsPNn30/ZA== - dependencies: - web3-core "1.2.9" - web3-core-method "1.2.9" - web3-utils "1.2.9" - -web3-providers-http@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.9.tgz" - integrity sha512-F956tCIj60Ttr0UvEHWFIhx+be3He8msoPzyA44/kfzzYoMAsCFRn5cf0zQG6al0znE75g6HlWVSN6s3yAh51A== - dependencies: - web3-core-helpers "1.2.9" - xhr2-cookies "1.1.0" - -web3-providers-ipc@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.9.tgz" - integrity sha512-NQ8QnBleoHA2qTJlqoWu7EJAD/FR5uimf7Ielzk4Z2z+m+6UAuJdJMSuQNj+Umhz9L/Ys6vpS1vHx9NizFl+aQ== - dependencies: - oboe "2.1.4" - underscore "1.9.1" - web3-core-helpers "1.2.9" - -web3-providers-ws@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.9.tgz" - integrity sha512-6+UpvINeI//dglZoAKStUXqxDOXJy6Iitv2z3dbgInG4zb8tkYl/VBDL80UjUg3ZvzWG0g7EKY2nRPEpON2TFA== - dependencies: - eventemitter3 "^4.0.0" - underscore "1.9.1" - web3-core-helpers "1.2.9" - websocket "^1.0.31" - -web3-shh@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.9.tgz" - integrity sha512-PWa8b/EaxaMinFaxy6cV0i0EOi2M7a/ST+9k9nhyhCjVa2vzXuNoBNo2IUOmeZ0WP2UQB8ByJ2+p4htlJaDOjA== - dependencies: - web3-core "1.2.9" - web3-core-method "1.2.9" - web3-core-subscriptions "1.2.9" - web3-net "1.2.9" - -web3-utils@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.9.tgz" - integrity sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w== - dependencies: - bn.js "4.11.8" - eth-lib "0.2.7" - ethereum-bloom-filters "^1.0.6" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - underscore "1.9.1" - utf8 "3.0.0" - -web3@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.9.tgz" - integrity sha512-Mo5aBRm0JrcNpN/g4VOrDzudymfOnHRC3s2VarhYxRA8aWgF5rnhQ0ziySaugpic1gksbXPe105pUWyRqw8HUA== - dependencies: - web3-bzz "1.2.9" - web3-core "1.2.9" - web3-eth "1.2.9" - web3-eth-personal "1.2.9" - web3-net "1.2.9" - web3-shh "1.2.9" - web3-utils "1.2.9" - -webidl-conversions@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-2.0.1.tgz" - integrity sha1-O/glj30xjHRDw28uFpQCoaZwNQY= - -websocket@^1.0.31: - version "1.0.33" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.33.tgz" - integrity sha512-XwNqM2rN5eh3G2CUQE3OHZj+0xfdH42+OFK6LdC2yqiC0YU8e5UK0nYre220T0IyyN031V/XOvtHvXozvJYFWA== - dependencies: - bufferutil "^4.0.1" - debug "^2.2.0" - es5-ext "^0.10.50" - typedarray-to-buffer "^3.1.5" - utf-8-validate "^5.0.2" - yaeti "^0.0.6" - -websql@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/websql/-/websql-1.0.0.tgz" - integrity sha512-7iZ+u28Ljw5hCnMiq0BCOeSYf0vCFQe/ORY0HgscTiKjQed8WqugpBUggJ2NTnB9fahn1kEnPRX2jf8Px5PhJw== - dependencies: - argsarray "^0.0.1" - immediate "^3.2.2" - noop-fn "^1.0.0" - sqlite3 "^4.0.0" - tiny-queue "^0.2.1" - -whatwg-url-compat@~0.6.5: - version "0.6.5" - resolved "https://registry.yarnpkg.com/whatwg-url-compat/-/whatwg-url-compat-0.6.5.tgz" - integrity sha1-AImBEa9om7CXVBzVpFymyHmERb8= - dependencies: - tr46 "~0.0.1" - -which-boxed-primitive@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which@2.0.2, which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -which@^1.2.9: - version "1.3.1" - resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wide-align@1.1.3, wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -window-size@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz" - integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= - -word-wrap@^1.2.3, word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -workerpool@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.0.tgz" - integrity sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA== - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@^2.0.0: - version "2.4.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz" - integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -write-stream@~0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/write-stream/-/write-stream-0.4.3.tgz" - integrity sha1-g8yMA0fQr2BXqThitOOuAd5cgcE= - dependencies: - readable-stream "~0.0.2" - -ws@7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.1.0.tgz" - integrity sha512-Swie2C4fs7CkwlHu1glMePLYJJsWjzhl1vm3ZaLplD0h7OMkZyZ6kLTB/OagiU923bZrPFXuDTeEqaEN4NWG4g== - dependencies: - async-limiter "^1.0.0" - -ws@7.4.3: - version "7.4.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.3.tgz" - integrity sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA== - -ws@^3.0.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz" - integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - -ws@^5.2.0: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz" - integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== - dependencies: - async-limiter "~1.0.0" - -ws@^6.0.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz" - integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== - dependencies: - async-limiter "~1.0.0" - -xdg-basedir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz" - integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ= - -xhr-request-promise@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz" - integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== - dependencies: - xhr-request "^1.1.0" - -xhr-request@^1.0.1, xhr-request@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz" - integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== - dependencies: - buffer-to-arraybuffer "^0.0.5" - object-assign "^4.1.1" - query-string "^5.0.1" - simple-get "^2.7.0" - timed-out "^4.0.1" - url-set-query "^1.0.0" - xhr "^2.0.4" - -xhr2-cookies@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz" - integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg= - dependencies: - cookiejar "^2.1.1" - -xhr@^2.0.4, xhr@^2.3.3: - version "2.6.0" - resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz" - integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== - dependencies: - global "~4.4.0" - is-function "^1.0.1" - parse-headers "^2.0.0" - xtend "^4.0.0" - -"xml-name-validator@>= 2.0.1 < 3.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz" - integrity sha1-TYuPHszTQZqjYgYb7O9RXh5VljU= - -xmlhttprequest@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz" - integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= - -xss@^1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/xss/-/xss-1.0.8.tgz" - integrity sha512-3MgPdaXV8rfQ/pNn16Eio6VXYPTkqwa0vc7GkiymmY/DqR1SE/7VPAAVZz1GJsJFrllMYO3RHfEaiUGjab6TNw== - dependencies: - commander "^2.20.3" - cssfilter "0.0.10" - -"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz" - integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== - -y18n@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz" - integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== - -yaeti@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz" - integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= - -yallist@^3.0.0, yallist@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz" - integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^18.1.2: - version "18.1.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz" - integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz" - integrity sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ= - dependencies: - camelcase "^3.0.0" - lodash.assign "^4.0.6" - -yargs-unparser@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.1.tgz" - integrity sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA== - dependencies: - camelcase "^5.3.1" - decamelize "^1.2.0" - flat "^4.1.0" - is-plain-obj "^1.1.0" - yargs "^14.2.3" - -yargs@13.2.4: - version "13.2.4" - resolved "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" - integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - os-locale "^3.1.0" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.0" - -yargs@13.3.2: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yargs@4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.6.0.tgz" - integrity sha1-y0BQwBWb+2u2ScD0r1UFJqhGGdw= - dependencies: - camelcase "^2.0.1" - cliui "^3.2.0" - decamelize "^1.1.1" - lodash.assign "^4.0.3" - os-locale "^1.4.0" - pkg-conf "^1.1.2" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" - string-width "^1.0.1" - window-size "^0.2.0" - y18n "^3.2.1" - yargs-parser "^2.4.0" - -yargs@^14.2.3: - version "14.2.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz" - integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== - dependencies: - cliui "^5.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^15.0.1" - -yargs@^15.3.1: - version "15.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== - dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^18.1.2" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -zen-observable-ts@^0.8.21: - version "0.8.21" - resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz" - integrity sha512-Yj3yXweRc8LdRMrCC8nIc4kkjWecPAUVh0TI0OUrWXx6aX790vLcDlWca6I4vsyCGH3LpWxq0dJRcMOFoVqmeg== - dependencies: - tslib "^1.9.3" - zen-observable "^0.8.0" - -zen-observable@^0.8.0, zen-observable@^0.8.14: - version "0.8.15" - resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz" - integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== From b093d16e286137da88b1454e5d244a630cfd5ea9 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 10 Mar 2021 13:50:37 +0100 Subject: [PATCH 154/185] Fix Panic in Burrow accounts, patch GRPC JS deps Signed-off-by: Silas Davis --- cmd/burrow/commands/accounts.go | 3 ++- js/package.json | 6 +++--- js/yarn.lock | 26 +++++++++++++------------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/cmd/burrow/commands/accounts.go b/cmd/burrow/commands/accounts.go index 14a40765f..6c30a0228 100644 --- a/cmd/burrow/commands/accounts.go +++ b/cmd/burrow/commands/accounts.go @@ -43,7 +43,8 @@ func Accounts(output Output) func(cmd *cli.Cmd) { output.Printf("Account: %s\n Sequence: %d", acc.Address.String(), acc.Sequence) - if len(acc.PublicKey.PublicKey) > 0 { + publicKey := acc.GetPublicKey() + if publicKey != nil && len(publicKey.PublicKey) > 0 { output.Printf(" Public Key: %s\n", acc.PublicKey.String()) } if acc.WASMCode != nil && len(acc.WASMCode) > 0 { diff --git a/js/package.json b/js/package.json index d3dd073d3..8de8d2241 100644 --- a/js/package.json +++ b/js/package.json @@ -18,7 +18,7 @@ "test": "./test.sh 'src/test/**/*.test.ts'" }, "dependencies": { - "@grpc/grpc-js": "^1.2.4", + "@grpc/grpc-js": "^1.2.10", "@types/ethereumjs-abi": "^0.6.3", "bn.js": "^5.1.3", "ethereumjs-abi": "^0.6.8", @@ -31,7 +31,7 @@ "devDependencies": { "@types/mocha": "^8.2.0", "grpc-tools": "^1.10.0", - "grpc_tools_node_protoc_ts": " ^5.1.1", + "grpc_tools_node_protoc_ts": "^5.1.3", "mocha": "^8.2.1" }, "mocha": { @@ -64,4 +64,4 @@ "type": "git", "url": "git+https://github.com/hyperledger/burrow.git" } -} \ No newline at end of file +} diff --git a/js/yarn.lock b/js/yarn.lock index ed506e073..f9628c1bc 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -2,12 +2,12 @@ # yarn lockfile v1 -"@grpc/grpc-js@^1.2.4": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.2.4.tgz#04f0bbefb2636296d17e821f3d52152fbe2f6989" - integrity sha512-z+EI20HYHLd3/uERtwOqP8Q4EPhGbz5RKUpiyo6xPWfR3pcjpf8sfNvY9XytDQ4xo1wNz7NqH1kh2UBonwzbfg== +"@grpc/grpc-js@^1.2.10": + version "1.2.10" + resolved "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.2.10.tgz#f316d29a45fcc324e923d593cb849d292b1ed598" + integrity sha512-wj6GkNiorWYaPiIZ767xImmw7avMMVUweTvPFg4mJWOxz2180DKwfuxhJJZ7rpc1+7D3mX/v8vJdxTuIo71Ieg== dependencies: - "@types/node" "^12.12.47" + "@types/node" ">=12.12.47" google-auth-library "^6.1.1" semver "^6.2.0" @@ -35,10 +35,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.2.tgz#160d82623610db590a64e8ca81784e11117e5a54" integrity sha512-LB2R1Oyhpg8gu4SON/mfforE525+Hi/M1ineICEDftqNVTyFg1aRIeGuTvXAoWHc4nbrFncWtJgMmoyRvuGh7A== -"@types/node@^12.12.47": - version "12.19.15" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.15.tgz#0de7e978fb43db62da369db18ea088a63673c182" - integrity sha512-lowukE3GUI+VSYSu6VcBXl14d61Rp5hA1D+61r16qnwC0lYNSqdxcvRh0pswejorHfS+HgwBasM8jLXz0/aOsw== +"@types/node@>=12.12.47": + version "14.14.33" + resolved "https://registry.npmjs.org/@types/node/-/node-14.14.33.tgz#9e4f8c64345522e4e8ce77b334a8aaa64e2b6c78" + integrity sha512-oJqcTrgPUF29oUP8AsUqbXGJNuPutsetaa9kTQAQce5Lx5dTYWV02ScBiT/k1BX/Z7pKeqedmvp39Wu4zR7N7g== "@ungap/promise-all-settled@1.1.2": version "1.1.2" @@ -1216,10 +1216,10 @@ grpc-tools@^1.10.0: dependencies: node-pre-gyp "^0.15.0" -"grpc_tools_node_protoc_ts@ ^5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.1.1.tgz#199fff9a2143cf672adc693c1774ef20ecf48258" - integrity sha512-IR+629LMKQnwLQxAnNz9GTLKSWX+d0HcO8JNeU+Vf2dW3d2pdM4ue7Vsx/gvXClcrywx3/pbPkXVeJNC8MkEcg== +grpc_tools_node_protoc_ts@^5.1.3: + version "5.1.3" + resolved "https://registry.npmjs.org/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.1.3.tgz#c24d6470b6f0204a7ec920cee0f057fcb11eea66" + integrity sha512-BiElSWEmRgrhWFV/+yFtRiqxC3D/nrk1g0GezJ/9ZrJxUvu/0sBVeqe4rTmkFFqQVZTRX1+MNOVeOJKDmQ41Xg== dependencies: google-protobuf "3.12.4" handlebars "4.7.6" From 30b9441da8a3a68a95393e037f5268b998bd2034 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 10 Mar 2021 13:51:40 +0100 Subject: [PATCH 155/185] Prepare 0.31.0 Signed-off-by: Silas Davis --- CHANGELOG.md | 4 ++-- NOTES.md | 32 +++++++++++++++++++++++++++++++- project/history.go | 2 +- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 981f5c3dd..8c280cbad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog -## [Unreleased] +## [0.31.0] ### Changed - [Tendermint] Upgraded to Tendermint 0.34.3 - [Docker] Image will now start testnet by default @@ -701,7 +701,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. -[Unreleased]: https://github.com/hyperledger/burrow/compare/v0.30.5...HEAD +[0.31.0]: https://github.com/hyperledger/burrow/compare/v0.30.5...v0.31.0 [0.30.5]: https://github.com/hyperledger/burrow/compare/v0.30.4...v0.30.5 [0.30.4]: https://github.com/hyperledger/burrow/compare/v0.30.3...v0.30.4 [0.30.3]: https://github.com/hyperledger/burrow/compare/v0.30.2...v0.30.3 diff --git a/NOTES.md b/NOTES.md index 5d3b8f732..30791f63c 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,33 @@ +### Changed +- [Tendermint] Upgraded to Tendermint 0.34.3 +- [Docker] Image will now start testnet by default + ### Added -- [Vent] Add BytesToHex flag on projection field mappings that causes bytes fields (e.g. bytes32) solidity fields to be hex-encoded and mapped to varchar(64) rather than bytea/blob columns in postgres/sqlite +- [Vent] Added support for building Vent SQL tables from Ethereum web3 JSONRPC chains (useful for oracles/state channels with layer 1) +- [Vent] Added Status to healthcheck endpoint on Vent +- [Natives] Implemented ecrecover using btcec (revised key handling) +- [Engine] Implement cross-engine dispatch +- [WASM] Implement cross-engine calls and calls to precompiles +- [WASM] Significantly extend eWASM support and implement functions +- [WASM] Add printing debug functions +- [WASM] Implement CREATE, GETTXGASPRICE, GETBLOCKDIFFICULTY, SELFDESTRUCT eWASM functions (thanks Yoongbok Lee!) +- [WASM/JS] JS library supports deploying WASM code +- [Deploy] Can specify WASM in playbook +- [EVM] Implement CHAINID and DIFFICULTY opcodes +- [Query] PEG query grammar now supports Not ("NOT") and NotEqual ("!=") operators + +### Fixed +- [Deploy] Fix flaky parallel tests +- [EVM] Use correct opcode for create2 (thanks Vitali Grabovski!) +- [ABI] Check length of input before decoding (thanks Tri-stone!) +- [WASM] Constructor argument handling +- [RLP] Incorrect use of offsets for longer bytes strings +- [RLP] Use minimal encoding for length prefixes (no leading zeros) +- [Web3] Generate correct encoding hash for RawTx (ChainID in hash digest but not payload) +- [Web3] Generate canonical weird Ethereum hex +- [State] Fix read concurrency in RWTree (on which state is based) removing need for CallSim lock workaround + +### Security +- Updated elliptic JS dep to 6.5.3 +- Updated lodash to 4.17.19 diff --git a/project/history.go b/project/history.go index af09da3cc..fd058f583 100644 --- a/project/history.go +++ b/project/history.go @@ -48,7 +48,7 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( - "", + "0.31.0", `### Changed - [Tendermint] Upgraded to Tendermint 0.34.3 - [Docker] Image will now start testnet by default From de8c58026caed84b03a0c5a3f4cdce89df99e824 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 10 Mar 2021 15:03:25 +0100 Subject: [PATCH 156/185] Switch to yarn publish and fix syntax, disable chart publish for now Signed-off-by: Silas Davis --- .github/workflows/release.yaml | 36 +++++++++++++++------------------- Makefile | 10 +++++++++- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8e2e6cf94..2ae3bad13 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,7 +21,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# TODO: convert this to yarn equivalent publish js: name: npm runs-on: ubuntu-latest @@ -31,19 +30,15 @@ jobs: - uses: actions/setup-node@v1 with: node-version: '14.x' - - run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10} - name: publish env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | git config --global user.email "${GITHUB_ACTOR}" git config --global user.name "${GITHUB_ACTOR}" - cd js - npm install - npm run build - npm version $RELEASE_VERSION - npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" - npm publish --access public . + yarn --cwd js install + yarn --cwd js version --no-git-tag-version --new-version $(git describe --tags) + make publish_js docker: name: docker @@ -63,14 +58,15 @@ jobs: docker tag ${DOCKER_REPO}:${tag#v} ${DOCKER_REPO}:latest docker push --all-tags ${DOCKER_REPO} - charts: - runs-on: ubuntu-latest - env: - CM_USERNAME: ${{ secrets.CM_USERNAME }} - CM_PASSWORD: ${{ secrets.CM_PASSWORD }} - CM_URL: ${{ secrets.CM_URL }} - steps: - - uses: actions/checkout@v2 - - run: git fetch --unshallow --prune - - run: make helm_deps - - run: make helm_push +# TODO: reinstate +# charts: +# runs-on: ubuntu-latest +# env: +# HELM_USERNAME: ${{ secrets.CM_USERNAME }} +# HELM_PASSWORD: ${{ secrets.CM_PASSWORD }} +# HELM_URL: ${{ secrets.CM_URL }} +# steps: +# - uses: actions/checkout@v2 +# - run: git fetch --unshallow --prune +# - run: make helm_deps +# - run: make helm_push diff --git a/Makefile b/Makefile index ba5adfa84..fe186a3b4 100644 --- a/Makefile +++ b/Makefile @@ -210,6 +210,11 @@ yarn_install: test_js: @cd ${BURROW_TS_PATH} && yarn test +.PHONY: publish_js +publish_js: + yarn build + yarn publish --access public + .PHONY: test test: check bin/solc bin/solang @tests/scripts/bin_wrapper.sh go test ./... ${GO_TEST_ARGS} @@ -348,9 +353,12 @@ bin/helm: mkdir -p bin curl https://get.helm.sh/helm-v3.0.2-$(ARCH).tar.gz | tar xvzO $(ARCH)/helm > bin/helm && chmod +x bin/helm + +// TODO: reinstate + .PHONY: helm_deps helm_deps: bin/helm - @bin/helm repo add --username "$(CM_USERNAME)" --password "$(CM_PASSWORD)" chartmuseum $(CM_URL) + @bin/helm repo add --username "$(HELM_USERNAME)" --password "$(HELM_PASSWORD)" chartmuseum $(HELM_URL) .PHONY: helm_test helm_test: bin/helm From e91f808eb8d7d4bcc0c4a4c1fb3a252cda74102e Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 10 Mar 2021 15:41:33 +0100 Subject: [PATCH 157/185] Try to fix npm deploy Signed-off-by: Silas Davis --- .github/workflows/release.yaml | 9 ++++++--- Makefile | 5 ----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2ae3bad13..bbc32b61e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -36,9 +36,12 @@ jobs: run: | git config --global user.email "${GITHUB_ACTOR}" git config --global user.name "${GITHUB_ACTOR}" - yarn --cwd js install - yarn --cwd js version --no-git-tag-version --new-version $(git describe --tags) - make publish_js + cd js + yarn install + yarn version --no-git-tag-version --new-version $(git describe --tags) + yarn build + yarn publish --access public + docker: name: docker diff --git a/Makefile b/Makefile index fe186a3b4..5396a6e42 100644 --- a/Makefile +++ b/Makefile @@ -210,11 +210,6 @@ yarn_install: test_js: @cd ${BURROW_TS_PATH} && yarn test -.PHONY: publish_js -publish_js: - yarn build - yarn publish --access public - .PHONY: test test: check bin/solc bin/solang @tests/scripts/bin_wrapper.sh go test ./... ${GO_TEST_ARGS} From d2f1d704b8bcb815964013b124c81ebc2630abbf Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 10 Mar 2021 15:58:37 +0100 Subject: [PATCH 158/185] I trying to publish to npm Signed-off-by: Silas Davis --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bbc32b61e..caaf4b11b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,9 @@ jobs: - run: git fetch --unshallow --prune - uses: actions/setup-node@v1 with: + always-auth: true node-version: '14.x' + registry-url: 'https://registry.npmjs.org' - name: publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 1fc54ec30e1143c25a584fb443a2fc926f4a0640 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Wed, 10 Mar 2021 15:26:30 +0000 Subject: [PATCH 159/185] Ensure `docker run hyperledger/burrow` works burrow.toml is missing Signed-off-by: Sean Young --- testnet/burrow.toml | 60 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 testnet/burrow.toml diff --git a/testnet/burrow.toml b/testnet/burrow.toml new file mode 100644 index 000000000..3bff73fde --- /dev/null +++ b/testnet/burrow.toml @@ -0,0 +1,60 @@ +BurrowDir = ".burrow" + +[Tendermint] + Enabled = true + Seeds = "" + SeedMode = false + PersistentPeers = "" + ListenHost = "0.0.0.0" + ListenPort = "26656" + ExternalAddress = "" + AddrBookStrict = false + Moniker = "" + IdentifyPeers = false + AuthorizedPeers = "" + CreateEmptyBlocks = "5m" + +[Execution] + TimeoutFactor = 0.33 + CallStackMaxDepth = 0 + DataStackInitialCapacity = 1024 + DataStackMaxDepth = 0 + +[Keys] + GRPCServiceEnabled = true + AllowBadFilePermissions = true + RemoteAddress = "" + KeysDirectory = "keys" + +[RPC] + [RPC.Info] + Enabled = true + ListenHost = "0.0.0.0" + ListenPort = "26658" + [RPC.Profiler] + Enabled = false + ListenHost = "0.0.0.0" + ListenPort = "6060" + [RPC.GRPC] + Enabled = true + ListenHost = "0.0.0.0" + ListenPort = "10997" + [RPC.Metrics] + Enabled = false + ListenHost = "0.0.0.0" + ListenPort = "9102" + MetricsPath = "/metrics" + BlockSampleSize = 100 + [RPC.Web3] + Enabled = true + ListenHost = "0.0.0.0" + ListenPort = "26660" + +[Logging] + Trace = false + NonBlocking = false + [Logging.RootSink] + [Logging.RootSink.Output] + OutputType = "stdout" + Format = "json" + From d467b1785075348d488f64dd9c18351c9284a09b Mon Sep 17 00:00:00 2001 From: Sean Young Date: Wed, 10 Mar 2021 17:09:31 +0000 Subject: [PATCH 160/185] Ensure that latest is pushed to hyperledger/burrow on docker hub Signed-off-by: Sean Young --- .github/workflows/develop.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 16b694fcb..2b516247a 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -29,9 +29,8 @@ jobs: steps: - uses: actions/checkout@v2 - run: make docker_build - - name: publish + - name: publish monax env: - DOCKER_REPO: "hyperledger/burrow" DOCKER_REPO_DEV: "quay.io/monax/burrow" DOCKER_PASS_DEV: ${{ secrets.DOCKER_PASS_DEV }} DOCKER_USER_DEV: ${{ secrets.DOCKER_USER_DEV }} @@ -40,3 +39,13 @@ jobs: echo ${DOCKER_PASS_DEV} | docker login --username ${DOCKER_USER_DEV} ${DOCKER_REPO_DEV} --password-stdin docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO_DEV}:${version} docker push --all-tags ${DOCKER_REPO_DEV} + - name: publish hyperledger + env: + DOCKER_REPO: "hyperledger/burrow" + DOCKER_PASS: ${{ secrets.DOCKER_PASS }} + DOCKER_USER: ${{ secrets.DOCKER_USER }} + run: | + version=$(./scripts/local_version.sh) + echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} ${DOCKER_REPO} --password-stdin + docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO}:latest + docker push ${DOCKER_REPO}:latest From 3f8277ec983033fca1770b6adf3c97b1b825f402 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Wed, 10 Mar 2021 17:40:07 +0000 Subject: [PATCH 161/185] Ensure that latest is pushed to hyperledger/burrow on docker hub #2 Signed-off-by: Sean Young --- .github/workflows/develop.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 2b516247a..3a96a3229 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -31,6 +31,7 @@ jobs: - run: make docker_build - name: publish monax env: + DOCKER_REPO: "hyperledger/burrow" DOCKER_REPO_DEV: "quay.io/monax/burrow" DOCKER_PASS_DEV: ${{ secrets.DOCKER_PASS_DEV }} DOCKER_USER_DEV: ${{ secrets.DOCKER_USER_DEV }} From d27fd173172bd14dfdcbdc4db5df5c1ffbf5386e Mon Sep 17 00:00:00 2001 From: Sean Young Date: Wed, 10 Mar 2021 18:39:01 +0000 Subject: [PATCH 162/185] Ensure that latest is pushed to hyperledger/burrow on docker hub #3 Signed-off-by: Sean Young --- .github/workflows/develop.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 3a96a3229..95a178ea5 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -47,6 +47,6 @@ jobs: DOCKER_USER: ${{ secrets.DOCKER_USER }} run: | version=$(./scripts/local_version.sh) - echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} ${DOCKER_REPO} --password-stdin + echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} --password-stdin docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO}:latest docker push ${DOCKER_REPO}:latest From a78c60a9ad5ac593f05359d68a8d51104e26475d Mon Sep 17 00:00:00 2001 From: Sean Young Date: Thu, 11 Mar 2021 09:26:23 +0000 Subject: [PATCH 163/185] Make js package work with numbers > 53 bit Signed-off-by: Sean Young --- js/src/lib/utils/convert.ts | 15 ++++++++++++--- js/src/test/bn.test.ts | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 js/src/test/bn.test.ts diff --git a/js/src/lib/utils/convert.ts b/js/src/lib/utils/convert.ts index 23d6bbb93..767c5653b 100644 --- a/js/src/lib/utils/convert.ts +++ b/js/src/lib/utils/convert.ts @@ -1,6 +1,6 @@ import BN from 'bn.js'; -export const recApply = function (func: (input: A) => B, args: A | A[]): B | B[] { +export const recApply = function (func: (input: A) => B, args: A | A[]): B | B[] { if (Array.isArray(args)) { let next: any = []; for (let i = 0; i < args.length; i++) { @@ -34,7 +34,16 @@ export const bytesTA = function (arg: string) { } export const numberTB = function (arg: BN) { - return arg.toNumber(); + let res: BN | number; + try { + // number is limited to 53 bits, BN will throw Error + res = arg.toNumber(); + } + catch { + // arg does not fit into number type, so keep it as BN + res = arg; + } + return res; } export const abiToBurrow = function (puts: string[], args: Array) { @@ -45,7 +54,7 @@ export const abiToBurrow = function (puts: string[], args: Array) { } else if (/bytes/i.test(puts[i])) { out.push(recApply(bytesTB, args[i])); } else if (/int/i.test(puts[i])) { - out.push(recApply(numberTB, args[i])); + out.push(recApply(numberTB, args[i])); } else { out.push(args[i]); } diff --git a/js/src/test/bn.test.ts b/js/src/test/bn.test.ts new file mode 100644 index 000000000..1eebe55d7 --- /dev/null +++ b/js/src/test/bn.test.ts @@ -0,0 +1,37 @@ +import * as assert from 'assert'; +import { burrow, compile } from '../test'; +import BN from 'bn.js'; + +describe('BN', function () { + it('BN', async () => { + const source = ` + pragma solidity >=0.0.0; + contract Test { + function mul(int a, int b) public pure returns (int) { + return a * b; + } + + function getNumber() public pure returns (uint) { + return 1e19; + } + } + ` + const { abi, code } = compile(source, 'Test') + let contract: any = await burrow.contracts.deploy(abi, code); + + await contract.getNumber() + .then(([number]) => { + assert.strictEqual(new BN('10000000000000000000').cmp(number), 0) + }) + + await contract.mul(100, -300) + .then(([number]) => { + assert.strictEqual(number, -30000) + }) + + await contract.mul(new BN('18446744073709551616'), 102) + .then(([number]) => { + assert.strictEqual(new BN('1881567895518374264832').cmp(number), 0) + }) + }) +}) From 8887aced1774beab27b14cb5785705da2a0b3218 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 11 Mar 2021 13:20:59 +0100 Subject: [PATCH 164/185] Fix vent EVM-to-SQL integral number type mapping Signed-off-by: Silas Davis --- .github/workflows/release.yaml | 3 +-- Makefile | 8 +++--- vent/sqlsol/projection.go | 45 +++++++++++++++++----------------- vent/sqlsol/projection_test.go | 4 +-- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index caaf4b11b..45ccec4c6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -40,9 +40,8 @@ jobs: git config --global user.name "${GITHUB_ACTOR}" cd js yarn install - yarn version --no-git-tag-version --new-version $(git describe --tags) yarn build - yarn publish --access public + yarn publish --access public --non-interactive --no-git-tag-version --new-version $(git describe --tags) docker: diff --git a/Makefile b/Makefile index 5396a6e42..4d84c0910 100644 --- a/Makefile +++ b/Makefile @@ -79,10 +79,10 @@ PROTO_GEN_TS_PATH = ${BURROW_TS_PATH}/proto NODE_BIN = ${BURROW_TS_PATH}/node_modules/.bin # To access Tendermint bundled protobuf files from go module cache -TENDERMINT_MOD=github.com/tendermint/tendermint -TENDERMINT_VERSION=$(shell go list -m -f '{{ .Version }}' $(TENDERMINT_MOD)) -TENDERMINT_SRC=$(shell go env GOMODCACHE)/$(TENDERMINT_MOD)@$(TENDERMINT_VERSION) -TENDERMINT_PROTO=$(TENDERMINT_SRC)/proto +TENDERMINT_MOD?=github.com/tendermint/tendermint +TENDERMINT_VERSION?=$(shell go list -m -f '{{ .Version }}' $(TENDERMINT_MOD)) +TENDERMINT_SRC?=$(shell go env GOMODCACHE)/$(TENDERMINT_MOD)@$(TENDERMINT_VERSION) +TENDERMINT_PROTO?=$(TENDERMINT_SRC)/proto PROTO_FILES = $(shell find . $(TENDERMINT_PROTO) -path $(BURROW_TS_PATH) -prune -o -path ./node_modules -prune -o -type f -name '*.proto' -print) PROTO_GO_FILES = $(patsubst %.proto, %.pb.go, $(PROTO_FILES)) diff --git a/vent/sqlsol/projection.go b/vent/sqlsol/projection.go index adcb4b90e..c0d7411c6 100644 --- a/vent/sqlsol/projection.go +++ b/vent/sqlsol/projection.go @@ -262,35 +262,36 @@ func getSQLType(evmSignature string, bytesMapping BytesMapping) (types.SQLColumn // solidity string => sql text case evmSignature == types.EventFieldTypeString: return types.SQLColumnTypeText, 0, nil - // solidity int or int256 => sql bigint - // solidity int <= 32 => sql int - // solidity int > 32 => sql numeric + case strings.HasPrefix(evmSignature, types.EventFieldTypeInt): - if typeSize == 0 || typeSize == 256 { - return types.SQLColumnTypeBigInt, 0, nil - } - if typeSize <= 32 { - return types.SQLColumnTypeInt, 0, nil - } else { - return types.SQLColumnTypeNumeric, 0, nil - } - // solidity uint or uint256 => sql bigint - // solidity uint <= 16 => sql int - // solidity uint > 16 => sql numeric + return evmIntegerSizeToSqlType(typeSize, true), 0, nil + case strings.HasPrefix(evmSignature, types.EventFieldTypeUInt): - if typeSize == 0 || typeSize == 256 { - return types.SQLColumnTypeBigInt, 0, nil - } - if typeSize <= 16 { - return types.SQLColumnTypeInt, 0, nil - } else { - return types.SQLColumnTypeNumeric, 0, nil - } + return evmIntegerSizeToSqlType(typeSize, false), 0, nil default: return -1, 0, fmt.Errorf("do not know how to map evmSignature: %s ", evmSignature) } } +func evmIntegerSizeToSqlType(size int, signed bool) types.SQLColumnType { + // Unsized ints default to 256-bit + if size == 0 { + return types.SQLColumnTypeNumeric + } + // since SQL integers are signed we need an extra bit headroom so high-order bit of a uint isn't interpreted as + // the sign bit + if !signed { + size++ + } + switch { + case size <= 32: + return types.SQLColumnTypeInt + case size <= 64: + return types.SQLColumnTypeBigInt + } + return types.SQLColumnTypeNumeric +} + // getGlobalColumns returns global columns for event table structures, // these columns will be part of every SQL event table to relate data with source events func getGlobalFieldMappings() []*types.EventFieldMapping { diff --git a/vent/sqlsol/projection_test.go b/vent/sqlsol/projection_test.go index ed9e7a439..21e4d8c39 100644 --- a/vent/sqlsol/projection_test.go +++ b/vent/sqlsol/projection_test.go @@ -83,13 +83,13 @@ func TestGetColumn(t *testing.T) { column, err := projection.GetColumn("TEST_TABLE", "Block") require.NoError(t, err) require.Equal(t, "Block", column.Name) - require.Equal(t, types.SQLColumnTypeBigInt, column.Type) + require.Equal(t, types.SQLColumnTypeNumeric, column.Type) require.Equal(t, false, column.Primary) column, err = projection.GetColumn("TEST_TABLE", "Instance") require.NoError(t, err) require.Equal(t, "Instance", column.Name) - require.Equal(t, types.SQLColumnTypeBigInt, column.Type) + require.Equal(t, types.SQLColumnTypeNumeric, column.Type) require.Equal(t, false, column.Primary) }) From 49ce3a40cc002522bf6a477bf16a6c3e202707e3 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 11 Mar 2021 18:19:01 +0100 Subject: [PATCH 165/185] Add ability to build dev burrow.js builds Signed-off-by: Silas Davis --- .github/workflows/develop.yaml | 21 +++++++++++++++++++++ .github/workflows/release.yaml | 5 +---- Makefile | 6 ++++++ js/package.json | 1 + scripts/local_version.sh | 28 +++++++++++++++------------- 5 files changed, 44 insertions(+), 17 deletions(-) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 95a178ea5..934bff911 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -4,6 +4,8 @@ on: branches: - master - release + tags-ignore: + - 'v*' jobs: cover: @@ -23,6 +25,25 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.txt + js: + name: npm + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: git fetch --unshallow --prune + - uses: actions/setup-node@v1 + with: + always-auth: true + node-version: '14.x' + registry-url: 'https://registry.npmjs.org' + - name: publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + git config --global user.email "${GITHUB_ACTOR}" + git config --global user.name "${GITHUB_ACTOR}" + make publish_js + docker: name: docker runs-on: ubuntu-latest diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 45ccec4c6..f238760fa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -38,10 +38,7 @@ jobs: run: | git config --global user.email "${GITHUB_ACTOR}" git config --global user.name "${GITHUB_ACTOR}" - cd js - yarn install - yarn build - yarn publish --access public --non-interactive --no-git-tag-version --new-version $(git describe --tags) + make publish_js docker: diff --git a/Makefile b/Makefile index 4d84c0910..bf3952be6 100644 --- a/Makefile +++ b/Makefile @@ -210,6 +210,12 @@ yarn_install: test_js: @cd ${BURROW_TS_PATH} && yarn test +.PHONY: publish_js +publish_js: + yarn --cwd js install + yarn --cwd js build + yarn --cwd js publish --access public --non-interactive --no-git-tag-version --new-version $(shell ./scripts/local_version.sh) + .PHONY: test test: check bin/solc bin/solang @tests/scripts/bin_wrapper.sh go test ./... ${GO_TEST_ARGS} diff --git a/js/package.json b/js/package.json index 8de8d2241..a8f736e6a 100644 --- a/js/package.json +++ b/js/package.json @@ -1,4 +1,5 @@ { + "version": "0.0.0", "name": "@hyperledger/burrow", "description": "TypeScript library that calls a Hyperledger Burrow server over GRPC.", "main": "./dist/index.js", diff --git a/scripts/local_version.sh b/scripts/local_version.sh index 1491a601b..250a1c5c5 100755 --- a/scripts/local_version.sh +++ b/scripts/local_version.sh @@ -11,12 +11,11 @@ set -e REPO=${REPO:-"$PWD"} VERSION_REGEX="^v[0-9]+\.[0-9]+\.[0-9]+$" - version=$(go run "$REPO/project/cmd/version/main.go") tag=$(git tag --points-at HEAD) function log() { - echo "$*" >> /dev/stderr + echo "$*" >>/dev/stderr } # Gives RFC 3339 with T instead of space @@ -24,20 +23,23 @@ date=$(date -Idate) commit=$(git rev-parse --short HEAD) -if [[ ${tag} =~ ${VERSION_REGEX} ]] ; then - # Only label a build as a release version when the commit is tagged - log "Building release version (tagged $tag)..." - # Fail noisily when trying to build a release version that does not match code tag - if [[ ! ${tag} = "v$version" ]]; then - log "Build failure: version tag $tag does not match version/version.go version $version" - exit 1 - fi +if [[ ${tag} =~ ${VERSION_REGEX} ]]; then + # Only label a build as a release version when the commit is tagged + log "Building release version (tagged $tag)..." + # Fail noisily when trying to build a release version that does not match code tag + if [[ ! ${tag} == "v$version" ]]; then + log "Build failure: version tag $tag does not match version/version.go version $version" + exit 1 + fi else - version="$version-dev-$date-$commit" - log "Building non-release version $version..." + # Semver pre-release build suffix + prerelease="dev.$commit" + prerelease=${prerelease//-/.} + version="$version-$prerelease" + log "Building non-release version $version..." fi # for export date=$(date -Iseconds) -echo ${version} \ No newline at end of file +echo "$version" From 7c33192067b8b84571bfe806492ad92142eb40bd Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 11 Mar 2021 18:58:38 +0100 Subject: [PATCH 166/185] Standardise explicit 'give me a build' to force pushes to 'develop' Signed-off-by: Silas Davis --- .github/workflows/develop.yaml | 66 +++++++++++++--------------------- .github/workflows/master.yaml | 51 ++++++++++++++++++++++++++ cmd/burrow/commands/vent.go | 2 +- 3 files changed, 76 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/master.yaml diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 934bff911..5b02e8612 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -2,29 +2,11 @@ name: develop on: push: branches: - - master - - release + - develop tags-ignore: - 'v*' jobs: - cover: - name: coverage - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v1 - with: - go-version: 1.15 - id: go - - uses: actions/checkout@v2 - - run: make test - env: - GO_TEST_ARGS: "-coverprofile=coverage.txt -covermode=atomic" - - uses: codecov/codecov-action@v1.0.2 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.txt - js: name: npm runs-on: ubuntu-latest @@ -48,26 +30,26 @@ jobs: name: docker runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: make docker_build - - name: publish monax - env: - DOCKER_REPO: "hyperledger/burrow" - DOCKER_REPO_DEV: "quay.io/monax/burrow" - DOCKER_PASS_DEV: ${{ secrets.DOCKER_PASS_DEV }} - DOCKER_USER_DEV: ${{ secrets.DOCKER_USER_DEV }} - run: | - version=$(./scripts/local_version.sh) - echo ${DOCKER_PASS_DEV} | docker login --username ${DOCKER_USER_DEV} ${DOCKER_REPO_DEV} --password-stdin - docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO_DEV}:${version} - docker push --all-tags ${DOCKER_REPO_DEV} - - name: publish hyperledger - env: - DOCKER_REPO: "hyperledger/burrow" - DOCKER_PASS: ${{ secrets.DOCKER_PASS }} - DOCKER_USER: ${{ secrets.DOCKER_USER }} - run: | - version=$(./scripts/local_version.sh) - echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} --password-stdin - docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO}:latest - docker push ${DOCKER_REPO}:latest + - uses: actions/checkout@v2 + - run: make docker_build + - name: publish monax + env: + DOCKER_REPO: "hyperledger/burrow" + DOCKER_REPO_DEV: "quay.io/monax/burrow" + DOCKER_PASS_DEV: ${{ secrets.DOCKER_PASS_DEV }} + DOCKER_USER_DEV: ${{ secrets.DOCKER_USER_DEV }} + run: | + version=$(./scripts/local_version.sh) + echo ${DOCKER_PASS_DEV} | docker login --username ${DOCKER_USER_DEV} ${DOCKER_REPO_DEV} --password-stdin + docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO_DEV}:${version} + docker push --all-tags ${DOCKER_REPO_DEV} + - name: publish hyperledger + env: + DOCKER_REPO: "hyperledger/burrow" + DOCKER_PASS: ${{ secrets.DOCKER_PASS }} + DOCKER_USER: ${{ secrets.DOCKER_USER }} + run: | + version=$(./scripts/local_version.sh) + echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} --password-stdin + docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO}:latest + docker push ${DOCKER_REPO}:latest diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml new file mode 100644 index 000000000..2c978a005 --- /dev/null +++ b/.github/workflows/master.yaml @@ -0,0 +1,51 @@ +name: master +on: + push: + branches: + - master + +jobs: + cover: + name: coverage + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v1 + with: + go-version: 1.15 + id: go + - uses: actions/checkout@v2 + - run: make test + env: + GO_TEST_ARGS: "-coverprofile=coverage.txt -covermode=atomic" + - uses: codecov/codecov-action@v1.0.2 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.txt + + docker: + name: docker + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: make docker_build + - name: publish monax + env: + DOCKER_REPO: "hyperledger/burrow" + DOCKER_REPO_DEV: "quay.io/monax/burrow" + DOCKER_PASS_DEV: ${{ secrets.DOCKER_PASS_DEV }} + DOCKER_USER_DEV: ${{ secrets.DOCKER_USER_DEV }} + run: | + version=$(./scripts/local_version.sh) + echo ${DOCKER_PASS_DEV} | docker login --username ${DOCKER_USER_DEV} ${DOCKER_REPO_DEV} --password-stdin + docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO_DEV}:${version} + docker push --all-tags ${DOCKER_REPO_DEV} + - name: publish hyperledger + env: + DOCKER_REPO: "hyperledger/burrow" + DOCKER_PASS: ${{ secrets.DOCKER_PASS }} + DOCKER_USER: ${{ secrets.DOCKER_USER }} + run: | + version=$(./scripts/local_version.sh) + echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} --password-stdin + docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO}:latest + docker push ${DOCKER_REPO}:latest diff --git a/cmd/burrow/commands/vent.go b/cmd/burrow/commands/vent.go index 5d91e803a..619f9459c 100644 --- a/cmd/burrow/commands/vent.go +++ b/cmd/burrow/commands/vent.go @@ -34,7 +34,7 @@ func Vent(output Output) func(cmd *cli.Cmd) { httpAddrOpt := cmd.StringOpt("http-addr", cfg.HTTPListenAddress, "Address to bind the HTTP server") logLevelOpt := cmd.StringOpt("log-level", cfg.LogLevel, "Logging level (error, warn, info, debug)") watchAddressesOpt := cmd.StringsOpt("watch", nil, "Add contract address to global watch filter") - minimumHeightOpt := cmd.IntOpt("minimum-height", 0, "Add contract address to global watch filter") + minimumHeightOpt := cmd.IntOpt("minimum-height", 0, "Only process block greater than or equal to height passed") abiFileOpt := cmd.StringsOpt("abi", cfg.AbiFileOrDirs, "EVM Contract ABI file or folder") specFileOrDirOpt := cmd.StringsOpt("spec", cfg.SpecFileOrDirs, "SQLSol specification file or folder") dbBlockOpt := cmd.BoolOpt("blocks", false, "Create block tables and persist related data") From a362267df8347cb918a92394a632ad6313d0ce72 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 11 Mar 2021 19:06:06 +0100 Subject: [PATCH 167/185] Inclusive end Signed-off-by: Silas Davis --- vent/chain/ethereum/consumer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vent/chain/ethereum/consumer.go b/vent/chain/ethereum/consumer.go index 5bc17a5d3..446c19400 100644 --- a/vent/chain/ethereum/consumer.go +++ b/vent/chain/ethereum/consumer.go @@ -68,13 +68,14 @@ func (c *consumer) Consume() error { if err != nil { return err } + time.Sleep(c.backoffDuration) } return nil } func (c *consumer) ConsumeInBatches(start, end uint64) error { - for batchStart := start; batchStart < end; batchStart += c.blockBatchSize { + for batchStart := start; batchStart <= end; batchStart += c.blockBatchSize { batchEnd := batchStart + c.blockBatchSize if batchEnd > end { batchEnd = end From 453ff222c4512e1b5d438b099de41b94d4e564dc Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Fri, 12 Mar 2021 16:35:52 +0100 Subject: [PATCH 168/185] Add back yarn lock Signed-off-by: Silas Davis --- vent/test/eth/yarn.lock | 9836 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 9836 insertions(+) create mode 100644 vent/test/eth/yarn.lock diff --git a/vent/test/eth/yarn.lock b/vent/test/eth/yarn.lock new file mode 100644 index 000000000..ae4fc6a8b --- /dev/null +++ b/vent/test/eth/yarn.lock @@ -0,0 +1,9836 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@apollo/client@^3.1.5": + version "3.3.11" + resolved "https://registry.npmjs.org/@apollo/client/-/client-3.3.11.tgz#125051405e83dc899d471d43b79fd6045d92a802" + integrity sha512-54+D5FB6RJlQ+g37f432gaexnyvDsG5X6L9VO5kqN54HJlbF8hCf/8CXtAQEHCWodAwZhy6kOLp2RM96829q3A== + dependencies: + "@graphql-typed-document-node/core" "^3.0.0" + "@types/zen-observable" "^0.8.0" + "@wry/context" "^0.5.2" + "@wry/equality" "^0.3.0" + fast-json-stable-stringify "^2.0.0" + graphql-tag "^2.12.0" + hoist-non-react-statics "^3.3.2" + optimism "^0.14.0" + prop-types "^15.7.2" + symbol-observable "^2.0.0" + ts-invariant "^0.6.0" + tslib "^1.10.0" + zen-observable "^0.8.14" + +"@apollo/protobufjs@^1.0.3": + version "1.0.5" + resolved "https://registry.npmjs.org/@apollo/protobufjs/-/protobufjs-1.0.5.tgz#a78b726147efc0795e74c8cb8a11aafc6e02f773" + integrity sha512-ZtyaBH1icCgqwIGb3zrtopV2D5Q8yxibkJzlaViM08eOhTQc7rACdYu0pfORFfhllvdMZ3aq69vifYHszY4gNA== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^4.0.0" + "@types/node" "^10.1.0" + long "^4.0.0" + +"@apollographql/apollo-tools@^0.4.3": + version "0.4.9" + resolved "https://registry.npmjs.org/@apollographql/apollo-tools/-/apollo-tools-0.4.9.tgz#6abeef4c4586aec8208f71254b329e48ab50c07e" + integrity sha512-M50pk8oo3CGTu4waGOklIX3YtTZoPfWG9K/G9WB8NpyQGA1OwYTiBFv94XqUtKElTDoFwoMXpMQd3Wy5dINvxA== + dependencies: + apollo-env "^0.6.6" + +"@apollographql/graphql-playground-html@1.6.27": + version "1.6.27" + resolved "https://registry.npmjs.org/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.27.tgz#bc9ab60e9445aa2a8813b4e94f152fa72b756335" + integrity sha512-tea2LweZvn6y6xFV11K0KC8ETjmm52mQrW+ezgB2O/aTQf8JGyFmMcRPFgUaQZeHbWdm8iisDC6EjOKsXu0nfw== + dependencies: + xss "^1.0.8" + +"@apollographql/graphql-upload-8-fork@^8.1.3": + version "8.1.3" + resolved "https://registry.npmjs.org/@apollographql/graphql-upload-8-fork/-/graphql-upload-8-fork-8.1.3.tgz#a0d4e0d5cec8e126d78bd915c264d6b90f5784bc" + integrity sha512-ssOPUT7euLqDXcdVv3Qs4LoL4BPtfermW1IOouaqEmj36TpHYDmYDIbKoSQxikd9vtMumFnP87OybH7sC9fJ6g== + dependencies: + "@types/express" "*" + "@types/fs-capacitor" "*" + "@types/koa" "*" + busboy "^0.3.1" + fs-capacitor "^2.0.4" + http-errors "^1.7.3" + object-path "^0.11.4" + +"@ardatan/aggregate-error@0.0.6": + version "0.0.6" + resolved "https://registry.npmjs.org/@ardatan/aggregate-error/-/aggregate-error-0.0.6.tgz#fe6924771ea40fc98dc7a7045c2e872dc8527609" + integrity sha512-vyrkEHG1jrukmzTPtyWB4NLPauUw5bQeg4uhn8f+1SSynmrOcyvlb1GKQjjgoBzElLdfXCRYX8UnBlhklOHYRQ== + dependencies: + tslib "~2.0.1" + +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/code-frame@^7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" + integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== + dependencies: + "@babel/highlight" "^7.12.13" + +"@babel/compat-data@^7.13.8": + version "7.13.8" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.8.tgz#5b783b9808f15cef71547f1b691f34f8ff6003a6" + integrity sha512-EaI33z19T4qN3xLXsGf48M2cDqa6ei9tPZlfLdb2HC+e/cFtREiRd8hdSqDbwdLB0/+gLwqJmCYASH0z2bUdog== + +"@babel/core@^7.0.0": + version "7.13.10" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.13.10.tgz#07de050bbd8193fcd8a3c27918c0890613a94559" + integrity sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.9" + "@babel/helper-compilation-targets" "^7.13.10" + "@babel/helper-module-transforms" "^7.13.0" + "@babel/helpers" "^7.13.10" + "@babel/parser" "^7.13.10" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + lodash "^4.17.19" + semver "^6.3.0" + source-map "^0.5.0" + +"@babel/generator@^7.12.13", "@babel/generator@^7.13.0", "@babel/generator@^7.13.9", "@babel/generator@^7.5.0": + version "7.13.9" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz#3a7aa96f9efb8e2be42d38d80e2ceb4c64d8de39" + integrity sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw== + dependencies: + "@babel/types" "^7.13.0" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz#0f58e86dfc4bb3b1fcd7db806570e177d439b6ab" + integrity sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-compilation-targets@^7.13.10", "@babel/helper-compilation-targets@^7.13.8": + version "7.13.10" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.10.tgz#1310a1678cb8427c07a753750da4f8ce442bdd0c" + integrity sha512-/Xju7Qg1GQO4mHZ/Kcs6Au7gfafgZnwm+a7sy/ow/tV1sHeraRUHbjdat8/UvDor4Tez+siGKDk6zIKtCPKVJA== + dependencies: + "@babel/compat-data" "^7.13.8" + "@babel/helper-validator-option" "^7.12.17" + browserslist "^4.14.5" + semver "^6.3.0" + +"@babel/helper-create-class-features-plugin@^7.13.0": + version "7.13.10" + resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.10.tgz#073b2bbb925a097643c6fc5770e5f13394e887c9" + integrity sha512-YV7r2YxdTUaw84EwNkyrRke/TJHR/UXGiyvACRqvdVJ2/syV2rQuJNnaRLSuYiop8cMRXOgseTGoJCWX0q2fFg== + dependencies: + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-member-expression-to-functions" "^7.13.0" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/helper-replace-supers" "^7.13.0" + "@babel/helper-split-export-declaration" "^7.12.13" + +"@babel/helper-function-name@^7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz#93ad656db3c3c2232559fd7b2c3dbdcbe0eb377a" + integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== + dependencies: + "@babel/helper-get-function-arity" "^7.12.13" + "@babel/template" "^7.12.13" + "@babel/types" "^7.12.13" + +"@babel/helper-get-function-arity@^7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583" + integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-member-expression-to-functions@^7.13.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.0.tgz#6aa4bb678e0f8c22f58cdb79451d30494461b091" + integrity sha512-yvRf8Ivk62JwisqV1rFRMxiSMDGnN6KH1/mDMmIrij4jztpQNRoHqqMG3U6apYbGRPJpgPalhva9Yd06HlUxJQ== + dependencies: + "@babel/types" "^7.13.0" + +"@babel/helper-module-imports@^7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz#ec67e4404f41750463e455cc3203f6a32e93fcb0" + integrity sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-module-transforms@^7.13.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.0.tgz#42eb4bd8eea68bab46751212c357bfed8b40f6f1" + integrity sha512-Ls8/VBwH577+pw7Ku1QkUWIyRRNHpYlts7+qSqBBFCW3I8QteB9DxfcZ5YJpOwH6Ihe/wn8ch7fMGOP1OhEIvw== + dependencies: + "@babel/helper-module-imports" "^7.12.13" + "@babel/helper-replace-supers" "^7.13.0" + "@babel/helper-simple-access" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/helper-validator-identifier" "^7.12.11" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" + lodash "^4.17.19" + +"@babel/helper-optimise-call-expression@^7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz#5c02d171b4c8615b1e7163f888c1c81c30a2aaea" + integrity sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.8.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz#806526ce125aed03373bc416a828321e3a6a33af" + integrity sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ== + +"@babel/helper-replace-supers@^7.12.13", "@babel/helper-replace-supers@^7.13.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz#6034b7b51943094cb41627848cb219cb02be1d24" + integrity sha512-Segd5me1+Pz+rmN/NFBOplMbZG3SqRJOBlY+mA0SxAv6rjj7zJqr1AVr3SfzUVTLCv7ZLU5FycOM/SBGuLPbZw== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.13.0" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" + +"@babel/helper-simple-access@^7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz#8478bcc5cacf6aa1672b251c1d2dde5ccd61a6c4" + integrity sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-skip-transparent-expression-wrappers@^7.12.1": + version "7.12.1" + resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz#462dc63a7e435ade8468385c63d2b84cce4b3cbf" + integrity sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA== + dependencies: + "@babel/types" "^7.12.1" + +"@babel/helper-split-export-declaration@^7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz#e9430be00baf3e88b0e13e6f9d4eaf2136372b05" + integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-validator-identifier@^7.12.11": + version "7.12.11" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== + +"@babel/helper-validator-option@^7.12.17": + version "7.12.17" + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831" + integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== + +"@babel/helpers@^7.13.10": + version "7.13.10" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz#fd8e2ba7488533cdeac45cc158e9ebca5e3c7df8" + integrity sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ== + dependencies: + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" + +"@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": + version "7.13.10" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz#a8b2a66148f5b27d666b15d81774347a731d52d1" + integrity sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@7.12.16": + version "7.12.16" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.12.16.tgz#cc31257419d2c3189d394081635703f549fc1ed4" + integrity sha512-c/+u9cqV6F0+4Hpq01jnJO+GLp2DdT63ppz9Xa+6cHaajM9VFzK/iDXiKK65YtpeVwu+ctfS6iqlMqRgQRzeCw== + +"@babel/parser@^7.0.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.10": + version "7.13.10" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz#8f8f9bf7b3afa3eabd061f7a5bcdf4fec3c48409" + integrity sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ== + +"@babel/plugin-proposal-class-properties@^7.0.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.13.0.tgz#146376000b94efd001e57a40a88a525afaab9f37" + integrity sha512-KnTDjFNC1g+45ka0myZNvSBFLhNCLN+GeGYLDEA8Oq7MZ6yMgfLoIRh86GRT0FjtJhZw8JyUskP9uvj5pHM9Zg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.13.0" + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/plugin-proposal-object-rest-spread@^7.0.0": + version "7.13.8" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.13.8.tgz#5d210a4d727d6ce3b18f9de82cc99a3964eed60a" + integrity sha512-DhB2EuB1Ih7S3/IRX5AFVgZ16k3EzfRbq97CxAVI1KSYcW+lexV8VZb7G7L8zuPVSdQMRn0kiBpf/Yzu9ZKH0g== + dependencies: + "@babel/compat-data" "^7.13.8" + "@babel/helper-compilation-targets" "^7.13.8" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.13.0" + +"@babel/plugin-syntax-class-properties@^7.0.0": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.12.13.tgz#5df9962503c0a9c918381c929d51d4d6949e7e86" + integrity sha512-J/RYxnlSLXZLVR7wTRsozxKT8qbsx1mNKJzXEEjQ0Kjx1ZACcyHgbanNWNCFtc36IzuWhYWPpvJFFoexoOWFmA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.13.tgz#044fb81ebad6698fe62c478875575bcbb9b70f15" + integrity sha512-d4HM23Q1K7oq/SLNmG6mRt85l2csmQ0cHRaxRXjKW0YFdEXqlZ5kzFQKH5Uc3rDJECgu+yCRgPkG04Mm98R/1g== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-transform-arrow-functions@^7.0.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.13.0.tgz#10a59bebad52d637a027afa692e8d5ceff5e3dae" + integrity sha512-96lgJagobeVmazXFaDrbmCLQxBysKu7U6Do3mLsx27gf5Dk85ezysrs2BZUpXD703U/Su1xTBDxxar2oa4jAGg== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/plugin-transform-block-scoped-functions@^7.0.0": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.13.tgz#a9bf1836f2a39b4eb6cf09967739de29ea4bf4c4" + integrity sha512-zNyFqbc3kI/fVpqwfqkg6RvBgFpC4J18aKKMmv7KdQ/1GgREapSJAykLMVNwfRGO3BtHj3YQZl8kxCXPcVMVeg== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-block-scoping@^7.0.0": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz#f36e55076d06f41dfd78557ea039c1b581642e61" + integrity sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-classes@^7.0.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.13.0.tgz#0265155075c42918bf4d3a4053134176ad9b533b" + integrity sha512-9BtHCPUARyVH1oXGcSJD3YpsqRLROJx5ZNP6tN5vnk17N0SVf9WCtf8Nuh1CFmgByKKAIMstitKduoCmsaDK5g== + dependencies: + "@babel/helper-annotate-as-pure" "^7.12.13" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/helper-replace-supers" "^7.13.0" + "@babel/helper-split-export-declaration" "^7.12.13" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.0.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.13.0.tgz#845c6e8b9bb55376b1fa0b92ef0bdc8ea06644ed" + integrity sha512-RRqTYTeZkZAz8WbieLTvKUEUxZlUTdmL5KGMyZj7FnMfLNKV4+r5549aORG/mgojRmFlQMJDUupwAMiF2Q7OUg== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/plugin-transform-destructuring@^7.0.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.0.tgz#c5dce270014d4e1ebb1d806116694c12b7028963" + integrity sha512-zym5em7tePoNT9s964c0/KU3JPPnuq7VhIxPRefJ4/s82cD+q1mgKfuGRDMCPL0HTyKz4dISuQlCusfgCJ86HA== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/plugin-transform-flow-strip-types@^7.0.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.13.0.tgz#58177a48c209971e8234e99906cb6bd1122addd3" + integrity sha512-EXAGFMJgSX8gxWD7PZtW/P6M+z74jpx3wm/+9pn+c2dOawPpBkUX7BrfyPvo6ZpXbgRIEuwgwDb/MGlKvu2pOg== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/plugin-syntax-flow" "^7.12.13" + +"@babel/plugin-transform-for-of@^7.0.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.13.0.tgz#c799f881a8091ac26b54867a845c3e97d2696062" + integrity sha512-IHKT00mwUVYE0zzbkDgNRP6SRzvfGCYsOxIRz8KsiaaHCcT9BWIkO+H9QRJseHBLOGBZkHUdHiqj6r0POsdytg== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/plugin-transform-function-name@^7.0.0": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.13.tgz#bb024452f9aaed861d374c8e7a24252ce3a50051" + integrity sha512-6K7gZycG0cmIwwF7uMK/ZqeCikCGVBdyP2J5SKNCXO5EOHcqi+z7Jwf8AmyDNcBgxET8DrEtCt/mPKPyAzXyqQ== + dependencies: + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-literals@^7.0.0": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.13.tgz#2ca45bafe4a820197cf315794a4d26560fe4bdb9" + integrity sha512-FW+WPjSR7hiUxMcKqyNjP05tQ2kmBCdpEpZHY1ARm96tGQCCBvXKnpjILtDplUnJ/eHZ0lALLM+d2lMFSpYJrQ== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-member-expression-literals@^7.0.0": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.13.tgz#5ffa66cd59b9e191314c9f1f803b938e8c081e40" + integrity sha512-kxLkOsg8yir4YeEPHLuO2tXP9R/gTjpuTOjshqSpELUN3ZAg2jfDnKUvzzJxObun38sw3wm4Uu69sX/zA7iRvg== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-modules-commonjs@^7.0.0": + version "7.13.8" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.13.8.tgz#7b01ad7c2dcf2275b06fa1781e00d13d420b3e1b" + integrity sha512-9QiOx4MEGglfYZ4XOnU79OHr6vIWUakIj9b4mioN8eQIoEh+pf5p/zEB36JpDFWA12nNMiRf7bfoRvl9Rn79Bw== + dependencies: + "@babel/helper-module-transforms" "^7.13.0" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/helper-simple-access" "^7.12.13" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-object-super@^7.0.0": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.13.tgz#b4416a2d63b8f7be314f3d349bd55a9c1b5171f7" + integrity sha512-JzYIcj3XtYspZDV8j9ulnoMPZZnF/Cj0LUxPOjR89BdBVx+zYJI9MdMIlUZjbXDX+6YVeS6I3e8op+qQ3BYBoQ== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + "@babel/helper-replace-supers" "^7.12.13" + +"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.13.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.13.0.tgz#8fa7603e3097f9c0b7ca1a4821bc2fb52e9e5007" + integrity sha512-Jt8k/h/mIwE2JFEOb3lURoY5C85ETcYPnbuAJ96zRBzh1XHtQZfs62ChZ6EP22QlC8c7Xqr9q+e1SU5qttwwjw== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/plugin-transform-property-literals@^7.0.0": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.13.tgz#4e6a9e37864d8f1b3bc0e2dce7bf8857db8b1a81" + integrity sha512-nqVigwVan+lR+g8Fj8Exl0UQX2kymtjcWfMOYM1vTYEKujeyv2SkMgazf2qNcK7l4SDiKyTA/nHCPqL4e2zo1A== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-react-display-name@^7.0.0": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.13.tgz#c28effd771b276f4647411c9733dbb2d2da954bd" + integrity sha512-MprESJzI9O5VnJZrL7gg1MpdqmiFcUv41Jc7SahxYsNP2kDkFqClxxTZq+1Qv4AFCamm+GXMRDQINNn+qrxmiA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-react-jsx@^7.0.0": + version "7.12.17" + resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.17.tgz#dd2c1299f5e26de584939892de3cfc1807a38f24" + integrity sha512-mwaVNcXV+l6qJOuRhpdTEj8sT/Z0owAVWf9QujTZ0d2ye9X/K+MTOTSizcgKOj18PGnTc/7g1I4+cIUjsKhBcw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.12.13" + "@babel/helper-module-imports" "^7.12.13" + "@babel/helper-plugin-utils" "^7.12.13" + "@babel/plugin-syntax-jsx" "^7.12.13" + "@babel/types" "^7.12.17" + +"@babel/plugin-transform-shorthand-properties@^7.0.0": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.13.tgz#db755732b70c539d504c6390d9ce90fe64aff7ad" + integrity sha512-xpL49pqPnLtf0tVluuqvzWIgLEhuPpZzvs2yabUHSKRNlN7ScYU7aMlmavOeyXJZKgZKQRBlh8rHbKiJDraTSw== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-transform-spread@^7.0.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.13.0.tgz#84887710e273c1815ace7ae459f6f42a5d31d5fd" + integrity sha512-V6vkiXijjzYeFmQTr3dBxPtZYLPcUfY34DebOU27jIl2M/Y8Egm52Hw82CSjjPqd54GTlJs5x+CR7HeNr24ckg== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" + +"@babel/plugin-transform-template-literals@^7.0.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.13.0.tgz#a36049127977ad94438dee7443598d1cefdf409d" + integrity sha512-d67umW6nlfmr1iehCcBv69eSUSySk1EsIS8aTDX4Xo9qajAh6mYtcl4kJrBkGXuxZPEgVr7RVfAvNW6YQkd4Mw== + dependencies: + "@babel/helper-plugin-utils" "^7.13.0" + +"@babel/runtime@^7.0.0", "@babel/runtime@^7.11.2", "@babel/runtime@^7.6.3": + version "7.13.10" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz#47d42a57b6095f4468da440388fdbad8bebf0d7d" + integrity sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/template@^7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" + integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/types" "^7.12.13" + +"@babel/traverse@7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.13.tgz#689f0e4b4c08587ad26622832632735fb8c4e0c0" + integrity sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.12.13" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/types" "^7.12.13" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + +"@babel/traverse@^7.0.0", "@babel/traverse@^7.13.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz#6d95752475f86ee7ded06536de309a65fc8966cc" + integrity sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.0" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.13.0" + "@babel/types" "^7.13.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + +"@babel/types@7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.12.13.tgz#8be1aa8f2c876da11a9cf650c0ecf656913ad611" + integrity sha512-oKrdZTld2im1z8bDwTOQvUbxKwE+854zc16qWZQlcTqMN00pWxHQ4ZeOq0yDMnisOpRykH2/5Qqcrk/OlbAjiQ== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + +"@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.12.13", "@babel/types@^7.12.17", "@babel/types@^7.13.0": + version "7.13.0" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz#74424d2816f0171b4100f0ab34e9a374efdf7f80" + integrity sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + +"@eslint/eslintrc@^0.4.0": + version "0.4.0" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz#99cc0a0584d72f1df38b900fb062ba995f395547" + integrity sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + +"@ethersproject/abi@5.0.0-beta.153": + version "5.0.0-beta.153" + resolved "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz#43a37172b33794e4562999f6e2d555b7599a8eee" + integrity sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg== + dependencies: + "@ethersproject/address" ">=5.0.0-beta.128" + "@ethersproject/bignumber" ">=5.0.0-beta.130" + "@ethersproject/bytes" ">=5.0.0-beta.129" + "@ethersproject/constants" ">=5.0.0-beta.128" + "@ethersproject/hash" ">=5.0.0-beta.128" + "@ethersproject/keccak256" ">=5.0.0-beta.127" + "@ethersproject/logger" ">=5.0.0-beta.129" + "@ethersproject/properties" ">=5.0.0-beta.131" + "@ethersproject/strings" ">=5.0.0-beta.130" + +"@ethersproject/abstract-provider@^5.0.8": + version "5.0.10" + resolved "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.10.tgz#a533aed39a5f27312745c8c4c40fa25fc884831c" + integrity sha512-OSReY5iz94iIaPlRvLiJP8YVIvQLx4aUvMMnHWSaA/vTU8QHZmgNlt4OBdYV1+aFY8Xl+VRYiWBHq72ZDKXXCQ== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/networks" "^5.0.7" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/transactions" "^5.0.9" + "@ethersproject/web" "^5.0.12" + +"@ethersproject/abstract-signer@^5.0.10": + version "5.0.14" + resolved "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.14.tgz#30ef912b0f86599d90fdffc65c110452e7b55cf1" + integrity sha512-JztBwVO7o5OHLh2vyjordlS4/1EjRyaECtc8vPdXTF1i4dXN+J0coeRoPN6ZFbBvi/YbaB6br2fvqhst1VQD/g== + dependencies: + "@ethersproject/abstract-provider" "^5.0.8" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + +"@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.9": + version "5.0.11" + resolved "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.11.tgz#12022e8c590c33939beb5ab18b401ecf585eac59" + integrity sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/rlp" "^5.0.7" + +"@ethersproject/base64@^5.0.7": + version "5.0.9" + resolved "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.9.tgz#bb1f35d3dba92082a574d5e2418f9202a0a1a7e6" + integrity sha512-37RBz5LEZ9SlTNGiWCYFttnIN9J7qVs9Xo2EbqGqDH5LfW9EIji66S+YDMpXVo1zWDax1FkEldAoatxHK2gfgA== + dependencies: + "@ethersproject/bytes" "^5.0.9" + +"@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.0.13": + version "5.0.15" + resolved "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz#b089b3f1e0381338d764ac1c10512f0c93b184ed" + integrity sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + bn.js "^4.4.0" + +"@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.0.9": + version "5.0.11" + resolved "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz#21118e75b1d00db068984c15530e316021101276" + integrity sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg== + dependencies: + "@ethersproject/logger" "^5.0.8" + +"@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.0.8": + version "5.0.10" + resolved "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz#eb0c604fbc44c53ba9641eed31a1d0c9e1ebcadc" + integrity sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw== + dependencies: + "@ethersproject/bignumber" "^5.0.13" + +"@ethersproject/hash@>=5.0.0-beta.128": + version "5.0.12" + resolved "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.12.tgz#1074599f7509e2ca2bb7a3d4f4e39ab3a796da42" + integrity sha512-kn4QN+fhNFbUgX3XZTZUaQixi0oyfIEY+hfW+KtkHu+rq7dV76oAIvaLEEynu1/4npOL38E4X4YI42gGZk+C0Q== + dependencies: + "@ethersproject/abstract-signer" "^5.0.10" + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + +"@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.0.7": + version "5.0.9" + resolved "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.9.tgz#ca0d86e4af56c13b1ef25e533bde3e96d28f647d" + integrity sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw== + dependencies: + "@ethersproject/bytes" "^5.0.9" + js-sha3 "0.5.7" + +"@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.0.8": + version "5.0.10" + resolved "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz#fd884688b3143253e0356ef92d5f22d109d2e026" + integrity sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw== + +"@ethersproject/networks@^5.0.7": + version "5.0.9" + resolved "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.0.9.tgz#ec5da11e4d4bfd69bec4eaebc9ace33eb9569279" + integrity sha512-L8+VCQwArBLGkxZb/5Ns/OH/OxP38AcaveXIxhUTq+VWpXYjrObG3E7RDQIKkUx1S1IcQl/UWTz5w4DK0UitJg== + dependencies: + "@ethersproject/logger" "^5.0.8" + +"@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.0.7": + version "5.0.9" + resolved "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz#d7aae634680760136ea522e25c3ef043ec15b5c2" + integrity sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg== + dependencies: + "@ethersproject/logger" "^5.0.8" + +"@ethersproject/rlp@^5.0.7": + version "5.0.9" + resolved "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.9.tgz#da205bf8a34d3c3409eb73ddd237130a4b376aff" + integrity sha512-ns1U7ZMVeruUW6JXc4om+1w3w4ynHN/0fpwmeNTsAjwGKoF8SAUgue6ylKpHKWSti2idx7jDxbn8hNNFHk67CA== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + +"@ethersproject/signing-key@^5.0.8": + version "5.0.11" + resolved "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.11.tgz#19fc5c4597e18ad0a5efc6417ba5b74069fdd2af" + integrity sha512-Jfcru/BGwdkXhLxT+8WCZtFy7LL0TPFZw05FAb5asxB/MyVsEfNdNxGDtjVE9zXfmRSPe/EusXYY4K7wcygOyQ== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + elliptic "6.5.4" + +"@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.0.8": + version "5.0.10" + resolved "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.10.tgz#ddce1e9724f4ac4f3f67e0cac0b48748e964bfdb" + integrity sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w== + dependencies: + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/logger" "^5.0.8" + +"@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.0.9": + version "5.0.11" + resolved "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.11.tgz#b31df5292f47937136a45885d6ee6112477c13df" + integrity sha512-ftsRvR9+gQp7L63F6+XmstvsZ4w8GtWvQB08e/zB+oB86Fnhq8+i/tkgpJplSHC8I/qgiCisva+M3u2GVhDFPA== + dependencies: + "@ethersproject/address" "^5.0.9" + "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/constants" "^5.0.8" + "@ethersproject/keccak256" "^5.0.7" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/rlp" "^5.0.7" + "@ethersproject/signing-key" "^5.0.8" + +"@ethersproject/web@^5.0.12": + version "5.0.14" + resolved "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.14.tgz#6e7bebdd9fb967cb25ee60f44d9218dc0803bac4" + integrity sha512-QpTgplslwZ0Sp9oKNLoRuS6TKxnkwfaEk3gr7zd7XLF8XBsYejsrQO/03fNfnMx/TAT/RR6WEw/mbOwpRSeVRA== + dependencies: + "@ethersproject/base64" "^5.0.7" + "@ethersproject/bytes" "^5.0.9" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + "@ethersproject/strings" "^5.0.8" + +"@graphql-tools/batch-delegate@^6.2.4", "@graphql-tools/batch-delegate@^6.2.6": + version "6.2.6" + resolved "https://registry.npmjs.org/@graphql-tools/batch-delegate/-/batch-delegate-6.2.6.tgz#fbea98dc825f87ef29ea5f3f371912c2a2aa2f2c" + integrity sha512-QUoE9pQtkdNPFdJHSnBhZtUfr3M7pIRoXoMR+TG7DK2Y62ISKbT/bKtZEUU1/2v5uqd5WVIvw9dF8gHDSJAsSA== + dependencies: + "@graphql-tools/delegate" "^6.2.4" + dataloader "2.0.0" + tslib "~2.0.1" + +"@graphql-tools/batch-execute@^7.0.0": + version "7.0.0" + resolved "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-7.0.0.tgz#e79d11bd5b39f29172f6ec2eafa71103c6a6c85b" + integrity sha512-+ywPfK6N2Ddna6oOa5Qb1Mv7EA8LOwRNOAPP9dL37FEhksJM9pYqPSceUcqMqg7S9b0+Cgr78s408rgvurV3/Q== + dependencies: + "@graphql-tools/utils" "^7.0.0" + dataloader "2.0.0" + is-promise "4.0.0" + tslib "~2.0.1" + +"@graphql-tools/code-file-loader@^6.2.4": + version "6.3.1" + resolved "https://registry.npmjs.org/@graphql-tools/code-file-loader/-/code-file-loader-6.3.1.tgz#42dfd4db5b968acdb453382f172ec684fa0c34ed" + integrity sha512-ZJimcm2ig+avgsEOWWVvAaxZrXXhiiSZyYYOJi0hk9wh5BxZcLUNKkTp6EFnZE/jmGUwuos3pIjUD3Hwi3Bwhg== + dependencies: + "@graphql-tools/graphql-tag-pluck" "^6.5.1" + "@graphql-tools/utils" "^7.0.0" + tslib "~2.1.0" + +"@graphql-tools/delegate@^6.2.4": + version "6.2.4" + resolved "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-6.2.4.tgz#db553b63eb9512d5eb5bbfdfcd8cb1e2b534699c" + integrity sha512-mXe6DfoWmq49kPcDrpKHgC2DSWcD5q0YCaHHoXYPAOlnLH8VMTY8BxcE8y/Do2eyg+GLcwAcrpffVszWMwqw0w== + dependencies: + "@ardatan/aggregate-error" "0.0.6" + "@graphql-tools/schema" "^6.2.4" + "@graphql-tools/utils" "^6.2.4" + dataloader "2.0.0" + is-promise "4.0.0" + tslib "~2.0.1" + +"@graphql-tools/delegate@^7.0.1", "@graphql-tools/delegate@^7.0.7": + version "7.0.10" + resolved "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-7.0.10.tgz#f87ac85a2dbd03b5b3aabf347f4479fabe8ceac3" + integrity sha512-6Di9ia5ohoDvrHuhj2cak1nJGhIefJmUsd3WKZcJ2nu2yZAFawWMxGvQImqv3N7iyaWKiVhrrK8Roi/JrYhdKg== + dependencies: + "@ardatan/aggregate-error" "0.0.6" + "@graphql-tools/batch-execute" "^7.0.0" + "@graphql-tools/schema" "^7.0.0" + "@graphql-tools/utils" "^7.1.6" + dataloader "2.0.0" + is-promise "4.0.0" + tslib "~2.1.0" + +"@graphql-tools/git-loader@^6.2.4": + version "6.2.6" + resolved "https://registry.npmjs.org/@graphql-tools/git-loader/-/git-loader-6.2.6.tgz#c2226f4b8f51f1c05c9ab2649ba32d49c68cd077" + integrity sha512-ooQTt2CaG47vEYPP3CPD+nbA0F+FYQXfzrB1Y1ABN9K3d3O2RK3g8qwslzZaI8VJQthvKwt0A95ZeE4XxteYfw== + dependencies: + "@graphql-tools/graphql-tag-pluck" "^6.2.6" + "@graphql-tools/utils" "^7.0.0" + tslib "~2.1.0" + +"@graphql-tools/github-loader@^6.2.4": + version "6.2.5" + resolved "https://registry.npmjs.org/@graphql-tools/github-loader/-/github-loader-6.2.5.tgz#460dff6f5bbaa26957a5ea3be4f452b89cc6a44b" + integrity sha512-DLuQmYeNNdPo8oWus8EePxWCfCAyUXPZ/p1PWqjrX/NGPyH2ZObdqtDAfRHztljt0F/qkBHbGHCEk2TKbRZTRw== + dependencies: + "@graphql-tools/graphql-tag-pluck" "^6.2.6" + "@graphql-tools/utils" "^7.0.0" + cross-fetch "3.0.6" + tslib "~2.0.1" + +"@graphql-tools/graphql-file-loader@^6.2.4": + version "6.2.7" + resolved "https://registry.npmjs.org/@graphql-tools/graphql-file-loader/-/graphql-file-loader-6.2.7.tgz#d3720f2c4f4bb90eb2a03a7869a780c61945e143" + integrity sha512-5k2SNz0W87tDcymhEMZMkd6/vs6QawDyjQXWtqkuLTBF3vxjxPD1I4dwHoxgWPIjjANhXybvulD7E+St/7s9TQ== + dependencies: + "@graphql-tools/import" "^6.2.6" + "@graphql-tools/utils" "^7.0.0" + tslib "~2.1.0" + +"@graphql-tools/graphql-tag-pluck@^6.2.4", "@graphql-tools/graphql-tag-pluck@^6.2.6", "@graphql-tools/graphql-tag-pluck@^6.5.1": + version "6.5.1" + resolved "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-6.5.1.tgz#5fb227dbb1e19f4b037792b50f646f16a2d4c686" + integrity sha512-7qkm82iFmcpb8M6/yRgzjShtW6Qu2OlCSZp8uatA3J0eMl87TxyJoUmL3M3UMMOSundAK8GmoyNVFUrueueV5Q== + dependencies: + "@babel/parser" "7.12.16" + "@babel/traverse" "7.12.13" + "@babel/types" "7.12.13" + "@graphql-tools/utils" "^7.0.0" + tslib "~2.1.0" + +"@graphql-tools/import@^6.2.4", "@graphql-tools/import@^6.2.6": + version "6.3.0" + resolved "https://registry.npmjs.org/@graphql-tools/import/-/import-6.3.0.tgz#171472b425ea7cba4a612ad524b96bd206ae71b6" + integrity sha512-zmaVhJ3UPjzJSb005Pjn2iWvH+9AYRXI4IUiTi14uPupiXppJP3s7S25Si3+DbHpFwurDF2nWRxBLiFPWudCqw== + dependencies: + resolve-from "5.0.0" + tslib "~2.1.0" + +"@graphql-tools/json-file-loader@^6.2.4": + version "6.2.6" + resolved "https://registry.npmjs.org/@graphql-tools/json-file-loader/-/json-file-loader-6.2.6.tgz#830482cfd3721a0799cbf2fe5b09959d9332739a" + integrity sha512-CnfwBSY5926zyb6fkDBHnlTblHnHI4hoBALFYXnrg0Ev4yWU8B04DZl/pBRUc459VNgO2x8/mxGIZj2hPJG1EA== + dependencies: + "@graphql-tools/utils" "^7.0.0" + tslib "~2.0.1" + +"@graphql-tools/links@^6.2.4": + version "6.2.5" + resolved "https://registry.npmjs.org/@graphql-tools/links/-/links-6.2.5.tgz#b172cadc4b7cbe27bfc1dc787651f92517f583bc" + integrity sha512-XeGDioW7F+HK6HHD/zCeF0HRC9s12NfOXAKv1HC0J7D50F4qqMvhdS/OkjzLoBqsgh/Gm8icRc36B5s0rOA9ig== + dependencies: + "@graphql-tools/utils" "^7.0.0" + apollo-link "1.2.14" + apollo-upload-client "14.1.2" + cross-fetch "3.0.6" + form-data "3.0.0" + is-promise "4.0.0" + tslib "~2.0.1" + +"@graphql-tools/load-files@^6.2.4": + version "6.3.1" + resolved "https://registry.npmjs.org/@graphql-tools/load-files/-/load-files-6.3.1.tgz#7d7726fcb53924ad0cfbdf3f86e7c376abf70c8e" + integrity sha512-y/qGcuKWW3mSPbIHEN5csM9xM0ow479NqtEOPeC1i9wqLml82ubaPS8BzXMhB8DJa5XmrGzIZvrt03CBkQ4aJA== + dependencies: + globby "11.0.2" + tslib "~2.1.0" + unixify "1.0.0" + +"@graphql-tools/load@^6.2.4": + version "6.2.7" + resolved "https://registry.npmjs.org/@graphql-tools/load/-/load-6.2.7.tgz#61f7909d37fb1c095e3e8d4f7a6d3b8bb011e26a" + integrity sha512-b1qWjki1y/QvGtoqW3x8bcwget7xmMfLGsvGFWOB6m38tDbzVT3GlJViAC0nGPDks9OCoJzAdi5IYEkBaqH5GQ== + dependencies: + "@graphql-tools/merge" "^6.2.9" + "@graphql-tools/utils" "^7.5.0" + globby "11.0.2" + import-from "3.0.0" + is-glob "4.0.1" + p-limit "3.1.0" + tslib "~2.1.0" + unixify "1.0.0" + valid-url "1.0.9" + +"@graphql-tools/merge@^6.2.4", "@graphql-tools/merge@^6.2.9": + version "6.2.10" + resolved "https://registry.npmjs.org/@graphql-tools/merge/-/merge-6.2.10.tgz#cadb37b1bed786cba1b3c6f728c5476a164e153d" + integrity sha512-dM3n37PcslvhOAkCz7Cwk0BfoiSVKXGmCX+VMZkATbXk/0vlxUfNEpVfA5yF4IkP27F04SzFQSaNrbD0W2Rszw== + dependencies: + "@graphql-tools/schema" "^7.0.0" + "@graphql-tools/utils" "^7.5.0" + tslib "~2.1.0" + +"@graphql-tools/mock@^6.2.4": + version "6.2.4" + resolved "https://registry.npmjs.org/@graphql-tools/mock/-/mock-6.2.4.tgz#205323c51f89dd855d345d130c7713d0420909ea" + integrity sha512-O5Zvq/mcDZ7Ptky0IZ4EK9USmxV6FEVYq0Jxv2TI80kvxbCjt0tbEpZ+r1vIt1gZOXlAvadSHYyzWnUPh+1vkQ== + dependencies: + "@graphql-tools/schema" "^6.2.4" + "@graphql-tools/utils" "^6.2.4" + tslib "~2.0.1" + +"@graphql-tools/module-loader@^6.2.4": + version "6.2.7" + resolved "https://registry.npmjs.org/@graphql-tools/module-loader/-/module-loader-6.2.7.tgz#66ab9468775fac8079ca46ea9896ceea76e4ef69" + integrity sha512-ItAAbHvwfznY9h1H9FwHYDstTcm22Dr5R9GZtrWlpwqj0jaJGcBxsMB9jnK9kFqkbtFYEe4E/NsSnxsS4/vViQ== + dependencies: + "@graphql-tools/utils" "^7.5.0" + tslib "~2.1.0" + +"@graphql-tools/relay-operation-optimizer@^6.2.4": + version "6.3.0" + resolved "https://registry.npmjs.org/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.3.0.tgz#f8c7f6c8aa4a9cf50ab151fbc5db4f4282a79532" + integrity sha512-Or3UgRvkY9Fq1AAx7q38oPqFmTepLz7kp6wDHKyR0ceG7AvHv5En22R12mAeISInbhff4Rpwgf6cE8zHRu6bCw== + dependencies: + "@graphql-tools/utils" "^7.1.0" + relay-compiler "10.1.0" + tslib "~2.0.1" + +"@graphql-tools/resolvers-composition@^6.2.4": + version "6.2.6" + resolved "https://registry.npmjs.org/@graphql-tools/resolvers-composition/-/resolvers-composition-6.2.6.tgz#b369cdf2772a41a7544bf3f16a794501da34c394" + integrity sha512-QO0PC5RG0SolOksupOuB4B0tuzEsQFwQrwD9xLHCrJmjaLi66lOKMFzN40IBY5rqg0k/zqPyjII8rtzcNobvIg== + dependencies: + "@graphql-tools/utils" "^7.0.0" + lodash "4.17.21" + tslib "~2.1.0" + +"@graphql-tools/schema@^6.2.4": + version "6.2.4" + resolved "https://registry.npmjs.org/@graphql-tools/schema/-/schema-6.2.4.tgz#cc4e9f5cab0f4ec48500e666719d99fc5042481d" + integrity sha512-rh+14lSY1q8IPbEv2J9x8UBFJ5NrDX9W5asXEUlPp+7vraLp/Tiox4GXdgyA92JhwpYco3nTf5Bo2JDMt1KnAQ== + dependencies: + "@graphql-tools/utils" "^6.2.4" + tslib "~2.0.1" + +"@graphql-tools/schema@^7.0.0", "@graphql-tools/schema@^7.1.2": + version "7.1.3" + resolved "https://registry.npmjs.org/@graphql-tools/schema/-/schema-7.1.3.tgz#d816400da51fbac1f0086e35540ab63b5e30e858" + integrity sha512-ZY76hmcJlF1iyg3Im0sQ3ASRkiShjgv102vLTVcH22lEGJeCaCyyS/GF1eUHom418S60bS8Th6+autRUxfBiBg== + dependencies: + "@graphql-tools/utils" "^7.1.2" + tslib "~2.1.0" + +"@graphql-tools/stitch@^6.2.4": + version "6.2.4" + resolved "https://registry.npmjs.org/@graphql-tools/stitch/-/stitch-6.2.4.tgz#acfa6a577a33c0f02e4940ffff04753b23b87fd6" + integrity sha512-0C7PNkS7v7iAc001m7c1LPm5FUB0/DYw+s3OyCii6YYYHY8NwdI0roeOyeDGFJkFubWBQfjc3hoSyueKtU73mw== + dependencies: + "@graphql-tools/batch-delegate" "^6.2.4" + "@graphql-tools/delegate" "^6.2.4" + "@graphql-tools/merge" "^6.2.4" + "@graphql-tools/schema" "^6.2.4" + "@graphql-tools/utils" "^6.2.4" + "@graphql-tools/wrap" "^6.2.4" + is-promise "4.0.0" + tslib "~2.0.1" + +"@graphql-tools/url-loader@^6.2.4": + version "6.8.1" + resolved "https://registry.npmjs.org/@graphql-tools/url-loader/-/url-loader-6.8.1.tgz#cbfbe20f1a1bdeb9a4704e37b8286026d228920b" + integrity sha512-iE/y9IAu0cZYL7o9IIDdGm5WjxacN25nGgVqjZINYlisW/wyuBxng7DMJBAp6yM6gkxkCpMno1ljA/52MXzVPQ== + dependencies: + "@graphql-tools/delegate" "^7.0.1" + "@graphql-tools/utils" "^7.1.5" + "@graphql-tools/wrap" "^7.0.4" + "@types/websocket" "1.0.1" + cross-fetch "3.0.6" + eventsource "1.0.7" + extract-files "9.0.0" + form-data "4.0.0" + graphql-upload "^11.0.0" + graphql-ws "4.1.5" + is-promise "4.0.0" + isomorphic-ws "4.0.1" + sse-z "0.3.0" + sync-fetch "0.3.0" + tslib "~2.1.0" + valid-url "1.0.9" + ws "7.4.3" + +"@graphql-tools/utils@^6.2.4": + version "6.2.4" + resolved "https://registry.npmjs.org/@graphql-tools/utils/-/utils-6.2.4.tgz#38a2314d2e5e229ad4f78cca44e1199e18d55856" + integrity sha512-ybgZ9EIJE3JMOtTrTd2VcIpTXtDrn2q6eiYkeYMKRVh3K41+LZa6YnR2zKERTXqTWqhobROwLt4BZbw2O3Aeeg== + dependencies: + "@ardatan/aggregate-error" "0.0.6" + camel-case "4.1.1" + tslib "~2.0.1" + +"@graphql-tools/utils@^7.0.0", "@graphql-tools/utils@^7.1.0", "@graphql-tools/utils@^7.1.2", "@graphql-tools/utils@^7.1.5", "@graphql-tools/utils@^7.1.6", "@graphql-tools/utils@^7.2.1", "@graphql-tools/utils@^7.5.0": + version "7.5.2" + resolved "https://registry.npmjs.org/@graphql-tools/utils/-/utils-7.5.2.tgz#34b676a734eeed6064ba598b132d8018f539501c" + integrity sha512-/ml6AUCmtjvvxR9JX9/xyV52759SqbFR74K8i+AzyOzqM3Ns0c0ZpBFdIMiKzh6UYULPsoHblzfj0ES1yrrtGw== + dependencies: + "@ardatan/aggregate-error" "0.0.6" + camel-case "4.1.2" + tslib "~2.1.0" + +"@graphql-tools/wrap@^6.2.4": + version "6.2.4" + resolved "https://registry.npmjs.org/@graphql-tools/wrap/-/wrap-6.2.4.tgz#2709817da6e469753735a9fe038c9e99736b2c57" + integrity sha512-cyQgpybolF9DjL2QNOvTS1WDCT/epgYoiA8/8b3nwv5xmMBQ6/6nYnZwityCZ7njb7MMyk7HBEDNNlP9qNJDcA== + dependencies: + "@graphql-tools/delegate" "^6.2.4" + "@graphql-tools/schema" "^6.2.4" + "@graphql-tools/utils" "^6.2.4" + is-promise "4.0.0" + tslib "~2.0.1" + +"@graphql-tools/wrap@^7.0.4": + version "7.0.5" + resolved "https://registry.npmjs.org/@graphql-tools/wrap/-/wrap-7.0.5.tgz#8659a119abef11754f712b0c202e41a484951e0b" + integrity sha512-KCWBXsDfvG46GNUawRltJL4j9BMGoOG7oo3WEyCQP+SByWXiTe5cBF45SLDVQgdjljGNZhZ4Lq/7avIkF7/zDQ== + dependencies: + "@graphql-tools/delegate" "^7.0.7" + "@graphql-tools/schema" "^7.1.2" + "@graphql-tools/utils" "^7.2.1" + is-promise "4.0.0" + tslib "~2.0.1" + +"@graphql-typed-document-node/core@^3.0.0": + version "3.1.0" + resolved "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.1.0.tgz#0eee6373e11418bfe0b5638f654df7a4ca6a3950" + integrity sha512-wYn6r8zVZyQJ6rQaALBEln5B1pzxb9shV5Ef97kTvn6yVGrqyXVnDqnU24MXnFubR+rZjBY9NWuxX3FB2sTsjg== + +"@gulp-sourcemaps/map-sources@1.X": + version "1.0.0" + resolved "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda" + integrity sha1-iQrnxdjId/bThIYCFazp1+yUW9o= + dependencies: + normalize-path "^2.0.1" + through2 "^2.0.3" + +"@nodelib/fs.scandir@2.1.4": + version "2.1.4" + resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" + integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== + dependencies: + "@nodelib/fs.stat" "2.0.4" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": + version "2.0.4" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" + integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.6" + resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" + integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== + dependencies: + "@nodelib/fs.scandir" "2.1.4" + fastq "^1.6.0" + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha1-m4sMxmPWaafY9vXQiToU00jzD78= + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha1-NVy8mLr61ZePntCV85diHx0Ga3A= + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU= + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E= + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik= + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha1-bMKyDFya1q0NzP0hynZz2Nf79o0= + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q= + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= + +"@redux-saga/core@^1.0.0": + version "1.1.3" + resolved "https://registry.npmjs.org/@redux-saga/core/-/core-1.1.3.tgz#3085097b57a4ea8db5528d58673f20ce0950f6a4" + integrity sha512-8tInBftak8TPzE6X13ABmEtRJGjtK17w7VUs7qV17S8hCO5S3+aUTWZ/DBsBJPdE8Z5jOPwYALyvofgq1Ws+kg== + dependencies: + "@babel/runtime" "^7.6.3" + "@redux-saga/deferred" "^1.1.2" + "@redux-saga/delay-p" "^1.1.2" + "@redux-saga/is" "^1.1.2" + "@redux-saga/symbols" "^1.1.2" + "@redux-saga/types" "^1.1.0" + redux "^4.0.4" + typescript-tuple "^2.2.1" + +"@redux-saga/deferred@^1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@redux-saga/deferred/-/deferred-1.1.2.tgz#59937a0eba71fff289f1310233bc518117a71888" + integrity sha512-908rDLHFN2UUzt2jb4uOzj6afpjgJe3MjICaUNO3bvkV/kN/cNeI9PMr8BsFXB/MR8WTAZQq/PlTq8Kww3TBSQ== + +"@redux-saga/delay-p@^1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@redux-saga/delay-p/-/delay-p-1.1.2.tgz#8f515f4b009b05b02a37a7c3d0ca9ddc157bb355" + integrity sha512-ojc+1IoC6OP65Ts5+ZHbEYdrohmIw1j9P7HS9MOJezqMYtCDgpkoqB5enAAZrNtnbSL6gVCWPHaoaTY5KeO0/g== + dependencies: + "@redux-saga/symbols" "^1.1.2" + +"@redux-saga/is@^1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@redux-saga/is/-/is-1.1.2.tgz#ae6c8421f58fcba80faf7cadb7d65b303b97e58e" + integrity sha512-OLbunKVsCVNTKEf2cH4TYyNbbPgvmZ52iaxBD4I1fTif4+MTXMa4/Z07L83zW/hTCXwpSZvXogqMqLfex2Tg6w== + dependencies: + "@redux-saga/symbols" "^1.1.2" + "@redux-saga/types" "^1.1.0" + +"@redux-saga/symbols@^1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@redux-saga/symbols/-/symbols-1.1.2.tgz#216a672a487fc256872b8034835afc22a2d0595d" + integrity sha512-EfdGnF423glv3uMwLsGAtE6bg+R9MdqlHEzExnfagXPrIiuxwr3bdiAwz3gi+PsrQ3yBlaBpfGLtDG8rf3LgQQ== + +"@redux-saga/types@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@redux-saga/types/-/types-1.1.0.tgz#0e81ce56b4883b4b2a3001ebe1ab298b84237204" + integrity sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg== + +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + +"@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" + +"@truffle/abi-utils@^0.1.4", "@truffle/abi-utils@^0.1.5": + version "0.1.5" + resolved "https://registry.npmjs.org/@truffle/abi-utils/-/abi-utils-0.1.5.tgz#95b39ee0cb6baf777fdbaa2ac6d901ab8b0f8c58" + integrity sha512-PvCN/qebM0boK2YycX3sMe6CwoLtB7cpYj2ugHPtcQ+Zpg1hQRGS+GRLeBuQg3RR5X8IxzLb4YPZh5dnJxMZYA== + dependencies: + change-case "3.0.2" + faker "^5.3.1" + fast-check "^2.12.1" + source-map-support "^0.5.19" + +"@truffle/code-utils@^1.2.23", "@truffle/code-utils@^1.2.24": + version "1.2.24" + resolved "https://registry.npmjs.org/@truffle/code-utils/-/code-utils-1.2.24.tgz#8da82510e416128c45fc154e92410982ab98b426" + integrity sha512-IqpbTh4uNQueadv96GBWBaGTYTyOsLKE9Dui1wpiijON6xq2iIcTArej1vMh+nkAd5/AsP+enbBY8mksm6rFBg== + dependencies: + cbor "^5.1.0" + source-map-support "^0.5.19" + +"@truffle/codec@^0.10.1": + version "0.10.1" + resolved "https://registry.npmjs.org/@truffle/codec/-/codec-0.10.1.tgz#70df52ddf1c64781a23daaccda24e10bfb9dec9d" + integrity sha512-c1lC9Wcp+Z1DLvEYH3dkEtMKnUJx72CirO3kmi0OgFSA5QqTDCtfrVOhAugcb/iMLgqUK05/pexp2whb4oASKA== + dependencies: + big.js "^5.2.2" + bn.js "^5.1.3" + cbor "^5.1.0" + debug "^4.3.1" + lodash.clonedeep "^4.5.0" + lodash.escaperegexp "^4.1.2" + lodash.partition "^4.6.0" + lodash.sum "^4.0.2" + semver "^7.3.4" + source-map-support "^0.5.19" + utf8 "^3.0.0" + web3-utils "1.2.9" + +"@truffle/config@^1.2.35": + version "1.2.35" + resolved "https://registry.npmjs.org/@truffle/config/-/config-1.2.35.tgz#98a9ae3a964e73c33dcea4dcb172f878fdbb9bdd" + integrity sha512-ULTS9t3ldqEV1VBVNWlS9tdWJ0r637ANspzBoQd6S/Ab7CfueQhcIfp29oz6Ahcgjkl4NX+Gu/dG6/Jiys81vg== + dependencies: + "@truffle/error" "^0.0.12" + "@truffle/events" "^0.0.9" + "@truffle/provider" "^0.2.26" + configstore "^4.0.0" + find-up "^2.1.0" + lodash.assignin "^4.2.0" + lodash.merge "^4.6.2" + module "^1.2.5" + original-require "^1.0.1" + source-map-support "^0.5.19" + +"@truffle/db@^0.5.3": + version "0.5.3" + resolved "https://registry.npmjs.org/@truffle/db/-/db-0.5.3.tgz#1223ee5c9b9f112abf5883f647d46ae1e45d5dbd" + integrity sha512-cNQJgcqC77xAIvFrS9R1XHmppOnlZmVZvcEqHOv0PGzcf0XA+hUkUgiOHFYn5bwTvGxLMrBlBmAnBprKlJYsRg== + dependencies: + "@truffle/abi-utils" "^0.1.4" + "@truffle/code-utils" "^1.2.23" + "@truffle/config" "^1.2.35" + apollo-server "^2.18.2" + debug "^4.3.1" + fs-extra "^9.1.0" + graphql "^15.3.0" + graphql-tag "^2.11.0" + graphql-tools "^6.2.4" + json-stable-stringify "^1.0.1" + jsondown "^1.0.0" + pascal-case "^2.0.1" + pluralize "^8.0.0" + pouchdb "7.1.1" + pouchdb-adapter-memory "^7.1.1" + pouchdb-adapter-node-websql "^7.0.0" + pouchdb-debug "^7.1.1" + pouchdb-find "^7.0.0" + source-map-support "^0.5.19" + web3-utils "1.2.9" + +"@truffle/debugger@^8.0.17": + version "8.0.17" + resolved "https://registry.npmjs.org/@truffle/debugger/-/debugger-8.0.17.tgz#a13cd3c967bf045e71a00bd711fb371effa06752" + integrity sha512-CpxsW3edO0gPygLUmIkhFC4hgONltYuhJIM8jhdYL4KpDe8hRlFjWeiveH++iJX/1ka1A2Wbyk9G/TtCdiLY4Q== + dependencies: + "@truffle/abi-utils" "^0.1.5" + "@truffle/codec" "^0.10.1" + "@truffle/source-map-utils" "^1.3.35" + bn.js "^5.1.3" + debug "^4.3.1" + json-pointer "^0.6.0" + json-stable-stringify "^1.0.1" + lodash.flatten "^4.4.0" + lodash.merge "^4.6.2" + lodash.sum "^4.0.2" + lodash.zipwith "^4.2.0" + redux "^3.7.2" + redux-cli-logger "^2.0.1" + redux-saga "1.0.0" + remote-redux-devtools "^0.5.12" + reselect-tree "^1.3.4" + semver "^7.3.4" + source-map-support "^0.5.19" + web3 "1.2.9" + web3-eth-abi "1.2.9" + +"@truffle/error@^0.0.12": + version "0.0.12" + resolved "https://registry.npmjs.org/@truffle/error/-/error-0.0.12.tgz#83e02e6ffe1d154fe274141d90038a91fd1e186d" + integrity sha512-kZqqnPR9YDJG7KCDOcN1qH16Qs0oz1PzF0Y93AWdhXuL9S9HYo/RUUeqGKbPpRBEZldQUS8aa4EzfK08u5pu6g== + +"@truffle/events@^0.0.9": + version "0.0.9" + resolved "https://registry.npmjs.org/@truffle/events/-/events-0.0.9.tgz#460fc72a04269526cbd8ef54069d474c22b42b23" + integrity sha512-o0rS8zkjCzg2vDJymSZyyq1eKdkRbxIFnsnYQl6Bc2StK89C/ZISenxrUe2fbdeq3L9Zq+ds1mSKH/MFK0Ejkg== + dependencies: + emittery "^0.4.1" + ora "^3.4.0" + +"@truffle/interface-adapter@^0.4.19": + version "0.4.19" + resolved "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.4.19.tgz#19248ac88099f8df34f58a3d43a95ba3470dc89a" + integrity sha512-+Zz6Fr8+I2wYSS8RM3WBOMzf22QffMQTnlsYsRgRHzv3gYoRA9ZDLb84lFRfmWyw+IdXTo90tjRHEb5krC6uxg== + dependencies: + bn.js "^5.1.3" + ethers "^4.0.32" + source-map-support "^0.5.19" + web3 "1.2.9" + +"@truffle/provider@^0.2.26": + version "0.2.26" + resolved "https://registry.npmjs.org/@truffle/provider/-/provider-0.2.26.tgz#88e31b79973c2427c4a17d9a59411e6fbc810190" + integrity sha512-YKPmhB9S9AQkT2ePGtadwjDduxU23DXXy+5zyM5fevw5GCbXSnf+jG6rICXjPkVFjuKBlXuq5JbuERZn43522Q== + dependencies: + "@truffle/error" "^0.0.12" + "@truffle/interface-adapter" "^0.4.19" + web3 "1.2.9" + +"@truffle/source-map-utils@^1.3.35": + version "1.3.35" + resolved "https://registry.npmjs.org/@truffle/source-map-utils/-/source-map-utils-1.3.35.tgz#aa40422a05e2727254665ee2c23659d01230eb8f" + integrity sha512-j3PHac4g/yQwxSB899lkal/YMuIXLNNlDGfCog2QrWqdtK7HJhx6X2tftwqrZzO4JTKc1Cs8KOCPOndx9W2xeQ== + dependencies: + "@truffle/code-utils" "^1.2.24" + "@truffle/codec" "^0.10.1" + debug "^4.3.1" + json-pointer "^0.6.0" + node-interval-tree "^1.3.3" + web3-utils "1.2.9" + +"@types/accepts@*", "@types/accepts@^1.3.5": + version "1.3.5" + resolved "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz#c34bec115cfc746e04fe5a059df4ce7e7b391575" + integrity sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ== + dependencies: + "@types/node" "*" + +"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.4": + version "4.11.6" + resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/body-parser@*", "@types/body-parser@1.19.0": + version "1.19.0" + resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz#0685b3c47eb3006ffed117cdd55164b61f80538f" + integrity sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.34" + resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.34.tgz#170a40223a6d666006d93ca128af2beb1d9b1901" + integrity sha512-ePPA/JuI+X0vb+gSWlPKOY0NdNAie/rPUqX2GUPpbZwiKTkSPhjXWuee47E4MtE54QVzGCQMQkAL6JhV2E1+cQ== + dependencies: + "@types/node" "*" + +"@types/content-disposition@*": + version "0.5.3" + resolved "https://registry.npmjs.org/@types/content-disposition/-/content-disposition-0.5.3.tgz#0aa116701955c2faa0717fc69cd1596095e49d96" + integrity sha512-P1bffQfhD3O4LW0ioENXUhZ9OIa0Zn+P7M+pWgkCKaT53wVLSq0mrKksCID/FGHpFhRSxRGhgrQmfhRuzwtKdg== + +"@types/cookies@*": + version "0.7.6" + resolved "https://registry.npmjs.org/@types/cookies/-/cookies-0.7.6.tgz#71212c5391a976d3bae57d4b09fac20fc6bda504" + integrity sha512-FK4U5Qyn7/Sc5ih233OuHO0qAkOpEcD/eG6584yEiLKizTFRny86qHLe/rej3HFQrkBuUjF4whFliAdODbVN/w== + dependencies: + "@types/connect" "*" + "@types/express" "*" + "@types/keygrip" "*" + "@types/node" "*" + +"@types/cors@2.8.8": + version "2.8.8" + resolved "https://registry.npmjs.org/@types/cors/-/cors-2.8.8.tgz#317a8d8561995c60e35b9e0fcaa8d36660c98092" + integrity sha512-fO3gf3DxU2Trcbr75O7obVndW/X5k8rJNZkLXlQWStTHhP71PkRqjwPIEI0yMnJdg9R9OasjU+Bsr+Hr1xy/0w== + dependencies: + "@types/express" "*" + +"@types/express-serve-static-core@*", "@types/express-serve-static-core@4.17.18", "@types/express-serve-static-core@^4.17.18": + version "4.17.18" + resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.18.tgz#8371e260f40e0e1ca0c116a9afcd9426fa094c40" + integrity sha512-m4JTwx5RUBNZvky/JJ8swEJPKFd8si08pPF2PfizYjGZOKr/svUWPcoUmLow6MmPzhasphB7gSTINY67xn3JNA== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + +"@types/express@*": + version "4.17.11" + resolved "https://registry.npmjs.org/@types/express/-/express-4.17.11.tgz#debe3caa6f8e5fcda96b47bd54e2f40c4ee59545" + integrity sha512-no+R6rW60JEc59977wIxreQVsIEOAYwgCqldrA/vkpCnbD7MqTefO97lmoBe4WE0F156bC4uLSP1XHDOySnChg== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.18" + "@types/qs" "*" + "@types/serve-static" "*" + +"@types/express@4.17.7": + version "4.17.7" + resolved "https://registry.npmjs.org/@types/express/-/express-4.17.7.tgz#42045be6475636d9801369cd4418ef65cdb0dd59" + integrity sha512-dCOT5lcmV/uC2J9k0rPafATeeyz+99xTt54ReX11/LObZgfzJqZNcW27zGhYyX+9iSEGXGt5qLPwRSvBZcLvtQ== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "*" + "@types/qs" "*" + "@types/serve-static" "*" + +"@types/fs-capacitor@*": + version "2.0.0" + resolved "https://registry.npmjs.org/@types/fs-capacitor/-/fs-capacitor-2.0.0.tgz#17113e25817f584f58100fb7a08eed288b81956e" + integrity sha512-FKVPOCFbhCvZxpVAMhdBdTfVfXUpsh15wFHgqOKxh9N9vzWZVuWCSijZ5T4U34XYNnuj2oduh6xcs1i+LPI+BQ== + dependencies: + "@types/node" "*" + +"@types/http-assert@*": + version "1.5.1" + resolved "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.1.tgz#d775e93630c2469c2f980fc27e3143240335db3b" + integrity sha512-PGAK759pxyfXE78NbKxyfRcWYA/KwW17X290cNev/qAsn9eQIxkH4shoNBafH37wewhDG/0p1cHPbK6+SzZjWQ== + +"@types/http-errors@*": + version "1.8.0" + resolved "https://registry.npmjs.org/@types/http-errors/-/http-errors-1.8.0.tgz#682477dbbbd07cd032731cb3b0e7eaee3d026b69" + integrity sha512-2aoSC4UUbHDj2uCsCxcG/vRMXey/m17bC7UwitVm5hn22nI8O8Y9iDpA76Orc+DWkQ4zZrOKEshCqR/jSuXAHA== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + +"@types/keygrip@*": + version "1.0.2" + resolved "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.2.tgz#513abfd256d7ad0bf1ee1873606317b33b1b2a72" + integrity sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw== + +"@types/koa-compose@*": + version "3.2.5" + resolved "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.5.tgz#85eb2e80ac50be95f37ccf8c407c09bbe3468e9d" + integrity sha512-B8nG/OoE1ORZqCkBVsup/AKcvjdgoHnfi4pZMn5UwAPCbhk/96xyv284eBYW8JlQbQ7zDmnpFr68I/40mFoIBQ== + dependencies: + "@types/koa" "*" + +"@types/koa@*": + version "2.13.1" + resolved "https://registry.npmjs.org/@types/koa/-/koa-2.13.1.tgz#e29877a6b5ad3744ab1024f6ec75b8cbf6ec45db" + integrity sha512-Qbno7FWom9nNqu0yHZ6A0+RWt4mrYBhw3wpBAQ3+IuzGcLlfeYkzZrnMq5wsxulN2np8M4KKeUpTodsOsSad5Q== + dependencies: + "@types/accepts" "*" + "@types/content-disposition" "*" + "@types/cookies" "*" + "@types/http-assert" "*" + "@types/http-errors" "*" + "@types/keygrip" "*" + "@types/koa-compose" "*" + "@types/node" "*" + +"@types/long@^4.0.0": + version "4.0.1" + resolved "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" + integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== + +"@types/mime@^1": + version "1.3.2" + resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" + integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== + +"@types/mocha@^8.2.1": + version "8.2.1" + resolved "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.1.tgz#f3f3ae4590c5386fc7c543aae9b78d4cf30ffee9" + integrity sha512-NysN+bNqj6E0Hv4CTGWSlPzMW6vTKjDpOteycDkV4IWBsO+PU48JonrPzV9ODjiI2XrjmA05KInLgF5ivZ/YGQ== + +"@types/node-fetch@2.5.7": + version "2.5.7" + resolved "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c" + integrity sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + +"@types/node@*": + version "14.14.34" + resolved "https://registry.npmjs.org/@types/node/-/node-14.14.34.tgz#07935194fc049069a1c56c0c274265abeddf88da" + integrity sha512-dBPaxocOK6UVyvhbnpFIj2W+S+1cBTkHQbFQfeeJhoKFbzYcVUGHvddeWPSucKATb3F0+pgDq0i6ghEaZjsugA== + +"@types/node@^10.1.0", "@types/node@^10.12.18": + version "10.17.55" + resolved "https://registry.npmjs.org/@types/node/-/node-10.17.55.tgz#a147f282edec679b894d4694edb5abeb595fecbd" + integrity sha512-koZJ89uLZufDvToeWO5BrC4CR4OUfHnUz2qoPs/daQH6qq3IN62QFxCTZ+bKaCE0xaoCAJYE4AXre8AbghCrhg== + +"@types/node@^12.6.1": + version "12.20.5" + resolved "https://registry.npmjs.org/@types/node/-/node-12.20.5.tgz#4ca82a766f05c359fd6c77505007e5a272f4bb9b" + integrity sha512-5Oy7tYZnu3a4pnJ//d4yVvOImExl4Vtwf0D40iKUlU+XlUsyV9iyFWyCFlwy489b72FMAik/EFwRkNLjjOdSPg== + +"@types/pbkdf2@^3.0.0": + version "3.1.0" + resolved "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" + integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + dependencies: + "@types/node" "*" + +"@types/qs@*": + version "6.9.6" + resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.6.tgz#df9c3c8b31a247ec315e6996566be3171df4b3b1" + integrity sha512-0/HnwIfW4ki2D8L8c9GVcG5I72s9jP5GSLVF0VIXDW00kmIpA6O33G7a8n59Tmh7Nz0WUC3rSb7PTY/sdW2JzA== + +"@types/range-parser@*": + version "1.2.3" + resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" + integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== + +"@types/secp256k1@^4.0.1": + version "4.0.1" + resolved "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.1.tgz#fb3aa61a1848ad97d7425ff9dcba784549fca5a4" + integrity sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog== + dependencies: + "@types/node" "*" + +"@types/serve-static@*": + version "1.13.9" + resolved "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.9.tgz#aacf28a85a05ee29a11fb7c3ead935ac56f33e4e" + integrity sha512-ZFqF6qa48XsPdjXV5Gsz0Zqmux2PerNd3a/ktL45mHpa19cuMi/cL8tcxdAx497yRh+QtYPuofjT9oWw9P7nkA== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + +"@types/ungap__global-this@^0.3.1": + version "0.3.1" + resolved "https://registry.npmjs.org/@types/ungap__global-this/-/ungap__global-this-0.3.1.tgz#18ce9f657da556037a29d50604335614ce703f4c" + integrity sha512-+/DsiV4CxXl6ZWefwHZDXSe1Slitz21tom38qPCaG0DYCS1NnDPIQDTKcmQ/tvK/edJUKkmuIDBJbmKDiB0r/g== + +"@types/websocket@1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.1.tgz#039272c196c2c0e4868a0d8a1a27bbb86e9e9138" + integrity sha512-f5WLMpezwVxCLm1xQe/kdPpQIOmL0TXYx2O15VYfYzc7hTIdxiOoOvez+McSIw3b7z/1zGovew9YSL7+h4h7/Q== + dependencies: + "@types/node" "*" + +"@types/ws@^7.0.0": + version "7.4.0" + resolved "https://registry.npmjs.org/@types/ws/-/ws-7.4.0.tgz#499690ea08736e05a8186113dac37769ab251a0e" + integrity sha512-Y29uQ3Uy+58bZrFLhX36hcI3Np37nqWE7ky5tjiDoy1GDZnIwVxS0CgF+s+1bXMzjKBFy+fqaRfb708iNzdinw== + dependencies: + "@types/node" "*" + +"@types/zen-observable@^0.8.0": + version "0.8.2" + resolved "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.2.tgz#808c9fa7e4517274ed555fa158f2de4b4f468e71" + integrity sha512-HrCIVMLjE1MOozVoD86622S7aunluLb2PJdPfb3nYiEtohm8mIB/vyv0Fd37AdeMFrTUQXEunw78YloMA3Qilg== + +"@ungap/global-this@^0.4.2": + version "0.4.4" + resolved "https://registry.npmjs.org/@ungap/global-this/-/global-this-0.4.4.tgz#8a1b2cfcd3e26e079a847daba879308c924dd695" + integrity sha512-mHkm6FvepJECMNthFuIgpAEFmPOk71UyXuIxYfjytvFTnSDBIz7jmViO+LfHI/AjrazWije0PnSP3+/NlwzqtA== + +"@wry/context@^0.5.2": + version "0.5.4" + resolved "https://registry.npmjs.org/@wry/context/-/context-0.5.4.tgz#b6c28038872e0a0e1ff14eb40b5bf4cab2ab4e06" + integrity sha512-/pktJKHUXDr4D6TJqWgudOPJW2Z+Nb+bqk40jufA3uTkLbnCRKdJPiYDIa/c7mfcPH8Hr6O8zjCERpg5Sq04Zg== + dependencies: + tslib "^1.14.1" + +"@wry/equality@^0.1.2": + version "0.1.11" + resolved "https://registry.npmjs.org/@wry/equality/-/equality-0.1.11.tgz#35cb156e4a96695aa81a9ecc4d03787bc17f1790" + integrity sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA== + dependencies: + tslib "^1.9.3" + +"@wry/equality@^0.3.0": + version "0.3.4" + resolved "https://registry.npmjs.org/@wry/equality/-/equality-0.3.4.tgz#37f101552b18a046d5c0c06da7b2021b15f72c03" + integrity sha512-1gQQhCPenzxw/1HzLlvSIs/59eBHJf9ZDIussjjZhqNSqQuPKQIzN6SWt4kemvlBPDi7RqMuUa03pId7MAE93g== + dependencies: + tslib "^1.14.1" + +"@wry/trie@^0.2.1": + version "0.2.2" + resolved "https://registry.npmjs.org/@wry/trie/-/trie-0.2.2.tgz#99f20f0fcbbcda17006069b155c826cbabfc402f" + integrity sha512-OxqBB39x6MfHaa2HpMiRMfhuUnQTddD32Ko020eBeJXq87ivX6xnSSnzKHVbA21p7iqBASz8n/07b6W5wW1BVQ== + dependencies: + tslib "^1.14.1" + +abab@^1.0.0: + version "1.0.4" + resolved "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" + integrity sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4= + +abbrev@1: + version "1.1.1" + resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +abort-controller@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +abstract-leveldown@^6.2.1: + version "6.3.0" + resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz#d25221d1e6612f820c35963ba4bd739928f6026a" + integrity sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +abstract-leveldown@~2.7.1: + version "2.7.2" + resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93" + integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@~6.0.0, abstract-leveldown@~6.0.1: + version "6.0.3" + resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.0.3.tgz#b4b6159343c74b0c5197b2817854782d8f748c4a" + integrity sha512-jzewKKpZbaYUa6HTThnrl+GrJhzjEAeuc7hTVpZdzg7kupXZFoqQDFwyOwLNbmJKJlmzw8yiipMPkDiuKkT06Q== + dependencies: + level-concat-iterator "~2.0.0" + xtend "~4.0.0" + +abstract-leveldown@~6.2.1: + version "6.2.3" + resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz#036543d87e3710f2528e47040bc3261b77a9a8eb" + integrity sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +accepts@^1.3.5, accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +acorn-globals@^1.0.4: + version "1.0.9" + resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz#55bb5e98691507b74579d0513413217c380c54cf" + integrity sha1-VbtemGkVB7dFedBRNBMhfDgMVM8= + dependencies: + acorn "^2.1.0" + +acorn-jsx@^5.3.1: + version "5.3.1" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" + integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== + +acorn@4.X: + version "4.0.13" + resolved "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + integrity sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c= + +acorn@^2.1.0, acorn@^2.4.0: + version "2.7.0" + resolved "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7" + integrity sha1-q259nYhqrKiwhbwzEreaGYQz8Oc= + +acorn@^7.4.0: + version "7.4.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= + +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^7.0.2: + version "7.2.1" + resolved "https://registry.npmjs.org/ajv/-/ajv-7.2.1.tgz#a5ac226171912447683524fa2f1248fcf8bac83d" + integrity sha512-+nu0HDv7kNSOua9apAVc979qd932rrZeb3WOvoiD31A/p1mIE5/9bN2027pE2rOPYEdS3UHzsvof4hY+lM9/WQ== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ansi-colors@4.1.1, ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +apollo-cache-control@^0.11.6: + version "0.11.6" + resolved "https://registry.npmjs.org/apollo-cache-control/-/apollo-cache-control-0.11.6.tgz#f7bdf924272af47ac474cf3f3f35cfc038cc9485" + integrity sha512-YZ+uuIG+fPy+mkpBS2qKF0v1qlzZ3PW6xZVaDukeK3ed3iAs4L/2YnkTqau3OmoF/VPzX2FmSkocX/OVd59YSw== + dependencies: + apollo-server-env "^3.0.0" + apollo-server-plugin-base "^0.10.4" + +apollo-datasource@^0.7.3: + version "0.7.3" + resolved "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-0.7.3.tgz#c824eb1457bdee5a3173ced0e35e594547e687a0" + integrity sha512-PE0ucdZYjHjUyXrFWRwT02yLcx2DACsZ0jm1Mp/0m/I9nZu/fEkvJxfsryXB6JndpmQO77gQHixf/xGCN976kA== + dependencies: + apollo-server-caching "^0.5.3" + apollo-server-env "^3.0.0" + +apollo-env@^0.6.6: + version "0.6.6" + resolved "https://registry.npmjs.org/apollo-env/-/apollo-env-0.6.6.tgz#d7880805c4e96ee3d4142900a405176a04779438" + integrity sha512-hXI9PjJtzmD34XviBU+4sPMOxnifYrHVmxpjykqI/dUD2G3yTiuRaiQqwRwB2RCdwC1Ug/jBfoQ/NHDTnnjndQ== + dependencies: + "@types/node-fetch" "2.5.7" + core-js "^3.0.1" + node-fetch "^2.2.0" + sha.js "^2.4.11" + +apollo-graphql@^0.6.0: + version "0.6.1" + resolved "https://registry.npmjs.org/apollo-graphql/-/apollo-graphql-0.6.1.tgz#d0bf0aff76f445de3da10e08f6974f1bf65f5753" + integrity sha512-ZRXAV+k+hboCVS+FW86FW/QgnDR7gm/xMUwJPGXEbV53OLGuQQdIT0NCYK7AzzVkCfsbb7NJ3mmEclkZY9uuxQ== + dependencies: + apollo-env "^0.6.6" + lodash.sortby "^4.7.0" + +apollo-link@1.2.14, apollo-link@^1.2.14: + version "1.2.14" + resolved "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.14.tgz#3feda4b47f9ebba7f4160bef8b977ba725b684d9" + integrity sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg== + dependencies: + apollo-utilities "^1.3.0" + ts-invariant "^0.4.0" + tslib "^1.9.3" + zen-observable-ts "^0.8.21" + +apollo-reporting-protobuf@^0.6.2: + version "0.6.2" + resolved "https://registry.npmjs.org/apollo-reporting-protobuf/-/apollo-reporting-protobuf-0.6.2.tgz#5572866be9b77f133916532b10e15fbaa4158304" + integrity sha512-WJTJxLM+MRHNUxt1RTl4zD0HrLdH44F2mDzMweBj1yHL0kSt8I1WwoiF/wiGVSpnG48LZrBegCaOJeuVbJTbtw== + dependencies: + "@apollo/protobufjs" "^1.0.3" + +apollo-server-caching@^0.5.3: + version "0.5.3" + resolved "https://registry.npmjs.org/apollo-server-caching/-/apollo-server-caching-0.5.3.tgz#cf42a77ad09a46290a246810075eaa029b5305e1" + integrity sha512-iMi3087iphDAI0U2iSBE9qtx9kQoMMEWr6w+LwXruBD95ek9DWyj7OeC2U/ngLjRsXM43DoBDXlu7R+uMjahrQ== + dependencies: + lru-cache "^6.0.0" + +apollo-server-core@^2.21.1: + version "2.21.1" + resolved "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-2.21.1.tgz#5494e558e51a64cdd63b00a762ed600c4c73ee10" + integrity sha512-aI+soLaqKMkWxH6l9xvPP1fCuZgD053SK09D79LQfMbJAHHvs3MI90UpydiY/W61K5l8ELl0YsKdqkQg8262nw== + dependencies: + "@apollographql/apollo-tools" "^0.4.3" + "@apollographql/graphql-playground-html" "1.6.27" + "@apollographql/graphql-upload-8-fork" "^8.1.3" + "@types/ws" "^7.0.0" + apollo-cache-control "^0.11.6" + apollo-datasource "^0.7.3" + apollo-graphql "^0.6.0" + apollo-reporting-protobuf "^0.6.2" + apollo-server-caching "^0.5.3" + apollo-server-env "^3.0.0" + apollo-server-errors "^2.4.2" + apollo-server-plugin-base "^0.10.4" + apollo-server-types "^0.6.3" + apollo-tracing "^0.12.2" + async-retry "^1.2.1" + fast-json-stable-stringify "^2.0.0" + graphql-extensions "^0.12.8" + graphql-tag "^2.11.0" + graphql-tools "^4.0.8" + loglevel "^1.6.7" + lru-cache "^6.0.0" + sha.js "^2.4.11" + subscriptions-transport-ws "^0.9.11" + uuid "^8.0.0" + ws "^6.0.0" + +apollo-server-env@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/apollo-server-env/-/apollo-server-env-3.0.0.tgz#0157c51f52b63aee39af190760acf789ffc744d9" + integrity sha512-tPSN+VttnPsoQAl/SBVUpGbLA97MXG990XIwq6YUnJyAixrrsjW1xYG7RlaOqetxm80y5mBZKLrRDiiSsW/vog== + dependencies: + node-fetch "^2.1.2" + util.promisify "^1.0.0" + +apollo-server-errors@^2.4.2: + version "2.4.2" + resolved "https://registry.npmjs.org/apollo-server-errors/-/apollo-server-errors-2.4.2.tgz#1128738a1d14da989f58420896d70524784eabe5" + integrity sha512-FeGxW3Batn6sUtX3OVVUm7o56EgjxDlmgpTLNyWcLb0j6P8mw9oLNyAm3B+deHA4KNdNHO5BmHS2g1SJYjqPCQ== + +apollo-server-express@^2.21.1: + version "2.21.1" + resolved "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-2.21.1.tgz#b11af5ca952667e07952c0e5af8a65490a26c70a" + integrity sha512-O8msL01rl1iOfx4qmgpdNDXCh2u+adis8m2pHXZJfHciOoBmAgYaLlH7AOxpW5iHK/vQIwBM0dkPpxu5SaWpag== + dependencies: + "@apollographql/graphql-playground-html" "1.6.27" + "@types/accepts" "^1.3.5" + "@types/body-parser" "1.19.0" + "@types/cors" "2.8.8" + "@types/express" "4.17.7" + "@types/express-serve-static-core" "4.17.18" + accepts "^1.3.5" + apollo-server-core "^2.21.1" + apollo-server-types "^0.6.3" + body-parser "^1.18.3" + cors "^2.8.4" + express "^4.17.1" + graphql-subscriptions "^1.0.0" + graphql-tools "^4.0.8" + parseurl "^1.3.2" + subscriptions-transport-ws "^0.9.16" + type-is "^1.6.16" + +apollo-server-plugin-base@^0.10.4: + version "0.10.4" + resolved "https://registry.npmjs.org/apollo-server-plugin-base/-/apollo-server-plugin-base-0.10.4.tgz#fbf73f64f95537ca9f9639dd7c535eb5eeb95dcd" + integrity sha512-HRhbyHgHFTLP0ImubQObYhSgpmVH4Rk1BinnceZmwudIVLKrqayIVOELdyext/QnSmmzg5W7vF3NLGBcVGMqDg== + dependencies: + apollo-server-types "^0.6.3" + +apollo-server-types@^0.6.3: + version "0.6.3" + resolved "https://registry.npmjs.org/apollo-server-types/-/apollo-server-types-0.6.3.tgz#f7aa25ff7157863264d01a77d7934aa6e13399e8" + integrity sha512-aVR7SlSGGY41E1f11YYz5bvwA89uGmkVUtzMiklDhZ7IgRJhysT5Dflt5IuwDxp+NdQkIhVCErUXakopocFLAg== + dependencies: + apollo-reporting-protobuf "^0.6.2" + apollo-server-caching "^0.5.3" + apollo-server-env "^3.0.0" + +apollo-server@^2.18.2: + version "2.21.1" + resolved "https://registry.npmjs.org/apollo-server/-/apollo-server-2.21.1.tgz#9956b5e0e1cf87c3f050efb60bdb77da889e887e" + integrity sha512-z10nghSdF9tYvmTIezQlIpO7Q94YrbAuZtIBLswVdJXijHYmAtpWdlJ3BhWDiUFVFjocrcXrXhdw2jCtyXASDQ== + dependencies: + apollo-server-core "^2.21.1" + apollo-server-express "^2.21.1" + express "^4.0.0" + graphql-subscriptions "^1.0.0" + graphql-tools "^4.0.8" + stoppable "^1.1.0" + +apollo-tracing@^0.12.2: + version "0.12.2" + resolved "https://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.12.2.tgz#a261c3970bb421b6dadf50cd85d75b2567a7e52c" + integrity sha512-SYN4o0C0wR1fyS3+P0FthyvsQVHFopdmN3IU64IaspR/RZScPxZ3Ae8uu++fTvkQflAkglnFM0aX6DkZERBp6w== + dependencies: + apollo-server-env "^3.0.0" + apollo-server-plugin-base "^0.10.4" + +apollo-upload-client@14.1.2: + version "14.1.2" + resolved "https://registry.npmjs.org/apollo-upload-client/-/apollo-upload-client-14.1.2.tgz#7a72b000f1cd67eaf8f12b4bda2796d0898c0dae" + integrity sha512-ozaW+4tnVz1rpfwiQwG3RCdCcZ93RV/37ZQbRnObcQ9mjb+zur58sGDPVg9Ef3fiujLmiE/Fe9kdgvIMA3VOjA== + dependencies: + "@apollo/client" "^3.1.5" + "@babel/runtime" "^7.11.2" + extract-files "^9.0.0" + +apollo-utilities@^1.0.1, apollo-utilities@^1.3.0: + version "1.3.4" + resolved "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.3.4.tgz#6129e438e8be201b6c55b0f13ce49d2c7175c9cf" + integrity sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig== + dependencies: + "@wry/equality" "^0.1.2" + fast-json-stable-stringify "^2.0.0" + ts-invariant "^0.4.0" + tslib "^1.10.0" + +app-module-path@^2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" + integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argsarray@0.0.1, argsarray@^0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/argsarray/-/argsarray-0.0.1.tgz#6e7207b4ecdb39b0af88303fa5ae22bda8df61cb" + integrity sha1-bnIHtOzbObCviDA/pa4ivajfYcs= + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +array-includes@^3.1.1: + version "3.1.3" + resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a" + integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + get-intrinsic "^1.1.1" + is-string "^1.0.5" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= + +array.prototype.flat@^1.2.3: + version "1.2.4" + resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123" + integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + +array.prototype.map@^1.0.1: + version "1.0.3" + resolved "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.3.tgz#1609623618d3d84134a37d4a220030c2bd18420b" + integrity sha512-nNcb30v0wfDyIe26Yif3PcV1JXQp4zEeEfupG7L4SRjnD6HLbO5b2a7eVSba53bOx4YCHYMBHt+Fp4vYstneRA== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + es-array-method-boxes-properly "^1.0.0" + is-string "^1.0.5" + +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= + +asn1.js@^5.2.0: + version "5.4.1" + resolved "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" + integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + safer-buffer "^2.1.0" + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async-limiter@^1.0.0, async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + +async-retry@^1.2.1: + version "1.3.1" + resolved "https://registry.npmjs.org/async-retry/-/async-retry-1.3.1.tgz#139f31f8ddce50c0870b0ba558a6079684aaed55" + integrity sha512-aiieFW/7h3hY0Bq5d+ktDBejxuwR78vRu9hDUdR8rNhSaQ29VzPL4AoIRG7D/c7tdenwOcKvgPM6tIxB3cB6HA== + dependencies: + retry "0.12.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-generator@6.26.1: + version "6.26.1" + resolved "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== + dependencies: + object.assign "^4.1.0" + +babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: + version "7.0.0-beta.0" + resolved "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" + integrity sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ== + +babel-preset-fbjs@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/babel-preset-fbjs/-/babel-preset-fbjs-3.3.0.tgz#a6024764ea86c8e06a22d794ca8b69534d263541" + integrity sha512-7QTLTCd2gwB2qGoi5epSULMHugSVgpcVt5YAeiFO9ABLrutDQzKfGwzxgZHLpugq8qMdg/DhRZDZ5CLKxBkEbw== + dependencies: + "@babel/plugin-proposal-class-properties" "^7.0.0" + "@babel/plugin-proposal-object-rest-spread" "^7.0.0" + "@babel/plugin-syntax-class-properties" "^7.0.0" + "@babel/plugin-syntax-flow" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + "@babel/plugin-transform-arrow-functions" "^7.0.0" + "@babel/plugin-transform-block-scoped-functions" "^7.0.0" + "@babel/plugin-transform-block-scoping" "^7.0.0" + "@babel/plugin-transform-classes" "^7.0.0" + "@babel/plugin-transform-computed-properties" "^7.0.0" + "@babel/plugin-transform-destructuring" "^7.0.0" + "@babel/plugin-transform-flow-strip-types" "^7.0.0" + "@babel/plugin-transform-for-of" "^7.0.0" + "@babel/plugin-transform-function-name" "^7.0.0" + "@babel/plugin-transform-literals" "^7.0.0" + "@babel/plugin-transform-member-expression-literals" "^7.0.0" + "@babel/plugin-transform-modules-commonjs" "^7.0.0" + "@babel/plugin-transform-object-super" "^7.0.0" + "@babel/plugin-transform-parameters" "^7.0.0" + "@babel/plugin-transform-property-literals" "^7.0.0" + "@babel/plugin-transform-react-display-name" "^7.0.0" + "@babel/plugin-transform-react-jsx" "^7.0.0" + "@babel/plugin-transform-shorthand-properties" "^7.0.0" + "@babel/plugin-transform-spread" "^7.0.0" + "@babel/plugin-transform-template-literals" "^7.0.0" + babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" + +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-traverse@6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@6.18.0, babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== + +backo2@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" + integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base-x@^3.0.2, base-x@^3.0.8: + version "3.0.8" + resolved "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" + integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + +bignumber.js@^9.0.0, bignumber.js@^9.0.1: + version "9.0.1" + resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" + integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +blakejs@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5" + integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= + +bluebird@^3.5.0: + version "3.7.2" + resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bn.js@4.11.6: + version "4.11.6" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= + +bn.js@4.11.8: + version "4.11.8" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.9, bn.js@^4.4.0: + version "4.12.0" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.3: + version "5.2.0" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" + integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== + +body-parser@1.19.0, body-parser@^1.16.0, body-parser@^1.18.3: + version "1.19.0" + resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +braces@^3.0.1, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.0.1, brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: + version "4.1.0" + resolved "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" + integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== + dependencies: + bn.js "^5.0.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.2.1" + resolved "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" + integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.3" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +browserslist@^4.14.5: + version "4.16.3" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz#340aa46940d7db878748567c5dea24a48ddf3717" + integrity sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw== + dependencies: + caniuse-lite "^1.0.30001181" + colorette "^1.2.1" + electron-to-chromium "^1.3.649" + escalade "^3.1.1" + node-releases "^1.1.70" + +bs58@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= + dependencies: + base-x "^3.0.2" + +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-from@1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" + integrity sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ== + +buffer-from@1.1.1, buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +buffer-to-arraybuffer@^0.0.5: + version "0.0.5" + resolved "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" + integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo= + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + +buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0, buffer@^5.7.0: + version "5.7.1" + resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +bufferutil@^4.0.1: + version "4.0.3" + resolved "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz#66724b756bed23cd7c28c4d306d7994f9943cc6b" + integrity sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw== + dependencies: + node-gyp-build "^4.2.0" + +busboy@^0.3.1: + version "0.3.1" + resolved "https://registry.npmjs.org/busboy/-/busboy-0.3.1.tgz#170899274c5bf38aae27d5c62b71268cd585fd1b" + integrity sha512-y7tTxhGKXcyBxRKAni+awqx8uqaJKrSFSNFSeRG5CsWNdmy2BIK+6VGWEW7TZnIO/533mtMEA4rOevQV815YJw== + dependencies: + dicer "0.3.0" + +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + +cacheable-request@^6.0.0: + version "6.1.0" + resolved "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" + integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^1.0.2" + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camel-case@4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/camel-case/-/camel-case-4.1.1.tgz#1fc41c854f00e2f7d0139dfeba1542d6896fe547" + integrity sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q== + dependencies: + pascal-case "^3.1.1" + tslib "^1.10.0" + +camel-case@4.1.2: + version "4.1.2" + resolved "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" + integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== + dependencies: + pascal-case "^3.1.2" + tslib "^2.0.3" + +camel-case@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M= + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase@^2.0.1: + version "2.1.1" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= + +camelcase@^5.0.0, camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +caniuse-lite@^1.0.30001181: + version "1.0.30001199" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001199.tgz#062afccaad21023e2e647d767bac4274b8b8fd7f" + integrity sha512-ifbK2eChUCFUwGhlEzIoVwzFt1+iriSjyKKFYNfv6hN34483wyWpLLavYQXhnR036LhkdUYaSDpHg1El++VgHQ== + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +cbor@^5.1.0: + version "5.2.0" + resolved "https://registry.npmjs.org/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" + integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== + dependencies: + bignumber.js "^9.0.1" + nofilter "^1.0.4" + +chalk@1.1.3, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0: + version "4.1.0" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +change-case@3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037" + integrity sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA== + dependencies: + camel-case "^3.0.0" + constant-case "^2.0.0" + dot-case "^2.1.0" + header-case "^1.0.0" + is-lower-case "^1.1.0" + is-upper-case "^1.1.0" + lower-case "^1.1.1" + lower-case-first "^1.0.0" + no-case "^2.3.2" + param-case "^2.1.0" + pascal-case "^2.0.0" + path-case "^2.1.0" + sentence-case "^2.1.0" + snake-case "^2.1.0" + swap-case "^1.1.0" + title-case "^2.1.0" + upper-case "^1.1.1" + upper-case-first "^1.1.0" + +cheerio@0.20.0: + version "0.20.0" + resolved "https://registry.npmjs.org/cheerio/-/cheerio-0.20.0.tgz#5c710f2bab95653272842ba01c6ea61b3545ec35" + integrity sha1-XHEPK6uVZTJyhCugHG6mGzVF7DU= + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "~3.8.1" + lodash "^4.1.0" + optionalDependencies: + jsdom "^7.0.2" + +cheerio@1.0.0-rc.2: + version "1.0.0-rc.2" + resolved "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db" + integrity sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs= + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash "^4.15.0" + parse5 "^3.0.1" + +chokidar@3.4.2: + version "3.4.2" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz#38dc8e658dec3809741eb3ef7bb0a47fe424232d" + integrity sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.4.0" + optionalDependencies: + fsevents "~2.1.2" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +cids@^0.7.1: + version "0.7.5" + resolved "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" + integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== + dependencies: + buffer "^5.5.0" + class-is "^1.1.0" + multibase "~0.6.0" + multicodec "^1.0.0" + multihashes "~0.4.15" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-is@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" + integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + +cli-spinners@^2.0.0: + version "2.5.0" + resolved "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz#12763e47251bf951cb75c201dfa58ff1bcb2d047" + integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ== + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + +clone-buffer@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg= + +clone-response@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + integrity sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE= + +clone@2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" + integrity sha1-0hfR6WERjjrJpLi7oyhVU79kfNs= + +clone@^1.0.0, clone@^1.0.2: + version "1.0.4" + resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-logger@0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/color-logger/-/color-logger-0.0.3.tgz#d9b22dd1d973e166b18bf313f9f481bba4df2018" + integrity sha1-2bIt0dlz4Waxi/MT+fSBu6TfIBg= + +color-logger@0.0.6: + version "0.0.6" + resolved "https://registry.npmjs.org/color-logger/-/color-logger-0.0.6.tgz#e56245ef29822657110c7cb75a9cd786cb69ed1b" + integrity sha1-5WJF7ymCJlcRDHy3WpzXhstp7Rs= + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^1.2.1: + version "1.2.2" + resolved "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" + integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== + +colors@^1.1.2: + version "1.4.0" + resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@^2.20.3: + version "2.20.3" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +component-emitter@1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-stream@1.5.1: + version "1.5.1" + resolved "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.1.tgz#f3b80acf9e1f48e3875c0688b41b6c31602eea1c" + integrity sha1-87gKz54fSOOHXAaItBtsMWAu6hw= + dependencies: + inherits "~2.0.1" + readable-stream "~2.0.0" + typedarray "~0.0.5" + +configstore@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz#5933311e95d3687efb592c528b922d9262d227e7" + integrity sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ== + dependencies: + dot-prop "^4.1.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + unique-string "^1.0.0" + write-file-atomic "^2.0.0" + xdg-basedir "^3.0.0" + +confusing-browser-globals@^1.0.10: + version "1.0.10" + resolved "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" + integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +constant-case@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" + integrity sha1-QXV2TTidP6nI7NKRhu1gBSQ7akY= + dependencies: + snake-case "^2.1.0" + upper-case "^1.1.1" + +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= + +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + +content-hash@^2.5.2: + version "2.5.2" + resolved "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" + integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== + dependencies: + cids "^0.7.1" + multicodec "^0.5.5" + multihashes "^0.4.15" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +convert-source-map@1.X, convert-source-map@^1.7.0: + version "1.7.0" + resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + dependencies: + safe-buffer "~5.1.1" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + +cookiejar@^2.1.1: + version "2.1.2" + resolved "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" + integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== + +core-js@^2.4.0: + version "2.6.12" + resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + +core-js@^3.0.1: + version "3.9.1" + resolved "https://registry.npmjs.org/core-js/-/core-js-3.9.1.tgz#cec8de593db8eb2a85ffb0dbdeb312cb6e5460ae" + integrity sha512-gSjRvzkxQc1zjM/5paAmL4idJBFzuJoo+jDjF1tStYFMV2ERfD02HhahhCGXUyHxQRG4yFKVSdO6g62eoRMcDg== + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cors@^2.8.1, cors@^2.8.4: + version "2.8.5" + resolved "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +create-ecdh@^4.0.0: + version "4.0.4" + resolved "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" + integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== + dependencies: + bn.js "^4.1.0" + elliptic "^6.5.3" + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-fetch@3.0.6, cross-fetch@^3.0.4: + version "3.0.6" + resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.0.6.tgz#3a4040bc8941e653e0e9cf17f29ebcd177d3365c" + integrity sha512-KBPUbqgFjzWlVcURG+Svp9TlhA5uliYtiNx/0r8nv0pdypeQCRJ9IaSIc3q/x3q8t3F75cHuwxVql1HFGHCNJQ== + dependencies: + node-fetch "2.6.1" + +cross-spawn@^6.0.0: + version "6.0.5" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +crypto-browserify@3.12.0: + version "3.12.0" + resolved "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +crypto-random-string@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" + integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= + +css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-what@2.1: + version "2.1.3" + resolved "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" + integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== + +css@2.X: + version "2.2.4" + resolved "https://registry.npmjs.org/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" + integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw== + dependencies: + inherits "^2.0.3" + source-map "^0.6.1" + source-map-resolve "^0.5.2" + urix "^0.1.0" + +cssfilter@0.0.10: + version "0.0.10" + resolved "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz#c6d2672632a2e5c83e013e6864a42ce8defd20ae" + integrity sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4= + +cssom@0.3.x, "cssom@>= 0.3.0 < 0.4.0": + version "0.3.8" + resolved "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +"cssstyle@>= 0.2.29 < 0.3.0": + version "0.2.37" + resolved "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + integrity sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ= + dependencies: + cssom "0.3.x" + +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +dataloader@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/dataloader/-/dataloader-2.0.0.tgz#41eaf123db115987e21ca93c005cd7753c55fe6f" + integrity sha512-YzhyDAwA4TaQIhM5go+vCLmU0UikghC/t9DTQYZR2M/UvZ1MdOhPezSDZcjj9uqQJOMqjLcpWtyW2iNINdlatQ== + +debug-fabulous@0.0.X: + version "0.0.4" + resolved "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-0.0.4.tgz#fa071c5d87484685424807421ca4b16b0b1a0763" + integrity sha1-+gccXYdIRoVCSAdCHKSxawsaB2M= + dependencies: + debug "2.X" + lazy-debug-legacy "0.0.X" + object-assign "4.1.0" + +debug@2.6.9, debug@2.X, debug@^2.2.0, debug@^2.6.8, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +debug@4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +debug@^3.1.0, debug@^3.2.6: + version "3.2.7" + resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: + version "4.3.1" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + +decamelize@^1.1.1, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +decompress-response@^3.2.0, decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + dependencies: + mimic-response "^1.0.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@^0.1.3, deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + +defer-to-connect@^1.0.1: + version "1.1.3" + resolved "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" + integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== + +deferred-leveldown@~5.0.0: + version "5.0.1" + resolved "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.0.1.tgz#1642eb18b535dfb2b6ac4d39fb10a9cbcfd13b09" + integrity sha512-BXohsvTedWOLkj2n/TY+yqVlrCWa2Zs8LSxh3uCAgFOru7/pjxKyZAexGa1j83BaKloER4PqUyQ9rGPJLt9bqA== + dependencies: + abstract-leveldown "~6.0.0" + inherits "^2.0.3" + +deferred-leveldown@~5.3.0: + version "5.3.0" + resolved "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz#27a997ad95408b61161aa69bd489b86c71b78058" + integrity sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw== + dependencies: + abstract-leveldown "~6.2.1" + inherits "^2.0.3" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +deprecated-decorator@^0.1.6: + version "0.1.6" + resolved "https://registry.npmjs.org/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz#00966317b7a12fe92f3cc831f7583af329b86c37" + integrity sha1-AJZjF7ehL+kvPMgx91g68ym4bDc= + +des.js@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" + integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= + dependencies: + repeating "^2.0.0" + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + +detect-newline@2.X: + version "2.1.0" + resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= + +dicer@0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/dicer/-/dicer-0.3.0.tgz#eacd98b3bfbf92e8ab5c2fdb71aaac44bb06b872" + integrity sha512-MdceRRWqltEG2dZqO769g27N/3PXfcKl04VhYnBlo2YhH7zPi88VebsjTKclaOyiuMaGU72hTfw3VkUitGcVCA== + dependencies: + streamsearch "0.1.2" + +diff@4.0.2: + version "4.0.2" + resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +dom-serializer@0: + version "0.2.2" + resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +dom-serializer@~0.1.0: + version "0.1.1" + resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" + integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== + dependencies: + domelementtype "^1.3.0" + entities "^1.1.1" + +dom-walk@^0.1.0: + version "0.1.2" + resolved "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== + +domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + +domelementtype@^2.0.1: + version "2.1.0" + resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz#a851c080a6d1c3d94344aed151d99f669edf585e" + integrity sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w== + +domhandler@2.3: + version "2.3.0" + resolved "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" + integrity sha1-LeWaCCLVAn+r/28DLCsloqir5zg= + dependencies: + domelementtype "1" + +domhandler@^2.3.0: + version "2.4.2" + resolved "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== + dependencies: + domelementtype "1" + +domutils@1.5, domutils@1.5.1: + version "1.5.1" + resolved "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= + dependencies: + dom-serializer "0" + domelementtype "1" + +domutils@^1.5.1: + version "1.7.0" + resolved "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== + dependencies: + dom-serializer "0" + domelementtype "1" + +dot-case@^2.1.0: + version "2.1.1" + resolved "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz#34dcf37f50a8e93c2b3bca8bb7fb9155c7da3bee" + integrity sha1-NNzzf1Co6TwrO8qLt/uRVcfaO+4= + dependencies: + no-case "^2.2.0" + +dot-prop@^4.1.0: + version "4.2.1" + resolved "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4" + integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ== + dependencies: + is-obj "^1.0.0" + +double-ended-queue@2.1.0-0: + version "2.1.0-0" + resolved "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz#103d3527fd31528f40188130c841efdd78264e5c" + integrity sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw= + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + +duplexify@^3.2.0: + version "3.7.1" + resolved "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +electron-to-chromium@^1.3.649: + version "1.3.687" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.687.tgz#c336184b7ab70427ffe2ee79eaeaedbc1ad8c374" + integrity sha512-IpzksdQNl3wdgkzf7dnA7/v10w0Utf1dF2L+B4+gKrloBrxCut+au+kky3PYvle3RMdSxZP+UiCZtLbcYRxSNQ== + +elliptic@6.5.3: + version "6.5.3" + resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" + integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: + version "6.5.4" + resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emittery@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/emittery/-/emittery-0.4.1.tgz#abe9d3297389ba424ac87e53d1c701962ce7433d" + integrity sha512-r4eRSeStEGf6M5SKdrQhhLK5bOwOBxQhIE3YSTnZE3GpKiLfnnhE+tPtrJE79+eDJgm39BM6LSoI8SCx4HbwlQ== + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +encoding-down@^6.3.0: + version "6.3.0" + resolved "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz#b1c4eb0e1728c146ecaef8e32963c549e76d082b" + integrity sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw== + dependencies: + abstract-leveldown "^6.2.1" + inherits "^2.0.3" + level-codec "^9.0.0" + level-errors "^2.0.0" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +end-stream@~0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/end-stream/-/end-stream-0.1.0.tgz#32003f3f438a2b0143168137f8fa6e9866c81ed5" + integrity sha1-MgA/P0OKKwFDFoE3+PpumGbIHtU= + dependencies: + write-stream "~0.4.3" + +enquirer@^2.3.5: + version "2.3.6" + resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +entities@1.0: + version "1.0.0" + resolved "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" + integrity sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY= + +entities@^1.1.1, entities@~1.1.1: + version "1.1.2" + resolved "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + +errno@~0.1.1: + version "0.1.8" + resolved "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + +error-ex@^1.2.0: + version "1.3.2" + resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.17.0-next.1, es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: + version "1.18.0" + resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz#ab80b359eecb7ede4c298000390bc5ac3ec7b5a4" + integrity sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.2" + is-callable "^1.2.3" + is-negative-zero "^2.0.1" + is-regex "^1.1.2" + is-string "^1.0.5" + object-inspect "^1.9.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.0" + +es-array-method-boxes-properly@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" + integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== + +es-get-iterator@^1.0.2: + version "1.1.2" + resolved "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.2.tgz#9234c54aba713486d7ebde0220864af5e2b283f7" + integrity sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.0" + has-symbols "^1.0.1" + is-arguments "^1.1.0" + is-map "^2.0.2" + is-set "^2.0.2" + is-string "^1.0.5" + isarray "^2.0.5" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.53" + resolved "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.3" + next-tick "~1.0.0" + +es6-denodeify@^0.1.1: + version "0.1.5" + resolved "https://registry.npmjs.org/es6-denodeify/-/es6-denodeify-0.1.5.tgz#31d4d5fe9c5503e125460439310e16a2a3f39c1f" + integrity sha1-MdTV/pxVA+ElRgQ5MQ4WoqPznB8= + +es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@1.0.3, escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escodegen@^1.6.1: + version "1.14.3" + resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" + integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== + dependencies: + esprima "^4.0.1" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +esdoc@^1.0.4: + version "1.1.0" + resolved "https://registry.npmjs.org/esdoc/-/esdoc-1.1.0.tgz#07d40ebf791764cd537929c29111e20a857624f3" + integrity sha512-vsUcp52XJkOWg9m1vDYplGZN2iDzvmjDL5M/Mp8qkoDG3p2s0yIQCIjKR5wfPBaM3eV14a6zhQNYiNTCVzPnxA== + dependencies: + babel-generator "6.26.1" + babel-traverse "6.26.0" + babylon "6.18.0" + cheerio "1.0.0-rc.2" + color-logger "0.0.6" + escape-html "1.0.3" + fs-extra "5.0.0" + ice-cap "0.0.4" + marked "0.3.19" + minimist "1.2.0" + taffydb "2.7.3" + +eslint-config-airbnb-base@^14.2.1: + version "14.2.1" + resolved "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" + integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== + dependencies: + confusing-browser-globals "^1.0.10" + object.assign "^4.1.2" + object.entries "^1.1.2" + +eslint-import-resolver-node@^0.3.4: + version "0.3.4" + resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" + integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== + dependencies: + debug "^2.6.9" + resolve "^1.13.1" + +eslint-module-utils@^2.6.0: + version "2.6.0" + resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6" + integrity sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA== + dependencies: + debug "^2.6.9" + pkg-dir "^2.0.0" + +eslint-plugin-import@^2.22.1: + version "2.22.1" + resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" + integrity sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw== + dependencies: + array-includes "^3.1.1" + array.prototype.flat "^1.2.3" + contains-path "^0.1.0" + debug "^2.6.9" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.4" + eslint-module-utils "^2.6.0" + has "^1.0.3" + minimatch "^3.0.4" + object.values "^1.1.1" + read-pkg-up "^2.0.0" + resolve "^1.17.0" + tsconfig-paths "^3.9.0" + +eslint-plugin-prettier@^3.3.1: + version "3.3.1" + resolved "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7" + integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-plugin-truffle@^0.3.1: + version "0.3.1" + resolved "https://registry.npmjs.org/eslint-plugin-truffle/-/eslint-plugin-truffle-0.3.1.tgz#78207a015c0ffa660794907748792b5f9301d3d9" + integrity sha512-mjDM1gD96UknBUSEufgdx5m1x3jkWL3Xn/npSZhOVoTbKk/nkBL7dCcH7xsO6GyAjmjvzdev5o5IA4lKWf9b4g== + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" + integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== + +eslint@^7.21.0: + version "7.21.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-7.21.0.tgz#4ecd5b8c5b44f5dedc9b8a110b01bbfeb15d1c83" + integrity sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash "^4.17.20" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.4" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" + +esprima@^4.0.0, esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1, estraverse@^4.2.0: + version "4.3.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +eth-ens-namehash@2.0.8: + version "2.0.8" + resolved "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" + integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= + dependencies: + idna-uts46-hx "^2.3.1" + js-sha3 "^0.5.7" + +eth-lib@0.2.7: + version "0.2.7" + resolved "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz#2f93f17b1e23aec3759cd4a3fe20c1286a3fc1ca" + integrity sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco= + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +eth-lib@^0.1.26: + version "0.1.29" + resolved "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" + integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + nano-json-stream-parser "^0.1.2" + servify "^0.1.12" + ws "^3.0.0" + xhr-request-promise "^0.1.2" + +eth-lib@^0.2.8: + version "0.2.8" + resolved "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" + integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +ethereum-bloom-filters@^1.0.6: + version "1.0.9" + resolved "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.9.tgz#4a59dead803af0c9e33834170bd7695df67061ec" + integrity sha512-GiK/RQkAkcVaEdxKVkPcG07PQ5vD7v2MFSHgZmBJSfMzNRHimntdBithsHAT89tAXnIpzVDWt8iaCD1DvkaxGg== + dependencies: + js-sha3 "^0.8.0" + +ethereum-cryptography@^0.1.3: + version "0.1.3" + resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" + integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + dependencies: + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^4.0.1" + blakejs "^1.1.0" + browserify-aes "^1.2.0" + bs58check "^2.1.2" + create-hash "^1.2.0" + create-hmac "^1.1.7" + hash.js "^1.1.7" + keccak "^3.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + safe-buffer "^5.1.2" + scrypt-js "^3.0.0" + secp256k1 "^4.0.1" + setimmediate "^1.0.5" + +ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: + version "1.5.2" + resolved "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz#2065dbe9214e850f2e955a80e650cb6999066979" + integrity sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA== + +ethereumjs-tx@^2.1.1: + version "2.1.2" + resolved "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" + integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== + dependencies: + ethereumjs-common "^1.5.0" + ethereumjs-util "^6.0.0" + +ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0: + version "6.2.1" + resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + +ethers@^4.0.32: + version "4.0.48" + resolved "https://registry.npmjs.org/ethers/-/ethers-4.0.48.tgz#330c65b8133e112b0613156e57e92d9009d8fbbe" + integrity sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g== + dependencies: + aes-js "3.0.0" + bn.js "^4.4.0" + elliptic "6.5.3" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.4" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" + +ethjs-unit@0.1.6: + version "0.1.6" + resolved "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" + integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= + dependencies: + bn.js "4.11.6" + number-to-bn "1.7.0" + +ethjs-util@0.1.6: + version "0.1.6" + resolved "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +eventemitter3@3.1.2, eventemitter3@^3.1.0: + version "3.1.2" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== + +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +eventsource@1.0.7: + version "1.0.7" + resolved "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0" + integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ== + dependencies: + original "^1.0.0" + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= + dependencies: + fill-range "^2.1.0" + +express@^4.0.0, express@^4.14.0, express@^4.17.1: + version "4.17.1" + resolved "https://registry.npmjs.org/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +ext@^1.1.2: + version "1.4.0" + resolved "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" + integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + dependencies: + type "^2.0.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend@^3.0.0, extend@~3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= + dependencies: + is-extglob "^1.0.0" + +extract-files@9.0.0, extract-files@^9.0.0: + version "9.0.0" + resolved "https://registry.npmjs.org/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" + integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +faker@^5.3.1: + version "5.4.0" + resolved "https://registry.npmjs.org/faker/-/faker-5.4.0.tgz#f18e55993c6887918182b003d163df14daeb3011" + integrity sha512-Y9n/Ky/xZx/Bj8DePvXspUYRtHl/rGQytoIT5LaxmNwSe3wWyOeOXb3lT6Dpipq240PVpeFaGKzScz/5fvff2g== + +fast-check@^2.12.1: + version "2.13.0" + resolved "https://registry.npmjs.org/fast-check/-/fast-check-2.13.0.tgz#92a50a6a39b58760d4b0b52b12f98f28a9f020f6" + integrity sha512-IOfzKm/SCA+jpUEgAfqAuxHYPmgtmpnnwljQmYPRGrqYczcTKApXKHza/SNxFxYkecWfZilYa0DJdBvqz1bcSw== + dependencies: + pure-rand "^4.1.1" + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + +fast-future@~1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/fast-future/-/fast-future-1.0.2.tgz#8435a9aaa02d79248d17d704e76259301d99280a" + integrity sha1-hDWpqqAteSSNF9cE52JZMB2ZKAo= + +fast-glob@^3.1.1: + version "3.2.5" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" + integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + picomatch "^2.2.1" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +fastq@^1.6.0: + version "1.11.0" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858" + integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g== + dependencies: + reusify "^1.0.4" + +fb-watchman@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85" + integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== + dependencies: + bser "2.1.1" + +fbjs-css-vars@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz#216551136ae02fe255932c3ec8775f18e2c078b8" + integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ== + +fbjs@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/fbjs/-/fbjs-3.0.0.tgz#0907067fb3f57a78f45d95f1eacffcacd623c165" + integrity sha512-dJd4PiDOFuhe7vk4F80Mba83Vr2QuK86FoxtgPmzBqEJahncp+13YCmfoa53KHCo6OnlXLG7eeMWPfB5CrpVKg== + dependencies: + cross-fetch "^3.0.4" + fbjs-css-vars "^1.0.0" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.18" + +fetch-cookie@0.10.1: + version "0.10.1" + resolved "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-0.10.1.tgz#5ea88f3d36950543c87997c27ae2aeafb4b5c4d4" + integrity sha512-beB+VEd4cNeVG1PY+ee74+PkuCQnik78pgLi5Ah/7qdUfov8IctU0vLUbBT8/10Ma5GMBeI4wtxhGrEfKNYs2g== + dependencies: + tough-cookie "^2.3.3 || ^3.0.1 || ^4.0.0" + +fetch-cookie@0.7.0: + version "0.7.0" + resolved "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-0.7.0.tgz#a6fc137ad8363aa89125864c6451b86ecb7de802" + integrity sha512-Mm5pGlT3agW6t71xVM7vMZPIvI7T4FaTuFW4jari6dVzYHFDb3WZZsGpN22r/o3XMdkM0E7sPd1EGeyVbH2Tgg== + dependencies: + es6-denodeify "^0.1.1" + tough-cookie "^2.3.1" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +first-chunk-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" + integrity sha1-Wb+1DNkF9g18OUzT2ayqtOatk04= + +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flat@^4.1.0: + version "4.1.1" + resolved "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" + integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== + dependencies: + is-buffer "~2.0.3" + +flatted@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" + integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= + dependencies: + for-in "^1.0.1" + +foreach@^2.0.4: + version "2.0.5" + resolved "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" + integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +fs-capacitor@^2.0.4: + version "2.0.4" + resolved "https://registry.npmjs.org/fs-capacitor/-/fs-capacitor-2.0.4.tgz#5a22e72d40ae5078b4fe64fe4d08c0d3fc88ad3c" + integrity sha512-8S4f4WsCryNw2mJJchi46YgB6CR5Ze+4L1h8ewl9tEpL4SJ3ZO+c/bS4BWhB8bK+O3TMqhuZarTitd0S0eh2pA== + +fs-capacitor@^6.1.0: + version "6.2.0" + resolved "https://registry.npmjs.org/fs-capacitor/-/fs-capacitor-6.2.0.tgz#fa79ac6576629163cb84561995602d8999afb7f5" + integrity sha512-nKcE1UduoSKX27NSZlg879LdQc94OtbOsEmKMN2MBNudXREvijRKx2GEBsTMTfws+BrbkJoEuynbGSVRSpauvw== + +fs-extra@5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" + integrity sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^4.0.2: + version "4.0.3" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@~2.1.2: + version "2.1.3" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +ganache-cli@^6.12.2: + version "6.12.2" + resolved "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.12.2.tgz#c0920f7db0d4ac062ffe2375cb004089806f627a" + integrity sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw== + dependencies: + ethereumjs-util "6.2.1" + source-map-support "0.5.12" + yargs "13.2.4" + +ganache@^6.4.4: + version "6.4.4" + resolved "https://registry.npmjs.org/ganache/-/ganache-6.4.4.tgz#efb3eb5157b8987e5213584f24090322827c3521" + integrity sha512-uBCxKuyj1SSjz/iONMk1ZiHr1wf0bPG5E+qSO2lxyDq+dtZ5d/VvW6iKtg9bWikhG8hd1jU7kRkoS5f4q7FrWQ== + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + +get-params@^0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/get-params/-/get-params-0.1.2.tgz#bae0dfaba588a0c60d7834c0d8dc2ff60eeef2fe" + integrity sha1-uuDfq6WIoMYNeDTA2Nwv9g7u8v4= + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-stream@^4.0.0, get-stream@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= + dependencies: + is-glob "^2.0.0" + +glob-parent@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0: + version "5.1.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-stream@^5.3.2: + version "5.3.5" + resolved "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz#a55665a9a8ccdc41915a87c701e32d4e016fad22" + integrity sha1-pVZlqajM3EGRWofHAeMtTgFvrSI= + dependencies: + extend "^3.0.0" + glob "^5.0.3" + glob-parent "^3.0.0" + micromatch "^2.3.7" + ordered-read-streams "^0.3.0" + through2 "^0.6.0" + to-absolute-glob "^0.1.1" + unique-stream "^2.0.2" + +glob@7.1.6, glob@^7.1.1, glob@^7.1.3: + version "7.1.6" + resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^5.0.3: + version "5.0.15" + resolved "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global@~4.4.0: + version "4.4.0" + resolved "https://registry.npmjs.org/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== + dependencies: + min-document "^2.19.0" + process "^0.11.10" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globals@^12.1.0: + version "12.4.0" + resolved "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" + integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== + dependencies: + type-fest "^0.8.1" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== + +globby@11.0.2: + version "11.0.2" + resolved "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83" + integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" + +got@9.6.0: + version "9.6.0" + resolved "https://registry.npmjs.org/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" + url-parse-lax "^3.0.0" + +got@^7.1.0: + version "7.1.0" + resolved "https://registry.npmjs.org/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" + integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== + dependencies: + decompress-response "^3.2.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + is-plain-obj "^1.1.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + p-cancelable "^0.3.0" + p-timeout "^1.1.1" + safe-buffer "^5.0.1" + timed-out "^4.0.0" + url-parse-lax "^1.0.0" + url-to-options "^1.0.1" + +graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.6" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" + integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== + +graphql-extensions@^0.12.8: + version "0.12.8" + resolved "https://registry.npmjs.org/graphql-extensions/-/graphql-extensions-0.12.8.tgz#9cdc2c43d8fe5e0f6c3177a004ac011da2a8aa0f" + integrity sha512-xjsSaB6yKt9jarFNNdivl2VOx52WySYhxPgf8Y16g6GKZyAzBoIFiwyGw5PJDlOSUa6cpmzn6o7z8fVMbSAbkg== + dependencies: + "@apollographql/apollo-tools" "^0.4.3" + apollo-server-env "^3.0.0" + apollo-server-types "^0.6.3" + +graphql-subscriptions@^1.0.0: + version "1.2.1" + resolved "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-1.2.1.tgz#2142b2d729661ddf967b7388f7cf1dd4cf2e061d" + integrity sha512-95yD/tKi24q8xYa7Q9rhQN16AYj5wPbrb8tmHGM3WRc9EBmWrG/0kkMl+tQG8wcEuE9ibR4zyOM31p5Sdr2v4g== + dependencies: + iterall "^1.3.0" + +graphql-tag@^2.11.0: + version "2.11.0" + resolved "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.11.0.tgz#1deb53a01c46a7eb401d6cb59dec86fa1cccbffd" + integrity sha512-VmsD5pJqWJnQZMUeRwrDhfgoyqcfwEkvtpANqcoUG8/tOLkwNgU9mzub/Mc78OJMhHjx7gfAMTxzdG43VGg3bA== + +graphql-tag@^2.12.0: + version "2.12.1" + resolved "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.1.tgz#b065ef885e4800e4afd0842811b718a205f4aa58" + integrity sha512-LPewEE1vzGkHnCO8zdOGogKsHHBdtpGyihow1UuMwp6RnZa0lAS7NcbvltLOuo4pi5diQCPASAXZkQq44ffixA== + dependencies: + tslib "^1.14.1" + +graphql-tools@^4.0.8: + version "4.0.8" + resolved "https://registry.npmjs.org/graphql-tools/-/graphql-tools-4.0.8.tgz#e7fb9f0d43408fb0878ba66b522ce871bafe9d30" + integrity sha512-MW+ioleBrwhRjalKjYaLQbr+920pHBgy9vM/n47sswtns8+96sRn5M/G+J1eu7IMeKWiN/9p6tmwCHU7552VJg== + dependencies: + apollo-link "^1.2.14" + apollo-utilities "^1.0.1" + deprecated-decorator "^0.1.6" + iterall "^1.1.3" + uuid "^3.1.0" + +graphql-tools@^6.2.4: + version "6.2.6" + resolved "https://registry.npmjs.org/graphql-tools/-/graphql-tools-6.2.6.tgz#557c6d32797a02988f214bd596dec2abd12425dd" + integrity sha512-OyhSvK5ALVVD6bFiWjAqv2+lRyvjIRfb6Br5Tkjrv++rxnXDodPH/zhMbDGRw+W3SD5ioGEEz84yO48iPiN7jA== + dependencies: + "@graphql-tools/batch-delegate" "^6.2.6" + "@graphql-tools/code-file-loader" "^6.2.4" + "@graphql-tools/delegate" "^6.2.4" + "@graphql-tools/git-loader" "^6.2.4" + "@graphql-tools/github-loader" "^6.2.4" + "@graphql-tools/graphql-file-loader" "^6.2.4" + "@graphql-tools/graphql-tag-pluck" "^6.2.4" + "@graphql-tools/import" "^6.2.4" + "@graphql-tools/json-file-loader" "^6.2.4" + "@graphql-tools/links" "^6.2.4" + "@graphql-tools/load" "^6.2.4" + "@graphql-tools/load-files" "^6.2.4" + "@graphql-tools/merge" "^6.2.4" + "@graphql-tools/mock" "^6.2.4" + "@graphql-tools/module-loader" "^6.2.4" + "@graphql-tools/relay-operation-optimizer" "^6.2.4" + "@graphql-tools/resolvers-composition" "^6.2.4" + "@graphql-tools/schema" "^6.2.4" + "@graphql-tools/stitch" "^6.2.4" + "@graphql-tools/url-loader" "^6.2.4" + "@graphql-tools/utils" "^6.2.4" + "@graphql-tools/wrap" "^6.2.4" + tslib "~2.0.1" + +graphql-upload@^11.0.0: + version "11.0.0" + resolved "https://registry.npmjs.org/graphql-upload/-/graphql-upload-11.0.0.tgz#24b245ff18f353bab6715e8a055db9fd73035e10" + integrity sha512-zsrDtu5gCbQFDWsNa5bMB4nf1LpKX9KDgh+f8oL1288ijV4RxeckhVozAjqjXAfRpxOHD1xOESsh6zq8SjdgjA== + dependencies: + busboy "^0.3.1" + fs-capacitor "^6.1.0" + http-errors "^1.7.3" + isobject "^4.0.0" + object-path "^0.11.4" + +graphql-ws@4.1.5: + version "4.1.5" + resolved "https://registry.npmjs.org/graphql-ws/-/graphql-ws-4.1.5.tgz#03526b29acb54a424a9fbe300a4bd69ff65a50b3" + integrity sha512-yUQ1AjegD1Y9jDS699kyw7Mw+9H+rILm2HoS8N5a5B5YTH93xy3yifFhAJpKGc2wb/8yGdlVy8gTcud0TPqi6Q== + +graphql@^15.3.0: + version "15.5.0" + resolved "https://registry.npmjs.org/graphql/-/graphql-15.5.0.tgz#39d19494dbe69d1ea719915b578bf920344a69d5" + integrity sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA== + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +gulp-sourcemaps@^1.5.2: + version "1.12.1" + resolved "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.12.1.tgz#b437d1f3d980cf26e81184823718ce15ae6597b6" + integrity sha1-tDfR89mAzyboEYSCNxjOFa5ll7Y= + dependencies: + "@gulp-sourcemaps/map-sources" "1.X" + acorn "4.X" + convert-source-map "1.X" + css "2.X" + debug-fabulous "0.0.X" + detect-newline "2.X" + graceful-fs "4.X" + source-map "~0.6.0" + strip-bom "2.X" + through2 "2.X" + vinyl "1.X" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + +has-bigints@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbol-support-x@^1.4.1: + version "1.4.2" + resolved "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" + integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== + +has-symbols@^1.0.0, has-symbols@^1.0.1, has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + +has-to-string-tag-x@^1.2.0: + version "1.4.1" + resolved "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" + integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== + dependencies: + has-symbol-support-x "^1.4.1" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +header-case@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz#9535973197c144b09613cd65d317ef19963bd02d" + integrity sha1-lTWXMZfBRLCWE81l0xfvGZY70C0= + dependencies: + no-case "^2.2.0" + upper-case "^1.1.3" + +hmac-drbg@^1.0.0, hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoist-non-react-statics@^3.3.2: + version "3.3.2" + resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + +hosted-git-info@^2.1.4: + version "2.8.8" + resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" + integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== + +htmlparser2@^3.9.1: + version "3.10.1" + resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" + integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== + dependencies: + domelementtype "^1.3.1" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^3.1.1" + +htmlparser2@~3.8.1: + version "3.8.3" + resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068" + integrity sha1-mWwosZFRaovoZQGn15dX5ccMEGg= + dependencies: + domelementtype "1" + domhandler "2.3" + domutils "1.5" + entities "1.0" + readable-stream "1.1" + +http-cache-semantics@^4.0.0: + version "4.1.0" + resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" + integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@^1.7.3: + version "1.8.0" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.8.0.tgz#75d1bbe497e1044f51e4ee9e704a62f28d336507" + integrity sha512-4I8r0C5JDhT5VkvI47QktDW75rNlGVsUf/8hzjCC/wkWI/jdTRmBb9aI7erSG82r1bjKY3F6k28WnsVxB1C73A== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-https@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" + integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +ice-cap@0.0.4: + version "0.0.4" + resolved "https://registry.npmjs.org/ice-cap/-/ice-cap-0.0.4.tgz#8a6d31ab4cac8d4b56de4fa946df3352561b6e18" + integrity sha1-im0xq0ysjUtW3k+pRt8zUlYbbhg= + dependencies: + cheerio "0.20.0" + color-logger "0.0.3" + +iconv-lite@0.4.24, iconv-lite@^0.4.4: + version "0.4.24" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +idna-uts46-hx@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" + integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== + dependencies: + punycode "2.1.0" + +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore-walk@^3.0.1: + version "3.0.3" + resolved "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" + integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== + dependencies: + minimatch "^3.0.4" + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +ignore@^5.1.4: + version "5.1.8" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== + +immediate@3.0.6: + version "3.0.6" + resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= + +immediate@3.3.0, immediate@^3.2.2, immediate@^3.2.3: + version "3.3.0" + resolved "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" + integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== + +immediate@~3.2.3: + version "3.2.3" + resolved "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" + integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= + +immutable@~3.7.6: + version "3.7.6" + resolved "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz#13b4d3cb12befa15482a26fe1b2ebae640071e4b" + integrity sha1-E7TTyxK++hVIKib+Gy665kAHHks= + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +import-from@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966" + integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ== + dependencies: + resolve-from "^5.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ini@~1.3.0: + version "1.3.8" + resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-arguments@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" + integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + dependencies: + call-bind "^1.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-bigint@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz#6923051dfcbc764278540b9ce0e6b3213aa5ebc2" + integrity sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz#e2aaad3a3a8fca34c28f6eee135b156ed2587ff0" + integrity sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA== + dependencies: + call-bind "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-buffer@~2.0.3: + version "2.0.5" + resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.3: + version "1.2.3" + resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" + integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== + +is-core-module@^2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + dependencies: + has "^1.0.3" + +is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-finite@^1.0.0: + version "1.1.0" + resolved "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" + integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-function@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== + +is-glob@4.0.1, is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= + dependencies: + is-extglob "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= + +is-lower-case@^1.1.0: + version "1.1.3" + resolved "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" + integrity sha1-fhR75HaNxGbbO/shzGCzHmrWk5M= + dependencies: + lower-case "^1.1.0" + +is-map@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" + integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== + +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + +is-number-object@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" + integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= + +is-object@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" + integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== + +is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= + +is-promise@4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz#42ff9f84206c1991d26debf520dd5c01042dd2f3" + integrity sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ== + +is-regex@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz#81c8ebde4db142f2cf1c53fc86d6a45788266251" + integrity sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg== + dependencies: + call-bind "^1.0.2" + has-symbols "^1.0.1" + +is-retry-allowed@^1.0.0: + version "1.2.0" + resolved "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + +is-set@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" + integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== + +is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" + integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + +is-typedarray@^1.0.0, is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-upper-case@^1.1.0: + version "1.1.2" + resolved "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" + integrity sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8= + dependencies: + upper-case "^1.1.0" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + +is-valid-glob@^0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz#d4b55c69f51886f9b65c70d6c2622d37e29f48fe" + integrity sha1-1LVcafUYhvm2XHDWwmItN+KfSP4= + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0" + integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== + +isomorphic-ws@4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" + integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +isurl@^1.0.0-alpha5: + version "1.0.0" + resolved "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" + integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== + dependencies: + has-to-string-tag-x "^1.2.0" + is-object "^1.0.1" + +iterall@^1.1.3, iterall@^1.2.1, iterall@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" + integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== + +iterate-iterator@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz#1693a768c1ddd79c969051459453f082fe82e9f6" + integrity sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw== + +iterate-value@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz#935115bd37d006a52046535ebc8d07e9c9337f57" + integrity sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ== + dependencies: + es-get-iterator "^1.0.2" + iterate-iterator "^1.0.1" + +js-sha3@0.5.7, js-sha3@^0.5.7: + version "0.5.7" + resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" + integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= + +js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + +js-yaml@3.14.0: + version "3.14.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsan@^3.1.13: + version "3.1.13" + resolved "https://registry.npmjs.org/jsan/-/jsan-3.1.13.tgz#4de8c7bf8d1cfcd020c313d438f930cec4b91d86" + integrity sha512-9kGpCsGHifmw6oJet+y8HaCl14y7qgAsxVdV3pCHDySNR3BfDC30zgkssd7x5LRVAT22dnpbe9JdzzmXZnq9/g== + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsdom@^7.0.2: + version "7.2.2" + resolved "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz#40b402770c2bda23469096bee91ab675e3b1fc6e" + integrity sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4= + dependencies: + abab "^1.0.0" + acorn "^2.4.0" + acorn-globals "^1.0.4" + cssom ">= 0.3.0 < 0.4.0" + cssstyle ">= 0.2.29 < 0.3.0" + escodegen "^1.6.1" + nwmatcher ">= 1.3.7 < 2.0.0" + parse5 "^1.5.1" + request "^2.55.0" + sax "^1.1.4" + symbol-tree ">= 3.1.0 < 4.0.0" + tough-cookie "^2.2.0" + webidl-conversions "^2.0.0" + whatwg-url-compat "~0.6.5" + xml-name-validator ">= 2.0.1 < 3.0.0" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + +json-pointer@^0.6.0: + version "0.6.1" + resolved "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.1.tgz#3c6caa6ac139e2599f5a1659d39852154015054d" + integrity sha512-3OvjqKdCBvH41DLpV4iSt6v2XhZXV1bPB4OROuknvUXI7ZQNofieCPkmE26stEJ9zdQuvIxDHCuYhfgxFAAs+Q== + dependencies: + foreach "^2.0.4" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +json5@^2.1.2: + version "2.2.0" + resolved "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== + dependencies: + minimist "^1.2.5" + +jsondown@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/jsondown/-/jsondown-1.0.0.tgz#c5cc5cda65f515d2376136a104b5f535534f26e3" + integrity sha512-p6XxPaq59aXwcdDQV3ISMA5xk+1z6fJuctcwwSdR9iQgbYOcIrnknNrhcMGG+0FaUfKHGkdDpQNaZrovfBoyOw== + dependencies: + memdown "1.4.1" + mkdirp "0.5.1" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +keccak@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff" + integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +keyv@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + dependencies: + json-buffer "3.0.0" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^6.0.0: + version "6.0.3" + resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +lazy-debug-legacy@0.0.X: + version "0.0.1" + resolved "https://registry.npmjs.org/lazy-debug-legacy/-/lazy-debug-legacy-0.0.1.tgz#537716c0776e4cf79e3ed1b621f7658c2911b1b1" + integrity sha1-U3cWwHduTPeePtG2IfdljCkRsbE= + +lazystream@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" + integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= + dependencies: + readable-stream "^2.0.5" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + dependencies: + invert-kv "^1.0.0" + +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + +level-codec@9.0.1: + version "9.0.1" + resolved "https://registry.npmjs.org/level-codec/-/level-codec-9.0.1.tgz#042f4aa85e56d4328ace368c950811ba802b7247" + integrity sha512-ajFP0kJ+nyq4i6kptSM+mAvJKLOg1X5FiFPtLG9M5gCEZyBmgDi3FkDrvlMkEzrUn1cWxtvVmrvoS4ASyO/q+Q== + +level-codec@9.0.2, level-codec@^9.0.0: + version "9.0.2" + resolved "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz#fd60df8c64786a80d44e63423096ffead63d8cbc" + integrity sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ== + dependencies: + buffer "^5.6.0" + +level-concat-iterator@~2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz#1d1009cf108340252cb38c51f9727311193e6263" + integrity sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw== + +level-errors@^2.0.0, level-errors@~2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8" + integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== + dependencies: + errno "~0.1.1" + +level-iterator-stream@~4.0.0: + version "4.0.2" + resolved "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz#7ceba69b713b0d7e22fcc0d1f128ccdc8a24f79c" + integrity sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q== + dependencies: + inherits "^2.0.4" + readable-stream "^3.4.0" + xtend "^4.0.2" + +level-js@^4.0.0: + version "4.0.2" + resolved "https://registry.npmjs.org/level-js/-/level-js-4.0.2.tgz#fa51527fa38b87c4d111b0d0334de47fcda38f21" + integrity sha512-PeGjZsyMG4O89KHiez1zoMJxStnkM+oBIqgACjoo5PJqFiSUUm3GNod/KcbqN5ktyZa8jkG7I1T0P2u6HN9lIg== + dependencies: + abstract-leveldown "~6.0.1" + immediate "~3.2.3" + inherits "^2.0.3" + ltgt "^2.1.2" + typedarray-to-buffer "~3.1.5" + +level-packager@^5.0.0: + version "5.1.1" + resolved "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz#323ec842d6babe7336f70299c14df2e329c18939" + integrity sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ== + dependencies: + encoding-down "^6.3.0" + levelup "^4.3.2" + +level-supports@~1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz#2f530a596834c7301622521988e2c36bb77d122d" + integrity sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg== + dependencies: + xtend "^4.0.2" + +level-write-stream@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/level-write-stream/-/level-write-stream-1.0.0.tgz#3f7fbb679a55137c0feb303dee766e12ee13c1dc" + integrity sha1-P3+7Z5pVE3wP6zA97nZuEu4Twdw= + dependencies: + end-stream "~0.1.0" + +level@5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/level/-/level-5.0.1.tgz#8528cc1ee37ac413270129a1eab938c610be3ccb" + integrity sha512-wcak5OQeA4rURGacqS62R/xNHjCYnJSQDBOlm4KNUGJVE9bWv2B04TclqReYejN+oD65PzD4FsqeWoI5wNC5Lg== + dependencies: + level-js "^4.0.0" + level-packager "^5.0.0" + leveldown "^5.0.0" + opencollective-postinstall "^2.0.0" + +leveldown@5.0.2: + version "5.0.2" + resolved "https://registry.npmjs.org/leveldown/-/leveldown-5.0.2.tgz#c8edc2308c8abf893ffc81e66ab6536111cae92c" + integrity sha512-Ib6ygFYBleS8x2gh3C1AkVsdrUShqXpe6jSTnZ6sRycEXKhqVf+xOSkhgSnjidpPzyv0d95LJVFrYQ4NuXAqHA== + dependencies: + abstract-leveldown "~6.0.0" + fast-future "~1.0.2" + napi-macros "~1.8.1" + node-gyp-build "~3.8.0" + +leveldown@^5.0.0: + version "5.6.0" + resolved "https://registry.npmjs.org/leveldown/-/leveldown-5.6.0.tgz#16ba937bb2991c6094e13ac5a6898ee66d3eee98" + integrity sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ== + dependencies: + abstract-leveldown "~6.2.1" + napi-macros "~2.0.0" + node-gyp-build "~4.1.0" + +levelup@4.0.2: + version "4.0.2" + resolved "https://registry.npmjs.org/levelup/-/levelup-4.0.2.tgz#bcb8d28d0a82ee97f1c6d00f20ea6d32c2803c5b" + integrity sha512-cx9PmLENwbGA3svWBEbeO2HazpOSOYSXH4VA+ahVpYyurvD+SDSfURl29VBY2qgyk+Vfy2dJd71SBRckj/EZVA== + dependencies: + deferred-leveldown "~5.0.0" + level-errors "~2.0.0" + level-iterator-stream "~4.0.0" + xtend "~4.0.0" + +levelup@4.4.0, levelup@^4.3.2: + version "4.4.0" + resolved "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz#f89da3a228c38deb49c48f88a70fb71f01cafed6" + integrity sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ== + dependencies: + deferred-leveldown "~5.3.0" + level-errors "~2.0.0" + level-iterator-stream "~4.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +linked-list@0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/linked-list/-/linked-list-0.1.0.tgz#798b0ff97d1b92a4fd08480f55aea4e9d49d37bf" + integrity sha1-eYsP+X0bkqT9CEgPVa6k6dSdN78= + +load-json-file@^1.0.0, load-json-file@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash-es@^4.2.1: + version "4.17.21" + resolved "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" + integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== + +lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= + +lodash.assign@^4.0.3, lodash.assign@^4.0.6: + version "4.2.0" + resolved "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= + +lodash.assignin@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" + integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= + +lodash.assigninwith@^4.0.0: + version "4.2.0" + resolved "https://registry.npmjs.org/lodash.assigninwith/-/lodash.assigninwith-4.2.0.tgz#af02c98432ac86d93da695b4be801401971736af" + integrity sha1-rwLJhDKshtk9ppW0voAUAZcXNq8= + +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= + +lodash.escaperegexp@^4.1.2: + version "4.1.2" + resolved "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347" + integrity sha1-ZHYsSGGAglGKw99Mz11YhtriA0c= + +lodash.flatten@^4.4.0: + version "4.4.0" + resolved "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= + +lodash.isequal@^4.0.0: + version "4.5.0" + resolved "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + +lodash.keys@^4.0.0: + version "4.2.0" + resolved "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.2.0.tgz#a08602ac12e4fb83f91fc1fb7a360a4d9ba35205" + integrity sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU= + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.partition@^4.6.0: + version "4.6.0" + resolved "https://registry.npmjs.org/lodash.partition/-/lodash.partition-4.6.0.tgz#a38e46b73469e0420b0da1212e66d414be364ba4" + integrity sha1-o45GtzRp4EILDaEhLmbUFL42S6Q= + +lodash.rest@^4.0.0: + version "4.0.5" + resolved "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.5.tgz#954ef75049262038c96d1fc98b28fdaf9f0772aa" + integrity sha1-lU73UEkmIDjJbR/Jiyj9r58Hcqo= + +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + +lodash.sum@^4.0.2: + version "4.0.2" + resolved "https://registry.npmjs.org/lodash.sum/-/lodash.sum-4.0.2.tgz#ad90e397965d803d4f1ff7aa5b2d0197f3b4637b" + integrity sha1-rZDjl5ZdgD1PH/eqWy0Bl/O0Y3s= + +lodash.template@4.2.4: + version "4.2.4" + resolved "https://registry.npmjs.org/lodash.template/-/lodash.template-4.2.4.tgz#d053c19e8e74e38d965bf4fb495d80f109e7f7a4" + integrity sha1-0FPBno50442WW/T7SV2A8Qnn96Q= + dependencies: + lodash._reinterpolate "~3.0.0" + lodash.assigninwith "^4.0.0" + lodash.keys "^4.0.0" + lodash.rest "^4.0.0" + lodash.templatesettings "^4.0.0" + lodash.tostring "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + +lodash.tostring@^4.0.0: + version "4.1.4" + resolved "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.4.tgz#560c27d1f8eadde03c2cce198fef5c031d8298fb" + integrity sha1-Vgwn0fjq3eA8LM4Zj+9cAx2CmPs= + +lodash.zipwith@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/lodash.zipwith/-/lodash.zipwith-4.2.0.tgz#afacf03fd2f384af29e263c3c6bda3b80e3f51fd" + integrity sha1-r6zwP9LzhK8p4mPDxr2juA4/Uf0= + +lodash@4.17.21, lodash@^4.1.0, lodash@^4.15.0, lodash@^4.17.11, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.4, lodash@^4.2.1: + version "4.17.21" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" + integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== + dependencies: + chalk "^4.0.0" + +log-symbols@^2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== + dependencies: + chalk "^2.0.1" + +loglevel@^1.6.7: + version "1.7.1" + resolved "https://registry.npmjs.org/loglevel/-/loglevel-1.7.1.tgz#005fde2f5e6e47068f935ff28573e125ef72f197" + integrity sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw== + +long@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== + +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lower-case-first@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz#e5da7c26f29a7073be02d52bac9980e5922adfa1" + integrity sha1-5dp8JvKacHO+AtUrrJmA5ZIq36E= + dependencies: + lower-case "^1.1.2" + +lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: + version "1.1.4" + resolved "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= + +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + +lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +ltgt@2.2.1, ltgt@^2.1.2, ltgt@~2.2.0: + version "2.2.1" + resolved "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + +make-dir@^1.0.0: + version "1.3.0" + resolved "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== + dependencies: + pify "^3.0.0" + +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + +map-stream@0.0.6: + version "0.0.6" + resolved "https://registry.npmjs.org/map-stream/-/map-stream-0.0.6.tgz#d2ef4eb811a28644c7a8989985c69c2fdd496827" + integrity sha1-0u9OuBGihkTHqJiZhcacL91JaCc= + +marked@0.3.19: + version "0.3.19" + resolved "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790" + integrity sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg== + +math-random@^1.0.1: + version "1.0.4" + resolved "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" + integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + +memdown@1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" + integrity sha1-tOThkhdGZP+65BNhqlAPMRnv4hU= + dependencies: + abstract-leveldown "~2.7.1" + functional-red-black-tree "^1.0.1" + immediate "^3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.1.1" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +merge-stream@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= + dependencies: + readable-stream "^2.0.1" + +merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@^2.3.7: + version "2.3.11" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.46.0: + version "1.46.0" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee" + integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ== + +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.29" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2" + integrity sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ== + dependencies: + mime-db "1.46.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +mimic-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +mimic-response@^1.0.0, mimic-response@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= + dependencies: + dom-walk "^0.1.0" + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.2.1: + version "1.3.3" + resolved "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +mkdirp-promise@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" + integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= + dependencies: + mkdirp "*" + +mkdirp@*: + version "1.0.4" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mkdirp@0.5.1: + version "0.5.1" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.5" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mocha@8.1.2: + version "8.1.2" + resolved "https://registry.npmjs.org/mocha/-/mocha-8.1.2.tgz#d67fad13300e4f5cd48135a935ea566f96caf827" + integrity sha512-I8FRAcuACNMLQn3lS4qeWLxXqLvGf6r2CaLstDpZmMUUSmvW6Cnm1AuHxgbc7ctZVRcfwspCRbDHymPsi3dkJw== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.4.2" + debug "4.1.1" + diff "4.0.2" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.1.6" + growl "1.10.5" + he "1.2.0" + js-yaml "3.14.0" + log-symbols "4.0.0" + minimatch "3.0.4" + ms "2.1.2" + object.assign "4.1.0" + promise.allsettled "1.0.2" + serialize-javascript "4.0.0" + strip-json-comments "3.0.1" + supports-color "7.1.0" + which "2.0.2" + wide-align "1.1.3" + workerpool "6.0.0" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.1" + +mock-fs@^4.1.0: + version "4.13.0" + resolved "https://registry.npmjs.org/mock-fs/-/mock-fs-4.13.0.tgz#31c02263673ec3789f90eb7b6963676aa407a598" + integrity sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA== + +module@^1.2.5: + version "1.2.5" + resolved "https://registry.npmjs.org/module/-/module-1.2.5.tgz#b503eb06cdc13473f56818426974cde7ec59bf15" + integrity sha1-tQPrBs3BNHP1aBhCaXTN5+xZvxU= + dependencies: + chalk "1.1.3" + concat-stream "1.5.1" + lodash.template "4.2.4" + map-stream "0.0.6" + tildify "1.2.0" + vinyl-fs "2.4.3" + yargs "4.6.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multibase@^0.7.0: + version "0.7.0" + resolved "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" + integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multibase@~0.6.0: + version "0.6.1" + resolved "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" + integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multicodec@^0.5.5: + version "0.5.7" + resolved "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" + integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== + dependencies: + varint "^5.0.0" + +multicodec@^1.0.0: + version "1.0.4" + resolved "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" + integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== + dependencies: + buffer "^5.6.0" + varint "^5.0.0" + +multihashes@^0.4.15, multihashes@~0.4.15: + version "0.4.21" + resolved "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" + integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== + dependencies: + buffer "^5.5.0" + multibase "^0.7.0" + varint "^5.0.0" + +nan@^2.12.1: + version "2.14.2" + resolved "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" + integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== + +nano-json-stream-parser@^0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" + integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= + +nanoid@^2.0.0: + version "2.1.11" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" + integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== + +napi-macros@~1.8.1: + version "1.8.2" + resolved "https://registry.npmjs.org/napi-macros/-/napi-macros-1.8.2.tgz#299265c1d8aa401351ad0675107d751228c03eda" + integrity sha512-Tr0DNY4RzTaBG2W2m3l7ZtFuJChTH6VZhXVhkGGjF/4cZTt+i8GcM9ozD+30Lmr4mDoZ5Xx34t2o4GJqYWDGcg== + +napi-macros@~2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" + integrity sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +needle@^2.2.1: + version "2.6.0" + resolved "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz#24dbb55f2509e2324b4a99d61f413982013ccdbe" + integrity sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg== + dependencies: + debug "^3.2.6" + iconv-lite "^0.4.4" + sax "^1.2.4" + +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +next-tick@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +no-case@^2.2.0, no-case@^2.3.2: + version "2.3.2" + resolved "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== + dependencies: + lower-case "^1.1.1" + +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" + +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-fetch@2.4.1: + version "2.4.1" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.4.1.tgz#b2e38f1117b8acbedbe0524f041fb3177188255d" + integrity sha512-P9UbpFK87NyqBZzUuDBDz4f6Yiys8xm8j7ACDbi6usvFm6KItklQUKjeoqTrYS/S1k6I8oaOC2YLLDr/gg26Mw== + +node-fetch@2.6.0: + version "2.6.0" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" + integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== + +node-fetch@2.6.1, node-fetch@^2.1.2, node-fetch@^2.2.0, node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + +node-gyp-build@^4.2.0: + version "4.2.3" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" + integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== + +node-gyp-build@~3.8.0: + version "3.8.0" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.8.0.tgz#0f57efeb1971f404dfcbfab975c284de7c70f14a" + integrity sha512-bYbpIHyRqZ7sVWXxGpz8QIRug5JZc/hzZH4GbdT9HTZi6WmKCZ8GLvP8OZ9TTiIBvwPFKgtGrlWQSXDAvYdsPw== + +node-gyp-build@~4.1.0: + version "4.1.1" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.1.1.tgz#d7270b5d86717068d114cc57fff352f96d745feb" + integrity sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ== + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= + +node-interval-tree@^1.3.3: + version "1.3.3" + resolved "https://registry.npmjs.org/node-interval-tree/-/node-interval-tree-1.3.3.tgz#15ffb904cde08270214acace8dc7653e89ae32b7" + integrity sha512-K9vk96HdTK5fEipJwxSvIIqwTqr4e3HRJeJrNxBSeVMNSC/JWARRaX7etOLOuTmrRMeOI/K5TCJu3aWIwZiNTw== + dependencies: + shallowequal "^1.0.2" + +node-pre-gyp@^0.11.0: + version "0.11.0" + resolved "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz#db1f33215272f692cd38f03238e3e9b47c5dd054" + integrity sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +node-releases@^1.1.70: + version "1.1.71" + resolved "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb" + integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg== + +nofilter@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" + integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== + +noop-fn@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/noop-fn/-/noop-fn-1.0.0.tgz#5f33d47f13d2150df93e0cb036699e982f78ffbf" + integrity sha1-XzPUfxPSFQ35PgywNmmemC94/78= + +nopt@^4.0.1: + version "4.0.3" + resolved "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" + integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1, normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +normalize-url@^4.1.0: + version "4.5.0" + resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" + integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== + +npm-bundled@^1.0.1: + version "1.1.1" + resolved "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" + integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== + dependencies: + npm-normalize-package-bin "^1.0.1" + +npm-normalize-package-bin@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" + integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== + +npm-packlist@^1.1.6: + version "1.4.8" + resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" + integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-normalize-package-bin "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +nth-check@~1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" + integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== + dependencies: + boolbase "~1.0.0" + +nullthrows@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" + integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +number-to-bn@1.7.0: + version "1.7.0" + resolved "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" + integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA= + dependencies: + bn.js "4.11.6" + strip-hex-prefix "1.0.0" + +"nwmatcher@>= 1.3.7 < 2.0.0": + version "1.4.4" + resolved "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e" + integrity sha512-3iuY4N5dhgMpCUrOVnuAdGrgxVqV2cJpM+XNccjR2DKOB1RUP0aA+wGXEiNziG/UKboFyGBIoKOaNlJxx8bciQ== + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + integrity sha1-ejs9DpgGPUP0wD8uiubNUahog6A= + +object-assign@^4, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-inspect@^1.9.0: + version "1.9.0" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" + integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-path@^0.11.4: + version "0.11.5" + resolved "https://registry.npmjs.org/object-path/-/object-path-0.11.5.tgz#d4e3cf19601a5140a55a16ad712019a9c50b577a" + integrity sha512-jgSbThcoR/s+XumvGMTMf81QVBmah+/Q7K7YduKeKVWL7N111unR2d6pZZarSk6kY/caeNxUDyxOvMWyzoU2eg== + +object.assign@4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.assign@^4.1.0, object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + +object.entries@^1.1.2: + version "1.1.3" + resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.3.tgz#c601c7f168b62374541a07ddbd3e2d5e4f7711a6" + integrity sha512-ym7h7OZebNS96hn5IJeyUmaWhaSM4SVtAPPfNLQEI2MYWCO2egsITb9nab2+i/Pwibx+R0mtn+ltKJXRSeTMGg== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + has "^1.0.3" + +object.getownpropertydescriptors@^2.1.1: + version "2.1.2" + resolved "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7" + integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.values@^1.1.1: + version "1.1.3" + resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.3.tgz#eaa8b1e17589f02f698db093f7c62ee1699742ee" + integrity sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + has "^1.0.3" + +oboe@2.1.4: + version "2.1.4" + resolved "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" + integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= + dependencies: + http-https "^1.0.0" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + +opencollective-postinstall@^2.0.0: + version "2.0.3" + resolved "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" + integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== + +optimism@^0.14.0: + version "0.14.1" + resolved "https://registry.npmjs.org/optimism/-/optimism-0.14.1.tgz#db35a0c770e16863f6c288f7cf58341a2348db44" + integrity sha512-7+1lSN+LJEtaj3uBLLFk8uFCFKy3txLvcvln5Dh1szXjF9yghEMeWclmnk0qdtYZ+lcMNyu48RmQQRw+LRYKSQ== + dependencies: + "@wry/context" "^0.5.2" + "@wry/trie" "^0.2.1" + +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + +ora@^3.4.0: + version "3.4.0" + resolved "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz#bf0752491059a3ef3ed4c85097531de9fdbcd318" + integrity sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg== + dependencies: + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-spinners "^2.0.0" + log-symbols "^2.2.0" + strip-ansi "^5.2.0" + wcwidth "^1.0.1" + +ordered-read-streams@^0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz#7137e69b3298bb342247a1bbee3881c80e2fd78b" + integrity sha1-cTfmmzKYuzQiR6G77jiByA4v14s= + dependencies: + is-stream "^1.0.1" + readable-stream "^2.0.1" + +original-require@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/original-require/-/original-require-1.0.1.tgz#0f130471584cd33511c5ec38c8d59213f9ac5e20" + integrity sha1-DxMEcVhM0zURxew4yNWSE/msXiA= + +original@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" + integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== + dependencies: + url-parse "^1.4.3" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= + dependencies: + lcid "^1.0.0" + +os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-cancelable@^0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" + integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== + +p-cancelable@^1.0.0: + version "1.1.0" + resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + +p-limit@3.1.0, p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-timeout@^1.1.1: + version "1.2.1" + resolved "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" + integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= + dependencies: + p-finally "^1.0.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +param-case@^2.1.0: + version "2.1.1" + resolved "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc= + dependencies: + no-case "^2.2.0" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-asn1@^5.0.0, parse-asn1@^5.1.5: + version "5.1.6" + resolved "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" + integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== + dependencies: + asn1.js "^5.2.0" + browserify-aes "^1.0.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-headers@^2.0.0: + version "2.0.3" + resolved "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" + integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + integrity sha1-m387DeMr543CQBsXVzzK8Pb1nZQ= + +parse5@^3.0.1: + version "3.0.3" + resolved "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c" + integrity sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA== + dependencies: + "@types/node" "*" + +parseurl@^1.3.2, parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +pascal-case@^2.0.0, pascal-case@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz#2d578d3455f660da65eca18ef95b4e0de912761e" + integrity sha1-LVeNNFX2YNpl7KGO+VtODekSdh4= + dependencies: + camel-case "^3.0.0" + upper-case-first "^1.1.0" + +pascal-case@^3.1.1, pascal-case@^3.1.2: + version "3.1.2" + resolved "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" + integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + +path-case@^2.1.0: + version "2.1.1" + resolved "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz#94b8037c372d3fe2906e465bb45e25d226e8eea5" + integrity sha1-lLgDfDctP+KQbkZbtF4l0ibo7qU= + dependencies: + no-case "^2.2.0" + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + dependencies: + pify "^2.0.0" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pbkdf2@^3.0.17, pbkdf2@^3.0.3: + version "3.1.1" + resolved "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" + integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: + version "2.2.2" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +pkg-conf@^1.1.2: + version "1.1.3" + resolved "https://registry.npmjs.org/pkg-conf/-/pkg-conf-1.1.3.tgz#378e56d6fd13e88bfb6f4a25df7a83faabddba5b" + integrity sha1-N45W1v0T6Iv7b0ol33qD+qvduls= + dependencies: + find-up "^1.0.0" + load-json-file "^1.1.0" + object-assign "^4.0.1" + symbol "^0.2.1" + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + +pluralize@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" + integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== + +pouchdb-abstract-mapreduce@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-7.2.2.tgz#dd1b10a83f8d24361dce9aaaab054614b39f766f" + integrity sha512-7HWN/2yV2JkwMnGnlp84lGvFtnm0Q55NiBUdbBcaT810+clCGKvhssBCrXnmwShD1SXTwT83aszsgiSfW+SnBA== + dependencies: + pouchdb-binary-utils "7.2.2" + pouchdb-collate "7.2.2" + pouchdb-collections "7.2.2" + pouchdb-errors "7.2.2" + pouchdb-fetch "7.2.2" + pouchdb-mapreduce-utils "7.2.2" + pouchdb-md5 "7.2.2" + pouchdb-utils "7.2.2" + +pouchdb-adapter-leveldb-core@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-adapter-leveldb-core/-/pouchdb-adapter-leveldb-core-7.2.2.tgz#e0aa6a476e2607d7ae89f4a803c9fba6e6d05a8a" + integrity sha512-K9UGf1Ivwe87mjrMqN+1D07tO/DfU7ariVDrGffuOjvl+3BcvUF25IWrxsBObd4iPOYCH7NVQWRpojhBgxULtQ== + dependencies: + argsarray "0.0.1" + buffer-from "1.1.1" + double-ended-queue "2.1.0-0" + levelup "4.4.0" + pouchdb-adapter-utils "7.2.2" + pouchdb-binary-utils "7.2.2" + pouchdb-collections "7.2.2" + pouchdb-errors "7.2.2" + pouchdb-json "7.2.2" + pouchdb-md5 "7.2.2" + pouchdb-merge "7.2.2" + pouchdb-utils "7.2.2" + sublevel-pouchdb "7.2.2" + through2 "3.0.2" + +pouchdb-adapter-memory@^7.1.1: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-adapter-memory/-/pouchdb-adapter-memory-7.2.2.tgz#c0ec2e87928d516ca9d1b5badc7269df6f95e5ea" + integrity sha512-9o+zdItPEq7rIrxdkUxgsLNaZkDJAGEqqoYgeYdrHidOCZnlhxhX3g7/R/HcpDKC513iEPqJWDJQSfeT6nVKkw== + dependencies: + memdown "1.4.1" + pouchdb-adapter-leveldb-core "7.2.2" + pouchdb-utils "7.2.2" + +pouchdb-adapter-node-websql@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/pouchdb-adapter-node-websql/-/pouchdb-adapter-node-websql-7.0.0.tgz#64ad88dd45b23578e454bf3032a3a79f9d1e4008" + integrity sha512-fNaOMO8bvMrRTSfmH4RSLSpgnKahRcCA7Z0jg732PwRbGvvMdGbreZwvKPPD1fg2tm2ZwwiXWK2G3+oXyoqZYw== + dependencies: + pouchdb-adapter-websql-core "7.0.0" + pouchdb-utils "7.0.0" + websql "1.0.0" + +pouchdb-adapter-utils@7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/pouchdb-adapter-utils/-/pouchdb-adapter-utils-7.0.0.tgz#1ac8d34481911e0e9a9bf51024610a2e7351dc80" + integrity sha512-UWKPC6jkz6mHUzZefrU7P5X8ZGvBC8LSNZ7BIp0hWvJE6c20cnpDwedTVDpZORcCbVJpDmFOHBYnOqEIblPtbA== + dependencies: + pouchdb-binary-utils "7.0.0" + pouchdb-collections "7.0.0" + pouchdb-errors "7.0.0" + pouchdb-md5 "7.0.0" + pouchdb-merge "7.0.0" + pouchdb-utils "7.0.0" + +pouchdb-adapter-utils@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-adapter-utils/-/pouchdb-adapter-utils-7.2.2.tgz#c64426447d9044ba31517a18500d6d2d28abd47d" + integrity sha512-2CzZkTyTyHZkr3ePiWFMTiD5+56lnembMjaTl8ohwegM0+hYhRyJux0biAZafVxgIL4gnCUC4w2xf6WVztzKdg== + dependencies: + pouchdb-binary-utils "7.2.2" + pouchdb-collections "7.2.2" + pouchdb-errors "7.2.2" + pouchdb-md5 "7.2.2" + pouchdb-merge "7.2.2" + pouchdb-utils "7.2.2" + +pouchdb-adapter-websql-core@7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/pouchdb-adapter-websql-core/-/pouchdb-adapter-websql-core-7.0.0.tgz#27b3e404159538e515b2567baa7869f90caac16c" + integrity sha512-NyMaH0bl20SdJdOCzd+fwXo8JZ15a48/MAwMcIbXzsRHE4DjFNlRcWAcjUP6uN4Ezc+Gx+r2tkBBMf71mIz1Aw== + dependencies: + pouchdb-adapter-utils "7.0.0" + pouchdb-binary-utils "7.0.0" + pouchdb-collections "7.0.0" + pouchdb-errors "7.0.0" + pouchdb-json "7.0.0" + pouchdb-merge "7.0.0" + pouchdb-utils "7.0.0" + +pouchdb-binary-utils@7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-7.0.0.tgz#cb71a288b09572a231f6bab1b4aed201c4d219a7" + integrity sha512-yUktdOPIPvOVouCjJN3uop+bCcpdPwePrLm9eUAZNgEYnUFu0njdx7Q0WRsZ7UJ6l75HinL5ZHk4bnvEt86FLw== + dependencies: + buffer-from "1.1.0" + +pouchdb-binary-utils@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-7.2.2.tgz#0690b348052c543b1e67f032f47092ca82bcb10e" + integrity sha512-shacxlmyHbUrNfE6FGYpfyAJx7Q0m91lDdEAaPoKZM3SzAmbtB1i+OaDNtYFztXjJl16yeudkDb3xOeokVL3Qw== + dependencies: + buffer-from "1.1.1" + +pouchdb-collate@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-collate/-/pouchdb-collate-7.2.2.tgz#fc261f5ef837c437e3445fb0abc3f125d982c37c" + integrity sha512-/SMY9GGasslknivWlCVwXMRMnQ8myKHs4WryQ5535nq1Wj/ehpqWloMwxEQGvZE1Sda3LOm7/5HwLTcB8Our+w== + +pouchdb-collections@7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-7.0.0.tgz#fd1f632337dc6301b0ff8649732ca79204e41780" + integrity sha512-DaoUr/vU24Q3gM6ghj0va9j/oBanPwkbhkvnqSyC3Dm5dgf5pculNxueLF9PKMo3ycApoWzHMh6N2N8KJbDU2Q== + +pouchdb-collections@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-7.2.2.tgz#aeed77f33322429e3f59d59ea233b48ff0e68572" + integrity sha512-6O9zyAYlp3UdtfneiMYuOCWdUCQNo2bgdjvNsMSacQX+3g8WvIoFQCYJjZZCpTttQGb+MHeRMr8m2U95lhJTew== + +pouchdb-debug@^7.1.1: + version "7.2.1" + resolved "https://registry.npmjs.org/pouchdb-debug/-/pouchdb-debug-7.2.1.tgz#f5f869f6113c12ccb97cddf5b0a32b6e0e67e961" + integrity sha512-eP3ht/AKavLF2RjTzBM6S9gaI2/apcW6xvaKRQhEdOfiANqerFuksFqHCal3aikVQuDO+cB/cw+a4RyJn/glBw== + dependencies: + debug "3.1.0" + +pouchdb-errors@7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-7.0.0.tgz#4e2a5a8b82af20cbe5f9970ca90b7ec74563caa0" + integrity sha512-dTusY8nnTw4HIztCrNl7AoGgwvS1bVf/3/97hDaGc4ytn72V9/4dK8kTqlimi3UpaurohYRnqac0SGXYP8vgXA== + dependencies: + inherits "2.0.3" + +pouchdb-errors@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-7.2.2.tgz#80d811d65c766c9d20b755c6e6cc123f8c3c4792" + integrity sha512-6GQsiWc+7uPfgEHeavG+7wuzH3JZW29Dnrvz8eVbDFE50kVFxNDVm3EkYHskvo5isG7/IkOx7PV7RPTA3keG3g== + dependencies: + inherits "2.0.4" + +pouchdb-fetch@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-fetch/-/pouchdb-fetch-7.2.2.tgz#492791236d60c899d7e9973f9aca0d7b9cc02230" + integrity sha512-lUHmaG6U3zjdMkh8Vob9GvEiRGwJfXKE02aZfjiVQgew+9SLkuOxNw3y2q4d1B6mBd273y1k2Lm0IAziRNxQnA== + dependencies: + abort-controller "3.0.0" + fetch-cookie "0.10.1" + node-fetch "2.6.0" + +pouchdb-find@^7.0.0: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-find/-/pouchdb-find-7.2.2.tgz#1227afdd761812d508fe0794b3e904518a721089" + integrity sha512-BmFeFVQ0kHmDehvJxNZl9OmIztCjPlZlVSdpijuFbk/Fi1EFPU1BAv3kLC+6DhZuOqU/BCoaUBY9sn66pPY2ag== + dependencies: + pouchdb-abstract-mapreduce "7.2.2" + pouchdb-collate "7.2.2" + pouchdb-errors "7.2.2" + pouchdb-fetch "7.2.2" + pouchdb-md5 "7.2.2" + pouchdb-selector-core "7.2.2" + pouchdb-utils "7.2.2" + +pouchdb-json@7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/pouchdb-json/-/pouchdb-json-7.0.0.tgz#d9860f66f27a359ac6e4b24da4f89b6909f37530" + integrity sha512-w0bNRu/7VmmCrFWMYAm62n30wvJJUT2SokyzeTyj3hRohj4GFwTRg1mSZ+iAmxgRKOFE8nzZstLG/WAB4Ymjew== + dependencies: + vuvuzela "1.0.3" + +pouchdb-json@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-json/-/pouchdb-json-7.2.2.tgz#b939be24b91a7322e9a24b8880a6e21514ec5e1f" + integrity sha512-3b2S2ynN+aoB7aCNyDZc/4c0IAdx/ir3nsHB+/RrKE9cM3QkQYbnnE3r/RvOD1Xvr6ji/KOCBie+Pz/6sxoaug== + dependencies: + vuvuzela "1.0.3" + +pouchdb-mapreduce-utils@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-7.2.2.tgz#13a46a3cc2a3f3b8e24861da26966904f2963146" + integrity sha512-rAllb73hIkU8rU2LJNbzlcj91KuulpwQu804/F6xF3fhZKC/4JQMClahk+N/+VATkpmLxp1zWmvmgdlwVU4HtQ== + dependencies: + argsarray "0.0.1" + inherits "2.0.4" + pouchdb-collections "7.2.2" + pouchdb-utils "7.2.2" + +pouchdb-md5@7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-7.0.0.tgz#935dc6bb507a5f3978fb653ca5790331bae67c96" + integrity sha512-yaSJKhLA3QlgloKUQeb2hLdT3KmUmPfoYdryfwHZuPTpXIRKTnMQTR9qCIRUszc0ruBpDe53DRslCgNUhAyTNQ== + dependencies: + pouchdb-binary-utils "7.0.0" + spark-md5 "3.0.0" + +pouchdb-md5@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-7.2.2.tgz#415401acc5a844112d765bd1fb4e5d9f38fb0838" + integrity sha512-c/RvLp2oSh8PLAWU5vFBnp6ejJABIdKqboZwRRUrWcfGDf+oyX8RgmJFlYlzMMOh4XQLUT1IoaDV8cwlsuryZw== + dependencies: + pouchdb-binary-utils "7.2.2" + spark-md5 "3.0.1" + +pouchdb-merge@7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/pouchdb-merge/-/pouchdb-merge-7.0.0.tgz#9f476ce7e32aae56904ad770ae8a1dfe14b57547" + integrity sha512-tci5u6NpznQhGcPv4ho1h0miky9rs+ds/T9zQ9meQeDZbUojXNaX1Jxsb0uYEQQ+HMqdcQs3Akdl0/u0mgwPGg== + +pouchdb-merge@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-merge/-/pouchdb-merge-7.2.2.tgz#940d85a2b532d6a93a6cab4b250f5648511bcc16" + integrity sha512-6yzKJfjIchBaS7Tusuk8280WJdESzFfQ0sb4jeMUNnrqs4Cx3b0DIEOYTRRD9EJDM+je7D3AZZ4AT0tFw8gb4A== + +pouchdb-selector-core@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-selector-core/-/pouchdb-selector-core-7.2.2.tgz#264d7436a8c8ac3801f39960e79875ef7f3879a0" + integrity sha512-XYKCNv9oiNmSXV5+CgR9pkEkTFqxQGWplnVhO3W9P154H08lU0ZoNH02+uf+NjZ2kjse7Q1fxV4r401LEcGMMg== + dependencies: + pouchdb-collate "7.2.2" + pouchdb-utils "7.2.2" + +pouchdb-utils@7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-7.0.0.tgz#48bfced6665b8f5a2b2d2317e2aa57635ed1e88e" + integrity sha512-1bnoX1KdZYHv9wicDIFdO0PLiVIMzNDUBUZ/yOJZ+6LW6niQCB8aCv09ZztmKfSQcU5nnN3fe656tScBgP6dOQ== + dependencies: + argsarray "0.0.1" + clone-buffer "1.0.0" + immediate "3.0.6" + inherits "2.0.3" + pouchdb-collections "7.0.0" + pouchdb-errors "7.0.0" + pouchdb-md5 "7.0.0" + uuid "3.2.1" + +pouchdb-utils@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-7.2.2.tgz#c17c4788f1d052b0daf4ef8797bbc4aaa3945aa4" + integrity sha512-XmeM5ioB4KCfyB2MGZXu1Bb2xkElNwF1qG+zVFbQsKQij0zvepdOUfGuWvLRHxTOmt4muIuSOmWZObZa3NOgzQ== + dependencies: + argsarray "0.0.1" + clone-buffer "1.0.0" + immediate "3.3.0" + inherits "2.0.4" + pouchdb-collections "7.2.2" + pouchdb-errors "7.2.2" + pouchdb-md5 "7.2.2" + uuid "8.1.0" + +pouchdb@7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/pouchdb/-/pouchdb-7.1.1.tgz#f5f8dcd1fc440fb76651cb26f6fc5d97a39cd6ce" + integrity sha512-8bXWclixNJZqokvxGHRsG19zehSJiaZaz4dVYlhXhhUctz7gMcNTElHjPBzBdZlKKvt9aFDndmXN1VVE53Co8g== + dependencies: + argsarray "0.0.1" + buffer-from "1.1.0" + clone-buffer "1.0.0" + double-ended-queue "2.1.0-0" + fetch-cookie "0.7.0" + immediate "3.0.6" + inherits "2.0.3" + level "5.0.1" + level-codec "9.0.1" + level-write-stream "1.0.0" + leveldown "5.0.2" + levelup "4.0.2" + ltgt "2.2.1" + node-fetch "2.4.1" + readable-stream "1.0.33" + spark-md5 "3.0.0" + through2 "3.0.1" + uuid "3.2.1" + vuvuzela "1.0.3" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + +prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= + +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prettier@^2.2.1: + version "2.2.1" + resolved "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" + integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.npmjs.org/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +promise.allsettled@1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz#d66f78fbb600e83e863d893e98b3d4376a9c47c9" + integrity sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg== + dependencies: + array.prototype.map "^1.0.1" + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + iterate-value "^1.0.0" + +promise@^7.1.1: + version "7.3.1" + resolved "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== + dependencies: + asap "~2.0.3" + +prop-types@^15.7.2: + version "15.7.2" + resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" + +proxy-addr@~2.0.5: + version "2.0.6" + resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.1" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + +psl@^1.1.28, psl@^1.1.33: + version "1.8.0" + resolved "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +pure-rand@^4.1.1: + version "4.1.2" + resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-4.1.2.tgz#cbad2a3e3ea6df0a8d80d8ba204779b5679a5205" + integrity sha512-uLzZpQWfroIqyFWmX/pl0OL2JHJdoU3dbh0dvZ25fChHFJJi56J5oQZhW6QgbT2Llwh1upki84LnTwlZvsungA== + +qs@6.7.0: + version "6.7.0" + resolved "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +query-string@^5.0.1: + version "5.1.1" + resolved "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + +querystring@^0.2.0: + version "0.2.1" + resolved "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" + integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== + +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + +queue-microtask@^1.2.2: + version "1.2.2" + resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz#abf64491e6ecf0f38a6502403d4cda04f372dfd3" + integrity sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg== + +randomatic@^3.0.0: + version "3.1.1" + resolved "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" + integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-is@^16.7.0, react-is@^16.8.1: + version "16.13.1" + resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +readable-stream@1.0.33: + version "1.0.33" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.33.tgz#3a360dd66c1b1d7fd4705389860eda1d0f61126c" + integrity sha1-OjYN1mwbHX/UcFOJhg7aHQ9hEmw= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@1.1: + version "1.1.13" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e" + integrity sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@1.1.14: + version "1.1.14" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +"readable-stream@2 || 3", readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +"readable-stream@>=1.0.33-1 <1.1.0-0": + version "1.0.34" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@~0.0.2: + version "0.0.4" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-0.0.4.tgz#f32d76e3fb863344a548d79923007173665b3b8d" + integrity sha1-8y124/uGM0SlSNeZIwBxc2ZbO40= + +readable-stream@~2.0.0: + version "2.0.6" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + integrity sha1-j5A0HmilPMySh4jaz80Rs265t44= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readdirp@~3.4.0: + version "3.4.0" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" + integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== + dependencies: + picomatch "^2.2.1" + +redux-cli-logger@^2.0.1: + version "2.1.0" + resolved "https://registry.npmjs.org/redux-cli-logger/-/redux-cli-logger-2.1.0.tgz#7e546502a4b08c7fac4fe2faee2326a6326cb4a1" + integrity sha512-75mVsggAJRSykWy2qxdGI7osocDWvc3RCMeN93hlvS/FxgdRww12NaXslez+W6gBOrSJKO7W16V0IzuISSfCxg== + dependencies: + colors "^1.1.2" + +redux-devtools-core@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/redux-devtools-core/-/redux-devtools-core-0.2.1.tgz#4e43cbe590a1f18c13ee165d2d42e0bc77a164d8" + integrity sha512-RAGOxtUFdr/1USAvxrWd+Gq/Euzgw7quCZlO5TgFpDfG7rB5tMhZUrNyBjpzgzL2yMk0eHnPYIGm7NkIfRzHxQ== + dependencies: + get-params "^0.1.2" + jsan "^3.1.13" + lodash "^4.17.11" + nanoid "^2.0.0" + remotedev-serialize "^0.1.8" + +redux-devtools-instrument@^1.9.4: + version "1.10.0" + resolved "https://registry.npmjs.org/redux-devtools-instrument/-/redux-devtools-instrument-1.10.0.tgz#036caf79fa1e5f25ec4bae38a9af4f08c69e323a" + integrity sha512-X8JRBCzX2ADSMp+iiV7YQ8uoTNyEm0VPFPd4T854coz6lvRiBrFSqAr9YAS2n8Kzxx8CJQotR0QF9wsMM+3DvA== + dependencies: + lodash "^4.17.19" + symbol-observable "^1.2.0" + +redux-saga@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/redux-saga/-/redux-saga-1.0.0.tgz#acb8b3ed9180fecbe75f342011d75af3ac11045b" + integrity sha512-GvJWs/SzMvEQgeaw6sRMXnS2FghlvEGsHiEtTLpJqc/FHF3I5EE/B+Hq5lyHZ8LSoT2r/X/46uWvkdCnK9WgHA== + dependencies: + "@redux-saga/core" "^1.0.0" + +redux@^3.7.2: + version "3.7.2" + resolved "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b" + integrity sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A== + dependencies: + lodash "^4.2.1" + lodash-es "^4.2.1" + loose-envify "^1.1.0" + symbol-observable "^1.0.3" + +redux@^4.0.4: + version "4.0.5" + resolved "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz#4db5de5816e17891de8a80c424232d06f051d93f" + integrity sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w== + dependencies: + loose-envify "^1.4.0" + symbol-observable "^1.2.0" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + +regenerator-runtime@^0.13.4: + version "0.13.7" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" + integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== + dependencies: + is-equal-shallow "^0.1.3" + +regexpp@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" + integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== + +relay-compiler@10.1.0: + version "10.1.0" + resolved "https://registry.npmjs.org/relay-compiler/-/relay-compiler-10.1.0.tgz#fb4672cdbe9b54869a3a79759edd8c2d91609cbe" + integrity sha512-HPqc3N3tNgEgUH5+lTr5lnLbgnsZMt+MRiyS0uAVNhuPY2It0X1ZJG+9qdA3L9IqKFUNwVn6zTO7RArjMZbARQ== + dependencies: + "@babel/core" "^7.0.0" + "@babel/generator" "^7.5.0" + "@babel/parser" "^7.0.0" + "@babel/runtime" "^7.0.0" + "@babel/traverse" "^7.0.0" + "@babel/types" "^7.0.0" + babel-preset-fbjs "^3.3.0" + chalk "^4.0.0" + fb-watchman "^2.0.0" + fbjs "^3.0.0" + glob "^7.1.1" + immutable "~3.7.6" + nullthrows "^1.1.1" + relay-runtime "10.1.0" + signedsource "^1.0.0" + yargs "^15.3.1" + +relay-runtime@10.1.0: + version "10.1.0" + resolved "https://registry.npmjs.org/relay-runtime/-/relay-runtime-10.1.0.tgz#4753bf36e95e8d862cef33608e3d98b4ed730d16" + integrity sha512-bxznLnQ1ST6APN/cFi7l0FpjbZVchWQjjhj9mAuJBuUqNNCh9uV+UTRhpQF7Q8ycsPp19LHTpVyGhYb0ustuRQ== + dependencies: + "@babel/runtime" "^7.0.0" + fbjs "^3.0.0" + +remote-redux-devtools@^0.5.12: + version "0.5.16" + resolved "https://registry.npmjs.org/remote-redux-devtools/-/remote-redux-devtools-0.5.16.tgz#95b1a4a1988147ca04f3368f3573b661748b3717" + integrity sha512-xZ2D1VRIWzat5nsvcraT6fKEX9Cfi+HbQBCwzNnUAM8Uicm/anOc60XGalcaDPrVmLug7nhDl2nimEa3bL3K9w== + dependencies: + jsan "^3.1.13" + querystring "^0.2.0" + redux-devtools-core "^0.2.1" + redux-devtools-instrument "^1.9.4" + rn-host-detect "^1.1.5" + socketcluster-client "^14.2.1" + +remotedev-serialize@^0.1.8: + version "0.1.9" + resolved "https://registry.npmjs.org/remotedev-serialize/-/remotedev-serialize-0.1.9.tgz#5e67e05cbca75d408d769d057dc59d0f56cd2c43" + integrity sha512-5tFdZg9mSaAWTv6xmQ7HtHjKMLSFQFExEZOtJe10PLsv1wb7cy7kYHtBvTYRro27/3fRGEcQBRNKSaixOpb69w== + dependencies: + jsan "^3.1.13" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" + +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + integrity sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ= + +request@^2.55.0, request@^2.79.0: + version "2.88.2" + resolved "https://registry.npmjs.org/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= + +reselect-tree@^1.3.4: + version "1.3.4" + resolved "https://registry.npmjs.org/reselect-tree/-/reselect-tree-1.3.4.tgz#449629728e2dc79bf0602571ec8859ac34737089" + integrity sha512-1OgNq1IStyJFqIqOoD3k3Ge4SsYCMP9W88VQOfvgyLniVKLfvbYO1Vrl92SyEK5021MkoBX6tWb381VxTDyPBQ== + dependencies: + debug "^3.1.0" + esdoc "^1.0.4" + json-pointer "^0.6.0" + reselect "^4.0.0" + source-map-support "^0.5.3" + +reselect@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz#f2529830e5d3d0e021408b246a206ef4ea4437f7" + integrity sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA== + +resolve-from@5.0.0, resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0: + version "1.20.0" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + +responselike@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +retry@0.12.0: + version "0.12.0" + resolved "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^2.6.1: + version "2.7.1" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.2.3: + version "2.2.6" + resolved "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz#c80ba6266ac7a483ef1e69e8e2f056656de2fb2c" + integrity sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg== + dependencies: + bn.js "^4.11.1" + +rn-host-detect@^1.1.5: + version "1.2.0" + resolved "https://registry.npmjs.org/rn-host-detect/-/rn-host-detect-1.2.0.tgz#8b0396fc05631ec60c1cb8789e5070cdb04d0da0" + integrity sha512-btNg5kzHcjZZ7t7mvvV/4wNJ9e3MPgrWivkRgWURzXL0JJ0pwWlU4zrbmdlz3HHzHOxhBhHB4D+/dbMFfu4/4A== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@^1.1.4, sax@^1.2.4: + version "1.2.4" + resolved "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +sc-channel@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/sc-channel/-/sc-channel-1.2.0.tgz#d9209f3a91e3fa694c66b011ce55c4ad8c3087d9" + integrity sha512-M3gdq8PlKg0zWJSisWqAsMmTVxYRTpVRqw4CWAdKBgAfVKumFcTjoCV0hYu7lgUXccCtCD8Wk9VkkE+IXCxmZA== + dependencies: + component-emitter "1.2.1" + +sc-errors@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/sc-errors/-/sc-errors-2.0.1.tgz#3af2d934dfd82116279a4b2c1552c1e021ddcb03" + integrity sha512-JoVhq3Ud+3Ujv2SIG7W0XtjRHsrNgl6iXuHHsh0s+Kdt5NwI6N2EGAZD4iteitdDv68ENBkpjtSvN597/wxPSQ== + +sc-formatter@^3.0.1: + version "3.0.2" + resolved "https://registry.npmjs.org/sc-formatter/-/sc-formatter-3.0.2.tgz#9abdb14e71873ce7157714d3002477bbdb33c4e6" + integrity sha512-9PbqYBpCq+OoEeRQ3QfFIGE6qwjjBcd2j7UjgDlhnZbtSnuGgHdcRklPKYGuYFH82V/dwd+AIpu8XvA1zqTd+A== + +scrypt-js@2.0.4: + version "2.0.4" + resolved "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" + integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== + +scrypt-js@^3.0.0, scrypt-js@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +secp256k1@^4.0.1: + version "4.0.2" + resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz#15dd57d0f0b9fdb54ac1fa1694f40e5e9a54f4a1" + integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg== + dependencies: + elliptic "^6.5.2" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0: + version "5.7.1" + resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.2.1, semver@^7.3.4: + version "7.3.4" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + +send@0.17.1: + version "0.17.1" + resolved "https://registry.npmjs.org/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +sentence-case@^2.1.0: + version "2.1.1" + resolved "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz#1f6e2dda39c168bf92d13f86d4a918933f667ed4" + integrity sha1-H24t2jnBaL+S0T+G1KkYkz9mftQ= + dependencies: + no-case "^2.2.0" + upper-case-first "^1.1.2" + +serialize-javascript@4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" + integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== + dependencies: + randombytes "^2.1.0" + +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +servify@^0.1.12: + version "0.1.12" + resolved "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" + integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== + dependencies: + body-parser "^1.16.0" + cors "^2.8.1" + express "^4.14.0" + request "^2.79.0" + xhr "^2.3.3" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +setimmediate@1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" + integrity sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48= + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shallowequal@^1.0.2: + version "1.1.0" + resolved "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" + integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +signedsource@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/signedsource/-/signedsource-1.0.0.tgz#1ddace4981798f93bd833973803d80d52e93ad6a" + integrity sha1-HdrOSYF5j5O9gzlzgD2A1S6TrWo= + +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^2.7.0: + version "2.8.1" + resolved "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz#0e22e91d4575d87620620bc91308d57a77f44b5d" + integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== + dependencies: + decompress-response "^3.3.0" + once "^1.3.1" + simple-concat "^1.0.0" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +snake-case@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" + integrity sha1-Qb2xtz8w7GagTU4srRt2OH1NbZ8= + dependencies: + no-case "^2.2.0" + +socketcluster-client@^14.2.1: + version "14.3.1" + resolved "https://registry.npmjs.org/socketcluster-client/-/socketcluster-client-14.3.1.tgz#bfc3591c0cad2668e7b3512a102f3844f5f2e84d" + integrity sha512-Sd/T0K/9UlqTfz+HUuFq90dshA5OBJPQbdkRzGtcKIOm52fkdsBTt0FYpiuzzxv5VrU7PWpRm6KIfNXyPwlLpw== + dependencies: + buffer "^5.2.1" + clone "2.1.1" + component-emitter "1.2.1" + linked-list "0.1.0" + querystring "0.2.0" + sc-channel "^1.2.0" + sc-errors "^2.0.1" + sc-formatter "^3.0.1" + uuid "3.2.1" + ws "7.1.0" + +source-map-resolve@^0.5.2: + version "0.5.3" + resolved "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@0.5.12: + version "0.5.12" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" + integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@^0.5.19, source-map-support@^0.5.3: + version "0.5.19" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== + +source-map@^0.5.0, source-map@^0.5.7: + version "0.5.7" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spark-md5@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.0.tgz#3722227c54e2faf24b1dc6d933cc144e6f71bfef" + integrity sha1-NyIifFTi+vJLHcbZM8wUTm9xv+8= + +spark-md5@3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.1.tgz#83a0e255734f2ab4e5c466e5a2cfc9ba2aa2124d" + integrity sha512-0tF3AGSD1ppQeuffsLDIOWlKUd3lS92tFxcsrh5Pe3ZphhnoK+oXIBTzOAThZCiuINZLvpiLH/1VS1/ANEJVig== + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.7" + resolved "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65" + integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +sqlite3@^4.0.0: + version "4.2.0" + resolved "https://registry.npmjs.org/sqlite3/-/sqlite3-4.2.0.tgz#49026d665e9fc4f922e56fb9711ba5b4c85c4901" + integrity sha512-roEOz41hxui2Q7uYnWsjMOTry6TcNUNmp8audCx18gF10P2NknwdpF+E+HKvz/F2NvPKGGBF4NGc+ZPQ+AABwg== + dependencies: + nan "^2.12.1" + node-pre-gyp "^0.11.0" + +sse-z@0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/sse-z/-/sse-z-0.3.0.tgz#e215db7c303d6c4a4199d80cb63811cc28fa55b9" + integrity sha512-jfcXynl9oAOS9YJ7iqS2JMUEHOlvrRAD+54CENiWnc4xsuVLQVSgmwf7cwOTcBd/uq3XkQKBGojgvEtVXcJ/8w== + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +stoppable@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz#32da568e83ea488b08e4d7ea2c3bcc9d75015d5b" + integrity sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw== + +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + +streamsearch@0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a" + integrity sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo= + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.2" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-bom-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee" + integrity sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4= + dependencies: + first-chunk-stream "^1.0.0" + strip-bom "^2.0.0" + +strip-bom@2.X, strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= + dependencies: + is-hex-prefixed "1.0.0" + +strip-json-comments@3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +sublevel-pouchdb@7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/sublevel-pouchdb/-/sublevel-pouchdb-7.2.2.tgz#49e46cd37883bf7ff5006d7c5b9bcc7bcc1f422f" + integrity sha512-y5uYgwKDgXVyPZceTDGWsSFAhpSddY29l9PJbXqMJLfREdPmQTY8InpatohlEfCXX7s1LGcrfYAhxPFZaJOLnQ== + dependencies: + inherits "2.0.4" + level-codec "9.0.2" + ltgt "2.2.1" + readable-stream "1.1.14" + +subscriptions-transport-ws@^0.9.11, subscriptions-transport-ws@^0.9.16: + version "0.9.18" + resolved "https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.18.tgz#bcf02320c911fbadb054f7f928e51c6041a37b97" + integrity sha512-tztzcBTNoEbuErsVQpTN2xUNN/efAZXyCyL5m3x4t6SKrEiTL2N8SaKWBFWM4u56pL79ULif3zjyeq+oV+nOaA== + dependencies: + backo2 "^1.0.2" + eventemitter3 "^3.1.0" + iterall "^1.2.1" + symbol-observable "^1.0.4" + ws "^5.2.0" + +supports-color@7.1.0: + version "7.1.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +swap-case@^1.1.0: + version "1.1.2" + resolved "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3" + integrity sha1-w5IDpFhzhfrTyFCgvRvK+ggZdOM= + dependencies: + lower-case "^1.1.1" + upper-case "^1.1.1" + +swarm-js@^0.1.40: + version "0.1.40" + resolved "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" + integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^7.1.0" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request "^1.0.1" + +symbol-observable@^1.0.3, symbol-observable@^1.0.4, symbol-observable@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" + integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== + +symbol-observable@^2.0.0: + version "2.0.3" + resolved "https://registry.npmjs.org/symbol-observable/-/symbol-observable-2.0.3.tgz#5b521d3d07a43c351055fa43b8355b62d33fd16a" + integrity sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA== + +"symbol-tree@>= 3.1.0 < 4.0.0": + version "3.2.4" + resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + +symbol@^0.2.1: + version "0.2.3" + resolved "https://registry.npmjs.org/symbol/-/symbol-0.2.3.tgz#3b9873b8a901e47c6efe21526a3ac372ef28bbc7" + integrity sha1-O5hzuKkB5Hxu/iFSajrDcu8ou8c= + +sync-fetch@0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/sync-fetch/-/sync-fetch-0.3.0.tgz#77246da949389310ad978ab26790bb05f88d1335" + integrity sha512-dJp4qg+x4JwSEW1HibAuMi0IIrBI3wuQr2GimmqB7OXR50wmwzfdusG+p39R9w3R6aFtZ2mzvxvWKQ3Bd/vx3g== + dependencies: + buffer "^5.7.0" + node-fetch "^2.6.1" + +table@^6.0.4: + version "6.0.7" + resolved "https://registry.npmjs.org/table/-/table-6.0.7.tgz#e45897ffbcc1bcf9e8a87bf420f2c9e5a7a52a34" + integrity sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g== + dependencies: + ajv "^7.0.2" + lodash "^4.17.20" + slice-ansi "^4.0.0" + string-width "^4.2.0" + +taffydb@2.7.3: + version "2.7.3" + resolved "https://registry.npmjs.org/taffydb/-/taffydb-2.7.3.tgz#2ad37169629498fca5bc84243096d3cde0ec3a34" + integrity sha1-KtNxaWKUmPylvIQkMJbTzeDsOjQ= + +tar@^4, tar@^4.0.2: + version "4.4.13" + resolved "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.8.6" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +through2-filter@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec" + integrity sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw= + dependencies: + through2 "~2.0.0" + xtend "~4.0.0" + +through2-filter@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254" + integrity sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA== + dependencies: + through2 "~2.0.0" + xtend "~4.0.0" + +through2@2.X, through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: + version "2.0.5" + resolved "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +through2@3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" + integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== + dependencies: + readable-stream "2 || 3" + +through2@3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4" + integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== + dependencies: + inherits "^2.0.4" + readable-stream "2 || 3" + +through2@^0.6.0: + version "0.6.5" + resolved "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" + integrity sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg= + dependencies: + readable-stream ">=1.0.33-1 <1.1.0-0" + xtend ">=4.0.0 <4.1.0-0" + +tildify@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" + integrity sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo= + dependencies: + os-homedir "^1.0.0" + +timed-out@^4.0.0, timed-out@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= + +tiny-queue@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/tiny-queue/-/tiny-queue-0.2.1.tgz#25a67f2c6e253b2ca941977b5ef7442ef97a6046" + integrity sha1-JaZ/LG4lOyypQZd7XvdELvl6YEY= + +title-case@^2.1.0: + version "2.1.1" + resolved "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" + integrity sha1-PhJyFtpY0rxb7PE3q5Ha46fNj6o= + dependencies: + no-case "^2.2.0" + upper-case "^1.0.3" + +to-absolute-glob@^0.1.1: + version "0.1.1" + resolved "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f" + integrity sha1-HN+kcqnvUMI57maZm2YsoOs5k38= + dependencies: + extend-shallow "^2.0.1" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + +tough-cookie@^2.2.0, tough-cookie@^2.3.1, tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +"tough-cookie@^2.3.3 || ^3.0.1 || ^4.0.0": + version "4.0.0" + resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" + integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.1.2" + +tr46@~0.0.1: + version "0.0.3" + resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + +truffle@^5.2.2: + version "5.2.3" + resolved "https://registry.npmjs.org/truffle/-/truffle-5.2.3.tgz#6c1585da56b704397017833ea6b62e18303b924f" + integrity sha512-iOeOSaCZtQ+TWsEh6yc6Al+RVkWTsJQnceXNYSCYR86QcXssGY5CqDQ2JwIxwAN4YMRf4GZ/LRAPul6qX36b6A== + dependencies: + "@truffle/debugger" "^8.0.17" + app-module-path "^2.2.0" + mocha "8.1.2" + original-require "^1.0.1" + optionalDependencies: + "@truffle/db" "^0.5.3" + +ts-invariant@^0.4.0: + version "0.4.4" + resolved "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86" + integrity sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA== + dependencies: + tslib "^1.9.3" + +ts-invariant@^0.6.0: + version "0.6.1" + resolved "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.6.1.tgz#eb4c52b45daaca8367abbfd6cff998ea871d592d" + integrity sha512-QQgN33g8E8yrdDuH29HASveLtbzMnRRgWh0i/JNTW4+zcLsdIOnfsgEDi/NKx4UckQyuMFt9Ujm6TWLWQ58Kvg== + dependencies: + "@types/ungap__global-this" "^0.3.1" + "@ungap/global-this" "^0.4.2" + tslib "^1.9.3" + +tsconfig-paths@^3.9.0: + version "3.9.0" + resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" + integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + +tslib@^1.10.0, tslib@^1.14.1, tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.0.3, tslib@~2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" + integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== + +tslib@~2.0.1: + version "2.0.3" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" + integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + +type-is@^1.6.16, type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +type@^1.0.1: + version "1.2.0" + resolved "https://registry.npmjs.org/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.0.0: + version "2.5.0" + resolved "https://registry.npmjs.org/type/-/type-2.5.0.tgz#0a2e78c2e77907b252abe5f298c1b01c63f0db3d" + integrity sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw== + +typedarray-to-buffer@^3.1.5, typedarray-to-buffer@~3.1.5: + version "3.1.5" + resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typedarray@~0.0.5: + version "0.0.6" + resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +typescript-compare@^0.0.2: + version "0.0.2" + resolved "https://registry.npmjs.org/typescript-compare/-/typescript-compare-0.0.2.tgz#7ee40a400a406c2ea0a7e551efd3309021d5f425" + integrity sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA== + dependencies: + typescript-logic "^0.0.0" + +typescript-logic@^0.0.0: + version "0.0.0" + resolved "https://registry.npmjs.org/typescript-logic/-/typescript-logic-0.0.0.tgz#66ebd82a2548f2b444a43667bec120b496890196" + integrity sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q== + +typescript-tuple@^2.2.1: + version "2.2.1" + resolved "https://registry.npmjs.org/typescript-tuple/-/typescript-tuple-2.2.1.tgz#7d9813fb4b355f69ac55032e0363e8bb0f04dad2" + integrity sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q== + dependencies: + typescript-compare "^0.0.2" + +ua-parser-js@^0.7.18: + version "0.7.24" + resolved "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.24.tgz#8d3ecea46ed4f1f1d63ec25f17d8568105dc027c" + integrity sha512-yo+miGzQx5gakzVK3QFfN0/L9uVhosXBBO7qmnk7c2iw1IhL212wfA3zbnI54B0obGwC/5NWub/iT9sReMx+Fw== + +ultron@~1.1.0: + version "1.1.1" + resolved "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" + integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== + +unbox-primitive@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.0.tgz#eeacbc4affa28e9b3d36b5eaeccc50b3251b1d3f" + integrity sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA== + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.0" + has-symbols "^1.0.0" + which-boxed-primitive "^1.0.1" + +underscore@1.9.1: + version "1.9.1" + resolved "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" + integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== + +unique-stream@^2.0.2: + version "2.3.1" + resolved "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac" + integrity sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A== + dependencies: + json-stable-stringify-without-jsonify "^1.0.1" + through2-filter "^3.0.0" + +unique-string@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" + integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= + dependencies: + crypto-random-string "^1.0.0" + +universalify@^0.1.0, universalify@^0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +unixify@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/unixify/-/unixify-1.0.0.tgz#3a641c8c2ffbce4da683a5c70f03a462940c2090" + integrity sha1-OmQcjC/7zk2mg6XHDwOkYpQMIJA= + dependencies: + normalize-path "^2.1.1" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +upper-case-first@^1.1.0, upper-case-first@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" + integrity sha1-XXm+3P8UQZUY/S7bCgUHybaFkRU= + dependencies: + upper-case "^1.1.1" + +upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= + dependencies: + prepend-http "^1.0.1" + +url-parse-lax@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + dependencies: + prepend-http "^2.0.0" + +url-parse@^1.4.3: + version "1.5.1" + resolved "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b" + integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + +url-set-query@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" + integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk= + +url-to-options@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" + integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= + +utf-8-validate@^5.0.2: + version "5.0.4" + resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.4.tgz#72a1735983ddf7a05a43a9c6b67c5ce1c910f9b8" + integrity sha512-MEF05cPSq3AwJ2C7B7sHAA6i53vONoZbMGX8My5auEVm6W+dJ2Jd/TZPyGJ5CH42V2XtbI5FD28HeHeqlPzZ3Q== + dependencies: + node-gyp-build "^4.2.0" + +utf8@3.0.0, utf8@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" + integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util.promisify@^1.0.0: + version "1.1.1" + resolved "https://registry.npmjs.org/util.promisify/-/util.promisify-1.1.1.tgz#77832f57ced2c9478174149cae9b96e9918cd54b" + integrity sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + for-each "^0.3.3" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.1" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" + integrity sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w= + +uuid@3.2.1: + version "3.2.1" + resolved "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" + integrity sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA== + +uuid@3.3.2: + version "3.3.2" + resolved "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + +uuid@8.1.0: + version "8.1.0" + resolved "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz#6f1536eb43249f473abc6bd58ff983da1ca30d8d" + integrity sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg== + +uuid@^3.1.0, uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +uuid@^8.0.0: + version "8.3.2" + resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +v8-compile-cache@^2.0.3: + version "2.3.0" + resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== + +vali-date@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz#1b904a59609fb328ef078138420934f6b86709a6" + integrity sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY= + +valid-url@1.0.9: + version "1.0.9" + resolved "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200" + integrity sha1-HBRHm0DxOXp1eC8RXkCGRHQzogA= + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +varint@^5.0.0: + version "5.0.2" + resolved "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" + integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vinyl-fs@2.4.3: + version "2.4.3" + resolved "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.3.tgz#3d97e562ebfdd4b66921dea70626b84bde9d2d07" + integrity sha1-PZflYuv91LZpId6nBia4S96dLQc= + dependencies: + duplexify "^3.2.0" + glob-stream "^5.3.2" + graceful-fs "^4.0.0" + gulp-sourcemaps "^1.5.2" + is-valid-glob "^0.3.0" + lazystream "^1.0.0" + lodash.isequal "^4.0.0" + merge-stream "^1.0.0" + mkdirp "^0.5.0" + object-assign "^4.0.0" + readable-stream "^2.0.4" + strip-bom "^2.0.0" + strip-bom-stream "^1.0.0" + through2 "^2.0.0" + through2-filter "^2.0.0" + vali-date "^1.0.0" + vinyl "^1.0.0" + +vinyl@1.X, vinyl@^1.0.0: + version "1.2.0" + resolved "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" + integrity sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ= + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vuvuzela@1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/vuvuzela/-/vuvuzela-1.0.3.tgz#3be145e58271c73ca55279dd851f12a682114b0b" + integrity sha1-O+FF5YJxxzylUnndhR8SpoIRSws= + +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + +web3-bzz@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.9.tgz#25f8a373bc2dd019f47bf80523546f98b93c8790" + integrity sha512-ogVQr9jHodu9HobARtvUSmWG22cv2EUQzlPeejGWZ7j5h20HX40EDuWyomGY5VclIj5DdLY76Tmq88RTf/6nxA== + dependencies: + "@types/node" "^10.12.18" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.9.1" + +web3-core-helpers@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.9.tgz#6381077c3e01c127018cb9e9e3d1422697123315" + integrity sha512-t0WAG3orLCE3lqi77ZoSRNFok3VQWZXTniZigDQjyOJYMAX7BU3F3js8HKbjVnAxlX3tiKoDxI0KBk9F3AxYuw== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.9" + web3-utils "1.2.9" + +web3-core-method@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.9.tgz#3fb538751029bea570e4f86731e2fa5e4945e462" + integrity sha512-bjsIoqP3gs7A/gP8+QeLUCyOKJ8bopteCSNbCX36Pxk6TYfYWNuC6hP+2GzUuqdP3xaZNe+XEElQFUNpR3oyAg== + dependencies: + "@ethersproject/transactions" "^5.0.0-beta.135" + underscore "1.9.1" + web3-core-helpers "1.2.9" + web3-core-promievent "1.2.9" + web3-core-subscriptions "1.2.9" + web3-utils "1.2.9" + +web3-core-promievent@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.9.tgz#bb1c56aa6fac2f4b3c598510f06554d25c11c553" + integrity sha512-0eAUA2zjgXTleSrnc1wdoKQPPIHU6KHf4fAscu4W9kKrR+mqP1KsjYrxY9wUyjNnXxfQ+5M29ipvbiaK8OqdOw== + dependencies: + eventemitter3 "3.1.2" + +web3-core-requestmanager@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.9.tgz#dd6d855256c4dd681434fe0867f8cd742fe10503" + integrity sha512-1PwKV2m46ALUnIN5VPPgjOj8yMLJhhqZYvYJE34hTN5SErOkwhzx5zScvo5MN7v7KyQGFnpVCZKKGCiEnDmtFA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.9" + web3-providers-http "1.2.9" + web3-providers-ipc "1.2.9" + web3-providers-ws "1.2.9" + +web3-core-subscriptions@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.9.tgz#335fd7d15dfce5d78b4b7bef05ce4b3d7237b0e4" + integrity sha512-Y48TvXPSPxEM33OmXjGVDMzTd0j8X0t2+sDw66haeBS8eYnrEzasWuBZZXDq0zNUsqyxItgBGDn+cszkgEnFqg== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.9" + +web3-core@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-core/-/web3-core-1.2.9.tgz#2cba57aa259b6409db532d21bdf57db8d504fd3e" + integrity sha512-fSYv21IP658Ty2wAuU9iqmW7V+75DOYMVZsDH/c14jcF/1VXnedOcxzxSj3vArsCvXZNe6XC5/wAuGZyQwR9RA== + dependencies: + "@types/bn.js" "^4.11.4" + "@types/node" "^12.6.1" + bignumber.js "^9.0.0" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-core-requestmanager "1.2.9" + web3-utils "1.2.9" + +web3-eth-abi@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.9.tgz#14bedd7e4be04fcca35b2ac84af1400574cd8280" + integrity sha512-3YwUYbh/DMfDbhMWEebAdjSd5bj3ZQieOjLzWFHU23CaLEqT34sUix1lba+hgUH/EN6A7bKAuKOhR3p0OvTn7Q== + dependencies: + "@ethersproject/abi" "5.0.0-beta.153" + underscore "1.9.1" + web3-utils "1.2.9" + +web3-eth-accounts@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.9.tgz#7ec422df90fecb5243603ea49dc28726db7bdab6" + integrity sha512-jkbDCZoA1qv53mFcRHCinoCsgg8WH+M0YUO1awxmqWXRmCRws1wW0TsuSQ14UThih5Dxolgl+e+aGWxG58LMwg== + dependencies: + crypto-browserify "3.12.0" + eth-lib "^0.2.8" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + scrypt-js "^3.0.1" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-utils "1.2.9" + +web3-eth-contract@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.9.tgz#713d9c6d502d8c8f22b696b7ffd8e254444e6bfd" + integrity sha512-PYMvJf7EG/HyssUZa+pXrc8IB06K/YFfWYyW4R7ed3sab+9wWUys1TlWxBCBuiBXOokSAyM6H6P6/cKEx8FT8Q== + dependencies: + "@types/bn.js" "^4.11.4" + underscore "1.9.1" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-core-promievent "1.2.9" + web3-core-subscriptions "1.2.9" + web3-eth-abi "1.2.9" + web3-utils "1.2.9" + +web3-eth-ens@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.9.tgz#577b9358c036337833fb2bdc59c11be7f6f731b6" + integrity sha512-kG4+ZRgZ8I1WYyOBGI8QVRHfUSbbJjvJAGA1AF/NOW7JXQ+x7gBGeJw6taDWJhSshMoEKWcsgvsiuoG4870YxQ== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-promievent "1.2.9" + web3-eth-abi "1.2.9" + web3-eth-contract "1.2.9" + web3-utils "1.2.9" + +web3-eth-iban@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.9.tgz#4ebf3d8783f34d04c4740dc18938556466399f7a" + integrity sha512-RtdVvJE0pyg9dHLy0GzDiqgnLnssSzfz/JYguhC1wsj9+Gnq1M6Diy3NixACWUAp6ty/zafyOaZnNQ+JuH9TjQ== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.9" + +web3-eth-personal@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.9.tgz#9b95eb159b950b83cd8ae15873e1d57711b7a368" + integrity sha512-cFiNrktxZ1C/rIdJFzQTvFn3/0zcsR3a+Jf8Y3KxeQDHszQtosjLWptP7bsUmDwEh4hzh0Cy3KpOxlYBWB8bJQ== + dependencies: + "@types/node" "^12.6.1" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-net "1.2.9" + web3-utils "1.2.9" + +web3-eth@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.9.tgz#e40e7b88baffc9b487193211c8b424dc944977b3" + integrity sha512-sIKO4iE9FEBa/CYUd6GdPd7GXt/wISqxUd8PlIld6+hvMJj02lgO7Z7p5T9mZIJcIZJGvZX81ogx8oJ9yif+Ag== + dependencies: + underscore "1.9.1" + web3-core "1.2.9" + web3-core-helpers "1.2.9" + web3-core-method "1.2.9" + web3-core-subscriptions "1.2.9" + web3-eth-abi "1.2.9" + web3-eth-accounts "1.2.9" + web3-eth-contract "1.2.9" + web3-eth-ens "1.2.9" + web3-eth-iban "1.2.9" + web3-eth-personal "1.2.9" + web3-net "1.2.9" + web3-utils "1.2.9" + +web3-net@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-net/-/web3-net-1.2.9.tgz#51d248ed1bc5c37713c4ac40c0073d9beacd87d3" + integrity sha512-d2mTn8jPlg+SI2hTj2b32Qan6DmtU9ap/IUlJTeQbZQSkTLf0u9suW8Vjwyr4poJYXTurdSshE7OZsPNn30/ZA== + dependencies: + web3-core "1.2.9" + web3-core-method "1.2.9" + web3-utils "1.2.9" + +web3-providers-http@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.9.tgz#e698aa5377e2019c24c5a1e6efa0f51018728934" + integrity sha512-F956tCIj60Ttr0UvEHWFIhx+be3He8msoPzyA44/kfzzYoMAsCFRn5cf0zQG6al0znE75g6HlWVSN6s3yAh51A== + dependencies: + web3-core-helpers "1.2.9" + xhr2-cookies "1.1.0" + +web3-providers-ipc@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.9.tgz#6159eacfcd7ac31edc470d93ef10814fe874763b" + integrity sha512-NQ8QnBleoHA2qTJlqoWu7EJAD/FR5uimf7Ielzk4Z2z+m+6UAuJdJMSuQNj+Umhz9L/Ys6vpS1vHx9NizFl+aQ== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.9" + +web3-providers-ws@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.9.tgz#22c2006655ec44b4ad2b41acae62741a6ae7a88c" + integrity sha512-6+UpvINeI//dglZoAKStUXqxDOXJy6Iitv2z3dbgInG4zb8tkYl/VBDL80UjUg3ZvzWG0g7EKY2nRPEpON2TFA== + dependencies: + eventemitter3 "^4.0.0" + underscore "1.9.1" + web3-core-helpers "1.2.9" + websocket "^1.0.31" + +web3-shh@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.9.tgz#c4ba70d6142cfd61341a50752d8cace9a0370911" + integrity sha512-PWa8b/EaxaMinFaxy6cV0i0EOi2M7a/ST+9k9nhyhCjVa2vzXuNoBNo2IUOmeZ0WP2UQB8ByJ2+p4htlJaDOjA== + dependencies: + web3-core "1.2.9" + web3-core-method "1.2.9" + web3-core-subscriptions "1.2.9" + web3-net "1.2.9" + +web3-utils@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz#abe11735221627da943971ef1a630868fb9c61f3" + integrity sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + +web3@1.2.9: + version "1.2.9" + resolved "https://registry.npmjs.org/web3/-/web3-1.2.9.tgz#cbcf1c0fba5e213a6dfb1f2c1f4b37062e4ce337" + integrity sha512-Mo5aBRm0JrcNpN/g4VOrDzudymfOnHRC3s2VarhYxRA8aWgF5rnhQ0ziySaugpic1gksbXPe105pUWyRqw8HUA== + dependencies: + web3-bzz "1.2.9" + web3-core "1.2.9" + web3-eth "1.2.9" + web3-eth-personal "1.2.9" + web3-net "1.2.9" + web3-shh "1.2.9" + web3-utils "1.2.9" + +webidl-conversions@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-2.0.1.tgz#3bf8258f7d318c7443c36f2e169402a1a6703506" + integrity sha1-O/glj30xjHRDw28uFpQCoaZwNQY= + +websocket@^1.0.31: + version "1.0.33" + resolved "https://registry.npmjs.org/websocket/-/websocket-1.0.33.tgz#407f763fc58e74a3fa41ca3ae5d78d3f5e3b82a5" + integrity sha512-XwNqM2rN5eh3G2CUQE3OHZj+0xfdH42+OFK6LdC2yqiC0YU8e5UK0nYre220T0IyyN031V/XOvtHvXozvJYFWA== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + +websql@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/websql/-/websql-1.0.0.tgz#1bd00b27392893134715d5dd6941fd89e730bab5" + integrity sha512-7iZ+u28Ljw5hCnMiq0BCOeSYf0vCFQe/ORY0HgscTiKjQed8WqugpBUggJ2NTnB9fahn1kEnPRX2jf8Px5PhJw== + dependencies: + argsarray "^0.0.1" + immediate "^3.2.2" + noop-fn "^1.0.0" + sqlite3 "^4.0.0" + tiny-queue "^0.2.1" + +whatwg-url-compat@~0.6.5: + version "0.6.5" + resolved "https://registry.npmjs.org/whatwg-url-compat/-/whatwg-url-compat-0.6.5.tgz#00898111af689bb097541cd5a45ca6c8798445bf" + integrity sha1-AImBEa9om7CXVBzVpFymyHmERb8= + dependencies: + tr46 "~0.0.1" + +which-boxed-primitive@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@2.0.2, which@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3, wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= + +word-wrap@^1.2.3, word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +workerpool@6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz#85aad67fa1a2c8ef9386a1b43539900f61d03d58" + integrity sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA== + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write-file-atomic@^2.0.0: + version "2.4.3" + resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" + integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write-stream@~0.4.3: + version "0.4.3" + resolved "https://registry.npmjs.org/write-stream/-/write-stream-0.4.3.tgz#83cc8c0347d0af6057a93862b4e3ae01de5c81c1" + integrity sha1-g8yMA0fQr2BXqThitOOuAd5cgcE= + dependencies: + readable-stream "~0.0.2" + +ws@7.1.0: + version "7.1.0" + resolved "https://registry.npmjs.org/ws/-/ws-7.1.0.tgz#0395646c6fcc3ac56abf61ce1a42039637a6bd98" + integrity sha512-Swie2C4fs7CkwlHu1glMePLYJJsWjzhl1vm3ZaLplD0h7OMkZyZ6kLTB/OagiU923bZrPFXuDTeEqaEN4NWG4g== + dependencies: + async-limiter "^1.0.0" + +ws@7.4.3: + version "7.4.3" + resolved "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz#1f9643de34a543b8edb124bdcbc457ae55a6e5cd" + integrity sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA== + +ws@^3.0.0: + version "3.3.3" + resolved "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" + integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== + dependencies: + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" + +ws@^5.2.0: + version "5.2.2" + resolved "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" + integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== + dependencies: + async-limiter "~1.0.0" + +ws@^6.0.0: + version "6.2.1" + resolved "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" + integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== + dependencies: + async-limiter "~1.0.0" + +xdg-basedir@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" + integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ= + +xhr-request-promise@^0.1.2: + version "0.1.3" + resolved "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" + integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== + dependencies: + xhr-request "^1.1.0" + +xhr-request@^1.0.1, xhr-request@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" + integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== + dependencies: + buffer-to-arraybuffer "^0.0.5" + object-assign "^4.1.1" + query-string "^5.0.1" + simple-get "^2.7.0" + timed-out "^4.0.1" + url-set-query "^1.0.0" + xhr "^2.0.4" + +xhr2-cookies@1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz#7d77449d0999197f155cb73b23df72505ed89d48" + integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg= + dependencies: + cookiejar "^2.1.1" + +xhr@^2.0.4, xhr@^2.3.3: + version "2.6.0" + resolved "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" + integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== + dependencies: + global "~4.4.0" + is-function "^1.0.1" + parse-headers "^2.0.0" + xtend "^4.0.0" + +"xml-name-validator@>= 2.0.1 < 3.0.0": + version "2.0.1" + resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + integrity sha1-TYuPHszTQZqjYgYb7O9RXh5VljU= + +xmlhttprequest@1.8.0: + version "1.8.0" + resolved "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" + integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= + +xss@^1.0.8: + version "1.0.8" + resolved "https://registry.npmjs.org/xss/-/xss-1.0.8.tgz#32feb87feb74b3dcd3d404b7a68ababf10700535" + integrity sha512-3MgPdaXV8rfQ/pNn16Eio6VXYPTkqwa0vc7GkiymmY/DqR1SE/7VPAAVZz1GJsJFrllMYO3RHfEaiUGjab6TNw== + dependencies: + commander "^2.20.3" + cssfilter "0.0.10" + +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^3.2.1: + version "3.2.2" + resolved "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== + +y18n@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" + integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== + +yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" + integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= + +yallist@^3.0.0, yallist@^3.0.3: + version "3.1.1" + resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^15.0.1: + version "15.0.1" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3" + integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^2.4.0: + version "2.4.1" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + integrity sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ= + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + +yargs-unparser@1.6.1: + version "1.6.1" + resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.1.tgz#bd4b0ee05b4c94d058929c32cb09e3fce71d3c5f" + integrity sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA== + dependencies: + camelcase "^5.3.1" + decamelize "^1.2.0" + flat "^4.1.0" + is-plain-obj "^1.1.0" + yargs "^14.2.3" + +yargs@13.2.4: + version "13.2.4" + resolved "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + +yargs@13.3.2: + version "13.3.2" + resolved "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yargs@4.6.0: + version "4.6.0" + resolved "https://registry.npmjs.org/yargs/-/yargs-4.6.0.tgz#cb4050c0159bfb6bb649c0f4af550526a84619dc" + integrity sha1-y0BQwBWb+2u2ScD0r1UFJqhGGdw= + dependencies: + camelcase "^2.0.1" + cliui "^3.2.0" + decamelize "^1.1.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + pkg-conf "^1.1.2" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + string-width "^1.0.1" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.0" + +yargs@^14.2.3: + version "14.2.3" + resolved "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" + integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== + dependencies: + cliui "^5.0.0" + decamelize "^1.2.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^15.0.1" + +yargs@^15.3.1: + version "15.4.1" + resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +zen-observable-ts@^0.8.21: + version "0.8.21" + resolved "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz#85d0031fbbde1eba3cd07d3ba90da241215f421d" + integrity sha512-Yj3yXweRc8LdRMrCC8nIc4kkjWecPAUVh0TI0OUrWXx6aX790vLcDlWca6I4vsyCGH3LpWxq0dJRcMOFoVqmeg== + dependencies: + tslib "^1.9.3" + zen-observable "^0.8.0" + +zen-observable@^0.8.0, zen-observable@^0.8.14: + version "0.8.15" + resolved "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" + integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== From 7b1d216f1202b460d6dd89c40f55f7fb64510e16 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Fri, 12 Mar 2021 16:38:16 +0100 Subject: [PATCH 169/185] Add continuity test to vent Signed-off-by: Silas Davis --- Makefile | 3 +- cmd/burrow/commands/dump.go | 2 +- cmd/burrow/commands/vent.go | 36 ++++++++-- core/config.go | 2 +- logging/logconfig/config.go | 20 +++++- logging/logconfig/sinks.go | 49 +++++++++++--- rpc/lib/rpc_test.go | 2 +- rpc/web3/ethclient/client.go | 62 +++++++++-------- rpc/web3/ethclient/client_test.go | 24 +++---- rpc/web3/ethclient/transact_client.go | 33 +++++---- rpc/web3/ethclient/transact_client_test.go | 2 +- rpc/web3/ethclient/types.go | 4 +- vent/chain/burrow/burrow.go | 7 +- vent/chain/ethereum/consumer.go | 24 ++++--- vent/chain/ethereum/ethereum.go | 23 +++++-- vent/config/config.go | 4 +- vent/service/consumer.go | 33 ++++++--- vent/service/consumer_ethereum_test.go | 2 +- vent/service/consumer_integration_test.go | 79 ++++++++++++++++++++-- 19 files changed, 293 insertions(+), 118 deletions(-) diff --git a/Makefile b/Makefile index bf3952be6..5d60ad882 100644 --- a/Makefile +++ b/Makefile @@ -262,9 +262,10 @@ start_ganache: $(PID_DIR)/ganache.pid stop_ganache: $(PID_DIR)/ganache.pid @kill $(shell cat $<) && echo "Ganache process stopped." && rm $< || rm $< +# For local debug .PHONY: postgres postgres: - docker-compose up + docker run -e POSTGRES_HOST_AUTH_METHOD=trust -p 5432:5432 postgres:11-alpine .PHONY: test_restore test_restore: diff --git a/cmd/burrow/commands/dump.go b/cmd/burrow/commands/dump.go index d95f0cb9c..087fcb46d 100644 --- a/cmd/burrow/commands/dump.go +++ b/cmd/burrow/commands/dump.go @@ -71,7 +71,7 @@ func Dump(output Output) func(cmd *cli.Cmd) { } // Include all logging by default - logger, err := logconfig.New().NewLogger() + logger, err := logconfig.New().Logger() if err != nil { output.Fatalf("could not make logger: %v", err) } diff --git a/cmd/burrow/commands/vent.go b/cmd/burrow/commands/vent.go index 619f9459c..672b581e9 100644 --- a/cmd/burrow/commands/vent.go +++ b/cmd/burrow/commands/vent.go @@ -21,6 +21,26 @@ import ( cli "github.com/jawher/mow.cli" ) +type LogLevel string + +const ( + LogLevelNone LogLevel = "none" + LogLevelInfo LogLevel = "info" + LogLevelTrace LogLevel = "trace" +) + +func logConfig(level LogLevel) *logconfig.LoggingConfig { + logConf := logconfig.New() + switch level { + case LogLevelNone: + return logConf.None() + case LogLevelTrace: + return logConf.WithTrace() + default: + return logConf + } +} + // Vent consumes EVM events and commits to a DB func Vent(output Output) func(cmd *cli.Cmd) { return func(cmd *cli.Cmd) { @@ -32,7 +52,7 @@ func Vent(output Output) func(cmd *cli.Cmd) { dbOpts := sqlDBOpts(cmd, cfg) grpcAddrOpt := cmd.StringOpt("chain-addr", cfg.ChainAddress, "Address to connect to the Hyperledger Burrow gRPC server") httpAddrOpt := cmd.StringOpt("http-addr", cfg.HTTPListenAddress, "Address to bind the HTTP server") - logLevelOpt := cmd.StringOpt("log-level", cfg.LogLevel, "Logging level (error, warn, info, debug)") + logLevelOpt := cmd.StringOpt("log-level", string(LogLevelInfo), "Logging level (none, info, trace)") watchAddressesOpt := cmd.StringsOpt("watch", nil, "Add contract address to global watch filter") minimumHeightOpt := cmd.IntOpt("minimum-height", 0, "Only process block greater than or equal to height passed") abiFileOpt := cmd.StringsOpt("abi", cfg.AbiFileOrDirs, "EVM Contract ABI file or folder") @@ -49,7 +69,6 @@ func Vent(output Output) func(cmd *cli.Cmd) { cfg.DBSchema = *dbOpts.schema cfg.ChainAddress = *grpcAddrOpt cfg.HTTPListenAddress = *httpAddrOpt - cfg.LogLevel = *logLevelOpt cfg.WatchAddresses = make([]crypto.Address, len(*watchAddressesOpt)) cfg.MinimumHeight = uint64(*minimumHeightOpt) var err error @@ -83,14 +102,17 @@ func Vent(output Output) func(cmd *cli.Cmd) { "[--log-level] [--announce-every=]" cmd.Action = func() { - log, err := logconfig.New().NewLogger() + logger, err := logConfig(LogLevel(*logLevelOpt)).Logger() if err != nil { output.Fatalf("failed to load logger: %v", err) } - log = log.With("service", "vent") - consumer := service.NewConsumer(cfg, log, make(chan types.EventData)) - server := service.NewServer(cfg, log, consumer) + logger = logger.With("service", "vent") + consumer := service.NewConsumer(cfg, logger, make(chan types.EventData)) + if err != nil { + output.Fatalf("Could not create Vent Consumer: %v", err) + } + server := service.NewServer(cfg, logger, consumer) projection, err := sqlsol.SpecLoader(cfg.SpecFileOrDirs, cfg.SpecOpt) if err != nil { @@ -194,7 +216,7 @@ func Vent(output Output) func(cmd *cli.Cmd) { } cmd.Action = func() { - log, err := logconfig.New().NewLogger() + log, err := logconfig.New().Logger() if err != nil { output.Fatalf("failed to load logger: %v", err) } diff --git a/core/config.go b/core/config.go index 182454974..aa549168b 100644 --- a/core/config.go +++ b/core/config.go @@ -34,7 +34,7 @@ func (kern *Kernel) LoadKeysFromConfig(conf *keys.KeysConfig) (err error) { // LoadLoggerFromConfig adds a logging configuration to the kernel func (kern *Kernel) LoadLoggerFromConfig(conf *logconfig.LoggingConfig) error { - logger, err := conf.NewLogger() + logger, err := conf.Logger() kern.SetLogger(logger) return err } diff --git a/logging/logconfig/config.go b/logging/logconfig/config.go index 0b913de90..e4aa239ab 100644 --- a/logging/logconfig/config.go +++ b/logging/logconfig/config.go @@ -43,6 +43,16 @@ func New() *LoggingConfig { } } +func (lc *LoggingConfig) WithTrace() *LoggingConfig { + lc.Trace = true + return lc +} + +func (lc *LoggingConfig) None() *LoggingConfig { + lc.RootSink = nil + return lc +} + func (lc *LoggingConfig) Root(configure func(sink *SinkConfig) *SinkConfig) *LoggingConfig { lc.RootSink = configure(Sink()) return lc @@ -65,8 +75,16 @@ func (lc *LoggingConfig) JSONString() string { return JSONString(lc) } +func (lc *LoggingConfig) MustLogger() *logging.Logger { + logger, err := lc.Logger() + if err != nil { + panic(err) + } + return logger +} + // Obtain a logger from this LoggingConfig -func (lc *LoggingConfig) NewLogger() (*logging.Logger, error) { +func (lc *LoggingConfig) Logger() (*logging.Logger, error) { outputLogger, errCh, err := newLogger(lc) if err != nil { return nil, err diff --git a/logging/logconfig/sinks.go b/logging/logconfig/sinks.go index 2d7de7c91..08561a871 100644 --- a/logging/logconfig/sinks.go +++ b/logging/logconfig/sinks.go @@ -6,6 +6,7 @@ import ( "github.com/eapache/channels" "github.com/go-kit/kit/log" + "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/loggers" "github.com/hyperledger/burrow/logging/structure" ) @@ -159,19 +160,42 @@ func Sink() *SinkConfig { return &SinkConfig{} } -func (sinkConfig *SinkConfig) AddSinks(sinks ...*SinkConfig) *SinkConfig { - sinkConfig.Sinks = append(sinkConfig.Sinks, sinks...) - return sinkConfig +func (sc *SinkConfig) MustLogger() *logging.Logger { + return sc.LoggingConfig().MustLogger() } -func (sinkConfig *SinkConfig) SetTransform(transform *TransformConfig) *SinkConfig { - sinkConfig.Transform = transform - return sinkConfig +func (sc *SinkConfig) Logger() (*logging.Logger, error) { + return sc.LoggingConfig().Logger() } -func (sinkConfig *SinkConfig) SetOutput(output *OutputConfig) *SinkConfig { - sinkConfig.Output = output - return sinkConfig +// Wrap this sink as RootSink of LoggingCOnfig +func (sc *SinkConfig) LoggingConfig() *LoggingConfig { + lc := New() + lc.RootSink = sc + return lc +} + +func (sc *SinkConfig) AddSinks(sinks ...*SinkConfig) *SinkConfig { + sc.Sinks = append(sc.Sinks, sinks...) + return sc +} + +func (sc *SinkConfig) SetTransform(transform *TransformConfig) *SinkConfig { + sc.Transform = transform + return sc +} + +func (sc *SinkConfig) FilterScope(scope string) *SinkConfig { + return sc.SetTransform(FilterTransform(IncludeWhenAllMatch, structure.ScopeKey, scope)) +} + +func (sc *SinkConfig) Terminal() *SinkConfig { + return sc.SetOutput(StderrOutput().SetFormat(TerminalFormat)) +} + +func (sc *SinkConfig) SetOutput(output *OutputConfig) *SinkConfig { + sc.Output = output + return sc } func (outputConfig *OutputConfig) SetFormat(format string) *OutputConfig { @@ -298,8 +322,11 @@ func VectoriseTransform() *TransformConfig { } // Logger formation -func (sinkConfig *SinkConfig) BuildLogger() (log.Logger, map[string]*loggers.CaptureLogger, error) { - return BuildLoggerFromSinkConfig(sinkConfig, make(map[string]*loggers.CaptureLogger)) +func (sc *SinkConfig) BuildLogger() (log.Logger, map[string]*loggers.CaptureLogger, error) { + if sc == nil { + return log.NewNopLogger(), nil, nil + } + return BuildLoggerFromSinkConfig(sc, make(map[string]*loggers.CaptureLogger)) } func BuildLoggerFromSinkConfig(sinkConfig *SinkConfig, captures map[string]*loggers.CaptureLogger) (log.Logger, diff --git a/rpc/lib/rpc_test.go b/rpc/lib/rpc_test.go index 43b206123..18509579a 100644 --- a/rpc/lib/rpc_test.go +++ b/rpc/lib/rpc_test.go @@ -78,7 +78,7 @@ func TestMain(m *testing.M) { // launch unix and tcp servers func setup() { - logger, err := logconfig.New().NewLogger() + logger, err := logconfig.New().Logger() if err != nil { panic(err) } diff --git a/rpc/web3/ethclient/client.go b/rpc/web3/ethclient/client.go index 3ed6ee5fa..a5d93f488 100644 --- a/rpc/web3/ethclient/client.go +++ b/rpc/web3/ethclient/client.go @@ -29,81 +29,89 @@ const ( // Adjust the polling frequency of AwaitTransaction const awaitTransactionSleep = 200 * time.Millisecond -func EthSendTransaction(client rpc.Client, tx *EthSendTransactionParam) (string, error) { +type EthClient struct { + rpc.Client +} + +func NewEthClient(cli rpc.Client) *EthClient { + return &EthClient{Client: cli} +} + +func (c *EthClient) SendTransaction(tx *EthSendTransactionParam) (string, error) { hash := new(string) - err := client.Call(EthSendTransactionMethod, []*EthSendTransactionParam{tx}, &hash) + err := c.Call(EthSendTransactionMethod, []*EthSendTransactionParam{tx}, &hash) if err != nil { return "", err } return *hash, nil } -func EthSendRawTransaction(client rpc.Client, txHex string) (string, error) { +func (c *EthClient) SendRawTransaction(txHex string) (string, error) { hash := new(string) - err := client.Call(EthSendRawTransactionMethod, []string{txHex}, &hash) + err := c.Call(EthSendRawTransactionMethod, []string{txHex}, &hash) if err != nil { return "", err } return *hash, nil } -func EthGetTransactionCount(client rpc.Client, address crypto.Address) (string, error) { +func (c *EthClient) GetTransactionCount(address crypto.Address) (string, error) { var count string - err := client.Call(EthGetTransactionCountMethod, []string{web3.HexEncoder.Address(address), "latest"}, &count) + err := c.Call(EthGetTransactionCountMethod, []string{web3.HexEncoder.Address(address), "latest"}, &count) if err != nil { return "", err } return count, nil } -func EthGetLogs(client rpc.Client, filter *Filter) ([]*EthLog, error) { +func (c *EthClient) GetLogs(filter *Filter) ([]*EthLog, error) { var logs []*EthLog - err := client.Call(EthGetLogsMethod, []*EthFilter{filter.EthFilter()}, &logs) + err := c.Call(EthGetLogsMethod, []*EthFilter{filter.EthFilter()}, &logs) if err != nil { return nil, err } return logs, nil } -func EthAccounts(client rpc.Client) ([]string, error) { +func (c *EthClient) Accounts() ([]string, error) { var accounts []string - err := client.Call(EthAccountsMethod, nil, &accounts) + err := c.Call(EthAccountsMethod, nil, &accounts) if err != nil { return nil, err } return accounts, nil } -func EthGetTransactionByHash(client rpc.Client, txHash string) (*web3.Transaction, error) { +func (c *EthClient) GetTransactionByHash(txHash string) (*web3.Transaction, error) { tx := new(web3.Transaction) - err := client.Call(EthGetTransactionByHashMethod, []string{txHash}, tx) + err := c.Call(EthGetTransactionByHashMethod, []string{txHash}, tx) if err != nil { return nil, err } return tx, nil } -func EthGetTransactionReceipt(client rpc.Client, txHash string) (*Receipt, error) { +func (c *EthClient) GetTransactionReceipt(txHash string) (*Receipt, error) { tx := new(Receipt) - err := client.Call(EthGetTransactionReceiptMethod, []string{txHash}, tx) + err := c.Call(EthGetTransactionReceiptMethod, []string{txHash}, tx) if err != nil { return nil, err } return tx, nil } -func EthSyncing(client rpc.Client) (bool, error) { +func (c *EthClient) Syncing() (bool, error) { syncing := new(bool) - err := client.Call(EthSyncingMethod, nil, syncing) + err := c.Call(EthSyncingMethod, nil, syncing) if err != nil { return false, err } return *syncing, nil } -func EthBlockNumber(client rpc.Client) (uint64, error) { +func (c *EthClient) BlockNumber() (uint64, error) { latestBlock := new(string) - err := client.Call(EthBlockNumberMethod, nil, latestBlock) + err := c.Call(EthBlockNumberMethod, nil, latestBlock) if err != nil { return 0, err } @@ -111,9 +119,9 @@ func EthBlockNumber(client rpc.Client) (uint64, error) { return d.Uint64(*latestBlock), d.Err() } -func EthGasPrice(client rpc.Client) (string, error) { +func (c *EthClient) GasPrice() (string, error) { gasPrice := new(string) - err := client.Call(EthGasPriceMethod, nil, gasPrice) + err := c.Call(EthGasPriceMethod, nil, gasPrice) if err != nil { return "", err } @@ -121,18 +129,18 @@ func EthGasPrice(client rpc.Client) (string, error) { } // AKA ChainID -func NetVersion(client rpc.Client) (string, error) { +func (c *EthClient) NetVersion() (string, error) { version := new(string) - err := client.Call(NetVersionMethod, nil, version) + err := c.Call(NetVersionMethod, nil, version) if err != nil { return "", err } return *version, nil } -func Web3ClientVersion(client rpc.Client) (string, error) { +func (c *EthClient) Web3ClientVersion() (string, error) { version := new(string) - err := client.Call(Web3ClientVersionMethod, nil, version) + err := c.Call(Web3ClientVersionMethod, nil, version) if err != nil { return "", err } @@ -140,9 +148,9 @@ func Web3ClientVersion(client rpc.Client) (string, error) { } // Wait for a transaction to be mined/confirmed -func AwaitTransaction(ctx context.Context, client rpc.Client, txHash string) (*Receipt, error) { +func (c *EthClient) AwaitTransaction(ctx context.Context, txHash string) (*Receipt, error) { for { - tx, err := EthGetTransactionReceipt(client, txHash) + tx, err := c.GetTransactionReceipt(txHash) if err != nil { return nil, fmt.Errorf("AwaitTransaction failed to get ethereum transaction: %w", err) } @@ -164,7 +172,7 @@ func AwaitTransaction(ctx context.Context, client rpc.Client, txHash string) (*R } } -func ethLogBound(bound *rpcevents.Bound) string { +func logBound(bound *rpcevents.Bound) string { if bound == nil { return "" } diff --git a/rpc/web3/ethclient/client_test.go b/rpc/web3/ethclient/client_test.go index cd6ef2206..3e3cce827 100644 --- a/rpc/web3/ethclient/client_test.go +++ b/rpc/web3/ethclient/client_test.go @@ -17,10 +17,10 @@ import ( "github.com/stretchr/testify/require" ) -var client = web3test.GetChainRPCClient() +var client = NewEthClient(web3test.GetChainRPCClient()) func TestEthAccounts(t *testing.T) { - accounts, err := EthAccounts(client) + accounts, err := client.Accounts() require.NoError(t, err) fmt.Println(accounts) } @@ -34,15 +34,15 @@ func TestEthSendTransaction(t *testing.T) { Gas: web3.HexEncoder.Uint64(999999), Data: web3.HexEncoder.BytesTrim(solidity.Bytecode_EventEmitter), } - txHash, err := EthSendTransaction(client, param) + txHash, err := client.SendTransaction(param) require.NoError(t, err) require.NotEmpty(t, txHash) - tx, err := EthGetTransactionByHash(client, txHash) + tx, err := client.GetTransactionByHash(txHash) require.NoError(t, err) assert.Greater(t, d.Uint64(tx.BlockNumber), uint64(0)) - receipt, err := EthGetTransactionReceipt(client, txHash) + receipt, err := client.GetTransactionReceipt(txHash) require.NoError(t, err) assert.Equal(t, txHash, receipt.TransactionHash) @@ -51,12 +51,12 @@ func TestEthSendTransaction(t *testing.T) { func TestNonExistentTransaction(t *testing.T) { txHash := "0x990258f47aba0cf913c14cc101ddf5b589c04765429d5709f643c891442bfcf7" - receipt, err := EthGetTransactionReceipt(client, txHash) + receipt, err := client.GetTransactionReceipt(txHash) require.NoError(t, err) require.Equal(t, "", receipt.TransactionHash) require.Equal(t, "", receipt.BlockNumber) require.Equal(t, "", receipt.BlockHash) - tx, err := EthGetTransactionByHash(client, txHash) + tx, err := client.GetTransactionByHash(txHash) require.NoError(t, err) require.Equal(t, "", tx.Hash) require.Equal(t, "", tx.BlockNumber) @@ -72,7 +72,7 @@ func TestEthGetLogs(t *testing.T) { crypto.MustAddressFromHexString("f73aaa468496a87675d27638878a1600b0db3c71"), }, } - result, err := EthGetLogs(client, filter) + result, err := client.GetLogs(filter) require.NoError(t, err) bs, err := json.Marshal(result) require.NoError(t, err) @@ -80,25 +80,25 @@ func TestEthGetLogs(t *testing.T) { } func TestNetVersion(t *testing.T) { - chainID, err := NetVersion(client) + chainID, err := client.NetVersion() require.NoError(t, err) require.NotEmpty(t, chainID) } func TestWeb3ClientVersion(t *testing.T) { - version, err := Web3ClientVersion(client) + version, err := client.Web3ClientVersion() require.NoError(t, err) require.NotEmpty(t, version) } func TestEthSyncing(t *testing.T) { - result, err := EthSyncing(client) + result, err := client.Syncing() require.NoError(t, err) fmt.Printf("%#v\n", result) } func TestEthBlockNumber(t *testing.T) { - height, err := EthBlockNumber(client) + height, err := client.BlockNumber() require.NoError(t, err) require.Greater(t, height, uint64(0)) } diff --git a/rpc/web3/ethclient/transact_client.go b/rpc/web3/ethclient/transact_client.go index 2976e67cc..64bcaa8a4 100644 --- a/rpc/web3/ethclient/transact_client.go +++ b/rpc/web3/ethclient/transact_client.go @@ -7,7 +7,6 @@ import ( "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/rpc" "github.com/hyperledger/burrow/rpc/web3" "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" @@ -18,12 +17,21 @@ const BasicGasLimit = 21000 // Provides a partial implementation of the GRPC-generated TransactClient suitable for testing Vent on Ethereum type TransactClient struct { - client rpc.Client + client ethClient chainID string accounts []acm.AddressableSigner } -func NewTransactClient(client rpc.Client) *TransactClient { +type ethClient interface { + AwaitTransaction(ctx context.Context, txHash string) (*Receipt, error) + SendTransaction(tx *EthSendTransactionParam) (string, error) + SendRawTransaction(txHex string) (string, error) + GetTransactionCount(address crypto.Address) (string, error) + NetVersion() (string, error) + GasPrice() (string, error) +} + +func NewTransactClient(client ethClient) *TransactClient { return &TransactClient{ client: client, } @@ -48,7 +56,8 @@ func (cli *TransactClient) CallTxSync(ctx context.Context, tx *payload.CallTx, } } - err := cli.completeTx(tx) + // Only set nonce for tx we sign, otherwise let server do it + err := cli.completeTx(tx, signer != nil) if err != nil { return nil, fmt.Errorf("could not set values on transaction") } @@ -64,7 +73,7 @@ func (cli *TransactClient) CallTxSync(ctx context.Context, tx *payload.CallTx, } fmt.Printf("Waiting for tranasaction %s to be confirmed...\n", txHash) - receipt, err := AwaitTransaction(ctx, cli.client, txHash) + receipt, err := cli.client.AwaitTransaction(ctx, txHash) if err != nil { return nil, err } @@ -111,7 +120,7 @@ func (cli *TransactClient) SendTransaction(tx *payload.CallTx) (string, error) { Nonce: nonce, } - return EthSendTransaction(cli.client, param) + return cli.client.SendTransaction(param) } func (cli *TransactClient) SendRawTransaction(tx *payload.CallTx, signer acm.AddressableSigner) (string, error) { @@ -138,13 +147,13 @@ func (cli *TransactClient) SendRawTransaction(tx *payload.CallTx, signer acm.Add return "", fmt.Errorf("could not marshal Ethereum raw transaction: %w", err) } - return EthSendRawTransaction(cli.client, web3.HexEncoder.BytesTrim(bs)) + return cli.client.SendRawTransaction(web3.HexEncoder.BytesTrim(bs)) } func (cli *TransactClient) GetChainID() (string, error) { if cli.chainID == "" { var err error - cli.chainID, err = NetVersion(cli.client) + cli.chainID, err = cli.client.NetVersion() if err != nil { return "", fmt.Errorf("TransactClient could not get ChainID: %w", err) } @@ -153,7 +162,7 @@ func (cli *TransactClient) GetChainID() (string, error) { } func (cli *TransactClient) GetGasPrice() (uint64, error) { - gasPrice, err := EthGasPrice(cli.client) + gasPrice, err := cli.client.GasPrice() if err != nil { return 0, fmt.Errorf("could not get gas price: %w", err) } @@ -162,7 +171,7 @@ func (cli *TransactClient) GetGasPrice() (uint64, error) { } func (cli *TransactClient) GetTransactionCount(address crypto.Address) (uint64, error) { - count, err := EthGetTransactionCount(cli.client, address) + count, err := cli.client.GetTransactionCount(address) if err != nil { return 0, fmt.Errorf("could not get transaction acount for address %s: %w", address, err) } @@ -170,7 +179,7 @@ func (cli *TransactClient) GetTransactionCount(address crypto.Address) (uint64, return d.Uint64(count), d.Err() } -func (cli *TransactClient) completeTx(tx *payload.CallTx) error { +func (cli *TransactClient) completeTx(tx *payload.CallTx, setNonce bool) error { if tx.GasLimit == 0 { tx.GasLimit = BasicGasLimit } @@ -181,7 +190,7 @@ func (cli *TransactClient) completeTx(tx *payload.CallTx) error { return err } } - if tx.Input.Sequence == 0 { + if setNonce && tx.Input.Sequence == 0 { tx.Input.Sequence, err = cli.GetTransactionCount(tx.Input.Address) if err != nil { return err diff --git a/rpc/web3/ethclient/transact_client_test.go b/rpc/web3/ethclient/transact_client_test.go index b3f3db8e0..f77b4c88b 100644 --- a/rpc/web3/ethclient/transact_client_test.go +++ b/rpc/web3/ethclient/transact_client_test.go @@ -15,7 +15,7 @@ import ( func TestEthTransactClient_CallTxSync(t *testing.T) { pk := web3test.GetPrivateKey(t) - cli := NewTransactClient(web3test.GetChainRPCClient()).WithAccounts(pk) + cli := NewTransactClient(NewEthClient(web3test.GetChainRPCClient())).WithAccounts(pk) input := pk.GetAddress() gasPrice, err := cli.GetGasPrice() require.NoError(t, err) diff --git a/rpc/web3/ethclient/types.go b/rpc/web3/ethclient/types.go index 6458c5935..911569d41 100644 --- a/rpc/web3/ethclient/types.go +++ b/rpc/web3/ethclient/types.go @@ -62,8 +62,8 @@ func (f *Filter) EthFilter() *EthFilter { addresses[i] = web3.HexEncoder.Address(a) } return &EthFilter{ - FromBlock: ethLogBound(f.GetStart()), - ToBlock: ethLogBound(f.GetEnd()), + FromBlock: logBound(f.GetStart()), + ToBlock: logBound(f.GetEnd()), Addresses: addresses, Topics: topics, } diff --git a/vent/chain/burrow/burrow.go b/vent/chain/burrow/burrow.go index 463ff3ed9..407874356 100644 --- a/vent/chain/burrow/burrow.go +++ b/vent/chain/burrow/burrow.go @@ -11,7 +11,6 @@ import ( "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/encoding" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/rpc/rpcevents" @@ -33,11 +32,7 @@ type Chain struct { var _ chain.Chain = (*Chain)(nil) -func New(grpcAddr string, filter *chain.Filter) (*Chain, error) { - conn, err := encoding.GRPCDial(grpcAddr) - if err != nil { - return nil, err - } +func New(conn *grpc.ClientConn, filter *chain.Filter) (*Chain, error) { client := rpcquery.NewQueryClient(conn) status, err := client.Status(context.Background(), &rpcquery.StatusParam{}) if err != nil { diff --git a/vent/chain/ethereum/consumer.go b/vent/chain/ethereum/consumer.go index 446c19400..f798ba41e 100644 --- a/vent/chain/ethereum/consumer.go +++ b/vent/chain/ethereum/consumer.go @@ -10,20 +10,20 @@ import ( "github.com/hyperledger/burrow/rpc/lib/types" "github.com/pkg/errors" - "github.com/hyperledger/burrow/rpc" "github.com/hyperledger/burrow/rpc/rpcevents" "github.com/hyperledger/burrow/rpc/web3/ethclient" "github.com/hyperledger/burrow/vent/chain" ) +const EthereumConsumerScope = "EthereumConsumer" + const ( defaultMaxRetires = 5 - defaultMaxBlocks = 1000 backoffBase = 10 * time.Millisecond ) type consumer struct { - client rpc.Client + client EthClient filter *chain.Filter blockRange *rpcevents.BlockRange logger *logging.Logger @@ -37,18 +37,18 @@ type consumer struct { blockBatchSize uint64 } -func Consume(client rpc.Client, filter *chain.Filter, blockRange *rpcevents.BlockRange, logger *logging.Logger, - consume func(block chain.Block) error) error { +func Consume(client EthClient, filter *chain.Filter, blockRange *rpcevents.BlockRange, maxBlockBatchSize uint64, + logger *logging.Logger, consume func(block chain.Block) error) error { c := consumer{ client: client, filter: filter, blockRange: blockRange, - logger: logger, + logger: logger.WithScope(EthereumConsumerScope), consumer: consume, backoffDuration: backoffBase, maxRetries: defaultMaxRetires, - maxBlockBatchSize: defaultMaxBlocks, - blockBatchSize: defaultMaxBlocks, + maxBlockBatchSize: maxBlockBatchSize, + blockBatchSize: maxBlockBatchSize, } return c.Consume() } @@ -58,6 +58,7 @@ func (c *consumer) Consume() error { if err != nil { return err } + c.logger.TraceMsg("Consume", "start", start, "end", end, "streaming", streaming) for c.nextBlockHeight <= end || streaming { err = c.ConsumeInBatches(start, end) @@ -75,12 +76,14 @@ func (c *consumer) Consume() error { } func (c *consumer) ConsumeInBatches(start, end uint64) error { + c.logger.TraceMsg("ConsumeInBatches", "start", start, "end", end) for batchStart := start; batchStart <= end; batchStart += c.blockBatchSize { batchEnd := batchStart + c.blockBatchSize + c.logger.TraceMsg("Consuming batch", "batch_start", batchStart, "batch_end", batchEnd) if batchEnd > end { batchEnd = end } - logs, err := ethclient.EthGetLogs(c.client, ðclient.Filter{ + logs, err := c.client.GetLogs(ðclient.Filter{ BlockRange: rpcevents.AbsoluteRange(batchStart, batchEnd), Addresses: c.filter.Addresses, Topics: c.filter.Topics, @@ -102,6 +105,7 @@ func (c *consumer) ConsumeInBatches(start, end uint64) error { if lastBlock != nil { c.nextBlockHeight = lastBlock.GetHeight() + 1 } + c.logger.TraceMsg("Finished consuming batch", "next_block_height", c.nextBlockHeight) } return nil } @@ -109,7 +113,7 @@ func (c *consumer) ConsumeInBatches(start, end uint64) error { func (c *consumer) bounds() (start uint64, end uint64, streaming bool, err error) { var latestHeight uint64 - latestHeight, err = ethclient.EthBlockNumber(c.client) + latestHeight, err = c.client.BlockNumber() if err != nil { err = fmt.Errorf("could not get latest height: %w", err) return diff --git a/vent/chain/ethereum/ethereum.go b/vent/chain/ethereum/ethereum.go index 763157e95..5bed00420 100644 --- a/vent/chain/ethereum/ethereum.go +++ b/vent/chain/ethereum/ethereum.go @@ -17,14 +17,15 @@ import ( "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/rpc" "github.com/hyperledger/burrow/rpc/rpcevents" "github.com/hyperledger/burrow/vent/types" "google.golang.org/grpc/connectivity" ) +const DefaultMaxBlockBatchSize = 100 + type Chain struct { - client rpc.Client + client EthClient filter *chain.Filter chainID string version string @@ -33,13 +34,21 @@ type Chain struct { var _ chain.Chain = (*Chain)(nil) +type EthClient interface { + GetLogs(filter *ethclient.Filter) ([]*ethclient.EthLog, error) + BlockNumber() (uint64, error) + NetVersion() (string, error) + Web3ClientVersion() (string, error) + Syncing() (bool, error) +} + // We rely on this failing if the chain is not an Ethereum Chain -func New(client rpc.Client, filter *chain.Filter, logger *logging.Logger) (*Chain, error) { - chainID, err := ethclient.NetVersion(client) +func New(client EthClient, filter *chain.Filter, logger *logging.Logger) (*Chain, error) { + chainID, err := client.NetVersion() if err != nil { return nil, fmt.Errorf("could not get Ethereum ChainID: %w", err) } - version, err := ethclient.Web3ClientVersion(client) + version, err := client.Web3ClientVersion() if err != nil { return nil, fmt.Errorf("could not get Ethereum node version: %w", err) } @@ -75,12 +84,12 @@ func (c *Chain) GetChainID() string { } func (c *Chain) ConsumeBlocks(ctx context.Context, in *rpcevents.BlockRange, consumer func(chain.Block) error) error { - return Consume(c.client, c.filter, in, c.logger, consumer) + return Consume(c.client, c.filter, in, 3, c.logger, consumer) } func (c *Chain) Connectivity() connectivity.State { // TODO: better connectivity information - _, err := ethclient.EthSyncing(c.client) + _, err := c.client.Syncing() if err != nil { return connectivity.TransientFailure } diff --git a/vent/config/config.go b/vent/config/config.go index f35340b44..ca1733b0f 100644 --- a/vent/config/config.go +++ b/vent/config/config.go @@ -4,6 +4,7 @@ import ( "time" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/logging/logconfig" "github.com/hyperledger/burrow/vent/sqlsol" "github.com/hyperledger/burrow/vent/types" ) @@ -17,7 +18,7 @@ type VentConfig struct { DBSchema string ChainAddress string HTTPListenAddress string - LogLevel string + LogConfig *logconfig.LoggingConfig // Global contracts to watch specified as hex WatchAddresses []crypto.Address MinimumHeight uint64 @@ -36,7 +37,6 @@ func DefaultVentConfig() *VentConfig { DBSchema: "vent", ChainAddress: "localhost:10997", HTTPListenAddress: "0.0.0.0:8080", - LogLevel: "debug", SpecOpt: sqlsol.None, AnnounceEvery: time.Second * 5, } diff --git a/vent/service/consumer.go b/vent/service/consumer.go index 784fc540d..010d50f77 100644 --- a/vent/service/consumer.go +++ b/vent/service/consumer.go @@ -7,7 +7,9 @@ import ( "sync" "time" + "github.com/hyperledger/burrow/encoding" "github.com/hyperledger/burrow/rpc/lib/jsonrpc" + "github.com/hyperledger/burrow/rpc/web3/ethclient" "github.com/hyperledger/burrow/vent/chain/burrow" "github.com/hyperledger/burrow/vent/chain/ethereum" @@ -280,14 +282,27 @@ func (c *Consumer) connectToChain() (chain.Chain, error) { Addresses: c.Config.WatchAddresses, } c.Logger.InfoMsg("Attempting to detect chain type", "chain_address", c.Config.ChainAddress) - burrowChain, burrowErr := burrow.New(c.Config.ChainAddress, filter) - if burrowErr != nil { - ethereumChain, ethErr := ethereum.New(jsonrpc.NewClient(c.Config.ChainAddress), filter, c.Logger) - if ethErr != nil { - return nil, fmt.Errorf("could not connect to either Burrow or Ethereum chain, "+ - "Burrow error: %v, Ethereum error: %v", burrowErr, ethErr) - } - return ethereumChain, nil + burrowChain, burrowErr := dialBurrow(c.Config.ChainAddress, filter) + if burrowErr == nil { + return burrowChain, nil + } + ethChain, ethErr := dialEthereum(c.Config.ChainAddress, filter, c.Logger) + if ethErr != nil { + return nil, fmt.Errorf("could not connect to either Burrow or Ethereum chain, "+ + "Burrow error: %v, Ethereum error: %v", burrowErr, ethErr) + } + return ethChain, nil +} + +func dialBurrow(chainAddress string, filter *chain.Filter) (*burrow.Chain, error) { + conn, err := encoding.GRPCDial(chainAddress) + if err != nil { + return nil, err } - return burrowChain, nil + return burrow.New(conn, filter) +} + +func dialEthereum(chainAddress string, filter *chain.Filter, logger *logging.Logger) (*ethereum.Chain, error) { + client := ethclient.NewEthClient(jsonrpc.NewClient(chainAddress)) + return ethereum.New(client, filter, logger) } diff --git a/vent/service/consumer_ethereum_test.go b/vent/service/consumer_ethereum_test.go index 54dd50c46..eb217ac73 100644 --- a/vent/service/consumer_ethereum_test.go +++ b/vent/service/consumer_ethereum_test.go @@ -13,7 +13,7 @@ import ( func TestEthereumConsumer(t *testing.T) { pk := web3test.GetPrivateKey(t) - tcli := ethclient.NewTransactClient(web3test.GetChainRPCClient()) + tcli := ethclient.NewTransactClient(ethclient.NewEthClient(web3test.GetChainRPCClient())) chainID, err := tcli.GetChainID() require.NoError(t, err) testConsumer(t, chainID, test.PostgresVentConfig(web3test.GetChainRemote()), tcli, pk.GetAddress()) diff --git a/vent/service/consumer_integration_test.go b/vent/service/consumer_integration_test.go index 67974fe7e..b4a698588 100644 --- a/vent/service/consumer_integration_test.go +++ b/vent/service/consumer_integration_test.go @@ -7,18 +7,23 @@ import ( "math/rand" "path" "runtime" + "strconv" + "sync" "testing" "time" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/logging" + "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/logging/logconfig" "github.com/hyperledger/burrow/rpc/rpctransact" + "github.com/hyperledger/burrow/vent/chain/ethereum" "github.com/hyperledger/burrow/vent/config" "github.com/hyperledger/burrow/vent/service" "github.com/hyperledger/burrow/vent/sqldb" "github.com/hyperledger/burrow/vent/sqlsol" "github.com/hyperledger/burrow/vent/test" "github.com/hyperledger/burrow/vent/types" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -30,6 +35,9 @@ const ( var tables = types.DefaultSQLTableNames +// Tweak logger for debug purposes here +var logger = logconfig.Sink().Terminal().FilterScope(ethereum.EthereumConsumerScope).LoggingConfig().WithTrace().MustLogger() + func testConsumer(t *testing.T, chainID string, cfg *config.VentConfig, tcli test.TransactClient, inputAddress crypto.Address) { @@ -38,6 +46,7 @@ func testConsumer(t *testing.T, chainID string, cfg *config.VentConfig, tcli tes require.True(t, create.Receipt.CreatesContract) cfg.WatchAddresses = []crypto.Address{create.Receipt.ContractAddress} + // TODO: strengthen this test to count events in and out t.Run("view mode", func(t *testing.T) { // create test db db, closeDB := test.NewTestDB(t, cfg) @@ -64,7 +73,7 @@ func testConsumer(t *testing.T, chainID string, cfg *config.VentConfig, tcli tes // Run the consumer runConsumer(t, cfg) - // test data stored in database for two different block ids + // test data stored in database for two different block heights ensureEvents(t, db, chainID, eventTestTableName, txeA.Height, 1) eventData := ensureEvents(t, db, chainID, eventTestTableName, txeB.Height, 1) @@ -97,6 +106,43 @@ func testConsumer(t *testing.T, chainID string, cfg *config.VentConfig, tcli tes ensureEvents(t, db, chainID, eventTestTableName, txeC.Height, 2) }) + t.Run("continuity", func(t *testing.T) { + batches := 20 + batchSize := 5 + totalTx := batches * batchSize + db, closeDB := test.NewTestDB(t, cfg) + defer closeDB() + resolveSpec(cfg, testLogSpec) + + receipts := make(chan *exec.TxExecution, totalTx) + wg := new(sync.WaitGroup) + wg.Add(totalTx) + + for i := 0; i < batches; i++ { + for j := 0; j < batchSize; j++ { + name := fmt.Sprintf("Continuity_%d_%d", i, j) + go func() { + receipts <- test.CallAddEvent(t, tcli, inputAddress, create.Receipt.ContractAddress, name, "Blah") + wg.Done() + }() + } + } + + wg.Wait() + close(receipts) + runConsumer(t, cfg) + + txeByHeight := make(map[uint64][]*exec.TxExecution) + for txe := range receipts { + txeByHeight[txe.Height] = append(txeByHeight[txe.Height], txe) + } + + for height, txes := range txeByHeight { + ensureEvents(t, db, chainID, eventTestTableName, height, uint64(len(txes))) + } + + }) + } func testDeleteEvent(t *testing.T, chainID string, cfg *config.VentConfig, tcli rpctransact.TransactClient, inputAddress crypto.Address) { @@ -138,14 +184,31 @@ func ensureEvents(t *testing.T, db *sqldb.SQLDB, chainID, table string, height, // Check the number of rows tblData := eventData.Tables[table] - require.Equal(t, numEvents, uint64(len(tblData))) + if !assert.Equal(t, numEvents, uint64(len(tblData))) { + t.Fatal(logconfig.JSONString(tblData)) + } if numEvents > 0 && len(tblData) > 0 { // Expect data in the EventTest table require.Equal(t, "LogEvent", tblData[0].RowData["_eventtype"].(string)) require.Equal(t, "UpdateTestEvents", tblData[0].RowData["_eventname"].(string)) - for i := 0; i < len(tblData); i++ { - require.Equal(t, fmt.Sprintf("%d", i), tblData[i].RowData["_eventindex"].(string)) + lastTxIndex := "" + var eventIndex uint64 + for _, datum := range tblData { + txIndex := datum.RowData["_txindex"].(string) + if lastTxIndex != txIndex { + eventIndex = 0 + lastTxIndex = txIndex + } + + good := rowEqual(t, datum.RowData, "_height", height) && + rowEqual(t, datum.RowData, "_eventindex", eventIndex) + if !good { + t.Fatal(logconfig.JSONString(tblData)) + } + + assert.Equal(t, fmt.Sprintf("%d", height), datum.RowData["_height"]) + eventIndex++ } } else if numEvents > 0 && len(tblData) == 0 { require.Failf(t, "no events found", "expected %d", numEvents) @@ -154,6 +217,10 @@ func ensureEvents(t *testing.T, db *sqldb.SQLDB, chainID, table string, height, return eventData } +func rowEqual(t *testing.T, row map[string]interface{}, key string, expectedIndex uint64) bool { + return assert.Equal(t, strconv.FormatUint(expectedIndex, 10), row[key].(string)) +} + func testResume(t *testing.T, cfg *config.VentConfig) { _, closeDB := test.NewTestDB(t, cfg) defer closeDB() @@ -210,7 +277,7 @@ func resolveSpec(cfg *config.VentConfig, specFile string) { // Run consumer to listen to events func runConsumer(t *testing.T, cfg *config.VentConfig) chan types.EventData { ch := make(chan types.EventData, 100) - consumer := service.NewConsumer(cfg, logging.NewNoopLogger(), ch) + consumer := service.NewConsumer(cfg, logger, ch) projection, err := sqlsol.SpecLoader(cfg.SpecFileOrDirs, cfg.SpecOpt) require.NoError(t, err) From 295170c4b55710cef8fe593f9df139388cec2788 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Sat, 13 Mar 2021 14:18:59 +0100 Subject: [PATCH 170/185] Add Vent continuity test, BlockConsumerConfig and fix Ethereum hex codec BlockConsumerConfig parameterises retries and backoff. Continuity test ensures vent consumers read an exact cover of block batches (non-overlapping and complete) Also: - Made logging less painful to use for debug etc - Support block info from Ethereum Signed-off-by: Silas Davis --- Makefile | 2 +- cmd/burrow/commands/vent.go | 31 +++++++++--- crypto/signature_test.go | 16 ++++++ rpc/web3/ethclient/client.go | 10 ++++ rpc/web3/ethclient/client_test.go | 10 +++- rpc/web3/ethclient/types.go | 41 +++++++++++++++ rpc/web3/hex.go | 16 ++++-- rpc/web3/hex_test.go | 25 ++++++++++ vent/chain/burrow/burrow.go | 3 +- vent/chain/chain.go | 31 ++++++++++++ vent/chain/ethereum/consumer.go | 61 ++++++++++++----------- vent/chain/ethereum/consumer_test.go | 2 +- vent/chain/ethereum/ethereum.go | 54 +++++++++++++------- vent/config/config.go | 14 +++--- vent/service/consumer.go | 17 ++++--- vent/service/consumer_integration_test.go | 2 +- 16 files changed, 256 insertions(+), 79 deletions(-) create mode 100644 crypto/signature_test.go create mode 100644 rpc/web3/hex_test.go diff --git a/Makefile b/Makefile index 5d60ad882..10293a8ef 100644 --- a/Makefile +++ b/Makefile @@ -169,7 +169,7 @@ build_burrow_debug: .PHONY: install install: build_burrow mkdir -p ${BIN_PATH} - install -T ${REPO}/bin/burrow ${BIN_PATH}/burrow + install ${REPO}/bin/burrow ${BIN_PATH}/burrow # build burrow with checks for race conditions .PHONY: build_race_db diff --git a/cmd/burrow/commands/vent.go b/cmd/burrow/commands/vent.go index 672b581e9..106f8e249 100644 --- a/cmd/burrow/commands/vent.go +++ b/cmd/burrow/commands/vent.go @@ -55,6 +55,11 @@ func Vent(output Output) func(cmd *cli.Cmd) { logLevelOpt := cmd.StringOpt("log-level", string(LogLevelInfo), "Logging level (none, info, trace)") watchAddressesOpt := cmd.StringsOpt("watch", nil, "Add contract address to global watch filter") minimumHeightOpt := cmd.IntOpt("minimum-height", 0, "Only process block greater than or equal to height passed") + maxRetriesOpt := cmd.IntOpt("max-retries", int(cfg.BlockConsumerConfig.MaxRetries), "Maximum number of retries when consuming blocks") + backoffDurationOpt := cmd.StringOpt("backoff", "", + "The minimum duration to wait before asking for new blocks - increases exponentially when errors occur. Values like 200ms, 1s, 2m") + batchSizeOpt := cmd.IntOpt("batch-size", int(cfg.BlockConsumerConfig.MaxBlockBatchSize), + "The maximum number of blocks from which to request events in a single call - will reduce logarithmically to 1 when errors occur.") abiFileOpt := cmd.StringsOpt("abi", cfg.AbiFileOrDirs, "EVM Contract ABI file or folder") specFileOrDirOpt := cmd.StringsOpt("spec", cfg.SpecFileOrDirs, "SQLSol specification file or folder") dbBlockOpt := cmd.BoolOpt("blocks", false, "Create block tables and persist related data") @@ -63,6 +68,7 @@ func Vent(output Output) func(cmd *cli.Cmd) { announceEveryOpt := cmd.StringOpt("announce-every", "5s", "Announce vent status every period as a Go duration, e.g. 1ms, 3s, 1h") cmd.Before = func() { + var err error // Rather annoying boilerplate here... but there is no way to pass mow.cli a pointer for it to fill you value cfg.DBAdapter = *dbOpts.adapter cfg.DBURL = *dbOpts.url @@ -71,7 +77,12 @@ func Vent(output Output) func(cmd *cli.Cmd) { cfg.HTTPListenAddress = *httpAddrOpt cfg.WatchAddresses = make([]crypto.Address, len(*watchAddressesOpt)) cfg.MinimumHeight = uint64(*minimumHeightOpt) - var err error + cfg.BlockConsumerConfig.MaxRetries = uint64(*maxRetriesOpt) + cfg.BlockConsumerConfig.BaseBackoffDuration, err = parseDuration(*backoffDurationOpt) + if err != nil { + output.Fatalf("could not parse backoff duration: %w", err) + } + cfg.BlockConsumerConfig.MaxBlockBatchSize = uint64(*batchSizeOpt) for i, wa := range *watchAddressesOpt { cfg.WatchAddresses[i], err = crypto.AddressFromHexString(wa) if err != nil { @@ -87,17 +98,16 @@ func Vent(output Output) func(cmd *cli.Cmd) { cfg.SpecOpt |= sqlsol.Tx } - if *announceEveryOpt != "" { - var err error - cfg.AnnounceEvery, err = time.ParseDuration(*announceEveryOpt) - if err != nil { - output.Fatalf("could not parse announce-every duration %s: %v", *announceEveryOpt, err) - } + cfg.AnnounceEvery, err = parseDuration(*announceEveryOpt) + if err != nil { + output.Fatalf("could not parse announce-every duration %s: %v", *announceEveryOpt, err) } } cmd.Spec = "--spec=... [--abi=...] " + "[--watch=...] [--minimum-height=] " + + "[--max-retries=] [--backoff=] " + + "[--batch-size=] " + "[--db-adapter] [--db-url] [--db-schema] [--blocks] [--txs] [--chain-addr] [--http-addr] " + "[--log-level] [--announce-every=]" @@ -252,6 +262,13 @@ func Vent(output Output) func(cmd *cli.Cmd) { } } +func parseDuration(duration string) (time.Duration, error) { + if duration == "" { + return 0, nil + } + return time.ParseDuration(duration) +} + type dbOpts struct { adapter *string url *string diff --git a/crypto/signature_test.go b/crypto/signature_test.go new file mode 100644 index 000000000..4e6dae626 --- /dev/null +++ b/crypto/signature_test.go @@ -0,0 +1,16 @@ +package crypto + +import ( + "fmt" + "math/big" + "testing" +) + +func TestGetEthChainID(t *testing.T) { + chainIDString := "BurrowChain_FAB3C1-AB0FD1" + chainID := GetEthChainID(chainIDString) + b := new(big.Int).SetBytes([]byte(chainIDString)) + fmt.Println(b) + fmt.Println(chainID) + fmt.Printf("%X", chainID.Bytes()) +} diff --git a/rpc/web3/ethclient/client.go b/rpc/web3/ethclient/client.go index a5d93f488..99365c263 100644 --- a/rpc/web3/ethclient/client.go +++ b/rpc/web3/ethclient/client.go @@ -19,6 +19,7 @@ const ( EthSendRawTransactionMethod = "eth_sendRawTransaction" EthGetTransactionCountMethod = "eth_getTransactionCount" EthAccountsMethod = "eth_accounts" + EthGetBlockByNumberMethod = "eth_getBlockByNumber" EthGetTransactionByHashMethod = "eth_getTransactionByHash" EthGetTransactionReceiptMethod = "eth_getTransactionReceipt" EthGasPriceMethod = "eth_gasPrice" @@ -82,6 +83,15 @@ func (c *EthClient) Accounts() ([]string, error) { return accounts, nil } +func (c *EthClient) GetBlockByNumber(height string) (*Block, error) { + block := new(Block) + err := c.Call(EthGetBlockByNumberMethod, []interface{}{height, false}, block) + if err != nil { + return nil, err + } + return block, nil +} + func (c *EthClient) GetTransactionByHash(txHash string) (*web3.Transaction, error) { tx := new(web3.Transaction) err := c.Call(EthGetTransactionByHashMethod, []string{txHash}, tx) diff --git a/rpc/web3/ethclient/client_test.go b/rpc/web3/ethclient/client_test.go index 3e3cce827..b155e2b4e 100644 --- a/rpc/web3/ethclient/client_test.go +++ b/rpc/web3/ethclient/client_test.go @@ -63,7 +63,7 @@ func TestNonExistentTransaction(t *testing.T) { require.Equal(t, "", tx.BlockHash) } -func TestEthGetLogs(t *testing.T) { +func TestEthClient_GetLogs(t *testing.T) { // TODO: make this test generate its own fixutres filter := &Filter{ BlockRange: rpcevents.AbsoluteRange(1, 34340), @@ -79,6 +79,14 @@ func TestEthGetLogs(t *testing.T) { fmt.Printf("%s\n", string(bs)) } +func TestEthClient_GetBlockByNumber(t *testing.T) { + block, err := client.GetBlockByNumber("latest") + require.NoError(t, err) + d := new(web3.HexDecoder) + assert.Greater(t, d.Uint64(block.Number), uint64(0)) + require.NoError(t, d.Err()) +} + func TestNetVersion(t *testing.T) { chainID, err := client.NetVersion() require.NoError(t, err) diff --git a/rpc/web3/ethclient/types.go b/rpc/web3/ethclient/types.go index 911569d41..295adec0e 100644 --- a/rpc/web3/ethclient/types.go +++ b/rpc/web3/ethclient/types.go @@ -107,3 +107,44 @@ type EthFilter struct { // Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with 'or' options Topics []string `json:"topics,omitempty"` } + +type Block struct { + // Hex representation of a Keccak 256 hash + Sha3Uncles string `json:"sha3Uncles"` + // Hex representation of a Keccak 256 hash + TransactionsRoot string `json:"transactionsRoot"` + // Hex representation of a Keccak 256 hash + ParentHash string `json:"parentHash"` + // The address of the beneficiary to whom the mining rewards were given or null when its the pending block + Miner string `json:"miner"` + // Integer of the difficulty for this block + Difficulty string `json:"difficulty"` + // The total used gas by all transactions in this block + GasUsed string `json:"gasUsed"` + // The unix timestamp for when the block was collated + Timestamp string `json:"timestamp"` + // Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter + Transactions []string `json:"transactions"` + // The block number or null when its the pending block + Number string `json:"number"` + // The block hash or null when its the pending block + Hash string `json:"hash"` + // Array of uncle hashes + Uncles []string `json:"uncles"` + // Hex representation of a Keccak 256 hash + ReceiptsRoot string `json:"receiptsRoot"` + // The 'extra data' field of this block + ExtraData string `json:"extraData"` + // Hex representation of a Keccak 256 hash + StateRoot string `json:"stateRoot"` + // Integer of the total difficulty of the chain until this block + TotalDifficulty string `json:"totalDifficulty"` + // Integer the size of this block in bytes + Size string `json:"size"` + // The maximum gas allowed in this block + GasLimit string `json:"gasLimit"` + // Randomly selected number to satisfy the proof-of-work or null when its the pending block + Nonce string `json:"nonce"` + // The bloom filter for the logs of the block or null when its the pending block + LogsBloom string `json:"logsBloom"` +} diff --git a/rpc/web3/hex.go b/rpc/web3/hex.go index 2e7163090..4822ce0a8 100644 --- a/rpc/web3/hex.go +++ b/rpc/web3/hex.go @@ -1,7 +1,6 @@ package web3 import ( - "bytes" bin "encoding/binary" "fmt" "math/big" @@ -69,6 +68,14 @@ func (d *HexDecoder) Uint64(hs string) uint64 { return bi.Uint64() } +func (d *HexDecoder) Int64(hs string) int64 { + bi := d.BigInt(hs) + if !bi.IsInt64() { + d.pushErr(fmt.Errorf("%v is not int64", bi)) + } + return bi.Int64() +} + type hexEncoder struct { } @@ -82,13 +89,14 @@ func (e *hexEncoder) BytesTrim(bs []byte) string { if len(bs) == 0 { return "" } + str := hex.EncodeToString(bs) // Ethereum expects leading zeros to be removed from RLP encodings (SMH) - bs = bytes.TrimLeft(bs, "\x00") - if len(bs) == 0 { + str = strings.TrimLeft(str, "0") + if len(str) == 0 { // Special case for zero return "0x0" } - return e.Bytes(bs) + return "0x" + str } func (e *hexEncoder) BigInt(x big.Int) string { diff --git a/rpc/web3/hex_test.go b/rpc/web3/hex_test.go new file mode 100644 index 000000000..9dcb32a6f --- /dev/null +++ b/rpc/web3/hex_test.go @@ -0,0 +1,25 @@ +package web3 + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestHexEncoder_BytesTrim(t *testing.T) { + assert.Equal(t, "", HexEncoder.BytesTrim(nil)) + assert.Equal(t, "", HexEncoder.BytesTrim([]byte{})) + assert.Equal(t, "0x0", HexEncoder.BytesTrim([]byte{0})) + assert.Equal(t, "0x1", HexEncoder.BytesTrim([]byte{1})) + assert.Equal(t, "0x1ff", HexEncoder.BytesTrim([]byte{1, 255})) +} + +func TestHexDecoder_Bytes(t *testing.T) { + d := new(HexDecoder) + assert.Equal(t, []byte{}, d.Bytes("")) + assert.Equal(t, []byte{1}, d.Bytes("0x1")) + assert.Equal(t, []byte{1}, d.Bytes("0x01")) + assert.Equal(t, []byte{1, 0xff}, d.Bytes("0x1ff")) + require.NoError(t, d.Err()) +} diff --git a/vent/chain/burrow/burrow.go b/vent/chain/burrow/burrow.go index 407874356..4c67afb8a 100644 --- a/vent/chain/burrow/burrow.go +++ b/vent/chain/burrow/burrow.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "strconv" "github.com/hyperledger/burrow/event" "github.com/hyperledger/burrow/event/query" @@ -140,7 +141,7 @@ func (b *Block) GetMetadata(columns types.SQLColumnNames) (map[string]interface{ } return map[string]interface{}{ - columns.Height: fmt.Sprintf("%v", b.Height), + columns.Height: strconv.FormatUint(b.Height, 10), columns.TimeStamp: b.Header.GetTime(), columns.BlockHeader: string(blockHeader), }, nil diff --git a/vent/chain/chain.go b/vent/chain/chain.go index b461484c7..3ba965a78 100644 --- a/vent/chain/chain.go +++ b/vent/chain/chain.go @@ -4,6 +4,7 @@ package chain import ( "context" + "time" "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" @@ -14,6 +15,12 @@ import ( "google.golang.org/grpc/connectivity" ) +const ( + defaultMaxRetires = 5 + defaultBackoffBase = 250 * time.Millisecond + defaultMaxBlockBatchSize = 100 +) + type Chain interface { GetChainID() string GetVersion() string @@ -61,3 +68,27 @@ type Origin struct { // The original index in the block Index uint64 } + +// Client-side block consumer configuration. Requests are retried subject to backoff if a non-fatal error is detected +type BlockConsumerConfig struct { + // The base backoff - we wait this amount of time between each batch and we increase the backoff exponentially + // until we reach MaxRetries from BaseBackoffDuration + BaseBackoffDuration time.Duration + // The maximum number of retries before failing + MaxRetries uint64 + // The default and maximum batch size for block requests, we will reduce it logarithmically to a single block + // when backing off + MaxBlockBatchSize uint64 +} + +func (config *BlockConsumerConfig) Complete() { + if config.MaxBlockBatchSize == 0 { + config.MaxBlockBatchSize = defaultMaxBlockBatchSize + } + if config.BaseBackoffDuration == 0 { + config.BaseBackoffDuration = defaultBackoffBase + } + if config.MaxRetries == 0 { + config.MaxRetries = defaultMaxRetires + } +} diff --git a/vent/chain/ethereum/consumer.go b/vent/chain/ethereum/consumer.go index f798ba41e..36f2bec6b 100644 --- a/vent/chain/ethereum/consumer.go +++ b/vent/chain/ethereum/consumer.go @@ -15,12 +15,7 @@ import ( "github.com/hyperledger/burrow/vent/chain" ) -const EthereumConsumerScope = "EthereumConsumer" - -const ( - defaultMaxRetires = 5 - backoffBase = 10 * time.Millisecond -) +const ConsumerScope = "EthereumConsumer" type consumer struct { client EthClient @@ -29,26 +24,28 @@ type consumer struct { logger *logging.Logger consumer func(block chain.Block) error // Next unconsumed height - nextBlockHeight uint64 - retries uint64 - backoffDuration time.Duration - maxRetries uint64 - maxBlockBatchSize uint64 - blockBatchSize uint64 + nextBlockHeight uint64 + retries uint64 + baseBackoffDuration time.Duration + backoffDuration time.Duration + maxRetries uint64 + maxBlockBatchSize uint64 + blockBatchSize uint64 } -func Consume(client EthClient, filter *chain.Filter, blockRange *rpcevents.BlockRange, maxBlockBatchSize uint64, +func Consume(client EthClient, filter *chain.Filter, blockRange *rpcevents.BlockRange, config *chain.BlockConsumerConfig, logger *logging.Logger, consume func(block chain.Block) error) error { c := consumer{ - client: client, - filter: filter, - blockRange: blockRange, - logger: logger.WithScope(EthereumConsumerScope), - consumer: consume, - backoffDuration: backoffBase, - maxRetries: defaultMaxRetires, - maxBlockBatchSize: maxBlockBatchSize, - blockBatchSize: maxBlockBatchSize, + client: client, + filter: filter, + blockRange: blockRange, + logger: logger.WithScope(ConsumerScope), + consumer: consume, + baseBackoffDuration: config.BaseBackoffDuration, + backoffDuration: config.BaseBackoffDuration, + maxRetries: config.MaxRetries, + maxBlockBatchSize: config.MaxBlockBatchSize, + blockBatchSize: config.MaxBlockBatchSize, } return c.Consume() } @@ -98,7 +95,7 @@ func (c *consumer) ConsumeInBatches(start, end uint64) error { } // Request was successful c.recover() - lastBlock, err := consumeBlocksFromLogs(logs, c.consumer) + lastBlock, err := consumeBlocksFromLogs(c.client, logs, c.consumer) if err != nil { return fmt.Errorf("could not consume ethereum logs: %w", err) } @@ -132,10 +129,13 @@ func (c *consumer) handleError(end uint64, err error) error { // If we have a custom server error maybe our batch size is too large or maybe we should wait if rpcError.IsServerError() { c.retries++ + c.logger.InfoMsg("caught Ethereum server error, backing off...", + structure.ErrorKey, err, "retry", c.retries, "backoff", c.backoffDuration.String()) if c.retries <= c.maxRetries { // Server may throw if batch too large or request takes too long c.backoff() - c.logger.InfoMsg("Ethereum block consumer retrying after Ethereum Server Error", structure.ErrorKey, rpcError) + c.logger.InfoMsg("Ethereum block consumer retrying after Ethereum Server Error", + structure.ErrorKey, rpcError) return c.ConsumeInBatches(c.nextBlockHeight, end) } } @@ -162,24 +162,25 @@ func (c *consumer) recover() { c.blockBatchSize += delta } // Reset retries and backoff - c.backoffDuration = backoffBase + c.backoffDuration = c.baseBackoffDuration c.retries = 0 } -func consumeBlocksFromLogs(logs []*ethclient.EthLog, consumer func(block chain.Block) error) (chain.Block, error) { +func consumeBlocksFromLogs(client EthClient, logs []*ethclient.EthLog, + consumer func(block chain.Block) error) (chain.Block, error) { if len(logs) == 0 { return nil, nil } - log, err := NewEthereumEvent(logs[0]) + log, err := newEvent(logs[0]) if err != nil { return nil, fmt.Errorf("could not deserialise ethereum event: %w", err) } - block := NewEthereumBlock(log) + block := newBlock(client, log) txHash := log.TransactionHash indexInBlock := log.IndexInBlock for i := 1; i < len(logs); i++ { - log, err = NewEthereumEvent(logs[i]) + log, err = newEvent(logs[i]) if err != nil { return nil, fmt.Errorf("could not deserialise ethereum event: %w", err) } @@ -190,7 +191,7 @@ func consumeBlocksFromLogs(logs []*ethclient.EthLog, consumer func(block chain.B return nil, err } // Establish new block - block = NewEthereumBlock(log) + block = newBlock(client, log) } else { if log.IndexInBlock <= indexInBlock { return nil, fmt.Errorf("event LogIndex is non-increasing within block, "+ diff --git a/vent/chain/ethereum/consumer_test.go b/vent/chain/ethereum/consumer_test.go index 4201839b0..f2661da61 100644 --- a/vent/chain/ethereum/consumer_test.go +++ b/vent/chain/ethereum/consumer_test.go @@ -15,7 +15,7 @@ func TestConsumeBlocks(t *testing.T) { err := json.Unmarshal([]byte(ethLogsJSON), &logs) require.NoError(t, err) var blocks []chain.Block - lastBlock, err := consumeBlocksFromLogs(logs, func(block chain.Block) error { + lastBlock, err := consumeBlocksFromLogs(nil, logs, func(block chain.Block) error { blocks = append(blocks, block) return nil }) diff --git a/vent/chain/ethereum/ethereum.go b/vent/chain/ethereum/ethereum.go index 5bed00420..89182611b 100644 --- a/vent/chain/ethereum/ethereum.go +++ b/vent/chain/ethereum/ethereum.go @@ -2,8 +2,11 @@ package ethereum import ( "context" + "encoding/json" "fmt" "reflect" + "strconv" + "time" "github.com/hyperledger/burrow/event" "github.com/hyperledger/burrow/event/query" @@ -22,14 +25,13 @@ import ( "google.golang.org/grpc/connectivity" ) -const DefaultMaxBlockBatchSize = 100 - type Chain struct { - client EthClient - filter *chain.Filter - chainID string - version string - logger *logging.Logger + client EthClient + filter *chain.Filter + chainID string + version string + consumerConfig *chain.BlockConsumerConfig + logger *logging.Logger } var _ chain.Chain = (*Chain)(nil) @@ -37,13 +39,15 @@ var _ chain.Chain = (*Chain)(nil) type EthClient interface { GetLogs(filter *ethclient.Filter) ([]*ethclient.EthLog, error) BlockNumber() (uint64, error) + GetBlockByNumber(height string) (*ethclient.Block, error) NetVersion() (string, error) Web3ClientVersion() (string, error) Syncing() (bool, error) } // We rely on this failing if the chain is not an Ethereum Chain -func New(client EthClient, filter *chain.Filter, logger *logging.Logger) (*Chain, error) { +func New(client EthClient, filter *chain.Filter, consumerConfig *chain.BlockConsumerConfig, + logger *logging.Logger) (*Chain, error) { chainID, err := client.NetVersion() if err != nil { return nil, fmt.Errorf("could not get Ethereum ChainID: %w", err) @@ -53,11 +57,12 @@ func New(client EthClient, filter *chain.Filter, logger *logging.Logger) (*Chain return nil, fmt.Errorf("could not get Ethereum node version: %w", err) } return &Chain{ - client: client, - filter: filter, - chainID: chainID, - version: version, - logger: logger, + client: client, + filter: filter, + chainID: chainID, + version: version, + consumerConfig: consumerConfig, + logger: logger, }, nil } @@ -84,7 +89,7 @@ func (c *Chain) GetChainID() string { } func (c *Chain) ConsumeBlocks(ctx context.Context, in *rpcevents.BlockRange, consumer func(chain.Block) error) error { - return Consume(c.client, c.filter, in, 3, c.logger, consumer) + return Consume(c.client, c.filter, in, c.consumerConfig, c.logger, consumer) } func (c *Chain) Connectivity() connectivity.State { @@ -102,12 +107,14 @@ func (c *Chain) Close() error { } type Block struct { + client EthClient Height uint64 Transactions []chain.Transaction } -func NewEthereumBlock(log *Event) *Block { +func newBlock(client EthClient, log *Event) *Block { return &Block{ + client: client, Height: log.Height, Transactions: []chain.Transaction{NewEthereumTransaction(log)}, } @@ -124,9 +131,20 @@ func (b *Block) GetTxs() []chain.Transaction { } func (b *Block) GetMetadata(columns types.SQLColumnNames) (map[string]interface{}, error) { + block, err := b.client.GetBlockByNumber(web3.HexEncoder.Uint64(b.Height)) + if err != nil { + return nil, err + } + d := new(web3.HexDecoder) + blockHeader, err := json.Marshal(block) + if err != nil { + return nil, fmt.Errorf("could not serialise block header: %w", err) + } return map[string]interface{}{ - columns.Height: fmt.Sprintf("%v", b.Height), - }, nil + columns.Height: strconv.FormatUint(b.Height, 10), + columns.TimeStamp: time.Unix(d.Int64(block.Timestamp), 0), + columns.BlockHeader: string(blockHeader), + }, d.Err() } func (b *Block) appendTransaction(log *Event) { @@ -204,7 +222,7 @@ type Event struct { var _ chain.Event = (*Event)(nil) -func NewEthereumEvent(log *ethclient.EthLog) (*Event, error) { +func newEvent(log *ethclient.EthLog) (*Event, error) { d := new(web3.HexDecoder) topics := make([]binary.Word256, len(log.Topics)) for i, t := range log.Topics { diff --git a/vent/config/config.go b/vent/config/config.go index ca1733b0f..2fa64fb75 100644 --- a/vent/config/config.go +++ b/vent/config/config.go @@ -4,7 +4,7 @@ import ( "time" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/logging/logconfig" + "github.com/hyperledger/burrow/vent/chain" "github.com/hyperledger/burrow/vent/sqlsol" "github.com/hyperledger/burrow/vent/types" ) @@ -13,12 +13,12 @@ const DefaultPostgresDBURL = "postgres://postgres@localhost:5432/postgres?sslmod // VentConfig is a set of configuration parameters type VentConfig struct { - DBAdapter string - DBURL string - DBSchema string - ChainAddress string - HTTPListenAddress string - LogConfig *logconfig.LoggingConfig + DBAdapter string + DBURL string + DBSchema string + ChainAddress string + HTTPListenAddress string + BlockConsumerConfig chain.BlockConsumerConfig // Global contracts to watch specified as hex WatchAddresses []crypto.Address MinimumHeight uint64 diff --git a/vent/service/consumer.go b/vent/service/consumer.go index 010d50f77..aba486553 100644 --- a/vent/service/consumer.go +++ b/vent/service/consumer.go @@ -8,15 +8,14 @@ import ( "time" "github.com/hyperledger/burrow/encoding" - "github.com/hyperledger/burrow/rpc/lib/jsonrpc" - "github.com/hyperledger/burrow/rpc/web3/ethclient" - "github.com/hyperledger/burrow/vent/chain/burrow" - "github.com/hyperledger/burrow/vent/chain/ethereum" - "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/structure" + "github.com/hyperledger/burrow/rpc/lib/jsonrpc" "github.com/hyperledger/burrow/rpc/rpcevents" + "github.com/hyperledger/burrow/rpc/web3/ethclient" "github.com/hyperledger/burrow/vent/chain" + "github.com/hyperledger/burrow/vent/chain/burrow" + "github.com/hyperledger/burrow/vent/chain/ethereum" "github.com/hyperledger/burrow/vent/config" "github.com/hyperledger/burrow/vent/sqldb" "github.com/hyperledger/burrow/vent/sqlsol" @@ -42,6 +41,7 @@ type Consumer struct { // The event channel will be passed a collection of rows generated from all of the events in a single block // It will be closed by the consumer when it is finished func NewConsumer(cfg *config.VentConfig, log *logging.Logger, eventChannel chan types.EventData) *Consumer { + cfg.BlockConsumerConfig.Complete() return &Consumer{ Config: cfg, Logger: log, @@ -286,7 +286,7 @@ func (c *Consumer) connectToChain() (chain.Chain, error) { if burrowErr == nil { return burrowChain, nil } - ethChain, ethErr := dialEthereum(c.Config.ChainAddress, filter, c.Logger) + ethChain, ethErr := dialEthereum(c.Config.ChainAddress, filter, &c.Config.BlockConsumerConfig, c.Logger) if ethErr != nil { return nil, fmt.Errorf("could not connect to either Burrow or Ethereum chain, "+ "Burrow error: %v, Ethereum error: %v", burrowErr, ethErr) @@ -302,7 +302,8 @@ func dialBurrow(chainAddress string, filter *chain.Filter) (*burrow.Chain, error return burrow.New(conn, filter) } -func dialEthereum(chainAddress string, filter *chain.Filter, logger *logging.Logger) (*ethereum.Chain, error) { +func dialEthereum(chainAddress string, filter *chain.Filter, consumerConfig *chain.BlockConsumerConfig, + logger *logging.Logger) (*ethereum.Chain, error) { client := ethclient.NewEthClient(jsonrpc.NewClient(chainAddress)) - return ethereum.New(client, filter, logger) + return ethereum.New(client, filter, consumerConfig, logger) } diff --git a/vent/service/consumer_integration_test.go b/vent/service/consumer_integration_test.go index b4a698588..52154a9fb 100644 --- a/vent/service/consumer_integration_test.go +++ b/vent/service/consumer_integration_test.go @@ -36,7 +36,7 @@ const ( var tables = types.DefaultSQLTableNames // Tweak logger for debug purposes here -var logger = logconfig.Sink().Terminal().FilterScope(ethereum.EthereumConsumerScope).LoggingConfig().WithTrace().MustLogger() +var logger = logconfig.Sink().Terminal().FilterScope(ethereum.ConsumerScope).LoggingConfig().WithTrace().MustLogger() func testConsumer(t *testing.T, chainID string, cfg *config.VentConfig, tcli test.TransactClient, inputAddress crypto.Address) { From 5c4f05267abf684484256cc9050fe3f536376466 Mon Sep 17 00:00:00 2001 From: bzp99 Date: Mon, 15 Mar 2021 16:29:54 +0100 Subject: [PATCH 171/185] Always use /usr/bin/env bash instead of /bin/bash This ensures portability with some operating systems, such as OpenBSD, where bash, installed as a port/package resides in /usr/local/bin/. Signed-off-by: bzp99 --- Makefile | 2 +- js/test.sh | 2 +- scripts/version.sh | 2 +- tests/dump/test.sh | 2 +- tests/keys_server/test.sh | 2 +- tests/web3/truffle.sh | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 10293a8ef..1bceec498 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ # ---------------------------------------------------------- -SHELL := /bin/bash +SHELL := /usr/bin/env bash REPO := $(shell pwd) # Our own Go files containing the compiled bytecode of solidity files as a constant diff --git a/js/test.sh b/js/test.sh index 3f91140f6..4392a0c2b 100755 --- a/js/test.sh +++ b/js/test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export this="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "$this/../tests/test_runner.sh" diff --git a/scripts/version.sh b/scripts/version.sh index 19fa2a9f6..fecc25655 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail IFS=$'\n\t' diff --git a/tests/dump/test.sh b/tests/dump/test.sh index 2f40fcee6..c9ef25486 100755 --- a/tests/dump/test.sh +++ b/tests/dump/test.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/usr/bin/env bash # Test the dump restore functionality # diff --git a/tests/keys_server/test.sh b/tests/keys_server/test.sh index 0418d6b7e..f4d0471a9 100755 --- a/tests/keys_server/test.sh +++ b/tests/keys_server/test.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/usr/bin/env bash # tests # run the suite with and without the daemon diff --git a/tests/web3/truffle.sh b/tests/web3/truffle.sh index 93564d6e4..593d4d40a 100755 --- a/tests/web3/truffle.sh +++ b/tests/web3/truffle.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash chain=$(mktemp -d) cd $chain @@ -30,4 +30,4 @@ module.exports = { } }; EOF -truffle test --network burrow \ No newline at end of file +truffle test --network burrow From 55661e6e411f8c58f3d6ce9fc767f750219cf7f0 Mon Sep 17 00:00:00 2001 From: bzp99 Date: Mon, 15 Mar 2021 16:34:01 +0100 Subject: [PATCH 172/185] Improve head command portability * head -count is obsolete syntax, switched to -n count * head -c is not portable, better use dd which works everywhere Signed-off-by: bzp99 --- scripts/commit_hash.sh | 2 +- tests/dump/test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/commit_hash.sh b/scripts/commit_hash.sh index cd20bcb14..ae8206881 100755 --- a/scripts/commit_hash.sh +++ b/scripts/commit_hash.sh @@ -4,7 +4,7 @@ commit=$(git describe --tags) dirty=$(git ls-files -m) if [[ -n ${dirty} ]]; then - commit="$commit+dirty.$(echo ${dirty} | git hash-object --stdin | head -c8)" + commit="$commit+dirty.$(echo ${dirty} | git hash-object --stdin | dd bs=8 count=1 status=none)" fi echo "$commit" diff --git a/tests/dump/test.sh b/tests/dump/test.sh index c9ef25486..5bebcbfa0 100755 --- a/tests/dump/test.sh +++ b/tests/dump/test.sh @@ -48,7 +48,7 @@ echo -e "${title//?/-}\n${title}\n${title//?/-}\n" $burrow_bin dump remote -b dump.bin $burrow_bin dump remote dump.json -height=$(head -1 dump.json | jq .Height) +height=$(head -n 1 dump.json | jq .Height) kill $burrow_pid From 5a95d00a3d6ef878ddde97fec3b5e3152021b808 Mon Sep 17 00:00:00 2001 From: bzp99 Date: Mon, 15 Mar 2021 16:47:28 +0100 Subject: [PATCH 173/185] Improve install command compatibility install -T is not portable, but the -T flag is not necessary anyway Signed-off-by: bzp99 From 2a8041257d162869f471ae5b2f495bfcdaf5412f Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Tue, 16 Mar 2021 12:32:51 +0100 Subject: [PATCH 174/185] Implement repo common structure and update contributing guidelines Move the 'one shot' prerelease build functionality from `develop` to `prerelease` to avoid confusion. Signed-off-by: Silas Davis --- .github/CONTRIBUTING.md | 28 ++-- .github/workflows/{master.yaml => main.yaml} | 4 +- .../{develop.yaml => prerelease.yaml} | 5 +- .github/workflows/test.yaml | 14 +- CHANGELOG.md | 2 +- docs/ADRs/adr-1.md | 2 +- docs/README.md | 12 +- docs/deploy.md | 4 +- docs/developers.md | 8 +- docs/js-api.md | 62 ++++---- docs/reference/kubernetes.md | 2 +- docs/reference/transactions.md | 8 +- docs/tutorials/3-contracts.md | 4 +- repolint.json | 147 ++++++++++++++++++ 14 files changed, 229 insertions(+), 73 deletions(-) rename .github/workflows/{master.yaml => main.yaml} (98%) rename .github/workflows/{develop.yaml => prerelease.yaml} (94%) create mode 100644 repolint.json diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index f2f9ab2e7..87cd84f0b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,10 +1,18 @@ # Contributing to `burrow`: -Forked from Docker's [contributing guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md) +Forked from Docker's [contributing guidelines](https://github.com/docker/docker/blob/main/CONTRIBUTING.md) ## Developer Certificate of Origin Please always include "signed-off-by" in your commit message and note this constitutes a developer certification you are contributing a patch under Apache 2.0. Please find a verbatim copy of the Developer Certificate of Origin in this repository [here](.github/DEVELOPER_CERTIFICATE_OF_ORIGIN.md) or on [developercertificate.org](https://developercertificate.org/). +## Branches and releases + +All development happens on 'main'. Any other branches should be considered temporary and should have a corresponding pull request where they are the source to help keep track of them. Such branches can be marked WIP/draft. + +There is a special branch called 'prereleae' that is solely used to trigger a build of the JS library and docker images with a special prerelease tag based on the commit hash. This can be triggered by force pushing to 'prerelease'. If you would like a prerelease build please ask a maintainer (via an issue or on https://chat.hyperledger.org/channel/burrow) to force push for you. Since this branch may be overwritten at any time it should never be the only home for durable changes. + +Commits tagged with a 'v'-prefixed semver tag like `v0.11.1` are official releases and will trigger builds of binaries, JS library, and docker images in CI. We will try to make these regularly but will sometimes batch up a few changes and dependency upgrades (particularly Tendermint). + ## Bug Reporting A great way to contribute to the project is to send a detailed report when you encounter an issue. We always appreciate a well-written, thorough bug report, and will thank you for it! @@ -17,15 +25,15 @@ Our [ISSUE_TEMPLATE.md](ISSUE_TEMPLATE.md) will autopopulate the new issue. ## Contribution Tips and Guidelines -### Pull requests are always welcome (to `develop` rather than `master`). +### Pull requests are always welcome (always based on the `main` branch) -Not sure if that typo is worth a pull request? Found a bug and know how to fix it? Do it! We will appreciate it. Any significant improvement should be documented as a GitHub issue or discussed in [The Marmot Den](https://slack.monax.io) Slack community prior to beginning. +Not sure if that typo is worth a pull request? Found a bug and know how to fix it? Do it! We will appreciate it. We are always thrilled to receive pull requests (and bug reports!) and we do our best to process them quickly. ## Conventions -Fork the repository and make changes on your fork in a feature branch (branched from develop), create an issue outlining your feature or a bug, or use an open one. +Fork the repository and make changes on your fork in a feature branch, create an issue outlining your feature or a bug, or use an open one. If it's a bug fix branch, name it something-XXXX where XXXX is the number of the issue. If it's a feature branch, create an enhancement issue to announce your intentions, and name it something-XXXX where XXXX is the number of the issue. @@ -42,11 +50,9 @@ Commit messages must start with a short summary (max. 50 chars) written in the i Code review comments may be added to your pull request. Discuss, then make the suggested modifications and push additional commits to your feature branch. -Pull requests must be cleanly rebased on top of develop without multiple branches mixed into the PR. +Pull requests must be cleanly rebased on top of main without multiple branches mixed into the PR. -*Git tip:* If your PR no longer merges cleanly, use `git rebase develop` in your feature branch to update your pull request rather than merge develop. - -Before you make a pull request, squash your commits into logical units of work using `git rebase -i` and `git push -f`. A logical unit of work is a consistent set of patches that should be reviewed together: for example, upgrading the version of a vendored dependency and taking advantage of its now available new feature constitute two separate units of work. Implementing a new function and calling it in another file constitute a single logical unit of work. The very high majority of submissions should have a single commit, so if in doubt: squash down to one. +*Git tip:* If your PR no longer merges cleanly, use `git rebase main` in your feature branch to update your pull request rather than merge main. After every commit, make sure the test suite passes. Include documentation changes in the same pull request so that a revert would remove all traces of the feature or fix. @@ -54,10 +60,6 @@ After every commit, make sure the test suite passes. Include documentation chang We use LGTM (Looks Good To Me) in commands on the code review to indicate acceptance. -## Errors and Log Messages Style - -TODO - ## Coding Style Unless explicitly stated, we follow all coding guidelines from the Go community. While some of these standards may seem arbitrary, they somehow seem to result in a solid, consistent codebase. @@ -68,7 +70,7 @@ It is possible that the code base does not currently comply with these guideline * All code should follow the guidelines covered in [Effective Go](https://golang.org/doc/effective_go.html) and [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments). * Comment the code. Tell us the why, the history and the context. * Document all declarations and methods, even private ones. Declare expectations, caveats and anything else that may be important. If a type gets exported, having the comments already there will ensure it's ready. -* Variable name length should be proportional to it's context and no longer. noCommaALongVariableNameLikeThisIsNotMoreClearWhenASimpleCommentWouldDo. In practice, short methods will have short variable names and globals will have longer names. +* Variable name length should be proportional to its context and no longer. noCommaALongVariableNameLikeThisIsNotMoreClearWhenASimpleCommentWouldDo. In practice, short methods will have short variable names and globals will have longer names. * No underscores in package names. If you need a compound name, step back, and re-examine why you need a compound name. If you still think you need a compound name, lose the underscore. * No utils or helpers packages. If a function is not general enough to warrant its own package, it has not been written generally enough to be a part of a `util` package. Just leave it unexported and well-documented. * All tests should run with `go test` and outside tooling should not be required. No, we don't need another unit testing framework. Assertion packages are acceptable if they provide real incremental value. diff --git a/.github/workflows/master.yaml b/.github/workflows/main.yaml similarity index 98% rename from .github/workflows/master.yaml rename to .github/workflows/main.yaml index 2c978a005..e139b5584 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/main.yaml @@ -1,8 +1,8 @@ -name: master +name: main on: push: branches: - - master + - main jobs: cover: diff --git a/.github/workflows/develop.yaml b/.github/workflows/prerelease.yaml similarity index 94% rename from .github/workflows/develop.yaml rename to .github/workflows/prerelease.yaml index 5b02e8612..1730f4d22 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/prerelease.yaml @@ -1,8 +1,9 @@ -name: develop +# Force push to 'prerelease' to get a JS/docker build for testing etc +name: prerelease on: push: branches: - - develop + - prerelease tags-ignore: - 'v*' diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9d5283f3a..c01a3b6f4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -3,7 +3,7 @@ on: pull_request: push: branches: - - master + - main jobs: unit: @@ -17,7 +17,7 @@ jobs: - run: git fetch --unshallow --prune - run: make test - run: make build - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@main with: name: burrow path: bin @@ -52,7 +52,7 @@ jobs: needs: unit steps: - uses: actions/checkout@v2 - - uses: actions/download-artifact@master + - uses: actions/download-artifact@main with: name: burrow path: bin @@ -70,7 +70,7 @@ jobs: - uses: actions/setup-node@v2 with: node-version: '14' - - uses: actions/download-artifact@master + - uses: actions/download-artifact@main with: name: burrow path: bin @@ -85,7 +85,7 @@ jobs: needs: unit steps: - uses: actions/checkout@v2 - - uses: actions/download-artifact@master + - uses: actions/download-artifact@main with: name: burrow path: bin @@ -100,7 +100,7 @@ jobs: needs: unit steps: - uses: actions/checkout@v2 - - uses: actions/download-artifact@master + - uses: actions/download-artifact@main with: name: burrow path: bin @@ -118,7 +118,7 @@ jobs: - uses: actions/setup-node@v2 with: node-version: '14' - - uses: actions/download-artifact@master + - uses: actions/download-artifact@main with: name: burrow path: bin diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c280cbad..de6cb915f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -354,7 +354,7 @@ ### Added - [EVM] Implemented [CREATE2 opcode](https://eips.ethereum.org/EIPS/eip-1014) -- [EVM] Implemented [EXTCODEHASH opcode](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1052.md) +- [EVM] Implemented [EXTCODEHASH opcode](https://github.com/ethereum/EIPs/blob/main/EIPS/eip-1052.md) - [Accounts] Add account GetStats to query endpoint - [Config] Expose AddrBookStrict from Tendermint - [Deploy] burrow deploy now prints events generated during transactions diff --git a/docs/ADRs/adr-1.md b/docs/ADRs/adr-1.md index 2cb03d408..10e2347b6 100644 --- a/docs/ADRs/adr-1.md +++ b/docs/ADRs/adr-1.md @@ -5,7 +5,7 @@ discussions-to: https://chat.hyperledger.org/channel/burrow-contributors status: Draft type: Meta author: The Burrow's marmots and others - https://github.com/hyperledger/burrow/ADRs/blob/master/ADRs/adr-1.md + https://github.com/hyperledger/burrow/ADRs/blob/main/ADRs/adr-1.md created: 2018-10-09 --- diff --git a/docs/README.md b/docs/README.md index ea46fcbcc..c35f1fbd6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,11 +1,11 @@ # [Hyperledger Burrow](https://hyperledger.github.io/burrow) -[![CI](https://github.com/hyperledger/burrow/workflows/master/badge.svg)](https://launch-editor.github.com/actions?workflowID=master&event=push&nwo=hyperledger%2Fburrow) +[![CI](https://github.com/hyperledger/burrow/workflows/main/badge.svg)](https://launch-editor.github.com/actions?workflowID=main&event=push&nwo=hyperledger%2Fburrow) [![version](https://img.shields.io/github/tag/hyperledger/burrow.svg)](https://github.com/hyperledger/burrow/releases/latest) [![GoDoc](https://godoc.org/github.com/burrow?status.png)](https://godoc.org/github.com/hyperledger/burrow) [![license](https://img.shields.io/github/license/hyperledger/burrow.svg)](../LICENSE.md) [![LoC](https://tokei.rs/b1/github/hyperledger/burrow?category=lines)](https://github.com/hyperledger/burrow) -[![codecov](https://codecov.io/gh/hyperledger/burrow/branch/master/graph/badge.svg)](https://codecov.io/gh/hyperledger/burrow) +[![codecov](https://codecov.io/gh/hyperledger/burrow/branch/main/graph/badge.svg)](https://codecov.io/gh/hyperledger/burrow) Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It executes Ethereum EVM and WASM smart contract code (usually written in [Solidity](https://solidity.readthedocs.io)) on a permissioned virtual machine. Burrow provides transaction finality and high transaction throughput on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine. @@ -43,7 +43,7 @@ Watch the [Boring into Burrow](https://www.youtube.com/watch?v=OpbjYaGAP4k) talk ## JavaScript Client -There is a [JavaScript API](https://github.com/hyperledger/burrow/tree/master/js) +There is a [JavaScript API](https://github.com/hyperledger/burrow/tree/main/js) ## Project Roadmap @@ -52,6 +52,12 @@ Project information generally updated on a quarterly basis can be found on the [ ## Documentation Burrow getting started documentation is available on the [documentation site](https://hyperledger.github.io/burrow) (source markdown files can be found in [docs]()) and programmatic API in [GoDocs](https://godoc.org/github.com/hyperledger/burrow). +## Releases + +- **Burrow binaries**: https://github.com/hyperledger/burrow/releases +- **Burrow.js**: https://www.npmjs.com/package/@hyperledger/burrow +- **Docker**: https://hub.docker.com/repository/docker/hyperledger/burrow + ## Contribute We welcome any and all contributions. Read the [contributing file](../.github/CONTRIBUTING.md) for more information on making your first Pull Request to Burrow! diff --git a/docs/deploy.md b/docs/deploy.md index 34489590a..433266fce 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -11,8 +11,8 @@ The Burrow deploy toolkit can do a number of things: * create proposals or vote for a proposal burrow deploy needs a script to its commands. This script format bares some similarity to [ansible](https://www.ansible.com/). It -is in yaml format. The top level structure is an array of [jobs](https://github.com/hyperledger/burrow/blob/master/deploy/def/job.go). -The different job types are [defined here](https://github.com/hyperledger/burrow/blob/master/deploy/def/jobs.go). +is in yaml format. The top level structure is an array of [jobs](https://github.com/hyperledger/burrow/blob/main/deploy/def/job.go). +The different job types are [defined here](https://github.com/hyperledger/burrow/blob/main/deploy/def/jobs.go). You can invoke burrow from the command line: diff --git a/docs/developers.md b/docs/developers.md index 44f0ddf66..9e11c8f2e 100644 --- a/docs/developers.md +++ b/docs/developers.md @@ -7,7 +7,7 @@ - [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) - [protoc](http://google.github.io/proto-lens/installing-protoc.html) (libprotoc 3.7.1) -Please also refer to our [contributing guidelines](https://github.com/hyperledger/burrow/blob/master/.github/CONTRIBUTING.md). +Please also refer to our [contributing guidelines](https://github.com/hyperledger/burrow/blob/main/.github/CONTRIBUTING.md). ## Building @@ -25,9 +25,9 @@ Install protoc and run `make protobuf_deps`. If you make any changes to the prot ## Releasing * First of all make sure everyone is happy with doing a release now. -* Update project/history.go with the latest releases notes and version. Run `make CHANGELOG.md NOTES.md` and make sure this is merged to master. -* On the master branch, run `make ready_for_pull_request`. Check for any modified files. -* Once master is update to date, switch to master locally run `make tag_release`. This will push the tag which kicks of the release build. +* Update project/history.go with the latest releases notes and version. Run `make CHANGELOG.md NOTES.md` and make sure this is merged to main. +* On the main branch, run `make ready_for_pull_request`. Check for any modified files. +* Once main is update to date, switch to main locally run `make tag_release`. This will push the tag which kicks of the release build. * Optionally send out email on hyperledger burrow mailinglist. Agreements network email should be sent out automatically. ## Proposals diff --git a/docs/js-api.md b/docs/js-api.md index 678a94c33..f1c5341fa 100644 --- a/docs/js-api.md +++ b/docs/js-api.md @@ -56,13 +56,13 @@ The table below links to the reference schema for either the protobuf files gove | Component Name | Accessor | | :----------- | :--------------- | -| Transactions | [Burrow.transact](https://github.com/hyperledger/burrow/blob/master/protobuf/rpctransact.proto) | -| Queries | [Burrow.query](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcquery.proto) | -| EventStream | [Burrow.eventStream](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto) | -| Events | [Burrow.events](https://github.com/hyperledger/burrow/blob/master/lib/events.js) | -| NameReg | [Burrow.namereg](https://github.com/hyperledger/burrow/blob/master/lib/namereg.js) | +| Transactions | [Burrow.transact](https://github.com/hyperledger/burrow/blob/main/protobuf/rpctransact.proto) | +| Queries | [Burrow.query](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcquery.proto) | +| EventStream | [Burrow.eventStream](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcevents.proto) | +| Events | [Burrow.events](https://github.com/hyperledger/burrow/blob/main/lib/events.js) | +| NameReg | [Burrow.namereg](https://github.com/hyperledger/burrow/blob/main/lib/namereg.js) | -| Contracts | [Burrow.contracts](https://github.com/hyperledger/burrow/blob/master/lib/contractManager.js) | +| Contracts | [Burrow.contracts](https://github.com/hyperledger/burrow/blob/main/lib/contractManager.js) | ### GRPC Access Components @@ -155,43 +155,43 @@ burrow.transact.NameTxSync(setPayload, function(error, data){ | Method | Passed | Returns | | :----- | :--------- | :---- | -| burrow.transact.BroadcastTxSync | [TxEnvelopeParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpctransact.proto#L74-L79) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | -| burrow.transact.BroadcastTxASync | [TxEnvelopeParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpctransact.proto#L74-L79) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | -| burrow.transact.SignTx | [TxEnvelopeParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpctransact.proto#L74-L79) | [TxEnvelope](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto#L70-L72) | -| burrow.transact.FormulateTx | [PayloadParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpctransact.proto#L64-L68) | [TxEnvelope](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto#L70-L72) | -| burrow.transact.CallTxSync | [CallTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L53-L66) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | -| burrow.transact.CallTxAsync | [CallTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L53-L66) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | -| burrow.transact.CallTxSim | [CallTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L53-L66) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | -| burrow.transact.SendTxSync | [SendTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L69-L76) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | -| burrow.transact.SendTxAsync | [SendTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L69-L76) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | -| burrow.transact.NameTxSync | [NameTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L88-L98) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | -| burrow.transact.NameTxAsync | [NameTx](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto#L88-L98) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | +| burrow.transact.BroadcastTxSync | [TxEnvelopeParam](https://github.com/hyperledger/burrow/blob/main/protobuf/rpctransact.proto#L74-L79) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | +| burrow.transact.BroadcastTxASync | [TxEnvelopeParam](https://github.com/hyperledger/burrow/blob/main/protobuf/rpctransact.proto#L74-L79) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | +| burrow.transact.SignTx | [TxEnvelopeParam](https://github.com/hyperledger/burrow/blob/main/protobuf/rpctransact.proto#L74-L79) | [TxEnvelope](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto#L70-L72) | +| burrow.transact.FormulateTx | [PayloadParam](https://github.com/hyperledger/burrow/blob/main/protobuf/rpctransact.proto#L64-L68) | [TxEnvelope](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpctransact.proto#L70-L72) | +| burrow.transact.CallTxSync | [CallTx](https://github.com/hyperledger/burrow/blob/main/protobuf/payload.proto#L53-L66) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | +| burrow.transact.CallTxAsync | [CallTx](https://github.com/hyperledger/burrow/blob/main/protobuf/payload.proto#L53-L66) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | +| burrow.transact.CallTxSim | [CallTx](https://github.com/hyperledger/burrow/blob/main/protobuf/payload.proto#L53-L66) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | +| burrow.transact.SendTxSync | [SendTx](https://github.com/hyperledger/burrow/blob/main/protobuf/payload.proto#L69-L76) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | +| burrow.transact.SendTxAsync | [SendTx](https://github.com/hyperledger/burrow/blob/main/protobuf/payload.proto#L69-L76) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | +| burrow.transact.NameTxSync | [NameTx](https://github.com/hyperledger/burrow/blob/main/protobuf/payload.proto#L88-L98) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | +| burrow.transact.NameTxAsync | [NameTx](https://github.com/hyperledger/burrow/blob/main/protobuf/payload.proto#L88-L98) | [Receipt](https://github.com/hyperledger/burrow/blob/develop/protobuf/txs.proto#L38-L47) | #### Queries -`Burrow.query` provides access to the burrow GRPC service `rpcquery`. As a GRPC wrapper all the endpoints take a data argument and an optional callback. The format of the data object is specified in the [protobuf files](https://github.com/hyperledger/burrow/tree/master/js/protobuf). Note that "STREAM" functions take a callback `function(error, data)` which is mandatory and is called any time data is returned. For list Accounts the queryable tags are Address, PublicKey, Sequence, Balance, Code, Permissions (Case sensitive). As an example you can get all accounts with a balance greater than 1000 by `burrow.query.ListAccounts('Balance > 1000', callback)`. Multiple tag criteria can be combined using 'AND' and 'OR' for an example of a combined query see [here](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L87). Similarly for ListNames, the avaible tags are Name, Data, Owner and Exires (once again case sensitive) use is identical to List accounts. +`Burrow.query` provides access to the burrow GRPC service `rpcquery`. As a GRPC wrapper all the endpoints take a data argument and an optional callback. The format of the data object is specified in the [protobuf files](https://github.com/hyperledger/burrow/tree/main/js/protobuf). Note that "STREAM" functions take a callback `function(error, data)` which is mandatory and is called any time data is returned. For list Accounts the queryable tags are Address, PublicKey, Sequence, Balance, Code, Permissions (Case sensitive). As an example you can get all accounts with a balance greater than 1000 by `burrow.query.ListAccounts('Balance > 1000', callback)`. Multiple tag criteria can be combined using 'AND' and 'OR' for an example of a combined query see [here](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L87). Similarly for ListNames, the avaible tags are Name, Data, Owner and Exires (once again case sensitive) use is identical to List accounts. | Method | Passed | Returns | Notes | | :----- | :--------- | :---- | :------- | -| burrow.query.GetAccount | [GetAccountParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcquery.proto#L25-L27) | [ConcreteAccount](https://github.com/hyperledger/burrow/blob/develop/protobuf/acm.proto#L23-L31) | | -| burrow.query.ListAccounts | [ListAccountsParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcquery.proto#L29-L31) | [ConcreteAccount](https://github.com/hyperledger/burrow/blob/develop/protobuf/acm.proto#L23-L31) | STREAM | -| burrow.query.GetNameParam | [GetNameParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcquery.proto#L33-L35) | [Entry](https://github.com/hyperledger/burrow/blob/develop/protobuf/names.proto#L22-L32) | | -| burrow.query.ListNames | [ListNamesParam](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcquery.proto#L37-L39) | [Entry](https://github.com/hyperledger/burrow/blob/develop/protobuf/names.proto#L22-L32) | STREAM| +| burrow.query.GetAccount | [GetAccountParam](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcquery.proto#L25-L27) | [ConcreteAccount](https://github.com/hyperledger/burrow/blob/develop/protobuf/acm.proto#L23-L31) | | +| burrow.query.ListAccounts | [ListAccountsParam](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcquery.proto#L29-L31) | [ConcreteAccount](https://github.com/hyperledger/burrow/blob/develop/protobuf/acm.proto#L23-L31) | STREAM | +| burrow.query.GetNameParam | [GetNameParam](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcquery.proto#L33-L35) | [Entry](https://github.com/hyperledger/burrow/blob/develop/protobuf/names.proto#L22-L32) | | +| burrow.query.ListNames | [ListNamesParam](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcquery.proto#L37-L39) | [Entry](https://github.com/hyperledger/burrow/blob/develop/protobuf/names.proto#L22-L32) | STREAM| #### EventStream NB: When listening to contract events it is easier to use the contract interface (described below) -`Burrow.executionEvents` provides access to the burrow GRPC service `ExecutionEvents`. As a GRPC wrapper all the endpoints take a data argument and an optional callback. The format of the data object is specified in the [protobuf files](https://github.com/hyperledger/burrow/tree/master/js/protobuf). Note that "STREAM" functions take a callback `function(error, data)` which is mandatory and is called any time data is returned. +`Burrow.executionEvents` provides access to the burrow GRPC service `ExecutionEvents`. As a GRPC wrapper all the endpoints take a data argument and an optional callback. The format of the data object is specified in the [protobuf files](https://github.com/hyperledger/burrow/tree/main/js/protobuf). Note that "STREAM" functions take a callback `function(error, data)` which is mandatory and is called any time data is returned. | Method | Passed | Returns | Notes | | :----- | :--------- | :---- | :------- | -| burrow.executionEvents.GetBlock | [GetBlockRequest](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L37-L42) | [BlockExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L20-L27) | | -| burrow.executionEvents.GetBlocks | [BlocksRequest](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L51-L89) | [BlockExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L20-L27) | STREAM | -| burrow.executionEvents.GetTx | [GetTxRequest](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L44-L49) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | | -| burrow.executionEvents.GetTxs | [BlocksRequest](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L51-L89) | [GetTxsResponse](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L96-L99) | STREAM | -| burrow.executionEvents.GetEvents | [BlocksRequest](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L51-L89) | [GetEventsResponse](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L91-L94) | STREAM | +| burrow.executionEvents.GetBlock | [GetBlockRequest](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcevents.proto#L37-L42) | [BlockExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L20-L27) | | +| burrow.executionEvents.GetBlocks | [BlocksRequest](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcevents.proto#L51-L89) | [BlockExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L20-L27) | STREAM | +| burrow.executionEvents.GetTx | [GetTxRequest](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcevents.proto#L44-L49) | [TxExecution](https://github.com/hyperledger/burrow/blob/develop/protobuf/exec.proto#L34-L56) | | +| burrow.executionEvents.GetTxs | [BlocksRequest](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcevents.proto#L51-L89) | [GetTxsResponse](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L96-L99) | STREAM | +| burrow.executionEvents.GetEvents | [BlocksRequest](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcevents.proto#L51-L89) | [GetEventsResponse](https://github.com/hyperledger/burrow/blob/develop/protobuf/rpcevents.proto#L91-L94) | STREAM | *** @@ -234,7 +234,7 @@ Sets an entry in the namereg. It returns a promise if callback not provided. 3. `int` - The number of blocks to register the name for (more blocks = larger fee) 4. `function` - (optional) Function to call upon completion of form `function(error, data)`. ###### Returns -`TxExecution` - The return data object is a [TxExecution](https://github.com/hyperledger/burrow/blob/master/protobuf/exec.proto#L34-L56). +`TxExecution` - The return data object is a [TxExecution](https://github.com/hyperledger/burrow/blob/main/protobuf/exec.proto#L34-L56). ###### Example ```javascript @@ -267,7 +267,7 @@ Listens to execution events which satisfy the filter query. 2. `Object` - Currently unused. pass `{}` 3. `function` - Signature of `function(error, data)` mandatory ###### Returns -`GetEventsResponse` - The return data object is a [GetEventsResponse](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L91-L94) +`GetEventsResponse` - The return data object is a [GetEventsResponse](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcevents.proto#L91-L94) @@ -281,7 +281,7 @@ Listens to EVM event executions from specific contract. 3. `Object` - Currently unused. pass `{}` 4. `function` - Signature of `function(error, data)` mandatory. ###### Returns -`GetEventsResponse` - The return data object is a [GetEventsResponse](https://github.com/hyperledger/burrow/blob/master/protobuf/rpcevents.proto#L91-L94) +`GetEventsResponse` - The return data object is a [GetEventsResponse](https://github.com/hyperledger/burrow/blob/main/protobuf/rpcevents.proto#L91-L94) diff --git a/docs/reference/kubernetes.md b/docs/reference/kubernetes.md index 6b606a3bb..3059b60b9 100644 --- a/docs/reference/kubernetes.md +++ b/docs/reference/kubernetes.md @@ -4,6 +4,6 @@ Burrow ships a docker image suitable for use in Kubernetes on [Docker Hub](https ## Helm chart -A helm chart for Burrow with can be found in the main repo [here](https://github.com/hyperledger/burrow/tree/master/helm) (with further documentation). +A helm chart for Burrow with can be found in the main repo [here](https://github.com/hyperledger/burrow/tree/main/helm) (with further documentation). The helm chart allows you to bootstrap and run your own pool of validators. diff --git a/docs/reference/transactions.md b/docs/reference/transactions.md index 50bb0e55c..dd85bc1b2 100644 --- a/docs/reference/transactions.md +++ b/docs/reference/transactions.md @@ -2,9 +2,9 @@ Burrow implements a number of transaction types. Transactions will be ordered by our consensus mechanism (Tendermint) and applied to our application state machine - replicated across all Burrow nodes. Each transaction is applied atomically and runs deterministically. The transactions contain the arguments for an -[execution context](https://github.com/hyperledger/burrow/tree/master/execution/contexts). +[execution context](https://github.com/hyperledger/burrow/tree/main/execution/contexts). -Our transactions are defined in Protobuf [here](https://github.com/hyperledger/burrow/blob/master/protobuf/payload.proto). +Our transactions are defined in Protobuf [here](https://github.com/hyperledger/burrow/blob/main/protobuf/payload.proto). Transactions can be built using our GRPC client libraries programmatically, via [burrow.js](js-api.md), or with `burrow deploy` - see our [deployment guide](deploy.md). @@ -38,7 +38,7 @@ Allows [native token](reference/participants.md) to be sent from multiple inputs Provides access to a global name registry service that associates a particular string key with a data payload and an owner. The control of the name is guaranteed for the period of the lease which is a determined by a fee. -> A future revision will change the way in which leases are calculated. Currently we use a somewhat historically-rooted fixed fee, see the [`NameCostPerBlock` function](https://github.com/hyperledger/burrow/blob/master/execution/names/names.go#L83). +> A future revision will change the way in which leases are calculated. Currently we use a somewhat historically-rooted fixed fee, see the [`NameCostPerBlock` function](https://github.com/hyperledger/burrow/blob/main/execution/names/names.go#L83). ## BondTx @@ -94,4 +94,4 @@ connection requests from entries in its registry. IdentifyPeers = true ``` -For more details, see the [ADR](ADRs/adr-2_identify-tx.md). \ No newline at end of file +For more details, see the [ADR](ADRs/adr-2_identify-tx.md). diff --git a/docs/tutorials/3-contracts.md b/docs/tutorials/3-contracts.md index e5633f6c8..5b4e70bf9 100644 --- a/docs/tutorials/3-contracts.md +++ b/docs/tutorials/3-contracts.md @@ -13,7 +13,7 @@ burrow spec -v1 | burrow configure -s- | burrow start -c- ## Deploy Artifacts -For this step, we need two things: one or more solidity contracts and a deploy file. Let's take a simple example, found in [this directory](https://github.com/hyperledger/burrow/tree/master/tests/jobs_fixtures/app06-deploy_basic_contract_and_different_solc_types_packed_unpacked). +For this step, we need two things: one or more solidity contracts and a deploy file. Let's take a simple example, found in [this directory](https://github.com/hyperledger/burrow/tree/main/tests/jobs_fixtures/app06-deploy_basic_contract_and_different_solc_types_packed_unpacked). We need `deploy.yaml` and `storage.sol` in the same directory with **no other yaml or sol files**. @@ -27,4 +27,4 @@ burrow deploy --address $ADDRESS deploy.yaml Replace `$ADDRESS` with the address at the top of your `burrow.toml`. -That's it! You've successfully deployed (and tested) a Solidity contract to a Burrow node. \ No newline at end of file +That's it! You've successfully deployed (and tested) a Solidity contract to a Burrow node. diff --git a/repolint.json b/repolint.json new file mode 100644 index 000000000..1043c6f4e --- /dev/null +++ b/repolint.json @@ -0,0 +1,147 @@ +{ + "axioms": { + "linguist": "language", + "licensee": "license", + "packagers": "packager" + }, + "rules": { + "all": { + "apache-license-file:file-contents": [ + "error", + { + "files": ["LICENSE*"], + "content": "Apache License.*Version 2.0", + "fail-on-non-existent": true + } + ], + "code-of-conduct-file:file-contents": [ + "error", + { + "files": ["CODE_OF_CONDUCT*"], + "content": "https://wiki.hyperledger.org/community/hyperledger-project-code-of-conduct", + "fail-on-non-existent": true + } + ], + "security-file-matches:file-contents": [ + "error", + { + "files": ["SECURITY.md"], + "content": "https://wiki.hyperledger.org/display/SEC/Defect.Response", + "fail-on-non-existent": true + } + ], + "readme-file-exists:file-existence": [ + "error", + { + "files": ["README.md", "README"] + } + ], + "readme-references-license:file-contents": [ + "error", + { + "files": ["README.md", "README"], + "content": "license", + "flags": "i" + } + ], + "maintainers-file-exists:file-existence": [ + "error", + { + "files": ["MAINTAINERS.md", "MAINTAINERS.rst"] + } + ], + "contributing-file-exists:file-existence": [ + "error", + { + "files": ["CONTRIBUTING.md"] + } + ], + "changelog-file-exists:file-existence": [ + "error", + { + "files": ["CHANGELOG.md"] + } + ], + "integrates-with-ci:file-existence": [ + "error", + { + "files": [ + "circle.yml", + ".circleci/config.yml", + "ci/azure-pipelines.yml", + ".ci/azure-pipelines.yml", + "Jenkinsfile", + "Jenkinsfile.ci", + "Jenkinsfile.cd", + ".github/workflows/*.yml" + ] + } + ], + "notice-file-exists:file-existence": [ + "warning", + { + "files": ["NOTICE*"] + } + ], + "source-license-headers-exist:file-starts-with": [ + "warning", + { + "files": ["**/*.js", "!node_modules/**"], + "lineCount": 5, + "patterns": ["Copyright", "License"], + "flags": "i" + } + ], + "test-directory-exists:directory-existence": [ + "warning", + { + "directories": ["**/test*", "**/specs", "**/**_test.go"], + "nocase": true + } + ], + "binaries-not-present:file-type-exclusion": [ + "error", + { + "type": ["**/*.exe", "**/*.dll", "!node_modules/**"] + } + ] + }, + "language=javascript": { + "package-metadata-exists:file-existence": [ + "warning", + { + "files": ["package.json"] + } + ] + }, + "language=ruby": { + "package-metadata-exists:file-existence": [ + "warning", + { + "files": ["Gemfile"] + } + ] + }, + "language=java": { + "package-metadata-exists:file-existence": [ + "warning", + { + "files": ["pom.xml", "build.xml", "build.gradle"] + } + ] + }, + "license=*": { + "license-detectable-by-licensee": [ + "warning" + ] + }, + "language=python": { + "package-metadata-exists:file-existence": [ + "warning", + { + "files": ["setup.py", "requirements.txt"] + } + ] + } + } +} From 5376d4c113bb27ab78e3fb2c7cac57d8cd7ee75f Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Wed, 17 Mar 2021 16:50:09 +0100 Subject: [PATCH 175/185] Don't push dev image to latest tag in hyperledger repo Do push dev version tag to hyperledger Signed-off-by: Silas Davis --- .github/workflows/prerelease.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/prerelease.yaml b/.github/workflows/prerelease.yaml index 1730f4d22..5889ff01b 100644 --- a/.github/workflows/prerelease.yaml +++ b/.github/workflows/prerelease.yaml @@ -52,5 +52,4 @@ jobs: run: | version=$(./scripts/local_version.sh) echo ${DOCKER_PASS} | docker login --username ${DOCKER_USER} --password-stdin - docker tag ${DOCKER_REPO}:${version} ${DOCKER_REPO}:latest - docker push ${DOCKER_REPO}:latest + docker push --all-tags ${DOCKER_REPO} From 0e91dad62bbcffa0c28e073fa3865827c2e43b4c Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 18 Mar 2021 18:17:25 +0100 Subject: [PATCH 176/185] Allow overriding of ChainID Also fix encoding of ChainID return values in web3 This allows integration with eth tooling like metamask that expects a numeric ChainID serialised in base 10 to a string in order to sign transactions Signed-off-by: Silas Davis --- bcm/blockchain.go | 2 +- cmd/burrow/commands/config_options.go | 4 +-- config/config.go | 3 ++ config/config_test.go | 9 ++++-- consensus/tendermint/tendermint.go | 2 +- execution/exec/stream_event_test.go | 10 +++---- execution/execution.go | 2 +- execution/execution_test.go | 2 +- genesis/genesis.go | 23 ++++++++------- integration/governance/governance_test.go | 4 +-- integration/rpcinfo/info_server_test.go | 2 +- integration/rpcquery/query_server_test.go | 2 +- integration/rpctest/helpers.go | 2 +- .../rpctransact/transact_server_test.go | 4 +-- rpc/web3/eth_service.go | 29 ++++++++++--------- rpc/web3/eth_service_test.go | 18 +++++++----- rpc/web3/hex.go | 2 +- txs/ethereum_tx.go | 4 +-- 18 files changed, 69 insertions(+), 55 deletions(-) diff --git a/bcm/blockchain.go b/bcm/blockchain.go index 5c4b59d06..28fde43fc 100644 --- a/bcm/blockchain.go +++ b/bcm/blockchain.go @@ -183,7 +183,7 @@ func (bc *Blockchain) GenesisDoc() genesis.GenesisDoc { } func (bc *Blockchain) ChainID() string { - return bc.genesisDoc.ChainID() + return bc.genesisDoc.GetChainID() } func (bc *Blockchain) LastBlockHeight() uint64 { diff --git a/cmd/burrow/commands/config_options.go b/cmd/burrow/commands/config_options.go index a840711a2..5171c9cd4 100644 --- a/cmd/burrow/commands/config_options.go +++ b/cmd/burrow/commands/config_options.go @@ -115,8 +115,8 @@ func (opts *configOptions) obtainBurrowConfig() (*config.BurrowConfig, error) { } if *opts.initMonikerOpt == "" { chainIDHeader := "" - if conf.GenesisDoc != nil && conf.GenesisDoc.ChainID() != "" { - chainIDHeader = conf.GenesisDoc.ChainID() + "_" + if conf.GenesisDoc != nil && conf.GenesisDoc.GetChainID() != "" { + chainIDHeader = conf.GenesisDoc.GetChainID() + "_" } if conf.ValidatorAddress != nil { // Set a default moniker... since we can at this stage of config completion and it is required for start diff --git a/config/config.go b/config/config.go index 9cb6e1746..421a8f75e 100644 --- a/config/config.go +++ b/config/config.go @@ -3,6 +3,7 @@ package config import ( "fmt" + "github.com/alecthomas/jsonschema" "github.com/hyperledger/burrow/config/source" "github.com/hyperledger/burrow/consensus/tendermint" "github.com/hyperledger/burrow/crypto" @@ -32,6 +33,8 @@ type BurrowConfig struct { Logging *logconfig.LoggingConfig `json:",omitempty" toml:",omitempty"` } +var burrowConfigSchema = jsonschema.Reflect(&BurrowConfig{}) + func DefaultBurrowConfig() *BurrowConfig { return &BurrowConfig{ BurrowDir: ".burrow", diff --git a/config/config_test.go b/config/config_test.go index 16a2d9f0a..2569f9a72 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -1,10 +1,11 @@ package config import ( - "fmt" "testing" + "github.com/hyperledger/burrow/config/source" "github.com/hyperledger/burrow/genesis" + "github.com/stretchr/testify/require" ) func TestBurrowConfigSerialise(t *testing.T) { @@ -13,5 +14,9 @@ func TestBurrowConfigSerialise(t *testing.T) { ChainName: "Foo", }, } - fmt.Println(conf.JSONString()) + confOut := new(BurrowConfig) + jsonString := conf.JSONString() + err := source.FromJSONString(jsonString, confOut) + require.NoError(t, err) + require.Equal(t, jsonString, confOut.JSONString()) } diff --git a/consensus/tendermint/tendermint.go b/consensus/tendermint/tendermint.go index d31acf0ce..512a57a10 100644 --- a/consensus/tendermint/tendermint.go +++ b/consensus/tendermint/tendermint.go @@ -102,7 +102,7 @@ func DeriveGenesisDoc(burrowGenesisDoc *genesis.GenesisDoc, appHash []byte) *tmT consensusParams.Block.TimeIotaMs = 1 return &tmTypes.GenesisDoc{ - ChainID: burrowGenesisDoc.ChainID(), + ChainID: burrowGenesisDoc.GetChainID(), GenesisTime: burrowGenesisDoc.GenesisTime, Validators: validators, AppHash: appHash, diff --git a/execution/exec/stream_event_test.go b/execution/exec/stream_event_test.go index b55fd3134..c37790bb9 100644 --- a/execution/exec/stream_event_test.go +++ b/execution/exec/stream_event_test.go @@ -17,7 +17,7 @@ import ( var genesisDoc, accounts, _ = genesis.NewDeterministicGenesis(345234523).GenesisDoc(10, 0) func TestTxExecution(t *testing.T) { - txe := NewTxExecution(txs.Enclose(genesisDoc.ChainID(), newCallTx(0, 1))) + txe := NewTxExecution(txs.Enclose(genesisDoc.GetChainID(), newCallTx(0, 1))) stack := new(TxStack) var txeOut *TxExecution @@ -38,7 +38,7 @@ func TestConsumeBlockExecution(t *testing.T) { height := int64(234242) be := &BlockExecution{ Header: &tmproto.Header{ - ChainID: genesisDoc.ChainID(), + ChainID: genesisDoc.GetChainID(), AppHash: crypto.Keccak256([]byte("hashily")), Time: time.Now(), Height: height, @@ -46,9 +46,9 @@ func TestConsumeBlockExecution(t *testing.T) { Height: uint64(height), } be.AppendTxs( - NewTxExecution(txs.Enclose(genesisDoc.ChainID(), newCallTx(0, 3))), - NewTxExecution(txs.Enclose(genesisDoc.ChainID(), newCallTx(0, 2))), - NewTxExecution(txs.Enclose(genesisDoc.ChainID(), newCallTx(2, 1))), + NewTxExecution(txs.Enclose(genesisDoc.GetChainID(), newCallTx(0, 3))), + NewTxExecution(txs.Enclose(genesisDoc.GetChainID(), newCallTx(0, 2))), + NewTxExecution(txs.Enclose(genesisDoc.GetChainID(), newCallTx(2, 1))), ) stack := NewBlockAccumulator() diff --git a/execution/execution.go b/execution/execution.go index ff1023603..e5ddd16f7 100644 --- a/execution/execution.go +++ b/execution/execution.go @@ -97,7 +97,7 @@ type Params struct { func ParamsFromGenesis(genesisDoc *genesis.GenesisDoc) Params { return Params{ - ChainID: genesisDoc.ChainID(), + ChainID: genesisDoc.GetChainID(), ProposalThreshold: genesisDoc.Params.ProposalThreshold, } } diff --git a/execution/execution_test.go b/execution/execution_test.go index 3902d9bcf..7954998c5 100644 --- a/execution/execution_test.go +++ b/execution/execution_test.go @@ -53,7 +53,7 @@ var logger = logging.NewNoopLogger() var deterministicGenesis = genesis.NewDeterministicGenesis(34059836243380576) var testGenesisDoc, testPrivAccounts, _ = deterministicGenesis. GenesisDoc(3, 1) -var testChainID = testGenesisDoc.ChainID() +var testChainID = testGenesisDoc.GetChainID() func TestSendFails(t *testing.T) { stateDB, err := dbm.NewDB("state", dbBackend, dbDir) diff --git a/genesis/genesis.go b/genesis/genesis.go index 8255ff1b6..387d78c7e 100644 --- a/genesis/genesis.go +++ b/genesis/genesis.go @@ -54,17 +54,18 @@ type params struct { } type GenesisDoc struct { - GenesisTime time.Time - ChainName string - AppHash binary.HexBytes `json:",omitempty" toml:",omitempty"` - Params params `json:",omitempty" toml:",omitempty"` - Salt []byte `json:",omitempty" toml:",omitempty"` + GenesisTime time.Time + ChainName string + // Ordinarily we derive this from the genesis hash but to support explicit Ethereum ChainID it may be set + ChainID string `json:",omitempty" toml:",omitempty"` + AppHash binary.HexBytes + Params params `json:",omitempty" toml:",omitempty"` + Salt []byte `json:",omitempty" toml:",omitempty"` GlobalPermissions permission.AccountPermissions Accounts []Account Validators []Validator // memo - hash []byte - chainID string + hash []byte } func (genesisDoc *GenesisDoc) GlobalPermissionsAccount() *acm.Account { @@ -115,11 +116,11 @@ func (genesisDoc *GenesisDoc) ShortHash() []byte { return genesisDoc.Hash()[:ShortHashSuffixBytes] } -func (genesisDoc *GenesisDoc) ChainID() string { - if genesisDoc.chainID == "" { - genesisDoc.chainID = fmt.Sprintf("%s-%X", genesisDoc.ChainName, genesisDoc.ShortHash()) +func (genesisDoc *GenesisDoc) GetChainID() string { + if genesisDoc.ChainID == "" { + genesisDoc.ChainID = fmt.Sprintf("%s-%X", genesisDoc.ChainName, genesisDoc.ShortHash()) } - return genesisDoc.chainID + return genesisDoc.ChainID } //------------------------------------------------------------ diff --git a/integration/governance/governance_test.go b/integration/governance/governance_test.go index a0fdca0cb..ff6f4fc97 100644 --- a/integration/governance/governance_test.go +++ b/integration/governance/governance_test.go @@ -226,12 +226,12 @@ func TestGovernance(t *testing.T) { }) setSequence(t, qcli, tx) - _, err := localSignAndBroadcastSync(t, tcli1, genesisDoc.ChainID(), genesisAccounts[0], tx) + _, err := localSignAndBroadcastSync(t, tcli1, genesisDoc.GetChainID(), genesisAccounts[0], tx) require.NoError(t, err) // Make it a different Tx hash so it can enter cache but keep sequence number tx.AccountUpdates[0].Amounts = balance.New().Power(power).Native(1) - _, err = localSignAndBroadcastSync(t, tcli2, genesisDoc.ChainID(), genesisAccounts[0], tx) + _, err = localSignAndBroadcastSync(t, tcli2, genesisDoc.GetChainID(), genesisAccounts[0], tx) require.Error(t, err) assert.Contains(t, err.Error(), "invalid sequence") }) diff --git a/integration/rpcinfo/info_server_test.go b/integration/rpcinfo/info_server_test.go index de6051f35..1c216fbd9 100644 --- a/integration/rpcinfo/info_server_test.go +++ b/integration/rpcinfo/info_server_test.go @@ -54,7 +54,7 @@ func TestInfoServer(t *testing.T) { resp, err := infoclient.Status(rpcClient) require.NoError(t, err) assert.Contains(t, resp.GetNodeInfo().GetMoniker(), "node") - assert.Equal(t, rpctest.GenesisDoc.ChainID(), resp.NodeInfo.Network, + assert.Equal(t, rpctest.GenesisDoc.GetChainID(), resp.NodeInfo.Network, "ChainID should match NodeInfo.Network") }) diff --git a/integration/rpcquery/query_server_test.go b/integration/rpcquery/query_server_test.go index 5bf6e1fee..4914c2ad1 100644 --- a/integration/rpcquery/query_server_test.go +++ b/integration/rpcquery/query_server_test.go @@ -31,7 +31,7 @@ func TestQueryServer(t *testing.T) { status, err := cli.Status(context.Background(), &rpcquery.StatusParam{}) require.NoError(t, err) assert.Equal(t, rpctest.PrivateAccounts[0].GetPublicKey(), status.ValidatorInfo.PublicKey) - assert.Equal(t, rpctest.GenesisDoc.ChainID(), status.ChainID) + assert.Equal(t, rpctest.GenesisDoc.GetChainID(), status.ChainID) for i := 0; i < 3; i++ { // Unless we get lucky this is an error _, err = cli.Status(context.Background(), &rpcquery.StatusParam{ diff --git a/integration/rpctest/helpers.go b/integration/rpctest/helpers.go index d25f4a260..dc9064a58 100644 --- a/integration/rpctest/helpers.go +++ b/integration/rpctest/helpers.go @@ -154,7 +154,7 @@ func MakeDefaultCallTx(t *testing.T, client rpc.Client, addr *crypto.Address, co fee uint64) *txs.Envelope { sequence := GetSequence(t, client, PrivateAccounts[0].GetAddress()) tx := payload.NewCallTxWithSequence(PrivateAccounts[0].GetPublicKey(), addr, code, amt, gasLim, fee, sequence+1) - txEnv := txs.Enclose(GenesisDoc.ChainID(), tx) + txEnv := txs.Enclose(GenesisDoc.GetChainID(), tx) require.NoError(t, txEnv.Sign(PrivateAccounts[0])) return txEnv } diff --git a/integration/rpctransact/transact_server_test.go b/integration/rpctransact/transact_server_test.go index a66d77c13..826a4cdef 100644 --- a/integration/rpctransact/transact_server_test.go +++ b/integration/rpctransact/transact_server_test.go @@ -62,7 +62,7 @@ func TestTransactServer(t *testing.T) { }) require.NoError(t, err) amount := uint64(2123) - txEnv := txs.Enclose(rpctest.GenesisDoc.ChainID(), &payload.SendTx{ + txEnv := txs.Enclose(rpctest.GenesisDoc.GetChainID(), &payload.SendTx{ Inputs: []*payload.TxInput{{ Address: inputAddress, Sequence: acc.Sequence + 1, @@ -120,7 +120,7 @@ func TestTransactServer(t *testing.T) { // We should see the sign bytes embedded if !assert.Contains(t, string(bs), fmt.Sprintf("{\"ChainID\":\"%s\",\"Type\":\"CallTx\","+ "\"Payload\":{\"Input\":{\"Address\":\"E80BB91C2F0F4C3C39FC53E89BF8416B219BE6E4\",\"Amount\":230},"+ - "\"Data\":\"0203060403\"}}", rpctest.GenesisDoc.ChainID())) { + "\"Data\":\"0203060403\"}}", rpctest.GenesisDoc.GetChainID())) { fmt.Println(string(bs)) } }) diff --git a/rpc/web3/eth_service.go b/rpc/web3/eth_service.go index 5ae15e8d3..75362739e 100644 --- a/rpc/web3/eth_service.go +++ b/rpc/web3/eth_service.go @@ -45,6 +45,7 @@ type EthService struct { keyClient keys.KeyClient keyStore *keys.FilesystemKeyStore config *tmConfig.Config + chainID *big.Int logger *logging.Logger } @@ -63,16 +64,18 @@ func NewEthService( keyClient := keys.NewLocalKeyClient(keyStore, logger) return &EthService{ - accounts, - events, - blockchain, - validators, - nodeView, - trans, - keyClient, - keyStore, - tmConfig.DefaultConfig(), - logger, + accounts: accounts, + events: events, + blockchain: blockchain, + validators: validators, + nodeView: nodeView, + trans: trans, + keyClient: keyClient, + keyStore: keyStore, + config: tmConfig.DefaultConfig(), + // Ethereum expects ChainID to be an integer value + chainID: crypto.GetEthChainID(blockchain.ChainID()), + logger: logger, } } @@ -119,7 +122,7 @@ func (srv *EthService) NetPeerCount() (*NetPeerCountResult, error) { // this is typically a small int (where 1 == Ethereum mainnet) func (srv *EthService) NetVersion() (*NetVersionResult, error) { return &NetVersionResult{ - ChainID: crypto.GetEthChainID(srv.blockchain.ChainID()).String(), + ChainID: HexEncoder.BigInt(srv.chainID), }, nil } @@ -133,7 +136,7 @@ func (srv *EthService) EthProtocolVersion() (*EthProtocolVersionResult, error) { // EthChainId returns the chainID func (srv *EthService) EthChainId() (*EthChainIdResult, error) { return &EthChainIdResult{ - ChainId: srv.blockchain.ChainID(), + ChainId: HexEncoder.BigInt(srv.chainID), }, nil } @@ -568,7 +571,7 @@ func (srv *EthService) EthSendRawTransaction(req *EthSendRawTransactionParams) ( return nil, d.Err() } - rawTx := txs.NewEthRawTx(srv.blockchain.ChainID()) + rawTx := txs.NewEthRawTx(srv.chainID) err := rlp.Decode(data, rawTx) if err != nil { return nil, err diff --git a/rpc/web3/eth_service_test.go b/rpc/web3/eth_service_test.go index e8bd75c2b..e3881f9cb 100644 --- a/rpc/web3/eth_service_test.go +++ b/rpc/web3/eth_service_test.go @@ -8,10 +8,6 @@ import ( "testing" "time" - "github.com/hyperledger/burrow/rpc/web3" - "github.com/hyperledger/burrow/txs" - "github.com/hyperledger/burrow/txs/payload" - "github.com/hyperledger/burrow/acm/balance" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/evm/abi" @@ -20,17 +16,23 @@ import ( "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/project" "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/rpc/web3" + "github.com/hyperledger/burrow/txs" + "github.com/hyperledger/burrow/txs/payload" "github.com/stretchr/testify/require" ) var d = new(web3.HexDecoder).Must() +// Check we can force set a decimal ChainID +const chainID = "15321" + func TestWeb3Service(t *testing.T) { ctx := context.Background() genesisAccounts := integration.MakePrivateAccounts("burrow", 1) genesisAccounts = append(genesisAccounts, integration.MakeEthereumAccounts("ethereum", 3)...) genesisDoc := integration.TestGenesisDoc(genesisAccounts, 0) - + genesisDoc.ChainID = chainID config, _ := integration.NewTestConfig(genesisDoc) logger := logging.NewNoopLogger() kern, err := integration.TestKernel(genesisAccounts[0], genesisAccounts, config) @@ -91,7 +93,7 @@ func TestWeb3Service(t *testing.T) { t.Run("NetVersion", func(t *testing.T) { result, err := eth.NetVersion() require.NoError(t, err) - require.Equal(t, crypto.GetEthChainID(genesisDoc.ChainID()).String(), result.ChainID) + require.Equal(t, web3.HexEncoder.BigInt(crypto.GetEthChainID(genesisDoc.GetChainID())), result.ChainID) }) t.Run("EthProtocolVersion", func(t *testing.T) { @@ -104,7 +106,7 @@ func TestWeb3Service(t *testing.T) { result, err := eth.EthChainId() require.NoError(t, err) doc := config.GenesisDoc - require.Equal(t, doc.ChainID(), result.ChainId) + require.Equal(t, web3.HexEncoder.BigInt(crypto.GetEthChainID(doc.GetChainID())), result.ChainId) }) }) @@ -118,7 +120,7 @@ func TestWeb3Service(t *testing.T) { before := acc.GetBalance() t.Run("EthSendRawTransaction", func(t *testing.T) { - txEnv := txs.Enclose(genesisDoc.ChainID(), &payload.CallTx{ + txEnv := txs.Enclose(chainID, &payload.CallTx{ Input: &payload.TxInput{ Address: sender.GetAddress(), Amount: 1, diff --git a/rpc/web3/hex.go b/rpc/web3/hex.go index 4822ce0a8..24bbe6792 100644 --- a/rpc/web3/hex.go +++ b/rpc/web3/hex.go @@ -99,7 +99,7 @@ func (e *hexEncoder) BytesTrim(bs []byte) string { return "0x" + str } -func (e *hexEncoder) BigInt(x big.Int) string { +func (e *hexEncoder) BigInt(x *big.Int) string { return e.BytesTrim(x.Bytes()) } diff --git a/txs/ethereum_tx.go b/txs/ethereum_tx.go index 070a22929..79ca23918 100644 --- a/txs/ethereum_tx.go +++ b/txs/ethereum_tx.go @@ -26,8 +26,8 @@ type EthRawTx struct { chainID *big.Int } -func NewEthRawTx(chainID string) *EthRawTx { - return &EthRawTx{chainID: crypto.GetEthChainID(chainID)} +func NewEthRawTx(chainID *big.Int) *EthRawTx { + return &EthRawTx{chainID: chainID} } func EthRawTxFromEnvelope(txEnv *Envelope) (*EthRawTx, error) { From 8d6630d2eb9f022a2edf93e592f52777c4596511 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 18 Mar 2021 21:19:51 +0100 Subject: [PATCH 177/185] Support 0x-encoded integer ChainID for web3 integration - Moved the web3 hex and ChainID handling code to encoding to prevent import cycles Signed-off-by: Silas Davis --- crypto/crypto_test.go | 3 +- crypto/signature.go | 15 +--- crypto/signature_test.go | 16 ---- encoding/ethereum.go | 28 ++++++ encoding/ethereum_test.go | 17 ++++ encoding/rlp/rlp_test.go | 3 +- encoding/web3hex/decoder.go | 76 ++++++++++++++++ encoding/web3hex/decoder_test.go | 17 ++++ encoding/web3hex/encoder.go | 54 ++++++++++++ encoding/web3hex/encoder_test.go | 15 ++++ execution/evm/contract.go | 3 +- rpc/web3/eth_service.go | 118 +++++++++++++------------ rpc/web3/eth_service_test.go | 36 ++++---- rpc/web3/ethclient/client.go | 7 +- rpc/web3/ethclient/client_test.go | 12 +-- rpc/web3/ethclient/transact_client.go | 24 ++--- rpc/web3/ethclient/types.go | 6 +- rpc/web3/hex.go | 121 -------------------------- rpc/web3/hex_test.go | 25 ------ txs/ethereum_tx.go | 3 +- txs/tx.go | 2 +- vent/chain/ethereum/ethereum.go | 20 ++--- 22 files changed, 332 insertions(+), 289 deletions(-) delete mode 100644 crypto/signature_test.go create mode 100644 encoding/ethereum.go create mode 100644 encoding/ethereum_test.go create mode 100644 encoding/web3hex/decoder.go create mode 100644 encoding/web3hex/decoder_test.go create mode 100644 encoding/web3hex/encoder.go create mode 100644 encoding/web3hex/encoder_test.go delete mode 100644 rpc/web3/hex.go delete mode 100644 rpc/web3/hex_test.go diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index e4400cb2c..984462ab9 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -4,6 +4,7 @@ import ( "bytes" "crypto/rand" "fmt" + "math/big" "testing" "github.com/stretchr/testify/assert" @@ -48,7 +49,7 @@ func TestSigning(t *testing.T) { msg := []byte(("Flipity flobity floo")) sig, err := pk.Sign(msg) require.NoError(t, err) - ethSig, err := sig.GetEthSignature("floob") + ethSig, err := sig.GetEthSignature(big.NewInt(12342)) require.NoError(t, err) parity := ethSig.RecoveryIndex() require.True(t, parity == 0 || parity == 1) diff --git a/crypto/signature.go b/crypto/signature.go index afc85d27a..6ef310179 100644 --- a/crypto/signature.go +++ b/crypto/signature.go @@ -117,25 +117,16 @@ func (sig *Signature) String() string { return hex.EncodeUpperToString(sig.Signature) } -func GetEthChainID(chainID string) *big.Int { - b := new(big.Int) - id, ok := b.SetString(chainID, 10) - if ok { - return id - } - return b.SetBytes([]byte(chainID)) -} - -func GetEthSignatureRecoveryID(chainID string, parity *big.Int) *big.Int { +func GetEthSignatureRecoveryID(chainID *big.Int, parity *big.Int) *big.Int { // https://github.com/ethereum/EIPs/blob/b3bbee93dc8a775af6a6b2525c9ac5f70a7e5710/EIPS/eip-155.md v := new(big.Int) - v.Mul(GetEthChainID(chainID), big2) + v.Mul(chainID, big2) v.Add(v, parity) v.Add(v, ethereumRecoveryIDOffset) return v } -func (sig *Signature) GetEthSignature(chainID string) (*EIP155Signature, error) { +func (sig *Signature) GetEthSignature(chainID *big.Int) (*EIP155Signature, error) { if sig.CurveType != CurveTypeSecp256k1 { return nil, fmt.Errorf("can only GetEthSignature for %v keys, but got %v", CurveTypeSecp256k1, sig.CurveType) diff --git a/crypto/signature_test.go b/crypto/signature_test.go deleted file mode 100644 index 4e6dae626..000000000 --- a/crypto/signature_test.go +++ /dev/null @@ -1,16 +0,0 @@ -package crypto - -import ( - "fmt" - "math/big" - "testing" -) - -func TestGetEthChainID(t *testing.T) { - chainIDString := "BurrowChain_FAB3C1-AB0FD1" - chainID := GetEthChainID(chainIDString) - b := new(big.Int).SetBytes([]byte(chainIDString)) - fmt.Println(b) - fmt.Println(chainID) - fmt.Printf("%X", chainID.Bytes()) -} diff --git a/encoding/ethereum.go b/encoding/ethereum.go new file mode 100644 index 000000000..0b511ff8c --- /dev/null +++ b/encoding/ethereum.go @@ -0,0 +1,28 @@ +package encoding + +import ( + "math/big" + "strings" + + "github.com/hyperledger/burrow/encoding/web3hex" +) + +// Convert Burrow's ChainID to a *big.Int so it can be used as a nonce for Ethereum signing. +// For compatibility with Ethereum tooling this function first tries to interpret the ChainID as an integer encoded +// either as an eth-style 0x-prefixed hex string or a base 10 integer, falling back to interpreting the string's +// raw bytes as a big-endian integer +func GetEthChainID(chainID string) *big.Int { + if strings.HasPrefix(chainID, "0x") { + d := new(web3hex.Decoder) + b := d.BigInt(chainID) + if d.Err() == nil { + return b + } + } + b := new(big.Int) + id, ok := b.SetString(chainID, 10) + if ok { + return id + } + return b.SetBytes([]byte(chainID)) +} diff --git a/encoding/ethereum_test.go b/encoding/ethereum_test.go new file mode 100644 index 000000000..2d28a5cf8 --- /dev/null +++ b/encoding/ethereum_test.go @@ -0,0 +1,17 @@ +package encoding + +import ( + "math/big" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestGetEthChainID(t *testing.T) { + assert.Equal(t, big.NewInt(1234), GetEthChainID("1234")) + assert.Equal(t, big.NewInt(1234), GetEthChainID("0x4d2")) + chainID, ok := new(big.Int).SetString("28980219985052679991929851741845949978287371722649499714751652210", 10) + require.True(t, ok) + assert.Equal(t, chainID, GetEthChainID("FrogsEatApplesOnlyWhenClear")) +} diff --git a/encoding/rlp/rlp_test.go b/encoding/rlp/rlp_test.go index 715849061..6564ab948 100644 --- a/encoding/rlp/rlp_test.go +++ b/encoding/rlp/rlp_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding" "github.com/test-go/testify/require" ) @@ -285,7 +286,7 @@ func TestEthRawTx(t *testing.T) { To: to[:], Amount: big.NewInt(232), Data: []byte{1, 3, 4}, - ChainID: crypto.GetEthChainID("flgoo"), + ChainID: encoding.GetEthChainID("flgoo"), V: big.NewInt(272), R: bigly, S: bigly, diff --git a/encoding/web3hex/decoder.go b/encoding/web3hex/decoder.go new file mode 100644 index 000000000..1bce7c496 --- /dev/null +++ b/encoding/web3hex/decoder.go @@ -0,0 +1,76 @@ +package web3hex + +import ( + "fmt" + "math/big" + "strings" + + "github.com/hyperledger/burrow/crypto" + "github.com/tmthrgd/go-hex" +) + +type Decoder struct { + error + must bool +} + +func (d *Decoder) Must() *Decoder { + return &Decoder{must: true} +} + +func (d *Decoder) Err() error { + return d.error +} + +func (d *Decoder) pushErr(err error) { + if d.must { + panic(err) + } + if d.error == nil { + d.error = err + } +} + +func (d *Decoder) Bytes(hs string) []byte { + hexString := strings.TrimPrefix(hs, "0x") + // Ethereum returns odd-length hexString strings when it removes leading zeros + if len(hexString)%2 == 1 { + hexString = "0" + hexString + } + bs, err := hex.DecodeString(hexString) + if err != nil { + d.pushErr(fmt.Errorf("could not decode bytes from '%s': %w", hs, err)) + } + return bs +} + +func (d *Decoder) Address(hs string) crypto.Address { + if hs == "" { + return crypto.Address{} + } + address, err := crypto.AddressFromBytes(d.Bytes(hs)) + if err != nil { + d.pushErr(fmt.Errorf("could not decode address from '%s': %w", hs, err)) + } + return address +} + +func (d *Decoder) BigInt(hs string) *big.Int { + return new(big.Int).SetBytes(d.Bytes(hs)) +} + +func (d *Decoder) Uint64(hs string) uint64 { + bi := d.BigInt(hs) + if !bi.IsUint64() { + d.pushErr(fmt.Errorf("%v is not uint64", bi)) + } + return bi.Uint64() +} + +func (d *Decoder) Int64(hs string) int64 { + bi := d.BigInt(hs) + if !bi.IsInt64() { + d.pushErr(fmt.Errorf("%v is not int64", bi)) + } + return bi.Int64() +} diff --git a/encoding/web3hex/decoder_test.go b/encoding/web3hex/decoder_test.go new file mode 100644 index 000000000..548de91e3 --- /dev/null +++ b/encoding/web3hex/decoder_test.go @@ -0,0 +1,17 @@ +package web3hex + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestDecoder_Bytes(t *testing.T) { + d := new(Decoder) + assert.Equal(t, []byte{}, d.Bytes("")) + assert.Equal(t, []byte{1}, d.Bytes("0x1")) + assert.Equal(t, []byte{1}, d.Bytes("0x01")) + assert.Equal(t, []byte{1, 0xff}, d.Bytes("0x1ff")) + require.NoError(t, d.Err()) +} diff --git a/encoding/web3hex/encoder.go b/encoding/web3hex/encoder.go new file mode 100644 index 000000000..1a479fcd2 --- /dev/null +++ b/encoding/web3hex/encoder.go @@ -0,0 +1,54 @@ +package web3hex + +import ( + bin "encoding/binary" + "math/big" + "strings" + + "github.com/hyperledger/burrow/crypto" + "github.com/tmthrgd/go-hex" +) + +type encoder struct { +} + +var Encoder = new(encoder) + +func (e *encoder) Bytes(bs []byte) string { + return "0x" + hex.EncodeToString(bs) +} + +func (e *encoder) BytesTrim(bs []byte) string { + if len(bs) == 0 { + return "" + } + str := hex.EncodeToString(bs) + // Ethereum expects leading zeros to be removed from RLP encodings (SMH) + str = strings.TrimLeft(str, "0") + if len(str) == 0 { + // Special case for zero + return "0x0" + } + return "0x" + str +} + +func (e *encoder) BigInt(x *big.Int) string { + return e.BytesTrim(x.Bytes()) +} + +func (e *encoder) Uint64OmitEmpty(x uint64) string { + if x == 0 { + return "" + } + return e.Uint64(x) +} + +func (e *encoder) Uint64(x uint64) string { + bs := make([]byte, 8) + bin.BigEndian.PutUint64(bs, x) + return e.BytesTrim(bs) +} + +func (e *encoder) Address(address crypto.Address) string { + return e.BytesTrim(address.Bytes()) +} diff --git a/encoding/web3hex/encoder_test.go b/encoding/web3hex/encoder_test.go new file mode 100644 index 000000000..c9aa054f7 --- /dev/null +++ b/encoding/web3hex/encoder_test.go @@ -0,0 +1,15 @@ +package web3hex + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestEncoder_BytesTrim(t *testing.T) { + assert.Equal(t, "", Encoder.BytesTrim(nil)) + assert.Equal(t, "", Encoder.BytesTrim([]byte{})) + assert.Equal(t, "0x0", Encoder.BytesTrim([]byte{0})) + assert.Equal(t, "0x1", Encoder.BytesTrim([]byte{1})) + assert.Equal(t, "0x1ff", Encoder.BytesTrim([]byte{1, 255})) +} diff --git a/execution/evm/contract.go b/execution/evm/contract.go index c7b8b9cd1..201926e04 100644 --- a/execution/evm/contract.go +++ b/execution/evm/contract.go @@ -11,6 +11,7 @@ import ( "github.com/hyperledger/burrow/acm" . "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding" "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm/abi" @@ -488,7 +489,7 @@ func (c *Contract) execute(st engine.State, params engine.CallParams) ([]byte, e c.debugf(" => %v\n", *params.Gas) case CHAINID: // 0x46 - id := crypto.GetEthChainID(st.Blockchain.ChainID()) + id := encoding.GetEthChainID(st.Blockchain.ChainID()) stack.PushBigInt(id) c.debugf(" => %X\n", id) diff --git a/rpc/web3/eth_service.go b/rpc/web3/eth_service.go index 75362739e..16a2c222a 100644 --- a/rpc/web3/eth_service.go +++ b/rpc/web3/eth_service.go @@ -7,7 +7,9 @@ import ( "math/big" "strconv" + "github.com/hyperledger/burrow/encoding" "github.com/hyperledger/burrow/encoding/rlp" + "github.com/hyperledger/burrow/encoding/web3hex" "github.com/hyperledger/burrow/acm/acmstate" "github.com/hyperledger/burrow/acm/balance" @@ -74,7 +76,7 @@ func NewEthService( keyStore: keyStore, config: tmConfig.DefaultConfig(), // Ethereum expects ChainID to be an integer value - chainID: crypto.GetEthChainID(blockchain.ChainID()), + chainID: encoding.GetEthChainID(blockchain.ChainID()), logger: logger, } } @@ -97,9 +99,9 @@ func (srv *EthService) Web3ClientVersion() (*Web3ClientVersionResult, error) { // Web3Sha3 returns Keccak-256 (not the standardized SHA3-256) of the given data func (srv *EthService) Web3Sha3(req *Web3Sha3Params) (*Web3Sha3Result, error) { - d := new(HexDecoder) + d := new(web3hex.Decoder) return &Web3Sha3Result{ - HashedData: HexEncoder.Bytes(crypto.Keccak256(d.Bytes(req.Data))), + HashedData: web3hex.Encoder.Bytes(crypto.Keccak256(d.Bytes(req.Data))), }, d.Err() } @@ -112,7 +114,7 @@ func (srv *EthService) NetListening() (*NetListeningResult, error) { // NetPeerCount returns the number of connected peers func (srv *EthService) NetPeerCount() (*NetPeerCountResult, error) { - s := HexEncoder.Uint64(uint64(srv.nodeView.Peers().Size())) + s := web3hex.Encoder.Uint64(uint64(srv.nodeView.Peers().Size())) return &NetPeerCountResult{ s, }, nil @@ -122,7 +124,7 @@ func (srv *EthService) NetPeerCount() (*NetPeerCountResult, error) { // this is typically a small int (where 1 == Ethereum mainnet) func (srv *EthService) NetVersion() (*NetVersionResult, error) { return &NetVersionResult{ - ChainID: HexEncoder.BigInt(srv.chainID), + ChainID: web3hex.Encoder.BigInt(srv.chainID), }, nil } @@ -136,20 +138,20 @@ func (srv *EthService) EthProtocolVersion() (*EthProtocolVersionResult, error) { // EthChainId returns the chainID func (srv *EthService) EthChainId() (*EthChainIdResult, error) { return &EthChainIdResult{ - ChainId: HexEncoder.BigInt(srv.chainID), + ChainId: web3hex.Encoder.BigInt(srv.chainID), }, nil } // EthBlockNumber returns the latest height func (srv *EthService) EthBlockNumber() (*EthBlockNumberResult, error) { return &EthBlockNumberResult{ - BlockNumber: HexEncoder.Uint64(srv.blockchain.LastBlockHeight()), + BlockNumber: web3hex.Encoder.Uint64(srv.blockchain.LastBlockHeight()), }, nil } // EthCall executes a new message call immediately without creating a transaction func (srv *EthService) EthCall(req *EthCallParams) (*EthCallResult, error) { - d := new(HexDecoder) + d := new(web3hex.Decoder) from := d.Address(req.Transaction.From) to := d.Address(req.Transaction.To) @@ -167,7 +169,7 @@ func (srv *EthService) EthCall(req *EthCallParams) (*EthCallResult, error) { var result string if r := txe.GetResult(); r != nil { - result = HexEncoder.Bytes(r.GetReturn()) + result = web3hex.Encoder.Bytes(r.GetReturn()) } return &EthCallResult{ @@ -177,7 +179,7 @@ func (srv *EthService) EthCall(req *EthCallParams) (*EthCallResult, error) { // EthGetBalance returns an accounts balance, or an error if it does not exist func (srv *EthService) EthGetBalance(req *EthGetBalanceParams) (*EthGetBalanceResult, error) { - d := new(HexDecoder) + d := new(web3hex.Decoder) addr := d.Address(req.Address) if d.Err() != nil { return nil, d.Err() @@ -192,7 +194,7 @@ func (srv *EthService) EthGetBalance(req *EthGetBalanceParams) (*EthGetBalanceRe } return &EthGetBalanceResult{ - GetBalanceResult: HexEncoder.Bytes(balance.NativeToWei(acc.Balance).Bytes()), + GetBalanceResult: web3hex.Encoder.Bytes(balance.NativeToWei(acc.Balance).Bytes()), }, nil } @@ -243,7 +245,7 @@ func (srv *EthService) EthGetBlockTransactionCountByHash(req *EthGetBlockTransac } return &EthGetBlockTransactionCountByHashResult{ - BlockTransactionCountByHash: HexEncoder.Uint64(uint64(numTxs)), + BlockTransactionCountByHash: web3hex.Encoder.Uint64(uint64(numTxs)), }, nil } @@ -260,13 +262,13 @@ func (srv *EthService) EthGetBlockTransactionCountByNumber(req *EthGetBlockTrans } return &EthGetBlockTransactionCountByNumberResult{ - BlockTransactionCountByHash: HexEncoder.Uint64(uint64(numTxs)), + BlockTransactionCountByHash: web3hex.Encoder.Uint64(uint64(numTxs)), }, nil } // EthGetCode returns the EVM bytecode at an address func (srv *EthService) EthGetCode(req *EthGetCodeParams) (*EthGetCodeResult, error) { - d := new(HexDecoder) + d := new(web3hex.Decoder) addr := d.Address(req.Address) if d.Err() != nil { return nil, d.Err() @@ -280,7 +282,7 @@ func (srv *EthService) EthGetCode(req *EthGetCodeParams) (*EthGetCodeResult, err } return &EthGetCodeResult{ - Bytes: HexEncoder.Bytes(acc.EVMCode), + Bytes: web3hex.Encoder.Bytes(acc.EVMCode), }, nil } @@ -305,7 +307,7 @@ func (srv *EthService) EthGetTransactionByBlockHashAndIndex(req *EthGetTransacti return nil, err } - d := new(HexDecoder) + d := new(web3hex.Decoder) index := d.Uint64(req.Index) @@ -343,7 +345,7 @@ func (srv *EthService) EthGetTransactionByBlockNumberAndIndex(req *EthGetTransac if err != nil { return nil, err } - d := new(HexDecoder) + d := new(web3hex.Decoder) index := d.Uint64(req.Index) if d.Err() != nil { return nil, d.Err() @@ -366,7 +368,7 @@ func (srv *EthService) EthGetTransactionByBlockNumberAndIndex(req *EthGetTransac // EthGetTransactionByHash finds a tx by the given hash func (srv *EthService) EthGetTransactionByHash(req *EthGetTransactionByHashParams) (*EthGetTransactionByHashResult, error) { - d := new(HexDecoder) + d := new(web3hex.Decoder) hash := d.Bytes(req.TransactionHash) if d.Err() != nil { @@ -394,7 +396,7 @@ func (srv *EthService) EthGetTransactionByHash(req *EthGetTransactionByHashParam // EthGetTransactionCount returns the number of transactions sent from an address func (srv *EthService) EthGetTransactionCount(req *EthGetTransactionCountParams) (*EthGetTransactionCountResult, error) { - d := new(HexDecoder) + d := new(web3hex.Decoder) addr := d.Address(req.Address) if d.Err() != nil { return nil, d.Err() @@ -408,7 +410,7 @@ func (srv *EthService) EthGetTransactionCount(req *EthGetTransactionCountParams) // TODO: sequence may not always be accurate, is there a better way? return &EthGetTransactionCountResult{ - NonceOrNull: HexEncoder.Uint64(acc.GetSequence()), + NonceOrNull: web3hex.Encoder.Uint64(acc.GetSequence()), }, nil } @@ -430,7 +432,7 @@ func getHashAndCallTxFromExecution(txe *exec.TxExecution) ([]byte, *payload.Call // EthGetTransactionReceipt returns the receipt of a previously committed tx func (srv *EthService) EthGetTransactionReceipt(req *EthGetTransactionReceiptParams) (*EthGetTransactionReceiptResult, error) { - d := new(HexDecoder) + d := new(web3hex.Decoder) data := d.Bytes(req.TransactionHash) if d.Err() != nil { @@ -454,20 +456,20 @@ func (srv *EthService) EthGetTransactionReceipt(req *EthGetTransactionReceiptPar return nil, err } - status := HexEncoder.Uint64(1) + status := web3hex.Encoder.Uint64(1) if err := txe.Exception.AsError(); err != nil { - status = HexEncoder.Uint64(0) + status = web3hex.Encoder.Uint64(0) } result := &EthGetTransactionReceiptResult{ Receipt: Receipt{ Status: status, - TransactionIndex: HexEncoder.Uint64(txe.GetIndex()), - BlockNumber: HexEncoder.Uint64(uint64(block.Height)), - BlockHash: HexEncoder.Bytes(block.Hash()), - From: HexEncoder.Bytes(tx.GetInput().Address.Bytes()), - GasUsed: HexEncoder.Uint64(txe.Result.GetGasUsed()), - TransactionHash: HexEncoder.Bytes(hash), + TransactionIndex: web3hex.Encoder.Uint64(txe.GetIndex()), + BlockNumber: web3hex.Encoder.Uint64(uint64(block.Height)), + BlockHash: web3hex.Encoder.Bytes(block.Hash()), + From: web3hex.Encoder.Bytes(tx.GetInput().Address.Bytes()), + GasUsed: web3hex.Encoder.Uint64(txe.Result.GetGasUsed()), + TransactionHash: web3hex.Encoder.Bytes(hash), CumulativeGasUsed: hexZero, LogsBloom: hexZero, Logs: []Logs{}, @@ -475,10 +477,10 @@ func (srv *EthService) EthGetTransactionReceipt(req *EthGetTransactionReceiptPar } if txe.Receipt != nil { - result.Receipt.ContractAddress = HexEncoder.Bytes(txe.Receipt.ContractAddress.Bytes()) + result.Receipt.ContractAddress = web3hex.Encoder.Bytes(txe.Receipt.ContractAddress.Bytes()) result.Receipt.To = pending } else if tx.Address != nil { - result.Receipt.To = HexEncoder.Bytes(tx.Address.Bytes()) + result.Receipt.To = web3hex.Encoder.Bytes(tx.Address.Bytes()) } return result, nil @@ -563,7 +565,7 @@ func (srv *EthService) EthGetRawTransactionByBlockNumberAndIndex(req *EthGetRawT } func (srv *EthService) EthSendRawTransaction(req *EthSendRawTransactionParams) (*EthSendRawTransactionResult, error) { - d := new(HexDecoder) + d := new(web3hex.Decoder) data := d.Bytes(req.SignedTransactionData) @@ -627,7 +629,7 @@ func (srv *EthService) EthSendRawTransaction(req *EthSendRawTransactionParams) ( } return &EthSendRawTransactionResult{ - TransactionHash: HexEncoder.Bytes(txe.GetTxHash().Bytes()), + TransactionHash: web3hex.Encoder.Bytes(txe.GetTxHash().Bytes()), }, nil } @@ -636,7 +638,7 @@ func (srv *EthService) EthSyncing() (*EthSyncingResult, error) { // TODO: remaining sync fields return &EthSyncingResult{ Syncing: SyncStatus{ - CurrentBlock: HexEncoder.Uint64(srv.blockchain.LastBlockHeight()), + CurrentBlock: web3hex.Encoder.Uint64(srv.blockchain.LastBlockHeight()), }, }, nil } @@ -658,12 +660,12 @@ func (srv *EthService) getBlockHeaderAtHeight(height uint64) (*types.Header, err } func hexKeccak(data []byte) string { - return HexEncoder.Bytes(crypto.Keccak256(data)) + return web3hex.Encoder.Bytes(crypto.Keccak256(data)) } func hexKeccakAddress(data []byte) string { addr := crypto.Keccak256(data) - return HexEncoder.Bytes(addr[len(addr)-20:]) + return web3hex.Encoder.Bytes(addr[len(addr)-20:]) } func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (Block, error) { @@ -678,8 +680,8 @@ func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (Blo ParentHash: hexKeccak(doc.AppHash.Bytes()), ReceiptsRoot: hexKeccak(doc.AppHash.Bytes()), StateRoot: hexKeccak(doc.AppHash.Bytes()), - Miner: HexEncoder.Bytes(doc.Validators[0].Address.Bytes()), - Timestamp: HexEncoder.Uint64(uint64(doc.GenesisTime.Unix())), + Miner: web3hex.Encoder.Bytes(doc.Validators[0].Address.Bytes()), + Timestamp: web3hex.Encoder.Uint64(uint64(doc.GenesisTime.Unix())), Number: hexZero, Size: hexZero, ExtraData: hexZero, @@ -725,17 +727,17 @@ func (srv *EthService) getBlockInfoAtHeight(height uint64, includeTxs bool) (Blo StateRoot: hexKeccak(block.Hash().Bytes()), ReceiptsRoot: hexKeccak(block.Hash().Bytes()), Nonce: hexZeroNonce, - Size: HexEncoder.Uint64(uint64(numTxs)), - Number: HexEncoder.Uint64(uint64(block.Height)), - Miner: HexEncoder.Bytes(block.ProposerAddress.Bytes()), + Size: web3hex.Encoder.Uint64(uint64(numTxs)), + Number: web3hex.Encoder.Uint64(uint64(block.Height)), + Miner: web3hex.Encoder.Bytes(block.ProposerAddress.Bytes()), Sha3Uncles: hexZero, LogsBloom: hexZero, ExtraData: hexZero, Difficulty: hexZero, TotalDifficulty: hexZero, GasUsed: hexZero, - GasLimit: HexEncoder.Uint64(maxGasLimit), - Timestamp: HexEncoder.Uint64(uint64(block.Time.Unix())), + GasLimit: web3hex.Encoder.Uint64(maxGasLimit), + Timestamp: web3hex.Encoder.Uint64(uint64(block.Time.Unix())), Transactions: transactions, Uncles: []string{}, }, nil @@ -747,24 +749,24 @@ func getTransaction(block *types.Header, hash []byte, tx *payload.CallTx) Transa V: hexZero, R: hexZero, S: hexZero, - From: HexEncoder.Bytes(tx.Input.Address.Bytes()), - Value: HexEncoder.Uint64(tx.Input.Amount), - Nonce: HexEncoder.Uint64(tx.Input.Sequence), - Gas: HexEncoder.Uint64(tx.GasLimit), - GasPrice: HexEncoder.Uint64(tx.GasPrice), - Data: HexEncoder.Bytes(tx.Data), + From: web3hex.Encoder.Bytes(tx.Input.Address.Bytes()), + Value: web3hex.Encoder.Uint64(tx.Input.Amount), + Nonce: web3hex.Encoder.Uint64(tx.Input.Sequence), + Gas: web3hex.Encoder.Uint64(tx.GasLimit), + GasPrice: web3hex.Encoder.Uint64(tx.GasPrice), + Data: web3hex.Encoder.Bytes(tx.Data), } if block != nil { // may be pending transaction.BlockHash = hexKeccak(block.Hash().Bytes()) - transaction.Hash = HexEncoder.Bytes(hash) - transaction.BlockNumber = HexEncoder.Uint64(uint64(block.Height)) + transaction.Hash = web3hex.Encoder.Bytes(hash) + transaction.BlockNumber = web3hex.Encoder.Uint64(uint64(block.Height)) transaction.TransactionIndex = hexZero } if tx.Address != nil { - transaction.To = HexEncoder.Bytes(tx.Address.Bytes()) + transaction.To = web3hex.Encoder.Bytes(tx.Address.Bytes()) } else { transaction.To = pending } @@ -785,7 +787,7 @@ func (srv *EthService) getHeightByWord(height string) (uint64, bool) { } func getHeightByNumber(height string) (uint64, error) { - d := new(HexDecoder) + d := new(web3hex.Decoder) return d.Uint64(height), d.Err() } @@ -809,7 +811,7 @@ func (srv *EthService) EthSendTransaction(req *EthSendTransactionParams) (*EthSe } var err error - d := new(HexDecoder) + d := new(web3hex.Decoder) if from := req.Transaction.From; from != "" { tx.Input.Address = d.Address(from) if d.Err() != nil { @@ -868,7 +870,7 @@ func (srv *EthService) EthSendTransaction(req *EthSendTransactionParams) (*EthSe } return &EthSendTransactionResult{ - TransactionHash: HexEncoder.Bytes(txe.GetTxHash().Bytes()), + TransactionHash: web3hex.Encoder.Bytes(txe.GetTxHash().Bytes()), }, nil } @@ -893,7 +895,7 @@ func (srv *EthService) EthAccounts() (*EthAccountsResult, error) { continue } // TODO: only return accounts that exist in current chain - addrs = append(addrs, HexEncoder.Bytes(key.Address.Bytes())) + addrs = append(addrs, web3hex.Encoder.Bytes(key.Address.Bytes())) } return &EthAccountsResult{ @@ -903,7 +905,7 @@ func (srv *EthService) EthAccounts() (*EthAccountsResult, error) { // EthSign: https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign func (srv *EthService) EthSign(req *EthSignParams) (*EthSignResult, error) { - d := new(HexDecoder) + d := new(web3hex.Decoder) to := d.Address(req.Address) signer, err := keys.AddressableSigner(srv.keyClient, to) if err != nil { @@ -925,7 +927,7 @@ func (srv *EthService) EthSign(req *EthSignParams) (*EthSignResult, error) { } return &EthSignResult{ - Signature: HexEncoder.Bytes(sig.RawBytes()), + Signature: web3hex.Encoder.Bytes(sig.RawBytes()), }, nil } diff --git a/rpc/web3/eth_service_test.go b/rpc/web3/eth_service_test.go index e3881f9cb..594ead86b 100644 --- a/rpc/web3/eth_service_test.go +++ b/rpc/web3/eth_service_test.go @@ -10,6 +10,8 @@ import ( "github.com/hyperledger/burrow/acm/balance" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding" + "github.com/hyperledger/burrow/encoding/web3hex" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/burrow/integration" "github.com/hyperledger/burrow/keys" @@ -22,7 +24,7 @@ import ( "github.com/stretchr/testify/require" ) -var d = new(web3.HexDecoder).Must() +var d = new(web3hex.Decoder).Must() // Check we can force set a decimal ChainID const chainID = "15321" @@ -93,7 +95,7 @@ func TestWeb3Service(t *testing.T) { t.Run("NetVersion", func(t *testing.T) { result, err := eth.NetVersion() require.NoError(t, err) - require.Equal(t, web3.HexEncoder.BigInt(crypto.GetEthChainID(genesisDoc.GetChainID())), result.ChainID) + require.Equal(t, web3hex.Encoder.BigInt(encoding.GetEthChainID(genesisDoc.GetChainID())), result.ChainID) }) t.Run("EthProtocolVersion", func(t *testing.T) { @@ -106,7 +108,7 @@ func TestWeb3Service(t *testing.T) { result, err := eth.EthChainId() require.NoError(t, err) doc := config.GenesisDoc - require.Equal(t, web3.HexEncoder.BigInt(crypto.GetEthChainID(doc.GetChainID())), result.ChainId) + require.Equal(t, web3hex.Encoder.BigInt(encoding.GetEthChainID(doc.GetChainID())), result.ChainId) }) }) @@ -139,7 +141,7 @@ func TestWeb3Service(t *testing.T) { bs, err := rawTx.Marshal() require.NoError(t, err) - raw := web3.HexEncoder.BytesTrim(bs) + raw := web3hex.Encoder.BytesTrim(bs) _, err = eth.EthSendRawTransaction(&web3.EthSendRawTransactionParams{ SignedTransactionData: raw, @@ -149,7 +151,7 @@ func TestWeb3Service(t *testing.T) { t.Run("EthGetBalance", func(t *testing.T) { result, err := eth.EthGetBalance(&web3.EthGetBalanceParams{ - Address: web3.HexEncoder.BytesTrim(receivee.Bytes()), + Address: web3hex.Encoder.BytesTrim(receivee.Bytes()), BlockNumber: "latest", }) require.NoError(t, err) @@ -163,7 +165,7 @@ func TestWeb3Service(t *testing.T) { Address: genesisAccounts[1].GetAddress().String(), }) require.NoError(t, err) - require.Equal(t, web3.HexEncoder.Uint64(1), result.NonceOrNull) + require.Equal(t, web3hex.Encoder.Uint64(1), result.NonceOrNull) }) // create contract on chain @@ -179,9 +181,9 @@ func TestWeb3Service(t *testing.T) { go func() { tx := &web3.EthSendTransactionParams{ Transaction: web3.Transaction{ - From: web3.HexEncoder.BytesTrim(genesisAccounts[3].GetAddress().Bytes()), - Gas: web3.HexEncoder.Uint64(uint64(40 + idx)), // make tx unique in mempool - Data: web3.HexEncoder.BytesTrim(rpc.Bytecode_HelloWorld), + From: web3hex.Encoder.BytesTrim(genesisAccounts[3].GetAddress().Bytes()), + Gas: web3hex.Encoder.Uint64(uint64(40 + idx)), // make tx unique in mempool + Data: web3hex.Encoder.BytesTrim(rpc.Bytecode_HelloWorld), }, } result, err := eth.EthSendTransaction(tx) @@ -202,9 +204,9 @@ func TestWeb3Service(t *testing.T) { t.Run("EthGetTransactionReceipt", func(t *testing.T) { sendResult, err := eth.EthSendTransaction(&web3.EthSendTransactionParams{ Transaction: web3.Transaction{ - From: web3.HexEncoder.BytesTrim(genesisAccounts[3].GetAddress().Bytes()), - Gas: web3.HexEncoder.Uint64(40), - Data: web3.HexEncoder.BytesTrim(rpc.Bytecode_HelloWorld), + From: web3hex.Encoder.BytesTrim(genesisAccounts[3].GetAddress().Bytes()), + Gas: web3hex.Encoder.Uint64(40), + Data: web3hex.Encoder.BytesTrim(rpc.Bytecode_HelloWorld), }, }) require.NoError(t, err) @@ -226,9 +228,9 @@ func TestWeb3Service(t *testing.T) { result, err := eth.EthCall(&web3.EthCallParams{ Transaction: web3.Transaction{ - From: web3.HexEncoder.BytesTrim(genesisAccounts[1].GetAddress().Bytes()), + From: web3hex.Encoder.BytesTrim(genesisAccounts[1].GetAddress().Bytes()), To: contractAddress, - Data: web3.HexEncoder.BytesTrim(packed), + Data: web3hex.Encoder.BytesTrim(packed), }, }) require.NoError(t, err) @@ -246,7 +248,7 @@ func TestWeb3Service(t *testing.T) { Address: contractAddress, }) require.NoError(t, err) - require.Equal(t, web3.HexEncoder.BytesTrim(rpc.DeployedBytecode_HelloWorld), strings.ToLower(result.Bytes)) + require.Equal(t, web3hex.Encoder.BytesTrim(rpc.DeployedBytecode_HelloWorld), strings.ToLower(result.Bytes)) }) }) @@ -262,7 +264,7 @@ func TestWeb3Service(t *testing.T) { require.Len(t, result.Addresses, len(genesisAccounts)-1) for _, acc := range genesisAccounts { if acc.PrivateKey().CurveType == crypto.CurveTypeSecp256k1 { - require.Contains(t, result.Addresses, web3.HexEncoder.BytesTrim(acc.GetAddress().Bytes())) + require.Contains(t, result.Addresses, web3hex.Encoder.BytesTrim(acc.GetAddress().Bytes())) } } }) @@ -277,7 +279,7 @@ func TestWeb3Service(t *testing.T) { }) t.Run("EthGetBlock", func(t *testing.T) { - numberResult, err := eth.EthGetBlockByNumber(&web3.EthGetBlockByNumberParams{BlockNumber: web3.HexEncoder.Uint64(1)}) + numberResult, err := eth.EthGetBlockByNumber(&web3.EthGetBlockByNumberParams{BlockNumber: web3hex.Encoder.Uint64(1)}) require.NoError(t, err) hashResult, err := eth.EthGetBlockByHash(&web3.EthGetBlockByHashParams{BlockHash: numberResult.GetBlockByNumberResult.Hash}) require.NoError(t, err) diff --git a/rpc/web3/ethclient/client.go b/rpc/web3/ethclient/client.go index 99365c263..cdeab8f29 100644 --- a/rpc/web3/ethclient/client.go +++ b/rpc/web3/ethclient/client.go @@ -6,6 +6,7 @@ import ( "time" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding/web3hex" "github.com/hyperledger/burrow/rpc" "github.com/hyperledger/burrow/rpc/rpcevents" "github.com/hyperledger/burrow/rpc/web3" @@ -58,7 +59,7 @@ func (c *EthClient) SendRawTransaction(txHex string) (string, error) { func (c *EthClient) GetTransactionCount(address crypto.Address) (string, error) { var count string - err := c.Call(EthGetTransactionCountMethod, []string{web3.HexEncoder.Address(address), "latest"}, &count) + err := c.Call(EthGetTransactionCountMethod, []string{web3hex.Encoder.Address(address), "latest"}, &count) if err != nil { return "", err } @@ -125,7 +126,7 @@ func (c *EthClient) BlockNumber() (uint64, error) { if err != nil { return 0, err } - d := new(web3.HexDecoder) + d := new(web3hex.Decoder) return d.Uint64(*latestBlock), d.Err() } @@ -192,7 +193,7 @@ func logBound(bound *rpcevents.Bound) string { case rpcevents.Bound_LATEST: return "latest" case rpcevents.Bound_ABSOLUTE: - return web3.HexEncoder.Uint64(bound.Index) + return web3hex.Encoder.Uint64(bound.Index) default: return "" } diff --git a/rpc/web3/ethclient/client_test.go b/rpc/web3/ethclient/client_test.go index b155e2b4e..1086c5804 100644 --- a/rpc/web3/ethclient/client_test.go +++ b/rpc/web3/ethclient/client_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding/web3hex" "github.com/hyperledger/burrow/execution/solidity" "github.com/hyperledger/burrow/rpc/rpcevents" - "github.com/hyperledger/burrow/rpc/web3" "github.com/hyperledger/burrow/tests/web3/web3test" "github.com/stretchr/testify/assert" @@ -28,11 +28,11 @@ func TestEthAccounts(t *testing.T) { func TestEthSendTransaction(t *testing.T) { pk := web3test.GetPrivateKey(t) - d := new(web3.HexDecoder) + d := new(web3hex.Decoder) param := &EthSendTransactionParam{ - From: web3.HexEncoder.Address(pk.GetAddress()), - Gas: web3.HexEncoder.Uint64(999999), - Data: web3.HexEncoder.BytesTrim(solidity.Bytecode_EventEmitter), + From: web3hex.Encoder.Address(pk.GetAddress()), + Gas: web3hex.Encoder.Uint64(999999), + Data: web3hex.Encoder.BytesTrim(solidity.Bytecode_EventEmitter), } txHash, err := client.SendTransaction(param) require.NoError(t, err) @@ -82,7 +82,7 @@ func TestEthClient_GetLogs(t *testing.T) { func TestEthClient_GetBlockByNumber(t *testing.T) { block, err := client.GetBlockByNumber("latest") require.NoError(t, err) - d := new(web3.HexDecoder) + d := new(web3hex.Decoder) assert.Greater(t, d.Uint64(block.Number), uint64(0)) require.NoError(t, d.Err()) } diff --git a/rpc/web3/ethclient/transact_client.go b/rpc/web3/ethclient/transact_client.go index 64bcaa8a4..6258468bc 100644 --- a/rpc/web3/ethclient/transact_client.go +++ b/rpc/web3/ethclient/transact_client.go @@ -6,8 +6,8 @@ import ( "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding/web3hex" "github.com/hyperledger/burrow/execution/exec" - "github.com/hyperledger/burrow/rpc/web3" "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" "google.golang.org/grpc" @@ -78,7 +78,7 @@ func (cli *TransactClient) CallTxSync(ctx context.Context, tx *payload.CallTx, return nil, err } - d := new(web3.HexDecoder) + d := new(web3hex.Decoder) header := &exec.TxHeader{ TxType: payload.TypeCall, @@ -102,21 +102,21 @@ func (cli *TransactClient) CallTxSync(ctx context.Context, tx *payload.CallTx, func (cli *TransactClient) SendTransaction(tx *payload.CallTx) (string, error) { var to string if tx.Address != nil { - to = web3.HexEncoder.Address(*tx.Address) + to = web3hex.Encoder.Address(*tx.Address) } var nonce string if tx.Input.Sequence != 0 { - nonce = web3.HexEncoder.Uint64OmitEmpty(tx.Input.Sequence) + nonce = web3hex.Encoder.Uint64OmitEmpty(tx.Input.Sequence) } param := &EthSendTransactionParam{ - From: web3.HexEncoder.Address(tx.Input.Address), + From: web3hex.Encoder.Address(tx.Input.Address), To: to, - Gas: web3.HexEncoder.Uint64OmitEmpty(tx.GasLimit), - GasPrice: web3.HexEncoder.Uint64OmitEmpty(tx.GasPrice), - Value: web3.HexEncoder.Uint64OmitEmpty(tx.Input.Amount), - Data: web3.HexEncoder.BytesTrim(tx.Data), + Gas: web3hex.Encoder.Uint64OmitEmpty(tx.GasLimit), + GasPrice: web3hex.Encoder.Uint64OmitEmpty(tx.GasPrice), + Value: web3hex.Encoder.Uint64OmitEmpty(tx.Input.Amount), + Data: web3hex.Encoder.BytesTrim(tx.Data), Nonce: nonce, } @@ -147,7 +147,7 @@ func (cli *TransactClient) SendRawTransaction(tx *payload.CallTx, signer acm.Add return "", fmt.Errorf("could not marshal Ethereum raw transaction: %w", err) } - return cli.client.SendRawTransaction(web3.HexEncoder.BytesTrim(bs)) + return cli.client.SendRawTransaction(web3hex.Encoder.BytesTrim(bs)) } func (cli *TransactClient) GetChainID() (string, error) { @@ -166,7 +166,7 @@ func (cli *TransactClient) GetGasPrice() (uint64, error) { if err != nil { return 0, fmt.Errorf("could not get gas price: %w", err) } - d := new(web3.HexDecoder) + d := new(web3hex.Decoder) return d.Uint64(gasPrice), d.Err() } @@ -175,7 +175,7 @@ func (cli *TransactClient) GetTransactionCount(address crypto.Address) (uint64, if err != nil { return 0, fmt.Errorf("could not get transaction acount for address %s: %w", address, err) } - d := new(web3.HexDecoder) + d := new(web3hex.Decoder) return d.Uint64(count), d.Err() } diff --git a/rpc/web3/ethclient/types.go b/rpc/web3/ethclient/types.go index 295adec0e..c7ede5d4b 100644 --- a/rpc/web3/ethclient/types.go +++ b/rpc/web3/ethclient/types.go @@ -3,8 +3,8 @@ package ethclient import ( "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding/web3hex" "github.com/hyperledger/burrow/rpc/rpcevents" - "github.com/hyperledger/burrow/rpc/web3" ) // These types partially duplicate some of those web3/types.go, the should probably be unified at some point but @@ -55,11 +55,11 @@ type Filter struct { func (f *Filter) EthFilter() *EthFilter { topics := make([]string, len(f.Topics)) for i, t := range f.Topics { - topics[i] = web3.HexEncoder.BytesTrim(t[:]) + topics[i] = web3hex.Encoder.BytesTrim(t[:]) } addresses := make([]string, len(f.Addresses)) for i, a := range f.Addresses { - addresses[i] = web3.HexEncoder.Address(a) + addresses[i] = web3hex.Encoder.Address(a) } return &EthFilter{ FromBlock: logBound(f.GetStart()), diff --git a/rpc/web3/hex.go b/rpc/web3/hex.go deleted file mode 100644 index 24bbe6792..000000000 --- a/rpc/web3/hex.go +++ /dev/null @@ -1,121 +0,0 @@ -package web3 - -import ( - bin "encoding/binary" - "fmt" - "math/big" - "strings" - - "github.com/hyperledger/burrow/crypto" - "github.com/tmthrgd/go-hex" -) - -type HexDecoder struct { - error - must bool -} - -func (d *HexDecoder) Must() *HexDecoder { - return &HexDecoder{must: true} -} - -func (d *HexDecoder) Err() error { - return d.error -} - -func (d *HexDecoder) pushErr(err error) { - if d.must { - panic(err) - } - if d.error == nil { - d.error = err - } -} - -func (d *HexDecoder) Bytes(hs string) []byte { - hexString := strings.TrimPrefix(hs, "0x") - // Ethereum returns odd-length hexString strings when it removes leading zeros - if len(hexString)%2 == 1 { - hexString = "0" + hexString - } - bs, err := hex.DecodeString(hexString) - if err != nil { - d.pushErr(fmt.Errorf("could not decode bytes from '%s': %w", hs, err)) - } - return bs -} - -func (d *HexDecoder) Address(hs string) crypto.Address { - if hs == "" { - return crypto.Address{} - } - address, err := crypto.AddressFromBytes(d.Bytes(hs)) - if err != nil { - d.pushErr(fmt.Errorf("could not decode address from '%s': %w", hs, err)) - } - return address -} - -func (d *HexDecoder) BigInt(hs string) *big.Int { - return new(big.Int).SetBytes(d.Bytes(hs)) -} - -func (d *HexDecoder) Uint64(hs string) uint64 { - bi := d.BigInt(hs) - if !bi.IsUint64() { - d.pushErr(fmt.Errorf("%v is not uint64", bi)) - } - return bi.Uint64() -} - -func (d *HexDecoder) Int64(hs string) int64 { - bi := d.BigInt(hs) - if !bi.IsInt64() { - d.pushErr(fmt.Errorf("%v is not int64", bi)) - } - return bi.Int64() -} - -type hexEncoder struct { -} - -var HexEncoder = new(hexEncoder) - -func (e *hexEncoder) Bytes(bs []byte) string { - return "0x" + hex.EncodeToString(bs) -} - -func (e *hexEncoder) BytesTrim(bs []byte) string { - if len(bs) == 0 { - return "" - } - str := hex.EncodeToString(bs) - // Ethereum expects leading zeros to be removed from RLP encodings (SMH) - str = strings.TrimLeft(str, "0") - if len(str) == 0 { - // Special case for zero - return "0x0" - } - return "0x" + str -} - -func (e *hexEncoder) BigInt(x *big.Int) string { - return e.BytesTrim(x.Bytes()) -} - -func (e *hexEncoder) Uint64OmitEmpty(x uint64) string { - if x == 0 { - return "" - } - return e.Uint64(x) -} - -func (e *hexEncoder) Uint64(x uint64) string { - bs := make([]byte, 8) - bin.BigEndian.PutUint64(bs, x) - return e.BytesTrim(bs) -} - -func (e *hexEncoder) Address(address crypto.Address) string { - return e.BytesTrim(address.Bytes()) -} diff --git a/rpc/web3/hex_test.go b/rpc/web3/hex_test.go deleted file mode 100644 index 9dcb32a6f..000000000 --- a/rpc/web3/hex_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package web3 - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestHexEncoder_BytesTrim(t *testing.T) { - assert.Equal(t, "", HexEncoder.BytesTrim(nil)) - assert.Equal(t, "", HexEncoder.BytesTrim([]byte{})) - assert.Equal(t, "0x0", HexEncoder.BytesTrim([]byte{0})) - assert.Equal(t, "0x1", HexEncoder.BytesTrim([]byte{1})) - assert.Equal(t, "0x1ff", HexEncoder.BytesTrim([]byte{1, 255})) -} - -func TestHexDecoder_Bytes(t *testing.T) { - d := new(HexDecoder) - assert.Equal(t, []byte{}, d.Bytes("")) - assert.Equal(t, []byte{1}, d.Bytes("0x1")) - assert.Equal(t, []byte{1}, d.Bytes("0x01")) - assert.Equal(t, []byte{1, 0xff}, d.Bytes("0x1ff")) - require.NoError(t, d.Err()) -} diff --git a/txs/ethereum_tx.go b/txs/ethereum_tx.go index 79ca23918..b697da426 100644 --- a/txs/ethereum_tx.go +++ b/txs/ethereum_tx.go @@ -6,6 +6,7 @@ import ( "github.com/btcsuite/btcd/btcec" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding" "github.com/hyperledger/burrow/encoding/rlp" "github.com/tmthrgd/go-hex" ) @@ -44,7 +45,7 @@ func EthRawTxFromEnvelope(txEnv *Envelope) (*EthRawTx, error) { if len(txEnv.Signatories) > 1 { return nil, fmt.Errorf("can only form EthRawTx from Envelope with a zero or one signatories") } - sig, err := txEnv.Signatories[0].Signature.GetEthSignature(txEnv.Tx.ChainID) + sig, err := txEnv.Signatories[0].Signature.GetEthSignature(encoding.GetEthChainID(txEnv.Tx.ChainID)) if err != nil { return nil, err } diff --git a/txs/tx.go b/txs/tx.go index 8d03fac98..b2eec4107 100644 --- a/txs/tx.go +++ b/txs/tx.go @@ -98,7 +98,7 @@ func (tx *Tx) RLPRawTx() (*EthRawTx, error) { To: to, Amount: balance.NativeToWei(payload.Input.Amount), Data: payload.Data.Bytes(), - chainID: crypto.GetEthChainID(tx.ChainID), + chainID: encoding.GetEthChainID(tx.ChainID), }, nil default: return nil, fmt.Errorf("tx type %v not supported for rlp encoding", tx.Payload.Type()) diff --git a/vent/chain/ethereum/ethereum.go b/vent/chain/ethereum/ethereum.go index 89182611b..b0a983502 100644 --- a/vent/chain/ethereum/ethereum.go +++ b/vent/chain/ethereum/ethereum.go @@ -8,19 +8,17 @@ import ( "strconv" "time" - "github.com/hyperledger/burrow/event" - "github.com/hyperledger/burrow/event/query" - "github.com/hyperledger/burrow/logging" - "github.com/hyperledger/burrow/rpc/web3" - "github.com/hyperledger/burrow/vent/chain" - - "github.com/hyperledger/burrow/rpc/web3/ethclient" - "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/encoding/web3hex" + "github.com/hyperledger/burrow/event" + "github.com/hyperledger/burrow/event/query" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/exec" + "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/rpc/rpcevents" + "github.com/hyperledger/burrow/rpc/web3/ethclient" + "github.com/hyperledger/burrow/vent/chain" "github.com/hyperledger/burrow/vent/types" "google.golang.org/grpc/connectivity" ) @@ -131,11 +129,11 @@ func (b *Block) GetTxs() []chain.Transaction { } func (b *Block) GetMetadata(columns types.SQLColumnNames) (map[string]interface{}, error) { - block, err := b.client.GetBlockByNumber(web3.HexEncoder.Uint64(b.Height)) + block, err := b.client.GetBlockByNumber(web3hex.Encoder.Uint64(b.Height)) if err != nil { return nil, err } - d := new(web3.HexDecoder) + d := new(web3hex.Decoder) blockHeader, err := json.Marshal(block) if err != nil { return nil, fmt.Errorf("could not serialise block header: %w", err) @@ -223,7 +221,7 @@ type Event struct { var _ chain.Event = (*Event)(nil) func newEvent(log *ethclient.EthLog) (*Event, error) { - d := new(web3.HexDecoder) + d := new(web3hex.Decoder) topics := make([]binary.Word256, len(log.Topics)) for i, t := range log.Topics { topics[i] = binary.LeftPadWord256(d.Bytes(t)) From 8526cf5d1b819fd37cfcb4468a7f48b11c874162 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Fri, 19 Mar 2021 18:45:32 +0100 Subject: [PATCH 178/185] Prepare release 0.31.1 Signed-off-by: Silas Davis --- CHANGELOG.md | 29 +++++++++++++++++++++++------ NOTES.md | 37 +++++++++---------------------------- project/history.go | 25 ++++++++++++++++++++----- 3 files changed, 52 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de6cb915f..bc008cbdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog -## [0.31.0] +## [0.31.1] - 2020-03-19 +### Changed +- [Repo] main branch replaces master as per Hyperledger TSC guidelines + +### Fixed +- [Docker] Make sure default testnet mode works when running docker images +- [Vent] Use appropriately sized database integral types for EVM integer types (i.e. numeric for uint64 and bigger) +- [Vent] Ethereum block consumer now correctly reads to an _inclusive_ block batch end height +- [Web3] Handle integer ChainID for web3 consistently; return hex-encoded numeric value from web3 RPC, also allow overriding of genesis-hash derived ChainID so Burrow can be connected with from metamask + +### Added +- [Build] Build dev docker and JS releases by force pushing to prerelease branch +- [Vent] Expose BlockConsumerConfig to adjust backoff and read characteristics +- [Vent] Add vent-side continuity test over blocks (to double-check exactly once delivery of events) + + +## [0.31.0] - 2020-03-10 ### Changed - [Tendermint] Upgraded to Tendermint 0.34.3 - [Docker] Image will now start testnet by default @@ -66,8 +82,8 @@ ## [0.30.0] - 2020-03-05 ### Changed -- [JS] Partial rewrite of client API in typescript - +- [JS] Partial rewrite of client API in typescript + ### Fixed - [State] Blockchain now commits initial AppHash to avoid IAVL panic @@ -93,7 +109,7 @@ ## [0.29.5] - 2019-12-09 ### Security - [Tendermint] Upgraded to v0.32.8, checkTxAsync now includes node ID - + ### Changed - [Vent] Sync every block height to DB and send height notification from _vent_chain table so downstream can check DB sync without --blocks - [RPC/Query] GetName now returns GRPC NotFound status (rather than unknown) when a requested key is not set. @@ -126,7 +142,7 @@ ### Changed - [Config] Reverted rename of ValidatorAddress to Address in config (each Burrow node has a specific validator key it uses for signing whether or not it is running as a validator right now) -### Fixed +### Fixed - [EVM] Return integer overflow error code (not stack overflow) for integer overflow errors - [Docs] Fix broken examples - [Deploy] Set input on QueryContract jobs correctly @@ -354,7 +370,7 @@ ### Added - [EVM] Implemented [CREATE2 opcode](https://eips.ethereum.org/EIPS/eip-1014) -- [EVM] Implemented [EXTCODEHASH opcode](https://github.com/ethereum/EIPs/blob/main/EIPS/eip-1052.md) +- [EVM] Implemented [EXTCODEHASH opcode](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1052.md) - [Accounts] Add account GetStats to query endpoint - [Config] Expose AddrBookStrict from Tendermint - [Deploy] burrow deploy now prints events generated during transactions @@ -701,6 +717,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.31.1]: https://github.com/hyperledger/burrow/compare/v0.31.0...v0.31.1 [0.31.0]: https://github.com/hyperledger/burrow/compare/v0.30.5...v0.31.0 [0.30.5]: https://github.com/hyperledger/burrow/compare/v0.30.4...v0.30.5 [0.30.4]: https://github.com/hyperledger/burrow/compare/v0.30.3...v0.30.4 diff --git a/NOTES.md b/NOTES.md index 30791f63c..a9a152c76 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,33 +1,14 @@ ### Changed -- [Tendermint] Upgraded to Tendermint 0.34.3 -- [Docker] Image will now start testnet by default - -### Added -- [Vent] Added support for building Vent SQL tables from Ethereum web3 JSONRPC chains (useful for oracles/state channels with layer 1) -- [Vent] Added Status to healthcheck endpoint on Vent -- [Natives] Implemented ecrecover using btcec (revised key handling) -- [Engine] Implement cross-engine dispatch -- [WASM] Implement cross-engine calls and calls to precompiles -- [WASM] Significantly extend eWASM support and implement functions -- [WASM] Add printing debug functions -- [WASM] Implement CREATE, GETTXGASPRICE, GETBLOCKDIFFICULTY, SELFDESTRUCT eWASM functions (thanks Yoongbok Lee!) -- [WASM/JS] JS library supports deploying WASM code -- [Deploy] Can specify WASM in playbook -- [EVM] Implement CHAINID and DIFFICULTY opcodes -- [Query] PEG query grammar now supports Not ("NOT") and NotEqual ("!=") operators +- [Repo] main branch replaces master as per Hyperledger TSC guidelines ### Fixed -- [Deploy] Fix flaky parallel tests -- [EVM] Use correct opcode for create2 (thanks Vitali Grabovski!) -- [ABI] Check length of input before decoding (thanks Tri-stone!) -- [WASM] Constructor argument handling -- [RLP] Incorrect use of offsets for longer bytes strings -- [RLP] Use minimal encoding for length prefixes (no leading zeros) -- [Web3] Generate correct encoding hash for RawTx (ChainID in hash digest but not payload) -- [Web3] Generate canonical weird Ethereum hex -- [State] Fix read concurrency in RWTree (on which state is based) removing need for CallSim lock workaround +- [Docker] Make sure default testnet mode works when running docker images +- [Vent] Use appropriately sized database integral types for EVM integer types (i.e. numeric for uint64 and bigger) +- [Vent] Ethereum block consumer now correctly reads to an _inclusive_ block batch end height +- [Web3] Handle integer ChainID for web3 consistently; return hex-encoded numeric value from web3 RPC, also allow overriding of genesis-hash derived ChainID so Burrow can be connected with from metamask -### Security -- Updated elliptic JS dep to 6.5.3 -- Updated lodash to 4.17.19 +### Added +- [Build] Build dev docker and JS releases by force pushing to prerelease branch +- [Vent] Expose BlockConsumerConfig to adjust backoff and read characteristics +- [Vent] Add vent-side continuity test over blocks (to double-check exactly once delivery of events) diff --git a/project/history.go b/project/history.go index fd058f583..4304cf595 100644 --- a/project/history.go +++ b/project/history.go @@ -48,7 +48,22 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( - "0.31.0", + "0.31.1 - 2020-03-19", + `### Changed +- [Repo] main branch replaces master as per Hyperledger TSC guidelines + +### Fixed +- [Docker] Make sure default testnet mode works when running docker images +- [Vent] Use appropriately sized database integral types for EVM integer types (i.e. numeric for uint64 and bigger) +- [Vent] Ethereum block consumer now correctly reads to an _inclusive_ block batch end height +- [Web3] Handle integer ChainID for web3 consistently; return hex-encoded numeric value from web3 RPC, also allow overriding of genesis-hash derived ChainID so Burrow can be connected with from metamask + +### Added +- [Build] Build dev docker and JS releases by force pushing to prerelease branch +- [Vent] Expose BlockConsumerConfig to adjust backoff and read characteristics +- [Vent] Add vent-side continuity test over blocks (to double-check exactly once delivery of events) +`, + "0.31.0 - 2020-03-10", `### Changed - [Tendermint] Upgraded to Tendermint 0.34.3 - [Docker] Image will now start testnet by default @@ -110,8 +125,8 @@ var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "htt "0.30.0 - 2020-03-05", `### Changed -- [JS] Partial rewrite of client API in typescript - +- [JS] Partial rewrite of client API in typescript + ### Fixed - [State] Blockchain now commits initial AppHash to avoid IAVL panic `, @@ -133,7 +148,7 @@ var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "htt "0.29.5 - 2019-12-09", `### Security - [Tendermint] Upgraded to v0.32.8, checkTxAsync now includes node ID - + ### Changed - [Vent] Sync every block height to DB and send height notification from _vent_chain table so downstream can check DB sync without --blocks - [RPC/Query] GetName now returns GRPC NotFound status (rather than unknown) when a requested key is not set. @@ -163,7 +178,7 @@ var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "htt `### Changed - [Config] Reverted rename of ValidatorAddress to Address in config (each Burrow node has a specific validator key it uses for signing whether or not it is running as a validator right now) -### Fixed +### Fixed - [EVM] Return integer overflow error code (not stack overflow) for integer overflow errors - [Docs] Fix broken examples - [Deploy] Set input on QueryContract jobs correctly From a1b8ac2bb792fbcfcf2db3a533237db24451112d Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Tue, 23 Mar 2021 13:42:32 +0100 Subject: [PATCH 179/185] Fix unstable genesis hash between v0.30.0 and v0.31.0 This was due to accidental removaal of `omitempty` from AppHash. Also: - Add simple genesis stability snapshot test - Treat `GenesisDoc.ChainID` as read only and re-introduce `GenesisDoc.chainID` as lazy memo storage for ChainID to avoid writing back a chainID which was generated and never present in verbatim gendoc Signed-off-by: Silas Davis --- bcm/blockchain_test.go | 2 +- execution/evm/abi/abi.go | 2 +- genesis/genesis.go | 24 +++++--- genesis/genesis_test.go | 127 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 144 insertions(+), 11 deletions(-) diff --git a/bcm/blockchain_test.go b/bcm/blockchain_test.go index ea93d2ad4..fdf10cf71 100644 --- a/bcm/blockchain_test.go +++ b/bcm/blockchain_test.go @@ -21,7 +21,7 @@ func TestLoadOrNewBlockchain(t *testing.T) { assert.False(t, exists) assert.Equal(t, genesisDoc.GenesisTime, blockchain.LastBlockTime()) assert.Equal(t, uint64(0), blockchain.LastBlockHeight()) - assert.Equal(t, genesisDoc.Hash(), blockchain.AppHashAfterLastBlock()) + assert.Equal(t, genesisDoc.Hash().Bytes(), blockchain.AppHashAfterLastBlock()) // First block blockTime1 := genesisDoc.GenesisTime.Add(time.Second * 10) diff --git a/execution/evm/abi/abi.go b/execution/evm/abi/abi.go index 84fab5c59..79244b2b4 100644 --- a/execution/evm/abi/abi.go +++ b/execution/evm/abi/abi.go @@ -35,7 +35,7 @@ func LoadPath(abiFileOrDirs ...string) (*Spec, error) { return fmt.Errorf("error returned while walking abiDir '%s': %v", dir, err) } ext := filepath.Ext(path) - if fi.IsDir() || !(ext == ".bin" || ext == ".abi") { + if fi.IsDir() || !(ext == ".bin" || ext == ".abi" || ext == ".json") { return nil } abiSpc, err := ReadSpecFile(path) diff --git a/genesis/genesis.go b/genesis/genesis.go index 387d78c7e..70e0fb2ba 100644 --- a/genesis/genesis.go +++ b/genesis/genesis.go @@ -57,15 +57,16 @@ type GenesisDoc struct { GenesisTime time.Time ChainName string // Ordinarily we derive this from the genesis hash but to support explicit Ethereum ChainID it may be set - ChainID string `json:",omitempty" toml:",omitempty"` - AppHash binary.HexBytes - Params params `json:",omitempty" toml:",omitempty"` - Salt []byte `json:",omitempty" toml:",omitempty"` + ChainID string `json:",omitempty" toml:",omitempty"` + AppHash binary.HexBytes `json:",omitempty" toml:",omitempty"` + Params params `json:",omitempty" toml:",omitempty"` + Salt []byte `json:",omitempty" toml:",omitempty"` GlobalPermissions permission.AccountPermissions Accounts []Account Validators []Validator // memo - hash []byte + chainID string + hash []byte } func (genesisDoc *GenesisDoc) GlobalPermissionsAccount() *acm.Account { @@ -98,7 +99,7 @@ func (genesisDoc *GenesisDoc) JSONBytes() ([]byte, error) { return json.MarshalIndent(genesisDoc, "", "\t") } -func (genesisDoc *GenesisDoc) Hash() []byte { +func (genesisDoc *GenesisDoc) Hash() binary.HexBytes { if genesisDoc.hash != nil { return genesisDoc.hash } @@ -117,10 +118,15 @@ func (genesisDoc *GenesisDoc) ShortHash() []byte { } func (genesisDoc *GenesisDoc) GetChainID() string { - if genesisDoc.ChainID == "" { - genesisDoc.ChainID = fmt.Sprintf("%s-%X", genesisDoc.ChainName, genesisDoc.ShortHash()) + if genesisDoc.chainID == "" { + // Prefer explicit override ChainID + if genesisDoc.ChainID != "" { + genesisDoc.chainID = genesisDoc.ChainID + } else { + genesisDoc.chainID = fmt.Sprintf("%s-%X", genesisDoc.ChainName, genesisDoc.ShortHash()) + } } - return genesisDoc.ChainID + return genesisDoc.chainID } //------------------------------------------------------------ diff --git a/genesis/genesis_test.go b/genesis/genesis_test.go index 1229a00e2..095febbc6 100644 --- a/genesis/genesis_test.go +++ b/genesis/genesis_test.go @@ -5,6 +5,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/acm/validator" "github.com/hyperledger/burrow/permission" @@ -33,6 +35,16 @@ func TestMakeGenesisDocFromAccounts(t *testing.T) { assert.Equal(t, genDoc.Hash(), genDocOut.Hash()) fmt.Println(string(bs)) } +func TestGenesisStability(t *testing.T) { + genDoc := MakeGenesisDocFromAccounts("test-chain", nil, genesisTime, + accountMap("Tinkie-winkie", "Lala", "Po", "Dipsy"), + validatorMap("Foo", "Bar", "Baz"), + ) + + require.Equal(t, expectedGenesisJSON, genDoc.JSONString()) + + require.Equal(t, "C5B64E6AD231221C328271ADCE401AA11F9DF12830F7DA2FC3B2C923E929C532", genDoc.Hash().String()) +} func accountMap(names ...string) map[string]*acm.Account { accounts := make(map[string]*acm.Account, len(names)) @@ -59,3 +71,118 @@ func accountFromName(name string) *acm.Account { ca.Permissions = permission.AllAccountPermissions.Clone() return ca } + +// For genesis stability test +const expectedGenesisJSON = `{ + "GenesisTime": "2017-10-27T00:00:00Z", + "ChainName": "test-chain", + "Params": { + "ProposalThreshold": 0 + }, + "GlobalPermissions": { + "Base": { + "Perms": "send | call | createContract | createAccount | bond | name | proposal | input | batch | hasBase | hasRole", + "SetBit": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole" + } + }, + "Accounts": [ + { + "Address": "410427F4A361B958C97B47D81DAFDCF0A2B6503D", + "PublicKey": null, + "Amount": 521, + "Name": "Dipsy", + "Permissions": { + "Base": { + "Perms": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole", + "SetBit": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole" + } + } + }, + { + "Address": "1815E3667F406CA3872234D2573014CDE6CD2ABC", + "PublicKey": null, + "Amount": 378, + "Name": "Lala", + "Permissions": { + "Base": { + "Perms": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole", + "SetBit": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole" + } + } + }, + { + "Address": "A8174022832E4BA1BB52B380128514F72FB2FEBD", + "PublicKey": null, + "Amount": 191, + "Name": "Po", + "Permissions": { + "Base": { + "Perms": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole", + "SetBit": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole" + } + } + }, + { + "Address": "8979C634DFD2F6D20975EBE02C34B5E9C280AB18", + "PublicKey": null, + "Amount": 1304, + "Name": "Tinkie-winkie", + "Permissions": { + "Base": { + "Perms": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole", + "SetBit": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | identify | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole" + } + } + } + ], + "Validators": [ + { + "Address": "29BB63AD75E2DA3368FC823DC68C01CF1FA87190", + "PublicKey": { + "CurveType": "ed25519", + "PublicKey": "A18679ADC4391630178AC0DB35A115BEAEDA38B3DEABF92AC5FDE31A748DC259" + }, + "Amount": 277, + "Name": "Bar", + "UnbondTo": [ + { + "Address": "29BB63AD75E2DA3368FC823DC68C01CF1FA87190", + "PublicKey": null, + "Amount": 277 + } + ] + }, + { + "Address": "C92303227C9F0EC569B27B02DB328CFA0A7DF7E0", + "PublicKey": { + "CurveType": "ed25519", + "PublicKey": "E3C56A2C047C9C82036778620E6F9089E5FB38A5D36CE47D9545CBA930C79522" + }, + "Amount": 285, + "Name": "Baz", + "UnbondTo": [ + { + "Address": "C92303227C9F0EC569B27B02DB328CFA0A7DF7E0", + "PublicKey": null, + "Amount": 285 + } + ] + }, + { + "Address": "900EBED8C6B27F7B606B6CAD34DB03C2C5C0E541", + "PublicKey": { + "CurveType": "ed25519", + "PublicKey": "78133DE07C66C616263FD2D6A54BD3FC0D8CBF3A87BB2E0C410A0C8DEB6189CE" + }, + "Amount": 292, + "Name": "Foo", + "UnbondTo": [ + { + "Address": "900EBED8C6B27F7B606B6CAD34DB03C2C5C0E541", + "PublicKey": null, + "Amount": 292 + } + ] + } + ] +}` From 9242a225323b429196bb1f712c4398521f4f5155 Mon Sep 17 00:00:00 2001 From: Ry Jones Date: Mon, 22 Mar 2021 12:51:37 -0700 Subject: [PATCH 180/185] Create repolinter.yml Signed-off-by: Ry Jones --- .github/workflows/repolinter.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/repolinter.yml diff --git a/.github/workflows/repolinter.yml b/.github/workflows/repolinter.yml new file mode 100644 index 000000000..04781273a --- /dev/null +++ b/.github/workflows/repolinter.yml @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: Apache-2.0 +# Hyperledger Repolinter Action +name: Repolinter + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + container: hyperledger-tools.jfrog.io/repolinter:0.10.0 + steps: + - name: Checkout Code + uses: actions/checkout@v2 + - name: Lint Repo + continue-on-error: true + run: bundle exec /app/bin/repolinter.js --rulesetUrl https://raw.githubusercontent.com/hyperledger-labs/hyperledger-community-management-tools/master/repo_structure/repolint.json --format markdown > /repolinter-report.md + - name: Save repolinter-report file + uses: actions/upload-artifact@v2 + with: + name: repolinter-report + path: /repolinter-report.md From c2133a9c99c8943a81bf1adf1952a1e786b4a8e2 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Tue, 23 Mar 2021 13:42:32 +0100 Subject: [PATCH 181/185] Implement throttling for Ethereum consumer Signed-off-by: Silas Davis --- .github/workflows/test.yaml | 1 - acm/validator/ring.go | 2 +- cmd/burrow/commands/vent.go | 28 ++++++++- cmd/burrow/commands/vent_test.go | 21 +++++++ logging/logger.go | 43 ++++++++++++++ vent/chain/chain.go | 15 ++++- vent/chain/ethereum/consumer.go | 7 ++- vent/chain/ethereum/ethereum.go | 12 ++-- vent/chain/ethereum/throttle_client.go | 58 +++++++++++++++++++ vent/chain/ethereum/throttler.go | 70 +++++++++++++++++++++++ vent/chain/ethereum/throttler_test.go | 56 ++++++++++++++++++ vent/service/consumer_integration_test.go | 5 +- 12 files changed, 306 insertions(+), 12 deletions(-) create mode 100644 cmd/burrow/commands/vent_test.go create mode 100644 vent/chain/ethereum/throttle_client.go create mode 100644 vent/chain/ethereum/throttler.go create mode 100644 vent/chain/ethereum/throttler_test.go diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c01a3b6f4..7b5a1c223 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -36,7 +36,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: make test_integration_ethereum - run: make test_integration_vent_complete docker: diff --git a/acm/validator/ring.go b/acm/validator/ring.go index 56b37f864..f04c09040 100644 --- a/acm/validator/ring.go +++ b/acm/validator/ring.go @@ -7,7 +7,7 @@ import ( "github.com/hyperledger/burrow/crypto" ) -// Ring stores the validator power history in buckets as a riNng buffer. The primary storage is a the difference between +// Ring stores the validator power history in buckets as a ring buffer. The primary storage is a the difference between // each rotation (commit - i.e. block) in 'delta' and the cumulative result of each delta in cum, where the result of // the delta at i is stored in the cum at i+1. For example suppose we have 4 buckets then graphically: // diff --git a/cmd/burrow/commands/vent.go b/cmd/burrow/commands/vent.go index 106f8e249..bb2dbbcb4 100644 --- a/cmd/burrow/commands/vent.go +++ b/cmd/burrow/commands/vent.go @@ -5,6 +5,8 @@ import ( "io/ioutil" "os" "os/signal" + "strconv" + "strings" "sync" "syscall" "time" @@ -56,6 +58,7 @@ func Vent(output Output) func(cmd *cli.Cmd) { watchAddressesOpt := cmd.StringsOpt("watch", nil, "Add contract address to global watch filter") minimumHeightOpt := cmd.IntOpt("minimum-height", 0, "Only process block greater than or equal to height passed") maxRetriesOpt := cmd.IntOpt("max-retries", int(cfg.BlockConsumerConfig.MaxRetries), "Maximum number of retries when consuming blocks") + maxRequestRateOpt := cmd.StringOpt("max-request-rate", "", "Maximum request rate given as (number of requests)/(time base), e.g. 1000/24h for 1000 requests per day") backoffDurationOpt := cmd.StringOpt("backoff", "", "The minimum duration to wait before asking for new blocks - increases exponentially when errors occur. Values like 200ms, 1s, 2m") batchSizeOpt := cmd.IntOpt("batch-size", int(cfg.BlockConsumerConfig.MaxBlockBatchSize), @@ -77,6 +80,10 @@ func Vent(output Output) func(cmd *cli.Cmd) { cfg.HTTPListenAddress = *httpAddrOpt cfg.WatchAddresses = make([]crypto.Address, len(*watchAddressesOpt)) cfg.MinimumHeight = uint64(*minimumHeightOpt) + cfg.BlockConsumerConfig.MaxRequests, cfg.BlockConsumerConfig.TimeBase, err = parseRequestRate(*maxRequestRateOpt) + if err != nil { + output.Fatalf("Could not parse max request rate: %w", err) + } cfg.BlockConsumerConfig.MaxRetries = uint64(*maxRetriesOpt) cfg.BlockConsumerConfig.BaseBackoffDuration, err = parseDuration(*backoffDurationOpt) if err != nil { @@ -107,7 +114,7 @@ func Vent(output Output) func(cmd *cli.Cmd) { cmd.Spec = "--spec=... [--abi=...] " + "[--watch=...] [--minimum-height=] " + "[--max-retries=] [--backoff=] " + - "[--batch-size=] " + + "[--max-request-rate=] [--batch-size=] " + "[--db-adapter] [--db-url] [--db-schema] [--blocks] [--txs] [--chain-addr] [--http-addr] " + "[--log-level] [--announce-every=]" @@ -269,6 +276,25 @@ func parseDuration(duration string) (time.Duration, error) { return time.ParseDuration(duration) } +func parseRequestRate(rate string) (int, time.Duration, error) { + if rate == "" { + return 0, 0, nil + } + ratio := strings.Split(rate, "/") + if len(ratio) != 2 { + return 0, 0, fmt.Errorf("expected a ratio string separated by a '/' but got %s", rate) + } + requests, err := strconv.ParseInt(ratio[0], 10, 0) + if err != nil { + return 0, 0, fmt.Errorf("could not parse max requests as base 10 integer: %w", err) + } + timeBase, err := time.ParseDuration(ratio[1]) + if err != nil { + return 0, 0, fmt.Errorf("could not parse time base: %w", err) + } + return int(requests), timeBase, nil +} + type dbOpts struct { adapter *string url *string diff --git a/cmd/burrow/commands/vent_test.go b/cmd/burrow/commands/vent_test.go new file mode 100644 index 000000000..10dd5105b --- /dev/null +++ b/cmd/burrow/commands/vent_test.go @@ -0,0 +1,21 @@ +package commands + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestParseRequestRate(t *testing.T) { + requests, base, err := parseRequestRate("2334223/24h") + require.NoError(t, err) + assert.Equal(t, 2334223, requests) + assert.Equal(t, time.Hour*24, base) + + requests, base, err = parseRequestRate("99990/24h") + require.NoError(t, err) + assert.Equal(t, 99_990, requests) + assert.Equal(t, time.Hour*24, base) +} diff --git a/logging/logger.go b/logging/logger.go index a3d6219f1..4e697a6e1 100644 --- a/logging/logger.go +++ b/logging/logger.go @@ -59,6 +59,9 @@ func NewNoopLogger() *Logger { // Handle signals func (l *Logger) Sync() error { + if l == nil { + return nil + } // Send over input channels (to pass through any capture loggers) err := structure.Sync(l.Info) if err != nil { @@ -68,6 +71,9 @@ func (l *Logger) Sync() error { } func (l *Logger) Reload() error { + if l == nil { + return nil + } // Send directly to output logger return structure.Reload(l.Output) } @@ -81,6 +87,9 @@ func (l *Logger) Reload() error { // assumption about the name or signature of the logging method(s). // See InfoTraceLogger func (l *Logger) With(keyvals ...interface{}) *Logger { + if l == nil { + return nil + } return &Logger{ Output: l.Output, Info: log.With(l.Info, keyvals...), @@ -90,6 +99,9 @@ func (l *Logger) With(keyvals ...interface{}) *Logger { // Establish a context on the Info channel keeping Trace the same func (l *Logger) WithInfo(keyvals ...interface{}) *Logger { + if l == nil { + return nil + } return &Logger{ Output: l.Output, Info: log.With(l.Info, keyvals...), @@ -99,6 +111,9 @@ func (l *Logger) WithInfo(keyvals ...interface{}) *Logger { // Establish a context on the Trace channel keeping Info the same func (l *Logger) WithTrace(keyvals ...interface{}) *Logger { + if l == nil { + return nil + } return &Logger{ Output: l.Output, Info: l.Info, @@ -107,6 +122,9 @@ func (l *Logger) WithTrace(keyvals ...interface{}) *Logger { } func (l *Logger) WithPrefix(keyvals ...interface{}) *Logger { + if l == nil { + return nil + } return &Logger{ Output: l.Output, Info: log.WithPrefix(l.Info, keyvals...), @@ -116,19 +134,44 @@ func (l *Logger) WithPrefix(keyvals ...interface{}) *Logger { // Hot swap the underlying outputLogger with another one to re-route messages func (l *Logger) SwapOutput(infoLogger log.Logger) { + if l == nil { + return + } l.Output.Swap(infoLogger) } // Record structured Info log line with a message func (l *Logger) InfoMsg(message string, keyvals ...interface{}) error { + if l == nil { + return nil + } return Msg(l.Info, message, keyvals...) } // Record structured Trace log line with a message func (l *Logger) TraceMsg(message string, keyvals ...interface{}) error { + if l == nil { + return nil + } return Msg(l.Trace, message, keyvals...) } +// Record structured Info log line +func (l *Logger) InfoLog(keyvals ...interface{}) error { + if l == nil { + return nil + } + return l.Info.Log(keyvals...) +} + +// Record structured Trace log line +func (l *Logger) TraceLog(keyvals ...interface{}) error { + if l == nil { + return nil + } + return l.Trace.Log(keyvals...) +} + // Establish or extend the scope of this logger by appending scopeName to the Scope vector. // Like With the logging scope is append only but can be used to provide parenthetical scopes by hanging on to the // parent scope and using once the scope has been exited. The scope mechanism does is agnostic to the type of scope diff --git a/vent/chain/chain.go b/vent/chain/chain.go index 3ba965a78..eba6d4a36 100644 --- a/vent/chain/chain.go +++ b/vent/chain/chain.go @@ -16,8 +16,11 @@ import ( ) const ( + // Infura has free tier usage of 100,000 req/day + defaultMaxRequests = 99_990 + defaultTimeBase = time.Hour * 24 defaultMaxRetires = 5 - defaultBackoffBase = 250 * time.Millisecond + defaultBackoffBase = time.Second defaultMaxBlockBatchSize = 100 ) @@ -71,6 +74,10 @@ type Origin struct { // Client-side block consumer configuration. Requests are retried subject to backoff if a non-fatal error is detected type BlockConsumerConfig struct { + // The maximum number of requests to make per TimeBase before throttling requests + MaxRequests int + // The base duration over which to count requests to check for overage of MaxRequests + TimeBase time.Duration // The base backoff - we wait this amount of time between each batch and we increase the backoff exponentially // until we reach MaxRetries from BaseBackoffDuration BaseBackoffDuration time.Duration @@ -82,6 +89,12 @@ type BlockConsumerConfig struct { } func (config *BlockConsumerConfig) Complete() { + if config.MaxRequests == 0 { + config.MaxRequests = defaultMaxRequests + } + if config.TimeBase == 0 { + config.TimeBase = defaultTimeBase + } if config.MaxBlockBatchSize == 0 { config.MaxBlockBatchSize = defaultMaxBlockBatchSize } diff --git a/vent/chain/ethereum/consumer.go b/vent/chain/ethereum/consumer.go index 36f2bec6b..64d50da50 100644 --- a/vent/chain/ethereum/consumer.go +++ b/vent/chain/ethereum/consumer.go @@ -18,7 +18,7 @@ import ( const ConsumerScope = "EthereumConsumer" type consumer struct { - client EthClient + client ThrottleClient filter *chain.Filter blockRange *rpcevents.BlockRange logger *logging.Logger @@ -33,7 +33,7 @@ type consumer struct { blockBatchSize uint64 } -func Consume(client EthClient, filter *chain.Filter, blockRange *rpcevents.BlockRange, config *chain.BlockConsumerConfig, +func Consume(client ThrottleClient, filter *chain.Filter, blockRange *rpcevents.BlockRange, config *chain.BlockConsumerConfig, logger *logging.Logger, consume func(block chain.Block) error) error { c := consumer{ client: client, @@ -66,6 +66,7 @@ func (c *consumer) Consume() error { if err != nil { return err } + // Avoid spinning excessively where there may be no blocks available time.Sleep(c.backoffDuration) } @@ -75,6 +76,8 @@ func (c *consumer) Consume() error { func (c *consumer) ConsumeInBatches(start, end uint64) error { c.logger.TraceMsg("ConsumeInBatches", "start", start, "end", end) for batchStart := start; batchStart <= end; batchStart += c.blockBatchSize { + // Avoid breaching requests limit + c.client.Throttle() batchEnd := batchStart + c.blockBatchSize c.logger.TraceMsg("Consuming batch", "batch_start", batchStart, "batch_end", batchEnd) if batchEnd > end { diff --git a/vent/chain/ethereum/ethereum.go b/vent/chain/ethereum/ethereum.go index b0a983502..644ba930c 100644 --- a/vent/chain/ethereum/ethereum.go +++ b/vent/chain/ethereum/ethereum.go @@ -23,8 +23,10 @@ import ( "google.golang.org/grpc/connectivity" ) +const Scope = "Ethereum" + type Chain struct { - client EthClient + client ThrottleClient filter *chain.Filter chainID string version string @@ -46,16 +48,18 @@ type EthClient interface { // We rely on this failing if the chain is not an Ethereum Chain func New(client EthClient, filter *chain.Filter, consumerConfig *chain.BlockConsumerConfig, logger *logging.Logger) (*Chain, error) { - chainID, err := client.NetVersion() + logger = logger.WithScope(Scope) + throttleClient := NewThrottleClient(client, consumerConfig.MaxRequests, consumerConfig.TimeBase, logger) + chainID, err := throttleClient.NetVersion() if err != nil { return nil, fmt.Errorf("could not get Ethereum ChainID: %w", err) } - version, err := client.Web3ClientVersion() + version, err := throttleClient.Web3ClientVersion() if err != nil { return nil, fmt.Errorf("could not get Ethereum node version: %w", err) } return &Chain{ - client: client, + client: throttleClient, filter: filter, chainID: chainID, version: version, diff --git a/vent/chain/ethereum/throttle_client.go b/vent/chain/ethereum/throttle_client.go new file mode 100644 index 000000000..ac846f963 --- /dev/null +++ b/vent/chain/ethereum/throttle_client.go @@ -0,0 +1,58 @@ +package ethereum + +import ( + "time" + + "github.com/hyperledger/burrow/logging" + + "github.com/hyperledger/burrow/rpc/web3/ethclient" +) + +type ThrottleClient interface { + EthClient + Throttle() +} + +type throttleClient struct { + *Throttler + client EthClient +} + +func NewThrottleClient(client EthClient, maxRequests int, timeBase time.Duration, logger *logging.Logger) *throttleClient { + return &throttleClient{ + Throttler: NewThrottler(maxRequests, timeBase, timeBase, + logger.WithScope("ThrottleClient"). + With("max_requests", maxRequests, "time_base", timeBase.String())), + client: client, + } +} + +func (t *throttleClient) GetLogs(filter *ethclient.Filter) ([]*ethclient.EthLog, error) { + t.addNow() + return t.client.GetLogs(filter) +} + +func (t *throttleClient) BlockNumber() (uint64, error) { + t.addNow() + return t.client.BlockNumber() +} + +func (t *throttleClient) GetBlockByNumber(height string) (*ethclient.Block, error) { + t.addNow() + return t.client.GetBlockByNumber(height) +} + +func (t *throttleClient) NetVersion() (string, error) { + t.addNow() + return t.client.NetVersion() +} + +func (t *throttleClient) Web3ClientVersion() (string, error) { + t.addNow() + return t.client.Web3ClientVersion() +} + +func (t *throttleClient) Syncing() (bool, error) { + t.addNow() + return t.client.Syncing() +} diff --git a/vent/chain/ethereum/throttler.go b/vent/chain/ethereum/throttler.go new file mode 100644 index 000000000..bd705b1bd --- /dev/null +++ b/vent/chain/ethereum/throttler.go @@ -0,0 +1,70 @@ +package ethereum + +import ( + "math/big" + "time" + + "github.com/hyperledger/burrow/logging" +) + +type Throttler struct { + // Request timestamps as unix nanos (avoid space overhead of time.Time) + requests []int64 + maxRequestsPerNanosecond *big.Float + // Window over which to accumulate request times + window time.Duration + logger *logging.Logger +} + +func NewThrottler(maxRequests int, timeBase time.Duration, window time.Duration, logger *logging.Logger) *Throttler { + maxRequestsPerNanosecond := new(big.Float).SetInt64(int64(maxRequests)) + maxRequestsPerNanosecond.Quo(maxRequestsPerNanosecond, new(big.Float).SetInt64(int64(timeBase))) + return &Throttler{ + maxRequestsPerNanosecond: maxRequestsPerNanosecond, + window: window, + logger: logger, + } +} + +func (t *Throttler) Throttle() { + time.Sleep(t.calculateWait()) +} + +func (t *Throttler) calculateWait() time.Duration { + requests := len(t.requests) + if requests < 2 { + return 0 + } + delta := t.requests[requests-1] - t.requests[0] + deltaNanoseconds := new(big.Float).SetInt64(delta) + + allowedRequestsInDelta := new(big.Float).Mul(deltaNanoseconds, t.maxRequestsPerNanosecond) + + overage := allowedRequestsInDelta.Sub(new(big.Float).SetInt64(int64(requests)), allowedRequestsInDelta) + if overage.Sign() > 0 { + // Wait just long enough to eat our overage at max request rate + nanos, _ := new(big.Float).Quo(overage, t.maxRequestsPerNanosecond).Int64() + wait := time.Duration(nanos) + t.logger.InfoMsg("throttling connection", + "num_requests", requests, + "over_period", time.Duration(delta).String(), + "requests_overage", overage.String(), + "wait", wait.String(), + ) + return wait + } + return 0 +} + +func (t *Throttler) addNow() { + t.add(time.Now()) +} + +func (t *Throttler) add(now time.Time) { + cutoff := now.Add(-t.window) + // Remove expired requests + for len(t.requests) > 0 && t.requests[0] < cutoff.UnixNano() { + t.requests = t.requests[1:] + } + t.requests = append(t.requests, now.UnixNano()) +} diff --git a/vent/chain/ethereum/throttler_test.go b/vent/chain/ethereum/throttler_test.go new file mode 100644 index 000000000..d5c4fc63f --- /dev/null +++ b/vent/chain/ethereum/throttler_test.go @@ -0,0 +1,56 @@ +package ethereum + +import ( + "testing" + "time" + + "github.com/hyperledger/burrow/logging/logconfig" + + "github.com/stretchr/testify/assert" +) + +var logger = logconfig.Sink().Terminal().LoggingConfig().WithTrace().MustLogger() + +const delta = float64(time.Millisecond) + +func TestThrottler_Overage(t *testing.T) { + throttler := NewThrottler(100, time.Second, time.Minute, logger) + + now := doRequests(throttler, 100, time.Now(), time.Second) + assert.InDelta(t, time.Duration(0), throttler.calculateWait(), delta) + + doRequests(throttler, 200, now, time.Second) + assert.InDelta(t, time.Second, throttler.calculateWait(), delta) +} + +func TestThrottler_Expiry(t *testing.T) { + throttler := NewThrottler(100, time.Second, 2*time.Second, logger) + + now := doRequests(throttler, 200, time.Now(), time.Second) + assert.InDelta(t, time.Second, throttler.calculateWait(), delta) + + now = doRequests(throttler, 100, now, time.Second) + assert.InDelta(t, time.Second, throttler.calculateWait(), delta) + + now = doRequests(throttler, 100, now, time.Second) + assert.InDelta(t, time.Duration(0), throttler.calculateWait(), delta) +} + +func TestThrottler_Bursts(t *testing.T) { + throttler := NewThrottler(10_000, time.Hour, 2*time.Hour, logger) + + now := doRequests(throttler, 200, time.Now(), time.Millisecond) + assert.InDelta(t, time.Minute+12*time.Second, throttler.calculateWait(), delta) + + now = doRequests(throttler, 100, now, time.Second) + assert.InDelta(t, time.Minute+47*time.Second, throttler.calculateWait(), delta) +} + +// Do numRequests many requests from start within interval +func doRequests(throttler *Throttler, numRequests int, start time.Time, interval time.Duration) time.Time { + period := interval / time.Duration(numRequests-1) + for i := 0; i < numRequests; i++ { + throttler.add(start.Add(period * time.Duration(i))) + } + return start.Add(interval) +} diff --git a/vent/service/consumer_integration_test.go b/vent/service/consumer_integration_test.go index 52154a9fb..9ff6d7292 100644 --- a/vent/service/consumer_integration_test.go +++ b/vent/service/consumer_integration_test.go @@ -12,11 +12,12 @@ import ( "testing" "time" + "github.com/hyperledger/burrow/vent/chain/ethereum" + "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/exec" "github.com/hyperledger/burrow/logging/logconfig" "github.com/hyperledger/burrow/rpc/rpctransact" - "github.com/hyperledger/burrow/vent/chain/ethereum" "github.com/hyperledger/burrow/vent/config" "github.com/hyperledger/burrow/vent/service" "github.com/hyperledger/burrow/vent/sqldb" @@ -36,7 +37,7 @@ const ( var tables = types.DefaultSQLTableNames // Tweak logger for debug purposes here -var logger = logconfig.Sink().Terminal().FilterScope(ethereum.ConsumerScope).LoggingConfig().WithTrace().MustLogger() +var logger = logconfig.Sink().Terminal().FilterScope(ethereum.Scope).LoggingConfig().WithTrace().MustLogger() func testConsumer(t *testing.T, chainID string, cfg *config.VentConfig, tcli test.TransactClient, inputAddress crypto.Address) { From 2f2e47bd0d9d1b5df01eca1b2ee4dca23eb3286b Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 25 Mar 2021 00:04:22 +0100 Subject: [PATCH 182/185] Stop TxStack from rejecting StreamEvents from a dump/restored chain Relax the continuity check that requires a tx Envelope for transactions that have an Origin and therefore came from a dump of a predecessor chain Signed-off-by: Silas Davis --- CHANGELOG.md | 10 ++++++++++ NOTES.md | 13 +++---------- dump/load_test.go | 28 +++++++++++++++++++++------- execution/exec/stream_event.go | 5 ++++- project/history.go | 9 +++++++++ rpc/rpcevents/blocks.go | 2 +- 6 files changed, 48 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc008cbdf..4d066286a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,13 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.31.2] - 2020-03-24 +### Fixed +- [Dump] Stop TxStack EventStream consumer from rejecting events from dump/restored chain because they lack tx Envelopes (as they are intended to to keep dump format minimal) +- [Genesis] Fix hash instability introduced by accidentally removing omitempty from AppHash in genesis + +### Added +- [Vent] Implement throttling on Ethereum Vent consumer via --max-request-rate= flag to 'vent start' + + ## [0.31.1] - 2020-03-19 ### Changed - [Repo] main branch replaces master as per Hyperledger TSC guidelines @@ -717,6 +726,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.31.2]: https://github.com/hyperledger/burrow/compare/v0.31.1...v0.31.2 [0.31.1]: https://github.com/hyperledger/burrow/compare/v0.31.0...v0.31.1 [0.31.0]: https://github.com/hyperledger/burrow/compare/v0.30.5...v0.31.0 [0.30.5]: https://github.com/hyperledger/burrow/compare/v0.30.4...v0.30.5 diff --git a/NOTES.md b/NOTES.md index a9a152c76..cfa942dc5 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,14 +1,7 @@ -### Changed -- [Repo] main branch replaces master as per Hyperledger TSC guidelines - ### Fixed -- [Docker] Make sure default testnet mode works when running docker images -- [Vent] Use appropriately sized database integral types for EVM integer types (i.e. numeric for uint64 and bigger) -- [Vent] Ethereum block consumer now correctly reads to an _inclusive_ block batch end height -- [Web3] Handle integer ChainID for web3 consistently; return hex-encoded numeric value from web3 RPC, also allow overriding of genesis-hash derived ChainID so Burrow can be connected with from metamask +- [Dump] Stop TxStack EventStream consumer from rejecting events from dump/restored chain because they lack tx Envelopes (as they are intended to to keep dump format minimal) +- [Genesis] Fix hash instability introduced by accidentally removing omitempty from AppHash in genesis ### Added -- [Build] Build dev docker and JS releases by force pushing to prerelease branch -- [Vent] Expose BlockConsumerConfig to adjust backoff and read characteristics -- [Vent] Add vent-side continuity test over blocks (to double-check exactly once delivery of events) +- [Vent] Implement throttling on Ethereum Vent consumer via --max-request-rate= flag to 'vent start' diff --git a/dump/load_test.go b/dump/load_test.go index e50f800a7..3ad4a143c 100644 --- a/dump/load_test.go +++ b/dump/load_test.go @@ -2,10 +2,13 @@ package dump import ( "fmt" + "io" "os" "path" "testing" + "github.com/hyperledger/burrow/rpc/rpcevents" + "github.com/hyperledger/burrow/bcm" "github.com/hyperledger/burrow/storage" @@ -65,16 +68,27 @@ func TestLoadAndDump(t *testing.T) { require.NoError(t, err) } - err = st.IterateStreamEvents(nil, nil, storage.AscendingSort, func(se *exec.StreamEvent) error { - if se.BeginTx != nil { - require.Equal(t, se.BeginTx.TxHeader.Origin.Height, uint64(5)) - require.Equal(t, se.BeginTx.TxHeader.Origin.Index, uint64(2)) - require.Equal(t, se.BeginTx.TxHeader.Origin.ChainID, "BurrowChain_7DB5BD-5BCE58") + streamEvents := new(exec.StreamEvents) + eventHeight := uint64(5) + err = st.IterateStreamEvents(nil, nil, storage.AscendingSort, func(ev *exec.StreamEvent) error { + streamEvents.StreamEvents = append(streamEvents.StreamEvents, ev) + if ev.BeginTx != nil { + require.Equal(t, ev.BeginTx.TxHeader.Origin.Height, eventHeight) + require.Equal(t, ev.BeginTx.TxHeader.Origin.Index, uint64(2)) + require.Equal(t, ev.BeginTx.TxHeader.Origin.ChainID, "BurrowChain_7DB5BD-5BCE58") } - if se.Event != nil { - require.Equal(t, se.Event.Header.Height, uint64(5)) + if ev.Event != nil { + require.Equal(t, ev.Event.Header.Height, eventHeight) } return nil }) require.NoError(t, err) + + // Now ensure that the events can be safely consumed by downstream event consumers (e.g. Vent) + err = rpcevents.ConsumeBlockExecutions(streamEvents, func(be *exec.BlockExecution) error { + // Events carry their original height in the event header + require.Equal(t, eventHeight, be.TxExecutions[0].Events[0].Header.Height) + return nil + }) + require.Equal(t, io.EOF, err) } diff --git a/execution/exec/stream_event.go b/execution/exec/stream_event.go index 5fb5d336c..a62edef30 100644 --- a/execution/exec/stream_event.go +++ b/execution/exec/stream_event.go @@ -245,7 +245,10 @@ func (stack *TxStack) Consume(ev *StreamEvent) (*TxExecution, error) { if err != nil { return nil, err } - if txe.Envelope == nil || txe.Receipt == nil { + // If Origin _is_ set then it implies the transaction originates from a dump and is in an abbreviated + // 'pseudo transaction' for which no envelope is stored (since the dump format is intended to minimal) and we + // must relax the Envelope presence continuity check + if txe.TxHeader.Origin == nil && (txe.Envelope == nil || txe.Receipt == nil) { return nil, fmt.Errorf("TxStack.Consume did not receive transaction envelope for transaction %s", txe.TxHash) } diff --git a/project/history.go b/project/history.go index 4304cf595..1193fcbc5 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,15 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.31.2 - 2020-03-24", + `### Fixed +- [Dump] Stop TxStack EventStream consumer from rejecting events from dump/restored chain because they lack tx Envelopes (as they are intended to to keep dump format minimal) +- [Genesis] Fix hash instability introduced by accidentally removing omitempty from AppHash in genesis + +### Added +- [Vent] Implement throttling on Ethereum Vent consumer via --max-request-rate= flag to 'vent start' +`, + "0.31.1 - 2020-03-19", `### Changed - [Repo] main branch replaces master as per Hyperledger TSC guidelines diff --git a/rpc/rpcevents/blocks.go b/rpc/rpcevents/blocks.go index 310e3d05e..29a1c60d3 100644 --- a/rpc/rpcevents/blocks.go +++ b/rpc/rpcevents/blocks.go @@ -72,7 +72,7 @@ func SingleBlock(height uint64) *BlockRange { return AbsoluteRange(height, height+1) } -func ConsumeBlockExecutions(stream ExecutionEvents_StreamClient, consumer func(*exec.BlockExecution) error, +func ConsumeBlockExecutions(stream exec.EventStream, consumer func(*exec.BlockExecution) error, continuityOptions ...exec.ContinuityOpt) error { var be *exec.BlockExecution var err error From fc88768fd79faee0ae9200c080b93debc606757b Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 25 Mar 2021 01:42:01 +0100 Subject: [PATCH 183/185] Fix issue with dump loader not setting tx indices breaking continuity requirements Signed-off-by: Silas Davis --- dump/load.go | 7 ++- dump/load_test.go | 19 +++++-- dump/test_dump.json | 124 ++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 138 insertions(+), 12 deletions(-) diff --git a/dump/load.go b/dump/load.go index 531e01849..cfeb991ab 100644 --- a/dump/load.go +++ b/dump/load.go @@ -13,7 +13,8 @@ import ( "github.com/hyperledger/burrow/txs/payload" ) -// Load a dump into state +// Load a dump into state. We store all the events from the source chain in a single zeroth block with all the events +// at each height in their own pseudo transaction. func Load(source Source, st *state.State) error { _, _, err := st.Update(func(s state.Updatable) error { txs := make([]*exec.TxExecution, 0) @@ -71,8 +72,10 @@ func Load(source Source, st *state.State) error { if tx == nil { tx = &exec.TxExecution{ TxHeader: &exec.TxHeader{ - TxHash: dumpTxHash(row.EVMEvent.ChainID, row.Height), TxType: payload.TypeCall, + TxHash: dumpTxHash(row.EVMEvent.ChainID, row.Height), + Height: 0, + Index: uint64(len(txs)), Origin: &exec.Origin{ ChainID: row.EVMEvent.ChainID, Height: row.Height, diff --git a/dump/load_test.go b/dump/load_test.go index 3ad4a143c..f09ce0ed4 100644 --- a/dump/load_test.go +++ b/dump/load_test.go @@ -61,7 +61,10 @@ func TestLoadAndDump(t *testing.T) { err = dumper.Transmit(&sink, 0, 0, All) require.NoError(t, err) - st, err = state.MakeGenesisState(testDB(t), &genesis.GenesisDoc{GlobalPermissions: permission.DefaultAccountPermissions, ChainName: fmt.Sprintf("CHAIN #%d", i)}) + st, err = state.MakeGenesisState(testDB(t), &genesis.GenesisDoc{ + GlobalPermissions: permission.DefaultAccountPermissions, + ChainName: fmt.Sprintf("CHAIN #%d", i), + }) require.NoError(t, err) err = Load(&sink, st) @@ -69,17 +72,20 @@ func TestLoadAndDump(t *testing.T) { } streamEvents := new(exec.StreamEvents) - eventHeight := uint64(5) + eventHeight := uint64(4) err = st.IterateStreamEvents(nil, nil, storage.AscendingSort, func(ev *exec.StreamEvent) error { streamEvents.StreamEvents = append(streamEvents.StreamEvents, ev) if ev.BeginTx != nil { - require.Equal(t, ev.BeginTx.TxHeader.Origin.Height, eventHeight) - require.Equal(t, ev.BeginTx.TxHeader.Origin.Index, uint64(2)) + require.Equal(t, eventHeight, ev.BeginTx.TxHeader.Origin.Height) + require.NotZero(t, ev.BeginTx.TxHeader.Origin.Index) require.Equal(t, ev.BeginTx.TxHeader.Origin.ChainID, "BurrowChain_7DB5BD-5BCE58") } if ev.Event != nil { require.Equal(t, ev.Event.Header.Height, eventHeight) } + if ev.EndTx != nil { + eventHeight++ + } return nil }) require.NoError(t, err) @@ -87,7 +93,10 @@ func TestLoadAndDump(t *testing.T) { // Now ensure that the events can be safely consumed by downstream event consumers (e.g. Vent) err = rpcevents.ConsumeBlockExecutions(streamEvents, func(be *exec.BlockExecution) error { // Events carry their original height in the event header - require.Equal(t, eventHeight, be.TxExecutions[0].Events[0].Header.Height) + require.Equal(t, uint64(4), be.TxExecutions[0].Events[0].Header.Height) + require.Equal(t, uint64(0), be.TxExecutions[0].Index) + require.Equal(t, uint64(5), be.TxExecutions[1].Events[0].Header.Height) + require.Equal(t, uint64(1), be.TxExecutions[1].Index) return nil }) require.Equal(t, io.EOF, err) diff --git a/dump/test_dump.json b/dump/test_dump.json index 32c86df6a..374525d29 100644 --- a/dump/test_dump.json +++ b/dump/test_dump.json @@ -1,5 +1,119 @@ -{"Height":6,"Account":{"Address":"0000000000000000000000000000000000000000","PublicKey":{"CurveType":"","PublicKey":""},"Balance":1337,"EVMCode":"","Permissions":{"Base":{"Perms":"send | call | createContract | createAccount | bond | name | proposal | input | batch | hasBase | hasRole","SetBit":"root | send | call | createContract | createAccount | bond | name | proposal | input | batch | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole"}}}} -{"Height":6,"Account":{"Address":"4ABD4279D51DB2EDD2DB0BA0B07AF56ED78CDAC0","PublicKey":{"CurveType":"","PublicKey":""},"Balance":99999999999999,"EVMCode":"","Permissions":{"Base":{"Perms":"root | send | call | createContract | createAccount | bond | name | proposal | input | batch | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole","SetBit":"root | send | call | createContract | createAccount | bond | name | proposal | input | batch | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole"}}}} -{"Height":6,"Account":{"Address":"674A8125610CAF8B9969DC38AAC573691DF926EC","PublicKey":{"CurveType":"","PublicKey":""},"EVMCode":"6080604052600436106049576000357C0100000000000000000000000000000000000000000000000000000000900463FFFFFFFF1680635197C7AA14604E578063F38BD57A146082575B600080FD5B348015605957600080FD5B5060606096565B604051808263FFFFFFFF1663FFFFFFFF16815260200191505060405180910390F35B348015608D57600080FD5B50609460AF565B005B60008060009054906101000A900463FFFFFFFF16905090565B7F2B69880ACA8C98F8F8CA0C47711FEB5DBC892B1D4614F2D9A9DF8D5F6E3A960B60666040518082815260200191505060405180910390A15600A165627A7A723058205121C5ED3D588194B76A15A35AA065F79D0C22EB50FCD97A24AAA60E01E191740029","Permissions":{"Base":{"Perms":"","SetBit":""}},"ContractMeta":[{"CodeHash":"139CBA1935D25D8E42741DA38F353577EB40E0F0E5EAB38F69A4478100BF3504","MetadataHash":"","Metadata":"{\"ContractName\":\"Maker\",\"SourceFile\":\"const.sol\",\"CompilerVersion\":\"0.4.25+commit.59dbf8f1\",\"Abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"getX\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"emitMaker\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"a\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"MakerEvent\",\"type\":\"event\"}]}"}],"Forebear":"674A8125610CAF8B9969DC38AAC573691DF926EC"},"AccountStorage":{"Address":"674A8125610CAF8B9969DC38AAC573691DF926EC","Storage":[{"Key":"0000000000000000000000000000000000000000000000000000000000000000","Value":"0000000000000000000000000000000000000000000000000000000000000066"}]}} -{"Height":6,"Account":{"Address":"787FEB2434C96FB3D33FB6A23DA82B39FD4D466A","PublicKey":{"CurveType":"ed25519","PublicKey":"CCF9DF46B8496A96C6266A4FE29166C5F3FA020CA240D1B237BC3ABB77228357"},"Sequence":3,"Balance":9999970002,"EVMCode":"","Permissions":{"Base":{"Perms":"bond","SetBit":"bond"}}}} -{"Height":5,"EVMEvent":{"ChainID":"BurrowChain_7DB5BD-5BCE58","Index":2,"Time":"2019-07-23T07:23:41.701845678Z","Event":{"Address":"674A8125610CAF8B9969DC38AAC573691DF926EC","Data":"0000000000000000000000000000000000000000000000000000000000000066","Topics":["2B69880ACA8C98F8F8CA0C47711FEB5DBC892B1D4614F2D9A9DF8D5F6E3A960B"]}}} +{ + "Height": 6, + "Account": { + "Address": "0000000000000000000000000000000000000000", + "PublicKey": { + "CurveType": "", + "PublicKey": "" + }, + "Balance": 1337, + "EVMCode": "", + "Permissions": { + "Base": { + "Perms": "send | call | createContract | createAccount | bond | name | proposal | input | batch | hasBase | hasRole", + "SetBit": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole" + } + } + } +} +{ + "Height": 6, + "Account": { + "Address": "4ABD4279D51DB2EDD2DB0BA0B07AF56ED78CDAC0", + "PublicKey": { + "CurveType": "", + "PublicKey": "" + }, + "Balance": 99999999999999, + "EVMCode": "", + "Permissions": { + "Base": { + "Perms": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole", + "SetBit": "root | send | call | createContract | createAccount | bond | name | proposal | input | batch | hasBase | setBase | unsetBase | setGlobal | hasRole | addRole | removeRole" + } + } + } +} +{ + "Height": 6, + "Account": { + "Address": "674A8125610CAF8B9969DC38AAC573691DF926EC", + "PublicKey": { + "CurveType": "", + "PublicKey": "" + }, + "EVMCode": "6080604052600436106049576000357C0100000000000000000000000000000000000000000000000000000000900463FFFFFFFF1680635197C7AA14604E578063F38BD57A146082575B600080FD5B348015605957600080FD5B5060606096565B604051808263FFFFFFFF1663FFFFFFFF16815260200191505060405180910390F35B348015608D57600080FD5B50609460AF565B005B60008060009054906101000A900463FFFFFFFF16905090565B7F2B69880ACA8C98F8F8CA0C47711FEB5DBC892B1D4614F2D9A9DF8D5F6E3A960B60666040518082815260200191505060405180910390A15600A165627A7A723058205121C5ED3D588194B76A15A35AA065F79D0C22EB50FCD97A24AAA60E01E191740029", + "Permissions": { + "Base": { + "Perms": "", + "SetBit": "" + } + }, + "ContractMeta": [ + { + "CodeHash": "139CBA1935D25D8E42741DA38F353577EB40E0F0E5EAB38F69A4478100BF3504", + "MetadataHash": "", + "Metadata": "{\"ContractName\":\"Maker\",\"SourceFile\":\"const.sol\",\"CompilerVersion\":\"0.4.25+commit.59dbf8f1\",\"Abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"getX\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"emitMaker\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"a\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"MakerEvent\",\"type\":\"event\"}]}" + } + ], + "Forebear": "674A8125610CAF8B9969DC38AAC573691DF926EC" + }, + "AccountStorage": { + "Address": "674A8125610CAF8B9969DC38AAC573691DF926EC", + "Storage": [ + { + "Key": "0000000000000000000000000000000000000000000000000000000000000000", + "Value": "0000000000000000000000000000000000000000000000000000000000000066" + } + ] + } +} +{ + "Height": 6, + "Account": { + "Address": "787FEB2434C96FB3D33FB6A23DA82B39FD4D466A", + "PublicKey": { + "CurveType": "ed25519", + "PublicKey": "CCF9DF46B8496A96C6266A4FE29166C5F3FA020CA240D1B237BC3ABB77228357" + }, + "Sequence": 3, + "Balance": 9999970002, + "EVMCode": "", + "Permissions": { + "Base": { + "Perms": "bond", + "SetBit": "bond" + } + } + } +} +{ + "Height": 4, + "EVMEvent": { + "ChainID": "BurrowChain_7DB5BD-5BCE58", + "Index": 1, + "Time": "2019-07-22T07:23:41.701845678Z", + "Event": { + "Address": "674A8125610CAF8B9969DC38AAC573691DF926EC", + "Data": "CAFE000000000000000000000000000000000000000000000000000000000066", + "Topics": [ + "2B69880ACA8C98F8F8CA0C47711FEB5DBC892B1D4614F2D9A9DF8D5F6E3A960B" + ] + } + } +} +{ + "Height": 5, + "EVMEvent": { + "ChainID": "BurrowChain_7DB5BD-5BCE58", + "Index": 2, + "Time": "2019-07-23T07:23:41.701845678Z", + "Event": { + "Address": "674A8125610CAF8B9969DC38AAC573691DF926EC", + "Data": "0000000000000000000000000000000000000000000000000000000000000066", + "Topics": [ + "2B69880ACA8C98F8F8CA0C47711FEB5DBC892B1D4614F2D9A9DF8D5F6E3A960B" + ] + } + } +} From b7005f46734c4c2b4f6fa9c48621145e53420fb4 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 25 Mar 2021 15:34:54 +0100 Subject: [PATCH 184/185] Add vent presentation and README.md link to vent reference doc Signed-off-by: Silas Davis --- docs/reference/vent.md | 4 ++++ vent/README.md | 1 + 2 files changed, 5 insertions(+) create mode 120000 vent/README.md diff --git a/docs/reference/vent.md b/docs/reference/vent.md index bb2ac43b0..48f49723a 100644 --- a/docs/reference/vent.md +++ b/docs/reference/vent.md @@ -1,5 +1,6 @@ # Vent - SQL mapping layer + Vent reads specification files called 'projections', parses their contents, and maps EVM LOG event fields to corresponding SQL columns to create or alter database structures. It listens for a stream of block events from Burrow's GRPC service then parses, unpacks, decodes event data, and builds rows to be upserted in matching event tables, rows are upserted atomically in a single database transaction per block. @@ -13,6 +14,9 @@ the presence or absence of a `"Primary": true` entry in one of the `FieldMapping Vent writes each block of updates atomically and is guaranteed to be crash tolerant. If the Vent process is killed it will resume at the last written height. Burrow stores all previous events in its state so even if you delete the Vent database it can be regenerated deterministically. This feature being a core feature of Vent. +There is a [presentation on vent here](https://competent-yalow-f210f7.netlify.app). + + ## Projections A projection is the name given to the configuration files that Vent uses to interpret EVM events as updates or deletion from SQL tables. They provide an object relational mapping between Solidity events and SQL tables. diff --git a/vent/README.md b/vent/README.md new file mode 120000 index 000000000..ae6f2f5e5 --- /dev/null +++ b/vent/README.md @@ -0,0 +1 @@ +../docs/reference/vent.md \ No newline at end of file From f32578628a7856713e13bcef46ab2cd3fd132131 Mon Sep 17 00:00:00 2001 From: Silas Davis Date: Thu, 25 Mar 2021 18:31:43 +0100 Subject: [PATCH 185/185] Fix LoadDump not setting tx index Signed-off-by: Silas Davis --- CHANGELOG.md | 7 +++++++ NOTES.md | 7 ++----- bcm/blockchain.go | 5 ++++- cmd/burrow/commands/restore.go | 6 +++--- core/kernel.go | 8 ++++---- project/history.go | 5 +++++ 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d066286a..afda61cf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ # [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog +## [0.31.3] - 2020-03-25 +### Fixed +- [Dump] Make load from dump set tx index so BlockAccumulator continuity conditions are met +- [Dump] Improve error messages + + ## [0.31.2] - 2020-03-24 ### Fixed - [Dump] Stop TxStack EventStream consumer from rejecting events from dump/restored chain because they lack tx Envelopes (as they are intended to to keep dump format minimal) @@ -726,6 +732,7 @@ This release marks the start of Eris-DB as the full permissioned blockchain node - [Blockchain] Fix getBlocks to respect block height cap. +[0.31.3]: https://github.com/hyperledger/burrow/compare/v0.31.2...v0.31.3 [0.31.2]: https://github.com/hyperledger/burrow/compare/v0.31.1...v0.31.2 [0.31.1]: https://github.com/hyperledger/burrow/compare/v0.31.0...v0.31.1 [0.31.0]: https://github.com/hyperledger/burrow/compare/v0.30.5...v0.31.0 diff --git a/NOTES.md b/NOTES.md index cfa942dc5..fcdbbffe9 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,7 +1,4 @@ ### Fixed -- [Dump] Stop TxStack EventStream consumer from rejecting events from dump/restored chain because they lack tx Envelopes (as they are intended to to keep dump format minimal) -- [Genesis] Fix hash instability introduced by accidentally removing omitempty from AppHash in genesis - -### Added -- [Vent] Implement throttling on Ethereum Vent consumer via --max-request-rate= flag to 'vent start' +- [Dump] Make load from dump set tx index so BlockAccumulator continuity conditions are met +- [Dump] Improve error messages diff --git a/bcm/blockchain.go b/bcm/blockchain.go index 28fde43fc..6d210cd7a 100644 --- a/bcm/blockchain.go +++ b/bcm/blockchain.go @@ -156,7 +156,10 @@ func (bc *Blockchain) save() error { if err != nil { return err } - bc.db.SetSync(stateKey, encodedState) + err = bc.db.SetSync(stateKey, encodedState) + if err != nil { + return err + } } return nil } diff --git a/cmd/burrow/commands/restore.go b/cmd/burrow/commands/restore.go index ee2db63e5..728f1d7f0 100644 --- a/cmd/burrow/commands/restore.go +++ b/cmd/burrow/commands/restore.go @@ -27,15 +27,15 @@ func Restore(output Output) func(cmd *cli.Cmd) { kern, err := core.NewKernel(conf.BurrowDir) if err != nil { - output.Fatalf("could not create Burrow kernel: %v", err) + output.Fatalf("could not create Burrow kernel: %w", err) } if err = kern.LoadLoggerFromConfig(conf.Logging); err != nil { - output.Fatalf("could not create Burrow kernel: %v", err) + output.Fatalf("could not load logger: %w", err) } if err = kern.LoadDump(conf.GenesisDoc, *filename, *silentOpt); err != nil { - output.Fatalf("could not create Burrow kernel: %v", err) + output.Fatalf("could not load dump: %v", err) } kern.ShutdownAndExit() diff --git a/core/kernel.go b/core/kernel.go index fd9414637..7b0d15476 100644 --- a/core/kernel.go +++ b/core/kernel.go @@ -191,21 +191,21 @@ func (kern *Kernel) LoadDump(genesisDoc *genesis.GenesisDoc, restoreFile string, reader, err := dump.NewFileReader(restoreFile) if err != nil { - return err + return fmt.Errorf("could not create dump file reader: %w", err) } err = dump.Load(reader, kern.State) if err != nil { - return err + return fmt.Errorf("could not load dump state: %w", err) } if !bytes.Equal(kern.State.Hash(), kern.Blockchain.GenesisDoc().AppHash) { - return fmt.Errorf("restore produced a different apphash expect 0x%x got 0x%x", + return fmt.Errorf("restore produced a different apphash, expected %X by actual was %X", kern.Blockchain.GenesisDoc().AppHash, kern.State.Hash()) } err = kern.Blockchain.CommitWithAppHash(kern.State.Hash()) if err != nil { - return fmt.Errorf("unable to commit %v", err) + return fmt.Errorf("unable to commit %w", err) } kern.Logger.InfoMsg("State restore successful", diff --git a/project/history.go b/project/history.go index 1193fcbc5..6186a0d2a 100644 --- a/project/history.go +++ b/project/history.go @@ -48,6 +48,11 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow"). MustDeclareReleases( + "0.31.3 - 2020-03-25", + `### Fixed +- [Dump] Make load from dump set tx index so BlockAccumulator continuity conditions are met +- [Dump] Improve error messages +`, "0.31.2 - 2020-03-24", `### Fixed - [Dump] Stop TxStack EventStream consumer from rejecting events from dump/restored chain because they lack tx Envelopes (as they are intended to to keep dump format minimal)